#! /bin/sh # # This is patch #4 to gawk 3.1. cd to gawk-3.1.3 and sh this file. # Then remove all the .orig files and rename the directory gawk-3.1.4 # Changes to files that are automatically recreated have been omitted. # They will be recreated the first time you run make. # This includes all the extracted example files in awklib. # First, slight rearranging rm -f ABOUT-NLS acinclude.m4 aclocal.m4 doc/texinfo.tex fixvers rm -f install-sh patchlev.h pc/Makefile.tst ylwrap rm -f unsupported/tandem/ptchlvl.h # Create new or updated files from scratch that are smaller than # the diffs would have been. echo - 'ABOUT-NLS' cat << 'EOF' > 'ABOUT-NLS' Notes on the Free Translation Project ************************************* Free software is going international! The Free Translation Project is a way to get maintainers of free software, translators, and users all together, so that will gradually become able to speak many languages. A few packages already provide translations for their messages. If you found this `ABOUT-NLS' file inside a distribution, you may assume that the distributed package does use GNU `gettext' internally, itself available at your nearest GNU archive site. But you do _not_ need to install GNU `gettext' prior to configuring, installing or using this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and work at translations should contact the appropriate team. When reporting bugs in the `intl/' directory or bugs which may be related to internationalization, you should tell about the version of `gettext' which is used. The information can be found in the `intl/VERSION' file, in internationalized packages. 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'. 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 GNU `gettext' own library will be used. This library is wholly contained within this package, usually in the `intl/' subdirectory, so prior installation of the GNU `gettext' package is _not_ required. Installers may use special options at configuration time for changing the default behaviour. The commands: ./configure --with-included-gettext ./configure --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 be not what is desirable. You should use the more recent version of the GNU `gettext' library. I.e. if the file `intl/VERSION' shows that the library which comes with this package is more recent, you should use ./configure --with-included-gettext to prevent auto-detection. 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 have usually many `po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations have been forbidden at `configure' time by using the `--disable-nls' switch, all available translations are installed together with the package. However, the environment variable `LINGUAS' may be set, prior to configuration, to limit the installed set. `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. Using This Package ================== As a user, if your language has been installed for this package, you only have to set the `LANG' environment variable to the appropriate `LL_CC' combination. 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 country 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. 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://www.iro.umontreal.ca/contrib/po/HTML/', in the "National 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 `translation@iro.umontreal.ca' to reach the coordinator for all translator teams. The English team is special. It works at improving and uniformizing the terminology in use. Proven linguistic skill are praised more than programming skill, here. Available Packages ================== Languages are not equally supported in all packages. The following matrix shows the current state of internationalization, as of January 2004. 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 da de el en en_GB eo es +----------------------------------------------------+ a2ps | [] [] [] [] | aegis | () | ant-phone | () | anubis | | ap-utils | | aspell | [] | bash | [] [] [] [] | batchelor | | bfd | [] [] | binutils | [] [] | bison | [] [] [] | bluez-pin | [] [] [] | clisp | | clisp | [] [] [] | console-tools | [] [] | coreutils | [] [] [] [] | cpio | [] [] [] | darkstat | [] () [] | diffutils | [] [] [] [] [] [] [] | e2fsprogs | [] [] [] | enscript | [] [] [] [] | error | [] [] [] [] [] | fetchmail | [] () [] [] [] [] | fileutils | [] [] [] | findutils | [] [] [] [] [] [] [] | flex | [] [] [] [] | fslint | | gas | [] | gawk | [] [] [] [] | gbiff | [] | gcal | [] | gcc | [] [] | gettext | [] [] [] [] [] | gettext-examples | [] [] [] [] | gettext-runtime | [] [] [] [] [] | gettext-tools | [] [] [] | gimp-print | [] [] [] [] [] | gliv | | glunarclock | [] [] | gnubiff | [] | gnucash | [] () [] [] | gnucash-glossary | [] () [] | gnupg | [] () [] [] [] [] | gpe-aerial | [] | gpe-beam | [] [] | gpe-calendar | [] [] | gpe-clock | [] [] | gpe-conf | [] [] | gpe-contacts | [] [] | gpe-edit | [] | gpe-go | [] | gpe-login | [] [] | gpe-ownerinfo | [] [] | gpe-sketchbook | [] [] | gpe-su | [] [] | gpe-taskmanager | [] [] | gpe-timesheet | [] | gpe-today | [] [] | gpe-todo | [] [] | gphoto2 | [] [] [] [] | gprof | [] [] [] | gpsdrive | () () () | gramadoir | [] | grep | [] [] [] [] [] [] | gretl | [] | gtick | [] () | hello | [] [] [] [] [] [] | id-utils | [] [] | indent | [] [] [] [] | iso_3166 | [] [] [] [] [] [] [] [] [] [] | iso_3166_1 | [] [] [] [] [] [] | iso_3166_2 | | iso_3166_3 | [] | iso_4217 | [] [] [] [] | iso_639 | | jpilot | [] [] [] | jtag | | jwhois | [] | kbd | [] [] [] [] [] | latrine | () | ld | [] [] | libc | [] [] [] [] [] [] | libgpewidget | [] [] | libiconv | [] [] [] [] [] | lifelines | [] () | lilypond | [] | lingoteach | | lingoteach_lessons | () () | lynx | [] [] [] [] | m4 | [] [] [] [] | mailutils | [] [] | make | [] [] [] | man-db | [] () [] [] () | minicom | [] [] [] | mysecretdiary | [] [] [] | nano | [] () [] [] [] | nano_1_0 | [] () [] [] [] | opcodes | [] | parted | [] [] [] [] [] | ptx | [] [] [] [] [] | python | | radius | [] | recode | [] [] [] [] [] [] [] | rpm | [] [] | screem | | scrollkeeper | [] [] [] [] [] [] | sed | [] [] [] [] [] [] | sh-utils | [] [] [] | shared-mime-info | | sharutils | [] [] [] [] [] [] | silky | () | skencil | [] () [] | sketch | [] () [] | soundtracker | [] [] [] | sp | [] | tar | [] [] [] [] | texinfo | [] [] [] | textutils | [] [] [] [] | tin | () () | tp-robot | | tuxpaint | [] [] [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] [] [] [] | vorbis-tools | [] [] [] [] | wastesedge | () | wdiff | [] [] [] [] | wget | [] [] [] [] [] [] | xchat | [] [] [] [] | xfree86_xkb_xml | [] [] | xpad | [] | +----------------------------------------------------+ af am ar az be bg bs ca cs da de el en en_GB eo es 4 0 0 1 9 4 1 40 41 60 78 17 1 5 13 68 et eu fa fi fr ga gl he hr hu id is it ja ko lg +-------------------------------------------------+ a2ps | [] [] [] () () | aegis | | ant-phone | [] | anubis | [] | ap-utils | [] | aspell | [] [] | bash | [] [] | batchelor | [] [] | bfd | [] | binutils | [] [] | bison | [] [] [] [] | bluez-pin | [] [] [] [] [] | clisp | | clisp | [] | console-tools | | coreutils | [] [] [] [] [] [] | cpio | [] [] [] [] | darkstat | () [] [] [] | diffutils | [] [] [] [] [] [] [] | e2fsprogs | | enscript | [] [] | error | [] [] [] [] | fetchmail | [] | fileutils | [] [] [] [] [] [] | findutils | [] [] [] [] [] [] [] [] [] [] [] | flex | [] [] [] | fslint | [] | gas | [] | gawk | [] [] [] | gbiff | [] | gcal | [] | gcc | [] | gettext | [] [] [] | gettext-examples | [] [] | gettext-runtime | [] [] [] [] [] | gettext-tools | [] [] [] | gimp-print | [] [] | gliv | () | glunarclock | [] [] [] [] | gnubiff | [] | gnucash | () [] | gnucash-glossary | [] | gnupg | [] [] [] [] [] [] [] | gpe-aerial | [] | gpe-beam | [] | gpe-calendar | [] [] [] | gpe-clock | [] | gpe-conf | [] | gpe-contacts | [] [] | gpe-edit | [] [] | gpe-go | [] | gpe-login | [] [] | gpe-ownerinfo | [] [] [] | gpe-sketchbook | [] | gpe-su | [] | gpe-taskmanager | [] | gpe-timesheet | [] [] [] | gpe-today | [] [] | gpe-todo | [] [] | gphoto2 | [] [] [] | gprof | [] [] | gpsdrive | () () () | gramadoir | [] [] | grep | [] [] [] [] [] [] [] [] [] [] [] | gretl | [] [] | gtick | [] [] [] | hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | id-utils | [] [] [] [] | indent | [] [] [] [] [] [] [] [] [] | iso_3166 | [] [] [] [] [] [] [] | iso_3166_1 | [] [] [] [] [] | iso_3166_2 | | iso_3166_3 | | iso_4217 | [] [] [] [] [] [] | iso_639 | | jpilot | [] () | jtag | [] | jwhois | [] [] [] [] | kbd | [] | latrine | [] | ld | [] | libc | [] [] [] [] [] [] | libgpewidget | [] [] [] [] | libiconv | [] [] [] [] [] [] [] [] [] | lifelines | () | lilypond | [] | lingoteach | [] [] | lingoteach_lessons | | lynx | [] [] [] [] | m4 | [] [] [] [] | mailutils | | make | [] [] [] [] [] [] | man-db | () () | minicom | [] [] [] [] | mysecretdiary | [] [] | nano | [] [] [] [] | nano_1_0 | [] [] [] [] | opcodes | [] | parted | [] [] [] | ptx | [] [] [] [] [] [] [] | python | | radius | [] | recode | [] [] [] [] [] [] | rpm | [] [] | screem | | scrollkeeper | [] | sed | [] [] [] [] [] [] [] [] [] | sh-utils | [] [] [] [] [] [] [] | shared-mime-info | [] [] [] | sharutils | [] [] [] [] [] | silky | () [] () () | skencil | [] | sketch | [] | soundtracker | [] [] | sp | [] () | tar | [] [] [] [] [] [] [] [] [] | texinfo | [] [] [] [] | textutils | [] [] [] [] [] [] | tin | [] () | tp-robot | [] | tuxpaint | [] [] [] [] [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | [] [] | util-linux | [] [] [] [] () [] | vorbis-tools | [] | wastesedge | () | wdiff | [] [] [] [] [] [] | wget | [] [] [] [] [] [] [] | xchat | [] [] [] | xfree86_xkb_xml | [] [] | xpad | [] [] | +-------------------------------------------------+ et eu fa fi fr ga gl he hr hu id is it ja ko lg 22 2 1 26 106 28 24 8 10 41 33 1 26 33 12 0 lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru +-----------------------------------------------------+ a2ps | [] [] () () [] [] [] | aegis | () () () | ant-phone | [] [] | anubis | [] [] [] [] [] [] | ap-utils | [] () [] | aspell | [] | bash | [] [] [] | batchelor | [] | bfd | [] | binutils | [] | bison | [] [] [] [] [] | bluez-pin | [] [] [] | clisp | | clisp | [] | console-tools | [] | coreutils | [] [] | cpio | [] [] [] [] [] | darkstat | [] [] [] [] | diffutils | [] [] [] [] [] [] | e2fsprogs | [] | enscript | [] [] [] [] | error | [] [] [] | fetchmail | [] [] () [] | fileutils | [] [] [] | findutils | [] [] [] [] [] | flex | [] [] [] [] | fslint | [] [] | gas | | gawk | [] [] [] | gbiff | [] [] | gcal | | gcc | | gettext | [] [] [] | gettext-examples | [] [] [] | gettext-runtime | [] [] [] [] | gettext-tools | [] [] | gimp-print | [] | gliv | [] [] [] | glunarclock | [] [] [] [] | gnubiff | [] | gnucash | [] [] () [] | gnucash-glossary | [] [] | gnupg | [] | gpe-aerial | [] [] [] [] | gpe-beam | [] [] [] [] | gpe-calendar | [] [] [] [] | gpe-clock | [] [] [] [] | gpe-conf | [] [] [] [] | gpe-contacts | [] [] [] [] | gpe-edit | [] [] [] [] | gpe-go | [] [] [] | gpe-login | [] [] [] [] | gpe-ownerinfo | [] [] [] [] | gpe-sketchbook | [] [] [] [] | gpe-su | [] [] [] [] | gpe-taskmanager | [] [] [] [] | gpe-timesheet | [] [] [] [] | gpe-today | [] [] [] [] | gpe-todo | [] [] [] [] | gphoto2 | [] | gprof | [] [] | gpsdrive | () () [] | gramadoir | () [] | grep | [] [] [] [] [] | gretl | | gtick | [] [] [] | hello | [] [] [] [] [] [] [] [] [] [] | id-utils | [] [] [] [] | indent | [] [] [] [] | iso_3166 | [] [] [] | iso_3166_1 | [] [] | iso_3166_2 | | iso_3166_3 | [] | iso_4217 | [] [] [] [] [] [] [] [] | iso_639 | [] | jpilot | () () | jtag | | jwhois | [] [] [] [] () | kbd | [] [] [] | latrine | [] | ld | | libc | [] [] [] [] | libgpewidget | [] [] [] | libiconv | [] [] [] [] [] | lifelines | | lilypond | | lingoteach | | lingoteach_lessons | | lynx | [] [] [] | m4 | [] [] [] [] [] | mailutils | [] [] [] | make | [] [] [] [] | man-db | [] | minicom | [] [] [] [] | mysecretdiary | [] [] [] | nano | [] [] [] [] [] | nano_1_0 | [] [] [] [] [] [] | opcodes | [] [] | parted | [] [] [] [] | ptx | [] [] [] [] [] [] [] [] | python | | radius | [] [] | recode | [] [] [] [] | rpm | [] [] [] | screem | | scrollkeeper | [] [] [] [] [] | sed | [] [] [] | sh-utils | [] [] | shared-mime-info | [] [] | sharutils | [] [] | silky | () | skencil | [] [] | sketch | [] [] | soundtracker | | sp | | tar | [] [] [] [] [] [] | texinfo | [] [] [] [] | textutils | [] [] | tin | | tp-robot | [] | tuxpaint | [] [] [] [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] [] | vorbis-tools | [] [] [] | wastesedge | | wdiff | [] [] [] [] [] | wget | [] [] [] | xchat | [] [] [] | xfree86_xkb_xml | [] [] | xpad | [] [] | +-----------------------------------------------------+ lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru 1 2 0 3 12 0 10 69 6 7 1 40 26 36 76 63 sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu +-----------------------------------------------------+ a2ps | [] [] [] [] | 16 aegis | | 0 ant-phone | | 3 anubis | [] [] | 9 ap-utils | () | 3 aspell | | 4 bash | | 9 batchelor | | 3 bfd | [] [] | 6 binutils | [] [] [] | 8 bison | [] [] | 14 bluez-pin | [] [] [] | 14 clisp | | 0 clisp | | 5 console-tools | | 3 coreutils | [] [] [] [] | 16 cpio | [] [] | 14 darkstat | [] [] [] () () | 12 diffutils | [] [] [] | 23 e2fsprogs | [] [] | 6 enscript | [] [] | 12 error | [] [] [] | 15 fetchmail | [] [] | 11 fileutils | [] [] [] [] [] | 17 findutils | [] [] [] [] [] [] | 29 flex | [] [] | 13 fslint | | 3 gas | [] | 3 gawk | [] [] | 12 gbiff | | 4 gcal | [] [] | 4 gcc | [] | 4 gettext | [] [] [] [] [] | 16 gettext-examples | [] [] [] [] [] | 14 gettext-runtime | [] [] [] [] [] [] [] [] | 22 gettext-tools | [] [] [] [] [] [] | 14 gimp-print | [] [] | 10 gliv | | 3 glunarclock | [] [] [] | 13 gnubiff | | 3 gnucash | [] [] | 9 gnucash-glossary | [] [] [] | 8 gnupg | [] [] [] [] | 17 gpe-aerial | [] | 7 gpe-beam | [] | 8 gpe-calendar | [] [] [] [] | 13 gpe-clock | [] [] [] | 10 gpe-conf | [] [] | 9 gpe-contacts | [] [] [] | 11 gpe-edit | [] [] [] [] [] | 12 gpe-go | | 5 gpe-login | [] [] [] [] [] | 13 gpe-ownerinfo | [] [] [] [] | 13 gpe-sketchbook | [] [] | 9 gpe-su | [] [] [] | 10 gpe-taskmanager | [] [] [] | 10 gpe-timesheet | [] [] [] [] | 12 gpe-today | [] [] [] [] [] | 13 gpe-todo | [] [] [] [] | 12 gphoto2 | [] [] [] | 11 gprof | [] [] | 9 gpsdrive | [] [] | 3 gramadoir | [] | 5 grep | [] [] [] [] | 26 gretl | | 3 gtick | | 7 hello | [] [] [] [] [] | 34 id-utils | [] [] | 12 indent | [] [] [] [] | 21 iso_3166 | [] [] [] [] [] [] [] | 27 iso_3166_1 | [] [] [] | 16 iso_3166_2 | | 0 iso_3166_3 | | 2 iso_4217 | [] [] [] [] [] [] | 24 iso_639 | | 1 jpilot | [] [] [] [] [] | 9 jtag | [] | 2 jwhois | () [] [] | 11 kbd | [] [] | 11 latrine | | 2 ld | [] [] | 5 libc | [] [] [] [] | 20 libgpewidget | [] [] [] [] | 13 libiconv | [] [] [] [] [] [] [] [] | 27 lifelines | [] | 2 lilypond | [] | 3 lingoteach | | 2 lingoteach_lessons | () | 0 lynx | [] [] [] | 14 m4 | [] [] | 15 mailutils | | 5 make | [] [] [] | 16 man-db | [] | 5 minicom | | 11 mysecretdiary | [] [] | 10 nano | [] [] [] [] | 17 nano_1_0 | [] [] [] | 17 opcodes | [] [] | 6 parted | [] [] [] | 15 ptx | [] [] | 22 python | | 0 radius | | 4 recode | [] [] [] | 20 rpm | [] [] | 9 screem | [] [] | 2 scrollkeeper | [] [] [] | 15 sed | [] [] [] [] [] [] | 24 sh-utils | [] [] | 14 shared-mime-info | [] [] | 7 sharutils | [] [] [] [] | 17 silky | () | 3 skencil | [] | 6 sketch | [] | 6 soundtracker | [] [] | 7 sp | [] | 3 tar | [] [] [] [] [] | 24 texinfo | [] [] [] | 14 textutils | [] [] [] [] | 16 tin | | 1 tp-robot | | 2 tuxpaint | [] [] [] [] [] | 29 unicode-han-tra... | | 0 unicode-transla... | | 2 util-linux | [] [] | 15 vorbis-tools | | 8 wastesedge | | 0 wdiff | [] [] [] | 18 wget | [] [] [] [] [] [] [] [] | 24 xchat | [] [] [] [] [] | 15 xfree86_xkb_xml | [] [] [] [] [] | 11 xpad | | 5 +-----------------------------------------------------+ 63 teams sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu 131 domains 47 19 28 83 0 0 59 13 1 1 11 0 22 22 0 1373 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 January 2004 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://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. 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 `translation@iro.umontreal.ca' to make the `.pot' files available to the translation teams. EOF echo - 'aclocal.m4' cat << 'EOF' > 'aclocal.m4' # generated automatically by aclocal 1.8.5 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # 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. # -*- Autoconf -*- # Copyright (C) 2002, 2003 Free Software Foundation, Inc. # Generated from amversion.in; do not edit by hand. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 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. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.8.5])]) # AM_AUX_DIR_EXPAND # Copyright (C) 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # 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` ]) # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # This was merged into AC_PROG_CC in Autoconf. AU_DEFUN([AM_PROG_CC_STDC], [AC_PROG_CC AC_DIAGNOSE([obsolete], [$0: your code should no longer depend upon `am_cv_prog_cc_stdc', but upon `ac_cv_prog_cc_stdc'. Remove this warning and the assignment when you adjust the code. You can also remove the above call to AC_PROG_CC if you already called it elsewhere.]) am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc ]) AU_DEFUN([fp_PROG_CC_STDC]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 6 # 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]) AC_SUBST([$1_FALSE]) 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])]) # serial 7 -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # 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], 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 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 case $depmode in 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 ;; none) break ;; esac # 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. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} 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]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. #serial 2 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; 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. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # 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 ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //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"]) ]) # Do all the work for Automake. -*- Autoconf -*- # 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. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 11 # 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.58])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 # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # 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 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) AM_MISSING_PROG(AMTAR, tar) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP 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([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 ]) ]) # 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_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. # Copyright (C) 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # -*- Autoconf -*- # Copyright (C) 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 1 # 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])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # 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 done .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 # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # 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 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # 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 ]) # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # Copyright (C) 2003, 2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # Keeping the `.' argument allows $(mkdir_p) to be used without # argument. Indeed, we sometimes output rules like # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more # expensive solution, as it forces Make to start a sub-shell.) mkdir_p='mkdir -p -- .' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # _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], [AC_FOREACH([_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) 1996, 1997, 1998, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 AC_DEFUN([AM_C_PROTOTYPES], [AC_REQUIRE([AC_C_PROTOTYPES]) if test "$ac_cv_prog_cc_stdc" != no; then U= ANSI2KNR= else U=_ ANSI2KNR=./ansi2knr fi # Ensure some checks needed by ansi2knr itself. AC_REQUIRE([AC_HEADER_STDC]) AC_CHECK_HEADERS(string.h) AC_SUBST(U)dnl AC_SUBST(ANSI2KNR)dnl ]) AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) # # Check to make sure that the build environment is sane. # # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # 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 # 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)]) # AM_PROG_INSTALL_STRIP # Copyright (C) 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # 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="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) m4_include([m4/arch.m4]) m4_include([m4/codeset.m4]) m4_include([m4/gettext.m4]) m4_include([m4/glibc21.m4]) m4_include([m4/iconv.m4]) m4_include([m4/intdiv0.m4]) m4_include([m4/intmax.m4]) m4_include([m4/intmax_t.m4]) m4_include([m4/inttypes-pri.m4]) m4_include([m4/inttypes.m4]) m4_include([m4/inttypes_h.m4]) m4_include([m4/lcmessage.m4]) m4_include([m4/lib-ld.m4]) m4_include([m4/lib-link.m4]) m4_include([m4/lib-prefix.m4]) m4_include([m4/longdouble.m4]) m4_include([m4/longlong.m4]) m4_include([m4/nls.m4]) m4_include([m4/po.m4]) m4_include([m4/printf-posix.m4]) m4_include([m4/progtest.m4]) m4_include([m4/signed.m4]) m4_include([m4/size_max.m4]) m4_include([m4/socket.m4]) m4_include([m4/stdint_h.m4]) m4_include([m4/strtod.m4]) m4_include([m4/uintmax_t.m4]) m4_include([m4/ulonglong.m4]) m4_include([m4/wchar_t.m4]) m4_include([m4/wint_t.m4]) m4_include([m4/xsize.m4]) EOF echo - 'awklib/eg/lib/strtonum.awk' cat << 'EOF' > 'awklib/eg/lib/strtonum.awk' # strtonum --- convert string to number # # Arnold Robbins, arnold@skeeve.com, Public Domain # February, 2004 function mystrtonum(str, ret, chars, n, i, k, c) { if (str ~ /^0[0-7]*$/) { # octal n = length(str) ret = 0 for (i = 1; i <= n; i++) { c = substr(str, i, 1) if ((k = index("01234567", c)) > 0) k-- # adjust for 1-basing in awk ret = ret * 8 + k } } else if (str ~ /^0[xX][0-9a-fA-f]+/) { # hexadecimal str = substr(str, 3) # lop off leading 0x n = length(str) ret = 0 for (i = 1; i <= n; i++) { c = substr(str, i, 1) c = tolower(c) if ((k = index("0123456789", c)) > 0) k-- # adjust for 1-basing in awk else if ((k = index("abcdef", c)) > 0) k += 9 ret = ret * 16 + k } } else if (str ~ /^[-+]?([0-9]+([.][0-9]*([Ee][0-9]+)?)?|([.][0-9]+([Ee][-+]?[0-9]+)?))$/) { # decimal number, possibly floating point ret = str + 0 } else ret = "NOT-A-NUMBER" return ret } # BEGIN { # gawk test harness # a[1] = "25" # a[2] = ".31" # a[3] = "0123" # a[4] = "0xdeadBEEF" # a[5] = "123.45" # a[6] = "1.e3" # a[7] = "1.32" # a[7] = "1.32E2" # # for (i = 1; i in a; i++) # print a[i], strtonum(a[i]), mystrtonum(a[i]) # } EOF echo - 'dfa.h' cat << 'EOF' > 'dfa.h' /* dfa.h - declarations for GNU deterministic regexp compiler Copyright (C) 1988, 1998, 2002, 2004 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ /* Written June, 1988 by Mike Haertel */ /* FIXME: 2. We should not export so much of the DFA internals. In addition to clobbering modularity, we eat up valuable name space. */ #ifdef __STDC__ # ifndef _PTR_T # define _PTR_T typedef void * ptr_t; # endif #else # ifndef _PTR_T # define _PTR_T typedef char * ptr_t; # endif #endif #ifdef PARAMS # undef PARAMS #endif #if PROTOTYPES # define PARAMS(x) x #else # define PARAMS(x) () #endif /* Number of bits in an unsigned char. */ #ifndef CHARBITS #define CHARBITS 8 #endif /* First integer value that is greater than any character code. */ #define NOTCHAR (1 << CHARBITS) /* INTBITS need not be exact, just a lower bound. */ #ifndef INTBITS #define INTBITS (CHARBITS * sizeof (int)) #endif /* Number of ints required to hold a bit for every character. */ #define CHARCLASS_INTS ((NOTCHAR + INTBITS - 1) / INTBITS) /* Sets of unsigned characters are stored as bit vectors in arrays of ints. */ typedef int charclass[CHARCLASS_INTS]; /* The regexp is parsed into an array of tokens in postfix form. Some tokens are operators and others are terminal symbols. Most (but not all) of these codes are returned by the lexical analyzer. */ typedef enum { END = -1, /* END is a terminal symbol that matches the end of input; any value of END or less in the parse tree is such a symbol. Accepting states of the DFA are those that would have a transition on END. */ /* Ordinary character values are terminal symbols that match themselves. */ EMPTY = NOTCHAR, /* EMPTY is a terminal symbol that matches the empty string. */ BACKREF, /* BACKREF is generated by \; it it not completely handled. If the scanner detects a transition on backref, it returns a kind of "semi-success" indicating that the match will have to be verified with a backtracking matcher. */ BEGLINE, /* BEGLINE is a terminal symbol that matches the empty string if it is at the beginning of a line. */ ENDLINE, /* ENDLINE is a terminal symbol that matches the empty string if it is at the end of a line. */ BEGWORD, /* BEGWORD is a terminal symbol that matches the empty string if it is at the beginning of a word. */ ENDWORD, /* ENDWORD is a terminal symbol that matches the empty string if it is at the end of a word. */ LIMWORD, /* LIMWORD is a terminal symbol that matches the empty string if it is at the beginning or the end of a word. */ NOTLIMWORD, /* NOTLIMWORD is a terminal symbol that matches the empty string if it is not at the beginning or end of a word. */ QMARK, /* QMARK is an operator of one argument that matches zero or one occurences of its argument. */ STAR, /* STAR is an operator of one argument that matches the Kleene closure (zero or more occurrences) of its argument. */ PLUS, /* PLUS is an operator of one argument that matches the positive closure (one or more occurrences) of its argument. */ REPMN, /* REPMN is a lexical token corresponding to the {m,n} construct. REPMN never appears in the compiled token vector. */ CAT, /* CAT is an operator of two arguments that matches the concatenation of its arguments. CAT is never returned by the lexical analyzer. */ OR, /* OR is an operator of two arguments that matches either of its arguments. */ ORTOP, /* OR at the toplevel in the parse tree. This is used for a boyer-moore heuristic. */ LPAREN, /* LPAREN never appears in the parse tree, it is only a lexeme. */ RPAREN, /* RPAREN never appears in the parse tree. */ CRANGE, /* CRANGE never appears in the parse tree. It stands for a character range that can match a string of one or more characters. For example, [a-z] can match "ch" in a Spanish locale. */ #ifdef MBS_SUPPORT ANYCHAR, /* ANYCHAR is a terminal symbol that matches any multibyte(or singlebyte) characters. It is used only if MB_CUR_MAX > 1. */ MBCSET, /* MBCSET is similar to CSET, but for multibyte characters. */ #endif /* MBS_SUPPORT */ CSET /* CSET and (and any value greater) is a terminal symbol that matches any of a class of characters. */ } token; /* Sets are stored in an array in the compiled dfa; the index of the array corresponding to a given set token is given by SET_INDEX(t). */ #define SET_INDEX(t) ((t) - CSET) /* Sometimes characters can only be matched depending on the surrounding context. Such context decisions depend on what the previous character was, and the value of the current (lookahead) character. Context dependent constraints are encoded as 8 bit integers. Each bit that is set indicates that the constraint succeeds in the corresponding context. bit 7 - previous and current are newlines bit 6 - previous was newline, current isn't bit 5 - previous wasn't newline, current is bit 4 - neither previous nor current is a newline bit 3 - previous and current are word-constituents bit 2 - previous was word-constituent, current isn't bit 1 - previous wasn't word-constituent, current is bit 0 - neither previous nor current is word-constituent Word-constituent characters are those that satisfy isalnum(). The macro SUCCEEDS_IN_CONTEXT determines whether a a given constraint succeeds in a particular context. Prevn is true if the previous character was a newline, currn is true if the lookahead character is a newline. Prevl and currl similarly depend upon whether the previous and current characters are word-constituent letters. */ #define MATCHES_NEWLINE_CONTEXT(constraint, prevn, currn) \ ((constraint) & 1 << (((prevn) ? 2 : 0) + ((currn) ? 1 : 0) + 4)) #define MATCHES_LETTER_CONTEXT(constraint, prevl, currl) \ ((constraint) & 1 << (((prevl) ? 2 : 0) + ((currl) ? 1 : 0))) #define SUCCEEDS_IN_CONTEXT(constraint, prevn, currn, prevl, currl) \ (MATCHES_NEWLINE_CONTEXT(constraint, prevn, currn) \ && MATCHES_LETTER_CONTEXT(constraint, prevl, currl)) /* The following macros give information about what a constraint depends on. */ #define PREV_NEWLINE_DEPENDENT(constraint) \ (((constraint) & 0xc0) >> 2 != ((constraint) & 0x30)) #define PREV_LETTER_DEPENDENT(constraint) \ (((constraint) & 0x0c) >> 2 != ((constraint) & 0x03)) /* Tokens that match the empty string subject to some constraint actually work by applying that constraint to determine what may follow them, taking into account what has gone before. The following values are the constraints corresponding to the special tokens previously defined. */ #define NO_CONSTRAINT 0xff #define BEGLINE_CONSTRAINT 0xcf #define ENDLINE_CONSTRAINT 0xaf #define BEGWORD_CONSTRAINT 0xf2 #define ENDWORD_CONSTRAINT 0xf4 #define LIMWORD_CONSTRAINT 0xf6 #define NOTLIMWORD_CONSTRAINT 0xf9 /* States of the recognizer correspond to sets of positions in the parse tree, together with the constraints under which they may be matched. So a position is encoded as an index into the parse tree together with a constraint. */ typedef struct { unsigned index; /* Index into the parse array. */ unsigned constraint; /* Constraint for matching this position. */ } position; /* Sets of positions are stored as arrays. */ typedef struct { position *elems; /* Elements of this position set. */ int nelem; /* Number of elements in this set. */ } position_set; /* A state of the dfa consists of a set of positions, some flags, and the token value of the lowest-numbered position of the state that contains an END token. */ typedef struct { int hash; /* Hash of the positions of this state. */ position_set elems; /* Positions this state could match. */ char newline; /* True if previous state matched newline. */ char letter; /* True if previous state matched a letter. */ char backref; /* True if this state matches a \. */ unsigned char constraint; /* Constraint for this state to accept. */ int first_end; /* Token value of the first END in elems. */ #ifdef MBS_SUPPORT position_set mbps; /* Positions which can match multibyte characters. e.g. period. These staff are used only if MB_CUR_MAX > 1. */ #endif } dfa_state; /* Element of a list of strings, at least one of which is known to appear in any R.E. matching the DFA. */ struct dfamust { int exact; char *must; struct dfamust *next; }; #ifdef MBS_SUPPORT /* A bracket operator. e.g. [a-c], [[:alpha:]], etc. */ struct mb_char_classes { int invert; wchar_t *chars; /* Normal characters. */ int nchars; wctype_t *ch_classes; /* Character classes. */ int nch_classes; wchar_t *range_sts; /* Range characters (start of the range). */ wchar_t *range_ends; /* Range characters (end of the range). */ int nranges; char **equivs; /* Equivalent classes. */ int nequivs; char **coll_elems; int ncoll_elems; /* Collating elements. */ }; #endif /* A compiled regular expression. */ struct dfa { /* Stuff built by the scanner. */ charclass *charclasses; /* Array of character sets for CSET tokens. */ int cindex; /* Index for adding new charclasses. */ int calloc; /* Number of charclasses currently allocated. */ /* Stuff built by the parser. */ token *tokens; /* Postfix parse array. */ int tindex; /* Index for adding new tokens. */ int talloc; /* Number of tokens currently allocated. */ int depth; /* Depth required of an evaluation stack used for depth-first traversal of the parse tree. */ int nleaves; /* Number of leaves on the parse tree. */ int nregexps; /* Count of parallel regexps being built with dfaparse(). */ #ifdef MBS_SUPPORT /* These stuff are used only if MB_CUR_MAX > 1 or multibyte environments. */ int nmultibyte_prop; int *multibyte_prop; /* The value of multibyte_prop[i] is defined by following rule. if tokens[i] < NOTCHAR bit 1 : tokens[i] is a singlebyte character, or the last-byte of a multibyte character. bit 0 : tokens[i] is a singlebyte character, or the 1st-byte of a multibyte character. if tokens[i] = MBCSET ("the index of mbcsets correspnd to this operator" << 2) + 3 e.g. tokens = 'single_byte_a', 'multi_byte_A', single_byte_b' = 'sb_a', 'mb_A(1st byte)', 'mb_A(2nd byte)', 'mb_A(3rd byte)', 'sb_b' multibyte_prop = 3 , 1 , 0 , 2 , 3 */ /* Array of the bracket expressoin in the DFA. */ struct mb_char_classes *mbcsets; int nmbcsets; int mbcsets_alloc; #endif /* Stuff owned by the state builder. */ dfa_state *states; /* States of the dfa. */ int sindex; /* Index for adding new states. */ int salloc; /* Number of states currently allocated. */ /* Stuff built by the structure analyzer. */ position_set *follows; /* Array of follow sets, indexed by position index. The follow of a position is the set of positions containing characters that could conceivably follow a character matching the given position in a string matching the regexp. Allocated to the maximum possible position index. */ int searchflag; /* True if we are supposed to build a searching as opposed to an exact matcher. A searching matcher finds the first and shortest string matching a regexp anywhere in the buffer, whereas an exact matcher finds the longest string matching, but anchored to the beginning of the buffer. */ /* Stuff owned by the executor. */ int tralloc; /* Number of transition tables that have slots so far. */ int trcount; /* Number of transition tables that have actually been built. */ int **trans; /* Transition tables for states that can never accept. If the transitions for a state have not yet been computed, or the state could possibly accept, its entry in this table is NULL. */ int **realtrans; /* Trans always points to realtrans + 1; this is so trans[-1] can contain NULL. */ int **fails; /* Transition tables after failing to accept on a state that potentially could do so. */ int *success; /* Table of acceptance conditions used in dfaexec and computed in build_state. */ int *newlines; /* Transitions on newlines. The entry for a newline in any transition table is always -1 so we can count lines without wasting too many cycles. The transition for a newline is stored separately and handled as a special case. Newline is also used as a sentinel at the end of the buffer. */ struct dfamust *musts; /* List of strings, at least one of which is known to appear in any r.e. matching the dfa. */ }; /* Some macros for user access to dfa internals. */ /* ACCEPTING returns true if s could possibly be an accepting state of r. */ #define ACCEPTING(s, r) ((r).states[s].constraint) /* ACCEPTS_IN_CONTEXT returns true if the given state accepts in the specified context. */ #define ACCEPTS_IN_CONTEXT(prevn, currn, prevl, currl, state, dfa) \ SUCCEEDS_IN_CONTEXT((dfa).states[state].constraint, \ prevn, currn, prevl, currl) /* FIRST_MATCHING_REGEXP returns the index number of the first of parallel regexps that a given state could accept. Parallel regexps are numbered starting at 1. */ #define FIRST_MATCHING_REGEXP(state, dfa) (-(dfa).states[state].first_end) /* Entry points. */ /* dfasyntax() takes three arguments; the first sets the syntax bits described earlier in this file, the second sets the case-folding flag, and the third specifies the line terminator. */ extern void dfasyntax PARAMS ((reg_syntax_t, int, unsigned char)); /* Compile the given string of the given length into the given struct dfa. Final argument is a flag specifying whether to build a searching or an exact matcher. */ extern void dfacomp PARAMS ((char const *, size_t, struct dfa *, int)); /* Execute the given struct dfa on the buffer of characters. The first char * points to the beginning, and the second points to the first character after the end of the buffer, which must be a writable place so a sentinel end-of-buffer marker can be stored there. The second-to-last argument is a flag telling whether to allow newlines to be part of a string matching the regexp. The next-to-last argument, if non-NULL, points to a place to increment every time we see a newline. The final argument, if non-NULL, points to a flag that will be set if further examination by a backtracking matcher is needed in order to verify backreferencing; otherwise the flag will be cleared. Returns NULL if no match is found, or a pointer to the first character after the first & shortest matching string in the buffer. */ extern char *dfaexec PARAMS ((struct dfa *, char const *, char *, int, int *, int *)); /* Free the storage held by the components of a struct dfa. */ extern void dfafree PARAMS ((struct dfa *)); /* Entry points for people who know what they're doing. */ /* Initialize the components of a struct dfa. */ extern void dfainit PARAMS ((struct dfa *)); /* Incrementally parse a string of given length into a struct dfa. */ extern void dfaparse PARAMS ((char const *, size_t, struct dfa *)); /* Analyze a parsed regexp; second argument tells whether to build a searching or an exact matcher. */ extern void dfaanalyze PARAMS ((struct dfa *, int)); /* Compute, for each possible character, the transitions out of a given state, storing them in an array of integers. */ extern void dfastate PARAMS ((int, struct dfa *, int [])); /* Error handling. */ /* dfaerror() is called by the regexp routines whenever an error occurs. It takes a single argument, a NUL-terminated string describing the error. The user must supply a dfaerror. */ extern void dfaerror PARAMS ((const char *)); EOF echo - 'dfa.c' cat << 'EOF' > 'dfa.c' /* dfa.c - deterministic extended regexp routines for GNU Copyright 1988, 1998, 2000, 2002, 2004 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ /* Written June, 1988 by Mike Haertel Modified July, 1988 by Arthur David Olson to assist BMG speedups */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #ifndef VMS #include #else #include #endif #ifdef STDC_HEADERS #include #else extern char *calloc(), *malloc(), *realloc(); extern void free(); #endif #if defined(HAVE_STRING_H) || defined(STDC_HEADERS) #include #else #include #endif #if HAVE_SETLOCALE # include #endif #include "mbsupport.h" /* defined MBS_SUPPORT if appropriate */ #ifdef MBS_SUPPORT # include # include #endif #ifndef DEBUG /* use the same approach as regex.c */ #undef assert #define assert(e) #endif /* DEBUG */ #ifndef isgraph #define isgraph(C) (isprint(C) && !isspace(C)) #endif #if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII)) #define ISALPHA(C) isalpha(C) #define ISUPPER(C) isupper(C) #define ISLOWER(C) islower(C) #define ISDIGIT(C) isdigit(C) #define ISXDIGIT(C) isxdigit(C) #define ISSPACE(C) isspace(C) #define ISPUNCT(C) ispunct(C) #define ISALNUM(C) isalnum(C) #define ISPRINT(C) isprint(C) #define ISGRAPH(C) isgraph(C) #define ISCNTRL(C) iscntrl(C) #else #define ISALPHA(C) (isascii(C) && isalpha(C)) #define ISUPPER(C) (isascii(C) && isupper(C)) #define ISLOWER(C) (isascii(C) && islower(C)) #define ISDIGIT(C) (isascii(C) && isdigit(C)) #define ISXDIGIT(C) (isascii(C) && isxdigit(C)) #define ISSPACE(C) (isascii(C) && isspace(C)) #define ISPUNCT(C) (isascii(C) && ispunct(C)) #define ISALNUM(C) (isascii(C) && isalnum(C)) #define ISPRINT(C) (isascii(C) && isprint(C)) #define ISGRAPH(C) (isascii(C) && isgraph(C)) #define ISCNTRL(C) (isascii(C) && iscntrl(C)) #endif /* ISASCIIDIGIT differs from ISDIGIT, as follows: - Its arg may be any int or unsigned int; it need not be an unsigned char. - It's guaranteed to evaluate its argument exactly once. - It's typically faster. Posix 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that only '0' through '9' are digits. Prefer ISASCIIDIGIT to ISDIGIT unless it's important to use the locale's definition of `digit' even when the host does not conform to Posix. */ #define ISASCIIDIGIT(c) ((unsigned) (c) - '0' <= 9) /* Don't use gettext if ENABLE_NLS is not defined */ /* If we (don't) have I18N. */ /* glibc defines _ */ #ifdef ENABLE_NLS # ifndef _ # ifdef HAVE_LIBINTL_H # include # ifndef _ # define _(Str) gettext (Str) # endif # else # define _(Str) (Str) # endif # endif #else # define _(Str) (Str) #endif #include "regex.h" #include "dfa.h" /* HPUX, define those as macros in sys/param.h */ #ifdef setbit # undef setbit #endif #ifdef clrbit # undef clrbit #endif static void dfamust PARAMS ((struct dfa *dfa)); static ptr_t xcalloc PARAMS ((size_t n, size_t s)); static ptr_t xmalloc PARAMS ((size_t n)); static ptr_t xrealloc PARAMS ((ptr_t p, size_t n)); #ifdef DEBUG static void prtok PARAMS ((token t)); #endif static int tstbit PARAMS ((unsigned b, charclass c)); static void setbit PARAMS ((unsigned b, charclass c)); static void clrbit PARAMS ((unsigned b, charclass c)); static void copyset PARAMS ((charclass src, charclass dst)); static void zeroset PARAMS ((charclass s)); static void notset PARAMS ((charclass s)); static int equal PARAMS ((charclass s1, charclass s2)); static int charclass_index PARAMS ((charclass s)); static int looking_at PARAMS ((const char *s)); static token lex PARAMS ((void)); static void addtok PARAMS ((token t)); static void atom PARAMS ((void)); static int nsubtoks PARAMS ((int tindex)); static void copytoks PARAMS ((int tindex, int ntokens)); static void closure PARAMS ((void)); static void branch PARAMS ((void)); static void regexp PARAMS ((int toplevel)); static void copy PARAMS ((position_set const *src, position_set *dst)); static void insert PARAMS ((position p, position_set *s)); static void merge PARAMS ((position_set const *s1, position_set const *s2, position_set *m)); static void delete PARAMS ((position p, position_set *s)); static int state_index PARAMS ((struct dfa *d, position_set const *s, int newline, int letter)); static void build_state PARAMS ((int s, struct dfa *d)); static void build_state_zero PARAMS ((struct dfa *d)); static char *icatalloc PARAMS ((char *old, char *new)); static char *icpyalloc PARAMS ((char *string)); static char *istrstr PARAMS ((char *lookin, char *lookfor)); static void ifree PARAMS ((char *cp)); static void freelist PARAMS ((char **cpp)); static char **enlist PARAMS ((char **cpp, char *new, size_t len)); static char **comsubs PARAMS ((char *left, char *right)); static char **addlists PARAMS ((char **old, char **new)); static char **inboth PARAMS ((char **left, char **right)); static int hard_locale PARAMS ((int category)); static ptr_t xcalloc (size_t n, size_t s) { ptr_t r = calloc(n, s); if (!r) dfaerror(_("Memory exhausted")); return r; } static ptr_t xmalloc (size_t n) { ptr_t r = malloc(n); assert(n != 0); if (!r) dfaerror(_("Memory exhausted")); return r; } static ptr_t xrealloc (ptr_t p, size_t n) { ptr_t r = realloc(p, n); assert(n != 0); if (!r) dfaerror(_("Memory exhausted")); return r; } #define CALLOC(p, t, n) ((p) = (t *) xcalloc((size_t)(n), sizeof (t))) #define MALLOC(p, t, n) ((p) = (t *) xmalloc((n) * sizeof (t))) #define REALLOC(p, t, n) ((p) = (t *) xrealloc((ptr_t) (p), (n) * sizeof (t))) /* Reallocate an array of type t if nalloc is too small for index. */ #define REALLOC_IF_NECESSARY(p, t, nalloc, index) \ if ((index) >= (nalloc)) \ { \ do \ (nalloc) *= 2; \ while ((index) >= (nalloc)); \ REALLOC(p, t, nalloc); \ } #ifdef DEBUG static void prtok (token t) { char const *s; if (t < 0) fprintf(stderr, "END"); else if (t < NOTCHAR) fprintf(stderr, "%c", t); else { switch (t) { case EMPTY: s = "EMPTY"; break; case BACKREF: s = "BACKREF"; break; case BEGLINE: s = "BEGLINE"; break; case ENDLINE: s = "ENDLINE"; break; case BEGWORD: s = "BEGWORD"; break; case ENDWORD: s = "ENDWORD"; break; case LIMWORD: s = "LIMWORD"; break; case NOTLIMWORD: s = "NOTLIMWORD"; break; case QMARK: s = "QMARK"; break; case STAR: s = "STAR"; break; case PLUS: s = "PLUS"; break; case CAT: s = "CAT"; break; case OR: s = "OR"; break; case ORTOP: s = "ORTOP"; break; case LPAREN: s = "LPAREN"; break; case RPAREN: s = "RPAREN"; break; case CRANGE: s = "CRANGE"; break; #ifdef MBS_SUPPORT case ANYCHAR: s = "ANYCHAR"; break; case MBCSET: s = "MBCSET"; break; #endif /* MBS_SUPPORT */ default: s = "CSET"; break; } fprintf(stderr, "%s", s); } } #endif /* DEBUG */ /* Stuff pertaining to charclasses. */ static int tstbit (unsigned b, charclass c) { return c[b / INTBITS] & 1 << b % INTBITS; } static void setbit (unsigned b, charclass c) { c[b / INTBITS] |= 1 << b % INTBITS; } static void clrbit (unsigned b, charclass c) { c[b / INTBITS] &= ~(1 << b % INTBITS); } static void copyset (charclass src, charclass dst) { memcpy (dst, src, sizeof (charclass)); } static void zeroset (charclass s) { memset (s, 0, sizeof (charclass)); } static void notset (charclass s) { int i; for (i = 0; i < CHARCLASS_INTS; ++i) s[i] = ~s[i]; } static int equal (charclass s1, charclass s2) { return memcmp (s1, s2, sizeof (charclass)) == 0; } /* A pointer to the current dfa is kept here during parsing. */ static struct dfa *dfa; /* Find the index of charclass s in dfa->charclasses, or allocate a new charclass. */ static int charclass_index (charclass s) { int i; for (i = 0; i < dfa->cindex; ++i) if (equal(s, dfa->charclasses[i])) return i; REALLOC_IF_NECESSARY(dfa->charclasses, charclass, dfa->calloc, dfa->cindex); ++dfa->cindex; copyset(s, dfa->charclasses[i]); return i; } /* Syntax bits controlling the behavior of the lexical analyzer. */ static reg_syntax_t syntax_bits, syntax_bits_set; /* Flag for case-folding letters into sets. */ static int case_fold; /* End-of-line byte in data. */ static unsigned char eolbyte; /* Entry point to set syntax options. */ void dfasyntax (reg_syntax_t bits, int fold, unsigned char eol) { syntax_bits_set = 1; syntax_bits = bits; case_fold = fold; eolbyte = eol; } /* Like setbit, but if case is folded, set both cases of a letter. */ static void setbit_case_fold (unsigned b, charclass c) { setbit (b, c); if (case_fold) { if (ISUPPER (b)) setbit (tolower (b), c); else if (ISLOWER (b)) setbit (toupper (b), c); } } /* Lexical analyzer. All the dross that deals with the obnoxious GNU Regex syntax bits is located here. The poor, suffering reader is referred to the GNU Regex documentation for the meaning of the @#%!@#%^!@ syntax bits. */ static char const *lexptr; /* Pointer to next input character. */ static int lexleft; /* Number of characters remaining. */ static token lasttok; /* Previous token returned; initially END. */ static int laststart; /* True if we're separated from beginning or (, | only by zero-width characters. */ static int parens; /* Count of outstanding left parens. */ static int minrep, maxrep; /* Repeat counts for {m,n}. */ static int hard_LC_COLLATE; /* Nonzero if LC_COLLATE is hard. */ #ifdef MBS_SUPPORT /* These variables are used only if (MB_CUR_MAX > 1). */ static mbstate_t mbs; /* Mbstate for mbrlen(). */ static int cur_mb_len; /* Byte length of the current scanning multibyte character. */ static int cur_mb_index; /* Byte index of the current scanning multibyte character. singlebyte character : cur_mb_index = 0 multibyte character 1st byte : cur_mb_index = 1 2nd byte : cur_mb_index = 2 ... nth byte : cur_mb_index = n */ static unsigned char *mblen_buf;/* Correspond to the input buffer in dfaexec(). Each element store the amount of remain byte of corresponding multibyte character in the input string. A element's value is 0 if corresponding character is a singlebyte chracter. e.g. input : 'a', , , mblen_buf : 0, 3, 2, 1 */ static wchar_t *inputwcs; /* Wide character representation of input string in dfaexec(). The length of this array is same as the length of input string(char array). inputstring[i] is a single-byte char, or 1st byte of a multibyte char. And inputwcs[i] is the codepoint. */ static unsigned char const *buf_begin;/* refference to begin in dfaexec(). */ static unsigned char const *buf_end; /* refference to end in dfaexec(). */ static unsigned long buf_offset; /* Go fast. */ #endif /* MBS_SUPPORT */ #ifdef MBS_SUPPORT /* This function update cur_mb_len, and cur_mb_index. p points current lexptr, len is the remaining buffer length. */ static void update_mb_len_index (unsigned char const *p, int len) { /* If last character is a part of a multibyte character, we update cur_mb_index. */ if (cur_mb_index) cur_mb_index = (cur_mb_index >= cur_mb_len)? 0 : cur_mb_index + 1; /* If last character is a single byte character, or the last portion of a multibyte character, we check whether next character is a multibyte character or not. */ if (! cur_mb_index) { cur_mb_len = mbrlen(p, len, &mbs); if (cur_mb_len > 1) /* It is a multibyte character. cur_mb_len was already set by mbrlen(). */ cur_mb_index = 1; else if (cur_mb_len < 1) /* Invalid sequence. We treat it as a singlebyte character. cur_mb_index is aleady 0. */ cur_mb_len = 1; /* Otherwise, cur_mb_len == 1, it is a singlebyte character. cur_mb_index is aleady 0. */ } } #endif /* MBS_SUPPORT */ #ifdef MBS_SUPPORT /* Note that characters become unsigned here. */ # define FETCH(c, eoferr) \ { \ if (! lexleft) \ { \ if (eoferr != 0) \ dfaerror (eoferr); \ else \ return lasttok = END; \ } \ if (MB_CUR_MAX > 1) \ update_mb_len_index(lexptr, lexleft); \ (c) = (unsigned char) *lexptr++; \ --lexleft; \ } /* This function fetch a wide character, and update cur_mb_len, used only if the current locale is a multibyte environment. */ static wint_t fetch_wc (char const *eoferr) { wchar_t wc; if (! lexleft) { if (eoferr != 0) dfaerror (eoferr); else return WEOF; } cur_mb_len = mbrtowc(&wc, lexptr, lexleft, &mbs); if (cur_mb_len <= 0) { cur_mb_len = 1; wc = *lexptr; } lexptr += cur_mb_len; lexleft -= cur_mb_len; return wc; } #else /* Note that characters become unsigned here. */ # define FETCH(c, eoferr) \ { \ if (! lexleft) \ { \ if (eoferr != 0) \ dfaerror (eoferr); \ else \ return lasttok = END; \ } \ (c) = (unsigned char) *lexptr++; \ --lexleft; \ } #endif /* MBS_SUPPORT */ #ifdef MBS_SUPPORT /* Multibyte character handling sub-routine for lex. This function parse a bracket expression and build a struct mb_char_classes. */ static void parse_bracket_exp_mb () { wint_t wc, wc1, wc2; /* Work area to build a mb_char_classes. */ struct mb_char_classes *work_mbc; int chars_al, range_sts_al, range_ends_al, ch_classes_al, equivs_al, coll_elems_al; REALLOC_IF_NECESSARY(dfa->mbcsets, struct mb_char_classes, dfa->mbcsets_alloc, dfa->nmbcsets + 1); /* dfa->multibyte_prop[] hold the index of dfa->mbcsets. We will update dfa->multibyte_prop[] in addtok(), because we can't decide the index in dfa->tokens[]. */ /* Initialize work are */ work_mbc = &(dfa->mbcsets[dfa->nmbcsets++]); chars_al = 1; range_sts_al = range_ends_al = 0; ch_classes_al = equivs_al = coll_elems_al = 0; MALLOC(work_mbc->chars, wchar_t, chars_al); work_mbc->nchars = work_mbc->nranges = work_mbc->nch_classes = 0; work_mbc->nequivs = work_mbc->ncoll_elems = 0; work_mbc->ch_classes = NULL; work_mbc->chars = NULL; work_mbc->range_sts = work_mbc->range_ends = NULL; work_mbc->equivs = work_mbc->coll_elems = NULL; wc = fetch_wc(_("Unbalanced [")); if (wc == L'^') { wc = fetch_wc(_("Unbalanced [")); work_mbc->invert = 1; } else work_mbc->invert = 0; do { wc1 = WEOF; /* mark wc1 is not initialized". */ /* Note that if we're looking at some other [:...:] construct, we just treat it as a bunch of ordinary characters. We can do this because we assume regex has checked for syntax errors before dfa is ever called. */ if (wc == L'[' && (syntax_bits & RE_CHAR_CLASSES)) { #define BRACKET_BUFFER_SIZE 128 char str[BRACKET_BUFFER_SIZE]; wc1 = wc; wc = fetch_wc(_("Unbalanced [")); /* If pattern contains `[[:', `[[.', or `[[='. */ if (cur_mb_len == 1 && (wc == L':' || wc == L'.' || wc == L'=')) { unsigned char c; unsigned char delim = (unsigned char)wc; int len = 0; for (;;) { if (! lexleft) dfaerror (_("Unbalanced [")); c = (unsigned char) *lexptr++; --lexleft; if ((c == delim && *lexptr == ']') || lexleft == 0) break; if (len < BRACKET_BUFFER_SIZE) str[len++] = c; else /* This is in any case an invalid class name. */ str[0] = '\0'; } str[len] = '\0'; if (lexleft == 0) { REALLOC_IF_NECESSARY(work_mbc->chars, wchar_t, chars_al, work_mbc->nchars + 2); work_mbc->chars[work_mbc->nchars++] = L'['; work_mbc->chars[work_mbc->nchars++] = delim; break; } if (--lexleft, *lexptr++ != ']') dfaerror (_("Unbalanced [")); if (delim == ':') /* build character class. */ { wctype_t wt; /* Query the character class as wctype_t. */ wt = wctype (str); if (ch_classes_al == 0) MALLOC(work_mbc->ch_classes, wctype_t, ++ch_classes_al); REALLOC_IF_NECESSARY(work_mbc->ch_classes, wctype_t, ch_classes_al, work_mbc->nch_classes + 1); work_mbc->ch_classes[work_mbc->nch_classes++] = wt; } else if (delim == '=' || delim == '.') { char *elem; MALLOC(elem, char, len + 1); strncpy(elem, str, len + 1); if (delim == '=') /* build equivalent class. */ { if (equivs_al == 0) MALLOC(work_mbc->equivs, char*, ++equivs_al); REALLOC_IF_NECESSARY(work_mbc->equivs, char*, equivs_al, work_mbc->nequivs + 1); work_mbc->equivs[work_mbc->nequivs++] = elem; } if (delim == '.') /* build collating element. */ { if (coll_elems_al == 0) MALLOC(work_mbc->coll_elems, char*, ++coll_elems_al); REALLOC_IF_NECESSARY(work_mbc->coll_elems, char*, coll_elems_al, work_mbc->ncoll_elems + 1); work_mbc->coll_elems[work_mbc->ncoll_elems++] = elem; } } wc = WEOF; } else /* We treat '[' as a normal character here. */ { wc2 = wc1; wc1 = wc; wc = wc2; /* swap */ } } else { if (wc == L'\\' && (syntax_bits & RE_BACKSLASH_ESCAPE_IN_LISTS)) wc = fetch_wc(("Unbalanced [")); } if (wc1 == WEOF) wc1 = fetch_wc(_("Unbalanced [")); if (wc1 == L'-') /* build range characters. */ { wc2 = fetch_wc(_("Unbalanced [")); if (wc2 == L']') { /* In the case [x-], the - is an ordinary hyphen, which is left in c1, the lookahead character. */ lexptr -= cur_mb_len; lexleft += cur_mb_len; wc2 = wc; } else { if (wc2 == L'\\' && (syntax_bits & RE_BACKSLASH_ESCAPE_IN_LISTS)) wc2 = fetch_wc(_("Unbalanced [")); wc1 = fetch_wc(_("Unbalanced [")); } if (range_sts_al == 0) { MALLOC(work_mbc->range_sts, wchar_t, ++range_sts_al); MALLOC(work_mbc->range_ends, wchar_t, ++range_ends_al); } REALLOC_IF_NECESSARY(work_mbc->range_sts, wchar_t, range_sts_al, work_mbc->nranges + 1); work_mbc->range_sts[work_mbc->nranges] = (wchar_t)wc; REALLOC_IF_NECESSARY(work_mbc->range_ends, wchar_t, range_ends_al, work_mbc->nranges + 1); work_mbc->range_ends[work_mbc->nranges++] = (wchar_t)wc2; } else if (wc != WEOF) /* build normal characters. */ { REALLOC_IF_NECESSARY(work_mbc->chars, wchar_t, chars_al, work_mbc->nchars + 1); work_mbc->chars[work_mbc->nchars++] = (wchar_t)wc; if (case_fold && (iswlower((wint_t) wc) || iswupper((wint_t) wc))) { wint_t altcase; altcase = wc; /* keeps compiler happy */ if (iswlower((wint_t) wc)) altcase = towupper((wint_t) wc); else if (iswupper((wint_t) wc)) altcase = towlower((wint_t) wc); REALLOC_IF_NECESSARY(work_mbc->chars, wchar_t, chars_al, work_mbc->nchars + 1); work_mbc->chars[work_mbc->nchars++] = (wchar_t) altcase; } } } while ((wc = wc1) != L']'); } #endif /* MBS_SUPPORT */ #ifdef __STDC__ #define FUNC(F, P) static int F(int c) { return P(c); } #else #define FUNC(F, P) static int F(c) int c; { return P(c); } #endif FUNC(is_alpha, ISALPHA) FUNC(is_upper, ISUPPER) FUNC(is_lower, ISLOWER) FUNC(is_digit, ISDIGIT) FUNC(is_xdigit, ISXDIGIT) FUNC(is_space, ISSPACE) FUNC(is_punct, ISPUNCT) FUNC(is_alnum, ISALNUM) FUNC(is_print, ISPRINT) FUNC(is_graph, ISGRAPH) FUNC(is_cntrl, ISCNTRL) static int is_blank (int c) { return (c == ' ' || c == '\t'); } /* The following list maps the names of the Posix named character classes to predicate functions that determine whether a given character is in the class. The leading [ has already been eaten by the lexical analyzer. */ static struct { const char *name; int (*pred) PARAMS ((int)); } const prednames[] = { { ":alpha:]", is_alpha }, { ":upper:]", is_upper }, { ":lower:]", is_lower }, { ":digit:]", is_digit }, { ":xdigit:]", is_xdigit }, { ":space:]", is_space }, { ":punct:]", is_punct }, { ":alnum:]", is_alnum }, { ":print:]", is_print }, { ":graph:]", is_graph }, { ":cntrl:]", is_cntrl }, { ":blank:]", is_blank }, { 0 } }; /* Return non-zero if C is a `word-constituent' byte; zero otherwise. */ #define IS_WORD_CONSTITUENT(C) (ISALNUM(C) || (C) == '_') static int looking_at (char const *s) { size_t len; len = strlen(s); if (lexleft < len) return 0; return strncmp(s, lexptr, len) == 0; } static token lex (void) { unsigned c, c1, c2; int backslash = 0, invert; charclass ccl; int i; /* Basic plan: We fetch a character. If it's a backslash, we set the backslash flag and go through the loop again. On the plus side, this avoids having a duplicate of the main switch inside the backslash case. On the minus side, it means that just about every case begins with "if (backslash) ...". */ for (i = 0; i < 2; ++i) { FETCH(c, 0); #ifdef MBS_SUPPORT if (MB_CUR_MAX > 1 && cur_mb_index) /* If this is a part of a multi-byte character, we must treat this byte data as a normal character. e.g. In case of SJIS encoding, some character contains '\', but they must not be backslash. */ goto normal_char; #endif /* MBS_SUPPORT */ switch (c) { case '\\': if (backslash) goto normal_char; if (lexleft == 0) dfaerror(_("Unfinished \\ escape")); backslash = 1; break; case '^': if (backslash) goto normal_char; if (syntax_bits & RE_CONTEXT_INDEP_ANCHORS || lasttok == END || lasttok == LPAREN || lasttok == OR) return lasttok = BEGLINE; goto normal_char; case '$': if (backslash) goto normal_char; if (syntax_bits & RE_CONTEXT_INDEP_ANCHORS || lexleft == 0 || (syntax_bits & RE_NO_BK_PARENS ? lexleft > 0 && *lexptr == ')' : lexleft > 1 && lexptr[0] == '\\' && lexptr[1] == ')') || (syntax_bits & RE_NO_BK_VBAR ? lexleft > 0 && *lexptr == '|' : lexleft > 1 && lexptr[0] == '\\' && lexptr[1] == '|') || ((syntax_bits & RE_NEWLINE_ALT) && lexleft > 0 && *lexptr == '\n')) return lasttok = ENDLINE; goto normal_char; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (backslash && !(syntax_bits & RE_NO_BK_REFS)) { laststart = 0; return lasttok = BACKREF; } goto normal_char; case '`': if (backslash && !(syntax_bits & RE_NO_GNU_OPS)) return lasttok = BEGLINE; /* FIXME: should be beginning of string */ goto normal_char; case '\'': if (backslash && !(syntax_bits & RE_NO_GNU_OPS)) return lasttok = ENDLINE; /* FIXME: should be end of string */ goto normal_char; case '<': if (backslash && !(syntax_bits & RE_NO_GNU_OPS)) return lasttok = BEGWORD; goto normal_char; case '>': if (backslash && !(syntax_bits & RE_NO_GNU_OPS)) return lasttok = ENDWORD; goto normal_char; case 'b': if (backslash && !(syntax_bits & RE_NO_GNU_OPS)) return lasttok = LIMWORD; goto normal_char; case 'B': if (backslash && !(syntax_bits & RE_NO_GNU_OPS)) return lasttok = NOTLIMWORD; goto normal_char; case '?': if (syntax_bits & RE_LIMITED_OPS) goto normal_char; if (backslash != ((syntax_bits & RE_BK_PLUS_QM) != 0)) goto normal_char; if (!(syntax_bits & RE_CONTEXT_INDEP_OPS) && laststart) goto normal_char; return lasttok = QMARK; case '*': if (backslash) goto normal_char; if (!(syntax_bits & RE_CONTEXT_INDEP_OPS) && laststart) goto normal_char; return lasttok = STAR; case '+': if (syntax_bits & RE_LIMITED_OPS) goto normal_char; if (backslash != ((syntax_bits & RE_BK_PLUS_QM) != 0)) goto normal_char; if (!(syntax_bits & RE_CONTEXT_INDEP_OPS) && laststart) goto normal_char; return lasttok = PLUS; case '{': if (!(syntax_bits & RE_INTERVALS)) goto normal_char; if (backslash != ((syntax_bits & RE_NO_BK_BRACES) == 0)) goto normal_char; if (!(syntax_bits & RE_CONTEXT_INDEP_OPS) && laststart) goto normal_char; if (syntax_bits & RE_NO_BK_BRACES) { /* Scan ahead for a valid interval; if it's not valid, treat it as a literal '{'. */ int lo = -1, hi = -1; char const *p = lexptr; char const *lim = p + lexleft; for (; p != lim && ISASCIIDIGIT (*p); p++) lo = (lo < 0 ? 0 : lo * 10) + *p - '0'; if (p != lim && *p == ',') while (++p != lim && ISASCIIDIGIT (*p)) hi = (hi < 0 ? 0 : hi * 10) + *p - '0'; else hi = lo; if (p == lim || *p != '}' || lo < 0 || RE_DUP_MAX < hi || (0 <= hi && hi < lo)) goto normal_char; } minrep = 0; /* Cases: {M} - exact count {M,} - minimum count, maximum is infinity {M,N} - M through N */ FETCH(c, _("unfinished repeat count")); if (ISASCIIDIGIT (c)) { minrep = c - '0'; for (;;) { FETCH(c, _("unfinished repeat count")); if (! ISASCIIDIGIT (c)) break; minrep = 10 * minrep + c - '0'; } } else dfaerror(_("malformed repeat count")); if (c == ',') { FETCH (c, _("unfinished repeat count")); if (! ISASCIIDIGIT (c)) maxrep = -1; else { maxrep = c - '0'; for (;;) { FETCH (c, _("unfinished repeat count")); if (! ISASCIIDIGIT (c)) break; maxrep = 10 * maxrep + c - '0'; } if (0 <= maxrep && maxrep < minrep) dfaerror (_("malformed repeat count")); } } else maxrep = minrep; if (!(syntax_bits & RE_NO_BK_BRACES)) { if (c != '\\') dfaerror(_("malformed repeat count")); FETCH(c, _("unfinished repeat count")); } if (c != '}') dfaerror(_("malformed repeat count")); laststart = 0; return lasttok = REPMN; case '|': if (syntax_bits & RE_LIMITED_OPS) goto normal_char; if (backslash != ((syntax_bits & RE_NO_BK_VBAR) == 0)) goto normal_char; laststart = 1; return lasttok = OR; case '\n': if (syntax_bits & RE_LIMITED_OPS || backslash || !(syntax_bits & RE_NEWLINE_ALT)) goto normal_char; laststart = 1; return lasttok = OR; case '(': if (backslash != ((syntax_bits & RE_NO_BK_PARENS) == 0)) goto normal_char; ++parens; laststart = 1; return lasttok = LPAREN; case ')': if (backslash != ((syntax_bits & RE_NO_BK_PARENS) == 0)) goto normal_char; if (parens == 0 && syntax_bits & RE_UNMATCHED_RIGHT_PAREN_ORD) goto normal_char; --parens; laststart = 0; return lasttok = RPAREN; case '.': if (backslash) goto normal_char; #ifdef MBS_SUPPORT if (MB_CUR_MAX > 1) { /* In multibyte environment period must match with a single character not a byte. So we use ANYCHAR. */ laststart = 0; return lasttok = ANYCHAR; } #endif /* MBS_SUPPORT */ zeroset(ccl); notset(ccl); if (!(syntax_bits & RE_DOT_NEWLINE)) clrbit(eolbyte, ccl); if (syntax_bits & RE_DOT_NOT_NULL) clrbit('\0', ccl); laststart = 0; return lasttok = CSET + charclass_index(ccl); #ifndef GAWK case 's': case 'S': if (!backslash || (syntax_bits & RE_NO_GNU_OPS)) goto normal_char; zeroset(ccl); for (c2 = 0; c2 < NOTCHAR; ++c2) if (ISSPACE(c2)) setbit(c2, ccl); if (c == 'S') notset(ccl); laststart = 0; return lasttok = CSET + charclass_index(ccl); #endif case 'w': case 'W': if (!backslash || (syntax_bits & RE_NO_GNU_OPS)) goto normal_char; zeroset(ccl); for (c2 = 0; c2 < NOTCHAR; ++c2) if (IS_WORD_CONSTITUENT(c2)) setbit(c2, ccl); if (c == 'W') notset(ccl); laststart = 0; return lasttok = CSET + charclass_index(ccl); case '[': if (backslash) goto normal_char; laststart = 0; #ifdef MBS_SUPPORT if (MB_CUR_MAX > 1) { /* In multibyte environment a bracket expression may contain multibyte characters, which must be treated as characters (not bytes). So we parse it by parse_bracket_exp_mb(). */ parse_bracket_exp_mb(); return lasttok = MBCSET; } #endif zeroset(ccl); FETCH(c, _("Unbalanced [")); if (c == '^') { FETCH(c, _("Unbalanced [")); invert = 1; } else invert = 0; do { /* Nobody ever said this had to be fast. :-) Note that if we're looking at some other [:...:] construct, we just treat it as a bunch of ordinary characters. We can do this because we assume regex has checked for syntax errors before dfa is ever called. */ if (c == '[' && (syntax_bits & RE_CHAR_CLASSES)) for (c1 = 0; prednames[c1].name; ++c1) if (looking_at(prednames[c1].name)) { int (*pred) PARAMS ((int)) = prednames[c1].pred; for (c2 = 0; c2 < NOTCHAR; ++c2) if ((*pred)(c2)) setbit_case_fold (c2, ccl); lexptr += strlen(prednames[c1].name); lexleft -= strlen(prednames[c1].name); FETCH(c1, _("Unbalanced [")); goto skip; } if (c == '\\' && (syntax_bits & RE_BACKSLASH_ESCAPE_IN_LISTS)) FETCH(c, _("Unbalanced [")); FETCH(c1, _("Unbalanced [")); if (c1 == '-') { FETCH(c2, _("Unbalanced [")); if (c2 == ']') { /* In the case [x-], the - is an ordinary hyphen, which is left in c1, the lookahead character. */ --lexptr; ++lexleft; } else { if (c2 == '\\' && (syntax_bits & RE_BACKSLASH_ESCAPE_IN_LISTS)) FETCH(c2, _("Unbalanced [")); FETCH(c1, _("Unbalanced [")); if (!hard_LC_COLLATE) { for (; c <= c2; c++) setbit_case_fold (c, ccl); } else { /* POSIX locales are painful - leave the decision to libc */ /* char expr[6] = { '[', c, '-', c2, ']', '\0' }; */ regex_t re; char expr[6]; expr[0] = '['; expr[1] = c; expr[2] = '-'; expr[3] = c2; expr[4] = ']'; expr[5] = '\0'; if (regcomp (&re, expr, case_fold ? REG_ICASE : 0) == REG_NOERROR) { for (c = 0; c < NOTCHAR; ++c) { /* char buf[2] = { c, '\0' }; */ regmatch_t mat; char buf[2]; buf[0] = c; buf[1] = '\0'; if (regexec (&re, buf, 1, &mat, 0) == REG_NOERROR && mat.rm_so == 0 && mat.rm_eo == 1) setbit_case_fold (c, ccl); } regfree (&re); } } continue; } } setbit_case_fold (c, ccl); skip: ; } while ((c = c1) != ']'); if (invert) { notset(ccl); if (syntax_bits & RE_HAT_LISTS_NOT_NEWLINE) clrbit(eolbyte, ccl); } return lasttok = CSET + charclass_index(ccl); default: normal_char: laststart = 0; if (case_fold && ISALPHA(c)) { zeroset(ccl); setbit_case_fold (c, ccl); return lasttok = CSET + charclass_index(ccl); } return c; } } /* The above loop should consume at most a backslash and some other character. */ abort(); return END; /* keeps pedantic compilers happy. */ } /* Recursive descent parser for regular expressions. */ static token tok; /* Lookahead token. */ static int depth; /* Current depth of a hypothetical stack holding deferred productions. This is used to determine the depth that will be required of the real stack later on in dfaanalyze(). */ /* Add the given token to the parse tree, maintaining the depth count and updating the maximum depth if necessary. */ static void addtok (token t) { #ifdef MBS_SUPPORT if (MB_CUR_MAX > 1) { REALLOC_IF_NECESSARY(dfa->multibyte_prop, int, dfa->nmultibyte_prop, dfa->tindex); /* Set dfa->multibyte_prop. See struct dfa in dfa.h. */ if (t == MBCSET) dfa->multibyte_prop[dfa->tindex] = ((dfa->nmbcsets - 1) << 2) + 3; else if (t < NOTCHAR) dfa->multibyte_prop[dfa->tindex] = (cur_mb_len == 1)? 3 /* single-byte char */ : (((cur_mb_index == 1)? 1 : 0) /* 1st-byte of multibyte char */ + ((cur_mb_index == cur_mb_len)? 2 : 0)); /* last-byte */ else /* It may be unnecessary, but it is safer to treat other symbols as single byte characters. */ dfa->multibyte_prop[dfa->tindex] = 3; } #endif REALLOC_IF_NECESSARY(dfa->tokens, token, dfa->talloc, dfa->tindex); dfa->tokens[dfa->tindex++] = t; switch (t) { case QMARK: case STAR: case PLUS: break; case CAT: case OR: case ORTOP: --depth; break; default: ++dfa->nleaves; case EMPTY: ++depth; break; } if (depth > dfa->depth) dfa->depth = depth; } /* The grammar understood by the parser is as follows. regexp: regexp OR branch branch branch: branch closure closure closure: closure QMARK closure STAR closure PLUS closure REPMN atom atom: ANYCHAR MBCSET CSET BACKREF BEGLINE ENDLINE BEGWORD ENDWORD LIMWORD NOTLIMWORD CRANGE LPAREN regexp RPAREN The parser builds a parse tree in postfix form in an array of tokens. */ static void atom (void) { if ((tok >= 0 && tok < NOTCHAR) || tok >= CSET || tok == BACKREF || tok == BEGLINE || tok == ENDLINE || tok == BEGWORD #ifdef MBS_SUPPORT || tok == ANYCHAR || tok == MBCSET /* MB_CUR_MAX > 1 */ #endif /* MBS_SUPPORT */ || tok == ENDWORD || tok == LIMWORD || tok == NOTLIMWORD) { addtok(tok); tok = lex(); #ifdef MBS_SUPPORT /* We treat a multibyte character as a single atom, so that DFA can treat a multibyte character as a single expression. e.g. We construct following tree from "". */ if (MB_CUR_MAX > 1) { while (cur_mb_index > 1 && tok >= 0 && tok < NOTCHAR) { addtok(tok); addtok(CAT); tok = lex(); } } #endif /* MBS_SUPPORT */ } else if (tok == CRANGE) { /* A character range like "[a-z]" in a locale other than "C" or "POSIX". This range might any sequence of one or more characters. Unfortunately the POSIX locale primitives give us no practical way to find what character sequences might be matched. Treat this approximately like "(.\1)" -- i.e. match one character, and then punt to the full matcher. */ charclass ccl; zeroset (ccl); notset (ccl); addtok (CSET + charclass_index (ccl)); addtok (BACKREF); addtok (CAT); tok = lex (); } else if (tok == LPAREN) { tok = lex(); regexp(0); if (tok != RPAREN) dfaerror(_("Unbalanced (")); tok = lex(); } else addtok(EMPTY); } /* Return the number of tokens in the given subexpression. */ static int nsubtoks (int tindex) { int ntoks1; switch (dfa->tokens[tindex - 1]) { default: return 1; case QMARK: case STAR: case PLUS: return 1 + nsubtoks(tindex - 1); case CAT: case OR: case ORTOP: ntoks1 = nsubtoks(tindex - 1); return 1 + ntoks1 + nsubtoks(tindex - 1 - ntoks1); } } /* Copy the given subexpression to the top of the tree. */ static void copytoks (int tindex, int ntokens) { int i; for (i = 0; i < ntokens; ++i) addtok(dfa->tokens[tindex + i]); } static void closure (void) { int tindex, ntokens, i; atom(); while (tok == QMARK || tok == STAR || tok == PLUS || tok == REPMN) if (tok == REPMN) { ntokens = nsubtoks(dfa->tindex); tindex = dfa->tindex - ntokens; if (maxrep < 0) addtok(PLUS); if (minrep == 0) addtok(QMARK); for (i = 1; i < minrep; ++i) { copytoks(tindex, ntokens); addtok(CAT); } for (; i < maxrep; ++i) { copytoks(tindex, ntokens); addtok(QMARK); addtok(CAT); } tok = lex(); } else { addtok(tok); tok = lex(); } } static void branch (void) { closure(); while (tok != RPAREN && tok != OR && tok >= 0) { closure(); addtok(CAT); } } static void regexp (int toplevel) { branch(); while (tok == OR) { tok = lex(); branch(); if (toplevel) addtok(ORTOP); else addtok(OR); } } /* Main entry point for the parser. S is a string to be parsed, len is the length of the string, so s can include NUL characters. D is a pointer to the struct dfa to parse into. */ void dfaparse (char const *s, size_t len, struct dfa *d) { dfa = d; lexptr = s; lexleft = len; lasttok = END; laststart = 1; parens = 0; #if ENABLE_NLS hard_LC_COLLATE = hard_locale (LC_COLLATE); #endif #ifdef MBS_SUPPORT if (MB_CUR_MAX > 1) { cur_mb_index = 0; cur_mb_len = 0; memset(&mbs, 0, sizeof(mbstate_t)); } #endif /* MBS_SUPPORT */ if (! syntax_bits_set) dfaerror(_("No syntax specified")); tok = lex(); depth = d->depth; regexp(1); if (tok != END) dfaerror(_("Unbalanced )")); addtok(END - d->nregexps); addtok(CAT); if (d->nregexps) addtok(ORTOP); ++d->nregexps; } /* Some primitives for operating on sets of positions. */ /* Copy one set to another; the destination must be large enough. */ static void copy (position_set const *src, position_set *dst) { int i; for (i = 0; i < src->nelem; ++i) dst->elems[i] = src->elems[i]; dst->nelem = src->nelem; } /* Insert a position in a set. Position sets are maintained in sorted order according to index. If position already exists in the set with the same index then their constraints are logically or'd together. S->elems must point to an array large enough to hold the resulting set. */ static void insert (position p, position_set *s) { int i; position t1, t2; for (i = 0; i < s->nelem && p.index < s->elems[i].index; ++i) continue; if (i < s->nelem && p.index == s->elems[i].index) s->elems[i].constraint |= p.constraint; else { t1 = p; ++s->nelem; while (i < s->nelem) { t2 = s->elems[i]; s->elems[i++] = t1; t1 = t2; } } } /* Merge two sets of positions into a third. The result is exactly as if the positions of both sets were inserted into an initially empty set. */ static void merge (position_set const *s1, position_set const *s2, position_set *m) { int i = 0, j = 0; m->nelem = 0; while (i < s1->nelem && j < s2->nelem) if (s1->elems[i].index > s2->elems[j].index) m->elems[m->nelem++] = s1->elems[i++]; else if (s1->elems[i].index < s2->elems[j].index) m->elems[m->nelem++] = s2->elems[j++]; else { m->elems[m->nelem] = s1->elems[i++]; m->elems[m->nelem++].constraint |= s2->elems[j++].constraint; } while (i < s1->nelem) m->elems[m->nelem++] = s1->elems[i++]; while (j < s2->nelem) m->elems[m->nelem++] = s2->elems[j++]; } /* Delete a position from a set. */ static void delete (position p, position_set *s) { int i; for (i = 0; i < s->nelem; ++i) if (p.index == s->elems[i].index) break; if (i < s->nelem) for (--s->nelem; i < s->nelem; ++i) s->elems[i] = s->elems[i + 1]; } /* Find the index of the state corresponding to the given position set with the given preceding context, or create a new state if there is no such state. Newline and letter tell whether we got here on a newline or letter, respectively. */ static int state_index (struct dfa *d, position_set const *s, int newline, int letter) { int hash = 0; int constraint; int i, j; newline = newline ? 1 : 0; letter = letter ? 1 : 0; for (i = 0; i < s->nelem; ++i) hash ^= s->elems[i].index + s->elems[i].constraint; /* Try to find a state that exactly matches the proposed one. */ for (i = 0; i < d->sindex; ++i) { if (hash != d->states[i].hash || s->nelem != d->states[i].elems.nelem || newline != d->states[i].newline || letter != d->states[i].letter) continue; for (j = 0; j < s->nelem; ++j) if (s->elems[j].constraint != d->states[i].elems.elems[j].constraint || s->elems[j].index != d->states[i].elems.elems[j].index) break; if (j == s->nelem) return i; } /* We'll have to create a new state. */ REALLOC_IF_NECESSARY(d->states, dfa_state, d->salloc, d->sindex); d->states[i].hash = hash; MALLOC(d->states[i].elems.elems, position, s->nelem); copy(s, &d->states[i].elems); d->states[i].newline = newline; d->states[i].letter = letter; d->states[i].backref = 0; d->states[i].constraint = 0; d->states[i].first_end = 0; #ifdef MBS_SUPPORT if (MB_CUR_MAX > 1) d->states[i].mbps.nelem = 0; #endif for (j = 0; j < s->nelem; ++j) if (d->tokens[s->elems[j].index] < 0) { constraint = s->elems[j].constraint; if (SUCCEEDS_IN_CONTEXT(constraint, newline, 0, letter, 0) || SUCCEEDS_IN_CONTEXT(constraint, newline, 0, letter, 1) || SUCCEEDS_IN_CONTEXT(constraint, newline, 1, letter, 0) || SUCCEEDS_IN_CONTEXT(constraint, newline, 1, letter, 1)) d->states[i].constraint |= constraint; if (! d->states[i].first_end) d->states[i].first_end = d->tokens[s->elems[j].index]; } else if (d->tokens[s->elems[j].index] == BACKREF) { d->states[i].constraint = NO_CONSTRAINT; d->states[i].backref = 1; } ++d->sindex; return i; } /* Find the epsilon closure of a set of positions. If any position of the set contains a symbol that matches the empty string in some context, replace that position with the elements of its follow labeled with an appropriate constraint. Repeat exhaustively until no funny positions are left. S->elems must be large enough to hold the result. */ static void epsclosure (position_set *s, struct dfa const *d) { int i, j; int *visited; position p, old; MALLOC(visited, int, d->tindex); for (i = 0; i < d->tindex; ++i) visited[i] = 0; for (i = 0; i < s->nelem; ++i) if (d->tokens[s->elems[i].index] >= NOTCHAR && d->tokens[s->elems[i].index] != BACKREF #ifdef MBS_SUPPORT && d->tokens[s->elems[i].index] != ANYCHAR && d->tokens[s->elems[i].index] != MBCSET #endif && d->tokens[s->elems[i].index] < CSET) { old = s->elems[i]; p.constraint = old.constraint; delete(s->elems[i], s); if (visited[old.index]) { --i; continue; } visited[old.index] = 1; switch (d->tokens[old.index]) { case BEGLINE: p.constraint &= BEGLINE_CONSTRAINT; break; case ENDLINE: p.constraint &= ENDLINE_CONSTRAINT; break; case BEGWORD: p.constraint &= BEGWORD_CONSTRAINT; break; case ENDWORD: p.constraint &= ENDWORD_CONSTRAINT; break; case LIMWORD: p.constraint &= LIMWORD_CONSTRAINT; break; case NOTLIMWORD: p.constraint &= NOTLIMWORD_CONSTRAINT; break; default: break; } for (j = 0; j < d->follows[old.index].nelem; ++j) { p.index = d->follows[old.index].elems[j].index; insert(p, s); } /* Force rescan to start at the beginning. */ i = -1; } free(visited); } /* Perform bottom-up analysis on the parse tree, computing various functions. Note that at this point, we're pretending constructs like \< are real characters rather than constraints on what can follow them. Nullable: A node is nullable if it is at the root of a regexp that can match the empty string. * EMPTY leaves are nullable. * No other leaf is nullable. * A QMARK or STAR node is nullable. * A PLUS node is nullable if its argument is nullable. * A CAT node is nullable if both its arguments are nullable. * An OR node is nullable if either argument is nullable. Firstpos: The firstpos of a node is the set of positions (nonempty leaves) that could correspond to the first character of a string matching the regexp rooted at the given node. * EMPTY leaves have empty firstpos. * The firstpos of a nonempty leaf is that leaf itself. * The firstpos of a QMARK, STAR, or PLUS node is the firstpos of its argument. * The firstpos of a CAT node is the firstpos of the left argument, union the firstpos of the right if the left argument is nullable. * The firstpos of an OR node is the union of firstpos of each argument. Lastpos: The lastpos of a node is the set of positions that could correspond to the last character of a string matching the regexp at the given node. * EMPTY leaves have empty lastpos. * The lastpos of a nonempty leaf is that leaf itself. * The lastpos of a QMARK, STAR, or PLUS node is the lastpos of its argument. * The lastpos of a CAT node is the lastpos of its right argument, union the lastpos of the left if the right argument is nullable. * The lastpos of an OR node is the union of the lastpos of each argument. Follow: The follow of a position is the set of positions that could correspond to the character following a character matching the node in a string matching the regexp. At this point we consider special symbols that match the empty string in some context to be just normal characters. Later, if we find that a special symbol is in a follow set, we will replace it with the elements of its follow, labeled with an appropriate constraint. * Every node in the firstpos of the argument of a STAR or PLUS node is in the follow of every node in the lastpos. * Every node in the firstpos of the second argument of a CAT node is in the follow of every node in the lastpos of the first argument. Because of the postfix representation of the parse tree, the depth-first analysis is conveniently done by a linear scan with the aid of a stack. Sets are stored as arrays of the elements, obeying a stack-like allocation scheme; the number of elements in each set deeper in the stack can be used to determine the address of a particular set's array. */ void dfaanalyze (struct dfa *d, int searchflag) { int *nullable; /* Nullable stack. */ int *nfirstpos; /* Element count stack for firstpos sets. */ position *firstpos; /* Array where firstpos elements are stored. */ int *nlastpos; /* Element count stack for lastpos sets. */ position *lastpos; /* Array where lastpos elements are stored. */ int *nalloc; /* Sizes of arrays allocated to follow sets. */ position_set tmp; /* Temporary set for merging sets. */ position_set merged; /* Result of merging sets. */ int wants_newline; /* True if some position wants newline info. */ int *o_nullable; int *o_nfirst, *o_nlast; position *o_firstpos, *o_lastpos; int i, j; position *pos; #ifdef DEBUG fprintf(stderr, "dfaanalyze:\n"); for (i = 0; i < d->tindex; ++i) { fprintf(stderr, " %d:", i); prtok(d->tokens[i]); } putc('\n', stderr); #endif d->searchflag = searchflag; MALLOC(nullable, int, d->depth); o_nullable = nullable; MALLOC(nfirstpos, int, d->depth); o_nfirst = nfirstpos; MALLOC(firstpos, position, d->nleaves); o_firstpos = firstpos, firstpos += d->nleaves; MALLOC(nlastpos, int, d->depth); o_nlast = nlastpos; MALLOC(lastpos, position, d->nleaves); o_lastpos = lastpos, lastpos += d->nleaves; MALLOC(nalloc, int, d->tindex); for (i = 0; i < d->tindex; ++i) nalloc[i] = 0; MALLOC(merged.elems, position, d->nleaves); CALLOC(d->follows, position_set, d->tindex); for (i = 0; i < d->tindex; ++i) #ifdef DEBUG { /* Nonsyntactic #ifdef goo... */ #endif switch (d->tokens[i]) { case EMPTY: /* The empty set is nullable. */ *nullable++ = 1; /* The firstpos and lastpos of the empty leaf are both empty. */ *nfirstpos++ = *nlastpos++ = 0; break; case STAR: case PLUS: /* Every element in the firstpos of the argument is in the follow of every element in the lastpos. */ tmp.nelem = nfirstpos[-1]; tmp.elems = firstpos; pos = lastpos; for (j = 0; j < nlastpos[-1]; ++j) { merge(&tmp, &d->follows[pos[j].index], &merged); REALLOC_IF_NECESSARY(d->follows[pos[j].index].elems, position, nalloc[pos[j].index], merged.nelem - 1); copy(&merged, &d->follows[pos[j].index]); } case QMARK: /* A QMARK or STAR node is automatically nullable. */ if (d->tokens[i] != PLUS) nullable[-1] = 1; break; case CAT: /* Every element in the firstpos of the second argument is in the follow of every element in the lastpos of the first argument. */ tmp.nelem = nfirstpos[-1]; tmp.elems = firstpos; pos = lastpos + nlastpos[-1]; for (j = 0; j < nlastpos[-2]; ++j) { merge(&tmp, &d->follows[pos[j].index], &merged); REALLOC_IF_NECESSARY(d->follows[pos[j].index].elems, position, nalloc[pos[j].index], merged.nelem - 1); copy(&merged, &d->follows[pos[j].index]); } /* The firstpos of a CAT node is the firstpos of the first argument, union that of the second argument if the first is nullable. */ if (nullable[-2]) nfirstpos[-2] += nfirstpos[-1]; else firstpos += nfirstpos[-1]; --nfirstpos; /* The lastpos of a CAT node is the lastpos of the second argument, union that of the first argument if the second is nullable. */ if (nullable[-1]) nlastpos[-2] += nlastpos[-1]; else { pos = lastpos + nlastpos[-2]; for (j = nlastpos[-1] - 1; j >= 0; --j) pos[j] = lastpos[j]; lastpos += nlastpos[-2]; nlastpos[-2] = nlastpos[-1]; } --nlastpos; /* A CAT node is nullable if both arguments are nullable. */ nullable[-2] = nullable[-1] && nullable[-2]; --nullable; break; case OR: case ORTOP: /* The firstpos is the union of the firstpos of each argument. */ nfirstpos[-2] += nfirstpos[-1]; --nfirstpos; /* The lastpos is the union of the lastpos of each argument. */ nlastpos[-2] += nlastpos[-1]; --nlastpos; /* An OR node is nullable if either argument is nullable. */ nullable[-2] = nullable[-1] || nullable[-2]; --nullable; break; default: /* Anything else is a nonempty position. (Note that special constructs like \< are treated as nonempty strings here; an "epsilon closure" effectively makes them nullable later. Backreferences have to get a real position so we can detect transitions on them later. But they are nullable. */ *nullable++ = d->tokens[i] == BACKREF; /* This position is in its own firstpos and lastpos. */ *nfirstpos++ = *nlastpos++ = 1; --firstpos, --lastpos; firstpos->index = lastpos->index = i; firstpos->constraint = lastpos->constraint = NO_CONSTRAINT; /* Allocate the follow set for this position. */ nalloc[i] = 1; MALLOC(d->follows[i].elems, position, nalloc[i]); break; } #ifdef DEBUG /* ... balance the above nonsyntactic #ifdef goo... */ fprintf(stderr, "node %d:", i); prtok(d->tokens[i]); putc('\n', stderr); fprintf(stderr, nullable[-1] ? " nullable: yes\n" : " nullable: no\n"); fprintf(stderr, " firstpos:"); for (j = nfirstpos[-1] - 1; j >= 0; --j) { fprintf(stderr, " %d:", firstpos[j].index); prtok(d->tokens[firstpos[j].index]); } fprintf(stderr, "\n lastpos:"); for (j = nlastpos[-1] - 1; j >= 0; --j) { fprintf(stderr, " %d:", lastpos[j].index); prtok(d->tokens[lastpos[j].index]); } putc('\n', stderr); } #endif /* For each follow set that is the follow set of a real position, replace it with its epsilon closure. */ for (i = 0; i < d->tindex; ++i) if (d->tokens[i] < NOTCHAR || d->tokens[i] == BACKREF #ifdef MBS_SUPPORT || d->tokens[i] == ANYCHAR || d->tokens[i] == MBCSET #endif || d->tokens[i] >= CSET) { #ifdef DEBUG fprintf(stderr, "follows(%d:", i); prtok(d->tokens[i]); fprintf(stderr, "):"); for (j = d->follows[i].nelem - 1; j >= 0; --j) { fprintf(stderr, " %d:", d->follows[i].elems[j].index); prtok(d->tokens[d->follows[i].elems[j].index]); } putc('\n', stderr); #endif copy(&d->follows[i], &merged); epsclosure(&merged, d); if (d->follows[i].nelem < merged.nelem) REALLOC(d->follows[i].elems, position, merged.nelem); copy(&merged, &d->follows[i]); } /* Get the epsilon closure of the firstpos of the regexp. The result will be the set of positions of state 0. */ merged.nelem = 0; for (i = 0; i < nfirstpos[-1]; ++i) insert(firstpos[i], &merged); epsclosure(&merged, d); /* Check if any of the positions of state 0 will want newline context. */ wants_newline = 0; for (i = 0; i < merged.nelem; ++i) if (PREV_NEWLINE_DEPENDENT(merged.elems[i].constraint)) wants_newline = 1; /* Build the initial state. */ d->salloc = 1; d->sindex = 0; MALLOC(d->states, dfa_state, d->salloc); state_index(d, &merged, wants_newline, 0); free(o_nullable); free(o_nfirst); free(o_firstpos); free(o_nlast); free(o_lastpos); free(nalloc); free(merged.elems); } /* Find, for each character, the transition out of state s of d, and store it in the appropriate slot of trans. We divide the positions of s into groups (positions can appear in more than one group). Each group is labeled with a set of characters that every position in the group matches (taking into account, if necessary, preceding context information of s). For each group, find the union of the its elements' follows. This set is the set of positions of the new state. For each character in the group's label, set the transition on this character to be to a state corresponding to the set's positions, and its associated backward context information, if necessary. If we are building a searching matcher, we include the positions of state 0 in every state. The collection of groups is constructed by building an equivalence-class partition of the positions of s. For each position, find the set of characters C that it matches. Eliminate any characters from C that fail on grounds of backward context. Search through the groups, looking for a group whose label L has nonempty intersection with C. If L - C is nonempty, create a new group labeled L - C and having the same positions as the current group, and set L to the intersection of L and C. Insert the position in this group, set C = C - L, and resume scanning. If after comparing with every group there are characters remaining in C, create a new group labeled with the characters of C and insert this position in that group. */ void dfastate (int s, struct dfa *d, int trans[]) { position_set grps[NOTCHAR]; /* As many as will ever be needed. */ charclass labels[NOTCHAR]; /* Labels corresponding to the groups. */ int ngrps = 0; /* Number of groups actually used. */ position pos; /* Current position being considered. */ charclass matches; /* Set of matching characters. */ int matchesf; /* True if matches is nonempty. */ charclass intersect; /* Intersection with some label set. */ int intersectf; /* True if intersect is nonempty. */ charclass leftovers; /* Stuff in the label that didn't match. */ int leftoversf; /* True if leftovers is nonempty. */ static charclass letters; /* Set of characters considered letters. */ static charclass newline; /* Set of characters that aren't newline. */ position_set follows; /* Union of the follows of some group. */ position_set tmp; /* Temporary space for merging sets. */ int state; /* New state. */ int wants_newline; /* New state wants to know newline context. */ int state_newline; /* New state on a newline transition. */ int wants_letter; /* New state wants to know letter context. */ int state_letter; /* New state on a letter transition. */ static int initialized; /* Flag for static initialization. */ #ifdef MBS_SUPPORT int next_isnt_1st_byte = 0; /* Flag if we can't add state0. */ #endif int i, j, k; /* Initialize the set of letters, if necessary. */ if (! initialized) { initialized = 1; for (i = 0; i < NOTCHAR; ++i) if (IS_WORD_CONSTITUENT(i)) setbit(i, letters); setbit(eolbyte, newline); } zeroset(matches); for (i = 0; i < d->states[s].elems.nelem; ++i) { pos = d->states[s].elems.elems[i]; if (d->tokens[pos.index] >= 0 && d->tokens[pos.index] < NOTCHAR) setbit(d->tokens[pos.index], matches); else if (d->tokens[pos.index] >= CSET) copyset(d->charclasses[d->tokens[pos.index] - CSET], matches); #ifdef MBS_SUPPORT else if (d->tokens[pos.index] == ANYCHAR || d->tokens[pos.index] == MBCSET) /* MB_CUR_MAX > 1 */ { /* ANYCHAR and MBCSET must match with a single character, so we must put it to d->states[s].mbps, which contains the positions which can match with a single character not a byte. */ if (d->states[s].mbps.nelem == 0) { MALLOC(d->states[s].mbps.elems, position, d->states[s].elems.nelem); } insert(pos, &(d->states[s].mbps)); continue; } #endif /* MBS_SUPPORT */ else continue; /* Some characters may need to be eliminated from matches because they fail in the current context. */ if (pos.constraint != 0xFF) { if (! MATCHES_NEWLINE_CONTEXT(pos.constraint, d->states[s].newline, 1)) clrbit(eolbyte, matches); if (! MATCHES_NEWLINE_CONTEXT(pos.constraint, d->states[s].newline, 0)) for (j = 0; j < CHARCLASS_INTS; ++j) matches[j] &= newline[j]; if (! MATCHES_LETTER_CONTEXT(pos.constraint, d->states[s].letter, 1)) for (j = 0; j < CHARCLASS_INTS; ++j) matches[j] &= ~letters[j]; if (! MATCHES_LETTER_CONTEXT(pos.constraint, d->states[s].letter, 0)) for (j = 0; j < CHARCLASS_INTS; ++j) matches[j] &= letters[j]; /* If there are no characters left, there's no point in going on. */ for (j = 0; j < CHARCLASS_INTS && !matches[j]; ++j) continue; if (j == CHARCLASS_INTS) continue; } for (j = 0; j < ngrps; ++j) { /* If matches contains a single character only, and the current group's label doesn't contain that character, go on to the next group. */ if (d->tokens[pos.index] >= 0 && d->tokens[pos.index] < NOTCHAR && !tstbit(d->tokens[pos.index], labels[j])) continue; /* Check if this group's label has a nonempty intersection with matches. */ intersectf = 0; for (k = 0; k < CHARCLASS_INTS; ++k) (intersect[k] = matches[k] & labels[j][k]) ? (intersectf = 1) : 0; if (! intersectf) continue; /* It does; now find the set differences both ways. */ leftoversf = matchesf = 0; for (k = 0; k < CHARCLASS_INTS; ++k) { /* Even an optimizing compiler can't know this for sure. */ int match = matches[k], label = labels[j][k]; (leftovers[k] = ~match & label) ? (leftoversf = 1) : 0; (matches[k] = match & ~label) ? (matchesf = 1) : 0; } /* If there were leftovers, create a new group labeled with them. */ if (leftoversf) { copyset(leftovers, labels[ngrps]); copyset(intersect, labels[j]); MALLOC(grps[ngrps].elems, position, d->nleaves); copy(&grps[j], &grps[ngrps]); ++ngrps; } /* Put the position in the current group. Note that there is no reason to call insert() here. */ grps[j].elems[grps[j].nelem++] = pos; /* If every character matching the current position has been accounted for, we're done. */ if (! matchesf) break; } /* If we've passed the last group, and there are still characters unaccounted for, then we'll have to create a new group. */ if (j == ngrps) { copyset(matches, labels[ngrps]); zeroset(matches); MALLOC(grps[ngrps].elems, position, d->nleaves); grps[ngrps].nelem = 1; grps[ngrps].elems[0] = pos; ++ngrps; } } MALLOC(follows.elems, position, d->nleaves); MALLOC(tmp.elems, position, d->nleaves); /* If we are a searching matcher, the default transition is to a state containing the positions of state 0, otherwise the default transition is to fail miserably. */ if (d->searchflag) { wants_newline = 0; wants_letter = 0; for (i = 0; i < d->states[0].elems.nelem; ++i) { if (PREV_NEWLINE_DEPENDENT(d->states[0].elems.elems[i].constraint)) wants_newline = 1; if (PREV_LETTER_DEPENDENT(d->states[0].elems.elems[i].constraint)) wants_letter = 1; } copy(&d->states[0].elems, &follows); state = state_index(d, &follows, 0, 0); if (wants_newline) state_newline = state_index(d, &follows, 1, 0); else state_newline = state; if (wants_letter) state_letter = state_index(d, &follows, 0, 1); else state_letter = state; for (i = 0; i < NOTCHAR; ++i) trans[i] = (IS_WORD_CONSTITUENT(i)) ? state_letter : state; trans[eolbyte] = state_newline; } else for (i = 0; i < NOTCHAR; ++i) trans[i] = -1; for (i = 0; i < ngrps; ++i) { follows.nelem = 0; /* Find the union of the follows of the positions of the group. This is a hideously inefficient loop. Fix it someday. */ for (j = 0; j < grps[i].nelem; ++j) for (k = 0; k < d->follows[grps[i].elems[j].index].nelem; ++k) insert(d->follows[grps[i].elems[j].index].elems[k], &follows); #ifdef MBS_SUPPORT if (MB_CUR_MAX > 1) { /* If a token in follows.elems is not 1st byte of a multibyte character, or the states of follows must accept the bytes which are not 1st byte of the multibyte character. Then, if a state of follows encounter a byte, it must not be a 1st byte of a multibyte character nor singlebyte character. We cansel to add state[0].follows to next state, because state[0] must accept 1st-byte For example, we assume is a certain singlebyte character, is a certain multibyte character, and the codepoint of equals the 2nd byte of the codepoint of . When state[0] accepts , state[i] transit to state[i+1] by accepting accepts 1st byte of , and state[i+1] accepts 2nd byte of , if state[i+1] encounter the codepoint of , it must not be but 2nd byte of , so we can not add state[0]. */ next_isnt_1st_byte = 0; for (j = 0; j < follows.nelem; ++j) { if (!(d->multibyte_prop[follows.elems[j].index] & 1)) { next_isnt_1st_byte = 1; break; } } } #endif /* If we are building a searching matcher, throw in the positions of state 0 as well. */ #ifdef MBS_SUPPORT if (d->searchflag && (MB_CUR_MAX == 1 || !next_isnt_1st_byte)) #else if (d->searchflag) #endif for (j = 0; j < d->states[0].elems.nelem; ++j) insert(d->states[0].elems.elems[j], &follows); /* Find out if the new state will want any context information. */ wants_newline = 0; if (tstbit(eolbyte, labels[i])) for (j = 0; j < follows.nelem; ++j) if (PREV_NEWLINE_DEPENDENT(follows.elems[j].constraint)) wants_newline = 1; wants_letter = 0; for (j = 0; j < CHARCLASS_INTS; ++j) if (labels[i][j] & letters[j]) break; if (j < CHARCLASS_INTS) for (j = 0; j < follows.nelem; ++j) if (PREV_LETTER_DEPENDENT(follows.elems[j].constraint)) wants_letter = 1; /* Find the state(s) corresponding to the union of the follows. */ state = state_index(d, &follows, 0, 0); if (wants_newline) state_newline = state_index(d, &follows, 1, 0); else state_newline = state; if (wants_letter) state_letter = state_index(d, &follows, 0, 1); else state_letter = state; /* Set the transitions for each character in the current label. */ for (j = 0; j < CHARCLASS_INTS; ++j) for (k = 0; k < INTBITS; ++k) if (labels[i][j] & 1 << k) { int c = j * INTBITS + k; if (c == eolbyte) trans[c] = state_newline; else if (IS_WORD_CONSTITUENT(c)) trans[c] = state_letter; else if (c < NOTCHAR) trans[c] = state; } } for (i = 0; i < ngrps; ++i) free(grps[i].elems); free(follows.elems); free(tmp.elems); } /* Some routines for manipulating a compiled dfa's transition tables. Each state may or may not have a transition table; if it does, and it is a non-accepting state, then d->trans[state] points to its table. If it is an accepting state then d->fails[state] points to its table. If it has no table at all, then d->trans[state] is NULL. TODO: Improve this comment, get rid of the unnecessary redundancy. */ static void build_state (int s, struct dfa *d) { int *trans; /* The new transition table. */ int i; /* Set an upper limit on the number of transition tables that will ever exist at once. 1024 is arbitrary. The idea is that the frequently used transition tables will be quickly rebuilt, whereas the ones that were only needed once or twice will be cleared away. */ if (d->trcount >= 1024) { for (i = 0; i < d->tralloc; ++i) if (d->trans[i]) { free((ptr_t) d->trans[i]); d->trans[i] = NULL; } else if (d->fails[i]) { free((ptr_t) d->fails[i]); d->fails[i] = NULL; } d->trcount = 0; } ++d->trcount; /* Set up the success bits for this state. */ d->success[s] = 0; if (ACCEPTS_IN_CONTEXT(d->states[s].newline, 1, d->states[s].letter, 0, s, *d)) d->success[s] |= 4; if (ACCEPTS_IN_CONTEXT(d->states[s].newline, 0, d->states[s].letter, 1, s, *d)) d->success[s] |= 2; if (ACCEPTS_IN_CONTEXT(d->states[s].newline, 0, d->states[s].letter, 0, s, *d)) d->success[s] |= 1; MALLOC(trans, int, NOTCHAR); dfastate(s, d, trans); /* Now go through the new transition table, and make sure that the trans and fail arrays are allocated large enough to hold a pointer for the largest state mentioned in the table. */ for (i = 0; i < NOTCHAR; ++i) if (trans[i] >= d->tralloc) { int oldalloc = d->tralloc; while (trans[i] >= d->tralloc) d->tralloc *= 2; REALLOC(d->realtrans, int *, d->tralloc + 1); d->trans = d->realtrans + 1; REALLOC(d->fails, int *, d->tralloc); REALLOC(d->success, int, d->tralloc); REALLOC(d->newlines, int, d->tralloc); while (oldalloc < d->tralloc) { d->trans[oldalloc] = NULL; d->fails[oldalloc++] = NULL; } } /* Keep the newline transition in a special place so we can use it as a sentinel. */ d->newlines[s] = trans[eolbyte]; trans[eolbyte] = -1; if (ACCEPTING(s, *d)) d->fails[s] = trans; else d->trans[s] = trans; } static void build_state_zero (struct dfa *d) { d->tralloc = 1; d->trcount = 0; CALLOC(d->realtrans, int *, d->tralloc + 1); d->trans = d->realtrans + 1; CALLOC(d->fails, int *, d->tralloc); MALLOC(d->success, int, d->tralloc); MALLOC(d->newlines, int, d->tralloc); build_state(0, d); } #ifdef MBS_SUPPORT /* Multibyte character handling sub-routines for dfaexec. */ /* Initial state may encounter the byte which is not a singlebyte character nor 1st byte of a multibyte character. But it is incorrect for initial state to accept such a byte. For example, in sjis encoding the regular expression like "\\" accepts the codepoint 0x5c, but should not accept the 2nd byte of the codepoint 0x815c. Then Initial state must skip the bytes which are not a singlebyte character nor 1st byte of a multibyte character. */ #define SKIP_REMAINS_MB_IF_INITIAL_STATE(s, p) \ if (s == 0) \ { \ while (inputwcs[p - buf_begin + buf_offset] == 0 \ && mblen_buf[p - buf_begin + buf_offset] > 0 \ && (unsigned char const *)p < buf_end) \ ++p; \ if ((char *)p >= end) \ { \ return NULL; \ } \ } static void realloc_trans_if_necessary(struct dfa *d, int new_state) { /* Make sure that the trans and fail arrays are allocated large enough to hold a pointer for the new state. */ if (new_state >= d->tralloc) { int oldalloc = d->tralloc; while (new_state >= d->tralloc) d->tralloc *= 2; REALLOC(d->realtrans, int *, d->tralloc + 1); d->trans = d->realtrans + 1; REALLOC(d->fails, int *, d->tralloc); REALLOC(d->success, int, d->tralloc); REALLOC(d->newlines, int, d->tralloc); while (oldalloc < d->tralloc) { d->trans[oldalloc] = NULL; d->fails[oldalloc++] = NULL; } } } /* Return values of transit_state_singlebyte(), and transit_state_consume_1char. */ typedef enum { TRANSIT_STATE_IN_PROGRESS, /* State transition has not finished. */ TRANSIT_STATE_DONE, /* State transition has finished. */ TRANSIT_STATE_END_BUFFER /* Reach the end of the buffer. */ } status_transit_state; /* Consume a single byte and transit state from 's' to '*next_state'. This function is almost same as the state transition routin in dfaexec(). But state transition is done just once, otherwise matching succeed or reach the end of the buffer. */ static status_transit_state transit_state_singlebyte (struct dfa *d, int s, unsigned char const *p, int *next_state) { int *t; int works = s; status_transit_state rval = TRANSIT_STATE_IN_PROGRESS; while (rval == TRANSIT_STATE_IN_PROGRESS) { if ((t = d->trans[works]) != NULL) { works = t[*p]; rval = TRANSIT_STATE_DONE; if (works < 0) works = 0; } else if (works < 0) { if (p == buf_end) /* At the moment, it must not happen. */ return TRANSIT_STATE_END_BUFFER; works = 0; } else if (d->fails[works]) { works = d->fails[works][*p]; rval = TRANSIT_STATE_DONE; } else { build_state(works, d); } } *next_state = works; return rval; } /* Check whether period can match or not in the current context. If it can, return the amount of the bytes with which period can match, otherwise return 0. `pos' is the position of the period. `index' is the index from the buf_begin, and it is the current position in the buffer. */ static int match_anychar (struct dfa *d, int s, position pos, int index) { int newline = 0; int letter = 0; wchar_t wc; int mbclen; wc = inputwcs[index + buf_offset]; mbclen = (mblen_buf[index + buf_offset] == 0)? 1 : mblen_buf[index + buf_offset]; /* Check context. */ if (wc == (wchar_t)eolbyte) { if (!(syntax_bits & RE_DOT_NEWLINE)) return 0; newline = 1; } else if (wc == (wchar_t)'\0') { if (syntax_bits & RE_DOT_NOT_NULL) return 0; newline = 1; } if (iswalnum(wc) || wc == L'_') letter = 1; if (!SUCCEEDS_IN_CONTEXT(pos.constraint, d->states[s].newline, newline, d->states[s].letter, letter)) return 0; return mbclen; } /* Check whether bracket expression can match or not in the current context. If it can, return the amount of the bytes with which expression can match, otherwise return 0. `pos' is the position of the bracket expression. `index' is the index from the buf_begin, and it is the current position in the buffer. */ int match_mb_charset (struct dfa *d, int s, position pos, int index) { int i; int match; /* Flag which represent that matching succeed. */ int match_len; /* Length of the character (or collating element) with which this operator match. */ int op_len; /* Length of the operator. */ char buffer[128]; wchar_t wcbuf[6]; /* Pointer to the structure to which we are currently reffering. */ struct mb_char_classes *work_mbc; int newline = 0; int letter = 0; wchar_t wc; /* Current reffering character. */ wc = inputwcs[index + buf_offset]; /* Check context. */ if (wc == (wchar_t)eolbyte) { if (!(syntax_bits & RE_DOT_NEWLINE)) return 0; newline = 1; } else if (wc == (wchar_t)'\0') { if (syntax_bits & RE_DOT_NOT_NULL) return 0; newline = 1; } if (iswalnum(wc) || wc == L'_') letter = 1; if (!SUCCEEDS_IN_CONTEXT(pos.constraint, d->states[s].newline, newline, d->states[s].letter, letter)) return 0; /* Assign the current reffering operator to work_mbc. */ work_mbc = &(d->mbcsets[(d->multibyte_prop[pos.index]) >> 2]); match = !work_mbc->invert; match_len = (mblen_buf[index + buf_offset] == 0)? 1 : mblen_buf[index + buf_offset]; /* match with a character class? */ for (i = 0; inch_classes; i++) { if (iswctype((wint_t)wc, work_mbc->ch_classes[i])) goto charset_matched; } strncpy(buffer, buf_begin + index, match_len); buffer[match_len] = '\0'; /* match with an equivalent class? */ for (i = 0; inequivs; i++) { op_len = strlen(work_mbc->equivs[i]); strncpy(buffer, buf_begin + index, op_len); buffer[op_len] = '\0'; if (strcoll(work_mbc->equivs[i], buffer) == 0) { match_len = op_len; goto charset_matched; } } /* match with a collating element? */ for (i = 0; incoll_elems; i++) { op_len = strlen(work_mbc->coll_elems[i]); strncpy(buffer, buf_begin + index, op_len); buffer[op_len] = '\0'; if (strcoll(work_mbc->coll_elems[i], buffer) == 0) { match_len = op_len; goto charset_matched; } } wcbuf[0] = wc; wcbuf[1] = wcbuf[3] = wcbuf[5] = '\0'; /* match with a range? */ for (i = 0; inranges; i++) { wcbuf[2] = work_mbc->range_sts[i]; wcbuf[4] = work_mbc->range_ends[i]; if (wcscoll(wcbuf, wcbuf+2) >= 0 && wcscoll(wcbuf+4, wcbuf) >= 0) goto charset_matched; } /* match with a character? */ for (i = 0; inchars; i++) { if (wc == work_mbc->chars[i]) goto charset_matched; } match = !match; charset_matched: return match ? match_len : 0; } /* Check each of `d->states[s].mbps.elem' can match or not. Then return the array which corresponds to `d->states[s].mbps.elem' and each element of the array contains the amount of the bytes with which the element can match. `index' is the index from the buf_begin, and it is the current position in the buffer. Caller MUST free the array which this function return. */ static int* check_matching_with_multibyte_ops (struct dfa *d, int s, int index) { int i; int* rarray; MALLOC(rarray, int, d->states[s].mbps.nelem); for (i = 0; i < d->states[s].mbps.nelem; ++i) { position pos = d->states[s].mbps.elems[i]; switch(d->tokens[pos.index]) { case ANYCHAR: rarray[i] = match_anychar(d, s, pos, index); break; case MBCSET: rarray[i] = match_mb_charset(d, s, pos, index); break; default: break; /* can not happen. */ } } return rarray; } /* Consume a single character and enumerate all of the positions which can be next position from the state `s'. `match_lens' is the input. It can be NULL, but it can also be the output of check_matching_with_multibyte_ops() for optimization. `mbclen' and `pps' are the output. `mbclen' is the length of the character consumed, and `pps' is the set this function enumerate. */ static status_transit_state transit_state_consume_1char (struct dfa *d, int s, unsigned char const **pp, int *match_lens, int *mbclen, position_set *pps) { int i, j; int s1, s2; int* work_mbls; status_transit_state rs = TRANSIT_STATE_DONE; /* Calculate the length of the (single/multi byte) character to which p points. */ *mbclen = (mblen_buf[*pp - buf_begin + buf_offset] == 0)? 1 : mblen_buf[*pp - buf_begin + buf_offset]; /* Calculate the state which can be reached from the state `s' by consuming `*mbclen' single bytes from the buffer. */ s1 = s; for (i = 0; i < *mbclen; i++) { s2 = s1; rs = transit_state_singlebyte(d, s2, (*pp)++, &s1); } /* Copy the positions contained by `s1' to the set `pps'. */ copy(&(d->states[s1].elems), pps); /* Check (inputed)match_lens, and initialize if it is NULL. */ if (match_lens == NULL && d->states[s].mbps.nelem != 0) work_mbls = check_matching_with_multibyte_ops(d, s, *pp - buf_begin); else work_mbls = match_lens; /* Add all of the positions which can be reached from `s' by consuming a single character. */ for (i = 0; i < d->states[s].mbps.nelem ; i++) { if (work_mbls[i] == *mbclen) for (j = 0; j < d->follows[d->states[s].mbps.elems[i].index].nelem; j++) insert(d->follows[d->states[s].mbps.elems[i].index].elems[j], pps); } if (match_lens == NULL && work_mbls != NULL) free(work_mbls); return rs; } /* Transit state from s, then return new state and update the pointer of the buffer. This function is for some operator which can match with a multi- byte character or a collating element(which may be multi characters). */ static int transit_state (struct dfa *d, int s, unsigned char const **pp) { int s1; int mbclen; /* The length of current input multibyte character. */ int maxlen = 0; int i, j; int *match_lens = NULL; int nelem = d->states[s].mbps.nelem; /* Just a alias. */ position_set follows; unsigned char const *p1 = *pp; status_transit_state rs; wchar_t wc; if (nelem > 0) /* This state has (a) multibyte operator(s). We check whether each of them can match or not. */ { /* Note: caller must free the return value of this function. */ match_lens = check_matching_with_multibyte_ops(d, s, *pp - buf_begin); for (i = 0; i < nelem; i++) /* Search the operator which match the longest string, in this state. */ { if (match_lens[i] > maxlen) maxlen = match_lens[i]; } } if (nelem == 0 || maxlen == 0) /* This state has no multibyte operator which can match. We need to check only one singlebyte character. */ { status_transit_state rs; rs = transit_state_singlebyte(d, s, *pp, &s1); /* We must update the pointer if state transition succeeded. */ if (rs == TRANSIT_STATE_DONE) ++*pp; if (match_lens != NULL) free(match_lens); return s1; } /* This state has some operators which can match a multibyte character. */ follows.nelem = 0; MALLOC(follows.elems, position, d->nleaves); /* `maxlen' may be longer than the length of a character, because it may not be a character but a (multi character) collating element. We enumerate all of the positions which `s' can reach by consuming `maxlen' bytes. */ rs = transit_state_consume_1char(d, s, pp, match_lens, &mbclen, &follows); wc = inputwcs[*pp - mbclen - buf_begin + buf_offset]; s1 = state_index(d, &follows, wc == L'\n', iswalnum(wc)); realloc_trans_if_necessary(d, s1); while (*pp - p1 < maxlen) { follows.nelem = 0; rs = transit_state_consume_1char(d, s1, pp, NULL, &mbclen, &follows); for (i = 0; i < nelem ; i++) { if (match_lens[i] == *pp - p1) for (j = 0; j < d->follows[d->states[s1].mbps.elems[i].index].nelem; j++) insert(d->follows[d->states[s1].mbps.elems[i].index].elems[j], &follows); } wc = inputwcs[*pp - mbclen - buf_begin + buf_offset]; s1 = state_index(d, &follows, wc == L'\n', iswalnum(wc)); realloc_trans_if_necessary(d, s1); } free(match_lens); free(follows.elems); return s1; } #endif /* MBS_SUPPORT */ /* Search through a buffer looking for a match to the given struct dfa. Find the first occurrence of a string matching the regexp in the buffer, and the shortest possible version thereof. Return a pointer to the first character after the match, or NULL if none is found. Begin points to the beginning of the buffer, and end points to the first character after its end. We store a newline in *end to act as a sentinel, so end had better point somewhere valid. Newline is a flag indicating whether to allow newlines to be in the matching string. If count is non- NULL it points to a place we're supposed to increment every time we see a newline. Finally, if backref is non-NULL it points to a place where we're supposed to store a 1 if backreferencing happened and the match needs to be verified by a backtracking matcher. Otherwise we store a 0 in *backref. */ char * dfaexec (struct dfa *d, char const *begin, char *end, int newline, int *count, int *backref) { register int s, s1, tmp; /* Current state. */ register unsigned char const *p; /* Current input character. */ register int **trans, *t; /* Copy of d->trans so it can be optimized into a register. */ register unsigned char eol = eolbyte; /* Likewise for eolbyte. */ static int sbit[NOTCHAR]; /* Table for anding with d->success. */ static int sbit_init; if (! sbit_init) { int i; sbit_init = 1; for (i = 0; i < NOTCHAR; ++i) sbit[i] = (IS_WORD_CONSTITUENT(i)) ? 2 : 1; sbit[eol] = 4; } if (! d->tralloc) build_state_zero(d); s = s1 = 0; p = (unsigned char const *) begin; trans = d->trans; *end = eol; #ifdef MBS_SUPPORT if (MB_CUR_MAX > 1) { int remain_bytes, i; buf_begin -= buf_offset; if (buf_begin <= (unsigned char const *)begin && (unsigned char const *) end <= buf_end) { buf_offset = (unsigned char const *)begin - buf_begin; buf_begin = begin; buf_end = end; goto go_fast; } buf_offset = 0; buf_begin = begin; buf_end = end; /* initialize mblen_buf, and inputwcs. */ REALLOC(mblen_buf, unsigned char, end - begin + 2); REALLOC(inputwcs, wchar_t, end - begin + 2); memset(&mbs, 0, sizeof(mbstate_t)); remain_bytes = 0; for (i = 0; i < end - begin + 1; i++) { if (remain_bytes == 0) { remain_bytes = mbrtowc(inputwcs + i, begin + i, end - begin - i + 1, &mbs); if (remain_bytes <= 1) { remain_bytes = 0; inputwcs[i] = (wchar_t)begin[i]; mblen_buf[i] = 0; } else { mblen_buf[i] = remain_bytes; remain_bytes--; } } else { mblen_buf[i] = remain_bytes; inputwcs[i] = 0; remain_bytes--; } } mblen_buf[i] = 0; inputwcs[i] = 0; /* sentinel */ } go_fast: #endif /* MBS_SUPPORT */ for (;;) { #ifdef MBS_SUPPORT if (MB_CUR_MAX > 1) while ((t = trans[s])) { if ((char *) p > end) break; s1 = s; if (d->states[s].mbps.nelem != 0) { /* Can match with a multibyte character( and multi character collating element). */ unsigned char const *nextp; SKIP_REMAINS_MB_IF_INITIAL_STATE(s, p); nextp = p; s = transit_state(d, s, &nextp); p = (unsigned char *)nextp; /* Trans table might be updated. */ trans = d->trans; } else { SKIP_REMAINS_MB_IF_INITIAL_STATE(s, p); s = t[*p++]; } } else #endif /* MBS_SUPPORT */ while ((t = trans[s]) != 0) { /* hand-optimized loop */ s1 = t[*p++]; if ((t = trans[s1]) == 0) { tmp = s ; s = s1 ; s1 = tmp ; /* swap */ break; } s = t[*p++]; } if (s >= 0 && p <= (unsigned char *) end && d->fails[s]) { if (d->success[s] & sbit[*p]) { if (backref) *backref = (d->states[s].backref != 0); return (char *) p; } s1 = s; #ifdef MBS_SUPPORT if (MB_CUR_MAX > 1) { unsigned char const *nextp; nextp = p; s = transit_state(d, s, &nextp); p = (unsigned char *)nextp; /* Trans table might be updated. */ trans = d->trans; } else #endif /* MBS_SUPPORT */ s = d->fails[s][*p++]; continue; } /* If the previous character was a newline, count it. */ if (count && (char *) p <= end && p[-1] == eol) ++*count; /* Check if we've run off the end of the buffer. */ if ((char *) p > end) { return NULL; } if (s >= 0) { build_state(s, d); trans = d->trans; continue; } if (p[-1] == eol && newline) { s = d->newlines[s1]; continue; } s = 0; } } /* Initialize the components of a dfa that the other routines don't initialize for themselves. */ void dfainit (struct dfa *d) { d->calloc = 1; MALLOC(d->charclasses, charclass, d->calloc); d->cindex = 0; d->talloc = 1; MALLOC(d->tokens, token, d->talloc); d->tindex = d->depth = d->nleaves = d->nregexps = 0; #ifdef MBS_SUPPORT if (MB_CUR_MAX > 1) { d->nmultibyte_prop = 1; MALLOC(d->multibyte_prop, int, d->nmultibyte_prop); d->nmbcsets = 0; d->mbcsets_alloc = 1; MALLOC(d->mbcsets, struct mb_char_classes, d->mbcsets_alloc); } #endif d->searchflag = 0; d->tralloc = 0; d->musts = 0; d->realtrans = 0; d->fails = 0; d->newlines = 0; d->success = 0; } /* Parse and analyze a single string of the given length. */ void dfacomp (char const *s, size_t len, struct dfa *d, int searchflag) { if (case_fold) /* dummy folding in service of dfamust() */ { char *lcopy; int i; lcopy = malloc(len); if (!lcopy) dfaerror(_("out of memory")); /* This is a kludge. */ case_fold = 0; for (i = 0; i < len; ++i) if (ISUPPER ((unsigned char) s[i])) lcopy[i] = tolower ((unsigned char) s[i]); else lcopy[i] = s[i]; dfainit(d); dfaparse(lcopy, len, d); free(lcopy); dfamust(d); d->cindex = d->tindex = d->depth = d->nleaves = d->nregexps = 0; case_fold = 1; dfaparse(s, len, d); dfaanalyze(d, searchflag); } else { dfainit(d); dfaparse(s, len, d); dfamust(d); dfaanalyze(d, searchflag); } } /* Free the storage held by the components of a dfa. */ void dfafree (struct dfa *d) { int i; struct dfamust *dm, *ndm; free((ptr_t) d->charclasses); free((ptr_t) d->tokens); #ifdef MBS_SUPPORT if (MB_CUR_MAX > 1) { free((ptr_t) d->multibyte_prop); for (i = 0; i < d->nmbcsets; ++i) { int j; struct mb_char_classes *p = &(d->mbcsets[i]); if (p->chars != NULL) free(p->chars); if (p->ch_classes != NULL) free(p->ch_classes); if (p->range_sts != NULL) free(p->range_sts); if (p->range_ends != NULL) free(p->range_ends); for (j = 0; j < p->nequivs; ++j) free(p->equivs[j]); if (p->equivs != NULL) free(p->equivs); for (j = 0; j < p->ncoll_elems; ++j) free(p->coll_elems[j]); if (p->coll_elems != NULL) free(p->coll_elems); } free((ptr_t) d->mbcsets); } #endif /* MBS_SUPPORT */ for (i = 0; i < d->sindex; ++i) free((ptr_t) d->states[i].elems.elems); free((ptr_t) d->states); for (i = 0; i < d->tindex; ++i) if (d->follows[i].elems) free((ptr_t) d->follows[i].elems); free((ptr_t) d->follows); for (i = 0; i < d->tralloc; ++i) if (d->trans[i]) free((ptr_t) d->trans[i]); else if (d->fails[i]) free((ptr_t) d->fails[i]); if (d->realtrans) free((ptr_t) d->realtrans); if (d->fails) free((ptr_t) d->fails); if (d->newlines) free((ptr_t) d->newlines); if (d->success) free((ptr_t) d->success); for (dm = d->musts; dm; dm = ndm) { ndm = dm->next; free(dm->must); free((ptr_t) dm); } } /* Having found the postfix representation of the regular expression, try to find a long sequence of characters that must appear in any line containing the r.e. Finding a "longest" sequence is beyond the scope here; we take an easy way out and hope for the best. (Take "(ab|a)b"--please.) We do a bottom-up calculation of sequences of characters that must appear in matches of r.e.'s represented by trees rooted at the nodes of the postfix representation: sequences that must appear at the left of the match ("left") sequences that must appear at the right of the match ("right") lists of sequences that must appear somewhere in the match ("in") sequences that must constitute the match ("is") When we get to the root of the tree, we use one of the longest of its calculated "in" sequences as our answer. The sequence we find is returned in d->must (where "d" is the single argument passed to "dfamust"); the length of the sequence is returned in d->mustn. The sequences calculated for the various types of node (in pseudo ANSI c) are shown below. "p" is the operand of unary operators (and the left-hand operand of binary operators); "q" is the right-hand operand of binary operators. "ZERO" means "a zero-length sequence" below. Type left right is in ---- ---- ----- -- -- char c # c # c # c # c ANYCHAR ZERO ZERO ZERO ZERO MBCSET ZERO ZERO ZERO ZERO CSET ZERO ZERO ZERO ZERO STAR ZERO ZERO ZERO ZERO QMARK ZERO ZERO ZERO ZERO PLUS p->left p->right ZERO p->in CAT (p->is==ZERO)? (q->is==ZERO)? (p->is!=ZERO && p->in plus p->left : q->right : q->is!=ZERO) ? q->in plus p->is##q->left p->right##q->is p->is##q->is : p->right##q->left ZERO OR longest common longest common (do p->is and substrings common to leading trailing q->is have same p->in and q->in (sub)sequence (sub)sequence length and of p->left of p->right content) ? and q->left and q->right p->is : NULL If there's anything else we recognize in the tree, all four sequences get set to zero-length sequences. If there's something we don't recognize in the tree, we just return a zero-length sequence. Break ties in favor of infrequent letters (choosing 'zzz' in preference to 'aaa')? And. . .is it here or someplace that we might ponder "optimizations" such as egrep 'psi|epsilon' -> egrep 'psi' egrep 'pepsi|epsilon' -> egrep 'epsi' (Yes, we now find "epsi" as a "string that must occur", but we might also simplify the *entire* r.e. being sought) grep '[c]' -> grep 'c' grep '(ab|a)b' -> grep 'ab' grep 'ab*' -> grep 'a' grep 'a*b' -> grep 'b' There are several issues: Is optimization easy (enough)? Does optimization actually accomplish anything, or is the automaton you get from "psi|epsilon" (for example) the same as the one you get from "psi" (for example)? Are optimizable r.e.'s likely to be used in real-life situations (something like 'ab*' is probably unlikely; something like is 'psi|epsilon' is likelier)? */ static char * icatalloc (char *old, char *new) { char *result; size_t oldsize, newsize; newsize = (new == NULL) ? 0 : strlen(new); if (old == NULL) oldsize = 0; else if (newsize == 0) return old; else oldsize = strlen(old); if (old == NULL) result = (char *) malloc(newsize + 1); else result = (char *) realloc((void *) old, oldsize + newsize + 1); if (result != NULL && new != NULL) (void) strcpy(result + oldsize, new); return result; } static char * icpyalloc (char *string) { return icatalloc((char *) NULL, string); } static char * istrstr (char *lookin, char *lookfor) { char *cp; size_t len; len = strlen(lookfor); for (cp = lookin; *cp != '\0'; ++cp) if (strncmp(cp, lookfor, len) == 0) return cp; return NULL; } static void ifree (char *cp) { if (cp != NULL) free(cp); } static void freelist (char **cpp) { int i; if (cpp == NULL) return; for (i = 0; cpp[i] != NULL; ++i) { free(cpp[i]); cpp[i] = NULL; } } static char ** enlist (char **cpp, char *new, size_t len) { int i, j; if (cpp == NULL) return NULL; if ((new = icpyalloc(new)) == NULL) { freelist(cpp); return NULL; } new[len] = '\0'; /* Is there already something in the list that's new (or longer)? */ for (i = 0; cpp[i] != NULL; ++i) if (istrstr(cpp[i], new) != NULL) { free(new); return cpp; } /* Eliminate any obsoleted strings. */ j = 0; while (cpp[j] != NULL) if (istrstr(new, cpp[j]) == NULL) ++j; else { free(cpp[j]); if (--i == j) break; cpp[j] = cpp[i]; cpp[i] = NULL; } /* Add the new string. */ cpp = (char **) realloc((char *) cpp, (i + 2) * sizeof *cpp); if (cpp == NULL) return NULL; cpp[i] = new; cpp[i + 1] = NULL; return cpp; } /* Given pointers to two strings, return a pointer to an allocated list of their distinct common substrings. Return NULL if something seems wild. */ static char ** comsubs (char *left, char *right) { char **cpp; char *lcp; char *rcp; size_t i, len; if (left == NULL || right == NULL) return NULL; cpp = (char **) malloc(sizeof *cpp); if (cpp == NULL) return NULL; cpp[0] = NULL; for (lcp = left; *lcp != '\0'; ++lcp) { len = 0; rcp = strchr(right, *lcp); while (rcp != NULL) { for (i = 1; lcp[i] != '\0' && lcp[i] == rcp[i]; ++i) continue; if (i > len) len = i; rcp = strchr(rcp + 1, *lcp); } if (len == 0) continue; if ((cpp = enlist(cpp, lcp, len)) == NULL) break; } return cpp; } static char ** addlists (char **old, char **new) { int i; if (old == NULL || new == NULL) return NULL; for (i = 0; new[i] != NULL; ++i) { old = enlist(old, new[i], strlen(new[i])); if (old == NULL) break; } return old; } /* Given two lists of substrings, return a new list giving substrings common to both. */ static char ** inboth (char **left, char **right) { char **both; char **temp; int lnum, rnum; if (left == NULL || right == NULL) return NULL; both = (char **) malloc(sizeof *both); if (both == NULL) return NULL; both[0] = NULL; for (lnum = 0; left[lnum] != NULL; ++lnum) { for (rnum = 0; right[rnum] != NULL; ++rnum) { temp = comsubs(left[lnum], right[rnum]); if (temp == NULL) { freelist(both); return NULL; } both = addlists(both, temp); freelist(temp); free(temp); if (both == NULL) return NULL; } } return both; } typedef struct { char **in; char *left; char *right; char *is; } must; static void resetmust (must *mp) { mp->left[0] = mp->right[0] = mp->is[0] = '\0'; freelist(mp->in); } static void dfamust (struct dfa *dfa) { must *musts; must *mp; char *result; int ri; int i; int exact; token t; static must must0; struct dfamust *dm; static char empty_string[] = ""; result = empty_string; exact = 0; musts = (must *) malloc((dfa->tindex + 1) * sizeof *musts); if (musts == NULL) return; mp = musts; for (i = 0; i <= dfa->tindex; ++i) mp[i] = must0; for (i = 0; i <= dfa->tindex; ++i) { mp[i].in = (char **) malloc(sizeof *mp[i].in); mp[i].left = malloc(2); mp[i].right = malloc(2); mp[i].is = malloc(2); if (mp[i].in == NULL || mp[i].left == NULL || mp[i].right == NULL || mp[i].is == NULL) goto done; mp[i].left[0] = mp[i].right[0] = mp[i].is[0] = '\0'; mp[i].in[0] = NULL; } #ifdef DEBUG fprintf(stderr, "dfamust:\n"); for (i = 0; i < dfa->tindex; ++i) { fprintf(stderr, " %d:", i); prtok(dfa->tokens[i]); } putc('\n', stderr); #endif for (ri = 0; ri < dfa->tindex; ++ri) { switch (t = dfa->tokens[ri]) { case LPAREN: case RPAREN: goto done; /* "cannot happen" */ case EMPTY: case BEGLINE: case ENDLINE: case BEGWORD: case ENDWORD: case LIMWORD: case NOTLIMWORD: case BACKREF: resetmust(mp); break; case STAR: case QMARK: if (mp <= musts) goto done; /* "cannot happen" */ --mp; resetmust(mp); break; case OR: case ORTOP: if (mp < &musts[2]) goto done; /* "cannot happen" */ { char **new; must *lmp; must *rmp; int j, ln, rn, n; rmp = --mp; lmp = --mp; /* Guaranteed to be. Unlikely, but. . . */ if (strcmp(lmp->is, rmp->is) != 0) lmp->is[0] = '\0'; /* Left side--easy */ i = 0; while (lmp->left[i] != '\0' && lmp->left[i] == rmp->left[i]) ++i; lmp->left[i] = '\0'; /* Right side */ ln = strlen(lmp->right); rn = strlen(rmp->right); n = ln; if (n > rn) n = rn; for (i = 0; i < n; ++i) if (lmp->right[ln - i - 1] != rmp->right[rn - i - 1]) break; for (j = 0; j < i; ++j) lmp->right[j] = lmp->right[(ln - i) + j]; lmp->right[j] = '\0'; new = inboth(lmp->in, rmp->in); if (new == NULL) goto done; freelist(lmp->in); free((char *) lmp->in); lmp->in = new; } break; case PLUS: if (mp <= musts) goto done; /* "cannot happen" */ --mp; mp->is[0] = '\0'; break; case END: if (mp != &musts[1]) goto done; /* "cannot happen" */ for (i = 0; musts[0].in[i] != NULL; ++i) if (strlen(musts[0].in[i]) > strlen(result)) result = musts[0].in[i]; if (strcmp(result, musts[0].is) == 0) exact = 1; goto done; case CAT: if (mp < &musts[2]) goto done; /* "cannot happen" */ { must *lmp; must *rmp; rmp = --mp; lmp = --mp; /* In. Everything in left, plus everything in right, plus catenation of left's right and right's left. */ lmp->in = addlists(lmp->in, rmp->in); if (lmp->in == NULL) goto done; if (lmp->right[0] != '\0' && rmp->left[0] != '\0') { char *tp; tp = icpyalloc(lmp->right); if (tp == NULL) goto done; tp = icatalloc(tp, rmp->left); if (tp == NULL) goto done; lmp->in = enlist(lmp->in, tp, strlen(tp)); free(tp); if (lmp->in == NULL) goto done; } /* Left-hand */ if (lmp->is[0] != '\0') { lmp->left = icatalloc(lmp->left, rmp->left); if (lmp->left == NULL) goto done; } /* Right-hand */ if (rmp->is[0] == '\0') lmp->right[0] = '\0'; lmp->right = icatalloc(lmp->right, rmp->right); if (lmp->right == NULL) goto done; /* Guaranteed to be */ if (lmp->is[0] != '\0' && rmp->is[0] != '\0') { lmp->is = icatalloc(lmp->is, rmp->is); if (lmp->is == NULL) goto done; } else lmp->is[0] = '\0'; } break; default: if (t < END) { /* "cannot happen" */ goto done; } else if (t == '\0') { /* not on *my* shift */ goto done; } else if (t >= CSET #ifdef MBS_SUPPORT || t == ANYCHAR || t == MBCSET #endif /* MBS_SUPPORT */ ) { /* easy enough */ resetmust(mp); } else { /* plain character */ resetmust(mp); mp->is[0] = mp->left[0] = mp->right[0] = t; mp->is[1] = mp->left[1] = mp->right[1] = '\0'; mp->in = enlist(mp->in, mp->is, (size_t)1); if (mp->in == NULL) goto done; } break; } #ifdef DEBUG fprintf(stderr, " node: %d:", ri); prtok(dfa->tokens[ri]); fprintf(stderr, "\n in:"); for (i = 0; mp->in[i]; ++i) fprintf(stderr, " \"%s\"", mp->in[i]); fprintf(stderr, "\n is: \"%s\"\n", mp->is); fprintf(stderr, " left: \"%s\"\n", mp->left); fprintf(stderr, " right: \"%s\"\n", mp->right); #endif ++mp; } done: if (strlen(result)) { dm = (struct dfamust *) malloc(sizeof (struct dfamust)); dm->exact = exact; dm->must = malloc(strlen(result) + 1); strcpy(dm->must, result); dm->next = dfa->musts; dfa->musts = dm; } mp = musts; for (i = 0; i <= dfa->tindex; ++i) { freelist(mp[i].in); ifree((char *) mp[i].in); ifree(mp[i].left); ifree(mp[i].right); ifree(mp[i].is); } free((char *) mp); } /* vim:set shiftwidth=2: */ /* hard-locale.c -- Determine whether a locale is hard. Copyright 1997, 1998, 1999 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Return nonzero if the current CATEGORY locale is hard, i.e. if you can't get away with assuming traditional C or POSIX behavior. */ static int hard_locale (int category) { #if ! (defined ENABLE_NLS && HAVE_SETLOCALE) return 0; #else int hard = 1; char const *p = setlocale (category, 0); if (p) { # if defined __GLIBC__ && __GLIBC__ >= 2 if (strcmp (p, "C") == 0 || strcmp (p, "POSIX") == 0) hard = 0; # else char *locale = xmalloc (strlen (p) + 1); strcpy (locale, p); /* Temporarily set the locale to the "C" and "POSIX" locales to find their names, so that we can determine whether one or the other is the caller's locale. */ if (((p = setlocale (category, "C")) && strcmp (p, locale) == 0) || ((p = setlocale (category, "POSIX")) && strcmp (p, locale) == 0)) hard = 0; /* Restore the caller's locale. */ setlocale (category, locale); free(locale); # endif } return hard; #endif } EOF echo - 'doc/texinfo.tex' cat << 'EOF' > 'doc/texinfo.tex' % 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{2004-06-14.14} % % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software % Foundation, Inc. % % This texinfo.tex file is free software; you can redistribute it and/or % modify it under the terms of the GNU General Public License as % published by the Free Software Foundation; either version 2, or (at % your option) any later version. % % This texinfo.tex file is distributed in the hope that it will be % useful, but WITHOUT ANY WARRANTY; without even the implied warranty % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU % General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this texinfo.tex file; see the file COPYING. If not, write % to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, % Boston, MA 02111-1307, USA. % % 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} \message{Basics,} \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\ptexnoindent=\noindent \let\ptexinsert=\insert \let\ptexlbrace=\{ \let\ptexless=< \let\ptexplus=+ \let\ptexrbrace=\} \let\ptexslash=\/ \let\ptexstar=\* \let\ptext=\t % 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 % In some macros, we cannot use the `\? notation---the left quote is % in some cases the escape char. \chardef\colonChar = `\: \chardef\commaChar = `\, \chardef\dotChar = `\. \chardef\exclamChar= `\! \chardef\questChar = `\? \chardef\semiChar = `\; \chardef\underChar = `\_ \chardef\spaceChar = `\ % \chardef\spacecat = 10 \def\spaceisspace{\catcode\spaceChar=\spacecat} % 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} % @| inserts a changebar to the left of the current line. It should % surround any changed text. This approach does *not* work if the % change spans more than two lines of output. To handle that, we would % have adopt a much more difficult approach (putting marks into the main % vertical list for the beginning and end of each change). % \def\|{% % \vadjust can only be used in horizontal mode. \leavevmode % % Append this vertical mode material after the current line in the output. \vadjust{% % We want to insert a rule with the height and depth of the current % leading; that is exactly what \strutbox is supposed to record. \vskip-\baselineskip % % \vadjust-items are inserted at the left edge of the type. So % the \llap here moves out into the left-hand margin. \llap{% % % For a thicker or thinner bar, change the `1pt'. \vrule height\baselineskip width1pt % % This is the space between the bar and the text. \hskip 12pt }% }% } % 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\undefined\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} % For @cropmarks command. % Do @cropmarks to get crop marks. % \newif\ifcropmarks \let\cropmarks = \cropmarkstrue % % Dimensions to add cropmarks at corners. % Added by P. A. MacKay, 12 Nov. 1986 % \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines \newdimen\cornerlong \cornerlong=1pc \newdimen\cornerthick \cornerthick=.3pt \newdimen\topandbottommargin \topandbottommargin=.75in % Main output routine. \chardef\PAGE = 255 \output = {\onepageout{\pagecontents\PAGE}} \newbox\headlinebox \newbox\footlinebox % \onepageout takes a vbox as an argument. Note that \pagecontents % does insertions, but you have to call it yourself. \def\onepageout#1{% \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi % \ifodd\pageno \advance\hoffset by \bindingoffset \else \advance\hoffset by -\bindingoffset\fi % % Do this outside of the \shipout so @code etc. will be expanded in % the headline as they should be, not taken literally (outputting ''code). \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% % {% % Have to do this stuff outside the \shipout because we want it to % take effect in \write's, yet the group defined by the \vbox ends % before the \shipout runs. % \escapechar = `\\ % use backslash in output files. \indexdummies % don't expand commands in the output. \normalturnoffactive % \ in index entries must not stay \, e.g., if % the page break happens to be in the middle of an example. \shipout\vbox{% % 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 \oddfootingxxx.) % The \baselineskip=24pt in plain's \makefootline has no effect. \vskip 2\baselineskip \unvbox\footlinebox \fi % \ifcropmarks \egroup % end of \vbox\bgroup \hfil\egroup % end of (centering) \line\bgroup \vskip\topandbottommargin plus1fill minus1fill \boxmaxdepth = \cornerthick \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 \normalturnoffactive \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } \newinsert\margin \dimen\margin=\maxdimen \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} {\catcode`\@ =11 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi % marginal hacks, juha@viisa.uucp (Juha Takala) \ifvoid\margin\else % marginal info is present \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi \dimen@=\dp#1 \unvbox#1 \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi \ifr@ggedbottom \kern-\dimen@ \vfil \fi} } % Here are the rules for the cropmarks. Note that they are % offset so that the space between them is truly \outerhsize or \outervsize % (P. A. MacKay, 12 November, 1986) % \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} \def\nstop{\vbox {\hrule height\cornerthick depth\cornerlong width\cornerthick}} \def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} \def\nsbot{\vbox {\hrule height\cornerlong depth\cornerthick width\cornerthick}} % Parse an argument, then pass it to #1. The argument is the rest of % the input line (except we remove a trailing comment). #1 should be a % macro which expects an ordinary undelimited TeX argument. % \def\parsearg{\parseargusing{}} \def\parseargusing#1#2{% \def\next{#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 occurence 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 % We cannot use \next here, as it holds the macro to run; % thus we 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 \next. % (Similarily, 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\next\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 enviroments; they don't open a group. (The % implementation of @end takes care not to call \endgroup in this % special case.) % At runtime, 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 } % Evironment mismatch, #1 expected: \def\badenverr{% \errhelp = \EMsimple \errmessage{This command can appear only \inenvironment\temp, not \inenvironment\thisenv}% } \def\inenvironment#1{% \ifx#1\empty out 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, but... --kasal, 06nov03 \expandafter\checkenv\csname#1\endcsname \csname E#1\endcsname \endgroup \fi } \newhelp\EMsimple{Press RETURN to continue.} %% Simple single-character @ commands % @@ prints an @ % Kludge this until the fonts are right (grr). \def\@{{\tt\char64}} % This is turned off because it was never documented % and you can use @w{...} around a quote to suppress ligatures. %% Define @` and @' to be the same as ` and ' %% but suppressing ligatures. %\def\`{{`}} %\def\'{{'}} % Used to generate quoted braces. \def\mylbrace {{\tt\char123}} \def\myrbrace {{\tt\char125}} \let\{=\mylbrace \let\}=\myrbrace \begingroup % Definitions to produce \{ and \} commands for indices, % and @{ and @} for the aux file. \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\, = \c \let\dotaccent = \. \def\ringaccent#1{{\accent23 #1}} \let\tieaccent = \t \let\ubaraccent = \b \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 \ptexi \else\ifx\temp\jmacro \j \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=3000 } % @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{\selectfonts\lllsize A}\vss}}% \kern-.15em \TeX } % 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=3000 } % @! is an end-of-sentence bang. \def\!{!\spacefactor=3000 } % @? is an end-of-sentence query. \def\?{?\spacefactor=3000 } % @w prevents a word break. Without the \leavevmode, @w at the % beginning of a paragraph, when TeX is still in vertical mode, would % produce a whole line of output instead of starting the paragraph. \def\w#1{\leavevmode\hbox{#1}} % @group ... @end group forces ... to be all on one page, by enclosing % it in a TeX vbox. We use \vtop instead of \vbox to construct the box % to keep its height that of a normal line. According to the rules for % \topskip (p.114 of the TeXbook), the glue inserted is % max (\topskip - \ht (first item), 0). If that height is large, % therefore, no glue is inserted, and the space between the headline and % the text is small, which looks bad. % % 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'. % \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 } % @include file insert text of that file as input. % \def\include{\parseargusing\filenamecatcodes\includezzz} \def\includezzz#1{% \pushthisfilestack \def\thisfile{#1}% {% \makevalueexpandable \def\temp{\input #1 }% \expandafter }\temp \popthisfilestack } \def\filenamecatcodes{% \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 = {}% } % @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\underChar = \active \gdef\mathunderscore{% \catcode\underChar=\active \def_{\ifnum\fam=\slfam \_\else\sb\fi}% } } % Another complication: we want \\ (and @\) to output a \ character. % FYI, plain.tex uses \\ as a temporary control sequence (why?), but % this is not advertised and we don't care. Texinfo does not % otherwise define @\. % % 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 $\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 \gdef\mathactive{% \let^ = \ptexhat \let< = \ptexless \let> = \ptexgtr \let+ = \ptexplus } } % @bullet and @minus need the same treatment as @math, just above. \def\bullet{$\ptexbullet$} \def\minus{$-$} % @dots{} outputs an ellipsis using the current font. % We do .5em per period so that it has the same spacing in a typewriter % font as three actual period characters. % \def\dots{% \leavevmode \hbox to 1.5em{% \hskip 0pt plus 0.25fil .\hfil.\hfil.% \hskip 0pt plus 0.5fil }% } % @enddots{} is an end-of-sentence ellipsis. % \def\enddots{% \dots \spacefactor=3000 } % @comma{} is so commas can be inserted into text without messing up % Texinfo's parsing. % \let\comma = , % @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 \undefined, % borrowed from ifpdf.sty. \ifx\pdfoutput\undefined \else \ifx\pdfoutput\relax \else \ifcase\pdfoutput \else \pdftrue \fi \fi \fi % \ifpdf \input pdfcolor \pdfcatalog{/PageMode /UseOutlines}% \def\dopdfimage#1#2#3{% \def\imagewidth{#2}% \def\imageheight{#3}% % without \immediate, 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 \ifx\empty\imagewidth\else width \imagewidth \fi \ifx\empty\imageheight\else height \imageheight \fi \ifnum\pdftexversion<13 #1.pdf% \else {#1.pdf}% \fi \ifnum\pdftexversion < 14 \else \pdfrefximage \pdflastximage \fi} \def\pdfmkdest#1{{% % We have to set dummies so commands such as @code in a section title % aren't expanded. \atdummies \normalturnoffactive \pdfdest name{#1} xyz% }} \def\pdfmkpgn#1{#1} \let\linkcolor = \Blue % was Cyan, but that seems light? \def\endlink{\Black\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. #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 worthwhile, since most documents are normally structured. \def\pdfoutlinedest{#3}% \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}\fi % \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{#1}% } % \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\numchapentry##1##2##3##4{% \def\thischapnum{##2}% \let\thissecnum\empty \let\thissubsecnum\empty }% \def\numsecentry##1##2##3##4{% \advancenumber{chap\thischapnum}% \def\thissecnum{##2}% \let\thissubsecnum\empty }% \def\numsubsecentry##1##2##3##4{% \advancenumber{sec\thissecnum}% \def\thissubsecnum{##2}% }% \def\numsubsubsecentry##1##2##3##4{% \advancenumber{subsec\thissubsecnum}% }% \let\thischapnum\empty \let\thissecnum\empty \let\thissubsecnum\empty % % 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}% \input \jobname.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 \turnoffactive \input \jobname.toc \endgroup } % \def\makelinks #1,{% \def\params{#1}\def\E{END}% \ifx\params\E \let\nextmakelinks=\relax \else \let\nextmakelinks=\makelinks \ifnum\lnkcount>0,\fi \picknum{#1}% \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{\the\pgn}}% \linkcolor #1% \advance\lnkcount by 1% \endlink \fi \nextmakelinks } \def\picknum#1{\expandafter\pn#1} \def\pn#1{% \def\p{#1}% \ifx\p\lbrace \let\nextpn=\ppn \else \let\nextpn=\ppnn \def\first{#1} \fi \nextpn } \def\ppn#1{\pgn=#1\gobble} \def\ppnn{\pgn=\first} \def\pdfmklnk#1{\lnkcount=0\makelinks #1,END,} \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 \def\pdfurl#1{% \begingroup \normalturnoffactive\def\@{@}% \makevalueexpandable \leavevmode\Red \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}} \linkcolor #1\endlink} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \else \let\pdfmkdest = \gobble \let\pdfurl = \gobble \let\endlink = \relax \let\linkcolor = \relax \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\tt{\fam=\ttfam \setfontstyle{tt}} % 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} % \def\setleading#1{% \normalbaselineskip = #1\relax \normallineskip = \lineskipfactor\normalbaselineskip \normalbaselines \setbox\strutbox =\hbox{% \vrule width0pt height\strutheightpercent\baselineskip depth \strutdepthpercent \baselineskip }% } % Set the font macro #1 to the font named #2, adding on the % specified font prefix (normally `cm'). % #3 is the font's design size, #4 is a scale factor \def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4} % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix % before you read in texinfo.tex. \ifx\fontprefix\undefined \def\fontprefix{cm} \fi % Support font families that don't use the same naming scheme as CM. \def\rmshape{r} \def\rmbshape{bx} %where the normal face is bold \def\bfshape{b} \def\bxshape{bx} \def\ttshape{tt} \def\ttbshape{tt} \def\ttslshape{sltt} \def\itshape{ti} \def\itbshape{bxti} \def\slshape{sl} \def\slbshape{bxsl} \def\sfshape{ss} \def\sfbshape{ss} \def\scshape{csc} \def\scbshape{csc} % Text fonts (11.2pt, magstep1). \newcount\mainmagstep \ifx\bigger\relax % not really supported. \mainmagstep=\magstep1 \setfont\textrm\rmshape{12}{1000} \setfont\texttt\ttshape{12}{1000} \else \mainmagstep=\magstephalf \setfont\textrm\rmshape{10}{\mainmagstep} \setfont\texttt\ttshape{10}{\mainmagstep} \fi \setfont\textbf\bfshape{10}{\mainmagstep} \setfont\textit\itshape{10}{\mainmagstep} \setfont\textsl\slshape{10}{\mainmagstep} \setfont\textsf\sfshape{10}{\mainmagstep} \setfont\textsc\scshape{10}{\mainmagstep} \setfont\textttsl\ttslshape{10}{\mainmagstep} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstep1} \setfont\deftt\ttshape{10}{\magstep1} \setfont\defttsl\ttslshape{10}{\magstep1} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \setfont\smallrm\rmshape{9}{1000} \setfont\smalltt\ttshape{9}{1000} \setfont\smallbf\bfshape{10}{900} \setfont\smallit\itshape{9}{1000} \setfont\smallsl\slshape{9}{1000} \setfont\smallsf\sfshape{9}{1000} \setfont\smallsc\scshape{10}{900} \setfont\smallttsl\ttslshape{10}{900} \font\smalli=cmmi9 \font\smallsy=cmsy9 % Fonts for small examples (8pt). \setfont\smallerrm\rmshape{8}{1000} \setfont\smallertt\ttshape{8}{1000} \setfont\smallerbf\bfshape{10}{800} \setfont\smallerit\itshape{8}{1000} \setfont\smallersl\slshape{8}{1000} \setfont\smallersf\sfshape{8}{1000} \setfont\smallersc\scshape{10}{800} \setfont\smallerttsl\ttslshape{10}{800} \font\smalleri=cmmi8 \font\smallersy=cmsy8 % Fonts for title page (20.4pt): \setfont\titlerm\rmbshape{12}{\magstep3} \setfont\titleit\itbshape{10}{\magstep4} \setfont\titlesl\slbshape{10}{\magstep4} \setfont\titlett\ttbshape{12}{\magstep3} \setfont\titlettsl\ttslshape{10}{\magstep4} \setfont\titlesf\sfbshape{17}{\magstep1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\authorrm{\secrm} \def\authortt{\sectt} % Chapter (and unnumbered) fonts (17.28pt). \setfont\chaprm\rmbshape{12}{\magstep2} \setfont\chapit\itbshape{10}{\magstep3} \setfont\chapsl\slbshape{10}{\magstep3} \setfont\chaptt\ttbshape{12}{\magstep2} \setfont\chapttsl\ttslshape{10}{\magstep3} \setfont\chapsf\sfbshape{17}{1000} \let\chapbf=\chaprm \setfont\chapsc\scbshape{10}{\magstep3} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 % Section fonts (14.4pt). \setfont\secrm\rmbshape{12}{\magstep1} \setfont\secit\itbshape{10}{\magstep2} \setfont\secsl\slbshape{10}{\magstep2} \setfont\sectt\ttbshape{12}{\magstep1} \setfont\secttsl\ttslshape{10}{\magstep2} \setfont\secsf\sfbshape{12}{\magstep1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep2} \font\seci=cmmi12 scaled \magstep1 \font\secsy=cmsy10 scaled \magstep2 % Subsection fonts (13.15pt). \setfont\ssecrm\rmbshape{12}{\magstephalf} \setfont\ssecit\itbshape{10}{1315} \setfont\ssecsl\slbshape{10}{1315} \setfont\ssectt\ttbshape{12}{\magstephalf} \setfont\ssecttsl\ttslshape{10}{1315} \setfont\ssecsf\sfbshape{12}{\magstephalf} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1315} \font\sseci=cmmi12 scaled \magstephalf \font\ssecsy=cmsy10 scaled 1315 % Reduced fonts for @acro in text (10pt). \setfont\reducedrm\rmshape{10}{1000} \setfont\reducedtt\ttshape{10}{1000} \setfont\reducedbf\bfshape{10}{1000} \setfont\reducedit\itshape{10}{1000} \setfont\reducedsl\slshape{10}{1000} \setfont\reducedsf\sfshape{10}{1000} \setfont\reducedsc\scshape{10}{1000} \setfont\reducedttsl\ttslshape{10}{1000} \font\reducedi=cmmi10 \font\reducedsy=cmsy10 % 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\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\lsize{chap}\def\lllsize{subsec}% \resetmathfonts \setleading{25pt}} \def\titlefont#1{{\titlefonts\rm #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl \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\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\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\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\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\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{9.5pt}} % 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 % % I wish the USA used A4 paper. % --karl, 24jan03. % Set up the default fonts, so we can use them for creating boxes. % \textfonts \rm % Define these so they can be easily changed for other fonts. \def\angleleft{$\langle$} \def\angleright{$\rangle$} % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 % Fonts for short table of contents. \setfont\shortcontrm\rmshape{12}{1000} \setfont\shortcontbf\bfshape{10}{\magstep1} % no cmb12 \setfont\shortcontsl\slshape{12}{1000} \setfont\shortconttt\ttshape{12}{1000} %% Add scribe-like font environments, plus @l for inline lisp (usually sans %% serif) and @ii for TeX italic % \smartitalic{ARG} outputs arg in italics, followed by an italic correction % unless the following character is such as not to need one. \def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else \ptexslash\fi\fi\fi} \def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx} \def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx} % like \smartslanted except unconditionally uses \ttsl. % @var is set to this for defun arguments. \def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx} % like \smartslanted except unconditionally use \sl. We never want % ttsl for book titles, do we? \def\cite#1{{\sl #1}\futurelet\next\smartitalicx} \let\i=\smartitalic \let\var=\smartslanted \let\dfn=\smartslanted \let\emph=\smartitalic \def\b#1{{\bf #1}} \let\strong=\b % We can't just use \exhyphenpenalty, because that only has effect at % the end of a paragraph. Restore normal hyphenation at the end of the % group within which \nohyphenation is presumably called. % \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} \def\restorehyphenation{\hyphenchar\font = `- } % 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\frenchspacing{% \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m } \catcode`@=\other \def\t#1{% {\tt \rawbackslash \frenchspacing #1}% \null } \def\samp#1{`\tclose{#1}'\null} \setfont\keyrm\rmshape{8}{1000} \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}}}} % The old definition, with no lozenge: %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} \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 \frenchspacing #1% }% \null } % We *must* turn on hyphenation at `-' and `_' in @code. % Otherwise, it is too hard to avoid overfull hboxes % in the Emacs manual, the Library manual, etc. % Unfortunately, TeX uses one parameter (\hyphenchar) to control % both hyphenation at - and hyphenation within words. % We must therefore turn them both off (\tclose does that) % and arrange explicitly to hyphenate at a dash. % -- rms. { \catcode`\-=\active \catcode`\_=\active % \global\def\code{\begingroup \catcode`\-=\active \let-\codedash \catcode`\_=\active \let_\codeunder \codex } } \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{}{}{}}% {\_}% } \def\codex #1{\tclose{#1}\endgroup} % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), % `example' (@kbd uses ttsl only inside of @example and friends), % or `code' (@kbd uses normal tty font always). \parseargdef\kbdinputstyle{% \def\arg{#1}% \ifx\arg\worddistinct \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% \else\ifx\arg\wordexample \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% \else\ifx\arg\wordcode \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% \else \errhelp = \EMsimple \errmessage{Unknown @kbdinputstyle option `\arg'}% \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\look}}\fi \else{\tclose{\kbdfont\look}}\fi} % For @indicateurl, @env, @command quotes seem unnecessary, so use \code. \let\indicateurl=\code \let\env=\code \let\command=\code % @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. Perhaps eventually put in % a hypertex \special here. % \def\uref#1{\douref #1,,,\finish} \def\douref#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} % @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 % Check if we are currently using a typewriter font. Since all the % Computer Modern typewriter fonts have zero interword stretch (and % shrink), and it is reasonable to expect all typewriter fonts to have % this property, we can check that font parameter. % \def\ifmonospace{\ifdim\fontdimen3\font=0pt } % Typeset a dimension, e.g., `in' or `pt'. The only reason for the % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. % \def\dmn#1{\thinspace #1} \def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par} % @l was never documented to mean ``switch to the Lisp font'', % and it is not used as such in any manual I can find. We need it for % Polish suppressed-l. --karl, 22sep96. %\def\l#1{{\li #1}\null} % 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 \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 } % @pounds{} is a sterling sign, which is in the CM italic font. % \def\pounds{{\it\$}} % @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}}% }$% } % 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\undefined \def\Orb{\mathhexbox20D} \fi \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} \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines \let\tt=\authortt} \parseargdef\title{% \checkenv\titlepage \leftline{\titlefonts\rm #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 {\authorfont \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 -\baselineskip \global\advance\vsize by -\baselineskip } \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} % @headings double turns headings on for double-sided printing. % @headings single turns headings on for single-sided printing. % @headings off turns them off. % @headings on same as @headings double, retained for compatibility. % @headings after turns on double-sided headings after this page. % @headings doubleafter turns on double-sided headings after this page. % @headings singleafter turns on single-sided headings after this page. % By default, they are off at the start of a document, % and turned `on' after @end titlepage. \def\headings #1 {\csname HEADINGS#1\endcsname} \def\HEADINGSoff{% \global\evenheadline={\hfil} \global\evenfootline={\hfil} \global\oddheadline={\hfil} \global\oddfootline={\hfil}} \HEADINGSoff % When we turn headings on, set the page number to 1. % For double-sided printing, put current file name in lower left corner, % chapter name on inside top of right hand pages, document % title on inside top of left hand pages, and page numbers on outside top % edge of all pages. \def\HEADINGSdouble{% \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \let\contentsalignmacro = \chappager % For single-sided printing, chapter title goes across top left of page, % page number on top right. \def\HEADINGSsingle{% \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } \def\HEADINGSon{\HEADINGSdouble} \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} \let\HEADINGSdoubleafter=\HEADINGSafter \def\HEADINGSdoublex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} \def\HEADINGSsinglex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } % Subroutines used in generating headings % 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\undefined \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 \leavevmode\unhbox0\par \endgroup % % We're going to be starting a paragraph, but we don't want the % \parskip glue -- logically it's part of the @item we just started. \nobreak \vskip-\parskip % % Stop a page break at the \parskip glue coming up. (Unfortunately % we can't prevent a possible page break at the following % \baselineskip glue.) However, if what follows is an environment % such as @example, there will be no \parskip glue; then % the negative vskip we just 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. % (Possibly there are other commands that could be followed by % @example which need the same treatment, but not section titles; or % maybe section titles are the only special case and they should be % penalty 10001...) \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 \tablex } \envdef\ftable{% \def\itemindex ##1{\doind {fn}{\code{##1}}}% \tablex } \envdef\vtable{% \def\itemindex ##1{\doind {vr}{\code{##1}}}% \tablex } \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 \def\itemcontents{#1}% % @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. Note that \everycr resets \everytab. \def\headitem{\checkenv\multitable \crcr \global\everytab={\bf}\the\everytab}% % % 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 encounter the problem it was intended to solve again. % --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. \let\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{% test to see if user has set \multitablelinespace. % If so, do nothing. If not, give it an appropriate dimension based on % current baselineskip. \ifdim\multitablelinespace=0pt \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip \global\advance\multitablelinespace by-\ht0 %% strut to put in table in case some entry doesn't have descenders, %% to keep lines equally spaced \let\multistrut = \strut \else %% FIXME: what is \box0 supposed to be? \gdef\multistrut{\vrule height\multitablelinespace depth\dp0 width0pt\relax} \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: \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 string `ifinfo'. % % Define a command to find the next `@end #1', which must be on a line % by itself. \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. \obeylines % \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. \def\enddoignore{\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 \newindex. {\catcode`\@=11 \gdef\newwrite{\alloc@7\write\chardef\sixt@@n}} % \newindex {foo} defines an index named foo. % It automatically defines \fooindex such that % \fooindex ...rest of line... puts an entry in the index foo. % It also defines \fooindfile to be the number of the output channel for % the file that accumulates this index. The file's extension is foo. % The name of an index should be no more than 2 characters long % for the sake of vms. % \def\newindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 % Open the file \fi \expandafter\xdef\csname#1index\endcsname{% % Define @#1index \noexpand\doindex{#1}} } % @defindex foo == \newindex{foo} % \def\defindex{\parsearg\newindex} % Define @defcodeindex, like @defindex except put all entries in @code. % \def\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 \undefined % 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{% \def\@{@}% change to @@ when we switch to @ as escape char in index files. \def\ {\realbackslash\space }% % Need these in case \tex is in effect and \{ is a \delimiter again. % But can't use \lbracecmd and \rbracecmd because texindex assumes % braces and backslashes are used only as delimiters. \let\{ = \mylbrace \let\} = \myrbrace % % \definedummyword defines \#1 as \realbackslash #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{% \expandafter\def\csname ##1\endcsname{\realbackslash ##1\space}% }% \def\definedummyletter##1{% \expandafter\def\csname ##1\endcsname{\realbackslash ##1}% }% \let\definedummyaccent\definedummyletter % % Do the redefinitions. \commondummies } % For the aux file, @ is the escape character. So we want to redefine % everything using @ instead of \realbackslash. When everything uses % @, this will be simpler. % \def\atdummies{% \def\@{@@}% \def\ {@ }% \let\{ = \lbraceatcmd \let\} = \rbraceatcmd % % (See comments in \indexdummies.) \def\definedummyword##1{% \expandafter\def\csname ##1\endcsname{@##1\space}% }% \def\definedummyletter##1{% \expandafter\def\csname ##1\endcsname{@##1}% }% \let\definedummyaccent\definedummyletter % % Do the redefinitions. \commondummies } % Called from \indexdummies and \atdummies. \definedummyword and % \definedummyletter must be defined first. % \def\commondummies{% % \normalturnoffactive % \commondummiesnofonts % \definedummyletter{_}% % % Non-English letters. \definedummyword{AA}% \definedummyword{AE}% \definedummyword{L}% \definedummyword{OE}% \definedummyword{O}% \definedummyword{aa}% \definedummyword{ae}% \definedummyword{l}% \definedummyword{oe}% \definedummyword{o}% \definedummyword{ss}% \definedummyword{exclamdown}% \definedummyword{questiondown}% \definedummyword{ordf}% \definedummyword{ordm}% % % 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{bullet}% \definedummyword{comma}% \definedummyword{copyright}% \definedummyword{registeredsymbol}% \definedummyword{dots}% \definedummyword{enddots}% \definedummyword{equiv}% \definedummyword{error}% \definedummyword{expansion}% \definedummyword{minus}% \definedummyword{pounds}% \definedummyword{point}% \definedummyword{print}% \definedummyword{result}% % % Handle some cases of @value -- where it does not contain any % (non-fully-expandable) commands. \makevalueexpandable % % Normal spaces, not active ones. \unsepspaces % % No macro expansion. \turnoffmacros } % \commondummiesnofonts: common to \commondummies and \indexnofonts. % % Better have this without active chars. { \catcode`\~=\other \gdef\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{ringaccent}% \definedummyword{tieaccent}% \definedummyword{ubaraccent}% \definedummyword{udotaccent}% \definedummyword{dotless}% % % Texinfo font commands. \definedummyword{b}% \definedummyword{i}% \definedummyword{r}% \definedummyword{sc}% \definedummyword{t}% % % Commands that take arguments. \definedummyword{acronym}% \definedummyword{cite}% \definedummyword{code}% \definedummyword{command}% \definedummyword{dfn}% \definedummyword{emph}% \definedummyword{env}% \definedummyword{file}% \definedummyword{kbd}% \definedummyword{key}% \definedummyword{math}% \definedummyword{option}% \definedummyword{samp}% \definedummyword{strong}% \definedummyword{tie}% \definedummyword{uref}% \definedummyword{url}% \definedummyword{var}% \definedummyword{verb}% \definedummyword{w}% } } % \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{% \expandafter\let\csname ##1\endcsname\asis }% % We can just ignore other control letters. \def\definedummyletter##1{% \expandafter\def\csname ##1\endcsname{}% }% % Hopefully, all control words can become @asis. \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\@{@}% % how to handle braces? \def\_{\normalunderscore}% % % Non-English letters. \def\AA{AA}% \def\AE{AE}% \def\L{L}% \def\OE{OE}% \def\O{O}% \def\aa{aa}% \def\ae{ae}% \def\l{l}% \def\oe{oe}% \def\o{o}% \def\ss{ss}% \def\exclamdown{!}% \def\questiondown{?}% \def\ordf{a}% \def\ordm{o}% % \def\LaTeX{LaTeX}% \def\TeX{TeX}% % % Assorted special characters. % (The following {} will end up in the sort string, but that's ok.) \def\bullet{bullet}% \def\comma{,}% \def\copyright{copyright}% \def\registeredsymbol{R}% \def\dots{...}% \def\enddots{...}% \def\equiv{==}% \def\error{error}% \def\expansion{==>}% \def\minus{-}% \def\pounds{pounds}% \def\point{.}% \def\print{-|}% \def\result{=>}% % % Don't write macro names. \emptyusermacros } \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}% % \ifvmode \dosubindsanitize \else \dosubindwrite \fi }% \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 \escapechar=`\\ \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: % % If a skip is the last thing on the list now, preserve it % by backing up by \lastskip, doing the \write, then inserting % the skip again. Otherwise, the whatsit generated by the % \write will make \lastskip zero. The result is that sequences % like this: % @end defun % @tindex whatever % @defun ... % will have extra space inserted, because the \medbreak in the % start of the @defun won't see the skip inserted by the @end of % the previous defun. % % 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} % % ..., ready, GO: % \def\dosubindsanitize{% % \lastskip and \lastpenalty cannot both be nonzero simultaneously. \skip0 = \lastskip \edef\lastskipmacro{\the\lastskip}% \count255 = \lastpenalty % % If \lastskip is nonzero, that means the last item was a % skip. And since a skip is discardable, that means this % -\skip0 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-\skip0 \fi % \dosubindwrite % \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 penalty; 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\count255>9999 \nobreak \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\skip0 \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 \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. \penalty -300 % % 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}% \vskip .33\baselineskip plus .1\baselineskip % % Do our best not to break after the initial. \nobreak }} % \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 frozes 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 % % Swallow the left brace of the text (first parameter): \afterassignment\doentry \let\temp = } \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. \def\tempa{{\rm }}% \def\tempb{#1}% \edef\tempc{\tempa}% \edef\tempd{\tempb}% \ifx\tempc\tempd \ % \else % % If we must, put the page number on a line of its own, and fill out % this line with blank space. (The \hfil is overwhelmed with the % fill leaders glue in \indexdotfill if the page number does fit.) \hfil\penalty50 \null\nobreak\indexdotfill % Have leaders before the page number. % % The `\ ' here is removed by the implicit \unskip that TeX does as % part of (the primitive) \par. Without it, a spurious underfull % \hbox ensues. \ifpdf \pdfgettoks#1.% \ \the\toksA \else \ #1% \fi \fi \par \endgroup } % Like \dotfill except takes at least 1 em. \def\indexdotfill{\cleaders \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill} \def\primary #1{\line{#1\hfil}} \newskip\secondaryindent \secondaryindent=0.5cm \def\secondary#1#2{{% \parfillskip=0in \parskip=0in \hangindent=1in \hangafter=1 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill \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{% \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. % \unnumberedno is an oxymoron, of course. 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 this as the name of the chapter. % page headings and footings can use it. @section does likewise. % However, they are not reliable, because we don't use marks. \def\thischapter{} \def\thissection{} \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 achive this, remember the "biggest" unnum. sec. we are currently in: \chardef\unmlevel = \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 < \unmlevel \chardef\unmlevel = \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 > \unmlevel \def\headtype{U}% \else \chardef\unmlevel = 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 % \message{\putwordChapter\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 apphead0 calls appendixzzz \def\appendixzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\appendixno by 1 \gdef\chaplevelprefix{\appendixletter.}% \resetallfloatnos % \def\appendixnum{\putwordAppendix\space \appendixletter}% \message{\appendixnum}% % \chapmacro{#1}{Yappendix}{\appendixletter}% % \global\let\section = \appendixsec \global\let\subsection = \appendixsubsec \global\let\subsubsection = \appendixsubsubsec } \outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz \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}% } \outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz \def\appendixsectionzzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% } \let\appendixsec\appendixsection \outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz \def\unnumberedseczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% } % Subsections. \outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz \def\numberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% } \outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz \def\appendixsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno}% } \outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz \def\unnumberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno}% } % Subsubsections. \outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz \def\numberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynumbered}% {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% } \outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz \def\appendixsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% } \outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz \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\raggedright \rm #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} \def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi} \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} \def\CHAPPAGoff{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chapbreak \global\let\pagealignmacro=\chappager} \def\CHAPPAGon{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chappager \global\let\pagealignmacro=\chappager \global\def\HEADINGSon{\HEADINGSsingle}} \def\CHAPPAGodd{% \global\let\contentsalignmacro = \chapoddpage \global\let\pchapsepmacro=\chapoddpage \global\let\pagealignmacro=\chapoddpage \global\def\HEADINGSon{\HEADINGSdouble}} \CHAPPAGon % 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{% \pchapsepmacro {% \chapfonts \rm % % Have to define \thissection 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\thissection{#1}% \gdef\thischaptername{#1}% % % Only insert the separating space if we have a chapter/appendix % number, and don't print the unnumbered ``number''. \def\temptype{#2}% \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unnchap}% \def\thischapter{#1}% \else\ifx\temptype\Yomitfromtockeyword \setbox0 = \hbox{}% contents like unnumbered, but no toc entry \def\toctype{omit}% \xdef\thischapter{}% \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% \def\toctype{app}% % We don't substitute the actual chapter name into \thischapter % because we don't want its macros evaluated now. And we don't % use \thissection because that changes with each section. % \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% \else \setbox0 = \hbox{#3\enspace}% \def\toctype{numchap}% \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% \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. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright \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\raggedright \rm #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 {\rm #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\sectionheading#1#2#3#4{% {% % Switch to the right set of fonts. \csname #2fonts\endcsname \rm % % Insert space above the heading. \csname #2headingbreak\endcsname % % Only insert the space after the number if we have a section number. \def\sectionlevel{#2}% \def\temptype{#3}% % \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unn}% \gdef\thissection{#1}% \else\ifx\temptype\Yomitfromtockeyword % for @headings -- no section number, don't include in toc, % and don't redefine \thissection. \setbox0 = \hbox{}% \def\toctype{omit}% \let\sectionlevel=\empty \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{#4\enspace}% \def\toctype{app}% \gdef\thissection{#1}% \else \setbox0 = \hbox{#4\enspace}% \def\toctype{num}% \gdef\thissection{#1}% \fi\fi\fi % % Write the toc entry (before \donoderef). See comments in \chfplain. \writetocentry{\toctype\sectionlevel}{#1}{#4}% % % Write the node reference (= pdf destination for pdftex). % Again, see comments in \chfplain. \donoderef{#3}% % % Output the actual section heading. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright \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 \nobreak is purely so the last item on the list is a \penalty % of 10000. This is so other code, for instance \parsebodycommon, can % check for and avoid allowing breakpoints. Otherwise, it would % insert a valid breakpoint between: % @section sec-whatever % @deffn def-whatever \nobreak } \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 \toks0 = {#2}% \toks2 = \expandafter{\lastnode}% \edef\temp{\write\tocfile{\realbackslash #1entry{\the\toks0}{#3}% {\the\toks2}{\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 } \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. \def\thischapter{}% \chapmacro{#1}{Yomitfromtoc}{}% % \savepageno = \pageno \begingroup % Set up to handle contents files properly. \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11 % We can't do this, because then an actual ^ in a section % title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97. %\catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi \raggedbottom % Worry more about breakpoints than the bottom. \advance\hsize by -\contentsrightmargin % Don't use the full line length. % % Roman numerals for page numbers. \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi } % Normal (long) toc. \def\contents{% \startcontents{\putwordTOC}% \openin 1 \jobname.toc \ifeof 1 \else \input \jobname.toc \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\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 \jobname.toc \ifeof 1 \else \input \jobname.toc \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, ... % 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. % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. % % Since these characters are used in examples, it should be an even number of % \tt widths. Each \tt character is 1en, so two makes it 1em. % \def\point{$\star$} \def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} \def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}} \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} \def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}} % 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 \tensf 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} % @tex ... @end tex escapes into raw Tex temporarily. % One exception: @ is still an escape character, so that @end tex works. % But \@ or @@ will get a plain tex @ character. \envdef\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 \escapechar=`\\ % \let\b=\ptexb \let\bullet=\ptexbullet \let\c=\ptexc \let\,=\ptexcomma \let\.=\ptexdot \let\dots=\ptexdots \let\equiv=\ptexequiv \let\!=\ptexexclam \let\i=\ptexi \let\indent=\ptexindent \let\noindent=\ptexnoindent \let\{=\ptexlbrace \let\+=\tabalign \let\}=\ptexrbrace \let\/=\ptexslash \let\*=\ptexstar \let\t=\ptext % \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, 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. \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=\comment \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. \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 \parindent = 0pt \emergencystretch = 0pt % don't try to avoid overfull boxes % @cartouche defines \nonarrowing to inhibit narrowing % at next level down. \ifx\nonarrowing\relax \advance \leftskip by \lispnarrowing \exdentamount=\lispnarrowing \fi \let\exdent=\nofillexdent } % 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 \smallexamplefonts \rm \fi } \def\setsmalldispenv{% \ifx\SETdispenvsize\nosmallword \else \smallexamplefonts \rm \fi } % We often define two environments, @foo and @smallfoo. % Let's do it by one command: \def\makedispenv #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 synonyms: \def\maketwodispenvs #1#2#3{ \makedispenv{#1}{#3} \makedispenv{#2}{#3} } % @lisp: indented, narrowed, typewriter font; @example: same as @lisp. % % @smallexample and @smalllisp: use smaller fonts. % Originally contributed by Pavel@xerox. % \maketwodispenvs {lisp}{example}{% \nonfillstart \tt \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. \gobble % eat return } % @display/@smalldisplay: same as @lisp except keep current font. % \makedispenv {display}{% \nonfillstart \gobble } % @format/@smallformat: same as @display except don't narrow margins. % \makedispenv{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 \gobble } \let\Eflushright = \afterenvbreak % @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. % \envdef\quotation{% {\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 \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\undefined\else % indent a bit. \leftline{\kern 2\leftskip \sl ---\quotationauthor}% \fi {\parskip=0pt \afterenvbreak}% } % 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\"% } % % [Knuth] p. 380 \def\uncatcodespecials{% \def\do##1{\catcode`##1=\other}\dospecials} % % [Knuth] pp. 380,381,391 % Disable Spanish ligatures ?` and !` of \tt font \begingroup \catcode`\`=\active\gdef`{\relax\lq} \endgroup % % 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}% \catcode`\`=\active \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 % \def\starttabbox{\setbox0=\hbox\bgroup} \begingroup \catcode`\^^I=\active \gdef\tabexpand{% \catcode`\^^I=\active \def^^I{\leavevmode\egroup \dimen0=\wd0 % the width so far, or since the previous tab \divide\dimen0 by\tabw \multiply\dimen0 by\tabw % compute previous multiple of \tabw \advance\dimen0 by\tabw % advance to next multiple of \tabw \wd0=\dimen0 \box0 \starttabbox }% } \endgroup \def\setupverbatim{% \nonfillstart \advance\leftskip by -\defbodyindent % Easiest (and conventionally used) font for verbatim \tt \def\par{\leavevmode\egroup\box0\endgraf}% \catcode`\`=\active \tabexpand % 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 \input #1 \afterenvbreak }% } % @copying ... @end copying. % Save the text away for @insertcopying later. Many commands won't be % allowed in this context, but that's ok. % % 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{\begingroup % Define a command to swallow text until we reach `@end copying'. % \ is the escape char in this texinfo.tex file, so it is the % delimiter for the command; @ will be the escape char when we read % it, but that doesn't matter. \long\def\docopying##1\end copying{\gdef\copyingtext{##1}\enddocopying}% % % We must preserve ^^M's in the input file; see \insertcopying below. \catcode`\^^M = \active \docopying } % What we do to finish off the copying text. % \def\enddocopying{\endgroup\ignorespaces} % @insertcopying. Here we must play games with ^^M's. On the one hand, % we need them to delimit commands such as `@end quotation', so they % must be active. On the other hand, we certainly don't want every % end-of-line to be a \par, as would happen with the normal active % definition of ^^M. On the third hand, two ^^M's in a row should still % generate a \par. % % Our approach is to make ^^M insert a space and a penalty1 normally; % then it can also check if \lastpenalty=1. If it does, then manually % do \par. % % This messes up the normal definitions of @c[omment], so we redefine % it. Similarly for @ignore. (These commands are used in the gcc % manual for man page generation.) % % Seems pretty fragile, most line-oriented commands will presumably % fail, but for the limited use of getting the copying text (which % should be quite simple) inserted, we can hope it's ok. % {\catcode`\^^M=\active % \gdef\insertcopying{\begingroup % \parindent = 0pt % looks wrong on title page \def^^M{% \ifnum \lastpenalty=1 % \par % \else % \space \penalty 1 % \fi % }% % % Fix @c[omment] for catcode 13 ^^M's. \def\c##1^^M{\ignorespaces}% \let\comment = \c % % % Don't bother jumping through all the hoops that \doignore does, it % would be very hard since the catcodes are already set. \long\def\ignore##1\end ignore{\ignorespaces}% % \copyingtext % \endgroup}% } \message{defuns,} % @defun etc. \newskip\defbodyindent \defbodyindent=.4in \newskip\defargsindent \defargsindent=50pt \newskip\deflastargmargin \deflastargmargin=18pt % Start the processing of @deffn: \def\startdefun{% \ifnum\lastpenalty<10000 \medbreak \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 for penalty 10002 (inserted by % \defargscommonending) instead of 10000, since the sectioning % commands insert a \penalty10000, and we don't want to allow a break % between a section heading and a defun. \ifnum\lastpenalty=10002 \penalty2000 \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 \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 \endgraf \nobreak\vskip -\parskip \penalty 10002 % 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 remainnig 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. \let\var=\ttslanted #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 } \def\badparencount{% \errmessage{Unbalanced parentheses in @def}% \global\parencount=0 } \def\badbrackcount{% \errmessage{Unbalanced square braces 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\undefined \newwrite\macscribble \def\scantokens#1{% \toks0={#1\endinput}% \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 \catcode`\@=0 \catcode`\\=\other \escapechar=`\@ % ... and \example \spaceisspace % % Append \endinput to make sure that TeX does not see the ending newline. % % I've verified that it is necessary both for e-TeX and for ordinary TeX % --kasal, 29nov03 \scantokens{#1\endinput}% \endgroup } \newcount\paramno % Count of parameters \newtoks\macname % Macro name \newif\ifrecursive % Is it recursive? \def\macrolist{} % List of all defined macros in the form % \do\macro1\do\macro2... % Utility routines. % This does \let #1 = #2, except with \csnames. \def\cslet#1#2{% \expandafter\expandafter \expandafter\let \expandafter\expandafter \csname#1\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 \. % 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\macrobodyctxt{% \catcode`\~=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\+=\other \catcode`\{=\other \catcode`\}=\other \catcode`\@=\other \catcode`\^^M=\other \usembodybackslash} \def\macroargctxt{% \catcode`\~=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\+=\other \catcode`\@=\other \catcode`\\=\other} % \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\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% % Add the macroname to \macrolist \toks0 = \expandafter{\macrolist\do}% \xdef\macrolist{\the\toks0 \expandafter\noexpand\csname\the\macname\endcsname}% \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\do\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\do \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\next=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup\else \expandafter\parsearg \fi \next} % We want to disable all macros during \shipout so that they are not % expanded by \write. \def\turnoffmacros{\begingroup \def\do##1{\let\noexpand##1=\relax}% \edef\next{\macrolist}\expandafter\endgroup\next} % For \indexnofonts, 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. % \def\emptyusermacros{\begingroup \def\do##1{\let\noexpand##1=\noexpand\asis}% \edef\next{\macrolist}\expandafter\endgroup\next} % @alias. % We need some trickery to remove the optional spaces around the equal % sign. Just 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 \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 \thissection, % 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 \turnoffactive \otherbackslash \edef\writexrdef##1##2{% \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef ##1}{##2}}% these are parameters of \writexrdef }% \toks0 = \expandafter{\thissection}% \immediate \writexrdef{title}{\the\toks0 }% \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. \writexrdef{pg}{\folio}% will be written later, during \shipout }% \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 \leavevmode \getfilename{#4}% {\turnoffactive \otherbackslash \ifnum\filenamelength>0 \startlink attr{/Border [0 0 0]}% goto file{\the\filename.pdf} name{#1}% \else \startlink attr{/Border [0 0 0]}% goto name{\pdfmkpgn{#1}}% \fi }% \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 \otherbackslash \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 \otherbackslash % 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 \otherbackslash \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 \message{\linenumber Undefined cross reference `#1'.}% \else \ifwarnedxrefs\else \global\warnedxrefstrue \message{Cross reference values unknown; you must run TeX again.}% \fi \fi \fi \else % It's defined, so just use it. \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{% \expandafter\gdef\csname XR#1\endcsname{#2}% remember this xref value. % % Was that xref control sequence that we just defined for a float? \expandafter\iffloat\csname XR#1\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{#1}}% \fi } % Read the last existing aux file, if any. No error if none exists. % \def\tryauxfile{% \openin 1 \jobname.aux \ifeof 1 \else \readauxfile \global\havexrefstrue \fi \closein 1 } \def\readauxfile{\begingroup \catcode`\^^@=\other \catcode`\^^A=\other \catcode`\^^B=\other \catcode`\^^C=\other \catcode`\^^D=\other \catcode`\^^E=\other \catcode`\^^F=\other \catcode`\^^G=\other \catcode`\^^H=\other \catcode`\^^K=\other \catcode`\^^L=\other \catcode`\^^N=\other \catcode`\^^P=\other \catcode`\^^Q=\other \catcode`\^^R=\other \catcode`\^^S=\other \catcode`\^^T=\other \catcode`\^^U=\other \catcode`\^^V=\other \catcode`\^^W=\other \catcode`\^^X=\other \catcode`\^^Z=\other \catcode`\^^[=\other \catcode`\^^\=\other \catcode`\^^]=\other \catcode`\^^^=\other \catcode`\^^_=\other % 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. {% \count 1=128 \def\loop{% \catcode\count 1=\other \advance\count 1 by 1 \ifnum \count 1<256 \loop \fi }% }% % % @ is our escape character in .aux files, and we need braces. \catcode`\{=1 \catcode`\}=2 \catcode`\@=0 % \input \jobname.aux \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. % Similarily, 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\undefined \ifwarnednoepsf \else \errhelp = \noepsfhelp \errmessage{epsf.tex not found, images will be ignored}% \global\warnednoepsftrue \fi \else \imagexxx #1,,,,,\finish \fi } % % Arguments to @image: % #1 is (mandatory) image filename; we tack on .eps extension. % #2 is (optional) width, #3 is (optional) height. % #4 is (ignored optional) html alt text. % #5 is (ignored optional) extension. % #6 is just the usual extra ignored arg for parsing this 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\bigskip % 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 \line\bgroup\hss \fi % % 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 \hss \egroup \bigbreak \fi % space after the image \endgroup} % @float FLOATTYPE,LOC ... @end float for displayed figures, tables, etc. % We don't actually implement floating yet, we just plop the float "here". % But it seemed the best name for the future. % \envparseargdef\float{\dofloat #1,,,\finish} % #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. \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 \thissection 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\thissection{\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\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 \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 \turnoffactive \otherbackslash \immediate\write\auxfile{@xrdef{\floatlabel-lof}{% \floatident \ifx\thisshortcaption\empty \ifx\thiscaption\empty \else : \thiscaption \fi \else : \thisshortcaption \fi }}% }% \fi % % Space below caption, if we printed anything. \ifx\printedsomething\empty \else \vskip\parskip \fi \egroup % end of \vtop \checkinserts } % Append the tokens #2 to the definition of macro #1, not expanding either. % \newtoks\appendtomacroAtoks \newtoks\appendtomacroBtoks \def\appendtomacro#1#2{% \appendtomacroAtoks = \expandafter{#1}% \appendtomacroBtoks = {#2}% \edef#1{\the\appendtomacroAtoks \the\appendtomacroBtoks}% } % @caption, @shortcaption are easy. % \long\def\caption#1{\checkenv\float \def\thiscaption{#1}} \def\shortcaption#1{\checkenv\float \def\thisshortcaption{#1}} % 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 % \thissection 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,} % and i18n. % @documentlanguage is usually given very early, just after % @setfilename. If done too late, it may not override everything % properly. Single argument is the language abbreviation. % It would be nice if we could set up a hyphenation file here. % \parseargdef\documentlanguage{% \tex % read txi-??.tex file in plain TeX. % Read the file if it exists. \openin 1 txi-#1.tex \ifeof 1 \errhelp = \nolanghelp \errmessage{Cannot read language file txi-#1.tex}% \else \input txi-#1.tex \fi \closein 1 \endgroup } \newhelp\nolanghelp{The given language definition file cannot be found or is empty. Maybe you need to install it? In the current directory should work if nowhere else does.} % @documentencoding should change something in TeX eventually, most % likely, but for now just recognize it. \let\documentencoding = \comment % Page size parameters. % \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 so finicky about underfull hboxes, either. \hbadness = 2000 % Following George Bush, just get rid of widows and orphans. \widowpenalty=10000 \clubpenalty=10000 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're % using an old version of TeX, don't do anything. We want the amount of % stretch added to depend on the line length, hence the dependence on % \hsize. 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 \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{46\baselineskip}{6in}% {\voffset}{.25in}% {\bindingoffset}{36pt}% {11in}{8.5in}% }} % Use @smallbook to reset parameters for 7x9.5 (or so) format. \def\smallbook{{\globaldefs = 1 \parskip = 2pt plus 1pt \textleading = 12pt % \internalpagesizes{7.5in}{5in}% {\voffset}{.25in}% {\bindingoffset}{16pt}% {9.25in}{7in}% % \lispnarrowing = 0.3in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .5cm }} % 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{51\baselineskip}{160mm} {\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 \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.} % Define macros to output various characters with catcode for normal text. \catcode`\"=\other \catcode`\~=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\+=\other \catcode`\$=\other \def\normaldoublequote{"} \def\normaltilde{~} \def\normalcaret{^} \def\normalunderscore{_} \def\normalverticalbar{|} \def\normalless{<} \def\normalgreater{>} \def\normalplus{+} \def\normaldollar{$}%$ font-lock fix % 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\_} % 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} \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 % \rawbackslash defines an active \ to do \backslashcurfont. % \otherbackslash defines an active \ to be a literal `\' character with % catcode other. {\catcode`\\=\active @gdef@rawbackslash{@let\=@backslashcurfont} @gdef@otherbackslash{@let\=@realbackslash} } % \realbackslash is an actual character `\' with catcode other. {\catcode`\\=\other @gdef@realbackslash{\}} % \normalbackslash outputs one backslash in fixed width font. \def\normalbackslash{{\tt\backslashcurfont}} \catcode`\\=\active % Used sometimes to turn off (effectively) the active characters % even after parsing them. @def@turnoffactive{% @let"=@normaldoublequote @let\=@realbackslash @let~=@normaltilde @let^=@normalcaret @let_=@normalunderscore @let|=@normalverticalbar @let<=@normalless @let>=@normalgreater @let+=@normalplus @let$=@normaldollar %$ font-lock fix @unsepspaces } % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of % the literal character `\'. (Thus, \ is not expandable when this is in % effect.) % @def@normalturnoffactive{@turnoffactive @let\=@normalbackslash} % Make _ and + \other characters, temporarily. % This is canceled by @fixbackslash. @otherifyactive % If a .fmt file is being used, we don't want the `\input texinfo' to show up. % That is what \eatinput is for; after that, the `\' should revert to printing % a backslash. % @gdef@eatinput input texinfo{@fixbackslash} @global@let\ = @eatinput % On the other hand, perhaps the file did not have a `\input texinfo'. Then % the first `\{ in the file would cause an error. This macro tries to fix % that, assuming it is called before the first `\' could plausibly occur. % Also back turn on active characters that might appear in the input % file name, in case not using a pre-dumped format. % @gdef@fixbackslash{% @ifx\@eatinput @let\ = @normalbackslash @fi @catcode`+=@active @catcode`@_=@active } % Say @foo, not \foo, in error messages. @escapechar = `@@ % These look ok in all fonts, so just make them not special. @catcode`@& = @other @catcode`@# = @other @catcode`@% = @other @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 EOF echo - 'install-sh' cat << 'EOF' > 'install-sh' #!/bin/sh # install - install a program, script, or datafile scriptversion=2004-04-01.17 # 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. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename= transform_arg= instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= usage="Usage: $0 [OPTION]... SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 -d DIRECTORIES... In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default. In the second, create the directory path DIR. Options: -b=TRANSFORMBASENAME -c copy source (using $cpprog) instead of moving (using $mvprog). -d create directories instead of installing files. -g GROUP $chgrp installed files to GROUP. -m MODE $chmod installed files to MODE. -o USER $chown installed files to USER. -s strip installed files (using $stripprog). -t=TRANSFORM --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test -n "$1"; do case $1 in -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; -c) instcmd=$cpprog shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit 0;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; --version) echo "$0 $scriptversion"; exit 0;; *) # When -d is used, all remaining arguments are directories to create. test -n "$dir_arg" && break # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done break;; esac done if test -z "$1"; 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 for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then instcmd=: chmodcmd= else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` IFS=$oIFS pathcomp= while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift if test ! -d "$pathcomp"; then $mkdirprog "$pathcomp" || lasterr=$? # mkdir can fail with a `File exist' error in case several # install-sh are creating the directory concurrently. This # is OK. test ! -d "$pathcomp" && { (exit ${lasterr-1}); exit; } fi pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $instcmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else # If we're going to rename the final executable, determine the name now. if test -z "$transformarg"; then dstfile=`basename "$dst"` else dstfile=`basename "$dst" $transformbasename \ | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename. test -z "$dstfile" && dstfile=`basename "$dst"` # 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 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 # Move or copy the file name to the temp name $doit $instcmd "$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 $instcmd $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 "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 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. { if test -f "$dstdir/$dstfile"; then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" } } fi || { (exit 1); exit; } done # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit } # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: EOF echo - 'mbsupport.h' cat << 'EOF' > 'mbsupport.h' /* * mbsupport.h --- Localize determination of whether we have multibyte stuff. */ /* * Copyright (C) 2004 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. * * GAWK is free software; you can 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. * * GAWK is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ /* * This file is needed because we test for 1i8n support in 3 different * places, and we want a consistent definition in all of them. Following * the ``Don't Repeat Yourself'' principle from "The Pragmatic Programmer", * we centralize the tests here. * * This test is the union of all the current tests. */ #ifdef HAVE_STDLIB_H #include #endif #if defined(HAVE_ISWCTYPE) \ && defined(HAVE_LOCALE_H) \ && defined(HAVE_MBRLEN) \ && defined(HAVE_MBRTOWC) \ && defined(HAVE_WCHAR_H) \ && defined(HAVE_WCRTOMB) \ && defined(HAVE_WCSCOLL) \ && defined(HAVE_WCTYPE) \ && defined(HAVE_WCTYPE_H) \ && defined(HAVE_WCTYPE_T) \ && (defined(HAVE_STDLIB_H) && defined(MB_CUR_MAX)) \ /* We can handle multibyte strings. */ # define MBS_SUPPORT 1 #else # undef MBS_SUPPORT #endif EOF echo - 'missing_d/memmove.c' cat << 'EOF' > 'missing_d/memmove.c' /*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Chris Torek. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if 0 #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)bcopy.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include #include #endif /* * sizeof(word) MUST BE A POWER OF TWO * SO THAT wmask BELOW IS ALL ONES */ typedef int word; /* "word" used for optimal copy speed */ #define wsize sizeof(word) #define wmask (wsize - 1) /* ADR: 1/2004. For gawk, we need memmove(). */ #define MEMMOVE 1 /* * Copy a block of memory, handling overlap. * This is the routine that actually implements * (the portable versions of) bcopy, memcpy, and memmove. */ #ifdef MEMCOPY void * memcpy(dst0, src0, length) #else #ifdef MEMMOVE void * memmove(dst0, src0, length) #else void bcopy(src0, dst0, length) #endif #endif void *dst0; const void *src0; register size_t length; { register char *dst = dst0; register const char *src = src0; register size_t t; if (length == 0 || dst == src) /* nothing to do */ goto done; /* * Macros: loop-t-times; and loop-t-times, t>0 */ #define TLOOP(s) if (t) TLOOP1(s) #define TLOOP1(s) do { s; } while (--t) if ((unsigned long)dst < (unsigned long)src) { /* * Copy forward. */ t = (int)src; /* only need low bits */ if ((t | (int)dst) & wmask) { /* * Try to align operands. This cannot be done * unless the low bits match. */ if ((t ^ (int)dst) & wmask || length < wsize) t = length; else t = wsize - (t & wmask); length -= t; TLOOP1(*dst++ = *src++); } /* * Copy whole words, then mop up any trailing bytes. */ t = length / wsize; TLOOP(*(word *)dst = *(word *)src; src += wsize; dst += wsize); t = length & wmask; TLOOP(*dst++ = *src++); } else { /* * Copy backwards. Otherwise essentially the same. * Alignment works as before, except that it takes * (t&wmask) bytes to align, not wsize-(t&wmask). */ src += length; dst += length; t = (int)src; if ((t | (int)dst) & wmask) { if ((t ^ (int)dst) & wmask || length <= wsize) t = length; else t &= wmask; length -= t; TLOOP1(*--dst = *--src); } t = length / wsize; TLOOP(src -= wsize; dst -= wsize; *(word *)dst = *(word *)src); t = length & wmask; TLOOP(*--dst = *--src); } done: #if defined(MEMCOPY) || defined(MEMMOVE) return (dst0); #else return; #endif } #undef wsize #undef wmask #undef MEMMOVE #undef TLOOP #undef TLOOP1 EOF echo - 'missing_d/strtoul.c' cat << 'EOF' > 'missing_d/strtoul.c' /* * Very simple implementation of strtoul() for gawk, * for old systems. Descriptive prose from the Linux man page. * * May 2004 */ /* #define TEST 1 */ #ifdef TEST #include #include #include #include #include #include #define TRUE 1 #define FALSE 0 #define strtoul mystrtoul #endif #ifndef ULONG_MAX #define ULONG_MAX (~ 0UL) #endif unsigned long int strtoul(nptr, endptr, base) const char *nptr; char **endptr; int base; { static char lower[] = "abcdefghijklmnopqrstuvwxyz"; unsigned long result = 0UL; char *nptr_orig = (char *) nptr; int neg = FALSE; char *cp, c; int val; int sawdigs = FALSE; /* * The strtoul() function converts the initial part of the * string in nptr to an unsigned long integer value according * to the given base, which must be between 2 and 36 inclusive, * or be the special value 0. */ if ((base != 0 && (base < 2 || base > 36)) || nptr == NULL) { if (endptr != NULL) *endptr = nptr_orig; errno = EINVAL; return 0; } /* * The string must [sic] begin with an arbitrary amount of white space * (as determined by isspace(3)) followed by a single optional * `+' or `-' sign. */ while (isspace(*nptr)) nptr++; if (*nptr == '+') nptr++; else if (*nptr == '-') { nptr++; neg = TRUE; } /* * If base is zero or 16, the string may then include a `0x' prefix, * and the number will be read in base 16; otherwise, a zero base is * taken as 10 (decimal) unless the next character is `0', in which * case it is taken as 8 (octal). */ if ((base == 0 || base == 16) && nptr[0] == '0' && (nptr[1] == 'x' || nptr[1] == 'X')) { base = 16; /* force it */ nptr += 2; /* skip 0x */ } else if ((base == 0 || base == 8) && nptr[0] == '0') { base = 8; nptr++; } else if (base == 0) base = 10; /* * The remainder of the string is converted to an unsigned long int * value in the obvious manner, stopping at the first character * which is not a valid digit in the given base. (In bases above 10, * the letter `A' in either upper or lower case represents 10, * `B' represents 11, and so forth, with `Z' representing 35.) */ for (; *nptr != '\0'; nptr++) { c = *nptr; #if ENABLE_NLS && defined(HAVE_LOCALE_H) if (base == 10 && loc.thousands_sep != NULL && loc.thousands_sep[0] != '\0' && c == loc.thousands_sep[0]) continue; #endif switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': val = c - '0'; if (val >= base) /* even base 2 allowed ... */ goto out; result *= base; result += val; sawdigs = TRUE; break; case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': c += 'a' - 'A'; /* downcase */ /* fall through */ 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': cp = strchr(lower, c); val = cp - lower; val += 10; /* 'a' == 10 */ if (val >= base) goto out; result *= base; result += val; sawdigs = TRUE; break; default: goto out; } } out: /* * If endptr is not NULL, strtoul() stores the address of the * first invalid character in *endptr. If there were no digits * at all, strtoul() stores the original value of nptr in *endptr * (and returns 0). In particular, if *nptr is not `\0' but * **endptr is `\0' on return, the entire string is valid. */ if (endptr != NULL) { if (! sawdigs) { *endptr = nptr_orig; return 0; } else *endptr = (char *) nptr; } /* * RETURN VALUE * The strtoul() function returns either the result of the * conversion or, if there was a leading minus sign, the * negation of the result of the conversion, unless the original * (non-negated) value would overflow; in the latter case, * strtoul() returns ULONG_MAX and sets the global variable errno * to ERANGE. */ /* * ADR: This computation is probably bogus. If it's a * problem, upgrade to a modern system. */ if (neg && result == ULONG_MAX) { errno = ERANGE; return ULONG_MAX; } else if (neg) result = -result; return result; } #ifdef TEST #undef strtoul int main(void) { char *endptr; unsigned long res1, res2; res1 = strtoul("0xdeadBeeF", & endptr, 0), res2 = mystrtoul("0xdeadBeeF", & endptr, 0), printf("(real,my)strtoul(\"0xdeadBeeF\", & endptr, 0) is %lu, %lu *endptr = %d\n", res1, res2, *endptr); res1 = strtoul("0101101", & endptr, 2), res2 = mystrtoul("0101101", & endptr, 2), printf("(real,my)strtoul(\"0101101\", & endptr, 2) is %lu, %lu *endptr = %d\n", res1, res2, *endptr); res1 = strtoul("01011012", & endptr, 2), res2 = mystrtoul("01011012", & endptr, 2), printf("(real,my)strtoul(\"01011012\", & endptr, 2) is %lu, %lu *endptr = %d\n", res1, res2, *endptr); res1 = strtoul(" +42a", & endptr, 0), res2 = mystrtoul(" +42a", & endptr, 0), printf("(real,my)strtoul(\" +42a\", & endptr, 0) is %lu, %lu *endptr = %d\n", res1, res2, *endptr); res1 = strtoul("0377", & endptr, 0), res2 = mystrtoul("0377", & endptr, 0), printf("(real,my)strtoul(\"0377\", & endptr, 0) is %lu, %lu *endptr = %d\n", res1, res2, *endptr); res1 = strtoul("Z", & endptr, 36), res2 = mystrtoul("Z", & endptr, 36), printf("(real,my)strtoul(\"Z\", & endptr, 36) is %lu, %lu *endptr = %d\n", res1, res2, *endptr); res1 = strtoul("qZ*", & endptr, 36), res2 = mystrtoul("qZ*", & endptr, 36), printf("(real,my)strtoul(\"qZ*\", & endptr, 36) is %lu, %lu *endptr = %d\n", res1, res2, *endptr); } #endif EOF echo - 'pc/Makefile.tst' cat << 'EOF' > 'pc/Makefile.tst' # Makefile for GNU Awk test suite. # # Copyright (C) 1988-2004 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. # # GAWK is free software; you can 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. # # GAWK is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # ============================================================================ # MS-DOS & OS/2 Notes: READ THEM! # ============================================================================ # As of version 2.91, efforts to make this makefile run in MS-DOS and OS/2 # have started in earnest. The following steps need to be followed in order # to run this makefile: # # 1. The first thing that you will need to do is to convert all of the # files ending in ".ok" in the test directory, all of the files ending # in ".good" (or ".goo") in the test/reg directory, and mmap8k.in from # having a linefeed to having carriage return/linefeed at the end of each # line. There are various public domain UNIX to DOS converters and any # should work. Alternatively, you can use diff instead of cmp--most # versions of diff don't care about how the lines end. # # 2. You will need an sh-compatible shell. Please refer to the "README.pc" # file in the README_d directory for information about obtaining a copy. # You will also need various UNIX utilities. At a minimum, you will # need: rm, tr, cmp (or diff, see above), cat, wc, and sh. # You should also have a UNIX-compatible date program. # # The makefile has only been tested with dmake 3.8 and DJGPP Make 3.74 or # later. After making all of these changes, typing "dmake bigtest extra" # or "make bigtest extra" (with DJGPP Make) should run successfully. # The Bash shell (compiled with djgpp) works very well with the # MSC & djgpp-compiled gawks. It is currently the recommended shell to use # for testing, along with DJGPP make. See README.pc for # more information on OS/2 and DOS shells. # You will almost certainly need to change some of the values (MACROS) # defined on the next few lines. # This won't work unless you have "sh" and set SHELL equal to it (Make 3.74 # or later which comes with DJGPP will work with SHELL=/bin/sh if you have # sh.exe anywhere on your PATH). #SHELL = e:\bin\sh.exe SHELL = /bin/sh # Point to gawk AWK = ../gawk.exe # Also point to gawk but for DOS commands needing backslashes. We need # the forward slash version too or 'arrayparam' fails. AWK2 = '..\gawk.exe' AWKPROG = ../gawk.exe # Set your cmp command here (you can use most versions of diff instead of cmp # if you don't want to convert the .ok files to the DOS CR/LF format). # This is also an issue for the "mmap8k" test. If it fails, make sure that # mmap8k.in has CR/LFs or that you've used diff. # # The following comment is for users of OSs which support long file names # (such as Windows 95) for all versions of gawk (both 16 & 32-bit). # If you use a shell which doesn't support long filenames, temporary files # created by this makefile will be truncated by your shell. "_argarra" is an # example of this. If $(CMP) is a DJGPP-compiled program, then it will fail # because it looks for the long filename (eg. _argarray). To fix this, you # need to set LFN=n in your shell's environment. # NOTE: Setting LFN in the makefile most probably won't help you because LFN # needs to be an environment variable. #CMP = cmp # See the comment above for why you might want to set CMP to "env LFN=n diff" #CMP = env LFN=n diff CMP = diff #CMP = diff -c #CMP = gcmp # Set your "cp" and "mkdir" commands here. Note: DOS's copy must take forward # slashes. #CP = cp #CP = : && command -c copy CP = command.com /c copy #MKDIR = mkdir #MKDIR = gmkdir #MKDIR = : && command -c mkdir MKDIR = command.com /c mkdir # Set your unix-style date function here #DATE = date DATE = gdate # MS-DOS and OS/2 use ; as a PATH delimiter PATH_SEPARATOR = ; # ============================================================================ # You shouldn't need to modify anything below this line. # ============================================================================ srcdir = . # try to keep these sorted BASIC_TESTS = addcomma anchgsub argarray arrayparm arrayref arrymem1 \ arrayprm2 arrayprm3 arryref2 arryref3 arryref4 arryref5 arynasty \ arynocls aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 \ aryprm8 arysubnm asgext awkpath back89 backgsub childin clobber \ clsflnam compare compare2 concat1 concat2 concat3 convfmt datanonl defref \ delarprm delarpm2 delfunc dynlj eofsplit exitval1 fldchg fldchgnf fmttest fnamedat \ fnarray fnarray2 fnarydel fnaryscl fnasgnm fnmisc fnparydl \ fordel forsimp fsbs fsrs fstabplus funsemnl funsmnam funstack getline \ getline2 getline3 getlnbuf getnr2tb getnr2tm gsubasgn gsubtest \ gsubtst2 gsubtst3 gsubtst4 gsubtst5 hsprint inputred intest \ intprec leaddig leadnl litoct longsub longwrds manglprm math membug1 \ messages minusstr mmap8k nasty nasty2 negexp nested nfldstr \ nfneg nfset nlfldsep nlinstr nlstrina noeffect nofmtch noloop1 \ noloop2 nonl noparms nors nulrsend numindex numsubstr octsub ofmt \ ofmtbig ofmtfidl ofmts onlynl opasnidx opasnslf paramdup paramtyp \ parseme pcntplus prdupval prec printf0 printf1 prmarscl prmreuse \ prt1eval prtoeval psx96sub rand rebt8b1 rebt8b2 redfilnm regeq \ reindops reparse resplit rs rsnul1nl rsnulbig rsnulbig2 rstest1 \ rstest2 rstest3 rstest4 rstest5 rswhite scalar sclforin sclifin \ sortempty splitargv splitarr splitdef splitvar splitwht sprintfc \ strcat1 strtod subamp subsepnm subslash substr swaplns synerr1 tradanch \ tweakfld uninit2 uninit3 uninit4 uninitialized unterm zeroe0 zeroflag UNIX_TESTS = fflush getlnhd pid pipeio1 pipeio2 poundbang space strftlng GAWK_EXT_TESTS = argtest asort asorti backw badargs clos1way fieldwdth fsfwfs \ gensub gnuops2 gnureops icasefs icasers igncdym igncfs ignrcase \ ignrcas2 lint match1 match2 manyfiles nondec posix procinfs \ printfbad1 regx8bit rebuf reint shadow sort1 strtonum strftime whiny EXTRA_TESTS = regtest inftest INET_TESTS = inetechu inetecht inetdayu inetdayt # List of the tests which should be run with --lint option: NEED_LINT = defref noeffect nofmtch shadow uninit2 uninit3 uninit4 uninitialized # List of the files that appear in manual tests or are for reserve testing: GENTESTS_UNUSED = Makefile.in gtlnbufv.awk printfloat.awk switch2.awk # Message stuff is to make it a little easier to follow. # Make the pass-fail last and dependent on others to avoid # spurious errors if `make -j' in effect. check: msg \ printlang \ basic-msg-start basic basic-msg-end \ unix-msg-start unix-tests unix-msg-end \ extend-msg-start gawk-extensions extend-msg-end \ pass-fail basic: $(BASIC_TESTS) unix-tests: $(UNIX_TESTS) gawk-extensions: $(GAWK_EXT_TESTS) #extra: $(EXTRA_TESTS) inet extra: $(EXTRA_TESTS) inetmesg inet: inetmesg $(INET_TESTS) msg:: @echo '' @echo 'Any output from "cmp" is bad news, although some differences' @echo 'in floating point values are probably benign -- in particular,' @echo 'some systems may omit a leading zero and the floating point' @echo 'precision may lead to slightly different output in a few cases.' printlang:: @$(AWK) -f $(srcdir)/printlang.awk basic-msg-start: @echo "======== Starting basic tests ========" basic-msg-end: @echo "======== Done with basic tests ========" unix-msg-start: @echo "======== Starting Unix tests ========" unix-msg-end: @echo "======== Done with Unix tests ========" extend-msg-start: @echo "======== Starting gawk extension tests ========" extend-msg-end: @echo "======== Done with gawk extension tests ========" # This test is a PITA because increasingly, /tmp is getting # mounted noexec. So, we'll test it locally. Sigh. # # More PITA; some systems have medium short limits on #! paths, # so this can still fail poundbang:: @echo $@ @sed "s;/tmp/gawk;`pwd`/$(AWKPROG);" < $(srcdir)/poundbang.awk > ./_pbd.awk @chmod +x ./_pbd.awk @if ./_pbd.awk $(srcdir)/poundbang.awk > _`basename $@` ; \ then : ; \ else \ sed "s;/tmp/gawk;../$(AWKPROG);" < $(srcdir)/poundbang.awk > ./_pbd.awk ; \ chmod +x ./_pbd.awk ; \ LC_ALL=$${GAWKLOCALE:-C} LANG=$${GAWKLOCALE:-C} ./_pbd.awk $(srcdir)/poundbang.awk > _`basename $@`; \ fi @-$(CMP) $(srcdir)/poundbang.awk _`basename $@` && rm -f _`basename $@` _pbd.awk messages:: @echo $@ @$(AWK) -f $(srcdir)/messages.awk >out2 2>out3 @-$(CMP) $(srcdir)/out1.ok out1 && $(CMP) $(srcdir)/out2.ok out2 && $(CMP) $(srcdir)/out3.ok out3 && rm -f out1 out2 out3 argarray:: @echo $@ @case $(srcdir) in \ .) : ;; \ *) cp $(srcdir)/argarray.in . ;; \ esac @TEST=test echo just a test | $(AWK) -f $(srcdir)/argarray.awk ./argarray.in - >_$@ @case $(srcdir) in \ .) : ;; \ *) rm -f ./argarray.in ;; \ esac @-$(CMP) $(srcdir)/argarray.ok _$@ && rm -f _$@ regtest:: @echo 'Some of the output from regtest is very system specific, do not' @echo 'be distressed if your output differs from that distributed.' @echo 'Manual inspection is called for.' AWK=`pwd`/$(AWK) $(srcdir)/regtest.sh manyfiles:: @echo manyfiles @rm -rf junk @mkdir junk @$(AWK) 'BEGIN { for (i = 1; i <= 300; i++) print i, i}' >_$@ @$(AWK) -f $(srcdir)/manyfiles.awk _$@ _$@ @wc -l junk/* | $(AWK) '$$1 != 2' | wc -l | sed "s/ *//g" > _$@ @rm -rf junk ; $(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ compare:: @echo $@ @$(AWK) -f $(srcdir)/compare.awk 0 1 $(srcdir)/compare.in >_$@ @-$(CMP) $(srcdir)/compare.ok _$@ && rm -f _$@ inftest:: @echo $@ @echo This test is very machine specific... @echo This sometimes seems to cause problems for MSC gawk, so do not @echo run it. # @$(AWK) -f $(srcdir)/inftest.awk | sed "s/inf/Inf/g" >_$@ # @-$(CMP) $(srcdir)/inftest.ok _$@ && rm -f _$@ getline2:: @echo $@ @$(AWK) -f $(srcdir)/getline2.awk $(srcdir)/getline2.awk $(srcdir)/getline2.awk >_$@ @-$(CMP) $(srcdir)/getline2.ok _$@ && rm -f _$@ awkpath:: @echo $@ @AWKPATH="$(srcdir)$(PATH_SEPARATOR)$(srcdir)/lib" $(AWK) -f awkpath.awk >_$@ @-$(CMP) $(srcdir)/awkpath.ok _$@ && rm -f _$@ argtest:: @echo $@ @$(AWK) -f $(srcdir)/argtest.awk -x -y abc >_$@ @-$(CMP) $(srcdir)/argtest.ok _$@ && rm -f _$@ badargs:: @echo $@ @-$(AWK) -f 2>&1 | grep -v patchlevel >_$@ @-$(CMP) $(srcdir)/badargs.ok _$@ && rm -f _$@ nonl:: @echo $@ @-AWKPATH=$(srcdir) $(AWK) --lint -f nonl.awk /dev/null >_$@ 2>&1 @-$(CMP) $(srcdir)/nonl.ok _$@ && rm -f _$@ strftime:: @echo This test could fail on slow machines or on a minute boundary, @echo so if it does, double check the actual results: @echo $@ # @GAWK_LOCALE=C; export GAWK_LOCALE; \ # TZ=GMT0; export TZ; \ # (LC_ALL=C date) | $(AWK) -v OUTPUT=_$@ -f $(srcdir)/strftime.awk @GAWK_LOCALE=C; export GAWK_LOCALE; \ TZ=GMT0; export TZ; \ (LC_ALL=C $(DATE)) | $(AWK) -v OUTPUT=_$@ -f $(srcdir)/strftime.awk @-$(CMP) strftime.ok _$@ && rm -f _$@ strftime.ok || exit 0 litoct:: @echo $@ @echo ab | $(AWK) --traditional -f $(srcdir)/litoct.awk >_$@ @-$(CMP) $(srcdir)/litoct.ok _$@ && rm -f _$@ fflush:: @echo $@ @$(srcdir)/fflush.sh >_$@ @-$(CMP) $(srcdir)/fflush.ok _$@ && rm -f _$@ tweakfld:: @echo $@ @$(AWK) -f $(srcdir)/tweakfld.awk $(srcdir)/tweakfld.in >_$@ @rm -f errors.cleanup @-$(CMP) $(srcdir)/tweakfld.ok _$@ && rm -f _$@ mmap8k:: @echo $@ @$(AWK) '{ print }' $(srcdir)/mmap8k.in >_$@ @-$(CMP) $(srcdir)/mmap8k.in _$@ && rm -f _$@ tradanch:: @echo $@ @$(AWK) --traditional -f $(srcdir)/tradanch.awk $(srcdir)/tradanch.in >_$@ @-$(CMP) $(srcdir)/tradanch.ok _$@ && rm -f _$@ # AIX /bin/sh exec's the last command in a list, therefore issue a ":" # command so that pid.sh is fork'ed as a child before being exec'ed. pid:: @echo pid @AWKPATH=$(srcdir) AWK=$(AWKPROG) $(SHELL) $(srcdir)/pid.sh $$$$ > _`basename $@` ; : @-$(CMP) $(srcdir)/pid.ok _`basename $@` && rm -f _`basename $@` _`basename $@`.in strftlng:: @echo $@ @TZ=UTC; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ @if $(CMP) -s $(srcdir)/strftlng.ok _$@ ; then : ; else \ TZ=UTC0; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ ; \ fi @-$(CMP) $(srcdir)/strftlng.ok _$@ && rm -f _$@ nors:: @echo $@ @echo A B C D E | tr -d '\12\15' | $(AWK) '{ print $$NF }' - $(srcdir)/nors.in > _$@ @-$(CMP) $(srcdir)/nors.ok _$@ && rm -f _$@ reint:: @echo $@ @$(AWK) --re-interval -f $(srcdir)/reint.awk $(srcdir)/reint.in >_$@ @-$(CMP) $(srcdir)/reint.ok _$@ && rm -f _$@ pipeio1:: @echo $@ @$(AWK) -f $(srcdir)/pipeio1.awk >_$@ @rm -f test1 test2 @-$(CMP) $(srcdir)/pipeio1.ok _$@ && rm -f _$@ pipeio2:: @echo $@ @$(AWK) -v SRCDIR=$(srcdir) -f $(srcdir)/pipeio2.awk >_$@ @-$(CMP) $(srcdir)/pipeio2.ok _$@ && rm -f _$@ clobber:: @echo $@ @$(AWK) -f $(srcdir)/clobber.awk >_$@ @-$(CMP) $(srcdir)/clobber.ok seq && $(CMP) $(srcdir)/clobber.ok _$@ && rm -f _$@ @rm -f seq arynocls:: @echo $@ @-AWKPATH=$(srcdir) $(AWK) -v INPUT=$(srcdir)/arynocls.in -f arynocls.awk >_$@ @-$(CMP) $(srcdir)/arynocls.ok _$@ && rm -f _$@ getlnbuf:: @echo $@ @-AWKPATH=$(srcdir) $(AWK) -f getlnbuf.awk $(srcdir)/getlnbuf.in > _$@ @-AWKPATH=$(srcdir) $(AWK) -f gtlnbufv.awk $(srcdir)/getlnbuf.in > _2$@ @-$(CMP) $(srcdir)/getlnbuf.ok _$@ && $(CMP) $(srcdir)/getlnbuf.ok _2$@ && rm -f _$@ _2$@ inetmesg:: @echo These tests only work if your system supports the services @echo "'discard'" at port 9 and "'daytimed'" at port 13. Check your @echo file /etc/services and do "'netstat -a'". inetechu:: @echo This test is for establishing UDP connections @$(AWK) 'BEGIN {print "" |& "/inet/udp/0/127.0.0.1/9"}' inetecht:: @echo This test is for establishing TCP connections @$(AWK) 'BEGIN {print "" |& "/inet/tcp/0/127.0.0.1/9"}' inetdayu:: @echo This test is for bidirectional UDP transmission @$(AWK) 'BEGIN { print "" |& "/inet/udp/0/127.0.0.1/13"; \ "/inet/udp/0/127.0.0.1/13" |& getline; print $0}' inetdayt:: @echo This test is for bidirectional TCP transmission @$(AWK) 'BEGIN { print "" |& "/inet/tcp/0/127.0.0.1/13"; \ "/inet/tcp/0/127.0.0.1/13" |& getline; print $0}' redfilnm:: @echo $@ @$(AWK) -f $(srcdir)/redfilnm.awk srcdir=$(srcdir) $(srcdir)/redfilnm.in >_$@ @-$(CMP) $(srcdir)/redfilnm.ok _$@ && rm -f _$@ leaddig:: @echo $@ @$(AWK) -v x=2E -f $(srcdir)/leaddig.awk >_$@ @-$(CMP) $(srcdir)/leaddig.ok _$@ && rm -f _$@ gsubtst3:: @echo $@ @$(AWK) --re-interval -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ space:: @echo $@ @$(AWK) -f ' ' $(srcdir)/space.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ printf0:: @echo $@ @$(AWK) --posix -f $(srcdir)/$@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rsnulbig:: @echo $@ @ : Suppose that block size for pipe is at most 128kB: @$(AWK) 'BEGIN { for (i = 1; i <= 128*64+1; i++) print "abcdefgh123456\n" }' 2>&1 | \ $(AWK) 'BEGIN { RS = ""; ORS = "\n\n" }; { print }' 2>&1 | \ $(AWK) '/^[^a]/; END{ print NR }' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rsnulbig2:: @echo $@ @$(AWK) 'BEGIN { ORS = ""; n = "\n"; for (i = 1; i <= 10; i++) n = (n n); \ for (i = 1; i <= 128; i++) print n; print "abc\n" }' 2>&1 | \ $(AWK) 'BEGIN { RS = ""; ORS = "\n\n" };{ print }' 2>&1 | \ $(AWK) '/^[^a]/; END { print NR }' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ whiny:: @echo $@ @WHINY_USERS=1 $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ignrcas2:: @echo $@ @GAWK_LOCALE=en_US ; export GAWK_LOCALE ; \ $(AWK) -f $(srcdir)/$@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ subamp:: @echo $@ @GAWK_LOCALE=en_US.UTF-8 ; export GAWK_LOCALE ; \ $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # This test makes sure gawk exits with a zero code. # Thus, unconditionally generate the exit code. exitval1:: @echo $@ @$(AWK) -f $(srcdir)/exitval1.awk >_$@ 2>&1; echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: @echo addcomma @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ anchgsub: @echo anchgsub @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arrayparm: @echo arrayparm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arrayref: @echo arrayref @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arrymem1: @echo arrymem1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arrayprm2: @echo arrayprm2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arrayprm3: @echo arrayprm3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arryref2: @echo arryref2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arryref3: @echo arryref3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arryref4: @echo arryref4 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arryref5: @echo arryref5 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arynasty: @echo arynasty @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm1: @echo aryprm1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm2: @echo aryprm2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm3: @echo aryprm3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm4: @echo aryprm4 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm5: @echo aryprm5 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm6: @echo aryprm6 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm7: @echo aryprm7 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ aryprm8: @echo aryprm8 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arysubnm: @echo arysubnm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ asgext: @echo asgext @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ back89: @echo back89 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ backgsub: @echo backgsub @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ childin: @echo childin @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ clsflnam: @echo clsflnam @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ compare2: @echo compare2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ concat1: @echo concat1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ concat2: @echo concat2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ concat3: @echo concat3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ convfmt: @echo convfmt @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ datanonl: @echo datanonl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ defref: @echo defref @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ delarprm: @echo delarprm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ delarpm2: @echo delarpm2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ delfunc: @echo delfunc @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ dynlj: @echo dynlj @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ eofsplit: @echo eofsplit @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fldchg: @echo fldchg @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fldchgnf: @echo fldchgnf @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fmttest: @echo fmttest @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnamedat: @echo fnamedat @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnarray: @echo fnarray @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnarray2: @echo fnarray2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnarydel: @echo fnarydel @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnaryscl: @echo fnaryscl @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnasgnm: @echo fnasgnm @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnmisc: @echo fnmisc @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnparydl: @echo fnparydl @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fordel: @echo fordel @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ forsimp: @echo forsimp @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fsbs: @echo fsbs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fsrs: @echo fsrs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fstabplus: @echo fstabplus @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ funsemnl: @echo funsemnl @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ funsmnam: @echo funsmnam @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ funstack: @echo funstack @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getline: @echo getline @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getline3: @echo getline3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getnr2tb: @echo getnr2tb @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getnr2tm: @echo getnr2tm @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubasgn: @echo gsubasgn @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtest: @echo gsubtest @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtst2: @echo gsubtst2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtst4: @echo gsubtst4 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtst5: @echo gsubtst5 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ hsprint: @echo hsprint @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ inputred: @echo inputred @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ intest: @echo intest @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ intprec: @echo intprec @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ leadnl: @echo leadnl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ longsub: @echo longsub @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ longwrds: @echo longwrds @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ manglprm: @echo manglprm @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ math: @echo math @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ membug1: @echo membug1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ minusstr: @echo minusstr @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nasty: @echo nasty @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nasty2: @echo nasty2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ negexp: @echo negexp @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nested: @echo nested @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nfldstr: @echo nfldstr @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nfneg: @echo nfneg @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nfset: @echo nfset @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nlfldsep: @echo nlfldsep @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nlinstr: @echo nlinstr @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nlstrina: @echo nlstrina @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ noeffect: @echo noeffect @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nofmtch: @echo nofmtch @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ noloop1: @echo noloop1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ noloop2: @echo noloop2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ noparms: @echo noparms @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nulrsend: @echo nulrsend @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ numindex: @echo numindex @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ numsubstr: @echo numsubstr @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ octsub: @echo octsub @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ofmt: @echo ofmt @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ofmtbig: @echo ofmtbig @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ofmtfidl: @echo ofmtfidl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ofmts: @echo ofmts @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ onlynl: @echo onlynl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ opasnidx: @echo opasnidx @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ opasnslf: @echo opasnslf @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ paramdup: @echo paramdup @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ paramtyp: @echo paramtyp @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ parseme: @echo parseme @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ pcntplus: @echo pcntplus @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prdupval: @echo prdupval @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prec: @echo prec @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ printf1: @echo printf1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prmarscl: @echo prmarscl @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prmreuse: @echo prmreuse @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prt1eval: @echo prt1eval @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prtoeval: @echo prtoeval @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ psx96sub: @echo psx96sub @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rand: @echo rand @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rebt8b1: @echo rebt8b1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rebt8b2: @echo rebt8b2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ regeq: @echo regeq @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ reindops: @echo reindops @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ reparse: @echo reparse @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ resplit: @echo resplit @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rs: @echo rs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rsnul1nl: @echo rsnul1nl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rstest1: @echo rstest1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rstest2: @echo rstest2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rstest3: @echo rstest3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rstest4: @echo rstest4 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rstest5: @echo rstest5 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rswhite: @echo rswhite @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ scalar: @echo scalar @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sclforin: @echo sclforin @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sclifin: @echo sclifin @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sortempty: @echo sortempty @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitargv: @echo splitargv @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitarr: @echo splitarr @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitdef: @echo splitdef @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitvar: @echo splitvar @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitwht: @echo splitwht @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sprintfc: @echo sprintfc @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ strcat1: @echo strcat1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ strtod: @echo strtod @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ subsepnm: @echo subsepnm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ subslash: @echo subslash @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ substr: @echo substr @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ swaplns: @echo swaplns @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ synerr1: @echo synerr1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ uninit2: @echo uninit2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ uninit3: @echo uninit3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ uninit4: @echo uninit4 @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ uninitialized: @echo uninitialized @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ unterm: @echo unterm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ zeroe0: @echo zeroe0 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ zeroflag: @echo zeroflag @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getlnhd: @echo getlnhd @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ asort: @echo asort @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ asorti: @echo asorti @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ backw: @echo backw @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ clos1way: @echo clos1way @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fieldwdth: @echo fieldwdth @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fsfwfs: @echo fsfwfs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gensub: @echo gensub @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gnuops2: @echo gnuops2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gnureops: @echo gnureops @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ icasefs: @echo icasefs @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ icasers: @echo icasers @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ igncdym: @echo igncdym @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ igncfs: @echo igncfs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ignrcase: @echo ignrcase @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ lint: @echo lint @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ match1: @echo match1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ match2: @echo match2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nondec: @echo nondec @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ posix: @echo posix @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ procinfs: @echo procinfs @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ printfbad1: @echo printfbad1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ regx8bit: @echo regx8bit @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rebuf: @echo rebuf @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ shadow: @echo shadow @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sort1: @echo sort1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ strtonum: @echo strtonum @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # end of file Maketests # Targets generated for other tests: $(srcdir)/Maketests: $(srcdir)/Makefile.am $(srcdir)/Gentests $(AWK) -f $(srcdir)/Gentests "$<" *.awk *.in > $(srcdir)/Maketests clean: rm -fr _* core core.* junk out1 out2 out3 strftime.ok test1 test2 seq *~ # An attempt to print something that can be grepped for in build logs pass-fail: @COUNT=`ls _* 2>/dev/null | wc -l` ; \ if test $$COUNT = 0 ; \ then echo ALL TESTS PASSED ; \ else echo $$COUNT TESTS FAILED ; \ fi # This target for my convenience to look at all the results diffout: for i in _* ; \ do \ echo ============== $$i ============= ; \ diff -c $(srcdir)/$${i#_}.ok $$i ; \ done | more # This target is for testing with electric fence. efence: for i in $$(ls _* | sed 's;_\(.*\);\1;') ; \ do \ bad=$$(wc -l < _$$i) \ ok=$$(wc -l < $$i.ok) ; \ if (( $$bad == $$ok + 2 )) ; \ then \ rm _$$i ; \ 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: EOF echo - 'po/ja.po' cat << 'EOF' > 'po/ja.po' # Japanese messages for gawk. # Copyright (C) 2003 Free Software Foundation, Inc. # This file is distributed under the same license as the gawk package. # Makoto Hosoya , 2003. # msgid "" msgstr "" "Project-Id-Version: gawk 3.1.2g\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" "POT-Creation-Date: 2004-07-15 13:02+0300\n" "PO-Revision-Date: 2003-08-26 03:06+0900\n" "Last-Translator: Makoto Hosoya \n" "Language-Team: Japanese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=EUC-JP\n" "Content-Transfer-Encoding: 8bit\n" #: array.c:112 #, fuzzy, c-format msgid "attempt to use function `%s' as an array" msgstr "¥¹¥«¥é¡¼ `%s' ¤òÇÛÎó¤È¤·¤Æ»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£" #: array.c:115 #, c-format msgid "attempt to use scalar parameter `%s' as an array" msgstr "¥¹¥«¥é¡¼¥Ñ¥é¥á¡¼¥¿ `%s' ¤òÇÛÎó¤È¤·¤Æ»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£" #: array.c:118 #, c-format msgid "attempt to use scalar `%s' as array" msgstr "¥¹¥«¥é¡¼ `%s' ¤òÇÛÎó¤È¤·¤Æ»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£" #: array.c:156 #, c-format msgid "from %s" msgstr "%s ¤«¤é" #: array.c:511 #, c-format msgid "reference to uninitialized element `%s[\"%s\"]'" msgstr "½é´ü²½¤µ¤ì¤Æ¤¤¤Ê¤¤Í×ÁÇ `%s[\"%s\"]' ¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£" #: array.c:517 #, c-format msgid "subscript of array `%s' is null string" msgstr "ÇÛÎó¤Îź»ú `%s' ¤¬¶õÎó¤Ç¤¹¡£" #: array.c:621 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: ÇÛÎó `%2$s' ¤Ë»Øɸ `%1$s' ¤Ï¤¢¤ê¤Þ¤»¤ó¡£" #: array.c:791 #, c-format msgid "%s: empty (null)\n" msgstr "%s: ¶õ (null)\n" #: array.c:796 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: ¶õ (zero)\n" #: array.c:800 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: ¥Æ¡¼¥Ö¥ë¥µ¥¤¥º (table_size) = %d, ÇÛÎó¥µ¥¤¥º (array_size) = %d\n" #: array.c:829 #, c-format msgid "%s: is parameter\n" msgstr "%s: ¤Ï¥Ñ¥é¥á¡¼¥¿¤Ç¤¹¡£\n" #: array.c:834 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: %s ¤Ø¤ÎÇÛÎó»²¾È (array_ref)\n" #: awkgram.y:208 #, c-format msgid "%s blocks must have an action part" msgstr "%s ¥Ö¥í¥Ã¥¯¤Ë¤Ï¥¢¥¯¥·¥ç¥óÉô¤¬É¬¿Ü¤Ç¤¹¡£" #: awkgram.y:211 msgid "each rule must have a pattern or an action part" msgstr "³Æ¥ë¡¼¥ë¤Ë¤Ï¥Ñ¥¿¡¼¥ó¤Þ¤¿¤Ï¥¢¥¯¥·¥ç¥óÉô¤¬É¬¿Ü¤Ç¤¹¡£" #: awkgram.y:267 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" msgstr "`%s' ¤ÏÁȹþ¤ß´Ø¿ô¤Ç¤¹¡£ºÆÄêµÁ¤Ç¤­¤Þ¤»¤ó¡£" #: awkgram.y:314 #, c-format msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "Àµµ¬É½¸½Äê¿ô `/%s/' ¤Ï C¥³¥á¥ó¥È¤Ë»÷¤Æ¤¤¤Þ¤¹¤¬¡¢°ã¤¤¤Þ¤¹¡£" #: awkgram.y:341 awkgram.y:619 msgid "statement may have no effect" msgstr "Ì¿Îáʸ¤Ë¤Ï¸ú²Ì¤¬Ìµ¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£" #: awkgram.y:436 awkgram.y:456 #, c-format msgid "`%s' used in %s action" msgstr "`%s' ¤¬ %s ¤Î¥¢¥¯¥·¥ç¥ó¤Ç»È¤ï¤ì¤Þ¤·¤¿¡£" #: awkgram.y:449 awkgram.y:452 msgid "`nextfile' is a gawk extension" msgstr "`nextfile' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£" #: awkgram.y:466 msgid "`return' used outside function context" msgstr "`return' ¤¬´Ø¿ôÄêµÁʸ¤Î³°¤Ç»È¤ï¤ì¤Þ¤·¤¿¡£" #: awkgram.y:508 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "BEGIN ¤Þ¤¿¤Ï END ¥ë¡¼¥ëÆâ¤Î°ú¿ô¤Î̵¤¤ `print' ¤Ï `print \"\"' ¤À¤È»×¤ï¤ì¤Þ" "¤¹¡£" #: awkgram.y:521 awkgram.y:528 msgid "`delete array' is a gawk extension" msgstr "`delete array' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£" #: awkgram.y:536 awkgram.y:543 msgid "`delete(array)' is a non-portable tawk extension" msgstr "`delete(array)' ¤Ï tawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£Â¾¤Î awk ¤Ç¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£" #: awkgram.y:587 #, c-format msgid "duplicate case values in switch body: %s" msgstr "switch ʸ¤ÎÃæ¤Ë½ÅÊ£¤·¤¿ case Ãͤ¬»ÈÍѤµ¤ì¤Æ¤¤¤Þ¤¹: %s" #: awkgram.y:597 msgid "Duplicate `default' detected in switch body" msgstr "switch ʸ¤ÎÃæ¤Ë `default' ¤¬½ÅÊ£¤·¤Æ¤¤¤Þ¤¹¡£" #: awkgram.y:686 msgid "multistage two-way pipelines don't work" msgstr "¿Ãʳ¬¤ÇÁÐÊý¸þ¥Ñ¥¤¥×¤òÍøÍѤ·¤¿¼°¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£" #: awkgram.y:777 msgid "regular expression on right of assignment" msgstr "Àµµ¬É½¸½¤¬ÂåÆþ¼°¤Î±¦Êդ˻ÈÍѤµ¤ì¤Æ¤¤¤Þ¤¹¡£" #: awkgram.y:800 msgid "regular expression on left of `~' or `!~' operator" msgstr "`~' ¤ä `!~' ±é»»»Ò¤Îº¸ÊÕ¤ËÀµµ¬É½¸½¤¬»ÈÍѤµ¤ì¤Æ¤¤¤Þ¤¹¡£" #: awkgram.y:808 msgid "regular expression on right of comparison" msgstr "Èæ³Ó¼°¤Î±¦ÊÕ¤ËÀµµ¬É½¸½¤¬»ÈÍѤµ¤ì¤Æ¤¤¤Þ¤¹¡£" #: awkgram.y:875 msgid "non-redirected `getline' undefined inside END action" msgstr "¥ê¥À¥¤¥ì¥¯¥È¤µ¤ì¤Æ¤¤¤Ê¤¤ `getline' ¤Ï END ¥¢¥¯¥·¥ç¥ó¤Ç¤Ï̤ÄêµÁ¤Ç¤¹¡£" #: awkgram.y:902 msgid "call of `length' without parentheses is not portable" msgstr "³ç¸Ì̵¤·¤Î `length' ¤Ï¾¤Î awk ¤Ç»ÈÍѤǤ­¤Þ¤»¤ó¡£" #: awkgram.y:905 msgid "call of `length' without parentheses is deprecated by POSIX" msgstr "POSIX ¤Ï³ç¸Ì̵¤·¤Ç¤Î `length' ¤Î»ÈÍѤò¿ä¾©¤·¤Þ¤»¤ó¡£" #: awkgram.y:958 msgid "use of non-array as array" msgstr "ÇÛÎó¤Ç¤Ê¤¤¤â¤Î¤òÇÛÎó¤È¤·¤Æ»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£" #: awkgram.y:960 msgid "invalid subscript expression" msgstr "ź»ú¼°¤¬ÉÔÀµ¤Ç¤¹¡£" #: awkgram.y:1158 msgid "unexpected newline or end of string" msgstr "ͽÁÛ³°¤Î²þ¹Ô¤Þ¤¿¤Ïʸ»úÎó¤Î½ªÃ¼¤¬¤¢¤ê¤Þ¤¹¡£" #: awkgram.y:1254 msgid "empty program text on command line" msgstr "¥³¥Þ¥ó¥É¹Ô¤Î¥×¥í¥°¥é¥àɽµ­¤¬¶õ¤Ç¤¹¡£" #: awkgram.y:1307 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "¥½¡¼¥¹¥Õ¥¡¥¤¥ë `%s' ¤òÆɤ߹þ¤à¤¿¤á¤Ë³«¤±¤Þ¤»¤ó (%s)¡£" #: awkgram.y:1384 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "¥½¡¼¥¹¥Õ¥¡¥¤¥ë `%s' ¤òÆɤ߹þ¤á¤Þ¤»¤ó (%s)¡£" #: awkgram.y:1392 #, c-format msgid "source file `%s' is empty" msgstr "¥½¡¼¥¹¥Õ¥¡¥¤¥ë `%s' ¤Ï¶õ¤Ç¤¹¡£" #: awkgram.y:1590 awkgram.y:1700 awkgram.y:1718 awkgram.y:2068 awkgram.y:2153 msgid "source file does not end in newline" msgstr "¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤¬²þ¹Ô¤Ç½ª¤Ã¤Æ¤¤¤Þ¤»¤ó¡£" #: awkgram.y:1654 msgid "unterminated regexp ends with `\\' at end of file" msgstr "½ªÃ¼¤µ¤ì¤Æ¤¤¤Ê¤¤Àµµ¬É½¸½¤¬¥Õ¥¡¥¤¥ëºÇ¸å¤Î `\\' ¤Ç½ª¤Ã¤Æ¤¤¤Þ¤¹¡£" #: awkgram.y:1674 msgid "unterminated regexp" msgstr "Àµµ¬É½¸½¤¬½ªÃ¼¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£" #: awkgram.y:1677 msgid "unterminated regexp at end of file" msgstr "¥Õ¥¡¥¤¥ë¤ÎÃæ¤ÇÀµµ¬É½¸½¤¬½ªÃ¼¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£" #: awkgram.y:1744 msgid "use of `\\ #...' line continuation is not portable" msgstr "`\\ #...' ·Á¼°¤Î¹Ô·Ñ³¤Ï¾¤Î awk ¤Ç»È¤¨¤Þ¤»¤ó¡£" #: awkgram.y:1756 msgid "backslash not last character on line" msgstr "¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¤¬¹ÔºÇ¸å¤Îʸ»ú¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤»¤ó¡£" #: awkgram.y:1801 msgid "POSIX does not allow operator `**='" msgstr "POSIX ¤Ï±é»»»Ò `**=' ¤òµö²Ä¤·¤Þ¤»¤ó¡£" #: awkgram.y:1803 msgid "old awk does not support operator `**='" msgstr "±é»»»Ò `**=' ¤Ï¸Å¤¤ awk ¤Ç»È¤¨¤Þ¤»¤ó¡£" #: awkgram.y:1812 msgid "POSIX does not allow operator `**'" msgstr "POSIX ¤Ç¤Ï±é»»»Ò `**' ¤òµö²Ä¤·¤Æ¤¤¤Þ¤»¤ó¡£" #: awkgram.y:1814 msgid "old awk does not support operator `**'" msgstr "±é»»»Ò `**' ¤Ï¸Å¤¤ awk ¤Ç»È¤¨¤Þ¤»¤ó¡£" #: awkgram.y:1845 msgid "operator `^=' is not supported in old awk" msgstr "±é»»»Ò `^=' ¤Ï¸Å¤¤ awk ¤Ç»È¤¨¤Þ¤»¤ó¡£" #: awkgram.y:1853 msgid "operator `^' is not supported in old awk" msgstr "±é»»»Ò `^' ¤Ï¸Å¤¤ awk ¤Ç»È¤¨¤Þ¤»¤ó¡£" #: awkgram.y:1937 awkgram.y:1954 msgid "unterminated string" msgstr "ʸ»úÎ󤬽ªÃ¼¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£" #: awkgram.y:2114 #, c-format msgid "invalid char '%c' in expression" msgstr "ɽ¸½¤Î char '%c' ¤ÏÉÔÀµ¤Ç¤¹¡£" #: awkgram.y:2162 #, c-format msgid "`%s' is a gawk extension" msgstr "`%s' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£" #: awkgram.y:2165 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "`%s' ¤Ï¥Ù¥ë¸¦µæ½ê¤Ë¤è¤ë³ÈÄ¥¤Ç¤¹¡£" #: awkgram.y:2168 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX ¤Ï `%s' ¤òµö²Ä¤·¤Þ¤»¤ó¡£" #: awkgram.y:2172 #, c-format msgid "`%s' is not supported in old awk" msgstr "`%s' ¤Ï¸Å¤¤ awk ¤Ç»ÈÍѤǤ­¤Þ¤»¤ó¡£" #: awkgram.y:2198 msgid "`goto' considered harmful!\n" msgstr "`goto' ¤ÏÍ­³²¤Ç¤¹!\n" #: awkgram.y:2260 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d ¤Ï %s ¤Ë»È¤¨¤ë°ú¿ô¤Î¿ô¤È¤·¤Æ¤ÏÉÔÀµ¤Ç¤¹¡£" #: awkgram.y:2279 awkgram.y:2282 msgid "match: third argument is a gawk extension" msgstr "match: Âè»°°ú¿ô¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£" #: awkgram.y:2295 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "%s: ʸ»úÎó¥ê¥Æ¥é¥ë¤òÃÖ¤­´¹¤¨ºÇ¸å¤Î°ú¿ô¤Ë»ÈÍѤ¹¤ë¤È¸ú²Ì¤¬¤¢¤ê¤Þ¤»¤ó¡£" #: awkgram.y:2298 #, c-format msgid "%s third parameter is not a changeable object" msgstr "%s Âè»°¥Ñ¥é¥á¡¼¥¿¤Ï²ÄÊÑ¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£" #: awkgram.y:2325 awkgram.y:2328 msgid "close: second argument is a gawk extension" msgstr "close: ÂèÆó°ú¿ô¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£" #: awkgram.y:2338 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "dcgettext(_\"...\")¤Î»È¤¤Êý¤¬´Ö°ã¤Ã¤Æ¤¤¤Þ¤¹: ºÇ½é¤Î¥¢¥ó¥À¡¼¥¹¥³¥¢¤òºï½ü¤·¤Æ¤¯" "¤À¤µ¤¤¡£" #: awkgram.y:2353 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "dcngettext(_\"...\")¤Î»È¤¤Êý¤¬´Ö°ã¤Ã¤Æ¤¤¤Þ¤¹: ºÇ½é¤Î¥¢¥ó¥À¡¼¥¹¥³¥¢¤òºï½ü¤·¤Æ" "¤¯¤À¤µ¤¤¡£" #: awkgram.y:2424 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "´Ø¿ô `%s': ¥Ñ¥é¥á¡¼¥¿ #%d, `%s' ¤¬¥Ñ¥é¥á¡¼¥¿ #%d ¤È½ÅÊ£¤·¤Æ¤¤¤Þ¤¹¡£" #: awkgram.y:2457 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "´Ø¿ô `%s': ¥Ñ¥é¥á¡¼¥¿ `%s' ¤¬Âç°èÊÑ¿ô¤òʤ¤¤±£¤·¤Æ¤¤¤Þ¤¹¡£" #: awkgram.y:2569 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "`%s' ¤ò½ñ¹þ¤ßÍѤ˳«¤±¤Þ¤»¤ó¤Ç¤·¤¿ (%s)¡£" #: awkgram.y:2570 profile.c:93 msgid "sending profile to standard error" msgstr "¥×¥í¥Õ¥¡¥¤¥ë¤òɸ½à¥¨¥é¡¼¤ËÁ÷¤Ã¤Æ¤¤¤Þ¤¹¡£" #: awkgram.y:2602 #, c-format msgid "%s: close failed (%s)" msgstr "%s: ÊĤ¸¤ë¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó (%s)¡£" #: awkgram.y:2723 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() ¤òÆó²ó¸Æ¤Ó½Ð¤·¤Æ¤¤¤Þ¤¹!" #: awkgram.y:2750 msgid "there were shadowed variables." msgstr "ʤ¤¤±£¤µ¤ì¤¿ÊÑ¿ô¤¬¤¢¤ê¤Þ¤·¤¿¡£" #: awkgram.y:2823 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "´Ø¿ô `%s': ´Ø¿ô̾¤Ï¥Ñ¥é¥á¡¼¥¿Ì¾¤Ë»ÈÍѤǤ­¤Þ¤»¤ó¡£" #: awkgram.y:2833 #, c-format msgid "function name `%s' previously defined" msgstr "´Ø¿ô̾ `%s' ¤ÏÄêµÁºÑ¤ß¤Ç¤¹¡£" #: awkgram.y:2984 awkgram.y:2990 #, c-format msgid "function `%s' called but never defined" msgstr "̤ÄêµÁ¤Î´Ø¿ô `%s' ¤ò¸Æ¤Ó½Ð¤·¤Þ¤·¤¿¡£" #: awkgram.y:2993 #, c-format msgid "function `%s' defined but never called" msgstr "ÄêµÁ¤µ¤ì¤¿´Ø¿ô `%s' ¤Ï°ìÅÙ¤â¸Æ¤Ó½Ð¤µ¤ì¤Þ¤»¤ó¤Ç¤·¤¿¡£" #: awkgram.y:3020 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "¥Ñ¥é¥á¡¼¥¿ #%d ¤ÎÀµµ¬É½¸½Äê¿ô¤Ï¥Ö¡¼¥ëÃͤò½ÐÎϤ·¤Þ¤¹¡£" #: awkgram.y:3033 #, fuzzy, c-format msgid "" "function `%s' called with space between name and `(',\n" "or used as a variable or an array" msgstr "" "´Ø¿ô̾¤È `(' ¤Î´Ö¤Ë¥¹¥Ú¡¼¥¹¤òÆþ¤ì¤Æ´Ø¿ô `%s' ¤ò¸Æ¤Ó½Ð¤·¤Æ¤¤¤Þ¤¹¡£\n" "%s" #: builtin.c:149 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s ¤«¤é \"%s\" ¤Ø½ÐÎϤǤ­¤Þ¤»¤ó (%s)¡£" #: builtin.c:150 msgid "standard output" msgstr "ɸ½à½ÐÎÏ" #: builtin.c:151 msgid "reason unknown" msgstr "¸¶°øÉÔÌÀ" #: builtin.c:164 msgid "exp: received non-numeric argument" msgstr "exp: °ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:170 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: °ú¿ô %g ¤¬µöÍÆÈϰϤòĶ¤¨¤Æ¤¤¤Þ¤¹¡£" #: builtin.c:228 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "fflush: ¥Õ¥é¥Ã¥·¥åÉÔ²Ä: ¥Ñ¥¤¥× `%s' ¤ÏÆɤ߹þ¤ßÀìÍѤǤ¹¡£" #: builtin.c:231 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "fflush: ¥Õ¥é¥Ã¥·¥åÉÔ²Ä: ¥Õ¥¡¥¤¥ë `%s' ¤ÏÆɤ߹þ¤ßÀìÍѤǤ¹¡£" #: builtin.c:243 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "" "fflush: `%s' ¤Ï¥Õ¥¡¥¤¥ë¤«¡¢¥Ñ¥¤¥×¤«¡¢ÊÂ¹Ô¥×¥í¥»¥¹¤Ç¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£" #: builtin.c:338 msgid "index: received non-string first argument" msgstr "index: Âè°ì°ú¿ô¤¬Ê¸»úÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:340 msgid "index: received non-string second argument" msgstr "index: ÂèÆó°ú¿ô¤¬Ê¸»úÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:454 msgid "int: received non-numeric argument" msgstr "int: °ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:471 msgid "length: received non-string argument" msgstr "length: °ú¿ô¤¬Ê¸»úÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:487 msgid "log: received non-numeric argument" msgstr "log: °ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:490 #, c-format msgid "log: received negative argument %g" msgstr "log: °ú¿ô %g ¤¬Éé¤ÎÃͤǤ¹¡£" #: builtin.c:654 builtin.c:657 msgid "must use `count$' on all formats or none" msgstr "" "`count$¡Ç¤ÏÁ´¤Æ¤Î½ñ¼°»ØÄê¤ËŬÍѤ¹¤ë¡¢¤Þ¤¿¤ÏÁ´¤Æ¤ËŬÍѤ·¤Ê¤¤¤Î¤É¤Á¤é¤«¤Ç¤·¤«»È" "¤¨¤Þ¤»¤ó¡£" #: builtin.c:759 msgid "`$' is not permitted in awk formats" msgstr "`$' ¤Ï awk ¤Ç¤Ï»È¤¨¤Þ¤»¤ó¡£" #: builtin.c:765 msgid "arg count with `$' must be > 0" msgstr "½ç½ø»ØÄê¤Î `$' ¤Ë»È¤¨¤ë¿ô»ú¤ÏÀµ¤ÎÃͤǤ¹¡£" #: builtin.c:767 #, c-format msgid "arg count %ld greater than total number of supplied arguments" msgstr "½ç½ø»ØÄê %ld ¤¬Í¿¤¨¤é¤ì¤Æ¤¤¤ë°ú¿ô¤Î¿ô¤òĶ¤¨¤Æ¤¤¤Þ¤¹¡£" #: builtin.c:769 msgid "`$' not permitted after period in format" msgstr "`$' ¤Ï½ñ¼°»ØÄê¤Î¥Ô¥ê¥ª¥É `.' ¤Î¸å¤Ë»ÈÍѤǤ­¤Þ¤»¤ó¡£" #: builtin.c:782 msgid "no `$' supplied for positional field width or precision" msgstr "¥Õ¥£¡¼¥ë¥ÉÉý¡¢¤Þ¤¿¤ÏÀºÅ٤λØÄê»Ò¤Ë `$' ¤¬Í¿¤¨¤é¤ì¤Æ¤¤¤Þ¤»¤ó¡£" #: builtin.c:848 msgid "`l' is meaningless in awk formats; ignored" msgstr "awk ¤Î½ñ¼°»ØÄê¤Ç¤Ï `l' ¤Ï̵°ÕÌ£¤Ç¤¹¡£Ìµ»ë¤·¤Þ¤¹¡£" #: builtin.c:852 msgid "`l' is not permitted in POSIX awk formats" msgstr "POSIX ½àµò¤Î awk ¤Ç¤Ï `l' ¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£" #: builtin.c:863 msgid "`L' is meaningless in awk formats; ignored" msgstr "awk ¤Î½ñ¼°»ØÄê¤Ç¤Ï `L' ¤Ï̵°ÕÌ£¤Ç¤¹¡£Ìµ»ë¤·¤Þ¤¹¡£" #: builtin.c:867 msgid "`L' is not permitted in POSIX awk formats" msgstr "POSIX ½àµò¤Î awk ¤Ç¤Ï `L' ¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£" #: builtin.c:878 msgid "`h' is meaningless in awk formats; ignored" msgstr "awk ¤Î½ñ¼°»ØÄê¤Ç¤Ï `h' ¤Ï̵°ÕÌ£¤Ç¤¹¡£Ìµ»ë¤·¤Þ¤¹¡£" #: builtin.c:882 msgid "`h' is not permitted in POSIX awk formats" msgstr "POSIX ½àµò¤Î awk ¤Ç¤Ï `h' ¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£" #: builtin.c:1111 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" msgstr "[s]printf: %g ¤ÎÃͤ¬½ñ¼° `%%%c' ¤ÎµöÍÆÈϰϤòĶ¤¨¤Æ¤¤¤Þ¤¹¡£" #: builtin.c:1171 msgid "not enough arguments to satisfy format string" msgstr "½ñ¼°»ØÄꤹ¤ë¤¿¤á¤Î°ú¿ô¤¬Â­¤ê¤Þ¤»¤ó¡£" #: builtin.c:1173 msgid "^ ran out for this one" msgstr "^ ¤³¤³¤«¤é­¤ê¤Þ¤»¤ó" #: builtin.c:1178 msgid "[s]printf: format specifier does not have control letter" msgstr "[s]printf: ½ñ¼°»ØÄê»Ò¤ËÀ©¸æʸ»ú¤¬¤¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:1181 msgid "too many arguments supplied for format string" msgstr "½ñ¼°»ØÄêʸ»úÎó¤Î°ú¿ô¤¬Â¿²á¤®¤Þ¤¹¡£" #: builtin.c:1247 builtin.c:1250 msgid "printf: no arguments" msgstr "printf: °ú¿ô¤¬¤¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:1274 msgid "sqrt: received non-numeric argument" msgstr "sqrt: °ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:1278 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: °ú¿ô¤ËÉé¤ÎÃÍ %g ¤ò»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£" #: builtin.c:1301 #, c-format msgid "substr: start index %g is invalid, using 1" msgstr "substr: µ¯ÅÀ»Øɸ %g ¤¬ÉÔÀµ¤Ç¤¹¡££±¤ò»È¤¤¤Þ¤¹¡£" #: builtin.c:1306 #, c-format msgid "substr: non-integer start index %g will be truncated" msgstr "substr: µ¯ÅÀ»Øɸ %g ¤Î¾®¿ôÅÀ°Ê²¼¤ÏÀÚ¤ê¼Î¤Æ¤Þ¤¹¡£" #: builtin.c:1325 #, fuzzy, c-format msgid "substr: length %g is not >= 1" msgstr "substr: ʸ»ú¿ô %g ¤¬ <= 0 ¤Ç¤¹¡£" #: builtin.c:1327 #, fuzzy, c-format msgid "substr: length %g is not >= 0" msgstr "substr: ʸ»ú¿ô %g ¤¬ <= 0 ¤Ç¤¹¡£" #: builtin.c:1334 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: ʸ»ú¿ô %g ¤Î¾®¿ôÅÀ°Ê²¼¤ÏÀÚ¤ê¼Î¤Æ¤Þ¤¹¡£" #: builtin.c:1339 #, c-format msgid "substr: length %g too big for string indexing, truncating to %g" msgstr "substr: ʸ»ú¿ô %g ¤ÏºÇÂçÃͤòĶ¤¨¤Æ¤¤¤Þ¤¹¡£%g ¤ò»È¤¤¤Þ¤¹¡£" #: builtin.c:1351 msgid "substr: source string is zero length" msgstr "substr: ʸ»úÎó¤ÎŤµ¤¬¥¼¥í¤Ç¤¹¡£" #: builtin.c:1357 #, c-format msgid "substr: start index %g is past end of string" msgstr "substr: µ¯ÅÀ»Øɸ %g ¤¬Ê¸»úÎó¤ÎŤµ¤òĶ¤¨¤Æ¤¤¤Þ¤¹¡£" #: builtin.c:1365 #, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" msgstr "" "substr: µ¯ÅÀ»Øɸ %2$g ¤«¤é¤Îʸ»ú¿ô %1$g ¤Ïʸ»úÎó¤ÎŤµ %3$lu ¤òĶ¤¨¤Æ¤¤¤Þ¤¹¡£" #: builtin.c:1400 msgid "strftime: received non-string first argument" msgstr "strftime: Âè°ì°ú¿ô¤¬Ê¸»úÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:1406 msgid "strftime: received empty format string" msgstr "strftime: ½ñ¼°»ØÄêʸ»úÎ󤬶õ¤Ç¤¹¡£" #: builtin.c:1415 msgid "strftime: received non-numeric second argument" msgstr "strftime: ÂèÆó°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:1478 msgid "mktime: received non-string argument" msgstr "mktime: °ú¿ô¤¬Ê¸»úÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:1523 msgid "system: received non-string argument" msgstr "system: °ú¿ô¤¬Ê¸»úÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:1644 eval.c:2019 #, c-format msgid "reference to uninitialized field `$%d'" msgstr "½é´ü²½¤µ¤ì¤Æ¤¤¤Ê¤¤¥Õ¥£¡¼¥ë¥É `$%d' ¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£" #: builtin.c:1671 msgid "tolower: received non-string argument" msgstr "tolower: °ú¿ô¤¬Ê¸»úÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:1720 msgid "toupper: received non-string argument" msgstr "toupper: °ú¿ô¤¬Ê¸»úÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:1765 msgid "atan2: received non-numeric first argument" msgstr "atan2: Âè°ì°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:1767 msgid "atan2: received non-numeric second argument" msgstr "atan2: ÂèÆó°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:1786 msgid "sin: received non-numeric argument" msgstr "sin: °ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:1802 msgid "cos: received non-numeric argument" msgstr "cos: °ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:1852 msgid "srand: received non-numeric argument" msgstr "srand: °ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:1887 msgid "match: third argument is not an array" msgstr "match: Âè»°°ú¿ô¤¬ÇÛÎó̾¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:2414 #, fuzzy msgid "gensub: third argument of 0 treated as 1" msgstr "gensub: Âè»°°ú¿ô¤¬ 0 ¤Ç¤¹¡£1 ¤òÂå¤ï¤ê¤Ë»ÈÍѤ·¤Þ¤¹¡£" #: builtin.c:2572 msgid "lshift: received non-numeric first argument" msgstr "lshift: Âè°ì°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:2574 #, fuzzy msgid "lshift: received non-numeric second argument" msgstr "strftime: ÂèÆó°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:2580 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "lshift(%lf, %lf): Éé¤Î¿ôÃͤò»ÈÍѤ¹¤ë¤È°Û¾ï¤Ê·ë²Ì¤Ë¤Ê¤ê¤Þ¤¹¡£" #: builtin.c:2582 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): ¾®¿ôÅÀ°Ê²¼¤ÏÀÚ¤ê¼Î¤Æ¤Ë¤Ê¤ê¤Þ¤¹¡£" #: builtin.c:2584 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "lshift(%lf, %lf): ¥·¥Õ¥ÈÃͤ¬Â礭²á¤®¤ë¤È°Û¾ï¤Ê·ë²Ì¤Ë¤Ê¤ê¤Þ¤¹¡£" #: builtin.c:2610 msgid "rshift: received non-numeric first argument" msgstr "rshift: Âè°ì°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:2612 #, fuzzy msgid "rshift: received non-numeric second argument" msgstr "strftime: ÂèÆó°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:2618 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "rshift(%lf, %lf): Éé¤Î¿ôÃͤò»ÈÍѤ¹¤ë¤È°Û¾ï¤Ê·ë²Ì¤Ë¤Ê¤ê¤Þ¤¹¡£" #: builtin.c:2620 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): ¾®¿ôÅÀ°Ê²¼¤ÏÀÚ¤ê¼Î¤Æ¤Ë¤Ê¤ê¤Þ¤¹¡£" #: builtin.c:2622 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "rshift(%lf, %lf): ¥·¥Õ¥ÈÃͤ¬Â礭²á¤®¤ë¤È°Û¾ï¤Ê·ë²Ì¤Ë¤Ê¤ê¤Þ¤¹¡£" #: builtin.c:2648 msgid "and: received non-numeric first argument" msgstr "and: Âè°ì°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:2650 #, fuzzy msgid "and: received non-numeric second argument" msgstr "atan2: ÂèÆó°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:2656 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "and(%lf, %lf): Éé¤Î¿ôÃͤò»ÈÍѤ¹¤ë¤È°Û¾ï¤Ê·ë²Ì¤Ë¤Ê¤ê¤Þ¤¹¡£" #: builtin.c:2658 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): ¾®¿ôÅÀ°Ê²¼¤ÏÀÚ¤ê¼Î¤Æ¤Ë¤Ê¤ê¤Þ¤¹¡£" #: builtin.c:2684 msgid "or: received non-numeric first argument" msgstr "or: Âè°ì°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:2686 #, fuzzy msgid "or: received non-numeric second argument" msgstr "atan2: ÂèÆó°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:2692 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "or(%lf, %lf): Éé¤Î¿ôÃͤò»ÈÍѤ¹¤ë¤È°Û¾ï¤Ê·ë²Ì¤Ë¤Ê¤ê¤Þ¤¹¡£" #: builtin.c:2694 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): ¾®¿ôÅÀ°Ê²¼¤ÏÀÚ¤ê¼Î¤Æ¤Ë¤Ê¤ê¤Þ¤¹¡£" #: builtin.c:2720 msgid "xor: received non-numeric first argument" msgstr "xor: Âè°ì°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:2722 #, fuzzy msgid "xor: received non-numeric second argument" msgstr "atan2: ÂèÆó°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:2728 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "xor(%lf, %lf): Éé¤Î¿ôÃͤò»ÈÍѤ¹¤ë¤È°Û¾ï¤Ê·ë²Ì¤Ë¤Ê¤ê¤Þ¤¹¡£" #: builtin.c:2730 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): ¾®¿ôÅÀ°Ê²¼¤ÏÀÚ¤ê¼Î¤Æ¤Ë¤Ê¤ê¤Þ¤¹¡£" #: builtin.c:2754 msgid "compl: received non-numeric argument" msgstr "compl: °ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" #: builtin.c:2760 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): Éé¤Î¿ôÃͤò»ÈÍѤ¹¤ë¤È°Û¾ï¤Ê·ë²Ì¤Ë¤Ê¤ê¤Þ¤¹¡£" #: builtin.c:2762 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): ¾®¿ôÅÀ°Ê²¼¤ÏÀÚ¤ê¼Î¤Æ¤Ë¤Ê¤ê¤Þ¤¹¡£" #: builtin.c:2935 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: `%s' ¤ÏÉÔÀµ¤Ê¥í¥«¡¼¥ë¡¦¥«¥Æ¥´¥ê¡¼¤Ç¤¹¡£" #: eval.c:303 #, c-format msgid "unknown nodetype %d" msgstr "¥Î¡¼¥É %d ¤Î¼ïÎबÉÔÌÀ¤Ç¤¹¡£" #: eval.c:350 msgid "buffer overflow in genflags2str" msgstr "genflags2str ¤¬¥Ð¥Ã¥Õ¥¡ÍÆÎ̤òĶ²á¤·¤Þ¤·¤¿¡£" #: eval.c:382 eval.c:388 profile.c:837 #, c-format msgid "attempt to use array `%s' in a scalar context" msgstr "¥¹¥«¥é¡¼´Ä¶­¤ËÇÛÎó `%s' ¤ò»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£" #: eval.c:730 #, c-format msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" "for ¥ë¡¼¥×: ¥ë¡¼¥×Ãæ¤ËÇÛÎó `%s' ¤Î¥µ¥¤¥º¤¬ %ld ¤«¤é %ld ¤ËÊѤï¤ê¤Þ¤·¤¿¡£" #: eval.c:751 msgid "`break' outside a loop is not portable" msgstr "¥ë¡¼¥×¤Î³°¤Ç»ÈÍѤ¹¤ë `break' ¤Ï¾¤Î awk ¤Ç»ÈÍѤǤ­¤Þ¤»¤ó¡£" #: eval.c:755 msgid "`break' outside a loop is not allowed" msgstr "¥ë¡¼¥×¤Î³°¤Ç¤Ï `break' ¤ò»ÈÍѤǤ­¤Þ¤»¤ó¡£" #: eval.c:772 msgid "`continue' outside a loop is not portable" msgstr "¥ë¡¼¥×¤Î³°¤Ç»ÈÍѤ¹¤ë `continue' ¤Ï¾¤Î awk ¤Ç»ÈÍѤǤ­¤Þ¤»¤ó¡£" #: eval.c:776 msgid "`continue' outside a loop is not allowed" msgstr "¥ë¡¼¥×¤Î³°¤Ç¤Ï `continue' ¤ò»ÈÍѤǤ­¤Þ¤»¤ó¡£" #: eval.c:810 msgid "`next' cannot be called from a BEGIN rule" msgstr "BEGIN ¥ë¡¼¥ë¤«¤é¤Ï `next' ¤ò¸Æ¤Ó½Ð¤»¤Þ¤»¤ó¡£" #: eval.c:812 msgid "`next' cannot be called from an END rule" msgstr "END ¥ë¡¼¥ë¤«¤é¤Ï `next' ¤ò¸Æ¤Ó½Ð¤»¤Þ¤»¤ó¡£" #: eval.c:821 msgid "`nextfile' cannot be called from a BEGIN rule" msgstr "BEGIN ¥ë¡¼¥ë¤«¤é¤Ï `nextfile' ¤ò¸Æ¤Ó½Ð¤»¤Þ¤»¤ó¡£" #: eval.c:823 msgid "`nextfile' cannot be called from an END rule" msgstr "END ¥ë¡¼¥ë¤«¤é¤Ï `nextfile' ¤ò¸Æ¤Ó½Ð¤»¤Þ¤»¤ó¡£" #: eval.c:872 msgid "statement has no effect" msgstr "Ì¿Îáʸ¤Ë¸ú²Ì¤Ï¤¢¤ê¤Þ¤»¤ó¡£" #: eval.c:915 eval.c:1873 #, c-format msgid "can't use function name `%s' as variable or array" msgstr "´Ø¿ô̾ `%s' ¤ÏÊÑ¿ô¤äÇÛÎó¤Ë¤Ï»È¤¨¤Þ¤»¤ó¡£" #: eval.c:922 eval.c:928 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "½é´ü²½¤µ¤ì¤Æ¤¤¤Ê¤¤°ú¿ô `%s' ¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£" #: eval.c:937 eval.c:1882 #, c-format msgid "reference to uninitialized variable `%s'" msgstr "½é´ü²½¤µ¤ì¤Æ¤¤¤Ê¤¤ÊÑ¿ô `%s' ¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£" #: eval.c:1083 msgid "" "concatenation: side effects in one expression have changed the length of " "another!" msgstr "" "concatenation¡Êʸ»úÎóÏ¢·ë¡Ë: °ìÊý¤Î¼°¤ÎÉûºîÍѤǡ¢¤â¤¦°ìÊý¤ÎŤµ¤¬ÊѤï¤ê¤Þ¤·" "¤¿!" #: eval.c:1162 msgid "assignment used in conditional context" msgstr "¾ò·ïʸÃæ¤Ç¤ÎÂåÆþ" #: eval.c:1252 msgid "division by zero attempted" msgstr "¥¼¥í¤Ç¤Î½ü»»¤ò¹Ô¤¤¤Þ¤·¤¿¡£" #: eval.c:1267 #, c-format msgid "division by zero attempted in `%%'" msgstr "`%%' ¤Ç¥¼¥í¤Ç¤Î½ü»»¤ò¹Ô¤¤¤Þ¤·¤¿¡£" #: eval.c:1282 profile.c:713 #, c-format msgid "illegal type (%s) in tree_eval" msgstr "tree_eval ¤ÎÃæ¤ËÉÔÀµ¤Ê¥¿¥¤¥× (%s) ¤¬»ÈÍѤµ¤ì¤Æ¤¤¤Þ¤¹¡£" #: eval.c:1459 msgid "division by zero attempted in `/='" msgstr "`/=' ¤Ç¥¼¥í¤Ç¤Î½ü»»¤ò¹Ô¤¤¤Þ¤·¤¿¡£" #: eval.c:1477 #, c-format msgid "division by zero attempted in `%%='" msgstr "`%%=' ¤Ç¥¼¥í¤Ç¤Î½ü»»¤ò¹Ô¤¤¤Þ¤·¤¿¡£" #: eval.c:1738 #, c-format msgid "function `%s' called with more arguments than declared" msgstr "Àë¸À¤µ¤ì¤Æ¤¤¤ë¿ô¤è¤ê¿¤¤°ú¿ô¤ò»È¤Ã¤Æ´Ø¿ô `%s' ¤ò¸Æ¤Ó½Ð¤·¤Þ¤·¤¿¡£" #: eval.c:1782 #, c-format msgid "function `%s' not defined" msgstr "´Ø¿ô `%s' ¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£" #: eval.c:1788 #, c-format msgid "function %s called\n" msgstr "´Ø¿ô `%s' ¤ò¸Æ¤Ó½Ð¤·¤Þ¤·¤¿¡£\n" #: eval.c:1845 #, c-format msgid "" "\n" "\t# Function Call Stack:\n" "\n" msgstr "" "\n" "\t# ¸Æ½Ð´Ø¿ô¥¹¥¿¥Ã¥¯:\n" "\n" #: eval.c:1848 #, c-format msgid "\t# -- main --\n" msgstr "\t# -- ¥á¥¤¥ó --\n" #: eval.c:2003 msgid "attempt to field reference from non-numeric value" msgstr "¿ôÃͰʳ°¤ÎÃͤò»È¤Ã¤Æ¥Õ¥¤¡¼¥ë¥É¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£" #: eval.c:2005 msgid "attempt to reference from null string" msgstr "¶õÎó¤ò»È¤Ã¤Æ»²¾È¤·¤Æ¤¤¤Þ¤¹¡£" #: eval.c:2011 #, c-format msgid "attempt to access field %d" msgstr "¥Õ¥£¡¼¥ë¥É %d ¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£" #: eval.c:2032 eval.c:2039 profile.c:934 msgid "assignment is not allowed to result of builtin function" msgstr "Áȹþ´Ø¿ô¤ÎÌá¤êÃͤËÂåÆþ¤Ï¤Ç¤­¤Þ¤»¤ó¡£" #: eval.c:2103 msgid "`IGNORECASE' is a gawk extension" msgstr "`IGNORECASE' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£" #: eval.c:2133 msgid "`BINMODE' is a gawk extension" msgstr "`BINMODE' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£" #: eval.c:2255 #, c-format msgid "bad `%sFMT' specification `%s'" msgstr "`%sFMT' ¤Î»ØÄê `%s' ¤¬´Ö°ã¤Ã¤Æ¤¤¤Þ¤¹¡£" #: eval.c:2333 msgid "turning off `--lint' due to assignment to `LINT'" msgstr "`LINT' ¤Ø¤ÎÂåÆþ¤Ë½¾¤¤ `--lint' ¤ò̵¸ú¤Ë¤·¤Þ¤¹¡£" #: ext.c:60 ext.c:64 msgid "`extension' is a gawk extension" msgstr "`extension' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£" #: ext.c:74 #, c-format msgid "extension: cannot open `%s' (%s)\n" msgstr "extension: `%s' ¤ò³«¤±¤Þ¤»¤ó (%s)¡£\n" #: ext.c:82 #, c-format msgid "extension: library `%s': cannot call function `%s' (%s)\n" msgstr "extension: ¥é¥¤¥Ö¥é¥ê `%s': ´Ø¿ô `%s' ¤ò¸Æ¤Ó½Ð¤»¤Þ¤»¤ó (%s)¡£\n" #: ext.c:102 msgid "extension: missing function name" msgstr "" #: ext.c:107 #, fuzzy, c-format msgid "extension: illegal character `%c' in function name `%s'" msgstr "extension: ¥é¥¤¥Ö¥é¥ê `%s': ´Ø¿ô `%s' ¤ò¸Æ¤Ó½Ð¤»¤Þ¤»¤ó (%s)¡£\n" #: ext.c:113 #, fuzzy, c-format msgid "extension: can't redefine function `%s'" msgstr "extension: `%s' ¤ò³«¤±¤Þ¤»¤ó (%s)¡£\n" #: ext.c:117 #, fuzzy, c-format msgid "extension: function `%s' already defined" msgstr "´Ø¿ô `%s' ¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£" #: ext.c:122 #, c-format msgid "extension: can't use gawk built-in `%s' as function name" msgstr "" #: ext.c:124 #, fuzzy, c-format msgid "extension: function name `%s' previously defined" msgstr "´Ø¿ô̾ `%s' ¤ÏÄêµÁºÑ¤ß¤Ç¤¹¡£" #: ext.c:201 #, c-format msgid "function `%s' defined to take no more than `%d' argument(s)" msgstr "" #: ext.c:204 #, fuzzy, c-format msgid "function `%s': missing argument #%d" msgstr "´Ø¿ô `%s' ¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£" #: ext.c:214 #, fuzzy, c-format msgid "function `%s': argument #%d: attempt to use scalar as an array" msgstr "¥¹¥«¥é¡¼ `%s' ¤òÇÛÎó¤È¤·¤Æ»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£" #: ext.c:218 #, c-format msgid "function `%s': argument #%d: attempt to use array as a scalar" msgstr "" #: ext.c:243 msgid "Operation Not Supported" msgstr "¤³¤ÎÁàºî¤Ï¼ÂÁõ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£" #: field.c:315 msgid "NF set to negative value" msgstr "NF ¤¬Éé¤ÎÃͤǤ¹¡£" #: field.c:808 msgid "split: second argument is not an array" msgstr "split: ÂèÆó°ú¿ô¤¬ÇÛÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£" #: field.c:842 msgid "split: null string for third arg is a gawk extension" msgstr "split: Âè»°°ú¿ô¤Ë¶õÎó¤ò»ÈÍѤ¹¤ë¤Î¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£" #: field.c:894 msgid "`FIELDWIDTHS' is a gawk extension" msgstr "`FIELDWIDTHS' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£" #: field.c:921 #, c-format msgid "field %d in FIELDWIDTHS, must be > 0" msgstr "FIELDWIDTHS ¤Î Âè %d ¥Õ¥£¡¼¥ë¥É¤ÏÀµ¤ÎÃͤǤʤ±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£" #: field.c:994 msgid "null string for `FS' is a gawk extension" msgstr "`FS' ¤Ë¶õÎó¤ò»ÈÍѤ¹¤ë¤Î¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£" #: getopt.c:692 getopt.c:711 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s: ¥ª¥×¥·¥ç¥ó `%s' ¤ÏÛ£Ëæ¤Ç¤¹¡£\n" #: getopt.c:744 getopt.c:748 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "%s: ¥ª¥×¥·¥ç¥ó `--%s' ¤Ë°ú¿ô¤Ï¤¢¤ê¤Þ¤»¤ó¡£\n" #: getopt.c:757 getopt.c:762 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "%s: ¥ª¥×¥·¥ç¥ó `%c%s' ¤Ë°ú¿ô¤Ï¤¢¤ê¤Þ¤»¤ó¡£\n" #: getopt.c:807 getopt.c:829 getopt.c:1159 getopt.c:1181 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "%s: ¥ª¥×¥·¥ç¥ó `%s' ¤Ë¤Ï°ú¿ô¤¬É¬ÍפǤ¹¡£\n" #: getopt.c:867 getopt.c:870 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s: ǧ¼±¤Ç¤­¤Ê¤¤¥ª¥×¥·¥ç¥ó `--%s'\n" #: getopt.c:878 getopt.c:881 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s: ǧ¼±¤Ç¤­¤Ê¤¤¥ª¥×¥·¥ç¥ó `%c%s'\n" #: getopt.c:936 getopt.c:939 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: ÉÔÀµ¤Ê¥ª¥×¥·¥ç¥ó -- %c\n" #: getopt.c:945 getopt.c:948 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s: ̵¸ú¤Ê¥ª¥×¥·¥ç¥ó -- %c\n" #: getopt.c:1003 getopt.c:1022 getopt.c:1234 getopt.c:1255 main.c:433 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: °ú¿ô¤¬É¬Íפʥª¥×¥·¥ç¥ó -- %c\n" #: getopt.c:1074 getopt.c:1093 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s: ¥ª¥×¥·¥ç¥ó `-W %s' ¤ÏÛ£Ëæ¤Ç¤¹¡£\n" #: getopt.c:1117 getopt.c:1138 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: ¥ª¥×¥·¥ç¥ó `-W %s' ¤Ë°ú¿ô¤Ï¤¢¤ê¤Þ¤»¤ó¡£\n" #: io.c:308 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "¥Õ¥¡¥¤¥ë `%s' ¤òÆɤ߹þ¤à¤¿¤á¤Ë³«¤±¤Þ¤»¤ó (%s)¡£" #: io.c:395 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "fd %d (`%s') ¤òÊĤ¸¤ë¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó (%s)¡£" #: io.c:533 #, c-format msgid "invalid tree type %s in redirect()" msgstr "redirect() ¤ÎÃæ¤ÇÉÔÀµ¤Ê¥Ä¥ê¡¼¥¿¥¤¥× %s ¤ò»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£" #: io.c:539 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "`%s' ¥ê¥À¥¤¥ì¥¯¥È¤ÎÌ¿Îá¼°¤Ë¿ôÃͤ·¤«µ­½Ò¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£" #: io.c:545 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "`%s' ¥ê¥À¥¤¥ì¥¯¥È¤ÎÌ¿Îá¼°¤¬¶õÎó¤Ç¤¹¡£" #: io.c:550 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "`%2$s' ¥ê¥À¥¤¥ì¥¯¥È¤ËÏÀÍý±é»»¤Î·ë²Ì¤È»×¤ï¤ì¤ë¥Õ¥¡¥¤¥ë̾ `%1$s' ¤¬»È¤ï¤ì¤Æ¤¤¤Þ" "¤¹¡£" #: io.c:588 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "¥Õ¥¡¥¤¥ë `%.*s' ¤ÇɬÍװʾå¤Ë `>' ¤È `>>' ¤òÁȹ礻¤Æ¤¤¤Þ¤¹¡£" #: io.c:640 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "½ÐÎÏÍѤ˥ѥ¤¥× `%s' ¤ò³«¤±¤Þ¤»¤ó (%s)¡£" #: io.c:649 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "ÆþÎÏÍѤ˥ѥ¤¥× `%s' ¤ò³«¤±¤Þ¤»¤ó (%s)¡£" #: io.c:662 #, c-format msgid "can't open two way socket `%s' for input/output (%s)" msgstr "Æþ½ÐÎÏÍѤÎÁÐÊý¸þ¥½¥±¥Ã¥È `%s' ¤¬³«¤±¤Þ¤»¤ó (%s)¡£" #: io.c:666 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "Æþ½ÐÎÏÍѤÎÁÐÊý¸þ¥Ñ¥¤¥× `%s' ¤¬³«¤±¤Þ¤»¤ó (%s)¡£" #: io.c:742 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "`%s' ¤«¤é¥ê¥À¥¤¥ì¥¯¥È¤Ç¤­¤Þ¤»¤ó (%s)¡£" #: io.c:745 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "`%s' ¤Ë¥ê¥À¥¤¥ì¥¯¥È¤Ç¤­¤Þ¤»¤ó (%s)¡£" #: io.c:784 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "³«¤¤¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¤Î¿ô¤¬¥·¥¹¥Æ¥àÀ©¸Â¤Ë㤷¤Þ¤·¤¿¡£¥Õ¥¡¥¤¥ëµ­½Ò»Ò¤ò¿½Å²½¤·¤Þ" "¤¹¡£" #: io.c:800 #, c-format msgid "close of `%s' failed (%s)." msgstr "`%s' ¤¬ÊĤ¸¤é¤ì¤Þ¤»¤ó (%s)¡£" #: io.c:808 msgid "too many pipes or input files open" msgstr "³«¤¤¤Æ¤¤¤ë¥Ñ¥¤¥×¤Þ¤¿¤ÏÆþÎÏ¥Õ¥¡¥¤¥ë¤Î¿ô¤¬Â¿²á¤®¤Þ¤¹¡£" #: io.c:831 msgid "close: second argument must be `to' or `from'" msgstr "close: ÂèÆó°ú¿ô¤Ë»ÈÍѤǤ­¤ë¤Î¤Ï `to' ¤Þ¤¿¤Ï `from' ¤Ç¤¹¡£" #: io.c:845 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "" "close: `%.*s' ¤Ï¥Õ¥¡¥¤¥ë¡¢¥Ñ¥¤¥×¡¢ÊÂ¹Ô¥×¥í¥»¥¹¤Î¤¤¤º¤ì¤Ç¤â¤¢¤ê¤Þ¤»¤ó¡£" #: io.c:849 msgid "close of redirection that was never opened" msgstr "³«¤¤¤Æ¤Ê¤¤¥ê¥À¥¤¥ì¥¯¥È¤òÊĤ¸¤è¤¦¤È¤·¤Æ¤¤¤Þ¤¹¡£" #: io.c:945 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: ¥ê¥À¥¤¥ì¥¯¥È `%s' ¤Ï `|&' ¤ò»È¤Ã¤Æ¤¤¤Þ¤»¤ó¡£ÂèÆó°ú¿ô¤Ï̵»ë¤·¤Þ¤¹¡£" #: io.c:960 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "¥Ñ¥¤¥× `%2$s' ¤òÊĤ¸¤¿¤È¤­¤Î¾õÂÖ¥³¡¼¥É¤¬¼ºÇÔ (%1$d) ¤Ç¤·¤¿ (%3$s)¡£" #: io.c:963 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "¥Õ¥¡¥¤¥ë `%2$s' ¤òÊĤ¸¤¿¤È¤­¤Î¾õÂÖ¥³¡¼¥É¤¬¼ºÇÔ (%1$d) ¤Ç¤·¤¿ (%3$s)¡£" #: io.c:983 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "¥½¥±¥Ã¥È `%s' ¤òÌÀ¼¨¤·¤ÆÊĤ¸¤Æ¤¤¤Þ¤»¤ó¡£" #: io.c:986 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "ÊÂ¹Ô¥×¥í¥»¥¹ `%s' ¤òÌÀ¼¨¤·¤ÆÊĤ¸¤Æ¤¤¤Þ¤»¤ó¡£" #: io.c:989 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "¥Ñ¥¤¥× `%s' ¤òÌÀ¼¨¤·¤ÆÊĤ¸¤Æ¤¤¤Þ¤»¤ó¡£" #: io.c:992 #, c-format msgid "no explicit close of file `%s' provided" msgstr "¥Õ¥¡¥¤¥ë `%s' ¤òÌÀ¼¨¤·¤ÆÊĤ¸¤Æ¤¤¤Þ¤»¤ó¡£" #: io.c:1021 io.c:1075 #, c-format msgid "error writing standard output (%s)" msgstr "ɸ½à½ÐÎϤؤνñ¹þ¤ß¥¨¥é¡¼ (%s)" #: io.c:1025 io.c:1079 #, c-format msgid "error writing standard error (%s)" msgstr "ɸ½à¥¨¥é¡¼¤Ø¤Î½ñ¹þ¤ß¥¨¥é¡¼ (%s)" #: io.c:1033 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "¥Ñ¥¤¥× `%s' ¤ò¥Õ¥é¥Ã¥·¥å¤Ç¤­¤Þ¤»¤ó (%s)¡£" #: io.c:1036 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "`%s' ¤ØÀܳ¤¹¤ë¥Ñ¥¤¥×¤òÊÂ¹Ô¥×¥í¥»¥¹¤«¤é¥Õ¥é¥Ã¥·¥å¤Ç¤­¤Þ¤»¤ó (%s)¡£" #: io.c:1039 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "¥Õ¥¡¥¤¥ë `%s' ¤ò¥Õ¥é¥Ã¥·¥å¤Ç¤­¤Þ¤»¤ó (%s)¡£" #: io.c:1198 msgid "/inet/raw client not ready yet, sorry" msgstr "»ÄÇ°¤Ê¤¬¤é¡¢/inet/raw ¥¯¥é¥¤¥¢¥ó¥È¤Î½àÈ÷¤¬¤Ç¤­¤Æ¤¤¤Þ¤»¤ó¡£" #: io.c:1200 io.c:1237 msgid "only root may use `/inet/raw'." msgstr "`/inet/raw' ¤Ï root ¥æ¡¼¥¶¡¼¤Î¤ß»ÈÍѤǤ­¤Þ¤¹¡£" #: io.c:1235 msgid "/inet/raw server not ready yet, sorry" msgstr "»ÄÇ°¤Ê¤¬¤é¡¢/inet/raw ¥µ¡¼¥Ð¡¼¤Î½àÈ÷¤¬¤Ç¤­¤Æ¤¤¤Þ¤»¤ó¡£" #: io.c:1325 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "" "¥¹¥Ú¥·¥ã¥ë¥Õ¥¡¥¤¥ë̾ `%s' ¤Ë¡Êǧ¼±¤Ç¤­¤ë¡Ë¥×¥í¥È¥³¥ë¤¬»ØÄꤵ¤ì¤Æ¤¤¤Þ¤»¤ó¡£" #: io.c:1343 #, c-format msgid "special file name `%s' is incomplete" msgstr "¥¹¥Ú¥·¥ã¥ë¥Õ¥¡¥¤¥ë̾ `%s' ¤ÏÉÔ´°Á´¤Ç¤¹¡£" #: io.c:1355 #, c-format msgid "local port invalid in `%s'" msgstr "`%s' ¤Î¥í¡¼¥«¥ë¥Ý¡¼¥È¤¬Ìµ¸ú¤Ç¤¹¡£" #: io.c:1367 msgid "must supply a remote hostname to `/inet'" msgstr "`/inet' ¤Ë¤Ï¥ê¥â¡¼¥È¥Û¥¹¥È̾¤¬É¬ÍפǤ¹¡£" #: io.c:1382 msgid "must supply a remote port to `/inet'" msgstr "`/inet' ¤Ë¤Ï¥ê¥â¡¼¥È¥Ý¡¼¥ÈÈֹ椬ɬÍפǤ¹¡£" #: io.c:1388 #, c-format msgid "remote port invalid in `%s'" msgstr "`%s' ¤Î¥ê¥â¡¼¥È¥Ý¡¼¥È¤¬Ìµ¸ú¤Ç¤¹¡£" #: io.c:1398 msgid "TCP/IP communications are not supported" msgstr "TCP/IP Àܳ¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£" #: io.c:1407 io.c:1588 #, c-format msgid "file `%s' is a directory" msgstr "¥Õ¥¡¥¤¥ë `%s' ¤Ï¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤¹¡£" #: io.c:1477 #, c-format msgid "use `PROCINFO[\"%s\"]' instead of `%s'" msgstr "`%2$s' ¤ÎÂå¤ï¤ê¤Ë `PROCINFO[\"%1$s\"]' ¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£" #: io.c:1509 msgid "use `PROCINFO[...]' instead of `/dev/user'" msgstr "`/dev/user' ¤ÎÂå¤ï¤ê¤Ë `PROCINFO[...]' ¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£" #: io.c:1574 io.c:1748 #, c-format msgid "could not open `%s', mode `%s'" msgstr "`%s' (¥â¡¼¥É `%s') ¤ò³«¤±¤Þ¤»¤ó¡£" #: io.c:1799 #, c-format msgid "close of master pty failed (%s)" msgstr "¥Þ¥¹¥¿¡¼ pty ¤òÊĤ¸¤é¤ì¤Þ¤»¤ó (%s)¡£" #: io.c:1801 io.c:1953 io.c:2105 #, c-format msgid "close of stdout in child failed (%s)" msgstr "»Ò¥×¥í¥»¥¹¤¬É¸½à½ÐÎϤòÊĤ¸¤é¤ì¤Þ¤»¤ó (%s)¡£" #: io.c:1804 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "»Ò¥×¥í¥»¥¹¤¬¥¹¥ì¡¼¥Ö pty ¤òɸ½à½ÐÎϤ˰ÜÆ°¤Ç¤­¤Þ¤»¤ó (dup: %s)¡£" #: io.c:1806 io.c:1958 #, c-format msgid "close of stdin in child failed (%s)" msgstr "»Ò¥×¥í¥»¥¹¤¬É¸½àÆþÎϤòÊĤ¸¤é¤ì¤Þ¤»¤ó (%s)¡£" #: io.c:1809 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "»Ò¥×¥í¥»¥¹¤¬¥¹¥ì¡¼¥Ö pty ¤òɸ½àÆþÎϤ˰ÜÆ°¤Ç¤­¤Þ¤»¤ó (dup: %s)¡£" #: io.c:1811 io.c:1830 #, c-format msgid "close of slave pty failed (%s)" msgstr "¥¹¥ì¡¼¥Ö pty ¤òÊĤ¸¤é¤ì¤Þ¤»¤ó (%s)¡£" #: io.c:1904 io.c:1956 io.c:2086 io.c:2108 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "»Ò¥×¥í¥»¥¹¤¬¥Ñ¥¤¥×¤òɸ½à½ÐÎϤ˰ÜÆ°¤Ç¤­¤Þ¤»¤ó (dup: %s)¡£" #: io.c:1908 io.c:1961 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "»Ò¥×¥í¥»¥¹¤¬¥Ñ¥¤¥×¤òɸ½àÆþÎϤ˰ÜÆ°¤Ç¤­¤Þ¤»¤ó (dup: %s)¡£" #: io.c:1925 io.c:2099 msgid "restoring stdout in parent process failed\n" msgstr "¿Æ¥×¥í¥»¥¹¤¬É¸½à½ÐÎϤòÉüµì¤Ç¤­¤Þ¤»¤ó¡£\n" #: io.c:1930 msgid "restoring stdin in parent process failed\n" msgstr "¿Æ¥×¥í¥»¥¹¤¬É¸½àÆþÎϤòÉüµì¤Ç¤­¤Þ¤»¤ó¡£\n" #: io.c:1964 io.c:2110 io.c:2121 #, c-format msgid "close of pipe failed (%s)" msgstr "¥Ñ¥¤¥×¤òÊĤ¸¤é¤ì¤Þ¤»¤ó (%s)¡£" #: io.c:2009 msgid "`|&' not supported" msgstr "`|&' ¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£" #: io.c:2076 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "¥Ñ¥¤¥× `%s' ¤¬³«¤±¤Þ¤»¤ó (%s)¡£" #: io.c:2117 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "`%s' ÍÑ¤Î»Ò¥×¥í¥»¥¹¤ò¼Â¹Ô¤Ç¤­¤Þ¤»¤ó (fork: %s)¡£" #: io.c:2460 #, c-format msgid "data file `%s' is empty" msgstr "¥Ç¡¼¥¿¥Õ¥¡¥¤¥ë `%s' ¤Ï¶õ¤Ç¤¹¡£" #: io.c:2503 io.c:2511 msgid "could not allocate more input memory" msgstr "ÆþÎÏÍÑ¥á¥â¥ê¡¼¤ò¤³¤ì°Ê¾å³ÎÊݤǤ­¤Þ¤»¤ó¡£" #: io.c:2869 io.c:2932 #, c-format msgid "error reading input file `%s': %s" msgstr "ÆþÎÏ¥Õ¥¡¥¤¥ë `%s' ¤òÆɤ߹þ¤ßÃæ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿: %s¡£" #: io.c:3057 msgid "multicharacter value of `RS' is a gawk extension" msgstr "Ê£¿ô¤Îʸ»ú¤ò `RS' ¤Ë»ÈÍѤ¹¤ë¤Î¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£" #: main.c:323 msgid "`-m[fr]' option irrelevant in gawk" msgstr "gawk ¤Ç¤Ï¥ª¥×¥·¥ç¥ó `-m[fr]' ¤Ë¸ú²Ì¤Ï¤¢¤ê¤Þ¤»¤ó¡£" #: main.c:325 msgid "-m option usage: `-m[fr] nnn'" msgstr "-m ¥ª¥×¥·¥ç¥ó¤Î»ÈÍÑË¡: `-m[fr] ¿ôÃÍ'" #: main.c:342 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: ¥ª¥×¥·¥ç¥ó `-W %s' ¤Ïǧ¼±¤Ç¤­¤Þ¤»¤ó¡£Ìµ»ë¤·¤Þ¤¹¡£\n" #: main.c:379 msgid "empty argument to `--source' ignored" msgstr "¶õ°ú¿ô¤Î `--source' ¤Ï̵»ë¤µ¤ì¤Þ¤¹¡£" #: main.c:450 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" "´Ä¶­ÊÑ¿ô `POSIXLY_CORRECT' ¤¬»ØÄꤵ¤ì¤Æ¤¤¤Þ¤¹¡£¥ª¥×¥·¥ç¥ó `--posix' ¤òÍ­¸ú¤Ë" "¤·¤Þ¤¹¡£" #: main.c:455 msgid "`--posix' overrides `--traditional'" msgstr "¥ª¥×¥·¥ç¥ó `--posix' ¤Ï `--traditional' ¤ò̵¸ú¤Ë¤·¤Þ¤¹¡£" #: main.c:466 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "" "¥ª¥×¥·¥ç¥ó `--posix'/`--traditional' ¤Ï `--non-decimal-data' ¤ò̵¸ú¤Ë¤·¤Þ¤¹¡£" #: main.c:470 #, c-format msgid "running %s setuid root may be a security problem" msgstr "" "setuid root ¤Ç %s ¤ò¼Â¹Ô¤¹¤ë¤È¡¢¥»¥­¥å¥ê¥Æ¥£¾å¤ÎÌäÂ꤬ȯÀ¸¤¹¤ë¾ì¹ç¤¬¤¢¤ê¤Þ" "¤¹¡£" #: main.c:511 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "ɸ½àÆþÎϤò¥Ð¥¤¥Ê¥ê¥â¡¼¥É¤ËÀßÄê¤Ç¤­¤Þ¤»¤ó (%s)¡£" #: main.c:514 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "ɸ½à½ÐÎϤò¥Ð¥¤¥Ê¥ê¥â¡¼¥É¤ËÀßÄê¤Ç¤­¤Þ¤»¤ó (%s)¡£" #: main.c:516 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "ɸ½à¥¨¥é¡¼¤ò¥Ð¥¤¥Ê¥ê¥â¡¼¥É¤ËÀßÄê¤Ç¤­¤Þ¤»¤ó (%s)¡£" #: main.c:546 msgid "no program text at all!" msgstr "¥×¥í¥°¥é¥àʸ¤¬Á´¤¯¤¢¤ê¤Þ¤»¤ó!" #: main.c:623 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "" "»È¤¤Êý: %s [POSIX ¤Þ¤¿¤Ï GNU ·Á¼°¥ª¥×¥·¥ç¥ó] -f ¥×¥í¥°¥é¥à¥Õ¥¡¥¤¥ë [--] ÆþÎÏ" "¥Õ¥¡¥¤¥ë ¡Ä\n" #: main.c:625 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "" "»È¤¤Êý: %s [POSIX ¤Þ¤¿¤Ï GNU ·Á¼°¥ª¥×¥·¥ç¥ó] [--] %c¥×¥í¥°¥é¥à%c ÆþÎÏ¥Õ¥¡¥¤" "¥ë ¡Ä\n" #: main.c:630 msgid "POSIX options:\t\tGNU long options:\n" msgstr "POSIX ¥ª¥×¥·¥ç¥ó:\t\tGNU Ĺ·Á¼°¥ª¥×¥·¥ç¥ó\n" #: main.c:631 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f ¥×¥í¥°¥é¥à¥Õ¥¡¥¤¥ë\t\t--file=¥×¥í¥°¥é¥à¥Õ¥¡¥¤¥ë\n" #: main.c:632 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "" "\t-F ¥Õ¥£¡¼¥ë¥É¥»¥Ñ¥ì¡¼¥¿\t\t\t--field-separator=¥Õ¥£¡¼¥ë¥É¥»¥Ñ¥ì¡¼¥¿\n" #: main.c:633 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v ÊÑ¿ô=ÂåÆþÃÍ\t\t--assign=ÊÑ¿ô=ÂåÆþÃÍ\n" #: main.c:634 msgid "\t-m[fr] val\n" msgstr "\t-m[fr] ¿ôÃÍ\n" #: main.c:635 msgid "\t-W compat\t\t--compat\n" msgstr "\t-W compat\t\t--compat\n" #: main.c:636 msgid "\t-W copyleft\t\t--copyleft\n" msgstr "\t-W copyleft\t\t--copyleft\n" #: main.c:637 msgid "\t-W copyright\t\t--copyright\n" msgstr "\t-W copyright\t\t--copyright\n" #: main.c:638 msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" msgstr "\t-W dump-variables[=¥Õ¥¡¥¤¥ë]\t--dump-variables[=¥Õ¥¡¥¤¥ë]\n" #: main.c:639 msgid "\t-W gen-po\t\t--gen-po\n" msgstr "\t-W gen-po\t\t--gen-po\n" #: main.c:640 msgid "\t-W help\t\t\t--help\n" msgstr "\t-W help\t\t\t--help\n" #: main.c:641 msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" #: main.c:642 msgid "\t-W lint-old\t\t--lint-old\n" msgstr "\t-W lint-old\t\t--lint-old\n" #: main.c:643 msgid "\t-W non-decimal-data\t--non-decimal-data\n" msgstr "\t-W non-decimal-data\t--non-decimal-data\n" #: main.c:645 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" #: main.c:648 msgid "\t-W parsedebug\t\t--parsedebug\n" msgstr "\t-W parsedebug\t\t--parsedebug\n" #: main.c:650 msgid "\t-W profile[=file]\t--profile[=file]\n" msgstr "\t-W profile[=¥Õ¥¡¥¤¥ë]\t--profile[=¥Õ¥¡¥¤¥ë]\n" #: main.c:651 msgid "\t-W posix\t\t--posix\n" msgstr "\t-W posix\t\t--posix\n" #: main.c:652 msgid "\t-W re-interval\t\t--re-interval\n" msgstr "\t-W re-interval\t\t--re-interval\n" #: main.c:653 msgid "\t-W source=program-text\t--source=program-text\n" msgstr "\t-W source=¥×¥í¥°¥é¥àʸ\t--source=¥×¥í¥°¥é¥àʸ\n" #: main.c:654 msgid "\t-W traditional\t\t--traditional\n" msgstr "\t-W traditional\t\t--traditional\n" #: main.c:655 msgid "\t-W usage\t\t--usage\n" msgstr "\t-W usage\t\t--usage\n" #: main.c:656 msgid "\t-W version\t\t--version\n" msgstr "\t-W version\t\t--version\n" #: main.c:660 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" "section `Reporting Problems and Bugs' in the printed version.\n" "\n" msgstr "" "\n" "¥Ð¥°¤òÊó¹ð¤¹¤ë¤Ë¤Ï¡¢`gawk.info¡Ê±Ñʸ¡Ë' ¤Î `Bugs' ¥Î¡¼¥É¤ò\n" "»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ °õºþ¤µ¤ì¤¿¥Þ¥Ë¥å¥¢¥ë¤ÇÂбþ¤¹¤ë¥»¥¯¥·¥ç¥ó\n" "¤Ï¡¢`Reporting Problems and Bugs' ¤Ç¤¹¡£\n" "\n" #: main.c:664 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" "\n" msgstr "" "gawk ¤Ï¡¢¥Ñ¥¿¡¼¥ó¤ò¸¡º÷¡¢¤½¤·¤Æ½èÍý¤¹¤ë¸À¸ì¤Ç¤¹¡£\n" "¥Ç¥Õ¥©¥ë¥ÈÀßÄê¤Ç¤Ï¡¢É¸½àÆþÎϤòÆɤ߹þ¤ß¡¢É¸½à½ÐÎϤ˽ñ¤­½Ð¤·¤Þ¤¹¡£\n" "\n" #: main.c:668 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" msgstr "" "»ÈÍÑÎã:\n" "\tgawk '{ sum += $1 }; END { print sum }' ÆþÎÏ¥Õ¥¡¥¤¥ë\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" #: main.c:685 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" "\n" "This program 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 2 of the License, or\n" "(at your option) any later version.\n" "\n" msgstr "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" "\n" "ËÜ¥×¥í¥°¥é¥à¤Ï¥Õ¥ê¡¼¡¦¥½¥Õ¥È¥¦¥¨¥¢¤Ç¤¹¡£Free Software Foundation ¸øɽ¤Î\n" "GNU General Public License¡Ê¥Ð¡¼¥¸¥ç¥ó£²¡¢¤Þ¤¿¤Ï¡¢¤³¤ì°Ê¸å¤Î¥Ð¡¼¥¸¥ç¥ó¡Ë\n" "¤Ë½¾¤¤ºÆÇÛÉÛ¡¢µÚ¤Ó/¤Þ¤¿¤Ï¡¢Êѹ¹¤ò²Ã¤¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£\n" "\n" #: main.c:693 msgid "" "This program 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" msgstr "" "ËÜ¥×¥í¥°¥é¥à¤Ï¡¢ÍøÍѲÁÃͤ¬¤¢¤ë¤³¤È¤ò´üÂÔ¤·¤ÆÇÛÉÛ¤µ¤ì¤Æ¤¤¤Þ¤¹¤¬¡¢\n" "¤³¤ì¤Ï¡¢ÆÃÄêÌÜŪ¤Ë»ÈÍѲÄǽ¤Ç¤¢¤ë¤³¤È¡¢µÚ¤Ó¡¢¾¦ÍÑÌÜŪ¤Ë»ÈÍѤǤ­¤ë\n" "¤³¤È¤ò°Å¼¨¤¹¤ë¤â¤Î¤Ç¤Ï¤Ê¤¯¡¢¤¤¤«¤Ê¤ëÊݾڤâ°ìÀÚ¤¢¤ê¤Þ¤»¤ó¡£\n" "¾Ü¤·¤¯¤Ï¡¢GNU General Public License ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£\n" "\n" #: main.c:699 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, write to the Free Software\n" "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n" msgstr "" "ËÜ¥×¥í¥°¥é¥à¤Ë¤Ï¡¢GNU General Public License ¤¬ÅºÉÕ¤µ¤ì¤Æ¤¤¤ë¤Ï¤º¤Ç¤¹¡£\n" "¤â¤·¡¢ËÜ¥×¥í¥°¥é¥à¤È°ì½ï¤Ë GNU General Public License ¤òÆþ¼ê¤·¤Ê¤«¤Ã¤¿\n" "¾ì¹ç¤Ë¤Ï¡¢\n" "\tFree Software Foundation, Inc.,\n" "\t59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n" "¤Ø½ñÌ̤ǤªÃΤ餻¤¯¤À¤µ¤¤¡£\n" #: main.c:733 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "POSIX »ÅÍͤΠawk ¤Ç¤Ï -Ft ¤Ç FS ¤ò¥¿¥Ö¤ËÀßÄê¤Ç¤­¤Þ¤»¤ó¡£" #: main.c:962 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" "\n" msgstr "" "%s: ¥ª¥×¥·¥ç¥ó `-v' ¤Î°ú¿ô `%s' ¤¬ `ÊÑ¿ô=ÂåÆþÃÍ' ¤Î·Á¼°¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤»¤ó¡£\n" "\n" #: main.c:982 #, c-format msgid "`%s' is not a legal variable name" msgstr "`%s' ¤ÏÉÔÀµ¤ÊÊÑ¿ô̾¤Ç¤¹¡£" #: main.c:985 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "`%s' ¤ÏÊÑ¿ô̾¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£`%s=%s' ¤Î¥Õ¥¡¥¤¥ë¤òõ¤·¤Þ¤¹¡£" #: main.c:1018 msgid "floating point exception" msgstr "ÉâÆ°¾®¿ôÅÀÎã³°" #: main.c:1025 msgid "fatal error: internal error" msgstr "Ã×̿Ū¥¨¥é¡¼: ÆâÉô¥¨¥é¡¼" #: main.c:1075 #, c-format msgid "no pre-opened fd %d" msgstr "fd %d ¤¬»öÁ°¤Ë³«¤¤¤Æ¤¤¤Þ¤»¤ó¡£" #: main.c:1082 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "»öÁ°¤Ë fd %d ÍÑ¤Ë /dev/null ¤ò³«¤±¤Þ¤»¤ó¡£" #: main.c:1105 main.c:1114 #, c-format msgid "could not find groups: %s" msgstr "¥°¥ë¡¼¥×¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: %s" #: msg.c:54 #, c-format msgid "cmd. line:" msgstr "¥³¥Þ¥ó¥É¥é¥¤¥ó:" #: msg.c:120 msgid "warning: " msgstr "·Ù¹ð: " #: msg.c:142 msgid "error: " msgstr "¥¨¥é¡¼: " #: msg.c:178 msgid "fatal: " msgstr "Ã×̿Ū: " #: node.c:58 node.c:65 node.c:74 node.c:88 node.c:115 msgid "can't convert string to float" msgstr "ʸ»úÎ󤫤éÉâÆ°¾®¿ô¤ËÊÑ´¹¤Ç¤­¤Þ¤»¤ó¡£" #: node.c:357 msgid "backslash at end of string" msgstr "ʸ»úÎó¤Î½ª¤ê¤Ë¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¤¬»È¤ï¤ì¤Æ¤¤¤Þ¤¹¡£" #: node.c:541 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX ¤Ï `\\x' ¥¨¥¹¥±¡¼¥×¤òµö²Ä¤·¤Þ¤»¤ó¡£" #: node.c:547 msgid "no hex digits in `\\x' escape sequence" msgstr "`\\x' ¥¨¥¹¥±¡¼¥×¥·¡¼¥±¥ó¥¹¤Ë 16 ¿Ê¿ô¤¬¤¢¤ê¤Þ¤»¤ó¡£" #: node.c:581 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "¥¨¥¹¥±¡¼¥×¥·¡¼¥±¥ó¥¹ `\\%c' ¤Ï `%c' ¤ÈƱÅù¤Ë°·¤ï¤ì¤Þ¤¹¡£" #: posix/gawkmisc.c:172 #, c-format msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" msgstr "%s %s `%s': close-on-exec ¤òÀßÄê¤Ç¤­¤Þ¤»¤ó: (fcntl: %s)" #: profile.c:91 #, c-format msgid "could not open `%s' for writing: %s" msgstr "`%s' ¤ò½ñ¹þ¤ßÍѤ˳«¤±¤Þ¤»¤ó¤Ç¤·¤¿: %s" #: profile.c:467 #, c-format msgid "internal error: %s with null vname" msgstr "ÆâÉô¥¨¥é¡¼: %s ¤Î vname ¤¬Ìµ¸ú¤Ç¤¹¡£" #: profile.c:530 msgid "# treated internally as `delete'" msgstr "# ÆâÉô¤Ç¤Ï `delete' ¤È¤·¤Æ°·¤ï¤ì¤Þ¤·¤¿¡£" #: profile.c:1167 #, c-format msgid "# this is a dynamically loaded extension function" msgstr "" #: profile.c:1198 #, c-format msgid "\t# gawk profile, created %s\n" msgstr "\t# gawk ¥×¥í¥Õ¥¡¥¤¥ë¡¢ºîÀ®Æü»þ %s\n" #: profile.c:1201 #, c-format msgid "" "\t# BEGIN block(s)\n" "\n" msgstr "" "\t# BEGIN ¥Ö¥í¥Ã¥¯\n" "\n" #: profile.c:1211 #, c-format msgid "" "\t# Rule(s)\n" "\n" msgstr "" "\t# ¥ë¡¼¥ë\n" "\n" #: profile.c:1217 #, c-format msgid "" "\t# END block(s)\n" "\n" msgstr "" "\t# END ¥Ö¥í¥Ã¥¯\n" "\n" #: profile.c:1237 #, c-format msgid "" "\n" "\t# Functions, listed alphabetically\n" msgstr "" "\n" "\t# ´Ø¿ô°ìÍ÷¡Ê¥¢¥ë¥Õ¥¡¥Ù¥Ã¥È½ç¡Ë\n" #: profile.c:1452 #, c-format msgid "unexpected type %s in prec_level" msgstr "prec_level Ãæ¤Î %s ¤ÏͽÁÛ³°¤Î¥¿¥¤¥×¤Ç¤¹¡£" #: regcomp.c:150 msgid "Success" msgstr "À®¸ù" #: regcomp.c:153 msgid "No match" msgstr "³ºÅö̵¤·" #: regcomp.c:156 msgid "Invalid regular expression" msgstr "̵¸ú¤ÊÀµµ¬É½¸½" #: regcomp.c:159 msgid "Invalid collation character" msgstr "̵¸ú¤Ê¾È¹çʸ»ú" #: regcomp.c:162 msgid "Invalid character class name" msgstr "̵¸ú¤Êʸ»ú¥¯¥é¥¹Ì¾" #: regcomp.c:165 msgid "Trailing backslash" msgstr "ºÇ¸å¤Ë¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¤¬ÉÕ¤¤¤Æ¤¤¤Þ¤¹¡£" #: regcomp.c:168 msgid "Invalid back reference" msgstr "¸åÊý¤Ø¤Î»²¾È¤¬Ìµ¸ú¤Ç¤¹¡£" #: regcomp.c:171 msgid "Unmatched [ or [^" msgstr "[ ¤Þ¤¿¤Ï [^ ¤¬Âбþ¤·¤Þ¤»¤ó¡£" #: regcomp.c:174 msgid "Unmatched ( or \\(" msgstr "( ¤Þ¤¿¤Ï \\( ¤¬Âбþ¤·¤Þ¤»¤ó¡£" #: regcomp.c:177 msgid "Unmatched \\{" msgstr "\\{ ¤¬Âбþ¤·¤Þ¤»¤ó¡£" #: regcomp.c:180 msgid "Invalid content of \\{\\}" msgstr "\\{\\} ¤ÎÆâÍƤ¬Ìµ¸ú¤Ç¤¹¡£" #: regcomp.c:183 msgid "Invalid range end" msgstr "ÈÏ°Ï»ØÄê¤Î½ªÃ¼¤¬Ìµ¸ú¤Ç¤¹¡£" #: regcomp.c:186 msgid "Memory exhausted" msgstr "¥á¥â¥ê¡¼¤¬Â­¤ê¤Þ¤»¤ó¡£" #: regcomp.c:189 msgid "Invalid preceding regular expression" msgstr "Àè¹Ô¤ÎÀµµ¬É½¸½¤¬Ìµ¸ú¤Ç¤¹¡£" #: regcomp.c:192 msgid "Premature end of regular expression" msgstr "Àµµ¬É½¸½¤¬½ªÃ¼¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£" #: regcomp.c:195 msgid "Regular expression too big" msgstr "Àµµ¬É½¸½¤¬Ä¹²á¤®¤Þ¤¹¡£" #: regcomp.c:198 msgid "Unmatched ) or \\)" msgstr ") ¤Þ¤¿¤Ï \\) ¤¬Âбþ¤·¤Þ¤»¤ó¡£" #: regcomp.c:668 msgid "No previous regular expression" msgstr "¤³¤ì¤è¤êÁ°¤Ë»ÈÍѤ·¤¿Àµµ¬É½¸½¤Ï¤¢¤ê¤Þ¤»¤ó¡£" #~ msgid "or used as a variable or an array" #~ msgstr "¤Þ¤¿¤ÏÊÑ¿ô¤«ÇÛÎó¤È¤·¤Æ»È¤Ã¤Æ¤¤¤Þ¤¹¡£" #~ msgid "regex match failed, not enough memory to match string \"%.*s%s\"" #~ msgstr "" #~ "¥á¥â¥ê¡¼¤¬Â­¤é¤Ê¤¤¤¿¤á¡¢Àµµ¬É½¸½ \"%.*s%s\" ¤ò¸¡º÷¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£" #~ msgid "substr: length %g is < 0" #~ msgstr "substr: ʸ»ú¿ô %g ¤¬ < 0 ¤Ç¤¹¡£" EOF echo - 'po/pl.po' cat << 'EOF' > 'po/pl.po' # Polish translations for GNU AWK package. # Copyright (C) 2003, 2004 Free Software Foundation, Inc. # Wojciech Polak , 2003, 2004. # additional help by Sergey Poznyakoff , 2003. # msgid "" msgstr "" "Project-Id-Version: gawk 3.1.3l\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" "POT-Creation-Date: 2004-07-15 13:02+0300\n" "PO-Revision-Date: 2004-07-18 19:36+0200\n" "Last-Translator: Wojciech Polak \n" "Language-Team: Polish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-2\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" #: array.c:112 #, c-format msgid "attempt to use function `%s' as an array" msgstr "próba u¿ycia funkcji `%s' jako tablicy" #: array.c:115 #, c-format msgid "attempt to use scalar parameter `%s' as an array" msgstr "próba u¿ycia parametru `%s' skalaru jako tablicy" #: array.c:118 #, c-format msgid "attempt to use scalar `%s' as array" msgstr "próba u¿ycia skalaru `%s' jako tablicy" #: array.c:156 #, c-format msgid "from %s" msgstr "od %s" #: array.c:511 #, c-format msgid "reference to uninitialized element `%s[\"%s\"]'" msgstr "odwo³anie do niezainicjowanego elementu `%s[\"%s\"]'" #: array.c:517 #, c-format msgid "subscript of array `%s' is null string" msgstr "indeks tablicy `%s' jest zerowym ³añcuchem" #: array.c:621 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: indeks `%s' nie jest w tablicy `%s'" #: array.c:791 #, c-format msgid "%s: empty (null)\n" msgstr "%s: pusty (null)\n" #: array.c:796 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: pusty (zero)\n" #: array.c:800 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: table_size = %d, array_size = %d\n" #: array.c:829 #, c-format msgid "%s: is parameter\n" msgstr "%s: jest parametrem\n" #: array.c:834 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: array_ref do %s\n" #: awkgram.y:208 #, c-format msgid "%s blocks must have an action part" msgstr "%s bloków musi posiadaæ czê¶æ dotycz±c± akcji" #: awkgram.y:211 msgid "each rule must have a pattern or an action part" msgstr "ka¿da regu³a musi posiadaæ wzorzec lub czê¶æ dotycz±c± akcji" #: awkgram.y:267 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" msgstr "" "`%s' jest funkcj± wbudowan±, wiêc nie mo¿e zostaæ ponownie zdefiniowana" #: awkgram.y:314 #, c-format msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "" "sta³e wyra¿enie regularne `/%s/' wygl±da jak komentarz C, ale nim nie jest" #: awkgram.y:341 awkgram.y:619 msgid "statement may have no effect" msgstr "instrukcja mo¿e nie mieæ ¿adnego efektu" #: awkgram.y:436 awkgram.y:456 #, c-format msgid "`%s' used in %s action" msgstr "`%s' u¿yty w akcji %s" #: awkgram.y:449 awkgram.y:452 msgid "`nextfile' is a gawk extension" msgstr "`nextfile' jest rozszerzeniem gawk" #: awkgram.y:466 msgid "`return' used outside function context" msgstr "`return' u¿yty poza kontekstem funkcji" #: awkgram.y:508 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "zwyk³y `print' w regu³ach BEGIN lub END powinien prawdopodobnie byæ jako " "`print \"\"'" #: awkgram.y:521 awkgram.y:528 msgid "`delete array' is a gawk extension" msgstr "`delete tablica' jest rozszerzeniem gawk" #: awkgram.y:536 awkgram.y:543 msgid "`delete(array)' is a non-portable tawk extension" msgstr "`delete(tablica)' jest nieprzeno¶nym rozszerzeniem gawk" #: awkgram.y:587 #, c-format msgid "duplicate case values in switch body: %s" msgstr "powielone warto¶ci case w ciele switch: %s" #: awkgram.y:597 msgid "Duplicate `default' detected in switch body" msgstr "wykryto powielony `default' w ciele switch" #: awkgram.y:686 msgid "multistage two-way pipelines don't work" msgstr "wieloetapowe dwukierunkowe linie potokowe nie dzia³aj±" #: awkgram.y:777 msgid "regular expression on right of assignment" msgstr "wyra¿anie regularne po prawej stronie przypisania" #: awkgram.y:800 msgid "regular expression on left of `~' or `!~' operator" msgstr "wyra¿enie regularne po lewej stronie operatora `~' lub `!~'" #: awkgram.y:808 msgid "regular expression on right of comparison" msgstr "wyra¿enie regularne po prawej stronie porównania" #: awkgram.y:875 msgid "non-redirected `getline' undefined inside END action" msgstr "" "komenda `getline' bez przekierowania nie jest zdefiniowana wewn±trz akcji END" #: awkgram.y:902 msgid "call of `length' without parentheses is not portable" msgstr "wywo³anie `length' bez nawiasów jest nieprzeno¶ne" #: awkgram.y:905 msgid "call of `length' without parentheses is deprecated by POSIX" msgstr "wywo³anie `length' bez podania nawiasów jest niezalecane przez POSIX" #: awkgram.y:958 msgid "use of non-array as array" msgstr "u¿ycie nie-tablicy jako tablicy" #: awkgram.y:960 msgid "invalid subscript expression" msgstr "nieprawid³owe wyra¿enie indeksowe" #: awkgram.y:1158 msgid "unexpected newline or end of string" msgstr "niespodziewany znak nowego wiersza lub koñca ³añcucha" #: awkgram.y:1254 msgid "empty program text on command line" msgstr "pusty tekst programu w linii poleceñ" #: awkgram.y:1307 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "nie mo¿na otworzyæ pliku ¼ród³owego `%s' do czytania (%s)" #: awkgram.y:1384 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "nie mo¿na otworzyæ pliku ¼ród³owego `%s' (%s)" #: awkgram.y:1392 #, c-format msgid "source file `%s' is empty" msgstr "plik ¼ród³owy `%s' jest pusty" #: awkgram.y:1590 awkgram.y:1700 awkgram.y:1718 awkgram.y:2068 awkgram.y:2153 msgid "source file does not end in newline" msgstr "plik ¼ród³owy nie posiada na koñcu znaku nowego wiersza" #: awkgram.y:1654 msgid "unterminated regexp ends with `\\' at end of file" msgstr "" "niezakoñczone prawid³owo wyra¿enie regularne koñczy siê znakiem `\\' na " "koñcu pliku" #: awkgram.y:1674 msgid "unterminated regexp" msgstr "niezakoñczone wyra¿enie regularne" #: awkgram.y:1677 msgid "unterminated regexp at end of file" msgstr "niezakoñczone wyra¿enie regularne na koñcu pliku" #: awkgram.y:1744 msgid "use of `\\ #...' line continuation is not portable" msgstr "u¿ycie `\\ #...' kontynuacji linii nie jest przeno¶ne" #: awkgram.y:1756 msgid "backslash not last character on line" msgstr "backslash nie jest ostatnim znakiem w wierszu" #: awkgram.y:1801 msgid "POSIX does not allow operator `**='" msgstr "POSIX nie zezwala na operator `**='" #: awkgram.y:1803 msgid "old awk does not support operator `**='" msgstr "stary awk nie wspiera operatora `**='" #: awkgram.y:1812 msgid "POSIX does not allow operator `**'" msgstr "POSIX nie zezwala na operator `**'" #: awkgram.y:1814 msgid "old awk does not support operator `**'" msgstr "stary awk nie wspiera operatora `**'" #: awkgram.y:1845 msgid "operator `^=' is not supported in old awk" msgstr "operator `^=' nie jest wspierany w starym awk" #: awkgram.y:1853 msgid "operator `^' is not supported in old awk" msgstr "operator `^' nie jest wspierany w starym awk" #: awkgram.y:1937 awkgram.y:1954 msgid "unterminated string" msgstr "niezakoñczony ³añcuch" #: awkgram.y:2114 #, c-format msgid "invalid char '%c' in expression" msgstr "nieprawid³owy znak '%c' w wyra¿eniu" #: awkgram.y:2162 #, c-format msgid "`%s' is a gawk extension" msgstr "`%s' jest rozszerzeniem gawk" #: awkgram.y:2165 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "`%s' jest rozszerzeniem Bell Labs" #: awkgram.y:2168 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX nie zezwala na `%s'" #: awkgram.y:2172 #, c-format msgid "`%s' is not supported in old awk" msgstr "`%s' nie jest wspierany w starym awk" #: awkgram.y:2198 msgid "`goto' considered harmful!\n" msgstr "`goto' uwa¿ane za szkodliwe!\n" #: awkgram.y:2260 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d jest nieprawid³owe jako liczba argumentów dla %s" #: awkgram.y:2279 awkgram.y:2282 msgid "match: third argument is a gawk extension" msgstr "match: trzeci argument jest rozszerzeniem gawk" #: awkgram.y:2295 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "" "%s: litera³ ³añcuchowy jako ostatni argument podstawienia nie ma ¿adnego " "efektu" #: awkgram.y:2298 #, c-format msgid "%s third parameter is not a changeable object" msgstr "%s trzeci parametr nie jest zmiennym obiektem" #: awkgram.y:2325 awkgram.y:2328 msgid "close: second argument is a gawk extension" msgstr "close: drugi argument jest rozszerzeniem gawk" #: awkgram.y:2338 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "nieprawid³owe u¿ycie dcgettext(_\"...\"): usuñ znak podkre¶lenia" #: awkgram.y:2353 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "nieprawid³owe u¿ycie dcngettext(_\"...\"): usuñ znak podkre¶lenia" #: awkgram.y:2424 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "funkcja `%s': parametr #%d, `%s', powiela parametr #%d" #: awkgram.y:2457 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "funkcja `%s': parametr `%s' zas³ania globaln± zmienn±" #: awkgram.y:2569 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "nie mo¿na otworzyæ `%s' do zapisu (%s)" #: awkgram.y:2570 profile.c:93 msgid "sending profile to standard error" msgstr "wysy³anie profilu na standardowe wyj¶cie diagnostyczne" #: awkgram.y:2602 #, c-format msgid "%s: close failed (%s)" msgstr "%s: zamkniêcie nie powiod³o siê (%s)" #: awkgram.y:2723 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() wywo³ana podwójnie!" #: awkgram.y:2750 msgid "there were shadowed variables." msgstr "wyst±pi³y przykryte zmienne." #: awkgram.y:2823 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "funkcja `%s': nie mo¿na u¿yæ nazwy funkcji jako nazwy parametru" #: awkgram.y:2833 #, c-format msgid "function name `%s' previously defined" msgstr "nazwa funkcji `%s' zosta³a zdefiniowana poprzednio" #: awkgram.y:2984 awkgram.y:2990 #, c-format msgid "function `%s' called but never defined" msgstr "funkcja `%s' zosta³a wywo³ana, ale nigdy nie zosta³a zdefiniowana" #: awkgram.y:2993 #, c-format msgid "function `%s' defined but never called" msgstr "funkcja `%s' zosta³a zdefiniowana, ale nigdy nie zosta³a wywo³ana" #: awkgram.y:3020 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "sta³e wyra¿enie regularne dla parametru #%d daje warto¶æ logiczn±" #: awkgram.y:3033 #, c-format msgid "" "function `%s' called with space between name and `(',\n" "or used as a variable or an array" msgstr "" "funkcja `%s' zosta³a wywo³ana z bia³ymi znakami pomiêdzy jej nazw± a znakiem " "`(',\n" "lub u¿yta jako zmienna lub jako tablica" #: builtin.c:149 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s do \"%s\" nie powiód³ siê (%s)" #: builtin.c:150 msgid "standard output" msgstr "standardowe wyj¶cie" #: builtin.c:151 msgid "reason unknown" msgstr "nieznany powód" #: builtin.c:164 msgid "exp: received non-numeric argument" msgstr "exp: otrzymano argument nie bêd±cy liczb±" #: builtin.c:170 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: argument %g jest poza zasiêgiem" #: builtin.c:228 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" "fflush: nie mo¿na opró¿niæ: potok `%s' otwarty do czytania, a nie do zapisu" #: builtin.c:231 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "" "fflush: nie mo¿na opró¿niæ: plik `%s' otwarty do czytania, a nie do zapisu" #: builtin.c:243 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "fflush: `%s' nie jest ani otwartym plikiem, ani potokiem, ani procesem" #: builtin.c:338 msgid "index: received non-string first argument" msgstr "index: otrzymano pierwszy argument, który nie jest ³añcuchem" #: builtin.c:340 msgid "index: received non-string second argument" msgstr "index: otrzymano drugi argument, który nie jest ³añcuchem" #: builtin.c:454 msgid "int: received non-numeric argument" msgstr "int: otrzymano argument, który nie jest liczb±" #: builtin.c:471 msgid "length: received non-string argument" msgstr "length: otrzymano argument, który nie jest ³añcuchem" #: builtin.c:487 msgid "log: received non-numeric argument" msgstr "log: otrzymano argument, który nie jest liczb±" #: builtin.c:490 #, c-format msgid "log: received negative argument %g" msgstr "log: otrzymano ujemny argument %g" #: builtin.c:654 builtin.c:657 msgid "must use `count$' on all formats or none" msgstr "nale¿y u¿yæ `count$' we wszystkich formatach lub nic" #: builtin.c:759 msgid "`$' is not permitted in awk formats" msgstr "`$' jest niedozwolony w formatach awk" #: builtin.c:765 msgid "arg count with `$' must be > 0" msgstr "argument count z `$' musi byæ > 0" #: builtin.c:767 #, c-format msgid "arg count %ld greater than total number of supplied arguments" msgstr "argument count %ld wiêkszy ni¿ ca³kowita suma argumentów dostarczonych" #: builtin.c:769 msgid "`$' not permitted after period in format" msgstr "`$' jest niedozwolony po kropce w formacie" #: builtin.c:782 msgid "no `$' supplied for positional field width or precision" msgstr "brak `$' dla pozycyjnej szeroko¶ci pola lub precyzji" #: builtin.c:848 msgid "`l' is meaningless in awk formats; ignored" msgstr "`l' jest bezsensowny w formatach awk; zignorowany" #: builtin.c:852 msgid "`l' is not permitted in POSIX awk formats" msgstr "`l' jest niedozwolony w formatach POSIX awk" #: builtin.c:863 msgid "`L' is meaningless in awk formats; ignored" msgstr "`L' jest bezsensowny w formatach awk; zignorowany" #: builtin.c:867 msgid "`L' is not permitted in POSIX awk formats" msgstr "`L' jest niedozwolony w formatach POSIX awk" #: builtin.c:878 msgid "`h' is meaningless in awk formats; ignored" msgstr "`h' jest bezsensowny w formatach awk; zignorowany" #: builtin.c:882 msgid "`h' is not permitted in POSIX awk formats" msgstr "`h' jest niedozwolony w formatach POSIX awk" #: builtin.c:1111 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" msgstr "[s]printf: warto¶æ %g jest poza zasiêgiem dla formatu `%%%c'" #: builtin.c:1171 msgid "not enough arguments to satisfy format string" msgstr "" "brak wystarczaj±cej liczby argumentów, aby zaspokoiæ ³añcuch formatuj±cy" #: builtin.c:1173 msgid "^ ran out for this one" msgstr "zabrak³o ^" #: builtin.c:1178 msgid "[s]printf: format specifier does not have control letter" msgstr "[s]printf: specyfikator formatu nie posiada kontrolnej litery" #: builtin.c:1181 msgid "too many arguments supplied for format string" msgstr "zbyt du¿o podanych argumentów w ³añcuchu formatuj±cym" #: builtin.c:1247 builtin.c:1250 msgid "printf: no arguments" msgstr "printf: brak argumentów" #: builtin.c:1274 msgid "sqrt: received non-numeric argument" msgstr "sqrt: otrzymano argument, który nie jest liczb±" #: builtin.c:1278 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: wywo³ana z ujemnym argumentem %g" #: builtin.c:1301 #, c-format msgid "substr: start index %g is invalid, using 1" msgstr "substr: pocz±tkowy indeks %g jest nieprawid³owy, nast±pi u¿ycie 1" #: builtin.c:1306 #, c-format msgid "substr: non-integer start index %g will be truncated" msgstr "" "substr: pocz±tkowy indeks %g, który nie jest liczb± ca³kowit±, zostanie " "obciêty" #: builtin.c:1325 #, c-format msgid "substr: length %g is not >= 1" msgstr "substr: d³ugo¶æ %g nie jest >= 1" #: builtin.c:1327 #, c-format msgid "substr: length %g is not >= 0" msgstr "substr: d³ugo¶æ %g nie jest >= 0" #: builtin.c:1334 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: d³ugo¶æ %g, która nie jest liczb± ca³kowit±, zostanie obciêta" #: builtin.c:1339 #, c-format msgid "substr: length %g too big for string indexing, truncating to %g" msgstr "substr: d³ugo¶æ %g zbyt du¿a dla indeksu ³añcucha, obcinanie do %g" #: builtin.c:1351 msgid "substr: source string is zero length" msgstr "substr: ³añcuch ¼ród³owy ma zerow± d³ugo¶æ" #: builtin.c:1357 #, c-format msgid "substr: start index %g is past end of string" msgstr "substr: pocz±tkowy indeks %g le¿y poza koñcem ³añcucha" #: builtin.c:1365 #, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" msgstr "" "substr: d³ugo¶æ %g zaczynaj±c od %g przekracza d³ugo¶æ pierwszego argumentu " "(%lu)" #: builtin.c:1400 msgid "strftime: received non-string first argument" msgstr "strftime: otrzymano pierwszy argument, który nie jest ³añcuchem" #: builtin.c:1406 msgid "strftime: received empty format string" msgstr "strftime: otrzymano pusty ³añcuch formatuj±cy" #: builtin.c:1415 msgid "strftime: received non-numeric second argument" msgstr "strftime: otrzymano drugi argument, który nie jest liczb±" #: builtin.c:1478 msgid "mktime: received non-string argument" msgstr "mktime: otrzymano argument, który nie jest ³añcuchem" #: builtin.c:1523 msgid "system: received non-string argument" msgstr "system: otrzymano argument, który nie jest ³añcuchem" #: builtin.c:1644 eval.c:2019 #, c-format msgid "reference to uninitialized field `$%d'" msgstr "odwo³anie do niezainicjowanego pola `$%d'" #: builtin.c:1671 msgid "tolower: received non-string argument" msgstr "tolower: otrzymano argument, który nie jest ³añcuchem" #: builtin.c:1720 msgid "toupper: received non-string argument" msgstr "toupper: otrzymano argument, który nie jest ³añcuchem" #: builtin.c:1765 msgid "atan2: received non-numeric first argument" msgstr "atan2: otrzymano pierwszy argument, który nie jest liczb±" #: builtin.c:1767 msgid "atan2: received non-numeric second argument" msgstr "atan2: otrzymano drugi argument, który nie jest liczb±" #: builtin.c:1786 msgid "sin: received non-numeric argument" msgstr "sin: otrzymano argument, który nie jest liczb±" #: builtin.c:1802 msgid "cos: received non-numeric argument" msgstr "cos: otrzymano argument, który nie jest liczb±" #: builtin.c:1852 msgid "srand: received non-numeric argument" msgstr "srand: otrzymano argument, który nie jest liczb±" #: builtin.c:1887 msgid "match: third argument is not an array" msgstr "match: otrzymano trzeci argument, który nie jest tablic±" #: builtin.c:2414 msgid "gensub: third argument of 0 treated as 1" msgstr "gensub: trzeci argument 0 potraktowany jako 1" #: builtin.c:2572 msgid "lshift: received non-numeric first argument" msgstr "lshift: otrzymano pierwszy argument, który nie jest liczb±" #: builtin.c:2574 msgid "lshift: received non-numeric second argument" msgstr "lshift: otrzymano drugi argument, który nie jest liczb±" #: builtin.c:2580 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "lshift(%lf, %lf): ujemne warto¶ci spowoduj± dziwne wyniki" #: builtin.c:2582 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): u³amkowe warto¶ci zostan± obciête" #: builtin.c:2584 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "" "lshift(%lf, %lf): zbyt du¿a warto¶æ przesuniêcia spowoduje dziwne wyniki" #: builtin.c:2610 msgid "rshift: received non-numeric first argument" msgstr "rshift: otrzymano pierwszy argument, który nie jest liczb±" #: builtin.c:2612 msgid "rshift: received non-numeric second argument" msgstr "rshift: otrzymano drugi argument, który nie jest liczb±" #: builtin.c:2618 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "rshift(%lf, %lf): ujemne warto¶ci spowoduj± dziwne wyniki" #: builtin.c:2620 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): u³amkowe warto¶ci zostan± obciête" #: builtin.c:2622 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "" "rshift(%lf, %lf): zbyt du¿a warto¶æ przesuniêcia spowoduje dziwne wyniki" #: builtin.c:2648 msgid "and: received non-numeric first argument" msgstr "and: otrzymano pierwszy argument, który nie jest liczb±" #: builtin.c:2650 msgid "and: received non-numeric second argument" msgstr "and: otrzymano drugi argument, który nie jest liczb±" #: builtin.c:2656 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "and(%lf, %lf): ujemne warto¶ci spowoduj± dziwne wyniki" #: builtin.c:2658 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): u³amkowe warto¶ci zostan± obciête" #: builtin.c:2684 msgid "or: received non-numeric first argument" msgstr "or: otrzymano pierwszy argument, który nie jest liczb±" #: builtin.c:2686 msgid "or: received non-numeric second argument" msgstr "or: otrzymano drugi argument, który nie jest liczb±" #: builtin.c:2692 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "or(%lf, %lf): ujemne warto¶ci spowoduj± dziwne wyniki" #: builtin.c:2694 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): u³amkowe warto¶ci zostan± obciête" #: builtin.c:2720 msgid "xor: received non-numeric first argument" msgstr "xor: otrzymano pierwszy argument, który nie jest liczb±" #: builtin.c:2722 msgid "xor: received non-numeric second argument" msgstr "xor: otrzymano drugi argument, który nie jest liczb±" #: builtin.c:2728 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "xor(%lf, %lf): ujemne warto¶ci spowoduj± dziwne wyniki" #: builtin.c:2730 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): u³amkowe warto¶ci zostan± obciête" #: builtin.c:2754 msgid "compl: received non-numeric argument" msgstr "compl: otrzymano argument, który nie jest liczb±" #: builtin.c:2760 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): ujemne warto¶ci spowoduj± dziwne wyniki" #: builtin.c:2762 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): u³amkowe warto¶ci zostan± obciête" #: builtin.c:2935 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: `%s' nie jest prawid³ow± kategori± lokalizacji" #: eval.c:303 #, c-format msgid "unknown nodetype %d" msgstr "nieznany typ wêz³a %d" #: eval.c:350 msgid "buffer overflow in genflags2str" msgstr "przepe³nienie bufora w genflags2str" #: eval.c:382 eval.c:388 profile.c:837 #, c-format msgid "attempt to use array `%s' in a scalar context" msgstr "próba u¿ycia tablicy `%s' w kontek¶cie skalaru" #: eval.c:730 #, c-format msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" "pêtla for: tablica `%s' zmieni³a rozmiar z %ld do %ld podczas wykonywania " "pêtli" #: eval.c:751 msgid "`break' outside a loop is not portable" msgstr "instrukcja `break' poza pêtl± jest nieprzeno¶na" #: eval.c:755 msgid "`break' outside a loop is not allowed" msgstr "instrukcja `break' poza pêtl± jest niedozwolona" #: eval.c:772 msgid "`continue' outside a loop is not portable" msgstr "instrukcja `continue' poza pêtl± jest nieprzeno¶na" #: eval.c:776 msgid "`continue' outside a loop is not allowed" msgstr "instrukcja `continue' poza pêtl± jest niedozwolona" #: eval.c:810 msgid "`next' cannot be called from a BEGIN rule" msgstr "instrukcja `next' nie mo¿e byæ wywo³ana z wnêtrza regu³y BEGIN" #: eval.c:812 msgid "`next' cannot be called from an END rule" msgstr "instrukcja `next' nie mo¿e byæ wywo³ana z wnêtrza regu³y END" #: eval.c:821 msgid "`nextfile' cannot be called from a BEGIN rule" msgstr "instrukcja `nextfile' nie mo¿e byæ wywo³ana z wnêtrza regu³y BEGIN" #: eval.c:823 msgid "`nextfile' cannot be called from an END rule" msgstr "instrukcja `nextfile' nie mo¿e byæ wywo³ana z wnêtrza regu³y END" #: eval.c:872 msgid "statement has no effect" msgstr "instrukcja nie ma ¿adnego efektu" #: eval.c:915 eval.c:1873 #, c-format msgid "can't use function name `%s' as variable or array" msgstr "nie mo¿na u¿yæ nazwy funkcji `%s' jako zmiennej lub tablicy" #: eval.c:922 eval.c:928 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "odwo³anie do niezainicjowanego argumentu `%s'" #: eval.c:937 eval.c:1882 #, c-format msgid "reference to uninitialized variable `%s'" msgstr "odwo³anie do niezainicjowanej zmiennej `%s'" #: eval.c:1083 msgid "" "concatenation: side effects in one expression have changed the length of " "another!" msgstr "" "konkatenacja: skutki uboczne w jednym wyra¿eniu spowodowa³y zmianê d³ugo¶ci " "innego wyra¿enia!" #: eval.c:1162 msgid "assignment used in conditional context" msgstr "przypisanie u¿yte w kontek¶cie warunkowym" #: eval.c:1252 msgid "division by zero attempted" msgstr "próba dzielenia przez zero" #: eval.c:1267 #, c-format msgid "division by zero attempted in `%%'" msgstr "próba dzielenia przez zero w `%%'" #: eval.c:1282 profile.c:713 #, c-format msgid "illegal type (%s) in tree_eval" msgstr "nieprawid³owy typ (%s) w tree_eval" #: eval.c:1459 msgid "division by zero attempted in `/='" msgstr "próba dzielenia przez zero w `/='" #: eval.c:1477 #, c-format msgid "division by zero attempted in `%%='" msgstr "próba dzielenia przez zero w `%%='" #: eval.c:1738 #, c-format msgid "function `%s' called with more arguments than declared" msgstr "" "funkcja `%s' zosta³a wywo³ana z wiêksz± ilo¶ci± argumentów ni¿ zosta³o to " "zadeklarowane" #: eval.c:1782 #, c-format msgid "function `%s' not defined" msgstr "funkcja `%s' nie zosta³a zdefiniowana" #: eval.c:1788 #, c-format msgid "function %s called\n" msgstr "wywo³ano funkcjê %s\n" #: eval.c:1845 #, c-format msgid "" "\n" "\t# Function Call Stack:\n" "\n" msgstr "" "\n" "\t# Stos Wywo³awczy Funkcji:\n" "\n" #: eval.c:1848 #, c-format msgid "\t# -- main --\n" msgstr "\t# -- g³ówne --\n" #: eval.c:2003 msgid "attempt to field reference from non-numeric value" msgstr "próba odwo³ania do pola poprzez nienumeryczn± warto¶æ" #: eval.c:2005 msgid "attempt to reference from null string" msgstr "próba odwo³ania z zerowego ³añcucha" #: eval.c:2011 #, c-format msgid "attempt to access field %d" msgstr "próba dostêpu do pola %d" #: eval.c:2032 eval.c:2039 profile.c:934 msgid "assignment is not allowed to result of builtin function" msgstr "przypisanie do wyniku wbudowanej funkcji nie jest dozwolone" #: eval.c:2103 msgid "`IGNORECASE' is a gawk extension" msgstr "`IGNORECASE' jest rozszerzeniem gawk" #: eval.c:2133 msgid "`BINMODE' is a gawk extension" msgstr "`BINMODE' jest rozszerzeniem gawk" #: eval.c:2255 #, c-format msgid "bad `%sFMT' specification `%s'" msgstr "z³a specyfikacja `%sFMT' `%s'" #: eval.c:2333 msgid "turning off `--lint' due to assignment to `LINT'" msgstr "wy³±czenie `--lint' z powodu przypisania do `LINT'" #: ext.c:60 ext.c:64 msgid "`extension' is a gawk extension" msgstr "`extension' jest rozszerzeniem gawk" #: ext.c:74 #, c-format msgid "extension: cannot open `%s' (%s)\n" msgstr "rozszerzenie: nie mo¿na otworzyæ `%s' (%s)\n" #: ext.c:82 #, c-format msgid "extension: library `%s': cannot call function `%s' (%s)\n" msgstr "rozszerzenie: biblioteka `%s': nie mo¿na wywo³aæ funkcji `%s' (%s)\n" #: ext.c:102 msgid "extension: missing function name" msgstr "rozszerzenie: brakuj±ca nazwa funkcji" #: ext.c:107 #, c-format msgid "extension: illegal character `%c' in function name `%s'" msgstr "rozszerzenie: nieprawid³owy znak `%c' w nazwie funkcji `%s'" #: ext.c:113 #, c-format msgid "extension: can't redefine function `%s'" msgstr "rozszerzenie: nie mo¿na zredefiniowaæ funkcji `%s'" #: ext.c:117 #, c-format msgid "extension: function `%s' already defined" msgstr "rozserzenie: funkcja `%s' zosta³a ju¿ zdefiniowana" #: ext.c:122 #, c-format msgid "extension: can't use gawk built-in `%s' as function name" msgstr "rozszerzenie: nie mo¿na u¿yæ wbudowanej w gawk `%s' jako nazwy funkcji" #: ext.c:124 #, c-format msgid "extension: function name `%s' previously defined" msgstr "rozserzenie: nazwa funkcji `%s' zosta³a zdefiniowana wcze¶niej" #: ext.c:201 #, c-format msgid "function `%s' defined to take no more than `%d' argument(s)" msgstr "funkcja `%s' zdefiniowana aby pobraæ nie wiêcej ni¿ `%d' argument(ów)" #: ext.c:204 #, c-format msgid "function `%s': missing argument #%d" msgstr "funkcja `%s': brakuje #%d argumentu" #: ext.c:214 #, c-format msgid "function `%s': argument #%d: attempt to use scalar as an array" msgstr "funkcja `%s': argument #%d: próba u¿ycia skalaru jako tablicy" #: ext.c:218 #, c-format msgid "function `%s': argument #%d: attempt to use array as a scalar" msgstr "funkcja `%s': argument #%d: próba u¿ycia tablicy jako skalaru" #: ext.c:243 msgid "Operation Not Supported" msgstr "Operacja nie jest wspierana" #: field.c:315 msgid "NF set to negative value" msgstr "NF ustawiony na warto¶æ ujemn±" #: field.c:808 msgid "split: second argument is not an array" msgstr "split: drugi argument nie jest tablic±" #: field.c:842 msgid "split: null string for third arg is a gawk extension" msgstr "split: zerowy ³añcuch dla trzeciego argumentu jest rozszerzeniem gawk" #: field.c:894 msgid "`FIELDWIDTHS' is a gawk extension" msgstr "`FIELDWIDTHS' jest rozszerzeniem gawk" #: field.c:921 #, c-format msgid "field %d in FIELDWIDTHS, must be > 0" msgstr "pole nr %d w FIELDWIDTHS musi byæ wiêksze od zera" #: field.c:994 msgid "null string for `FS' is a gawk extension" msgstr "zerowy ³añcuch dla `FS' jest rozszerzeniem gawk" #: getopt.c:692 getopt.c:711 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s: opcja `%s' jest niejednoznaczna\n" #: getopt.c:744 getopt.c:748 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "%s: opcja `--%s' nie mo¿e mieæ argumentów\n" #: getopt.c:757 getopt.c:762 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "%s: opcja `%c%s' nie mo¿e mieæ argumentów\n" #: getopt.c:807 getopt.c:829 getopt.c:1159 getopt.c:1181 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "%s: opcja `%s' musi mieæ argument\n" #: getopt.c:867 getopt.c:870 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s: nieznana opcja `--%s'\n" #: getopt.c:878 getopt.c:881 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s: nieznana opcja `%c%s'\n" #: getopt.c:936 getopt.c:939 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: niew³a¶ciwa opcja -- %c\n" #: getopt.c:945 getopt.c:948 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s: b³êdna opcja -- %c\n" #: getopt.c:1003 getopt.c:1022 getopt.c:1234 getopt.c:1255 main.c:433 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: opcja musi mieæ argument -- %c\n" #: getopt.c:1074 getopt.c:1093 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s: opcja `-W %s' jest niejednoznaczna\n" #: getopt.c:1117 getopt.c:1138 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: opcja `-W %s' nie mo¿e mieæ argumentów\n" #: io.c:308 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "nie mo¿na otworzyæ pliku `%s' do czytania (%s)" #: io.c:395 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "zamkniêcie fd %d (`%s') nie powiod³o siê (%s)" #: io.c:533 #, c-format msgid "invalid tree type %s in redirect()" msgstr "nieprawid³owy typ drzewa %s w funkcji redirect()" #: io.c:539 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "wyra¿enie w przekierowaniu `%s' ma tylko warto¶æ numeryczn±" #: io.c:545 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "wyra¿enie dla przekierowania `%s' ma zerow± warto¶æ ³añcucha" #: io.c:550 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "nazwa pliku `%s' dla przekierowania `%s' mo¿e byæ rezultatem logicznego " "wyra¿enia" #: io.c:588 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "niepotrzebne mieszanie `>' i `>>' dla pliku `%.*s'" #: io.c:640 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "nie mo¿na otworzyæ potoku `%s' jako wyj¶cia (%s)" #: io.c:649 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "nie mo¿na otworzyæ potoku `%s' jako wej¶cia (%s)" #: io.c:662 #, c-format msgid "can't open two way socket `%s' for input/output (%s)" msgstr "" "nie mo¿na otworzyæ dwukierunkowego gniazda `%s' jako wej¶cia/wyj¶cia (%s)" #: io.c:666 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "" "nie mo¿na otworzyæ dwukierunkowego potoku `%s' jako wej¶cia/wyj¶cia (%s)" #: io.c:742 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "nie mo¿na przekierowaæ z `%s' (%s)" #: io.c:745 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "nie mo¿na przekierowaæ do `%s' (%s)" #: io.c:784 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "osi±gniêto systemowy limit otwartych plików: rozpoczêcie multipleksowania " "deskryptorów plików" #: io.c:800 #, c-format msgid "close of `%s' failed (%s)." msgstr "zamkniêcie `%s' nie powiod³o siê (%s)." #: io.c:808 msgid "too many pipes or input files open" msgstr "zbyt du¿o otwartych potoków lub plików wej¶ciowych" #: io.c:831 msgid "close: second argument must be `to' or `from'" msgstr "close: drugim argumentem musi byæ `to' lub `from'" #: io.c:845 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "" "close: `%.*s' nie jest ani otwartym plikiem, ani potokiem, ani procesem" #: io.c:849 msgid "close of redirection that was never opened" msgstr "zamkniêcie przekierowania, które nigdy nie zosta³o otwarte" #: io.c:945 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: przekierowanie `%s' nie zosta³o otwarte z `|&', drugi argument " "zignorowany" #: io.c:960 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "status awarii (%d) podczas zamykania potoku `%s' (%s)" #: io.c:963 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "status awarii (%d) podczas zamykania pliku `%s' (%s)" #: io.c:983 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "brak jawnego zamkniêcia gniazdka `%s'" #: io.c:986 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "brak jawnego zamkniêcia procesu pomocniczego `%s'" #: io.c:989 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "brak jawnego zamkniêcia potoku `%s'" #: io.c:992 #, c-format msgid "no explicit close of file `%s' provided" msgstr "brak jawnego zamkniêcia pliku `%s'" #: io.c:1021 io.c:1075 #, c-format msgid "error writing standard output (%s)" msgstr "b³±d podczas zapisu na standardowe wyj¶cie (%s)" #: io.c:1025 io.c:1079 #, c-format msgid "error writing standard error (%s)" msgstr "b³±d podczas zapisu na standardowe wyj¶cie diagnostyczne (%s)" #: io.c:1033 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "opró¿nienie potoku `%s' nie powiod³o siê (%s)." #: io.c:1036 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "" "opró¿nienie potoku do `%s' przez proces pomocniczy nie powiod³o siê (%s)." #: io.c:1039 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "opró¿nienie pliku `%s' nie powiod³o siê (%s)." #: io.c:1198 msgid "/inet/raw client not ready yet, sorry" msgstr "klient /inet/raw nie jest jeszcze gotowy, przykro mi" #: io.c:1200 io.c:1237 msgid "only root may use `/inet/raw'." msgstr "tylko superu¿ytkownik (root) mo¿e u¿yæ `/inet/raw'." #: io.c:1235 msgid "/inet/raw server not ready yet, sorry" msgstr "serwer /inet/raw nie jest jeszcze gotowy, przykro mi" #: io.c:1325 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "nie dostarczono (znanego) protoko³u w specjalnym pliku `%s'" #: io.c:1343 #, c-format msgid "special file name `%s' is incomplete" msgstr "specjalna nazwa pliku `%s' jest niekompletna" #: io.c:1355 #, c-format msgid "local port invalid in `%s'" msgstr "nieprawid³owy lokalny port `%s'" #: io.c:1367 msgid "must supply a remote hostname to `/inet'" msgstr "nale¿y dostarczyæ nazwê zdalnego hosta do `/inet'" #: io.c:1382 msgid "must supply a remote port to `/inet'" msgstr "nale¿y dostarczyæ numer zdalnego portu do `/inet'" #: io.c:1388 #, c-format msgid "remote port invalid in `%s'" msgstr "nieprawid³owy zdalny port w `%s'" #: io.c:1398 msgid "TCP/IP communications are not supported" msgstr "Komunikacja TCP/IP nie jest wspierana" #: io.c:1407 io.c:1588 #, c-format msgid "file `%s' is a directory" msgstr "plik `%s' jest katalogiem" #: io.c:1477 #, c-format msgid "use `PROCINFO[\"%s\"]' instead of `%s'" msgstr "u¿yj `PROCINFO[\"%s\"]' zamiast `%s'" #: io.c:1509 msgid "use `PROCINFO[...]' instead of `/dev/user'" msgstr "u¿yj `PROCINFO[...]' zamiast `/dev/user'" #: io.c:1574 io.c:1748 #, c-format msgid "could not open `%s', mode `%s'" msgstr "nie mo¿na otworzyæ `%s', tryb `%s'" #: io.c:1799 #, c-format msgid "close of master pty failed (%s)" msgstr "zamkniêcie nadrzêdnego pty nie powiod³o siê (%s)" #: io.c:1801 io.c:1953 io.c:2105 #, c-format msgid "close of stdout in child failed (%s)" msgstr "" "zamkniêcie standardowego wyj¶cia w procesie potomnym nie powiod³o siê (%s)" #: io.c:1804 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "" "przesuniêcie podleg³ego pty na standardowe wyj¶cie w procesie potomnym nie " "powiod³o siê (dup: %s)" #: io.c:1806 io.c:1958 #, c-format msgid "close of stdin in child failed (%s)" msgstr "" "zamkniêcie standardowego wej¶cia w procesie potomnym nie powiod³o siê (%s)" #: io.c:1809 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "" "przesuniêcie podleg³ego pty na standardowe wej¶cie w procesie potomnym nie " "powiod³o siê (dup: %s)" #: io.c:1811 io.c:1830 #, c-format msgid "close of slave pty failed (%s)" msgstr "zamkniêcie podleg³ego pty nie powiod³o siê (%s)" #: io.c:1904 io.c:1956 io.c:2086 io.c:2108 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "" "przesuniêcie potoku na standardowe wyj¶cie w procesie potomnym nie powiod³o " "siê (dup: %s)" #: io.c:1908 io.c:1961 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "" "przesuniêcie potoku na standardowe wej¶cie w procesie potomnym nie powiod³o " "siê (dup: %s)" #: io.c:1925 io.c:2099 msgid "restoring stdout in parent process failed\n" msgstr "" "odzyskanie standardowego wyj¶cia w procesie potomnym nie powiod³o siê\n" #: io.c:1930 msgid "restoring stdin in parent process failed\n" msgstr "" "odzyskanie standardowego wej¶cia w procesie potomnym nie powiod³o siê\n" #: io.c:1964 io.c:2110 io.c:2121 #, c-format msgid "close of pipe failed (%s)" msgstr "zamkniêcie potoku nie powiod³o siê (%s)" #: io.c:2009 msgid "`|&' not supported" msgstr "`|&' nie jest wspierany" #: io.c:2076 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "nie mo¿na otworzyæ potoku `%s' (%s)" #: io.c:2117 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "nie mo¿na utworzyæ procesu potomnego dla `%s' (fork: %s)" #: io.c:2460 #, c-format msgid "data file `%s' is empty" msgstr "plik danych `%s' jest pusty" #: io.c:2503 io.c:2511 msgid "could not allocate more input memory" msgstr "nie mo¿na zarezerwowaæ wiêcej pamiêci wej¶ciowej" #: io.c:2869 io.c:2932 #, c-format msgid "error reading input file `%s': %s" msgstr "b³±d podczas czytania z pliku `%s': %s" #: io.c:3057 msgid "multicharacter value of `RS' is a gawk extension" msgstr "wieloznakowa warto¶æ `RS' jest rozszerzeniem gawk" #: main.c:323 msgid "`-m[fr]' option irrelevant in gawk" msgstr "nieistotna opcja `-m[fr]' w gawk" #: main.c:325 msgid "-m option usage: `-m[fr] nnn'" msgstr "u¿ycie opcji -m: `-m[fr] nnn'" #: main.c:342 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: opcja `-W %s' nierozpoznana i zignorowana\n" #: main.c:379 msgid "empty argument to `--source' ignored" msgstr "pusty argument dla opcji `--source' zosta³ zignorowany" #: main.c:450 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" "zmienna ¶rodowiskowa `POSIXLY_CORRECT' ustawiona: `--posix' zosta³ w³±czony" #: main.c:455 msgid "`--posix' overrides `--traditional'" msgstr "opcja `--posix' zostanie u¿yta nad `--traditional'" #: main.c:466 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "`--posix'/`--traditional' u¿yte nad opcj± `--non-decimal-data'" #: main.c:470 #, c-format msgid "running %s setuid root may be a security problem" msgstr "" "uruchamianie %s setuid root mo¿e byæ problemem pod wzglêdem bezpieczeñstwa" #: main.c:511 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "nie mo¿na ustawiæ trybu binarnego na standardowym wej¶ciu (%s)" #: main.c:514 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "nie mo¿na ustawiæ trybu binarnego na standardowym wyj¶ciu (%s)" #: main.c:516 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "nie mo¿na ustawiæ trybu binarnego na wyj¶ciu diagnostycznym (%s)" #: main.c:546 msgid "no program text at all!" msgstr "brak tekstu programu!" #: main.c:623 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "" "U¿ycie: %s [styl opcji POSIX lub GNU] -f plik_z_programem [--] plik ...\n" #: main.c:625 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "U¿ycie: %s [styl opcji POSIX lub GNU] [--] %cprogram%c plik ...\n" #: main.c:630 msgid "POSIX options:\t\tGNU long options:\n" msgstr "Opcje POSIX:\t\tD³ugie opcje GNU:\n" #: main.c:631 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f program\t\t--file=program\n" #: main.c:632 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F fs\t\t\t--field-separator=fs\n" #: main.c:633 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v zmienna=warto¶æ\t--assign=zmienna=warto¶æ\n" #: main.c:634 msgid "\t-m[fr] val\n" msgstr "\t-m[fr] warto¶æ\n" #: main.c:635 msgid "\t-W compat\t\t--compat\n" msgstr "\t-W compat\t\t--compat\n" #: main.c:636 msgid "\t-W copyleft\t\t--copyleft\n" msgstr "\t-W copyleft\t\t--copyleft\n" #: main.c:637 msgid "\t-W copyright\t\t--copyright\n" msgstr "\t-W copyright\t\t--copyright\n" #: main.c:638 msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" msgstr "\t-W dump-variables[=plik]\t--dump-variables[=plik]\n" #: main.c:639 msgid "\t-W gen-po\t\t--gen-po\n" msgstr "\t-W gen-po\t\t--gen-po\n" #: main.c:640 msgid "\t-W help\t\t\t--help\n" msgstr "\t-W help\t\t\t--help\n" #: main.c:641 msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" #: main.c:642 msgid "\t-W lint-old\t\t--lint-old\n" msgstr "\t-W lint-old\t\t--lint-old\n" #: main.c:643 msgid "\t-W non-decimal-data\t--non-decimal-data\n" msgstr "\t-W non-decimal-data\t--non-decimal-data\n" #: main.c:645 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" #: main.c:648 msgid "\t-W parsedebug\t\t--parsedebug\n" msgstr "\t-W parsedebug\t\t--parsedebug\n" #: main.c:650 msgid "\t-W profile[=file]\t--profile[=file]\n" msgstr "\t-W profile[=plik]\t--profile[=plik]\n" #: main.c:651 msgid "\t-W posix\t\t--posix\n" msgstr "\t-W posix\t\t--posix\n" #: main.c:652 msgid "\t-W re-interval\t\t--re-interval\n" msgstr "\t-W re-interval\t\t--re-interval\n" #: main.c:653 msgid "\t-W source=program-text\t--source=program-text\n" msgstr "\t-W source=tekst-programu\t--source=tekst-programu\n" #: main.c:654 msgid "\t-W traditional\t\t--traditional\n" msgstr "\t-W traditional\t\t--traditional\n" #: main.c:655 msgid "\t-W usage\t\t--usage\n" msgstr "\t-W usage\t\t--usage\n" #: main.c:656 msgid "\t-W version\t\t--version\n" msgstr "\t-W version\t\t--version\n" #: main.c:660 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" "section `Reporting Problems and Bugs' in the printed version.\n" "\n" msgstr "" "\n" "Aby zg³osiæ b³±d, prosimy zobaczyæ wêze³ `Bugs' w `gawk.info'\n" "lub rozdzia³ p.t. `Reporting Problems and Bugs' w wydrukowanej\n" "dokumentacji.\n" "\n" #: main.c:664 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" "\n" msgstr "" "gawk jest jêzykiem skanowania i przetwarzania wzorców.\n" "Program domy¶lnie czyta standardowe wej¶cie i zapisuje standardowe wyj¶cie.\n" "\n" #: main.c:668 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" msgstr "" "Przyk³ady:\n" "\tgawk '{ suma += $1 }; END { print suma }' plik\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" #: main.c:685 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" "\n" "This program 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 2 of the License, or\n" "(at your option) any later version.\n" "\n" msgstr "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" "\n" "Ten program jest wolnym oprogramowaniem; mo¿esz go rozprowadzaæ dalej\n" "i/lub modyfikowaæ na warunkach Powszechnej Licencji Publicznej GNU,\n" "wydanej przez Fundacjê Wolnego Oprogramowania - wed³ug wersji 2-giej\n" "tej Licencji lub której¶ z pó¼niejszych wersji.\n" "\n" #: main.c:693 msgid "" "This program 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" msgstr "" "Ten program rozpowszechniany jest z nadziej±, i¿ bêdzie on\n" "u¿yteczny - jednak BEZ JAKIEJKOLWIEK GWARANCJI, nawet domy¶lnej\n" "gwarancji PRZYDATNO¦CI HANDLOWEJ albo PRZYDATNO¦CI DO OKRE¦LONYCH\n" "ZASTOSOWAÑ. W celu uzyskania bli¿szych informacji przeczytaj\n" "Powszechn± Licencjê Publiczn± GNU.\n" "\n" #: main.c:699 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, write to the Free Software\n" "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n" msgstr "" "Z pewno¶ci± wraz z niniejszym programem otrzyma³e¶ te¿ egzemplarz\n" "Powszechnej Licencji Publicznej GNU (GNU General Public License);\n" "je¶li za¶ nie - napisz do Free Software Foundation, Inc., \n" "59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n" #: main.c:733 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft nie ustawia FS na znak tabulatora w POSIX awk" #: main.c:962 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" "\n" msgstr "" "%s: argument `%s' dla `-v' nie jest zgodny ze sk³adni± `zmienna=warto¶æ'\n" "\n" #: main.c:982 #, c-format msgid "`%s' is not a legal variable name" msgstr "`%s' nie jest dozwolon± nazw± zmiennej" #: main.c:985 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "`%s' nie jest nazw± zmiennej, szukanie pliku `%s=%s'" #: main.c:1018 msgid "floating point exception" msgstr "wyj±tek zmiennopozycyjny" #: main.c:1025 msgid "fatal error: internal error" msgstr "fatalny b³±d: wewnêtrzny b³±d" #: main.c:1075 #, c-format msgid "no pre-opened fd %d" msgstr "brak ju¿ otwartego fd %d" #: main.c:1082 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "nie mo¿na otworzyæ zawczasu /dev/null dla fd %d" #: main.c:1105 main.c:1114 #, c-format msgid "could not find groups: %s" msgstr "nie mo¿na znale¼æ grup: %s" #: msg.c:54 #, c-format msgid "cmd. line:" msgstr "linia poleceñ:" #: msg.c:120 msgid "warning: " msgstr "ostrze¿enie: " #: msg.c:142 msgid "error: " msgstr "b³±d: " #: msg.c:178 msgid "fatal: " msgstr "fatalny b³±d: " #: node.c:58 node.c:65 node.c:74 node.c:88 node.c:115 msgid "can't convert string to float" msgstr "nie mo¿na zamieniæ ³añcucha do liczby zmiennopozycyjnej" #: node.c:357 msgid "backslash at end of string" msgstr "backslash na koñcu ³añcucha" #: node.c:541 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX nie zezwala na sekwencjê ucieczki `\\x'" #: node.c:547 msgid "no hex digits in `\\x' escape sequence" msgstr "brak liczb szesnastkowych w sekwencji ucieczki `\\x'" #: node.c:581 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "sekwencja ucieczki `\\%c' potraktowana jako zwyk³e `%c'" #: posix/gawkmisc.c:172 #, c-format msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" msgstr "%s %s `%s': nie mo¿na ustawiæ close-on-exec: (fcntl: %s)" #: profile.c:91 #, c-format msgid "could not open `%s' for writing: %s" msgstr "nie mo¿na otworzyæ `%s' do zapisu: %s" #: profile.c:467 #, c-format msgid "internal error: %s with null vname" msgstr "wewnêtrzny b³±d: %s z zerowym vname" #: profile.c:530 msgid "# treated internally as `delete'" msgstr "# potraktowany wewnêtrznie jako `delete'" #: profile.c:1167 #, c-format msgid "# this is a dynamically loaded extension function" msgstr "# to jest dynamicznie ³adowana funkcja rozszerzenie" #: profile.c:1198 #, c-format msgid "\t# gawk profile, created %s\n" msgstr "\t# profil programu gawk, utworzony %s\n" #: profile.c:1201 #, c-format msgid "" "\t# BEGIN block(s)\n" "\n" msgstr "" "\t# blok(i) BEGIN\n" "\n" #: profile.c:1211 #, c-format msgid "" "\t# Rule(s)\n" "\n" msgstr "" "\t# Regu³y\n" "\n" #: profile.c:1217 #, c-format msgid "" "\t# END block(s)\n" "\n" msgstr "" "\t# blok(i) END\n" "\n" #: profile.c:1237 #, c-format msgid "" "\n" "\t# Functions, listed alphabetically\n" msgstr "" "\n" "\t# Funkcje, spis alfabetyczny\n" #: profile.c:1452 #, c-format msgid "unexpected type %s in prec_level" msgstr "niespodziewany typ %s w prec_level" #: regcomp.c:150 msgid "Success" msgstr "Sukces" #: regcomp.c:153 msgid "No match" msgstr "Brak dopasowania" #: regcomp.c:156 msgid "Invalid regular expression" msgstr "Nieprawid³owe wyra¿enie regularne" #: regcomp.c:159 msgid "Invalid collation character" msgstr "Nieprawid³owy znak porównania" #: regcomp.c:162 msgid "Invalid character class name" msgstr "Nieprawid³owa nazwa klasy znaku" #: regcomp.c:165 msgid "Trailing backslash" msgstr "Koñcowy znak backslash" #: regcomp.c:168 msgid "Invalid back reference" msgstr "Nieprawid³owe odwo³anie wsteczne" #: regcomp.c:171 msgid "Unmatched [ or [^" msgstr "Niedopasowany znak [ lub [^" #: regcomp.c:174 msgid "Unmatched ( or \\(" msgstr "Niedopasowany znak ( lub \\(" #: regcomp.c:177 msgid "Unmatched \\{" msgstr "Niedopasowany znak \\{" #: regcomp.c:180 msgid "Invalid content of \\{\\}" msgstr "Nieprawid³owa zawarto¶æ \\{\\}" #: regcomp.c:183 msgid "Invalid range end" msgstr "Nieprawid³owy koniec zakresu" #: regcomp.c:186 msgid "Memory exhausted" msgstr "Pamiêæ wyczerpana" #: regcomp.c:189 msgid "Invalid preceding regular expression" msgstr "Nieprawid³owe poprzedzaj±ce wyra¿enie regularne" #: regcomp.c:192 msgid "Premature end of regular expression" msgstr "Przedwczesny koniec wyra¿enia regularnego" #: regcomp.c:195 msgid "Regular expression too big" msgstr "Wyra¿enie regularne jest zbyt du¿e" #: regcomp.c:198 msgid "Unmatched ) or \\)" msgstr "Niedopasowany znak ) lub \\)" #: regcomp.c:668 msgid "No previous regular expression" msgstr "Brak poprzedniego wyra¿enia regularnego" #~ msgid "delete: illegal use of variable `%s' as array" #~ msgstr "delete: nieprawid³owe u¿ycie zmiennej `%s' jako tablicy" #~ msgid "asort: first argument is not an array" #~ msgstr "asort: pierwszy argument nie jest tablic±" #~ msgid "asort: second argument is not an array" #~ msgstr "asort: drugi argument nie jest tablic±" #~ msgid "" #~ "\n" #~ "To report bugs, see node `Bugs' in `gawk.info', which is\n" #~ msgstr "" #~ "\n" #~ "Aby zg³osiæ b³êdy, prosimy zobaczyæ wêze³ `Bugs' w `gawk.info', który " #~ "jest\n" #~ msgid "invalid syntax in name `%s' for variable assignment" #~ msgstr "b³±d sk³adni w nazwie `%s' dla przypisania zmiennej" #~ msgid "internal error: Node_var_array with null vname" #~ msgstr "wewnêtrzny b³±d: Node_var_array z zerowym vname" #~ msgid "or used in other expression context" #~ msgstr "lub u¿yty w innym kontek¶cie wyra¿enia" #~ msgid "`%s' is a function, assignment is not allowed" #~ msgstr "`%s' jest funkcj±, zatem przypisanie nie jest dozwolone" #~ msgid "BEGIN blocks must have an action part" #~ msgstr "Blok BEGIN musi posiadaæ czê¶æ dotycz±c± akcji" #~ msgid "`nextfile' used in BEGIN or END action" #~ msgstr "`nextfile' u¿yty w akcji BEGIN lub END" #~ msgid "non-redirected `getline' undefined inside BEGIN or END action" #~ msgstr "" #~ "komenda `getline' bez przekierowania nie jest zdefiniowana wewn±trz akcji " #~ "BEGIN lub END" #~ msgid "fptr %x not in tokentab\n" #~ msgstr "brak fptr %x w tokentab\n" #~ msgid "gsub third parameter is not a changeable object" #~ msgstr "trzeci parametr gsub nie jest zmiennym obiektem" #~ msgid "Unfinished \\ escape" #~ msgstr "Niedokoñczona sekwencja ucieczki \\" #~ msgid "unfinished repeat count" #~ msgstr "niedokoñczona liczba powtórzeñ" #~ msgid "malformed repeat count" #~ msgstr "¼le sformatowana liczba powtórzeñ" #~ msgid "Unbalanced [" #~ msgstr "[ nie do pary" #~ msgid "Unbalanced (" #~ msgstr "( nie do pary" #~ msgid "No regexp syntax bits specified" #~ msgstr "Nie zosta³y podane bity sk³adni wyra¿enia regularnego" #~ msgid "Unbalanced )" #~ msgstr ") nie do pary" #~ msgid "out of memory" #~ msgstr "brak pamiêci" #~ msgid "internal error: file `%s', line %d\n" #~ msgstr "wewnêtrzny b³±d: plik `%s', linia %d\n" EOF echo - 'po/ro.po' cat << 'EOF' > 'po/ro.po' # Mesajele în limba românã pentru pachetul gawk # Copyright (C) 2003 Free Software Foundation, Inc. # Eugen Hoanca , 2003. # msgid "" msgstr "" "Project-Id-Version: gawk 3.1.31\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" "POT-Creation-Date: 2004-07-15 13:02+0300\n" "PO-Revision-Date: 2003-09-15 17:48+0300\n" "Last-Translator: Eugen Hoanca \n" "Language-Team: Romanian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-2\n" "Content-Transfer-Encoding: 8bit\n" #: array.c:112 #, fuzzy, c-format msgid "attempt to use function `%s' as an array" msgstr "încercare de folosire a funcþiei `%s' ca array" #: array.c:115 #, c-format msgid "attempt to use scalar parameter `%s' as an array" msgstr "încercare de utilizare a parametrului scalar `%s' drept array" #: array.c:118 #, c-format msgid "attempt to use scalar `%s' as array" msgstr "încercare de a utiliza scalarul `%s' ca array" #: array.c:156 #, fuzzy, c-format msgid "from %s" msgstr "%s (din %s)" #: array.c:511 #, c-format msgid "reference to uninitialized element `%s[\"%s\"]'" msgstr "referinþã la elementul neiniþializat `%s[\"%s\"]'" #: array.c:517 #, c-format msgid "subscript of array `%s' is null string" msgstr "înscrierea array-ului `%s' este ºir null" #: array.c:621 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: indexul `%s' nu este în array-ul `%s'" #: array.c:791 #, c-format msgid "%s: empty (null)\n" msgstr "%s: vid (null)\n" #: array.c:796 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: vid (zero)\n" #: array.c:800 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: table_size = %d, array_size = %d\n" #: array.c:829 #, fuzzy, c-format msgid "%s: is parameter\n" msgstr "%s: este parametru!\n" #: array.c:834 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: array_ref cãtre %s\n" #: awkgram.y:208 #, fuzzy, c-format msgid "%s blocks must have an action part" msgstr "Blocurile de END trebuie sã aibã un fragment de acþiune" #: awkgram.y:211 #, fuzzy msgid "each rule must have a pattern or an action part" msgstr "Blocurile de END trebuie sã aibã un fragment de acþiune" #: awkgram.y:267 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" msgstr "`%s' este funcþie internã, nu poate fi redefinitã" #: awkgram.y:314 #, c-format msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "constanta regexp `/%s/' aratã ca un comentariu C, dar nu este" #: awkgram.y:341 awkgram.y:619 msgid "statement may have no effect" msgstr "declaraþia poate sã nu aibã nici un efect" #: awkgram.y:436 awkgram.y:456 #, fuzzy, c-format msgid "`%s' used in %s action" msgstr "`next' folosit în acþiune BEGIN sau END" #: awkgram.y:449 awkgram.y:452 msgid "`nextfile' is a gawk extension" msgstr "`nextfile' este extensie gawk" #: awkgram.y:466 msgid "`return' used outside function context" msgstr "`return' folosit în afara contextului funcþiei" #: awkgram.y:508 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "`print' simplu din regulile BEGIN sau END ar trebui sã fie probabil `print " "\"\"'" #: awkgram.y:521 awkgram.y:528 msgid "`delete array' is a gawk extension" msgstr "`delete array' este extensie gawk" #: awkgram.y:536 awkgram.y:543 #, fuzzy msgid "`delete(array)' is a non-portable tawk extension" msgstr "`delete array' este extensie gawk" #: awkgram.y:587 #, c-format msgid "duplicate case values in switch body: %s" msgstr "" #: awkgram.y:597 msgid "Duplicate `default' detected in switch body" msgstr "" #: awkgram.y:686 msgid "multistage two-way pipelines don't work" msgstr "legãturile(pipelines) bidirecþionale multistage nu vor funcþiona" #: awkgram.y:777 msgid "regular expression on right of assignment" msgstr "expresie regularã în dreapta atribuirii" #: awkgram.y:800 msgid "regular expression on left of `~' or `!~' operator" msgstr "expresie regularã în stânga operatorului `~' sau `!~'" #: awkgram.y:808 msgid "regular expression on right of comparison" msgstr "expresie regularã în dreapta comparaþiei" #: awkgram.y:875 msgid "non-redirected `getline' undefined inside END action" msgstr "`getline' nedefinitã ºi neredirectatã înãuntrul unei acþiuni END" #: awkgram.y:902 msgid "call of `length' without parentheses is not portable" msgstr "apelarea lui `legth' fãrã paranteze nu este portabilã" #: awkgram.y:905 msgid "call of `length' without parentheses is deprecated by POSIX" msgstr "apelarea lui `length' fãrã paranteze nu mai este folositã în POSIX" #: awkgram.y:958 msgid "use of non-array as array" msgstr "" #: awkgram.y:960 msgid "invalid subscript expression" msgstr "expresie subscript invalidã" #: awkgram.y:1158 #, fuzzy msgid "unexpected newline or end of string" msgstr "linie nouã neaºteptatã" #: awkgram.y:1254 msgid "empty program text on command line" msgstr "text program vid în linia de comandã" #: awkgram.y:1307 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "nu se poate deschide fiºierul sursã `%s' pentru citire (%s)" #: awkgram.y:1384 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "nu se poate citi fiºierul sursã `%s' (%s)" #: awkgram.y:1392 #, c-format msgid "source file `%s' is empty" msgstr "fiºierul sursã `%s' este vid" #: awkgram.y:1590 awkgram.y:1700 awkgram.y:1718 awkgram.y:2068 awkgram.y:2153 msgid "source file does not end in newline" msgstr "fiºierul sursã nu se terminã în linie nouã" #: awkgram.y:1654 msgid "unterminated regexp ends with `\\' at end of file" msgstr "regexp-ul neterminat se terminã cu `\\'` la sfârºitul fiºierului" #: awkgram.y:1674 msgid "unterminated regexp" msgstr "regexp neterminat" #: awkgram.y:1677 msgid "unterminated regexp at end of file" msgstr "regexp neterminat la sfârºitul fiºierului" #: awkgram.y:1744 msgid "use of `\\ #...' line continuation is not portable" msgstr "folosirea continuãrii liniei `\\ #...' nu este portabilã" #: awkgram.y:1756 msgid "backslash not last character on line" msgstr "backslash nu este ultimul caracter din linie" #: awkgram.y:1801 msgid "POSIX does not allow operator `**='" msgstr "POSIX nu permite operatorul `**='" #: awkgram.y:1803 msgid "old awk does not support operator `**='" msgstr "vechiul awk nu suportã operatorul `**='" #: awkgram.y:1812 msgid "POSIX does not allow operator `**'" msgstr "POSIX nu permite operatorul `**'" #: awkgram.y:1814 msgid "old awk does not support operator `**'" msgstr "vechiul awk nu supoortã operatorul `**'" #: awkgram.y:1845 msgid "operator `^=' is not supported in old awk" msgstr "operatorul `^=' nu este suportat în vechiul awk" #: awkgram.y:1853 msgid "operator `^' is not supported in old awk" msgstr "operator `^' nu este suportat în vechiul awk" #: awkgram.y:1937 awkgram.y:1954 msgid "unterminated string" msgstr "ºir de caractere neterminat" #: awkgram.y:2114 #, c-format msgid "invalid char '%c' in expression" msgstr "caracter invalid `%c' în expresie" #: awkgram.y:2162 #, c-format msgid "`%s' is a gawk extension" msgstr "`%s' este extensie gawk" #: awkgram.y:2165 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "`%s' este extensie Bell Labs" #: awkgram.y:2168 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX nu permite `%s'" #: awkgram.y:2172 #, c-format msgid "`%s' is not supported in old awk" msgstr "`%s' nu este suportat în vechiul awk" #: awkgram.y:2198 msgid "`goto' considered harmful!\n" msgstr "`goto' este considerat periculos!\n" #: awkgram.y:2260 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d este invalid ca numãr de argumente pentru %s" #: awkgram.y:2279 awkgram.y:2282 msgid "match: third argument is a gawk extension" msgstr "match: al treilea argument este extensie gawk" #: awkgram.y:2295 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "" "%s: ºirul de caractere literal ca ultim argument al înlocuitorului nu are " "nici un efect" #: awkgram.y:2298 #, fuzzy, c-format msgid "%s third parameter is not a changeable object" msgstr "al treilea parametru al sub nu este un obiect modificabil" #: awkgram.y:2325 awkgram.y:2328 msgid "close: second argument is a gawk extension" msgstr "close: al doilea argument este extensie gawk" #: awkgram.y:2338 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "folosirea lui dcgettext(_\"...\") este incorectã: eliminaþi liniuþa_jos de " "la început" #: awkgram.y:2353 #, fuzzy msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "folosirea lui dcgettext(_\"...\") este incorectã: eliminaþi liniuþa_jos de " "la început" #: awkgram.y:2424 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "funcþia `%s': parametrul #%d, `%s', parametrul duplicat #%d" #: awkgram.y:2457 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "" "funcþia `%s': parametrul `%s' nu mai þine cont de(shadows) variabila globalã" #: awkgram.y:2569 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "nu s-a putut deschide `%s' pentru scriere (%s)" #: awkgram.y:2570 profile.c:93 msgid "sending profile to standard error" msgstr "se trimite profilul la dipsozitivul de eroare standard" #: awkgram.y:2602 #, c-format msgid "%s: close failed (%s)" msgstr "%s: închidere eºuatã (%s)" #: awkgram.y:2723 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() apelatã de douã ori!" #: awkgram.y:2750 msgid "there were shadowed variables." msgstr "" #: awkgram.y:2823 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "funcþia `%s': nu se poate folosi numele funcþiei ca nume de parametru" #: awkgram.y:2833 #, c-format msgid "function name `%s' previously defined" msgstr "numele funcþiei `%s' a mai fost definit înainte" #: awkgram.y:2984 awkgram.y:2990 #, c-format msgid "function `%s' called but never defined" msgstr "funcþia `%s' este apelatã dar niciodatã definitã" #: awkgram.y:2993 #, c-format msgid "function `%s' defined but never called" msgstr "funcþia `%s' este definitã dar niciodatã apelatã" #: awkgram.y:3020 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "" "regexp constant pentru parametrul #%d solicitã(yields) valoare booleanã" #: awkgram.y:3033 #, fuzzy, c-format msgid "" "function `%s' called with space between name and `(',\n" "or used as a variable or an array" msgstr "" "funcþia `%s' apelatã cu un spaþiu între nume ºi `(',\n" "%s" #: builtin.c:149 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s cãtre \"%s\" eºuatã (%s)" #: builtin.c:150 msgid "standard output" msgstr "ieºire(output) standard" #: builtin.c:151 msgid "reason unknown" msgstr "motiv necunoscut" #: builtin.c:164 msgid "exp: received non-numeric argument" msgstr "exp: s-a primit argument nenumeric" #: builtin.c:170 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: argumentul %g este în afara domeniului" #: builtin.c:228 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" "fflush: nu s-a putut face flush: legãtura(pipe) `%s' a fost deschisã pentru " "citire, nu scriere" #: builtin.c:231 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "" "fflush: nu s-a putut face flush: fiºierul `%s' a fost deschis pentru citire, " "nu scriere" #: builtin.c:243 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "fflush: `%s' nu este fiºier deschis, legãturã(pipe) sau co-proces" #: builtin.c:338 msgid "index: received non-string first argument" msgstr "index: s-a primit un prim argument non-ºir de caractere" #: builtin.c:340 msgid "index: received non-string second argument" msgstr "index: s-a primit un al doilea argument non-ºir de caractere" #: builtin.c:454 msgid "int: received non-numeric argument" msgstr "int: s-a primit argument nenumeric" #: builtin.c:471 msgid "length: received non-string argument" msgstr "legth: s-a primit argument non-string" #: builtin.c:487 msgid "log: received non-numeric argument" msgstr "log: s-a primit argument nenumeric" #: builtin.c:490 #, c-format msgid "log: received negative argument %g" msgstr "log: s-a primit argument %g negativ" #: builtin.c:654 builtin.c:657 msgid "must use `count$' on all formats or none" msgstr "" #: builtin.c:759 msgid "`$' is not permitted in awk formats" msgstr "`$' nu este permis în formatele awk" #: builtin.c:765 msgid "arg count with `$' must be > 0" msgstr "numãrul de arg cu `%' trebuie sã fie > 0" #: builtin.c:767 #, fuzzy, c-format msgid "arg count %ld greater than total number of supplied arguments" msgstr "" "numãrul de arg %d este mai mare decât numãrul total de argumente furnizate" #: builtin.c:769 msgid "`$' not permitted after period in format" msgstr "`$' nu este permis în format dupã punct" #: builtin.c:782 msgid "no `$' supplied for positional field width or precision" msgstr "" "nu s-a furnizat nici un `$' pentru câmpul poziþional lungime sau precisie" #: builtin.c:848 msgid "`l' is meaningless in awk formats; ignored" msgstr "`l' nu are sens în formatele awk; ignorat" #: builtin.c:852 msgid "`l' is not permitted in POSIX awk formats" msgstr "`l' nu este permis în formatele awk POSIX" #: builtin.c:863 msgid "`L' is meaningless in awk formats; ignored" msgstr "`L' nu are sens în formatele awk; ignorat" #: builtin.c:867 msgid "`L' is not permitted in POSIX awk formats" msgstr "`L' nu este permis în formatele POSIX awk" #: builtin.c:878 msgid "`h' is meaningless in awk formats; ignored" msgstr "`h' nu are sens în formatele awl; ignorat" #: builtin.c:882 msgid "`h' is not permitted in POSIX awk formats" msgstr "`h' nu este permis în formatele POSIX awk" #: builtin.c:1111 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" msgstr "" #: builtin.c:1171 msgid "not enough arguments to satisfy format string" msgstr "" "nu existã destule argumente pentru satisfacerea formatului ºirului de " "caractere" #: builtin.c:1173 msgid "^ ran out for this one" msgstr "^ insuficient pentru aceasta" #: builtin.c:1178 msgid "[s]printf: format specifier does not have control letter" msgstr "[s]printf: specificatorul de format nu are literã de control" #: builtin.c:1181 msgid "too many arguments supplied for format string" msgstr "prea multe argumente furnizate pentru formatul ºirului de caractere" #: builtin.c:1247 builtin.c:1250 msgid "printf: no arguments" msgstr "printf: nici un argument" #: builtin.c:1274 msgid "sqrt: received non-numeric argument" msgstr "sqrt: s-a primit argument nenumeric" #: builtin.c:1278 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: apelat cu argumentul negativ %g" #: builtin.c:1301 #, c-format msgid "substr: start index %g is invalid, using 1" msgstr "substr: indexul de start %g este invalid, se foloseºte -1" #: builtin.c:1306 #, c-format msgid "substr: non-integer start index %g will be truncated" msgstr "substr: indexul de start ne-întreg(integer) %g va fi trunchiat" #: builtin.c:1325 #, fuzzy, c-format msgid "substr: length %g is not >= 1" msgstr "substr: lungimea %g este <= 0" #: builtin.c:1327 #, fuzzy, c-format msgid "substr: length %g is not >= 0" msgstr "substr: lungimea %g este <= 0" #: builtin.c:1334 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr lungimea ne-întregului(integer) %g va fi trunchiatã" #: builtin.c:1339 #, c-format msgid "substr: length %g too big for string indexing, truncating to %g" msgstr "" #: builtin.c:1351 msgid "substr: source string is zero length" msgstr "substr: ºirul de caractere sursã are lungime zero" #: builtin.c:1357 #, fuzzy, c-format msgid "substr: start index %g is past end of string" msgstr "substr: indexul de start %d este fostul sfârºit de ºir de caractere" #: builtin.c:1365 #, fuzzy, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" msgstr "" "substr: lungimea %d la indexul de start %d depãºeºte lungimea primului " "argument (%d)" #: builtin.c:1400 #, fuzzy msgid "strftime: received non-string first argument" msgstr "strftime: s-a primit primul argument non ºir de caractere" #: builtin.c:1406 msgid "strftime: received empty format string" msgstr "strftime: s-a primit ºir de caractere în format vid" #: builtin.c:1415 #, fuzzy msgid "strftime: received non-numeric second argument" msgstr "strftime: s-a primit un al doilea argument nenumeric" #: builtin.c:1478 msgid "mktime: received non-string argument" msgstr "mktime: s-a primit argument non ºir de caractere" #: builtin.c:1523 #, fuzzy msgid "system: received non-string argument" msgstr "system: s-a primit argument non ºir de caractere" #: builtin.c:1644 eval.c:2019 #, fuzzy, c-format msgid "reference to uninitialized field `$%d'" msgstr "referinþã la variabila neiniþializatã `%s'" #: builtin.c:1671 #, fuzzy msgid "tolower: received non-string argument" msgstr "tolower: s-a primit argument non-ºir de caractere" #: builtin.c:1720 #, fuzzy msgid "toupper: received non-string argument" msgstr "toupper: s-a primit argument non-ºir de caractere" #: builtin.c:1765 msgid "atan2: received non-numeric first argument" msgstr "atan2: s-a primit un prim argument nenumeric" #: builtin.c:1767 msgid "atan2: received non-numeric second argument" msgstr "atan2: s-a primit un al doilea argument nenumeric" #: builtin.c:1786 msgid "sin: received non-numeric argument" msgstr "sin: s-a primit un argument nenumeric" #: builtin.c:1802 msgid "cos: received non-numeric argument" msgstr "cos: s-a primit un argument nenumeric" #: builtin.c:1852 msgid "srand: received non-numeric argument" msgstr "srand: s-a primit un argument nenumeric" #: builtin.c:1887 msgid "match: third argument is not an array" msgstr "match: al treilea argument nu este un array" #: builtin.c:2414 #, fuzzy msgid "gensub: third argument of 0 treated as 1" msgstr "gensub: al 3-lea argument care este 0 va fi considerat 1" #: builtin.c:2572 msgid "lshift: received non-numeric first argument" msgstr "lshift: s-a primit un prim argument nenumeric" #: builtin.c:2574 #, fuzzy msgid "lshift: received non-numeric second argument" msgstr "strftime: s-a primit un al doilea argument nenumeric" #: builtin.c:2580 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "lshift(%lf, %lf): valorile negative vor furniza rezultate ciudate" #: builtin.c:2582 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): valorile fracþionale vor fi trunchiate" #: builtin.c:2584 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "" "lshift(%lf, %lf): valorile schimbate prea mult vor da rezultate ciudate" #: builtin.c:2610 msgid "rshift: received non-numeric first argument" msgstr "rshift: s-a primit un prim argument nenumeric" #: builtin.c:2612 #, fuzzy msgid "rshift: received non-numeric second argument" msgstr "strftime: s-a primit un al doilea argument nenumeric" #: builtin.c:2618 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "rshift(%lf, %lf): valorile negative vor da rezultate ciudate" #: builtin.c:2620 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): valorile fracþionale vor fi trunchiate" #: builtin.c:2622 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "" "rshift(%lf, %lf): valorile schimbate prea mult vor da rezultate ciudate" #: builtin.c:2648 msgid "and: received non-numeric first argument" msgstr "and: s-a primit un prim argument nenumeric" #: builtin.c:2650 #, fuzzy msgid "and: received non-numeric second argument" msgstr "atan2: s-a primit un al doilea argument nenumeric" #: builtin.c:2656 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "and(%lf, %lf): valorile negative vor da rezultate ciudate" #: builtin.c:2658 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): valorile fracþionale vor fi trunchiate" #: builtin.c:2684 msgid "or: received non-numeric first argument" msgstr "or: s-a primit un prim argument nenumeric" #: builtin.c:2686 #, fuzzy msgid "or: received non-numeric second argument" msgstr "atan2: s-a primit un al doilea argument nenumeric" #: builtin.c:2692 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "or(%lf, %lf): valorile negative for da rezultate ciudate" #: builtin.c:2694 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): valorile fracþionale vor fi trunchiate" #: builtin.c:2720 msgid "xor: received non-numeric first argument" msgstr "xor: s-a primit un prim argument nenumeric" #: builtin.c:2722 #, fuzzy msgid "xor: received non-numeric second argument" msgstr "atan2: s-a primit un al doilea argument nenumeric" #: builtin.c:2728 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "xor(%lf, %lf): valorile negative vor da rezultate ciudate" #: builtin.c:2730 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): valorile fracþionale vor fi trunchiate" #: builtin.c:2754 msgid "compl: received non-numeric argument" msgstr "compl: s-a primit argument nenumeric" #: builtin.c:2760 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): valorile negative vor da rezultate ciudate" #: builtin.c:2762 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): valorile fracþionale vor fi trunchiate" #: builtin.c:2935 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: `%s' nu este o categorie localã validã" #: eval.c:303 #, c-format msgid "unknown nodetype %d" msgstr "tip nod %d necunoscut" #: eval.c:350 msgid "buffer overflow in genflags2str" msgstr "depãºire(overflow) de buffer în genflags2str" #: eval.c:382 eval.c:388 profile.c:837 #, c-format msgid "attempt to use array `%s' in a scalar context" msgstr "încercare de a utiliza array-ul `%s' într-un context scalar" #: eval.c:730 #, fuzzy, c-format msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" "for loop: array-ul `%s' ºi-a schimbat mãrimea din %d în %d în timpul " "execuþiei buclei" #: eval.c:751 msgid "`break' outside a loop is not portable" msgstr "`break' în afara buclei nu este portabil" #: eval.c:755 msgid "`break' outside a loop is not allowed" msgstr "`break' în afara buclei nu este permis" #: eval.c:772 msgid "`continue' outside a loop is not portable" msgstr "`continue' în afara buclei nu este portabil" #: eval.c:776 msgid "`continue' outside a loop is not allowed" msgstr "`continue' în afara buclei nu este permis" #: eval.c:810 msgid "`next' cannot be called from a BEGIN rule" msgstr "`next' nu poate fi apelat dintr-o regulã BEGIN" #: eval.c:812 msgid "`next' cannot be called from an END rule" msgstr "`next' nu poate fi apelat dintr-o regulã END" #: eval.c:821 msgid "`nextfile' cannot be called from a BEGIN rule" msgstr "`nextfile' nu poate fi apelat dintr-o regulã BEGIN" #: eval.c:823 msgid "`nextfile' cannot be called from an END rule" msgstr "`nextfile' nu poate fi apelat dintr-o regulã END" #: eval.c:872 msgid "statement has no effect" msgstr "declaraþia nu are nici un efect" #: eval.c:915 eval.c:1873 #, c-format msgid "can't use function name `%s' as variable or array" msgstr "nu se poate folosi numele funcþiei `%s' ca variabilã sau array" #: eval.c:922 eval.c:928 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "referinþã la argumentul neiniþializat `%s'" #: eval.c:937 eval.c:1882 #, c-format msgid "reference to uninitialized variable `%s'" msgstr "referinþã la variabila neiniþializatã `%s'" #: eval.c:1083 msgid "" "concatenation: side effects in one expression have changed the length of " "another!" msgstr "" "concatenation: efectele secundare dintr-o expresie au schimbat lungimea " "alteia!" #: eval.c:1162 msgid "assignment used in conditional context" msgstr "atribuire folositã în context condiþional" #: eval.c:1252 msgid "division by zero attempted" msgstr "s-a încercat împãrþire la zero" #: eval.c:1267 #, c-format msgid "division by zero attempted in `%%'" msgstr "s-a încercat împãrþire la zero în `%%'" #: eval.c:1282 profile.c:713 #, c-format msgid "illegal type (%s) in tree_eval" msgstr "tip ilegal (%s) în tree_eval" #: eval.c:1459 msgid "division by zero attempted in `/='" msgstr "s-a încercat împãrþire la zero în `/='" #: eval.c:1477 #, c-format msgid "division by zero attempted in `%%='" msgstr "s-a încercat împãrþire la zero în `%%='" #: eval.c:1738 #, c-format msgid "function `%s' called with more arguments than declared" msgstr "" "funcþia `%s' a fost apelatã cu mai multe argumente decât cele declarate" #: eval.c:1782 #, c-format msgid "function `%s' not defined" msgstr "funcþia `%s' nu este definitã" #: eval.c:1788 #, c-format msgid "function %s called\n" msgstr "funcþia %s a fost apelatã\n" #: eval.c:1845 #, c-format msgid "" "\n" "\t# Function Call Stack:\n" "\n" msgstr "" "\n" "\t# Stiva de Apelare a Funcþiei:\n" "\n" #: eval.c:1848 #, c-format msgid "\t# -- main --\n" msgstr "\t# -- principal(main) --\n" #: eval.c:2003 msgid "attempt to field reference from non-numeric value" msgstr "încercare de referinþã la câmp din valoare nenumericã" #: eval.c:2005 msgid "attempt to reference from null string" msgstr "încercare de referinþã din ºir de caractere vid(null)" #: eval.c:2011 #, c-format msgid "attempt to access field %d" msgstr "încercare de accesare a câmpului %d" #: eval.c:2032 eval.c:2039 profile.c:934 msgid "assignment is not allowed to result of builtin function" msgstr "atribuirea nu este permisã rezultatului funcþiei interne" #: eval.c:2103 msgid "`IGNORECASE' is a gawk extension" msgstr "`IGNORECASE' este extensie gawk" #: eval.c:2133 msgid "`BINMODE' is a gawk extension" msgstr "`BINMODE' este extensie gawk" #: eval.c:2255 #, c-format msgid "bad `%sFMT' specification `%s'" msgstr "`%sFMT' specificaþie `%s' invalidã" #: eval.c:2333 msgid "turning off `--lint' due to assignment to `LINT'" msgstr "se dezactiveazã `--lint' din cauza atribuirii lui `LINT'" #: ext.c:60 ext.c:64 msgid "`extension' is a gawk extension" msgstr "`extension' este o extensie gawk" #: ext.c:74 #, c-format msgid "extension: cannot open `%s' (%s)\n" msgstr "extension: nu s-a putut deschide `%s' (%s)\n" #: ext.c:82 #, c-format msgid "extension: library `%s': cannot call function `%s' (%s)\n" msgstr "extension: biblioteca `%s': nu pot apela funcþia `%s' (%s)\n" #: ext.c:102 msgid "extension: missing function name" msgstr "" #: ext.c:107 #, fuzzy, c-format msgid "extension: illegal character `%c' in function name `%s'" msgstr "extension: biblioteca `%s': nu pot apela funcþia `%s' (%s)\n" #: ext.c:113 #, fuzzy, c-format msgid "extension: can't redefine function `%s'" msgstr "extension: nu s-a putut deschide `%s' (%s)\n" #: ext.c:117 #, fuzzy, c-format msgid "extension: function `%s' already defined" msgstr "funcþia `%s' nu este definitã" #: ext.c:122 #, c-format msgid "extension: can't use gawk built-in `%s' as function name" msgstr "" #: ext.c:124 #, fuzzy, c-format msgid "extension: function name `%s' previously defined" msgstr "numele funcþiei `%s' a mai fost definit înainte" #: ext.c:201 #, c-format msgid "function `%s' defined to take no more than `%d' argument(s)" msgstr "" #: ext.c:204 #, fuzzy, c-format msgid "function `%s': missing argument #%d" msgstr "funcþia `%s' nu este definitã" #: ext.c:214 #, fuzzy, c-format msgid "function `%s': argument #%d: attempt to use scalar as an array" msgstr "încercare de a utiliza scalarul `%s' ca array" #: ext.c:218 #, c-format msgid "function `%s': argument #%d: attempt to use array as a scalar" msgstr "" #: ext.c:243 msgid "Operation Not Supported" msgstr "Operaþie NeSuportatã" #: field.c:315 msgid "NF set to negative value" msgstr "NF setat la valoare negativã" #: field.c:808 msgid "split: second argument is not an array" msgstr "split: al doilea argument nu este un array" #: field.c:842 msgid "split: null string for third arg is a gawk extension" msgstr "split: ºirul nul pentru al treilea arg este o extensie gawk" #: field.c:894 msgid "`FIELDWIDTHS' is a gawk extension" msgstr "`FIELDWIDTHS' este extensie gawk" #: field.c:921 #, c-format msgid "field %d in FIELDWIDTHS, must be > 0" msgstr "câmpul %d din FIELDWIDTHS trebuie sã fie > 0" #: field.c:994 msgid "null string for `FS' is a gawk extension" msgstr "ºirul de caractere null pentru `FS' este extensie gawk" #: getopt.c:692 getopt.c:711 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s: opþiunea `%s' este ambiguã\n" #: getopt.c:744 getopt.c:748 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "%s: opþiunea `--%s' nu permite parametri\n" #: getopt.c:757 getopt.c:762 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "%s: opþiunea `%c%s' nu permite parametri\n" #: getopt.c:807 getopt.c:829 getopt.c:1159 getopt.c:1181 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "%s: opþiunea `%s' necesitã un parametru\n" #: getopt.c:867 getopt.c:870 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s: opþiune necunoscutã `--%s'\n" #: getopt.c:878 getopt.c:881 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s: opþiune necunoscutã `%c%s'\n" #: getopt.c:936 getopt.c:939 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: opþiune ilegalã -- %c\n" #: getopt.c:945 getopt.c:948 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s: opþiune invalidã -- %c\n" #: getopt.c:1003 getopt.c:1022 getopt.c:1234 getopt.c:1255 main.c:433 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: opþiunea necesitã un parametru -- %c\n" #: getopt.c:1074 getopt.c:1093 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s: opþiunea `-W %s' este ambiguã\n" #: getopt.c:1117 getopt.c:1138 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: opþiunea `-W %s' nu permite parametri\n" #: io.c:308 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "nu s-a putu deschide `%s' pentru citire (%s)" #: io.c:395 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "închiderea lui fd %d (`%s') eºuatã (%s)" #: io.c:533 #, c-format msgid "invalid tree type %s in redirect()" msgstr "tip arbore(tree) invalid %s în redirect()" #: io.c:539 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "expresia din redirectarea `%s' are doar valoare numericã" #: io.c:545 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "expresia din redirectarea `%s' are valoar de ºir null" #: io.c:550 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "numele de fiºier `%s' pentru redirectarea `%s' poate fi rezultatul unei " "expresii logice" #: io.c:588 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "amestecare nenecesarã a `>' ºi `>>' pentru fiºierul `%.*s'" #: io.c:640 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "nu se poate deschide legãtura(pipe) `%s' pentru output (%s)" #: io.c:649 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "nu se poate deschide legãtura(pipe) `%s' pentru input (%s)" #: io.c:662 #, c-format msgid "can't open two way socket `%s' for input/output (%s)" msgstr "" "nu se poate deschide socketul bidirecþional `%s' pentru input/output (%s)" #: io.c:666 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "" "nu se poate deschide legãtura(pipe) bidirecþionalã `%s' pentru input/output " "(%s)" #: io.c:742 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "nu se poate redirecta din `%s' (%s)" #: io.c:745 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "nu se poate redirecta cãtre `%s' (%s)" #: io.c:784 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "s-a atins limita sistemului pentru fiºiere deschise: se începe muliplexarea " "desciptorilor de fiºier" #: io.c:800 #, c-format msgid "close of `%s' failed (%s)." msgstr "închiderea `%s' eºuatã (%s)." #: io.c:808 msgid "too many pipes or input files open" msgstr "prea multe legãturi(pipe) sau fiºiere de intrare(input) deschise" #: io.c:831 msgid "close: second argument must be `to' or `from'" msgstr "close: al doilea argument trebuie sã fie `to' sau `from'" #: io.c:845 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "" "close: `%.*s' nu este un fiºier deschis, o legãturã(pipe) sau un coproces" #: io.c:849 msgid "close of redirection that was never opened" msgstr "închiderea unei redirectãri care n-a fost deschisã niciodatã" #: io.c:945 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: redirectarea `%s' nu a fost deschisã cu `|&', al doilea argument " "ignorat" #: io.c:960 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "stare de avarie (%d) în legãtura(pipe) închisã în `%s' (%s)" #: io.c:963 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "stare de avarie (%d) în fiºierul închis în `%s' (%s)" #: io.c:983 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "nu s-a furnizat închiderea explicitã a socketului `%s'" #: io.c:986 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "nu s-a furnizat închiderea explicitã a coprocesului `%s' " #: io.c:989 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "nu s-a furnizat închiderea explicitã a legãturii(pipe) `%s'" #: io.c:992 #, c-format msgid "no explicit close of file `%s' provided" msgstr "nu s-a furnizat închiderea explicitã a fiºierului `%s'" #: io.c:1021 io.c:1075 #, c-format msgid "error writing standard output (%s)" msgstr "eroare în scrierea la ieºirea(output) standard (%s)" #: io.c:1025 io.c:1079 #, c-format msgid "error writing standard error (%s)" msgstr "eroare în scrierea la dispozitivul standard de eroare (%s)" #: io.c:1033 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "flush-ul legãturii(pipe) `%s' eºuat (%s)." #: io.c:1036 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "flush-ul legãturii(pipe) coprocesului la `%s' eºuat (%s)." #: io.c:1039 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "flush-ul de fiºier al `%s' eºuat (%s)." #: io.c:1198 msgid "/inet/raw client not ready yet, sorry" msgstr "clientul /inet/raw nu este pregãtit încã, scuze" #: io.c:1200 io.c:1237 msgid "only root may use `/inet/raw'." msgstr "doar root-ul poate folosi `/inet/raw'." #: io.c:1235 msgid "/inet/raw server not ready yet, sorry" msgstr "serverul /inet/raw nu este pregãtit încã, scuze" #: io.c:1325 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "nici un protocol (cunoscut) furnizat în numele de fiºier special `%s'" #: io.c:1343 #, c-format msgid "special file name `%s' is incomplete" msgstr "numele special de fiºier `%s' nu este complet" #: io.c:1355 #, c-format msgid "local port invalid in `%s'" msgstr "port local invalid în `%s'" #: io.c:1367 msgid "must supply a remote hostname to `/inet'" msgstr "trebuie furnizat un nume de host remote pentru `/inet'" #: io.c:1382 msgid "must supply a remote port to `/inet'" msgstr "trebuie furnizat un port remote pentru `/inet'" #: io.c:1388 #, c-format msgid "remote port invalid in `%s'" msgstr "port remote invalid în `%s'" #: io.c:1398 msgid "TCP/IP communications are not supported" msgstr "Comunicaþiile TCP/IP nu sunt suportate" #: io.c:1407 io.c:1588 #, c-format msgid "file `%s' is a directory" msgstr "fiºierul `%s' este director" #: io.c:1477 #, c-format msgid "use `PROCINFO[\"%s\"]' instead of `%s'" msgstr "folosiþi `PROCINFO[\"%s\"]' în loc de `%s'" #: io.c:1509 msgid "use `PROCINFO[...]' instead of `/dev/user'" msgstr "folosiþi `PROCINFO[...]' în loc de `/dev/user'" #: io.c:1574 io.c:1748 #, c-format msgid "could not open `%s', mode `%s'" msgstr "nu s-a putut deschide `%s', modul `%s'" #: io.c:1799 #, fuzzy, c-format msgid "close of master pty failed (%s)" msgstr "închiderea legãturii(pipe) a eºuat (%s)" #: io.c:1801 io.c:1953 io.c:2105 #, c-format msgid "close of stdout in child failed (%s)" msgstr "închiderea stdout în copil(child) a eºuat (%s)" #: io.c:1804 #, fuzzy, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "mutarea legãturii(pipe) la stdout în copil(child) a eºuat (dup: %s)" #: io.c:1806 io.c:1958 #, c-format msgid "close of stdin in child failed (%s)" msgstr "închiderea stdin în copil(child) a eºuat (%s)" #: io.c:1809 #, fuzzy, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "mutarea legãturii(pipe) la stdin în copil(child) a eºuat (dup: %s)" #: io.c:1811 io.c:1830 #, fuzzy, c-format msgid "close of slave pty failed (%s)" msgstr "închiderea legãturii(pipe) a eºuat (%s)" #: io.c:1904 io.c:1956 io.c:2086 io.c:2108 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "mutarea legãturii(pipe) la stdout în copil(child) a eºuat (dup: %s)" #: io.c:1908 io.c:1961 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "mutarea legãturii(pipe) la stdin în copil(child) a eºuat (dup: %s)" #: io.c:1925 io.c:2099 msgid "restoring stdout in parent process failed\n" msgstr "refacerea stdout în procesul pãrinte a eºuat\n" #: io.c:1930 msgid "restoring stdin in parent process failed\n" msgstr "refacerea stdin în procesul pãrinte a eºuat\n" #: io.c:1964 io.c:2110 io.c:2121 #, c-format msgid "close of pipe failed (%s)" msgstr "închiderea legãturii(pipe) a eºuat (%s)" #: io.c:2009 msgid "`|&' not supported" msgstr "`|&' nesuportat" #: io.c:2076 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "nu s-a putut deschide legãtura(pipe) `%s' (%s)" #: io.c:2117 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "nu s-a putu crea proces copil(child) pentru `%s' (fork: %s)" #: io.c:2460 #, c-format msgid "data file `%s' is empty" msgstr "fiºierul de date `%s' este vid" #: io.c:2503 io.c:2511 msgid "could not allocate more input memory" msgstr "" #: io.c:2869 io.c:2932 #, c-format msgid "error reading input file `%s': %s" msgstr "eroare în citirea fiºierului de intrare(input) `%s': %s" #: io.c:3057 msgid "multicharacter value of `RS' is a gawk extension" msgstr "valoarea multicaracter a `RS' este extensie gawk" #: main.c:323 msgid "`-m[fr]' option irrelevant in gawk" msgstr "`-m[fr]' opþiune irelevantã în gawk" #: main.c:325 msgid "-m option usage: `-m[fr] nnn'" msgstr "folosirea opþiunii -m : `-m[fr] nnn'" #: main.c:342 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: opþiunea `-W %s' nu e recunoscutã, ignoratã\n" #: main.c:379 msgid "empty argument to `--source' ignored" msgstr "argument vid pentru `--source' ignorat" #: main.c:450 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" "este setatã variabila de mediu `POSIXLY_CORRECT': se activeazã `--posix'" #: main.c:455 msgid "`--posix' overrides `--traditional'" msgstr "`--posix' suprascrie `--traditional'" #: main.c:466 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "`--posix'/`--traditional' suprascrie `--non-decimal-data'" #: main.c:470 #, fuzzy, c-format msgid "running %s setuid root may be a security problem" msgstr "dacã se ruleazã %s setuid root poate apãrea o problemã de securitate" #: main.c:511 #, fuzzy, c-format msgid "can't set binary mode on stdin (%s)" msgstr "nu se poate seta modul pe stdin (%s)" #: main.c:514 #, fuzzy, c-format msgid "can't set binary mode on stdout (%s)" msgstr "nu se poate seta modul pe stdout (%s)" #: main.c:516 #, fuzzy, c-format msgid "can't set binary mode on stderr (%s)" msgstr "nu se poate seta modul pe stderr (%s)" #: main.c:546 msgid "no program text at all!" msgstr "nu existã nici un text de program!" #: main.c:623 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "" "Folosire: %s [opþiuni stil POSIX sau GNU] -f fiºierprogram [--] fiºier ...\n" #: main.c:625 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "" "Folosire: %s [opþiuni stil POSIX sau GNU] [--] %cprogram%c fiºier ...\n" #: main.c:630 msgid "POSIX options:\t\tGNU long options:\n" msgstr "opþiuni POSIX:\t\topþiuni lungi GNU:\n" #: main.c:631 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f fiºierprogram\t\t--file=fiºierprogram\n" #: main.c:632 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F fs\t\t\t--field-separator=fs\n" #: main.c:633 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v var=val\t\t--assign=var=val\n" #: main.c:634 msgid "\t-m[fr] val\n" msgstr "\t-m[fr] val\n" #: main.c:635 msgid "\t-W compat\t\t--compat\n" msgstr "\t-W compat\t\t--compat\n" #: main.c:636 msgid "\t-W copyleft\t\t--copyleft\n" msgstr "\t-W copyleft\t\t--copyleft\n" #: main.c:637 msgid "\t-W copyright\t\t--copyright\n" msgstr "\t-W copyright\t\t--copyright\n" #: main.c:638 msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" msgstr "\t-W dump-variables[=fiºier]\t--dump-variables[=fiºier]\n" #: main.c:639 msgid "\t-W gen-po\t\t--gen-po\n" msgstr "\t-W gen-po\t\t--gen-po\n" #: main.c:640 msgid "\t-W help\t\t\t--help\n" msgstr "\t-W help\t\t\t--help\n" #: main.c:641 msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" #: main.c:642 msgid "\t-W lint-old\t\t--lint-old\n" msgstr "\t-W lint-old\t\t--lint-old\n" #: main.c:643 msgid "\t-W non-decimal-data\t--non-decimal-data\n" msgstr "\t-W non-decimal-data\t--non-decimal-data\n" #: main.c:645 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" #: main.c:648 msgid "\t-W parsedebug\t\t--parsedebug\n" msgstr "\t-W parsedebug\t\t--parsedebug\n" #: main.c:650 msgid "\t-W profile[=file]\t--profile[=file]\n" msgstr "\t-W profile[=fiºier]\t--profile[=fiºier]\n" #: main.c:651 msgid "\t-W posix\t\t--posix\n" msgstr "\t-W posix\t\t--posix\n" #: main.c:652 msgid "\t-W re-interval\t\t--re-interval\n" msgstr "\t-W re-interval\t\t--re-interval\n" #: main.c:653 msgid "\t-W source=program-text\t--source=program-text\n" msgstr "\t-W source=program-text\t--source=program-text\n" #: main.c:654 msgid "\t-W traditional\t\t--traditional\n" msgstr "\t-W traditional\t\t--traditional\n" #: main.c:655 msgid "\t-W usage\t\t--usage\n" msgstr "\t-W usage\t\t--usage\n" #: main.c:656 msgid "\t-W version\t\t--version\n" msgstr "\t-W version\t\t--version\n" #: main.c:660 #, fuzzy msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" "section `Reporting Problems and Bugs' in the printed version.\n" "\n" msgstr "secþiunea `Reporting Problems and Bugs' în versiunea tipãritã.\n" #: main.c:664 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" "\n" msgstr "" #: main.c:668 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" msgstr "" #: main.c:685 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" "\n" "This program 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 2 of the License, or\n" "(at your option) any later version.\n" "\n" msgstr "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" "\n" "Acest program este software liber; poate fi redistribuit ºi/sau modificat\n" "sub termenii Licenþei Publice Generale GNU publicatã de \n" "Free Software Foundation; fie versiunea 2 a Licenþei, fie\n" "(la latitudinea dumneavoastrã) orice versiune ulterioarã.\n" "\n" #: main.c:693 msgid "" "This program 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" msgstr "" "Acest program este distribuit în speranþa cã va fi folositor,\n" "dar FÃRà NICI O GARANÞIE; chiar fãrã presupusa garanþie a\n" "VANDABILITÃÞII sau MODIFICÃRII ÎNTR-UN SCOP PRIVAT. Cititi\n" "Licenþa Publicã Generalã GNU pentru mai multe detalii.\n" "\n" "\n" #: main.c:699 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, write to the Free Software\n" "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n" msgstr "" "Ar fi trebuit sã primiþi o copie a Licenþei Publice Generale GNU\n" "împreunã cu acest program; dacã nu, scrieþi la Free Software\n" "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n" #: main.c:733 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft nu seteazã FS în tab în POSIX awk" #: main.c:962 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" "\n" msgstr "" #: main.c:982 #, c-format msgid "`%s' is not a legal variable name" msgstr "" #: main.c:985 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "" #: main.c:1018 msgid "floating point exception" msgstr "excepþie virgulã mobilã" #: main.c:1025 msgid "fatal error: internal error" msgstr "eroare fatalã: eroare internã" #: main.c:1075 #, c-format msgid "no pre-opened fd %d" msgstr "nici un fd predeschis %d" #: main.c:1082 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "nu s-a putut predeschide /dev/null pentru fd %d" #: main.c:1105 main.c:1114 #, c-format msgid "could not find groups: %s" msgstr "nu am putut gãsi grupurile: %s" #: msg.c:54 #, c-format msgid "cmd. line:" msgstr "linie cmd:" #: msg.c:120 msgid "warning: " msgstr "avertisment: " #: msg.c:142 msgid "error: " msgstr "eroare: " #: msg.c:178 msgid "fatal: " msgstr "fatal: " #: node.c:58 node.c:65 node.c:74 node.c:88 node.c:115 msgid "can't convert string to float" msgstr "nu se poate converti ºir de caractere în float" #: node.c:357 msgid "backslash at end of string" msgstr "backslash la sfârºitul ºirului de caractere" #: node.c:541 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX nu permite escape-uri `\\x'" #: node.c:547 msgid "no hex digits in `\\x' escape sequence" msgstr "nu existã digiþi hexa în secvenþa de escape `\\x'" #: node.c:581 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "secvenþa de escape `\\%c' tratatã ca `%c' simplu" #: posix/gawkmisc.c:172 #, c-format msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" msgstr "%s %s `%s': nu s-a putut seta close-on-exec: (fcntl: %s)" #: profile.c:91 #, c-format msgid "could not open `%s' for writing: %s" msgstr "nu am putut deschide `%s' pentru scriere: %s" #: profile.c:467 #, fuzzy, c-format msgid "internal error: %s with null vname" msgstr "eroare internã: Node_var cu vname null" #: profile.c:530 msgid "# treated internally as `delete'" msgstr "" #: profile.c:1167 #, c-format msgid "# this is a dynamically loaded extension function" msgstr "" #: profile.c:1198 #, c-format msgid "\t# gawk profile, created %s\n" msgstr "\t# profil gawk, creat %s\n" #: profile.c:1201 #, c-format msgid "" "\t# BEGIN block(s)\n" "\n" msgstr "" "\t# bloc(uri) BEGIN\n" "\n" #: profile.c:1211 #, c-format msgid "" "\t# Rule(s)\n" "\n" msgstr "" "\t# Regulã(i)\n" "\n" #: profile.c:1217 #, c-format msgid "" "\t# END block(s)\n" "\n" msgstr "" "\t# bloc(uri) END\n" "\n" #: profile.c:1237 #, c-format msgid "" "\n" "\t# Functions, listed alphabetically\n" msgstr "" "\n" "\t# Funcþii, listate alfabetic\n" #: profile.c:1452 #, c-format msgid "unexpected type %s in prec_level" msgstr "tip %s neaºteptat în prec_level" #: regcomp.c:150 msgid "Success" msgstr "Succes" #: regcomp.c:153 msgid "No match" msgstr "Nici o potrivire" #: regcomp.c:156 msgid "Invalid regular expression" msgstr "Expresie regularã invalidã" #: regcomp.c:159 msgid "Invalid collation character" msgstr "Caracter de comparare invalid" #: regcomp.c:162 msgid "Invalid character class name" msgstr "nume clasã caracter invalid" #: regcomp.c:165 msgid "Trailing backslash" msgstr "Backslash final" #: regcomp.c:168 msgid "Invalid back reference" msgstr "referinþã anterioarã(back) invalidã" #: regcomp.c:171 msgid "Unmatched [ or [^" msgstr "[ sau [^ fãrã reciprocã" #: regcomp.c:174 msgid "Unmatched ( or \\(" msgstr "( sau \\( fãrã reciprocã" #: regcomp.c:177 msgid "Unmatched \\{" msgstr "{ fãrã reciprocã" #: regcomp.c:180 msgid "Invalid content of \\{\\}" msgstr "Conþinut invalid al \\{\\}" #: regcomp.c:183 msgid "Invalid range end" msgstr "Sfârºit de domeniu invalid" #: regcomp.c:186 msgid "Memory exhausted" msgstr "Memorie plinã" #: regcomp.c:189 msgid "Invalid preceding regular expression" msgstr "Expresie regularã anterioarã invalidã" #: regcomp.c:192 msgid "Premature end of regular expression" msgstr "Sfârºit prematur de expresie regularã" #: regcomp.c:195 msgid "Regular expression too big" msgstr "Expresie regularã prea mare" #: regcomp.c:198 msgid "Unmatched ) or \\)" msgstr ") or \\) fãrã reciprocã" #: regcomp.c:668 msgid "No previous regular expression" msgstr "Nu existã expresii regulare anterioare" #, fuzzy #~ msgid "or used as a variable or an array" #~ msgstr "nu se poate folosi numele funcþiei `%s' ca variabilã sau array" #~ msgid "delete: illegal use of variable `%s' as array" #~ msgstr "delete: folosire ilegalã a variabilei `%s' ca array" #~ msgid "asort: first argument is not an array" #~ msgstr "asort: primul argument nu este un array" #~ msgid "asort: second argument is not an array" #~ msgstr "asort: al doilea argument nu este un array" #~ msgid "" #~ "\n" #~ "To report bugs, see node `Bugs' in `gawk.info', which is\n" #~ msgstr "" #~ "\n" #~ "Pentru a raporta bug-urile, citiþi nodul `Bugs' în `gawk.info', " #~ "reprezentând\n" #~ msgid "invalid syntax in name `%s' for variable assignment" #~ msgstr "sintaxã invalidã în numele `%s' pentru atribuire de variabilã" #~ msgid "internal error: Node_var_array with null vname" #~ msgstr "eroare internã: Node_var_array cu vname null" #~ msgid "or used in other expression context" #~ msgstr "sau folositã în alt context al expresiei" #~ msgid "`%s' is a function, assignment is not allowed" #~ msgstr "`%s' este o funcþie, atribuirea nu este permisã" #~ msgid "BEGIN blocks must have an action part" #~ msgstr "Blocurile de BEGIN trebuie sa aibã un fragment de acþiune" #~ msgid "`nextfile' used in BEGIN or END action" #~ msgstr "`nextfile' folosit în acþiune BEGIN sau END" #~ msgid "non-redirected `getline' undefined inside BEGIN or END action" #~ msgstr "" #~ "`getline' nedefinit ºi neredirectat înãuntrul unei acþiuni BEGIN sau END" #~ msgid "fptr %x not in tokentab\n" #~ msgstr "fptr %x nu este în tokentab\n" #~ msgid "gsub third parameter is not a changeable object" #~ msgstr "al treilea parametru al gsub nu este obiect modificabil" #~ msgid "Unfinished \\ escape" #~ msgstr "\\ escape neterminat" #~ msgid "unfinished repeat count" #~ msgstr "numãrãtoare repetatã neterminatã" #~ msgid "malformed repeat count" #~ msgstr "numãrãtoare repetatã malformatã" #~ msgid "Unbalanced [" #~ msgstr "[ fãrã reciproc" #~ msgid "Unbalanced (" #~ msgstr "( fãrã reciproc" #~ msgid "No regexp syntax bits specified" #~ msgstr "Nu s-au specificat biþi pentru sintaxa regexp" #~ msgid "Unbalanced )" #~ msgstr ") fãrã reciproc" #~ msgid "out of memory" #~ msgstr "memorie plinã" #~ msgid "internal error: file `%s', line %d\n" #~ msgstr "eroare internã: fiºierul `%s', linia %d\n" EOF echo - 'ylwrap' cat << 'EOF-ylwrap' > 'ylwrap' #! /bin/sh # ylwrap - wrapper for lex/yacc invocations. scriptversion=2003-11-18.20 # Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003 # 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # 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 0 ;; -v|--v*) echo "ylwrap $scriptversion" exit 0 ;; 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 status=$? if test $status -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" || status=$? # 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 status=1 fi fi shift shift first=no done else status=$? fi # Remove the directory. cd .. rm -rf $dirname exit $status # 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-end: "$" # End: EOF-ylwrap # Now, apply the patch patch -p1 << \EOF diff -urN gawk-3.1.3/ChangeLog gawk-3.1.4/ChangeLog --- gawk-3.1.3/ChangeLog 2003-07-07 21:21:14.000000000 +0300 +++ gawk-3.1.4/ChangeLog 2004-08-02 12:18:21.000000000 +0300 @@ -1,3 +1,785 @@ +Mon Aug 2 12:18:15 2004 Arnold D. Robbins + + * Release 3.1.4: Release tar file made. + +Mon Aug 2 12:17:40 2004 Arnold D. Robbins + + * configure.ac: Fix the hack. Do the sed on `Makefile', + not `Makefile.in'. Sigh. + +Sun Aug 1 14:48:30 2004 Arnold D. Robbins + + * configure.ac: MAJOR HACK: At end, remove version.c from Makefile.in + variable `CONFIG_CLEAN_FILES' so that `make distclean' doesn't + remove version.c. + +Mon Jul 19 17:07:27 2004 Arnold D. Robbins + + * config.guess, config.sub: Updated from Savannah CVS. + +Fri Jul 16 10:59:07 2004 Arnold D. Robbins + + * re.c (make_regexp): Bracket code using `gawk_mb_cur_max' + inside `#ifdef MBS_SUPPORT'. + +Thu Jul 15 12:36:25 2004 Arnold D. Robbins + + * dfa.c (parse_bracket_exp_mb): If doing case folding, + include the other case for regular characters inside [...]. + + * re.c (make_regexp): Smarten up handling of IGNORECASE, + particularly for multibyte character sets. Sigh. + +Wed Jul 14 16:25:23 2004 John Haque + + * eval.c (interpret): For `Node_K_return', use `copynode' + and not `dupnode' for non-PERM, non-TEMP values. + (func_call): Don't add TEMP flag to returned value. + + These two fix a problem uncovered by the July 8 change in + `assoc_lookup'. + +Wed Jul 14 16:14:09 2004 Arnold D. Robbins + + * awkgram.y (node_common): Add check `lexeme >= lexptr_begin', + from valgrind run. + +Wed Jul 14 16:00:51 2004 John Haque + + * io.c (rsrescan): Fix off by one error at end of record. + +Thu Jul 8 16:59:51 2004 Stepan Kasal + + * awkgram.y (output_redir): Make sure not to dereference NULL + pointer. The bug was triggered by the following code: + + gawk 'BEGIN{print "date" |& getline}' + + No test case created, beacuse of the following: + Correct interpretation involves executing "1" or "0" -- as the user + may have defined this, we would have to override this in the test + script. It's not worth the hassle. + +Thu Jul 8 12:59:49 2004 Arnold D. Robbins + + * awk.h (load_casetable): Name changed from `load_ignorecase'. + * eval.c (load_casetable): Name changed from `load_ignorecase'. + Fix all uses. + +Thu Jul 8 12:32:13 2004 John Haque + + * awkgram.y (get_src_buf): Fix off-by-one error to avoid "does not end + in newline" messages. + * array.c (assoc_lookup): Small performance hack: for TEMP subs nodes, + use its string memory for ahname. + * ext.c (get_actual_argument): Minor code cleanup. + * builtin.c (do_lshift, do_rshift, do_and, do_or, do_xor, do_compl): + fixed to issue "non-numeric argument" lint warnings before using + `force_number'. + +Mon Jun 21 16:53:35 2004 Arnold D. Robbins + + More changes from John Haque to rationalize extension functions. + + * awk.h (get_curfunc_arg_count): Name changed from + `get_curfunc_parm_count'. + * eval.c (get_curfunc_arg_count): Ditto, body redone to count actual + args passed at call time. + * ext.c (get_argument): Update range check. + (get_actual_argument): Simplify the code. + +Mon Jun 14 14:01:16 2004 Arnold D. Robbins + + Changes from John Haque and ADR to rationalize extension functions. + + * awk.h (check_special, get_curfunc_parm_count, get_actual_argument): + new function declarations. + (get_scalar_argument, get_array_argument): new macros. + * awkgram.y (check_special): new function. + (yylex): Use `check_special' to search `tokentab'. + (dump_funcs): Always count functions, in order to get dynamic ones. + Removed bogus use of `static' on `tab' variable. + * eval.c (struct fcall): Change type of `count' to `size_t'. + (get_curfunc_parm_count): New function. + (push_args): Set `r->rnode' to NULL for local variable. + * ext.c (make_builtin): Add sanity checking for presence and + name of new function, and that it's not a redefinition. + (get_argument): Check that requested arg is within range of actual + number of parameters. Also clean up logic for Node_var_new, + Node_var_array, Node_array_ref. + (get_actual_argument): New function. + * profile.c (pp_builtin): Better handling of dynamic extension function. + +Sun Jun 13 14:32:22 2004 Arnold D. Robbins + + * io.c (redirect): Conditionalize checking for process recovery + on `#ifdef PIPES_SIMULATED'. Needed for MS-DOS and VMS. + * builtin.c (tmp_integer): Change bracketing of magic test to + `#ifdef HAVE_UINTMAX_T' which is more general and more correct. + +Wed Jun 9 21:36:01 2004 Arnold D. Robbins + + * re.c (make_regexp): Add dfa matching into IGNORECASE handling. + +Tue Jun 8 15:38:56 2004 Arnold D. Robbins + + * awk.h (casetable): Remove `const'. + * eval.c (casetable): Remove `const'. + (load_ignorecase): New function. Loads locale-correct values in + upper 128 bytes. + (set_IGNORECASE): Call `load_ignorecase'. + +Tue Jun 8 14:04:19 2004 Arnold D. Robbins + + * awkgram.y (get_src_buf): Make sure that value from + `optimal_bufsize' is reasonable. Increase it if not. + +Tue Jun 8 13:54:28 2004 John E. Haque + + * awkgram.y (statement:LEX_FOR): Fix bug in loop to `delete a' + optimization. + * io.c (format_tree): Check for out of range values for + positional specifiers. + +Mon Jun 7 17:02:48 2004 Arnold D. Robbins + + * builtin.c (tmp_integer): Bracket the magic test inside + `#ifndef VMS'. + + * awk.h (child_catcher): Remove declaration. + * main.c (main): Remove `signal' calls for SIGCLD, SIGCHLD. + * io.c (child_died, child_signo, child_catcher): Removed. + (get_a_record): Remove code checking for death of child. + (redirect): If `rp' matches and is at EOF and type is input + pipe, and `rp->pid' is not -1, call `wait_any' to reap the + child. This is a heuristic, but it works pretty well. + +Sun Jun 6 18:35:17 2004 Arnold D. Robbins + + * io.c (get_a_record): Restore use of `memmove' instead of + memcpy. Otherwise some tests break on some systems. We think. + (child_died): Don't reset signal handler; breaks on some S5 systems. + (get_a_record): Reset handler if child_died. Still flaky on Solaris. + * configure.ac (version.c): Made from version.in again, for + non-Unix systems. + * Makefile.am (base_sources): Add version.c back. + * version.in: Include config.h for definition of const. + * main.c (version_string): Add back declaration, don't + include "version.i". + (main): Don't install child_catcher on Sun. (HACK) + +Thu Jun 3 14:06:06 2004 Arnold D. Robbins + + * main.c (version_string): Removed declaration, since + version.i is included directly. + * version.in: Removed test for definition of const. + +Tue Jun 1 19:23:53 2004 Stepan Kasal + + * Makefile.am (base_sources): Don't mention version.c, so that + it doesn't get distributed. + * po/POTFILES.in: remove version.c + * configure.ac: Create version.i from version.in. + * main.c: include version.i. + +Tue Jun 1 18:33:32 2004 Arnold D. Robbins + + Fix problem reported by Stephen Marchant + on Thu, 30 Oct 2003 13:11:42 -0500. + + * regex_internal.h (re_realloc): Allow for SunOS pre-Standard C + `realloc' which doesn't accept NULL pointers. + * awk.h (erealloc): Same. + + Unrelated. Change suggested by Peter Sobisch , have + PROCINFO["version"] be the version of gawk: + + * main.c (load_procinfo): Add in version. + + Unrelated: Avoid warning: + + * main.c (main): Cast calls to `bindtextdomain' and `textdomain' to + void. Avoids diagnostic with `configure --disable-nls'. + * dfa.c (check_matching_with_multibyte_ops): Remove unneeded nested + #ifdef, per Scott Deifik (scottd@amgen.com). Also fix some spelling + errors in comments. + +Tue Jun 1 18:26:45 2004 Paul Eggert + + Fix a bug reported by Mike Romaniw + to bug-gnu-utils on 2003-09-27: compl(compl(0xf0f)) returned 0xfff + on hosts with 64-bit uintmax_t and 64-bit IEEE-764 double, due to + rounding errors. + + * doc/gawk.texi (Bitwise Functions): Leading nonzero bits are + removed in order to fit the result into a C 'double' without rounding + error. + * builtin.c: Include if available. + (FLT_RADIX, FLT_MANT_DIG, DBL_MANT_DIG): Define if not already defined. + (AWKSMALL_MANT_DIG, AWKNUM_MANT_DIG, AWKNUM_FRACTION_BITS): New macros. + (tmp_integer): New function. + (do_lshift, do_rshift, do_and, do_or, do_xor, do_compl): Use them. + +Tue Jun 1 17:40:47 2004 Stepan Kasal + + * eval.c (push_args): Set var_value to Nnull_string for + local variables. + +Mon May 31 11:49:20 2004 Stepan Kasal + + * replace.c: #undef DEBUG before including mktime.c, it has + different meaning there. + +Mon May 31 08:25:30 2004 Arnold D. Robbins + + * array.c (get_actual): Add extra error message for `delete f' + inside body of function `f'. + +Mon May 3 09:53:34 2004 Arnold D. Robbins + + * Makefile.in, */Makefile.in: Updated to automake 1.8.4. + * config.guess, config.sub: Same. + * aclocal.m4, depcomp, install-sh: Same. + +Mon May 3 09:24:45 2004 Arnold D. Robbins + + * configure.ac: Look for missing `strtoul'. + * replace.c: Include missing_d/stroul.c if not HAVE_STRTOUL. + * io.c (devopen): Use `strtoul' instead of `strtod' for + extracting fd number from "/dev/fd/N". (Thanks to Jim Meyering.) + * field.c (set_FIELDWIDTHS): Use `strtoul' instead of `strtod' + when parsing FIELDWIDTHS values. (Thanks to Jim Meyering.) + +Mon Apr 19 20:12:57 2004 Arnold D. Robbins + + * Makefile.in, */Makefile.in: Updated to automake 1.8.3. + * config.guess, config.sub: Same. + +2004-03-18 Stepan Kasal + + * eval.c (make_scalar): Comment clarification. + + * array.c (get_actual): Remove the condition ``canfatal'' + before ``cant_happen()''; if the data are consistent, we + simply cannot get there with a non-func Node_param_list, + no matter whether we are called via get_array or not. + + * awkgram.y (variable): Make one longer message, to help translators. + +Tue Mar 9 17:34:10 2004 Arnold D. Robbins + + Adapted `gofast' patch from Redhat Enterprise version of grep + to current dfa.c. + + * dfa.c (buf_offset): New variable. + (SKIP_REMAINS_MB_IF_INITIAL_STATE): Modified to use it, don't + free `mblen_buf', `inputwcs'. + (match_anychar, match_mb_charset, transit_state_consume_1char, + transit_state): Use buf_offset in mblen_buf. + (dfaexec): Realloc things instead of free and malloc. + +Thu Mar 4 16:46:55 2004 Arnold D. Robbins + + * configure.ac (AC_FUNC_MBRTOWC): Added. + (AC_CHECK_FUNCS): Removed `mbrtwoc'. + (REGEX_MALLOC): Removed. Not needed for new regex* routines. + + * re.c (research): Removed comment and check for return of -2 + since that was for old regex using alloca or REGEX_MALLOC. + +Wed Mar 3 17:10:16 2004 Arnold D. Robbins + + * io.c (close_one): Don't close stdout or stderr; can happen if + /dev/stdout or /dev/stderr are used in redirection and all the + open files get used. + +Sun Feb 29 12:17:37 2004 Arnold D. Robbins + + * regcomp.c (build_charclass, build_charclass_op): Change type of + `class_name' parameter to `const char *' from `const unsigned char *' + and adjust callers. + +Thu Feb 26 15:20:22 2004 Arnold D. Robbins + + * awkgram.y (get_src_buf): Rewritten to better manage input and + supplying newlines on command line programs. Fixes problems reading + source files on Cygwin. + + Unrelated fixes from mary1john8@earthlink.net: + + * node.c (format_val): For no malloc case, free s->stptr if necessary. + * io.c (nextfile): Add missing call to `unref(FILENAME_node->var_value)' + for no files case. + (close_redir): Remove file from redirection list even if fp is + stdout or stderr. + +Tue Feb 24 12:11:34 2004 Arnold D. Robbins + + * regex_internal.c (build_wcs_upper_buffer): Enclose `offsets_needed' + label in `#ifdef _LIBC' to silence `unused label' compiler warning. + +Tue Feb 24 11:57:18 2004 Nelson H.F. Beebe + + * regcomp.c (parse_expression): Add cast to (unsigned char *) in calls + to `build_charclass_op'. + * regex_internal.c (build_wcs_buffer): Add cast to char* in call to + `wcrtomb'. + * regex_internal.h (bitset_not, bitset_merge, bitset_not_merge, + bitset_mask, re_string_char_size_a, re_string_wchar_at, + re_string_elem_size_at): Change to use prototypes. + (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at): + Declare as `internal_function'. + + * Makefile.am: Add rule to make .i files. This assists in debugging. + * awk.h (m_tree_eval): Add casts to NULL. (Some compilers are just + dumb. ADR) + +Mon Feb 23 15:58:39 2004 Arnold D. Robbins + + Clean up occupied process slots of children that have died: + + * awk.h (child_catcher): New function, declare it. + * main.c (main): Catch SIGCHLD/SIGCLD with `child_catcher'. + * io.c (child_died): New static variable. + (child_catcher): New function, sets `child_died', reinstalls self + as signal handler. + (close_rp): New function: isolates actual fp/iop closing logic. + (close_redir): Call `close_rp'. + (get_a_record): Check `child_died' and call `wait_any(0)' if so. + Add descriptive comment. + + Unrelated clean up: + + * eval.c (fcalls): Renamed from `fcall_list'. All uses changed. + (pop_fcall, push_args, dump_fcall_stack): Adjusted to use indexing + on `fcalls' instead of a pointer into it. Avoids hassles if `fcalls' + is realloc-ed during recursive tree_evals. Thanks to BWK. + + * config.guess, config.sub: Updated from Savannah. + +2004-02-19 gettextize + + * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.14.1. + +Wed Feb 18 12:40:09 2004 Arnold D. Robbins + + * awkgram.y (rule): Use `msg' not `warning' for `must have an + an action part' message. `warning' is wrong, since it's a real error. + +Mon Feb 16 12:17:39 2004 Arnold D. Robbins + + * main.c, eval.c, builtin.c: Change test for `#ifdef HAVE_LOCALE_H' + to `#if ENABLE_NLS && defined(HAVE_LOCALE_H)' so that builds with + `configure --disable-nls' will actually work on non-glibc systems. + +Thu Feb 12 02:05:34 2004 Stepan Kasal + + Lots of misc changes from Stepan Kasal integrated. + + * array.c: Various variables and parameters of static functions + changed from int to long, in order to prevent overflow. + + * eval.c (make_scalar): New function; takes care of everything + that has to be done when a node of type Node_var_new or + Node_array_ref changes to a scalar variable. + (tree_eval, get_lhs): Call it. + (tree_eval): From now on, tree_eval(NULL) doesn't work; + it reports an internal error. + * awk.h (m_tree_eval): Likewise for the two macro versions. + * awkgram.y (statement): Make sure the Node_K_return's lnode is + always the return value, never NULL. + + * Makefile.am (install-exec-hook, uninstall-links): Make use of + $(VERSION). + (INCLUDES): Renamed to AM_CPPFLAGS. + (AM_CPPFLAGS): The file libintl.h is generated in the + build subdirectory intl, not in the directory $(srcdir)/intl. + (diffout): New target is an alias for ``make -C test diffout.'' + * awklib/Makefile.am (INCLUDES): Renamed to AM_CPPFLAGS. + + * README_d/README.hpux: Change the whitespace in the appended patch, + so that it applies to the current source. + * posix/gawkmisc.c: Change a tab to a space (needed for the above). + + Make version control more in the style of current autotools: + + * configure.ac: Remove obsolete versions of macros: + AM_INIT_AUTOMAKE doesn't need any parameters. + AC_OUTPUT shouldn't have any parameters either. + Its parameters go to a new macro: AC_CONFIG_FILES. + AC_CONFIG_HEADERS moved near the end of the file. + * configure.ac: Add [version.c:version.in] to AC_CONFIG_FILES + * version.in: Modify for autoconf substitutions. + * version.c: Remove, it's generated at configure time now. + * fixvers, patchlev.h, unsupported/tandem/ptchlvl.h: Nuke and ... + * Makefile.am, main.c: ... forget them. + +Mon Feb 9 12:57:00 2004 Arnold D. Robbins + + * awk.h builtin.c eval.c field.c (HUGE): Changed to `UNLIMITED'. + Avoids possible conflict with constant in svid-mode math.h. Thanks to + Roman.Putanowicz@iecn.u-nancy.fr for pointing out the problem. + +Fri Feb 6 12:09:55 2004 Arnold D. Robbins + + * configure.ac: Check for `wctype', `wcscoll' and `iswctype'. + * mbsupport.h: New file. Merges and centralizes testing for MBS support. + * Makefile.am (base_sources): Add mbsupport.h to list. + * dfa.c, dfa.h, awk.h (MBS_SUPPORT): Include "mbsupport.h" and use the + test there. + * regex_internal (RE_ENABLE_I18N): Same. + + * Makefile.am (CLEANFILES): Added. + +Thu Feb 5 18:05:12 2004 Arnold D. Robbins + + * configure.ac (HAVE_WCTYPE_T): New test code added. + * dfa.h (wctype_t): Define if system doesn't. Needed here too + for other files that include dfa.h. + * dfa.c (wctype_t): Define if system doesn't. + (lex): Manually fill in arrays used for char class range testing + so will work on c89 and older compilers. + (parse_bracket_exp_mb): Split up an assignment to avoid type complaints. + + * main.c (main): When checking for `close_io' failure, only set + `exit_val' to 1 if not already exiting. + + * regcomp.c (regerror): Remove use of mempcpy. Generates too + many compiler warning. + * configure.ac (AC_CHECK_FUNCS): Don't bother checking for it. + +Wed Feb 4 17:34:47 2004 Arnold D. Robbins + + * getopt.h (__THROW): Only define it if C++. The __GNU_PREREQ + macro is a major headache. + +2004-02-02 Paolo Bonzini + + * regexec.c (check_matching): Add P_MATCH_FIRST parameter. + (re_search_internal): Pass new parameter to check_matching. + (check_matching): Unless a parenthesized group is found at the + beginning of the regexp, advance P_MATCH_FIRST until we entered + a state different from the initial state. + +Mon Feb 2 15:52:37 2004 Arnold D. Robbins + + * re.c (research): Change last param to re_search to pass + NULL if `need_start' is false. May give us a marginal speed gain. + +Thu Jan 29 17:04:51 2004 Arnold D. Robbins + + * builtin.c (sub_common): Fix logic for `&' in replacement for + multibyte case. Simplify code a bit. + +Tue Jan 20 10:41:45 2004 Arnold D. Robbins + + * configure.ac: Add check for `memmove'. + * replace.c: Include missing_d/memmove.c if don't have `memmove'. + +Sun Jan 18 12:01:29 2004 Arnold D. Robbins + + * builtin.c (sub_common): Add comment and support for 2001 POSIX + behavior when --posix in effect. The masses have been + clamoring for this one. + +2004-01-16 gettextize + + * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.13.1. + * intl/*: Updated to 0.13.1. + +Fri Jan 16 08:16:38 2004 Arnold D. Robbins + + * getopt.h, getopt.c, getopt1.c: Synced to GLIBC version: + getopt.c: 1.51 + getopt.h: 1.18 + getopt1.c: 1.9 + +Thu Jan 15 15:28:48 2004 Arnold D. Robbins + + Here we go again: + + * regcomp.c, regex.h, regex.c, regex_internal.h, regex_internal.c, + regexec.c: Sync to GLIBC version, but with bug fixes. GLIBC + CVS versions: + + regcomp.c: 1.76 + regexec.c: 1.55 + regex.c: 1.125 + regex.h: 1.30 + regex_internal.c: 1.39 + regex_internal.h: 1.45 + regexec.c: 1.55 + + * acinclude.m4: Removed, not needed for automake 1.8.x. + * configure.ac: Updated to autoconf 2.59. + + Everything else updated to automake 1.8x and autoconf 2.59. + +Wed Jan 14 14:26:36 2004 Arnold D. Robbins + + * dfa.c, dfa.h: Updated manually with most of the changes in + grep 2.5.1. That version lost the ability to match newlines + in the data, so the merge had to be done by hand. Sigh. + +2004-01-12 Paolo Bonzini + + ALLOCA patch from + http://sources.redhat.com/ml/libc-alpha/2004-01/msg00099.html + added. + + * regcomp.c [_LIBC && !RE_ENABLE_I18N]: + Drop code to support this, it is never true. + (build_range_exp) [!_LIBC]: Do not create a range + in MBCSET for a single-byte character set. + (build_range_exp) [_LIBC]: Do not create a range + in MBCSET for a single-byte character set without + collation elements. + (init_dfa): Do not conditionalize on _LIBC, it + just makes the code less clear. + (parse_bracket_exp): Use NON_MATCH variable in + addition to "mbcset->non_match", not as an + alternative. + (build_charclass_op): rename NOT parameter to + NON_MATCH, use it instead of declaring a variable. + (parse_bracket_exp) [!_LIBC]: Pass NULL for MBCSET + if the character set is single-byte. + +Wed Jan 7 15:23:04 2004 Arnold D. Robbins + + * awkgram.y (mk_rexp): Set n->re_cnt to 1. Makes reinstated + dfa code actually take effect! Don't know how I missed this. + + Unrelated: sync regex code to glibc. + + * regcomp.c, regex.h, regex.c, regex_internal.h, regex_internal.c, + regexec.c: Sync to GLIBC version, but with bug fixes. GLIBC + CVS versions: + + regcomp.c: 1.74 + regex.c: 1.124 + regex.h: 1.30 + regex_internal.c: 1.39 + regex_internal.h: 1.43 + regexec.c: 1.55 + + * regcomp.c (peek_token): Temporarily, we hope, disable \s and \S + operators. Too much trouble to document right now. + * dfa.c (lex): Add code for \s and \S but disable it until + next release. + +Wed Dec 24 15:28:57 2003 Arnold D. Robbins + + * eval.c (r_tree_eval): For Node_assign_concat, add + call `free_temp(r)'. Thanks to mary1john8@earthlink.net. + +Mon Dec 1 10:25:52 2003 Arnold D. Robbins + + CONSTVAL not needed if we test PERM instead. Thanks to + mary1john8@earthlink.net. See test/concat3.awk. + + * awk.h [CONSTVAL]: Removed. + * eval.c (flag2str): Removed CONSTVAL from table. + (r_tree_eval): For Node_assign_concat, it's enough to check + if l->flags has PERM clear. + * awkgram.y (yylex): Removed use of CONSTVAL for YSTRING and YNUMBER. + +Mon Nov 3 16:33:26 2003 Arnold D. Robbins + + * awkgram.y (get_src_buf): Replace `memmove' with `memcpy' for + marginal portability gain to older systems. + * io.c (get_a_record): Ditto. + +Sun Nov 2 15:59:27 2003 Arnold D. Robbins + + * awk.h [CONSTVAL]: Renamed from `STRCONST'. + * eval.c (flags2str): Fix in table. + (r_tree_eval): For Node_assign_concat, check for the flag for + both left and right hand sides. Also add a `force_string' call + for the right hand side and the left hand side. + * awkgram.y (yylex): Change flag value for YSTRING and add use + of flag for YNUMBER. + +Wed Oct 29 14:23:29 2003 Arnold D. Robbins + + * awk.h [STRCONST]: New flag value. + * eval.c (flags2str): Add it to table. + (r_tree_eval): For Node_assign_concat, check for the flag so that + we don't clobber string constants given: + s = "" + s = s something + * awkgram.y (yylex): For YSTRING, set STRCONST flag. + +Tue Oct 28 18:00:00 2003 Arnold D. Robbins + + Force SUBSEP to always have a string value. Per bug report + from mary1john8@earthlink.net. + + * awk.h (NODETYPE): New type, Node_SUBSEP. + (set_SUBSEP): Add declaration. + * awkgram.y (isnoeffect, isassignable): Add Node_SUBSPEP case. + * array.c (set_SUBSEP): New function. + * eval.c (nodetypes): Add Node_SUBSEP. + (r_tree_eval, r_get_lhs): Add code for Node_SUBSEP. + * main.c (varinit): Use Node_SUBSEP as type for SUBSEP. + * profile.c (tree_eval, pp_lhs, is_scalar, prec_level): Handle + Node_SUBSEP. + +Tue Oct 7 09:26:33 2003 Arnold D. Robbins + + * awk.h (NODETYPE): New member `Node_assign_concat'. + * awkgram.y (exp): Look for case of `x = x y' and if so, create a + Node_assign_concat. + * eval.c (interpret): Add case for Node_assign_concat. + * profile.c (prec_level): Ditto. + (tree_eval): Ditto. For variables, call new function `vname' to + print name; handles varname field for -v variables, which end up + including the value. + (vname): New function. + +Wed Sep 24 17:32:31 2003 Arnold D. Robbins + + Speed up `avoid_dfa' kludge, at least a little: + + * awk.h (struct Regexp): Add `has_anchor' member. Make it and + `dfa' member shorts; keeps space the same. + * re.c (make_regexp): Set `has_anchor' member correctly. + (avoid_dfa): Test for `has_anchor' member instead of searching + for it each time. + +Sun Sep 21 18:34:32 2003 Arnold D. Robbins + + * builtin.c (state): Only needs to be 256 bytes, initstate() can't + use any more than that. Well whadayaknow. + (do_rand, do_srand): Call `setstate' after calling `initstate'. + +Tue Sep 16 15:44:29 2003 Arnold D. Robbins + + * eval.c (interpret): For Node_K_switch, add kludge_need_start stuff + as used in `match_op'. Sigh. + * re.c (make_regexp): Add `no_dfa' variable, which is true if + GAWK_NO_DFA exists in the environment. This enables run time + testing of things with/without the dfa matcher. + +Mon Sep 15 18:36:38 2003 Arnold D. Robbins + + After much soul searching, reinstated old dfa code. The performance + of the new regex is just disastrous. Sigh. + + * awk.h (re_cnt): Reinstated old definition. + (struct Regexp): Added `dfareg' and `dfa' members. + (make_regexp): New last parameter in function, changed decl. + (avoid_dfa): Added declaration. + * awkgram.y (regexp, mk_rexp): Added use of `re_cnt'. Fixed call + to `make_regexp'. + * Makefile.am: Add dfa.h and dfa.c. + * eval.c (match_op): Complexified: added call to `avoid_dfa' and + `kludge_need_start' variable where used to pass FALSE as last parameter + of research(). + * field.c (set_FS): Fixed call to `make_regexp'. + * io.c (get_a_record, set_RS): Fixed calls to `make_regexp'. + * re.c (make_regexp): Added last paramter (`dfa') to function. + Complexified the code. + (re_update): Fixed call to `make_regexp'. + (research): Complexified the code, added calls to dfa stuff. + (dfaerror): New function. + (re_update): Fixed call to `make_regexp'. + (avoid_dfa): New function. + +Tue Sep 9 15:57:38 2003 Arnold D. Robbins + + * awkgram.y (get_src_buf): Fix calculation of `offset' when shifting + source lines around. In general, improve handling of things when + moving the source code line around. What a mess this code is. + +Mon Sep 8 19:08:55 2003 Arnold D. Robbins + + * eval.c (fmt_ok): Make provision for %F format and printf %'f flag + here too. + +2003-07-23 Christophe Bisiere (tiny change) + + * posix/regex.h (RE_TRANSLATE_TYPE): Define it to "unsigned char," + to avoid problems at hosts with signed char. + * posix/regexec.c (re_search_internal): Don't say + "unsigned RE_TRANSLATE_TYPE." + +Thu Aug 28 11:09:41 2003 Arnold D. Robbins + + * io.c (nextfile): Change use of variable `files' to make it + clearer that it's a boolean flag. + +Tue Aug 26 22:58:15 2003 Arnold D. Robbins + + * io.c (useropen): Add `defined (HAVE_GETGROUPS)' as first test + in `#ifdef'. Brings things in sync with same test in main.c and awk.h. + +Tue Aug 26 22:49:37 2003 Arnold D. Robbins + + * dbug.h: New file. + + * array.c, awkgram.y, builtin.c, eval.c, ext.c, field.c, io.c, + main.c, msg.c, node.c, profile.c, re.c: Converted to use + Fred Fish's `dbug' library. By default compiled out, thus + not affecting speed. + + For the nonce, the `dbug' library itself is not shipped with + gawk, since I expect no-one else but me to be using it. + +Thu Aug 21 23:15:36 2003 Arnold D. Robbins + + * awkgram.y (numfiles): Change extern decl to long, to match what's + in main.c. Keeps things working on 64-bit systems. Thanks to bug + report from Jan Oravec . + +Wed Aug 20 14:53:47 2003 Arnold D. Robbins + + * eval.c (genflags2str): Move test for out-of-space inside test + for is the bit set. + +Mon Aug 11 11:26:51 2003 Arnold D. Robbins + + * regcomp.c (parse_bracket_exp): If `build_charclass' fails, just pass + its value on as the return value. + +Sun Aug 10 16:59:14 2003 Arnold D. Robbins + + * regcomp.c (build_range_exp): Make sure we don't + get WEOF on range characters. + +Tue Aug 5 21:49:32 2003 Arnold D. Robbins + + * array.c (get_actual): In `case Node_param_list' add test for + `&& (symbol->flags & FUNC) == 0' to the if. + +Sun Jul 13 18:28:38 2003 Arnold D. Robbins + + Further bug fix: + + * awkgram.y (variable): Give the new variable an lnode + of Nnull_string if it's not an array, even if it is + a Node_var_new. + +Fri Jul 11 09:32:21 2003 Arnold D. Robbins + + Bug fix: + + * eval.c (r_tree_eval): For Node_array_ref, set + tree->orig_array->var_value to Nnull_string too. + + Unrelated i18n and POSIX change: + + * configure.ac: Add check for local printf supporting %F format. + * awk.h (loc): New variable declaration. + * main.c (loc): Defined. + (main): Call `localeconv' to set loc. + * io.c (format_tree): Add support for printf quote flag, %'d for + decimal formats (not %e, %E), adds thousand separator into value. + +2003-07-10 Paul Eggert + + * io.c (two_way_open): If /bin/sh cannot be executed, exit + with status 126 consistently. + Mon Jul 7 11:01:43 2003 Arnold D. Robbins * Release 3.1.3: Release tar file made. @@ -14,7 +796,7 @@ d_substr and d_length are NaN, or when 0 < d_length < 1. Be careful when comparing double to SIZE_MAX, as the comparison might return the "wrong" answer when - (double) SIZE_MAX is a number that is not equal to + `(double) SIZE_MAX' is a number that is not equal to SIZE_MAX. (do_gensub): Watch out for HOW values that are out of range or are NaN. @@ -892,7 +1674,7 @@ * main.c (usage, copyleft, catchsig, nostalgia, version): Mark with ATTRIBUTE_NORETURN. * profile.c (dump_and_exit): Likewise. - + 2002-10-29 Kaveh R. Ghazi * array.c (array_init): Use ISDIGIT, not isdigit. @@ -901,7 +1683,7 @@ * main.c (lintfunc): Fix !__SDTC__ case. * regex_internal.c (calc_state_hash): Fix inline declaration. * regexec.c (proceed_next_node): Cast assignment to correct type. - + 2002-10-29 Kaveh R. Ghazi * awk.h (exp_node, Func_ptr): Add prototype arguments. @@ -1421,7 +2203,7 @@ Sun Aug 4 00:37:38 2002 Stepan Kasal - * re.c (make_regexp): don't pass the error message returned by + * re.c (make_regexp): don't pass the error message returned by re_compile_pattern() to gettext(); it's already gettextized. (make_regexp): minor reformat of code. @@ -1812,8 +2594,8 @@ Sun Feb 3 17:56:20 2002 Bruno Haible - * builtin.c (do_bindtextdomain): Don't free the same variable twice. - * main.c (main): Call setlocale for LC_MESSAGE, to make dcgettext + * builtin.c (do_bindtextdomain): Don't free the same variable twice. + * main.c (main): Call setlocale for LC_MESSAGE, to make dcgettext function work on glibc systems. Wed Jan 23 15:03:36 2002 Andreas Buening @@ -2231,7 +3013,7 @@ not needed anymore. * profile.c (pp_string_fp): Enable printing of non-ascii characters verbatim if variable set. - + Fix memory corruption on SCO for array vars as params changed globally. * awk.h (BECAMEARRAY): new flag. * array.c (assoc_lookup): set the flag as appropriate. @@ -2476,7 +3258,7 @@ * array.c (assoc_lookup): Turn off PERM also when saving subscript. * builtin.c (sub_common): Turn off PERM also when making private copy of string. - + Add a minor memory cleanup facility (undocumented): * awk.h (do_tidy_mem, release_all_vars): Add declarations. * main.c (do_tidy_mem): Add declaration. @@ -2909,7 +3691,7 @@ * awk.h, node.c, profile.c: removed exec_count_init variable; code has been cleaned up to not need different values for profiling/not profiling. - + Thu Jul 5 21:10:59 2000 Arnold D. Robbins * eval.c (casetable): Removed the USE_PURE_ASCII stuff; it diff -urN gawk-3.1.3/FUTURES gawk-3.1.4/FUTURES --- gawk-3.1.3/FUTURES 2003-06-24 19:15:00.000000000 +0300 +++ gawk-3.1.4/FUTURES 2004-02-03 13:42:53.000000000 +0200 @@ -30,10 +30,14 @@ Additional manual features: DONE: Document NLS support - DONE: Use a new or improved dfa and/or regex library. + DONE: Add %'d for putting in commas in formatting. For 3.2 ======= + Enable \s, \S in regexes (regcomp.c and dfa.c) and document them. + + Make POSIX 2001 behavior the default for sub/gsub. + Simplify awk.h. Consider moving var_value info into Node_var itself @@ -43,19 +47,19 @@ Look at ISO C 99 printf features. - Add %'d for putting in commas in formatting? - Consider integrating Fred Fish's DBUG library into gawk. Move the loadable modules interface to libtool. Redo the loadable modules interface from the awk level. - Rework management of array index storage. + Rework management of array index storage. (Partially DONE.) A RECLEN variable for fixed-length record input. PROCINFO["RS"] would be "RS" or "RECLEN" depending upon what's in use. + Use a new or improved dfa and/or regex library. + DBM storage of awk arrays. Try to allow multiple dbm packages. Consider removing use of and/or need for the protos.h file. @@ -67,7 +71,6 @@ For 3.3 ======= - ? Have strftime() pay attention to the value of ENVIRON["TZ"] Add a lint check if the return value of a function is used but diff -urN gawk-3.1.3/Makefile.am gawk-3.1.4/Makefile.am --- gawk-3.1.3/Makefile.am 2003-05-19 14:58:24.000000000 +0300 +++ gawk-3.1.4/Makefile.am 2004-07-29 11:15:06.000000000 +0300 @@ -1,7 +1,7 @@ # # Makefile.am --- automake input file for gawk # -# Copyright (C) 2000-2003 the Free Software Foundation, Inc. +# Copyright (C) 2000-2004 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. @@ -50,7 +50,6 @@ config.sub \ depcomp \ extension \ - fixvers \ m4 \ missing \ missing_d \ @@ -86,6 +85,8 @@ awkgram.y \ builtin.c \ custom.h \ + dfa.c \ + dfa.h \ ext.c \ field.c \ gawkmisc.c \ @@ -94,10 +95,10 @@ getopt1.c \ gettext.h \ io.c \ + mbsupport.h \ main.c \ msg.c \ node.c \ - patchlev.h \ protos.h \ random.c \ random.h \ @@ -124,19 +125,28 @@ DEFS= -DDEFPATH=$(DEFPATH) -DHAVE_CONFIG_H -DGAWK -DLOCALEDIR="\"$(datadir)/locale\"" -INCLUDES = -I$(srcdir)/intl +AM_CPPFLAGS = -Iintl + +# Get rid of core files when cleaning +CLEANFILES = core core.* # We want hard links for install-exec-hook, below LN= ln -# First, add a link from gawk to gawk-X.Y.Z -# Same for pgawk -# For systems where gawk is awk, add a link to awk +SUFFIXES = .i +.c.i: + $(COMPILE) -E $< > $@ + +# First, add a link from gawk to gawk-X.Y.Z. +# Same for pgawk. +# +# For GNU systems where gawk is awk, add a link to awk. +# (This is done universally, which may not always be right, but +# there's no easy way to distinguish GNU from non-GNU systems.) install-exec-hook: - (fullname=gawk-`./gawk --version | sed 1q | awk '{print $$3}'` ; \ - cd $(DESTDIR)$(bindir); \ - $(LN) gawk $$fullname 2>/dev/null ; \ - $(LN) pgawk p$$fullname 2>/dev/null ; \ + (cd $(DESTDIR)$(bindir); \ + $(LN) gawk$(EXEEXT) gawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \ + $(LN) pgawk$(EXEEXT) pgawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \ if [ ! -f awk$(EXEEXT) ]; \ then $(LN_S) gawk$(EXEEXT) awk$(EXEEXT); \ fi; exit 0) @@ -145,8 +155,7 @@ uninstall-links: (cd $(DESTDIR)$(bindir); \ if [ -f awk$(EXEEXT) ] && cmp awk$(EXEEXT) gawk$(EXEEXT) > /dev/null; then rm -f awk$(EXEEXT); fi ; \ - fullname=gawk-`./gawk --version | sed 1q | ./gawk '{print $$3}'` ; \ - rm -f $$fullname p$$fullname; exit 0) + rm -f gawk-$(VERSION)$(EXEEXT) pgawk-$(VERSION)$(EXEEXT); exit 0) uninstall-recursive: uninstall-links @@ -165,15 +174,9 @@ if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \ else :; fi -# These force version and patchlevel to be up to date based -# on what's in configure.ac. No-one else but me should have -# to use them. So there. -patchlev.h: configure.ac - $(srcdir)/fixvers -p - -version.c: configure.ac version.in - $(srcdir)/fixvers -v - # This is for my development & testing. efence: gawk $(CC) $(LDFLAGS) -o gawk $$(ls *.o | grep -v '_p.o$$') $(LIBS) -lefence + +diffout: + @$(MAKE) -C test $@ diff -urN gawk-3.1.3/Makefile.in gawk-3.1.4/Makefile.in --- gawk-3.1.3/Makefile.in 2003-07-04 20:49:07.000000000 +0300 +++ gawk-3.1.4/Makefile.in 2004-08-02 12:16:30.000000000 +0300 @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.7.5 from Makefile.am. +# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004 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. @@ -17,7 +17,7 @@ # # Makefile.am --- automake input file for gawk # -# Copyright (C) 2000-2003 the Free Software Foundation, Inc. +# Copyright (C) 2000-2004 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. @@ -37,6 +37,8 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # +SOURCES = $(gawk_SOURCES) $(pgawk_SOURCES) + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -44,7 +46,6 @@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . - am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 @@ -59,6 +60,104 @@ PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ +ANSI2KNR = @ANSI2KNR@ +bin_PROGRAMS = gawk$(EXEEXT) pgawk$(EXEEXT) +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/configh.in \ + $(srcdir)/version.in $(top_srcdir)/configure \ + $(top_srcdir)/intl/Makefile.in ABOUT-NLS AUTHORS COPYING \ + ChangeLog INSTALL NEWS ansi2knr.1 ansi2knr.c awkgram.c \ + config.guess config.rpath config.sub depcomp install-sh \ + missing mkinstalldirs ylwrap +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ + $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ + $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ + $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/size_max.m4 \ + $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/stdint_h.m4 \ + $(top_srcdir)/m4/strtod.m4 $(top_srcdir)/m4/uintmax_t.m4 \ + $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/wchar_t.m4 \ + $(top_srcdir)/m4/wint_t.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 configure.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = intl/Makefile version.c +am__installdirs = "$(DESTDIR)$(bindir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am__objects_1 = array$U.$(OBJEXT) awkgram$U.$(OBJEXT) \ + builtin$U.$(OBJEXT) dfa$U.$(OBJEXT) ext$U.$(OBJEXT) \ + field$U.$(OBJEXT) gawkmisc$U.$(OBJEXT) getopt$U.$(OBJEXT) \ + getopt1$U.$(OBJEXT) io$U.$(OBJEXT) main$U.$(OBJEXT) \ + msg$U.$(OBJEXT) node$U.$(OBJEXT) random$U.$(OBJEXT) \ + re$U.$(OBJEXT) regex$U.$(OBJEXT) replace$U.$(OBJEXT) \ + version$U.$(OBJEXT) +am_gawk_OBJECTS = $(am__objects_1) eval$U.$(OBJEXT) \ + profile$U.$(OBJEXT) +gawk_OBJECTS = $(am_gawk_OBJECTS) +gawk_LDADD = $(LDADD) +gawk_DEPENDENCIES = +am_pgawk_OBJECTS = $(am__objects_1) eval_p$U.$(OBJEXT) \ + profile_p$U.$(OBJEXT) +pgawk_OBJECTS = $(am_pgawk_OBJECTS) +pgawk_LDADD = $(LDADD) +pgawk_DEPENDENCIES = +DEFAULT_INCLUDES = -I. -I$(srcdir) -I. +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/array$U.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/awkgram$U.Po ./$(DEPDIR)/builtin$U.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/dfa$U.Po ./$(DEPDIR)/eval$U.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/eval_p$U.Po ./$(DEPDIR)/ext$U.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/field$U.Po ./$(DEPDIR)/gawkmisc$U.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/getopt$U.Po ./$(DEPDIR)/getopt1$U.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/io$U.Po ./$(DEPDIR)/main$U.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/msg$U.Po ./$(DEPDIR)/node$U.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/profile$U.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/profile_p$U.Po ./$(DEPDIR)/random$U.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/re$U.Po ./$(DEPDIR)/regex$U.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/replace$U.Po ./$(DEPDIR)/version$U.Po +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) +YLWRAP = $(top_srcdir)/ylwrap +SOURCES = $(gawk_SOURCES) $(pgawk_SOURCES) +DIST_SOURCES = $(gawk_SOURCES) $(pgawk_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive +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); }; } +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ @@ -77,7 +176,6 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ - DEFS = -DDEFPATH=$(DEFPATH) -DHAVE_CONFIG_H -DGAWK -DLOCALEDIR="\"$(datadir)/locale\"" DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ @@ -88,6 +186,10 @@ GENCAT = @GENCAT@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ +HAVE_ASPRINTF = @HAVE_ASPRINTF@ +HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ +HAVE_SNPRINTF = @HAVE_SNPRINTF@ +HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -160,6 +262,7 @@ libexecdir = @libexecdir@/awk localstatedir = @localstatedir@ mandir = @mandir@ +mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ @@ -195,7 +298,6 @@ config.sub \ depcomp \ extension \ - fixvers \ m4 \ missing \ missing_d \ @@ -223,9 +325,6 @@ test -# what to make and install -bin_PROGRAMS = gawk pgawk - # sources for both gawk and pgawk base_sources = \ array.c \ @@ -233,6 +332,8 @@ awkgram.y \ builtin.c \ custom.h \ + dfa.c \ + dfa.h \ ext.c \ field.c \ gawkmisc.c \ @@ -241,10 +342,10 @@ getopt1.c \ gettext.h \ io.c \ + mbsupport.h \ main.c \ msg.c \ node.c \ - patchlev.h \ protos.h \ random.c \ random.h \ @@ -255,7 +356,6 @@ version.in \ version.c - gawk_SOURCES = $(base_sources) eval.c profile.c pgawk_SOURCES = $(base_sources) eval_p.c profile_p.c @@ -265,92 +365,51 @@ # stuff for compiling gawk/pgawk DEFPATH = "\".$(PATH_SEPARATOR)$(awkdatadir)\"" +AM_CPPFLAGS = -Iintl -INCLUDES = -I$(srcdir)/intl +# Get rid of core files when cleaning +CLEANFILES = core core.* # We want hard links for install-exec-hook, below LN = ln -subdir = . -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = intl/Makefile -bin_PROGRAMS = gawk$(EXEEXT) pgawk$(EXEEXT) -PROGRAMS = $(bin_PROGRAMS) - -am__objects_1 = array$U.$(OBJEXT) awkgram$U.$(OBJEXT) \ - builtin$U.$(OBJEXT) ext$U.$(OBJEXT) field$U.$(OBJEXT) \ - gawkmisc$U.$(OBJEXT) getopt$U.$(OBJEXT) getopt1$U.$(OBJEXT) \ - io$U.$(OBJEXT) main$U.$(OBJEXT) msg$U.$(OBJEXT) \ - node$U.$(OBJEXT) random$U.$(OBJEXT) re$U.$(OBJEXT) \ - regex$U.$(OBJEXT) replace$U.$(OBJEXT) version$U.$(OBJEXT) -am_gawk_OBJECTS = $(am__objects_1) eval$U.$(OBJEXT) profile$U.$(OBJEXT) -gawk_OBJECTS = $(am_gawk_OBJECTS) -gawk_LDADD = $(LDADD) -gawk_DEPENDENCIES = -gawk_LDFLAGS = -am_pgawk_OBJECTS = $(am__objects_1) eval_p$U.$(OBJEXT) \ - profile_p$U.$(OBJEXT) -pgawk_OBJECTS = $(am_pgawk_OBJECTS) -pgawk_LDADD = $(LDADD) -pgawk_DEPENDENCIES = -pgawk_LDFLAGS = - -DEFAULT_INCLUDES = -I. -I$(srcdir) -I. -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/array$U.Po ./$(DEPDIR)/awkgram$U.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/builtin$U.Po ./$(DEPDIR)/eval$U.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/eval_p$U.Po ./$(DEPDIR)/ext$U.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/field$U.Po ./$(DEPDIR)/gawkmisc$U.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/getopt$U.Po ./$(DEPDIR)/getopt1$U.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/io$U.Po ./$(DEPDIR)/main$U.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/msg$U.Po ./$(DEPDIR)/node$U.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/profile$U.Po ./$(DEPDIR)/profile_p$U.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/random$U.Po ./$(DEPDIR)/re$U.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/regex$U.Po ./$(DEPDIR)/replace$U.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/version$U.Po -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) -YLWRAP = $(top_srcdir)/ylwrap -DIST_SOURCES = $(gawk_SOURCES) $(pgawk_SOURCES) - -RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ - ps-recursive install-info-recursive uninstall-info-recursive \ - all-recursive install-data-recursive install-exec-recursive \ - installdirs-recursive install-recursive uninstall-recursive \ - check-recursive installcheck-recursive -DIST_COMMON = README ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL \ - Makefile.am Makefile.in NEWS acinclude.m4 aclocal.m4 ansi2knr.1 \ - ansi2knr.c awkgram.c config.guess config.rpath config.sub \ - configh.in configure configure.ac depcomp install-sh missing \ - mkinstalldirs ylwrap -DIST_SUBDIRS = $(SUBDIRS) -SOURCES = $(gawk_SOURCES) $(pgawk_SOURCES) - +SUFFIXES = .i all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -.SUFFIXES: .c .o .obj .y - -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) +.SUFFIXES: .i .c .o .obj .y +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) --gnu '; \ + cd $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe) +.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: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck -$(srcdir)/configure: $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) - cd $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): configure.ac acinclude.m4 m4/arch.m4 m4/codeset.m4 m4/gettext.m4 m4/glibc21.m4 m4/iconv.m4 m4/intdiv0.m4 m4/intmax_t.m4 m4/inttypes-pri.m4 m4/inttypes.m4 m4/inttypes_h.m4 m4/isc-posix.m4 m4/lcmessage.m4 m4/lib-ld.m4 m4/lib-link.m4 m4/lib-prefix.m4 m4/longlong.m4 m4/nls.m4 m4/po.m4 m4/progtest.m4 m4/socket.m4 m4/stdint_h.m4 m4/strtod.m4 m4/uintmax_t.m4 m4/ulonglong.m4 +$(top_srcdir)/configure: $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @@ -362,26 +421,27 @@ stamp-h1: $(srcdir)/configh.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h - -$(srcdir)/configh.in: $(top_srcdir)/configure.ac $(ACLOCAL_M4) +$(srcdir)/configh.in: $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) - touch $(srcdir)/configh.in + rm -f stamp-h1 + touch $@ distclean-hdr: -rm -f config.h stamp-h1 intl/Makefile: $(top_builddir)/config.status $(top_srcdir)/intl/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +version.c: $(top_builddir)/config.status $(srcdir)/version.in + cd $(top_builddir) && $(SHELL) ./config.status $@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(bindir) + test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \ - $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \ + echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done @@ -389,8 +449,8 @@ @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ - rm -f $(DESTDIR)$(bindir)/$$f; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @@ -403,12 +463,10 @@ $(LINK) $(pgawk_LDFLAGS) $(pgawk_OBJECTS) $(pgawk_LDADD) $(LIBS) mostlyclean-compile: - -rm -f *.$(OBJEXT) core *.core + -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c - -ANSI2KNR = @ANSI2KNR@ ansi2knr: ansi2knr.$(OBJEXT) $(LINK) ansi2knr.$(OBJEXT) $(LIBS) ansi2knr.$(OBJEXT): $(CONFIG_HEADER) @@ -422,6 +480,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/awkgram$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/builtin$U.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfa$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval_p$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ext$U.Po@am__quote@ @@ -441,36 +500,29 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/replace$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version$U.Po@am__quote@ -distclean-depend: - -rm -rf ./$(DEPDIR) - .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ -@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ -@am__fastdepCC_TRUE@ fi +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< +@am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ -@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ -@am__fastdepCC_TRUE@ fi +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` array_.c: array.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/array.c; then echo $(srcdir)/array.c; else echo array.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ awkgram_.c: awkgram.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/awkgram.c; then echo $(srcdir)/awkgram.c; else echo awkgram.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ builtin_.c: builtin.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/builtin.c; then echo $(srcdir)/builtin.c; else echo builtin.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +dfa_.c: dfa.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dfa.c; then echo $(srcdir)/dfa.c; else echo dfa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ eval_.c: eval.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/eval.c; then echo $(srcdir)/eval.c; else echo eval.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ eval_p_.c: eval_p.c $(ANSI2KNR) @@ -507,15 +559,15 @@ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/replace.c; then echo $(srcdir)/replace.c; else echo replace.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ version_.c: version.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/version.c; then echo $(srcdir)/version.c; else echo version.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -array_.$(OBJEXT) awkgram_.$(OBJEXT) builtin_.$(OBJEXT) eval_.$(OBJEXT) \ -eval_p_.$(OBJEXT) ext_.$(OBJEXT) field_.$(OBJEXT) gawkmisc_.$(OBJEXT) \ -getopt_.$(OBJEXT) getopt1_.$(OBJEXT) io_.$(OBJEXT) main_.$(OBJEXT) \ -msg_.$(OBJEXT) node_.$(OBJEXT) profile_.$(OBJEXT) profile_p_.$(OBJEXT) \ -random_.$(OBJEXT) re_.$(OBJEXT) regex_.$(OBJEXT) replace_.$(OBJEXT) \ -version_.$(OBJEXT) : $(ANSI2KNR) +array_.$(OBJEXT) awkgram_.$(OBJEXT) builtin_.$(OBJEXT) dfa_.$(OBJEXT) \ +eval_.$(OBJEXT) eval_p_.$(OBJEXT) ext_.$(OBJEXT) field_.$(OBJEXT) \ +gawkmisc_.$(OBJEXT) getopt_.$(OBJEXT) getopt1_.$(OBJEXT) io_.$(OBJEXT) \ +main_.$(OBJEXT) msg_.$(OBJEXT) node_.$(OBJEXT) profile_.$(OBJEXT) \ +profile_p_.$(OBJEXT) random_.$(OBJEXT) re_.$(OBJEXT) regex_.$(OBJEXT) \ +replace_.$(OBJEXT) version_.$(OBJEXT) : $(ANSI2KNR) .y.c: - $(SHELL) $(YLWRAP) `test -f '$<' || echo '$(srcdir)/'`$< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE) + $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE) uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd @@ -577,14 +629,6 @@ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done -ETAGS = etags -ETAGSFLAGS = - -CTAGS = ctags -CTAGSFLAGS = - -tags: TAGS - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -593,19 +637,22 @@ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique +tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) configh.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ - if (etags --etags-include --version) >/dev/null 2>&1; then \ + 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 && \ + test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ @@ -615,10 +662,11 @@ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$tags$$unique" \ - || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique - + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) configh.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) @@ -641,24 +689,11 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = . -distdir = $(PACKAGE)-$(VERSION) - -am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } - -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) - $(mkinstalldirs) $(distdir)/intl $(distdir)/po + $(mkdir_p) $(distdir)/. $(distdir)/intl $(distdir)/m4 $(distdir)/po @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ @@ -670,7 +705,7 @@ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ - $(mkinstalldirs) "$(distdir)$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ @@ -687,13 +722,13 @@ done list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d $(distdir)/$$subdir \ - || mkdir $(distdir)/$$subdir \ + test -d "$(distdir)/$$subdir" \ + || mkdir "$(distdir)/$$subdir" \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" \ - distdir=../$(distdir)/$$subdir \ + top_distdir="../$(top_distdir)" \ + distdir="../$(distdir)/$$subdir" \ distdir) \ || exit 1; \ fi; \ @@ -709,11 +744,23 @@ dist-gzip: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) - dist-bzip2: distdir $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) +dist-tarZ: distdir + $(AMTAR) chof - $(distdir) | 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 $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 @@ -723,8 +770,18 @@ # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist - $(am__remove_distdir) - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst @@ -745,19 +802,20 @@ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ - (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \ + (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-gzip \ - && rm -f $(distdir).tar.gz \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) - @echo "$(distdir).tar.gz is ready for distribution" | \ - sed 'h;s/./=/g;p;x;p;x' + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ @@ -782,8 +840,9 @@ all-am: Makefile $(ANSI2KNR) $(PROGRAMS) config.h installdirs: installdirs-recursive installdirs-am: - $(mkinstalldirs) $(DESTDIR)$(bindir) - + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive @@ -795,15 +854,16 @@ installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - INSTALL_STRIP_FLAG=-s \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -815,13 +875,17 @@ distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -distclean-am: clean-am distclean-compile distclean-depend \ - distclean-generic distclean-hdr distclean-tags + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: +html: html-recursive + info: info-recursive info-am: @@ -840,7 +904,9 @@ maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf autom4te.cache + -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf ./$(DEPDIR) + -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive @@ -859,35 +925,36 @@ uninstall-info: uninstall-info-recursive -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ - check-local clean clean-binPROGRAMS clean-generic clean-krextra \ - clean-recursive ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip distcheck distclean distclean-compile \ - distclean-depend distclean-generic distclean-hdr \ - distclean-recursive distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am dvi-recursive info info-am \ - info-recursive install install-am install-binPROGRAMS \ - install-data install-data-am install-data-recursive \ - install-exec install-exec-am install-exec-recursive \ - install-info install-info-am install-info-recursive install-man \ - install-recursive install-strip installcheck installcheck-am \ - installdirs installdirs-am installdirs-recursive \ +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ + check-am check-local clean clean-binPROGRAMS clean-generic \ + clean-krextra clean-recursive ctags ctags-recursive dist \ + dist-all dist-bzip2 dist-gzip dist-shar dist-tarZ dist-zip \ + distcheck distclean distclean-compile distclean-generic \ + distclean-hdr distclean-recursive distclean-tags \ + distcleancheck distdir distuninstallcheck dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-kr mostlyclean-recursive pdf \ - pdf-am pdf-recursive ps ps-am ps-recursive tags tags-recursive \ - uninstall uninstall-am uninstall-binPROGRAMS uninstall-info-am \ - uninstall-info-recursive uninstall-recursive + pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-info-am +.c.i: + $(COMPILE) -E $< > $@ -# First, add a link from gawk to gawk-X.Y.Z -# Same for pgawk -# For systems where gawk is awk, add a link to awk +# First, add a link from gawk to gawk-X.Y.Z. +# Same for pgawk. +# +# For GNU systems where gawk is awk, add a link to awk. +# (This is done universally, which may not always be right, but +# there's no easy way to distinguish GNU from non-GNU systems.) install-exec-hook: - (fullname=gawk-`./gawk --version | sed 1q | awk '{print $$3}'` ; \ - cd $(DESTDIR)$(bindir); \ - $(LN) gawk $$fullname 2>/dev/null ; \ - $(LN) pgawk p$$fullname 2>/dev/null ; \ + (cd $(DESTDIR)$(bindir); \ + $(LN) gawk$(EXEEXT) gawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \ + $(LN) pgawk$(EXEEXT) pgawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \ if [ ! -f awk$(EXEEXT) ]; \ then $(LN_S) gawk$(EXEEXT) awk$(EXEEXT); \ fi; exit 0) @@ -896,8 +963,7 @@ uninstall-links: (cd $(DESTDIR)$(bindir); \ if [ -f awk$(EXEEXT) ] && cmp awk$(EXEEXT) gawk$(EXEEXT) > /dev/null; then rm -f awk$(EXEEXT); fi ; \ - fullname=gawk-`./gawk --version | sed 1q | ./gawk '{print $$3}'` ; \ - rm -f $$fullname p$$fullname; exit 0) + rm -f gawk-$(VERSION)$(EXEEXT) pgawk-$(VERSION)$(EXEEXT); exit 0) uninstall-recursive: uninstall-links @@ -916,18 +982,12 @@ if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \ else :; fi -# These force version and patchlevel to be up to date based -# on what's in configure.ac. No-one else but me should have -# to use them. So there. -patchlev.h: configure.ac - $(srcdir)/fixvers -p - -version.c: configure.ac version.in - $(srcdir)/fixvers -v - # This is for my development & testing. efence: gawk $(CC) $(LDFLAGS) -o gawk $$(ls *.o | grep -v '_p.o$$') $(LIBS) -lefence + +diffout: + @$(MAKE) -C test $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -urN gawk-3.1.3/NEWS gawk-3.1.4/NEWS --- gawk-3.1.3/NEWS 2003-06-29 15:58:05.000000000 +0300 +++ gawk-3.1.4/NEWS 2004-07-28 16:27:19.000000000 +0300 @@ -1,3 +1,58 @@ +Changes from 3.1.3 to 3.1.4 +--------------------------- + +1. Gawk now supports the POSIX %F format, falling back to %f if the local + system printf doesn't handle it. + +2. Gawk now supports the ' flag in printf. E.g., %'d in a locale with thousands + separators includes the thousands separator in the value, e.g. 12,345. + + This has one problem; the ' flag is next to impossible to use on the + command line, without major quoting games. Oh well, TANSTAAFL. + +3. The dfa code has been reinstated; the performance degradation was + just too awful. Sigh. (For fun, use `export GAWK_NO_DFA=1' to + see the difference.) + +4. The special case `x = x y' is now recognized in the grammar, and gawk + now uses `realloc' to append the new value to the end of the existing + one. This can speed up the common case of appending onto a string. + +5. The dfa code was upgraded with most of the fixes from grep 2.5.1, and + the regex code was upgraded with GLIBC as mid-January 2004. The regex + code is faster than it was, but still not as fast as the dfa code, so + the dfa code stays in. The getopt code was also synced to current GLIBC. + +6. Support code upgraded to Automake 1.8.5, Autoconf 2.59, and gettext 0.14.1. + +7. When --posix is in effect, sub/gsub now follow the 2001 POSIX behavior. + Yippee. This is even documented in the manual. + +8. Gawk will now recover children that have died (input pipelines, two-way + pipes), upon detecting EOF from them, thus avoiding filling + up the process table. Open file descriptors are not recovered + (unfortunately), since that could break awk semantics. See the + ChangeLog and the source code for the details. + +9. Handling of numbers like `0,1' in non-American locales ought to + work correctly now. + +10. IGNORECASE is now locale-aware for characters with values above 128. + The dfa matcher is now used for IGNORECASE matches too. + +11. Dynamic function loading is better. The documentation has been improved + and some new APIs for use by dynamic functions have been added. + +12. Gawk now has a fighting chance of working on older systems, + a la SunOS 4.1.x. + +13. Issues with multibyte support on HP-UX are now resolved. `configure' now + disables such support there, since it's not up to what gawk needs. + +14. There are now even more tests in the test suite. + +15. Various bugs fixed; see ChangeLog for the details. + Changes from 3.1.2 to 3.1.3 --------------------------- diff -urN gawk-3.1.3/README gawk-3.1.4/README --- gawk-3.1.3/README 2003-06-29 15:50:37.000000000 +0300 +++ gawk-3.1.4/README 2004-07-28 16:27:58.000000000 +0300 @@ -1,6 +1,6 @@ README: -This is GNU Awk 3.1.3. It is upwardly compatible with the Bell Labs +This is GNU Awk 3.1.4. It is upwardly compatible with the Bell Labs research version of awk. It is almost completely compliant with the 1993 POSIX 1003.2 standard for awk. (See the note below about POSIX.) diff -urN gawk-3.1.3/README_d/README.hpux gawk-3.1.4/README_d/README.hpux --- gawk-3.1.3/README_d/README.hpux 2002-06-20 17:42:46.000000000 +0300 +++ gawk-3.1.4/README_d/README.hpux 2004-07-28 16:29:24.000000000 +0300 @@ -1,5 +1,40 @@ -Mon, 27 May 2002 17:55:46 +0800 +Wed Jul 28 16:28:42 IDT 2004 +============================ +As of gawk 3.1.4, configure should correctly handle HP-UX and +I18N issues. -- Arnold +-------------------------------------------------------------- +2003-12-10 15:19:38 EST +Michael Elizabeth Chastain + +I built and tested gawk on hppa-hp-hpux11.11 and ia64-hp-hpux11.23. +All the tests in the test suite passed. + +I built with these compilers: + + gcc 3.3.2 + hp ansi C from /opt/ansic/bin + hp aCC from /opt/aCC/bin + +I ran into these problems: + + NLS does not work; configure with --disable-nls. + -D_XOPEN_SOURCE=500 does not work. + Multibyte support is not available. + +To get multibyte support, the following ugly hack might work: +--- gawk-3.1.3.orig/custom.h 2003-06-09 17:45:53.000000000 +0200 ++++ gawk-3.1.3/custom.h 2003-12-17 15:55:04.000000000 +0100 +@@ -101,4 +101,7 @@ + #undef HAVE_TZSET + #define HAVE_TZSET 1 + #define _TZSET 1 ++/* an ugly hack: */ ++#include ++#define HAVE_MBRTOWC 1 + #endif + ------------------------------- +Mon, 27 May 2002 17:55:46 +0800 The network support "|&" may not work under HP-UX 11. An error message appears similar to this: @@ -23,21 +58,21 @@ Xiang Zhao Stepan Kasal ---- gawk-3.1.2-plain/posix/gawkmisc.c Tue Apr 16 13:58:41 2002 -+++ gawk-3.1.2-hpux/posix/gawkmisc.c Fri May 24 11:46:35 2002 -@@ -77,7 +77,13 @@ - * meant for in the first place. - */ +diff -ur gawk-3.1.3.a0/posix/gawkmisc.c gawk-3.1.3.a1/posix/gawkmisc.c +--- gawk-3.1.3.a0/posix/gawkmisc.c Sun May 25 15:26:19 2003 ++++ gawk-3.1.3.a1/posix/gawkmisc.c Fri Jul 11 08:56:03 2003 +@@ -126,7 +126,13 @@ + * meant for in the first place. + */ #ifdef HAVE_ST_BLKSIZE --#define DEFBLKSIZE (stb->st_blksize > 0 ? stb->st_blksize : BUFSIZ) -+ /* -+ * 100k must be enough for everybody, -+ * bigger number means probably a bug in fstat() -+ */ -+#define MAXBLKSIZE 102400 -+#define DEFBLKSIZE (stb->st_blksize > 0 && stb->st_blksize <= MAXBLKSIZE \ -+ ? stb->st_blksize : BUFSIZ) +-#define DEFBLKSIZE (stb->st_blksize > 0 ? stb->st_blksize : BUFSIZ) ++ /* ++ * 100k must be enough for everybody, ++ * bigger number means probably a bug in fstat() ++ */ ++#define MAXBLKSIZE 102400 ++#define DEFBLKSIZE (stb->st_blksize > 0 && stb->st_blksize <= MAXBLKSIZE \ ++ ? stb->st_blksize : BUFSIZ) #else - #define DEFBLKSIZE BUFSIZ + #define DEFBLKSIZE BUFSIZ #endif - diff -urN gawk-3.1.3/README_d/README.pc gawk-3.1.4/README_d/README.pc --- gawk-3.1.3/README_d/README.pc 2003-06-29 15:52:19.000000000 +0300 +++ gawk-3.1.4/README_d/README.pc 2004-02-24 17:24:01.000000000 +0200 @@ -112,8 +112,7 @@ The djgpp collection at - http://www.simtel.net/simtelnet/gnu/djgpp - ftp://ftp.simtel.net/simtelnet/pub/gnu/djgpp + ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/ contains a djgpp-compiled (32bit) version of gawk, along with many djgpp-compiled utilities. diff -urN gawk-3.1.3/ansi2knr.c gawk-3.1.4/ansi2knr.c --- gawk-3.1.3/ansi2knr.c 2003-03-06 11:11:50.000000000 +0200 +++ gawk-3.1.4/ansi2knr.c 2004-06-21 16:38:34.000000000 +0300 @@ -64,7 +64,7 @@ lpd 2000-04-12 backs out Eggert's changes because of bugs: - concatlits didn't declare the type of its bufend argument; - - concatlits didn't't recognize when it was inside a comment; + - concatlits didn't recognize when it was inside a comment; - scanstring could scan backward past the beginning of the string; when - the check for \ + newline in scanstring was unnecessary. diff -urN gawk-3.1.3/array.c gawk-3.1.4/array.c --- gawk-3.1.3/array.c 2003-07-04 20:12:45.000000000 +0300 +++ gawk-3.1.4/array.c 2004-07-26 17:11:01.000000000 +0300 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2003 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2004 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -42,7 +42,7 @@ #include "awk.h" -static NODE *assoc_find P((NODE *symbol, NODE *subs, int hash1)); +static NODE *assoc_find P((NODE *symbol, NODE *subs, unsigned long hash1)); static void grow_table P((NODE *symbol)); static unsigned long gst_hash_string P((const char *str, size_t len, unsigned long hsize)); @@ -100,19 +100,24 @@ case Node_array_ref: case Node_param_list: - if (canfatal) + if ((symbol->flags & FUNC) == 0) cant_happen(); /* else fall through */ default: /* notably Node_var but catches also e.g. FS[1] = "x" */ - if (canfatal) - fatal(isparam ? - _("attempt to use scalar parameter `%s' as an array") : - _("attempt to use scalar `%s' as array"), + if (canfatal) { + if ((symbol->flags & FUNC) != 0) + fatal(_("attempt to use function `%s' as an array"), save_symbol->vname); - else + else if (isparam) + fatal(_("attempt to use scalar parameter `%s' as an array"), + save_symbol->vname); + else + fatal(_("attempt to use scalar `%s' as array"), + save_symbol->vname); + } else break; } @@ -302,7 +307,7 @@ void assoc_clear(NODE *symbol) { - int i; + long i; NODE *bucket, *next; if (symbol->var_array == NULL) @@ -411,7 +416,7 @@ /* assoc_find --- locate symbol[subs] */ static NODE * /* NULL if not found */ -assoc_find(NODE *symbol, register NODE *subs, int hash1) +assoc_find(NODE *symbol, register NODE *subs, unsigned long hash1) { register NODE *bucket; const char *s1_str; @@ -444,7 +449,7 @@ NODE * in_array(NODE *symbol, NODE *subs) { - register int hash1; + register unsigned long hash1; NODE *ret; symbol = get_array(symbol); @@ -478,7 +483,7 @@ NODE ** assoc_lookup(NODE *symbol, NODE *subs, int reference) { - register int hash1; + register unsigned long hash1; register NODE *bucket; assert(symbol->type == Node_var_array); @@ -535,13 +540,20 @@ */ bucket->flags |= MALLOC; bucket->ahname_ref = 1; - emalloc(bucket->ahname_str, char *, subs->stlen + 2, "assoc_lookup"); - bucket->ahname_len = subs->stlen; - - memcpy(bucket->ahname_str, subs->stptr, subs->stlen); - bucket->ahname_str[bucket->ahname_len] = '\0'; - free_temp(subs); + /* For TEMP node, reuse the storage directly */ + if ((subs->flags & TEMP) != 0) { + bucket->ahname_str = subs->stptr; + bucket->ahname_len = subs->stlen; + bucket->ahname_str[bucket->ahname_len] = '\0'; + subs->flags &= ~TEMP; /* for good measure */ + freenode(subs); + } else { + emalloc(bucket->ahname_str, char *, subs->stlen + 2, "assoc_lookup"); + bucket->ahname_len = subs->stlen; + memcpy(bucket->ahname_str, subs->stptr, subs->stlen); + bucket->ahname_str[bucket->ahname_len] = '\0'; + } bucket->ahvalue = Nnull_string; bucket->ahnext = symbol->var_array[hash1]; @@ -559,7 +571,7 @@ void do_delete(NODE *sym, NODE *tree) { - register int hash1; + register unsigned long hash1; register NODE *bucket, *last; NODE *subs; register NODE *symbol = get_array(sym); @@ -642,7 +654,7 @@ void do_delete_loop(NODE *symbol, NODE *tree) { - size_t i; + long i; NODE **lhs; Func_ptr after_assign = NULL; @@ -676,7 +688,7 @@ NODE **old, **new, *chain, *next; int i, j; unsigned long hash1; - unsigned long oldsize, newsize; + unsigned long oldsize, newsize, k; /* * This is an array of primes. We grow the table by an order of * magnitude each time (not just doubling) so that growing is a @@ -721,11 +733,11 @@ /* old hash table there, move stuff to new, free old */ old = symbol->var_array; - for (i = 0; i < oldsize; i++) { - if (old[i] == NULL) + for (k = 0; k < oldsize; k++) { + if (old[k] == NULL) continue; - for (chain = old[i]; chain != NULL; chain = next) { + for (chain = old[k]; chain != NULL; chain = next) { next = chain->ahnext; hash1 = hash(chain->ahname_str, chain->ahname_len, newsize); @@ -746,6 +758,16 @@ symbol->array_size = newsize; } +/* set_SUBSEP --- make sure SUBSEP always has a string value */ + +void +set_SUBSEP(void) +{ + + (void) force_string(SUBSEP_node->var_value); + return; +} + /* pr_node --- print simple node info */ static void @@ -762,7 +784,7 @@ NODE * assoc_dump(NODE *symbol) { - int i; + long i; NODE *bucket; if (symbol->var_array == NULL) { @@ -831,7 +853,7 @@ dup_table(NODE *symbol, NODE *newsymb) { NODE **old, **new, *chain, *bucket; - int i; + long i; unsigned long cursize; /* find the current hash size */ @@ -929,7 +951,7 @@ /* merge_sort --- recursively sort the left and right sides of a list */ static NODE * -merge_sort(NODE *left, int size) +merge_sort(NODE *left, unsigned long size) { NODE *right, *tmp; int i, half; @@ -966,7 +988,7 @@ { NODE *next; unsigned long i = 0; - register int hash1; + register unsigned long hash1; char buf[100]; for (; list != NULL; list = next) { @@ -1001,7 +1023,7 @@ static NODE * assoc_sort_inplace(NODE *symbol, ASORT_TYPE how) { - int i, num; + unsigned long i, num; NODE *bucket, *next, *list; if (symbol->var_array == NULL diff -urN gawk-3.1.3/awk.h gawk-3.1.4/awk.h --- gawk-3.1.3/awk.h 2003-06-29 15:52:40.000000000 +0300 +++ gawk-3.1.4/awk.h 2004-07-26 17:11:05.000000000 +0300 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2003 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2004 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -73,9 +73,11 @@ #ifdef HAVE_SIGNUM_H #include #endif -#if defined(HAVE_MBRLEN) && defined(HAVE_MBRTOWC) && defined(HAVE_WCHAR_H) && defined(HAVE_WCTYPE_H) + +#include "mbsupport.h" /* defines MBS_SUPPORT */ + +#if defined(MBS_SUPPORT) /* We can handle multibyte strings. */ -#define MBS_SUPPORT #include #include #endif @@ -211,13 +213,16 @@ #include "unsupported/atari/redirect.h" #endif -#define RE_TRANSLATE_TYPE const char * #define GNU_REGEX #ifdef GNU_REGEX #include "regex.h" +#include "dfa.h" typedef struct Regexp { struct re_pattern_buffer pat; struct re_registers regs; + struct dfa dfareg; + short dfa; + short has_anchor; /* speed up of avoid_dfa kludge, temporary */ } Regexp; #define RESTART(rp,s) (rp)->regs.start[0] #define REEND(rp,s) (rp)->regs.end[0] @@ -326,6 +331,7 @@ Node_assign_plus, Node_assign_minus, Node_assign_exp, + Node_assign_concat, /* boolean binaries lnode and rnode are expressions */ Node_and, @@ -431,6 +437,7 @@ Node_ORS, Node_RS, Node_TEXTDOMAIN, + Node_SUBSEP, Node_final /* sentry value, not legal */ } NODETYPE; @@ -532,6 +539,7 @@ #define re_flags sub.nodep.reflags #define re_text lnode #define re_exp sub.nodep.x.extra +#define re_cnt sub.nodep.number #define forloop rnode->sub.nodep.r.hd @@ -650,7 +658,7 @@ #ifndef LONG_MIN #define LONG_MIN ((long)(-LONG_MAX - 1L)) #endif -#define HUGE LONG_MAX +#define UNLIMITED LONG_MAX /* -------------------------- External variables -------------------------- */ /* gawk builtin variables */ @@ -719,13 +727,17 @@ extern int ngroups; #endif +#ifdef HAVE_LOCALE_H +extern struct lconv loc; +#endif /* HAVE_LOCALE_H */ + extern const char *myname; extern char quote; extern char *defpath; extern char envsep; -extern const char casetable[]; /* for case-independent regexp matching */ +extern char casetable[]; /* for case-independent regexp matching */ /* ------------------------- Pseudo-functions ------------------------- */ @@ -787,9 +799,8 @@ #if __GNUC__ >= 2 #define m_tree_eval(t, iscond) __extension__ \ ({NODE * _t = (t); \ - if (_t == NULL) \ - _t = Nnull_string; \ - else { \ + if (_t == (NODE*)NULL) \ + cant_happen(); \ switch(_t->type) { \ case Node_val: \ if (_t->flags&INTLSTR) \ @@ -805,10 +816,9 @@ _t = r_tree_eval(_t, iscond);\ break; \ } \ - } \ _t;}) #else -#define m_tree_eval(t, iscond) (_t = (t), _t == NULL ? Nnull_string : \ +#define m_tree_eval(t, iscond) (_t = (t), _t == (NODE*)NULL ? (cant_happen(), (NODE*)NULL) : \ (_t->type == Node_param_list ? \ r_tree_eval(_t, iscond) : \ ((_t->type == Node_val && (_t->flags&INTLSTR)) ? \ @@ -834,20 +844,29 @@ #define cant_happen() r_fatal("internal error line %d, file: %s", \ __LINE__, __FILE__) +/* + * For SunOS 4.1.x which is pre-Standard C, `realloc' doesn't + * accept NULL. Sigh. The check must be done for both cases, + * since could be using GCC but with stock C library. Sigh, again. + */ #ifdef HAVE_STRINGIZE #define emalloc(var,ty,x,str) (void)((var=(ty)malloc((MALLOC_ARG_T)(x))) ||\ (fatal(_("%s: %s: can't allocate %ld bytes of memory (%s)"),\ (str), #var, (long) (x), strerror(errno)),0)) -#define erealloc(var,ty,x,str) (void)((var=(ty)realloc((char *)var,\ - (MALLOC_ARG_T)(x))) ||\ +#define erealloc(var,ty,x,str) (void)((var = ((var == NULL) \ + ? (ty)malloc((MALLOC_ARG_T)(x)) \ + : (ty)realloc((char *)var, (MALLOC_ARG_T)(x))) ) \ + ||\ (fatal(_("%s: %s: can't allocate %ld bytes of memory (%s)"),\ (str), #var, (long) (x), strerror(errno)),0)) #else /* HAVE_STRINGIZE */ #define emalloc(var,ty,x,str) (void)((var=(ty)malloc((MALLOC_ARG_T)(x))) ||\ (fatal(_("%s: %s: can't allocate %ld bytes of memory (%s)"),\ (str), "var", (long) (x), strerror(errno)),0)) -#define erealloc(var,ty,x,str) (void)((var=(ty)realloc((char *)var,\ - (MALLOC_ARG_T)(x))) ||\ +#define erealloc(var,ty,x,str) (void)((var = ((var == NULL) \ + ? (ty)malloc((MALLOC_ARG_T)(x)) \ + : (ty)realloc((char *)var, (MALLOC_ARG_T)(x))) ) \ + ||\ (fatal(_("%s: %s: can't allocate %ld bytes of memory (%s)"),\ (str), "var", (long) (x), strerror(errno)),0)) #endif /* HAVE_STRINGIZE */ @@ -905,6 +924,7 @@ extern NODE **assoc_lookup P((NODE *symbol, NODE *subs, int reference)); extern void do_delete P((NODE *symbol, NODE *tree)); extern void do_delete_loop P((NODE *symbol, NODE *tree)); +extern void set_SUBSEP P((void)); extern NODE *assoc_dump P((NODE *symbol)); extern NODE *do_adump P((NODE *tree)); extern NODE *do_asort P((NODE *tree)); @@ -923,6 +943,7 @@ extern const char *getfname P((NODE *(*)(NODE *))); extern NODE *stopme P((NODE *tree)); extern void shadow_funcs P((void)); +extern int check_special P((const char *name)); /* builtin.c */ extern double double_to_int P((double d)); extern NODE *do_exp P((NODE *tree)); @@ -988,6 +1009,8 @@ extern const char *genflags2str P((int flagval, const struct flagtab *tab)); extern const char *nodetype2str P((NODETYPE type)); extern NODE *assign_val P((NODE **lhs_p, NODE *rhs)); +extern void load_casetable P((void)); +extern size_t get_curfunc_arg_count P((void)); #ifdef PROFILING extern void dump_fcall_stack P((FILE *fp)); #endif @@ -996,6 +1019,9 @@ #ifdef DYNAMIC void make_builtin P((char *, NODE *(*)(NODE *), int)); NODE *get_argument P((NODE *, int)); +NODE *get_actual_argument P((NODE *, unsigned int, int, int)); +#define get_scalar_argument(t, i, opt) get_actual_argument((t), (i), (opt), FALSE) +#define get_array_argument(t, i, opt) get_actual_argument((t), (i), (opt), TRUE) void set_value P((NODE *)); #endif /* field.c */ @@ -1101,14 +1127,15 @@ extern void unref P((NODE *tmp)); extern int parse_escape P((const char **string_ptr)); /* re.c */ -extern Regexp *make_regexp P((const char *s, size_t len, int ignorecase)); -extern int research P((Regexp *rp, const char *str, int start, +extern Regexp *make_regexp P((const char *s, size_t len, int ignorecase, int dfa)); +extern int research P((Regexp *rp, char *str, int start, size_t len, int need_start)); extern void refree P((Regexp *rp)); extern void reg_error P((const char *s)); extern Regexp *re_update P((NODE *t)); extern void resyntax P((int syntax)); extern void resetup P((void)); +extern int avoid_dfa P((NODE *re, char *str, size_t len)); /* temporary */ extern int reisstring P((const char *text, size_t len, Regexp *re, const char *buf)); extern int remaybelong P((const char *text, size_t len)); diff -urN gawk-3.1.3/awkgram.y gawk-3.1.4/awkgram.y --- gawk-3.1.3/awkgram.y 2003-07-04 20:25:23.000000000 +0300 +++ gawk-3.1.4/awkgram.y 2004-07-26 17:11:12.000000000 +0300 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2003 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2004 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -90,7 +90,7 @@ extern char *source; extern int sourceline; extern struct src *srcfiles; -extern int numfiles; +extern long numfiles; extern int errcount; extern NODE *begin_block; extern NODE *end_block; @@ -205,10 +205,10 @@ } else { /* an error */ if (begin_or_end_rule) - warning(_("%s blocks must have an action part"), + msg(_("%s blocks must have an action part"), (parsing_end_rule ? "END" : "BEGIN")); else - warning(_("each rule must have a pattern or an action part")); + msg(_("each rule must have a pattern or an action part")); errcount++; } } @@ -316,9 +316,10 @@ getnode(n); n->type = Node_regex; n->re_exp = make_string($3, len); - n->re_reg = make_regexp($3, len, FALSE); + n->re_reg = make_regexp($3, len, FALSE, TRUE); n->re_text = NULL; n->re_flags = CONST; + n->re_cnt = 1; $$ = n; } ; @@ -386,7 +387,7 @@ * Check that the body is a `delete a[i]' statement, * and that both the loop var and array names match. */ - if ($8 != NULL && $8->type == Node_K_delete) { + if ($8 != NULL && $8->type == Node_K_delete && $8->rnode != NULL) { NODE *arr, *sub; assert($8->rnode->type == Node_expression_list); @@ -465,7 +466,10 @@ yyerror(_("`return' used outside function context")); } opt_exp statement_term - { $$ = node($3, Node_K_return, (NODE *) NULL); } + { + $$ = node($3 == NULL ? Nnull_string : $3, + Node_K_return, (NODE *) NULL); + } | simple_stmt statement_term ; @@ -677,6 +681,7 @@ $$ = node($3, $1, (NODE *) NULL); if ($1 == Node_redirect_twoway && $3->type == Node_K_getline + && $3->rnode != NULL && $3->rnode->type == Node_redirect_twoway) yyerror(_("multistage two-way pipelines don't work")); } @@ -770,7 +775,20 @@ { if (do_lint && $3->type == Node_regex) lintwarn(_("regular expression on right of assignment")); - $$ = node($1, $2, $3); + /* + * Optimization of `x = x y'. Can save lots of time + * if done a lot. + */ + if (( $1->type == Node_var + || $1->type == Node_var_new + || $1->type == Node_param_list) + && $2 == Node_assign + && $3->type == Node_concat + && $3->lnode == $1) { + $3->type = Node_assign_concat; /* Just change the type */ + $$ = $3; /* And use it directly */ + } else + $$ = node($1, $2, $3); } | exp LEX_AND exp { $$ = node($1, Node_and, $3); } @@ -1158,6 +1176,8 @@ * Saving and restoring *bp keeps valgrind happy, * since the guts of glibc uses strlen, even though * we're passing an explict precision. Sigh. + * + * 8/2003: We may not need this anymore. */ save = *bp; *bp = '\0'; @@ -1204,15 +1224,16 @@ static int samefile = FALSE; static int nextfile = 0; static char *buf = NULL; + static size_t buflen = 0; static int fd; + int n; register char *scan; - static size_t len = 0; - static int did_newline = FALSE; int newfile; struct stat sbuf; - -# define SLOP 128 /* enough space to hold most source lines */ + int readcount = 0; + int l; + char *readloc; again: newfile = FALSE; @@ -1220,66 +1241,60 @@ return NULL; if (srcfiles[nextfile].stype == CMDLINE) { - if (len == 0) { - len = strlen(srcfiles[nextfile].val); - if (len == 0) { - /* - * Yet Another Special case: - * gawk '' /path/name - * Sigh. - */ - static int warned = FALSE; - - if (do_lint && ! warned) { - warned = TRUE; - lintwarn(_("empty program text on command line")); - } - ++nextfile; - goto again; - } - sourceline = 1; - lexptr = lexptr_begin = srcfiles[nextfile].val; - lexend = lexptr + len; - } else if (! did_newline && *(lexptr-1) != '\n') { + if ((l = strlen(srcfiles[nextfile].val)) == 0) { /* - * The following goop is to ensure that the source - * ends with a newline and that the entire current - * line is available for error messages. + * Yet Another Special case: + * gawk '' /path/name + * Sigh. */ - int offset; + static int warned = FALSE; - did_newline = TRUE; - offset = lexptr - lexeme; - for (scan = lexeme; scan > lexptr_begin; scan--) - if (*scan == '\n') { - scan++; - break; - } - len = lexptr - scan; - emalloc(buf, char *, len+1, "get_src_buf"); - memcpy(buf, scan, len); - thisline = buf; - lexptr = buf + len; - *lexptr = '\n'; - lexeme = lexptr - offset; - lexptr_begin = buf; - lexend = lexptr + 1; + if (do_lint && ! warned) { + warned = TRUE; + lintwarn(_("empty program text on command line")); + } + ++nextfile; + goto again; + } + if (srcfiles[nextfile].val[l-1] == '\n') { + /* has terminating newline, can use it directly */ + sourceline = 1; + lexptr = lexptr_begin = srcfiles[nextfile].val; + /* fall through to pointer adjustment and return, below */ } else { - len = 0; - lexeme = lexptr = lexptr_begin = NULL; + /* copy it into static buffer */ + + /* make sure buffer exists and has room */ + if (buflen == 0) { + emalloc(buf, char *, l+2, "get_src_buf"); + buflen = l + 2; + } else if (l+2 > buflen) { + erealloc(buf, char *, l+2, "get_src_buf"); + buflen = l + 2; + } /* else + buffer has room, just use it */ + + /* copy in data */ + memcpy(buf, srcfiles[nextfile].val, l); + buf[l] = '\n'; + buf[++l] = '\0'; + + /* set vars and return */ + lexptr = lexptr_begin = buf; } - if (lexptr == NULL && ++nextfile <= numfiles) - goto again; + lexend = lexptr + l; + nextfile++; /* for next entry to this routine */ return lexptr; } + if (! samefile) { source = srcfiles[nextfile].val; - if (source == NULL) { + if (source == NULL) { /* read all the source files, all done */ if (buf != NULL) { free(buf); buf = NULL; } - len = 0; + buflen = 0; return lexeme = lexptr = lexptr_begin = NULL; } fd = pathopen(source); @@ -1292,37 +1307,79 @@ fatal(_("can't open source file `%s' for reading (%s)"), in, strerror(errno)); } - len = optimal_bufsize(fd, & sbuf); + l = optimal_bufsize(fd, & sbuf); + /* + * Make sure that something silly like + * AWKBUFSIZE=8 make check + * works ok. + */ +#define A_DECENT_BUFFER_SIZE 128 + if (l < A_DECENT_BUFFER_SIZE) + l = A_DECENT_BUFFER_SIZE; +#undef A_DECENT_BUFFER_SIZE + newfile = TRUE; - if (buf != NULL) - free(buf); - emalloc(buf, char *, len + SLOP, "get_src_buf"); - lexptr_begin = buf + SLOP; + + /* make sure buffer exists and has room */ + if (buflen == 0) { + emalloc(buf, char *, l+2, "get_src_buf"); + buflen = l + 2; + } else if (l+2 > buflen) { + erealloc(buf, char *, l+2, "get_src_buf"); + buflen = l + 2; + } /* else + buffer has room, just use it */ + + readcount = l; + readloc = lexeme = lexptr = lexptr_begin = buf; samefile = TRUE; sourceline = 1; } else { /* - * Here, we retain the current source line (up to length SLOP) - * in the beginning of the buffer that was overallocated above + * In same file, ran off edge of buffer. + * Shift current line down to front, adjust + * pointers and fill in the rest of the buffer. */ - int offset; - int linelen; - offset = lexptr - lexeme; - for (scan = lexeme; scan > lexptr_begin; scan--) + int lexeme_offset = lexeme - lexptr_begin; + int lexptr_offset = lexptr - lexptr_begin; + int lexend_offset = lexend - lexptr_begin; + + /* find beginning of current line */ + for (scan = lexeme; scan >= lexptr_begin; scan--) { if (*scan == '\n') { scan++; break; } - linelen = lexptr - scan; - if (linelen > SLOP) - linelen = SLOP; - thisline = buf + SLOP - linelen; - memcpy(thisline, scan, linelen); - lexeme = buf + SLOP - offset; - lexptr_begin = thisline; + } + + if (scan <= buf) { + /* have to grow the buffer */ + buflen *= 2; + erealloc(buf, char *, buflen, "get_src_buf"); + } else { + /* shift things down */ + memmove(buf, scan, lexend - scan); + /* + * make offsets relative to start of line, + * not start of buffer. + */ + lexend_offset = lexend - scan; + lexeme_offset = lexeme - scan; + lexptr_offset = lexptr - scan; + } + + /* adjust pointers */ + lexeme = buf + lexeme_offset; + lexptr = buf + lexptr_offset; + lexend = buf + lexend_offset; + lexptr_begin = buf; + readcount = buflen - (lexend - buf); + readloc = lexend; } - n = read(fd, buf + SLOP, len); + + /* add more data to buffer */ + n = read(fd, readloc, readcount); if (n == -1) fatal(_("can't read sourcefile `%s' (%s)"), source, strerror(errno)); @@ -1339,14 +1396,10 @@ close(fd); samefile = FALSE; nextfile++; - if (lexeme) - *lexeme = '\0'; - len = 0; goto again; } - lexptr = buf + SLOP; lexend = lexptr + n; - return buf; + return lexptr; } /* tokadd --- add a character to the token buffer */ @@ -1523,7 +1576,7 @@ int seen_e = FALSE; /* These are for numbers */ int seen_point = FALSE; int esc_seen; /* for literal strings */ - int low, mid, high; + int mid; static int did_newline = FALSE; char *tokkey; static int lasttok = 0, eof_warned = FALSE; @@ -2102,44 +2155,31 @@ } /* See if it is a special token. */ - low = 0; - high = (sizeof(tokentab) / sizeof(tokentab[0])) - 1; - while (low <= high) { - int i; - - mid = (low + high) / 2; - c = *tokstart - tokentab[mid].operator[0]; - i = c ? c : strcmp(tokstart, tokentab[mid].operator); - if (i < 0) /* token < mid */ - high = mid - 1; - else if (i > 0) /* token > mid */ - low = mid + 1; + if ((mid = check_special(tokstart)) >= 0) { + if (do_lint) { + if (tokentab[mid].flags & GAWKX) + lintwarn(_("`%s' is a gawk extension"), + tokentab[mid].operator); + if (tokentab[mid].flags & RESX) + lintwarn(_("`%s' is a Bell Labs extension"), + tokentab[mid].operator); + if (tokentab[mid].flags & NOT_POSIX) + lintwarn(_("POSIX does not allow `%s'"), + tokentab[mid].operator); + } + if (do_lint_old && (tokentab[mid].flags & NOT_OLD)) + warning(_("`%s' is not supported in old awk"), + tokentab[mid].operator); + if ((do_traditional && (tokentab[mid].flags & GAWKX)) + || (do_posix && (tokentab[mid].flags & NOT_POSIX))) + ; else { - if (do_lint) { - if (tokentab[mid].flags & GAWKX) - lintwarn(_("`%s' is a gawk extension"), - tokentab[mid].operator); - if (tokentab[mid].flags & RESX) - lintwarn(_("`%s' is a Bell Labs extension"), - tokentab[mid].operator); - if (tokentab[mid].flags & NOT_POSIX) - lintwarn(_("POSIX does not allow `%s'"), - tokentab[mid].operator); - } - if (do_lint_old && (tokentab[mid].flags & NOT_OLD)) - warning(_("`%s' is not supported in old awk"), - tokentab[mid].operator); - if ((do_traditional && (tokentab[mid].flags & GAWKX)) - || (do_posix && (tokentab[mid].flags & NOT_POSIX))) - break; if (tokentab[mid].class == LEX_BUILTIN - || tokentab[mid].class == LEX_LENGTH - ) + || tokentab[mid].class == LEX_LENGTH) yylval.lval = mid; else yylval.nodetypeval = tokentab[mid].value; - free(tokkey); return lasttok = tokentab[mid].class; } @@ -2171,8 +2211,8 @@ getnode(r); r->type = op; r->flags = MALLOC; - /* if lookahead is NL, lineno is 1 too high */ - if (lexeme && *lexeme == '\n') + /* if lookahead is a NL, lineno is 1 too high */ + if (lexeme && lexeme >= lexptr_begin && *lexeme == '\n') r->source_line = sourceline - 1; else r->source_line = sourceline; @@ -2623,10 +2663,7 @@ { int i, j; NODE *p; - static struct finfo *tab = NULL; - - if (func_count == 0) - return; + struct finfo *tab = NULL; /* * Walk through symbol table countng functions. @@ -2641,8 +2678,10 @@ } } - if (tab == NULL) - emalloc(tab, struct finfo *, j * sizeof(struct finfo), "dump_funcs"); + if (j == 0) + return; + + emalloc(tab, struct finfo *, j * sizeof(struct finfo), "dump_funcs"); /* now walk again, copying info */ for (i = j = 0; i < HASHSIZE; i++) { @@ -2991,9 +3030,9 @@ if ((r = lookup(name)) != NULL) { if (r->type == Node_func) - fatal(_("function `%s' called with space between name and `(',\n%s"), - r->vname, - _("or used as a variable or an array")); + fatal(_("function `%s' called with space between name and `(',\nor used as a variable or an array"), + r->vname); + } else { /* not found */ if (! do_traditional && STREQ(name, "PROCINFO")) @@ -3006,10 +3045,10 @@ */ NODE *n; - if (type == Node_var) - n = node(Nnull_string, type, (NODE *) NULL); - else + if (type == Node_var_array) n = node((NODE *) NULL, type, (NODE *) NULL); + else + n = node(Nnull_string, type, (NODE *) NULL); return install(name, n); } @@ -3035,6 +3074,7 @@ n->re_text = NULL; n->re_reg = NULL; n->re_flags = 0; + n->re_cnt = 1; return n; } @@ -3087,6 +3127,7 @@ case Node_CONVFMT: case Node_BINMODE: case Node_LINT: + case Node_SUBSEP: case Node_TEXTDOMAIN: return TRUE; default: @@ -3117,6 +3158,7 @@ case Node_OFS: case Node_LINT: case Node_BINMODE: + case Node_SUBSEP: case Node_TEXTDOMAIN: case Node_field_spec: case Node_subscript: @@ -3134,7 +3176,7 @@ NODE * stopme(NODE *tree ATTRIBUTE_UNUSED) { - return 0; + return (NODE *) 0; } /* dumpintlstr --- write out an initial .po file entry for the string */ @@ -3216,7 +3258,7 @@ case Node_var_array: return TRUE; case Node_param_list: - return ((n->flags & FUNC) == 0); + return (n->flags & FUNC) == 0; case Node_array_ref: cant_happen(); break; @@ -3226,3 +3268,29 @@ return FALSE; } + +/* See if name is a special token. */ + +int +check_special(const char *name) +{ + int low, high, mid; + int i; + + low = 0; + high = (sizeof(tokentab) / sizeof(tokentab[0])) - 1; + while (low <= high) { + mid = (low + high) / 2; + i = *name - tokentab[mid].operator[0]; + if (i == 0) + i = strcmp(name, tokentab[mid].operator); + + if (i < 0) /* token < mid */ + high = mid - 1; + else if (i > 0) /* token > mid */ + low = mid + 1; + else + return mid; + } + return -1; +} diff -urN gawk-3.1.3/awklib/ChangeLog gawk-3.1.4/awklib/ChangeLog --- gawk-3.1.3/awklib/ChangeLog 2003-07-07 21:02:03.000000000 +0300 +++ gawk-3.1.4/awklib/ChangeLog 2004-08-02 12:18:42.000000000 +0300 @@ -1,3 +1,12 @@ +Mon Aug 2 12:18:15 2004 Arnold D. Robbins + + * Release 3.1.4: Release tar file made. + +Thu Mar 18 17:43:59 2004 Arnold D. Robbins + + * Makefile.am (INCLUDES): Renamed to AM_CPPFLAGS. Per + Stepan Kasal. + Mon Jul 7 11:01:43 2003 Arnold D. Robbins * Release 3.1.3: Release tar file made. diff -urN gawk-3.1.3/awklib/Makefile.am gawk-3.1.4/awklib/Makefile.am --- gawk-3.1.3/awklib/Makefile.am 2003-02-04 14:08:16.000000000 +0200 +++ gawk-3.1.4/awklib/Makefile.am 2004-07-28 16:32:55.000000000 +0300 @@ -1,7 +1,7 @@ # # awklib/Makefile.am --- automake input file for gawk # -# Copyright (C) 1995-2003 the Free Software Foundation, Inc. +# Copyright (C) 1995-2004 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. @@ -27,7 +27,7 @@ # This is so we get config.h. It'll be in the build directory, # not the source directory. -INCLUDES = -I.. +AM_CPPFLAGS = -I.. datadir = @datadir@/awk libexecdir = @libexecdir@/awk diff -urN gawk-3.1.3/awklib/Makefile.in gawk-3.1.4/awklib/Makefile.in --- gawk-3.1.3/awklib/Makefile.in 2003-07-04 20:50:29.000000000 +0300 +++ gawk-3.1.4/awklib/Makefile.in 2004-08-02 12:16:30.000000000 +0300 @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.7.5 from Makefile.am. +# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004 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. @@ -17,7 +17,7 @@ # # awklib/Makefile.am --- automake input file for gawk # -# Copyright (C) 1995-2003 the Free Software Foundation, Inc. +# Copyright (C) 1995-2004 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. @@ -37,6 +37,9 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # + +SOURCES = $(nodist_grcat_SOURCES) $(nodist_pwcat_SOURCES) + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -44,7 +47,6 @@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. - am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 @@ -59,6 +61,56 @@ PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ +libexec_PROGRAMS = pwcat$(EXEEXT) grcat$(EXEEXT) +subdir = awklib +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ + $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ + $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ + $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/size_max.m4 \ + $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/stdint_h.m4 \ + $(top_srcdir)/m4/strtod.m4 $(top_srcdir)/m4/uintmax_t.m4 \ + $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/wchar_t.m4 \ + $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(bindir)" +libexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(libexec_PROGRAMS) +nodist_grcat_OBJECTS = grcat.$(OBJEXT) +grcat_OBJECTS = $(nodist_grcat_OBJECTS) +grcat_LDADD = $(LDADD) +nodist_pwcat_OBJECTS = pwcat.$(OBJEXT) +pwcat_OBJECTS = $(nodist_pwcat_OBJECTS) +pwcat_LDADD = $(LDADD) +binSCRIPT_INSTALL = $(INSTALL_SCRIPT) +SCRIPTS = $(bin_SCRIPTS) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/grcat.Po ./$(DEPDIR)/pwcat.Po +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(nodist_grcat_SOURCES) $(nodist_pwcat_SOURCES) +DIST_SOURCES = +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ @@ -87,6 +139,10 @@ GENCAT = @GENCAT@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ +HAVE_ASPRINTF = @HAVE_ASPRINTF@ +HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ +HAVE_SNPRINTF = @HAVE_SNPRINTF@ +HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -143,7 +199,6 @@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ - datadir = @datadir@/awk exec_prefix = @exec_prefix@ host = @host@ @@ -158,6 +213,7 @@ libexecdir = @libexecdir@/awk localstatedir = @localstatedir@ mandir = @mandir@ +mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ @@ -165,71 +221,58 @@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ - EXTRA_DIST = ChangeLog extract.awk eg stamp-eg # This is so we get config.h. It'll be in the build directory, # not the source directory. -INCLUDES = -I.. - +AM_CPPFLAGS = -I.. bin_SCRIPTS = igawk -libexec_PROGRAMS = pwcat grcat AUXAWK = passwd.awk group.awk nodist_grcat_SOURCES = grcat.c nodist_pwcat_SOURCES = pwcat.c -subdir = awklib -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -libexec_PROGRAMS = pwcat$(EXEEXT) grcat$(EXEEXT) -PROGRAMS = $(libexec_PROGRAMS) - -nodist_grcat_OBJECTS = grcat.$(OBJEXT) -grcat_OBJECTS = $(nodist_grcat_OBJECTS) -grcat_LDADD = $(LDADD) -grcat_DEPENDENCIES = -grcat_LDFLAGS = -nodist_pwcat_OBJECTS = pwcat.$(OBJEXT) -pwcat_OBJECTS = $(nodist_pwcat_OBJECTS) -pwcat_LDADD = $(LDADD) -pwcat_DEPENDENCIES = -pwcat_LDFLAGS = -SCRIPTS = $(bin_SCRIPTS) - - -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/grcat.Po ./$(DEPDIR)/pwcat.Po -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -DIST_SOURCES = -DIST_COMMON = ChangeLog Makefile.am Makefile.in -SOURCES = $(nodist_grcat_SOURCES) $(nodist_pwcat_SOURCES) - all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) +$(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 \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu awklib/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu awklib/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) -libexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +.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 install-libexecPROGRAMS: $(libexec_PROGRAMS) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(libexecdir) + test -z "$(libexecdir)" || $(mkdir_p) "$(DESTDIR)$(libexecdir)" @list='$(libexec_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(libexecPROGRAMS_INSTALL) $$p $(DESTDIR)$(libexecdir)/$$f"; \ - $(INSTALL_PROGRAM_ENV) $(libexecPROGRAMS_INSTALL) $$p $(DESTDIR)$(libexecdir)/$$f || exit 1; \ + echo " $(INSTALL_PROGRAM_ENV) $(libexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(libexecdir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(libexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(libexecdir)/$$f" || exit 1; \ else :; fi; \ done @@ -237,22 +280,21 @@ @$(NORMAL_UNINSTALL) @list='$(libexec_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f $(DESTDIR)$(libexecdir)/$$f"; \ - rm -f $(DESTDIR)$(libexecdir)/$$f; \ + echo " rm -f '$(DESTDIR)$(libexecdir)/$$f'"; \ + rm -f "$(DESTDIR)$(libexecdir)/$$f"; \ done clean-libexecPROGRAMS: -test -z "$(libexec_PROGRAMS)" || rm -f $(libexec_PROGRAMS) -binSCRIPT_INSTALL = $(INSTALL_SCRIPT) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(bindir) + test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f"; \ - $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f; \ + echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ else :; fi; \ done @@ -260,12 +302,12 @@ @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ - rm -f $(DESTDIR)$(bindir)/$$f; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ done mostlyclean-compile: - -rm -f *.$(OBJEXT) core *.core + -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @@ -273,40 +315,23 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grcat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwcat.Po@am__quote@ -distclean-depend: - -rm -rf ./$(DEPDIR) - .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ -@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ -@am__fastdepCC_TRUE@ fi +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< +@am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ -@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ -@am__fastdepCC_TRUE@ fi +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: -ETAGS = etags -ETAGSFLAGS = - -CTAGS = ctags -CTAGSFLAGS = - -tags: TAGS - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -315,6 +340,7 @@ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique +tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) @@ -326,10 +352,11 @@ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$tags$$unique" \ - || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique - + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) @@ -352,10 +379,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = .. -distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @@ -369,7 +392,7 @@ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ - $(mkinstalldirs) "$(distdir)$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ @@ -387,9 +410,10 @@ check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) - installdirs: - $(mkinstalldirs) $(DESTDIR)$(libexecdir) $(DESTDIR)$(bindir) + for dir in "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -401,7 +425,7 @@ installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - INSTALL_STRIP_FLAG=-s \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: @@ -409,24 +433,28 @@ clean-generic: distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f $(CONFIG_CLEAN_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-libexecPROGRAMS clean-local mostlyclean-am +clean-am: clean-generic clean-libexecPROGRAMS clean-local \ + mostlyclean-am distclean: distclean-am - -distclean-am: clean-am distclean-compile distclean-depend \ - distclean-generic distclean-tags + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags dvi: dvi-am dvi-am: +html: html-am + info: info-am info-am: @@ -444,7 +472,8 @@ installcheck-am: maintainer-clean: maintainer-clean-am - + -rm -rf ./$(DEPDIR) + -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am @@ -464,10 +493,10 @@ .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libexecPROGRAMS clean-local ctags distclean \ - distclean-compile distclean-depend distclean-generic \ - distclean-tags distdir dvi dvi-am info info-am install \ - install-am install-binSCRIPTS install-data install-data-am \ - install-exec install-exec-am install-info install-info-am \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binSCRIPTS install-data install-data-am install-exec \ + install-exec-am install-info install-info-am \ install-libexecPROGRAMS install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ diff -urN gawk-3.1.3/builtin.c gawk-3.1.4/builtin.c --- gawk-3.1.3/builtin.c 2003-07-07 01:08:08.000000000 +0300 +++ gawk-3.1.4/builtin.c 2004-07-13 10:55:28.000000000 +0300 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2003 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2004 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -28,7 +28,6 @@ #if defined(HAVE_FCNTL_H) #include #endif -#undef HUGE #undef CHARBITS #undef INTBITS #if HAVE_INTTYPES_H @@ -75,9 +74,22 @@ static NODE *sub_common P((NODE *tree, long how_many, int backdigs)); +#ifdef STDC_HEADERS +#include +#endif +/* Assume IEEE-754 arithmetic on pre-C89 hosts. */ +#ifndef FLT_RADIX +#define FLT_RADIX 2 +#endif +#ifndef FLT_MANT_DIG +#define FLT_MANT_DIG 24 +#endif +#ifndef DBL_MANT_DIG +#define DBL_MANT_DIG 53 +#endif + #ifdef _CRAY /* Work around a problem in conversion of doubles to exact integers. */ -#include #define Floor(n) floor((n) * (1.0 + DBL_EPSILON)) #define Ceil(n) ceil((n) * (1.0 + DBL_EPSILON)) @@ -242,6 +254,7 @@ { int i1, i2, mbclen1, mbclen2, gap; wchar_t wc1, wc2; + for (i1 = i2 = 0 ; i1 < n && i2 < n ;i1 += mbclen1, i2 += mbclen2) { mbclen1 = mbrtowc(&wc1, s1 + i1, n - i1, &mbs1); if (mbclen1 == (size_t) -1 || mbclen1 == (size_t) -2 || mbclen1 == 0) { @@ -366,6 +379,10 @@ p1 += mbclen; } else { #endif + /* + * Could use tolower(*p1) == tolower(*p2) here. See discussion + * in eval.c as to why not. + */ if (casetable[(unsigned char)*p1] == casetable[(unsigned char)*p2] && (l2 == 1 || strncasecmp(p1, p2, l2) == 0)) { ret = 1 + s1->stlen - l1; @@ -565,6 +582,8 @@ char signchar = FALSE; size_t len; int zero_flag = FALSE; + int quote_flag = FALSE; + int ii, jj; static const char sp[] = " "; static const char zero_string[] = "0"; static const char lchbuf[] = "0123456789abcdef"; @@ -765,7 +784,10 @@ s1++; n0--; } - + if (val >= num_args) { + toofew = TRUE; + break; + } arg = the_args[val]; } else { parse_next_arg(); @@ -811,6 +833,11 @@ case '#': alt = TRUE; goto check_pos; +#if ENABLE_NLS && defined(HAVE_LOCALE_H) + case '\'': + quote_flag = TRUE; + goto check_pos; +#endif case 'l': if (big) break; @@ -920,8 +947,22 @@ sgn = FALSE; uval = (uintmax_t) tmpval; } + ii = jj = 0; do { *--cp = (char) ('0' + uval % 10); +#if ENABLE_NLS && defined(HAVE_LOCALE_H) + if (quote_flag && loc.grouping[ii] && ++jj == loc.grouping[ii]) { + *--cp = loc.thousands_sep[0]; /* XXX - assumption it's one char */ + if (loc.grouping[ii+1] == 0) + jj = 0; /* keep using current val in loc.grouping[ii] */ + else if (loc.grouping[ii+1] == CHAR_MAX) + quote_flag = FALSE; + else { + ii++; + jj = 0; + } + } +#endif uval /= 10; } while (uval > 0); @@ -1007,8 +1048,23 @@ && ((zero_flag && ! have_prec) || (fw == 0 && have_prec))) fill = zero_string; + + ii = jj = 0; do { *--cp = chbuf[uval % base]; +#if ENABLE_NLS && defined(HAVE_LOCALE_H) + if (base == 10 && quote_flag && loc.grouping[ii] && ++jj == loc.grouping[ii]) { + *--cp = loc.thousands_sep[0]; /* XXX --- assumption it's one char */ + if (loc.grouping[ii+1] == 0) + jj = 0; /* keep using current val in loc.grouping[ii] */ + else if (loc.grouping[ii+1] == CHAR_MAX) + quote_flag = FALSE; + else { + ii++; + jj = 0; + } + } +#endif uval /= base; } while (uval > 0); @@ -1057,6 +1113,11 @@ cs1 = 'g'; goto format_float; + case 'F': +#if ! defined(PRINTF_HAS_F_FORMAT) || PRINTF_HAS_F_FORMAT != 1 + cs1 = 'f'; + /* FALL THROUGH */ +#endif case 'g': case 'G': case 'e': @@ -1080,6 +1141,8 @@ *cp++ = '#'; if (zero_flag) *cp++ = '0'; + if (quote_flag) + *cp++ = '\''; strcpy(cp, "*.*"); cp += 3; *cp++ = cs1; @@ -1164,7 +1227,7 @@ rp = redirect(tree, &errflg); if (rp != NULL) { *rpp = rp; - return rp->fp; + return rp->fp; } return NULL; @@ -1745,7 +1808,7 @@ /* do_rand --- do the rand function */ static int firstrand = TRUE; -static char state[512]; +static char state[256]; /* ARGSUSED */ NODE * @@ -1753,8 +1816,9 @@ { if (firstrand) { (void) initstate((unsigned) 1, state, sizeof state); - srandom(1); + /* don't need to srandom(1), initstate() does it for us. */ firstrand = FALSE; + setstate(state); } /* * Per historical practice and POSIX, return value N is @@ -1777,8 +1841,8 @@ (void) initstate((unsigned) 1, state, sizeof state); /* don't need to srandom(1), we're changing the seed below */ firstrand = FALSE; - } else (void) setstate(state); + } if (tree == NULL) srandom((unsigned int) (save_seed = (long) time((time_t *) 0))); @@ -1944,7 +2008,7 @@ * } * if (length(str) == 0) * if (eosflag) - * break; + * break * else * eosflag = TRUE * } @@ -1956,6 +2020,33 @@ */ /* + * 1/2004: The gawk sub/gsub behavior dates from 1996, when we proposed it + * for POSIX. The proposal fell through the cracks, and the 2001 POSIX + * standard chose a more simple behavior. + * + * The relevant text is to be found on lines 6394-6407 (pages 166, 167) of the + * 2001 standard: + * + * sub(ere, repl[, in ]) + * Substitute the string repl in place of the first instance of the extended regular + * expression ERE in string in and return the number of substitutions. An ampersand + * ('&') appearing in the string repl shall be replaced by the string from in that + * matches the ERE. An ampersand preceded with a backslash ('\') shall be + * interpreted as the literal ampersand character. An occurrence of two consecutive + * backslashes shall be interpreted as just a single literal backslash character. Any + * other occurrence of a backslash (for example, preceding any other character) shall + * be treated as a literal backslash character. Note that if repl is a string literal (the + * lexical token STRING; see Grammar (on page 170)), the handling of the + * ampersand character occurs after any lexical processing, including any lexical + * backslash escape sequence processing. If in is specified and it is not an lvalue (see + * Expressions in awk (on page 156)), the behavior is undefined. If in is omitted, awk + * shall use the current record ($0) in its place. + * + * Because gawk has had its behavior for 7+ years, that behavior is remaining as + * the default, with the POSIX behavior available for do_posix. Fun, fun, fun. + */ + +/* * NB: `howmany' conflicts with a SunOS 4.x macro in . */ @@ -2068,7 +2159,15 @@ repllen--; scan++; } - } else { /* (proposed) posix '96 mode */ + } else if (do_posix) { + /* \& --> &, \\ --> \ */ + if (scan[1] == '&' || scan[1] == '\\') { + repllen--; + scan++; + } /* else + leave alone, it goes into the output */ + } else { + /* gawk default behavior since 1996 */ if (strncmp(scan, "\\\\\\&", 4) == 0) { /* \\\& --> \& */ repllen -= 2; @@ -2130,22 +2229,24 @@ * making substitutions as we go. */ for (scan = repl; scan < replend; scan++) + if (*scan == '&' #ifdef MBS_SUPPORT - if ((gawk_mb_cur_max == 1 - || (repllen > 0 && mb_indices[scan - repl] == 1)) - && (*scan == '&')) -#else - if (*scan == '&') + /* + * Don't test repllen here. A simple "&" could + * end up with repllen == 0. + */ + && (gawk_mb_cur_max == 1 + || mb_indices[scan - repl] == 1) #endif + ) { for (cp = matchstart; cp < matchend; cp++) *bp++ = *cp; + } else if (*scan == '\\' #ifdef MBS_SUPPORT - else if ((gawk_mb_cur_max == 1 + && (gawk_mb_cur_max == 1 || (repllen > 0 && mb_indices[scan - repl] == 1)) - && (*scan == '\\')) { -#else - else if (*scan == '\\') { #endif + ) { if (backdigs) { /* gensub, behave sanely */ if (ISDIGIT(scan[1])) { int dig = scan[1] - '0'; @@ -2161,7 +2262,13 @@ scan++; } else /* \q for any q --> q */ *bp++ = *++scan; - } else { /* posix '96 mode, bleah */ + } else if (do_posix) { + /* \& --> &, \\ --> \ */ + if (scan[1] == '&' || scan[1] == '\\') + scan++; + *bp++ = *scan; + } else { + /* gawk default behavior since 1996 */ if (strncmp(scan, "\\\\\\&", 4) == 0) { /* \\\& --> \& */ *bp++ = '\\'; @@ -2397,6 +2504,58 @@ } #endif /* GFMT_WORKAROUND */ +/* + * The number of base-FLT_RADIX digits in an AWKNUM fraction, assuming + * that AWKNUM is not long double. + */ +#define AWKSMALL_MANT_DIG \ + (sizeof (AWKNUM) == sizeof (double) ? DBL_MANT_DIG : FLT_MANT_DIG) + +/* + * The number of base-FLT_DIGIT digits in an AWKNUM fraction, even if + * AWKNUM is long double. Don't mention 'long double' unless + * LDBL_MANT_DIG is defined, for the sake of ancient compilers that + * lack 'long double'. + */ +#ifdef LDBL_MANT_DIG +#define AWKNUM_MANT_DIG \ + (sizeof (AWKNUM) == sizeof (long double) ? LDBL_MANT_DIG : AWKSMALL_MANT_DIG) +#else +#define AWKNUM_MANT_DIG AWKSMALL_MANT_DIG +#endif + +/* + * The number of bits in an AWKNUM fraction, assuming FLT_RADIX is + * either 2 or 16. IEEE and VAX formats use radix 2, and IBM + * mainframe format uses radix 16; we know of no other radices in + * practical use. + */ +#if FLT_RADIX != 2 && FLT_RADIX != 16 +Please port the following code to your weird host; +#endif +#define AWKNUM_FRACTION_BITS (AWKNUM_MANT_DIG * (FLT_RADIX == 2 ? 1 : 4)) + +/* tmp_integer - Convert an integer to a temporary number node. */ + +static NODE * +tmp_integer(uintmax_t n) +{ +#ifdef HAVE_UINTMAX_T + /* + * If uintmax_t is so wide that AWKNUM cannot represent all its + * values, strip leading nonzero bits of integers that are so large + * that they cannot be represented exactly as AWKNUMs, so that their + * low order bits are represented exactly, without rounding errors. + * This is more desirable in practice, since it means the user sees + * integers that are the same width as the AWKNUM fractions. + */ + if (AWKNUM_FRACTION_BITS < CHAR_BIT * sizeof n) + n &= ((uintmax_t) 1 << AWKNUM_FRACTION_BITS) - 1; +#endif /* HAVE_UINTMAX_T */ + + return tmp_number((AWKNUM) n); +} + /* do_lshift --- perform a << operation */ NODE * @@ -2408,14 +2567,15 @@ s1 = tree_eval(tree->lnode); s2 = tree_eval(tree->rnode->lnode); - val = force_number(s1); - shift = force_number(s2); - if (do_lint) { if ((s1->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("lshift: received non-numeric first argument")); if ((s2->flags & (NUMCUR|NUMBER)) == 0) - lintwarn(_("lshift: received non-numeric first argument")); + lintwarn(_("lshift: received non-numeric second argument")); + } + val = force_number(s1); + shift = force_number(s2); + if (do_lint) { if (val < 0 || shift < 0) lintwarn(_("lshift(%lf, %lf): negative values will give strange results"), val, shift); if (double_to_int(val) != val || double_to_int(shift) != shift) @@ -2431,7 +2591,7 @@ ushift = (uintmax_t) shift; res = uval << ushift; - return tmp_number((AWKNUM) res); + return tmp_integer(res); } /* do_rshift --- perform a >> operation */ @@ -2445,14 +2605,15 @@ s1 = tree_eval(tree->lnode); s2 = tree_eval(tree->rnode->lnode); - val = force_number(s1); - shift = force_number(s2); - if (do_lint) { if ((s1->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("rshift: received non-numeric first argument")); if ((s2->flags & (NUMCUR|NUMBER)) == 0) - lintwarn(_("rshift: received non-numeric first argument")); + lintwarn(_("rshift: received non-numeric second argument")); + } + val = force_number(s1); + shift = force_number(s2); + if (do_lint) { if (val < 0 || shift < 0) lintwarn(_("rshift(%lf, %lf): negative values will give strange results"), val, shift); if (double_to_int(val) != val || double_to_int(shift) != shift) @@ -2468,7 +2629,7 @@ ushift = (uintmax_t) shift; res = uval >> ushift; - return tmp_number((AWKNUM) res); + return tmp_integer(res); } /* do_and --- perform an & operation */ @@ -2482,14 +2643,15 @@ s1 = tree_eval(tree->lnode); s2 = tree_eval(tree->rnode->lnode); - left = force_number(s1); - right = force_number(s2); - if (do_lint) { if ((s1->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("and: received non-numeric first argument")); if ((s2->flags & (NUMCUR|NUMBER)) == 0) - lintwarn(_("and: received non-numeric first argument")); + lintwarn(_("and: received non-numeric second argument")); + } + left = force_number(s1); + right = force_number(s2); + if (do_lint) { if (left < 0 || right < 0) lintwarn(_("and(%lf, %lf): negative values will give strange results"), left, right); if (double_to_int(left) != left || double_to_int(right) != right) @@ -2503,7 +2665,7 @@ uright = (uintmax_t) right; res = uleft & uright; - return tmp_number((AWKNUM) res); + return tmp_integer(res); } /* do_or --- perform an | operation */ @@ -2517,14 +2679,15 @@ s1 = tree_eval(tree->lnode); s2 = tree_eval(tree->rnode->lnode); - left = force_number(s1); - right = force_number(s2); - if (do_lint) { if ((s1->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("or: received non-numeric first argument")); if ((s2->flags & (NUMCUR|NUMBER)) == 0) - lintwarn(_("or: received non-numeric first argument")); + lintwarn(_("or: received non-numeric second argument")); + } + left = force_number(s1); + right = force_number(s2); + if (do_lint) { if (left < 0 || right < 0) lintwarn(_("or(%lf, %lf): negative values will give strange results"), left, right); if (double_to_int(left) != left || double_to_int(right) != right) @@ -2538,7 +2701,7 @@ uright = (uintmax_t) right; res = uleft | uright; - return tmp_number((AWKNUM) res); + return tmp_integer(res); } /* do_xor --- perform an ^ operation */ @@ -2552,14 +2715,15 @@ s1 = tree_eval(tree->lnode); s2 = tree_eval(tree->rnode->lnode); - left = force_number(s1); - right = force_number(s2); - if (do_lint) { if ((s1->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("xor: received non-numeric first argument")); if ((s2->flags & (NUMCUR|NUMBER)) == 0) - lintwarn(_("xor: received non-numeric first argument")); + lintwarn(_("xor: received non-numeric second argument")); + } + left = force_number(s1); + right = force_number(s2); + if (do_lint) { if (left < 0 || right < 0) lintwarn(_("xor(%lf, %lf): negative values will give strange results"), left, right); if (double_to_int(left) != left || double_to_int(right) != right) @@ -2573,7 +2737,7 @@ uright = (uintmax_t) right; res = uleft ^ uright; - return tmp_number((AWKNUM) res); + return tmp_integer(res); } /* do_compl --- perform a ~ operation */ @@ -2586,12 +2750,12 @@ uintmax_t uval; tmp = tree_eval(tree->lnode); + if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0) + lintwarn(_("compl: received non-numeric argument")); d = force_number(tmp); free_temp(tmp); if (do_lint) { - if ((tmp->flags & (NUMCUR|NUMBER)) == 0) - lintwarn(_("compl: received non-numeric argument")); if (d < 0) lintwarn(_("compl(%lf): negative value will give strange results"), d); if (double_to_int(d) != d) @@ -2600,7 +2764,7 @@ uval = (uintmax_t) d; uval = ~ uval; - return tmp_number((AWKNUM) uval); + return tmp_integer(uval); } /* do_strtonum --- the strtonum function */ diff -urN gawk-3.1.3/config.guess gawk-3.1.4/config.guess --- gawk-3.1.3/config.guess 2003-03-06 11:11:50.000000000 +0200 +++ gawk-3.1.4/config.guess 2004-07-19 17:06:51.000000000 +0300 @@ -1,9 +1,9 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -timestamp='2003-01-30' +timestamp='2004-06-24' # 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 @@ -53,7 +53,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -106,6 +106,7 @@ : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d -q "$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" ; @@ -196,15 +197,24 @@ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; + amd64:OpenBSD:*:*) + echo x86_64-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; + cats:OpenBSD:*:*) + echo arm-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; + luna88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; @@ -235,13 +245,24 @@ *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; - *:MicroBSD:*:*) - echo ${UNAME_MACHINE}-unknown-microbsd${UNAME_RELEASE} + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit 0 ;; + macppc:MirBSD:*:*) + echo powerppc-unknown-mirbsd${UNAME_RELEASE} + exit 0 ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then + case $UNAME_RELEASE in + *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi + ;; + *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 @@ -279,11 +300,12 @@ "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/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? @@ -306,6 +328,9 @@ *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; @@ -323,6 +348,9 @@ NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit 0 ;; DRS?6000:UNIX_SV:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7 && exit 0 ;; @@ -395,6 +423,9 @@ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; @@ -730,7 +761,7 @@ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; *:UNICOS/mp:*:*) - echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` @@ -738,6 +769,11 @@ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; + 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 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; @@ -748,18 +784,7 @@ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) - # Determine whether the default compiler uses glibc. - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #if __GLIBC__ >= 2 - LIBC=gnu - #else - LIBC= - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin @@ -770,8 +795,8 @@ i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; - x86:Interix*:3*) - echo i586-pc-interix3 + x86:Interix*:[34]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit 0 ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks @@ -792,17 +817,28 @@ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) + # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; + *: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 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; @@ -878,6 +914,9 @@ s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; @@ -935,6 +974,9 @@ LIBC=gnuaout #endif #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 @@ -965,6 +1007,9 @@ i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; @@ -1034,9 +1079,9 @@ M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit 0 ;; - M68*:*:R3V[567]*:*) + M68*:*:R3V[5678]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*: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) + 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) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` @@ -1151,7 +1196,7 @@ *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; - NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) + NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) @@ -1192,6 +1237,19 @@ *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit 0 ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms && exit 0 ;; + I*) echo ia64-dec-vms && exit 0 ;; + V*) echo vax-dec-vms && exit 0 ;; + esac esac #echo '(No uname command or uname output not recognized.)' 1>&2 diff -urN gawk-3.1.3/config.rpath gawk-3.1.4/config.rpath --- gawk-3.1.3/config.rpath 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/config.rpath 2004-02-19 23:08:40.000000000 +0200 @@ -143,7 +143,7 @@ ld_shlibs=no ;; beos*) - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no @@ -162,9 +162,9 @@ netbsd*) ;; solaris* | sysv5*) - if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no - elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no @@ -174,7 +174,7 @@ hardcode_direct=yes ;; *) - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no diff -urN gawk-3.1.3/config.sub gawk-3.1.4/config.sub --- gawk-3.1.3/config.sub 2003-03-06 11:11:50.000000000 +0200 +++ gawk-3.1.4/config.sub 2004-07-19 17:06:43.000000000 +0300 @@ -1,9 +1,9 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -timestamp='2003-02-03' +timestamp='2004-06-24' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -70,7 +70,7 @@ version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -118,7 +118,8 @@ # 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* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ + kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -144,7 +145,7 @@ -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) + -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; @@ -228,14 +229,15 @@ | 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 \ - | clipper \ + | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ - | ip2k \ - | m32r | m68000 | m68k | m88k | mcore \ + | ip2k | iq2000 \ + | m32r | m32rle | m68000 | m68k | m88k | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -247,6 +249,7 @@ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ @@ -259,9 +262,9 @@ | pyramid \ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ - | tahoe | thumb | tic80 | tron \ + | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xstormy16 | xtensa \ @@ -297,15 +300,15 @@ | avr-* \ | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | cydra-* \ + | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* \ - | m32r-* \ + | ip2k-* | iq2000-* \ + | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ @@ -319,11 +322,13 @@ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ + | mmix-* \ | msp430-* \ - | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ @@ -332,7 +337,7 @@ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ - | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ @@ -359,6 +364,9 @@ basic_machine=a29k-amd os=-udi ;; + abacus) + basic_machine=abacus-unknown + ;; adobe68k) basic_machine=m68010-adobe os=-scout @@ -373,6 +381,12 @@ 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 @@ -432,12 +446,24 @@ basic_machine=j90-cray os=-unicos ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16c) + basic_machine=cr16c-unknown + os=-elf + ;; crds | unos) basic_machine=m68k-crds ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; da30 | da30-*) basic_machine=m68k-da30 ;; @@ -638,10 +664,6 @@ mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; - mmix*) - basic_machine=mmix-knuth - os=-mmixware - ;; monitor) basic_machine=m68k-rom68k os=-coff @@ -722,10 +744,6 @@ np1) basic_machine=np1-gould ;; - nv1) - basic_machine=nv1-cray - os=-unicosmp - ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -737,6 +755,10 @@ basic_machine=or32-unknown os=-coff ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose @@ -768,18 +790,24 @@ pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; - pentiumii | pentium2) + 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-*) + 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 ;; @@ -838,6 +866,10 @@ sb1el) basic_machine=mipsisa64sb1el-unknown ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; sequent) basic_machine=i386-sequent ;; @@ -845,6 +877,9 @@ basic_machine=sh-hitachi os=-hms ;; + sh64) + basic_machine=sh64-unknown + ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks @@ -919,10 +954,6 @@ basic_machine=t90-cray os=-unicos ;; - tic4x | c4x*) - basic_machine=tic4x-unknown - os=-coff - ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff @@ -948,6 +979,10 @@ tower | tower-32) basic_machine=m68k-ncr ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; udi29k) basic_machine=a29k-amd os=-udi @@ -1021,6 +1056,9 @@ romp) basic_machine=romp-ibm ;; + mmix) + basic_machine=mmix-knuth + ;; rs6000) basic_machine=rs6000-ibm ;; @@ -1043,7 +1081,7 @@ sh64) basic_machine=sh64-unknown ;; - sparc | sparcv9 | sparcv9b) + sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) @@ -1116,19 +1154,20 @@ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ + | -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* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -mingw32* | -linux-gnu* | -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* | -microbsd*) + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1152,6 +1191,9 @@ -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; @@ -1164,6 +1206,9 @@ -opened*) os=-openedition ;; + -os400*) + os=-os400 + ;; -wince*) os=-wince ;; @@ -1185,6 +1230,9 @@ -atheos*) os=-atheos ;; + -syllable*) + os=-syllable + ;; -386bsd) os=-bsd ;; @@ -1207,6 +1255,9 @@ -sinix*) os=-sysv4 ;; + -tpf*) + os=-tpf + ;; -triton*) os=-sysv3 ;; @@ -1274,6 +1325,9 @@ arm*-semi) os=-aout ;; + c4x-* | tic4x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 @@ -1320,6 +1374,9 @@ *-ibm) os=-aix ;; + *-knuth) + os=-mmixware + ;; *-wec) os=-proelf ;; @@ -1452,9 +1509,15 @@ -mvs* | -opened*) vendor=ibm ;; + -os400*) + vendor=ibm + ;; -ptx*) vendor=sequent ;; + -tpf*) + vendor=ibm + ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; diff -urN gawk-3.1.3/configh.in gawk-3.1.4/configh.in --- gawk-3.1.3/configh.in 2003-07-04 20:49:45.000000000 +0300 +++ gawk-3.1.4/configh.in 2004-08-02 12:16:46.000000000 +0300 @@ -38,31 +38,48 @@ /* Define to 1 if you have the header file. */ #undef HAVE_ARGZ_H +/* Define to 1 if you have the `asprintf' function. */ +#undef HAVE_ASPRINTF + /* Define if the GNU dcgettext() function is already present or preinstalled. */ #undef HAVE_DCGETTEXT +/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you + don't. */ +#undef HAVE_DECL_FEOF_UNLOCKED + +/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if + you don't. */ +#undef HAVE_DECL_FGETS_UNLOCKED + +/* 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 `_snprintf', and to 0 if you + don't. */ +#undef HAVE_DECL__SNPRINTF + +/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you + don't. */ +#undef HAVE_DECL__SNWPRINTF + /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H -/* Define to 1 if you have the `feof_unlocked' function. */ -#undef HAVE_FEOF_UNLOCKED - -/* Define to 1 if you have the `fgets_unlocked' function. */ -#undef HAVE_FGETS_UNLOCKED - /* Define to 1 if you have the `fmod' function. */ #undef HAVE_FMOD +/* Define to 1 if you have the `fwprintf' function. */ +#undef HAVE_FWPRINTF + /* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD -/* Define to 1 if you have the `getc_unlocked' function. */ -#undef HAVE_GETC_UNLOCKED - /* Define to 1 if you have the `getegid' function. */ #undef HAVE_GETEGID @@ -93,9 +110,19 @@ /* Define if you have the iconv() function. */ #undef HAVE_ICONV +/* Define if you have the 'intmax_t' type in or . */ +#undef HAVE_INTMAX_T + /* Define if exists and doesn't clash with . */ #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 `iswctype' function. */ +#undef HAVE_ISWCTYPE + /* Define if you have and nl_langinfo(CODESET). */ #undef HAVE_LANGINFO_CODESET @@ -117,7 +144,10 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H -/* Define if you have the long long type. */ +/* Define if you have the 'long double' type. */ +#undef HAVE_LONG_DOUBLE + +/* Define if you have the 'long long' type. */ #undef HAVE_LONG_LONG /* Define to 1 if you have the header file. */ @@ -126,7 +156,7 @@ /* Define to 1 if you have the `mbrlen' function. */ #undef HAVE_MBRLEN -/* Define to 1 if you have the `mbrtowc' function. */ +/* Define to 1 if mbrtowc and mbstate_t are properly declared. */ #undef HAVE_MBRTOWC /* Define to 1 if you have the header file. */ @@ -138,6 +168,9 @@ /* Define to 1 if you have the `memcpy' function. */ #undef HAVE_MEMCPY +/* Define to 1 if you have the `memmove' function. */ +#undef HAVE_MEMMOVE + /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H @@ -168,6 +201,9 @@ /* we have portals on /p on this system */ #undef HAVE_PORTALS +/* Define if your printf() function supports format strings with positions. */ +#undef HAVE_POSIX_PRINTF + /* Define to 1 if you have the `putenv' function. */ #undef HAVE_PUTENV @@ -195,6 +231,10 @@ /* 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_STDLIB_H @@ -285,10 +325,13 @@ /* Define to 1 if you have the `tzset' function. */ #undef HAVE_TZSET +/* Define if you have the 'uintmax_t' type in or . */ +#undef HAVE_UINTMAX_T + /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* Define if you have the unsigned long long type. */ +/* Define if you have the 'unsigned long long' type. */ #undef HAVE_UNSIGNED_LONG_LONG /* Define to 1 if you have the `vprintf' function. */ @@ -297,15 +340,30 @@ /* 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 `wctype' function. */ +#undef HAVE_WCTYPE + /* Define to 1 if you have the header file. */ #undef HAVE_WCTYPE_H +/* systems should define this type here */ +#undef HAVE_WCTYPE_T + +/* Define if you have the 'wint_t' type. */ +#undef HAVE_WINT_T + /* Define to 1 if you have the `__argz_count' function. */ #undef HAVE___ARGZ_COUNT @@ -345,27 +403,31 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION +/* Define to 1 if *printf supports %F format */ +#undef PRINTF_HAS_F_FORMAT + /* Define if exists and defines unusable PRI* macros. */ #undef PRI_MACROS_BROKEN -/* Define if compiler has function prototypes */ +/* Define to 1 if the C compiler supports function prototypes. */ #undef PROTOTYPES -/* use malloc instead of alloca in regex.c */ -#undef REGEX_MALLOC - /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE +/* Define as the maximum value of type 'size_t', if the system doesn't define + it. */ +#undef SIZE_MAX + /* return type of sprintf */ #undef SPRINTF_RET /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ + 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. */ @@ -417,15 +479,20 @@ # undef __CHAR_UNSIGNED__ #endif +/* Define like PROTOTYPES; this can be used by system headers. */ +#undef __PROTOTYPES + /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `int' if doesn't define. */ #undef gid_t -/* Define as `__inline' if that's what the C compiler calls it, or to nothing - if it is not supported. */ +/* 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 widest signed type if doesn't define. */ #undef intmax_t @@ -436,6 +503,13 @@ /* 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 empty if the C compiler doesn't support this keyword. */ +#undef signed + /* Define to `unsigned' if does not define. */ #undef size_t @@ -445,5 +519,6 @@ /* Define to `int' if doesn't define. */ #undef uid_t -/* Define to widest unsigned type if doesn't define. */ +/* Define to unsigned long or unsigned long long if and + don't define. */ #undef uintmax_t diff -urN gawk-3.1.3/configure gawk-3.1.4/configure --- gawk-3.1.3/configure 2003-07-04 20:49:09.000000000 +0300 +++ gawk-3.1.4/configure 2004-08-02 12:16:32.000000000 +0300 @@ -1,11 +1,10 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.57 for GNU Awk 3.1.3. +# Generated by GNU Autoconf 2.59 for GNU Awk 3.1.4. # # Report bugs to . # -# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -22,9 +21,10 @@ elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false @@ -43,7 +43,7 @@ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do - if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var @@ -220,16 +220,17 @@ if mkdir -p . 2>/dev/null; then as_mkdir_p=: else + test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +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="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS @@ -268,8 +269,8 @@ # Identity of this package. PACKAGE_NAME='GNU Awk' PACKAGE_TARNAME='gawk' -PACKAGE_VERSION='3.1.3' -PACKAGE_STRING='GNU Awk 3.1.3' +PACKAGE_VERSION='3.1.4' +PACKAGE_STRING='GNU Awk 3.1.4' PACKAGE_BUGREPORT='bug-gawk@gnu.org' # Factoring default headers for most tests. @@ -309,7 +310,7 @@ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot EGREP YACC LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP RANLIB ac_ct_RANLIB U ANSI2KNR MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE build build_cpu build_vendor build_os host host_cpu host_vendor host_os ALLOCA GLIBC21 LIBICONV LTLIBICONV INTLBISON BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT DATADIRNAME INSTOBJEXT GENCAT INTLOBJS INTL_LIBTOOL_SUFFIX_PREFIX INTLLIBS LIBINTL LTLIBINTL POSUB LIBOBJS SOCKET_LIBS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot EGREP YACC LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP RANLIB ac_ct_RANLIB U ANSI2KNR MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE build build_cpu build_vendor build_os host host_cpu host_vendor host_os ALLOCA GLIBC21 HAVE_POSIX_PRINTF HAVE_ASPRINTF HAVE_SNPRINTF HAVE_WPRINTF LIBICONV LTLIBICONV INTLBISON BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT DATADIRNAME INSTOBJEXT GENCAT INTLOBJS INTL_LIBTOOL_SUFFIX_PREFIX INTLLIBS LIBINTL LTLIBINTL POSUB LIBOBJS SOCKET_LIBS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -668,7 +669,7 @@ # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir + localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in @@ -708,10 +709,10 @@ # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -778,7 +779,7 @@ # 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 Awk 3.1.3 to adapt to many kinds of systems. +\`configure' configures GNU Awk 3.1.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -803,9 +804,9 @@ cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -844,7 +845,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GNU Awk 3.1.3:";; + short | recursive ) echo "Configuration of GNU Awk 3.1.4:";; esac cat <<\_ACEOF @@ -854,8 +855,8 @@ --enable-portals Enable /p as path prefix for portals --disable-lint Disable gawk lint checking --enable-switch Enable switch statements for awk programs - --disable-dependency-tracking Speeds up one-time builds - --enable-dependency-tracking Do not reject slow dependency extractors + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors --disable-largefile omit support for large files --disable-nls do not use Native Language Support --disable-rpath do not hardcode runtime library paths @@ -917,12 +918,45 @@ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be -# absolute. -ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` -ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` -ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` -ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. @@ -933,7 +967,7 @@ echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then + test -f $ac_srcdir/configure.in; then echo $ac_configure --help else @@ -946,11 +980,10 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -GNU Awk configure 3.1.3 -generated by GNU Autoconf 2.57 +GNU Awk configure 3.1.4 +generated by GNU Autoconf 2.59 -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 -Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -961,8 +994,8 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GNU Awk $as_me 3.1.3, which was -generated by GNU Autoconf 2.57. Invocation command line was +It was created by GNU Awk $as_me 3.1.4, which was +generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1039,19 +1072,19 @@ 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. + 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 + 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_sep'$ac_arg'" # Get rid of the leading space. @@ -1085,12 +1118,12 @@ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } @@ -1119,7 +1152,7 @@ for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi @@ -1138,7 +1171,7 @@ echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core core.* *.core && + rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 @@ -1218,7 +1251,7 @@ # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; 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" @@ -1235,13 +1268,13 @@ ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: + ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. @@ -1313,9 +1346,7 @@ fi - ac_config_headers="$ac_config_headers config.h:configh.in" - -am__api_version="1.7" +am__api_version="1.8" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then @@ -1352,6 +1383,7 @@ # 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. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 @@ -1368,6 +1400,7 @@ 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. @@ -1375,20 +1408,20 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$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 - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi + if $as_executable_p "$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 + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi done done ;; @@ -1476,7 +1509,6 @@ program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed - # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` @@ -1490,6 +1522,31 @@ echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi +if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # Keeping the `.' argument allows $(mkdir_p) to be used without + # argument. Indeed, we sometimes output rules like + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. + # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more + # expensive solution, as it forces Make to start a sub-shell.) + mkdir_p='mkdir -p -- .' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-p ./--version; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs)' + else + mkdir_p='$(install_sh) -d' + fi +fi + 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. @@ -1532,7 +1589,7 @@ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1568,7 +1625,7 @@ fi rmdir .tst 2>/dev/null - # test to see if srcdir already configured +# test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 @@ -1587,8 +1644,8 @@ # Define the identity of the package. - PACKAGE=gawk - VERSION=3.1.3 + PACKAGE='gawk' + VERSION='3.1.4' cat >>confdefs.h <<_ACEOF @@ -2172,7 +2229,6 @@ (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2192,8 +2248,8 @@ # 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. -echo "$as_me:$LINENO: checking for C compiler default output" >&5 -echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 @@ -2213,23 +2269,23 @@ test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; + ;; conftest.$ac_ext ) - # This is the source file. - ;; + # This is the source file. + ;; [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; + # We found the default executable, but exeext='' is most + # certainly right. + break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext - break;; + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; * ) - break;; + break;; esac done else @@ -2303,8 +2359,8 @@ case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext - break;; + export ac_cv_exeext + break;; * ) break;; esac done @@ -2329,7 +2385,6 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2380,7 +2435,6 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2400,11 +2454,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2417,7 +2481,7 @@ ac_compiler_gnu=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi @@ -2433,7 +2497,6 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2450,11 +2513,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2467,7 +2540,7 @@ ac_cv_prog_cc_g=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 @@ -2494,7 +2567,6 @@ ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2522,6 +2594,16 @@ 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 -std1 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 -std1. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2548,11 +2630,21 @@ CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2565,7 +2657,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext +rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC @@ -2593,19 +2685,28 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ - ''\ - '#include ' \ + '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ @@ -2613,14 +2714,13 @@ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include $ac_declaration +#include int main () { @@ -2631,11 +2731,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2648,9 +2758,8 @@ continue fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2667,11 +2776,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2683,7 +2802,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then @@ -2697,7 +2816,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2787,18 +2906,34 @@ # 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 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. - echo '#include "conftest.h"' > conftest.c - echo 'int i;' > conftest.h - echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf + : > 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 case $depmode in nosideeffect) @@ -2816,16 +2951,22 @@ # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=conftest.c object=conftest.o \ - depfile=conftest.Po tmpdepfile=conftest.TPo \ - $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && - grep conftest.h conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} 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 - # (even with -Werror). So we grep stderr for any message - # that says an option was ignored. - if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else + # 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 @@ -2884,7 +3025,6 @@ # 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 -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2895,7 +3035,7 @@ #else # include #endif - Syntax error + Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 @@ -2907,6 +3047,7 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -2927,7 +3068,6 @@ # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2945,6 +3085,7 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -2991,7 +3132,6 @@ # 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 -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3002,7 +3142,7 @@ #else # include #endif - Syntax error + Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 @@ -3014,6 +3154,7 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -3034,7 +3175,6 @@ # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3052,6 +3192,7 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -3185,6 +3326,7 @@ # 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. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 @@ -3201,6 +3343,7 @@ 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. @@ -3208,20 +3351,20 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$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 - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi + if $as_executable_p "$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 + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi done done ;; @@ -3254,7 +3397,7 @@ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3290,6 +3433,11 @@ then # add other debug flags as appropriate, save GAWKDEBUG for emergencies CFLAGS="$CFLAGS -DARRAYDEBUG" + if grep dbug $srcdir/.developing + then + CFLAGS="$CFLAGS -DDBUG" + LIBS="$LIBS dbug/libdbug.a" + fi # turn on compiler warnings if we're doing development if test "$GCC" = yes then @@ -3310,7 +3458,6 @@ echo "$as_me:$LINENO: checking for AIX" >&5 echo $ECHO_N "checking for AIX... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3336,16 +3483,14 @@ rm -f conftest* - - echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5 -echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6 -if test "${ac_cv_lib_cposix_strerror+set}" = set; then +echo "$as_me:$LINENO: checking for library containing strerror" >&5 +echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6 +if test "${ac_cv_search_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcposix $LIBS" + ac_func_search_save_LIBS=$LIBS +ac_cv_search_strerror=no cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3369,33 +3514,100 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_cposix_strerror=yes + ac_cv_search_strerror="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_cposix_strerror=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_strerror" = no; then + for ac_lib in cposix; do + LIBS="-l$ac_lib $ac_func_search_save_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 gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strerror (); +int +main () +{ +strerror (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_strerror="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&5 -echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6 -if test $ac_cv_lib_cposix_strerror = yes; then - LIBS="$LIBS -lcposix" +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 +echo "${ECHO_T}$ac_cv_search_strerror" >&6 +if test "$ac_cv_search_strerror" != no; then + test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS" - +fi echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 @@ -3403,7 +3615,6 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3424,11 +3635,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3441,12 +3662,11 @@ ac_cv_header_stdc=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f 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 -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3468,7 +3688,6 @@ 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 -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3493,7 +3712,6 @@ : else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3505,9 +3723,9 @@ # 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')) + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif @@ -3518,7 +3736,7 @@ int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) + || toupper (i) != TOUPPER (i)) exit(2); exit (0); } @@ -3543,7 +3761,7 @@ ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi @@ -3568,7 +3786,7 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h + inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 @@ -3577,7 +3795,6 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3589,11 +3806,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3606,7 +3833,7 @@ eval "$as_ac_Header=no" fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -3633,7 +3860,6 @@ echo "$as_me:$LINENO: checking minix/config.h usability" >&5 echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3644,11 +3870,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3661,7 +3897,7 @@ ac_header_compiler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -3669,7 +3905,6 @@ echo "$as_me:$LINENO: checking minix/config.h presence" >&5 echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3687,6 +3922,7 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -3706,33 +3942,32 @@ echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes ;; - no:yes ) + no:yes:* ) { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## +## ------------------------------- ## +## Report this to bug-gawk@gnu.org ## +## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -3792,8 +4027,7 @@ while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3818,11 +4052,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3834,15 +4078,25 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext +rm -f conftest.err conftest.$ac_objext CC="$CC -n32" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3854,8 +4108,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext - break +rm -f conftest.err conftest.$ac_objext + break done CC=$ac_save_CC rm -f conftest.$ac_ext @@ -3875,7 +4129,6 @@ while :; do ac_cv_sys_file_offset_bits=no cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3900,11 +4153,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3916,9 +4179,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3944,11 +4206,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3960,7 +4232,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext break done fi @@ -3982,7 +4254,6 @@ while :; do ac_cv_sys_large_files=no cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4007,11 +4278,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4023,9 +4304,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4051,11 +4331,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4067,7 +4357,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext break done fi @@ -4134,2069 +4424,1918 @@ CFLAGS="$CFLAGS -D_SYSV3" fi - - - -echo "$as_me:$LINENO: checking for ${CC-cc} option to accept ANSI C" >&5 -echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6 -if test "${am_cv_prog_cc_stdc+set}" = set; then +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 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - am_cv_prog_cc_stdc=no -ac_save_CC="$CC" -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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; -} -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]; + 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - am_cv_prog_cc_stdc="$ac_arg"; break +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi fi -rm -f conftest.$ac_objext conftest.$ac_ext +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 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done -CC="$ac_save_CC" fi - -if test -z "$am_cv_prog_cc_stdc"; then - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:$LINENO: result: $am_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$am_cv_prog_cc_stdc" >&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -case "x$am_cv_prog_cc_stdc" in - x|xno) ;; - *) CC="$CC $am_cv_prog_cc_stdc" ;; -esac - - -echo "$as_me:$LINENO: checking for function prototypes" >&5 -echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6 -if test "$am_cv_prog_cc_stdc" != no; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi -cat >>confdefs.h <<\_ACEOF -#define PROTOTYPES 1 -_ACEOF +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 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done - U= ANSI2KNR= +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - U=_ ANSI2KNR=./ansi2knr fi -# Ensure some checks needed by ansi2knr itself. -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 -if test "${ac_cv_header_stdc+set}" = set; then + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_header_stdc=yes + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done -ac_cv_header_stdc=no fi -rm -f 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 -#line $LINENO "configure" -/* 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 - : +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - ac_cv_header_stdc=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f conftest* + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" 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 -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$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" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : +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 + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - ac_cv_header_stdc=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 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 - : +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + 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 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#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 + 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi -( exit $ac_status ) -ac_cv_header_stdc=no + test -n "$CC" && break + done fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 -if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF + test -n "$ac_ct_CC" && break +done + CC=$ac_ct_CC fi +fi -for ac_header in string.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +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. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" + 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> + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_header_compiler=yes + ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no +ac_compiler_gnu=no fi -rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 <$ac_header> + +int +main () +{ + + ; + return 0; +} _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no +ac_cv_prog_cc_g=no fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; - no:yes ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$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 - eval "$as_ac_Header=$ac_header_preproc" + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=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; +} -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +/* 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 -std1 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 -std1. */ +int osf4_cc_array ['\x00' == 0 ? 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 +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 fi - +rm -f conftest.err conftest.$ac_objext done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC +fi - -case `(uname) 2> /dev/null` in -*CYGWIN*) - with_libiconv_prefix=no - with_libintl_prefix=no - ;; -*) - ;; +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; esac - - MKINSTALLDIRS= - if test -n "$ac_aux_dir"; then - case "$ac_aux_dir" in - /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;; - *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;; - esac - fi - if test -z "$MKINSTALLDIRS"; then - MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" - fi - - - - echo "$as_me:$LINENO: checking whether NLS is requested" >&5 -echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 - # Check whether --enable-nls or --disable-nls was given. -if test "${enable_nls+set}" = set; then - enableval="$enable_nls" - USE_NLS=$enableval -else - USE_NLS=yes -fi; - echo "$as_me:$LINENO: result: $USE_NLS" >&5 -echo "${ECHO_T}$USE_NLS" >&6 - - - - - - -# 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" +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : else - ac_executable_p="test -f" -fi -rm -f conf$$.file + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Extract the first word of "msgfmt", so it can be a program name with args. -set dummy msgfmt; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_MSGFMT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 - if $ac_dir/$ac_word --statistics /dev/null >/dev/null 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 +continue fi -MSGFMT="$ac_cv_path_MSGFMT" -if test "$MSGFMT" != ":"; then - echo "$as_me:$LINENO: result: $MSGFMT" >&5 -echo "${ECHO_T}$MSGFMT" >&6 +rm -f conftest.err conftest.$ac_objext 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. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - # Extract the first word of "gmsgfmt", so it can be a program name with args. -set dummy gmsgfmt; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_GMSGFMT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done - - test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" - ;; -esac +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h fi -GMSGFMT=$ac_cv_path_GMSGFMT -if test -n "$GMSGFMT"; then - echo "$as_me:$LINENO: result: $GMSGFMT" >&5 -echo "${ECHO_T}$GMSGFMT" >&6 else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# 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 +rm -f conftest.err conftest.$ac_objext 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 -# 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 +depcc="$CC" am_compiler_list= -# Extract the first word of "xgettext", so it can be a program name with args. -set dummy xgettext; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_XGETTEXT+set}" = set; then +echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 - if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 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 + 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 + 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 - 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 - echo "$as_me:$LINENO: result: $XGETTEXT" >&5 -echo "${ECHO_T}$XGETTEXT" >&6 + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + 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 + ;; + none) break ;; + esac + # 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. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} 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 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + am_cv_CC_dependencies_compiler_type=none fi - rm -f messages.po +fi +echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type -# 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" +if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' else - ac_executable_p="test -f" + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= 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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_MSGMERGE+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 - if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 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 - echo "$as_me:$LINENO: result: $MSGMERGE" >&5 -echo "${ECHO_T}$MSGMERGE" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - if test "$GMSGFMT" != ":"; then - if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && - (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then - : ; - else - GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` - echo "$as_me:$LINENO: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5 -echo "${ECHO_T}found $GMSGFMT program is not GNU msgfmt; ignore it" >&6 - GMSGFMT=":" - fi - fi +am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc - if test "$XGETTEXT" != ":"; then - if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && - (if $XGETTEXT --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 - : ; - else - echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5 -echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6 - XGETTEXT=":" - fi - rm -f messages.po - fi +echo "$as_me:$LINENO: checking for function prototypes" >&5 +echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6 +if test "$ac_cv_prog_cc_stdc" != no; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 - ac_config_commands="$ac_config_commands default-1" +cat >>confdefs.h <<\_ACEOF +#define PROTOTYPES 1 +_ACEOF -# Make sure we can run config.sub. -$ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 -echo "$as_me: error: cannot run $ac_config_sub" >&2;} - { (exit 1); exit 1; }; } +cat >>confdefs.h <<\_ACEOF +#define __PROTOTYPES 1 +_ACEOF -echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6 -if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_build_alias=$build_alias -test -z "$ac_cv_build_alias" && - ac_cv_build_alias=`$ac_config_guess` -test -z "$ac_cv_build_alias" && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } -ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} - { (exit 1); exit 1; }; } - + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6 -build=$ac_cv_build -build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6 -if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test "$ac_cv_prog_cc_stdc" != no; then + U= ANSI2KNR= else - ac_cv_host_alias=$host_alias -test -z "$ac_cv_host_alias" && - ac_cv_host_alias=$ac_cv_build_alias -ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} - { (exit 1); exit 1; }; } - + U=_ ANSI2KNR=./ansi2knr fi -echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6 -host=$ac_cv_host -host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +# Ensure some checks needed by ansi2knr itself. -echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 -echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 -if test "${ac_cv_c_const+set}" = set; then +for ac_header in string.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +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 x; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *ccp; - char **p; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - ccp = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++ccp; - p = (char**) ccp; - ccp = (char const *const *) p; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - } -#endif - - ; - return 0; -} +$ac_includes_default +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_const=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_c_const=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 -echo "${ECHO_T}$ac_cv_c_const" >&6 -if test $ac_cv_c_const = no; then - -cat >>confdefs.h <<\_ACEOF -#define const -_ACEOF - -fi - -echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6 -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_c_inline=$ac_kw; break + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +ac_header_compiler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext -done - -fi -echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6 -case $ac_cv_c_inline in - inline | yes) ;; - no) -cat >>confdefs.h <<\_ACEOF -#define inline -_ACEOF - ;; - *) cat >>confdefs.h <<_ACEOF -#define inline $ac_cv_c_inline -_ACEOF - ;; -esac +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 -echo "$as_me:$LINENO: checking for off_t" >&5 -echo $ECHO_N "checking for off_t... $ECHO_C" >&6 -if test "${ac_cv_type_off_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&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 -int -main () -{ -if ((off_t *) 0) - return 0; -if (sizeof (off_t)) - return 0; - ; - return 0; -} +#include <$ac_header> _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_off_t=yes + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_off_t=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext + ac_header_preproc=no fi -echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 -echo "${ECHO_T}$ac_cv_type_off_t" >&6 -if test $ac_cv_type_off_t = yes; then - : +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------- ## +## Report this to bug-gawk@gnu.org ## +## ------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -cat >>confdefs.h <<_ACEOF -#define off_t long +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi -echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6 -if test "${ac_cv_type_size_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((size_t *) 0) - return 0; -if (sizeof (size_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_size_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +done -ac_cv_type_size_t=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6 -if test $ac_cv_type_size_t = yes; then - : -else -cat >>confdefs.h <<_ACEOF -#define size_t unsigned -_ACEOF -fi +case `(uname) 2> /dev/null` in +*CYGWIN*) + with_libiconv_prefix=no + with_libintl_prefix=no + ;; +*) + ;; +esac -# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -echo "$as_me:$LINENO: checking for working alloca.h" >&5 -echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6 -if test "${ac_cv_working_alloca_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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)); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_working_alloca_h=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_working_alloca_h=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 -echo "${ECHO_T}$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 + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + case "$ac_aux_dir" in + /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;; + *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;; + esac + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi -fi -echo "$as_me:$LINENO: checking for alloca" >&5 -echo $ECHO_N "checking for alloca... $ECHO_C" >&6 -if test "${ac_cv_func_alloca_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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 -# if 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); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_alloca_works=yes + echo "$as_me:$LINENO: checking whether NLS is requested" >&5 +echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 + # Check whether --enable-nls or --disable-nls was given. +if test "${enable_nls+set}" = set; then + enableval="$enable_nls" + USE_NLS=$enableval else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + USE_NLS=yes +fi; + echo "$as_me:$LINENO: result: $USE_NLS" >&5 +echo "${ECHO_T}$USE_NLS" >&6 -ac_cv_func_alloca_works=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 -echo "${ECHO_T}$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=alloca.$ac_objext -cat >>confdefs.h <<\_ACEOF -#define C_ALLOCA 1 -_ACEOF +# 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 -echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 -echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6 -if test "${ac_cv_os_cray+set}" = set; then +# Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_MSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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 + 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 + if $ac_dir/$ac_word --statistics /dev/null >/dev/null 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 + echo "$as_me:$LINENO: result: $MSGFMT" >&5 +echo "${ECHO_T}$MSGFMT" >&6 else - ac_cv_os_cray=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f conftest* -fi -echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 -echo "${ECHO_T}$ac_cv_os_cray" >&6 -if test $ac_cv_os_cray = yes; then - for ac_func in _getb67 GETB67 getb67; do - as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_GMSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* 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 -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done -eval "$as_ac_var=no" + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +GMSGFMT=$ac_cv_path_GMSGFMT + +if test -n "$GMSGFMT"; then + echo "$as_me:$LINENO: result: $GMSGFMT" >&5 +echo "${ECHO_T}$GMSGFMT" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then -cat >>confdefs.h <<_ACEOF -#define CRAY_STACKSEG_END $ac_func -_ACEOF - break -fi - done +# 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 -echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 -echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6 -if test "${ac_cv_c_stack_direction+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_c_stack_direction=0 +# 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 - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -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; -} + ac_executable_p="test -f" +fi +rm -f conf$$.file -int -main () -{ - exit (find_stack_direction () < 0); -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_stack_direction=1 +# Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_XGETTEXT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_c_stack_direction=-1 -fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + 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 + if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 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 + echo "$as_me:$LINENO: result: $XGETTEXT" >&5 +echo "${ECHO_T}$XGETTEXT" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 -echo "${ECHO_T}$ac_cv_c_stack_direction" >&6 -cat >>confdefs.h <<_ACEOF -#define STACK_DIRECTION $ac_cv_c_stack_direction -_ACEOF + rm -f messages.po +# 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 - -for ac_header in stdlib.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +# Extract the first word of "msgmerge", so it can be a program name with args. +set dummy msgmerge; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_MSGMERGE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 + if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 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 -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +MSGMERGE="$ac_cv_path_MSGMERGE" +if test "$MSGMERGE" != ":"; then + echo "$as_me:$LINENO: result: $MSGMERGE" >&5 +echo "${ECHO_T}$MSGMERGE" >&6 else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + if test "$GMSGFMT" != ":"; then + if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && + (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + : ; + else + GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` + echo "$as_me:$LINENO: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5 +echo "${ECHO_T}found $GMSGFMT program is not GNU msgfmt; ignore it" >&6 + GMSGFMT=":" + fi + fi + + if test "$XGETTEXT" != ":"; then + if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && + (if $XGETTEXT --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 + : ; + else + echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5 +echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6 + XGETTEXT=":" + fi + rm -f messages.po + fi + + ac_config_commands="$ac_config_commands default-1" + + +# Make sure we can run config.sub. +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 +build=$ac_cv_build +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 +host=$ac_cv_host +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 +if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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> + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset x; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *ccp; + char **p; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + ccp = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++ccp; + p = (char**) ccp; + ccp = (char const *const *) p; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + } +#endif + + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_header_compiler=yes + ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no +ac_cv_c_const=no fi -rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6 +if test $ac_cv_c_const = no; then -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF + +fi + + + echo "$as_me:$LINENO: checking for signed" >&5 +echo $ECHO_N "checking for signed... $ECHO_C" >&6 +if test "${bh_cv_c_signed+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 <$ac_header> + +int +main () +{ +signed char x; + ; + return 0; +} _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + bh_cv_c_signed=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no +bh_cv_c_signed=no fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; - no:yes ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=$ac_header_preproc" +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +echo "$as_me:$LINENO: result: $bh_cv_c_signed" >&5 +echo "${ECHO_T}$bh_cv_c_signed" >&6 + if test $bh_cv_c_signed = no; then -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +cat >>confdefs.h <<\_ACEOF +#define signed _ACEOF -fi + fi -done - - -for ac_func in getpagesize -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6 +if test "${ac_cv_c_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* 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 -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } #endif -int -main () -{ -return f != $ac_func; - ; - return 0; -} _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - eval "$as_ac_var=yes" + ac_cv_c_inline=$ac_kw; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done fi -done +echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6 -echo "$as_me:$LINENO: checking for working mmap" >&5 -echo $ECHO_N "checking for working mmap... $ECHO_C" >&6 -if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then + +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 + +echo "$as_me:$LINENO: checking for off_t" >&5 +echo $ECHO_N "checking for off_t... $ECHO_C" >&6 +if test "${ac_cv_type_off_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$cross_compiling" = yes; then - ac_cv_func_mmap_fixed_mapped=no -else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -/* malloc might have been renamed as rpl_malloc. */ -#undef malloc - -/* Thanks to Mike Haertel and Jim Avera for this test. - Here is a matrix of mmap possibilities: - mmap private not fixed - mmap private fixed at somewhere currently unmapped - mmap private fixed at somewhere already mapped - mmap shared not fixed - mmap shared fixed at somewhere currently unmapped - mmap shared fixed at somewhere already mapped - For private mappings, we should verify that changes cannot be read() - back from the file, nor mmap's back from the file at a different - address. (There have been systems where private was not correctly - implemented like the infamous i386 svr4.0, and systems where the - VM page cache was not coherent with the file system buffer cache - like early versions of FreeBSD and possibly contemporary NetBSD.) - For shared mappings, we should conversely verify that changes get - propagated back to all the places they're supposed to be. - - Grep wants private fixed already mapped. - The main things grep needs to know about mmap are: - * does it exist and is it safe to write into the mmap'd area - * how to use it (BSD variants) */ - -#include -#include - -#if !STDC_HEADERS && !HAVE_STDLIB_H -char *malloc (); -#endif - -/* This mess was copied from the GNU getpagesize.h. */ -#if !HAVE_GETPAGESIZE -/* Assume that all systems that can run configure have sys/param.h. */ -# if !HAVE_SYS_PARAM_H -# define HAVE_SYS_PARAM_H 1 -# endif - -# ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ -# if HAVE_SYS_PARAM_H -# include -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else /* no EXEC_PAGESIZE */ -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* no CLSIZE */ -# else /* no NBPG */ -# ifdef NBPC -# define getpagesize() NBPC -# else /* no NBPC */ -# ifdef PAGESIZE -# define getpagesize() PAGESIZE -# endif /* PAGESIZE */ -# endif /* no NBPC */ -# endif /* no NBPG */ -# endif /* no EXEC_PAGESIZE */ -# else /* no HAVE_SYS_PARAM_H */ -# define getpagesize() 8192 /* punt totally */ -# endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ - -#endif /* no HAVE_GETPAGESIZE */ - int main () { - char *data, *data2, *data3; - int i, pagesize; - int fd; - - pagesize = getpagesize (); - - /* First, make a file with some known garbage in it. */ - data = (char *) malloc (pagesize); - if (!data) - exit (1); - for (i = 0; i < pagesize; ++i) - *(data + i) = rand (); - umask (0); - fd = creat ("conftest.mmap", 0600); - if (fd < 0) - exit (1); - if (write (fd, data, pagesize) != pagesize) - exit (1); - close (fd); - - /* Next, try to mmap the file at a fixed address which already has - something else allocated at it. If we can, also make sure that - we see the same garbage. */ - fd = open ("conftest.mmap", O_RDWR); - if (fd < 0) - exit (1); - data2 = (char *) malloc (2 * pagesize); - if (!data2) - exit (1); - data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); - if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED, fd, 0L)) - exit (1); - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - exit (1); - - /* Finally, make sure that changes to the mapped area do not - percolate back to the file as seen by read(). (This is a bug on - some variants of i386 svr4.0.) */ - for (i = 0; i < pagesize; ++i) - *(data2 + i) = *(data2 + i) + 1; - data3 = (char *) malloc (pagesize); - if (!data3) - exit (1); - if (read (fd, data3, pagesize) != pagesize) - exit (1); - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data3 + i)) - exit (1); - close (fd); - exit (0); +if ((off_t *) 0) + return 0; +if (sizeof (off_t)) + return 0; + ; + return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func_mmap_fixed_mapped=yes + ac_cv_type_off_t=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_func_mmap_fixed_mapped=no -fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +ac_cv_type_off_t=no fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 -echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6 -if test $ac_cv_func_mmap_fixed_mapped = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MMAP 1 -_ACEOF - -fi -rm -f conftest.mmap - - - echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5 -echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6 -if test "${ac_cv_gnu_library_2_1+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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 +echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 +echo "${ECHO_T}$ac_cv_type_off_t" >&6 +if test $ac_cv_type_off_t = yes; then + : +else +cat >>confdefs.h <<_ACEOF +#define off_t long _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Lucky GNU user" >/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 -echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5 -echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6 - - GLIBC21="$ac_cv_gnu_library_2_1" - - - - echo "$as_me:$LINENO: checking whether integer division by zero raises SIGFPE" >&5 -echo $ECHO_N "checking whether integer division by zero raises SIGFPE... $ECHO_C" >&6 -if test "${gt_cv_int_divbyzero_sigfpe+set}" = set; then +echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - - if test "$cross_compiling" = yes; then - - # Guess based on the CPU. - case "$host_cpu" in - alpha* | i3456786 | m68k | s390*) - gt_cv_int_divbyzero_sigfpe="guessing yes";; - *) - gt_cv_int_divbyzero_sigfpe="guessing no";; - esac - -else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#include -#include - -static void -#ifdef __cplusplus -sigfpe_handler (int sig) -#else -sigfpe_handler (sig) int sig; -#endif -{ - /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ - exit (sig != SIGFPE); -} - -int x = 1; -int y = 0; -int z; -int nan; - -int main () +$ac_includes_default +int +main () { - signal (SIGFPE, sigfpe_handler); -/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ -#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) - signal (SIGTRAP, sigfpe_handler); -#endif -/* Linux/SPARC yields signal SIGILL. */ -#if defined (__sparc__) && defined (__linux__) - signal (SIGILL, sigfpe_handler); -#endif - - z = x / y; - nan = y / y; - exit (1); +if ((size_t *) 0) + return 0; +if (sizeof (size_t)) + return 0; + ; + return 0; } - _ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - gt_cv_int_divbyzero_sigfpe=yes + ac_cv_type_size_t=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -gt_cv_int_divbyzero_sigfpe=no -fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +ac_cv_type_size_t=no fi - +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $gt_cv_int_divbyzero_sigfpe" >&5 -echo "${ECHO_T}$gt_cv_int_divbyzero_sigfpe" >&6 - case "$gt_cv_int_divbyzero_sigfpe" in - *yes) value=1;; - *) value=0;; - esac +echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6 +if test $ac_cv_type_size_t = yes; then + : +else cat >>confdefs.h <<_ACEOF -#define INTDIV0_RAISES_SIGFPE $value +#define size_t unsigned _ACEOF +fi - echo "$as_me:$LINENO: checking for unsigned long long" >&5 -echo $ECHO_N "checking for unsigned long long... $ECHO_C" >&6 -if test "${ac_cv_type_unsigned_long_long+set}" = set; then + echo "$as_me:$LINENO: checking for long long" >&5 +echo $ECHO_N "checking for long long... $ECHO_C" >&6 +if test "${ac_cv_type_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -unsigned long long ull = 1; int i = 63; +long long ll = 1LL; int i = 63; int main () { -unsigned long long ullmax = (unsigned long long) -1; - return ull << i | ull >> i | ullmax / ull | ullmax % ull; +long long llmax = (long long) -1; + return ll << i | ll >> i | llmax / ll | llmax % ll; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_type_unsigned_long_long=yes + ac_cv_type_long_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_unsigned_long_long=no +ac_cv_type_long_long=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long" >&5 -echo "${ECHO_T}$ac_cv_type_unsigned_long_long" >&6 - if test $ac_cv_type_unsigned_long_long = yes; then +echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 +echo "${ECHO_T}$ac_cv_type_long_long" >&6 + if test $ac_cv_type_long_long = yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_UNSIGNED_LONG_LONG 1 +#define HAVE_LONG_LONG 1 _ACEOF fi - - echo "$as_me:$LINENO: checking for uintmax_t" >&5 -echo $ECHO_N "checking for uintmax_t... $ECHO_C" >&6 -if test "${ac_cv_type_uintmax_t+set}" = set; then + echo "$as_me:$LINENO: checking for long double" >&5 +echo $ECHO_N "checking for long double... $ECHO_C" >&6 +if test "${gt_cv_c_long_double+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" + if test "$GCC" = yes; then + gt_cv_c_long_double=yes + 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 + + /* The Stardent Vistra knows sizeof(long double), but does not support it. */ + long double foo = 0.0; + /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ + int array [2*(sizeof(long double) >= sizeof(double)) - 1]; + int main () { -if ((uintmax_t *) 0) - return 0; -if (sizeof (uintmax_t)) - return 0; + ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_type_uintmax_t=yes + gt_cv_c_long_double=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_uintmax_t=no +gt_cv_c_long_double=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi fi -echo "$as_me:$LINENO: result: $ac_cv_type_uintmax_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintmax_t" >&6 -if test $ac_cv_type_uintmax_t = yes; then - : -else - test $ac_cv_type_unsigned_long_long = yes \ - && ac_type='unsigned long long' \ - || ac_type='unsigned long' +echo "$as_me:$LINENO: result: $gt_cv_c_long_double" >&5 +echo "${ECHO_T}$gt_cv_c_long_double" >&6 + if test $gt_cv_c_long_double = yes; then -cat >>confdefs.h <<_ACEOF -#define uintmax_t $ac_type +cat >>confdefs.h <<\_ACEOF +#define HAVE_LONG_DOUBLE 1 _ACEOF -fi - + fi - echo "$as_me:$LINENO: checking for inttypes.h" >&5 -echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 -if test "${gt_cv_header_inttypes_h+set}" = set; then + echo "$as_me:$LINENO: checking for wchar_t" >&5 +echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6 +if test "${gt_cv_c_wchar_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" + 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 + wchar_t foo = (wchar_t)'\0'; int main () { @@ -6207,57 +6346,59 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - gt_cv_header_inttypes_h=yes + gt_cv_c_wchar_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -gt_cv_header_inttypes_h=no +gt_cv_c_wchar_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext - +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $gt_cv_header_inttypes_h" >&5 -echo "${ECHO_T}$gt_cv_header_inttypes_h" >&6 - if test $gt_cv_header_inttypes_h = yes; then +echo "$as_me:$LINENO: result: $gt_cv_c_wchar_t" >&5 +echo "${ECHO_T}$gt_cv_c_wchar_t" >&6 + if test $gt_cv_c_wchar_t = yes; then -cat >>confdefs.h <<_ACEOF -#define HAVE_INTTYPES_H 1 +cat >>confdefs.h <<\_ACEOF +#define HAVE_WCHAR_T 1 _ACEOF fi - - if test $gt_cv_header_inttypes_h = yes; then - echo "$as_me:$LINENO: checking whether the inttypes.h PRIxNN macros are broken" >&5 -echo $ECHO_N "checking whether the inttypes.h PRIxNN macros are broken... $ECHO_C" >&6 -if test "${gt_cv_inttypes_pri_broken+set}" = set; then + echo "$as_me:$LINENO: checking for wint_t" >&5 +echo $ECHO_N "checking for wint_t... $ECHO_C" >&6 +if test "${gt_cv_c_wint_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" + 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 - +#include + wint_t foo = (wchar_t)'\0'; int main () { @@ -6268,369 +6409,3310 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - gt_cv_inttypes_pri_broken=no + gt_cv_c_wint_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -gt_cv_inttypes_pri_broken=yes +gt_cv_c_wint_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext - +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $gt_cv_inttypes_pri_broken" >&5 -echo "${ECHO_T}$gt_cv_inttypes_pri_broken" >&6 - fi - if test "$gt_cv_inttypes_pri_broken" = yes; then +echo "$as_me:$LINENO: result: $gt_cv_c_wint_t" >&5 +echo "${ECHO_T}$gt_cv_c_wint_t" >&6 + if test $gt_cv_c_wint_t = yes; then -cat >>confdefs.h <<_ACEOF -#define PRI_MACROS_BROKEN 1 +cat >>confdefs.h <<\_ACEOF +#define HAVE_WINT_T 1 _ACEOF fi - 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 or --without-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval="$with_gnu_ld" - test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi; -# 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. - echo "$as_me:$LINENO: checking for ld used by GCC" >&5 -echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&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 - echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 -else - echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 -fi -if test "${acl_cv_path_LD+set}" = set; then + echo "$as_me:$LINENO: checking for inttypes.h" >&5 +echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 +if test "${jm_ac_cv_header_inttypes_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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. - if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi - fi - done - IFS="$ac_save_ifs" + 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 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + jm_ac_cv_header_inttypes_h=yes else - acl_cv_path_LD="$LD" # Let the user override the test with a path. + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +jm_ac_cv_header_inttypes_h=no fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi +echo "$as_me:$LINENO: result: $jm_ac_cv_header_inttypes_h" >&5 +echo "${ECHO_T}$jm_ac_cv_header_inttypes_h" >&6 + if test $jm_ac_cv_header_inttypes_h = yes; then -LD="$acl_cv_path_LD" -if test -n "$LD"; then - echo "$as_me:$LINENO: result: $LD" >&5 -echo "${ECHO_T}$LD" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 -if test "${acl_cv_prog_gnu_ld+set}" = set; then +cat >>confdefs.h <<_ACEOF +#define HAVE_INTTYPES_H_WITH_UINTMAX 1 +_ACEOF + + fi + + + echo "$as_me:$LINENO: checking for stdint.h" >&5 +echo $ECHO_N "checking for stdint.h... $ECHO_C" >&6 +if test "${jm_ac_cv_header_stdint_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then - acl_cv_prog_gnu_ld=yes + 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 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + jm_ac_cv_header_stdint_h=yes else - acl_cv_prog_gnu_ld=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +jm_ac_cv_header_stdint_h=no fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 -echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6 -with_gnu_ld=$acl_cv_prog_gnu_ld +echo "$as_me:$LINENO: result: $jm_ac_cv_header_stdint_h" >&5 +echo "${ECHO_T}$jm_ac_cv_header_stdint_h" >&6 + if test $jm_ac_cv_header_stdint_h = yes; then +cat >>confdefs.h <<_ACEOF +#define HAVE_STDINT_H_WITH_UINTMAX 1 +_ACEOF + fi - echo "$as_me:$LINENO: checking for shared library run path origin" >&5 -echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6 -if test "${acl_cv_rpath+set}" = set; then + + + + echo "$as_me:$LINENO: checking for intmax_t" >&5 +echo $ECHO_N "checking for intmax_t... $ECHO_C" >&6 +if test "${gt_cv_c_intmax_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - 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 +#include +#include +#if HAVE_STDINT_H_WITH_UINTMAX +#include +#endif +#if HAVE_INTTYPES_H_WITH_UINTMAX +#include +#endif -fi -echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 -echo "${ECHO_T}$acl_cv_rpath" >&6 - wl="$acl_cv_wl" - libext="$acl_cv_libext" - shlibext="$acl_cv_shlibext" - hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" - hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" - hardcode_direct="$acl_cv_hardcode_direct" - hardcode_minus_L="$acl_cv_hardcode_minus_L" - # Check whether --enable-rpath or --disable-rpath was given. -if test "${enable_rpath+set}" = set; then - enableval="$enable_rpath" - : +int +main () +{ +intmax_t x = -1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gt_cv_c_intmax_t=yes else - enable_rpath=yes -fi; + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +gt_cv_c_intmax_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $gt_cv_c_intmax_t" >&5 +echo "${ECHO_T}$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 + fi + echo "$as_me:$LINENO: checking whether printf() supports POSIX/XSI format strings" >&5 +echo $ECHO_N "checking whether printf() supports POSIX/XSI format strings... $ECHO_C" >&6 +if test "${gt_cv_func_printf_posix+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else - use_additional=yes + if test "$cross_compiling" = yes; then - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" +#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ + notposix +#endif - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "notposix" >/dev/null 2>&1; then + gt_cv_func_printf_posix="guessing no" +else + gt_cv_func_printf_posix="guessing yes" +fi +rm -f conftest* -# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. -if test "${with_libiconv_prefix+set}" = set; then - withval="$with_libiconv_prefix" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - if test "X$withval" = "Xno"; then - use_additional=no - else - if test "X$withval" = "X"; then +#include +#include +/* The string "%2$d %1$d", with dollar characters protected from the shell's + dollar expansion (possibly an autoconf bug). */ +static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; +static char buf[100]; +int main () +{ + sprintf (buf, format, 33, 55); + return (strcmp (buf, "55 33") != 0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gt_cv_func_printf_posix=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" +( exit $ac_status ) +gt_cv_func_printf_posix=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" +fi +echo "$as_me:$LINENO: result: $gt_cv_func_printf_posix" >&5 +echo "${ECHO_T}$gt_cv_func_printf_posix" >&6 + case $gt_cv_func_printf_posix in + *yes) - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" +cat >>confdefs.h <<\_ACEOF +#define HAVE_POSIX_PRINTF 1 +_ACEOF - else - additional_includedir="$withval/include" - additional_libdir="$withval/lib" - fi - fi + ;; + esac -fi; - LIBICONV= - LTLIBICONV= - INCICONV= - 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= - if test $use_additional = yes; then - if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then - found_dir="$additional_libdir" - found_so="$additional_libdir/lib$name.$shlibext" - if test -f "$additional_libdir/lib$name.la"; then - found_la="$additional_libdir/lib$name.la" - fi - else - if test -f "$additional_libdir/lib$name.$libext"; then - found_dir="$additional_libdir" - found_a="$additional_libdir/lib$name.$libext" - if test -f "$additional_libdir/lib$name.la"; then - found_la="$additional_libdir/lib$name.la" - fi - fi - fi - fi - if test "X$found_dir" = "X"; then - for x in $LDFLAGS $LTLIBICONV; do +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +echo "$as_me:$LINENO: checking for working alloca.h" >&5 +echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6 +if test "${ac_cv_working_alloca_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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)); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_working_alloca_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - 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" +ac_cv_working_alloca_h=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 +echo "${ECHO_T}$ac_cv_working_alloca_h" >&6 +if test $ac_cv_working_alloca_h = yes; then - case "$x" in - -L*) - dir=`echo "X$x" | sed -e 's/^X-L//'` - if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then - found_dir="$dir" - found_so="$dir/lib$name.$shlibext" - if test -f "$dir/lib$name.la"; then - found_la="$dir/lib$name.la" - fi - else - if test -f "$dir/lib$name.$libext"; then - found_dir="$dir" - found_a="$dir/lib$name.$libext" - if test -f "$dir/lib$name.la"; then - found_la="$dir/lib$name.la" - fi - 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/lib"; 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 "$hardcode_direct" = yes; then - LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" - else - if test -n "$hardcode_libdir_flag_spec" && test "$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 +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALLOCA_H 1 +_ACEOF - acl_save_prefix="$prefix" +fi + +echo "$as_me:$LINENO: checking for alloca" >&5 +echo $ECHO_N "checking for alloca... $ECHO_C" >&6 +if test "${ac_cv_func_alloca_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 +# if 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); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_alloca_works=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_alloca_works=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 +echo "${ECHO_T}$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=alloca.$ac_objext + +cat >>confdefs.h <<\_ACEOF +#define C_ALLOCA 1 +_ACEOF + + +echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 +echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6 +if test "${ac_cv_os_cray+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 +echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 +echo "${ECHO_T}$ac_cv_os_cray" >&6 +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&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 gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + +cat >>confdefs.h <<_ACEOF +#define CRAY_STACKSEG_END $ac_func +_ACEOF + + break +fi + + done +fi + +echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 +echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6 +if test "${ac_cv_c_stack_direction+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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. */ +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 () +{ + exit (find_stack_direction () < 0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_stack_direction=1 +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_c_stack_direction=-1 +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 +echo "${ECHO_T}$ac_cv_c_stack_direction" >&6 + +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF + + +fi + + + +for ac_header in stdlib.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + 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 +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------- ## +## Report this to bug-gawk@gnu.org ## +## ------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_func in getpagesize +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&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 gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +echo "$as_me:$LINENO: checking for working mmap" >&5 +echo $ECHO_N "checking for working mmap... $ECHO_C" >&6 +if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_mmap_fixed_mapped=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 +/* malloc might have been renamed as rpl_malloc. */ +#undef malloc + +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the file system buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propagated back to all the places they're supposed to be. + + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ + +#include +#include + +#if !STDC_HEADERS && !HAVE_STDLIB_H +char *malloc (); +#endif + +/* This mess was copied from the GNU getpagesize.h. */ +#if !HAVE_GETPAGESIZE +/* Assume that all systems that can run configure have sys/param.h. */ +# if !HAVE_SYS_PARAM_H +# define HAVE_SYS_PARAM_H 1 +# endif + +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# if HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +int +main () +{ + char *data, *data2, *data3; + int i, pagesize; + int fd; + + pagesize = getpagesize (); + + /* First, make a file with some known garbage in it. */ + data = (char *) malloc (pagesize); + if (!data) + exit (1); + for (i = 0; i < pagesize; ++i) + *(data + i) = rand (); + umask (0); + fd = creat ("conftest.mmap", 0600); + if (fd < 0) + exit (1); + if (write (fd, data, pagesize) != pagesize) + exit (1); + close (fd); + + /* Next, try to mmap the file at a fixed address which already has + something else allocated at it. If we can, also make sure that + we see the same garbage. */ + fd = open ("conftest.mmap", O_RDWR); + if (fd < 0) + exit (1); + data2 = (char *) malloc (2 * pagesize); + if (!data2) + exit (1); + data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1); + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + exit (1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + exit (1); + + /* Finally, make sure that changes to the mapped area do not + percolate back to the file as seen by read(). (This is a bug on + some variants of i386 svr4.0.) */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = (char *) malloc (pagesize); + if (!data3) + exit (1); + if (read (fd, data3, pagesize) != pagesize) + exit (1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + exit (1); + close (fd); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_mmap_fixed_mapped=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_func_mmap_fixed_mapped=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 +echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6 +if test $ac_cv_func_mmap_fixed_mapped = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MMAP 1 +_ACEOF + +fi +rm -f conftest.mmap + + + echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5 +echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6 +if test "${ac_cv_gnu_library_2_1+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Lucky GNU user" >/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 +echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5 +echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6 + + GLIBC21="$ac_cv_gnu_library_2_1" + + + + + echo "$as_me:$LINENO: checking whether integer division by zero raises SIGFPE" >&5 +echo $ECHO_N "checking whether integer division by zero raises SIGFPE... $ECHO_C" >&6 +if test "${gt_cv_int_divbyzero_sigfpe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test "$cross_compiling" = yes; then + + # Guess based on the CPU. + case "$host_cpu" in + alpha* | i3456786 | m68k | s390*) + gt_cv_int_divbyzero_sigfpe="guessing yes";; + *) + gt_cv_int_divbyzero_sigfpe="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 void +#ifdef __cplusplus +sigfpe_handler (int sig) +#else +sigfpe_handler (sig) int sig; +#endif +{ + /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ + exit (sig != SIGFPE); +} + +int x = 1; +int y = 0; +int z; +int nan; + +int main () +{ + signal (SIGFPE, sigfpe_handler); +/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ +#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) + signal (SIGTRAP, sigfpe_handler); +#endif +/* Linux/SPARC yields signal SIGILL. */ +#if defined (__sparc__) && defined (__linux__) + signal (SIGILL, sigfpe_handler); +#endif + + z = x / y; + nan = y / y; + exit (1); +} + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gt_cv_int_divbyzero_sigfpe=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +gt_cv_int_divbyzero_sigfpe=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + +fi +echo "$as_me:$LINENO: result: $gt_cv_int_divbyzero_sigfpe" >&5 +echo "${ECHO_T}$gt_cv_int_divbyzero_sigfpe" >&6 + case "$gt_cv_int_divbyzero_sigfpe" in + *yes) value=1;; + *) value=0;; + esac + +cat >>confdefs.h <<_ACEOF +#define INTDIV0_RAISES_SIGFPE $value +_ACEOF + + + + echo "$as_me:$LINENO: checking for unsigned long long" >&5 +echo $ECHO_N "checking for unsigned long long... $ECHO_C" >&6 +if test "${ac_cv_type_unsigned_long_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +unsigned long long ull = 1ULL; int i = 63; +int +main () +{ +unsigned long long ullmax = (unsigned long long) -1; + return ull << i | ull >> i | ullmax / ull | ullmax % ull; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_unsigned_long_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_unsigned_long_long=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long" >&5 +echo "${ECHO_T}$ac_cv_type_unsigned_long_long" >&6 + if test $ac_cv_type_unsigned_long_long = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_UNSIGNED_LONG_LONG 1 +_ACEOF + + fi + + + + + if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then + + test $ac_cv_type_unsigned_long_long = yes \ + && ac_type='unsigned long long' \ + || ac_type='unsigned long' + +cat >>confdefs.h <<_ACEOF +#define uintmax_t $ac_type +_ACEOF + + else + +cat >>confdefs.h <<\_ACEOF +#define HAVE_UINTMAX_T 1 +_ACEOF + + fi + + + echo "$as_me:$LINENO: checking for inttypes.h" >&5 +echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 +if test "${gt_cv_header_inttypes_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gt_cv_header_inttypes_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gt_cv_header_inttypes_h=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $gt_cv_header_inttypes_h" >&5 +echo "${ECHO_T}$gt_cv_header_inttypes_h" >&6 + if test $gt_cv_header_inttypes_h = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_INTTYPES_H 1 +_ACEOF + + fi + + + + if test $gt_cv_header_inttypes_h = yes; then + echo "$as_me:$LINENO: checking whether the inttypes.h PRIxNN macros are broken" >&5 +echo $ECHO_N "checking whether the inttypes.h PRIxNN macros are broken... $ECHO_C" >&6 +if test "${gt_cv_inttypes_pri_broken+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gt_cv_inttypes_pri_broken=no +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gt_cv_inttypes_pri_broken=yes +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $gt_cv_inttypes_pri_broken" >&5 +echo "${ECHO_T}$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 + + fi + + + +for ac_header in stdint.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + 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 +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------- ## +## Report this to bug-gawk@gnu.org ## +## ------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + echo "$as_me:$LINENO: checking for SIZE_MAX" >&5 +echo $ECHO_N "checking for SIZE_MAX... $ECHO_C" >&6 + result= + 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 + result=yes +fi +rm -f conftest* + + if test -z "$result"; 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 +int +main () +{ +static int test_array [1 - 2 * !((~(size_t)0 / 10) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; 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 * !((~(size_t)0 / 10) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + 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 conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + 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 * !((~(size_t)0 / 10) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; 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 * !((~(size_t)0 / 10) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + 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 conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo= ac_hi= +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f 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 * !((~(size_t)0 / 10) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) res_hi=$ac_lo;; +'') result=? ;; +esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +long longval () { return ~(size_t)0 / 10; } +unsigned long ulongval () { return ~(size_t)0 / 10; } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if ((~(size_t)0 / 10) < 0) + { + long i = longval (); + if (i != (~(size_t)0 / 10)) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != (~(size_t)0 / 10)) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + res_hi=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +result=? +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +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 * !((~(size_t)0 % 10) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; 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 * !((~(size_t)0 % 10) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + 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 conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + 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 * !((~(size_t)0 % 10) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; 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 * !((~(size_t)0 % 10) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + 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 conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo= ac_hi= +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f 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 * !((~(size_t)0 % 10) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) res_lo=$ac_lo;; +'') result=? ;; +esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +long longval () { return ~(size_t)0 % 10; } +unsigned long ulongval () { return ~(size_t)0 % 10; } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if ((~(size_t)0 % 10) < 0) + { + long i = longval (); + if (i != (~(size_t)0 % 10)) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != (~(size_t)0 % 10)) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + res_lo=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +result=? +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; 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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + 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 conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + 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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; 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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + 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 conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo= ac_hi= +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f 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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) fits_in_uint=$ac_lo;; +'') result=? ;; +esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +long longval () { return sizeof (size_t) <= sizeof (unsigned int); } +unsigned long ulongval () { return sizeof (size_t) <= sizeof (unsigned int); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if ((sizeof (size_t) <= sizeof (unsigned int)) < 0) + { + long i = longval (); + if (i != (sizeof (size_t) <= sizeof (unsigned int))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != (sizeof (size_t) <= sizeof (unsigned int))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + fits_in_uint=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +result=? +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val + 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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + fits_in_uint=0 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test -z "$result"; then + if test "$fits_in_uint" = 1; then + result="$res_hi$res_lo"U + else + result="$res_hi$res_lo"UL + fi + else + result='~(size_t)0' + fi + fi + echo "$as_me:$LINENO: result: $result" >&5 +echo "${ECHO_T}$result" >&6 + if test "$result" != yes; then + +cat >>confdefs.h <<_ACEOF +#define SIZE_MAX $result +_ACEOF + + fi + + + + +for ac_header in stdint.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + 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 +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------- ## +## Report this to bug-gawk@gnu.org ## +## ------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + 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 or --without-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" + test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi; +# 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. + echo "$as_me:$LINENO: checking for ld used by GCC" >&5 +echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&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 + echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 +else + echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 +fi +if test "${acl_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 + echo "$as_me:$LINENO: result: $LD" >&5 +echo "${ECHO_T}$LD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +if test "${acl_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6 +with_gnu_ld=$acl_cv_prog_gnu_ld + + + + echo "$as_me:$LINENO: checking for shared library run path origin" >&5 +echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6 +if test "${acl_cv_rpath+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 +echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 +echo "${ECHO_T}$acl_cv_rpath" >&6 + wl="$acl_cv_wl" + libext="$acl_cv_libext" + shlibext="$acl_cv_shlibext" + hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + hardcode_direct="$acl_cv_hardcode_direct" + hardcode_minus_L="$acl_cv_hardcode_minus_L" + # Check whether --enable-rpath or --disable-rpath was given. +if test "${enable_rpath+set}" = set; then + enableval="$enable_rpath" + : +else + enable_rpath=yes +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 or --without-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/lib" + fi + fi + +fi; + LIBICONV= + LTLIBICONV= + INCICONV= + 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= + if test $use_additional = yes; then + if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then + found_dir="$additional_libdir" + found_so="$additional_libdir/lib$name.$shlibext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + else + if test -f "$additional_libdir/lib$name.$libext"; then + found_dir="$additional_libdir" + found_a="$additional_libdir/lib$name.$libext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + 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 "$shlibext" && test -f "$dir/lib$name.$shlibext"; then + found_dir="$dir" + found_so="$dir/lib$name.$shlibext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + else + if test -f "$dir/lib$name.$libext"; then + found_dir="$dir" + found_a="$dir/lib$name.$libext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + 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/lib"; 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 "$hardcode_direct" = yes; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + if test -n "$hardcode_libdir_flag_spec" && test "$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 "$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 + */lib | */lib/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` + 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*) 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/lib"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/lib"; then + if test -n "$GCC"; then + case $host_os in + linux*) 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" @@ -6638,471 +9720,823 @@ 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 "$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 - */lib | */lib/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` - 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*) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - for x in $CPPFLAGS $INCICONV; do + 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 "$hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$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=\"$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 + + + + + + + + + echo "$as_me:$LINENO: checking for ptrdiff_t" >&5 +echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6 +if test "${ac_cv_type_ptrdiff_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 () +{ +if ((ptrdiff_t *) 0) + return 0; +if (sizeof (ptrdiff_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_ptrdiff_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_ptrdiff_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5 +echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6 +if test $ac_cv_type_ptrdiff_t = yes; then + : +else + +cat >>confdefs.h <<\_ACEOF +#define ptrdiff_t long +_ACEOF + + +fi + + + + + + + + + + + +for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ +stdlib.h string.h unistd.h sys/param.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + 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 +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------- ## +## Report this to bug-gawk@gnu.org ## +## ------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + + + + + + + + + + + + + + + + + + +for ac_func in asprintf fwprintf getcwd getegid geteuid getgid getuid \ +mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \ +strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \ +__fsetlocking +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&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 gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF - 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" +fi +done - 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/lib"; then - haveit= - if test "X$additional_libdir" = "X/usr/local/lib"; then - if test -n "$GCC"; then - case $host_os in - linux*) 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 + echo "$as_me:$LINENO: checking whether _snprintf is declared" >&5 +echo $ECHO_N "checking whether _snprintf is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl__snprintf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 () +{ - 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" +#ifndef _snprintf + char *p = (char *) _snprintf; +#endif - 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 "$hardcode_libdir_separator"; then - alldirs= - for found_dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" - done - acl_save_libdir="$libdir" - libdir="$alldirs" - eval flag=\"$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=\"$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 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl__snprintf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_have_decl__snprintf=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl__snprintf" >&5 +echo "${ECHO_T}$ac_cv_have_decl__snprintf" >&6 + if test $ac_cv_have_decl__snprintf = yes; then + gt_value=1 + else + gt_value=0 fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL__SNPRINTF $gt_value +_ACEOF + echo "$as_me:$LINENO: checking whether _snwprintf is declared" >&5 +echo $ECHO_N "checking whether _snwprintf is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl__snwprintf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 _snwprintf + char *p = (char *) _snwprintf; +#endif + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl__snwprintf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_have_decl__snwprintf=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl__snwprintf" >&5 +echo "${ECHO_T}$ac_cv_have_decl__snwprintf" >&6 + if test $ac_cv_have_decl__snwprintf = yes; then + gt_value=1 + else + gt_value=0 + fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL__SNWPRINTF $gt_value +_ACEOF - - -for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ -stdlib.h string.h unistd.h sys/param.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking whether feof_unlocked is declared" >&5 +echo $ECHO_N "checking whether feof_unlocked is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_feof_unlocked+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" + 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> +#include +int +main () +{ + +#ifndef feof_unlocked + char *p = (char *) feof_unlocked; +#endif + + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_header_compiler=yes + ac_cv_have_decl_feof_unlocked=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no +ac_cv_have_decl_feof_unlocked=no fi -rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl_feof_unlocked" >&5 +echo "${ECHO_T}$ac_cv_have_decl_feof_unlocked" >&6 + if test $ac_cv_have_decl_feof_unlocked = yes; then + gt_value=1 + else + gt_value=0 + fi -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FEOF_UNLOCKED $gt_value +_ACEOF + + + + echo "$as_me:$LINENO: checking whether fgets_unlocked is declared" >&5 +echo $ECHO_N "checking whether fgets_unlocked is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_fgets_unlocked+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 <$ac_header> +#include +int +main () +{ + +#ifndef fgets_unlocked + char *p = (char *) fgets_unlocked; +#endif + + ; + return 0; +} _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl_fgets_unlocked=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no +ac_cv_have_decl_fgets_unlocked=no fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; - no:yes ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=$ac_header_preproc" +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +echo "$as_me:$LINENO: result: $ac_cv_have_decl_fgets_unlocked" >&5 +echo "${ECHO_T}$ac_cv_have_decl_fgets_unlocked" >&6 + if test $ac_cv_have_decl_fgets_unlocked = yes; then + gt_value=1 + else + gt_value=0 + fi -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FGETS_UNLOCKED $gt_value _ACEOF -fi - -done - - - - - - - - - - - - - - - - - - - - - -for ac_func in feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \ -geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \ -strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next \ -__fsetlocking -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then + echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5 +echo $ECHO_N "checking whether getc_unlocked is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* 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 -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - +#include int main () { -return f != $ac_func; + +#ifndef getc_unlocked + char *p = (char *) getc_unlocked; +#endif + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - eval "$as_ac_var=yes" + ac_cv_have_decl_getc_unlocked=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" +ac_cv_have_decl_getc_unlocked=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5 +echo "${ECHO_T}$ac_cv_have_decl_getc_unlocked" >&6 + if test $ac_cv_have_decl_getc_unlocked = yes; then + gt_value=1 + else + gt_value=0 + fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETC_UNLOCKED $gt_value _ACEOF -fi -done + + + case $gt_cv_func_printf_posix in + *yes) HAVE_POSIX_PRINTF=1 ;; + *) HAVE_POSIX_PRINTF=0 ;; + esac + + if test "$ac_cv_func_asprintf" = yes; then + HAVE_ASPRINTF=1 + else + HAVE_ASPRINTF=0 + fi + + if test "$ac_cv_func_snprintf" = yes; then + HAVE_SNPRINTF=1 + else + HAVE_SNPRINTF=0 + fi + + if test "$ac_cv_func_wprintf" = yes; then + HAVE_WPRINTF=1 + else + HAVE_WPRINTF=0 + fi @@ -7144,7 +10578,6 @@ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7164,11 +10597,21 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7180,12 +10623,12 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + 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 -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7205,11 +10648,21 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7222,7 +10675,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi @@ -7257,7 +10711,6 @@ else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7286,11 +10739,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7303,7 +10766,7 @@ am_cv_proto_iconv_arg1="const" fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f 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 @@ -7326,7 +10789,6 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7343,11 +10805,21 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7360,7 +10832,8 @@ am_cv_langinfo_codeset=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 @@ -7381,7 +10854,6 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7398,11 +10870,21 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7415,7 +10897,8 @@ am_cv_val_LC_MESSAGES=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 @@ -7555,7 +11038,6 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7575,11 +11057,21 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7592,7 +11084,8 @@ gt_cv_func_gnugettext2_libc=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext2_libc" >&5 echo "${ECHO_T}$gt_cv_func_gnugettext2_libc" >&6 @@ -7987,7 +11480,6 @@ gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8011,11 +11503,21 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8028,11 +11530,11 @@ gt_cv_func_gnugettext2_libintl=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test "$gt_cv_func_gnugettext2_libintl" != yes && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8056,11 +11558,21 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8075,7 +11587,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" @@ -8240,7 +11753,6 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8261,11 +11773,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8278,12 +11800,11 @@ ac_cv_header_stdc=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f 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 -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8305,7 +11826,6 @@ 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 -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8330,7 +11850,6 @@ : else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8342,9 +11861,9 @@ # 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')) + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif @@ -8355,7 +11874,7 @@ int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) + || toupper (i) != TOUPPER (i)) exit(2); exit (0); } @@ -8380,7 +11899,7 @@ ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi @@ -8400,7 +11919,6 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8427,11 +11945,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8444,7 +11972,7 @@ ac_cv_header_sys_wait_h=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 @@ -8462,7 +11990,6 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8483,11 +12010,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8500,7 +12037,7 @@ ac_cv_header_time=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6 @@ -8549,7 +12086,6 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8560,11 +12096,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8577,7 +12123,7 @@ ac_header_compiler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -8585,7 +12131,6 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8603,6 +12148,7 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -8622,33 +12168,32 @@ echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes ;; - no:yes ) + no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## +## ------------------------------- ## +## Report this to bug-gawk@gnu.org ## +## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -8659,7 +12204,7 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=$ac_header_preproc" + eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -8694,7 +12239,6 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8705,11 +12249,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8722,7 +12276,7 @@ ac_header_compiler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -8730,7 +12284,6 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8748,6 +12301,7 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -8767,33 +12321,32 @@ echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes ;; - no:yes ) + no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## +## ------------------------------- ## +## Report this to bug-gawk@gnu.org ## +## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -8804,7 +12357,7 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=$ac_header_preproc" + eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -8837,7 +12390,6 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8848,11 +12400,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8865,7 +12427,7 @@ ac_header_compiler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -8873,7 +12435,6 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8891,6 +12452,7 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -8910,33 +12472,32 @@ echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes ;; - no:yes ) + no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## +## ------------------------------- ## +## Report this to bug-gawk@gnu.org ## +## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -8947,7 +12508,7 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=$ac_header_preproc" + eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -8970,7 +12531,6 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8990,11 +12550,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9007,7 +12577,7 @@ ac_cv_type_pid_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 echo "${ECHO_T}$ac_cv_type_pid_t" >&6 @@ -9027,7 +12597,6 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9054,11 +12623,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9071,7 +12650,7 @@ ac_cv_type_signal=int fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6 @@ -9087,7 +12666,6 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9107,11 +12685,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9124,7 +12712,7 @@ ac_cv_type_size_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6 @@ -9144,7 +12732,6 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9186,7 +12773,6 @@ ac_cv_type_getgroups=cross else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9209,7 +12795,7 @@ for (i = 0; i < NGID; i++) gidset[i] = val.gval; n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, - gidset); + gidset); /* Exit non-zero if getgroups seems to require an array of ints. This happens when gid_t is short but getgroups modifies an array of ints. */ exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); @@ -9235,11 +12821,10 @@ ( exit $ac_status ) ac_cv_type_getgroups=int fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_type_getgroups = cross; then cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9273,13 +12858,12 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -long long ll = 1; int i = 63; +long long ll = 1LL; int i = 63; int main () { @@ -9291,11 +12875,21 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9308,7 +12902,8 @@ ac_cv_type_long_long=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 echo "${ECHO_T}$ac_cv_type_long_long" >&6 @@ -9327,13 +12922,12 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -unsigned long long ull = 1; int i = 63; +unsigned long long ull = 1ULL; int i = 63; int main () { @@ -9345,11 +12939,21 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9362,7 +12966,8 @@ ac_cv_type_unsigned_long_long=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long" >&5 echo "${ECHO_T}$ac_cv_type_unsigned_long_long" >&6 @@ -9382,7 +12987,6 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9402,111 +13006,78 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_intmax_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_intmax_t=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_intmax_t" >&5 -echo "${ECHO_T}$ac_cv_type_intmax_t" >&6 -if test $ac_cv_type_intmax_t = yes; then - : -else - test $ac_cv_type_long_long = yes \ - && ac_type='long long' \ - || ac_type='long' - -cat >>confdefs.h <<_ACEOF -#define intmax_t $ac_type -_ACEOF - -fi - - - - - echo "$as_me:$LINENO: checking for uintmax_t" >&5 -echo $ECHO_N "checking for uintmax_t... $ECHO_C" >&6 -if test "${ac_cv_type_uintmax_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((uintmax_t *) 0) - return 0; -if (sizeof (uintmax_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_type_uintmax_t=yes + ac_cv_type_intmax_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_uintmax_t=no +ac_cv_type_intmax_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_uintmax_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintmax_t" >&6 -if test $ac_cv_type_uintmax_t = yes; then +echo "$as_me:$LINENO: result: $ac_cv_type_intmax_t" >&5 +echo "${ECHO_T}$ac_cv_type_intmax_t" >&6 +if test $ac_cv_type_intmax_t = yes; then : else - test $ac_cv_type_unsigned_long_long = yes \ - && ac_type='unsigned long long' \ - || ac_type='unsigned long' + test $ac_cv_type_long_long = yes \ + && ac_type='long long' \ + || ac_type='long' cat >>confdefs.h <<_ACEOF -#define uintmax_t $ac_type +#define intmax_t $ac_type _ACEOF fi + + + + if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then + + test $ac_cv_type_unsigned_long_long = yes \ + && ac_type='unsigned long long' \ + || ac_type='unsigned long' + +cat >>confdefs.h <<_ACEOF +#define uintmax_t $ac_type +_ACEOF + + else + +cat >>confdefs.h <<\_ACEOF +#define HAVE_UINTMAX_T 1 +_ACEOF + + fi + echo "$as_me:$LINENO: checking for ssize_t" >&5 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 if test "${ac_cv_type_ssize_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9526,11 +13097,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9543,7 +13124,7 @@ ac_cv_type_ssize_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 @@ -9558,7 +13139,6 @@ fi cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9583,7 +13163,6 @@ rm -f conftest* cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9603,11 +13182,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9623,13 +13212,59 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext 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. */ +#include +int +main () +{ + + wctype_t foo; + foo = 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then cat >>confdefs.h <<\_ACEOF -#define REGEX_MALLOC 1 +#define HAVE_WCTYPE_T 1 _ACEOF +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + for ac_func in vprintf do @@ -9640,21 +13275,28 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* 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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" @@ -9685,11 +13327,21 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9702,7 +13354,8 @@ eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -9717,21 +13370,28 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define _doprnt to an innocuous variant, in case declares _doprnt. + For example, HP-UX 11i declares gettimeofday. */ +#define _doprnt innocuous__doprnt + /* System header to define __stub macros and hopefully few prototypes, which can conflict with char _doprnt (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ + #ifdef __STDC__ # include #else # include #endif + +#undef _doprnt + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" @@ -9762,11 +13422,21 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9779,7 +13449,8 @@ ac_cv_func__doprnt=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 echo "${ECHO_T}$ac_cv_func__doprnt" >&6 @@ -9813,7 +13484,6 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9824,11 +13494,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9841,7 +13521,7 @@ ac_header_compiler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -9849,7 +13529,6 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9867,6 +13546,7 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -9886,33 +13566,32 @@ echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes ;; - no:yes ) + no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## +## ------------------------------- ## +## Report this to bug-gawk@gnu.org ## +## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -9923,7 +13602,7 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=$ac_header_preproc" + eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -9948,21 +13627,28 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* 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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" @@ -9993,11 +13679,21 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10010,7 +13706,8 @@ eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -10031,7 +13728,6 @@ gawk_ac_cv_func_strtod_c89=no else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -10081,7 +13777,7 @@ ( exit $ac_status ) gawk_ac_cv_func_strtod_c89=no fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $gawk_ac_cv_func_strtod_c89" >&5 @@ -10096,7 +13792,8 @@ -for ac_header in sys/time.h unistd.h + +for ac_header in stdlib.h sys/time.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then @@ -10112,7 +13809,6 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -10123,11 +13819,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10140,7 +13846,7 @@ ac_header_compiler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -10148,7 +13854,6 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -10166,6 +13871,7 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -10185,33 +13891,32 @@ echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes ;; - no:yes ) + no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## +## ------------------------------- ## +## Report this to bug-gawk@gnu.org ## +## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -10222,7 +13927,7 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=$ac_header_preproc" + eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -10247,21 +13952,28 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* 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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" @@ -10292,11 +14004,21 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10309,7 +14031,8 @@ eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -10330,7 +14053,6 @@ ac_cv_func_working_mktime=no else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -10348,6 +14070,10 @@ # endif #endif +#if HAVE_STDLIB_H +# include +#endif + #if HAVE_UNISTD_H # include #endif @@ -10360,10 +14086,11 @@ #undef putenv static time_t time_t_max; +static time_t time_t_min; /* Values we'll use to set the TZ environment variable. */ -static const char *const tz_strings[] = { - (const char *) 0, "TZ=GMT0", "TZ=JST-9", +static char *tz_strings[] = { + (char *) 0, "TZ=GMT0", "TZ=JST-9", "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" }; #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) @@ -10394,15 +14121,21 @@ } static void -mktime_test (now) +mktime_test1 (now) time_t now; { struct tm *lt; if ((lt = localtime (&now)) && mktime (lt) != now) exit (1); - now = time_t_max - now; - if ((lt = localtime (&now)) && mktime (lt) != now) - exit (1); +} + +static void +mktime_test (now) + time_t now; +{ + mktime_test1 (now); + mktime_test1 ((time_t) (time_t_max - now)); + mktime_test1 ((time_t) (time_t_min + now)); } static void @@ -10462,6 +14195,9 @@ for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2) continue; time_t_max--; + if ((time_t) -1 < 0) + for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2) + continue; delta = time_t_max / 997; /* a suitable prime number */ for (i = 0; i < N_STRINGS; i++) { @@ -10470,11 +14206,12 @@ for (t = 0; t <= time_t_max - delta; t += delta) mktime_test (t); - mktime_test ((time_t) 60 * 60); - mktime_test ((time_t) 60 * 60 * 24); + mktime_test ((time_t) 1); + mktime_test ((time_t) (60 * 60)); + mktime_test ((time_t) (60 * 60 * 24)); for (j = 1; 0 < j; j *= 2) - bigtime_test (j); + bigtime_test (j); bigtime_test (j - 1); } irix_6_4_bug (); @@ -10502,13 +14239,20 @@ ( exit $ac_status ) ac_cv_func_working_mktime=no fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5 echo "${ECHO_T}$ac_cv_func_working_mktime" >&6 if test $ac_cv_func_working_mktime = no; then - LIBOBJS="$LIBOBJS mktime.$ac_objext" + case $LIBOBJS in + "mktime.$ac_objext" | \ + *" mktime.$ac_objext" | \ + "mktime.$ac_objext "* | \ + *" mktime.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS mktime.$ac_objext" ;; +esac + fi case "$ac_cv_func_working_mktime" in @@ -10529,7 +14273,6 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -10553,11 +14296,21 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10570,7 +14323,8 @@ ac_cv_lib_m_fmod=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_m_fmod" >&5 @@ -10604,9 +14358,14 @@ -for ac_func in fmod getgrent getgroups grantpt mbrlen mbrtowc memcmp \ - memcpy memset setlocale snprintf strchr strerror \ - strftime strncasecmp strtod system tzset wcrtomb wcscoll + + + + +for ac_func in fmod getgrent getgroups grantpt iswctype mbrlen \ + memcmp memcpy memmove memset setlocale snprintf strchr \ + strerror strftime strncasecmp strtod strtoul system tzset \ + wcrtomb wcscoll wcscoll wctype do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -10615,21 +14374,28 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* 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 gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" @@ -10660,11 +14426,21 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10677,7 +14453,8 @@ eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -10690,6 +14467,69 @@ done + echo "$as_me:$LINENO: checking whether mbrtowc and mbstate_t are properly declared" >&5 +echo $ECHO_N "checking whether mbrtowc and mbstate_t are properly declared... $ECHO_C" >&6 +if test "${ac_cv_func_mbrtowc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 () +{ +mbstate_t state; return ! (sizeof state && mbrtowc); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_mbrtowc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_mbrtowc=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_mbrtowc" >&5 +echo "${ECHO_T}$ac_cv_func_mbrtowc" >&6 + if test $ac_cv_func_mbrtowc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MBRTOWC 1 +_ACEOF + + fi + + if test "${ac_cv_header_dlfcn_h+set}" = set; then echo "$as_me:$LINENO: checking for dlfcn.h" >&5 echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 @@ -10703,7 +14543,6 @@ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -10714,11 +14553,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10731,7 +14580,7 @@ ac_header_compiler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -10739,7 +14588,6 @@ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -10757,6 +14605,7 @@ (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -10776,33 +14625,32 @@ echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes ;; - no:yes ) + no:yes:* ) { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: dlfcn.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: dlfcn.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: dlfcn.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: dlfcn.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## +## ------------------------------- ## +## Report this to bug-gawk@gnu.org ## +## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -10846,7 +14694,6 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -10870,11 +14717,21 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10887,7 +14744,8 @@ ac_cv_lib_dl_dlopen=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 @@ -10921,7 +14779,6 @@ else # Use it with a single arg. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -10938,11 +14795,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10955,7 +14822,7 @@ ac_cv_func_getpgrp_void=yes fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5 @@ -10971,6 +14838,63 @@ ;; esac +echo "$as_me:$LINENO: checking for printf %F format" >&5 +echo $ECHO_N "checking for printf %F format... $ECHO_C" >&6 +if test "$cross_compiling" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define PRINTF_HAS_F_FORMAT 0 +_ACEOF + + +else + cat >conftest.$ac_ext <<_ACEOF + +#include + +int main() +{ + char buf[100]; + + sprintf(buf, "%F", 123.45); + + if (strcmp(buf, "123.450000") == 0) + return 0; + else + return 1; +} + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +cat >>confdefs.h <<\_ACEOF +#define PRINTF_HAS_F_FORMAT 1 +_ACEOF + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + gawk_have_sockets=no # Check for system-dependent location of socket libraries @@ -11002,21 +14926,28 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define gethostbyname to an innocuous variant, in case declares gethostbyname. + For example, HP-UX 11i declares gettimeofday. */ +#define gethostbyname innocuous_gethostbyname + /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ + #ifdef __STDC__ # include #else # include #endif + +#undef gethostbyname + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" @@ -11047,11 +14978,21 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11064,7 +15005,8 @@ ac_cv_func_gethostbyname=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 @@ -11078,7 +15020,6 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -11102,11 +15043,21 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11119,7 +15070,8 @@ ac_cv_lib_nsl_gethostbyname=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 @@ -11143,21 +15095,28 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define connect to an innocuous variant, in case declares connect. + For example, HP-UX 11i declares gettimeofday. */ +#define connect innocuous_connect + /* System header to define __stub macros and hopefully few prototypes, which can conflict with char connect (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ + #ifdef __STDC__ # include #else # include #endif + +#undef connect + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" @@ -11188,11 +15147,21 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11205,7 +15174,8 @@ ac_cv_func_connect=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 echo "${ECHO_T}$ac_cv_func_connect" >&6 @@ -11219,7 +15189,6 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $SOCKET_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -11243,11 +15212,21 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11260,7 +15239,8 @@ ac_cv_lib_socket_connect=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 @@ -11301,7 +15281,6 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -11320,11 +15299,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11336,7 +15325,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -11355,11 +15343,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11372,9 +15370,9 @@ ac_cv_member_struct_stat_st_blksize=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 @@ -11398,7 +15396,6 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -11419,11 +15416,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11436,7 +15443,7 @@ ac_cv_header_time=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6 @@ -11454,7 +15461,6 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -11473,11 +15479,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11490,7 +15506,7 @@ ac_cv_struct_tm=sys/time.h fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 echo "${ECHO_T}$ac_cv_struct_tm" >&6 @@ -11508,7 +15524,6 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -11530,11 +15545,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11546,7 +15571,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -11568,11 +15592,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11585,9 +15619,9 @@ ac_cv_member_struct_tm_tm_zone=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6 @@ -11613,7 +15647,6 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -11634,11 +15667,21 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11651,7 +15694,8 @@ ac_cv_var_tzname=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 echo "${ECHO_T}$ac_cv_var_tzname" >&6 @@ -11672,7 +15716,6 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -11691,11 +15734,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11708,7 +15761,7 @@ ac_cv_c_char_unsigned=yes fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 @@ -11725,7 +15778,6 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -11788,11 +15840,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11805,7 +15867,7 @@ ac_cv_c_const=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 @@ -11825,7 +15887,6 @@ ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -11840,11 +15901,21 @@ _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11856,23 +15927,27 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done fi echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$ac_cv_c_inline" >&6 + + case $ac_cv_c_inline in inline | yes) ;; - no) -cat >>confdefs.h <<\_ACEOF -#define inline -_ACEOF - ;; - *) cat >>confdefs.h <<_ACEOF -#define inline $ac_cv_c_inline + *) + 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 echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5 @@ -11881,7 +15956,6 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -11911,7 +15985,10 @@ fi - ac_config_files="$ac_config_files Makefile awklib/Makefile doc/Makefile intl/Makefile po/Makefile.in test/Makefile" + ac_config_headers="$ac_config_headers config.h:configh.in" + + ac_config_files="$ac_config_files Makefile awklib/Makefile doc/Makefile intl/Makefile po/Makefile.in test/Makefile version.c:version.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 @@ -11940,13 +16017,13 @@ # `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" + "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 \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | @@ -11976,13 +16053,13 @@ # 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[ ]*=/{ + ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; +s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; -s/^[^=]*=[ ]*$//; +s/^[^=]*=[ ]*$//; }' fi @@ -11993,7 +16070,7 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' @@ -12017,6 +16094,13 @@ 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 + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +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 : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files @@ -12051,9 +16135,10 @@ elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false @@ -12072,7 +16157,7 @@ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do - if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var @@ -12251,16 +16336,17 @@ if mkdir -p . 2>/dev/null; then as_mkdir_p=: else + test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +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="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS @@ -12286,8 +16372,8 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by GNU Awk $as_me 3.1.3, which was -generated by GNU Autoconf 2.57. Invocation command line was +This file was extended by GNU Awk $as_me 3.1.4, which was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -12331,9 +16417,9 @@ -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 + instantiate the configuration file FILE --header=FILE[:TEMPLATE] - instantiate the configuration header FILE + instantiate the configuration header FILE Configuration files: $config_files @@ -12349,12 +16435,11 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -GNU Awk config.status 3.1.3 -configured by $0, generated by GNU Autoconf 2.57, +GNU Awk config.status 3.1.4 +configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir @@ -12451,7 +16536,7 @@ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # Capture the value of obsolete ALL_LINGUAS because we need it to compute - # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. @@ -12473,6 +16558,7 @@ "intl/Makefile" ) CONFIG_FILES="$CONFIG_FILES intl/Makefile" ;; "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "test/Makefile" ) CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; + "version.c" ) CONFIG_FILES="$CONFIG_FILES version.c:version.in" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:configh.in" ;; @@ -12577,6 +16663,7 @@ s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t +s,@mkdir_p@,$mkdir_p,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t @@ -12620,6 +16707,10 @@ s,@host_os@,$host_os,;t t s,@ALLOCA@,$ALLOCA,;t t s,@GLIBC21@,$GLIBC21,;t t +s,@HAVE_POSIX_PRINTF@,$HAVE_POSIX_PRINTF,;t t +s,@HAVE_ASPRINTF@,$HAVE_ASPRINTF,;t t +s,@HAVE_SNPRINTF@,$HAVE_SNPRINTF,;t t +s,@HAVE_WPRINTF@,$HAVE_WPRINTF,;t t s,@LIBICONV@,$LIBICONV,;t t s,@LTLIBICONV@,$LTLIBICONV,;t t s,@INTLBISON@,$INTLBISON,;t t @@ -12667,9 +16758,9 @@ (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end @@ -12687,21 +16778,21 @@ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -12717,10 +16808,10 @@ as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -12758,12 +16849,45 @@ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be -# absolute. -ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` -ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` -ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` -ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac case $INSTALL in @@ -12785,7 +16909,7 @@ configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." + sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. @@ -12794,24 +16918,24 @@ case $f in -) echo $tmp/stdin ;; [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - echo $f;; + echo "$f";; *) # Relative - if test -f "$f"; then - # Build tree - echo $f - elif test -f "$srcdir/$f"; then - # Source tree - echo $srcdir/$f - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - fi;; + fi;; esac done` || { (exit 1); exit 1; } _ACEOF @@ -12853,12 +16977,12 @@ # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='[ ].*$,\1#\2' +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' @@ -12867,11 +16991,11 @@ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac @@ -12885,28 +17009,29 @@ case $f in -) echo $tmp/stdin ;; [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - echo $f;; + # Do quote $f, to prevent DOS paths from being IFS'd. + echo "$f";; *) # Relative - if test -f "$f"; then - # Build tree - echo $f - elif test -f "$srcdir/$f"; then - # Source tree - echo $srcdir/$f - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - fi;; + fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF @@ -12929,9 +17054,9 @@ s,[\\$`],\\&,g t clear : clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times @@ -12945,13 +17070,13 @@ # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail @@ -12960,7 +17085,7 @@ # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. - echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS @@ -12987,7 +17112,7 @@ # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' - echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS @@ -13021,10 +17146,10 @@ else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -13040,10 +17165,10 @@ as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -13075,10 +17200,10 @@ done echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X$ac_file : 'X\(//\)[^/]' \| \ - X$ac_file : 'X\(//\)$' \| \ - X$ac_file : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X$ac_file : 'X\(//\)[^/]' \| \ + X$ac_file : 'X\(//\)$' \| \ + X$ac_file : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -13101,16 +17226,41 @@ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_dest" : 'X\(//\)[^/]' \| \ - X"$ac_dest" : 'X\(//\)$' \| \ - X"$ac_dest" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. if test "$ac_dir" != .; then @@ -13136,12 +17286,45 @@ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be -# absolute. -ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` -ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` -ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` -ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 @@ -13159,10 +17342,10 @@ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -13175,14 +17358,14 @@ grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. - DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n -e '/^U = / s///p' < "$mf"` + U=`sed -n 's/^U = //p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # 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 -e ' + for file in `sed -n ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop @@ -13198,10 +17381,10 @@ test -f "$dirpart/$file" && continue fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -13217,10 +17400,10 @@ as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -13263,7 +17446,7 @@ 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, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend + # 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 @@ -13279,19 +17462,27 @@ # The set of available languages was given in configure.in. 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= - GMOFILES= UPDATEPOFILES= DUMMYPOFILES= + GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" - GMOFILES="$GMOFILES $srcdirpre$lang.gmo" 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. @@ -13326,7 +17517,7 @@ 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|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$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 @@ -13372,3 +17563,9 @@ $ac_cs_success || { (exit 1); exit 1; } fi + +# This is a significant and rather ugly hack. We want to keep +# version.c from being removed upon `make distclean'. +# We put the `$$' on the front for old systems with 14-char filenames. +sed '/CONFIG_CLEAN_FILES/s/version.c//' < Makefile > $$.Makefile +mv $$.Makefile Makefile diff -urN gawk-3.1.3/configure.ac gawk-3.1.4/configure.ac --- gawk-3.1.3/configure.ac 2003-07-04 20:26:33.000000000 +0300 +++ gawk-3.1.4/configure.ac 2004-08-02 12:09:52.000000000 +0300 @@ -1,7 +1,7 @@ dnl dnl configure.ac --- autoconf input file for gawk dnl -dnl Copyright (C) 1995-2003 the Free Software Foundation, Inc. +dnl Copyright (C) 1995-2004 the Free Software Foundation, Inc. dnl dnl This file is part of GAWK, the GNU implementation of the dnl AWK Programming Language. @@ -23,8 +23,7 @@ dnl Process this file with autoconf to produce a configure script. -dnl *** IMPORTANT ***: Fix version in both AC_INIT and AM_INIT_AUTOMAKE -AC_INIT([GNU Awk], 3.1.3, bug-gawk@gnu.org, gawk) +AC_INIT([GNU Awk], 3.1.4, bug-gawk@gnu.org, gawk) # This is a hack. Different versions of install on different systems # are just too different. Chuck it and use install-sh. @@ -40,9 +39,8 @@ export INSTALL fi -AC_PREREQ(2.57) -AC_CONFIG_HEADERS([config.h:configh.in], [cat $srcdir/custom.h >> config.h]) -AM_INIT_AUTOMAKE(gawk, 3.1.3) +AC_PREREQ(2.59) +AM_INIT_AUTOMAKE dnl Additional argument stuff AC_ARG_ENABLE(portals, [ --enable-portals Enable /p as path prefix for portals], @@ -93,6 +91,11 @@ then # add other debug flags as appropriate, save GAWKDEBUG for emergencies CFLAGS="$CFLAGS -DARRAYDEBUG" + if grep dbug $srcdir/.developing + then + CFLAGS="$CFLAGS -DDBUG" + LIBS="$LIBS dbug/libdbug.a" + fi # turn on compiler warnings if we're doing development if test "$GCC" = yes then @@ -136,7 +139,7 @@ dnl initialize GNU gettext AM_GNU_GETTEXT([no-libtool], [need-ngettext]) -AM_GNU_GETTEXT_VERSION(0.12.1) +AM_GNU_GETTEXT_VERSION(0.14.1) dnl checks for header files AC_HEADER_STDC @@ -174,9 +177,14 @@ ], AC_DEFINE(TIME_T_IN_SYS_TYPES_H, 1, [some systems define this type here])) +dnl check for wctype_t in +AC_TRY_COMPILE([#include ],[ + wctype_t foo; + foo = 0; +], + AC_DEFINE(HAVE_WCTYPE_T, 1, [systems should define this type here])) dnl checks for functions -AC_DEFINE(REGEX_MALLOC, 1, [use malloc instead of alloca in regex.c]) AC_FUNC_VPRINTF GAWK_AC_FUNC_STRTOD_C89 AC_FUNC_MKTIME @@ -186,9 +194,12 @@ esac AC_CHECK_LIB(m, fmod) -AC_CHECK_FUNCS(fmod getgrent getgroups grantpt mbrlen mbrtowc memcmp \ - memcpy memset setlocale snprintf strchr strerror \ - strftime strncasecmp strtod system tzset wcrtomb wcscoll) +AC_CHECK_FUNCS(fmod getgrent getgroups grantpt iswctype mbrlen \ + memcmp memcpy memmove memset setlocale snprintf strchr \ + strerror strftime strncasecmp strtod strtoul system tzset \ + wcrtomb wcscoll wcscoll wctype) +dnl this check for both mbrtowc and the mbstate_t type, which is good +AC_FUNC_MBRTOWC dnl check for dynamic linking dnl This is known to be very primitive @@ -221,6 +232,32 @@ ;; esac +dnl check for printf %F format +AC_MSG_CHECKING([for printf %F format]) +AC_RUN_IFELSE([ +#include + +int main() +{ + char buf[[100]]; + + sprintf(buf, "%F", 123.45); + + if (strcmp(buf, "123.450000") == 0) + return 0; + else + return 1; +} +], +dnl action if true: + AC_DEFINE(PRINTF_HAS_F_FORMAT, 1, [Define to 1 if *printf supports %F format]) + AC_MSG_RESULT([yes]), +dnl action if false: + AC_MSG_RESULT([no]), +dnl action if cross-compiling, assume the worst: + AC_DEFINE(PRINTF_HAS_F_FORMAT, 0, [Define to 1 if *printf supports %F format]) +) + dnl check for sockets GAWK_AC_LIB_SOCKETS @@ -236,9 +273,18 @@ AC_C_INLINE AC_C_STRINGIZE -AC_OUTPUT(Makefile \ +AC_CONFIG_HEADERS([config.h:configh.in], [cat $srcdir/custom.h >> config.h]) +AC_CONFIG_FILES(Makefile \ awklib/Makefile \ doc/Makefile \ intl/Makefile \ po/Makefile.in \ - test/Makefile) + test/Makefile \ + [version.c:version.in]) +AC_OUTPUT + +# This is a significant and rather ugly hack. We want to keep +# version.c from being removed upon `make distclean'. +# We put the `$$' on the front for old systems with 14-char filenames. +sed '/CONFIG_CLEAN_FILES/s/version.c//' < Makefile > $$.Makefile +mv $$.Makefile Makefile diff -urN gawk-3.1.3/custom.h gawk-3.1.4/custom.h --- gawk-3.1.3/custom.h 2003-06-09 18:45:53.000000000 +0300 +++ gawk-3.1.4/custom.h 2004-07-26 17:11:31.000000000 +0300 @@ -11,7 +11,7 @@ */ /* - * Copyright (C) 1995-2003 the Free Software Foundation, Inc. + * Copyright (C) 1995-2004 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. diff -urN gawk-3.1.3/depcomp gawk-3.1.4/depcomp --- gawk-3.1.3/depcomp 2003-03-06 11:11:51.000000000 +0200 +++ gawk-3.1.4/depcomp 2004-06-21 16:38:36.000000000 +0300 @@ -1,7 +1,9 @@ #! /bin/sh - # depcomp - compile a program generating dependencies as side-effects -# Copyright 1999, 2000 Free Software Foundation, Inc. + +scriptversion=2004-04-25.13 + +# Copyright (C) 1999, 2000, 2003, 2004 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 @@ -25,6 +27,36 @@ # 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'. + 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 0 + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit 0 + ;; +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 @@ -172,19 +204,25 @@ aix) # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. 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. - stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` + # 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. + stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" - outname="$stripped.o" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi - stat=$? + + if test -f "$tmpdepfile"; then : + else + stripped=`echo "$stripped" | sed 's,^.*/,,'` + tmpdepfile="$stripped.u" + fi + if test $stat -eq 0; then : else rm -f "$tmpdepfile" @@ -192,6 +230,7 @@ fi if test -f "$tmpdepfile"; then + outname="$stripped.o" # 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:'. @@ -207,11 +246,9 @@ ;; icc) - # Must come before tru64. - - # Intel's C compiler understands `-MD -MF file'. However + # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # will fill foo.d with something like + # 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: @@ -219,6 +256,12 @@ # 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=$? @@ -228,11 +271,15 @@ exit $stat fi rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h'. + # 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 -e "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - sed -e "s,^[^:]*: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + 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" ;; @@ -247,31 +294,37 @@ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then + # Dependencies are output in .lo.d with libtool 1.4. + # They are output in .o.d with libtool 1.5. tmpdepfile1="$dir.libs/$base.lo.d" - tmpdepfile2="$dir.libs/$base.d" + tmpdepfile2="$dir.libs/$base.o.d" + tmpdepfile3="$dir.libs/$base.d" "$@" -Wc,-MD else tmpdepfile1="$dir$base.o.d" tmpdepfile2="$dir$base.d" + tmpdepfile3="$dir$base.d" "$@" -MD fi stat=$? if test $stat -eq 0; then : else - rm -f "$tmpdepfile1" "$tmpdepfile2" + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" - else + elif test -f "$tmpdepfile2"; then tmpdepfile="$tmpdepfile2" + else + tmpdepfile="$tmpdepfile3" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a space and a tab in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$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 @@ -284,7 +337,7 @@ dashmstdout) # Important note: in order to support this mode, a compiler *must* - # always write the proprocessed file to stdout, regardless of -o. + # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. @@ -380,7 +433,7 @@ cpp) # Important note: in order to support this mode, a compiler *must* - # always write the proprocessed file to stdout. + # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. @@ -422,7 +475,7 @@ msvisualcpp) # Important note: in order to support this mode, a compiler *must* - # always write the proprocessed file to stdout, regardless of -o, + # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " @@ -462,3 +515,12 @@ 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-end: "$" +# End: diff -urN gawk-3.1.3/doc/ChangeLog gawk-3.1.4/doc/ChangeLog --- gawk-3.1.3/doc/ChangeLog 2003-07-07 21:02:06.000000000 +0300 +++ gawk-3.1.4/doc/ChangeLog 2004-08-02 12:18:45.000000000 +0300 @@ -1,3 +1,43 @@ +Mon Aug 2 12:18:15 2004 Arnold D. Robbins + + * Release 3.1.4: Release tar file made. + +Wed Jul 28 17:03:16 2004 Arnold D. Robbins + + * Makefile.am (TROFF): Add -U flag to invocation. Makes it + possible to format ref card from a build directory that isn't + the source directory. + (distclean): Removed target. Let automake handle it. + +Tue Jun 15 12:21:09 2004 Arnold D. Robbins + + * texinfo.tex: Updated to version 2004-06-14.14. + * gawk.texi (Dynamic Extensions): Text revised to follow + current implementation: new APIs, info on `n->param_cnt' + fixed. + + Also in all index entries where comma does not separate + primary, secondary or tertiary terms, replaced the comma + with @comma{} and removed the corresponding comments. + +Mon May 31 09:11:01 2004 Arnold D. Robbins + + * ad.block, awkcard.in, cardfonts, colors, no.colors: Change + old email address to current one. + +Mon May 3 09:54:46 2004 Arnold D. Robbins + + * texinfo.tex: Updated to version from Automake 1.8.4. + +Mon Mar 22 10:53:13 2004 Arnold D. Robbins + + * texinfo.tex: Updated. + +Tue Jan 6 17:38:40 2004 Arnold D. Robbins + + * texinfo.tex: Updated. + * gawk.texi: All @strong{Note:} changed to `@quotation NOTE'. + Mon Jul 7 11:01:43 2003 Arnold D. Robbins * Release 3.1.3: Release tar file made. diff -urN gawk-3.1.3/doc/Makefile.am gawk-3.1.4/doc/Makefile.am --- gawk-3.1.3/doc/Makefile.am 2003-05-11 16:08:52.000000000 +0300 +++ gawk-3.1.4/doc/Makefile.am 2004-07-28 18:21:55.000000000 +0300 @@ -1,7 +1,7 @@ # # doc/Makefile.am --- automake input file for gawk # -# Copyright (C) 2000, 2001, 2002 the Free Software Foundation, Inc. +# Copyright (C) 2000, 2001, 2002, 2004 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. @@ -33,9 +33,9 @@ lflashlight.eps rflashlight.eps \ statist.jpg statist.eps -MAKEINFO = @MAKEINFO@ --no-split +MAKEINFO = @MAKEINFO@ --no-split --force -TROFF = groff -t -Tps +TROFF = groff -t -Tps -U SEDME = sed -e "s/^level0 restore/level0 restore flashme 100 72 moveto (Copyright `date '+%m-%d-%y %T'`, FSF, Inc. (all)) show/" \ -e "s/^\/level0 save def/\/level0 save def 30 -48 translate/" @@ -101,5 +101,3 @@ clean: rm -f *.ps *~ awkcard.nc awkcard.tr *.html - -distclean: clean diff -urN gawk-3.1.3/doc/Makefile.in gawk-3.1.4/doc/Makefile.in --- gawk-3.1.3/doc/Makefile.in 2003-07-04 20:50:33.000000000 +0300 +++ gawk-3.1.4/doc/Makefile.in 2004-08-02 12:16:31.000000000 +0300 @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.7.5 from Makefile.am. +# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004 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. @@ -17,7 +17,7 @@ # # doc/Makefile.am --- automake input file for gawk # -# Copyright (C) 2000, 2001, 2002 the Free Software Foundation, Inc. +# Copyright (C) 2000, 2001, 2002, 2004 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. @@ -36,7 +36,6 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # - srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -44,7 +43,6 @@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. - am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 @@ -59,6 +57,51 @@ PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ +subdir = doc +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog \ + texinfo.tex +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ + $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ + $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ + $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/size_max.m4 \ + $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/stdint_h.m4 \ + $(top_srcdir)/m4/strtod.m4 $(top_srcdir)/m4/uintmax_t.m4 \ + $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/wchar_t.m4 \ + $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +INFO_DEPS = $(srcdir)/gawk.info $(srcdir)/gawkinet.info +am__TEXINFO_TEX_DIR = $(srcdir) +DVIS = gawk.dvi gawkinet.dvi +PDFS = gawk.pdf gawkinet.pdf +PSS = gawk.ps gawkinet.ps +HTMLS = gawk.html gawkinet.html +TEXINFOS = gawk.texi gawkinet.texi +TEXI2DVI = texi2dvi +TEXI2PDF = $(TEXI2DVI) --pdf --batch +MAKEINFOHTML = $(MAKEINFO) --html +AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) +DVIPS = dvips +am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" +man1dir = $(mandir)/man1 +NROFF = nroff +MANS = $(man_MANS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ @@ -87,6 +130,10 @@ GENCAT = @GENCAT@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ +HAVE_ASPRINTF = @HAVE_ASPRINTF@ +HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ +HAVE_SNPRINTF = @HAVE_SNPRINTF@ +HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -105,8 +152,7 @@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ - -MAKEINFO = @MAKEINFO@ --no-split +MAKEINFO = @MAKEINFO@ --no-split --force MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ @@ -158,6 +204,7 @@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ +mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ @@ -165,23 +212,18 @@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ - info_TEXINFOS = gawk.texi gawkinet.texi - man_MANS = gawk.1 igawk.1 - EXTRA_DIST = ChangeLog README.card ad.block setter.outline \ awkcard.in awkforai.txt texinfo.tex cardfonts \ macros colors no.colors $(man_MANS) \ lflashlight.eps rflashlight.eps \ statist.jpg statist.eps - -TROFF = groff -t -Tps +TROFF = groff -t -Tps -U SEDME = sed -e "s/^level0 restore/level0 restore flashme 100 72 moveto (Copyright `date '+%m-%d-%y %T'`, FSF, Inc. (all)) show/" \ -e "s/^\/level0 save def/\/level0 save def 30 -48 translate/" - CARDSRC = $(srcdir)/macros $(srcdir)/cardfonts $(srcdir)/colors awkcard.tr CARDSRC_N = $(srcdir)/macros $(srcdir)/cardfonts $(srcdir)/no.colors awkcard.tr CARDFILES = $(CARDSRC) ad.block awkcard.in setter.outline @@ -200,68 +242,98 @@ # We want hard links for install-data-hook, below LN = ln -subdir = doc -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -DIST_SOURCES = -am__TEXINFO_TEX_DIR = $(srcdir) -INFO_DEPS = gawk.info gawkinet.info -DVIS = gawk.dvi gawkinet.dvi -PDFS = gawk.pdf gawkinet.pdf -PSS = gawk.ps gawkinet.ps -TEXINFOS = gawk.texi gawkinet.texi - -NROFF = nroff -MANS = $(man_MANS) -DIST_COMMON = ChangeLog Makefile.am Makefile.in texinfo.tex all: all-am .SUFFIXES: -.SUFFIXES: .dvi .info .pdf .ps .texi -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) +.SUFFIXES: .dvi .html .info .pdf .ps .texi +$(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 \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) +.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 .texi.info: - @rm -f $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9] - $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ - -o $@ `test -f '$<' || echo '$(srcdir)/'`$< + restore=: && \ + backupdir="$(am__leading_dot)am$$$$" && \ + am__cwd=`pwd` && cd $(srcdir) && \ + rm -rf $$backupdir && mkdir $$backupdir && \ + 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; \ + fi; \ + done; \ + cd "$$am__cwd"; \ + if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $@ $<; \ + then \ + rc=0; \ + cd $(srcdir); \ + else \ + rc=$$?; \ + 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) `test -f '$<' || echo '$(srcdir)/'`$< + $(TEXI2DVI) $< .texi.pdf: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ - $(TEXI2PDF) `test -f '$<' || echo '$(srcdir)/'`$< -gawk.info: gawk.texi + $(TEXI2PDF) $< + +.texi.html: + $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $@ $< + if test ! -d $@ && test -d $(@:.html=); then \ + mv $(@:.html=) $@; else :; fi +$(srcdir)/gawk.info: gawk.texi gawk.dvi: gawk.texi gawk.pdf: gawk.texi -gawkinet.info: gawkinet.texi +$(srcdir)/gawkinet.info: gawkinet.texi gawkinet.dvi: gawkinet.texi gawkinet.pdf: gawkinet.texi -TEXI2DVI = texi2dvi - -TEXI2PDF = $(TEXI2DVI) --pdf --batch -DVIPS = dvips .dvi.ps: $(DVIPS) -o $@ $< uninstall-info-am: $(PRE_UNINSTALL) @if (install-info --version && \ - install-info --version | grep -i -v debian) >/dev/null 2>&1; then \ + 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"; \ - install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile; \ + echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ + install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ done; \ else :; fi @$(NORMAL_UNINSTALL) @@ -269,15 +341,19 @@ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ - (if cd $(DESTDIR)$(infodir); then \ + (if cd "$(DESTDIR)$(infodir)"; then \ echo " 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 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; \ for file in $$d/$$base*; do \ relfile=`expr "$$file" : "$$d/\(.*\)"`; \ @@ -287,13 +363,13 @@ done mostlyclean-aminfo: - -rm -f gawk.aux gawk.cp gawk.cps gawk.fn gawk.ky gawk.kys gawk.log gawk.pg \ + -rm -rf gawk.aux gawk.cp gawk.cps gawk.fn gawk.ky gawk.kys gawk.log gawk.pg \ gawk.pgs gawk.tmp gawk.toc gawk.tp gawk.tps gawk.vr gawk.dvi \ - gawk.pdf gawk.ps gawkinet.aux gawkinet.cp gawkinet.cps \ - gawkinet.fn gawkinet.ky gawkinet.kys gawkinet.log gawkinet.pg \ - gawkinet.pgs gawkinet.tmp gawkinet.toc gawkinet.tp \ - gawkinet.tps gawkinet.vr gawkinet.dvi gawkinet.pdf \ - gawkinet.ps + gawk.pdf gawk.ps gawk.html gawkinet.aux gawkinet.cp \ + gawkinet.cps gawkinet.fn gawkinet.ky gawkinet.kys \ + gawkinet.log gawkinet.pg gawkinet.pgs gawkinet.tmp \ + gawkinet.toc gawkinet.tp gawkinet.tps gawkinet.vr \ + gawkinet.dvi gawkinet.pdf gawkinet.ps gawkinet.html maintainer-clean-aminfo: @list='$(INFO_DEPS)'; for i in $$list; do \ @@ -301,11 +377,9 @@ 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 - -man1dir = $(mandir)/man1 install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(man1dir) + test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ @@ -324,8 +398,8 @@ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ - $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @@ -345,8 +419,8 @@ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ - rm -f $(DESTDIR)$(man1dir)/$$inst; \ + echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ + rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ done tags: TAGS TAGS: @@ -354,10 +428,6 @@ ctags: CTAGS CTAGS: -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = .. -distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @@ -371,7 +441,7 @@ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ - $(mkinstalldirs) "$(distdir)$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ @@ -392,9 +462,10 @@ check-am: all-am check: check-am all-am: Makefile $(INFO_DEPS) $(MANS) - installdirs: - $(mkinstalldirs) $(DESTDIR)$(infodir) $(DESTDIR)$(man1dir) + for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -406,7 +477,7 @@ installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - INSTALL_STRIP_FLAG=-s \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: @@ -414,23 +485,23 @@ clean-generic: distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f $(CONFIG_CLEAN_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 mostlyclean-am distclean: distclean-am - + -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: $(DVIS) +html-am: $(HTMLS) + info: info-am info-am: $(INFO_DEPS) @@ -445,28 +516,32 @@ install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(infodir) - @list='$(INFO_DEPS)'; \ + test -z "$(infodir)" || $(mkdir_p) "$(DESTDIR)$(infodir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + list='$(INFO_DEPS)'; \ 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 \ relfile=`echo "$$ifile" | sed 's|^.*/||'`; \ - echo " $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile"; \ - $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile; \ + echo " $(INSTALL_DATA) '$$ifile' '$(DESTDIR)$(infodir)/$$relfile'"; \ + $(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \ else : ; fi; \ done; \ done @$(POST_INSTALL) @if (install-info --version && \ - install-info --version | grep -i -v debian) >/dev/null 2>&1; then \ + 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) $(DESTDIR)$(infodir)/$$relfile";\ - install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$relfile || :;\ + 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-man1 @@ -474,7 +549,7 @@ installcheck-am: maintainer-clean: maintainer-clean-am - + -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-aminfo \ maintainer-clean-generic @@ -497,14 +572,15 @@ uninstall-man: uninstall-man1 .PHONY: all all-am check check-am clean clean-generic dist-info \ - distclean distclean-generic distdir dvi dvi-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-man1 install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-aminfo \ - maintainer-clean-generic mostlyclean mostlyclean-aminfo \ - mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am uninstall-man uninstall-man1 + distclean distclean-generic distdir dvi dvi-am html html-am \ + info info-am install install-am install-data install-data-am \ + install-exec install-exec-am install-info install-info-am \ + install-man install-man1 install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-aminfo maintainer-clean-generic mostlyclean \ + mostlyclean-aminfo mostlyclean-generic pdf pdf-am ps ps-am \ + uninstall uninstall-am uninstall-info-am uninstall-man \ + uninstall-man1 # Link gawk.1 to pgawk.1 @@ -550,8 +626,6 @@ clean: rm -f *.ps *~ awkcard.nc awkcard.tr *.html - -distclean: clean # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -urN gawk-3.1.3/doc/ad.block gawk-3.1.4/doc/ad.block --- gawk-3.1.3/doc/ad.block 2003-02-04 15:14:19.000000000 +0200 +++ gawk-3.1.4/doc/ad.block 2004-05-31 16:10:11.000000000 +0300 @@ -1,4 +1,4 @@ -.\" AWK Reference Card --- Arnold Robbins, arnold@gnu.org +.\" AWK Reference Card --- Arnold Robbins, arnold@skeeve.com .\" This file is the Ad block (included in cover) .\" .\" Copyright (C) 1996, 1998, 2000, 2001, 2003 Free Software Foundation, Inc. diff -urN gawk-3.1.3/doc/awkcard.in gawk-3.1.4/doc/awkcard.in --- gawk-3.1.3/doc/awkcard.in 2003-07-06 23:01:15.000000000 +0300 +++ gawk-3.1.4/doc/awkcard.in 2004-05-31 16:10:16.000000000 +0300 @@ -1,6 +1,6 @@ -.\" AWK Reference Card --- Arnold Robbins, arnold@gnu.org +.\" AWK Reference Card --- Arnold Robbins, arnold@skeeve.com .\" -.\" Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +.\" Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. .\" .\" Permission is granted to make and distribute verbatim copies of .\" this reference card provided the copyright notice and this permission @@ -99,7 +99,7 @@ \*(CD .SL .nf -\*(FRCopyright \(co 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +\*(FRCopyright \(co 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. .nf .BT @@ -1894,7 +1894,7 @@ .ES .nf \*(CDHost: \*(FCftp.gnu.org\*(FR -File: \*(FC/gnu/gawk/gawk-3.1.3.tar.gz\fP +File: \*(FC/gnu/gawk/gawk-3.1.4.tar.gz\fP .in +.2i .fi GNU \*(AK (\*(GK). There may be a later version. @@ -1921,7 +1921,8 @@ .\" --- Copying Permissions .ES .fi -\*(CDCopyright \(co 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +\*(CDCopyright \(co 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +Free Software Foundation, Inc. .sp .5 Permission is granted to make and distribute verbatim copies of this reference card provided the copyright notice and this permission notice diff -urN gawk-3.1.3/doc/cardfonts gawk-3.1.4/doc/cardfonts --- gawk-3.1.3/doc/cardfonts 2000-09-13 15:37:44.000000000 +0300 +++ gawk-3.1.4/doc/cardfonts 2004-05-31 16:10:19.000000000 +0300 @@ -1,4 +1,4 @@ -.\" AWK Reference Card --- Arnold Robbins, arnold@gnu.org +.\" AWK Reference Card --- Arnold Robbins, arnold@skeeve.com .\" cardfonts --- this file sets the fonts to use for the reference card .\" .\" Copyright (C) 1996 Free Software Foundation, Inc. diff -urN gawk-3.1.3/doc/colors gawk-3.1.4/doc/colors --- gawk-3.1.3/doc/colors 1999-06-27 14:45:04.000000000 +0300 +++ gawk-3.1.4/doc/colors 2004-05-31 16:10:22.000000000 +0300 @@ -1,4 +1,4 @@ -.\" AWK Reference Card --- Arnold Robbins, arnold@gnu.org +.\" AWK Reference Card --- Arnold Robbins, arnold@skeeve.com .\" This file sets the colors to use. .\" .\" Copyright (C) 1996,97,99 Free Software Foundation, Inc. diff -urN gawk-3.1.3/doc/gawk.1 gawk-3.1.4/doc/gawk.1 --- gawk-3.1.3/doc/gawk.1 2003-07-06 23:01:23.000000000 +0300 +++ gawk-3.1.4/doc/gawk.1 2004-07-28 16:36:56.000000000 +0300 @@ -14,7 +14,7 @@ . if \w'\(rq' .ds rq "\(rq . \} .\} -.TH GAWK 1 "June 25 2003" "Free Software Foundation" "Utility Commands" +.TH GAWK 1 "July 28 2004" "Free Software Foundation" "Utility Commands" .SH NAME gawk \- pattern scanning and processing language .SH SYNOPSIS @@ -835,6 +835,15 @@ operations are normally case-sensitive. Under Unix, the full ISO 8859-1 Latin-1 character set is used when ignoring case. +As of +.I gawk +3.1.4, the case equivalencies are fully locale-aware, based on +the C +.B +facilities such as +.BR isalpha() , +and +.BR tolupper() . .TP .B LINT Provides dynamic control of the @@ -912,6 +921,12 @@ the value of the .IR getuid (2) system call. +.TP +\fBPROCINFO["version"]\fP +The version of +.IR gawk . +This is available from +version 3.1.4 and later. .RE .TP .B RS @@ -1678,7 +1693,6 @@ \fBdo \fIstatement \fBwhile (\fIcondition\fB)\fR \fBfor (\fIexpr1\fB; \fIexpr2\fB; \fIexpr3\fB) \fIstatement\fR \fBfor (\fIvar \fBin\fI array\fB) \fIstatement\fR -.\" \fBswitch (\fIexpression\fB) { \fBcase [\fIvalue\fB|\fIregex\fB] : \fIstatement \fBdefault: \fIstatement \fB}\fR \fBbreak\fR \fBcontinue\fR \fBdelete \fIarray\^\fB[\^\fIindex\^\fB]\fR @@ -3258,6 +3272,25 @@ maintainers, and may not even be compiled into .IR gawk . .. +.PP +If +.I gawk +is +.I configured +with the +.B \-\^\-enable\-switch +option to the +.I configure +command, then it accepts an additional control-flow statement: +.RS +.nf +\fBswitch (\fIexpression\fB) { +\fBcase \fIvalue\fB|\fIregex\fB : \fIstatement +\&.\^.\^. +\fR[ \fBdefault: \fIstatement \fR] +\fB}\fR +.fi +.RE .SH ENVIRONMENT VARIABLES The .B AWKPATH @@ -3339,7 +3372,7 @@ .SH VERSION INFORMATION This man page documents .IR gawk , -version 3.1.3. +version 3.1.4. .SH BUG REPORTS If you find a bug in .IR gawk , @@ -3370,13 +3403,20 @@ developers occasionally read this newsgroup, posting bug reports there is an unreliable way to report bugs. Instead, please use the electronic mail addresses given above. +.PP +If you're using a GNU/Linux system or BSD-based system, +you may wish to submit a bug report to the vendor of your distribution. +That's fine, but please send a copy to the official email address as well, +since there's no guarantee that the bug will be forwarded to the +.I gawk +maintainer. .SH ACKNOWLEDGEMENTS Brian Kernighan of Bell Laboratories provided valuable assistance during testing and debugging. We thank him. .SH COPYING PERMISSIONS Copyright \(co 1989, 1991, 1992, 1993, 1994, 1995, 1996, -1997, 1998, 1999, 2001, 2002, 2003 Free Software Foundation, Inc. +1997, 1998, 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. .PP Permission is granted to make and distribute verbatim copies of this manual page provided the copyright notice and this permission diff -urN gawk-3.1.3/doc/gawk.texi gawk-3.1.4/doc/gawk.texi --- gawk-3.1.3/doc/gawk.texi 2003-07-04 20:40:47.000000000 +0300 +++ gawk-3.1.4/doc/gawk.texi 2004-06-21 17:09:14.000000000 +0300 @@ -20,9 +20,9 @@ @c applies to and all the info about who's publishing this edition @c These apply across the board. -@set UPDATE-MONTH June, 2003 +@set UPDATE-MONTH June, 2004 @set VERSION 3.1 -@set PATCHLEVEL 3 +@set PATCHLEVEL 4 @set FSF @@ -54,14 +54,14 @@ @set SUBSECTION subsection @set DARKCORNER (d.c.) @end ifhtml -@ifxml +@ifdocbook @set DOCUMENT book @set CHAPTER chapter @set APPENDIX appendix @set SECTION section @set SUBSECTION subsection @set DARKCORNER (d.c.) -@end ifxml +@end ifdocbook @c some special symbols @iftex @@ -1349,7 +1349,7 @@ see @uref{ftp://ftp.freefriends.org/arnold/Awkstuff}. If you have written an interesting @command{awk} program, or have written a @command{gawk} extension that you would like to -share with the rest of the world, please contact me (@email{arnold@@gnu.org}). +share with the rest of the world, please contact me (@email{arnold@@skeeve.com}). Making things available on the Internet helps keep the @command{gawk} distribution down to manageable size. @@ -1559,8 +1559,7 @@ the end of the input files. @cindex @command{awk}, uses for -@c comma here is NOT for secondary -@cindex programming languages, data-driven vs. procedural +@cindex programming languages@comma{} data-driven vs. procedural @cindex @command{awk} programs Programs in @command{awk} are different from programs in most other languages, because @command{awk} programs are @dfn{data-driven}; that is, you describe @@ -2097,6 +2096,27 @@ This option is also painful, because double quotes, backslashes, and dollar signs are very common in @command{awk} programs. +A third option is to use the octal escape sequence equivalents for the +single- and double-quote characters, like so: + +@example +$ awk 'BEGIN @{ print "Here is a single quote <\47>" @}' +@print{} Here is a single quote <'> +$ awk 'BEGIN @{ print "Here is a double quote <\42>" @}' +@print{} Here is a double quote <"> +@end example + +@noindent +This works nicely, except that you should comment clearly what the +escapes mean. + +A fourth option is to use command-line variable assignment, like this: + +@example +$ awk -v sq="'" 'BEGIN @{ print "Here is a single quote <" sq ">" @}' +@print{} Here is a single quote <'> +@end example + If you really need both single and double quotes in your @command{awk} program, it is probably best to move it into a separate file, where the shell won't be part of the picture, and you can say what you mean. @@ -2622,11 +2642,12 @@ /12/ @{ print $0 @} ; /21/ @{ print $0 @} @end example -@noindent -@strong{Note:} The requirement that states that rules on the same line must be +@quotation NOTE +The requirement that states that rules on the same line must be separated with a semicolon was not in the original @command{awk} language; it was added for consistency with the treatment of statements within an action. +@end quotation @node Other Features @section Other Features of @command{awk} @@ -2670,8 +2691,12 @@ Complex programs have been written in @command{awk}, including a complete retargetable assembler for eight-bit microprocessors (@pxref{Glossary}, for more information), and a microcode assembler for a special-purpose Prolog -computer. However, @command{awk}'s capabilities are strained by tasks of -such complexity. +computer. More recently, @command{gawk} was used for writing a Wiki +clone.@footnote{@uref{http://www.awk-scripting.de/cgi/wiki.cgi/yawk/, Yet Another Wiki Clone}.} +While the original @command{awk}'s capabilities were strained by tasks +of such complexity, modern versions are more capable. Even the Bell +Labs version of @command{awk} has fewer predefined limits, and those +that it has are much larger than they used to be. @cindex @command{awk} programs, complex If you find yourself writing @command{awk} scripts of more than, say, a few @@ -3096,8 +3121,7 @@ matches any three-character sequence that begins with @samp{U} and ends with @samp{A}. -@c comma before using does NOT do tertiary -@cindex POSIX @command{awk}, period (@code{.}), using +@cindex POSIX @command{awk}, period (@code{.})@comma{} using In strict POSIX mode (@pxref{Options}), @samp{.} does not match the @sc{nul} character, which is a character with all bits equal to zero. @@ -3312,56 +3336,14 @@ A character class is only valid in a regexp @emph{inside} the brackets of a character list. Character classes consist of @samp{[:}, -a keyword denoting the class, and @samp{:]}. Here are the character -classes defined by the POSIX standard. - -@c the regular table is commented out while trying out the multitable. -@c leave it here in case we need to go back, but make sure the text -@c still corresponds! - -@ignore -@table @code -@item [:alnum:] -Alphanumeric characters. - -@item [:alpha:] -Alphabetic characters. - -@item [:blank:] -Space and TAB characters. - -@item [:cntrl:] -Control characters. - -@item [:digit:] -Numeric characters. - -@item [:graph:] -Characters that are printable and visible. -(A space is printable but not visible, whereas an @samp{a} is both.) - -@item [:lower:] -Lowercase alphabetic characters. - -@item [:print:] -Printable characters (characters that are not control characters). - -@item [:punct:] -Punctuation characters (characters that are not letters, digits, -control characters, or space characters). - -@item [:space:] -Space characters (such as space, TAB, and formfeed, to name a few). - -@item [:upper:] -Uppercase alphabetic characters. - -@item [:xdigit:] -Characters that are hexadecimal digits. -@end table -@end ignore - -@multitable {@code{[:xdigit:]}} {Characters that are both printable and visible. (A space is} +a keyword denoting the class, and @samp{:]}. +@ref{table-char-classes} lists the character classes defined by the +POSIX standard. + +@float Table,table-char-classes +@caption{POSIX Character Classes} +@multitable @columnfractions .15 .85 +@headitem Class @tab Meaning @item @code{[:alnum:]} @tab Alphanumeric characters. @item @code{[:alpha:]} @tab Alphabetic characters. @item @code{[:blank:]} @tab Space and TAB characters. @@ -3377,6 +3359,7 @@ @item @code{[:upper:]} @tab Uppercase alphabetic characters. @item @code{[:xdigit:]} @tab Characters that are hexadecimal digits. @end multitable +@end float For example, before the POSIX standard, you had to write @code{/[A-Za-z0-9]/} to match alphanumeric characters. If your @@ -3483,8 +3466,7 @@ @c @cindex operators, @code{\y} (@command{gawk}) @cindex backslash (@code{\}), @code{\y} operator (@command{gawk}) @cindex @code{\} (backslash), @code{\y} operator (@command{gawk}) -@c comma before using does NOT do secondary -@cindex word boundaries, matching +@cindex word boundaries@comma{} matching @item \y Matches the empty string at either the beginning or the end of a word (i.e., the word boundar@strong{y}). For example, @samp{\yballs?\y} @@ -3681,6 +3663,10 @@ ASCII characters, which also provides a number of characters suitable for use with European languages. +As of @command{gawk} 3.1.4, the case equivalencies are fully +locale-aware. They are based on the C @code{} facilities, +such as @code{isalpha()} and @code{toupper()}. + The value of @code{IGNORECASE} has no effect if @command{gawk} is in compatibility mode (@pxref{Options}). Case is always significant in compatibility mode. @@ -3755,8 +3741,6 @@ This sets @code{digits_regexp} to a regexp that describes one or more digits, and tests whether the input record matches this regexp. -@c @strong{Caution:} -When using the @samp{~} and @samp{!~} @strong{Caution:} When using the @samp{~} and @samp{!~} operators, there is a difference between a regexp constant enclosed in slashes and a string constant enclosed in double quotes. @@ -4225,8 +4209,7 @@ @cindex field operator @code{$} @cindex @code{$} (dollar sign), @code{$} field operator @cindex dollar sign (@code{$}), @code{$} field operator -@c The comma here does NOT mark a secondary term: -@cindex field operators, dollar sign as +@cindex field operators@comma{} dollar sign as A dollar-sign (@samp{$}) is used to refer to a field in an @command{awk} program, followed by the number of the field you want. Thus, @code{$1} @@ -4495,8 +4478,7 @@ @print{} a b c @end example -@c the comma before decrementing does NOT represent a tertiary entry -@cindex portability, @code{NF} variable, decrementing +@cindex portability, @code{NF} variable@comma{} decrementing @strong{Caution:} Some versions of @command{awk} don't rebuild @code{$0} when @code{NF} is decremented. Caveat emptor. @@ -4753,8 +4735,7 @@ @cindex options, command-line @cindex command line, options @cindex field separators, on command line -@c The comma before "setting" does NOT represent a tertiary -@cindex command line, @code{FS} on, setting +@cindex command line, @code{FS} on@comma{} setting @cindex @code{FS} variable, setting from command line @code{FS} can be set on the command line. Use the @option{-F} option to @@ -4844,8 +4825,7 @@ originally intended. This demonstrates why you have to be careful in choosing your field and record separators. -@c The comma after "password files" does NOT start a tertiary -@cindex Unix @command{awk}, password files, field separators and +@cindex Unix @command{awk}, password files@comma{} field separators and Perhaps the most common use of a single character as the field separator occurs when processing the Unix system password file. On many Unix systems, each user has a separate entry in the system password @@ -4977,9 +4957,11 @@ @section Reading Fixed-Width Data @ifnotinfo -@strong{Note:} This @value{SECTION} discusses an advanced +@quotation NOTE +This @value{SECTION} discusses an advanced feature of @command{gawk}. If you are a novice @command{awk} user, you might want to skip it on the first reading. +@end quotation @end ifnotinfo @ifinfo @@ -5005,8 +4987,7 @@ (@pxref{String Functions}), this is awkward and inefficient for a large number of fields. -@c comma before specifying is part of tertiary -@cindex troubleshooting, fatal errors, field widths, specifying +@cindex troubleshooting, fatal errors, field widths@comma{} specifying @cindex @command{w} utility @cindex @code{FIELDWIDTHS} variable The splitting of an input record into fixed-width fields is specified by @@ -5038,9 +5019,10 @@ number of seconds, and prints out the first two fields and the calculated idle time: -@strong{Note:} +@quotation NOTE This program uses a number of @command{awk} features that haven't been introduced yet. +@end quotation @example BEGIN @{ FIELDWIDTHS = "9 6 10 6 7 7 35" @} @@ -5381,18 +5363,19 @@ This form of the @code{getline} command sets @code{NF}, @code{NR}, @code{FNR}, and the value of @code{$0}. -@strong{Note:} The new value of @code{$0} is used to test +@quotation NOTE +The new value of @code{$0} is used to test the patterns of any subsequent rules. The original value of @code{$0} that triggered the rule that executed @code{getline} is lost. By contrast, the @code{next} statement reads a new record but immediately begins processing it normally, starting with the first rule in the program. @xref{Next Statement}. +@end quotation @node Getline/Variable @subsection Using @code{getline} into a Variable -@c comma before using is NOT for tertiary -@cindex variables, @code{getline} command into, using +@cindex variables, @code{getline} command into@comma{} using You can use @samp{getline @var{var}} to read the next record from @command{awk}'s input into the variable @var{var}. No other processing is @@ -5482,8 +5465,7 @@ @node Getline/Variable/File @subsection Using @code{getline} into a Variable from a File -@c comma before using is NOT for tertiary -@cindex variables, @code{getline} command into, using +@cindex variables, @code{getline} command into@comma{} using Use @samp{getline @var{var} < @var{file}} to read input from the file @@ -5611,8 +5593,7 @@ @node Getline/Variable/Pipe @subsection Using @code{getline} into a Variable from a Pipe -@c comma before using is NOT for tertiary -@cindex variables, @code{getline} command into, using +@cindex variables, @code{getline} command into@comma{} using When you use @samp{@var{command} | getline @var{var}}, the output of @var{command} is sent through a pipe to @@ -5645,8 +5626,7 @@ @node Getline/Coprocess @subsection Using @code{getline} from a Coprocess @cindex coprocesses, @code{getline} from -@c comma before using is NOT for tertiary -@cindex @code{getline} command, coprocesses, using from +@cindex @code{getline} command, coprocesses@comma{} using from @cindex @code{|} (vertical bar), @code{|&} operator (I/O) @cindex vertical bar (@code{|}), @code{|&} operator (I/O) @cindex operators, input/output @@ -5686,8 +5666,7 @@ @node Getline/Variable/Coprocess @subsection Using @code{getline} into a Variable from a Coprocess -@c comma before using is NOT for tertiary -@cindex variables, @code{getline} command into, using +@cindex variables, @code{getline} command into@comma{} using When you use @samp{@var{command} |& getline @var{var}}, the output from the coprocess @var{command} is sent through a two-way pipe to @code{getline} @@ -5727,8 +5706,7 @@ system permits. @cindex side effects, @code{FILENAME} variable -@c The comma before "setting with" does NOT represent a tertiary -@cindex @code{FILENAME} variable, @code{getline}, setting with +@cindex @code{FILENAME} variable, @code{getline}@comma{} setting with @cindex dark corner, @code{FILENAME} variable @cindex @code{getline} command, @code{FILENAME} variable and @cindex @code{BEGIN} pattern, @code{getline} and @@ -5758,28 +5736,24 @@ @subsection Summary of @code{getline} Variants @cindex @code{getline} command, variants -The following table summarizes the eight variants of @code{getline}, +@ref{table-getline-variants} +summarizes the eight variants of @code{getline}, listing which built-in variables are set by each one. -@multitable {@var{command} @code{|& getline} @var{var}} {1234567890123456789012345678901234567890} +@float Table,table-getline-variants +@caption{getline Variants and What They Set} +@multitable @columnfractions .35 .65 +@headitem Variant @tab Effect @item @code{getline} @tab Sets @code{$0}, @code{NF}, @code{FNR}, and @code{NR} - @item @code{getline} @var{var} @tab Sets @var{var}, @code{FNR}, and @code{NR} - @item @code{getline <} @var{file} @tab Sets @code{$0} and @code{NF} - @item @code{getline @var{var} < @var{file}} @tab Sets @var{var} - @item @var{command} @code{| getline} @tab Sets @code{$0} and @code{NF} - @item @var{command} @code{| getline} @var{var} @tab Sets @var{var} - -@item @var{command} @code{|& getline} @tab Sets @code{$0} and @code{NF}. -This is a @command{gawk} extension - -@item @var{command} @code{|& getline} @var{var} @tab Sets @var{var}. -This is a @command{gawk} extension +@item @var{command} @code{|& getline} @tab Sets @code{$0} and @code{NF}. This is a @command{gawk} extension +@item @var{command} @code{|& getline} @var{var} @tab Sets @var{var}. This is a @command{gawk} extension @end multitable +@end float @c ENDOFRANGE getl @c ENDOFRANGE inex @c ENDOFRANGE infir @@ -5893,8 +5867,7 @@ @end example @cindex @code{print} statement, commas, omitting -@c comma does NOT start tertiary -@cindex troubleshooting, @code{print} statement, omitting commas +@cindex troubleshooting, @code{print} statement@comma{} omitting commas A common mistake in using the @code{print} statement is to omit the comma between two items. This often has the effect of making the items run together in the output, with no space. The reason for this is that @@ -5909,8 +5882,7 @@ @dots{} @end example -@c comma does NOT start tertiary -@cindex @code{BEGIN} pattern, headings, adding +@cindex @code{BEGIN} pattern, headings@comma{} adding To someone unfamiliar with the @file{inventory-shipped} file, neither example's output makes much sense. A heading line at the beginning would make it clearer. Let's add some headings to our table of months @@ -5950,8 +5922,7 @@ @end group @end example -@c comma does NOT start tertiary -@cindex @code{printf} statement, columns, aligning +@cindex @code{printf} statement, columns@comma{} aligning @cindex columns, aligning Lining up columns this way can get pretty complicated when there are many columns to fix. Counting spaces for two @@ -5962,9 +5933,11 @@ @cindex line continuations, in @code{print} statement @cindex @code{print} statement, line continuations and -@strong{Note:} You can continue either a @code{print} or +@quotation NOTE +You can continue either a @code{print} or @code{printf} statement simply by putting a newline after any comma (@pxref{Statements/Lines}). +@end quotation @c ENDOFRANGE prnts @node Output Separators @@ -6030,8 +6003,7 @@ @node OFMT @section Controlling Numeric Output with @code{print} @cindex numeric, output format -@c the comma does NOT start a secondary -@cindex formats, numeric output +@cindex formats@comma{} numeric output When the @code{print} statement is used to print numeric values, @command{awk} internally converts the number to a string of characters and prints that string. @command{awk} uses the @code{sprintf} function @@ -6046,8 +6018,7 @@ @cindex @code{sprintf} function @cindex @code{OFMT} variable -@c the comma before OFMT does NOT start a tertiary -@cindex output, format specifier, @code{OFMT} +@cindex output, format specifier@comma{} @code{OFMT} The built-in variable @code{OFMT} contains the default format specification that @code{print} uses with @code{sprintf} when it wants to convert a number to a string for printing. @@ -6193,6 +6164,21 @@ (The @samp{4.3} represents two modifiers, discussed in the next @value{SUBSECTION}.) +On systems supporting IEEE 754 floating point format, values +representing negative +infinity are formatted as +@samp{-inf} or @samp{-infinity}, +and positive infinity as +@samp{inf} and @samp{-infinity}. +The special ``not a number'' value formats as @samp{-nan} or @samp{nan}. + +@item %F +Like @code{%f} but the infinity and ``not a number'' values are spelled +using uppercase letters. + +The @code{%F} format is a POSIX extension to ISO C; not all systems +support. On those that don't, @command{gawk} uses @code{%f} instead. + @item %g@r{,} %G These print a number in either scientific notation or in floating-point notation, whichever uses fewer characters; if the result is printed in @@ -6222,7 +6208,7 @@ @cindex dark corner, format-control characters @cindex @command{gawk}, format-control characters -@strong{Note:} +@quotation NOTE When using the integer format-control letters for values that are outside the range of the widest C integer type, @command{gawk} switches to the the @samp{%g} format specifier. If @option{--lint} is provided on the @@ -6230,14 +6216,14 @@ warns about this. Other versions of @command{awk} may print invalid values or do something else entirely. @value{DARKCORNER} +@end quotation @node Format Modifiers @subsection Modifiers for @code{printf} Formats @c STARTOFRANGE pfm @cindex @code{printf} statement, modifiers -@c the comma here does NOT start a secondary -@cindex modifiers, in format specifiers +@cindex modifiers@comma{} in format specifiers A format specification can also include @dfn{modifiers} that can control how much of the item's value is printed, as well as how much space it gets. The modifiers come between the @samp{%} and the format-control letter. @@ -6316,6 +6302,32 @@ This flag only has an effect when the field width is wider than the value to print. +@item ' +A single quote or apostrohe character is a POSIX extension to ISO C. +It indicates that the integer part of a floating point value, or the +entire part of an integer decimal value, should have a thousands-separator +character in it. This only works in locales that support such characters. +For example: + +@example +$ @kbd{cat thousands.awk} @i{Show source program} +@print{} BEGIN @{ printf "%'d\n", 1234567 @} +$ @kbd{LC_ALL=C gawk -f thousands.awk} @i{Run it in "C" locale} +@print{} 1234567 +$ @kbd{LC_ALL=en_US.UTF-8 gawk -f thousands.awk} @i{Run in US English UTF locale} +@print{} 1,234,567 +@end example + +@noindent +For more information about locales and internationalization issues, +@strong{FIXME: see xxxx}. + +@quotation NOTE +The @samp{'} flag is a nice feature, but its use complicates things: it +now becomes difficult to use it in command-line programs. For information +on appropriate quoting tricks, @strong{FIXME: see XXXX}. +@end quotation + @item @var{width} This is a number specifying the desired minimum width of a field. Inserting any number between the @samp{%} sign and the format-control character forces the @@ -6677,8 +6689,7 @@ is only opened once. @cindex differences in @command{awk} and @command{gawk}, implementation limitations -@c the comma here does NOT start a secondary -@cindex implementation issues, @command{gawk}, limits +@cindex implementation issues@comma{} @command{gawk}, limits @cindex @command{awk}, implementation issues, pipes @cindex @command{gawk}, implementation issues, pipes @ifnotinfo @@ -6896,7 +6907,7 @@ @c @cindex automatic warnings @c @cindex warnings, automatic -@strong{Note:} +@quotation NOTE The special files that provide process-related information are now considered obsolete and will disappear entirely in the next release of @command{gawk}. @@ -6904,6 +6915,7 @@ these files. To obtain process-related information, use the @code{PROCINFO} array. @xref{Auto-set}. +@end quotation @node Special Network @subsection Special Files for Network Communications @@ -6985,15 +6997,13 @@ @cindex files, output, See output files @c STARTOFRANGE ifc @cindex input files, closing -@c comma before closing is NOT start of tertiary @c STARTOFRANGE ofc -@cindex output, files, closing +@cindex output, files@comma{} closing @c STARTOFRANGE pc @cindex pipes, closing @c STARTOFRANGE cc @cindex coprocesses, closing -@c comma before using is NOT start of tertiary -@cindex @code{getline} command, coprocesses, using from +@cindex @code{getline} command, coprocesses@comma{} using from If the same @value{FN} or the same shell command is used with @code{getline} more than once during the execution of an @command{awk} program @@ -7138,8 +7148,7 @@ of a file that was never opened, so @command{awk} silently does nothing. -@c comma is part of tertiary -@cindex @code{|} (vertical bar), @code{|&} operator (I/O), pipes, closing +@cindex @code{|} (vertical bar), @code{|&} operator (I/O), pipes@comma{} closing When using the @samp{|&} operator to communicate with a coprocess, it is occasionally useful to be able to close one end of the two-way pipe without closing the other. @@ -7159,8 +7168,7 @@ @cindex advanced features, @code{close} function @cindex dark corner, @code{close} function @cindex @code{close} function, return values -@c comma does NOT start secondary -@cindex return values, @code{close} function +@cindex return values@comma{} @code{close} function @cindex differences in @command{awk} and @command{gawk}, @code{close} function @cindex Unix @command{awk}, @code{close} function and @@ -7210,8 +7218,7 @@ @c create values indicating death-by-signal? Sigh. @cindex pipes, closing -@c comma does NOT start tertiary -@cindex POSIX @command{awk}, pipes, closing +@cindex POSIX @command{awk}, pipes@comma{} closing For POSIX-compliant systems, if the exit status is a number above 128, then the program was terminated by a signal. Subtract 128 to get the signal number: @@ -7418,8 +7425,7 @@ @c fakenode --- for prepinfo @subheading Advanced Notes: A Constant's Base Does Not Affect Its Value -@c comma before values does NOT start tertiary -@cindex advanced features, constants, values of +@cindex advanced features, constants@comma{} values of Once a numeric constant has been converted internally into a number, @@ -7614,8 +7620,7 @@ @node Assignment Options @subsection Assigning Variables on the Command Line @cindex variables, assigning on command line -@c comma before assigning does NOT start tertiary -@cindex command line, variables, assigning on +@cindex command line, variables@comma{} assigning on Any @command{awk} variable can be set by including a @dfn{variable assignment} among the arguments on the command line when @command{awk} is invoked @@ -7626,8 +7631,7 @@ @var{variable}=@var{text} @end example -@c comma before assigning does NOT start tertiary -@cindex @code{-v} option, variables, assigning +@cindex @code{-v} option, variables@comma{} assigning @noindent With it, a variable is set either at the beginning of the @command{awk} run or in between input files. @@ -7914,10 +7918,11 @@ @cindex portability, @code{**} operator and @cindex @code{*} (asterisk), @code{**} operator @cindex asterisk (@code{*}), @code{**} operator -@strong{Note:} +@quotation NOTE The POSIX standard only specifies the use of @samp{^} for exponentiation. For maximum portability, do not use the @samp{**} operator. +@end quotation @node Concatenation @section String Concatenation @@ -8132,11 +8137,12 @@ foo = foo + 5 @end example -@noindent -@strong{Note:} Using a variable as a number and then later as a string +@quotation NOTE +Using a variable as a number and then later as a string can be confusing and is poor programming style. The previous two examples illustrate how @command{awk} works, @emph{not} how you should write your programs! +@end quotation An assignment is an expression, so it has a value---the same value that is assigned. Thus, @samp{z = 1} is an expression with the value one. @@ -8222,36 +8228,10 @@ @noindent The value of @code{a[3]} could be either two or four. -Here is a table of the arithmetic assignment operators. In each +@ref{table-assign-ops} lists the arithmetic assignment operators. In each case, the righthand operand is an expression whose value is converted to a number. -@ignore -@table @code -@item @var{lvalue} += @var{increment} -Adds @var{increment} to the value of @var{lvalue}. - -@item @var{lvalue} -= @var{decrement} -Subtracts @var{decrement} from the value of @var{lvalue}. - -@item @var{lvalue} *= @var{coefficient} -Multiplies the value of @var{lvalue} by @var{coefficient}. - -@item @var{lvalue} /= @var{divisor} -Divides the value of @var{lvalue} by @var{divisor}. - -@item @var{lvalue} %= @var{modulus} -Sets @var{lvalue} to its remainder by @var{modulus}. - -@cindex @command{awk} language, POSIX version -@cindex POSIX @command{awk} -@item @var{lvalue} ^= @var{power} -@itemx @var{lvalue} **= @var{power} -Raises @var{lvalue} to the power @var{power}. -(Only the @samp{^=} operator is specified by POSIX.) -@end table -@end ignore - @cindex @code{-} (hyphen), @code{-=} operator @cindex hyphen (@code{-}), @code{-=} operator @cindex @code{*} (asterisk), @code{*=} operator @@ -8264,28 +8244,28 @@ @cindex caret (@code{^}), @code{^=} operator @cindex @code{*} (asterisk), @code{**=} operator @cindex asterisk (@code{*}), @code{**=} operator -@multitable {@var{lvalue} *= @var{coefficient}} {Subtracts @var{decrement} from the value of @var{lvalue}.} +@float Table,table-assign-ops +@caption{Arithmetic Assignment Operators} +@multitable @columnfractions .30 .70 +@headitem Operator @tab Effect @item @var{lvalue} @code{+=} @var{increment} @tab Adds @var{increment} to the value of @var{lvalue}. - @item @var{lvalue} @code{-=} @var{decrement} @tab Subtracts @var{decrement} from the value of @var{lvalue}. - @item @var{lvalue} @code{*=} @var{coefficient} @tab Multiplies the value of @var{lvalue} by @var{coefficient}. - @item @var{lvalue} @code{/=} @var{divisor} @tab Divides the value of @var{lvalue} by @var{divisor}. - @item @var{lvalue} @code{%=} @var{modulus} @tab Sets @var{lvalue} to its remainder by @var{modulus}. - @cindex @command{awk} language, POSIX version @cindex POSIX @command{awk} @item @var{lvalue} @code{^=} @var{power} @tab @item @var{lvalue} @code{**=} @var{power} @tab Raises @var{lvalue} to the power @var{power}. @end multitable +@end float @cindex POSIX @command{awk}, @code{**=} operator and @cindex portability, @code{**=} operator and -@strong{Note:} +@quotation NOTE Only the @samp{^=} operator is specified by POSIX. For maximum portability, do not use the @samp{**=} operator. +@end quotation @c fakenode --- for prepinfo @subheading Advanced Notes: Syntactic Ambiguities Between @samp{/=} and Regular Expressions @@ -8407,8 +8387,7 @@ @c fakenode --- for prepinfo @subheading Advanced Notes: Operator Evaluation Order -@c comma before precedence does NOT start tertiary -@cindex advanced features, operators, precedence +@cindex advanced features, operators@comma{} precedence @cindex precedence @cindex operators, precedence @cindex portability, operators @@ -8503,8 +8482,7 @@ @cindex expressions, matching, See comparison expressions @cindex matching, expressions, See comparison expressions @cindex relational operators, See comparison operators -@c comma is part of See -@cindex operators, relational, See operators, comparison +@cindex operators, relational, See operators@comma{} comparison @c STARTOFRANGE varting @cindex variable typing @c STARTOFRANGE vartypc @@ -8640,8 +8618,8 @@ @dfn{Comparison expressions} compare strings or numbers for relationships such as equality. They are written using @dfn{relational -operators}, which are a superset of those in C. Here is a table of -them: +operators}, which are a superset of those in C. +@ref{table-relational-ops} describes them. @cindex @code{<} (left angle bracket), @code{<} operator @cindex left angle bracket (@code{<}), @code{<} operator @@ -8660,34 +8638,21 @@ @cindex @code{!} (exclamation point), @code{!~} operator @cindex exclamation point (@code{!}), @code{!~} operator @cindex @code{in} operator -@table @code -@item @var{x} < @var{y} -True if @var{x} is less than @var{y}. - -@item @var{x} <= @var{y} -True if @var{x} is less than or equal to @var{y}. - -@item @var{x} > @var{y} -True if @var{x} is greater than @var{y}. - -@item @var{x} >= @var{y} -True if @var{x} is greater than or equal to @var{y}. - -@item @var{x} == @var{y} -True if @var{x} is equal to @var{y}. - -@item @var{x} != @var{y} -True if @var{x} is not equal to @var{y}. - -@item @var{x} ~ @var{y} -True if the string @var{x} matches the regexp denoted by @var{y}. - -@item @var{x} !~ @var{y} -True if the string @var{x} does not match the regexp denoted by @var{y}. - -@item @var{subscript} in @var{array} -True if the array @var{array} has an element with the subscript @var{subscript}. -@end table +@float Table,table-relational-ops +@caption{Relational Operators} +@multitable @columnfractions .25 .75 +@headitem Expression @tab Result +@item @var{x} @code{<} @var{y} @tab True if @var{x} is less than @var{y}. +@item @var{x} @code{<=} @var{y} @tab True if @var{x} is less than or equal to @var{y}. +@item @var{x} @code{>} @var{y} @tab True if @var{x} is greater than @var{y}. +@item @var{x} @code{>=} @var{y} @tab True if @var{x} is greater than or equal to @var{y}. +@item @var{x} @code{==} @var{y} @tab True if @var{x} is equal to @var{y}. +@item @var{x} @code{!=} @var{y} @tab True if @var{x} is not equal to @var{y}. +@item @var{x} @code{~} @var{y} @tab True if the string @var{x} matches the regexp denoted by @var{y}. +@item @var{x} @code{!~} @var{y} @tab True if the string @var{x} does not match the regexp denoted by @var{y}. +@item @var{subscript} @code{in} @var{array} @tab True if the array @var{array} has an element with the subscript @var{subscript}. +@end multitable +@end float Comparison expressions have the value one if true and zero if false. When comparing operands of mixed types, numeric operands are converted @@ -8940,12 +8905,14 @@ @end ignore @cindex @code{next} statement -@strong{Note:} The @code{next} statement is discussed in +@quotation NOTE +The @code{next} statement is discussed in @ref{Next Statement}. @code{next} tells @command{awk} to skip the rest of the rules, get the next record, and start processing the rules over again at the top. The reason it's there is to avoid printing the bracketing @samp{START} and @samp{END} lines. +@end quotation @c ENDOFRANGE exbo @c ENDOFRANGE boex @@ -9266,9 +9233,10 @@ @end table @cindex portability, operators, not in POSIX @command{awk} -@strong{Note:} +@quotation NOTE The @samp{|&}, @samp{**}, and @samp{**=} operators are not specified by POSIX. For maximum portability, do not use them. +@end quotation @c ENDOFRANGE prec @c ENDOFRANGE oppr @c ENDOFRANGE exps @@ -9497,8 +9465,7 @@ for the following record. Then the range pattern goes back to checking @var{begpat} against each record. -@c last comma does NOT start a tertiary -@cindex @code{if} statement, actions, changing +@cindex @code{if} statement, actions@comma{} changing The record that turns on the range pattern and the one that turns it off both match the range pattern. If you don't want to operate on these records, you can write @code{if} statements in the rule's action @@ -9868,10 +9835,8 @@ control the flow of execution in @command{awk} programs. Most of the control statements in @command{awk} are patterned on similar statements in C. -@c the comma here does NOT start a secondary -@cindex compound statements, control statements and -@c the second comma here does NOT start a tertiary -@cindex statements, compound, control statements and +@cindex compound statements@comma{} control statements and +@cindex statements, compound@comma{} control statements and @cindex body, in actions @cindex @code{@{@}} (braces), statements, grouping @cindex braces (@code{@{@}}), statements, grouping @@ -10171,14 +10136,20 @@ added in @command{gawk} 3.1.3. It is @emph{not} enabled by default. To enable it, use the @option{--enable-switch} option to @command{configure} when @command{gawk} is being configured and built. -@xref{Additional Configuration Options}, -for more information. +@xref{Additional Configuration Options}, for more information. The @code{switch} statement allows the evaluation of an expression and the execution of statements based on a @code{case} match. Case statements are checked for a match in the order they are defined. If no suitable -@code{case} is found, the @code{default} section is executed, if supplied. The -general form of the @code{switch} statement looks like this: +@code{case} is found, the @code{default} section is executed, if supplied. + +Each @code{case} contains a single constant, be it numeric, string, or +regexp. The @code{switch} expression is evaluated, and then each +@code{case}'s constant is compared against the result in turn. The type of constant +determines the comparison: numeric or string do the usual comparisons. +A regexp constant does a regular expression match against the string +value of the original expression. The general form of the @code{switch} +statement looks like this: @example switch (@var{expression}) @{ @@ -10189,7 +10160,8 @@ @} @end example -The @code{switch} statement works as it does in C. Once a match to a given +Control flow in +the @code{switch} statement works as it does in C. Once a match to a given case is made, case statement bodies are executed until a @code{break}, @code{continue}, @code{next}, @code{nextfile} or @code{exit} is encountered, or the end of the @code{switch} statement itself. For example: @@ -10877,8 +10849,7 @@ When @command{gawk} is processing the input files, @samp{FILENAME == ARGV[ARGIND]} is always true. -@c comma before ARGIND does NOT mark a tertiary -@cindex files, processing, @code{ARGIND} variable and +@cindex files, processing@comma{} @code{ARGIND} variable and This variable is useful in file processing; it allows you to tell how far along you are in the list of @value{DF}s as well as to distinguish between successive instances of the same @value{FN} on the command line. @@ -10918,6 +10889,14 @@ during a read for @code{getline}, or during a @code{close} operation, then @code{ERRNO} contains a string describing the error. +@code{ERRNO} works similarly to the C variable @code{errno}. +In particular @command{gawk} @emph{never} clears it (sets it +to zero or @code{""}). Thus, you should only expect its value +to be meaningful when an I/O operation returns a failure +value, such as @code{getline} returning @minus{}1. +You are, of course, free to clear it yourself before doing an +I/O operation. + This variable is a @command{gawk} extension. In other @command{awk} implementations, or if @command{gawk} is in compatibility mode @@ -11010,6 +10989,10 @@ @item PROCINFO["uid"] The value of the @code{getuid} system call. + +@item PROCINFO["version"] +The version of @command{gawk}. This is available from +version 3.1.4 and later. @end table On some systems, there may be elements in the array, @code{"group1"} @@ -11705,8 +11688,7 @@ split("", array) @end example -@c comma before deleting does NOT start a tertiary -@cindex @code{split} function, array elements, deleting +@cindex @code{split} function, array elements@comma{} deleting The @code{split} function (@pxref{String Functions}) clears out the target array first. This call asks it to split @@ -11790,8 +11772,7 @@ @node Uninitialized Subscripts @section Using Uninitialized Variables as Subscripts -@c last comma does NOT start a tertiary -@cindex variables, uninitialized, as array subscripts +@cindex variables, uninitialized@comma{} as array subscripts @cindex uninitialized variables, as array subscripts @cindex subscripts in arrays, uninitialized variables as @cindex arrays, subscripts, uninitialized variables as @@ -11998,8 +11979,7 @@ @cindex arrays, sorting @cindex @code{asort} function (@command{gawk}) -@c last comma does NOT start a tertiary -@cindex @code{asort} function (@command{gawk}), arrays, sorting +@cindex @code{asort} function (@command{gawk}), arrays@comma{} sorting @cindex sort function, arrays, sorting The order in which an array is scanned with a @samp{for (i in array)} loop is essentially arbitrary. @@ -12056,8 +12036,11 @@ END @{ n = asorti(source, dest) - for (i = 1; i <= n; i++) - @var{do something with} dest[i] + for (i = 1; i <= n; i++) @{ + @var{do something with} dest[i] @i{Work with sorted indices directly} + @dots{} + @var{do something with} source[dest[i]] @i{Access original array via sorted indices} + @} @} @end example @@ -12075,8 +12058,11 @@ j++ @} n = asort(ind) # index values are now sorted -for (i = 1; i <= n; i++) - @var{do something with} data[ind[i]] +for (i = 1; i <= n; i++) @{ + @var{do something with} ind[i] @i{Work with sorted indices directly} + @dots{} + @var{do something with} data[ind[i]] @i{Access original array via sorted indices} +@} @end example Sorting the array by replacing the indices provides maximal flexibility. @@ -12156,16 +12142,14 @@ is a call to the function @code{atan2} and has two arguments. @cindex programming conventions, functions, calling -@c last comma does NOT start a tertiary -@cindex whitespace, functions, calling +@cindex whitespace, functions@comma{} calling Whitespace is ignored between the built-in function name and the open parenthesis, and it is good practice to avoid using whitespace there. User-defined functions do not permit whitespace in this way, and it is easier to avoid mistakes by following a simple convention that always works---no whitespace after a function name. -@c last comma is part of tertiary -@cindex troubleshooting, @command{gawk}, fatal errors, function arguments +@cindex troubleshooting, @command{gawk}, fatal errors@comma{} function arguments @cindex @command{gawk}, function arguments and @cindex differences in @command{awk} and @command{gawk}, function arguments (@command{gawk}) Each built-in function accepts a certain number of arguments. @@ -12435,7 +12419,7 @@ @c @cindex historical features @cindex portability, @code{length} function @cindex POSIX @command{awk}, functions and, @code{length} -@strong{Note:} +@quotation NOTE In older versions of @command{awk}, the @code{length} function could be called without any parentheses. Doing so is marked as ``deprecated'' in the @@ -12443,6 +12427,7 @@ it is a feature that can eventually be removed from a future version of the standard. Therefore, for programs to be maximally portable, always supply the parentheses. +@end quotation @item match(@var{string}, @var{regexp} @r{[}, @var{array}@r{]}) @cindex @code{match} function @@ -12959,9 +12944,11 @@ character sequence @samp{\&} specially; this sequence was replaced in the generated text with a single @samp{&}. Any other @samp{\} within the @var{replacement} string that did not precede an @samp{&} was passed -through unchanged. To illustrate with a table: +through unchanged. This is illustrated in @ref{table-sub-escapes}. @c Thank to Karl Berry for help with the TeX stuff. +@float Table,table-sub-escapes +@caption{Historical Escape Sequence Processing for sub and gsub} @tex \vbox{\bigskip % This table has lots of &'s and \'s, so unspecialize them. @@ -12981,7 +12968,20 @@ } @bigskip} @end tex +@ifdocbook +@multitable @columnfractions .20 .20 .60 +@headitem You type @tab @code{sub} sees @tab @code{sub} generates +@item @code{\&} @tab @code{&} @tab the matched text +@item @code{\\&} @tab @code{\&} @tab a literal @samp{&} +@item @code{\\\&} @tab @code{\&} @tab a literal @samp{&} +@item @code{\\\\&} @tab @code{\\&} @tab a literal @samp{\&} +@item @code{\\\\\&} @tab @code{\\&} @tab a literal @samp{\&} +@item @code{\\\\\\&} @tab @code{\\\&} @tab a literal @samp{\\&} +@item @code{\\q} @tab @code{\q} @tab a literal @samp{\q} +@end multitable +@end ifdocbook @ifnottex +@ifnotdocbook @display You type @code{sub} sees @code{sub} generates -------- ---------- --------------- @@ -12993,7 +12993,9 @@ @code{\\\\\\&} @code{\\\&} a literal @samp{\\&} @code{\\q} @code{\q} a literal @samp{\q} @end display +@end ifnotdocbook @end ifnottex +@end float @noindent This table shows both the lexical-level processing, where @@ -13007,11 +13009,14 @@ @c @cindex @command{awk} language, POSIX version @cindex POSIX @command{awk}, functions and, @code{gsub}/@code{sub} -The 1992 POSIX standard attempted to fix this problem. The standard +The 1992 POSIX standard attempted to fix this problem. That standard says that @code{sub} and @code{gsub} look for either a @samp{\} or an @samp{&} after the @samp{\}. If either one follows a @samp{\}, that character is -output literally. The interpretation of @samp{\} and @samp{&} then becomes: +output literally. The interpretation of @samp{\} and @samp{&} then becomes +as shown in @ref{table-sub-posix-92}. +@float Table,table-sub-posix-92 +@caption{1992 POSIX Rules for sub and gsub Escape Sequence Processing} @c thanks to Karl Berry for formatting this table @tex \vbox{\bigskip @@ -13029,7 +13034,17 @@ } @bigskip} @end tex +@ifdocbook +@multitable @columnfractions .20 .20 .60 +@headitem You type @tab @code{sub} sees @tab @code{sub} generates +@item @code{&} @tab @code{&} @tab the matched text +@item @code{\\&} @tab @code{\&} @tab a literal @samp{&} +@item @code{\\\\&} @tab @code{\\&} @tab a literal @samp{\}, then the matched text +@item @code{\\\\\\&} @tab @code{\\\&} @tab a literal @samp{\&} +@end multitable +@end ifdocbook @ifnottex +@ifnotdocbook @display You type @code{sub} sees @code{sub} generates -------- ---------- --------------- @@ -13038,7 +13053,9 @@ @code{\\\\&} @code{\\&} a literal @samp{\}, then the matched text @code{\\\\\\&} @code{\\\&} a literal @samp{\&} @end display +@end ifnotdocbook @end ifnottex +@end float @noindent This appears to solve the problem. @@ -13059,12 +13076,16 @@ @c I can say that, 'cause I was involved in making this change @end itemize -The POSIX standard is under revision. -Because of the problems just listed, proposed text for the revised standard +Because of the problems just listed, +in 1996, the @command{gawk} maintainer submitted +proposed text for a revised standard that reverts to rules that correspond more closely to the original existing practice. The proposed rules have special cases that make it possible -to produce a @samp{\} preceding the matched text: +to produce a @samp{\} preceding the matched text. This is shown in +@ref{table-sub-proposed}. +@float Table,table-sub-proposed +@caption{Propsosed rules for sub and backslash} @tex \vbox{\bigskip % This table has lots of &'s and \'s, so unspecialize them. @@ -13078,10 +13099,22 @@ @code{\\\\&}! @code{\\&}!a literal @samp{\}, followed by the matched text@cr @code{\\&}! @code{\&}!a literal @samp{&}@cr @code{\\q}! @code{\q}!a literal @samp{\q}@cr + @code{\\\\}! @code{\\}!@code{\\}@cr } @bigskip} @end tex -@ifinfo +@ifdocbook +@multitable @columnfractions .20 .20 .60 +@headitem You type @tab @code{sub} sees @tab @code{sub} generates +@item @code{\\\\\\&} @tab @code{\\\&} @tab a literal @samp{\&} +@item @code{\\\\&} @tab @code{\\&} @tab a literal @samp{\}, followed by the matched text +@item @code{\\&} @tab @code{\&} @tab a literal @samp{&} +@item @code{\\q} @tab @code{\q} @tab a literal @samp{\q} +@item @code{\\\\} @tab @code{\\} @tab @code{\\} +@end multitable +@end ifdocbook +@ifnottex +@ifnotdocbook @display You type @code{sub} sees @code{sub} generates -------- ---------- --------------- @@ -13089,8 +13122,11 @@ @code{\\\\&} @code{\\&} a literal @samp{\}, followed by the matched text @code{\\&} @code{\&} a literal @samp{&} @code{\\q} @code{\q} a literal @samp{\q} + @code{\\\\} @code{\\} @code{\\} @end display -@end ifinfo +@end ifnotdocbook +@end ifnottex +@end float In a nutshell, at the runtime level, there are now three special sequences of characters (@samp{\\\&}, @samp{\\&} and @samp{\&}) whereas historically @@ -13101,22 +13137,82 @@ @command{gawk} 3.0 and 3.1 follow these proposed POSIX rules for @code{sub} and @code{gsub}. @c As much as we think it's a lousy idea. You win some, you lose some. Sigh. -Whether these proposed rules will actually become codified into the -standard is unknown at this point. Subsequent @command{gawk} releases will -track the standard and implement whatever the final version specifies; -this @value{DOCUMENT} will be updated as -well.@footnote{As this @value{DOCUMENT} was being finalized, -we learned that the POSIX standard will not use these rules. -However, it was too late to change @command{gawk} for the 3.1 release. -@command{gawk} behaves as described here.} +The POSIX standard took much longer to be revised than was expected in 1996. +The 2001 standard does not follow the above rules. Instead, the rules +there are somewhat simpler. The results are similar except for one case. + +The 2001 POSIX rules state that @samp{\&} in the replacement string produces +a literal @samp{&}, @samp{\\} produces a literal @samp{\}, and @samp{\} followed +by anything else is not special; the @samp{\} is placed straight into the output. +These rules are presented in @ref{table-posix-2001-sub}. + +@float Table,table-posix-2001-sub +@caption{POSIX 2001 rules for sub} +@tex +\vbox{\bigskip +% This table has lots of &'s and \'s, so unspecialize them. +\catcode`\& = \other \catcode`\\ = \other +% But then we need character for escape and tab. +@catcode`! = 4 +@halign{@hfil#!@qquad@hfil#!@qquad#@hfil@cr + You type!@code{sub} sees!@code{sub} generates@cr +@hrulefill!@hrulefill!@hrulefill@cr +@code{\\\\\\&}! @code{\\\&}!a literal @samp{\&}@cr +@code{\\\\&}! @code{\\&}!a literal @samp{\}, followed by the matched text@cr + @code{\\&}! @code{\&}!a literal @samp{&}@cr + @code{\\q}! @code{\q}!a literal @samp{\q}@cr + @code{\\\\}! @code{\\}!@code{\}@cr +} +@bigskip} +@end tex +@ifdocbook +@multitable @columnfractions .20 .20 .60 +@headitem You type @tab @code{sub} sees @tab @code{sub} generates +@item @code{\\\\\\&} @tab @code{\\\&} @tab a literal @samp{\&} +@item @code{\\\\&} @tab @code{\\&} @tab a literal @samp{\}, followed by the matched text +@item @code{\\&} @tab @code{\&} @tab a literal @samp{&} +@item @code{\\q} @tab @code{\q} @tab a literal @samp{\q} +@item @code{\\\\} @tab @code{\\} @tab @code{\} +@end multitable +@end ifdocbook +@ifnottex +@ifnotdocbook +@display + You type @code{sub} sees @code{sub} generates + -------- ---------- --------------- +@code{\\\\\\&} @code{\\\&} a literal @samp{\&} + @code{\\\\&} @code{\\&} a literal @samp{\}, followed by the matched text + @code{\\&} @code{\&} a literal @samp{&} + @code{\\q} @code{\q} a literal @samp{\q} + @code{\\\\} @code{\\} @code{\} +@end display +@end ifnotdocbook +@end ifnottex +@end float + +The only case where the difference is noticeable is the last one: @samp{\\\\} +is seen as @samp{\\} and produces @samp{\} instead of @samp{\\}. + +Starting with version 3.1.4, @command{gawk} follows the POSIX rules +when @option{--posix} is specified (@pxref{Options}). Otherwise, +it continues to follow the 1996 proposed rules, since, as of this +writing, that has been its behavior for over seven years. + +@quotation NOTE +At the next major release, @command{gawk} will switch to using +the POSIX 2001 rules by default. +@end quotation The rules for @code{gensub} are considerably simpler. At the runtime level, whenever @command{gawk} sees a @samp{\}, if the following character is a digit, then the text that matched the corresponding parenthesized subexpression is placed in the generated output. Otherwise, no matter what character follows the @samp{\}, it -appears in the generated text and the @samp{\} does not: +appears in the generated text and the @samp{\} does not, +as shown in @ref{table-gensub-escapes}. +@float Table,table-gensub-escapes +@caption{Escape Sequence Processing for gensub} @tex \vbox{\bigskip % This table has lots of &'s and \'s, so unspecialize them. @@ -13135,7 +13231,19 @@ } @bigskip} @end tex +@ifdocbook +@multitable @columnfractions .20 .20 .60 +@headitem You type @tab @code{gensub} sees @tab @code{gensub} generates +@item @code{&} @tab @code{&} @tab the matched text +@item @code{\\&} @tab @code{\&} @tab a literal @samp{&} +@item @code{\\\\} @tab @code{\\} @tab a literal @samp{\} +@item @code{\\\\&} @tab @code{\\&} @tab a literal @samp{\}, then the matched text +@item @code{\\\\\\&} @tab @code{\\\&} @tab a literal @samp{\&} +@item @code{\\q} @tab @code{\q} @tab a literal @samp{q} +@end multitable +@end ifdocbook @ifnottex +@ifnotdocbook @display You type @code{gensub} sees @code{gensub} generates -------- ------------- ------------------ @@ -13146,7 +13254,9 @@ @code{\\\\\\&} @code{\\\&} a literal @samp{\&} @code{\\q} @code{\q} a literal @samp{q} @end display +@end ifnotdocbook @end ifnottex +@end float Because of the complexity of the lexical and runtime level processing and the special cases for @code{sub} and @code{gsub}, @@ -13155,13 +13265,11 @@ @c fakenode --- for prepinfo @subheading Advanced Notes: Matching the Null String -@c last comma does NOT start tertiary -@cindex advanced features, null strings, matching +@cindex advanced features, null strings@comma{} matching @cindex matching, null strings @cindex null strings, matching -@c last comma in next two is part of tertiary -@cindex @code{*} (asterisk), @code{*} operator, null strings, matching -@cindex asterisk (@code{*}), @code{*} operator, null strings, matching +@cindex @code{*} (asterisk), @code{*} operator, null strings@comma{} matching +@cindex asterisk (@code{*}), @code{*} operator, null strings@comma{} matching In @command{awk}, the @samp{*} operator can match the null string. This is particularly important for the @code{sub}, @code{gsub}, @@ -13396,9 +13504,8 @@ @cindex timestamps @c STARTOFRANGE logftst @cindex log files, timestamps in -@c last comma does NOT start tertiary @c STARTOFRANGE filogtst -@cindex files, log, timestamps in +@cindex files, log@comma{} timestamps in @c STARTOFRANGE gawtst @cindex @command{gawk}, timestamps @cindex POSIX @command{awk}, timestamps and @@ -13779,9 +13886,12 @@ on two integer numbers. In other words, the operation is performed on each successive pair of bits in the operands. Three common operations are bitwise AND, OR, and XOR. -The operations are described by the following table: +The operations are described in @ref{table-bitwise-ops}. +@float Table,table-bitwise-ops +@caption{Bitwise Operations} @ifnottex +@ifnotdocbook @display Bit Operator | AND | OR | XOR @@ -13791,6 +13901,7 @@ 0 | 0 0 | 0 1 | 0 1 1 | 0 1 | 1 1 | 1 0 @end display +@end ifnotdocbook @end ifnottex @tex \centerline{ @@ -13821,6 +13932,73 @@ }}} @end tex +@docbook + + +Bitwise Operations + + + + + + + + + + + + + + + + + +Bit Operator + + + + +AND +OR +XOR + + + +Operands +0 +1 +0 +1 +0 +1 + + + +0 +0 +0 +0 +1 +0 +1 + + + +1 +0 +1 +1 +1 +1 +0 + + + + +
+@end docbook +@end float + @cindex bitwise, complement @cindex complement, bitwise As you can see, the result of an AND operation is 1 only when @emph{both} @@ -13906,7 +14084,9 @@ For all of these functions, first the double-precision floating-point value is converted to the widest C unsigned integer type, then the bitwise operation is -performed and then the result is converted back into a C @code{double}. (If +performed. If the result cannot be represented exactly as a C @code{double}, +leading nonzero bits are removed one by one until it can be represented +exactly. The result is then converted back into a C @code{double}. (If you don't understand this paragraph, don't worry about it.) Here is a user-defined function @@ -14193,8 +14373,7 @@ in @command{awk} programs.) @c NEXT ED: This won't actually run, since foo() is undefined ... -@c last comma does NOT start tertiary -@cindex portability, functions, defining +@cindex portability, functions@comma{} defining To ensure that your @command{awk} programs are portable, always use the keyword @code{function} when defining a function. @@ -14380,7 +14559,8 @@ Changes made to an array parameter inside the body of a function @emph{are} visible outside that function. -@strong{Note:} Changing an array parameter inside a function +@quotation NOTE +Changing an array parameter inside a function can be very dangerous if you do not watch what you are doing. For example: @@ -14401,6 +14581,7 @@ @noindent prints @samp{a[1] = 1, a[2] = two, a[3] = 3}, because @code{changeit} stores @code{"two"} in the second element of @code{a}. +@end quotation @cindex undefined functions @cindex functions, undefined @@ -14439,8 +14620,7 @@ @node Return Statement @subsection The @code{return} Statement -@c comma does NOT start a secondary -@cindex @code{return} statement, user-defined functions +@cindex @code{return} statement@comma{} user-defined functions The body of a user-defined function can contain a @code{return} statement. This statement returns control to the calling part of the @command{awk} program. It @@ -14595,8 +14775,7 @@ @section Internationalization and Localization @cindex internationalization -@c comma is part of see -@cindex localization, See internationalization, localization +@cindex localization, See internationalization@comma{} localization @cindex localization @dfn{Internationalization} means writing (or modifying) a program once, in such a way that it can use multiple languages without requiring @@ -14780,8 +14959,7 @@ local language, and possibly other information as well. @cindex time, localization and -@c last comma does NOT start a tertiary -@cindex dates, information related to, localization +@cindex dates, information related to@comma{} localization @cindex @code{LC_TIME} locale category @item LC_TIME Time- and date-related information, such as 12- or 24-hour clock, month printed @@ -14976,8 +15154,7 @@ @node String Extraction @subsection Extracting Marked Strings @cindex strings, extracting -@c comma does NOT start secondary -@cindex marked strings, extracting +@cindex marked strings@comma{} extracting @cindex @code{--gen-po} option @cindex command-line options, string extraction @cindex string extraction (internationalization) @@ -15012,8 +15189,7 @@ @subsection Rearranging @code{printf} Arguments @cindex @code{printf} statement, positional specifiers -@c comma does NOT start secondary -@cindex positional specifiers, @code{printf} statement +@cindex positional specifiers@comma{} @code{printf} statement Format strings for @code{printf} and @code{sprintf} (@pxref{Printf}) present a special problem for translation. @@ -15075,14 +15251,14 @@ @print{} hello @end example -@noindent -@strong{Note:} When using @samp{*} with a positional specifier, the @samp{*} +@quotation NOTE +When using @samp{*} with a positional specifier, the @samp{*} comes first, then the integer position, and then the @samp{$}. This is somewhat counterintutive. +@end quotation @cindex @code{printf} statement, positional specifiers, mixing with regular formats -@c first comma does is part of primary -@cindex positional specifiers, @code{printf} statement, mixing with regular formats +@cindex positional specifiers@comma{} @code{printf} statement, mixing with regular formats @cindex format specifiers, mixing regular with positional specifiers @command{gawk} does not allow you to mix regular format specifiers and those with positional specifiers in the same string: @@ -15092,10 +15268,12 @@ @error{} gawk: cmd. line:1: fatal: must use `count$' on all formats or none @end smallexample -@strong{Note:} There are some pathological cases that @command{gawk} may fail to +@quotation NOTE +There are some pathological cases that @command{gawk} may fail to diagnose. In such cases, the output may not be what you expect. It's still a bad idea to try mixing them, even if @command{gawk} doesn't detect it. +@end quotation Although positional specifiers can be used directly in @command{awk} programs, their primary purpose is to help in producing correct translations of @@ -15230,8 +15408,10 @@ into which the application is translated. The @code{msgid} is the original string and the @code{msgstr} is the translation. -@strong{Note:} Strings not marked with a leading underscore do not +@quotation NOTE +Strings not marked with a leading underscore do not appear in the @file{guide.po} file. +@end quotation Next, the messages must be translated. Here is a translation to a hypothetical dialect of English, @@ -15395,8 +15575,7 @@ @section Allowing Nondecimal Input Data @cindex @code{--non-decimal-data} option @cindex advanced features, @command{gawk}, nondecimal input data -@c last comma does NOT start tertiary -@cindex input, data, nondecimal +@cindex input, data@comma{} nondecimal @cindex constants, nondecimal If you run @command{gawk} with the @option{--non-decimal-data} option, @@ -15480,8 +15659,7 @@ @c brennan@@whidbey.com @end smallexample -@c final comma is part of tertiary -@cindex advanced features, @command{gawk}, processes, communicating with +@cindex advanced features, @command{gawk}, processes@comma{} communicating with @cindex processes, two-way communications with It is often useful to be able to send data to a separate program for @@ -15988,8 +16166,7 @@ [1] 13992 @end example -@c comma does NOT start secondary -@cindex @command{kill} command, dynamic profiling +@cindex @command{kill} command@comma{} dynamic profiling @cindex @code{USR1} signal @cindex signals, @code{USR1}/@code{SIGUSR1} @noindent @@ -16170,10 +16347,8 @@ more than once, setting another variable each time, like this: @samp{awk @w{-v foo=1} @w{-v bar=2} @dots{}}. -@c last comma is part of secondary -@cindex built-in variables, @code{-v} option, setting with -@c last comma is part of tertiary -@cindex variables, built-in, @code{-v} option, setting with +@cindex built-in variables, @code{-v} option@comma{} setting with +@cindex variables, built-in, @code{-v} option@comma{} setting with @strong{Caution:} Using @option{-v} to set the values of the built-in variables may lead to surprising results. @command{awk} will reset the values of those variables as it needs to, possibly ignoring any @@ -16260,8 +16435,7 @@ to @var{file}. If no @var{file} is provided, @command{gawk} prints this list to the file named @file{awkvars.out} in the current directory. -@c last comma is part of secondary -@cindex troubleshooting, typographical errors, global variables +@cindex troubleshooting, typographical errors@comma{} global variables Having a list of all global variables is a good way to look for typographical errors in your programs. You would also use this option if you have a large program with a lot of @@ -16319,9 +16493,8 @@ @item -W non-decimal-data @itemx --non-decimal-data @cindex @code{--non-decimal-data} option -@cindex hexadecimal, values, enabling interpretation of -@c comma is part of primary -@cindex octal values, enabling interpretation of +@cindex hexadecimal values@comma{} enabling interpretation of +@cindex octal values@comma{} enabling interpretation of Enable automatic interpretation of octal and hexadecimal values in input data (@pxref{Nondecimal Data}). @@ -16334,8 +16507,7 @@ @itemx --posix @cindex @code{--posix} option @cindex POSIX mode -@c last comma is part of tertiary -@cindex @command{gawk}, extensions, disabling +@cindex @command{gawk}, extensions@comma{} disabling Operates in strict POSIX mode. This disables all @command{gawk} extensions (just like @option{--traditional}) and adds the following additional restrictions: @@ -16382,8 +16554,7 @@ of @code{FS} to be a single TAB character (@pxref{Field Separators}). -@c comma does not start secondary -@cindex @code{fflush} function, unsupported +@cindex @code{fflush} function@comma{} unsupported @item The @code{fflush} built-in function is not supported (@pxref{I/O Functions}). @@ -16437,8 +16608,7 @@ @item -W version @itemx --version @cindex @code{--version} option -@c last comma is part of tertiary -@cindex @command{gawk}, versions of, information about, printing +@cindex @command{gawk}, versions of, information about@comma{} printing Prints version information for this particular copy of @command{gawk}. This allows you to determine if your copy of @command{gawk} is up to date with respect to whatever the Free Software Foundation is currently @@ -16636,7 +16806,8 @@ This is true for both @option{--traditional} and @option{--posix}. @xref{Options}. -@strong{Note:} If you want files in the current directory to be found, +@quotation NOTE +If you want files in the current directory to be found, you must include the current directory in the path, either by including @file{.} explicitly in the path or by writing a null entry in the path. (A null entry is indicated by starting or ending the path with a @@ -16645,6 +16816,7 @@ found in the current directory. This path search mechanism is identical to the shell's. @c someday, @cite{The Bourne Again Shell}.... +@end quotation Starting with @value{PVERSION} 3.0, if @env{AWKPATH} is not defined in the environment, @command{gawk} places its default search path into @@ -17016,6 +17188,8 @@ @menu * Nextfile Function:: Two implementations of a @code{nextfile} function. +* Strtonum Function:: A replacement for the built-in @code{strtonum} + function. * Assert Function:: A function for assertions in @command{awk} programs. * Round Function:: A function for rounding if @code{sprintf} does @@ -17159,6 +17333,101 @@ @c ENDOFRANGE flibnex @c ENDOFRANGE nexim +@node Strtonum Function +@subsection Converting Strings To Numbers + +The @code{strtonum} function (@pxref{String Functions}) +is a @command{gawk} extension. The following function +provides an implementation for other versions of @command{awk}: + +@example +@c file eg/lib/strtonum.awk +# strtonum --- convert string to number +@c endfile +@ignore +@c file eg/lib/strtonum.awk + +# +# Arnold Robbins, arnold@@skeeve.com, Public Domain +# February, 2004 + +@c endfile +@end ignore +@c file eg/lib/strtonum.awk +function mystrtonum(str, ret, chars, n, i, k, c) +@{ + if (str ~ /^0[0-7]*$/) @{ + # octal + n = length(str) + ret = 0 + for (i = 1; i <= n; i++) @{ + c = substr(str, i, 1) + if ((k = index("01234567", c)) > 0) + k-- # adjust for 1-basing in awk + + ret = ret * 8 + k + @} + @} else if (str ~ /^0[xX][0-9a-fA-f]+/) @{ + # hexadecimal + str = substr(str, 3) # lop off leading 0x + n = length(str) + ret = 0 + for (i = 1; i <= n; i++) @{ + c = substr(str, i, 1) + c = tolower(c) + if ((k = index("0123456789", c)) > 0) + k-- # adjust for 1-basing in awk + else if ((k = index("abcdef", c)) > 0) + k += 9 + + ret = ret * 16 + k + @} + @} else if (str ~ /^[-+]?([0-9]+([.][0-9]*([Ee][0-9]+)?)?|([.][0-9]+([Ee][-+]?[0-9]+)?))$/) @{ + # decimal number, possibly floating point + ret = str + 0 + @} else + ret = "NOT-A-NUMBER" + + return ret +@} + +# BEGIN @{ # gawk test harness +# a[1] = "25" +# a[2] = ".31" +# a[3] = "0123" +# a[4] = "0xdeadBEEF" +# a[5] = "123.45" +# a[6] = "1.e3" +# a[7] = "1.32" +# a[7] = "1.32E2" +# +# for (i = 1; i in a; i++) +# print a[i], strtonum(a[i]), mystrtonum(a[i]) +# @} +@c endfile +@end example + +The function first looks for C-style octal numbers (base 8). +If the input string matches a regular expression describing octal +numbers, then @code{mystrtonum} loops through each character in the +string. It sets @code{k} to the index in @code{"01234567"} of the current +octal digit. Since the return value is one-based, the @samp{k--} +adjusts @code{k} so it can be used in computing the return value. + +Similar logic applies to the code that checks for and converts a +hexadecimal value, which starts with @samp{0x} or @samp{0X}. +The use of @code{tolower} simplifies the computation for finding +the correct numeric value for each hexadecimal digit. + +Finally, if the string matches the (rather complicated) regex for a +regular decimal integer or floating-point numer, the computation +@samp{ret = str + 0} lets @command{awk} convert the value to a +number. + +A commented-out test program is included, so that the function can +be tested with @command{gawk} and the results compared to the built-in +@code{strtonum} function. + @node Assert Function @subsection Assertions @@ -17877,8 +18146,7 @@ @subsection Checking for Readable @value{DDF}s @cindex troubleshooting, readable @value{DF}s -@c comma is part of primary -@cindex readable @value{DF}s, checking +@cindex readable @value{DF}s@comma{} checking @cindex files, skipping Normally, if you give @command{awk} a @value{DF} that isn't readable, it stops with a fatal error. There are times when you @@ -18444,12 +18712,10 @@ @cindex libraries of @command{awk} functions, user database, reading @c STARTOFRANGE flibudata @cindex functions, library, user database, reading -@c last comma is part of primary @c STARTOFRANGE udatar -@cindex user database, reading -@c last comma is part of secondary +@cindex user database@comma{} reading @c STARTOFRANGE dataur -@cindex database, users, reading +@cindex database, users@comma{} reading @cindex @code{PROCINFO} array The @code{PROCINFO} array (@pxref{Built-in Variables}) @@ -18823,8 +19089,7 @@ @cindex @code{PROCINFO} array @cindex @code{getgrent} function (C library) @cindex @code{getgrent} user-defined function -@c comma is part of primary -@cindex groups, information about +@cindex groups@comma{} information about @cindex account information @cindex group file @cindex files, group @@ -19250,9 +19515,8 @@ @node Clones @section Reinventing Wheels for Fun and Profit -@c last comma is part of secondary @c STARTOFRANGE posimawk -@cindex POSIX, programs, implementing in @command{awk} +@cindex POSIX, programs@comma{} implementing in @command{awk} This @value{SECTION} presents a number of POSIX utilities that are implemented in @command{awk}. Reinventing these programs in @command{awk} is often enjoyable, @@ -20189,8 +20453,7 @@ @node Tee Program @subsection Duplicating Output into Multiple Files -@c last comma is part of secondary -@cindex files, multiple, duplicating output into +@cindex files, multiple@comma{} duplicating output into @cindex output, duplicating into files @cindex @code{tee} utility The @code{tee} program is known as a ``pipe fitting.'' @code{tee} copies @@ -20310,9 +20573,8 @@ @c STARTOFRANGE prunt @cindex printing, unduplicated lines of text -@c first comma is part of primary @c STARTOFRANGE tpul -@cindex text, printing, unduplicated lines of +@cindex text@comma{} printing, unduplicated lines of @cindex @command{uniq} utility The @command{uniq} utility reads sorted lines of data on its standard input, and by default removes duplicate lines. In other words, it only @@ -20688,7 +20950,7 @@ totals of lines, words, and characters.@footnote{@command{wc} can't just use the value of @code{FNR} in @code{endfile}. If you examine the code in -@ref{Filetrans Function} +@ref{Filetrans Function}, you will see that @code{FNR} has already been reset by the time @code{endfile} is called.} It then prints out those numbers @@ -20784,11 +21046,9 @@ @node Dupword Program @subsection Finding Duplicated Words in a Document -@c last comma is part of secondary -@cindex words, duplicate, searching for +@cindex words, duplicate@comma{} searching for @cindex searching, for words -@c first comma is part of primary -@cindex documents, searching +@cindex documents@comma{} searching A common error when writing large amounts of prose is to accidentally duplicate words. Typically you will see this in text as something like ``the the program does the following@dots{}'' When the text is online, often @@ -21164,9 +21424,8 @@ @c STARTOFRANGE prml @cindex printing, mailing labels -@c comma is part of primary @c STARTOFRANGE mlprint -@cindex mailing labels, printing +@cindex mailing labels@comma{} printing Here is a ``real world''@footnote{``Real world'' is defined as ``a program actually used to get something done.''} program. This @@ -21285,9 +21544,8 @@ @node Word Sorting @subsection Generating Word-Usage Counts -@c last comma is part of secondary @c STARTOFRANGE worus -@cindex words, usage counts, generating +@cindex words, usage counts@comma{} generating @c NEXT ED: Rewrite this whole section and example The following @command{awk} program prints the number of occurrences of each word in its input. It illustrates the @@ -21417,9 +21675,8 @@ @node History Sorting @subsection Removing Duplicates from Unsorted Text -@c last comma is part of secondary @c STARTOFRANGE lidu -@cindex lines, duplicate, removing +@cindex lines, duplicate@comma{} removing The @command{uniq} program (@pxref{Uniq Program}), removes duplicate lines from @emph{sorted} data. @@ -21489,9 +21746,8 @@ @c STARTOFRANGE texse @cindex Texinfo, extracting programs from source files -@c last comma is part of secondary @c STARTOFRANGE fitex -@cindex files, Texinfo, extracting programs from +@cindex files, Texinfo@comma{} extracting programs from @ifnotinfo Both this chapter and the previous chapter (@ref{Library Functions}) @@ -22327,10 +22583,8 @@ @command{gawk} itself. @cindex search paths, for source files -@c comma is part of primary -@cindex source files, search path for -@c last comma is part of secondary -@cindex files, source, search path for +@cindex source files@comma{} search path for +@cindex files, source@comma{} search path for @cindex directories, searching As an additional example of this, consider the idea of having two files in a directory in the search path: @@ -23033,6 +23287,10 @@ at compile time (@pxref{Additional Configuration Options}). +@item +POSIX compliance for @code{sub} and @code{gsub} +(@pxref{Gory Details}). + @end itemize @c XXX ADD MORE STUFF HERE @@ -23258,8 +23516,7 @@ @node Getting @appendixsubsec Getting the @command{gawk} Distribution -@c last comma is part of secondary -@cindex @command{gawk}, source code, obtaining +@cindex @command{gawk}, source code@comma{} obtaining There are three ways to get GNU software: @itemize @bullet @@ -23382,8 +23639,7 @@ A description of one area in which the POSIX standard for @command{awk} is incorrect as well as how @command{gawk} handles the problem. -@c comma is part of primary -@cindex artificial intelligence, @command{gawk} and +@cindex artificial intelligence@comma{} @command{gawk} and @item doc/awkforai.txt A short article describing why @command{gawk} is a good language for AI (Artificial Intelligence) programming. @@ -23591,8 +23847,7 @@ @node Additional Configuration Options @appendixsubsec Additional Configuration Options @cindex @command{gawk}, configuring, options -@c comma is part of primary -@cindex configuration options, @command{gawk} +@cindex configuration options@comma{} @command{gawk} There are several additional options you may use on the @command{configure} command line when compiling @command{gawk} from scratch, including: @@ -23796,10 +24051,8 @@ @node PC Installation @appendixsubsec Installation on PC Operating Systems -@c first comma is part of primary -@cindex PC operating systems, @command{gawk} on, installing -@c {PC, gawk on} is the secondary term -@cindex operating systems, PC, @command{gawk} on, installing +@cindex PC operating systems@comma{} @command{gawk} on, installing +@cindex operating systems, PC@comma{} @command{gawk} on, installing This @value{SECTION} covers installation and usage of @command{gawk} on x86 machines running DOS, any version of Windows, or OS/2. In this @value{SECTION}, the term ``Windows32'' @@ -23888,6 +24141,8 @@ Windows32, and OS/2 versions. A list of targets is printed if the @command{make} command is given without a target. As an example, to build @command{gawk} using the DJGPP tools, enter @samp{make djgpp}. +(The DJGPP tools may be found at +@uref{ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/}.) Using @command{make} to run the standard tests and to install @command{gawk} requires additional Unix-like tools, including @command{sh}, @command{sed}, and @@ -23956,10 +24211,12 @@ $ make @end example -@strong{Note:} Even if the compiled @command{gawk.exe} (@code{a.out}) executable +@quotation NOTE +Even if the compiled @command{gawk.exe} (@code{a.out}) executable contains a DOS header, it does @emph{not} work under DOS. To compile an executable that runs under DOS, @code{"-DPIPES_SIMULATED"} must be added to @env{CPPFLAGS}. But then some nonstandard extensions of @command{gawk} (e.g., @samp{|&}) do not work! +@end quotation After compilation the internal tests can be performed. Enter @samp{make check CMP="diff -a"} at your command prompt. All tests @@ -23968,11 +24225,13 @@ @samp{make install} works as expected. -@strong{Note:} Most OS/2 ports of GNU @command{make} are not able to handle +@quotation NOTE +Most OS/2 ports of GNU @command{make} are not able to handle the Makefiles of this package. If you encounter any problems with @command{make} try GNU Make 3.79.1 or later versions. You should find the latest version on @uref{http://www.unixos2.org/sw/pub/binary/make/} or on @uref{ftp://hobbes.nmsu.edu/pub/os2/}. +@end quotation @node PC Dynamic @appendixsubsubsec Compiling @command{gawk} For Dynamic Libraries @@ -24181,10 +24440,12 @@ step on Cygwin takes considerably longer. However, it does finish, and then the @samp{make} proceeds as usual. -@strong{Note:} The @samp{|&} operator and TCP/IP networking +@quotation NOTE +The @samp{|&} operator and TCP/IP networking (@pxref{TCP/IP Networking}) are fully supported in the Cygwin environment. This is not true for any other environment for MS-DOS or MS-Windows. +@end quotation @node VMS Installation @appendixsubsec How to Compile and Install @command{gawk} on VMS @@ -24803,7 +25064,7 @@ To get @command{awka}, go to @uref{http://awka.sourceforge.net}. You can reach Andrew Sumner at @email{andrew@@zbcom.net}. -@cindex Beebe, Nelson H.F. +@cindex Beebe, Nelson H.F.@: @cindex @command{pawk} profiling Bell Labs @command{awk} @item @command{pawk} Nelson H.F.@: Beebe at the University of Utah has modified @@ -24846,8 +25107,7 @@ @cindex @command{gawk}, implementation issues, downward compatibility @cindex @command{gawk}, implementation issues, debugging @cindex troubleshooting, @command{gawk} -@c first comma is part of primary -@cindex implementation issues, @command{gawk}, debugging +@cindex implementation issues@comma{} @command{gawk}, debugging @xref{POSIX/GNU}, for a summary of the GNU extensions to the @command{awk} language and program. @@ -25002,9 +25262,10 @@ to free the storage. Instead, use @code{malloc} and @code{free}. @end itemize -@strong{Note:} +@quotation NOTE If I have to reformat your code to follow the coding style used in @command{gawk}, I may not bother to integrate your changes at all. +@end quotation @item Be prepared to sign the appropriate paperwork. @@ -25183,14 +25444,14 @@ facility is available on systems (such as GNU/Linux) that support the @code{dlopen} and @code{dlsym} functions. This @value{SECTION} describes how to write and use dynamically -loaded extentions for @command{gawk}. +loaded extensions for @command{gawk}. Experience with programming in C or C++ is necessary when reading this @value{SECTION}. @strong{Caution:} The facilities described in this @value{SECTION} -are very much subject to change in the next @command{gawk} release. +are very much subject to change in a future @command{gawk} release. Be aware that you may have to re-do everything, perhaps from scratch, -upon the next release. +at some future time. @menu * Internals:: A brief look at some @command{gawk} internals. @@ -25246,11 +25507,22 @@ It may end up calling an internal @command{gawk} function. It also guarantees that the string is zero-terminated. -@c comma is part of primary -@cindex parameters, number of +@cindex @code{get_curfunc_arg_count} internal function +@item size_t get_curfunc_arg_count(void) +This function returns the actual number of parameters passed +to the current function. Inside the code of an extension +this can be used to determine the maximum index which is +safe to use with @code{stack_ptr}. If this value is +greater than @code{tree->param_cnt}, the function was +called incorrectly from the @command{awk} program. + +@strong{Caution:} This function is new as of @command{gawk} 3.1.4. + +@cindex parameters@comma{} number of @cindex @code{param_cnt} internal variable @item n->param_cnt -The number of parameters actually passed in a function call at runtime. +Inside an extension function, this is the maximum number of +expected parameters, as set by the @code{make_builtin} function. @cindex @code{stptr} internal variable @cindex @code{stlen} internal variable @@ -25315,8 +25587,7 @@ can be stored appropriately. This is temporary storage; understanding of @command{gawk} memory management is helpful. -@c comma is part of primary -@cindex nodes, duplicating +@cindex nodes@comma{} duplicating @cindex @code{dupnode} internal function @item NODE *dupnode(NODE *n) Duplicate a node. In most cases, this increments an internal @@ -25354,8 +25625,30 @@ the @code{i}-th argument from the function call. The first argument is argument zero. -@c last comma is part of secondary -@cindex functions, return values, setting +@cindex @code{get_actual_argument} internal function +@item NODE *get_actual_argument(NODE *tree, unsigned int i, +@itemx @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ int@ optional,@ int@ wantarray); +This function retrieves a particular argument @code{i}. @code{wantarray} is @code{TRUE} +if the argument should be an array, @code{FALSE} otherwise. If @code{optional} is +@code{TRUE}, the argument need not have been supplied. If it wasn't, the return +value is @code{NULL}. It is a fatal error if @code{optional} is @code{TRUE} but +the argument was not provided. + +@strong{Caution:} This function is new as of @command{gawk} 3.1.4. + +@cindex @code{get_scalar_argument} internal macro +@item get_scalar_argument(t, i, opt) +This is a convenience macro that calls @code{get_actual_argument}. + +@strong{Caution:} This macro is new as of @command{gawk} 3.1.4. + +@cindex @code{get_array_argument} internal macro +@item get_array_argument(t, i, opt) +This is a convenience macro that calls @code{get_actual_argument}. + +@strong{Caution:} This macro is new as of @command{gawk} 3.1.4. + +@cindex functions, return values@comma{} setting @cindex @code{set_value} internal function @item void set_value(NODE *tree) This function is called from within a C extension function to set @@ -25417,21 +25710,27 @@ assoc_clear(the_arg); @end smallexample +As of version 3.1.4, the internals improved again, and became +even simpler: + +@smallexample +NODE *the_arg; + +the_arg = get_array_argument(tree, 2, FALSE); /* assume need 3rd arg, 0-based */ +@end smallexample + Again, you should spend time studying the @command{gawk} internals; don't just blindly copy this code. @c ENDOFRANGE gawint @node Sample Library @appendixsubsec Directory and File Operation Built-ins -@c comma is part of primary @c STARTOFRANGE chdirg -@cindex @code{chdir} function, implementing in @command{gawk} -@c comma is part of primary +@cindex @code{chdir} function@comma{} implementing in @command{gawk} @c STARTOFRANGE statg -@cindex @code{stat} function, implementing in @command{gawk} -@c last comma is part of secondary +@cindex @code{stat} function@comma{} implementing in @command{gawk} @c STARTOFRANGE filre -@cindex files, information about, retrieving +@cindex files, information about@comma{} retrieving @c STARTOFRANGE dirch @cindex directories, changing @@ -25615,7 +25914,10 @@ NODE *newdir; int ret = -1; - newdir = get_argument(tree, 0); + if (do_lint && get_curfunc_arg_count() != 1) + lintwarn("chdir: called with incorrect number of arguments"); + + newdir = get_scalar_argument(tree, 0); @end example The file includes the @code{"awk.h"} header file for definitions @@ -25638,14 +25940,11 @@ The result of @code{force_string} has to be freed with @code{free_temp}: @example - if (newdir != NULL) @{ - (void) force_string(newdir); - ret = chdir(newdir->stptr); - if (ret < 0) - update_ERRNO(); - - free_temp(newdir); - @} + (void) force_string(newdir); + ret = chdir(newdir->stptr); + if (ret < 0) + update_ERRNO(); + free_temp(newdir); @end example Finally, the function returns the return value to the @command{awk} level, @@ -25695,16 +25994,13 @@ NODE *file, *array; struct stat sbuf; int ret; - char *msg; NODE **aptr; char *pmode; /* printable mode */ char *type = "unknown"; - /* check arg count */ - if (tree->param_cnt != 2) - fatal( - "stat: called with %d arguments, should be 2", - tree->param_cnt); + + if (do_lint && get_curfunc_arg_count() > 2) + lintwarn("stat: called with too many arguments"); @end example Then comes the actual work. First, we get the arguments. @@ -25714,12 +26010,9 @@ @c comment made multiline for page breaking @example - /* - * directory is first arg, - * array to hold results is second - */ - file = get_argument(tree, 0); - array = get_argument(tree, 1); + /* directory is first arg, array to hold results is second */ + file = get_scalar_argument(tree, 0, FALSE); + array = get_array_argument(tree, 1, FALSE); /* empty out the array */ assoc_clear(array); @@ -25792,8 +26085,7 @@ @node Using Internal File Ops @appendixsubsubsec Integrating the Extensions -@c last comma is part of secondary -@cindex @command{gawk}, interpreter, adding code to +@cindex @command{gawk}, interpreter@comma{} adding code to Now that the code is written, it must be possible to add it at runtime to the running @command{gawk} interpreter. First, the code must be compiled. Assuming that the functions are in @@ -25940,17 +26232,15 @@ format specifiers. These should be evaluated for possible inclusion in @command{gawk}. -@ignore -@item A @samp{%'d} flag -Add @samp{%'d} for putting in commas in formatting numeric values. -@end ignore - @item Databases It may be possible to map a GDBM/NDBM/SDBM file into an @command{awk} array. @item Large character sets It would be nice if @command{gawk} could handle UTF-8 and other character sets that are larger than eight bits. +(@command{gawk} currently has partial multi-byte support, but it +needs an expert to really think out the multi-byte issues and consult +with the maintainer on the appropriate changes.) @item More @code{lint} warnings There are more things that could be checked for portability. @@ -26002,8 +26292,7 @@ C compiler and a special @command{gawk} library to provide all the needed functions (regexps, fields, associative arrays, type coercion, and so on). -@c last comma is part of secondary -@cindex @command{gawk}, interpreter, adding code to +@cindex @command{gawk}, interpreter@comma{} adding code to An easier possibility might be for an intermediate phase of @command{gawk} to convert the parse tree into a linear byte code form like the one used in GNU Emacs Lisp. The recursive evaluator would then be replaced by @@ -26290,8 +26579,7 @@ (You will also see ``input'' and ``output'' used as verbs.) @cindex data-driven languages -@c comma is part of primary -@cindex languages, data-driven +@cindex languages@comma{} data-driven @command{awk} manages the reading of data for you, as well as the breaking it up into records and fields. Your program's job is to tell @command{awk} what to with the data. You do this by describing @@ -26508,8 +26796,7 @@ @cindex negative zero @cindex positive zero -@c comma is part of primary -@cindex zero, negative vs.@: positive +@cindex zero@comma{} negative vs.@: positive Another peculiarity of floating-point numbers on modern systems is that they often have more than one representation for the number zero! In particular, it is possible to represent ``minus zero'' as well as diff -urN gawk-3.1.3/doc/gawkinet.texi gawk-3.1.4/doc/gawkinet.texi --- gawk-3.1.3/doc/gawkinet.texi 2003-05-08 19:26:07.000000000 +0300 +++ gawk-3.1.4/doc/gawkinet.texi 2004-07-28 16:39:03.000000000 +0300 @@ -62,17 +62,17 @@ @set TITLE TCP/IP Internetworking With @command{gawk} @set EDITION 1.1 -@set UPDATE-MONTH April, 2002 +@set UPDATE-MONTH January, 2004 @c gawk versions: @set VERSION 3.1 -@set PATCHLEVEL 1 +@set PATCHLEVEL 4 @copying This is Edition @value{EDITION} of @cite{@value{TITLE}}, for the @value{VERSION}.@value{PATCHLEVEL} (or later) version of the GNU implementation of AWK. @sp 2 -Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. +Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc. @sp 2 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or @@ -706,7 +706,7 @@ @end smallexample The exact behavior of this algorithm depends on the values of the -fields of the special @value{FN}. When in doubt, the following table +fields of the special @value{FN}. When in doubt, @ref{table-inet-components} gives you the combinations of values and their meaning. If this table is too complicated, focus on the three lines printed in @strong{bold}. All the examples in @@ -714,8 +714,10 @@ use only the patterns printed in bold letters. -@multitable {12345678901234} {123456} {123456} {1234567} {1234567890123456789012345} -@item @sc{protocol} @tab @sc{local port} @tab @sc{host name} +@float Table,table-inet-components +@caption{/inet Special File Components} +@multitable @columnfractions .15 .15 .15 .15 .40 +@headitem @sc{protocol} @tab @sc{local port} @tab @sc{host name} @tab @sc{remote port} @tab @sc{Resulting connection-level behavior} @item @strong{tcp} @tab @strong{0} @tab @strong{x} @tab @strong{x} @tab @strong{Dedicated client, fails if immediately connecting to a @@ -736,6 +738,7 @@ @item raw @tab 0 @tab x @tab x @tab Invalid @item raw @tab x @tab x @tab x @tab Invalid @end multitable +@end float In general, TCP is the preferred mechanism to use. It is the simplest protocol to understand and to use. Use the others only if circumstances diff -urN gawk-3.1.3/doc/no.colors gawk-3.1.4/doc/no.colors --- gawk-3.1.3/doc/no.colors 1997-10-19 18:27:49.000000000 +0200 +++ gawk-3.1.4/doc/no.colors 2004-05-31 16:10:39.000000000 +0300 @@ -1,4 +1,4 @@ -.\" AWK Reference Card --- Arnold Robbins, arnold@gnu.org +.\" AWK Reference Card --- Arnold Robbins, arnold@skeeve.com .\" This file is for troff which does not know what to do .\" with literal Poscript and cannot use the macros from 'colors'. .\" diff -urN gawk-3.1.3/eval.c gawk-3.1.4/eval.c --- gawk-3.1.3/eval.c 2003-06-22 11:56:04.000000000 +0300 +++ gawk-3.1.4/eval.c 2004-07-26 17:11:57.000000000 +0300 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2003 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2004 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -29,6 +29,7 @@ extern double modf P((double x, double *yp)); extern double fmod P((double x, double y)); +static inline void make_scalar P((NODE *tree)); static int eval_condition P((NODE *tree)); static NODE *op_assign P((NODE *tree)); static NODE *func_call P((NODE *tree)); @@ -90,9 +91,16 @@ * * Do NOT make this array static, it is used in several spots, not * just in this file. + * + * 6/2004: + * This table is also used for IGNORECASE for == and !=, and index(). + * Although with GLIBC, we could use tolower() everywhere and RE_ICASE + * for the regex matcher, precomputing this table once gives us a + * performance improvement. I also think it's better for portability + * to non-GLIBC systems. All the world is not (yet :-) GNU/Linux. */ #if 'a' == 97 /* it's ascii */ -const char casetable[] = { +char casetable[] = { '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', @@ -146,6 +154,33 @@ #undef C +/* load_casetable --- for a non-ASCII locale, redo the table */ + +void +load_casetable(void) +{ +#if defined(LC_CTYPE) + int i; + char *cp; + static int loaded = FALSE; + + if (loaded || do_traditional) + return; + + loaded = TRUE; + cp = setlocale(LC_CTYPE, NULL); + + /* this is not per standard, but it's pretty safe */ + if (cp == NULL || strcmp(cp, "C") == 0 || strcmp(cp, "POSIX") == 0) + return; + + for (i = 0200; i <= 0377; i++) { + if (isalpha(i) && islower(i) && i != toupper(i)) + casetable[i] = toupper(i); + } +#endif +} + /* * This table maps node types to strings for debugging. * KEEP IN SYNC WITH awk.h!!!! @@ -174,6 +209,7 @@ "Node_assign_plus", "Node_assign_minus", "Node_assign_exp", + "Node_assign_concat", "Node_and", "Node_or", "Node_equal", @@ -248,6 +284,7 @@ "Node_OFS", "Node_ORS", "Node_RS", + "Node_SUBSEP", "Node_TEXTDOMAIN", "Node_final --- this should never appear", NULL @@ -303,15 +340,15 @@ sp = buffer; space_left = BUFSIZ; for (i = 0; tab[i].name != NULL; i++) { - /* - * note the trick, we want 1 or 0 for whether we need - * the '|' character. - */ - space_needed = (strlen(tab[i].name) + (sp != buffer)); - if (space_left < space_needed) - fatal(_("buffer overflow in genflags2str")); - if ((flagval & tab[i].val) != 0) { + /* + * note the trick, we want 1 or 0 for whether we need + * the '|' character. + */ + space_needed = (strlen(tab[i].name) + (sp != buffer)); + if (space_left < space_needed) + fatal(_("buffer overflow in genflags2str")); + if (sp != buffer) { *sp++ = '|'; space_left--; @@ -327,6 +364,49 @@ } /* + * make_scalar --- make sure that tree is a scalar. + * + * tree is in a scalar context. If it is a variable, accomplish + * what's needed; otherwise, do nothing. + * + * Notice that nodes of type Node_var_new have undefined value in var_value + * (a.k.a. lnode)---even though awkgram.y:variable() initializes it, + * push_args() doesn't. Thus we have to initialize it. + */ + +static inline void +make_scalar P((NODE *tree)) +{ + switch (tree->type) { + case Node_var_array: + fatal(_("attempt to use array `%s' in a scalar context"), + array_vname(tree)); + + case Node_array_ref: + switch (tree->orig_array->type) { + case Node_var_array: + fatal(_("attempt to use array `%s' in a scalar context"), + array_vname(tree)); + case Node_var_new: + tree->orig_array->type = Node_var; + tree->orig_array->var_value = Nnull_string; + break; + case Node_var: + break; + default: + cant_happen(); + } + /* fall through */ + case Node_var_new: + tree->type = Node_var; + tree->var_value = Nnull_string; + default: + /* shut up GCC */ + break; + } +} + +/* * interpret: * Tree is a bunch of rules to run. Returns zero if it hit an exit() * statement @@ -436,16 +516,19 @@ else if (case_stmt->lnode->type == Node_regex) { NODE *t1; Regexp *rp; + /* see comments in match_op() code about this. */ + int kludge_need_start = FALSE; t1 = force_string(switch_value); rp = re_update(case_stmt->lnode); - match_found = (research(rp, t1->stptr, 0, t1->stlen, FALSE) >= 0); + if (avoid_dfa(tree, t1->stptr, t1->stlen)) + kludge_need_start = TRUE; + match_found = (research(rp, t1->stptr, 0, t1->stlen, kludge_need_start) >= 0); if (t1 != switch_value) free_temp(t1); - } else { + } else match_found = (cmp_nodes(switch_value, case_stmt->lnode) == 0); - } } /* If a match was found, execute the statements associated with the case. */ @@ -771,8 +854,12 @@ case Node_K_return: INCREMENT(tree->exec_count); t = tree_eval(tree->lnode); - ret_node = dupnode(t); - free_temp(t); + if ((t->flags & (PERM|TEMP)) != 0) + ret_node = t; + else { + ret_node = copynode(t); /* don't do a dupnode here */ + ret_node->flags |= TEMP; + } longjmp(func_tag, TAG_RETURN); break; @@ -808,8 +895,8 @@ #ifndef TREE_EVAL_MACRO if (tree == NULL) - return Nnull_string; - else if (tree->type == Node_val) { + cant_happen(); + if (tree->type == Node_val) { if (tree->stref <= 0) cant_happen(); return ((tree->flags & INTLSTR) != 0 @@ -842,17 +929,9 @@ tree->vname); } + make_scalar(tree); + switch (tree->type) { - case Node_array_ref: - if (tree->orig_array->type == Node_var_array) - fatal(_("attempt to use array `%s' in a scalar context"), - array_vname(tree)); - tree->orig_array->type = Node_var; - /* fall through */ - case Node_var_new: - tree->type = Node_var; - tree->var_value = Nnull_string; - /* fall through */ case Node_var: if (do_lint && var_uninitialized(tree)) lintwarn(_("reference to uninitialized variable `%s'"), @@ -875,7 +954,7 @@ return (*tree->builtin)(tree->subnode); case Node_K_getline: - return (do_getline(tree)); + return do_getline(tree); case Node_in_array: return tmp_number((AWKNUM) (in_array(tree->lnode, tree->rnode) != NULL)); @@ -899,14 +978,11 @@ case Node_CONVFMT: case Node_BINMODE: case Node_LINT: + case Node_SUBSEP: case Node_TEXTDOMAIN: lhs = get_lhs(tree, (Func_ptr *) NULL, TRUE); return *lhs; - case Node_var_array: - fatal(_("attempt to use array `%s' in a scalar context"), - array_vname(tree)); - case Node_unary_minus: t1 = tree_eval(tree->subnode); x = -force_number(t1); @@ -1024,6 +1100,60 @@ return r; /* assignments */ + case Node_assign_concat: + { + Func_ptr after_assign = NULL; + NODE *l, *r; + + /* + * Note that something lovely like this: + * + * BEGIN { a = "a"; a = a (a = "b"); print a } + * + * is not defined. It could print `ab' or `bb'. + * Gawk 3.1.3 prints `ab', so we do that too, simply + * by evaluating the LHS first. Ugh. + * + * Thanks to mary1john@earthlink.net for pointing + * out this issue. + */ + lhs = get_lhs(tree->lnode, &after_assign, FALSE); + *lhs = force_string(*lhs); + l = *lhs; + r = force_string(tree_eval(tree->rnode)); + + /* + * Don't clobber string constants! + * + * Also check stref; see test/strcat1.awk, + * the test for l->stref == 1 can't be an + * assertion. + * + * Thanks again to mary1john@earthlink.net for pointing + * out this issue. + */ + if (l != r && (l->flags & PERM) == 0 && l->stref == 1) { + size_t nlen = l->stlen + r->stlen + 2; + + erealloc(l->stptr, char *, nlen, "interpret"); + memcpy(l->stptr + l->stlen, r->stptr, r->stlen); + l->stlen += r->stlen; + } else { + char *nval; + size_t nlen = l->stlen + r->stlen + 2; + + emalloc(nval, char *, nlen, "interpret"); + memcpy(nval, l->stptr, l->stlen); + memcpy(nval + l->stlen, r->stptr, r->stlen); + unref(*lhs); + *lhs = make_str_node(nval, l->stlen + r->stlen, ALREADY_MALLOCED); + } + free_temp(r); + + if (after_assign) + (*after_assign)(); + return *lhs; + } case Node_assign: { Func_ptr after_assign = NULL; @@ -1151,7 +1281,7 @@ default: fatal(_("illegal type (%s) in tree_eval"), nodetype2str(tree->type)); } - return 0; + return (NODE *) 0; } /* eval_condition --- is TREE true or false? Returns 0==false, non-zero==true */ @@ -1251,6 +1381,7 @@ (const char *) cp2, mbs, l); } else #endif + /* Could use tolower() here; see discussion above. */ for (ret = 0; l-- > 0 && ret == 0; cp1++, cp2++) ret = casetable[*cp1] - casetable[*cp2]; } else @@ -1449,17 +1580,50 @@ nloops_active++; } +/* + * 2/2004: + * N.B. The code that uses fcalls[] *always* uses indexing. + * This avoids severe problems in case fcalls gets realloc()'ed + * during recursive tree_eval()'s or whatever, so that we don't + * have to carefully reassign pointers into the array. The + * minor speed gain from using a pointer was offset too much + * by the hassles to get the code right and commented. + * + * Thanks and a tip of the hatlo to Brian Kernighan. + */ + static struct fcall { const char *fname; /* function name */ - unsigned long count; /* how many args */ + size_t count; /* how many args */ NODE *arglist; /* list thereof */ NODE **prevstack; /* function stack frame of previous function */ NODE **stack; /* function stack frame of current function */ -} *fcall_list = NULL; +} *fcalls = NULL; static long fcall_list_size = 0; static long curfcall = -1; +/* + * get_curfunc_arg_count --- return number actual parameters + * + * This is for use by dynamically loaded C extension functions. + */ +size_t +get_curfunc_arg_count(void) +{ + NODE *argp; + size_t argc; + + assert(curfcall >= 0); + + /* count the # of expressions in argument expression list */ + for (argc = 0, argp = fcalls[curfcall].arglist; + argp != NULL; argp = argp->rnode) + argc++; + + return argc; +} + /* pop_fcall --- pop off a single function call */ static void @@ -1467,15 +1631,13 @@ { NODE *n, **sp; int count; - struct fcall *f; assert(curfcall >= 0); - f = & fcall_list[curfcall]; - stack_ptr = f->prevstack; + stack_ptr = fcalls[curfcall].prevstack; - sp = f->stack; + sp = fcalls[curfcall].stack; - for (count = f->count; count > 0; count--) { + for (count = fcalls[curfcall].count; count > 0; count--) { n = *sp++; if (n->type == Node_var) /* local variable */ unref(n->var_value); @@ -1483,9 +1645,10 @@ assoc_clear(n); freenode(n); } - if (f->stack) - free((char *) f->stack); - /* memset(f, '\0', sizeof(struct fcall)); */ + if (fcalls[curfcall].stack) { + free((char *) fcalls[curfcall].stack); + fcalls[curfcall].stack = NULL; + } curfcall--; } @@ -1507,33 +1670,31 @@ const char *func_name, char **varnames) { - struct fcall *f; NODE *arg, *r, **sp; int i; if (fcall_list_size == 0) { /* first time */ - emalloc(fcall_list, struct fcall *, 10 * sizeof(struct fcall), + emalloc(fcalls, struct fcall *, 10 * sizeof(struct fcall), "push_args"); fcall_list_size = 10; } if (++curfcall >= fcall_list_size) { fcall_list_size *= 2; - erealloc(fcall_list, struct fcall *, + erealloc(fcalls, struct fcall *, fcall_list_size * sizeof(struct fcall), "push_args"); } - f = & fcall_list[curfcall]; if (count > 0) - emalloc(f->stack, NODE **, count*sizeof(NODE *), "push_args"); + emalloc(fcalls[curfcall].stack, NODE **, count*sizeof(NODE *), "push_args"); else - f->stack = NULL; - f->count = count; - f->fname = func_name; /* not used, for debugging, just in case */ - f->arglist = argp; - f->prevstack = oldstack; + fcalls[curfcall].stack = NULL; + fcalls[curfcall].count = count; + fcalls[curfcall].fname = func_name; /* not used, for debugging, just in case */ + fcalls[curfcall].arglist = argp; + fcalls[curfcall].prevstack = oldstack; - sp = f->stack; + sp = fcalls[curfcall].stack; /* for each calling arg. add NODE * on stack */ for (i = 0; i < count; i++) { @@ -1542,16 +1703,16 @@ if (argp == NULL) { /* local variable */ r->type = Node_var_new; + r->var_value = Nnull_string; r->vname = varnames[i]; + r->rnode = NULL; continue; } arg = argp->lnode; /* call by reference for arrays; see below also */ - if (arg->type == Node_param_list) { - /* we must also reassign f here; see below */ - f = & fcall_list[curfcall]; - arg = f->prevstack[arg->param_cnt]; - } + if (arg->type == Node_param_list) + arg = fcalls[curfcall].prevstack[arg->param_cnt]; + if (arg->type == Node_var_array || arg->type == Node_var_new) { r->type = Node_array_ref; r->orig_array = arg; @@ -1571,15 +1732,6 @@ argp = argp->rnode; } - /* - * We have to reassign f. Why, you may ask? It is possible that - * other functions were called during the course of tree_eval()-ing - * the arguments to this function. As a result of that, fcall_list - * may have been realloc()'ed, with the result that f is now - * pointing into free()'d space. This was a nasty one to track down. - */ - f = & fcall_list[curfcall]; - if (argp != NULL) { /* Left over calling args. */ warning( @@ -1589,18 +1741,15 @@ do { arg = argp->lnode; if (arg->type == Node_param_list) - arg = f->prevstack[arg->param_cnt]; + arg = fcalls[curfcall].prevstack[arg->param_cnt]; if (arg->type != Node_var_array && arg->type != Node_array_ref && arg->type != Node_var_new) free_temp(tree_eval(arg)); - - /* reassign f, tree_eval could have moved it */ - f = & fcall_list[curfcall]; } while ((argp = argp->rnode) != NULL); } - stack_ptr = f->stack; + stack_ptr = fcalls[curfcall].stack; } /* func_call --- call a function, call by reference for arrays */ @@ -1679,8 +1828,6 @@ RESTORE_BINDING(loop_tag_stack, loop_tag, junk); } - if ((r->flags & PERM) == 0) - r->flags |= TEMP; return r; } @@ -1697,7 +1844,7 @@ fprintf(fp, _("\n\t# Function Call Stack:\n\n")); for (i = curfcall; i >= 0; i--) - fprintf(fp, "\t# %3d. %s\n", i+1, fcall_list[i].fname); + fprintf(fp, "\t# %3d. %s\n", i+1, fcalls[i].fname); fprintf(fp, _("\t# -- main --\n")); } #endif /* PROFILING */ @@ -1727,26 +1874,9 @@ ptr = stack_ptr[ptr->param_cnt]; } - switch (ptr->type) { - case Node_var_array: - fatal(_("attempt to use array `%s' in a scalar context"), - array_vname(ptr)); + make_scalar(ptr); - /* - * The following goop ensures that uninitialized variables - * used as parameters eventually get their type set correctly - * to scalar (i.e., Node_var). - */ - case Node_array_ref: - if (ptr->orig_array->type == Node_var_array) - fatal(_("attempt to use array `%s' in a scalar context"), - array_vname(ptr)); - ptr->orig_array->type = Node_var; - /* fall through */ - case Node_var_new: - ptr->type = Node_var; - ptr->var_value = Nnull_string; - /* fall through */ + switch (ptr->type) { case Node_var: if (do_lint && reference && var_uninitialized(ptr)) lintwarn(_("reference to uninitialized variable `%s'"), @@ -1800,7 +1930,7 @@ case Node_NF: if (NF == -1 || NF_node->var_value->numbr != NF) { if (NF == -1) - (void) get_field(HUGE-1, assign); /* parse record */ + (void) get_field(UNLIMITED-1, assign); /* parse record */ unref(NF_node->var_value); NF_node->var_value = make_number((AWKNUM) NF); } @@ -1851,6 +1981,12 @@ *assign = set_OFS; break; + case Node_SUBSEP: + aptr = &(SUBSEP_node->var_value); + if (assign != NULL) + *assign = set_SUBSEP; + break; + case Node_TEXTDOMAIN: aptr = &(TEXTDOMAIN_node->var_value); if (assign != NULL) @@ -1923,6 +2059,7 @@ register Regexp *rp; int i; int match = TRUE; + int kludge_need_start = FALSE; /* FIXME: --- see below */ if (tree->type == Node_nomatch) match = FALSE; @@ -1933,7 +2070,22 @@ tree = tree->rnode; } rp = re_update(tree); - i = research(rp, t1->stptr, 0, t1->stlen, FALSE); + /* + * FIXME: + * + * Any place where research() is called with a last parameter of + * FALSE, we need to use the avoid_dfa test. This appears here and + * in the code for Node_K_switch. + * + * A new or improved dfa that distinguishes beginning/end of + * string from beginning/end of line will allow us to get rid of + * this temporary hack. + * + * The avoid_dfa() function is in re.c; it is not very smart. + */ + if (avoid_dfa(tree, t1->stptr, t1->stlen)) + kludge_need_start = TRUE; + i = research(rp, t1->stptr, 0, t1->stlen, kludge_need_start); i = (i == -1) ^ (match == TRUE); free_temp(t1); return tmp_number((AWKNUM) i); @@ -1950,6 +2102,7 @@ warned = TRUE; lintwarn(_("`IGNORECASE' is a gawk extension")); } + load_casetable(); if (do_traditional) IGNORECASE = FALSE; else if ((IGNORECASE_node->var_value->flags & (STRING|STRCUR)) != 0) { @@ -2049,10 +2202,20 @@ { NODE *tmp = force_string(n); const char *p = tmp->stptr; +#if ! defined(PRINTF_HAS_F_FORMAT) || PRINTF_HAS_F_FORMAT != 1 + static const char float_formats[] = "efgEG"; +#else + static const char float_formats[] = "efgEFG"; +#endif +#if ENABLE_NLS && defined(HAVE_LOCALE_H) + static const char flags[] = " +-#'"; +#else + static const char flags[] = " +-#"; +#endif if (*p++ != '%') return 0; - while (*p && strchr(" +-#", *p) != NULL) /* flags */ + while (*p && strchr(flags, *p) != NULL) /* flags */ p++; while (*p && ISDIGIT(*p)) /* width - %*.*g is NOT allowed */ p++; @@ -2062,7 +2225,7 @@ p++; while (*p && ISDIGIT(*p)) /* precision */ p++; - if (*p == '\0' || strchr("efgEG", *p) == NULL) + if (*p == '\0' || strchr(float_formats, *p) == NULL) return 0; if (*++p != '\0') return 0; diff -urN gawk-3.1.3/ext.c gawk-3.1.4/ext.c --- gawk-3.1.3/ext.c 2003-07-07 21:18:38.000000000 +0300 +++ gawk-3.1.4/ext.c 2004-07-26 17:12:12.000000000 +0300 @@ -7,7 +7,7 @@ */ /* - * Copyright (C) 1995 - 2001, 2003 the Free Software Foundation, Inc. + * Copyright (C) 1995 - 2001, 2003, 2004 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -94,9 +94,37 @@ { NODE *p, *b, *f; char **vnames, *parm_names, *sp; - char buf[200]; + char c, buf[200]; int space_needed, i; + sp = name; + if (sp == NULL || *sp == '\0') + fatal(_("extension: missing function name")); + + while ((c = *sp++) != '\0') + if ((sp == &name[1] && c != '_' && ! ISALPHA(c)) + || (sp > &name[1] && ! is_identchar(c))) + fatal(_("extension: illegal character `%c' in function name `%s'"), c, name); + + f = lookup(name); + if (f != NULL) { + if (f->type == Node_func) { + if (f->rnode->type != Node_builtin) /* user-defined function */ + fatal(_("extension: can't redefine function `%s'"), name); + else { + /* multiple extension() calls etc. */ + if (do_lint) + lintwarn(_("extension: function `%s' already defined"), name); + return; + } + } else { + if (check_special(name) >= 0) + fatal(_("extension: can't use gawk built-in `%s' as function name"), name); + /* variable name etc. */ + fatal(_("extension: function name `%s' previously defined"), name); + } + } + /* count parameters, create artificial list of param names */ space_needed = 0; for (i = 0; i < count; i++) { @@ -142,23 +170,55 @@ get_argument(NODE *tree, int i) { extern NODE **stack_ptr; + int actual_args; - if (i < 0 || i >= tree->param_cnt) + actual_args = get_curfunc_arg_count(); + if (i < 0 || i >= tree->param_cnt || i >= actual_args) return NULL; tree = stack_ptr[i]; - if (tree->lnode == Nnull_string) - return NULL; - - if (tree->type == Node_array_ref) { + if (tree->type == Node_array_ref) tree = tree->orig_array; + if (tree->type == Node_var_new || tree->type == Node_var_array) return tree; + + return tree->lnode; +} + +/* get_actual_argument --- get a scalar or array, allowed to be optional */ + +NODE * +get_actual_argument(NODE *tree, unsigned int i, int optional, int want_array) +{ + /* optional : if TRUE and i th argument not present return NULL, else fatal. */ + + NODE *t; + + t = get_argument(tree, i); + + if (t == NULL) { + if (i >= tree->param_cnt) /* must be fatal */ + fatal(_("function `%s' defined to take no more than `%d' argument(s)"), + tree->param, tree->param_cnt); + if (! optional) + fatal(_("function `%s': missing argument #%d"), + tree->param, i + 1); + return NULL; } - if (tree->type == Node_var_array) - return tree; + if (t->type == Node_var_new) + return (want_array ? get_array(t) : tree_eval(t)); - return tree->lnode; + if (want_array) { + if (t->type != Node_var_array) + fatal(_("function `%s': argument #%d: attempt to use scalar as an array"), + tree->param, i + 1); + } else { + if (t->type != Node_val) + fatal(_("function `%s': argument #%d: attempt to use array as a scalar"), + tree->param, i + 1); + } + return t; } /* set_value --- set the return value of a dynamically linked function */ diff -urN gawk-3.1.3/extension/ChangeLog gawk-3.1.4/extension/ChangeLog --- gawk-3.1.3/extension/ChangeLog 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/extension/ChangeLog 2004-08-02 12:18:50.000000000 +0300 @@ -0,0 +1,25 @@ +Mon Aug 2 12:18:15 2004 Arnold D. Robbins + + * Release 3.1.4: Release tar file made. + +Mon Jun 21 17:02:37 2004 Arnold D. Robbins + + More from John Haque. + + * testarg.c, testarg.awk: New files. + * arrayparm.c (do_mkarray): Change call of `get_curfunc_parm_count' + to `get_curfunc_arg_count'. + * filefuncs.c (do_chdir, do_stat): Ditto. + * fork.c (do_fork, do_waitpid): Ditto. + * ordchr.c (do_ord, do_chr): Ditto. + * readfile.c (do_readfile): Ditto. + * steps: Updated. + +Mon Jun 14 14:01:16 2004 Arnold D. Robbins + + ChangeLog started. + + Changes from John Haque and ADR to rationalize extension functions. + + * extension/filefuncs.c: Revised for new functionality. See + corresponding entry in main ChangeLog. diff -urN gawk-3.1.3/extension/arrayparm.c gawk-3.1.4/extension/arrayparm.c --- gawk-3.1.3/extension/arrayparm.c 2003-07-07 21:19:07.000000000 +0300 +++ gawk-3.1.4/extension/arrayparm.c 2004-06-21 17:05:21.000000000 +0300 @@ -6,10 +6,11 @@ * 10/2001 * * Revised 7/2003 + * Revised 6/2004 */ /* - * Copyright (C) 2001, 2003 the Free Software Foundation, Inc. + * Copyright (C) 2001, 2003, 2004 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -47,7 +48,7 @@ NODE *var, *sub, *val; NODE **elemval; - if (do_lint && tree->param_cnt > 3) + if (do_lint && get_curfunc_arg_count() > 3) lintwarn("mkarray: called with too many arguments"); var = get_argument(tree, 0); diff -urN gawk-3.1.3/extension/filefuncs.c gawk-3.1.4/extension/filefuncs.c --- gawk-3.1.3/extension/filefuncs.c 2003-07-01 19:07:18.000000000 +0300 +++ gawk-3.1.4/extension/filefuncs.c 2004-06-21 17:05:51.000000000 +0300 @@ -3,10 +3,11 @@ * to the file system. * * Arnold Robbins, update for 3.1, Mon Nov 23 12:53:39 EST 1998 + * Arnold Robbins and John Haque, update for 3.1.4, applied Mon Jun 14 13:55:30 IDT 2004 */ /* - * Copyright (C) 2001 the Free Software Foundation, Inc. + * Copyright (C) 2001, 2004 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -39,20 +40,15 @@ NODE *newdir; int ret = -1; - if (do_lint && tree->param_cnt > 1) - lintwarn("chdir: called with too many arguments"); - - newdir = get_argument(tree, 0); - if (newdir != NULL) { - (void) force_string(newdir); - ret = chdir(newdir->stptr); - if (ret < 0) - update_ERRNO(); - - free_temp(newdir); - } else if (do_lint) - lintwarn("chdir: called with no arguments"); + if (do_lint && get_curfunc_arg_count() != 1) + lintwarn("chdir: called with incorrect number of arguments"); + newdir = get_scalar_argument(tree, 0, FALSE); + (void) force_string(newdir); + ret = chdir(newdir->stptr); + if (ret < 0) + update_ERRNO(); + free_temp(newdir); /* Set the return value */ set_value(tmp_number((AWKNUM) ret)); @@ -179,17 +175,12 @@ char *pmode; /* printable mode */ char *type = "unknown"; - /* check arg count */ - if (tree->param_cnt != 2) - fatal( - "stat: called with incorrect number of arguments (%d), should be 2", - tree->param_cnt); + if (do_lint && get_curfunc_arg_count() > 2) + lintwarn("stat: called with too many arguments"); /* directory is first arg, array to hold results is second */ - file = get_argument(tree, 0); - array = get_argument(tree, 1); - - array = get_array(array); + file = get_scalar_argument(tree, 0, FALSE); + array = get_array_argument(tree, 1, FALSE); /* empty out the array */ assoc_clear(array); diff -urN gawk-3.1.3/extension/fork.c gawk-3.1.4/extension/fork.c --- gawk-3.1.3/extension/fork.c 2002-08-21 14:49:13.000000000 +0300 +++ gawk-3.1.4/extension/fork.c 2004-06-21 17:06:25.000000000 +0300 @@ -1,9 +1,11 @@ /* * fork.c - Provide fork and waitpid functions for gawk. + * + * Revised 6/2004 */ /* - * Copyright (C) 2001 the Free Software Foundation, Inc. + * Copyright (C) 2001, 2004 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -34,7 +36,7 @@ int ret = -1; NODE **aptr; - if (do_lint && tree->param_cnt > 0) + if (do_lint && get_curfunc_arg_count() > 0) lintwarn("fork: called with too many arguments"); ret = fork(); @@ -71,7 +73,7 @@ pid_t pid; int options = 0; - if (do_lint && tree->param_cnt > 1) + if (do_lint && get_curfunc_arg_count() > 1) lintwarn("waitpid: called with too many arguments"); pidnode = get_argument(tree, 0); diff -urN gawk-3.1.3/extension/ordchr.c gawk-3.1.4/extension/ordchr.c --- gawk-3.1.3/extension/ordchr.c 2001-08-26 15:16:11.000000000 +0300 +++ gawk-3.1.4/extension/ordchr.c 2004-06-21 17:06:44.000000000 +0300 @@ -4,10 +4,11 @@ * Arnold Robbins * arnold@skeeve.com * 8/2001 + * Revised 6/2004 */ /* - * Copyright (C) 2001 the Free Software Foundation, Inc. + * Copyright (C) 2001, 2004 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -38,7 +39,7 @@ NODE *str; int ret = -1; - if (do_lint && tree->param_cnt > 1) + if (do_lint && get_curfunc_arg_count() > 1) lintwarn("ord: called with too many arguments"); str = get_argument(tree, 0); @@ -70,7 +71,7 @@ str[0] = str[1] = '\0'; - if (do_lint && tree->param_cnt > 1) + if (do_lint && get_curfunc_arg_count() > 1) lintwarn("chr: called with too many arguments"); num = get_argument(tree, 0); diff -urN gawk-3.1.3/extension/readfile.c gawk-3.1.4/extension/readfile.c --- gawk-3.1.3/extension/readfile.c 2003-06-09 17:05:38.000000000 +0300 +++ gawk-3.1.4/extension/readfile.c 2004-06-21 17:07:33.000000000 +0300 @@ -5,10 +5,12 @@ * Tue Apr 23 17:43:30 IDT 2002 * Revised per Peter Tillier * Mon Jun 9 17:05:11 IDT 2003 + * Revised for new dynamic function facilities + * Mon Jun 14 14:53:07 IDT 2004 */ /* - * Copyright (C) 2002, 2003 the Free Software Foundation, Inc. + * Copyright (C) 2002, 2003, 2004 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -47,7 +49,7 @@ char *text; int fd; - if (do_lint && tree->param_cnt > 1) + if (do_lint && get_curfunc_arg_count() > 1) lintwarn("readfile: called with too many arguments"); filename = get_argument(tree, 0); diff -urN gawk-3.1.3/extension/steps gawk-3.1.4/extension/steps --- gawk-3.1.3/extension/steps 2002-04-28 16:00:13.000000000 +0300 +++ gawk-3.1.4/extension/steps 2004-06-21 17:03:49.000000000 +0300 @@ -2,6 +2,7 @@ # Tue Nov 24 15:04:14 EST 1998 # Sun Aug 26 16:03:58 IDT 2001 # Sun Apr 28 15:59:57 IDT 2002 +# Mon Jun 21 17:03:37 IDT 2004 gcc -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. dl.c gcc -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. filefuncs.c @@ -9,9 +10,11 @@ gcc -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. ordchr.c gcc -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. arrayparm.c gcc -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. readfile.c +gcc -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. testarg.c ld -o dl.so -shared dl.o ld -o filefuncs.so -shared filefuncs.o ld -o fork.so -shared fork.o ld -o ordchr.so -shared ordchr.o ld -o arrayparm.so -shared arrayparm.o ld -o readfile.so -shared readfile.o +ld -o testarg.so -shared testarg.o diff -urN gawk-3.1.3/extension/testarg.awk gawk-3.1.4/extension/testarg.awk --- gawk-3.1.3/extension/testarg.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/extension/testarg.awk 2004-06-21 16:56:37.000000000 +0300 @@ -0,0 +1,6 @@ +BEGIN { + extension("./testarg.so", "dlload") + check_arg(x, a); + check_arg(y, b, z); + check_arg(p, q, r, s); +} diff -urN gawk-3.1.3/extension/testarg.c gawk-3.1.4/extension/testarg.c --- gawk-3.1.3/extension/testarg.c 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/extension/testarg.c 2004-06-21 17:07:53.000000000 +0300 @@ -0,0 +1,40 @@ +#include "awk.h" + +static NODE * +do_check_arg(tree) +NODE *tree; +{ + int ret = 0, argc; + NODE *arg1, *arg2, *arg3; + + argc = get_curfunc_arg_count(); + printf("arg count: defined = %d, supplied = %d\n", tree->param_cnt, argc); + + arg1 = get_scalar_argument(tree, 0, FALSE); + arg2 = get_array_argument(tree, 1, FALSE); + arg3 = get_scalar_argument(tree, 2, TRUE); /* optional */ + if (argc > 3) { /* try to use an extra arg */ + NODE *arg4; + arg4 = get_array_argument(tree, 3, TRUE); + } + if (arg3 != NULL) + printf("3rd arg present\n\n"); + else + printf("no 3rd arg\n\n"); + /* Set the return value */ + set_value(tmp_number((AWKNUM) ret)); + + /* Just to make the interpreter happy */ + return tmp_number((AWKNUM) 0); +} + +/* dlload --- load new builtins in this library */ + +NODE * +dlload(tree, dl) +NODE *tree; +void *dl; +{ + make_builtin("check_arg", do_check_arg, 3); + return tmp_number((AWKNUM) 0); +} diff -urN gawk-3.1.3/field.c gawk-3.1.4/field.c --- gawk-3.1.3/field.c 2003-06-15 19:52:46.000000000 +0300 +++ gawk-3.1.4/field.c 2004-07-28 16:41:17.000000000 +0300 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2003 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2004 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -362,7 +362,7 @@ memset(&mbs, 0, sizeof(mbstate_t)); #endif - if (up_to == HUGE) + if (up_to == UNLIMITED) nf = 0; if (len == 0) return nf; @@ -406,7 +406,7 @@ scan = end; } *buf = scan; - return (nf); + return nf; } /* @@ -432,7 +432,7 @@ register char *end = scan + len; char sav; - if (up_to == HUGE) + if (up_to == UNLIMITED) nf = 0; if (len == 0) return nf; @@ -499,7 +499,7 @@ register char *end = scan + len; char sav; - if (up_to == HUGE) + if (up_to == UNLIMITED) nf = 0; if (len == 0) return nf; @@ -561,7 +561,7 @@ register long nf = parse_high_water; register char *end = scan + len; - if (up_to == HUGE) + if (up_to == UNLIMITED) nf = 0; if (len == 0) return nf; @@ -618,7 +618,7 @@ memset(&mbs, 0, sizeof(mbstate_t)); #endif - if (up_to == HUGE) + if (up_to == UNLIMITED) nf = 0; if (len == 0) return nf; @@ -686,7 +686,7 @@ register long nf = parse_high_water; register char *end = scan + len; - if (up_to == HUGE) + if (up_to == UNLIMITED) nf = 0; if (len == 0) return nf; @@ -718,7 +718,7 @@ if (! field0_valid) { /* first, parse remainder of input record */ if (NF == -1) { - NF = (*parse_field)(HUGE-1, &parse_extent, + NF = (*parse_field)(UNLIMITED-1, &parse_extent, fields_arr[0]->stlen - (parse_extent - fields_arr[0]->stptr), save_FS, FS_regexp, set_field, @@ -761,7 +761,7 @@ */ if (parse_extent == fields_arr[0]->stptr + fields_arr[0]->stlen) NF = parse_high_water; - if (requested == HUGE-1) /* HUGE-1 means set NF */ + if (requested == UNLIMITED-1) /* UNLIMITED-1 means set NF */ requested = parse_high_water; } if (parse_high_water < requested) { /* requested beyond end of record */ @@ -870,7 +870,7 @@ assoc_clear(arr); s = src2->stptr; - tmp = tmp_number((AWKNUM) (*parseit)(HUGE, &s, (int) src2->stlen, + tmp = tmp_number((AWKNUM) (*parseit)(UNLIMITED, &s, (int) src2->stlen, fs2, rp, set_element, arr)); unref(src2); unref(fs2); @@ -887,7 +887,7 @@ register int i; static int fw_alloc = 4; static int warned = FALSE; - extern double strtod(); + extern unsigned long strtoul P((const char *, char **endptr, int base)); if (do_lint && ! warned) { warned = TRUE; @@ -901,7 +901,7 @@ * semantics, and force $0 to be split totally. */ if (fields_arr != NULL) - (void) get_field(HUGE - 1, 0); + (void) get_field(UNLIMITED - 1, 0); parse_field = fw_parse_field; scan = force_string(FIELDWIDTHS_node->var_value)->stptr; @@ -914,7 +914,7 @@ fw_alloc *= 2; erealloc(FIELDWIDTHS, int *, fw_alloc * sizeof(int), "set_FIELDWIDTHS"); } - FIELDWIDTHS[i] = (int) strtod(scan, &end); + FIELDWIDTHS[i] = (int) strtoul(scan, &end, 10); if (end == scan) break; if (FIELDWIDTHS[i] <= 0) @@ -942,7 +942,7 @@ * semantics, and force $0 to be split totally. */ if (fields_arr != NULL) - (void) get_field(HUGE - 1, 0); + (void) get_field(UNLIMITED - 1, 0); /* It's possible that only IGNORECASE changed, or FS = FS */ /* @@ -959,9 +959,9 @@ FS_regexp = (IGNORECASE ? FS_re_no_case : FS_re_yes_case); /* FS = FS */ - if (! using_FIELDWIDTHS()) + if (! using_FIELDWIDTHS()) { return; - else { + } else { remake_re = FALSE; goto choose_fs_function; } @@ -1032,13 +1032,13 @@ } if (buf[0] != '\0') { - FS_re_yes_case = make_regexp(buf, strlen(buf), FALSE); - FS_re_no_case = make_regexp(buf, strlen(buf), TRUE); + FS_re_yes_case = make_regexp(buf, strlen(buf), FALSE, TRUE); + FS_re_no_case = make_regexp(buf, strlen(buf), TRUE, TRUE); FS_regexp = (IGNORECASE ? FS_re_no_case : FS_re_yes_case); parse_field = re_parse_field; } else if (parse_field == re_parse_field) { - FS_re_yes_case = make_regexp(fs->stptr, fs->stlen, FALSE); - FS_re_no_case = make_regexp(fs->stptr, fs->stlen, TRUE); + FS_re_yes_case = make_regexp(fs->stptr, fs->stlen, FALSE, TRUE); + FS_re_no_case = make_regexp(fs->stptr, fs->stlen, TRUE, TRUE); FS_regexp = (IGNORECASE ? FS_re_no_case : FS_re_yes_case); } else FS_re_yes_case = FS_re_no_case = FS_regexp = NULL; diff -urN gawk-3.1.3/gawkmisc.c gawk-3.1.4/gawkmisc.c --- gawk-3.1.3/gawkmisc.c 2003-02-04 14:12:49.000000000 +0200 +++ gawk-3.1.4/gawkmisc.c 2004-07-28 16:41:24.000000000 +0300 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2003 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2004 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. diff -urN gawk-3.1.3/getopt.c gawk-3.1.4/getopt.c --- gawk-3.1.3/getopt.c 2002-10-28 10:16:13.000000000 +0200 +++ gawk-3.1.4/getopt.c 2003-09-13 01:31:19.000000000 +0300 @@ -2,7 +2,7 @@ NOTE: getopt is now part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! - Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002 + Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002,2003 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -692,12 +692,19 @@ if (__asprintf (&buf, _("%s: option `%s' is ambiguous\n"), argv[0], argv[optind]) >= 0) { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; if (_IO_fwide (stderr, 0) > 0) __fwprintf (stderr, L"%s", buf); else fputs (buf, stderr); + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + free (buf); } #else @@ -761,11 +768,20 @@ #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; + if (_IO_fwide (stderr, 0) > 0) __fwprintf (stderr, L"%s", buf); else fputs (buf, stderr); + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + free (buf); } #endif @@ -792,11 +808,20 @@ %s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]) >= 0) { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 + |= _IO_FLAGS2_NOTCANCEL; + if (_IO_fwide (stderr, 0) > 0) __fwprintf (stderr, L"%s", buf); else fputs (buf, stderr); + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + free (buf); } #else @@ -861,11 +886,19 @@ #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; + if (_IO_fwide (stderr, 0) > 0) __fwprintf (stderr, L"%s", buf); else fputs (buf, stderr); + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + free (buf); } #endif @@ -919,11 +952,19 @@ #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; + if (_IO_fwide (stderr, 0) > 0) __fwprintf (stderr, L"%s", buf); else fputs (buf, stderr); + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + free (buf); } #endif @@ -962,11 +1003,19 @@ _("%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; + if (_IO_fwide (stderr, 0) > 0) __fwprintf (stderr, L"%s", buf); else fputs (buf, stderr); + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + free (buf); } #else @@ -1025,11 +1074,19 @@ if (__asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"), argv[0], argv[optind]) >= 0) { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; + if (_IO_fwide (stderr, 0) > 0) __fwprintf (stderr, L"%s", buf); else fputs (buf, stderr); + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + free (buf); } #else @@ -1061,11 +1118,20 @@ %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; + if (_IO_fwide (stderr, 0) > 0) __fwprintf (stderr, L"%s", buf); else fputs (buf, stderr); + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + free (buf); } #else @@ -1094,11 +1160,20 @@ %s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]) >= 0) { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 + |= _IO_FLAGS2_NOTCANCEL; + if (_IO_fwide (stderr, 0) > 0) __fwprintf (stderr, L"%s", buf); else fputs (buf, stderr); + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + free (buf); } #else @@ -1160,11 +1235,19 @@ %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; + if (_IO_fwide (stderr, 0) > 0) __fwprintf (stderr, L"%s", buf); else fputs (buf, stderr); + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + free (buf); } #else diff -urN gawk-3.1.3/getopt.h gawk-3.1.4/getopt.h --- gawk-3.1.3/getopt.h 2002-10-28 10:16:13.000000000 +0200 +++ gawk-3.1.4/getopt.h 2004-02-04 17:33:45.000000000 +0200 @@ -1,5 +1,5 @@ /* Declarations for getopt. - Copyright (C) 1989-1994, 1996-1999, 2001 Free Software Foundation, Inc. + Copyright (C) 1989-1994, 1996-1999,2001,2003 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -34,6 +34,14 @@ # include #endif +#ifndef __THROW +# if defined __cplusplus /* ADR: nuke this: && __GNUC_PREREQ (2,8) */ +# define __THROW throw () +# else +# define __THROW +# endif +#endif + #ifdef __cplusplus extern "C" { #endif @@ -142,7 +150,8 @@ /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ -extern int getopt (int ___argc, char *const *___argv, const char *__shortopts); +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) + __THROW; # else /* not __GNU_LIBRARY__ */ extern int getopt (); # endif /* __GNU_LIBRARY__ */ @@ -150,10 +159,12 @@ # ifndef __need_getopt extern int getopt_long (int ___argc, char *const *___argv, const char *__shortopts, - const struct option *__longopts, int *__longind); + const struct option *__longopts, int *__longind) + __THROW; extern int getopt_long_only (int ___argc, char *const *___argv, const char *__shortopts, - const struct option *__longopts, int *__longind); + const struct option *__longopts, int *__longind) + __THROW; /* Internal only. Users should not call this directly. */ extern int _getopt_internal (int ___argc, char *const *___argv, diff -urN gawk-3.1.3/getopt1.c gawk-3.1.4/getopt1.c --- gawk-3.1.3/getopt1.c 2002-10-28 10:16:13.000000000 +0200 +++ gawk-3.1.4/getopt1.c 2002-08-07 00:10:35.000000000 +0300 @@ -22,7 +22,11 @@ #include #endif -#include "getopt.h" +#ifdef _LIBC +# include +#else +# include "getopt.h" +#endif #if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems @@ -90,6 +94,10 @@ return _getopt_internal (argc, argv, options, long_options, opt_index, 1); } +# ifdef _LIBC +libc_hidden_def (getopt_long) +libc_hidden_def (getopt_long_only) +# endif #endif /* Not ELIDE_CODE. */ diff -urN gawk-3.1.3/intl/ChangeLog gawk-3.1.4/intl/ChangeLog --- gawk-3.1.3/intl/ChangeLog 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/ChangeLog 2004-02-19 23:08:40.000000000 +0200 @@ -1,4 +1,4 @@ -2003-05-22 GNU +2004-01-29 GNU - * Version 0.12.1 released. + * Version 0.14.1 released. diff -urN gawk-3.1.3/intl/Makefile.in gawk-3.1.4/intl/Makefile.in --- gawk-3.1.3/intl/Makefile.in 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/Makefile.in 2004-02-19 23:08:40.000000000 +0200 @@ -73,6 +73,10 @@ eval-plural.h \ localcharset.h \ relocatable.h \ + xsize.h \ + printf-args.h printf-args.c \ + printf-parse.h wprintf-parse.h printf-parse.c \ + vasnprintf.h vasnwprintf.h vasnprintf.c \ os2compat.h \ libgnuintl.h.in SOURCES = \ @@ -96,6 +100,7 @@ relocatable.c \ localename.c \ log.c \ + printf.c \ osdep.c \ os2compat.c \ intl-compat.c @@ -120,6 +125,7 @@ relocatable.$lo \ localename.$lo \ log.$lo \ + printf.$lo \ osdep.$lo \ intl-compat.$lo DISTFILES.common = Makefile.in \ @@ -127,7 +133,8 @@ DISTFILES.generated = plural.c DISTFILES.normal = VERSION DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc \ -Makefile.vms libgnuintl.h.msvc-shared README.woe32 Makefile.msvc +libgnuintl.h_vms Makefile.vms \ +libgnuintl.h.msvc-static libgnuintl.h.msvc-shared README.woe32 Makefile.msvc DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \ COPYING.LIB-2 gettext.h libgettext.h plural-eval.c libgnuintl.h @@ -155,9 +162,9 @@ # according to the libtool documentation, section "Library interface versions". # Maintainers of other packages that include the intl directory must *not* # change these values. -LTV_CURRENT=5 +LTV_CURRENT=7 LTV_REVISION=0 -LTV_AGE=3 +LTV_AGE=4 .SUFFIXES: .SUFFIXES: .c .y .o .lo .sin .sed @@ -209,6 +216,8 @@ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localename.c log.lo: $(srcdir)/log.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/log.c +printf.lo: $(srcdir)/printf.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/printf.c osdep.lo: $(srcdir)/osdep.c $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/osdep.c intl-compat.lo: $(srcdir)/intl-compat.c @@ -224,7 +233,11 @@ INCLUDES = -I. -I$(srcdir) -I.. libgnuintl.h: $(srcdir)/libgnuintl.h.in - cp $(srcdir)/libgnuintl.h.in libgnuintl.h + sed -e 's,@''HAVE_POSIX_PRINTF''@,@HAVE_POSIX_PRINTF@,g' \ + -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \ + -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \ + -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \ + < $(srcdir)/libgnuintl.h.in > libgnuintl.h libintl.h: libgnuintl.h cp libgnuintl.h libintl.h @@ -250,7 +263,7 @@ $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \ if test "@RELOCATABLE@" = yes; then \ dependencies=`sed -n -e 's,^dependency_libs=\(.*\),\1,p' < $(DESTDIR)$(libdir)/libintl.la | sed -e "s,^',," -e "s,'\$$,,"`; \ - if test -n "$dependencies"; then \ + if test -n "$$dependencies"; then \ rm -f $(DESTDIR)$(libdir)/libintl.la; \ fi; \ fi; \ @@ -412,6 +425,7 @@ dcigettext.$lo: $(srcdir)/eval-plural.h localcharset.$lo: $(srcdir)/localcharset.h localealias.$lo localcharset.$lo relocatable.$lo: $(srcdir)/relocatable.h +printf.$lo: $(srcdir)/printf-args.h $(srcdir)/printf-args.c $(srcdir)/printf-parse.h $(srcdir)/wprintf-parse.h $(srcdir)/xsize.h $(srcdir)/printf-parse.c $(srcdir)/vasnprintf.h $(srcdir)/vasnwprintf.h $(srcdir)/vasnprintf.c tags: TAGS diff -urN gawk-3.1.3/intl/VERSION gawk-3.1.4/intl/VERSION --- gawk-3.1.3/intl/VERSION 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/VERSION 2004-02-19 23:08:40.000000000 +0200 @@ -1 +1 @@ -GNU gettext library from gettext-0.12.1 +GNU gettext library from gettext-0.14.1 diff -urN gawk-3.1.3/intl/bindtextdom.c gawk-3.1.4/intl/bindtextdom.c --- gawk-3.1.3/intl/bindtextdom.c 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/bindtextdom.c 2004-02-19 23:08:40.000000000 +0200 @@ -1,5 +1,5 @@ /* Implementation of the bindtextdomain(3) function - Copyright (C) 1995-1998, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -86,11 +86,6 @@ # define BIND_TEXTDOMAIN_CODESET libintl_bind_textdomain_codeset #endif -/* Prototypes for local functions. */ -static void set_binding_values PARAMS ((const char *domainname, - const char **dirnamep, - const char **codesetp)); - /* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP to be used for the DOMAINNAME message catalog. If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not @@ -98,10 +93,8 @@ If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither modified nor returned. */ static void -set_binding_values (domainname, dirnamep, codesetp) - const char *domainname; - const char **dirnamep; - const char **codesetp; +set_binding_values (const char *domainname, + const char **dirnamep, const char **codesetp) { struct binding *binding; int modified; @@ -348,9 +341,7 @@ /* Specify that the DOMAINNAME message catalog will be found in DIRNAME rather than in the system locale data base. */ char * -BINDTEXTDOMAIN (domainname, dirname) - const char *domainname; - const char *dirname; +BINDTEXTDOMAIN (const char *domainname, const char *dirname) { set_binding_values (domainname, &dirname, NULL); return (char *) dirname; @@ -359,9 +350,7 @@ /* Specify the character encoding in which the messages from the DOMAINNAME message catalog will be returned. */ char * -BIND_TEXTDOMAIN_CODESET (domainname, codeset) - const char *domainname; - const char *codeset; +BIND_TEXTDOMAIN_CODESET (const char *domainname, const char *codeset) { set_binding_values (domainname, NULL, &codeset); return (char *) codeset; diff -urN gawk-3.1.3/intl/config.charset gawk-3.1.4/intl/config.charset --- gawk-3.1.3/intl/config.charset 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/config.charset 2004-02-19 23:08:40.000000000 +0200 @@ -1,7 +1,7 @@ #! /bin/sh # Output a system dependent table of character encoding aliases. # -# Copyright (C) 2000-2003 Free Software Foundation, Inc. +# Copyright (C) 2000-2004 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Library General Public License as published @@ -30,77 +30,77 @@ # MIME charset name is preferred. # The current list of GNU canonical charset names is as follows. # -# name used by which systems a MIME name? -# ASCII, ANSI_X3.4-1968 glibc solaris freebsd -# ISO-8859-1 glibc aix hpux irix osf solaris freebsd yes -# ISO-8859-2 glibc aix hpux irix osf solaris freebsd yes -# ISO-8859-3 glibc solaris yes -# ISO-8859-4 osf solaris freebsd yes -# ISO-8859-5 glibc aix hpux irix osf solaris freebsd yes -# ISO-8859-6 glibc aix hpux solaris yes -# ISO-8859-7 glibc aix hpux irix osf solaris yes -# ISO-8859-8 glibc aix hpux osf solaris yes -# ISO-8859-9 glibc aix hpux irix osf solaris yes -# ISO-8859-13 glibc -# ISO-8859-14 glibc -# ISO-8859-15 glibc aix osf solaris freebsd -# KOI8-R glibc solaris freebsd yes -# KOI8-U glibc freebsd yes -# 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 dos -# CP869 dos -# CP874 woe32 dos -# CP922 aix -# CP932 aix woe32 dos -# CP943 aix -# CP949 osf woe32 dos -# CP950 woe32 dos -# CP1046 aix -# CP1124 aix -# CP1125 dos -# CP1129 aix -# CP1250 woe32 -# CP1251 glibc solaris woe32 -# CP1252 aix woe32 -# CP1253 woe32 -# CP1254 woe32 -# CP1255 glibc woe32 -# CP1256 woe32 -# CP1257 woe32 -# GB2312 glibc aix hpux irix solaris freebsd yes -# EUC-JP glibc aix hpux irix osf solaris freebsd yes -# EUC-KR glibc aix hpux irix osf solaris freebsd yes -# EUC-TW glibc aix hpux irix osf solaris -# BIG5 glibc aix hpux osf solaris freebsd yes -# BIG5-HKSCS glibc solaris -# GBK glibc aix osf solaris woe32 dos -# GB18030 glibc solaris -# SHIFT_JIS hpux osf solaris freebsd yes -# JOHAB glibc solaris woe32 -# TIS-620 glibc aix hpux osf solaris -# VISCII glibc yes -# TCVN5712-1 glibc -# GEORGIAN-PS 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 glibc aix hpux osf solaris yes +# name MIME? used by which systems +# ASCII, ANSI_X3.4-1968 glibc solaris freebsd darwin +# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd darwin +# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd darwin +# ISO-8859-3 Y glibc solaris +# ISO-8859-4 Y osf solaris freebsd darwin +# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd darwin +# ISO-8859-6 Y glibc aix hpux solaris +# ISO-8859-7 Y glibc aix hpux irix osf solaris +# ISO-8859-8 Y glibc aix hpux osf solaris +# ISO-8859-9 Y glibc aix hpux irix osf solaris +# ISO-8859-13 glibc +# ISO-8859-14 glibc +# ISO-8859-15 glibc aix osf solaris freebsd +# KOI8-R Y glibc solaris freebsd darwin +# KOI8-U Y glibc freebsd darwin +# 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 darwin dos +# CP869 dos +# CP874 woe32 dos +# CP922 aix +# CP932 aix woe32 dos +# CP943 aix +# CP949 osf woe32 dos +# CP950 woe32 dos +# CP1046 aix +# CP1124 aix +# CP1125 dos +# CP1129 aix +# CP1250 woe32 +# CP1251 glibc solaris darwin woe32 +# CP1252 aix woe32 +# CP1253 woe32 +# CP1254 woe32 +# CP1255 glibc woe32 +# CP1256 woe32 +# CP1257 woe32 +# GB2312 Y glibc aix hpux irix solaris freebsd darwin +# EUC-JP Y glibc aix hpux irix osf solaris freebsd darwin +# EUC-KR Y glibc aix hpux irix osf solaris freebsd darwin +# EUC-TW glibc aix hpux irix osf solaris +# BIG5 Y glibc aix hpux osf solaris freebsd darwin +# BIG5-HKSCS glibc solaris +# GBK glibc aix osf solaris woe32 dos +# GB18030 glibc solaris +# SHIFT_JIS Y hpux osf solaris freebsd darwin +# JOHAB glibc solaris woe32 +# TIS-620 glibc aix hpux osf solaris +# VISCII Y glibc +# TCVN5712-1 glibc +# GEORGIAN-PS 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 # # Note: Names which are not marked as being a MIME name should not be used in # Internet protocols for information interchange (mail, news, etc.). @@ -121,6 +121,105 @@ # 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 @@ -297,6 +396,47 @@ echo "BIG5 BIG5" echo "SJIS SHIFT_JIS" ;; + darwin*) + # 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" + ;; beos*) # BeOS has a single locale, and it has UTF-8 encoding. echo "* UTF-8" @@ -410,6 +550,7 @@ 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" diff -urN gawk-3.1.3/intl/dcgettext.c gawk-3.1.4/intl/dcgettext.c --- gawk-3.1.3/intl/dcgettext.c 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/dcgettext.c 2004-02-19 23:08:40.000000000 +0200 @@ -1,5 +1,5 @@ /* Implementation of the dcgettext(3) function. - Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -44,10 +44,7 @@ /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY locale. */ char * -DCGETTEXT (domainname, msgid, category) - const char *domainname; - const char *msgid; - int category; +DCGETTEXT (const char *domainname, const char *msgid, int category) { return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category); } diff -urN gawk-3.1.3/intl/dcigettext.c gawk-3.1.4/intl/dcigettext.c --- gawk-3.1.3/intl/dcigettext.c 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/dcigettext.c 2004-02-19 23:08:40.000000000 +0200 @@ -148,13 +148,17 @@ char *getwd (); # define getcwd(buf, max) getwd (buf) # else +# if VMS +# define getcwd(buf, max) (getcwd) (buf, max, 0) +# else char *getcwd (); +# endif # endif # ifndef HAVE_STPCPY -static char *stpcpy PARAMS ((char *dest, const char *src)); +static char *stpcpy (char *dest, const char *src); # endif # ifndef HAVE_MEMPCPY -static void *mempcpy PARAMS ((void *dest, const void *src, size_t n)); +static void *mempcpy (void *dest, const void *src, size_t n); # endif #endif @@ -248,11 +252,8 @@ # endif /* Function to compare two entries in the table of known translations. */ -static int transcmp PARAMS ((const void *p1, const void *p2)); static int -transcmp (p1, p2) - const void *p1; - const void *p2; +transcmp (const void *p1, const void *p2) { const struct known_translation_t *s1; const struct known_translation_t *s2; @@ -304,19 +305,18 @@ struct binding *_nl_domain_bindings; /* Prototypes for local functions. */ -static char *plural_lookup PARAMS ((struct loaded_l10nfile *domain, - unsigned long int n, - const char *translation, - size_t translation_len)) +static char *plural_lookup (struct loaded_l10nfile *domain, + unsigned long int n, + const char *translation, size_t translation_len) internal_function; -static const char *guess_category_value PARAMS ((int category, - const char *categoryname)) +static const char *guess_category_value (int category, + const char *categoryname) internal_function; #ifdef _LIBC # include "../locale/localeinfo.h" # define category_to_name(category) _nl_category_names[category] #else -static const char *category_to_name PARAMS ((int category)) internal_function; +static const char *category_to_name (int category) internal_function; #endif @@ -424,13 +424,8 @@ CATEGORY locale and, if PLURAL is nonzero, search over string depending on the plural form determined by N. */ char * -DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category) - const char *domainname; - const char *msgid1; - const char *msgid2; - int plural; - unsigned long int n; - int category; +DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2, + int plural, unsigned long int n, int category) { #ifndef HAVE_ALLOCA struct block_list *block_list = NULL; @@ -703,11 +698,10 @@ #ifndef _LIBC if (!ENABLE_SECURE) { - extern void _nl_log_untranslated PARAMS ((const char *logfilename, - const char *domainname, - const char *msgid1, - const char *msgid2, - int plural)); + extern void _nl_log_untranslated (const char *logfilename, + const char *domainname, + const char *msgid1, const char *msgid2, + int plural); const char *logfilename = getenv ("GETTEXT_LOG_UNTRANSLATED"); if (logfilename != NULL && logfilename[0] != '\0') @@ -724,11 +718,9 @@ char * internal_function -_nl_find_msg (domain_file, domainbinding, msgid, lengthp) - struct loaded_l10nfile *domain_file; - struct binding *domainbinding; - const char *msgid; - size_t *lengthp; +_nl_find_msg (struct loaded_l10nfile *domain_file, + struct binding *domainbinding, const char *msgid, + size_t *lengthp) { struct loaded_domain *domain; nls_uint32 nstrings; @@ -1035,11 +1027,8 @@ /* Look up a plural variant. */ static char * internal_function -plural_lookup (domain, n, translation, translation_len) - struct loaded_l10nfile *domain; - unsigned long int n; - const char *translation; - size_t translation_len; +plural_lookup (struct loaded_l10nfile *domain, unsigned long int n, + const char *translation, size_t translation_len) { struct loaded_domain *domaindata = (struct loaded_domain *) domain->data; unsigned long int index; @@ -1076,8 +1065,7 @@ /* Return string representation of locale CATEGORY. */ static const char * internal_function -category_to_name (category) - int category; +category_to_name (int category) { const char *retval; @@ -1137,9 +1125,7 @@ /* Guess value of current locale from value of the environment variables. */ static const char * internal_function -guess_category_value (category, categoryname) - int category; - const char *categoryname; +guess_category_value (int category, const char *categoryname) { const char *language; const char *retval; @@ -1180,9 +1166,7 @@ to be defined. */ #if !_LIBC && !HAVE_STPCPY static char * -stpcpy (dest, src) - char *dest; - const char *src; +stpcpy (char *dest, const char *src) { while ((*dest++ = *src++) != '\0') /* Do nothing. */ ; @@ -1192,10 +1176,7 @@ #if !_LIBC && !HAVE_MEMPCPY static void * -mempcpy (dest, src, n) - void *dest; - const void *src; - size_t n; +mempcpy (void *dest, const void *src, size_t n) { return (void *) ((char *) memcpy (dest, src, n) + n); } diff -urN gawk-3.1.3/intl/dcngettext.c gawk-3.1.4/intl/dcngettext.c --- gawk-3.1.3/intl/dcngettext.c 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/dcngettext.c 2004-02-19 23:08:40.000000000 +0200 @@ -1,5 +1,5 @@ /* Implementation of the dcngettext(3) function. - Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -44,12 +44,9 @@ /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY locale. */ char * -DCNGETTEXT (domainname, msgid1, msgid2, n, category) - const char *domainname; - const char *msgid1; - const char *msgid2; - unsigned long int n; - int category; +DCNGETTEXT (const char *domainname, + const char *msgid1, const char *msgid2, unsigned long int n, + int category) { return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category); } diff -urN gawk-3.1.3/intl/dgettext.c gawk-3.1.4/intl/dgettext.c --- gawk-3.1.3/intl/dgettext.c 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/dgettext.c 2004-02-19 23:08:40.000000000 +0200 @@ -1,5 +1,5 @@ /* Implementation of the dgettext(3) function. - Copyright (C) 1995-1997, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -20,9 +20,10 @@ # include #endif +#include "gettextP.h" + #include -#include "gettextP.h" #ifdef _LIBC # include #else @@ -46,9 +47,7 @@ /* Look up MSGID in the DOMAINNAME message catalog of the current LC_MESSAGES locale. */ char * -DGETTEXT (domainname, msgid) - const char *domainname; - const char *msgid; +DGETTEXT (const char *domainname, const char *msgid) { return DCGETTEXT (domainname, msgid, LC_MESSAGES); } diff -urN gawk-3.1.3/intl/dngettext.c gawk-3.1.4/intl/dngettext.c --- gawk-3.1.3/intl/dngettext.c 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/dngettext.c 2004-02-19 23:08:40.000000000 +0200 @@ -1,5 +1,5 @@ /* Implementation of the dngettext(3) function. - Copyright (C) 1995-1997, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -20,9 +20,10 @@ # include #endif +#include "gettextP.h" + #include -#include "gettextP.h" #ifdef _LIBC # include #else @@ -46,11 +47,8 @@ /* Look up MSGID in the DOMAINNAME message catalog of the current LC_MESSAGES locale and skip message according to the plural form. */ char * -DNGETTEXT (domainname, msgid1, msgid2, n) - const char *domainname; - const char *msgid1; - const char *msgid2; - unsigned long int n; +DNGETTEXT (const char *domainname, + const char *msgid1, const char *msgid2, unsigned long int n) { return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES); } diff -urN gawk-3.1.3/intl/eval-plural.h gawk-3.1.4/intl/eval-plural.h --- gawk-3.1.3/intl/eval-plural.h 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/eval-plural.h 2004-02-19 23:08:40.000000000 +0200 @@ -1,5 +1,5 @@ /* Plural expression evaluation. - Copyright (C) 2000-2002 Free Software Foundation, Inc. + Copyright (C) 2000-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -21,16 +21,10 @@ #endif /* Evaluate the plural expression and return an index value. */ -STATIC unsigned long int plural_eval PARAMS ((struct expression *pexp, - unsigned long int n)) - internal_function; - STATIC unsigned long int internal_function -plural_eval (pexp, n) - struct expression *pexp; - unsigned long int n; +plural_eval (struct expression *pexp, unsigned long int n) { switch (pexp->nargs) { diff -urN gawk-3.1.3/intl/explodename.c gawk-3.1.4/intl/explodename.c --- gawk-3.1.3/intl/explodename.c 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/explodename.c 2004-02-19 23:08:40.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1995-1998, 2000-2001, 2003 Free Software Foundation, Inc. Contributed by Ulrich Drepper , 1995. This program is free software; you can redistribute it and/or modify it @@ -38,8 +38,7 @@ /* @@ end of prolog @@ */ char * -_nl_find_language (name) - const char *name; +_nl_find_language (const char *name) { while (name[0] != '\0' && name[0] != '_' && name[0] != '@' && name[0] != '+' && name[0] != ',') @@ -50,17 +49,11 @@ int -_nl_explode_name (name, language, modifier, territory, codeset, - normalized_codeset, special, sponsor, revision) - char *name; - const char **language; - const char **modifier; - const char **territory; - const char **codeset; - const char **normalized_codeset; - const char **special; - const char **sponsor; - const char **revision; +_nl_explode_name (char *name, + const char **language, const char **modifier, + const char **territory, const char **codeset, + const char **normalized_codeset, const char **special, + const char **sponsor, const char **revision) { enum { undecided, xpg, cen } syntax; char *cp; diff -urN gawk-3.1.3/intl/finddomain.c gawk-3.1.4/intl/finddomain.c --- gawk-3.1.3/intl/finddomain.c 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/finddomain.c 2004-02-19 23:08:40.000000000 +0200 @@ -1,5 +1,5 @@ /* Handle list of needed message catalogs - Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2000-2001, 2003 Free Software Foundation, Inc. Written by Ulrich Drepper , 1995. This program is free software; you can redistribute it and/or modify it @@ -47,11 +47,8 @@ established bindings. */ struct loaded_l10nfile * internal_function -_nl_find_domain (dirname, locale, domainname, domainbinding) - const char *dirname; - char *locale; - const char *domainname; - struct binding *domainbinding; +_nl_find_domain (const char *dirname, char *locale, + const char *domainname, struct binding *domainbinding) { struct loaded_l10nfile *retval; const char *language; diff -urN gawk-3.1.3/intl/gettext.c gawk-3.1.4/intl/gettext.c --- gawk-3.1.3/intl/gettext.c 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/gettext.c 2004-02-19 23:08:40.000000000 +0200 @@ -1,5 +1,5 @@ /* Implementation of gettext(3) function. - Copyright (C) 1995, 1997, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -52,8 +52,7 @@ LC_MESSAGES locale. If not found, returns MSGID itself (the default text). */ char * -GETTEXT (msgid) - const char *msgid; +GETTEXT (const char *msgid) { return DCGETTEXT (NULL, msgid, LC_MESSAGES); } diff -urN gawk-3.1.3/intl/gettextP.h gawk-3.1.4/intl/gettextP.h --- gawk-3.1.3/intl/gettextP.h 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/gettextP.h 2004-02-19 23:08:40.000000000 +0200 @@ -36,14 +36,6 @@ /* @@ end of prolog @@ */ -#ifndef PARAMS -# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES -# define PARAMS(args) args -# else -# define PARAMS(args) () -# endif -#endif - #ifndef internal_function # define internal_function #endif @@ -159,64 +151,63 @@ extern int _nl_msg_cat_cntr; #ifndef _LIBC -const char *_nl_locale_name PARAMS ((int category, const char *categoryname)); +const char *_nl_locale_name (int category, const char *categoryname); #endif -struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname, - char *__locale, - const char *__domainname, - struct binding *__domainbinding)) +struct loaded_l10nfile *_nl_find_domain (const char *__dirname, char *__locale, + const char *__domainname, + struct binding *__domainbinding) internal_function; -void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain, - struct binding *__domainbinding)) +void _nl_load_domain (struct loaded_l10nfile *__domain, + struct binding *__domainbinding) internal_function; -void _nl_unload_domain PARAMS ((struct loaded_domain *__domain)) +void _nl_unload_domain (struct loaded_domain *__domain) internal_function; -const char *_nl_init_domain_conv PARAMS ((struct loaded_l10nfile *__domain_file, - struct loaded_domain *__domain, - struct binding *__domainbinding)) +const char *_nl_init_domain_conv (struct loaded_l10nfile *__domain_file, + struct loaded_domain *__domain, + struct binding *__domainbinding) internal_function; -void _nl_free_domain_conv PARAMS ((struct loaded_domain *__domain)) +void _nl_free_domain_conv (struct loaded_domain *__domain) internal_function; -char *_nl_find_msg PARAMS ((struct loaded_l10nfile *domain_file, - struct binding *domainbinding, - const char *msgid, size_t *lengthp)) +char *_nl_find_msg (struct loaded_l10nfile *domain_file, + struct binding *domainbinding, const char *msgid, + size_t *lengthp) internal_function; #ifdef _LIBC -extern char *__gettext PARAMS ((const char *__msgid)); -extern char *__dgettext PARAMS ((const char *__domainname, - const char *__msgid)); -extern char *__dcgettext PARAMS ((const char *__domainname, - const char *__msgid, int __category)); -extern char *__ngettext PARAMS ((const char *__msgid1, const char *__msgid2, - unsigned long int __n)); -extern char *__dngettext PARAMS ((const char *__domainname, - const char *__msgid1, const char *__msgid2, - unsigned long int n)); -extern char *__dcngettext PARAMS ((const char *__domainname, - const char *__msgid1, const char *__msgid2, - unsigned long int __n, int __category)); -extern char *__dcigettext PARAMS ((const char *__domainname, - const char *__msgid1, const char *__msgid2, - int __plural, unsigned long int __n, - int __category)); -extern char *__textdomain PARAMS ((const char *__domainname)); -extern char *__bindtextdomain PARAMS ((const char *__domainname, - const char *__dirname)); -extern char *__bind_textdomain_codeset PARAMS ((const char *__domainname, - const char *__codeset)); +extern char *__gettext (const char *__msgid); +extern char *__dgettext (const char *__domainname, const char *__msgid); +extern char *__dcgettext (const char *__domainname, const char *__msgid, + int __category); +extern char *__ngettext (const char *__msgid1, const char *__msgid2, + unsigned long int __n); +extern char *__dngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int n); +extern char *__dcngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category); +extern char *__dcigettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + int __plural, unsigned long int __n, + int __category); +extern char *__textdomain (const char *__domainname); +extern char *__bindtextdomain (const char *__domainname, + const char *__dirname); +extern char *__bind_textdomain_codeset (const char *__domainname, + const char *__codeset); #else /* Declare the exported libintl_* functions, in a way that allows us to call them under their real name. */ +# undef _INTL_REDIRECT_INLINE +# undef _INTL_REDIRECT_MACROS # define _INTL_REDIRECT_MACROS # include "libgnuintl.h" -extern char *libintl_dcigettext PARAMS ((const char *__domainname, - const char *__msgid1, - const char *__msgid2, - int __plural, unsigned long int __n, - int __category)); +extern char *libintl_dcigettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + int __plural, unsigned long int __n, + int __category); #endif /* @@ begin of epilog @@ */ diff -urN gawk-3.1.3/intl/gmo.h gawk-3.1.4/intl/gmo.h --- gawk-3.1.3/intl/gmo.h 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/gmo.h 2004-02-19 23:08:40.000000000 +0200 @@ -1,5 +1,5 @@ /* Description of GNU message catalog format: general file layout. - Copyright (C) 1995, 1997, 2000-2002 Free Software Foundation, Inc. + Copyright (C) 1995, 1997, 2000-2002, 2004 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -29,6 +29,7 @@ /* Revision number of the currently used .mo (binary) file format. */ #define MO_REVISION_NUMBER 0 +#define MO_REVISION_NUMBER_WITH_SYSDEP_I 1 /* The following contortions are an attempt to use the C preprocessor to determine an unsigned integral type that is 32 bits wide. An @@ -76,7 +77,7 @@ /* The revision number of the file format. */ nls_uint32 revision; - /* The following are only used in .mo files with major revision 0. */ + /* The following are only used in .mo files with major revision 0 or 1. */ /* The number of strings pairs. */ nls_uint32 nstrings; diff -urN gawk-3.1.3/intl/hash-string.h gawk-3.1.4/intl/hash-string.h --- gawk-3.1.3/intl/hash-string.h 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/hash-string.h 2004-02-19 23:08:40.000000000 +0200 @@ -1,5 +1,5 @@ /* Description of GNU message catalog format: string hashing function. - Copyright (C) 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1995, 1997-1998, 2000-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -18,14 +18,6 @@ /* @@ end of prolog @@ */ -#ifndef PARAMS -# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES -# define PARAMS(Args) Args -# else -# define PARAMS(Args) () -# endif -#endif - /* We assume to have `unsigned long int' value with at least 32 bits. */ #define HASHWORDBITS 32 @@ -33,11 +25,8 @@ /* Defines the so called `hashpjw' function by P.J. Weinberger [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, 1986, 1987 Bell Telephone Laboratories, Inc.] */ -static unsigned long int hash_string PARAMS ((const char *__str_param)); - static inline unsigned long int -hash_string (str_param) - const char *str_param; +hash_string (const char *str_param) { unsigned long int hval, g; const char *str = str_param; @@ -47,7 +36,7 @@ while (*str != '\0') { hval <<= 4; - hval += (unsigned long int) *str++; + hval += (unsigned char) *str++; g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4)); if (g != 0) { diff -urN gawk-3.1.3/intl/intl-compat.c gawk-3.1.4/intl/intl-compat.c --- gawk-3.1.3/intl/intl-compat.c 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/intl-compat.c 2004-02-19 23:08:40.000000000 +0200 @@ -58,8 +58,7 @@ DLL_EXPORTED char * -gettext (msgid) - const char *msgid; +gettext (const char *msgid) { return libintl_gettext (msgid); } @@ -67,9 +66,7 @@ DLL_EXPORTED char * -dgettext (domainname, msgid) - const char *domainname; - const char *msgid; +dgettext (const char *domainname, const char *msgid) { return libintl_dgettext (domainname, msgid); } @@ -77,10 +74,7 @@ DLL_EXPORTED char * -dcgettext (domainname, msgid, category) - const char *domainname; - const char *msgid; - int category; +dcgettext (const char *domainname, const char *msgid, int category) { return libintl_dcgettext (domainname, msgid, category); } @@ -88,10 +82,7 @@ DLL_EXPORTED char * -ngettext (msgid1, msgid2, n) - const char *msgid1; - const char *msgid2; - unsigned long int n; +ngettext (const char *msgid1, const char *msgid2, unsigned long int n) { return libintl_ngettext (msgid1, msgid2, n); } @@ -99,11 +90,8 @@ DLL_EXPORTED char * -dngettext (domainname, msgid1, msgid2, n) - const char *domainname; - const char *msgid1; - const char *msgid2; - unsigned long int n; +dngettext (const char *domainname, + const char *msgid1, const char *msgid2, unsigned long int n) { return libintl_dngettext (domainname, msgid1, msgid2, n); } @@ -111,12 +99,9 @@ DLL_EXPORTED char * -dcngettext (domainname, msgid1, msgid2, n, category) - const char *domainname; - const char *msgid1; - const char *msgid2; - unsigned long int n; - int category; +dcngettext (const char *domainname, + const char *msgid1, const char *msgid2, unsigned long int n, + int category) { return libintl_dcngettext (domainname, msgid1, msgid2, n, category); } @@ -124,8 +109,7 @@ DLL_EXPORTED char * -textdomain (domainname) - const char *domainname; +textdomain (const char *domainname) { return libintl_textdomain (domainname); } @@ -133,9 +117,7 @@ DLL_EXPORTED char * -bindtextdomain (domainname, dirname) - const char *domainname; - const char *dirname; +bindtextdomain (const char *domainname, const char *dirname) { return libintl_bindtextdomain (domainname, dirname); } @@ -143,9 +125,7 @@ DLL_EXPORTED char * -bind_textdomain_codeset (domainname, codeset) - const char *domainname; - const char *codeset; +bind_textdomain_codeset (const char *domainname, const char *codeset) { return libintl_bind_textdomain_codeset (domainname, codeset); } diff -urN gawk-3.1.3/intl/l10nflist.c gawk-3.1.4/intl/l10nflist.c --- gawk-3.1.3/intl/l10nflist.c 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/l10nflist.c 2004-02-19 23:08:40.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc. Contributed by Ulrich Drepper , 1995. This program is free software; you can redistribute it and/or modify it @@ -58,7 +58,7 @@ # endif #else # ifndef HAVE_STPCPY -static char *stpcpy PARAMS ((char *dest, const char *src)); +static char *stpcpy (char *dest, const char *src); # endif #endif @@ -84,12 +84,8 @@ #if !defined _LIBC && !defined HAVE___ARGZ_COUNT /* Returns the number of strings in ARGZ. */ -static size_t argz_count__ PARAMS ((const char *argz, size_t len)); - static size_t -argz_count__ (argz, len) - const char *argz; - size_t len; +argz_count__ (const char *argz, size_t len) { size_t count = 0; while (len > 0) @@ -112,13 +108,8 @@ #if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY /* Make '\0' separated arg vector ARGZ printable by converting all the '\0's except the last into the character SEP. */ -static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep)); - static void -argz_stringify__ (argz, len, sep) - char *argz; - size_t len; - int sep; +argz_stringify__ (char *argz, size_t len, int sep) { while (len > 0) { @@ -139,14 +130,8 @@ #endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */ #if !defined _LIBC && !defined HAVE___ARGZ_NEXT -static char *argz_next__ PARAMS ((char *argz, size_t argz_len, - const char *entry)); - static char * -argz_next__ (argz, argz_len, entry) - char *argz; - size_t argz_len; - const char *entry; +argz_next__ (char *argz, size_t argz_len, const char *entry) { if (entry) { @@ -167,11 +152,8 @@ /* Return number of bits set in X. */ -static int pop PARAMS ((int x)); - static inline int -pop (x) - int x; +pop (int x) { /* We assume that no more than 16 bits are used. */ x = ((x & ~0x5555) >> 1) + (x & 0x5555); @@ -184,23 +166,13 @@ struct loaded_l10nfile * -_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language, - territory, codeset, normalized_codeset, modifier, special, - sponsor, revision, filename, do_allocate) - struct loaded_l10nfile **l10nfile_list; - const char *dirlist; - size_t dirlist_len; - int mask; - const char *language; - const char *territory; - const char *codeset; - const char *normalized_codeset; - const char *modifier; - const char *special; - const char *sponsor; - const char *revision; - const char *filename; - int do_allocate; +_nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list, + const char *dirlist, size_t dirlist_len, + int mask, const char *language, const char *territory, + const char *codeset, const char *normalized_codeset, + const char *modifier, const char *special, + const char *sponsor, const char *revision, + const char *filename, int do_allocate) { char *abs_filename; struct loaded_l10nfile **lastp; @@ -393,9 +365,7 @@ names. The return value is dynamically allocated and has to be freed by the caller. */ const char * -_nl_normalize_codeset (codeset, name_len) - const char *codeset; - size_t name_len; +_nl_normalize_codeset (const char *codeset, size_t name_len) { int len = 0; int only_digit = 1; @@ -442,9 +412,7 @@ to be defined. */ #if !_LIBC && !HAVE_STPCPY static char * -stpcpy (dest, src) - char *dest; - const char *src; +stpcpy (char *dest, const char *src) { while ((*dest++ = *src++) != '\0') /* Do nothing. */ ; diff -urN gawk-3.1.3/intl/libgnuintl.h.in gawk-3.1.4/intl/libgnuintl.h.in --- gawk-3.1.3/intl/libgnuintl.h.in 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/libgnuintl.h.in 2004-02-19 23:08:40.000000000 +0200 @@ -47,16 +47,6 @@ # undef gettext #endif -/* Use _INTL_PARAMS, not PARAMS, in order to avoid clashes with identifiers - used by programs. Similarly, test __PROTOTYPES, not PROTOTYPES. */ -#ifndef _INTL_PARAMS -# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES -# define _INTL_PARAMS(args) args -# else -# define _INTL_PARAMS(args) () -# endif -#endif - #ifdef __cplusplus extern "C" { #endif @@ -93,7 +83,7 @@ If he doesn't, we choose the method. A third possible method is _INTL_REDIRECT_ASM, supported only by GCC. */ #if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS) -# if __GNUC__ >= 2 && !defined __APPLE_CC__ && (defined __STDC__ || defined __cplusplus) +# if __GNUC__ >= 2 && !defined __APPLE_CC__ && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus) # define _INTL_REDIRECT_ASM # else # ifdef __cplusplus @@ -125,7 +115,7 @@ #ifdef _INTL_REDIRECT_MACROS # define gettext libintl_gettext #endif -extern char *gettext _INTL_PARAMS ((const char *__msgid)) +extern char *gettext (const char *__msgid) _INTL_ASM (libintl_gettext); #endif @@ -141,8 +131,7 @@ #ifdef _INTL_REDIRECT_MACROS # define dgettext libintl_dgettext #endif -extern char *dgettext _INTL_PARAMS ((const char *__domainname, - const char *__msgid)) +extern char *dgettext (const char *__domainname, const char *__msgid) _INTL_ASM (libintl_dgettext); #endif @@ -160,9 +149,8 @@ #ifdef _INTL_REDIRECT_MACROS # define dcgettext libintl_dcgettext #endif -extern char *dcgettext _INTL_PARAMS ((const char *__domainname, - const char *__msgid, - int __category)) +extern char *dcgettext (const char *__domainname, const char *__msgid, + int __category) _INTL_ASM (libintl_dcgettext); #endif @@ -181,9 +169,8 @@ #ifdef _INTL_REDIRECT_MACROS # define ngettext libintl_ngettext #endif -extern char *ngettext _INTL_PARAMS ((const char *__msgid1, - const char *__msgid2, - unsigned long int __n)) +extern char *ngettext (const char *__msgid1, const char *__msgid2, + unsigned long int __n) _INTL_ASM (libintl_ngettext); #endif @@ -201,10 +188,9 @@ #ifdef _INTL_REDIRECT_MACROS # define dngettext libintl_dngettext #endif -extern char *dngettext _INTL_PARAMS ((const char *__domainname, - const char *__msgid1, - const char *__msgid2, - unsigned long int __n)) +extern char *dngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n) _INTL_ASM (libintl_dngettext); #endif @@ -224,11 +210,9 @@ #ifdef _INTL_REDIRECT_MACROS # define dcngettext libintl_dcngettext #endif -extern char *dcngettext _INTL_PARAMS ((const char *__domainname, - const char *__msgid1, - const char *__msgid2, - unsigned long int __n, - int __category)) +extern char *dcngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category) _INTL_ASM (libintl_dcngettext); #endif @@ -246,7 +230,7 @@ #ifdef _INTL_REDIRECT_MACROS # define textdomain libintl_textdomain #endif -extern char *textdomain _INTL_PARAMS ((const char *__domainname)) +extern char *textdomain (const char *__domainname) _INTL_ASM (libintl_textdomain); #endif @@ -264,8 +248,7 @@ #ifdef _INTL_REDIRECT_MACROS # define bindtextdomain libintl_bindtextdomain #endif -extern char *bindtextdomain _INTL_PARAMS ((const char *__domainname, - const char *__dirname)) +extern char *bindtextdomain (const char *__domainname, const char *__dirname) _INTL_ASM (libintl_bindtextdomain); #endif @@ -283,12 +266,103 @@ #ifdef _INTL_REDIRECT_MACROS # define bind_textdomain_codeset libintl_bind_textdomain_codeset #endif -extern char *bind_textdomain_codeset _INTL_PARAMS ((const char *__domainname, - const char *__codeset)) +extern char *bind_textdomain_codeset (const char *__domainname, + const char *__codeset) _INTL_ASM (libintl_bind_textdomain_codeset); #endif +/* Support for format strings with positions in *printf(), following the + POSIX/XSI specification. + Note: These replacements for the *printf() functions are visible only + in source files that #include or #include "gettext.h". + Packages that use *printf() in source files that don't refer to _() + or gettext() but for which the format string could be the return value + of _() or gettext() need to add this #include. Oh well. */ + +#if !@HAVE_POSIX_PRINTF@ + +#include +#include + +/* Get va_list. */ +#if __STDC__ || defined __cplusplus || defined _MSC_VER +# include +#else +# include +#endif + +#undef fprintf +#define fprintf libintl_fprintf +extern int fprintf (FILE *, const char *, ...); +#undef vfprintf +#define vfprintf libintl_vfprintf +extern int vfprintf (FILE *, const char *, va_list); + +#undef printf +#define printf libintl_printf +extern int printf (const char *, ...); +#undef vprintf +#define vprintf libintl_vprintf +extern int vprintf (const char *, va_list); + +#undef sprintf +#define sprintf libintl_sprintf +extern int sprintf (char *, const char *, ...); +#undef vsprintf +#define vsprintf libintl_vsprintf +extern int vsprintf (char *, const char *, va_list); + +#if @HAVE_SNPRINTF@ + +#undef snprintf +#define snprintf libintl_snprintf +extern int snprintf (char *, size_t, const char *, ...); +#undef vsnprintf +#define vsnprintf libintl_vsnprintf +extern int vsnprintf (char *, size_t, const char *, va_list); + +#endif + +#if @HAVE_ASPRINTF@ + +#undef asprintf +#define asprintf libintl_asprintf +extern int asprintf (char **, const char *, ...); +#undef vasprintf +#define vasprintf libintl_vasprintf +extern int vasprintf (char **, const char *, va_list); + +#endif + +#if @HAVE_WPRINTF@ + +#undef fwprintf +#define fwprintf libintl_fwprintf +extern int fwprintf (FILE *, const wchar_t *, ...); +#undef vfwprintf +#define vfwprintf libintl_vfwprintf +extern int vfwprintf (FILE *, const wchar_t *, va_list); + +#undef wprintf +#define wprintf libintl_wprintf +extern int wprintf (const wchar_t *, ...); +#undef vwprintf +#define vwprintf libintl_vwprintf +extern int vwprintf (const wchar_t *, va_list); + +#undef swprintf +#define swprintf libintl_swprintf +extern int swprintf (wchar_t *, size_t, const wchar_t *, ...); +#undef vswprintf +#define vswprintf libintl_vswprintf +extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list); + +#endif + +#endif + + /* Support for relocatable packages. */ /* Sets the original and the current installation prefix of the package. @@ -298,8 +372,8 @@ instead of "/"). */ #define libintl_set_relocation_prefix libintl_set_relocation_prefix extern void - libintl_set_relocation_prefix _INTL_PARAMS ((const char *orig_prefix, - const char *curr_prefix)); + libintl_set_relocation_prefix (const char *orig_prefix, + const char *curr_prefix); #ifdef __cplusplus diff -urN gawk-3.1.3/intl/loadinfo.h gawk-3.1.4/intl/loadinfo.h --- gawk-3.1.3/intl/loadinfo.h 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/loadinfo.h 2004-02-19 23:08:40.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-1999, 2000-2002 Free Software Foundation, Inc. +/* Copyright (C) 1996-1999, 2000-2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -32,14 +32,6 @@ in gettextP.h. */ -#ifndef PARAMS -# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES -# define PARAMS(args) args -# else -# define PARAMS(args) () -# endif -#endif - #ifndef internal_function # define internal_function #endif @@ -89,8 +81,8 @@ names. Normalization allows the user to use any of the common names. The return value is dynamically allocated and has to be freed by the caller. */ -extern const char *_nl_normalize_codeset PARAMS ((const char *codeset, - size_t name_len)); +extern const char *_nl_normalize_codeset (const char *codeset, + size_t name_len); /* Lookup a locale dependent file. *L10NFILE_LIST denotes a pool of lookup results of locale dependent @@ -107,19 +99,18 @@ furthermore its ->successor[] field contains a list of other lookup results from which this lookup result inherits. */ extern struct loaded_l10nfile * -_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list, - const char *dirlist, size_t dirlist_len, int mask, - const char *language, const char *territory, - const char *codeset, - const char *normalized_codeset, - const char *modifier, const char *special, - const char *sponsor, const char *revision, - const char *filename, int do_allocate)); +_nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list, + const char *dirlist, size_t dirlist_len, int mask, + const char *language, const char *territory, + const char *codeset, const char *normalized_codeset, + const char *modifier, const char *special, + const char *sponsor, const char *revision, + const char *filename, int do_allocate); /* Lookup the real locale name for a locale alias NAME, or NULL if NAME is not a locale alias (but possibly a real locale name). The return value is statically allocated and must not be freed. */ -extern const char *_nl_expand_alias PARAMS ((const char *name)); +extern const char *_nl_expand_alias (const char *name); /* Split a locale name NAME into its pieces: language, modifier, territory, codeset, special, sponsor, revision. @@ -139,18 +130,16 @@ CEN_SPONSOR for *SPONSOR, CEN_REVISION for *REVISION. */ -extern int _nl_explode_name PARAMS ((char *name, const char **language, - const char **modifier, - const char **territory, - const char **codeset, - const char **normalized_codeset, - const char **special, - const char **sponsor, - const char **revision)); +extern int _nl_explode_name (char *name, const char **language, + const char **modifier, const char **territory, + const char **codeset, + const char **normalized_codeset, + const char **special, const char **sponsor, + const char **revision); /* Split a locale name NAME into a leading language part and all the rest. Return a pointer to the first character after the language, i.e. to the first byte of the rest. */ -extern char *_nl_find_language PARAMS ((const char *name)); +extern char *_nl_find_language (const char *name); #endif /* loadinfo.h */ diff -urN gawk-3.1.3/intl/loadmsgcat.c gawk-3.1.4/intl/loadmsgcat.c --- gawk-3.1.3/intl/loadmsgcat.c 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/loadmsgcat.c 2004-02-19 23:08:40.000000000 +0200 @@ -1,5 +1,5 @@ /* Load needed message catalogs. - Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -491,11 +491,6 @@ #endif -/* Prototypes for local functions. Needed to ensure compiler checking of - function argument counts despite of K&R C function definition syntax. */ -static const char *get_sysdep_segment_value PARAMS ((const char *name)); - - /* We need a sign, whether a new catalog was loaded, which can be associated with all translations. This is important if the translations are cached by one of GCC's features. */ @@ -504,8 +499,7 @@ /* Expand a system dependent string segment. Return NULL if unsupported. */ static const char * -get_sysdep_segment_value (name) - const char *name; +get_sysdep_segment_value (const char *name) { /* Test for an ISO C 99 section 7.8.1 format string directive. Syntax: @@ -754,6 +748,18 @@ } } } + /* Test for a glibc specific printf() format directive flag. */ + if (name[0] == 'I' && name[1] == '\0') + { +#if defined _LIBC || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) + /* The 'I' flag, in numeric format directives, replaces ASCII digits + with the 'outdigits' defined in the LC_CTYPE locale facet. This is + used for Farsi (Persian) and maybe Arabic. */ + return "I"; +#else + return ""; +#endif + } /* Other system dependent strings are not valid. */ return NULL; } @@ -762,10 +768,9 @@ Return the header entry. */ const char * internal_function -_nl_init_domain_conv (domain_file, domain, domainbinding) - struct loaded_l10nfile *domain_file; - struct loaded_domain *domain; - struct binding *domainbinding; +_nl_init_domain_conv (struct loaded_l10nfile *domain_file, + struct loaded_domain *domain, + struct binding *domainbinding) { /* Find out about the character set the file is encoded with. This can be found (in textual form) in the entry "". If this @@ -829,7 +834,7 @@ outcharset = _NL_CURRENT (LC_CTYPE, CODESET); # else # if HAVE_ICONV - extern const char *locale_charset PARAMS ((void)); + extern const char *locale_charset (void); outcharset = locale_charset (); # endif # endif @@ -881,8 +886,7 @@ /* Frees the codeset dependent parts of an opened message catalog. */ void internal_function -_nl_free_domain_conv (domain) - struct loaded_domain *domain; +_nl_free_domain_conv (struct loaded_domain *domain) { if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1) free (domain->conv_tab); @@ -902,9 +906,8 @@ message catalog do nothing. */ void internal_function -_nl_load_domain (domain_file, domainbinding) - struct loaded_l10nfile *domain_file; - struct binding *domainbinding; +_nl_load_domain (struct loaded_l10nfile *domain_file, + struct binding *domainbinding) { int fd; size_t size; @@ -1028,10 +1031,11 @@ /* Fill in the information about the available tables. */ revision = W (domain->must_swap, data->revision); - /* We support only the major revision 0. */ + /* We support only the major revisions 0 and 1. */ switch (revision >> 16) { case 0: + case 1: domain->nstrings = W (domain->must_swap, data->nstrings); domain->orig_tab = (const struct string_desc *) ((char *) data + W (domain->must_swap, data->orig_tab_offset)); @@ -1071,12 +1075,13 @@ const char **sysdep_segment_values; const nls_uint32 *orig_sysdep_tab; const nls_uint32 *trans_sysdep_tab; + nls_uint32 n_inmem_sysdep_strings; size_t memneed; char *mem; struct sysdep_string_desc *inmem_orig_sysdep_tab; struct sysdep_string_desc *inmem_trans_sysdep_tab; nls_uint32 *inmem_hash_tab; - unsigned int i; + unsigned int i, j; /* Get the values of the system dependent segments. */ n_sysdep_segments = @@ -1111,153 +1116,247 @@ + W (domain->must_swap, data->trans_sysdep_tab_offset)); /* Compute the amount of additional memory needed for the - system dependent strings and the augmented hash table. */ - memneed = 2 * n_sysdep_strings - * sizeof (struct sysdep_string_desc) - + domain->hash_size * sizeof (nls_uint32); - for (i = 0; i < 2 * n_sysdep_strings; i++) + system dependent strings and the augmented hash table. + At the same time, also drop string pairs which refer to + an undefined system dependent segment. */ + n_inmem_sysdep_strings = 0; + memneed = domain->hash_size * sizeof (nls_uint32); + for (i = 0; i < n_sysdep_strings; i++) { - const struct sysdep_string *sysdep_string = - (const struct sysdep_string *) - ((char *) data - + W (domain->must_swap, - i < n_sysdep_strings - ? orig_sysdep_tab[i] - : trans_sysdep_tab[i - n_sysdep_strings])); - size_t need = 0; - const struct segment_pair *p = sysdep_string->segments; - - if (W (domain->must_swap, p->sysdepref) != SEGMENTS_END) - for (p = sysdep_string->segments;; p++) - { - nls_uint32 sysdepref; - - need += W (domain->must_swap, p->segsize); - - sysdepref = W (domain->must_swap, p->sysdepref); - if (sysdepref == SEGMENTS_END) - break; + int valid = 1; + size_t needs[2]; + + for (j = 0; j < 2; j++) + { + const struct sysdep_string *sysdep_string = + (const struct sysdep_string *) + ((char *) data + + W (domain->must_swap, + j == 0 + ? orig_sysdep_tab[i] + : trans_sysdep_tab[i])); + size_t need = 0; + const struct segment_pair *p = sysdep_string->segments; - if (sysdepref >= n_sysdep_segments) + if (W (domain->must_swap, p->sysdepref) != SEGMENTS_END) + for (p = sysdep_string->segments;; p++) { - /* Invalid. */ - freea (sysdep_segment_values); - goto invalid; - } + nls_uint32 sysdepref; - need += strlen (sysdep_segment_values[sysdepref]); - } + need += W (domain->must_swap, p->segsize); - memneed += need; - } + sysdepref = W (domain->must_swap, p->sysdepref); + if (sysdepref == SEGMENTS_END) + break; + + if (sysdepref >= n_sysdep_segments) + { + /* Invalid. */ + freea (sysdep_segment_values); + goto invalid; + } + + if (sysdep_segment_values[sysdepref] == NULL) + { + /* This particular string pair is invalid. */ + valid = 0; + break; + } - /* Allocate additional memory. */ - mem = (char *) malloc (memneed); - if (mem == NULL) - goto invalid; - - domain->malloced = mem; - inmem_orig_sysdep_tab = (struct sysdep_string_desc *) mem; - mem += n_sysdep_strings * sizeof (struct sysdep_string_desc); - inmem_trans_sysdep_tab = (struct sysdep_string_desc *) mem; - mem += n_sysdep_strings * sizeof (struct sysdep_string_desc); - inmem_hash_tab = (nls_uint32 *) mem; - mem += domain->hash_size * sizeof (nls_uint32); - - /* Compute the system dependent strings. */ - for (i = 0; i < 2 * n_sysdep_strings; i++) - { - const struct sysdep_string *sysdep_string = - (const struct sysdep_string *) - ((char *) data - + W (domain->must_swap, - i < n_sysdep_strings - ? orig_sysdep_tab[i] - : trans_sysdep_tab[i - n_sysdep_strings])); - const char *static_segments = - (char *) data - + W (domain->must_swap, sysdep_string->offset); - const struct segment_pair *p = sysdep_string->segments; + need += strlen (sysdep_segment_values[sysdepref]); + } - /* Concatenate the segments, and fill - inmem_orig_sysdep_tab[i] (for i < n_sysdep_strings) and - inmem_trans_sysdep_tab[i-n_sysdep_strings] (for - i >= n_sysdep_strings). */ + needs[j] = need; + if (!valid) + break; + } - if (W (domain->must_swap, p->sysdepref) == SEGMENTS_END) + if (valid) { - /* Only one static segment. */ - inmem_orig_sysdep_tab[i].length = - W (domain->must_swap, p->segsize); - inmem_orig_sysdep_tab[i].pointer = static_segments; + n_inmem_sysdep_strings++; + memneed += needs[0] + needs[1]; } - else + } + memneed += 2 * n_inmem_sysdep_strings + * sizeof (struct sysdep_string_desc); + + if (n_inmem_sysdep_strings > 0) + { + unsigned int k; + + /* Allocate additional memory. */ + mem = (char *) malloc (memneed); + if (mem == NULL) + goto invalid; + + domain->malloced = mem; + inmem_orig_sysdep_tab = (struct sysdep_string_desc *) mem; + mem += n_inmem_sysdep_strings + * sizeof (struct sysdep_string_desc); + inmem_trans_sysdep_tab = (struct sysdep_string_desc *) mem; + mem += n_inmem_sysdep_strings + * sizeof (struct sysdep_string_desc); + inmem_hash_tab = (nls_uint32 *) mem; + mem += domain->hash_size * sizeof (nls_uint32); + + /* Compute the system dependent strings. */ + k = 0; + for (i = 0; i < n_sysdep_strings; i++) { - inmem_orig_sysdep_tab[i].pointer = mem; + int valid = 1; - for (p = sysdep_string->segments;; p++) + for (j = 0; j < 2; j++) { - nls_uint32 segsize = - W (domain->must_swap, p->segsize); - nls_uint32 sysdepref = - W (domain->must_swap, p->sysdepref); - size_t n; + const struct sysdep_string *sysdep_string = + (const struct sysdep_string *) + ((char *) data + + W (domain->must_swap, + j == 0 + ? orig_sysdep_tab[i] + : trans_sysdep_tab[i])); + const struct segment_pair *p = + sysdep_string->segments; + + if (W (domain->must_swap, p->sysdepref) + != SEGMENTS_END) + for (p = sysdep_string->segments;; p++) + { + nls_uint32 sysdepref; + + sysdepref = + W (domain->must_swap, p->sysdepref); + if (sysdepref == SEGMENTS_END) + break; + + if (sysdep_segment_values[sysdepref] == NULL) + { + /* This particular string pair is + invalid. */ + valid = 0; + break; + } + } + + if (!valid) + break; + } - if (segsize > 0) + if (valid) + { + for (j = 0; j < 2; j++) { - memcpy (mem, static_segments, segsize); - mem += segsize; - static_segments += segsize; + const struct sysdep_string *sysdep_string = + (const struct sysdep_string *) + ((char *) data + + W (domain->must_swap, + j == 0 + ? orig_sysdep_tab[i] + : trans_sysdep_tab[i])); + const char *static_segments = + (char *) data + + W (domain->must_swap, sysdep_string->offset); + const struct segment_pair *p = + sysdep_string->segments; + + /* Concatenate the segments, and fill + inmem_orig_sysdep_tab[k] (for j == 0) and + inmem_trans_sysdep_tab[k] (for j == 1). */ + + struct sysdep_string_desc *inmem_tab_entry = + (j == 0 + ? inmem_orig_sysdep_tab + : inmem_trans_sysdep_tab) + + k; + + if (W (domain->must_swap, p->sysdepref) + == SEGMENTS_END) + { + /* Only one static segment. */ + inmem_tab_entry->length = + W (domain->must_swap, p->segsize); + inmem_tab_entry->pointer = static_segments; + } + else + { + inmem_tab_entry->pointer = mem; + + for (p = sysdep_string->segments;; p++) + { + nls_uint32 segsize = + W (domain->must_swap, p->segsize); + nls_uint32 sysdepref = + W (domain->must_swap, p->sysdepref); + size_t n; + + if (segsize > 0) + { + memcpy (mem, static_segments, segsize); + mem += segsize; + static_segments += segsize; + } + + if (sysdepref == SEGMENTS_END) + break; + + n = strlen (sysdep_segment_values[sysdepref]); + memcpy (mem, sysdep_segment_values[sysdepref], n); + mem += n; + } + + inmem_tab_entry->length = + mem - inmem_tab_entry->pointer; + } } - if (sysdepref == SEGMENTS_END) - break; - - n = strlen (sysdep_segment_values[sysdepref]); - memcpy (mem, sysdep_segment_values[sysdepref], n); - mem += n; + k++; } - - inmem_orig_sysdep_tab[i].length = - mem - inmem_orig_sysdep_tab[i].pointer; } - } + if (k != n_inmem_sysdep_strings) + abort (); - /* Compute the augmented hash table. */ - for (i = 0; i < domain->hash_size; i++) - inmem_hash_tab[i] = - W (domain->must_swap_hash_tab, domain->hash_tab[i]); - for (i = 0; i < n_sysdep_strings; i++) - { - const char *msgid = inmem_orig_sysdep_tab[i].pointer; - nls_uint32 hash_val = hash_string (msgid); - nls_uint32 idx = hash_val % domain->hash_size; - nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2)); - - for (;;) + /* Compute the augmented hash table. */ + for (i = 0; i < domain->hash_size; i++) + inmem_hash_tab[i] = + W (domain->must_swap_hash_tab, domain->hash_tab[i]); + for (i = 0; i < n_inmem_sysdep_strings; i++) { - if (inmem_hash_tab[idx] == 0) + const char *msgid = inmem_orig_sysdep_tab[i].pointer; + nls_uint32 hash_val = hash_string (msgid); + nls_uint32 idx = hash_val % domain->hash_size; + nls_uint32 incr = + 1 + (hash_val % (domain->hash_size - 2)); + + for (;;) { - /* Hash table entry is empty. Use it. */ - inmem_hash_tab[idx] = 1 + domain->nstrings + i; - break; - } + if (inmem_hash_tab[idx] == 0) + { + /* Hash table entry is empty. Use it. */ + inmem_hash_tab[idx] = 1 + domain->nstrings + i; + break; + } - if (idx >= domain->hash_size - incr) - idx -= domain->hash_size - incr; - else - idx += incr; + if (idx >= domain->hash_size - incr) + idx -= domain->hash_size - incr; + else + idx += incr; + } } - } - freea (sysdep_segment_values); + domain->n_sysdep_strings = n_inmem_sysdep_strings; + domain->orig_sysdep_tab = inmem_orig_sysdep_tab; + domain->trans_sysdep_tab = inmem_trans_sysdep_tab; - domain->n_sysdep_strings = n_sysdep_strings; - domain->orig_sysdep_tab = inmem_orig_sysdep_tab; - domain->trans_sysdep_tab = inmem_trans_sysdep_tab; + domain->hash_tab = inmem_hash_tab; + domain->must_swap_hash_tab = 0; + } + else + { + domain->n_sysdep_strings = 0; + domain->orig_sysdep_tab = NULL; + domain->trans_sysdep_tab = NULL; + } - domain->hash_tab = inmem_hash_tab; - domain->must_swap_hash_tab = 0; + freea (sysdep_segment_values); } else { @@ -1299,8 +1398,7 @@ #ifdef _LIBC void internal_function -_nl_unload_domain (domain) - struct loaded_domain *domain; +_nl_unload_domain (struct loaded_domain *domain) { if (domain->plural != &__gettext_germanic_plural) __gettext_free_exp (domain->plural); diff -urN gawk-3.1.3/intl/localcharset.c gawk-3.1.4/intl/localcharset.c --- gawk-3.1.3/intl/localcharset.c 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/localcharset.c 2004-02-19 23:08:40.000000000 +0200 @@ -86,7 +86,7 @@ # define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR) #endif -#ifdef HAVE_GETC_UNLOCKED +#if HAVE_DECL_GETC_UNLOCKED # undef getc # define getc getc_unlocked #endif diff -urN gawk-3.1.3/intl/locale.alias gawk-3.1.4/intl/locale.alias --- gawk-3.1.3/intl/locale.alias 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/locale.alias 2004-02-19 23:08:40.000000000 +0200 @@ -1,5 +1,5 @@ # Locale name alias data base. -# Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. +# Copyright (C) 1996-2001,2003 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Library General Public License as published @@ -29,8 +29,8 @@ # Packages using this file: -bokmal no_NO.ISO-8859-1 -bokmål no_NO.ISO-8859-1 +bokmal nb_NO.ISO-8859-1 +bokmål nb_NO.ISO-8859-1 catalan ca_ES.ISO-8859-1 croatian hr_HR.ISO-8859-2 czech cs_CZ.ISO-8859-2 @@ -61,9 +61,9 @@ korean.euc ko_KR.eucKR ko_KR ko_KR.eucKR lithuanian lt_LT.ISO-8859-13 -nb_NO no_NO.ISO-8859-1 -nb_NO.ISO-8859-1 no_NO.ISO-8859-1 -norwegian no_NO.ISO-8859-1 +no_NO nb_NO.ISO-8859-1 +no_NO.ISO-8859-1 nb_NO.ISO-8859-1 +norwegian nb_NO.ISO-8859-1 nynorsk nn_NO.ISO-8859-1 polish pl_PL.ISO-8859-2 portuguese pt_PT.ISO-8859-1 diff -urN gawk-3.1.3/intl/localealias.c gawk-3.1.4/intl/localealias.c --- gawk-3.1.3/intl/localealias.c 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/localealias.c 2004-02-19 23:08:40.000000000 +0200 @@ -110,11 +110,11 @@ # define freea(p) free (p) #endif -#if defined _LIBC_REENTRANT || defined HAVE_FGETS_UNLOCKED +#if defined _LIBC_REENTRANT || HAVE_DECL_FGETS_UNLOCKED # undef fgets # define fgets(buf, len, s) fgets_unlocked (buf, len, s) #endif -#if defined _LIBC_REENTRANT || defined HAVE_FEOF_UNLOCKED +#if defined _LIBC_REENTRANT || HAVE_DECL_FEOF_UNLOCKED # undef feof # define feof(s) feof_unlocked (s) #endif @@ -140,16 +140,15 @@ /* Prototypes for local functions. */ -static size_t read_alias_file PARAMS ((const char *fname, int fname_len)) +static size_t read_alias_file (const char *fname, int fname_len) internal_function; -static int extend_alias_table PARAMS ((void)); -static int alias_compare PARAMS ((const struct alias_map *map1, - const struct alias_map *map2)); +static int extend_alias_table (void); +static int alias_compare (const struct alias_map *map1, + const struct alias_map *map2); const char * -_nl_expand_alias (name) - const char *name; +_nl_expand_alias (const char *name) { static const char *locale_alias_path; struct alias_map *retval; @@ -172,8 +171,8 @@ if (nmap > 0) retval = (struct alias_map *) bsearch (&item, map, nmap, sizeof (struct alias_map), - (int (*) PARAMS ((const void *, - const void *)) + (int (*) (const void *, + const void *) ) alias_compare); else retval = NULL; @@ -215,9 +214,7 @@ static size_t internal_function -read_alias_file (fname, fname_len) - const char *fname; - int fname_len; +read_alias_file (const char *fname, int fname_len) { FILE *fp; char *full_fname; @@ -361,7 +358,7 @@ if (added > 0) qsort (map, nmap, sizeof (struct alias_map), - (int (*) PARAMS ((const void *, const void *))) alias_compare); + (int (*) (const void *, const void *)) alias_compare); return added; } @@ -387,9 +384,7 @@ static int -alias_compare (map1, map2) - const struct alias_map *map1; - const struct alias_map *map2; +alias_compare (const struct alias_map *map1, const struct alias_map *map2) { #if defined _LIBC || defined HAVE_STRCASECMP return strcasecmp (map1->alias, map2->alias); diff -urN gawk-3.1.3/intl/localename.c gawk-3.1.4/intl/localename.c --- gawk-3.1.3/intl/localename.c 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/localename.c 2004-02-19 23:08:40.000000000 +0200 @@ -1,5 +1,5 @@ /* Determine the current selected locale. - Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -34,6 +34,124 @@ #ifdef WIN32 # define WIN32_LEAN_AND_MEAN # include +/* List of language codes, sorted by value: + 0x01 LANG_ARABIC + 0x02 LANG_BULGARIAN + 0x03 LANG_CATALAN + 0x04 LANG_CHINESE + 0x05 LANG_CZECH + 0x06 LANG_DANISH + 0x07 LANG_GERMAN + 0x08 LANG_GREEK + 0x09 LANG_ENGLISH + 0x0a LANG_SPANISH + 0x0b LANG_FINNISH + 0x0c LANG_FRENCH + 0x0d LANG_HEBREW + 0x0e LANG_HUNGARIAN + 0x0f LANG_ICELANDIC + 0x10 LANG_ITALIAN + 0x11 LANG_JAPANESE + 0x12 LANG_KOREAN + 0x13 LANG_DUTCH + 0x14 LANG_NORWEGIAN + 0x15 LANG_POLISH + 0x16 LANG_PORTUGUESE + 0x17 LANG_RHAETO_ROMANCE + 0x18 LANG_ROMANIAN + 0x19 LANG_RUSSIAN + 0x1a LANG_CROATIAN == LANG_SERBIAN + 0x1b LANG_SLOVAK + 0x1c LANG_ALBANIAN + 0x1d LANG_SWEDISH + 0x1e LANG_THAI + 0x1f LANG_TURKISH + 0x20 LANG_URDU + 0x21 LANG_INDONESIAN + 0x22 LANG_UKRAINIAN + 0x23 LANG_BELARUSIAN + 0x24 LANG_SLOVENIAN + 0x25 LANG_ESTONIAN + 0x26 LANG_LATVIAN + 0x27 LANG_LITHUANIAN + 0x28 LANG_TAJIK + 0x29 LANG_FARSI + 0x2a LANG_VIETNAMESE + 0x2b LANG_ARMENIAN + 0x2c LANG_AZERI + 0x2d LANG_BASQUE + 0x2e LANG_SORBIAN + 0x2f LANG_MACEDONIAN + 0x30 LANG_SUTU + 0x31 LANG_TSONGA + 0x32 LANG_TSWANA + 0x33 LANG_VENDA + 0x34 LANG_XHOSA + 0x35 LANG_ZULU + 0x36 LANG_AFRIKAANS + 0x37 LANG_GEORGIAN + 0x38 LANG_FAEROESE + 0x39 LANG_HINDI + 0x3a LANG_MALTESE + 0x3b LANG_SAAMI + 0x3c LANG_GAELIC + 0x3d LANG_YIDDISH + 0x3e LANG_MALAY + 0x3f LANG_KAZAK + 0x40 LANG_KYRGYZ + 0x41 LANG_SWAHILI + 0x42 LANG_TURKMEN + 0x43 LANG_UZBEK + 0x44 LANG_TATAR + 0x45 LANG_BENGALI + 0x46 LANG_PUNJABI + 0x47 LANG_GUJARATI + 0x48 LANG_ORIYA + 0x49 LANG_TAMIL + 0x4a LANG_TELUGU + 0x4b LANG_KANNADA + 0x4c LANG_MALAYALAM + 0x4d LANG_ASSAMESE + 0x4e LANG_MARATHI + 0x4f LANG_SANSKRIT + 0x50 LANG_MONGOLIAN + 0x51 LANG_TIBETAN + 0x52 LANG_WELSH + 0x53 LANG_CAMBODIAN + 0x54 LANG_LAO + 0x55 LANG_BURMESE + 0x56 LANG_GALICIAN + 0x57 LANG_KONKANI + 0x58 LANG_MANIPURI + 0x59 LANG_SINDHI + 0x5a LANG_SYRIAC + 0x5b LANG_SINHALESE + 0x5c LANG_CHEROKEE + 0x5d LANG_INUKTITUT + 0x5e LANG_AMHARIC + 0x5f LANG_TAMAZIGHT + 0x60 LANG_KASHMIRI + 0x61 LANG_NEPALI + 0x62 LANG_FRISIAN + 0x63 LANG_PASHTO + 0x64 LANG_TAGALOG + 0x65 LANG_DIVEHI + 0x66 LANG_EDO + 0x67 LANG_FULFULDE + 0x68 LANG_HAUSA + 0x69 LANG_IBIBIO + 0x6a LANG_YORUBA + 0x70 LANG_IGBO + 0x71 LANG_KANURI + 0x72 LANG_OROMO + 0x73 LANG_TIGRINYA + 0x74 LANG_GUARANI + 0x75 LANG_HAWAIIAN + 0x76 LANG_LATIN + 0x77 LANG_SOMALI + 0x78 LANG_YI + 0x79 LANG_PAPIAMENTU +*/ /* Mingw headers don't have latest language and sublanguage codes. */ # ifndef LANG_AFRIKAANS # define LANG_AFRIKAANS 0x36 @@ -41,6 +159,9 @@ # ifndef LANG_ALBANIAN # define LANG_ALBANIAN 0x1c # endif +# ifndef LANG_AMHARIC +# define LANG_AMHARIC 0x5e +# endif # ifndef LANG_ARABIC # define LANG_ARABIC 0x01 # endif @@ -62,12 +183,24 @@ # ifndef LANG_BENGALI # define LANG_BENGALI 0x45 # endif +# ifndef LANG_BURMESE +# define LANG_BURMESE 0x55 +# endif +# ifndef LANG_CAMBODIAN +# define LANG_CAMBODIAN 0x53 +# endif # ifndef LANG_CATALAN # define LANG_CATALAN 0x03 # endif +# ifndef LANG_CHEROKEE +# define LANG_CHEROKEE 0x5c +# endif # ifndef LANG_DIVEHI # define LANG_DIVEHI 0x65 # endif +# ifndef LANG_EDO +# define LANG_EDO 0x66 +# endif # ifndef LANG_ESTONIAN # define LANG_ESTONIAN 0x25 # endif @@ -77,27 +210,57 @@ # ifndef LANG_FARSI # define LANG_FARSI 0x29 # endif +# ifndef LANG_FRISIAN +# define LANG_FRISIAN 0x62 +# endif +# ifndef LANG_FULFULDE +# define LANG_FULFULDE 0x67 +# endif +# ifndef LANG_GAELIC +# define LANG_GAELIC 0x3c +# endif # ifndef LANG_GALICIAN # define LANG_GALICIAN 0x56 # endif # ifndef LANG_GEORGIAN # define LANG_GEORGIAN 0x37 # endif +# ifndef LANG_GUARANI +# define LANG_GUARANI 0x74 +# endif # ifndef LANG_GUJARATI # define LANG_GUJARATI 0x47 # endif +# ifndef LANG_HAUSA +# define LANG_HAUSA 0x68 +# endif +# ifndef LANG_HAWAIIAN +# define LANG_HAWAIIAN 0x75 +# endif # ifndef LANG_HEBREW # define LANG_HEBREW 0x0d # endif # ifndef LANG_HINDI # define LANG_HINDI 0x39 # endif +# ifndef LANG_IBIBIO +# define LANG_IBIBIO 0x69 +# endif +# ifndef LANG_IGBO +# define LANG_IGBO 0x70 +# endif # ifndef LANG_INDONESIAN # define LANG_INDONESIAN 0x21 # endif +# ifndef LANG_INUKTITUT +# define LANG_INUKTITUT 0x5d +# endif # ifndef LANG_KANNADA # define LANG_KANNADA 0x4b # endif +# ifndef LANG_KANURI +# define LANG_KANURI 0x71 +# endif # ifndef LANG_KASHMIRI # define LANG_KASHMIRI 0x60 # endif @@ -110,6 +273,12 @@ # ifndef LANG_KYRGYZ # define LANG_KYRGYZ 0x40 # endif +# ifndef LANG_LAO +# define LANG_LAO 0x54 +# endif +# ifndef LANG_LATIN +# define LANG_LATIN 0x76 +# endif # ifndef LANG_LATVIAN # define LANG_LATVIAN 0x26 # endif @@ -125,6 +294,9 @@ # ifndef LANG_MALAYALAM # define LANG_MALAYALAM 0x4c # endif +# ifndef LANG_MALTESE +# define LANG_MALTESE 0x3a +# endif # ifndef LANG_MANIPURI # define LANG_MANIPURI 0x58 # endif @@ -140,9 +312,24 @@ # ifndef LANG_ORIYA # define LANG_ORIYA 0x48 # endif +# ifndef LANG_OROMO +# define LANG_OROMO 0x72 +# endif +# ifndef LANG_PAPIAMENTU +# define LANG_PAPIAMENTU 0x79 +# endif +# ifndef LANG_PASHTO +# define LANG_PASHTO 0x63 +# endif # ifndef LANG_PUNJABI # define LANG_PUNJABI 0x46 # endif +# ifndef LANG_RHAETO_ROMANCE +# define LANG_RHAETO_ROMANCE 0x17 +# endif +# ifndef LANG_SAAMI +# define LANG_SAAMI 0x3b +# endif # ifndef LANG_SANSKRIT # define LANG_SANSKRIT 0x4f # endif @@ -152,18 +339,36 @@ # ifndef LANG_SINDHI # define LANG_SINDHI 0x59 # endif +# ifndef LANG_SINHALESE +# define LANG_SINHALESE 0x5b +# endif # ifndef LANG_SLOVAK # define LANG_SLOVAK 0x1b # endif +# ifndef LANG_SOMALI +# define LANG_SOMALI 0x77 +# endif # ifndef LANG_SORBIAN # define LANG_SORBIAN 0x2e # endif +# ifndef LANG_SUTU +# define LANG_SUTU 0x30 +# endif # ifndef LANG_SWAHILI # define LANG_SWAHILI 0x41 # endif # ifndef LANG_SYRIAC # define LANG_SYRIAC 0x5a # endif +# ifndef LANG_TAGALOG +# define LANG_TAGALOG 0x64 +# endif +# ifndef LANG_TAJIK +# define LANG_TAJIK 0x28 +# endif +# ifndef LANG_TAMAZIGHT +# define LANG_TAMAZIGHT 0x5f +# endif # ifndef LANG_TAMIL # define LANG_TAMIL 0x49 # endif @@ -176,6 +381,21 @@ # ifndef LANG_THAI # define LANG_THAI 0x1e # endif +# ifndef LANG_TIBETAN +# define LANG_TIBETAN 0x51 +# endif +# ifndef LANG_TIGRINYA +# define LANG_TIGRINYA 0x73 +# endif +# ifndef LANG_TSONGA +# define LANG_TSONGA 0x31 +# endif +# ifndef LANG_TSWANA +# define LANG_TSWANA 0x32 +# endif +# ifndef LANG_TURKMEN +# define LANG_TURKMEN 0x42 +# endif # ifndef LANG_UKRAINIAN # define LANG_UKRAINIAN 0x22 # endif @@ -185,9 +405,30 @@ # ifndef LANG_UZBEK # define LANG_UZBEK 0x43 # endif +# ifndef LANG_VENDA +# define LANG_VENDA 0x33 +# endif # ifndef LANG_VIETNAMESE # define LANG_VIETNAMESE 0x2a # endif +# ifndef LANG_WELSH +# define LANG_WELSH 0x52 +# endif +# ifndef LANG_XHOSA +# define LANG_XHOSA 0x34 +# endif +# ifndef LANG_YI +# define LANG_YI 0x78 +# endif +# ifndef LANG_YIDDISH +# define LANG_YIDDISH 0x3d +# endif +# ifndef LANG_YORUBA +# define LANG_YORUBA 0x6a +# endif +# ifndef LANG_ZULU +# define LANG_ZULU 0x35 +# endif # ifndef SUBLANG_ARABIC_SAUDI_ARABIA # define SUBLANG_ARABIC_SAUDI_ARABIA 0x01 # endif @@ -242,6 +483,12 @@ # ifndef SUBLANG_AZERI_CYRILLIC # define SUBLANG_AZERI_CYRILLIC 0x02 # endif +# ifndef SUBLANG_BENGALI_INDIA +# define SUBLANG_BENGALI_INDIA 0x00 +# endif +# ifndef SUBLANG_BENGALI_BANGLADESH +# define SUBLANG_BENGALI_BANGLADESH 0x01 +# endif # ifndef SUBLANG_CHINESE_MACAU # define SUBLANG_CHINESE_MACAU 0x05 # endif @@ -266,12 +513,54 @@ # ifndef SUBLANG_ENGLISH_PHILIPPINES # define SUBLANG_ENGLISH_PHILIPPINES 0x0d # endif +# ifndef SUBLANG_ENGLISH_INDONESIA +# define SUBLANG_ENGLISH_INDONESIA 0x0e +# endif +# ifndef SUBLANG_ENGLISH_HONGKONG +# define SUBLANG_ENGLISH_HONGKONG 0x0f +# endif +# ifndef SUBLANG_ENGLISH_INDIA +# define SUBLANG_ENGLISH_INDIA 0x10 +# endif +# ifndef SUBLANG_ENGLISH_MALAYSIA +# define SUBLANG_ENGLISH_MALAYSIA 0x11 +# endif +# ifndef SUBLANG_ENGLISH_SINGAPORE +# define SUBLANG_ENGLISH_SINGAPORE 0x12 +# endif # ifndef SUBLANG_FRENCH_LUXEMBOURG # define SUBLANG_FRENCH_LUXEMBOURG 0x05 # endif # ifndef SUBLANG_FRENCH_MONACO # define SUBLANG_FRENCH_MONACO 0x06 # endif +# ifndef SUBLANG_FRENCH_WESTINDIES +# define SUBLANG_FRENCH_WESTINDIES 0x07 +# endif +# ifndef SUBLANG_FRENCH_REUNION +# define SUBLANG_FRENCH_REUNION 0x08 +# endif +# ifndef SUBLANG_FRENCH_CONGO +# define SUBLANG_FRENCH_CONGO 0x09 +# endif +# ifndef SUBLANG_FRENCH_SENEGAL +# define SUBLANG_FRENCH_SENEGAL 0x0a +# endif +# ifndef SUBLANG_FRENCH_CAMEROON +# define SUBLANG_FRENCH_CAMEROON 0x0b +# endif +# ifndef SUBLANG_FRENCH_COTEDIVOIRE +# define SUBLANG_FRENCH_COTEDIVOIRE 0x0c +# endif +# ifndef SUBLANG_FRENCH_MALI +# define SUBLANG_FRENCH_MALI 0x0d +# endif +# ifndef SUBLANG_FRENCH_MOROCCO +# define SUBLANG_FRENCH_MOROCCO 0x0e +# endif +# ifndef SUBLANG_FRENCH_HAITI +# define SUBLANG_FRENCH_HAITI 0x0f +# endif # ifndef SUBLANG_GERMAN_LUXEMBOURG # define SUBLANG_GERMAN_LUXEMBOURG 0x04 # endif @@ -290,12 +579,30 @@ # ifndef SUBLANG_NEPALI_INDIA # define SUBLANG_NEPALI_INDIA 0x02 # endif +# ifndef SUBLANG_PUNJABI_INDIA +# define SUBLANG_PUNJABI_INDIA 0x00 +# endif +# ifndef SUBLANG_PUNJABI_PAKISTAN +# define SUBLANG_PUNJABI_PAKISTAN 0x01 +# endif +# ifndef SUBLANG_ROMANIAN_ROMANIA +# define SUBLANG_ROMANIAN_ROMANIA 0x00 +# endif +# ifndef SUBLANG_ROMANIAN_MOLDOVA +# define SUBLANG_ROMANIAN_MOLDOVA 0x01 +# endif # ifndef SUBLANG_SERBIAN_LATIN # define SUBLANG_SERBIAN_LATIN 0x02 # endif # ifndef SUBLANG_SERBIAN_CYRILLIC # define SUBLANG_SERBIAN_CYRILLIC 0x03 # endif +# ifndef SUBLANG_SINDHI_INDIA +# define SUBLANG_SINDHI_INDIA 0x00 +# endif +# ifndef SUBLANG_SINDHI_PAKISTAN +# define SUBLANG_SINDHI_PAKISTAN 0x01 +# endif # ifndef SUBLANG_SPANISH_GUATEMALA # define SUBLANG_SPANISH_GUATEMALA 0x04 # endif @@ -350,6 +657,18 @@ # ifndef SUBLANG_SWEDISH_FINLAND # define SUBLANG_SWEDISH_FINLAND 0x02 # endif +# ifndef SUBLANG_TAMAZIGHT_ARABIC +# define SUBLANG_TAMAZIGHT_ARABIC 0x01 +# endif +# ifndef SUBLANG_TAMAZIGHT_LATIN +# define SUBLANG_TAMAZIGHT_LATIN 0x02 +# endif +# ifndef SUBLANG_TIGRINYA_ETHIOPIA +# define SUBLANG_TIGRINYA_ETHIOPIA 0x00 +# endif +# ifndef SUBLANG_TIGRINYA_ERITREA +# define SUBLANG_TIGRINYA_ERITREA 0x01 +# endif # ifndef SUBLANG_URDU_PAKISTAN # define SUBLANG_URDU_PAKISTAN 0x01 # endif @@ -381,9 +700,7 @@ The result must not be freed; it is statically allocated. */ const char * -_nl_locale_name (category, categoryname) - int category; - const char *categoryname; +_nl_locale_name (int category, const char *categoryname) { const char *retval; @@ -454,7 +771,7 @@ { case LANG_AFRIKAANS: return "af_ZA"; case LANG_ALBANIAN: return "sq_AL"; - case 0x5e: /* AMHARIC */ return "am_ET"; + case LANG_AMHARIC: return "am_ET"; case LANG_ARABIC: switch (sub) { @@ -489,12 +806,18 @@ case LANG_BASQUE: return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR". */ case LANG_BELARUSIAN: return "be_BY"; - case LANG_BENGALI: return "bn_IN"; + case LANG_BENGALI: + switch (sub) + { + case SUBLANG_BENGALI_INDIA: return "bn_IN"; + case SUBLANG_BENGALI_BANGLADESH: return "bn_BD"; + } + return "bn"; case LANG_BULGARIAN: return "bg_BG"; - case 0x55: /* BURMESE */ return "my_MM"; - case 0x53: /* CAMBODIAN */ return "km_KH"; + case LANG_BURMESE: return "my_MM"; + case LANG_CAMBODIAN: return "km_KH"; case LANG_CATALAN: return "ca_ES"; - case 0x5c: /* CHEROKEE */ return "chr_US"; + case LANG_CHEROKEE: return "chr_US"; case LANG_CHINESE: switch (sub) { @@ -516,13 +839,13 @@ switch (sub) { case SUBLANG_DEFAULT: return "hr_HR"; - case SUBLANG_SERBIAN_LATIN: return "sr_YU"; - case SUBLANG_SERBIAN_CYRILLIC: return "sr_YU@cyrillic"; + case SUBLANG_SERBIAN_LATIN: return "sr_CS"; + case SUBLANG_SERBIAN_CYRILLIC: return "sr_CS@cyrillic"; } return "hr"; case LANG_CZECH: return "cs_CZ"; case LANG_DANISH: return "da_DK"; - case LANG_DIVEHI: return "div_MV"; + case LANG_DIVEHI: return "dv_MV"; case LANG_DUTCH: switch (sub) { @@ -530,7 +853,7 @@ case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE"; } return "nl"; - case 0x66: /* EDO */ return "bin_NG"; + case LANG_EDO: return "bin_NG"; case LANG_ENGLISH: switch (sub) { @@ -551,6 +874,11 @@ case SUBLANG_ENGLISH_TRINIDAD: return "en_TT"; case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW"; case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH"; + case SUBLANG_ENGLISH_INDONESIA: return "en_ID"; + case SUBLANG_ENGLISH_HONGKONG: return "en_HK"; + case SUBLANG_ENGLISH_INDIA: return "en_IN"; + case SUBLANG_ENGLISH_MALAYSIA: return "en_MY"; + case SUBLANG_ENGLISH_SINGAPORE: return "en_SG"; } return "en"; case LANG_ESTONIAN: return "et_EE"; @@ -566,11 +894,22 @@ case SUBLANG_FRENCH_SWISS: return "fr_CH"; case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU"; case SUBLANG_FRENCH_MONACO: return "fr_MC"; + case SUBLANG_FRENCH_WESTINDIES: return "fr"; /* Caribbean? */ + case SUBLANG_FRENCH_REUNION: return "fr_RE"; + case SUBLANG_FRENCH_CONGO: return "fr_CG"; + case SUBLANG_FRENCH_SENEGAL: return "fr_SN"; + case SUBLANG_FRENCH_CAMEROON: return "fr_CM"; + case SUBLANG_FRENCH_COTEDIVOIRE: return "fr_CI"; + case SUBLANG_FRENCH_MALI: return "fr_ML"; + case SUBLANG_FRENCH_MOROCCO: return "fr_MA"; + case SUBLANG_FRENCH_HAITI: return "fr_HT"; } return "fr"; - case 0x62: /* FRISIAN */ return "fy_NL"; - case 0x67: /* FULFULDE */ return "ful_NG"; - case 0x3c: /* GAELIC */ + case LANG_FRISIAN: return "fy_NL"; + case LANG_FULFULDE: + /* Spoken in Nigeria, Guinea, Senegal, Mali, Niger, Cameroon, Benin. */ + return "ff_NG"; + case LANG_GAELIC: switch (sub) { case 0x01: /* SCOTTISH */ return "gd_GB"; @@ -590,21 +929,21 @@ } return "de"; case LANG_GREEK: return "el_GR"; - case 0x74: /* GUARANI */ return "gn_PY"; + case LANG_GUARANI: return "gn_PY"; case LANG_GUJARATI: return "gu_IN"; - case 0x68: /* HAUSA */ return "ha_NG"; - case 0x75: /* HAWAIIAN */ + case LANG_HAUSA: return "ha_NG"; + case LANG_HAWAIIAN: /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers) or Hawaii Creole English ("cpe_US", 600000 speakers)? */ return "cpe_US"; case LANG_HEBREW: return "he_IL"; case LANG_HINDI: return "hi_IN"; case LANG_HUNGARIAN: return "hu_HU"; - case 0x69: /* IBIBIO */ return "nic_NG"; + case LANG_IBIBIO: return "nic_NG"; case LANG_ICELANDIC: return "is_IS"; - case 0x70: /* IGBO */ return "ibo_NG"; + case LANG_IGBO: return "ig_NG"; case LANG_INDONESIAN: return "id_ID"; - case 0x5d: /* INUKTITUT */ return "iu_CA"; + case LANG_INUKTITUT: return "iu_CA"; case LANG_ITALIAN: switch (sub) { @@ -614,7 +953,7 @@ return "it"; case LANG_JAPANESE: return "ja_JP"; case LANG_KANNADA: return "kn_IN"; - case 0x71: /* KANURI */ return "kau_NG"; + case LANG_KANURI: return "kr_NG"; case LANG_KASHMIRI: switch (sub) { @@ -628,8 +967,8 @@ return "kok_IN"; case LANG_KOREAN: return "ko_KR"; case LANG_KYRGYZ: return "ky_KG"; - case 0x54: /* LAO */ return "lo_LA"; - case 0x76: /* LATIN */ return "la_VA"; + case LANG_LAO: return "lo_LA"; + case LANG_LATIN: return "la_VA"; case LANG_LATVIAN: return "lv_LV"; case LANG_LITHUANIAN: return "lt_LT"; case LANG_MACEDONIAN: return "mk_MK"; @@ -641,7 +980,7 @@ } return "ms"; case LANG_MALAYALAM: return "ml_IN"; - case 0x3a: /* MALTESE */ return "mt_MT"; + case LANG_MALTESE: return "mt_MT"; case LANG_MANIPURI: /* FIXME: Adjust this when such locales appear on Unix. */ return "mni_IN"; @@ -663,9 +1002,9 @@ } return "no"; case LANG_ORIYA: return "or_IN"; - case 0x72: /* OROMO */ return "om_ET"; - case 0x79: /* PAPIAMENTU */ return "pap_AN"; - case 0x63: /* PASHTO */ + case LANG_OROMO: return "om_ET"; + case LANG_PAPIAMENTU: return "pap_AN"; + case LANG_PASHTO: return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF". */ case LANG_POLISH: return "pl_PL"; case LANG_PORTUGUESE: @@ -677,18 +1016,36 @@ case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR"; } return "pt"; - case LANG_PUNJABI: return "pa_IN"; - case 0x17: /* RHAETO-ROMANCE */ return "rm_CH"; - case LANG_ROMANIAN: return "ro_RO"; + case LANG_PUNJABI: + switch (sub) + { + case SUBLANG_PUNJABI_INDIA: return "pa_IN"; /* Gurmukhi script */ + case SUBLANG_PUNJABI_PAKISTAN: return "pa_PK"; /* Arabic script */ + } + return "pa"; + case LANG_RHAETO_ROMANCE: return "rm_CH"; + case LANG_ROMANIAN: + switch (sub) + { + case SUBLANG_ROMANIAN_ROMANIA: return "ro_RO"; + case SUBLANG_ROMANIAN_MOLDOVA: return "ro_MD"; + } + return "ro"; case LANG_RUSSIAN: - return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA". */ - case 0x3b: /* SAMI */ return "se_NO"; + return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA" or "ru_MD". */ + case LANG_SAAMI: /* actually Northern Sami */ return "se_NO"; case LANG_SANSKRIT: return "sa_IN"; - case LANG_SINDHI: return "sd"; - case 0x5b: /* SINHALESE */ return "si_LK"; + case LANG_SINDHI: + switch (sub) + { + case SUBLANG_SINDHI_INDIA: return "sd_IN"; + case SUBLANG_SINDHI_PAKISTAN: return "sd_PK"; + } + return "sd"; + case LANG_SINHALESE: return "si_LK"; case LANG_SLOVAK: return "sk_SK"; case LANG_SLOVENIAN: return "sl_SI"; - case 0x77: /* SOMALI */ return "so_SO"; + case LANG_SOMALI: return "so_SO"; case LANG_SORBIAN: /* FIXME: Adjust this when such locales appear on Unix. */ return "wen_DE"; @@ -718,7 +1075,7 @@ case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR"; } return "es"; - case 0x30: /* SUTU */ return "bnt_TZ"; + case LANG_SUTU: return "bnt_TZ"; /* or "st_LS" or "nso_ZA"? */ case LANG_SWAHILI: return "sw_KE"; case LANG_SWEDISH: switch (sub) @@ -728,19 +1085,33 @@ } return "sv"; case LANG_SYRIAC: return "syr_TR"; /* An extinct language. */ - case 0x64: /* TAGALOG */ return "tl_PH"; - case 0x28: /* TAJIK */ return "tg_TJ"; - case 0x5f: /* TAMAZIGHT */ return "ber_MA"; + case LANG_TAGALOG: return "tl_PH"; + case LANG_TAJIK: return "tg_TJ"; + case LANG_TAMAZIGHT: + switch (sub) + { + /* FIXME: Adjust this when Tamazight locales appear on Unix. */ + case SUBLANG_TAMAZIGHT_ARABIC: return "ber_MA@arabic"; + case SUBLANG_TAMAZIGHT_LATIN: return "ber_MA@latin"; + } + return "ber_MA"; case LANG_TAMIL: return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */ case LANG_TATAR: return "tt_RU"; case LANG_TELUGU: return "te_IN"; case LANG_THAI: return "th_TH"; - case 0x51: /* TIBETAN */ return "bo_CN"; - case 0x73: /* TIGRINYA */ return "ti_ET"; - case 0x31: /* TSONGA */ return "ts_ZA"; + case LANG_TIBETAN: return "bo_CN"; + case LANG_TIGRINYA: + switch (sub) + { + case SUBLANG_TIGRINYA_ETHIOPIA: return "ti_ET"; + case SUBLANG_TIGRINYA_ERITREA: return "ti_ER"; + } + return "ti"; + case LANG_TSONGA: return "ts_ZA"; + case LANG_TSWANA: return "tn_BW"; case LANG_TURKISH: return "tr_TR"; - case 0x42: /* TURKMEN */ return "tk_TM"; + case LANG_TURKMEN: return "tk_TM"; case LANG_UKRAINIAN: return "uk_UA"; case LANG_URDU: switch (sub) @@ -752,19 +1123,18 @@ case LANG_UZBEK: switch (sub) { - /* FIXME: Adjust this when Uzbek locales appear on Unix. */ - case SUBLANG_UZBEK_LATIN: return "uz_UZ@latin"; + case SUBLANG_UZBEK_LATIN: return "uz_UZ"; case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic"; } return "uz"; - case 0x33: /* VENDA */ return "ven_ZA"; + case LANG_VENDA: return "ve_ZA"; case LANG_VIETNAMESE: return "vi_VN"; - case 0x52: /* WELSH */ return "cy_GB"; - case 0x34: /* XHOSA */ return "xh_ZA"; - case 0x78: /* YI */ return "sit_CN"; - case 0x3d: /* YIDDISH */ return "yi_IL"; - case 0x6a: /* YORUBA */ return "yo_NG"; - case 0x35: /* ZULU */ return "zu_ZA"; + case LANG_WELSH: return "cy_GB"; + case LANG_XHOSA: return "xh_ZA"; + case LANG_YI: return "sit_CN"; + case LANG_YIDDISH: return "yi_IL"; + case LANG_YORUBA: return "yo_NG"; + case LANG_ZULU: return "zu_ZA"; default: return "C"; } diff -urN gawk-3.1.3/intl/log.c gawk-3.1.4/intl/log.c --- gawk-3.1.3/intl/log.c 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/log.c 2004-02-19 23:08:40.000000000 +0200 @@ -28,9 +28,7 @@ /* Print an ASCII string with quotes and escape sequences where needed. */ static void -print_escaped (stream, str) - FILE *stream; - const char *str; +print_escaped (FILE *stream, const char *str) { putc ('"', stream); for (; *str != '\0'; str++) @@ -52,12 +50,8 @@ /* Add to the log file an entry denoting a failed translation. */ void -_nl_log_untranslated (logfilename, domainname, msgid1, msgid2, plural) - const char *logfilename; - const char *domainname; - const char *msgid1; - const char *msgid2; - int plural; +_nl_log_untranslated (const char *logfilename, const char *domainname, + const char *msgid1, const char *msgid2, int plural) { static char *last_logfilename = NULL; static FILE *last_logfile = NULL; diff -urN gawk-3.1.3/intl/ngettext.c gawk-3.1.4/intl/ngettext.c --- gawk-3.1.3/intl/ngettext.c 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/ngettext.c 2004-02-19 23:08:40.000000000 +0200 @@ -1,5 +1,5 @@ /* Implementation of ngettext(3) function. - Copyright (C) 1995, 1997, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -54,10 +54,7 @@ LC_MESSAGES locale. If not found, returns MSGID itself (the default text). */ char * -NGETTEXT (msgid1, msgid2, n) - const char *msgid1; - const char *msgid2; - unsigned long int n; +NGETTEXT (const char *msgid1, const char *msgid2, unsigned long int n) { return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES); } diff -urN gawk-3.1.3/intl/plural-exp.c gawk-3.1.4/intl/plural-exp.c --- gawk-3.1.3/intl/plural-exp.c 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/plural-exp.c 2004-02-19 23:08:40.000000000 +0200 @@ -1,5 +1,5 @@ /* Expression parsing for plural form selection. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc. Written by Ulrich Drepper , 2000. This program is free software; you can redistribute it and/or modify it @@ -96,10 +96,8 @@ void internal_function -EXTRACT_PLURAL_EXPRESSION (nullentry, pluralp, npluralsp) - const char *nullentry; - struct expression **pluralp; - unsigned long int *npluralsp; +EXTRACT_PLURAL_EXPRESSION (const char *nullentry, struct expression **pluralp, + unsigned long int *npluralsp) { if (nullentry != NULL) { diff -urN gawk-3.1.3/intl/plural-exp.h gawk-3.1.4/intl/plural-exp.h --- gawk-3.1.3/intl/plural-exp.h 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/plural-exp.h 2004-02-19 23:08:40.000000000 +0200 @@ -1,5 +1,5 @@ /* Expression parsing and evaluation for plural form selection. - Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 2000-2003 Free Software Foundation, Inc. Written by Ulrich Drepper , 2000. This program is free software; you can redistribute it and/or modify it @@ -20,14 +20,6 @@ #ifndef _PLURAL_EXP_H #define _PLURAL_EXP_H -#ifndef PARAMS -# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES -# define PARAMS(args) args -# else -# define PARAMS(args) () -# endif -#endif - #ifndef internal_function # define internal_function #endif @@ -109,18 +101,18 @@ # define EXTRACT_PLURAL_EXPRESSION extract_plural_expression #endif -extern void FREE_EXPRESSION PARAMS ((struct expression *exp)) +extern void FREE_EXPRESSION (struct expression *exp) internal_function; -extern int PLURAL_PARSE PARAMS ((void *arg)); +extern int PLURAL_PARSE (void *arg); extern struct expression GERMANIC_PLURAL attribute_hidden; -extern void EXTRACT_PLURAL_EXPRESSION PARAMS ((const char *nullentry, - struct expression **pluralp, - unsigned long int *npluralsp)) +extern void EXTRACT_PLURAL_EXPRESSION (const char *nullentry, + struct expression **pluralp, + unsigned long int *npluralsp) internal_function; #if !defined (_LIBC) && !defined (IN_LIBINTL) -extern unsigned long int plural_eval PARAMS ((struct expression *pexp, - unsigned long int n)); +extern unsigned long int plural_eval (struct expression *pexp, + unsigned long int n); #endif #endif /* _PLURAL_EXP_H */ diff -urN gawk-3.1.3/intl/plural.c gawk-3.1.4/intl/plural.c --- gawk-3.1.3/intl/plural.c 2003-06-16 13:25:35.000000000 +0300 +++ gawk-3.1.4/intl/plural.c 2004-02-19 23:08:42.000000000 +0200 @@ -19,7 +19,7 @@ #line 1 "plural.y" /* Expression parsing for plural form selection. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc. Written by Ulrich Drepper , 2000. This program is free software; you can redistribute it and/or modify it @@ -75,28 +75,13 @@ #line 55 "plural.y" /* Prototypes for local functions. */ -static struct expression *new_exp PARAMS ((int nargs, enum operator op, - struct expression * const *args)); -static inline struct expression *new_exp_0 PARAMS ((enum operator op)); -static inline struct expression *new_exp_1 PARAMS ((enum operator op, - struct expression *right)); -static struct expression *new_exp_2 PARAMS ((enum operator op, - struct expression *left, - struct expression *right)); -static inline struct expression *new_exp_3 PARAMS ((enum operator op, - struct expression *bexp, - struct expression *tbranch, - struct expression *fbranch)); -static int yylex PARAMS ((YYSTYPE *lval, const char **pexp)); -static void yyerror PARAMS ((const char *str)); +static int yylex (YYSTYPE *lval, const char **pexp); +static void yyerror (const char *str); /* Allocation of expressions. */ static struct expression * -new_exp (nargs, op, args) - int nargs; - enum operator op; - struct expression * const *args; +new_exp (int nargs, enum operator op, struct expression * const *args) { int i; struct expression *newp; @@ -125,16 +110,13 @@ } static inline struct expression * -new_exp_0 (op) - enum operator op; +new_exp_0 (enum operator op) { return new_exp (0, op, NULL); } static inline struct expression * -new_exp_1 (op, right) - enum operator op; - struct expression *right; +new_exp_1 (enum operator op, struct expression *right) { struct expression *args[1]; @@ -143,10 +125,7 @@ } static struct expression * -new_exp_2 (op, left, right) - enum operator op; - struct expression *left; - struct expression *right; +new_exp_2 (enum operator op, struct expression *left, struct expression *right) { struct expression *args[2]; @@ -156,11 +135,8 @@ } static inline struct expression * -new_exp_3 (op, bexp, tbranch, fbranch) - enum operator op; - struct expression *bexp; - struct expression *tbranch; - struct expression *fbranch; +new_exp_3 (enum operator op, struct expression *bexp, + struct expression *tbranch, struct expression *fbranch) { struct expression *args[3]; @@ -236,8 +212,8 @@ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const short yyrline[] = { - 0, 174, 182, 186, 190, 194, 198, 202, 206, 210, - 214, 218, 223 + 0, 150, 158, 162, 166, 170, 174, 178, 182, 186, + 190, 194, 199 }; #endif @@ -1027,7 +1003,7 @@ switch (yyn) { case 1: -#line 175 "plural.y" +#line 151 "plural.y" { if (yyvsp[0].exp == NULL) YYABORT; @@ -1035,68 +1011,68 @@ } break; case 2: -#line 183 "plural.y" +#line 159 "plural.y" { yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp); } break; case 3: -#line 187 "plural.y" +#line 163 "plural.y" { yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp); } break; case 4: -#line 191 "plural.y" +#line 167 "plural.y" { yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp); } break; case 5: -#line 195 "plural.y" +#line 171 "plural.y" { yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp); } break; case 6: -#line 199 "plural.y" +#line 175 "plural.y" { yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp); } break; case 7: -#line 203 "plural.y" +#line 179 "plural.y" { yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp); } break; case 8: -#line 207 "plural.y" +#line 183 "plural.y" { yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp); } break; case 9: -#line 211 "plural.y" +#line 187 "plural.y" { yyval.exp = new_exp_1 (lnot, yyvsp[0].exp); } break; case 10: -#line 215 "plural.y" +#line 191 "plural.y" { yyval.exp = new_exp_0 (var); } break; case 11: -#line 219 "plural.y" +#line 195 "plural.y" { if ((yyval.exp = new_exp_0 (num)) != NULL) yyval.exp->val.num = yyvsp[0].num; } break; case 12: -#line 224 "plural.y" +#line 200 "plural.y" { yyval.exp = yyvsp[-1].exp; } @@ -1334,13 +1310,12 @@ #endif return yyresult; } -#line 229 "plural.y" +#line 205 "plural.y" void internal_function -FREE_EXPRESSION (exp) - struct expression *exp; +FREE_EXPRESSION (struct expression *exp) { if (exp == NULL) return; @@ -1366,9 +1341,7 @@ static int -yylex (lval, pexp) - YYSTYPE *lval; - const char **pexp; +yylex (YYSTYPE *lval, const char **pexp) { const char *exp = *pexp; int result; @@ -1511,8 +1484,7 @@ static void -yyerror (str) - const char *str; +yyerror (const char *str) { /* Do nothing. We don't print error messages here. */ } diff -urN gawk-3.1.3/intl/plural.y gawk-3.1.4/intl/plural.y --- gawk-3.1.3/intl/plural.y 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/plural.y 2004-02-19 23:08:40.000000000 +0200 @@ -1,6 +1,6 @@ %{ /* Expression parsing for plural form selection. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc. Written by Ulrich Drepper , 2000. This program is free software; you can redistribute it and/or modify it @@ -54,28 +54,13 @@ %{ /* Prototypes for local functions. */ -static struct expression *new_exp PARAMS ((int nargs, enum operator op, - struct expression * const *args)); -static inline struct expression *new_exp_0 PARAMS ((enum operator op)); -static inline struct expression *new_exp_1 PARAMS ((enum operator op, - struct expression *right)); -static struct expression *new_exp_2 PARAMS ((enum operator op, - struct expression *left, - struct expression *right)); -static inline struct expression *new_exp_3 PARAMS ((enum operator op, - struct expression *bexp, - struct expression *tbranch, - struct expression *fbranch)); -static int yylex PARAMS ((YYSTYPE *lval, const char **pexp)); -static void yyerror PARAMS ((const char *str)); +static int yylex (YYSTYPE *lval, const char **pexp); +static void yyerror (const char *str); /* Allocation of expressions. */ static struct expression * -new_exp (nargs, op, args) - int nargs; - enum operator op; - struct expression * const *args; +new_exp (int nargs, enum operator op, struct expression * const *args) { int i; struct expression *newp; @@ -104,16 +89,13 @@ } static inline struct expression * -new_exp_0 (op) - enum operator op; +new_exp_0 (enum operator op) { return new_exp (0, op, NULL); } static inline struct expression * -new_exp_1 (op, right) - enum operator op; - struct expression *right; +new_exp_1 (enum operator op, struct expression *right) { struct expression *args[1]; @@ -122,10 +104,7 @@ } static struct expression * -new_exp_2 (op, left, right) - enum operator op; - struct expression *left; - struct expression *right; +new_exp_2 (enum operator op, struct expression *left, struct expression *right) { struct expression *args[2]; @@ -135,11 +114,8 @@ } static inline struct expression * -new_exp_3 (op, bexp, tbranch, fbranch) - enum operator op; - struct expression *bexp; - struct expression *tbranch; - struct expression *fbranch; +new_exp_3 (enum operator op, struct expression *bexp, + struct expression *tbranch, struct expression *fbranch) { struct expression *args[3]; @@ -230,8 +206,7 @@ void internal_function -FREE_EXPRESSION (exp) - struct expression *exp; +FREE_EXPRESSION (struct expression *exp) { if (exp == NULL) return; @@ -257,9 +232,7 @@ static int -yylex (lval, pexp) - YYSTYPE *lval; - const char **pexp; +yylex (YYSTYPE *lval, const char **pexp) { const char *exp = *pexp; int result; @@ -402,8 +375,7 @@ static void -yyerror (str) - const char *str; +yyerror (const char *str) { /* Do nothing. We don't print error messages here. */ } diff -urN gawk-3.1.3/intl/printf-args.c gawk-3.1.4/intl/printf-args.c --- gawk-3.1.3/intl/printf-args.c 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/intl/printf-args.c 2004-02-19 23:08:40.000000000 +0200 @@ -0,0 +1,119 @@ +/* Decomposed printf argument list. + Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published + by the Free Software Foundation; either version 2, 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +/* Specification. */ +#include "printf-args.h" + +#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; +#ifdef HAVE_LONG_LONG + 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; +#ifdef HAVE_LONG_DOUBLE + case TYPE_LONGDOUBLE: + ap->a.a_longdouble = va_arg (args, long double); + break; +#endif + case TYPE_CHAR: + ap->a.a_char = va_arg (args, int); + break; +#ifdef HAVE_WINT_T + case TYPE_WIDE_CHAR: + ap->a.a_wide_char = va_arg (args, wint_t); + break; +#endif + case TYPE_STRING: + ap->a.a_string = va_arg (args, const char *); + break; +#ifdef HAVE_WCHAR_T + case TYPE_WIDE_STRING: + ap->a.a_wide_string = va_arg (args, const wchar_t *); + 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; +#ifdef HAVE_LONG_LONG + case TYPE_COUNT_LONGLONGINT_POINTER: + ap->a.a_count_longlongint_pointer = va_arg (args, long long int *); + break; +#endif + default: + /* Unknown type. */ + return -1; + } + return 0; +} diff -urN gawk-3.1.3/intl/printf-args.h gawk-3.1.4/intl/printf-args.h --- gawk-3.1.3/intl/printf-args.h 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/intl/printf-args.h 2004-02-19 23:08:40.000000000 +0200 @@ -0,0 +1,137 @@ +/* Decomposed printf argument list. + Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published + by the Free Software Foundation; either version 2, 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + USA. */ + +#ifndef _PRINTF_ARGS_H +#define _PRINTF_ARGS_H + +/* Get size_t. */ +#include + +/* Get wchar_t. */ +#ifdef HAVE_WCHAR_T +# include +#endif + +/* Get wint_t. */ +#ifdef 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, +#ifdef HAVE_LONG_LONG + TYPE_LONGLONGINT, + TYPE_ULONGLONGINT, +#endif + TYPE_DOUBLE, +#ifdef HAVE_LONG_DOUBLE + TYPE_LONGDOUBLE, +#endif + TYPE_CHAR, +#ifdef HAVE_WINT_T + TYPE_WIDE_CHAR, +#endif + TYPE_STRING, +#ifdef 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 +#ifdef HAVE_LONG_LONG +, TYPE_COUNT_LONGLONGINT_POINTER +#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; +#ifdef HAVE_LONG_LONG + long long int a_longlongint; + unsigned long long int a_ulonglongint; +#endif + float a_float; + double a_double; +#ifdef HAVE_LONG_DOUBLE + long double a_longdouble; +#endif + int a_char; +#ifdef HAVE_WINT_T + wint_t a_wide_char; +#endif + const char* a_string; +#ifdef 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; +#ifdef HAVE_LONG_LONG + long long int * a_count_longlongint_pointer; +#endif + } + a; +} +argument; + +typedef struct +{ + size_t count; + argument *arg; +} +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 */ diff -urN gawk-3.1.3/intl/printf-parse.c gawk-3.1.4/intl/printf-parse.c --- gawk-3.1.3/intl/printf-parse.c 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/intl/printf-parse.c 2004-02-19 23:08:40.000000000 +0200 @@ -0,0 +1,537 @@ +/* Formatted output to strings. + Copyright (C) 1999-2000, 2002-2003 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published + by the Free Software Foundation; either version 2, 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +/* Specification. */ +#if WIDE_CHAR_VERSION +# include "wprintf-parse.h" +#else +# include "printf-parse.h" +#endif + +/* Get size_t, NULL. */ +#include + +/* Get intmax_t. */ +#if HAVE_STDINT_H_WITH_UINTMAX +# include +#endif +#if HAVE_INTTYPES_H_WITH_UINTMAX +# include +#endif + +/* malloc(), realloc(), free(). */ +#include + +/* Checked size_t computations. */ +#include "xsize.h" + +#if WIDE_CHAR_VERSION +# define PRINTF_PARSE wprintf_parse +# define CHAR_T wchar_t +# define DIRECTIVE wchar_t_directive +# define DIRECTIVES wchar_t_directives +#else +# define PRINTF_PARSE printf_parse +# define CHAR_T char +# define DIRECTIVE char_directive +# define DIRECTIVES char_directives +#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 = 1; + d->dir = malloc (d_allocated * sizeof (DIRECTIVE)); + if (d->dir == NULL) + /* Out of memory. */ + return -1; + + a->count = 0; + a_allocated = 0; + a->arg = NULL; + +#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 error; \ + memory = (a->arg \ + ? realloc (a->arg, memory_size) \ + : malloc (memory_size)); \ + if (memory == NULL) \ + /* Out of memory. */ \ + goto error; \ + 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++; + } + 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++; + } +#ifdef HAVE_INTMAX_T + 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++; + } +#endif + 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++; + } + else + break; + } + + /* Read the conversion character. */ + c = *cp++; + switch (c) + { + case 'd': case 'i': +#ifdef HAVE_LONG_LONG + if (flags >= 16 || (flags & 4)) + type = TYPE_LONGLONGINT; + else +#endif + 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': +#ifdef HAVE_LONG_LONG + if (flags >= 16 || (flags & 4)) + type = TYPE_ULONGLONGINT; + else +#endif + 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': +#ifdef HAVE_LONG_DOUBLE + if (flags >= 16 || (flags & 4)) + type = TYPE_LONGDOUBLE; + else +#endif + type = TYPE_DOUBLE; + break; + case 'c': + if (flags >= 8) +#ifdef HAVE_WINT_T + type = TYPE_WIDE_CHAR; +#else + goto error; +#endif + else + type = TYPE_CHAR; + break; +#ifdef HAVE_WINT_T + case 'C': + type = TYPE_WIDE_CHAR; + c = 'c'; + break; +#endif + case 's': + if (flags >= 8) +#ifdef HAVE_WCHAR_T + type = TYPE_WIDE_STRING; +#else + goto error; +#endif + else + type = TYPE_STRING; + break; +#ifdef HAVE_WCHAR_T + case 'S': + type = TYPE_WIDE_STRING; + c = 's'; + break; +#endif + case 'p': + type = TYPE_POINTER; + break; + case 'n': +#ifdef HAVE_LONG_LONG + if (flags >= 16 || (flags & 4)) + type = TYPE_COUNT_LONGLONGINT_POINTER; + else +#endif + 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; + 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 error; + memory = realloc (d->dir, memory_size); + if (memory == NULL) + /* Out of memory. */ + goto error; + d->dir = memory; + } + } + } + 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) + free (a->arg); + if (d->dir) + free (d->dir); + return -1; +} + +#undef DIRECTIVES +#undef DIRECTIVE +#undef CHAR_T +#undef PRINTF_PARSE diff -urN gawk-3.1.3/intl/printf-parse.h gawk-3.1.4/intl/printf-parse.h --- gawk-3.1.3/intl/printf-parse.h 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/intl/printf-parse.h 2004-02-19 23:08:40.000000000 +0200 @@ -0,0 +1,75 @@ +/* Parse printf format string. + Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published + by the Free Software Foundation; either version 2, 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + USA. */ + +#ifndef _PRINTF_PARSE_H +#define _PRINTF_PARSE_H + +#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 + +/* arg_index value indicating that no argument is consumed. */ +#define ARG_NONE (~(size_t)0) + +/* 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 e E g G 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_directives; + + +/* 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. */ +#ifdef STATIC +STATIC +#else +extern +#endif +int printf_parse (const char *format, char_directives *d, arguments *a); + +#endif /* _PRINTF_PARSE_H */ diff -urN gawk-3.1.3/intl/printf.c gawk-3.1.4/intl/printf.c --- gawk-3.1.3/intl/printf.c 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/intl/printf.c 2004-02-19 23:08:40.000000000 +0200 @@ -0,0 +1,371 @@ +/* Formatted output to strings, using POSIX/XSI format strings with positions. + Copyright (C) 2003 Free Software Foundation, Inc. + Written by Bruno Haible , 2003. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published + by the Free Software Foundation; either version 2, 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#ifdef __GNUC__ +# define alloca __builtin_alloca +# define HAVE_ALLOCA 1 +#else +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# if defined HAVE_ALLOCA_H || defined _LIBC +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca +char *alloca (); +# endif +# endif +# endif +# endif +#endif + +#include + +#if !HAVE_POSIX_PRINTF + +#include +#include + +/* When building a DLL, we must export some functions. Note that because + the functions are only defined for binary backward compatibility, we + don't need to use __declspec(dllimport) in any case. */ +#if defined _MSC_VER && BUILDING_DLL +# define DLL_EXPORTED __declspec(dllexport) +#else +# define DLL_EXPORTED +#endif + +#define STATIC static + +/* Define auxiliary functions declared in "printf-args.h". */ +#include "printf-args.c" + +/* Define auxiliary functions declared in "printf-parse.h". */ +#include "printf-parse.c" + +/* Define functions declared in "vasnprintf.h". */ +#define vasnprintf libintl_vasnprintf +#include "vasnprintf.c" +#if 0 /* not needed */ +#define asnprintf libintl_asnprintf +#include "asnprintf.c" +#endif + +DLL_EXPORTED +int +libintl_vfprintf (FILE *stream, const char *format, va_list args) +{ + if (strchr (format, '$') == NULL) + return vfprintf (stream, format, args); + else + { + size_t length; + char *result = libintl_vasnprintf (NULL, &length, format, args); + int retval = -1; + if (result != NULL) + { + if (fwrite (result, 1, length, stream) == length) + retval = length; + free (result); + } + return retval; + } +} + +DLL_EXPORTED +int +libintl_fprintf (FILE *stream, const char *format, ...) +{ + va_list args; + int retval; + + va_start (args, format); + retval = libintl_vfprintf (stream, format, args); + va_end (args); + return retval; +} + +DLL_EXPORTED +int +libintl_vprintf (const char *format, va_list args) +{ + return libintl_vfprintf (stdout, format, args); +} + +DLL_EXPORTED +int +libintl_printf (const char *format, ...) +{ + va_list args; + int retval; + + va_start (args, format); + retval = libintl_vprintf (format, args); + va_end (args); + return retval; +} + +DLL_EXPORTED +int +libintl_vsprintf (char *resultbuf, const char *format, va_list args) +{ + if (strchr (format, '$') == NULL) + return vsprintf (resultbuf, format, args); + else + { + size_t length = (size_t) ~0 / (4 * sizeof (char)); + char *result = libintl_vasnprintf (resultbuf, &length, format, args); + if (result != resultbuf) + { + free (result); + return -1; + } + else + return length; + } +} + +DLL_EXPORTED +int +libintl_sprintf (char *resultbuf, const char *format, ...) +{ + va_list args; + int retval; + + va_start (args, format); + retval = libintl_vsprintf (resultbuf, format, args); + va_end (args); + return retval; +} + +#if HAVE_SNPRINTF + +# if HAVE_DECL__SNPRINTF + /* Windows. */ +# define system_vsnprintf _vsnprintf +# else + /* Unix. */ +# define system_vsnprintf vsnprintf +# endif + +DLL_EXPORTED +int +libintl_vsnprintf (char *resultbuf, size_t length, const char *format, va_list args) +{ + if (strchr (format, '$') == NULL) + return system_vsnprintf (resultbuf, length, format, args); + else + { + size_t maxlength = length; + char *result = libintl_vasnprintf (resultbuf, &length, format, args); + if (result != resultbuf) + { + if (maxlength > 0) + { + if (length < maxlength) + abort (); + memcpy (resultbuf, result, maxlength - 1); + resultbuf[maxlength - 1] = '\0'; + } + free (result); + return -1; + } + else + return length; + } +} + +DLL_EXPORTED +int +libintl_snprintf (char *resultbuf, size_t length, const char *format, ...) +{ + va_list args; + int retval; + + va_start (args, format); + retval = libintl_vsnprintf (resultbuf, length, format, args); + va_end (args); + return retval; +} + +#endif + +#if HAVE_ASPRINTF + +DLL_EXPORTED +int +libintl_vasprintf (char **resultp, const char *format, va_list args) +{ + size_t length; + char *result = libintl_vasnprintf (NULL, &length, format, args); + if (result == NULL) + return -1; + *resultp = result; + return length; +} + +DLL_EXPORTED +int +libintl_asprintf (char **resultp, const char *format, ...) +{ + va_list args; + int retval; + + va_start (args, format); + retval = libintl_vasprintf (resultp, format, args); + va_end (args); + return retval; +} + +#endif + +#if HAVE_FWPRINTF + +#include + +#define WIDE_CHAR_VERSION 1 + +/* Define auxiliary functions declared in "wprintf-parse.h". */ +#include "printf-parse.c" + +/* Define functions declared in "vasnprintf.h". */ +#define vasnwprintf libintl_vasnwprintf +#include "vasnprintf.c" +#if 0 /* not needed */ +#define asnwprintf libintl_asnwprintf +#include "asnprintf.c" +#endif + +# if HAVE_DECL__SNWPRINTF + /* Windows. */ +# define system_vswprintf _vsnwprintf +# else + /* Unix. */ +# define system_vswprintf vswprintf +# endif + +DLL_EXPORTED +int +libintl_vfwprintf (FILE *stream, const wchar_t *format, va_list args) +{ + if (wcschr (format, '$') == NULL) + return vfwprintf (stream, format, args); + else + { + size_t length; + wchar_t *result = libintl_vasnwprintf (NULL, &length, format, args); + int retval = -1; + if (result != NULL) + { + size_t i; + for (i = 0; i < length; i++) + if (fputwc (result[i], stream) == WEOF) + break; + if (i == length) + retval = length; + free (result); + } + return retval; + } +} + +DLL_EXPORTED +int +libintl_fwprintf (FILE *stream, const wchar_t *format, ...) +{ + va_list args; + int retval; + + va_start (args, format); + retval = libintl_vfwprintf (stream, format, args); + va_end (args); + return retval; +} + +DLL_EXPORTED +int +libintl_vwprintf (const wchar_t *format, va_list args) +{ + return libintl_vfwprintf (stdout, format, args); +} + +DLL_EXPORTED +int +libintl_wprintf (const wchar_t *format, ...) +{ + va_list args; + int retval; + + va_start (args, format); + retval = libintl_vwprintf (format, args); + va_end (args); + return retval; +} + +DLL_EXPORTED +int +libintl_vswprintf (wchar_t *resultbuf, size_t length, const wchar_t *format, va_list args) +{ + if (wcschr (format, '$') == NULL) + return system_vswprintf (resultbuf, length, format, args); + else + { + size_t maxlength = length; + wchar_t *result = libintl_vasnwprintf (resultbuf, &length, format, args); + if (result != resultbuf) + { + if (maxlength > 0) + { + if (length < maxlength) + abort (); + memcpy (resultbuf, result, (maxlength - 1) * sizeof (wchar_t)); + resultbuf[maxlength - 1] = 0; + } + free (result); + return -1; + } + else + return length; + } +} + +DLL_EXPORTED +int +libintl_swprintf (wchar_t *resultbuf, size_t length, const wchar_t *format, ...) +{ + va_list args; + int retval; + + va_start (args, format); + retval = libintl_vswprintf (resultbuf, length, format, args); + va_end (args); + return retval; +} + +#endif + +#endif diff -urN gawk-3.1.3/intl/relocatable.c gawk-3.1.4/intl/relocatable.c --- gawk-3.1.3/intl/relocatable.c 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/relocatable.c 2004-02-19 23:08:40.000000000 +0200 @@ -42,7 +42,12 @@ #ifdef NO_XMALLOC # define xmalloc malloc #else -# include "xmalloc.h" +# include "xalloc.h" +#endif + +#if defined _WIN32 || defined __WIN32__ +# define WIN32_LEAN_AND_MEAN +# include #endif #if DEPENDS_ON_LIBCHARSET @@ -152,6 +157,8 @@ #endif } +#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR) + /* Convenience function: Computes the current installation prefix, based on the original installation prefix, the original installation directory of a particular @@ -266,6 +273,8 @@ } } +#endif /* !IN_LIBRARY || PIC */ + #if defined PIC && defined INSTALLDIR /* Full pathname of shared library, or NULL. */ @@ -304,7 +313,8 @@ static void find_shared_library_fullname () { -#ifdef __linux__ +#if defined __linux__ && __GLIBC__ >= 2 + /* Linux has /proc/self/maps. glibc 2 has the getline() function. */ FILE *fp; /* Open the current process' maps file. It describes one VMA per line. */ diff -urN gawk-3.1.3/intl/relocatable.h gawk-3.1.4/intl/relocatable.h --- gawk-3.1.3/intl/relocatable.h 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/relocatable.h 2004-02-19 23:08:40.000000000 +0200 @@ -20,6 +20,11 @@ #ifndef _RELOCATABLE_H #define _RELOCATABLE_H +#ifdef __cplusplus +extern "C" { +#endif + + /* This can be enabled through the configure --enable-relocatable option. */ #if ENABLE_RELOCATABLE @@ -64,4 +69,9 @@ #endif + +#ifdef __cplusplus +} +#endif + #endif /* _RELOCATABLE_H */ diff -urN gawk-3.1.3/intl/textdomain.c gawk-3.1.4/intl/textdomain.c --- gawk-3.1.3/intl/textdomain.c 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/intl/textdomain.c 2004-02-19 23:08:40.000000000 +0200 @@ -1,5 +1,5 @@ /* Implementation of the textdomain(3) function. - Copyright (C) 1995-1998, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -77,8 +77,7 @@ If DOMAINNAME is null, return the current default. If DOMAINNAME is "", reset to the default of "messages". */ char * -TEXTDOMAIN (domainname) - const char *domainname; +TEXTDOMAIN (const char *domainname) { char *new_domain; char *old_domain; diff -urN gawk-3.1.3/intl/vasnprintf.c gawk-3.1.4/intl/vasnprintf.c --- gawk-3.1.3/intl/vasnprintf.c 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/intl/vasnprintf.c 2004-02-19 23:08:40.000000000 +0200 @@ -0,0 +1,887 @@ +/* vsprintf with automatic memory allocation. + Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published + by the Free Software Foundation; either version 2, 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + USA. */ + +/* 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 + +#ifdef HAVE_CONFIG_H +# include +#endif +#ifndef IN_LIBINTL +# include +#endif + +/* Specification. */ +#if WIDE_CHAR_VERSION +# include "vasnwprintf.h" +#else +# include "vasnprintf.h" +#endif + +#include /* snprintf(), sprintf() */ +#include /* abort(), malloc(), realloc(), free() */ +#include /* memcpy(), strlen() */ +#include /* errno */ +#include /* CHAR_BIT */ +#include /* DBL_MAX_EXP, LDBL_MAX_EXP */ +#if WIDE_CHAR_VERSION +# include "wprintf-parse.h" +#else +# include "printf-parse.h" +#endif + +/* Checked size_t computations. */ +#include "xsize.h" + +#ifdef HAVE_WCHAR_T +# ifdef 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 WIDE_CHAR_VERSION +# define VASNPRINTF vasnwprintf +# define CHAR_T wchar_t +# define DIRECTIVE wchar_t_directive +# define DIRECTIVES wchar_t_directives +# define PRINTF_PARSE wprintf_parse +# define USE_SNPRINTF 1 +# if HAVE_DECL__SNWPRINTF + /* On Windows, the function swprintf() has a different signature than + on Unix; we use the _snwprintf() function instead. */ +# define SNPRINTF _snwprintf +# else + /* Unix. */ +# define SNPRINTF swprintf +# endif +#else +# define VASNPRINTF vasnprintf +# define CHAR_T char +# define DIRECTIVE char_directive +# define DIRECTIVES char_directives +# define PRINTF_PARSE printf_parse +# define USE_SNPRINTF (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF) +# if HAVE_DECL__SNPRINTF + /* Windows. */ +# define SNPRINTF _snprintf +# else + /* Unix. */ +# define SNPRINTF snprintf +# endif +#endif + +CHAR_T * +VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list args) +{ + DIRECTIVES d; + arguments a; + + if (PRINTF_PARSE (format, &d, &a) < 0) + { + errno = EINVAL; + return NULL; + } + +#define CLEANUP() \ + free (d.dir); \ + if (a.arg) \ + free (a.arg); + + if (printf_fetchargs (args, &a) < 0) + { + CLEANUP (); + errno = EINVAL; + return NULL; + } + + { + size_t buf_neededlength; + CHAR_T *buf; + CHAR_T *buf_malloced; + const CHAR_T *cp; + size_t i; + DIRECTIVE *dp; + /* Output string accumulator. */ + CHAR_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 (CHAR_T)) + { + buf = (CHAR_T *) alloca (buf_neededlength * sizeof (CHAR_T)); + buf_malloced = NULL; + } + else +#endif + { + size_t buf_memsize = xtimes (buf_neededlength, sizeof (CHAR_T)); + if (size_overflow_p (buf_memsize)) + goto out_of_memory_1; + buf = (CHAR_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; \ + CHAR_T *memory; \ + \ + allocated = (allocated > 0 ? xtimes (allocated, 2) : 12); \ + if ((needed) > allocated) \ + allocated = (needed); \ + memory_size = xtimes (allocated, sizeof (CHAR_T)); \ + if (size_overflow_p (memory_size)) \ + goto out_of_memory; \ + if (result == resultbuf || result == NULL) \ + memory = (CHAR_T *) malloc (memory_size); \ + else \ + memory = (CHAR_T *) realloc (result, memory_size); \ + if (memory == NULL) \ + goto out_of_memory; \ + if (result == resultbuf && length > 0) \ + memcpy (memory, result, length * sizeof (CHAR_T)); \ + 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); + memcpy (result + length, cp, n * sizeof (CHAR_T)); + length = augmented_length; + } + 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; +#ifdef HAVE_LONG_LONG + case TYPE_COUNT_LONGLONGINT_POINTER: + *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length; + break; +#endif + default: + abort (); + } + } + else + { + arg_type type = a.arg[dp->arg_index].type; + CHAR_T *p; + unsigned int prefix_count; + int prefixes[2]; +#if !USE_SNPRINTF + size_t tmp_length; + CHAR_T tmpbuf[700]; + CHAR_T *tmp; + + /* Allocate a temporary buffer of sufficient size for calling + sprintf. */ + { + size_t width; + size_t precision; + + 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; + width = (arg < 0 ? (unsigned int) (-arg) : arg); + } + else + { + const CHAR_T *digitp = dp->width_start; + + do + width = xsum (xtimes (width, 10), *digitp++ - '0'); + while (digitp != dp->width_end); + } + } + + 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; + precision = (arg < 0 ? 0 : arg); + } + else + { + const CHAR_T *digitp = dp->precision_start + 1; + + precision = 0; + do + precision = xsum (xtimes (precision, 10), *digitp++ - '0'); + while (digitp != dp->precision_end); + } + } + + switch (dp->conversion) + { + + case 'd': case 'i': case 'u': +# ifdef HAVE_LONG_LONG + if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) + tmp_length = + (unsigned int) (sizeof (unsigned long long) * CHAR_BIT + * 0.30103 /* binary -> decimal */ + * 2 /* estimate for FLAG_GROUP */ + ) + + 1 /* turn floor into ceil */ + + 1; /* account for leading sign */ + else +# endif + if (type == TYPE_LONGINT || type == TYPE_ULONGINT) + tmp_length = + (unsigned int) (sizeof (unsigned long) * CHAR_BIT + * 0.30103 /* binary -> decimal */ + * 2 /* estimate for FLAG_GROUP */ + ) + + 1 /* turn floor into ceil */ + + 1; /* account for leading sign */ + else + tmp_length = + (unsigned int) (sizeof (unsigned int) * CHAR_BIT + * 0.30103 /* binary -> decimal */ + * 2 /* estimate for FLAG_GROUP */ + ) + + 1 /* turn floor into ceil */ + + 1; /* account for leading sign */ + break; + + case 'o': +# ifdef HAVE_LONG_LONG + 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 */ + + 1; /* account for leading sign */ + 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 */ + + 1; /* account for leading sign */ + else + tmp_length = + (unsigned int) (sizeof (unsigned int) * CHAR_BIT + * 0.333334 /* binary -> octal */ + ) + + 1 /* turn floor into ceil */ + + 1; /* account for leading sign */ + break; + + case 'x': case 'X': +# ifdef HAVE_LONG_LONG + 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 */ + + 2; /* account for leading sign or alternate form */ + 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 */ + + 2; /* account for leading sign or alternate form */ + else + tmp_length = + (unsigned int) (sizeof (unsigned int) * CHAR_BIT + * 0.25 /* binary -> hexadecimal */ + ) + + 1 /* turn floor into ceil */ + + 2; /* account for leading sign or alternate form */ + break; + + case 'f': case 'F': +# ifdef HAVE_LONG_DOUBLE + 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 +# endif + 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': + case 'a': case 'A': + tmp_length = + 12; /* sign, decimal point, exponent etc. */ + tmp_length = xsum (tmp_length, precision); + break; + + case 'c': +# if defined HAVE_WINT_T && !WIDE_CHAR_VERSION + if (type == TYPE_WIDE_CHAR) + tmp_length = MB_CUR_MAX; + else +# endif + tmp_length = 1; + break; + + case 's': +# ifdef HAVE_WCHAR_T + if (type == TYPE_WIDE_STRING) + { + tmp_length = + local_wcslen (a.arg[dp->arg_index].a.a_wide_string); + +# if !WIDE_CHAR_VERSION + tmp_length = xtimes (tmp_length, MB_CUR_MAX); +# endif + } + else +# endif + tmp_length = strlen (a.arg[dp->arg_index].a.a_string); + 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 (tmp_length < width) + tmp_length = width; + + tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ + } + + if (tmp_length <= sizeof (tmpbuf) / sizeof (CHAR_T)) + tmp = tmpbuf; + else + { + size_t tmp_memsize = xtimes (tmp_length, sizeof (CHAR_T)); + + if (size_overflow_p (tmp_memsize)) + /* Overflow, would lead to out of memory. */ + goto out_of_memory; + tmp = (CHAR_T *) malloc (tmp_memsize); + if (tmp == NULL) + /* Out of memory. */ + goto out_of_memory; + } +#endif + + /* Construct the format string for calling snprintf or + sprintf. */ + p = buf; + *p++ = '%'; + if (dp->flags & FLAG_GROUP) + *p++ = '\''; + if (dp->flags & FLAG_LEFT) + *p++ = '-'; + if (dp->flags & FLAG_SHOWSIGN) + *p++ = '+'; + if (dp->flags & FLAG_SPACE) + *p++ = ' '; + if (dp->flags & FLAG_ALT) + *p++ = '#'; + if (dp->flags & FLAG_ZERO) + *p++ = '0'; + if (dp->width_start != dp->width_end) + { + size_t n = dp->width_end - dp->width_start; + memcpy (p, dp->width_start, n * sizeof (CHAR_T)); + p += n; + } + if (dp->precision_start != dp->precision_end) + { + size_t n = dp->precision_end - dp->precision_start; + memcpy (p, dp->precision_start, n * sizeof (CHAR_T)); + p += n; + } + + switch (type) + { +#ifdef HAVE_LONG_LONG + case TYPE_LONGLONGINT: + case TYPE_ULONGLONGINT: + *p++ = 'l'; + /*FALLTHROUGH*/ +#endif + case TYPE_LONGINT: + case TYPE_ULONGINT: +#ifdef HAVE_WINT_T + case TYPE_WIDE_CHAR: +#endif +#ifdef HAVE_WCHAR_T + case TYPE_WIDE_STRING: +#endif + *p++ = 'l'; + break; +#ifdef HAVE_LONG_DOUBLE + case TYPE_LONGDOUBLE: + *p++ = 'L'; + break; +#endif + default: + break; + } + *p = dp->conversion; +#if USE_SNPRINTF + p[1] = '%'; + p[2] = 'n'; + p[3] = '\0'; +#else + p[1] = '\0'; +#endif + + /* Construct the arguments for calling snprintf or sprintf. */ + prefix_count = 0; + if (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 (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 + /* Prepare checking whether snprintf returns the count + via %n. */ + ENSURE_ALLOCATION (xsum (length, 1)); + result[length] = '\0'; +#endif + + for (;;) + { + size_t maxlen; + int count; + int retcount; + + maxlen = allocated - length; + count = -1; + retcount = 0; + +#if USE_SNPRINTF +# define SNPRINTF_BUF(arg) \ + switch (prefix_count) \ + { \ + case 0: \ + retcount = SNPRINTF (result + length, maxlen, buf, \ + arg, &count); \ + break; \ + case 1: \ + retcount = SNPRINTF (result + length, maxlen, buf, \ + prefixes[0], arg, &count); \ + break; \ + case 2: \ + retcount = SNPRINTF (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 + + 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; +#ifdef HAVE_LONG_LONG + 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; +#ifdef HAVE_LONG_DOUBLE + case TYPE_LONGDOUBLE: + { + long double arg = a.arg[dp->arg_index].a.a_longdouble; + SNPRINTF_BUF (arg); + } + break; +#endif + case TYPE_CHAR: + { + int arg = a.arg[dp->arg_index].a.a_char; + SNPRINTF_BUF (arg); + } + break; +#ifdef 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; +#ifdef 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 && result[length + count] != '\0') + abort (); + /* Portability hack. */ + if (retcount > count) + count = retcount; + } + else + { + /* snprintf() doesn't understand the '%n' + directive. */ + if (p[1] != '\0') + { + /* Don't use the '%n' directive; instead, look + at the snprintf() return value. */ + p[1] = '\0'; + continue; + } + else + { + /* Look at the snprintf() return value. */ + if (retcount < 0) + { + /* 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. */ + size_t bigger_need = + xsum (xtimes (allocated, 2), 12); + ENSURE_ALLOCATION (bigger_need); + continue; + } + else + count = retcount; + } + } +#endif + + /* Attempt to handle failure. */ + if (count < 0) + { + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = EINVAL; + return NULL; + } + +#if !USE_SNPRINTF + if (count >= tmp_length) + /* tmp_length was incorrectly calculated - fix the + code above! */ + abort (); +#endif + + /* Make room for the result. */ + if (count >= maxlen) + { + /* Need at least count bytes. But allocate + proportionally, to avoid looping eternally if + snprintf() reports a too small count. */ + size_t n = + xmax (xsum (length, count), xtimes (allocated, 2)); + + ENSURE_ALLOCATION (n); +#if USE_SNPRINTF + continue; +#endif + } + +#if USE_SNPRINTF + /* The snprintf() result did fit. */ +#else + /* Append the sprintf() result. */ + memcpy (result + length, tmp, count * sizeof (CHAR_T)); + if (tmp != tmpbuf) + free (tmp); +#endif + + length += count; + break; + } + } + } + } + + /* Add the final NUL. */ + ENSURE_ALLOCATION (xsum (length, 1)); + result[length] = '\0'; + + if (result != resultbuf && length + 1 < allocated) + { + /* Shrink the allocated memory if possible. */ + CHAR_T *memory; + + memory = (CHAR_T *) realloc (result, (length + 1) * sizeof (CHAR_T)); + if (memory != NULL) + result = memory; + } + + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + *lengthp = length; + return result; + + 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 SNPRINTF +#undef USE_SNPRINTF +#undef PRINTF_PARSE +#undef DIRECTIVES +#undef DIRECTIVE +#undef CHAR_T +#undef VASNPRINTF diff -urN gawk-3.1.3/intl/vasnprintf.h gawk-3.1.4/intl/vasnprintf.h --- gawk-3.1.3/intl/vasnprintf.h 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/intl/vasnprintf.h 2004-02-19 23:08:40.000000000 +0200 @@ -0,0 +1,61 @@ +/* vsprintf with automatic memory allocation. + Copyright (C) 2002-2003 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published + by the Free Software Foundation; either version 2, 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + USA. */ + +#ifndef _VASNPRINTF_H +#define _VASNPRINTF_H + +/* Get va_list. */ +#include + +/* Get size_t. */ +#include + +#ifndef __attribute__ +/* This feature is available in gcc versions 2.5 and later. */ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ +# define __attribute__(Spec) /* empty */ +# endif +/* The __-protected variants of `format' and `printf' attributes + are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) +# define __format__ format +# define __printf__ printf +# endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* 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. */ +extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) + __attribute__ ((__format__ (__printf__, 3, 4))); +extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args) + __attribute__ ((__format__ (__printf__, 3, 0))); + +#ifdef __cplusplus +} +#endif + +#endif /* _VASNPRINTF_H */ diff -urN gawk-3.1.3/intl/vasnwprintf.h gawk-3.1.4/intl/vasnwprintf.h --- gawk-3.1.3/intl/vasnwprintf.h 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/intl/vasnwprintf.h 2004-02-19 23:08:40.000000000 +0200 @@ -0,0 +1,46 @@ +/* vswprintf with automatic memory allocation. + Copyright (C) 2002-2003 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published + by the Free Software Foundation; either version 2, 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + USA. */ + +#ifndef _VASNWPRINTF_H +#define _VASNWPRINTF_H + +/* Get va_list. */ +#include + +/* Get wchar_t, size_t. */ +#include + +#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. */ +extern wchar_t * asnwprintf (wchar_t *resultbuf, size_t *lengthp, const wchar_t *format, ...); +extern wchar_t * vasnwprintf (wchar_t *resultbuf, size_t *lengthp, const wchar_t *format, va_list args); + +#ifdef __cplusplus +} +#endif + +#endif /* _VASNWPRINTF_H */ diff -urN gawk-3.1.3/intl/wprintf-parse.h gawk-3.1.4/intl/wprintf-parse.h --- gawk-3.1.3/intl/wprintf-parse.h 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/intl/wprintf-parse.h 2004-02-19 23:08:40.000000000 +0200 @@ -0,0 +1,75 @@ +/* Parse printf format string. + Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published + by the Free Software Foundation; either version 2, 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + USA. */ + +#ifndef _WPRINTF_PARSE_H +#define _WPRINTF_PARSE_H + +#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 + +/* arg_index value indicating that no argument is consumed. */ +#define ARG_NONE (~(size_t)0) + +/* A parsed directive. */ +typedef struct +{ + const wchar_t* dir_start; + const wchar_t* dir_end; + int flags; + const wchar_t* width_start; + const wchar_t* width_end; + size_t width_arg_index; + const wchar_t* precision_start; + const wchar_t* precision_end; + size_t precision_arg_index; + wchar_t conversion; /* d i o u x X f e E g G c s p n U % but not C S */ + size_t arg_index; +} +wchar_t_directive; + +/* A parsed format string. */ +typedef struct +{ + size_t count; + wchar_t_directive *dir; + size_t max_width_length; + size_t max_precision_length; +} +wchar_t_directives; + + +/* 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. */ +#ifdef STATIC +STATIC +#else +extern +#endif +int wprintf_parse (const wchar_t *format, wchar_t_directives *d, arguments *a); + +#endif /* _WPRINTF_PARSE_H */ diff -urN gawk-3.1.3/intl/xsize.h gawk-3.1.4/intl/xsize.h --- gawk-3.1.3/intl/xsize.h 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/intl/xsize.h 2004-02-19 23:08:40.000000000 +0200 @@ -0,0 +1,109 @@ +/* xsize.h -- Checked size_t computations. + + Copyright (C) 2003 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published + by the Free Software Foundation; either version 2, 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + USA. */ + +#ifndef _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 tupe 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 */ diff -urN gawk-3.1.3/io.c gawk-3.1.4/io.c --- gawk-3.1.3/io.c 2003-07-04 20:50:58.000000000 +0300 +++ gawk-3.1.4/io.c 2004-07-28 16:41:56.000000000 +0300 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2003 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2004 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -122,7 +122,7 @@ REC_OK, /* record and terminator found, recmatch struct filled in */ NOTERM, /* no terminator found, give me more input data */ TERMATEND, /* found terminator at end of buffer */ - TERMNEAREND, /* found terminator close to end of buffer, for RE might be bigger */ + TERMNEAREND /* found terminator close to end of buffer, for RE might be bigger */ } RECVALUE; /* Between calls to a scanning routine, the state is stored in */ /* an [[enum scanstate]] variable. Not all states apply to all */ @@ -134,7 +134,7 @@ NOSTATE, /* scanning not started yet (all) */ INLEADER, /* skipping leading data (RS = "") */ INDATA, /* in body of record (all) */ - INTERM, /* scanning terminator (RS = "", RS = regexp) */ + INTERM /* scanning terminator (RS = "", RS = regexp) */ } SCANSTATE; /* When a record is seen ([[REC_OK]] or [[TERMATEND]]), the following */ /* structure is filled in. */ @@ -201,6 +201,8 @@ #if defined(MSDOS) || defined(OS2) || defined(WIN32) \ || defined(__EMX__) || defined(__CYGWIN__) +/* binmode --- convert BINMODE to string for fopen */ + static const char * binmode(const char *mode) { @@ -245,7 +247,7 @@ nextfile(int skipping) { static long i = 1; - static int files = 0; + static int files = FALSE; NODE *arg; static IOBUF *curfile = NULL; static IOBUF mybuf; @@ -274,7 +276,7 @@ ARGIND_node->var_value = make_number((AWKNUM) i); } if (! arg_assign(arg->stptr, FALSE)) { - files++; + files = TRUE; fname = arg->stptr; curfile = iop_open(fname, binmode("r"), &mybuf); if (curfile == NULL) @@ -288,10 +290,11 @@ break; } } - if (files == 0) { - files++; + if (files == FALSE) { + files = TRUE; /* no args. -- use stdin */ /* FNR is init'ed to 0 */ + unref(FILENAME_node->var_value); FILENAME_node->var_value = make_string("-", 1); fname = "-"; curfile = iop_open(fname, binmode("r"), &mybuf); @@ -305,7 +308,7 @@ fatal(_("cannot open file `%s' for reading (%s)"), fname, strerror(errno)); /* NOTREACHED */ - return 0; + return (IOBUF *) 0; } /* set_FNR --- update internal FNR from awk variable */ @@ -555,6 +558,22 @@ #endif /* HAVE_SOCKETS */ for (rp = red_head; rp != NULL; rp = rp->next) { +#ifndef PIPES_SIMULATED + /* + * This is an efficiency hack. We want to + * recover the process slot for dead children, + * if at all possible. Messing with signal() for + * SIGCLD leads to lots of headaches. However, if + * we've gotten EOF from a child input pipeline, it's + * good bet that the child has died. So recover it. + */ + if ((rp->flag & RED_EOF) && tree->type == Node_redirect_pipein) { + if (rp->pid != -1) + wait_any(0); + } +#endif /* PIPES_SIMULATED */ + + /* now check for a match */ if (strlen(rp->value) == tmp->stlen && STREQN(rp->value, str, tmp->stlen) && ((rp->flag & ~(RED_NOBUF|RED_EOF|RED_PTY)) == tflag @@ -769,8 +788,12 @@ for (rp = red_head; rp != NULL; rp = rp->next) rplast = rp; /* now work back up through the list */ - for (rp = rplast; rp != NULL; rp = rp->prev) - if (rp->fp != NULL && (rp->flag & RED_FILE) != 0) { + for (rp = rplast; rp != NULL; rp = rp->prev) { + /* don't close standard files! */ + if (rp->fp == NULL || rp->fp == stderr || rp->fp == stdout) + continue; + + if ((rp->flag & RED_FILE) != 0) { rp->flag |= RED_USED; errno = 0; if (/* do_lint && */ fclose(rp->fp) != 0) @@ -779,6 +802,7 @@ rp->fp = NULL; break; } + } if (rp == NULL) /* surely this is the only reason ??? */ fatal(_("too many pipes or input files open")); @@ -846,22 +870,13 @@ return tmp; } -/* close_redir --- close an open file or pipe */ +/* close_rp --- separate function to just do closing */ static int -close_redir(register struct redirect *rp, int exitwarn, two_way_close_type how) +close_rp(struct redirect *rp, two_way_close_type how) { int status = 0; - if (rp == NULL) - return 0; - if (rp->fp == stdout || rp->fp == stderr) - return 0; - - if (do_lint && (rp->flag & RED_TWOWAY) == 0 && how != CLOSE_ALL) - lintwarn(_("close: redirection `%s' not opened with `|&', second argument ignored"), - rp->value); - errno = 0; if ((rp->flag & RED_TWOWAY) != 0) { /* two-way pipe */ /* write end: */ @@ -911,6 +926,27 @@ } } + return status; +} + +/* close_redir --- close an open file or pipe */ + +static int +close_redir(register struct redirect *rp, int exitwarn, two_way_close_type how) +{ + int status = 0; + + if (rp == NULL) + return 0; + if (rp->fp == stdout || rp->fp == stderr) + goto checkwarn; /* bypass closing, remove from list */ + + if (do_lint && (rp->flag & RED_TWOWAY) == 0 && how != CLOSE_ALL) + lintwarn(_("close: redirection `%s' not opened with `|&', second argument ignored"), + rp->value); + + status = close_rp(rp, how); + /* SVR4 awk checks and warns about status of close */ if (status != 0) { char *s = strerror(errno); @@ -934,6 +970,7 @@ } } +checkwarn: if (exitwarn) { /* * Don't use lintwarn() here. If lint warnings are fatal, @@ -1230,7 +1267,7 @@ char *cp; char *ptr; int flag = 0; - extern double strtod(); + extern unsigned long strtoul P((const char *, char **endptr, int base)); flag = str2mode(mode); @@ -1258,7 +1295,7 @@ openfd = fileno(stderr); else if (STREQN(cp, "fd/", 3)) { cp += 3; - openfd = (int) strtod(cp, &ptr); + openfd = (int) strtoul(cp, &ptr, 10); if (openfd <= INVALID_HANDLE || ptr == cp) openfd = INVALID_HANDLE; } @@ -1474,7 +1511,7 @@ sprintf(tbuf, "%d %d %d %d", (int) getuid(), (int) geteuid(), (int) getgid(), (int) getegid()); cp = tbuf + strlen(tbuf); -#if defined(NGROUPS_MAX) && NGROUPS_MAX > 0 +#if defined (HAVE_GETGROUPS) && defined(NGROUPS_MAX) && NGROUPS_MAX > 0 for (i = 0; i < ngroups; i++) { *cp++ = ' '; sprintf(cp, "%d", (int) groupset[i]); @@ -1778,7 +1815,7 @@ signal(SIGPIPE, SIG_DFL); execl("/bin/sh", "sh", "-c", str, NULL); - _exit(127); + _exit(errno == ENOENT ? 127 : 126); case -1: save_errno = errno; @@ -2014,7 +2051,7 @@ signal(SIGHUP, hstat); signal(SIGINT, istat); signal(SIGQUIT, qstat); - return(status); + return status; } /* gawk_popen --- open an IOBUF on a child process */ @@ -2088,7 +2125,7 @@ if (rp->iop == NULL) (void) close(p[0]); - return (rp->iop); + return rp->iop; } /* gawk_pclose --- close an open child pipe */ @@ -2137,7 +2174,7 @@ current = NULL; } rp->ifp = current; - return (rp->iop); + return rp->iop; } /* gawk_pclose --- close an open child pipe */ @@ -2186,7 +2223,7 @@ rp->iop = iop_alloc(current, name, NULL); if (rp->iop == NULL) (void) close(current); - return (rp->iop); + return rp->iop; } /* gawk_pclose --- close an open child pipe */ @@ -2336,10 +2373,10 @@ int len; if (STREQ(file, "-")) - return (0); + return 0; if (do_traditional) - return (devopen(file, "r")); + return devopen(file, "r"); if (first) { first = FALSE; @@ -2352,7 +2389,7 @@ /* some kind of path name, no search */ if (ispath(file)) - return (devopen(file, "r")); + return devopen(file, "r"); /* no arbitrary limits: */ len = strlen(awkpath) + strlen(file) + 2; @@ -2374,7 +2411,7 @@ strcpy(trypath, file); if ((fd = devopen(trypath, "r")) > INVALID_HANDLE) { free(trypath); - return (fd); + return fd; } /* no luck, keep going */ @@ -2388,7 +2425,7 @@ * working directory in it. Therefore try to open the file in the * current directory. */ - return (devopen(file, "r")); + return devopen(file, "r"); } #ifdef TEST @@ -2636,7 +2673,7 @@ /* case 1, no match */ if (research(RSre, bp, 0, iop->dataend - bp, TRUE) == -1) { /* set len, in case this all there is. */ - recm->len = iop->dataend - iop->off - 1; + recm->len = iop->dataend - iop->off; return NOTERM; } @@ -3010,8 +3047,8 @@ } else if (RS->stlen > 1) { static int warned = FALSE; - RS_re_yes_case = make_regexp(RS->stptr, RS->stlen, FALSE); - RS_re_no_case = make_regexp(RS->stptr, RS->stlen, TRUE); + RS_re_yes_case = make_regexp(RS->stptr, RS->stlen, FALSE, TRUE); + RS_re_no_case = make_regexp(RS->stptr, RS->stlen, TRUE, TRUE); RS_regexp = (IGNORECASE ? RS_re_no_case : RS_re_yes_case); matchrec = rsrescan; diff -urN gawk-3.1.3/m4/ChangeLog gawk-3.1.4/m4/ChangeLog --- gawk-3.1.3/m4/ChangeLog 2003-07-07 21:02:14.000000000 +0300 +++ gawk-3.1.4/m4/ChangeLog 2004-08-02 12:18:59.000000000 +0300 @@ -1,3 +1,33 @@ +Mon Aug 2 12:18:15 2004 Arnold D. Robbins + + * Release 3.1.4: Release tar file made. + +2004-02-19 gettextize + + * po.m4: Upgrade to gettext-0.14.1. + +2004-01-16 gettextize + + * gettext.m4: Upgrade to gettext-0.13.1. + * intmax.m4: New file, from gettext-0.13.1. + * lib-ld.m4: Upgrade to gettext-0.13.1. + * lib-prefix.m4: Upgrade to gettext-0.13.1. + * longdouble.m4: New file, from gettext-0.13.1. + * longlong.m4: Upgrade to gettext-0.13.1. + * po.m4: Upgrade to gettext-0.13.1. + * printf-posix.m4: New file, from gettext-0.13.1. + * signed.m4: New file, from gettext-0.13.1. + * size_max.m4: New file, from gettext-0.13.1. + * ulonglong.m4: Upgrade to gettext-0.13.1. + * wchar_t.m4: New file, from gettext-0.13.1. + * wint_t.m4: New file, from gettext-0.13.1. + * xsize.m4: New file, from gettext-0.13.1. + * Makefile.am: New file. + +Thu Jan 15 15:51:12 2004 Arnold D. Robbins + + * m4/arch.m4, m4/socket.m4, m4/strtod.m4: Quoting fixed for automake 1.8.x. + Mon Jul 7 11:01:43 2003 Arnold D. Robbins * Release 3.1.3: Release tar file made. diff -urN gawk-3.1.3/m4/arch.m4 gawk-3.1.4/m4/arch.m4 --- gawk-3.1.3/m4/arch.m4 2003-02-04 14:13:43.000000000 +0200 +++ gawk-3.1.4/m4/arch.m4 2004-01-15 15:47:26.000000000 +0200 @@ -1,7 +1,7 @@ dnl dnl arch.m4 --- autoconf input file for gawk dnl -dnl Copyright (C) 1995, 1996, 1998, 1999, 2000, 2003 the Free Software Foundation, Inc. +dnl Copyright (C) 1995, 1996, 1998, 1999, 2000, 2003, 2004 the Free Software Foundation, Inc. dnl dnl This file is part of GAWK, the GNU implementation of the dnl AWK Progamming Language. @@ -22,7 +22,7 @@ dnl dnl Check for AIX and add _XOPEN_SOURCE_EXTENDED -AC_DEFUN(GAWK_AC_AIX_TWEAK, [ +AC_DEFUN([GAWK_AC_AIX_TWEAK], [ AC_MSG_CHECKING([for AIX compilation hacks]) AC_CACHE_VAL(gawk_cv_aix_hack, [ if test -d /lpp @@ -37,7 +37,7 @@ ])dnl dnl Check for Alpha Linux systems -AC_DEFUN(GAWK_AC_LINUX_ALPHA, [ +AC_DEFUN([GAWK_AC_LINUX_ALPHA], [ AC_MSG_CHECKING([for Linux/Alpha compilation hacks]) AC_CACHE_VAL(gawk_cv_linux_alpha_hack, [ if test "Linux" = "`uname`" && test "alpha" = "`uname -m`" diff -urN gawk-3.1.3/m4/gettext.m4 gawk-3.1.4/m4/gettext.m4 --- gawk-3.1.3/m4/gettext.m4 2003-06-16 13:25:34.000000000 +0300 +++ gawk-3.1.4/m4/gettext.m4 2004-02-19 23:08:40.000000000 +0200 @@ -1,4 +1,4 @@ -# gettext.m4 serial 20 (gettext-0.12) +# gettext.m4 serial 28 (gettext-0.13) dnl Copyright (C) 1995-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General @@ -354,9 +354,18 @@ AC_REQUIRE([AC_ISC_POSIX])dnl AC_REQUIRE([AC_HEADER_STDC])dnl AC_REQUIRE([AC_C_CONST])dnl + AC_REQUIRE([bh_C_SIGNED])dnl AC_REQUIRE([AC_C_INLINE])dnl AC_REQUIRE([AC_TYPE_OFF_T])dnl AC_REQUIRE([AC_TYPE_SIZE_T])dnl + AC_REQUIRE([jm_AC_TYPE_LONG_LONG])dnl + AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl + AC_REQUIRE([gt_TYPE_WCHAR_T])dnl + AC_REQUIRE([gt_TYPE_WINT_T])dnl + AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) + AC_REQUIRE([jm_AC_HEADER_STDINT_H]) + AC_REQUIRE([gt_TYPE_INTMAX_T]) + AC_REQUIRE([gt_PRINTF_POSIX]) AC_REQUIRE([AC_FUNC_ALLOCA])dnl AC_REQUIRE([AC_FUNC_MMAP])dnl AC_REQUIRE([jm_GLIBC21])dnl @@ -364,14 +373,57 @@ AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl AC_REQUIRE([gt_INTTYPES_PRI])dnl + AC_REQUIRE([gl_XSIZE])dnl + AC_CHECK_TYPE([ptrdiff_t], , + [AC_DEFINE([ptrdiff_t], [long], + [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) + ]) AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ stdlib.h string.h unistd.h sys/param.h]) - AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \ -geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \ -strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next \ + AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \ +mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \ +strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \ __fsetlocking]) + dnl Use the _snprintf function only if it is declared (because on NetBSD it + dnl is defined as a weak alias of snprintf; we prefer to use the latter). + gt_CHECK_DECL(_snprintf, [#include ]) + gt_CHECK_DECL(_snwprintf, [#include ]) + + dnl Use the *_unlocked functions only if they are declared. + dnl (because some of them were defined without being declared in Solaris + dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built + dnl on Solaris 2.5.1 to run on Solaris 2.6). + dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. + gt_CHECK_DECL(feof_unlocked, [#include ]) + gt_CHECK_DECL(fgets_unlocked, [#include ]) + gt_CHECK_DECL(getc_unlocked, [#include ]) + + case $gt_cv_func_printf_posix in + *yes) HAVE_POSIX_PRINTF=1 ;; + *) HAVE_POSIX_PRINTF=0 ;; + esac + AC_SUBST([HAVE_POSIX_PRINTF]) + if test "$ac_cv_func_asprintf" = yes; then + HAVE_ASPRINTF=1 + else + HAVE_ASPRINTF=0 + fi + AC_SUBST([HAVE_ASPRINTF]) + if test "$ac_cv_func_snprintf" = yes; then + HAVE_SNPRINTF=1 + else + HAVE_SNPRINTF=0 + fi + AC_SUBST([HAVE_SNPRINTF]) + if test "$ac_cv_func_wprintf" = yes; then + HAVE_WPRINTF=1 + else + HAVE_WPRINTF=0 + fi + AC_SUBST([HAVE_WPRINTF]) + AM_ICONV AM_LANGINFO_CODESET if test $ac_cv_header_locale_h = yes; then @@ -411,5 +463,25 @@ ]) +dnl gt_CHECK_DECL(FUNC, INCLUDES) +dnl Check whether a function is declared. +AC_DEFUN([gt_CHECK_DECL], +[ + AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1, + [AC_TRY_COMPILE([$2], [ +#ifndef $1 + char *p = (char *) $1; +#endif +], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)]) + if test $ac_cv_have_decl_$1 = yes; then + gt_value=1 + else + gt_value=0 + fi + AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value], + [Define to 1 if you have the declaration of `$1', and to 0 if you don't.]) +]) + + dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) diff -urN gawk-3.1.3/m4/intmax.m4 gawk-3.1.4/m4/intmax.m4 --- gawk-3.1.3/m4/intmax.m4 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/m4/intmax.m4 2004-02-19 23:08:40.000000000 +0200 @@ -0,0 +1,32 @@ +# intmax.m4 serial 1 (gettext-0.12) +dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. +dnl Test whether the system has the 'intmax_t' type, but don't attempt to +dnl find a replacement if it is lacking. + +AC_DEFUN([gt_TYPE_INTMAX_T], +[ + AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) + AC_REQUIRE([jm_AC_HEADER_STDINT_H]) + AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t, + [AC_TRY_COMPILE([ +#include +#include +#if HAVE_STDINT_H_WITH_UINTMAX +#include +#endif +#if HAVE_INTTYPES_H_WITH_UINTMAX +#include +#endif +], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)]) + if test $gt_cv_c_intmax_t = yes; then + AC_DEFINE(HAVE_INTMAX_T, 1, + [Define if you have the 'intmax_t' type in or .]) + fi +]) diff -urN gawk-3.1.3/m4/lib-ld.m4 gawk-3.1.4/m4/lib-ld.m4 --- gawk-3.1.3/m4/lib-ld.m4 2003-06-16 13:25:34.000000000 +0300 +++ gawk-3.1.4/m4/lib-ld.m4 2004-02-19 23:08:40.000000000 +0200 @@ -1,4 +1,4 @@ -# lib-ld.m4 serial 2 (gettext-0.12) +# lib-ld.m4 serial 3 (gettext-0.13) dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General @@ -14,11 +14,12 @@ AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then - acl_cv_prog_gnu_ld=yes -else - acl_cv_prog_gnu_ld=no -fi]) +case `$LD -v 2>&1 &1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi + 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" diff -urN gawk-3.1.3/m4/lib-prefix.m4 gawk-3.1.4/m4/lib-prefix.m4 --- gawk-3.1.3/m4/lib-prefix.m4 2003-06-16 13:25:34.000000000 +0300 +++ gawk-3.1.4/m4/lib-prefix.m4 2004-02-19 23:08:40.000000000 +0200 @@ -1,4 +1,4 @@ -# lib-prefix.m4 serial 2 (gettext-0.12) +# lib-prefix.m4 serial 3 (gettext-0.13) dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General @@ -13,7 +13,7 @@ dnl require excessive bracketing. ifdef([AC_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], -[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) +[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that diff -urN gawk-3.1.3/m4/longdouble.m4 gawk-3.1.4/m4/longdouble.m4 --- gawk-3.1.3/m4/longdouble.m4 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/m4/longdouble.m4 2004-02-19 23:08:40.000000000 +0200 @@ -0,0 +1,30 @@ +# longdouble.m4 serial 1 (gettext-0.12) +dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. +dnl Test whether the compiler supports the 'long double' type. +dnl Prerequisite: AC_PROG_CC + +AC_DEFUN([gt_TYPE_LONGDOUBLE], +[ + AC_CACHE_CHECK([for long double], gt_cv_c_long_double, + [if test "$GCC" = yes; then + gt_cv_c_long_double=yes + else + AC_TRY_COMPILE([ + /* The Stardent Vistra knows sizeof(long double), but does not support it. */ + long double foo = 0.0; + /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ + int array [2*(sizeof(long double) >= sizeof(double)) - 1]; + ], , + gt_cv_c_long_double=yes, gt_cv_c_long_double=no) + fi]) + if test $gt_cv_c_long_double = yes; then + AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.]) + fi +]) diff -urN gawk-3.1.3/m4/longlong.m4 gawk-3.1.4/m4/longlong.m4 --- gawk-3.1.3/m4/longlong.m4 2003-03-28 11:30:29.000000000 +0300 +++ gawk-3.1.4/m4/longlong.m4 2004-02-19 23:08:40.000000000 +0200 @@ -1,4 +1,10 @@ -#serial 2 +# longlong.m4 serial 4 +dnl Copyright (C) 1999-2003 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. dnl From Paul Eggert. @@ -7,29 +13,13 @@ AC_DEFUN([jm_AC_TYPE_LONG_LONG], [ AC_CACHE_CHECK([for long long], ac_cv_type_long_long, - [AC_TRY_LINK([long long ll = 1; int i = 63;], + [AC_TRY_LINK([long long ll = 1LL; int i = 63;], [long long llmax = (long long) -1; return ll << i | ll >> i | llmax / ll | llmax % ll;], ac_cv_type_long_long=yes, ac_cv_type_long_long=no)]) if test $ac_cv_type_long_long = yes; then AC_DEFINE(HAVE_LONG_LONG, 1, - [Define if you have the long long type.]) - fi -]) - -# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works. - -AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG], -[ - AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, - [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;], - [unsigned long long ullmax = (unsigned long long) -1; - return ull << i | ull >> i | ullmax / ull | ullmax % ull;], - ac_cv_type_unsigned_long_long=yes, - ac_cv_type_unsigned_long_long=no)]) - if test $ac_cv_type_unsigned_long_long = yes; then - AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, - [Define if you have the unsigned long long type.]) + [Define if you have the 'long long' type.]) fi ]) diff -urN gawk-3.1.3/m4/po.m4 gawk-3.1.4/m4/po.m4 --- gawk-3.1.3/m4/po.m4 2003-06-16 13:25:34.000000000 +0300 +++ gawk-3.1.4/m4/po.m4 2004-02-19 23:08:40.000000000 +0200 @@ -1,4 +1,4 @@ -# po.m4 serial 1 (gettext-0.12) +# po.m4 serial 3 (gettext-0.14) dnl Copyright (C) 1995-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General @@ -111,7 +111,7 @@ 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, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend + # 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 @@ -127,19 +127,27 @@ # The set of available languages was given in configure.in. 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= - GMOFILES= UPDATEPOFILES= DUMMYPOFILES= + GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" - GMOFILES="$GMOFILES $srcdirpre$lang.gmo" 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. @@ -174,7 +182,7 @@ 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|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$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 @@ -188,10 +196,231 @@ esac done], [# Capture the value of obsolete ALL_LINGUAS because we need it to compute - # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" ]) ]) + +dnl Postprocesses a Makefile in a directory containing PO files. +AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], +[ + # When this code is run, in config.status, two variables have already been + # set: + # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, + # - LINGUAS is the value of the environment variable LINGUAS at configure + # time. + +changequote(,)dnl + # 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 + + # Find a way to echo strings without interpreting backslash. + if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='echo' + else + if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='printf %s\n' + else + echo_func () { + cat < "$ac_file.tmp" + if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` + cat >> "$ac_file.tmp" < /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/_/-/g'` + cat >> "$ac_file.tmp" <> "$ac_file.tmp" < +#include +/* The string "%2$d %1$d", with dollar characters protected from the shell's + dollar expansion (possibly an autoconf bug). */ +static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; +static char buf[100]; +int main () +{ + sprintf (buf, format, 33, 55); + return (strcmp (buf, "55 33") != 0); +}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no, + [ + AC_EGREP_CPP(notposix, [ +#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ + notposix +#endif + ], gt_cv_func_printf_posix="guessing no", + gt_cv_func_printf_posix="guessing yes") + ]) + ]) + case $gt_cv_func_printf_posix in + *yes) + AC_DEFINE(HAVE_POSIX_PRINTF, 1, + [Define if your printf() function supports format strings with positions.]) + ;; + esac +]) diff -urN gawk-3.1.3/m4/signed.m4 gawk-3.1.4/m4/signed.m4 --- gawk-3.1.3/m4/signed.m4 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/m4/signed.m4 2004-02-19 23:08:41.000000000 +0200 @@ -0,0 +1,19 @@ +# signed.m4 serial 1 (gettext-0.10.40) +dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. + +AC_DEFUN([bh_C_SIGNED], +[ + AC_CACHE_CHECK([for signed], bh_cv_c_signed, + [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)]) + if test $bh_cv_c_signed = no; then + AC_DEFINE(signed, , + [Define to empty if the C compiler doesn't support this keyword.]) + fi +]) diff -urN gawk-3.1.3/m4/size_max.m4 gawk-3.1.4/m4/size_max.m4 --- gawk-3.1.3/m4/size_max.m4 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/m4/size_max.m4 2004-02-19 23:08:41.000000000 +0200 @@ -0,0 +1,61 @@ +# size_max.m4 serial 2 +dnl Copyright (C) 2003 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. + +AC_DEFUN([gl_SIZE_MAX], +[ + AC_CHECK_HEADERS(stdint.h) + dnl First test whether the system already has SIZE_MAX. + AC_MSG_CHECKING([for SIZE_MAX]) + result= + AC_EGREP_CPP([Found it], [ +#include +#if HAVE_STDINT_H +#include +#endif +#ifdef SIZE_MAX +Found it +#endif +], result=yes) + if test -z "$result"; then + dnl Define it ourselves. Here we assume that the type 'size_t' is not wider + dnl than the type 'unsigned long'. + dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr', + dnl which is guaranteed to work from LONG_MIN to LONG_MAX. + _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi, + [#include ], result=?) + _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo, + [#include ], result=?) + _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint, + [#include ], result=?) + if test "$fits_in_uint" = 1; then + dnl Even though SIZE_MAX fits in an unsigned int, it must be of type + dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. + AC_TRY_COMPILE([#include + extern size_t foo; + extern unsigned long foo; + ], [], fits_in_uint=0) + fi + if test -z "$result"; then + if test "$fits_in_uint" = 1; then + result="$res_hi$res_lo"U + else + result="$res_hi$res_lo"UL + fi + else + dnl Shouldn't happen, but who knows... + result='~(size_t)0' + fi + fi + AC_MSG_RESULT([$result]) + if test "$result" != yes; then + AC_DEFINE_UNQUOTED([SIZE_MAX], [$result], + [Define as the maximum value of type 'size_t', if the system doesn't define it.]) + fi +]) diff -urN gawk-3.1.3/m4/socket.m4 gawk-3.1.4/m4/socket.m4 --- gawk-3.1.3/m4/socket.m4 2003-02-04 14:14:35.000000000 +0200 +++ gawk-3.1.4/m4/socket.m4 2004-01-15 15:47:45.000000000 +0200 @@ -1,7 +1,7 @@ dnl dnl socket.m4 --- autoconf input file for gawk dnl -dnl Copyright (C) 1995, 1996, 1998, 1999, 2000, 2003 the Free Software Foundation, Inc. +dnl Copyright (C) 1995, 1996, 1998, 1999, 2000, 2003, 2004 the Free Software Foundation, Inc. dnl dnl This file is part of GAWK, the GNU implementation of the dnl AWK Progamming Language. @@ -23,7 +23,7 @@ dnl Find the socket libraries dnl largely stolen from AC_PATH_XTRA -AC_DEFUN(GAWK_AC_LIB_SOCKETS, [ +AC_DEFUN([GAWK_AC_LIB_SOCKETS], [ gawk_have_sockets=no # Check for system-dependent location of socket libraries diff -urN gawk-3.1.3/m4/strtod.m4 gawk-3.1.4/m4/strtod.m4 --- gawk-3.1.3/m4/strtod.m4 2002-06-11 23:15:12.000000000 +0300 +++ gawk-3.1.4/m4/strtod.m4 2004-01-15 15:48:15.000000000 +0200 @@ -1,7 +1,7 @@ dnl dnl strtod.m4 --- autoconf input file for gawk dnl -dnl Copyright (C) 2001, 2002 the Free Software Foundation, Inc. +dnl Copyright (C) 2001, 2002, 2004 the Free Software Foundation, Inc. dnl dnl This file is part of GAWK, the GNU implementation of the dnl AWK Progamming Language. @@ -22,8 +22,7 @@ dnl Check for strtod with C89 semantics -AC_DEFUN(GAWK_AC_FUNC_STRTOD_C89, -[ +AC_DEFUN([GAWK_AC_FUNC_STRTOD_C89], [ AC_CHECK_HEADERS(stdlib.h) AC_CHECK_FUNCS(strtod) AC_CACHE_CHECK([for strtod with C89 semantics], gawk_ac_cv_func_strtod_c89, diff -urN gawk-3.1.3/m4/ulonglong.m4 gawk-3.1.4/m4/ulonglong.m4 --- gawk-3.1.3/m4/ulonglong.m4 2003-06-16 13:25:34.000000000 +0300 +++ gawk-3.1.4/m4/ulonglong.m4 2004-02-19 23:08:41.000000000 +0200 @@ -1,5 +1,5 @@ -# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40) -dnl Copyright (C) 1999-2002 Free Software Foundation, Inc. +# ulonglong.m4 serial 3 +dnl Copyright (C) 1999-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program @@ -8,16 +8,18 @@ dnl From Paul Eggert. +# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works. + AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG], [ AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, - [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;], + [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;], [unsigned long long ullmax = (unsigned long long) -1; return ull << i | ull >> i | ullmax / ull | ullmax % ull;], ac_cv_type_unsigned_long_long=yes, ac_cv_type_unsigned_long_long=no)]) if test $ac_cv_type_unsigned_long_long = yes; then AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, - [Define if you have the unsigned long long type.]) + [Define if you have the 'unsigned long long' type.]) fi ]) diff -urN gawk-3.1.3/m4/wchar_t.m4 gawk-3.1.4/m4/wchar_t.m4 --- gawk-3.1.3/m4/wchar_t.m4 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/m4/wchar_t.m4 2004-02-19 23:08:41.000000000 +0200 @@ -0,0 +1,22 @@ +# wchar_t.m4 serial 1 (gettext-0.12) +dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. +dnl Test whether has the 'wchar_t' type. +dnl Prerequisite: AC_PROG_CC + +AC_DEFUN([gt_TYPE_WCHAR_T], +[ + AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t, + [AC_TRY_COMPILE([#include + wchar_t foo = (wchar_t)'\0';], , + gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)]) + if test $gt_cv_c_wchar_t = yes; then + AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.]) + fi +]) diff -urN gawk-3.1.3/m4/wint_t.m4 gawk-3.1.4/m4/wint_t.m4 --- gawk-3.1.3/m4/wint_t.m4 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/m4/wint_t.m4 2004-02-19 23:08:41.000000000 +0200 @@ -0,0 +1,22 @@ +# wint_t.m4 serial 1 (gettext-0.12) +dnl Copyright (C) 2003 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. +dnl Test whether has the 'wint_t' type. +dnl Prerequisite: AC_PROG_CC + +AC_DEFUN([gt_TYPE_WINT_T], +[ + AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t, + [AC_TRY_COMPILE([#include + wint_t foo = (wchar_t)'\0';], , + gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)]) + if test $gt_cv_c_wint_t = yes; then + AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.]) + fi +]) diff -urN gawk-3.1.3/m4/xsize.m4 gawk-3.1.4/m4/xsize.m4 --- gawk-3.1.3/m4/xsize.m4 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/m4/xsize.m4 2004-02-19 23:08:41.000000000 +0200 @@ -0,0 +1,14 @@ +# xsize.m4 serial 2 +dnl Copyright (C) 2003 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +AC_DEFUN([gl_XSIZE], +[ + dnl Prerequisites of lib/xsize.h. + AC_REQUIRE([gl_SIZE_MAX]) + AC_CHECK_HEADERS(stdint.h) +]) diff -urN gawk-3.1.3/main.c gawk-3.1.4/main.c --- gawk-3.1.3/main.c 2003-07-07 19:55:27.000000000 +0300 +++ gawk-3.1.4/main.c 2004-07-28 16:42:19.000000000 +0300 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2003 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2004 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -25,11 +25,6 @@ #include "awk.h" #include "getopt.h" -#ifdef TANDEM -#include "ptchlvl.h" /* blech */ -#else -#include "patchlev.h" -#endif #ifndef O_BINARY #include @@ -87,6 +82,10 @@ NODE *Nnull_string; /* The global null string */ +#if ENABLE_NLS && defined(HAVE_LOCALE_H) +struct lconv loc; /* current locale */ +#endif /* ENABLE_NLS && defined(HAVE_LOCALE_H) */ + /* The name the program was invoked under, for error messages */ const char *myname; @@ -141,7 +140,7 @@ int output_is_tty = FALSE; /* control flushing of output */ -extern const char *version_string; /* current version, for printing */ +extern const char *version_string; #if defined (HAVE_GETGROUPS) && defined(NGROUPS_MAX) && NGROUPS_MAX > 0 GETGROUPS_T *groupset; /* current group set */ @@ -252,8 +251,8 @@ gawk_mb_cur_max = MB_CUR_MAX; #endif - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); + (void) bindtextdomain(PACKAGE, LOCALEDIR); + (void) textdomain(PACKAGE); (void) signal(SIGFPE, catchsig); (void) signal(SIGSEGV, catchsig); @@ -556,6 +555,10 @@ setlocale(LC_NUMERIC, ""); #endif +#if ENABLE_NLS && defined(HAVE_LOCALE_H) + loc = *localeconv(); /* Make a local copy of locale numeric info */ +#endif + /* Whew. Finally, run the program. */ if (begin_block != NULL) { in_begin_rule = TRUE; @@ -569,7 +572,7 @@ (void) interpret(end_block); } in_end_rule = FALSE; - if (close_io() != 0 && exit_val == 0) + if (close_io() != 0 && ! exiting && exit_val == 0) exit_val = 1; if (do_profiling) { @@ -787,7 +790,7 @@ {&OFMT_node, "OFMT", Node_OFMT, "%.6g", 0, set_OFMT }, {&RLENGTH_node, "RLENGTH", Node_var, NULL, 0, NULL }, {&RSTART_node, "RSTART", Node_var, NULL, 0, NULL }, -{&SUBSEP_node, "SUBSEP", Node_var, "\034", 0, NULL }, +{&SUBSEP_node, "SUBSEP", Node_SUBSEP, "\034", 0, NULL }, {&ARGIND_node, "ARGIND", Node_var, NULL, 0, NULL }, {&ERRNO_node, "ERRNO", Node_var, NULL, 0, NULL }, {&RT_node, "RT", Node_var, "", 0, NULL }, @@ -891,6 +894,9 @@ * do it the slow and stupid way. sigh. */ + aptr = assoc_lookup(PROCINFO_node, tmp_string("version", 7), FALSE); + *aptr = make_string(VERSION, strlen(VERSION)); + value = getpid(); aptr = assoc_lookup(PROCINFO_node, tmp_string("pid", 3), FALSE); *aptr = make_number(value); @@ -1043,7 +1049,7 @@ static void version() { - printf("%s.%s\n", version_string, PATCHLEVEL); + printf("%s\n", version_string); /* * Per GNU coding standards, print copyright info, * then exit successfully, do nothing else. @@ -1069,6 +1075,8 @@ lintwarn(_("no pre-opened fd %d"), fd); #endif newfd = devopen("/dev/null", "r+"); + /* turn off some compiler warnings "set but not used" */ + newfd += 0; #ifdef MAKE_A_HEROIC_EFFORT if (do_lint && newfd < 0) lintwarn(_("could not pre-open /dev/null for fd %d"), fd); diff -urN gawk-3.1.3/missing gawk-3.1.4/missing --- gawk-3.1.3/missing 2003-03-06 11:11:50.000000000 +0200 +++ gawk-3.1.4/missing 2004-06-21 16:38:34.000000000 +0300 @@ -1,6 +1,10 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. + +scriptversion=2003-09-02.23 + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 +# Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -38,12 +42,23 @@ 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 ;; esac @@ -74,11 +89,13 @@ 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]" + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Send bug reports to ." ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing 0.4 - GNU automake" + echo "missing $scriptversion (GNU Automake)" ;; -*) @@ -94,7 +111,7 @@ fi echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if +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." @@ -108,7 +125,7 @@ fi echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if +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." @@ -122,7 +139,7 @@ fi echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if +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." @@ -146,7 +163,7 @@ fi echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if +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." @@ -162,10 +179,10 @@ fi echo 1>&2 "\ -WARNING: \`$1' is needed, and you do not seem to have it handy on your - system. You might have modified some files without having the +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 \`$1Help2man' as part of \`Autoconf' from any GNU + You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` @@ -185,7 +202,7 @@ bison|yacc) echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if +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." @@ -215,7 +232,7 @@ lex|flex) echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if +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." @@ -243,7 +260,7 @@ fi echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if +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." @@ -268,7 +285,7 @@ fi echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if +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, @@ -323,10 +340,10 @@ *) echo 1>&2 "\ -WARNING: \`$1' is needed, and you do not seem to have it handy on your - system. You might have modified some files without having the +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 prerequirements for installing + 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 @@ -334,3 +351,10 @@ 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-end: "$" +# End: diff -urN gawk-3.1.3/missing_d/ChangeLog gawk-3.1.4/missing_d/ChangeLog --- gawk-3.1.3/missing_d/ChangeLog 2003-07-07 21:02:21.000000000 +0300 +++ gawk-3.1.4/missing_d/ChangeLog 2004-08-02 12:19:02.000000000 +0300 @@ -1,3 +1,20 @@ +Mon Aug 2 12:18:15 2004 Arnold D. Robbins + + * Release 3.1.4: Release tar file made. + +Mon May 3 09:24:21 2004 Arnold D. Robbins + + * strtoul.c: New file. + +Sun May 2 18:03:54 2004 Arnold D. Robbins + + * strtod.c (gawk_strtod): Check for locale's decimal point + instead of hard-wiring period. + +Tue Jan 20 10:38:48 2004 Arnold D. Robbins + + * memmove.c: New file. + Mon Jul 7 11:01:43 2003 Arnold D. Robbins * Release 3.1.3: Release tar file made. diff -urN gawk-3.1.3/missing_d/strtod.c gawk-3.1.4/missing_d/strtod.c --- gawk-3.1.3/missing_d/strtod.c 2003-01-27 11:53:29.000000000 +0200 +++ gawk-3.1.4/missing_d/strtod.c 2004-06-06 14:26:06.000000000 +0300 @@ -28,6 +28,8 @@ * doesn't look like we failed. Sigh. * * Xmass 2002. Fix a bug in ptr determination, eg. for "0e0". + * + * Spring 2004. Update for I18N. Oh joy. */ #if 0 @@ -66,7 +68,15 @@ dig++; } - if (*s == '.') { + if ( +#if ENABLE_NLS && defined(HAVE_LOCALE_H) + loc.decimal_point != NULL + ? *s == loc.decimal_point[0] + : *s == '.' +#else + *s == '.' +#endif + ) { s++; while (*s == '0') { s++; diff -urN gawk-3.1.3/mkinstalldirs gawk-3.1.4/mkinstalldirs --- gawk-3.1.3/mkinstalldirs 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/mkinstalldirs 2004-06-21 16:38:41.000000000 +0300 @@ -1,20 +1,32 @@ #! /bin/sh # mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman + +scriptversion=2004-02-15.20 + +# Original author: Noah Friedman # Created: 1993-05-16 -# Public domain +# Public domain. +# +# This file is maintained in Automake, please report +# bugs to or send patches to +# . errstatus=0 dirmode="" usage="\ -Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." +Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... + +Create each directory DIR (with mode MODE, if specified), including all +leading file name components. + +Report bugs to ." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help - echo "$usage" 1>&2 + echo "$usage" exit 0 ;; -m) # -m PERM arg @@ -23,6 +35,10 @@ dirmode=$1 shift ;; + --version) + echo "$0 $scriptversion" + exit 0 + ;; --) # stop option processing shift break @@ -50,17 +66,37 @@ 0) exit 0 ;; esac +# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and +# mkdir -p a/c at the same time, both will detect that a is missing, +# one will create a, then the other will try to create a and die with +# a "File exists" error. This is a problem when calling mkinstalldirs +# from a parallel make. We use --version in the probe to restrict +# ourselves to GNU mkdir, which is thread-safe. case $dirmode in '') - if mkdir -p -- . 2>/dev/null; then + if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" + else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + test -d ./-p && rmdir ./-p + test -d ./--version && rmdir ./--version fi ;; *) - if mkdir -m "$dirmode" -p -- . 2>/dev/null; then + if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && + test ! -d ./--version; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" + else + # Clean up after NextStep and OpenStep mkdir. + for d in ./-m ./-p ./--version "./$dirmode"; + do + test -d $d && rmdir $d + done fi ;; esac @@ -84,17 +120,17 @@ mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then - errstatus=$lasterr + errstatus=$lasterr else - if test ! -z "$dirmode"; then + if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" - lasterr="" - chmod "$dirmode" "$pathcomp" || lasterr=$? + lasterr="" + chmod "$dirmode" "$pathcomp" || lasterr=$? - if test ! -z "$lasterr"; then - errstatus=$lasterr - fi - fi + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi fi fi @@ -107,5 +143,8 @@ # 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-end: "$" # End: -# mkinstalldirs ends here diff -urN gawk-3.1.3/node.c gawk-3.1.4/node.c --- gawk-3.1.3/node.c 2003-06-15 19:35:22.000000000 +0300 +++ gawk-3.1.4/node.c 2004-07-28 16:45:04.000000000 +0300 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2001, 2003 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2001, 2003, 2004 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -187,6 +187,8 @@ s->flags = oflags; s->stfmt = (char) index; s->stlen = r->stlen; + if ((s->flags & STRCUR) != 0) + free(s->stptr); s->stptr = r->stptr; freenode(r); /* Do not free_temp(r)! We want */ freenode(dummy); /* to keep s->stptr == r->stpr. */ diff -urN gawk-3.1.3/pc/ChangeLog gawk-3.1.4/pc/ChangeLog --- gawk-3.1.3/pc/ChangeLog 2003-07-07 21:02:25.000000000 +0300 +++ gawk-3.1.4/pc/ChangeLog 2004-08-02 12:19:07.000000000 +0300 @@ -1,3 +1,34 @@ +Mon Aug 2 12:18:15 2004 Arnold D. Robbins + + * Release 3.1.4: Release tar file made. + +Sun Jun 13 17:40:09 2004 Scott Deifik + + * Makefile: Reduce the stack size for MSC. + * Makefile.tst: Synchronized with main distribution. + +Sun Jun 13 17:39:47 2004 Arnold D. Robbins + + * Makefile (AWKOBJS2, PAWKOBJS2): Restore version.o. + +Tue Jun 1 22:31:36 2004 Arnold D. Robbins + + * Makefile (AWKOBJS2, PAWKOBJS2): Remove version.o. + + Per Jim Meyering: + * popen.c (scriptify): Check `realloc' return value. + +Tue Mar 2 18:10:55 2004 Arnold D. Robbins + + * Makefile (LIBOJBS): Add `dfa$O' into list. + (main$O rule): Removed, since patchlev.h not part of dist + anymore. + +Tue Mar 2 18:09:54 2004 Scott Deifik + + * config.h (HAVE_ALLOCA_H): Undefine. + * Makefile (LMSC): Adjust stack size for MSC. + Mon Jul 7 11:01:43 2003 Arnold D. Robbins * Release 3.1.3: Release tar file made. @@ -131,7 +162,7 @@ Wed Jan 17 10:59:32 2001 Eli Zaretskii - * gawkmisc.pc (os_close_on_exec) [__DJGPP__]: Don't print the + * gawkmisc.pc (os_close_on_exec) [__DJGPP__]: Don't print the warning about failure to set close-on-exec bit, unless it's DJGPP 2.04 or later. @@ -230,8 +261,8 @@ omitted from 3.0.3. * README.pc updated to clarify the procedure for building - non-LFN versions on LFN systems, and to note that Windows32 gawk - may require Windows32 utilities. + non-LFN versions on LFN systems, and to note that Windows32 gawk + may require Windows32 utilities. * emxbnd target modified to accomodate older versions of emx. @@ -247,7 +278,7 @@ * Release 3.0.3: Release tar file made. -Tues May 13 20:06:09 1997 Darrel Hankerson +Tue May 13 20:06:09 1997 Darrel Hankerson * vcWin32 target added. Some new tests for WIN32 in gawkmisc.c io.c, and regex.c. Makefile changes for nmake, which can't diff -urN gawk-3.1.3/pc/Makefile gawk-3.1.4/pc/Makefile --- gawk-3.1.3/pc/Makefile 2003-06-29 15:54:27.000000000 +0300 +++ gawk-3.1.4/pc/Makefile 2004-06-13 17:41:03.000000000 +0300 @@ -214,7 +214,8 @@ #MSCCL = -FPc # If the stack gets much smaller than 3000, the "longwrds" test fails. -LMSC = link $(LF) $(LNKRSP) $(STDARGV)/NOE,$@,,/NOD:llibce $(MSCLIB)$(LF2)/STACK:0x4320,nul +LMSC = link $(LF) $(LNKRSP) $(STDARGV)/NOE,$@,,/NOD:llibce $(MSCLIB)$(LF2)/STACK:0x3299,nul + # CLMSC-linking works when building under OS/2 CLMSC = $(CC) -o $@ $(LF) $(GAWKOBJS) $(STDARGV) $(LF2) -link /NOE/NOI/STACK:0x6f00 @@ -322,7 +323,7 @@ # LIBOBJS # GNU and other stuff that gawk uses as library routines. -LIBOBJS= getopt$O getopt1$O regex$O random$O +LIBOBJS= getopt$O getopt1$O dfa$O regex$O random$O GAWKOBJS = $(ALLOBJS) $(LIBOBJS) PGAWKOBJS = $(PAWKOBJS1) $(PAWKOBJS2) $(LIBOBJS) awkgram$O getid$O $(OBJ) @@ -366,8 +367,6 @@ gawk.exp: gawkw32.def $(DYN_MAKEXP) -main$O: patchlev.h - eval_p$O: eval.c profile_p$O: profile.c diff -urN gawk-3.1.3/pc/config.h gawk-3.1.4/pc/config.h --- gawk-3.1.3/pc/config.h 2003-06-15 19:29:42.000000000 +0300 +++ gawk-3.1.4/pc/config.h 2004-07-28 16:45:25.000000000 +0300 @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 1995-2002 the Free Software Foundation, Inc. + * Copyright (C) 1995-2004 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -62,7 +62,7 @@ #define HAVE_ALLOCA 1 /* Define if you have and it should be used (not on Ultrix). */ -#define HAVE_ALLOCA_H 1 +/* #undef HAVE_ALLOCA_H */ /* Define if you don't have vprintf but do have _doprnt. */ /* #undef HAVE_DOPRNT */ diff -urN gawk-3.1.3/pc/gawkmisc.pc gawk-3.1.4/pc/gawkmisc.pc --- gawk-3.1.3/pc/gawkmisc.pc 2003-05-11 15:13:38.000000000 +0300 +++ gawk-3.1.4/pc/gawkmisc.pc 2003-10-26 15:58:29.000000000 +0200 @@ -255,7 +255,7 @@ static int orig_tty_mode = -1; int -os_setbinmode (fd, mode) +os_setbinmode(fd, mode) int fd, mode; { int prev_mode = setmode(fd, mode); diff -urN gawk-3.1.3/pc/gawkw32.def gawk-3.1.4/pc/gawkw32.def --- gawk-3.1.3/pc/gawkw32.def 2003-06-29 15:55:47.000000000 +0300 +++ gawk-3.1.4/pc/gawkw32.def 2004-07-26 16:21:02.000000000 +0300 @@ -9,6 +9,7 @@ get_argument @1 set_value @2 make_builtin @3 +get_curfunc_arg_count @4 ;; functions for manipulating data types mk_number @11 diff -urN gawk-3.1.3/pc/popen.c gawk-3.1.4/pc/popen.c --- gawk-3.1.3/pc/popen.c 2001-01-01 00:03:46.000000000 +0200 +++ gawk-3.1.4/pc/popen.c 2004-06-01 22:32:55.000000000 +0300 @@ -86,7 +86,10 @@ } slashify(name, p); if (! (i = unixshell(p))) { - realloc(name, strlen(name) + 5); + char *p = (char *) realloc(name, strlen(name) + 5); + if (p == NULL) + return NULL; + name = p; strcat(name, ".bat"); } if (s) sprintf(cmd + strlen(cmd), " %cc ", unixshell(s) ? '-' : '/'); diff -urN gawk-3.1.3/po/ChangeLog gawk-3.1.4/po/ChangeLog --- gawk-3.1.3/po/ChangeLog 2003-07-07 21:02:28.000000000 +0300 +++ gawk-3.1.4/po/ChangeLog 2004-08-02 12:19:12.000000000 +0300 @@ -1,3 +1,16 @@ +Mon Aug 2 12:18:15 2004 Arnold D. Robbins + + * Release 3.1.4: Release tar file made. + +2004-02-19 gettextize + + * Makefile.in.in: Upgrade to gettext-0.14.1. + * Rules-quot: Upgrade to gettext-0.14.1. + +2004-01-16 gettextize + + * Makefile.in.in: Upgrade to gettext-0.13.1. + Mon Jul 7 11:01:43 2003 Arnold D. Robbins * Release 3.1.3: Release tar file made. diff -urN gawk-3.1.3/po/LINGUAS gawk-3.1.4/po/LINGUAS --- gawk-3.1.3/po/LINGUAS 2003-05-08 10:11:27.000000000 +0300 +++ gawk-3.1.4/po/LINGUAS 2003-11-24 11:30:04.000000000 +0200 @@ -8,3 +8,6 @@ da pt_BR ca +pl +ja +ro diff -urN gawk-3.1.3/po/Makefile.in.in gawk-3.1.4/po/Makefile.in.in --- gawk-3.1.3/po/Makefile.in.in 2003-06-16 13:25:33.000000000 +0300 +++ gawk-3.1.4/po/Makefile.in.in 2004-02-19 23:08:40.000000000 +0200 @@ -1,5 +1,5 @@ # Makefile for PO directory in any package using GNU gettext. -# Copyright (C) 1995-1997, 2000-2003 by Ulrich Drepper +# Copyright (C) 1995-1997, 2000-2004 by Ulrich Drepper # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU General Public @@ -7,6 +7,8 @@ # functionality. # Please note that the actual code of GNU gettext is covered by the GNU # General Public License and is *not* in the public domain. +# +# Origin: gettext-0.14 PACKAGE = @PACKAGE@ VERSION = @VERSION@ @@ -55,7 +57,7 @@ # Makevars gets inserted here. (Don't remove this line!) .SUFFIXES: -.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update +.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update .po.mo: @echo "$(MSGFMT) -c -o $@ $<"; \ @@ -86,7 +88,7 @@ # $(POFILES) has been designed to not touch files that don't need to be # changed. stamp-po: $(srcdir)/$(DOMAIN).pot - test -z "$(CATALOGS)" || $(MAKE) $(CATALOGS) + test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) @echo "touch stamp-po" @echo timestamp > stamp-poT @mv stamp-poT stamp-po @@ -128,9 +130,13 @@ # Note that a PO file is not touched if it doesn't need to be changed. $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ - test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot + if test -f "$(srcdir)/$${lang}.po"; then \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + else \ + $(MAKE) $${lang}.po-create; \ + fi install: install-exec install-data @@ -310,6 +316,13 @@ test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) $(MAKE) update-gmo +# General rule for creating PO files. + +.nop.po-create: + @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ + echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ + exit 1 + # General rule for updating PO files. .nop.po-update: diff -urN gawk-3.1.3/po/POTFILES.in gawk-3.1.4/po/POTFILES.in --- gawk-3.1.3/po/POTFILES.in 2002-08-05 23:32:03.000000000 +0300 +++ gawk-3.1.4/po/POTFILES.in 2004-06-01 19:22:32.000000000 +0300 @@ -22,4 +22,3 @@ regex_internal.c regexec.c replace.c -version.c diff -urN gawk-3.1.3/po/Rules-quot gawk-3.1.4/po/Rules-quot --- gawk-3.1.3/po/Rules-quot 2003-06-16 13:25:34.000000000 +0300 +++ gawk-3.1.4/po/Rules-quot 2004-02-19 23:08:40.000000000 +0200 @@ -4,6 +4,11 @@ .SUFFIXES: .insert-header .po-update-en +en@quot.po-create: + $(MAKE) en@quot.po-update +en@boldquot.po-create: + $(MAKE) en@boldquot.po-update + en@quot.po-update: en@quot.po-update-en en@boldquot.po-update: en@boldquot.po-update-en diff -urN gawk-3.1.3/po/ca.po gawk-3.1.4/po/ca.po --- gawk-3.1.3/po/ca.po 2003-07-07 21:20:35.000000000 +0300 +++ gawk-3.1.4/po/ca.po 2004-07-15 13:02:12.000000000 +0300 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: gawk 3.1.31\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2003-07-07 11:20-0700\n" +"POT-Creation-Date: 2004-07-15 13:02+0300\n" "PO-Revision-Date: 2003-05-07 21:13+0100\n" "Last-Translator: Antoni Bella Perez \n" "Language-Team: Catalan \n" @@ -16,56 +16,61 @@ "X-Generator: KBabel 1.0.1\n" #: array.c:112 +#, fuzzy, c-format +msgid "attempt to use function `%s' as an array" +msgstr "s'ha intentat usar la funció «%s» com a una matriu" + +#: array.c:115 #, c-format msgid "attempt to use scalar parameter `%s' as an array" msgstr "s'ha intentat usar un paràmetre escalar «%s» com a una matriu" -#: array.c:113 +#: array.c:118 #, c-format msgid "attempt to use scalar `%s' as array" msgstr "s'ha intentat usar la dada escalar «%s» com a una matriu" -#: array.c:151 +#: array.c:156 #, fuzzy, c-format msgid "from %s" msgstr "%s (de %s)" -#: array.c:506 +#: array.c:511 #, c-format msgid "reference to uninitialized element `%s[\"%s\"]'" msgstr "referència a un element sense valor inicial «%s[\"%s\"]»" -#: array.c:512 +#: array.c:517 #, c-format msgid "subscript of array `%s' is null string" msgstr "el subscript de la matriu «%s» és una cadena nul·la" -#: array.c:609 +#: array.c:621 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: l'índex «%s» no està en la matriu «%s»" -#: array.c:769 +#: array.c:791 #, c-format msgid "%s: empty (null)\n" msgstr "%s: buit (nul)\n" -#: array.c:774 +#: array.c:796 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: buit (zero)\n" -#: array.c:778 +#: array.c:800 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: mida_taula = %d, mida_matriu = %d\n" -#: array.c:807 +#: array.c:829 #, fuzzy, c-format msgid "%s: is parameter\n" msgstr "%s: és un paràmetre\n" -#: array.c:812 +#: array.c:834 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: ref_matriu a %s\n" @@ -92,484 +97,479 @@ "la constant d'expressió regular «/%s/» sembla un comentari en C, perà no ho " "és" -#: awkgram.y:340 awkgram.y:615 +#: awkgram.y:341 awkgram.y:619 msgid "statement may have no effect" msgstr "la declaració podria no tindre efecte" -#: awkgram.y:435 awkgram.y:455 +#: awkgram.y:436 awkgram.y:456 #, fuzzy, c-format msgid "`%s' used in %s action" msgstr "«next» és usat dintre de l'acció BEGIN o END" -#: awkgram.y:448 awkgram.y:451 +#: awkgram.y:449 awkgram.y:452 msgid "`nextfile' is a gawk extension" msgstr "«nextfile» és una extensió de gawk" -#: awkgram.y:465 +#: awkgram.y:466 msgid "`return' used outside function context" msgstr "«return» és usat fora del context d'una funció" -#: awkgram.y:504 +#: awkgram.y:508 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "el «print» simple en la regla BEGIN o END probablement ha de ser «print \"\"»" -#: awkgram.y:517 awkgram.y:524 +#: awkgram.y:521 awkgram.y:528 msgid "`delete array' is a gawk extension" msgstr "«delete array» és una extensió de gawk" -#: awkgram.y:532 awkgram.y:539 +#: awkgram.y:536 awkgram.y:543 #, fuzzy msgid "`delete(array)' is a non-portable tawk extension" msgstr "«delete array» és una extensió de gawk" -#: awkgram.y:583 +#: awkgram.y:587 #, c-format msgid "duplicate case values in switch body: %s" msgstr "" -#: awkgram.y:593 +#: awkgram.y:597 msgid "Duplicate `default' detected in switch body" msgstr "" -#: awkgram.y:681 +#: awkgram.y:686 msgid "multistage two-way pipelines don't work" msgstr "les canonades bidireccionals multi-etapes no funcionen" -#: awkgram.y:772 +#: awkgram.y:777 msgid "regular expression on right of assignment" msgstr "expressió regular a la dreta d'una assignació" -#: awkgram.y:782 +#: awkgram.y:800 msgid "regular expression on left of `~' or `!~' operator" msgstr "expressió regular a l'esquerra de l'operador «~» o «!~»" -#: awkgram.y:790 +#: awkgram.y:808 msgid "regular expression on right of comparison" msgstr "expressió regular a la derta de la comparació" -#: awkgram.y:857 +#: awkgram.y:875 msgid "non-redirected `getline' undefined inside END action" msgstr "«getline» no redirigit sense definir dintre de l'acció FINAL" -#: awkgram.y:884 +#: awkgram.y:902 msgid "call of `length' without parentheses is not portable" msgstr "la crida de «length» sense parèntesis no és portable" -#: awkgram.y:887 +#: awkgram.y:905 msgid "call of `length' without parentheses is deprecated by POSIX" msgstr "la crida de «length» sense parèntesis està desaprovada per POSIX" -#: awkgram.y:940 +#: awkgram.y:958 msgid "use of non-array as array" msgstr "" -#: awkgram.y:942 +#: awkgram.y:960 msgid "invalid subscript expression" msgstr "expressió de subscript no vàlida" -#: awkgram.y:1140 +#: awkgram.y:1158 #, fuzzy msgid "unexpected newline or end of string" msgstr "nova línia inesperada" -#: awkgram.y:1235 +#: awkgram.y:1254 msgid "empty program text on command line" msgstr "el text del programa en la línia de comandaments està buit" -#: awkgram.y:1292 +#: awkgram.y:1307 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "no es pot obrir el fitxer font «%s» per a lectura (%s)" -#: awkgram.y:1327 +#: awkgram.y:1384 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "no es pot llegir el fitxer font «%s» (%s)" -#: awkgram.y:1335 +#: awkgram.y:1392 #, c-format msgid "source file `%s' is empty" msgstr "el fitxer font «%s» està buit" -#: awkgram.y:1537 awkgram.y:1647 awkgram.y:1665 awkgram.y:2015 awkgram.y:2100 +#: awkgram.y:1590 awkgram.y:1700 awkgram.y:1718 awkgram.y:2068 awkgram.y:2153 msgid "source file does not end in newline" msgstr "el fitxer font no finalitza amb un retorn de carro" -#: awkgram.y:1601 +#: awkgram.y:1654 msgid "unterminated regexp ends with `\\' at end of file" msgstr "expressió regular sense finalitzar acaba amb «\\» al final del fitxer" -#: awkgram.y:1621 +#: awkgram.y:1674 msgid "unterminated regexp" msgstr "expressió regular sense finalitzar" -#: awkgram.y:1624 +#: awkgram.y:1677 msgid "unterminated regexp at end of file" msgstr "expressió regular sense finalitzar al final del fitxer" -#: awkgram.y:1691 +#: awkgram.y:1744 msgid "use of `\\ #...' line continuation is not portable" msgstr "l'ús de «\\ #...» com a continuació de línia no és portable" -#: awkgram.y:1703 +#: awkgram.y:1756 msgid "backslash not last character on line" msgstr "la barra invertida no és l'últim caràcter en la línia" -#: awkgram.y:1748 +#: awkgram.y:1801 msgid "POSIX does not allow operator `**='" msgstr "POSIX no permet l'operador «**=»" -#: awkgram.y:1750 +#: awkgram.y:1803 msgid "old awk does not support operator `**='" msgstr "l'antic awk no suporta l'operador «**=»" -#: awkgram.y:1759 +#: awkgram.y:1812 msgid "POSIX does not allow operator `**'" msgstr "POSIX no permet l'operador «**»" -#: awkgram.y:1761 +#: awkgram.y:1814 msgid "old awk does not support operator `**'" msgstr "l'antic awk no suporta l'operador «**=»" -#: awkgram.y:1792 +#: awkgram.y:1845 msgid "operator `^=' is not supported in old awk" msgstr "l'operador «^=» no està suportat en l'antic awk" -#: awkgram.y:1800 +#: awkgram.y:1853 msgid "operator `^' is not supported in old awk" msgstr "l'operador «^» no està suportat en l'antic awk" -#: awkgram.y:1884 awkgram.y:1901 +#: awkgram.y:1937 awkgram.y:1954 msgid "unterminated string" msgstr "cadena sense finalitzar" -#: awkgram.y:2061 +#: awkgram.y:2114 #, c-format msgid "invalid char '%c' in expression" msgstr "caràcter «%c» no vàlid en l'expressió" -#: awkgram.y:2121 +#: awkgram.y:2162 #, c-format msgid "`%s' is a gawk extension" msgstr "«%s» és una extensió de gawk" -#: awkgram.y:2124 +#: awkgram.y:2165 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "«%s» és una extensió de Bell Labs" -#: awkgram.y:2127 +#: awkgram.y:2168 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX no permet «%s»" -#: awkgram.y:2131 +#: awkgram.y:2172 #, c-format msgid "`%s' is not supported in old awk" msgstr "«%s» no està suportat en l'antic awk" -#: awkgram.y:2158 +#: awkgram.y:2198 msgid "`goto' considered harmful!\n" msgstr "«goto» se considera nefast!\n" -#: awkgram.y:2220 +#: awkgram.y:2260 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d no és vàlid com a nombre d'arguments per a %s" -#: awkgram.y:2239 awkgram.y:2242 +#: awkgram.y:2279 awkgram.y:2282 msgid "match: third argument is a gawk extension" msgstr "match: el tercer argument és una extensió de gawk" -#: awkgram.y:2255 +#: awkgram.y:2295 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "%s: la cadena literal com a últim argument de substitució no té efecte" -#: awkgram.y:2258 +#: awkgram.y:2298 #, fuzzy, c-format msgid "%s third parameter is not a changeable object" msgstr "sub: el tercer argument no és un objecte intercanviable" -#: awkgram.y:2285 awkgram.y:2288 +#: awkgram.y:2325 awkgram.y:2328 msgid "close: second argument is a gawk extension" msgstr "close: el segon argument és una extensió de gawk" -#: awkgram.y:2298 +#: awkgram.y:2338 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "l'ús de dcgettext(_\"...\") no és correcte: elimineu el guió baix inicial" -#: awkgram.y:2313 +#: awkgram.y:2353 #, fuzzy msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "l'ús de dcgettext(_\"...\") no és correcte: elimineu el guió baix inicial" -#: awkgram.y:2384 +#: awkgram.y:2424 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "funció «%s»: paràmetre #%d, «%s», duplica al paràmetre #%d" -#: awkgram.y:2417 +#: awkgram.y:2457 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "funció «%s»: paràmetre «%s» ofusca la variable global" -#: awkgram.y:2529 +#: awkgram.y:2569 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "no es pot obrir «%s» per a escriptura (%s)" -#: awkgram.y:2530 profile.c:93 +#: awkgram.y:2570 profile.c:93 msgid "sending profile to standard error" msgstr "enviant el perfil a l'eixida d'error estàndard" -#: awkgram.y:2562 +#: awkgram.y:2602 #, c-format msgid "%s: close failed (%s)" msgstr "%s: tancament erroni (%s)" -#: awkgram.y:2684 +#: awkgram.y:2723 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() crida dos vegades!" -#: awkgram.y:2711 +#: awkgram.y:2750 msgid "there were shadowed variables." msgstr "" -#: awkgram.y:2784 +#: awkgram.y:2823 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "funció «%s»: no pot usar el nom de la funció com a paràmetre" -#: awkgram.y:2794 +#: awkgram.y:2833 #, c-format msgid "function name `%s' previously defined" msgstr "nom de la funció «%s» definida prèviament" -#: awkgram.y:2945 awkgram.y:2951 +#: awkgram.y:2984 awkgram.y:2990 #, c-format msgid "function `%s' called but never defined" msgstr "es crida a la funció «%s» però no s'ha definit" -#: awkgram.y:2954 +#: awkgram.y:2993 #, c-format msgid "function `%s' defined but never called" msgstr "es defineix la funció «%s» però no s'ha cridat mai" -#: awkgram.y:2981 +#: awkgram.y:3020 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "" "l'expressió regular constant per al paràmetre #%d condueix a un valor booleà" -#: awkgram.y:2994 -#, c-format +#: awkgram.y:3033 +#, fuzzy, c-format msgid "" "function `%s' called with space between name and `(',\n" -"%s" +"or used as a variable or an array" msgstr "" "s'ha cridat a la funció «%s» amb espai entre el nom i el «(»,\n" "%s" -#: awkgram.y:2996 -#, fuzzy -msgid "or used as a variable or an array" -msgstr "no es pot usar el nom de la funció «%s» com a variable o matriu" - -#: builtin.c:137 +#: builtin.c:149 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s a \"%s\" ha fallat (%s)" -#: builtin.c:138 +#: builtin.c:150 msgid "standard output" msgstr "eixida estàndard" -#: builtin.c:139 +#: builtin.c:151 msgid "reason unknown" msgstr "motiu desconegut" -#: builtin.c:152 +#: builtin.c:164 msgid "exp: received non-numeric argument" msgstr "exp: s'ha rebut un argument que no és un número" -#: builtin.c:158 +#: builtin.c:170 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: l'argument %g està fora de rang" -#: builtin.c:216 +#: builtin.c:228 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" "fflush: no es pot netejar: la canonada «%s» s'ha obert per a lectura, no per " "a escriptura" -#: builtin.c:219 +#: builtin.c:231 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "" "fflush: no es pot netejar: el fitxer «%s» s'ha obert per a lectura, no per a " "escriptura" -#: builtin.c:231 +#: builtin.c:243 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "fflush: «%s» no és un fitxer obert, canonada o co-procés" -#: builtin.c:325 +#: builtin.c:338 msgid "index: received non-string first argument" msgstr "índex: el primer argument rebut no és una cadena" -#: builtin.c:327 +#: builtin.c:340 msgid "index: received non-string second argument" msgstr "índex: el segon argument rebut no és una cadena" -#: builtin.c:437 +#: builtin.c:454 msgid "int: received non-numeric argument" msgstr "int: s'ha rebut un argument no numèric" -#: builtin.c:454 +#: builtin.c:471 msgid "length: received non-string argument" msgstr "length: s'ha rebut un argument que no és una cadena" -#: builtin.c:470 +#: builtin.c:487 msgid "log: received non-numeric argument" msgstr "log: s'ha rebut un argument no numèric" -#: builtin.c:473 +#: builtin.c:490 #, c-format msgid "log: received negative argument %g" msgstr "log: s'ha rebut l'argument negatiu %g" -#: builtin.c:635 builtin.c:638 +#: builtin.c:654 builtin.c:657 msgid "must use `count$' on all formats or none" msgstr "" -#: builtin.c:740 +#: builtin.c:759 msgid "`$' is not permitted in awk formats" msgstr "no es permeten «$» en els formats awk" -#: builtin.c:746 +#: builtin.c:765 msgid "arg count with `$' must be > 0" msgstr "el compte d'arguments amb «$» ha de ser > 0" -#: builtin.c:748 +#: builtin.c:767 #, fuzzy, c-format msgid "arg count %ld greater than total number of supplied arguments" msgstr "" "el comte d'arguments %d és major que el nombre total d'arguments " "proporcionats" -#: builtin.c:750 +#: builtin.c:769 msgid "`$' not permitted after period in format" msgstr "no es permet «$» després d'un punt en el format" -#: builtin.c:763 +#: builtin.c:782 msgid "no `$' supplied for positional field width or precision" msgstr "no es proporciona «$» per a l'ample o precisió del camp de posició" -#: builtin.c:821 +#: builtin.c:848 msgid "`l' is meaningless in awk formats; ignored" msgstr "«l» manca de significat en els formats awk; serà ignorat" -#: builtin.c:825 +#: builtin.c:852 msgid "`l' is not permitted in POSIX awk formats" msgstr "«l» no està permés en els formats POSIX de awk" -#: builtin.c:836 +#: builtin.c:863 msgid "`L' is meaningless in awk formats; ignored" msgstr "«L» manca de significat en els formats awk; serà ignorat" -#: builtin.c:840 +#: builtin.c:867 msgid "`L' is not permitted in POSIX awk formats" msgstr "«L» no està permés en els formats POSIX de awk" -#: builtin.c:851 +#: builtin.c:878 msgid "`h' is meaningless in awk formats; ignored" msgstr "«h» manca de significat en els formats awk; serà ignorat" -#: builtin.c:855 +#: builtin.c:882 msgid "`h' is not permitted in POSIX awk formats" msgstr "«h» no està permés en els formats POSIX de awk" -#: builtin.c:1055 +#: builtin.c:1111 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" msgstr "" -#: builtin.c:1108 +#: builtin.c:1171 msgid "not enough arguments to satisfy format string" msgstr "no hi ha prou arguments per a satisfer el format d'una cadena" -#: builtin.c:1110 +#: builtin.c:1173 msgid "^ ran out for this one" msgstr "^ desbordament per a aquest" -#: builtin.c:1115 +#: builtin.c:1178 msgid "[s]printf: format specifier does not have control letter" msgstr "[s]printf: l'especificador de format no conté lletra de control" -#: builtin.c:1118 +#: builtin.c:1181 msgid "too many arguments supplied for format string" msgstr "s'han proporcionat masses arguments per a la cadena de format" -#: builtin.c:1184 builtin.c:1187 +#: builtin.c:1247 builtin.c:1250 msgid "printf: no arguments" msgstr "printf: sense arguments" -#: builtin.c:1211 +#: builtin.c:1274 msgid "sqrt: received non-numeric argument" msgstr "sqrt: s'ha rebut un argument no numèric" -#: builtin.c:1215 +#: builtin.c:1278 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: cridat amb l'argument negatiu %g" -#: builtin.c:1238 +#: builtin.c:1301 #, c-format msgid "substr: start index %g is invalid, using 1" msgstr "substr: l'índex d'inici %g no és vàlid, usant 1" -#: builtin.c:1243 +#: builtin.c:1306 #, c-format msgid "substr: non-integer start index %g will be truncated" msgstr "substr: l'índex d'inici no enter %g serà truncat" -#: builtin.c:1262 +#: builtin.c:1325 #, fuzzy, c-format msgid "substr: length %g is not >= 1" msgstr "substr: la longitud %g és <= 0" -#: builtin.c:1264 +#: builtin.c:1327 #, fuzzy, c-format msgid "substr: length %g is not >= 0" msgstr "substr: la longitud %g és <= 0" -#: builtin.c:1271 +#: builtin.c:1334 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: la longitud sobre un nombre no enter %g serà truncada" -#: builtin.c:1276 +#: builtin.c:1339 #, c-format msgid "substr: length %g too big for string indexing, truncating to %g" msgstr "" -#: builtin.c:1288 +#: builtin.c:1351 msgid "substr: source string is zero length" msgstr "substr: la cadena font és de longitud zero" -#: builtin.c:1294 +#: builtin.c:1357 #, fuzzy, c-format msgid "substr: start index %g is past end of string" msgstr "substr: l'índex d'inici %d sobrepassa l'acabament de la cadena" -#: builtin.c:1302 +#: builtin.c:1365 #, fuzzy, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" @@ -577,248 +577,273 @@ "substr: la longitud %d a l'índex d'inici %d excedeix la longitud del 1er " "argument (%d)" -#: builtin.c:1337 +#: builtin.c:1400 #, fuzzy msgid "strftime: received non-string first argument" msgstr "strftime: el primer argument rebut no és una cadena" -#: builtin.c:1343 +#: builtin.c:1406 msgid "strftime: received empty format string" msgstr "strftime: s'ha rebut una cadena de format buida" -#: builtin.c:1352 +#: builtin.c:1415 #, fuzzy msgid "strftime: received non-numeric second argument" msgstr "strftime: el segon argument rebut no és numèric" -#: builtin.c:1415 +#: builtin.c:1478 msgid "mktime: received non-string argument" msgstr "mktime: s'ha rebut un argument que no és una cadena" -#: builtin.c:1460 +#: builtin.c:1523 #, fuzzy msgid "system: received non-string argument" msgstr "system: s'ha rebut un argument que no és una cadena" -#: builtin.c:1581 eval.c:1883 +#: builtin.c:1644 eval.c:2019 #, fuzzy, c-format msgid "reference to uninitialized field `$%d'" msgstr "referència a una variable sense inicialitzar «%s»" -#: builtin.c:1608 +#: builtin.c:1671 #, fuzzy msgid "tolower: received non-string argument" msgstr "tolower: s'ha rebut un argument que no és una cadena" -#: builtin.c:1657 +#: builtin.c:1720 #, fuzzy msgid "toupper: received non-string argument" msgstr "toupper: s'ha rebut un argument que no és una cadena" -#: builtin.c:1702 +#: builtin.c:1765 msgid "atan2: received non-numeric first argument" msgstr "atan2: el primer argument rebut no és numèric" -#: builtin.c:1704 +#: builtin.c:1767 msgid "atan2: received non-numeric second argument" msgstr "atan2: el segon argument rebut no és numèric" -#: builtin.c:1723 +#: builtin.c:1786 msgid "sin: received non-numeric argument" msgstr "sin: s'ha rebut un argument que no és numèric" -#: builtin.c:1739 +#: builtin.c:1802 msgid "cos: received non-numeric argument" msgstr "cos: s'ha rebut un argument que no és numèric" -#: builtin.c:1788 +#: builtin.c:1852 msgid "srand: received non-numeric argument" msgstr "srand: s'ha rebut un argument que no és numèric" -#: builtin.c:1823 +#: builtin.c:1887 msgid "match: third argument is not an array" msgstr "match: el tercer argument no és una matriu" -#: builtin.c:2307 +#: builtin.c:2414 msgid "gensub: third argument of 0 treated as 1" msgstr "gensub: el tercer argument de 0 és tractat com a 1" -#: builtin.c:2416 builtin.c:2418 +#: builtin.c:2572 msgid "lshift: received non-numeric first argument" msgstr "lshift: el primer argument rebut no és numèric" -#: builtin.c:2420 +#: builtin.c:2574 +#, fuzzy +msgid "lshift: received non-numeric second argument" +msgstr "strftime: el segon argument rebut no és numèric" + +#: builtin.c:2580 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "lshift(%lf, %lf): els valors negatius donaran resultats estranys" -#: builtin.c:2422 +#: builtin.c:2582 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): els valors fraccionaris sernn truncats" -#: builtin.c:2424 +#: builtin.c:2584 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "" "lshift(%lf, %lf): un valor de desplaçament massa gran donarà resultats " "estranys" -#: builtin.c:2453 builtin.c:2455 +#: builtin.c:2610 msgid "rshift: received non-numeric first argument" msgstr "rshift: el primer argument rebut no és numèric" -#: builtin.c:2457 +#: builtin.c:2612 +#, fuzzy +msgid "rshift: received non-numeric second argument" +msgstr "strftime: el segon argument rebut no és numèric" + +#: builtin.c:2618 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "rshift(%lf, %lf): els valors negatius donaran resultats estranys" -#: builtin.c:2459 +#: builtin.c:2620 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): els valors fraccionaris seran truncats" -#: builtin.c:2461 +#: builtin.c:2622 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "" "rshift(%lf, %lf): un valor de desplaçament massa gran donarà resultats " "estranys" -#: builtin.c:2490 builtin.c:2492 +#: builtin.c:2648 msgid "and: received non-numeric first argument" msgstr "and: el primer argument rebut no és numèric" -#: builtin.c:2494 +#: builtin.c:2650 +#, fuzzy +msgid "and: received non-numeric second argument" +msgstr "atan2: el segon argument rebut no és numèric" + +#: builtin.c:2656 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "and(%lf, %lf): els valors negatius donaran resultats estranys" -#: builtin.c:2496 +#: builtin.c:2658 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): els valors fraccionaris seran truncats" -#: builtin.c:2525 builtin.c:2527 +#: builtin.c:2684 msgid "or: received non-numeric first argument" msgstr "or: el primer argument rebut no és numèric" -#: builtin.c:2529 +#: builtin.c:2686 +#, fuzzy +msgid "or: received non-numeric second argument" +msgstr "atan2: el segon argument rebut no és numèric" + +#: builtin.c:2692 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "or(%lf, %lf): els valors negatius donaran resultats estranys" -#: builtin.c:2531 +#: builtin.c:2694 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): els valors fraccionaris seran truncats" -#: builtin.c:2560 builtin.c:2562 +#: builtin.c:2720 msgid "xor: received non-numeric first argument" msgstr "xor: el primer argument rebut no és numèric" -#: builtin.c:2564 +#: builtin.c:2722 +#, fuzzy +msgid "xor: received non-numeric second argument" +msgstr "atan2: el segon argument rebut no és numèric" + +#: builtin.c:2728 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "xor(%lf, %lf): els valors negatius donaran resultats estranys" -#: builtin.c:2566 +#: builtin.c:2730 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): els valors fraccionaris seran truncats" -#: builtin.c:2594 +#: builtin.c:2754 msgid "compl: received non-numeric argument" msgstr "compl: s'ha rebut un argument que no és numèric" -#: builtin.c:2596 +#: builtin.c:2760 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): el valor negatiu donarà resultats estranys" -#: builtin.c:2598 +#: builtin.c:2762 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): el valor fraccionari serà truncat" -#: builtin.c:2771 +#: builtin.c:2935 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: «%s» no és una categoria local vàlida" -#: eval.c:266 +#: eval.c:303 #, c-format msgid "unknown nodetype %d" msgstr "tipo de node %d desconegut" -#: eval.c:312 +#: eval.c:350 msgid "buffer overflow in genflags2str" msgstr "desbordament del cau temporal en genflags2str" -#: eval.c:647 +#: eval.c:382 eval.c:388 profile.c:837 +#, c-format +msgid "attempt to use array `%s' in a scalar context" +msgstr "s'ha intentat usar la matriu «%s» en un context escalar" + +#: eval.c:730 #, fuzzy, c-format msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" "bucle for: la matriu «%s» ha canviat de mida de %d a %d durant l'execució " "del bucle" -#: eval.c:668 +#: eval.c:751 msgid "`break' outside a loop is not portable" msgstr "«break» a fora d'un bucle no és portable" -#: eval.c:672 +#: eval.c:755 msgid "`break' outside a loop is not allowed" msgstr "no es permet «break» a fora d'un bucle" -#: eval.c:689 +#: eval.c:772 msgid "`continue' outside a loop is not portable" msgstr "«continue» fora d'un bucle no és portable" -#: eval.c:693 +#: eval.c:776 msgid "`continue' outside a loop is not allowed" msgstr "no es permet «continue» a fora d'un bucle" -#: eval.c:727 +#: eval.c:810 msgid "`next' cannot be called from a BEGIN rule" msgstr "«next» no es pot cridar des d'una regla BEGIN" -#: eval.c:729 +#: eval.c:812 msgid "`next' cannot be called from an END rule" msgstr "«next» no es pot cridar des d'una regla FINAL" -#: eval.c:738 +#: eval.c:821 msgid "`nextfile' cannot be called from a BEGIN rule" msgstr "«nextfile» no es pot cridar des d'una regla BEGIN" -#: eval.c:740 +#: eval.c:823 msgid "`nextfile' cannot be called from an END rule" msgstr "«nextfile» no es pot cridar des d'una regla FINAL" -#: eval.c:785 +#: eval.c:872 msgid "statement has no effect" msgstr "la sentència no té efecte" -#: eval.c:828 eval.c:1726 +#: eval.c:915 eval.c:1873 #, c-format msgid "can't use function name `%s' as variable or array" msgstr "no es pot usar el nom de la funció «%s» com a variable o matriu" -#: eval.c:835 eval.c:841 +#: eval.c:922 eval.c:928 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "referència a un argument sense inicialitzar «%s»" -#: eval.c:848 eval.c:907 eval.c:1732 eval.c:1742 profile.c:807 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "s'ha intentat usar la matriu «%s» en un context escalar" - -#: eval.c:858 eval.c:1752 +#: eval.c:937 eval.c:1882 #, c-format msgid "reference to uninitialized variable `%s'" msgstr "referència a una variable sense inicialitzar «%s»" -#: eval.c:1007 +#: eval.c:1083 msgid "" "concatenation: side effects in one expression have changed the length of " "another!" @@ -826,49 +851,50 @@ "concatenació: els efectes colaterals en una expressió han canviat la " "longitud d'una altra!" -#: eval.c:1032 +#: eval.c:1162 msgid "assignment used in conditional context" msgstr "assignació usada en un context condicional" -#: eval.c:1122 +#: eval.c:1252 msgid "division by zero attempted" msgstr "s'ha intentat una divisió per zero" -#: eval.c:1137 +#: eval.c:1267 #, c-format msgid "division by zero attempted in `%%'" msgstr "s'ha intentat una divisió per zero en «%%»" -#: eval.c:1152 profile.c:683 +#: eval.c:1282 profile.c:713 #, c-format msgid "illegal type (%s) in tree_eval" msgstr "tipus il·legal (%s) en tree_eval" -#: eval.c:1328 +#: eval.c:1459 msgid "division by zero attempted in `/='" msgstr "s'ha intentat una divisió per zero en «/=»" -#: eval.c:1346 +#: eval.c:1477 #, c-format msgid "division by zero attempted in `%%='" msgstr "s'ha intentat una divisió per zero en «%%=»" -#: eval.c:1586 +#: eval.c:1738 #, c-format msgid "function `%s' called with more arguments than declared" msgstr "s'ha cridat a la funció «%s» amb més arguments dels declarats" -#: eval.c:1633 +#: eval.c:1782 #, c-format msgid "function `%s' not defined" msgstr "la funció «%s» no està definida" -#: eval.c:1639 +#: eval.c:1788 #, c-format msgid "function %s called\n" msgstr "s'ha cridat a la funció %s\n" -#: eval.c:1698 +#: eval.c:1845 +#, c-format msgid "" "\n" "\t# Function Call Stack:\n" @@ -878,42 +904,43 @@ "\t# Pila de Crides a les Funcions:\n" "\n" -#: eval.c:1701 +#: eval.c:1848 +#, c-format msgid "\t# -- main --\n" msgstr "\t# -- principal --\n" -#: eval.c:1867 +#: eval.c:2003 msgid "attempt to field reference from non-numeric value" msgstr "s'ha intentat una referència de camp a partir d'un valor no numèric" -#: eval.c:1869 +#: eval.c:2005 msgid "attempt to reference from null string" msgstr "s'ha intentat una referència a partir d'una cadena nul·la" -#: eval.c:1875 +#: eval.c:2011 #, c-format msgid "attempt to access field %d" msgstr "s'ha intentat accedir al camp %d" -#: eval.c:1896 eval.c:1903 profile.c:900 +#: eval.c:2032 eval.c:2039 profile.c:934 msgid "assignment is not allowed to result of builtin function" msgstr "" "no es permet l'assignació per a obtindre un resultat d'una funció interna" -#: eval.c:1951 +#: eval.c:2103 msgid "`IGNORECASE' is a gawk extension" msgstr "«IGNORECASE» és una extensió de gawk" -#: eval.c:1980 +#: eval.c:2133 msgid "`BINMODE' is a gawk extension" msgstr "«BINMODE» és una extensió de gawk" -#: eval.c:2092 +#: eval.c:2255 #, c-format msgid "bad `%sFMT' specification `%s'" msgstr "«%sFMT» especificació errònia «%s»" -#: eval.c:2170 +#: eval.c:2333 msgid "turning off `--lint' due to assignment to `LINT'" msgstr "desactivant «--lint» degut a una assignació a «LINT»" @@ -931,7 +958,56 @@ msgid "extension: library `%s': cannot call function `%s' (%s)\n" msgstr "extension: biblioteca «%s»: no es pot cridar a la funció «%s» (%s)\n" -#: ext.c:183 +#: ext.c:102 +msgid "extension: missing function name" +msgstr "" + +#: ext.c:107 +#, fuzzy, c-format +msgid "extension: illegal character `%c' in function name `%s'" +msgstr "extension: biblioteca «%s»: no es pot cridar a la funció «%s» (%s)\n" + +#: ext.c:113 +#, fuzzy, c-format +msgid "extension: can't redefine function `%s'" +msgstr "extension: no es pot obrir «%s» (%s)\n" + +#: ext.c:117 +#, fuzzy, c-format +msgid "extension: function `%s' already defined" +msgstr "la funció «%s» no està definida" + +#: ext.c:122 +#, c-format +msgid "extension: can't use gawk built-in `%s' as function name" +msgstr "" + +#: ext.c:124 +#, fuzzy, c-format +msgid "extension: function name `%s' previously defined" +msgstr "nom de la funció «%s» definida prèviament" + +#: ext.c:201 +#, c-format +msgid "function `%s' defined to take no more than `%d' argument(s)" +msgstr "" + +#: ext.c:204 +#, fuzzy, c-format +msgid "function `%s': missing argument #%d" +msgstr "la funció «%s» no està definida" + +#: ext.c:214 +#, fuzzy, c-format +msgid "function `%s': argument #%d: attempt to use scalar as an array" +msgstr "s'ha intentat usar la dada escalar «%s» com a una matriu" + +#: ext.c:218 +#, c-format +msgid "function `%s': argument #%d: attempt to use array as a scalar" +msgstr "" + +#: ext.c:243 msgid "Operation Not Supported" msgstr "Operació No Suportada" @@ -960,536 +1036,536 @@ msgid "null string for `FS' is a gawk extension" msgstr "la cadena nul·la per a «FS» és una extensió de gawk" -#: getopt.c:692 getopt.c:704 +#: getopt.c:692 getopt.c:711 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s: l'opció «%s» és ambigua\n" -#: getopt.c:737 getopt.c:741 +#: getopt.c:744 getopt.c:748 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "%s: l'opció «--%s» no admet cap argument\n" -#: getopt.c:750 getopt.c:755 +#: getopt.c:757 getopt.c:762 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "%s: l'opció «%c%s» no admet cap argument\n" -#: getopt.c:791 getopt.c:804 getopt.c:1093 getopt.c:1106 +#: getopt.c:807 getopt.c:829 getopt.c:1159 getopt.c:1181 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "%s: l'opció «%s» requereix un argument\n" -#: getopt.c:842 getopt.c:845 +#: getopt.c:867 getopt.c:870 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s: no es reconeix l'opció «--%s»\n" -#: getopt.c:853 getopt.c:856 +#: getopt.c:878 getopt.c:881 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s: no es reconeix l'opció «%c%s»\n" -#: getopt.c:903 getopt.c:906 +#: getopt.c:936 getopt.c:939 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: opció il·legal -- %c\n" -#: getopt.c:912 getopt.c:915 +#: getopt.c:945 getopt.c:948 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s: opció no vàlida -- %c\n" -#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:434 +#: getopt.c:1003 getopt.c:1022 getopt.c:1234 getopt.c:1255 main.c:433 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: l'opció requereix un argument -- %c\n" -#: getopt.c:1025 getopt.c:1036 +#: getopt.c:1074 getopt.c:1093 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s: l'opció «-W %s» és ambigua\n" -#: getopt.c:1060 getopt.c:1072 +#: getopt.c:1117 getopt.c:1138 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: l'opció «-W %s» no admet cap argument\n" -#: io.c:305 +#: io.c:308 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "no es pot obrir el fitxer «%s» per a lectura (%s)" -#: io.c:392 +#: io.c:395 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "la finalització del descriptor fd %d («%s») ha fallat (%s)" -#: io.c:530 +#: io.c:533 #, c-format msgid "invalid tree type %s in redirect()" msgstr "tipus d'arbre %s no vàlid dintre de redirect()" -#: io.c:536 +#: io.c:539 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "l'expressió en la redirecció «%s» solt té un valor numèric" -#: io.c:542 +#: io.c:545 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "l'expressió per a la redirecció «%s» té un valor de cadena nul·la" -#: io.c:547 +#: io.c:550 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "el fitxer «%s» per a la redirecció «%s» pot ser resultat d'una expressió " "lògica" -#: io.c:569 +#: io.c:588 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "mescla innecessària de «>» i «>>» per al fitxer «%.*s»" -#: io.c:621 +#: io.c:640 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "no es pot obrir la canonada «%s» per a l'eixida (%s)" -#: io.c:630 +#: io.c:649 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "no es pot obrir la canonada «%s» per a l'entrada (%s)" -#: io.c:643 +#: io.c:662 #, c-format msgid "can't open two way socket `%s' for input/output (%s)" msgstr "" "no es pot obrir un socket bidireccional «%s» per a les entrades/eixides (%s)" -#: io.c:647 +#: io.c:666 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "" "no es pot obrir una canonada bidireccional «%s» per a les entrades/eixides (%" "s)" -#: io.c:723 +#: io.c:742 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "no es pot redirigir des de «%s» (%s)" -#: io.c:726 +#: io.c:745 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "no es pot redirigir cap a «%s» (%s)" -#: io.c:765 +#: io.c:784 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "s'ha arribat al límit del sistema per a fitxers oberts: es començarà a " "multiplexar els descriptors de fitxer" -#: io.c:777 +#: io.c:800 #, c-format msgid "close of `%s' failed (%s)." msgstr "la finalització de «%s» ha fallat (%s)" -#: io.c:784 +#: io.c:808 msgid "too many pipes or input files open" msgstr "masses canonades o fitxers d'entrada oberts" -#: io.c:807 +#: io.c:831 msgid "close: second argument must be `to' or `from'" msgstr "close: el segon argument hauria de ser «to» o «from»" -#: io.c:821 +#: io.c:845 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "close: «%.*s» no és un fitxer obert, canonada o co-procés" -#: io.c:825 +#: io.c:849 msgid "close of redirection that was never opened" msgstr "finalització d'una redirecció que no s'ha obert" -#: io.c:862 +#: io.c:945 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: la redirecció «%s» no s'obre amb «|&», s'ignora el segon argument" -#: io.c:924 +#: io.c:960 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "estaus de falla (%d) en la finalització de la canonada «%s» (%s)" -#: io.c:927 +#: io.c:963 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "estatus de falla (%d) en la finalització del fitxer «%s» (%s)" -#: io.c:946 +#: io.c:983 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "no s'aporta la finalització explícita del socket «%s»" -#: io.c:949 +#: io.c:986 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "no s'aporta la finalització explícita del co-procés «%s»" -#: io.c:952 +#: io.c:989 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "no s'aporta la finalització explícita de la canonada «%s»" -#: io.c:955 +#: io.c:992 #, c-format msgid "no explicit close of file `%s' provided" msgstr "no s'aporta la finalització explícita del fitxer «%s»" -#: io.c:984 io.c:1038 +#: io.c:1021 io.c:1075 #, c-format msgid "error writing standard output (%s)" msgstr "error a l'escriure en l'eixida estàndard (%s)" -#: io.c:988 io.c:1042 +#: io.c:1025 io.c:1079 #, c-format msgid "error writing standard error (%s)" msgstr "error a l'escriure en l'eixida d'error estàndard (%s)" -#: io.c:996 +#: io.c:1033 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "la neteja de la canonada de «%sx» ha fallat (%s)." -#: io.c:999 +#: io.c:1036 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "la neteja de la canonada per al co-procés de «%sx» ha fallat (%s)." -#: io.c:1002 +#: io.c:1039 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "la neteja del fitxer «%sx» ha fallat (%s)." -#: io.c:1161 +#: io.c:1198 msgid "/inet/raw client not ready yet, sorry" msgstr "el client /inet/raw encara no està a punt, ho sento" -#: io.c:1163 io.c:1200 +#: io.c:1200 io.c:1237 msgid "only root may use `/inet/raw'." msgstr "sols el root pot usar «/inet/raw»." -#: io.c:1198 +#: io.c:1235 msgid "/inet/raw server not ready yet, sorry" msgstr "el servidor /inet/raw encara no està a punt, ho sento" -#: io.c:1288 +#: io.c:1325 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "no s'aporta cap protocol (conegut) en el nom del fitxer especial «%s»" -#: io.c:1306 +#: io.c:1343 #, c-format msgid "special file name `%s' is incomplete" msgstr "el nom del fitxer especial «%s» està incomplet" -#: io.c:1318 +#: io.c:1355 #, c-format msgid "local port invalid in `%s'" msgstr "port local no vàlid en «%s»" -#: io.c:1330 +#: io.c:1367 msgid "must supply a remote hostname to `/inet'" msgstr "s'ha de subministrar un nom de sistema remot a «/inet»" -#: io.c:1345 +#: io.c:1382 msgid "must supply a remote port to `/inet'" msgstr "s'ha de subministrar un port remot a «/inet»" -#: io.c:1351 +#: io.c:1388 #, c-format msgid "remote port invalid in `%s'" msgstr "port remot no vàlid en «%s»" -#: io.c:1361 +#: io.c:1398 msgid "TCP/IP communications are not supported" msgstr "les comunicacions TCP/IP no estan suportades" -#: io.c:1370 io.c:1551 +#: io.c:1407 io.c:1588 #, c-format msgid "file `%s' is a directory" msgstr "el fitxer «%s» és un directori" -#: io.c:1440 +#: io.c:1477 #, c-format msgid "use `PROCINFO[\"%s\"]' instead of `%s'" msgstr "useu «PROCINFO[\"%s\"]» en comptes de «%s»" -#: io.c:1472 +#: io.c:1509 msgid "use `PROCINFO[...]' instead of `/dev/user'" msgstr "useu «PROCINFO[...]» en comptes de «/dev/user»" -#: io.c:1537 io.c:1711 +#: io.c:1574 io.c:1748 #, c-format msgid "could not open `%s', mode `%s'" msgstr "no es pot obrir «%s», mode «%s»" -#: io.c:1762 +#: io.c:1799 #, fuzzy, c-format msgid "close of master pty failed (%s)" msgstr "ha fallat la finalització de la canonada (%s)" -#: io.c:1764 io.c:1916 io.c:2068 +#: io.c:1801 io.c:1953 io.c:2105 #, c-format msgid "close of stdout in child failed (%s)" msgstr "" "ha fallat la finalització de l'eixida estàndard en els processos fills (%s)" -#: io.c:1767 +#: io.c:1804 #, fuzzy, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "" "ha fallat la redirecció cap a l'eixida estàndard dels processos fills (dup: %" "s)" -#: io.c:1769 io.c:1921 +#: io.c:1806 io.c:1958 #, c-format msgid "close of stdin in child failed (%s)" msgstr "" "ha fallat la finalització de l'entrada estàndard en els processos fills (%s)" -#: io.c:1772 +#: io.c:1809 #, fuzzy, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "" "ha fallat la redirecció cap a l'entrada estàndard dels processos fills (dup: " "%s)" -#: io.c:1774 io.c:1793 +#: io.c:1811 io.c:1830 #, fuzzy, c-format msgid "close of slave pty failed (%s)" msgstr "ha fallat la finalització de la canonada (%s)" -#: io.c:1867 io.c:1919 io.c:2049 io.c:2071 +#: io.c:1904 io.c:1956 io.c:2086 io.c:2108 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "" "ha fallat la redirecció cap a l'eixida estàndard dels processos fills (dup: %" "s)" -#: io.c:1871 io.c:1924 +#: io.c:1908 io.c:1961 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "" "ha fallat la redirecció cap a l'entrada estàndard dels processos fills (dup: " "%s)" -#: io.c:1888 io.c:2062 +#: io.c:1925 io.c:2099 msgid "restoring stdout in parent process failed\n" msgstr "ha fallat la restauració de l'eixida estàndard en el procés pare\n" -#: io.c:1893 +#: io.c:1930 msgid "restoring stdin in parent process failed\n" msgstr "ha fallat la restauració de l'entrada estàndard en el procés pare\n" -#: io.c:1927 io.c:2073 io.c:2084 +#: io.c:1964 io.c:2110 io.c:2121 #, c-format msgid "close of pipe failed (%s)" msgstr "ha fallat la finalització de la canonada (%s)" -#: io.c:1972 +#: io.c:2009 msgid "`|&' not supported" msgstr "«|&» no està suportat" -#: io.c:2039 +#: io.c:2076 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "no es pot obrir la canonada «%s» (%s)" -#: io.c:2080 +#: io.c:2117 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "no es pot crear el procés fill per a «%s» (fork: %s)" -#: io.c:2423 +#: io.c:2460 #, c-format msgid "data file `%s' is empty" msgstr "el fitxer de dades «%s» està buit" -#: io.c:2466 io.c:2474 +#: io.c:2503 io.c:2511 msgid "could not allocate more input memory" msgstr "" -#: io.c:2832 io.c:2895 +#: io.c:2869 io.c:2932 #, c-format msgid "error reading input file `%s': %s" msgstr "error en llegir el fitxer d'entrada «%s»: %s" -#: io.c:3020 +#: io.c:3057 msgid "multicharacter value of `RS' is a gawk extension" msgstr "el valor multicaràcter de «RS» és una extensió de gawk" -#: main.c:324 +#: main.c:323 msgid "`-m[fr]' option irrelevant in gawk" msgstr "l'opción «-m[fr]» és irrellevant en gawk" -#: main.c:326 +#: main.c:325 msgid "-m option usage: `-m[fr] nnn'" msgstr "ús de l'opció -m: «-m[fr] nnn»" -#: main.c:343 +#: main.c:342 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: no es reconeix l'opció «-W %s», serà ignorada\n" -#: main.c:380 +#: main.c:379 msgid "empty argument to `--source' ignored" msgstr "s'igonarà l'argument buit per a l'opció «--source»" -#: main.c:451 +#: main.c:450 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" "la variable d'entorn «POSIXLY_CORRECT» està establerta: usant «--posix»" -#: main.c:456 +#: main.c:455 msgid "`--posix' overrides `--traditional'" msgstr "«--posix» solapa a «--traditional»" -#: main.c:467 +#: main.c:466 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "«--posix» i «--traditional» solapen a «--non-decimal-data»" -#: main.c:471 +#: main.c:470 #, fuzzy, c-format msgid "running %s setuid root may be a security problem" msgstr "executar %s com a setuid root pot ser un problema de seguretat" -#: main.c:512 +#: main.c:511 #, fuzzy, c-format msgid "can't set binary mode on stdin (%s)" msgstr "no es pot establir el mode en l'entrada estàndard (%s)" -#: main.c:515 +#: main.c:514 #, fuzzy, c-format msgid "can't set binary mode on stdout (%s)" msgstr "no es pot establir el mode en l'eixida estàndard (%s)" -#: main.c:517 +#: main.c:516 #, fuzzy, c-format msgid "can't set binary mode on stderr (%s)" msgstr "no es pot establir el mode en l'eixida d'error estàndard (%s)" -#: main.c:547 +#: main.c:546 msgid "no program text at all!" msgstr "no hi ha cap text per al programa!" -#: main.c:620 +#: main.c:623 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "Ús: %s [opcions d'estil POSIX o GNU] -f fitx_prog [--] fitxer ...\n" -#: main.c:622 +#: main.c:625 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "Ús: %s [opcions d'estil POSIX o GNU] [--] %cprograma%c fitxer ...\n" -#: main.c:627 +#: main.c:630 msgid "POSIX options:\t\tGNU long options:\n" msgstr "Opcions POSIX:\t\tOpcions llargues GNU:\n" -#: main.c:628 +#: main.c:631 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f fitx_prog\t\t--file=fitx_prog\n" -#: main.c:629 +#: main.c:632 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F fs\t\t\t--field-separator=fs (fs=sep_camp)\n" -#: main.c:630 +#: main.c:633 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v var=valor\t\t--assign=var=valor\n" -#: main.c:631 +#: main.c:634 msgid "\t-m[fr] val\n" msgstr "\t-m[fr] valor\n" -#: main.c:632 +#: main.c:635 msgid "\t-W compat\t\t--compat\n" msgstr "\t-W compat\t\t--compat\n" -#: main.c:633 +#: main.c:636 msgid "\t-W copyleft\t\t--copyleft\n" msgstr "\t-W copyleft\t\t--copyleft\n" -#: main.c:634 +#: main.c:637 msgid "\t-W copyright\t\t--copyright\n" msgstr "\t-W copyright\t\t--copyright\n" -#: main.c:635 +#: main.c:638 msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" msgstr "\t-W dump-variables[=fitxer] --dump-variables[=fitxer]\n" -#: main.c:636 +#: main.c:639 msgid "\t-W gen-po\t\t--gen-po\n" msgstr "\t-W gen-po\t\t--gen-po\n" -#: main.c:637 +#: main.c:640 msgid "\t-W help\t\t\t--help\n" msgstr "\t-W help\t\t\t--help\n" -#: main.c:638 +#: main.c:641 msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -#: main.c:639 +#: main.c:642 msgid "\t-W lint-old\t\t--lint-old\n" msgstr "\t-W lint-old\t\t--lint-old\n" -#: main.c:640 +#: main.c:643 msgid "\t-W non-decimal-data\t--non-decimal-data\n" msgstr "\t-W non-decimal-data\t--non-decimal-data\n" -#: main.c:642 +#: main.c:645 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" -#: main.c:645 +#: main.c:648 msgid "\t-W parsedebug\t\t--parsedebug\n" msgstr "\t-W parsedebug\t\t--parsedebug\n" -#: main.c:647 +#: main.c:650 msgid "\t-W profile[=file]\t--profile[=file]\n" msgstr "\t-W profile[=fitxer]\t--profile[=fitxer]\n" -#: main.c:648 +#: main.c:651 msgid "\t-W posix\t\t--posix\n" msgstr "\t-W posix\t\t--posix\n" -#: main.c:649 +#: main.c:652 msgid "\t-W re-interval\t\t--re-interval\n" msgstr "\t-W re-interval\t\t--re-interval\n" -#: main.c:650 +#: main.c:653 msgid "\t-W source=program-text\t--source=program-text\n" msgstr "\t-W source=text_prog\t--source=text_prog\n" -#: main.c:651 +#: main.c:654 msgid "\t-W traditional\t\t--traditional\n" msgstr "\t-W traditional\t\t--traditional\n" -#: main.c:652 +#: main.c:655 msgid "\t-W usage\t\t--usage\n" msgstr "\t-W usage\t\t--usage\n" -#: main.c:653 +#: main.c:656 msgid "\t-W version\t\t--version\n" msgstr "\t-W version\t\t--version\n" -#: main.c:657 +#: main.c:660 #, fuzzy msgid "" "\n" @@ -1498,21 +1574,21 @@ "\n" msgstr "a la secció «Reporting Problems and Bugs» de la versió impresa.\n" -#: main.c:661 +#: main.c:664 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" "\n" msgstr "" -#: main.c:665 +#: main.c:668 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" msgstr "" -#: main.c:682 +#: main.c:685 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1531,7 +1607,7 @@ "Llicència, o (a la vostra elecció) qualsevol versió posterior.\n" "\n" -#: main.c:690 +#: main.c:693 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -1545,7 +1621,7 @@ "Per a més detalls consulteu la Llicència Pública General de GNU.\n" "\n" -#: main.c:696 +#: main.c:699 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, write to the Free Software\n" @@ -1555,51 +1631,52 @@ "Pública General de GNU; si no és així, escriviu a la Free Software\n" "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n" -#: main.c:730 +#: main.c:733 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft no permet inicialitzar FS a un tabulador en la versió POSIX de awk" -#: main.c:956 +#: main.c:962 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" "\n" msgstr "" -#: main.c:976 +#: main.c:982 #, c-format msgid "`%s' is not a legal variable name" msgstr "" -#: main.c:979 +#: main.c:985 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "" -#: main.c:1012 +#: main.c:1018 msgid "floating point exception" msgstr "excepció de coma flotant" -#: main.c:1019 +#: main.c:1025 msgid "fatal error: internal error" msgstr "error fatal: error intern" -#: main.c:1069 +#: main.c:1075 #, c-format msgid "no pre-opened fd %d" msgstr "no s'ha pre-obert el descriptor fd per a %d" -#: main.c:1074 +#: main.c:1082 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "no es pot pre-obrir /dev/null per al descriptor fd %d" -#: main.c:1097 main.c:1106 +#: main.c:1105 main.c:1114 #, c-format msgid "could not find groups: %s" msgstr "no es poden trobar els grups: %s" #: msg.c:54 +#, c-format msgid "cmd. line:" msgstr "línia cmd.:" @@ -1619,19 +1696,19 @@ msgid "can't convert string to float" msgstr "no es pot convertir la cadena a coma flotant" -#: node.c:355 +#: node.c:357 msgid "backslash at end of string" msgstr "barra invertida al final de la cadena" -#: node.c:539 +#: node.c:541 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX no permet seqüències d'escapada «\\x»" -#: node.c:545 +#: node.c:547 msgid "no hex digits in `\\x' escape sequence" msgstr "no hi ha dígits hexadecimals en la seqüència d'escapada «\\x»" -#: node.c:579 +#: node.c:581 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "la seqüència d'escapada «\\%c» és tractada com a una simple «%c»" @@ -1646,21 +1723,27 @@ msgid "could not open `%s' for writing: %s" msgstr "no es pot obrir «%s» per a escriptura: %s" -#: profile.c:449 +#: profile.c:467 #, fuzzy, c-format msgid "internal error: %s with null vname" msgstr "error intern: Node_var amb vname nul" -#: profile.c:512 +#: profile.c:530 msgid "# treated internally as `delete'" msgstr "" -#: profile.c:1162 +#: profile.c:1167 +#, c-format +msgid "# this is a dynamically loaded extension function" +msgstr "" + +#: profile.c:1198 #, c-format msgid "\t# gawk profile, created %s\n" msgstr "\t# perfil gawk, creat %s\n" -#: profile.c:1165 +#: profile.c:1201 +#, c-format msgid "" "\t# BEGIN block(s)\n" "\n" @@ -1668,7 +1751,8 @@ "\t# Bloc(s) INICI\n" "\n" -#: profile.c:1175 +#: profile.c:1211 +#, c-format msgid "" "\t# Rule(s)\n" "\n" @@ -1676,7 +1760,8 @@ "\t# Regla(es)\n" "\n" -#: profile.c:1181 +#: profile.c:1217 +#, c-format msgid "" "\t# END block(s)\n" "\n" @@ -1684,7 +1769,8 @@ "\t# Bloc(s) FINAL\n" "\n" -#: profile.c:1201 +#: profile.c:1237 +#, c-format msgid "" "\n" "\t# Functions, listed alphabetically\n" @@ -1692,89 +1778,88 @@ "\n" "\t# Funcions, llistades alfabèticament\n" -#: profile.c:1413 +#: profile.c:1452 #, c-format msgid "unexpected type %s in prec_level" msgstr "tipus %s inesperat en prec_level" -#: re.c:193 -#, c-format -msgid "regex match failed, not enough memory to match string \"%.*s%s\"" -msgstr "" - -#: regcomp.c:136 +#: regcomp.c:150 msgid "Success" msgstr "Èxit" -#: regcomp.c:139 +#: regcomp.c:153 msgid "No match" msgstr "No hi ha concordança" -#: regcomp.c:142 +#: regcomp.c:156 msgid "Invalid regular expression" msgstr "Expressió regular no vàlida" -#: regcomp.c:145 +#: regcomp.c:159 msgid "Invalid collation character" msgstr "Caràcter de comparació no vàlid" -#: regcomp.c:148 +#: regcomp.c:162 msgid "Invalid character class name" msgstr "Nom de classe de caràcters no vàlid" -#: regcomp.c:151 +#: regcomp.c:165 msgid "Trailing backslash" msgstr "Barra invertida extra al final" -#: regcomp.c:154 +#: regcomp.c:168 msgid "Invalid back reference" msgstr "Referència cap enradera no vàlida" -#: regcomp.c:157 +#: regcomp.c:171 msgid "Unmatched [ or [^" msgstr "[ o [^ desemparellats" -#: regcomp.c:160 +#: regcomp.c:174 msgid "Unmatched ( or \\(" msgstr "( o \\( desemparellats" -#: regcomp.c:163 +#: regcomp.c:177 msgid "Unmatched \\{" msgstr "\\{ desemparellat" -#: regcomp.c:166 +#: regcomp.c:180 msgid "Invalid content of \\{\\}" msgstr "Contingut no vàlid de \\{\\}" -#: regcomp.c:169 +#: regcomp.c:183 msgid "Invalid range end" msgstr "Final de rang no vàlid" -#: regcomp.c:172 +#: regcomp.c:186 msgid "Memory exhausted" msgstr "Memòria exhaurida" -#: regcomp.c:175 +#: regcomp.c:189 msgid "Invalid preceding regular expression" msgstr "Expressió regular precedent no vàlida" -#: regcomp.c:178 +#: regcomp.c:192 msgid "Premature end of regular expression" msgstr "Fí prematura de l'expressió regular" -#: regcomp.c:181 +#: regcomp.c:195 msgid "Regular expression too big" msgstr "L'expressió regular és massa gran" -#: regcomp.c:184 +#: regcomp.c:198 msgid "Unmatched ) or \\)" msgstr ") o \\) desemparellats" -#: regcomp.c:621 +#: regcomp.c:668 msgid "No previous regular expression" msgstr "No hi ha una expressió regular prèvia" #, fuzzy +#~ msgid "or used as a variable or an array" +#~ msgstr "no es pot usar el nom de la funció «%s» com a variable o matriu" + +#, fuzzy #~ msgid "substr: length %g is < 0" #~ msgstr "substr: la longitud %g és <= 0" @@ -1814,9 +1899,6 @@ #~ msgid "or used in other expression context" #~ msgstr "o s'ha emprat en un altre context de l'expressió" -#~ msgid "attempt to use function `%s' as array" -#~ msgstr "s'ha intentat usar la funció «%s» com a una matriu" - #~ msgid "`%s' is a function, assignment is not allowed" #~ msgstr "«%s» és una funció, l'assignació no és permesa" diff -urN gawk-3.1.3/po/da.po gawk-3.1.4/po/da.po --- gawk-3.1.3/po/da.po 2003-07-07 21:20:34.000000000 +0300 +++ gawk-3.1.4/po/da.po 2004-07-15 13:02:12.000000000 +0300 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: gawk 3.1.31\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2003-07-07 11:20-0700\n" +"POT-Creation-Date: 2004-07-15 13:02+0300\n" "PO-Revision-Date: 2002-11-09 10:09+0100\n" "Last-Translator: Keld Simonsen \n" "Language-Team: Danish \n" @@ -15,56 +15,61 @@ "Content-Transfer-Encoding: 8bit\n" #: array.c:112 +#, fuzzy, c-format +msgid "attempt to use function `%s' as an array" +msgstr "forsøg på at bruge funktionen \"%s\" som vektor" + +#: array.c:115 #, c-format msgid "attempt to use scalar parameter `%s' as an array" msgstr "forsøg på at bruge skalarparameteren \"%s\" som en vektor" -#: array.c:113 +#: array.c:118 #, c-format msgid "attempt to use scalar `%s' as array" msgstr "forsøg på at bruge skalaren \"%s\" som vektor" -#: array.c:151 +#: array.c:156 #, fuzzy, c-format msgid "from %s" msgstr "%s (fra %s)" -#: array.c:506 +#: array.c:511 #, c-format msgid "reference to uninitialized element `%s[\"%s\"]'" msgstr "reference til ikke-initieret element \"%s[\"%s\"]\"" -#: array.c:512 +#: array.c:517 #, c-format msgid "subscript of array `%s' is null string" msgstr "indeks i vektoren \"%s\" er en tom streng" -#: array.c:609 +#: array.c:621 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: indeks \"%s\" findes ikke i vektoren \"%s\"" -#: array.c:769 +#: array.c:791 #, c-format msgid "%s: empty (null)\n" msgstr "%s: tom (nil)\n" -#: array.c:774 +#: array.c:796 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: tom (nul)\n" -#: array.c:778 +#: array.c:800 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: tabelstørrelse = %d, vektorstørrelse = %d\n" -#: array.c:807 +#: array.c:829 #, fuzzy, c-format msgid "%s: is parameter\n" msgstr "%s: er en parameter\n" -#: array.c:812 +#: array.c:834 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: vektorreference til %s\n" @@ -89,481 +94,476 @@ msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "regexp-konstanten \"/%s/\" ser ud som en C-kommentar, men er det ikke" -#: awkgram.y:340 awkgram.y:615 +#: awkgram.y:341 awkgram.y:619 msgid "statement may have no effect" msgstr "kommandoen har måske ikke nogen effekt" -#: awkgram.y:435 awkgram.y:455 +#: awkgram.y:436 awkgram.y:456 #, fuzzy, c-format msgid "`%s' used in %s action" msgstr "\"next\" brugt i BEGIN- eller END-handling" -#: awkgram.y:448 awkgram.y:451 +#: awkgram.y:449 awkgram.y:452 msgid "`nextfile' is a gawk extension" msgstr "\"nextfile\" er en gawk-udvidelse" -#: awkgram.y:465 +#: awkgram.y:466 msgid "`return' used outside function context" msgstr "\"return\" brugt uden for funktion" -#: awkgram.y:504 +#: awkgram.y:508 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "alenestående \"print\" i BEGIN eller END-regel bør muligvis være 'print \"\"'" -#: awkgram.y:517 awkgram.y:524 +#: awkgram.y:521 awkgram.y:528 msgid "`delete array' is a gawk extension" msgstr "\"delete array\" er en gawk-udvidelse" -#: awkgram.y:532 awkgram.y:539 +#: awkgram.y:536 awkgram.y:543 #, fuzzy msgid "`delete(array)' is a non-portable tawk extension" msgstr "\"delete array\" er en gawk-udvidelse" -#: awkgram.y:583 +#: awkgram.y:587 #, c-format msgid "duplicate case values in switch body: %s" msgstr "" -#: awkgram.y:593 +#: awkgram.y:597 msgid "Duplicate `default' detected in switch body" msgstr "" -#: awkgram.y:681 +#: awkgram.y:686 msgid "multistage two-way pipelines don't work" msgstr "flertrins dobbeltrettede datakanaler fungerer ikke" -#: awkgram.y:772 +#: awkgram.y:777 msgid "regular expression on right of assignment" msgstr "regulært udtryk i højreleddet af en tildeling" -#: awkgram.y:782 +#: awkgram.y:800 msgid "regular expression on left of `~' or `!~' operator" msgstr "regulært udtryk på venstre side af en \"~\"- eller \"!~\"-operator" -#: awkgram.y:790 +#: awkgram.y:808 msgid "regular expression on right of comparison" msgstr "regulært udtryk i højreleddet af en sammenligning" -#: awkgram.y:857 +#: awkgram.y:875 msgid "non-redirected `getline' undefined inside END action" msgstr "ikke-omdirigeret \"getline\" udefineret inde i END-handling" -#: awkgram.y:884 +#: awkgram.y:902 msgid "call of `length' without parentheses is not portable" msgstr "kald af \"length\" uden parenteser er ikke portabelt" -#: awkgram.y:887 +#: awkgram.y:905 msgid "call of `length' without parentheses is deprecated by POSIX" msgstr "kald af \"length\" uden parenteser er forældet ifølge POSIX" -#: awkgram.y:940 +#: awkgram.y:958 msgid "use of non-array as array" msgstr "" -#: awkgram.y:942 +#: awkgram.y:960 msgid "invalid subscript expression" msgstr "ugyldig indeksudtryk" -#: awkgram.y:1140 +#: awkgram.y:1158 #, fuzzy msgid "unexpected newline or end of string" msgstr "uventet nylinjetegn" -#: awkgram.y:1235 +#: awkgram.y:1254 msgid "empty program text on command line" msgstr "tom programtekst på kommandolinjen" -#: awkgram.y:1292 +#: awkgram.y:1307 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "kan ikke åbne kildefilen \"%s\" for læsning (%s)" -#: awkgram.y:1327 +#: awkgram.y:1384 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "kan ikke læse kildefilen \"%s\" (%s)" -#: awkgram.y:1335 +#: awkgram.y:1392 #, c-format msgid "source file `%s' is empty" msgstr "kildefilen \"%s\" er tom" -#: awkgram.y:1537 awkgram.y:1647 awkgram.y:1665 awkgram.y:2015 awkgram.y:2100 +#: awkgram.y:1590 awkgram.y:1700 awkgram.y:1718 awkgram.y:2068 awkgram.y:2153 msgid "source file does not end in newline" msgstr "kildefilen slutter ikke med en ny linje" -#: awkgram.y:1601 +#: awkgram.y:1654 msgid "unterminated regexp ends with `\\' at end of file" msgstr "uafsluttet regulært udtryk slutter med \"\\\" i slutningen af filen" -#: awkgram.y:1621 +#: awkgram.y:1674 msgid "unterminated regexp" msgstr "uafsluttet regulært udtryk" -#: awkgram.y:1624 +#: awkgram.y:1677 msgid "unterminated regexp at end of file" msgstr "uafsluttet regulært udtryk i slutningen af filen" -#: awkgram.y:1691 +#: awkgram.y:1744 msgid "use of `\\ #...' line continuation is not portable" msgstr "Brug af \"\\ #...\" for linjefortsættelse er ikke portabelt" -#: awkgram.y:1703 +#: awkgram.y:1756 msgid "backslash not last character on line" msgstr "sidste tegn på linjen er ikke en omvendt skråstreg" -#: awkgram.y:1748 +#: awkgram.y:1801 msgid "POSIX does not allow operator `**='" msgstr "POSIX tillader ikke operatoren \"**=\"" -#: awkgram.y:1750 +#: awkgram.y:1803 msgid "old awk does not support operator `**='" msgstr "gamle awk understøtter ikke operatoren \"**=\"" -#: awkgram.y:1759 +#: awkgram.y:1812 msgid "POSIX does not allow operator `**'" msgstr "POSIX tillader ikke operatoren \"**\"" -#: awkgram.y:1761 +#: awkgram.y:1814 msgid "old awk does not support operator `**'" msgstr "gamle awk understøtter ikke operatoren \"**\"" -#: awkgram.y:1792 +#: awkgram.y:1845 msgid "operator `^=' is not supported in old awk" msgstr "operatoren \"^=\" understøttes ikke i gamle awk" -#: awkgram.y:1800 +#: awkgram.y:1853 msgid "operator `^' is not supported in old awk" msgstr "operatoren \"^\" understøttes ikke i gamle awk" -#: awkgram.y:1884 awkgram.y:1901 +#: awkgram.y:1937 awkgram.y:1954 msgid "unterminated string" msgstr "uafsluttet streng" -#: awkgram.y:2061 +#: awkgram.y:2114 #, c-format msgid "invalid char '%c' in expression" msgstr "ugyldigt tegn \"%c\" i udtryk" -#: awkgram.y:2121 +#: awkgram.y:2162 #, c-format msgid "`%s' is a gawk extension" msgstr "\"%s\" er en gawk-udvidelse" -#: awkgram.y:2124 +#: awkgram.y:2165 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "\"%s\" er en Bell Labs-udvidelse" -#: awkgram.y:2127 +#: awkgram.y:2168 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX tillader ikke \"%s\"" -#: awkgram.y:2131 +#: awkgram.y:2172 #, c-format msgid "`%s' is not supported in old awk" msgstr "\"%s\" understøttes ikke i gamle awk" -#: awkgram.y:2158 +#: awkgram.y:2198 msgid "`goto' considered harmful!\n" msgstr "\"goto\" anses for skadlig!\n" -#: awkgram.y:2220 +#: awkgram.y:2260 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d er et ugyldigt antal argumenter for %s" -#: awkgram.y:2239 awkgram.y:2242 +#: awkgram.y:2279 awkgram.y:2282 msgid "match: third argument is a gawk extension" msgstr "match: tredje argument er en gawk-udvidelse" -#: awkgram.y:2255 +#: awkgram.y:2295 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "" "%s: bogstavelig streng som sidste argument til erstatning har ingen effekt" -#: awkgram.y:2258 +#: awkgram.y:2298 #, fuzzy, c-format msgid "%s third parameter is not a changeable object" msgstr "sub: tredje argument er ikke et ændringsbart objekt" -#: awkgram.y:2285 awkgram.y:2288 +#: awkgram.y:2325 awkgram.y:2328 msgid "close: second argument is a gawk extension" msgstr "close: andet argument er en gawk-udvidelse" -#: awkgram.y:2298 +#: awkgram.y:2338 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "brug af dcgettext(_\"...\") er fejlagtigt: fjern det indledende " "understregningstegn" -#: awkgram.y:2313 +#: awkgram.y:2353 #, fuzzy msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "brug af dcgettext(_\"...\") er fejlagtigt: fjern det indledende " "understregningstegn" -#: awkgram.y:2384 +#: awkgram.y:2424 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "funktionen \"%s\": parameter %d, \"%s\", er samme som parameter %d" -#: awkgram.y:2417 +#: awkgram.y:2457 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "funktionen \"%s\": parameteren \"%s\" overskygger en global variabel" -#: awkgram.y:2529 +#: awkgram.y:2569 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "kunne ikke åbne \"%s\" for skrivning (%s)" -#: awkgram.y:2530 profile.c:93 +#: awkgram.y:2570 profile.c:93 msgid "sending profile to standard error" msgstr "sender profilen til standard fejl" -#: awkgram.y:2562 +#: awkgram.y:2602 #, c-format msgid "%s: close failed (%s)" msgstr "%s: mislykkedes at lukke (%s)" -#: awkgram.y:2684 +#: awkgram.y:2723 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() kaldt to gange!" -#: awkgram.y:2711 +#: awkgram.y:2750 msgid "there were shadowed variables." msgstr "" -#: awkgram.y:2784 +#: awkgram.y:2823 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "funktionen \"%s\": kan ikke bruge funktionsnavn som parameternavn" -#: awkgram.y:2794 +#: awkgram.y:2833 #, c-format msgid "function name `%s' previously defined" msgstr "funktionsnavnet \"%s\" er allerede defineret" -#: awkgram.y:2945 awkgram.y:2951 +#: awkgram.y:2984 awkgram.y:2990 #, c-format msgid "function `%s' called but never defined" msgstr "funktionen \"%s\" kaldt, men aldrig defineret" -#: awkgram.y:2954 +#: awkgram.y:2993 #, c-format msgid "function `%s' defined but never called" msgstr "funktionen \"%s\" defineret, men aldrig kaldt" -#: awkgram.y:2981 +#: awkgram.y:3020 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "konstant regulært udtryk for parameter %d giver en boolesk værdi" -#: awkgram.y:2994 -#, c-format +#: awkgram.y:3033 +#, fuzzy, c-format msgid "" "function `%s' called with space between name and `(',\n" -"%s" +"or used as a variable or an array" msgstr "" "funktionen \"%s\" kaldt med blanktegn mellem navnet og \"(\",\n" "%s" -#: awkgram.y:2996 -#, fuzzy -msgid "or used as a variable or an array" -msgstr "kan ikke bruge funktionsnavnet \"%s\" som variabel eller vektor" - -#: builtin.c:137 +#: builtin.c:149 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s til \"%s\" mislykkedes (%s)" -#: builtin.c:138 +#: builtin.c:150 msgid "standard output" msgstr "standard ud" -#: builtin.c:139 +#: builtin.c:151 msgid "reason unknown" msgstr "ukendt årsag" -#: builtin.c:152 +#: builtin.c:164 msgid "exp: received non-numeric argument" msgstr "exp: fik et ikke-numerisk argument" -#: builtin.c:158 +#: builtin.c:170 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: argumentet %g er uden for tilladt område" -#: builtin.c:216 +#: builtin.c:228 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" "fflush: kan ikke spole: datakanalen \"%s\" åbnet for læsning, ikke skrivning" -#: builtin.c:219 +#: builtin.c:231 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "fflush: kan ikke spole: filen \"%s\" åbnet for læsning, ikke skrivning" -#: builtin.c:231 +#: builtin.c:243 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "fflush: \"%s\" er ikke en åben fil, datakanal eller ko proces" -#: builtin.c:325 +#: builtin.c:338 msgid "index: received non-string first argument" msgstr "indeks: første argument er ikke en streng" -#: builtin.c:327 +#: builtin.c:340 msgid "index: received non-string second argument" msgstr "indeks: andet argument er ikke en streng" -#: builtin.c:437 +#: builtin.c:454 msgid "int: received non-numeric argument" msgstr "int: fik et ikke-numerisk argument" -#: builtin.c:454 +#: builtin.c:471 msgid "length: received non-string argument" msgstr "length: fik et argument som ikke er en streng" -#: builtin.c:470 +#: builtin.c:487 msgid "log: received non-numeric argument" msgstr "log: fik et ikke-numerisk argument" -#: builtin.c:473 +#: builtin.c:490 #, c-format msgid "log: received negative argument %g" msgstr "log: fik et negativt argument %g" -#: builtin.c:635 builtin.c:638 +#: builtin.c:654 builtin.c:657 msgid "must use `count$' on all formats or none" msgstr "" -#: builtin.c:740 +#: builtin.c:759 msgid "`$' is not permitted in awk formats" msgstr "\"$\" tillades ikke i awkformat" -#: builtin.c:746 +#: builtin.c:765 msgid "arg count with `$' must be > 0" msgstr "argumentantallet med \"$\" skal være > 0" -#: builtin.c:748 +#: builtin.c:767 #, fuzzy, c-format msgid "arg count %ld greater than total number of supplied arguments" msgstr "argumentantallet %d er større end antal givne argumenter" -#: builtin.c:750 +#: builtin.c:769 msgid "`$' not permitted after period in format" msgstr "\"$\" tillades ikke efter et punktum i formatet" -#: builtin.c:763 +#: builtin.c:782 msgid "no `$' supplied for positional field width or precision" msgstr "intet \"$\" angivet for positionsangivet feltbredde eller præcision" -#: builtin.c:821 +#: builtin.c:848 msgid "`l' is meaningless in awk formats; ignored" msgstr "\"l\" er meningsløst i awk-formater, ignoreret" -#: builtin.c:825 +#: builtin.c:852 msgid "`l' is not permitted in POSIX awk formats" msgstr "\"l\" tillades ikke i POSIX awk-formater" -#: builtin.c:836 +#: builtin.c:863 msgid "`L' is meaningless in awk formats; ignored" msgstr "\"L\" er meningsløst i awk-formater, ignoreret" -#: builtin.c:840 +#: builtin.c:867 msgid "`L' is not permitted in POSIX awk formats" msgstr "\"L\" tillades ikke i POSIX awk-formater" -#: builtin.c:851 +#: builtin.c:878 msgid "`h' is meaningless in awk formats; ignored" msgstr "\"h\" er meningsløst i awk-formater, ignoreret" -#: builtin.c:855 +#: builtin.c:882 msgid "`h' is not permitted in POSIX awk formats" msgstr "\"h\" tillades ikke i POSIX awk-formater" -#: builtin.c:1055 +#: builtin.c:1111 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" msgstr "" -#: builtin.c:1108 +#: builtin.c:1171 msgid "not enough arguments to satisfy format string" msgstr "for få argumenter til formatstrengen" -#: builtin.c:1110 +#: builtin.c:1173 msgid "^ ran out for this one" msgstr "^ sluttede her" -#: builtin.c:1115 +#: builtin.c:1178 msgid "[s]printf: format specifier does not have control letter" msgstr "[s]printf: formatspecifiereren har intet kommandobogstav" -#: builtin.c:1118 +#: builtin.c:1181 msgid "too many arguments supplied for format string" msgstr "for mange argumenter til formatstrengen" -#: builtin.c:1184 builtin.c:1187 +#: builtin.c:1247 builtin.c:1250 msgid "printf: no arguments" msgstr "printf: ingen argumenter" -#: builtin.c:1211 +#: builtin.c:1274 msgid "sqrt: received non-numeric argument" msgstr "sqrt: fik ikke-numerisk argument" -#: builtin.c:1215 +#: builtin.c:1278 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: kaldt med negativt argument %g" -#: builtin.c:1238 +#: builtin.c:1301 #, c-format msgid "substr: start index %g is invalid, using 1" msgstr "substr: startindeks %g er ugyldigt, bruger 1" -#: builtin.c:1243 +#: builtin.c:1306 #, c-format msgid "substr: non-integer start index %g will be truncated" msgstr "substr: startindeks %g som ikke er et heltal bliver trunkeret" -#: builtin.c:1262 +#: builtin.c:1325 #, fuzzy, c-format msgid "substr: length %g is not >= 1" msgstr "substr: længden %g er <= 0" -#: builtin.c:1264 +#: builtin.c:1327 #, fuzzy, c-format msgid "substr: length %g is not >= 0" msgstr "substr: længden %g er <= 0" -#: builtin.c:1271 +#: builtin.c:1334 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: længden %g som ikke er et heltal bliver trunkeret" -#: builtin.c:1276 +#: builtin.c:1339 #, c-format msgid "substr: length %g too big for string indexing, truncating to %g" msgstr "" -#: builtin.c:1288 +#: builtin.c:1351 msgid "substr: source string is zero length" msgstr "substr: kildestrengen er tom" -#: builtin.c:1294 +#: builtin.c:1357 #, fuzzy, c-format msgid "substr: start index %g is past end of string" msgstr "substr: startindeks %d er forbi slutningen på strengen" -#: builtin.c:1302 +#: builtin.c:1365 #, fuzzy, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" @@ -571,295 +571,321 @@ "substr: længden %d ved startindeks %d overskrider længden af første argument " "(%d)" -#: builtin.c:1337 +#: builtin.c:1400 #, fuzzy msgid "strftime: received non-string first argument" msgstr "strftime: fik et første argument som ikke er en streng" -#: builtin.c:1343 +#: builtin.c:1406 msgid "strftime: received empty format string" msgstr "strftime: fik en tom formatstreng" -#: builtin.c:1352 +#: builtin.c:1415 #, fuzzy msgid "strftime: received non-numeric second argument" msgstr "strftime: fik et ikke-numerisk andet argument" -#: builtin.c:1415 +#: builtin.c:1478 msgid "mktime: received non-string argument" msgstr "mktime: fik et argument som ikke er en streng" -#: builtin.c:1460 +#: builtin.c:1523 #, fuzzy msgid "system: received non-string argument" msgstr "system: fik et argument som ikke er en streng" -#: builtin.c:1581 eval.c:1883 +#: builtin.c:1644 eval.c:2019 #, fuzzy, c-format msgid "reference to uninitialized field `$%d'" msgstr "reference til ikke-initieret variabel \"%s\"" -#: builtin.c:1608 +#: builtin.c:1671 #, fuzzy msgid "tolower: received non-string argument" msgstr "tolower: fik et argument som ikke er en streng" -#: builtin.c:1657 +#: builtin.c:1720 #, fuzzy msgid "toupper: received non-string argument" msgstr "toupper: fik et argument som ikke er en streng" -#: builtin.c:1702 +#: builtin.c:1765 msgid "atan2: received non-numeric first argument" msgstr "atan2: fik et ikke-numerisk første argument" -#: builtin.c:1704 +#: builtin.c:1767 msgid "atan2: received non-numeric second argument" msgstr "atan2: fik et ikke-numerisk andet argument" -#: builtin.c:1723 +#: builtin.c:1786 msgid "sin: received non-numeric argument" msgstr "sin: fik et ikke-numerisk argument" -#: builtin.c:1739 +#: builtin.c:1802 msgid "cos: received non-numeric argument" msgstr "cos: fik et ikke-numerisk argument" -#: builtin.c:1788 +#: builtin.c:1852 msgid "srand: received non-numeric argument" msgstr "srand: fik et ikke-numerisk argument" -#: builtin.c:1823 +#: builtin.c:1887 msgid "match: third argument is not an array" msgstr "match: tredje argument er ikke en vektor" -#: builtin.c:2307 +#: builtin.c:2414 msgid "gensub: third argument of 0 treated as 1" msgstr "gensub: Nullet i tredje argument behandlet som et ét-tal" -#: builtin.c:2416 builtin.c:2418 +#: builtin.c:2572 msgid "lshift: received non-numeric first argument" msgstr "lshift: fik et ikke-numerisk første argument" -#: builtin.c:2420 +#: builtin.c:2574 +#, fuzzy +msgid "lshift: received non-numeric second argument" +msgstr "strftime: fik et ikke-numerisk andet argument" + +#: builtin.c:2580 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "lshift(%lf, %lf): negative værdier vil give mærkelige resultater" -#: builtin.c:2422 +#: builtin.c:2582 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): flydendetalsværdier vil blive trunkeret" -#: builtin.c:2424 +#: builtin.c:2584 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "" "lshift(%lf, %lf): for store skifteværdier vil give mærkelige resultater" -#: builtin.c:2453 builtin.c:2455 +#: builtin.c:2610 msgid "rshift: received non-numeric first argument" msgstr "rshift: fik et ikke-numerisk første argument" -#: builtin.c:2457 +#: builtin.c:2612 +#, fuzzy +msgid "rshift: received non-numeric second argument" +msgstr "strftime: fik et ikke-numerisk andet argument" + +#: builtin.c:2618 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "rshift(%lf, %lf): negative værdier vil give mærkelige resultater" -#: builtin.c:2459 +#: builtin.c:2620 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): flydendetalsværdier vil blive trunkeret" -#: builtin.c:2461 +#: builtin.c:2622 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "" "rshift(%lf, %lf): for store skifteværdier vil give mærkelige resultater" -#: builtin.c:2490 builtin.c:2492 +#: builtin.c:2648 msgid "and: received non-numeric first argument" msgstr "and: fik et ikke-numerisk første argument" -#: builtin.c:2494 +#: builtin.c:2650 +#, fuzzy +msgid "and: received non-numeric second argument" +msgstr "atan2: fik et ikke-numerisk andet argument" + +#: builtin.c:2656 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "and(%lf, %lf): negative værdier vil give mærkelige resultater" -#: builtin.c:2496 +#: builtin.c:2658 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): flydendetalsværdier vil blive trunkeret" -#: builtin.c:2525 builtin.c:2527 +#: builtin.c:2684 msgid "or: received non-numeric first argument" msgstr "or: fik et ikke-numerisk første argument" -#: builtin.c:2529 +#: builtin.c:2686 +#, fuzzy +msgid "or: received non-numeric second argument" +msgstr "atan2: fik et ikke-numerisk andet argument" + +#: builtin.c:2692 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "or(%lf, %lf): negative værdier vil give mærkelige resultater" -#: builtin.c:2531 +#: builtin.c:2694 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): flydendetalsværdier vil blive trunkeret" -#: builtin.c:2560 builtin.c:2562 +#: builtin.c:2720 msgid "xor: received non-numeric first argument" msgstr "xor: fik et ikke-numerisk første argument" -#: builtin.c:2564 +#: builtin.c:2722 +#, fuzzy +msgid "xor: received non-numeric second argument" +msgstr "atan2: fik et ikke-numerisk andet argument" + +#: builtin.c:2728 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "xor(%lf, %lf): negative værdier vil give mærkelige resultater" -#: builtin.c:2566 +#: builtin.c:2730 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): flydendetalsværdier vil blive trunkeret" -#: builtin.c:2594 +#: builtin.c:2754 msgid "compl: received non-numeric argument" msgstr "compl: fik et ikke-numerisk argument" -#: builtin.c:2596 +#: builtin.c:2760 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): negative værdier vil give mærkelige resultater" -#: builtin.c:2598 +#: builtin.c:2762 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): flydendetalsværdier vil blive trunkeret" -#: builtin.c:2771 +#: builtin.c:2935 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: \"%s\" er ikke en gyldig lokalekategori" -#: eval.c:266 +#: eval.c:303 #, c-format msgid "unknown nodetype %d" msgstr "ukendt nodetype %d" -#: eval.c:312 +#: eval.c:350 msgid "buffer overflow in genflags2str" msgstr "bufferoverløb i genflags2str" -#: eval.c:647 +#: eval.c:382 eval.c:388 profile.c:837 +#, c-format +msgid "attempt to use array `%s' in a scalar context" +msgstr "forsøg på at bruge vektoren \"%s\" i skalarsammenhæng" + +#: eval.c:730 #, fuzzy, c-format msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" "for-løkke: vektoren \"%s\" ændrede størrelse fra %d til %d under løkke-" "udførelsen" -#: eval.c:668 +#: eval.c:751 msgid "`break' outside a loop is not portable" msgstr "\"break\" uden for en løkke er ikke portabelt" -#: eval.c:672 +#: eval.c:755 msgid "`break' outside a loop is not allowed" msgstr "\"break\" uden for en løkke er ikke tilladt" -#: eval.c:689 +#: eval.c:772 msgid "`continue' outside a loop is not portable" msgstr "\"continue\" uden for en løkke er ikke portabelt" -#: eval.c:693 +#: eval.c:776 msgid "`continue' outside a loop is not allowed" msgstr "\"continue\" uden for en løkke er ikke tilladt" -#: eval.c:727 +#: eval.c:810 msgid "`next' cannot be called from a BEGIN rule" msgstr "\"next\" kan ikke kaldes fra en BEGIN-regel" -#: eval.c:729 +#: eval.c:812 msgid "`next' cannot be called from an END rule" msgstr "\"next\" kan ikke kaldes fra en END-regel" -#: eval.c:738 +#: eval.c:821 msgid "`nextfile' cannot be called from a BEGIN rule" msgstr "\"nextfile\" kan ikke kaldes fra en BEGIN-regel" -#: eval.c:740 +#: eval.c:823 msgid "`nextfile' cannot be called from an END rule" msgstr "\"nextfile\" kan ikke kaldes fra en END-regel" -#: eval.c:785 +#: eval.c:872 msgid "statement has no effect" msgstr "kommandoen har ingen effekt" -#: eval.c:828 eval.c:1726 +#: eval.c:915 eval.c:1873 #, c-format msgid "can't use function name `%s' as variable or array" msgstr "kan ikke bruge funktionsnavnet \"%s\" som variabel eller vektor" -#: eval.c:835 eval.c:841 +#: eval.c:922 eval.c:928 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "reference til ikke-initieret argument \"%s\"" -#: eval.c:848 eval.c:907 eval.c:1732 eval.c:1742 profile.c:807 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "forsøg på at bruge vektoren \"%s\" i skalarsammenhæng" - -#: eval.c:858 eval.c:1752 +#: eval.c:937 eval.c:1882 #, c-format msgid "reference to uninitialized variable `%s'" msgstr "reference til ikke-initieret variabel \"%s\"" -#: eval.c:1007 +#: eval.c:1083 msgid "" "concatenation: side effects in one expression have changed the length of " "another!" msgstr "" "concatenation: sideeffekter i et udtryk har ændret længden af et andet!" -#: eval.c:1032 +#: eval.c:1162 msgid "assignment used in conditional context" msgstr "tildeling brugt i sammenligningsammenhæng" -#: eval.c:1122 +#: eval.c:1252 msgid "division by zero attempted" msgstr "forsøgte at dividere med nul" -#: eval.c:1137 +#: eval.c:1267 #, c-format msgid "division by zero attempted in `%%'" msgstr "forsøgte at dividere med nul i \"%%\"" -#: eval.c:1152 profile.c:683 +#: eval.c:1282 profile.c:713 #, c-format msgid "illegal type (%s) in tree_eval" msgstr "ikke tilladt type (%s) i tree_eval" -#: eval.c:1328 +#: eval.c:1459 msgid "division by zero attempted in `/='" msgstr "forsøgte at dividere med nul i \"/=\"" -#: eval.c:1346 +#: eval.c:1477 #, c-format msgid "division by zero attempted in `%%='" msgstr "forsøgte at dividere med nul i \"%%=\"" -#: eval.c:1586 +#: eval.c:1738 #, c-format msgid "function `%s' called with more arguments than declared" msgstr "funktionen \"%s\" kaldt med flere argumenter end deklareret" -#: eval.c:1633 +#: eval.c:1782 #, c-format msgid "function `%s' not defined" msgstr "funktionen \"%s\" er ikke defineret" -#: eval.c:1639 +#: eval.c:1788 #, c-format msgid "function %s called\n" msgstr "funktionen %s kaldt\n" -#: eval.c:1698 +#: eval.c:1845 +#, c-format msgid "" "\n" "\t# Function Call Stack:\n" @@ -869,41 +895,42 @@ "\t# Funktionskaldsstak:\n" "\n" -#: eval.c:1701 +#: eval.c:1848 +#, c-format msgid "\t# -- main --\n" msgstr "\t# -- main --\n" -#: eval.c:1867 +#: eval.c:2003 msgid "attempt to field reference from non-numeric value" msgstr "forsøg på at feltreferere fra ikke-numerisk værdi" -#: eval.c:1869 +#: eval.c:2005 msgid "attempt to reference from null string" msgstr "forsøg på at referere fra tom streng" -#: eval.c:1875 +#: eval.c:2011 #, c-format msgid "attempt to access field %d" msgstr "forsøg på at få adgang til felt nummer %d" -#: eval.c:1896 eval.c:1903 profile.c:900 +#: eval.c:2032 eval.c:2039 profile.c:934 msgid "assignment is not allowed to result of builtin function" msgstr "tildeling er ikke tilladt til resultatet fra en indbygget funktion" -#: eval.c:1951 +#: eval.c:2103 msgid "`IGNORECASE' is a gawk extension" msgstr "\"IGNORECASE\" er en gawk-udvidelse" -#: eval.c:1980 +#: eval.c:2133 msgid "`BINMODE' is a gawk extension" msgstr "\"BINMODE\" er en gawk-udvidelse" -#: eval.c:2092 +#: eval.c:2255 #, c-format msgid "bad `%sFMT' specification `%s'" msgstr "fejlagtig \"%sFMT\"-specifikation \"%s\"" -#: eval.c:2170 +#: eval.c:2333 msgid "turning off `--lint' due to assignment to `LINT'" msgstr "deaktiverer \"--lint\" på grund af en tildeling til \"LINT\"" @@ -921,7 +948,56 @@ msgid "extension: library `%s': cannot call function `%s' (%s)\n" msgstr "extension: bibliotek \"%s\": kan ikke kalde funktionen \"%s\" (%s)\n" -#: ext.c:183 +#: ext.c:102 +msgid "extension: missing function name" +msgstr "" + +#: ext.c:107 +#, fuzzy, c-format +msgid "extension: illegal character `%c' in function name `%s'" +msgstr "extension: bibliotek \"%s\": kan ikke kalde funktionen \"%s\" (%s)\n" + +#: ext.c:113 +#, fuzzy, c-format +msgid "extension: can't redefine function `%s'" +msgstr "extension: kan ikke åbne \"%s\" (%s)\n" + +#: ext.c:117 +#, fuzzy, c-format +msgid "extension: function `%s' already defined" +msgstr "funktionen \"%s\" er ikke defineret" + +#: ext.c:122 +#, c-format +msgid "extension: can't use gawk built-in `%s' as function name" +msgstr "" + +#: ext.c:124 +#, fuzzy, c-format +msgid "extension: function name `%s' previously defined" +msgstr "funktionsnavnet \"%s\" er allerede defineret" + +#: ext.c:201 +#, c-format +msgid "function `%s' defined to take no more than `%d' argument(s)" +msgstr "" + +#: ext.c:204 +#, fuzzy, c-format +msgid "function `%s': missing argument #%d" +msgstr "funktionen \"%s\" er ikke defineret" + +#: ext.c:214 +#, fuzzy, c-format +msgid "function `%s': argument #%d: attempt to use scalar as an array" +msgstr "forsøg på at bruge skalaren \"%s\" som vektor" + +#: ext.c:218 +#, c-format +msgid "function `%s': argument #%d: attempt to use array as a scalar" +msgstr "" + +#: ext.c:243 msgid "Operation Not Supported" msgstr "Operationen understøttes ikke" @@ -950,523 +1026,523 @@ msgid "null string for `FS' is a gawk extension" msgstr "tom streng som \"FS\" er en gawk-udvidelse" -#: getopt.c:692 getopt.c:704 +#: getopt.c:692 getopt.c:711 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s: flaget \"%s\" er flertydigt\n" -#: getopt.c:737 getopt.c:741 +#: getopt.c:744 getopt.c:748 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "%s: flaget \"--%s\" tillader ikke noget argument\n" -#: getopt.c:750 getopt.c:755 +#: getopt.c:757 getopt.c:762 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "%s: flaget \"%c%s\" tillader ikke noget argument\n" -#: getopt.c:791 getopt.c:804 getopt.c:1093 getopt.c:1106 +#: getopt.c:807 getopt.c:829 getopt.c:1159 getopt.c:1181 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "%s: flaget \"%s\" kræver et argument\n" -#: getopt.c:842 getopt.c:845 +#: getopt.c:867 getopt.c:870 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s: ukendt flag \"--%s\"\n" -#: getopt.c:853 getopt.c:856 +#: getopt.c:878 getopt.c:881 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s: ukendt flag \"%c%s\"\n" -#: getopt.c:903 getopt.c:906 +#: getopt.c:936 getopt.c:939 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: ikke tilladt flag -- %c\n" -#: getopt.c:912 getopt.c:915 +#: getopt.c:945 getopt.c:948 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s: ugyldig flag -- %c\n" -#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:434 +#: getopt.c:1003 getopt.c:1022 getopt.c:1234 getopt.c:1255 main.c:433 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: flaget kræver et argument -- %c\n" -#: getopt.c:1025 getopt.c:1036 +#: getopt.c:1074 getopt.c:1093 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s: flaget \"-W %s\" er flertydigt\n" -#: getopt.c:1060 getopt.c:1072 +#: getopt.c:1117 getopt.c:1138 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: flaget \"-W %s\" tillader ikke noget argument\n" -#: io.c:305 +#: io.c:308 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "kan ikke åbne filen \"%s\" for læsning (%s)" -#: io.c:392 +#: io.c:395 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "lukning af fd %d (\"%s\") mislykkedes (%s)" -#: io.c:530 +#: io.c:533 #, c-format msgid "invalid tree type %s in redirect()" msgstr "ugyldig trætype %s i redirect()" -#: io.c:536 +#: io.c:539 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "udtrykket i \"%s\"-omdirigering har kun numerisk værdi" -#: io.c:542 +#: io.c:545 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "udtrykket for \"%s\"-omdirigering har en tom streng som værdi" -#: io.c:547 +#: io.c:550 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "filnavnet \"%s\" for \"%s\"-omdirigering kan være resultatet af et logisk " "udtryk" -#: io.c:569 +#: io.c:588 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "unødig blanding af \">\" og \">>\" for filen \"%.*s\"" -#: io.c:621 +#: io.c:640 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "kan ikke åbne røret \"%s\" for udskrivning (%s)" -#: io.c:630 +#: io.c:649 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "kan ikke åbne røret \"%s\" for indtastning (%s)" -#: io.c:643 +#: io.c:662 #, c-format msgid "can't open two way socket `%s' for input/output (%s)" msgstr "kan ikke åbne tovejssoklen \"%s\" for ind-/uddata (%s)" -#: io.c:647 +#: io.c:666 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "kan ikke åbne tovejsrøret \"%s\" for ind-/uddata (%s)" -#: io.c:723 +#: io.c:742 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "kan ikke omdirigere fra \"%s\" (%s)" -#: io.c:726 +#: io.c:745 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "kan ikke omdirigere til \"%s\" (%s)" -#: io.c:765 +#: io.c:784 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "nåede systembegrænsningen for åbne filer: begynder at multiplekse " "fildeskriptorer" -#: io.c:777 +#: io.c:800 #, c-format msgid "close of `%s' failed (%s)." msgstr "lukning af \"%s\" mislykkedes (%s)" -#: io.c:784 +#: io.c:808 msgid "too many pipes or input files open" msgstr "for mange rør eller inddatafiler åbne" -#: io.c:807 +#: io.c:831 msgid "close: second argument must be `to' or `from'" msgstr "close: andet argument skal være \"to\" eller \"from\"" -#: io.c:821 +#: io.c:845 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "close: \"%.*s\" er ikke en åben fil, datakanal eller ko-proces" -#: io.c:825 +#: io.c:849 msgid "close of redirection that was never opened" msgstr "lukning af omdirigering som aldrig åbnedes" -#: io.c:862 +#: io.c:945 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: omdirigeringen \"%s\" åbnedes ikke med \"|&\", andet argument " "ignoreret" -#: io.c:924 +#: io.c:960 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "fejlstatus (%d) fra rørlukning af \"%s\" (%s)" -#: io.c:927 +#: io.c:963 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "fejlstatus (%d) fra fillukning af \"%s\" (%s)" -#: io.c:946 +#: io.c:983 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "ingen eksplicit lukning af soklen \"%s\" angivet" -#: io.c:949 +#: io.c:986 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "ingen eksplicit lukning af ko-processen \"%s\" angivet" -#: io.c:952 +#: io.c:989 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "ingen eksplicit lukning af røret \"%s\" angivet" -#: io.c:955 +#: io.c:992 #, c-format msgid "no explicit close of file `%s' provided" msgstr "ingen eksplicit lukning af filen \"%s\" angivet" -#: io.c:984 io.c:1038 +#: io.c:1021 io.c:1075 #, c-format msgid "error writing standard output (%s)" msgstr "fejl ved skrivning til standard ud (%s)" -#: io.c:988 io.c:1042 +#: io.c:1025 io.c:1079 #, c-format msgid "error writing standard error (%s)" msgstr "fejl ved skrivning til standard fejl (%s)" -#: io.c:996 +#: io.c:1033 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "rørspuling af \"%s\" mislykkedes (%s)" -#: io.c:999 +#: io.c:1036 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "ko-processpuling af røret til \"%s\" mislykkedes (%s)" -#: io.c:1002 +#: io.c:1039 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "filspuling af \"%s\" mislykkedes (%s)" -#: io.c:1161 +#: io.c:1198 msgid "/inet/raw client not ready yet, sorry" msgstr "/inet/raw-klient er desværre ikke klar endnu" -#: io.c:1163 io.c:1200 +#: io.c:1200 io.c:1237 msgid "only root may use `/inet/raw'." msgstr "kun root kan bruge \"/inet/raw\"." -#: io.c:1198 +#: io.c:1235 msgid "/inet/raw server not ready yet, sorry" msgstr "/inet/raw-server er desværre ikke klar endnu" -#: io.c:1288 +#: io.c:1325 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "ingen (kendt) protokol opgivet i special-filnavn \"%s\"" -#: io.c:1306 +#: io.c:1343 #, c-format msgid "special file name `%s' is incomplete" msgstr "special-filnavn \"%s\" er ufuldstændigt" -#: io.c:1318 +#: io.c:1355 #, c-format msgid "local port invalid in `%s'" msgstr "lokal port ugyldig i \"%s\"" -#: io.c:1330 +#: io.c:1367 msgid "must supply a remote hostname to `/inet'" msgstr "skal angive et fjernmaskinenavn til \"/inet\"" -#: io.c:1345 +#: io.c:1382 msgid "must supply a remote port to `/inet'" msgstr "skal angive en fjernport til \"/inet\"" -#: io.c:1351 +#: io.c:1388 #, c-format msgid "remote port invalid in `%s'" msgstr "fjernporten ugyldig i \"%s\"" -#: io.c:1361 +#: io.c:1398 msgid "TCP/IP communications are not supported" msgstr "TCP/IP-kommunikation understøttes ikke" -#: io.c:1370 io.c:1551 +#: io.c:1407 io.c:1588 #, c-format msgid "file `%s' is a directory" msgstr "filen \"%s\" er et katalog" -#: io.c:1440 +#: io.c:1477 #, c-format msgid "use `PROCINFO[\"%s\"]' instead of `%s'" msgstr "brug \"PROCINFO[\"%s\"]\" i stedet for \"%s\"" -#: io.c:1472 +#: io.c:1509 msgid "use `PROCINFO[...]' instead of `/dev/user'" msgstr "brug \"PROCINFO[...]\" i stedet for \"dev/user\"" -#: io.c:1537 io.c:1711 +#: io.c:1574 io.c:1748 #, c-format msgid "could not open `%s', mode `%s'" msgstr "kunne ikke åbne \"%s\", tilstand \"%s\"" -#: io.c:1762 +#: io.c:1799 #, fuzzy, c-format msgid "close of master pty failed (%s)" msgstr "lukning af røret mislykkedes (%s)" -#: io.c:1764 io.c:1916 io.c:2068 +#: io.c:1801 io.c:1953 io.c:2105 #, c-format msgid "close of stdout in child failed (%s)" msgstr "lukning af standard ud i barnet mislykkedes (%s)" -#: io.c:1767 +#: io.c:1804 #, fuzzy, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "flytning af rør til standard ud i barnet mislykkedes (dup: %s)" -#: io.c:1769 io.c:1921 +#: io.c:1806 io.c:1958 #, c-format msgid "close of stdin in child failed (%s)" msgstr "lukning af standard ind i barnet mislykkedes (%s)" -#: io.c:1772 +#: io.c:1809 #, fuzzy, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "flytning af rør til standard ind i barnet mislykkedes (dup: %s)" -#: io.c:1774 io.c:1793 +#: io.c:1811 io.c:1830 #, fuzzy, c-format msgid "close of slave pty failed (%s)" msgstr "lukning af røret mislykkedes (%s)" -#: io.c:1867 io.c:1919 io.c:2049 io.c:2071 +#: io.c:1904 io.c:1956 io.c:2086 io.c:2108 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "flytning af rør til standard ud i barnet mislykkedes (dup: %s)" -#: io.c:1871 io.c:1924 +#: io.c:1908 io.c:1961 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "flytning af rør til standard ind i barnet mislykkedes (dup: %s)" -#: io.c:1888 io.c:2062 +#: io.c:1925 io.c:2099 msgid "restoring stdout in parent process failed\n" msgstr "genskabelse af standard ud i forælderprocessen mislykkedes\n" -#: io.c:1893 +#: io.c:1930 msgid "restoring stdin in parent process failed\n" msgstr "genskabelse af standard ind i forælderprocessen mislykkedes\n" -#: io.c:1927 io.c:2073 io.c:2084 +#: io.c:1964 io.c:2110 io.c:2121 #, c-format msgid "close of pipe failed (%s)" msgstr "lukning af røret mislykkedes (%s)" -#: io.c:1972 +#: io.c:2009 msgid "`|&' not supported" msgstr "\"|&\" understøttes ikke" -#: io.c:2039 +#: io.c:2076 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "kan ikke åbne røret \"%s\" (%s)" -#: io.c:2080 +#: io.c:2117 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "kan ikke oprette barneproces for \"%s\" (fork: %s)" -#: io.c:2423 +#: io.c:2460 #, c-format msgid "data file `%s' is empty" msgstr "datafilen \"%s\" er tom" -#: io.c:2466 io.c:2474 +#: io.c:2503 io.c:2511 msgid "could not allocate more input memory" msgstr "" -#: io.c:2832 io.c:2895 +#: io.c:2869 io.c:2932 #, c-format msgid "error reading input file `%s': %s" msgstr "fejl ved læsning af inddatafilen \"%s\": %s" -#: io.c:3020 +#: io.c:3057 msgid "multicharacter value of `RS' is a gawk extension" msgstr "flertegnsværdien af \"RS\" er en gawk-udvidelse" -#: main.c:324 +#: main.c:323 msgid "`-m[fr]' option irrelevant in gawk" msgstr "\"-m[fr]\"-flaget er irrelevant i gawk" -#: main.c:326 +#: main.c:325 msgid "-m option usage: `-m[fr] nnn'" msgstr "-m-flagets brug: \"-m[fr] nnn\"" -#: main.c:343 +#: main.c:342 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: flaget \"-W %s\" ukendt, ignoreret\n" -#: main.c:380 +#: main.c:379 msgid "empty argument to `--source' ignored" msgstr "tomt argument til \"--source\" ignoreret" -#: main.c:451 +#: main.c:450 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "miljøvariablen \"POSIXLY_CORRECT\" sat: aktiverer \"--posix\"" -#: main.c:456 +#: main.c:455 msgid "`--posix' overrides `--traditional'" msgstr "\"--posix\" tilsidesætter \"--traditional\"" -#: main.c:467 +#: main.c:466 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "\"--posix\"/\"--traditional\" tilsidesætter \"--non-decimal-data\"" -#: main.c:471 +#: main.c:470 #, fuzzy, c-format msgid "running %s setuid root may be a security problem" msgstr "at køre %s setuid root kan være et sikkerhedsproblem" -#: main.c:512 +#: main.c:511 #, fuzzy, c-format msgid "can't set binary mode on stdin (%s)" msgstr "kan ikke sætte tilstand på standard ind (%s)" -#: main.c:515 +#: main.c:514 #, fuzzy, c-format msgid "can't set binary mode on stdout (%s)" msgstr "kan ikke sætte tilstand på standard ud (%s)" -#: main.c:517 +#: main.c:516 #, fuzzy, c-format msgid "can't set binary mode on stderr (%s)" msgstr "kan ikke sætte tilstand på standard fejl (%s)" -#: main.c:547 +#: main.c:546 msgid "no program text at all!" msgstr "ingen programtekst overhovedet!" -#: main.c:620 +#: main.c:623 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "Brug: %s [POSIX- eller GNU-stilflag] -f progfil [--] fil ...\n" -#: main.c:622 +#: main.c:625 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "Brug: %s [POSIX- eller GNU-stilflag] %cprogram%c fil ...\n" -#: main.c:627 +#: main.c:630 msgid "POSIX options:\t\tGNU long options:\n" msgstr "POSIX-flag:\t\tGNU lange flag:\n" -#: main.c:628 +#: main.c:631 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f progfil\t\t--file=progfil\n" -#: main.c:629 +#: main.c:632 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F fs\t\t\t--field-separator=fs\n" -#: main.c:630 +#: main.c:633 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v var=værdi\t\t--assign=var=værdi\n" -#: main.c:631 +#: main.c:634 msgid "\t-m[fr] val\n" msgstr "\t-m[fr] værdi\n" -#: main.c:632 +#: main.c:635 msgid "\t-W compat\t\t--compat\n" msgstr "\t-W compat\t\t--compat\n" -#: main.c:633 +#: main.c:636 msgid "\t-W copyleft\t\t--copyleft\n" msgstr "\t-W copyleft\t\t--copyleft\n" -#: main.c:634 +#: main.c:637 msgid "\t-W copyright\t\t--copyright\n" msgstr "\t-W copyright\t\t--copyright\n" -#: main.c:635 +#: main.c:638 msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" msgstr "\t-W dump-variables[=fil]\t--dump-variables[=fil]\n" -#: main.c:636 +#: main.c:639 msgid "\t-W gen-po\t\t--gen-po\n" msgstr "\t-W gen-po\t\t--gen-po\n" -#: main.c:637 +#: main.c:640 msgid "\t-W help\t\t\t--help\n" msgstr "\t-W help\t\t\t--help\n" -#: main.c:638 +#: main.c:641 msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -#: main.c:639 +#: main.c:642 msgid "\t-W lint-old\t\t--lint-old\n" msgstr "\t-W lint-old\t\t--lint-old\n" -#: main.c:640 +#: main.c:643 msgid "\t-W non-decimal-data\t--non-decimal-data\n" msgstr "\t-W non-decimal-data\t--non-decimal-data\n" -#: main.c:642 +#: main.c:645 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" -#: main.c:645 +#: main.c:648 msgid "\t-W parsedebug\t\t--parsedebug\n" msgstr "\t-W parsedebug\t\t--parsedebug\n" -#: main.c:647 +#: main.c:650 msgid "\t-W profile[=file]\t--profile[=file]\n" msgstr "\t-W profile[=fil]\t--profile[=fil]\n" -#: main.c:648 +#: main.c:651 msgid "\t-W posix\t\t--posix\n" msgstr "\t-W posix\t\t--posix\n" -#: main.c:649 +#: main.c:652 msgid "\t-W re-interval\t\t--re-interval\n" msgstr "\t-W re-interval\t\t--re-interval\n" -#: main.c:650 +#: main.c:653 msgid "\t-W source=program-text\t--source=program-text\n" msgstr "\t-W source=programtekst\t--source=programtekst\n" -#: main.c:651 +#: main.c:654 msgid "\t-W traditional\t\t--traditional\n" msgstr "\t-W traditional\t\t--traditional\n" -#: main.c:652 +#: main.c:655 msgid "\t-W usage\t\t--usage\n" msgstr "\t-W usage\t\t--usage\n" -#: main.c:653 +#: main.c:656 msgid "\t-W version\t\t--version\n" msgstr "\t-W version\t\t--version\n" -#: main.c:657 +#: main.c:660 #, fuzzy msgid "" "\n" @@ -1477,21 +1553,21 @@ "sektionen \"Reporting Problems and Bugs\" i den trykte version.\n" "Rapportér synpunkter på oversættelsen til .\n" -#: main.c:661 +#: main.c:664 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" "\n" msgstr "" -#: main.c:665 +#: main.c:668 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" msgstr "" -#: main.c:682 +#: main.c:685 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1510,7 +1586,7 @@ "enhver senere version.\n" "\n" -#: main.c:690 +#: main.c:693 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -1524,7 +1600,7 @@ "General Public License for yderligere information.\n" "\n" -#: main.c:696 +#: main.c:699 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, write to the Free Software\n" @@ -1534,51 +1610,52 @@ "med dette program. Hvis ikke, så skriv til Free Software Foundation,\n" "Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n" -#: main.c:730 +#: main.c:733 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft sætter ikke FS til tab i POSIX-awk" -#: main.c:956 +#: main.c:962 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" "\n" msgstr "" -#: main.c:976 +#: main.c:982 #, c-format msgid "`%s' is not a legal variable name" msgstr "" -#: main.c:979 +#: main.c:985 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "" -#: main.c:1012 +#: main.c:1018 msgid "floating point exception" msgstr "flydendetalsundtagelse" -#: main.c:1019 +#: main.c:1025 msgid "fatal error: internal error" msgstr "fatal fejl: intern fejl" -#: main.c:1069 +#: main.c:1075 #, c-format msgid "no pre-opened fd %d" msgstr "ingen for-åbnet fd %d" -#: main.c:1074 +#: main.c:1082 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "kunne ikke for-åbne /dev/null for fd %d" -#: main.c:1097 main.c:1106 +#: main.c:1105 main.c:1114 #, c-format msgid "could not find groups: %s" msgstr "kunne ikke finde grupper: %s" #: msg.c:54 +#, c-format msgid "cmd. line:" msgstr "kommandolinje:" @@ -1598,19 +1675,19 @@ msgid "can't convert string to float" msgstr "kan ikke konvertere en streng til flydende tal" -#: node.c:355 +#: node.c:357 msgid "backslash at end of string" msgstr "omvendt skråstreg i slutningen af strengen" -#: node.c:539 +#: node.c:541 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX tillader ikke \"\\x\"-kontrolsekvenser" -#: node.c:545 +#: node.c:547 msgid "no hex digits in `\\x' escape sequence" msgstr "ingen heksadecimale cifre i \"\\x\"-kontrolsekvenser" -#: node.c:579 +#: node.c:581 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "kontrolsekvensen \"\\%c\" behandlet som kun \"%c\"" @@ -1625,21 +1702,27 @@ msgid "could not open `%s' for writing: %s" msgstr "kunne ikke åbne \"%s\" for skrivning: %s" -#: profile.c:449 +#: profile.c:467 #, fuzzy, c-format msgid "internal error: %s with null vname" msgstr "intern fejl: Node_var med null vname" -#: profile.c:512 +#: profile.c:530 msgid "# treated internally as `delete'" msgstr "" -#: profile.c:1162 +#: profile.c:1167 +#, c-format +msgid "# this is a dynamically loaded extension function" +msgstr "" + +#: profile.c:1198 #, c-format msgid "\t# gawk profile, created %s\n" msgstr "\t# gawkprofil, oprettet %s\n" -#: profile.c:1165 +#: profile.c:1201 +#, c-format msgid "" "\t# BEGIN block(s)\n" "\n" @@ -1647,7 +1730,8 @@ "\t# BEGIN-blok\n" "\n" -#: profile.c:1175 +#: profile.c:1211 +#, c-format msgid "" "\t# Rule(s)\n" "\n" @@ -1655,7 +1739,8 @@ "\t# Regel/regler\n" "\n" -#: profile.c:1181 +#: profile.c:1217 +#, c-format msgid "" "\t# END block(s)\n" "\n" @@ -1663,7 +1748,8 @@ "\t# END-blok\n" "\n" -#: profile.c:1201 +#: profile.c:1237 +#, c-format msgid "" "\n" "\t# Functions, listed alphabetically\n" @@ -1671,89 +1757,88 @@ "\n" "\t# Funktioner, listede alfabetisk\n" -#: profile.c:1413 +#: profile.c:1452 #, c-format msgid "unexpected type %s in prec_level" msgstr "uventet type %s i prec_level" -#: re.c:193 -#, c-format -msgid "regex match failed, not enough memory to match string \"%.*s%s\"" -msgstr "" - -#: regcomp.c:136 +#: regcomp.c:150 msgid "Success" msgstr "Lykkedes" -#: regcomp.c:139 +#: regcomp.c:153 msgid "No match" msgstr "Mislykkedes" -#: regcomp.c:142 +#: regcomp.c:156 msgid "Invalid regular expression" msgstr "Ugyldigt regulært udtryk" -#: regcomp.c:145 +#: regcomp.c:159 msgid "Invalid collation character" msgstr "Ugyldigt kollationeringstegn" -#: regcomp.c:148 +#: regcomp.c:162 msgid "Invalid character class name" msgstr "Ugyldigt tegnklassenavn" -#: regcomp.c:151 +#: regcomp.c:165 msgid "Trailing backslash" msgstr "Efterfølgende omvendt skråstreg" -#: regcomp.c:154 +#: regcomp.c:168 msgid "Invalid back reference" msgstr "Ugyldig bagudreference" -#: regcomp.c:157 +#: regcomp.c:171 msgid "Unmatched [ or [^" msgstr "Ubalanceret [ eller [^" -#: regcomp.c:160 +#: regcomp.c:174 msgid "Unmatched ( or \\(" msgstr "Ubalanceret ( eller \\(" -#: regcomp.c:163 +#: regcomp.c:177 msgid "Unmatched \\{" msgstr "Ubalanceret \\{" -#: regcomp.c:166 +#: regcomp.c:180 msgid "Invalid content of \\{\\}" msgstr "Ugyldigt indhold i \\{\\}" -#: regcomp.c:169 +#: regcomp.c:183 msgid "Invalid range end" msgstr "Ugyldig intervalslutning" -#: regcomp.c:172 +#: regcomp.c:186 msgid "Memory exhausted" msgstr "Hukommelsen opbrugt" -#: regcomp.c:175 +#: regcomp.c:189 msgid "Invalid preceding regular expression" msgstr "Ugyldigt foregående regulært udtryk" -#: regcomp.c:178 +#: regcomp.c:192 msgid "Premature end of regular expression" msgstr "For tidligt slut på regulært udtryk" -#: regcomp.c:181 +#: regcomp.c:195 msgid "Regular expression too big" msgstr "Regulært udtryk for stort" -#: regcomp.c:184 +#: regcomp.c:198 msgid "Unmatched ) or \\)" msgstr "Ubalanceret ) eller \\)" -#: regcomp.c:621 +#: regcomp.c:668 msgid "No previous regular expression" msgstr "Intet foregående regulært udtryk" #, fuzzy +#~ msgid "or used as a variable or an array" +#~ msgstr "kan ikke bruge funktionsnavnet \"%s\" som variabel eller vektor" + +#, fuzzy #~ msgid "substr: length %g is < 0" #~ msgstr "substr: længden %g er <= 0" @@ -1791,9 +1876,6 @@ #~ msgid "or used in other expression context" #~ msgstr "eller brugt i andre udtrykssammenhænge" -#~ msgid "attempt to use function `%s' as array" -#~ msgstr "forsøg på at bruge funktionen \"%s\" som vektor" - #~ msgid "`%s' is a function, assignment is not allowed" #~ msgstr "\"%s\" er en funktion, tildeling er ikke tilladt" diff -urN gawk-3.1.3/po/de.po gawk-3.1.4/po/de.po --- gawk-3.1.3/po/de.po 2003-07-07 21:20:34.000000000 +0300 +++ gawk-3.1.4/po/de.po 2004-07-15 13:02:12.000000000 +0300 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: gawk 3.1.0\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2003-07-07 11:20-0700\n" +"POT-Creation-Date: 2004-07-15 13:02+0300\n" "PO-Revision-Date: 2002-04-03 18:55+02:00\n" "Last-Translator: Christian Kirsch \n" "Language-Team: German \n" @@ -15,56 +15,61 @@ "Content-Transfer-Encoding: 8bit\n" #: array.c:112 +#, fuzzy, c-format +msgid "attempt to use function `%s' as an array" +msgstr "Versuch, die Funktion '%s' als Array zu verwenden." + +#: array.c:115 #, c-format msgid "attempt to use scalar parameter `%s' as an array" msgstr "Versuch den skalaren Parameter '%s' als Array zu benutzen." -#: array.c:113 +#: array.c:118 #, c-format msgid "attempt to use scalar `%s' as array" msgstr "Versuch, Skalar '%s' als Array zu verwenden." -#: array.c:151 +#: array.c:156 #, fuzzy, c-format msgid "from %s" msgstr "%s (von %s)" -#: array.c:506 +#: array.c:511 #, c-format msgid "reference to uninitialized element `%s[\"%s\"]'" msgstr "Bezug auf nicht-initialisiertes Element »%s[\"%s\"]«" -#: array.c:512 +#: array.c:517 #, c-format msgid "subscript of array `%s' is null string" msgstr "Index in Array »%s« ist Nullstring." -#: array.c:609 +#: array.c:621 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: Index »%s« nicht in Feld »%s« vorhanden." -#: array.c:769 +#: array.c:791 #, c-format msgid "%s: empty (null)\n" msgstr "%s: leer (Null)\n" -#: array.c:774 +#: array.c:796 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: leer (0)\n" -#: array.c:778 +#: array.c:800 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: Table_size = %d, array_size = %d\n" -#: array.c:807 +#: array.c:829 #, fuzzy, c-format msgid "%s: is parameter\n" msgstr "%s: ist ein Parameter\n" -#: array.c:812 +#: array.c:834 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: Array-Referenz auf %s\n" @@ -91,488 +96,483 @@ "Konstanter Regulärer Ausdruck '/%s' sieht wie ein C-Kommentar aus, ist aber " "keiner." -#: awkgram.y:340 awkgram.y:615 +#: awkgram.y:341 awkgram.y:619 msgid "statement may have no effect" msgstr "Statement möglicherweise ohne Effekt." -#: awkgram.y:435 awkgram.y:455 +#: awkgram.y:436 awkgram.y:456 #, fuzzy, c-format msgid "`%s' used in %s action" msgstr "'next' in BEGIN- oder END-Aktion benutzt." -#: awkgram.y:448 awkgram.y:451 +#: awkgram.y:449 awkgram.y:452 msgid "`nextfile' is a gawk extension" msgstr "'nextfile' ist eine gawk-Erweiterung." -#: awkgram.y:465 +#: awkgram.y:466 msgid "`return' used outside function context" msgstr "'return' außerhalb einer Funktion benutzt." -#: awkgram.y:504 +#: awkgram.y:508 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "Einfaches 'print' in BEGIN- oder END-Regel soll vermutlich 'print \"\"' sein." -#: awkgram.y:517 awkgram.y:524 +#: awkgram.y:521 awkgram.y:528 msgid "`delete array' is a gawk extension" msgstr "'delete array' ist eine gawk-Erweiterung." -#: awkgram.y:532 awkgram.y:539 +#: awkgram.y:536 awkgram.y:543 #, fuzzy msgid "`delete(array)' is a non-portable tawk extension" msgstr "'delete array' ist eine gawk-Erweiterung." -#: awkgram.y:583 +#: awkgram.y:587 #, c-format msgid "duplicate case values in switch body: %s" msgstr "" -#: awkgram.y:593 +#: awkgram.y:597 msgid "Duplicate `default' detected in switch body" msgstr "" -#: awkgram.y:681 +#: awkgram.y:686 msgid "multistage two-way pipelines don't work" msgstr "'multistage' Zweiwege-Pipes funktionieren nicht." -#: awkgram.y:772 +#: awkgram.y:777 msgid "regular expression on right of assignment" msgstr "Regulärer Ausdruck auf der rechten Seite einer Zuweisung." -#: awkgram.y:782 +#: awkgram.y:800 msgid "regular expression on left of `~' or `!~' operator" msgstr "Regulärer Ausdruck links vom '~'- oder '!~'-Operator." -#: awkgram.y:790 +#: awkgram.y:808 msgid "regular expression on right of comparison" msgstr "Regulärer Ausdruck rechts von einem Vergleich." -#: awkgram.y:857 +#: awkgram.y:875 msgid "non-redirected `getline' undefined inside END action" msgstr "" "Nicht-umgelenktes 'getline' ist innerhalb der END-Aktion nicht definiert." -#: awkgram.y:884 +#: awkgram.y:902 msgid "call of `length' without parentheses is not portable" msgstr "Aufruf von 'length' ohne Klammern ist nicht portabel." -#: awkgram.y:887 +#: awkgram.y:905 msgid "call of `length' without parentheses is deprecated by POSIX" msgstr "Aufruf von 'length' ohne Klammern ist in POSIX-Mode veraltet." -#: awkgram.y:940 +#: awkgram.y:958 msgid "use of non-array as array" msgstr "" -#: awkgram.y:942 +#: awkgram.y:960 msgid "invalid subscript expression" msgstr "Ungültiger Index-Ausdruck." -#: awkgram.y:1140 +#: awkgram.y:1158 #, fuzzy msgid "unexpected newline or end of string" msgstr "Unerwartetes Zeilenende" -#: awkgram.y:1235 +#: awkgram.y:1254 msgid "empty program text on command line" msgstr "Kein Programmtext auf der Kommandozeile." -#: awkgram.y:1292 +#: awkgram.y:1307 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "Kann Quelldatei '%s' nicht zum Lesen öffnen (%s)." -#: awkgram.y:1327 +#: awkgram.y:1384 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "Kann Quelldatei '%s' nicht lesen (%s)." -#: awkgram.y:1335 +#: awkgram.y:1392 #, c-format msgid "source file `%s' is empty" msgstr "Quelldatei '%s' ist leer." -#: awkgram.y:1537 awkgram.y:1647 awkgram.y:1665 awkgram.y:2015 awkgram.y:2100 +#: awkgram.y:1590 awkgram.y:1700 awkgram.y:1718 awkgram.y:2068 awkgram.y:2153 msgid "source file does not end in newline" msgstr "Quelldatei hört nicht mit Zeilenende auf." -#: awkgram.y:1601 +#: awkgram.y:1654 msgid "unterminated regexp ends with `\\' at end of file" msgstr "" "Nicht-beendeter Regulärer Ausdruck (hört mit '\\' auf) am Ende der Datei." -#: awkgram.y:1621 +#: awkgram.y:1674 msgid "unterminated regexp" msgstr "Nicht-beendeter Regulärer Ausdruck" -#: awkgram.y:1624 +#: awkgram.y:1677 msgid "unterminated regexp at end of file" msgstr "Nicht-beendeter Regulärer Ausdruck am Dateiende." -#: awkgram.y:1691 +#: awkgram.y:1744 msgid "use of `\\ #...' line continuation is not portable" msgstr "" "Die Verwendung von '\\#...' zur Fortsetzung von Zeilen ist nicht portabel." -#: awkgram.y:1703 +#: awkgram.y:1756 msgid "backslash not last character on line" msgstr "Backslash ist nicht letztes Zeichen auf der Zeile." -#: awkgram.y:1748 +#: awkgram.y:1801 msgid "POSIX does not allow operator `**='" msgstr "POSIX erlaubt den Operator '**=' nicht." -#: awkgram.y:1750 +#: awkgram.y:1803 msgid "old awk does not support operator `**='" msgstr "Das alte awk erlaubt den Operator '**=' nicht." -#: awkgram.y:1759 +#: awkgram.y:1812 msgid "POSIX does not allow operator `**'" msgstr "POSIX erlaubt den Operator '**' nicht." -#: awkgram.y:1761 +#: awkgram.y:1814 msgid "old awk does not support operator `**'" msgstr "Das alte awk erlaubt den Operator '**' nicht." -#: awkgram.y:1792 +#: awkgram.y:1845 msgid "operator `^=' is not supported in old awk" msgstr "Das alte awk kennt den Operator '^=' nicht." -#: awkgram.y:1800 +#: awkgram.y:1853 msgid "operator `^' is not supported in old awk" msgstr "Das alte awk kennt den Operator '^' nicht." -#: awkgram.y:1884 awkgram.y:1901 +#: awkgram.y:1937 awkgram.y:1954 msgid "unterminated string" msgstr "Nicht-beendeter String" -#: awkgram.y:2061 +#: awkgram.y:2114 #, c-format msgid "invalid char '%c' in expression" msgstr "Ungültiges Zeichen '%c' in einem Ausdruck." -#: awkgram.y:2121 +#: awkgram.y:2162 #, c-format msgid "`%s' is a gawk extension" msgstr "'%s' ist eine gawk-Erweiterung" -#: awkgram.y:2124 +#: awkgram.y:2165 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "'%s' ist eine Erweiterung der Bell Labs." -#: awkgram.y:2127 +#: awkgram.y:2168 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX gestattet '%s' nicht." -#: awkgram.y:2131 +#: awkgram.y:2172 #, c-format msgid "`%s' is not supported in old awk" msgstr "Das alte awk gestattet '%s' nicht." -#: awkgram.y:2158 +#: awkgram.y:2198 msgid "`goto' considered harmful!\n" msgstr "'goto' gilt als schlechter Stil!\n" -#: awkgram.y:2220 +#: awkgram.y:2260 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "Unzulässige Argumentzahl %d für %s." -#: awkgram.y:2239 awkgram.y:2242 +#: awkgram.y:2279 awkgram.y:2282 msgid "match: third argument is a gawk extension" msgstr "match: Das dritte Argument ist eine gawk-Erweiterung." -#: awkgram.y:2255 +#: awkgram.y:2295 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "%s: Ein String als letztes Argument von substitute hat keinen Effekt." -#: awkgram.y:2258 +#: awkgram.y:2298 #, fuzzy, c-format msgid "%s third parameter is not a changeable object" msgstr "Der dritte Parameter von sub ist ein unveränderliches Objekt." -#: awkgram.y:2285 awkgram.y:2288 +#: awkgram.y:2325 awkgram.y:2328 msgid "close: second argument is a gawk extension" msgstr "close: Das zweite Argument ist eine gawk-Erweiterung." -#: awkgram.y:2298 +#: awkgram.y:2338 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "Fehlerhafte Verwendung von dcgettext(_\"...\"): \n" "Entfernen Sie den führenden Unterstrich." -#: awkgram.y:2313 +#: awkgram.y:2353 #, fuzzy msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "Fehlerhafte Verwendung von dcgettext(_\"...\"): \n" "Entfernen Sie den führenden Unterstrich." -#: awkgram.y:2384 +#: awkgram.y:2424 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "Funktion '%s': Parameter #%d, '%s' wiederholt Parameter #%d." -#: awkgram.y:2417 +#: awkgram.y:2457 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "Funktion '%s': Parameter '%s' verdeckt eine globale Variable." -#: awkgram.y:2529 +#: awkgram.y:2569 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "Kann '%s' nicht zum Schreiben öffnen (%s)." -#: awkgram.y:2530 profile.c:93 +#: awkgram.y:2570 profile.c:93 msgid "sending profile to standard error" msgstr "Schicke Profile auf Stadard-Fehlerausgabe." -#: awkgram.y:2562 +#: awkgram.y:2602 #, c-format msgid "%s: close failed (%s)" msgstr "%s: close gescheitert (%s)." -#: awkgram.y:2684 +#: awkgram.y:2723 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() zweimal aufgerufen!" -#: awkgram.y:2711 +#: awkgram.y:2750 msgid "there were shadowed variables." msgstr "" -#: awkgram.y:2784 +#: awkgram.y:2823 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "Funktion '%s': Kann Funktionsnamen nicht als Parameternamen benutzen." -#: awkgram.y:2794 +#: awkgram.y:2833 #, c-format msgid "function name `%s' previously defined" msgstr "Funktion '%s' ist bereits definiert." -#: awkgram.y:2945 awkgram.y:2951 +#: awkgram.y:2984 awkgram.y:2990 #, c-format msgid "function `%s' called but never defined" msgstr "Aufgerufene funktion '%s' ist nirgends definiert." -#: awkgram.y:2954 +#: awkgram.y:2993 #, c-format msgid "function `%s' defined but never called" msgstr "Funktion '%s' wird nirgends aufgerufen." -#: awkgram.y:2981 +#: awkgram.y:3020 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "" "Konstanter Regulärer Ausdruck für Parameter #%d ergibt einen logischen Wert." -#: awkgram.y:2994 -#, c-format +#: awkgram.y:3033 +#, fuzzy, c-format msgid "" "function `%s' called with space between name and `(',\n" -"%s" +"or used as a variable or an array" msgstr "" "Funktion '%s' mit Leerzeichen zwischen Name und '(' aufgerufen, \n" "%s" -#: awkgram.y:2996 -#, fuzzy -msgid "or used as a variable or an array" -msgstr "Kann Funktion '%s' nicht als Variable oder Array verwenden." - -#: builtin.c:137 +#: builtin.c:149 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s to \"%s\" fehlgeschlagen (%s)" -#: builtin.c:138 +#: builtin.c:150 msgid "standard output" msgstr "Standardausgabe" -#: builtin.c:139 +#: builtin.c:151 msgid "reason unknown" msgstr "Unbekannte Ursache" -#: builtin.c:152 +#: builtin.c:164 msgid "exp: received non-numeric argument" msgstr "exp: Argument ist keine Zahl." -#: builtin.c:158 +#: builtin.c:170 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: Argument %g außerhalb des gültigen Zahlenbereichs." -#: builtin.c:216 +#: builtin.c:228 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" "fflush: Leeren der Puffer nicht möglich, Pipe »%s« ist nur zum Lesen " "geöffnet." -#: builtin.c:219 +#: builtin.c:231 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "" "fflush: Leeren der Puffer nicht möglich, Datei »%s« ist nur zum Lesen " "geöffnet." -#: builtin.c:231 +#: builtin.c:243 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "fflush: »%s« ist keine geöffnete Datei, Pipe oder Prozess." -#: builtin.c:325 +#: builtin.c:338 msgid "index: received non-string first argument" msgstr "index: Erstes Argument ist kein String." -#: builtin.c:327 +#: builtin.c:340 msgid "index: received non-string second argument" msgstr "index: Zweites Argument ist kein string." -#: builtin.c:437 +#: builtin.c:454 msgid "int: received non-numeric argument" msgstr "Argument ist keine Zahl." -#: builtin.c:454 +#: builtin.c:471 msgid "length: received non-string argument" msgstr "length: Argument ist kein String." -#: builtin.c:470 +#: builtin.c:487 msgid "log: received non-numeric argument" msgstr "log: Argument ist keine Zahl." -#: builtin.c:473 +#: builtin.c:490 #, c-format msgid "log: received negative argument %g" msgstr "log: Negatives Argument %g." -#: builtin.c:635 builtin.c:638 +#: builtin.c:654 builtin.c:657 msgid "must use `count$' on all formats or none" msgstr "" -#: builtin.c:740 +#: builtin.c:759 msgid "`$' is not permitted in awk formats" msgstr "»$« ist in awk-Formaten nicht zulässig." -#: builtin.c:746 +#: builtin.c:765 msgid "arg count with `$' must be > 0" msgstr "Argumentnummer bei »$« muss > 0 sein." -#: builtin.c:748 +#: builtin.c:767 #, fuzzy, c-format msgid "arg count %ld greater than total number of supplied arguments" msgstr "Argumentnummer %d ist größer als Anzahl angegebener Argumente." -#: builtin.c:750 +#: builtin.c:769 msgid "`$' not permitted after period in format" msgstr "»$« nach Punkt in Formatangabe nicht zulässig." -#: builtin.c:763 +#: builtin.c:782 msgid "no `$' supplied for positional field width or precision" msgstr "»$« fehlt in positionsabhängiger Feldbreite oder Genauigkeit." # -#: builtin.c:821 +#: builtin.c:848 msgid "`l' is meaningless in awk formats; ignored" msgstr "»l« ist in awk-Formaten bedeutungslos, ignoriert." -#: builtin.c:825 +#: builtin.c:852 msgid "`l' is not permitted in POSIX awk formats" msgstr "»l« in POSIX-awk-Formaten nicht zulässig." -#: builtin.c:836 +#: builtin.c:863 msgid "`L' is meaningless in awk formats; ignored" msgstr "»L« ist in awk-Formaten bedeutungslos, ignoriert." -#: builtin.c:840 +#: builtin.c:867 msgid "`L' is not permitted in POSIX awk formats" msgstr "»L« in POSIX-awk-Formaten nicht zulässig." -#: builtin.c:851 +#: builtin.c:878 msgid "`h' is meaningless in awk formats; ignored" msgstr "»h« ist in awk-Formaten bedeutungslos, ignoriert." -#: builtin.c:855 +#: builtin.c:882 msgid "`h' is not permitted in POSIX awk formats" msgstr "»h« in POSIX-awk-Formaten nicht zulässig.<" -#: builtin.c:1055 +#: builtin.c:1111 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" msgstr "" -#: builtin.c:1108 +#: builtin.c:1171 msgid "not enough arguments to satisfy format string" msgstr "Nicht genügend Argumente für Formatangabe." -#: builtin.c:1110 +#: builtin.c:1173 msgid "^ ran out for this one" msgstr "^ ran out for this one" -#: builtin.c:1115 +#: builtin.c:1178 msgid "[s]printf: format specifier does not have control letter" msgstr "[s]printf: Format-Specifier hat keinen Controlcode." -#: builtin.c:1118 +#: builtin.c:1181 msgid "too many arguments supplied for format string" msgstr "Zu viele Argumente für Formatstring." -#: builtin.c:1184 builtin.c:1187 +#: builtin.c:1247 builtin.c:1250 msgid "printf: no arguments" msgstr "printf: Keine Argumente" -#: builtin.c:1211 +#: builtin.c:1274 msgid "sqrt: received non-numeric argument" msgstr "sqrt: Argument ist keine Zahl." -#: builtin.c:1215 +#: builtin.c:1278 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: Argument %g ist negativ." -#: builtin.c:1238 +#: builtin.c:1301 #, c-format msgid "substr: start index %g is invalid, using 1" msgstr "substr: Start-Index %g ist ungültig, 1 wird benutzt." -#: builtin.c:1243 +#: builtin.c:1306 #, c-format msgid "substr: non-integer start index %g will be truncated" msgstr "substr: Start-Wert %g wird abgeschnitten." -#: builtin.c:1262 +#: builtin.c:1325 #, fuzzy, c-format msgid "substr: length %g is not >= 1" msgstr "substr: Länge %g ist kleiner oder gleich 0." -#: builtin.c:1264 +#: builtin.c:1327 #, fuzzy, c-format msgid "substr: length %g is not >= 0" msgstr "substr: Länge %g ist kleiner oder gleich 0." -#: builtin.c:1271 +#: builtin.c:1334 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: Länge %g wird abgeschnitten." -#: builtin.c:1276 +#: builtin.c:1339 #, c-format msgid "substr: length %g too big for string indexing, truncating to %g" msgstr "" -#: builtin.c:1288 +#: builtin.c:1351 msgid "substr: source string is zero length" msgstr "substr: String ist leer." -#: builtin.c:1294 +#: builtin.c:1357 #, fuzzy, c-format msgid "substr: start index %g is past end of string" msgstr "substr: Start-Wert %d liegt hinter dem Ende des Strings." -#: builtin.c:1302 +#: builtin.c:1365 #, fuzzy, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" @@ -580,247 +580,272 @@ "substr: Länge %d am Start-Wert %d überschreitet Länge des ersten Arguments (%" "d)." -#: builtin.c:1337 +#: builtin.c:1400 #, fuzzy msgid "strftime: received non-string first argument" msgstr "strftime: Erstes Argument ist kein String." -#: builtin.c:1343 +#: builtin.c:1406 msgid "strftime: received empty format string" msgstr "strftime: Format-String ist leer." -#: builtin.c:1352 +#: builtin.c:1415 #, fuzzy msgid "strftime: received non-numeric second argument" msgstr "strftime. Zweites Argument ist keine Zahl." -#: builtin.c:1415 +#: builtin.c:1478 msgid "mktime: received non-string argument" msgstr "mktime: Argument ist kein String." -#: builtin.c:1460 +#: builtin.c:1523 #, fuzzy msgid "system: received non-string argument" msgstr "system: Argument ist kein String." -#: builtin.c:1581 eval.c:1883 +#: builtin.c:1644 eval.c:2019 #, fuzzy, c-format msgid "reference to uninitialized field `$%d'" msgstr "Referenz auf die nicht-initialisierte Variable '%s'." -#: builtin.c:1608 +#: builtin.c:1671 #, fuzzy msgid "tolower: received non-string argument" msgstr "tolower: Argument ist kein String." -#: builtin.c:1657 +#: builtin.c:1720 #, fuzzy msgid "toupper: received non-string argument" msgstr "toupper: Argument ist kein String." -#: builtin.c:1702 +#: builtin.c:1765 msgid "atan2: received non-numeric first argument" msgstr "atan2: Erstes Argument ist keine Zahl." -#: builtin.c:1704 +#: builtin.c:1767 msgid "atan2: received non-numeric second argument" msgstr "atan2: Zweites Argument ist keine Zahl." -#: builtin.c:1723 +#: builtin.c:1786 msgid "sin: received non-numeric argument" msgstr "sin: Argument istk eine Zahl." -#: builtin.c:1739 +#: builtin.c:1802 msgid "cos: received non-numeric argument" msgstr "cos: Argument ist keine Zahl." -#: builtin.c:1788 +#: builtin.c:1852 msgid "srand: received non-numeric argument" msgstr "srand: Argument ist keine Zahl." -#: builtin.c:1823 +#: builtin.c:1887 msgid "match: third argument is not an array" msgstr "match: Drittes Argument ist kein Array." -#: builtin.c:2307 +#: builtin.c:2414 msgid "gensub: third argument of 0 treated as 1" msgstr "gensub: Drittes Argument 0 als 1 interpretiert" -#: builtin.c:2416 builtin.c:2418 +#: builtin.c:2572 msgid "lshift: received non-numeric first argument" msgstr "lshift: Erstes Argument ist keine Zahl." -#: builtin.c:2420 +#: builtin.c:2574 +#, fuzzy +msgid "lshift: received non-numeric second argument" +msgstr "strftime. Zweites Argument ist keine Zahl." + +#: builtin.c:2580 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "" "lshift(%lf, %lf): Negative Werte werden merkwürdige Ergebnisse liefern." -#: builtin.c:2422 +#: builtin.c:2582 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): Dezimalteil wird abgeschnitten." -#: builtin.c:2424 +#: builtin.c:2584 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "" "lshift(%lf, %lf): Zu große Shift-Werte werden merkwürdige Ergebnisse liefern." -#: builtin.c:2453 builtin.c:2455 +#: builtin.c:2610 msgid "rshift: received non-numeric first argument" msgstr "rshift: Erstes Argument ist keine Zahl." -#: builtin.c:2457 +#: builtin.c:2612 +#, fuzzy +msgid "rshift: received non-numeric second argument" +msgstr "strftime. Zweites Argument ist keine Zahl." + +#: builtin.c:2618 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "" "rshift (%lf, %lf): Negative Werte werden merkwürdige Ergebnisse liefern." -#: builtin.c:2459 +#: builtin.c:2620 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): Dezimalteil wird abgeschnitten." -#: builtin.c:2461 +#: builtin.c:2622 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "" "rshift(%lf, %lf): Zu große Shift-Werte werden merkwürdige Ergebnisse liefern." -#: builtin.c:2490 builtin.c:2492 +#: builtin.c:2648 msgid "and: received non-numeric first argument" msgstr "and: Erstes Argument ist keine Zahl." -#: builtin.c:2494 +#: builtin.c:2650 +#, fuzzy +msgid "and: received non-numeric second argument" +msgstr "atan2: Zweites Argument ist keine Zahl." + +#: builtin.c:2656 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "and(%lf, %lf): Negative Werte werden merkwürdige Ergebnisse liefern." -#: builtin.c:2496 +#: builtin.c:2658 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): Dezimalteil wird abgeschnitten." -#: builtin.c:2525 builtin.c:2527 +#: builtin.c:2684 msgid "or: received non-numeric first argument" msgstr "or: Erstes Argument ist keine Zahl." -#: builtin.c:2529 +#: builtin.c:2686 +#, fuzzy +msgid "or: received non-numeric second argument" +msgstr "atan2: Zweites Argument ist keine Zahl." + +#: builtin.c:2692 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "or(%lf, %lf): Negative Werte werden merkwürdige Ergebnisse liefern." -#: builtin.c:2531 +#: builtin.c:2694 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): Dezimalteil wird abgeschnitten." -#: builtin.c:2560 builtin.c:2562 +#: builtin.c:2720 msgid "xor: received non-numeric first argument" msgstr "xor: Erstes Argument ist keine Zahl." -#: builtin.c:2564 +#: builtin.c:2722 +#, fuzzy +msgid "xor: received non-numeric second argument" +msgstr "atan2: Zweites Argument ist keine Zahl." + +#: builtin.c:2728 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "xor(%lf, %lf: Negative Werte werden merkwürdige Ergebnisse liefern." -#: builtin.c:2566 +#: builtin.c:2730 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): Dezimalteil wird abgeschnitten." -#: builtin.c:2594 +#: builtin.c:2754 msgid "compl: received non-numeric argument" msgstr "compl: Erstes Argument ist keine Zahl." -#: builtin.c:2596 +#: builtin.c:2760 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): Negativer Wert wird merkwürdige Ergebnisse liefern." -#: builtin.c:2598 +#: builtin.c:2762 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): Dezimalteil wird abgeschnitten." -#: builtin.c:2771 +#: builtin.c:2935 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: '%s' ist keine gültige Locale-Kategorie." -#: eval.c:266 +#: eval.c:303 #, c-format msgid "unknown nodetype %d" msgstr "Unbekannter Knotentyp %d" -#: eval.c:312 +#: eval.c:350 msgid "buffer overflow in genflags2str" msgstr "Pufferüberlauf in genflags2str." -#: eval.c:647 +#: eval.c:382 eval.c:388 profile.c:837 +#, c-format +msgid "attempt to use array `%s' in a scalar context" +msgstr "Versuch, das Array '%s' in Skalarkontext zu verwenden." + +#: eval.c:730 #, fuzzy, c-format msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" "for-Schleife: Array '%s' ändert Größse von %d zu %d innerhalb der Schleife." -#: eval.c:668 +#: eval.c:751 msgid "`break' outside a loop is not portable" msgstr "'break' außerhalb einer Schleife ist nicht portabel." -#: eval.c:672 +#: eval.c:755 msgid "`break' outside a loop is not allowed" msgstr "'break' außerhalb einer Schleife ist nicht zulässig." -#: eval.c:689 +#: eval.c:772 msgid "`continue' outside a loop is not portable" msgstr "'continue' außerhalb einer Schleife ist nicht portabel." -#: eval.c:693 +#: eval.c:776 msgid "`continue' outside a loop is not allowed" msgstr "'continue' außerhalb einer Schleife ist nicht zulässig." -#: eval.c:727 +#: eval.c:810 msgid "`next' cannot be called from a BEGIN rule" msgstr "'next' kann nicht in einer BEGIN-Regel benutzt werden." -#: eval.c:729 +#: eval.c:812 msgid "`next' cannot be called from an END rule" msgstr "'next' kann nicht in einer END-Regel benutzt werden." -#: eval.c:738 +#: eval.c:821 msgid "`nextfile' cannot be called from a BEGIN rule" msgstr "'nextfile' kann nicht in einer BEGIN-Regel benutzt werden." -#: eval.c:740 +#: eval.c:823 msgid "`nextfile' cannot be called from an END rule" msgstr "'nextfile' kann nicht in einer END-Regel benutzt werden." -#: eval.c:785 +#: eval.c:872 msgid "statement has no effect" msgstr "Anweisung hat keinen Effekt." -#: eval.c:828 eval.c:1726 +#: eval.c:915 eval.c:1873 #, c-format msgid "can't use function name `%s' as variable or array" msgstr "Kann Funktion '%s' nicht als Variable oder Array verwenden." -#: eval.c:835 eval.c:841 +#: eval.c:922 eval.c:928 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "Referenz auf nicht-initialisiertes Argument '%s'." -#: eval.c:848 eval.c:907 eval.c:1732 eval.c:1742 profile.c:807 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "Versuch, das Array '%s' in Skalarkontext zu verwenden." - -#: eval.c:858 eval.c:1752 +#: eval.c:937 eval.c:1882 #, c-format msgid "reference to uninitialized variable `%s'" msgstr "Referenz auf die nicht-initialisierte Variable '%s'." -#: eval.c:1007 +#: eval.c:1083 msgid "" "concatenation: side effects in one expression have changed the length of " "another!" @@ -828,49 +853,50 @@ "Konkatenierung: Seiteneffekte in einem Ausdruck haben die Länge des anderen\n" "geändert!" -#: eval.c:1032 +#: eval.c:1162 msgid "assignment used in conditional context" msgstr "Zuweisung in einer Bedingung." -#: eval.c:1122 +#: eval.c:1252 msgid "division by zero attempted" msgstr "Division durch Null versucht." -#: eval.c:1137 +#: eval.c:1267 #, c-format msgid "division by zero attempted in `%%'" msgstr "Division durch Null versucht in '%%'." -#: eval.c:1152 profile.c:683 +#: eval.c:1282 profile.c:713 #, c-format msgid "illegal type (%s) in tree_eval" msgstr "Illegaler Typ (%s) in tree_eval" -#: eval.c:1328 +#: eval.c:1459 msgid "division by zero attempted in `/='" msgstr "Division durch Null versucht in '/='." -#: eval.c:1346 +#: eval.c:1477 #, c-format msgid "division by zero attempted in `%%='" msgstr "Division durch Null versucht in '%%='." -#: eval.c:1586 +#: eval.c:1738 #, c-format msgid "function `%s' called with more arguments than declared" msgstr "Funktion '%s' mit zu vielen Argumenten aufgerufen." -#: eval.c:1633 +#: eval.c:1782 #, c-format msgid "function `%s' not defined" msgstr "Funktion '%s' ist nicht definiert." -#: eval.c:1639 +#: eval.c:1788 #, c-format msgid "function %s called\n" msgstr "Funktion %s aufgerufen\n" -#: eval.c:1698 +#: eval.c:1845 +#, c-format msgid "" "\n" "\t# Function Call Stack:\n" @@ -880,42 +906,43 @@ "\t# Funktion Aufruf-Stack\n" "\n" -#: eval.c:1701 +#: eval.c:1848 +#, c-format msgid "\t# -- main --\n" msgstr "\t# -- main --\n" -#: eval.c:1867 +#: eval.c:2003 msgid "attempt to field reference from non-numeric value" msgstr "Nicht-numerischer Wert für Feldreferenz verwendet." -#: eval.c:1869 +#: eval.c:2005 msgid "attempt to reference from null string" msgstr "Referenz von einem Null-String" -#: eval.c:1875 +#: eval.c:2011 #, c-format msgid "attempt to access field %d" msgstr "Versuch des Zugriffs auf Feld %d." -#: eval.c:1896 eval.c:1903 profile.c:900 +#: eval.c:2032 eval.c:2039 profile.c:934 msgid "assignment is not allowed to result of builtin function" msgstr "" "Zuweisungen an das Ergebnis einer eingebauten Funktion sind nicht erlaubt." -#: eval.c:1951 +#: eval.c:2103 msgid "`IGNORECASE' is a gawk extension" msgstr "'IGNORECASE' ist eine gawk-Erweiterung" -#: eval.c:1980 +#: eval.c:2133 msgid "`BINMODE' is a gawk extension" msgstr "'BINMODE' ist eine gawk-Erweiterung." -#: eval.c:2092 +#: eval.c:2255 #, c-format msgid "bad `%sFMT' specification `%s'" msgstr "Falsche '%sFMT'-Angabe '%s'" -#: eval.c:2170 +#: eval.c:2333 msgid "turning off `--lint' due to assignment to `LINT'" msgstr "'--lint' wird abgeschaltet, da 'LINT' gesetzt ist." @@ -933,7 +960,56 @@ msgid "extension: library `%s': cannot call function `%s' (%s)\n" msgstr "extension: Bibliothek '%s': kann Funktion '%s' nicht aufrufen (%s)\n" -#: ext.c:183 +#: ext.c:102 +msgid "extension: missing function name" +msgstr "" + +#: ext.c:107 +#, fuzzy, c-format +msgid "extension: illegal character `%c' in function name `%s'" +msgstr "extension: Bibliothek '%s': kann Funktion '%s' nicht aufrufen (%s)\n" + +#: ext.c:113 +#, fuzzy, c-format +msgid "extension: can't redefine function `%s'" +msgstr "extension: Kann '%s' nicht öffnen (%s)\n" + +#: ext.c:117 +#, fuzzy, c-format +msgid "extension: function `%s' already defined" +msgstr "Funktion '%s' ist nicht definiert." + +#: ext.c:122 +#, c-format +msgid "extension: can't use gawk built-in `%s' as function name" +msgstr "" + +#: ext.c:124 +#, fuzzy, c-format +msgid "extension: function name `%s' previously defined" +msgstr "Funktion '%s' ist bereits definiert." + +#: ext.c:201 +#, c-format +msgid "function `%s' defined to take no more than `%d' argument(s)" +msgstr "" + +#: ext.c:204 +#, fuzzy, c-format +msgid "function `%s': missing argument #%d" +msgstr "Funktion '%s' ist nicht definiert." + +#: ext.c:214 +#, fuzzy, c-format +msgid "function `%s': argument #%d: attempt to use scalar as an array" +msgstr "Versuch, Skalar '%s' als Array zu verwenden." + +#: ext.c:218 +#, c-format +msgid "function `%s': argument #%d: attempt to use array as a scalar" +msgstr "" + +#: ext.c:243 msgid "Operation Not Supported" msgstr "Operation nicht möglich." @@ -962,524 +1038,524 @@ msgid "null string for `FS' is a gawk extension" msgstr "Null-String für 'FS' ist eine gawk-Erweiterung." -#: getopt.c:692 getopt.c:704 +#: getopt.c:692 getopt.c:711 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s: Option '%s' ist mehrdeutig.\n" -#: getopt.c:737 getopt.c:741 +#: getopt.c:744 getopt.c:748 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "%s: Option '--%s' erlaubt kein Argument.\n" -#: getopt.c:750 getopt.c:755 +#: getopt.c:757 getopt.c:762 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "%s: Option '%c%s\" erlaubt kein Argument.\n" -#: getopt.c:791 getopt.c:804 getopt.c:1093 getopt.c:1106 +#: getopt.c:807 getopt.c:829 getopt.c:1159 getopt.c:1181 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "%s: Option '%s' erfordert ein Argument.\n" -#: getopt.c:842 getopt.c:845 +#: getopt.c:867 getopt.c:870 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s: Unbekannte Option '--%s'.\n" -#: getopt.c:853 getopt.c:856 +#: getopt.c:878 getopt.c:881 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s: Unbekannte Option '%c%s'.\n" -#: getopt.c:903 getopt.c:906 +#: getopt.c:936 getopt.c:939 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: Illegale Option -- %c.\n" -#: getopt.c:912 getopt.c:915 +#: getopt.c:945 getopt.c:948 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s: Ungültige Option -- %c.\n" -#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:434 +#: getopt.c:1003 getopt.c:1022 getopt.c:1234 getopt.c:1255 main.c:433 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s Option erfordert ein Argument -- %c.\n" -#: getopt.c:1025 getopt.c:1036 +#: getopt.c:1074 getopt.c:1093 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s: Option '-W %s' ist mehrdeutig.\n" -#: getopt.c:1060 getopt.c:1072 +#: getopt.c:1117 getopt.c:1138 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s. Option '-W %s' erlaubt kein Argument.\n" -#: io.c:305 +#: io.c:308 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "Kann Datei '%s' nicht zum Lesen öffnen (%s)." -#: io.c:392 +#: io.c:395 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "Schließen von Dateideskriptor %d ('%s') gescheitert (%s)." -#: io.c:530 +#: io.c:533 #, c-format msgid "invalid tree type %s in redirect()" msgstr "Ungültiger Tree-Typ %s in redirect()." -#: io.c:536 +#: io.c:539 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "Ausdruck in '%s' Umlenkung hat nur einen numerischen Wert." -#: io.c:542 +#: io.c:545 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "Ausdruck für '%s' Umlenkung ist ein leerer String." -#: io.c:547 +#: io.c:550 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "Dateiname '%s' für '%s' Umlenkung kann Ergebnis eines logischen Ausdrucks " "sein." -#: io.c:569 +#: io.c:588 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "Unnötige Kombination von '>' und '>>' für Datei '%.*s'." -#: io.c:621 +#: io.c:640 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "Kann Pipe '%s' nicht für Ausgabe öffnen (%s)." -#: io.c:630 +#: io.c:649 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "Kann Pipe '%s' nicht für Eingabe öffnen (%s)." -#: io.c:643 +#: io.c:662 #, c-format msgid "can't open two way socket `%s' for input/output (%s)" msgstr "Kann bidirektionalen Socket '%s' nicht für Ein-/Ausgabe öffnen (%s)." -#: io.c:647 +#: io.c:666 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "Kann bidirektionale Pipe '%s' nicht für Ein-/Ausgabe öffnen (%s)." -#: io.c:723 +#: io.c:742 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "Kann nicht von '%s' umlenken (%s)." -#: io.c:726 +#: io.c:745 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "Kann nicht auf '%s' umlenken (%s)." -#: io.c:765 +#: io.c:784 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "Systemgrenze offener Dateien erreicht; beginne mit Multiplexing von " "Dateideskriptoren." -#: io.c:777 +#: io.c:800 #, c-format msgid "close of `%s' failed (%s)." msgstr "Schließen von '%s' gescheitert (%s)." -#: io.c:784 +#: io.c:808 msgid "too many pipes or input files open" msgstr "Zu viele Pipes oder Eingabedateien offen." -#: io.c:807 +#: io.c:831 msgid "close: second argument must be `to' or `from'" msgstr "close: Zweites Argument muss 'to' oder 'from' sein." -#: io.c:821 +#: io.c:845 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "close: '%.*s' ist keine offene Datei, Pipe oder Ko-Prozess." -#: io.c:825 +#: io.c:849 msgid "close of redirection that was never opened" msgstr "'close' für eine Umlenkung, die nie geöffnet wurde." -#: io.c:862 +#: io.c:945 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: Umlenkung '%s' nicht mit '[&' geöffnet, zweites Argument wird " "ignoriert." -#: io.c:924 +#: io.c:960 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "Fehlerstatus (%d) beim Schließen der Pipe '%s' (%s)." -#: io.c:927 +#: io.c:963 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "Fehlerstatus (%d) beim Schließen de rDatei '%s' (%s)." -#: io.c:946 +#: io.c:983 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "Das explizite des Sockets '%s' fehlt." -#: io.c:949 +#: io.c:986 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "Das explizite Schließen des Ko-Prozesses '%s' fehlt." -#: io.c:952 +#: io.c:989 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "Das explizite Schließen der Pipe '%s' fehlt." -#: io.c:955 +#: io.c:992 #, c-format msgid "no explicit close of file `%s' provided" msgstr "Das explizite Schließen der Datei '%s' fehlt." -#: io.c:984 io.c:1038 +#: io.c:1021 io.c:1075 #, c-format msgid "error writing standard output (%s)" msgstr "Fehler beim Schreiben auf stdout (%s)." -#: io.c:988 io.c:1042 +#: io.c:1025 io.c:1079 #, c-format msgid "error writing standard error (%s)" msgstr "Fehler beim Schreiben auf stderr (%s)." -#: io.c:996 +#: io.c:1033 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "Leeren der Pipe '%s' gescheitert (%s)." -#: io.c:999 +#: io.c:1036 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "Ko-Prozess: Leeren der Pipe zu '%s' gescheitert (%s)." -#: io.c:1002 +#: io.c:1039 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "Flush der Datei '%s' gescheitert (%s)." -#: io.c:1161 +#: io.c:1198 msgid "/inet/raw client not ready yet, sorry" msgstr "/inet/raw Client noch nicht fertig." -#: io.c:1163 io.c:1200 +#: io.c:1200 io.c:1237 msgid "only root may use `/inet/raw'." msgstr "Nur root darf '/inet/raw' benutzen" -#: io.c:1198 +#: io.c:1235 msgid "/inet/raw server not ready yet, sorry" msgstr "'/inet/raw'-Server noch nicht fertig." -#: io.c:1288 +#: io.c:1325 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "Kein bekanntes Protokoll in Dateinamen '%s' angegeben." -#: io.c:1306 +#: io.c:1343 #, c-format msgid "special file name `%s' is incomplete" msgstr "Dateiname '%s' ist unvollständig." -#: io.c:1318 +#: io.c:1355 #, c-format msgid "local port invalid in `%s'" msgstr "Lokaler Port in '%s' ist ungültig." -#: io.c:1330 +#: io.c:1367 msgid "must supply a remote hostname to `/inet'" msgstr "Sie müssen einen Rechnernamen in '/inet' angeben." -#: io.c:1345 +#: io.c:1382 msgid "must supply a remote port to `/inet'" msgstr "Sie müssen einen Port in '/inet' angeben." -#: io.c:1351 +#: io.c:1388 #, c-format msgid "remote port invalid in `%s'" msgstr "Port-Angabe in '%s' ist ungültig." -#: io.c:1361 +#: io.c:1398 msgid "TCP/IP communications are not supported" msgstr "TCP/IP-Verbindungen sind nicht möglich." -#: io.c:1370 io.c:1551 +#: io.c:1407 io.c:1588 #, c-format msgid "file `%s' is a directory" msgstr "Datei '%s' ist ein Verzeichnis." -#: io.c:1440 +#: io.c:1477 #, c-format msgid "use `PROCINFO[\"%s\"]' instead of `%s'" msgstr "Benutzen Sie 'PROCINFO[\"%s\"]' statt '%s'" -#: io.c:1472 +#: io.c:1509 msgid "use `PROCINFO[...]' instead of `/dev/user'" msgstr "Benutzen Sie 'PROCINFO[...] statt '/dev/user'." -#: io.c:1537 io.c:1711 +#: io.c:1574 io.c:1748 #, c-format msgid "could not open `%s', mode `%s'" msgstr "Konnte '%s' nicht öffnen, Mode '%s'." -#: io.c:1762 +#: io.c:1799 #, fuzzy, c-format msgid "close of master pty failed (%s)" msgstr "Schließen der Pipe gescheitert (%s)." -#: io.c:1764 io.c:1916 io.c:2068 +#: io.c:1801 io.c:1953 io.c:2105 #, c-format msgid "close of stdout in child failed (%s)" msgstr "Schließen von stdout in Kindprozess gescheitert (%s)." -#: io.c:1767 +#: io.c:1804 #, fuzzy, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "Verschieben der Pipe zu stdout in Kindprozess gescheitert (dup: %s)." -#: io.c:1769 io.c:1921 +#: io.c:1806 io.c:1958 #, c-format msgid "close of stdin in child failed (%s)" msgstr "Schließen von stdin im Kindprozess gescheitert (%s)." -#: io.c:1772 +#: io.c:1809 #, fuzzy, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "Verschieben der Pipe zu stdin in Kindprozess gescheitert (dup: %s)." -#: io.c:1774 io.c:1793 +#: io.c:1811 io.c:1830 #, fuzzy, c-format msgid "close of slave pty failed (%s)" msgstr "Schließen der Pipe gescheitert (%s)." -#: io.c:1867 io.c:1919 io.c:2049 io.c:2071 +#: io.c:1904 io.c:1956 io.c:2086 io.c:2108 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "Verschieben der Pipe zu stdout in Kindprozess gescheitert (dup: %s)." -#: io.c:1871 io.c:1924 +#: io.c:1908 io.c:1961 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "Verschieben der Pipe zu stdin in Kindprozess gescheitert (dup: %s)." -#: io.c:1888 io.c:2062 +#: io.c:1925 io.c:2099 msgid "restoring stdout in parent process failed\n" msgstr "" -#: io.c:1893 +#: io.c:1930 msgid "restoring stdin in parent process failed\n" msgstr "" -#: io.c:1927 io.c:2073 io.c:2084 +#: io.c:1964 io.c:2110 io.c:2121 #, c-format msgid "close of pipe failed (%s)" msgstr "Schließen der Pipe gescheitert (%s)." -#: io.c:1972 +#: io.c:2009 msgid "`|&' not supported" msgstr "'|&' nicht möglich." -#: io.c:2039 +#: io.c:2076 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "Kann Pipe '%s' nicht öffnen (%s)." -#: io.c:2080 +#: io.c:2117 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "Kann Kindprozess für '%s' nicht erzeugen (fork: %s)." -#: io.c:2423 +#: io.c:2460 #, c-format msgid "data file `%s' is empty" msgstr "Datei '%s' ist leer." -#: io.c:2466 io.c:2474 +#: io.c:2503 io.c:2511 msgid "could not allocate more input memory" msgstr "" -#: io.c:2832 io.c:2895 +#: io.c:2869 io.c:2932 #, c-format msgid "error reading input file `%s': %s" msgstr "Fehler beim Lesen der Eingabedatei '%s': %s." -#: io.c:3020 +#: io.c:3057 msgid "multicharacter value of `RS' is a gawk extension" msgstr "Multicharacter-Wert von 'RS' ist eine gawk-Erweiterung." -#: main.c:324 +#: main.c:323 msgid "`-m[fr]' option irrelevant in gawk" msgstr "Option '-m[fr]' ist in gawk bedeutungslos." -#: main.c:326 +#: main.c:325 msgid "-m option usage: `-m[fr] nnn'" msgstr "Anwendung der Option -m: '-m[fr] nnn'" -#: main.c:343 +#: main.c:342 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: Option '-W %s' unbekannt, ignoriert.\n" -#: main.c:380 +#: main.c:379 msgid "empty argument to `--source' ignored" msgstr "Leeres Argument für '--source' ignoriert." -#: main.c:451 +#: main.c:450 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" "Umgebungsvariable 'POSIXLY_CORRECT' ist gesetzt: '--posix' angeschaltet." -#: main.c:456 +#: main.c:455 msgid "`--posix' overrides `--traditional'" msgstr "'--posix' hat Vorrang vor '--traditional'" -#: main.c:467 +#: main.c:466 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "'--posix' /'--traditional' hat Vorrang vor '--non-decimal-data'." -#: main.c:471 +#: main.c:470 #, fuzzy, c-format msgid "running %s setuid root may be a security problem" msgstr "%s als setuid root auszuführen, kann zu Sicherheitsproblemen führen." -#: main.c:512 +#: main.c:511 #, fuzzy, c-format msgid "can't set binary mode on stdin (%s)" msgstr "Kann Mode für stdin nicht setzen (%s)." -#: main.c:515 +#: main.c:514 #, fuzzy, c-format msgid "can't set binary mode on stdout (%s)" msgstr "Kann Mode für stdout nicht setzen (%s)." -#: main.c:517 +#: main.c:516 #, fuzzy, c-format msgid "can't set binary mode on stderr (%s)" msgstr "Kann Mode für stderr nicht setzen (%s)." -#: main.c:547 +#: main.c:546 msgid "no program text at all!" msgstr "Kein Programmtext." -#: main.c:620 +#: main.c:623 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "Anwendung: %s [POSIX- oder GNU-Optionen] -f PROGRAM [--] Datei ...\n" -#: main.c:622 +#: main.c:625 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "Anwendung: %s [POSIX- oder GNU-Optionen] -- %cPROGRAM%c Datei ...\n" -#: main.c:627 +#: main.c:630 msgid "POSIX options:\t\tGNU long options:\n" msgstr "POSIX-Optionen\t\tGNU-Optionen (lang):\n" -#: main.c:628 +#: main.c:631 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f PROGRAM\t\t--file=PROGRAM\n" -#: main.c:629 +#: main.c:632 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F Feldtrenner\t\t\t--field-separator=Feldtrenner\n" -#: main.c:630 +#: main.c:633 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v var=Wert\t\t--assign=var=Wert\n" -#: main.c:631 +#: main.c:634 msgid "\t-m[fr] val\n" msgstr "\t-m[fr] Wert\n" -#: main.c:632 +#: main.c:635 msgid "\t-W compat\t\t--compat\n" msgstr "\t-W compat\t\t--compat\n" -#: main.c:633 +#: main.c:636 msgid "\t-W copyleft\t\t--copyleft\n" msgstr "\t-W copyleft\t\t--copyleft\n" -#: main.c:634 +#: main.c:637 msgid "\t-W copyright\t\t--copyright\n" msgstr "\t-W copyright\t\t--copyright\n" -#: main.c:635 +#: main.c:638 msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" msgstr "\t-W dump-variables[=Datei]\t--dump-variables[=Datei]\n" -#: main.c:636 +#: main.c:639 msgid "\t-W gen-po\t\t--gen-po\n" msgstr "\t-W gen-po\t\t--gen-po\n" -#: main.c:637 +#: main.c:640 msgid "\t-W help\t\t\t--help\n" msgstr "\t-W help\t\t\t--help\n" -#: main.c:638 +#: main.c:641 msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -#: main.c:639 +#: main.c:642 msgid "\t-W lint-old\t\t--lint-old\n" msgstr "\t-W lint-old\t\t--lint-old\n" -#: main.c:640 +#: main.c:643 msgid "\t-W non-decimal-data\t--non-decimal-data\n" msgstr "\t-W non-decimal-data\t--non-decimal-data\n" -#: main.c:642 +#: main.c:645 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" -#: main.c:645 +#: main.c:648 msgid "\t-W parsedebug\t\t--parsedebug\n" msgstr "\t-W parsedebug\t\t--parsedebug\n" -#: main.c:647 +#: main.c:650 msgid "\t-W profile[=file]\t--profile[=file]\n" msgstr "\t-W profile[=Datei]\t--profile[=Datei]\n" -#: main.c:648 +#: main.c:651 msgid "\t-W posix\t\t--posix\n" msgstr "\t-W posix\t\t--posix\n" -#: main.c:649 +#: main.c:652 msgid "\t-W re-interval\t\t--re-interval\n" msgstr "\t-W re-interval\t\t--re-interval\n" -#: main.c:650 +#: main.c:653 msgid "\t-W source=program-text\t--source=program-text\n" msgstr "\t-W source=Programmtext\t--source=Programmtext\n" -#: main.c:651 +#: main.c:654 msgid "\t-W traditional\t\t--traditional\n" msgstr "\t-W traditional\t\t--traditional\n" -#: main.c:652 +#: main.c:655 msgid "\t-W usage\t\t--usage\n" msgstr "\t-W usage\t\t--usage\n" -#: main.c:653 +#: main.c:656 msgid "\t-W version\t\t--version\n" msgstr "\t-W version\t\t--version\n" -#: main.c:657 +#: main.c:660 #, fuzzy msgid "" "\n" @@ -1490,21 +1566,21 @@ "den Sie im Kapitel 'Reporting Problems and Bugs' in der \n" "gedruckten Version finden.\n" -#: main.c:661 +#: main.c:664 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" "\n" msgstr "" -#: main.c:665 +#: main.c:668 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" msgstr "" -#: main.c:682 +#: main.c:685 #, fuzzy, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1524,7 +1600,7 @@ "spätere Version.\n" "\n" -#: main.c:690 +#: main.c:693 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -1538,7 +1614,7 @@ "GNU General Public License for more details.\n" "\n" -#: main.c:696 +#: main.c:699 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, write to the Free Software\n" @@ -1549,51 +1625,52 @@ "Software Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-" "1307, USA.\n" -#: main.c:730 +#: main.c:733 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft setzt FS im POSIX-awk nicht auf Tab." -#: main.c:956 +#: main.c:962 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" "\n" msgstr "" -#: main.c:976 +#: main.c:982 #, c-format msgid "`%s' is not a legal variable name" msgstr "" -#: main.c:979 +#: main.c:985 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "" -#: main.c:1012 +#: main.c:1018 msgid "floating point exception" msgstr "Floating point exception" -#: main.c:1019 +#: main.c:1025 msgid "fatal error: internal error" msgstr "Fataler Fehler: interner Fehler" -#: main.c:1069 +#: main.c:1075 #, c-format msgid "no pre-opened fd %d" msgstr "Kein geöffneter Dateideskriptor %d" -#: main.c:1074 +#: main.c:1082 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "Konnte /dev/null nicht für Dateideskriptor %d öffnen." -#: main.c:1097 main.c:1106 +#: main.c:1105 main.c:1114 #, c-format msgid "could not find groups: %s" msgstr "Konnte Gruppen nicht finden: %s" #: msg.c:54 +#, c-format msgid "cmd. line:" msgstr "Kommandozeile:" @@ -1613,19 +1690,19 @@ msgid "can't convert string to float" msgstr "Kann String nicht in Gleitkommazahl konvertieren." -#: node.c:355 +#: node.c:357 msgid "backslash at end of string" msgstr "Backslash am String-Ende." -#: node.c:539 +#: node.c:541 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX erlabut keine '\\x'-Escapes." -#: node.c:545 +#: node.c:547 msgid "no hex digits in `\\x' escape sequence" msgstr "Keine Hex-Ziffern in '\\x'-Escape." -#: node.c:579 +#: node.c:581 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "Escape-Sequenz '\\%c' als '%c' behandelt." @@ -1640,21 +1717,27 @@ msgid "could not open `%s' for writing: %s" msgstr "Konnte '%s' nicht zum Schreiben öffnen: %s" -#: profile.c:449 +#: profile.c:467 #, fuzzy, c-format msgid "internal error: %s with null vname" msgstr "Interner Fehler: Node_var with null vname." -#: profile.c:512 +#: profile.c:530 msgid "# treated internally as `delete'" msgstr "" -#: profile.c:1162 +#: profile.c:1167 +#, c-format +msgid "# this is a dynamically loaded extension function" +msgstr "" + +#: profile.c:1198 #, c-format msgid "\t# gawk profile, created %s\n" msgstr "\t# gawk-Profil, erzeugt %s\n" -#: profile.c:1165 +#: profile.c:1201 +#, c-format msgid "" "\t# BEGIN block(s)\n" "\n" @@ -1662,7 +1745,8 @@ "\t# BEGIN block(s)\n" "\n" -#: profile.c:1175 +#: profile.c:1211 +#, c-format msgid "" "\t# Rule(s)\n" "\n" @@ -1670,7 +1754,8 @@ "\t# Rule(s)\n" "\n" -#: profile.c:1181 +#: profile.c:1217 +#, c-format msgid "" "\t# END block(s)\n" "\n" @@ -1678,7 +1763,8 @@ "\t# END block(s)\n" "\n" -#: profile.c:1201 +#: profile.c:1237 +#, c-format msgid "" "\n" "\t# Functions, listed alphabetically\n" @@ -1686,89 +1772,88 @@ "\n" "\t# Functionen, alphabetisch sortiert\n" -#: profile.c:1413 +#: profile.c:1452 #, c-format msgid "unexpected type %s in prec_level" msgstr "Unerwarteter Typ %s in prec_level." -#: re.c:193 -#, c-format -msgid "regex match failed, not enough memory to match string \"%.*s%s\"" -msgstr "" - -#: regcomp.c:136 +#: regcomp.c:150 msgid "Success" msgstr "Erfolg" -#: regcomp.c:139 +#: regcomp.c:153 msgid "No match" msgstr "Kein Treffer" -#: regcomp.c:142 +#: regcomp.c:156 msgid "Invalid regular expression" msgstr "Ungültiger Regulärer Ausdruck." -#: regcomp.c:145 +#: regcomp.c:159 msgid "Invalid collation character" msgstr "Ungültiges Zeichen." -#: regcomp.c:148 +#: regcomp.c:162 msgid "Invalid character class name" msgstr "Ungültier Name für Zeichenklasse." -#: regcomp.c:151 +#: regcomp.c:165 msgid "Trailing backslash" msgstr "Angehängter Backslash" -#: regcomp.c:154 +#: regcomp.c:168 msgid "Invalid back reference" msgstr "Ungültige Referenze" -#: regcomp.c:157 +#: regcomp.c:171 msgid "Unmatched [ or [^" msgstr "[ oder [^ nicht geschlossen" -#: regcomp.c:160 +#: regcomp.c:174 msgid "Unmatched ( or \\(" msgstr "( oder \\( nicht geschlossen" -#: regcomp.c:163 +#: regcomp.c:177 msgid "Unmatched \\{" msgstr "\\{ nicht geschlossen" -#: regcomp.c:166 +#: regcomp.c:180 msgid "Invalid content of \\{\\}" msgstr "Ungültiger Inhalt von \\{\\}" -#: regcomp.c:169 +#: regcomp.c:183 msgid "Invalid range end" msgstr "Ungültiges Bereichsende" -#: regcomp.c:172 +#: regcomp.c:186 msgid "Memory exhausted" msgstr "Kein Speicher mehr." -#: regcomp.c:175 +#: regcomp.c:189 msgid "Invalid preceding regular expression" msgstr "Vorangehender Regulärer Ausdruck ist ungültig." -#: regcomp.c:178 +#: regcomp.c:192 msgid "Premature end of regular expression" msgstr "Vorzeitiges Ende des Regulären Ausdrucks." -#: regcomp.c:181 +#: regcomp.c:195 msgid "Regular expression too big" msgstr "Regulärer Ausdruck zu groß." -#: regcomp.c:184 +#: regcomp.c:198 msgid "Unmatched ) or \\)" msgstr ") oder \\) nicht geöffnet" -#: regcomp.c:621 +#: regcomp.c:668 msgid "No previous regular expression" msgstr "Kein vorangehender Regulärer Ausdruck." #, fuzzy +#~ msgid "or used as a variable or an array" +#~ msgstr "Kann Funktion '%s' nicht als Variable oder Array verwenden." + +#, fuzzy #~ msgid "substr: length %g is < 0" #~ msgstr "substr: Länge %g ist kleiner oder gleich 0." @@ -1806,9 +1891,6 @@ #~ msgid "or used in other expression context" #~ msgstr "or in anderem Kontext benutzt" -#~ msgid "attempt to use function `%s' as array" -#~ msgstr "Versuch, die Funktion '%s' als Array zu verwenden." - #~ msgid "`%s' is a function, assignment is not allowed" #~ msgstr "'%s' ist eine Funktion, Zuweisungen sind nicht erlaubt." diff -urN gawk-3.1.3/po/es.po gawk-3.1.4/po/es.po --- gawk-3.1.3/po/es.po 2003-07-07 21:20:32.000000000 +0300 +++ gawk-3.1.4/po/es.po 2004-07-28 16:55:28.000000000 +0300 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: gawk 3.1.2g\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2003-07-07 11:20-0700\n" +"POT-Creation-Date: 2004-07-15 13:02+0300\n" "PO-Revision-Date: 2003-06-29 14:53-0500\n" "Last-Translator: Cristian Othón Martínez Vera \n" "Language-Team: Spanish \n" @@ -15,56 +15,61 @@ "Content-Transfer-Encoding: 8bit\n" #: array.c:112 +#, fuzzy, c-format +msgid "attempt to use function `%s' as an array" +msgstr "se intentó usar la función `%s' como una matriz" + +#: array.c:115 #, c-format msgid "attempt to use scalar parameter `%s' as an array" msgstr "se intentó usar el parámetro escalar `%s como una matriz'" -#: array.c:113 +#: array.c:118 #, c-format msgid "attempt to use scalar `%s' as array" msgstr "se intentó usar el dato escalar `%s' como una matriz" -#: array.c:151 +#: array.c:156 #, c-format msgid "from %s" msgstr "desde %s" -#: array.c:506 +#: array.c:511 #, c-format msgid "reference to uninitialized element `%s[\"%s\"]'" msgstr "referencia al elemento sin valor inicial `%s[\"%s\"]'" -#: array.c:512 +#: array.c:517 #, c-format msgid "subscript of array `%s' is null string" msgstr "el subíndice de la matriz `%s' es la cadena nula" -#: array.c:609 +#: array.c:621 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: el índice `%s' no está en la matriz `%s'" -#: array.c:769 +#: array.c:791 #, c-format msgid "%s: empty (null)\n" msgstr "%s: vacío (nulo)\n" -#: array.c:774 +#: array.c:796 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: vacío (cero)\n" -#: array.c:778 +#: array.c:800 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: tamaño_tabla = %d, tamaño_matriz = %d\n" -#: array.c:807 +#: array.c:829 #, c-format msgid "%s: is parameter\n" msgstr "%s: es un parámetro\n" -#: array.c:812 +#: array.c:834 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: array_ref a %s\n" @@ -90,485 +95,481 @@ "la constante de expresión regular `/%s/' parece un comentario de C, pero no " "lo es" -#: awkgram.y:340 awkgram.y:615 +#: awkgram.y:341 awkgram.y:619 msgid "statement may have no effect" msgstr "la sentencia puede no tener efecto" -#: awkgram.y:435 awkgram.y:455 +#: awkgram.y:436 awkgram.y:456 #, c-format msgid "`%s' used in %s action" msgstr "se usó `%s' en la acción %s" -#: awkgram.y:448 awkgram.y:451 +#: awkgram.y:449 awkgram.y:452 msgid "`nextfile' is a gawk extension" msgstr "`nextfile' es una extensión de gawk" -#: awkgram.y:465 +#: awkgram.y:466 msgid "`return' used outside function context" msgstr "se usó `return' fuera del contexto de la función" -#: awkgram.y:504 +#: awkgram.y:508 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "el `print' simple en la regla BEGIN o END probablemente debe ser `print \"\"'" -#: awkgram.y:517 awkgram.y:524 +#: awkgram.y:521 awkgram.y:528 msgid "`delete array' is a gawk extension" msgstr "`delete array' es una extensión de gawk" -#: awkgram.y:532 awkgram.y:539 +#: awkgram.y:536 awkgram.y:543 msgid "`delete(array)' is a non-portable tawk extension" msgstr "`delete(array)' es una extensión de gawk que no es transportable" -#: awkgram.y:583 +#: awkgram.y:587 #, c-format msgid "duplicate case values in switch body: %s" msgstr "valores case duplicados en el cuerpo de un switch: %s" -#: awkgram.y:593 +#: awkgram.y:597 msgid "Duplicate `default' detected in switch body" msgstr "Se detectó un `default' duplicado en el cuerpo de un switch" -#: awkgram.y:681 +#: awkgram.y:686 msgid "multistage two-way pipelines don't work" msgstr "las líneas de trabajo de dos vías multiestado no funcionan" -#: awkgram.y:772 +#: awkgram.y:777 msgid "regular expression on right of assignment" msgstr "expresión regular del lado derecho de una asignación" -#: awkgram.y:782 +#: awkgram.y:800 msgid "regular expression on left of `~' or `!~' operator" msgstr "expresión regular a la izquierda del operador `~' o `!~'" -#: awkgram.y:790 +#: awkgram.y:808 msgid "regular expression on right of comparison" msgstr "expresión regular a la derecha de una comparación" -#: awkgram.y:857 +#: awkgram.y:875 msgid "non-redirected `getline' undefined inside END action" msgstr "`getline' no redirigido indefinido dentro de la acción de END" -#: awkgram.y:884 +#: awkgram.y:902 msgid "call of `length' without parentheses is not portable" msgstr "la llamada de `length' sin paréntesis no es transportable" -#: awkgram.y:887 +#: awkgram.y:905 msgid "call of `length' without parentheses is deprecated by POSIX" msgstr "la llamada de `length' sin paréntesis está obsoleta por POSIX" -#: awkgram.y:940 +#: awkgram.y:958 msgid "use of non-array as array" msgstr "uso de una matriz que no es matriz" -#: awkgram.y:942 +#: awkgram.y:960 msgid "invalid subscript expression" msgstr "expresión de subíndice inválida" -#: awkgram.y:1140 +#: awkgram.y:1158 msgid "unexpected newline or end of string" msgstr "nueva línea o fin de la cadena inesperados" -#: awkgram.y:1235 +#: awkgram.y:1254 msgid "empty program text on command line" msgstr "texto de programa vacío en la linea de comando" -#: awkgram.y:1292 +#: awkgram.y:1307 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "no se puede abrir el fichero fuente `%s' para lectura (%s)" -#: awkgram.y:1327 +#: awkgram.y:1384 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "no se puede leer el fichero fuente `%s' (%s)" -#: awkgram.y:1335 +#: awkgram.y:1392 #, c-format msgid "source file `%s' is empty" msgstr "el fichero fuente `%s' está vacío" -#: awkgram.y:1537 awkgram.y:1647 awkgram.y:1665 awkgram.y:2015 awkgram.y:2100 +#: awkgram.y:1590 awkgram.y:1700 awkgram.y:1718 awkgram.y:2068 awkgram.y:2153 msgid "source file does not end in newline" msgstr "el fichero fuente no termina con línea nueva" -#: awkgram.y:1601 +#: awkgram.y:1654 msgid "unterminated regexp ends with `\\' at end of file" msgstr "expresión regular sin terminar termina con `\\` al final del fichero" -#: awkgram.y:1621 +#: awkgram.y:1674 msgid "unterminated regexp" msgstr "expresión regular sin terminar" -#: awkgram.y:1624 +#: awkgram.y:1677 msgid "unterminated regexp at end of file" msgstr "expresión regular sin terminar al final del fichero" -#: awkgram.y:1691 +#: awkgram.y:1744 msgid "use of `\\ #...' line continuation is not portable" msgstr "el uso de la continuación de línea `\\ #...' no es transportable" -#: awkgram.y:1703 +#: awkgram.y:1756 msgid "backslash not last character on line" msgstr "la barra invertida no es el último caracter en la línea" -#: awkgram.y:1748 +#: awkgram.y:1801 msgid "POSIX does not allow operator `**='" msgstr "POSIX no permite el operador `**='" -#: awkgram.y:1750 +#: awkgram.y:1803 msgid "old awk does not support operator `**='" msgstr "el awk antiguo no da soporte al operador `**='" -#: awkgram.y:1759 +#: awkgram.y:1812 msgid "POSIX does not allow operator `**'" msgstr "POSIX no permite el operador `**'" -#: awkgram.y:1761 +#: awkgram.y:1814 msgid "old awk does not support operator `**'" msgstr "el awk antiguo no da soporte al operador `**='" -#: awkgram.y:1792 +#: awkgram.y:1845 msgid "operator `^=' is not supported in old awk" msgstr "el operador `^=' no tiene soporte en el awk antiguo" -#: awkgram.y:1800 +#: awkgram.y:1853 msgid "operator `^' is not supported in old awk" msgstr "el operador `^' no tiene soporte en el awk antiguo" -#: awkgram.y:1884 awkgram.y:1901 +#: awkgram.y:1937 awkgram.y:1954 msgid "unterminated string" msgstr "cadena sin terminar" -#: awkgram.y:2061 +#: awkgram.y:2114 #, c-format msgid "invalid char '%c' in expression" msgstr "caracter '%c' inválido en la expresión" -#: awkgram.y:2121 +#: awkgram.y:2162 #, c-format msgid "`%s' is a gawk extension" msgstr "`%s' es una extensión de gawk" -#: awkgram.y:2124 +#: awkgram.y:2165 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "`%s' es una extensión de Bell Labs" -#: awkgram.y:2127 +#: awkgram.y:2168 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX no permite `%s'" -#: awkgram.y:2131 +#: awkgram.y:2172 #, c-format msgid "`%s' is not supported in old awk" msgstr "`%s' no tiene soporte en el awk antiguo" -#: awkgram.y:2158 +#: awkgram.y:2198 msgid "`goto' considered harmful!\n" msgstr "¡`goto' se considera dañino!\n" -#: awkgram.y:2220 +#: awkgram.y:2260 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d es inválido como número de argumentos para %s" -#: awkgram.y:2239 awkgram.y:2242 +#: awkgram.y:2279 awkgram.y:2282 msgid "match: third argument is a gawk extension" msgstr "match: el tercer argumento es una extensión de gawk" -#: awkgram.y:2255 +#: awkgram.y:2295 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "" "%s: la literal de cadena como último argumento de substitute no tiene efecto" -#: awkgram.y:2258 +#: awkgram.y:2298 #, c-format msgid "%s third parameter is not a changeable object" msgstr "el tercer argumento de %s no es un objecto que se puede cambiar" -#: awkgram.y:2285 awkgram.y:2288 +#: awkgram.y:2325 awkgram.y:2328 msgid "close: second argument is a gawk extension" msgstr "close: el segundo argumento es una extensión de gawk" -#: awkgram.y:2298 +#: awkgram.y:2338 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "el uso de dcgettext(_\"...\") es incorrecto: quite el subrayado inicial" -#: awkgram.y:2313 +#: awkgram.y:2353 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "el uso de dcngettext(_\"...\") es incorrecto: quite el subrayado inicial" -#: awkgram.y:2384 +#: awkgram.y:2424 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "función `%s': parámetro #%d, `%s', duplica el parámetro #%d" -#: awkgram.y:2417 +#: awkgram.y:2457 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "función `%s': parámetro `%s' obscurece la variable global" -#: awkgram.y:2529 +#: awkgram.y:2569 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "no se puede abrir `%s' para escritura (%s)" -#: awkgram.y:2530 profile.c:93 +#: awkgram.y:2570 profile.c:93 msgid "sending profile to standard error" msgstr "enviando perfil a la salida estándar de error" -#: awkgram.y:2562 +#: awkgram.y:2602 #, c-format msgid "%s: close failed (%s)" msgstr "%s: falló close (%s)" -#: awkgram.y:2684 +#: awkgram.y:2723 msgid "shadow_funcs() called twice!" msgstr "¡shadow_funcs() llamada dos veces!" -#: awkgram.y:2711 +#: awkgram.y:2750 msgid "there were shadowed variables." msgstr "hay variables opacadas." -#: awkgram.y:2784 +#: awkgram.y:2823 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "" "función `%s': no se puede usar un nombre de función como nombre de parámetro" -#: awkgram.y:2794 +#: awkgram.y:2833 #, c-format msgid "function name `%s' previously defined" msgstr "el nombre de función `%s' se definió previamente" -#: awkgram.y:2945 awkgram.y:2951 +#: awkgram.y:2984 awkgram.y:2990 #, c-format msgid "function `%s' called but never defined" msgstr "se llamó a la función `%s' pero nunca se definió" -#: awkgram.y:2954 +#: awkgram.y:2993 #, c-format msgid "function `%s' defined but never called" msgstr "la función `%s' está definida pero nunca se llamó" -#: awkgram.y:2981 +#: awkgram.y:3020 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "" "la constante de expresión regular para el parámetro #%d da un valor booleano" -#: awkgram.y:2994 -#, c-format +#: awkgram.y:3033 +#, fuzzy, c-format msgid "" "function `%s' called with space between name and `(',\n" -"%s" +"or used as a variable or an array" msgstr "" "se llamó la función `%s' con espacio entre el nombre y el `(',\n" "%s" -#: awkgram.y:2996 -msgid "or used as a variable or an array" -msgstr "o se usó como una variable o una matriz" - -#: builtin.c:137 +#: builtin.c:149 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "falló %s a \"%s\" (%s)" -#: builtin.c:138 +#: builtin.c:150 msgid "standard output" msgstr "salida estándar" -#: builtin.c:139 +#: builtin.c:151 msgid "reason unknown" msgstr "razón desconocida" -#: builtin.c:152 +#: builtin.c:164 msgid "exp: received non-numeric argument" msgstr "exp: se recibió un argumento que no es un número" -#: builtin.c:158 +#: builtin.c:170 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: el argumento %g está fuera de rango" -#: builtin.c:216 +#: builtin.c:228 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" "fflush: no se puede limpiar: se abrió la tubería `%s' para lectura, no para " "escritura" -#: builtin.c:219 +#: builtin.c:231 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "" "fflush: no se puede limpiar: se abrió el fichero `%s' para lectura, no para " "escritura" -#: builtin.c:231 +#: builtin.c:243 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "fflush: `%s' no es un fichero abierto, tubería o co-proceso" -#: builtin.c:325 +#: builtin.c:338 msgid "index: received non-string first argument" msgstr "index: el primer argumento recibido no es una cadena" -#: builtin.c:327 +#: builtin.c:340 msgid "index: received non-string second argument" msgstr "index: el segundo argumento recibido no es una cadena" -#: builtin.c:437 +#: builtin.c:454 msgid "int: received non-numeric argument" msgstr "int: se recibió un argumento que no es un número" -#: builtin.c:454 +#: builtin.c:471 msgid "length: received non-string argument" msgstr "length: se recibió un argumento que no es una cadena" -#: builtin.c:470 +#: builtin.c:487 msgid "log: received non-numeric argument" msgstr "log: se recibió un argumento que no es un número" -#: builtin.c:473 +#: builtin.c:490 #, c-format msgid "log: received negative argument %g" msgstr "log: se recibió el argumento negativo %g" -#: builtin.c:635 builtin.c:638 +#: builtin.c:654 builtin.c:657 msgid "must use `count$' on all formats or none" msgstr "se debe utilizar `count$' en todos los formatos o en ninguno" -#: builtin.c:740 +#: builtin.c:759 msgid "`$' is not permitted in awk formats" msgstr "no se permite `$' en los formatos de awk" -#: builtin.c:746 +#: builtin.c:765 msgid "arg count with `$' must be > 0" msgstr "la cuenta de argumentos con `$' debe ser > 0" -#: builtin.c:748 +#: builtin.c:767 #, c-format msgid "arg count %ld greater than total number of supplied arguments" msgstr "" "la cuenta de argumentos %ld es mayor que el número total de argumentos " "proporcionados" -#: builtin.c:750 +#: builtin.c:769 msgid "`$' not permitted after period in format" msgstr "no se permite `$' después de un punto en el formato" -#: builtin.c:763 +#: builtin.c:782 msgid "no `$' supplied for positional field width or precision" msgstr "" "no se proporciona `$' para el ancho o la precisión del campo posicional" -#: builtin.c:821 +#: builtin.c:848 msgid "`l' is meaningless in awk formats; ignored" msgstr "`l' no tiene significado en los formatos de awk; ignorado" -#: builtin.c:825 +#: builtin.c:852 msgid "`l' is not permitted in POSIX awk formats" msgstr "no se permite `l' en los formatos POSIX de awk" -#: builtin.c:836 +#: builtin.c:863 msgid "`L' is meaningless in awk formats; ignored" msgstr "`L' no tiene significado en los formatos de awk; ignorado" -#: builtin.c:840 +#: builtin.c:867 msgid "`L' is not permitted in POSIX awk formats" msgstr "no se permite `L' en los formatos POSIX de awk" -#: builtin.c:851 +#: builtin.c:878 msgid "`h' is meaningless in awk formats; ignored" msgstr "`h' no tiene significado en los formatos de awk; ignorado" -#: builtin.c:855 +#: builtin.c:882 msgid "`h' is not permitted in POSIX awk formats" msgstr "no se permite `h' en los formatos POSIX de awk" -#: builtin.c:1055 +#: builtin.c:1111 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" msgstr "[s]printf: el valor %g está fuera del rango del formato `%%%c'" -#: builtin.c:1108 +#: builtin.c:1171 msgid "not enough arguments to satisfy format string" msgstr "no hay suficientes argumentos para satisfacer a la cadena de formato" -#: builtin.c:1110 +#: builtin.c:1173 msgid "^ ran out for this one" msgstr "se acabó ^ para éste" -#: builtin.c:1115 +#: builtin.c:1178 msgid "[s]printf: format specifier does not have control letter" msgstr "[s]printf: el especificador de formato no tiene letras de control" -#: builtin.c:1118 +#: builtin.c:1181 msgid "too many arguments supplied for format string" msgstr "se proporcionaron demasiados argumentos para la cadena de formato" -#: builtin.c:1184 builtin.c:1187 +#: builtin.c:1247 builtin.c:1250 msgid "printf: no arguments" msgstr "printf: sin argumentos" -#: builtin.c:1211 +#: builtin.c:1274 msgid "sqrt: received non-numeric argument" msgstr "sqrt: se recibió un argumento que no es un número" -#: builtin.c:1215 +#: builtin.c:1278 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: llamado con el argumento negativo %g" -#: builtin.c:1238 +#: builtin.c:1301 #, c-format msgid "substr: start index %g is invalid, using 1" msgstr "substr: el índice de inicio %g es inválido, usando 1" -#: builtin.c:1243 +#: builtin.c:1306 #, c-format msgid "substr: non-integer start index %g will be truncated" msgstr "substr: el índice de inicio no entero %g será truncado" -#: builtin.c:1262 +#: builtin.c:1325 #, fuzzy, c-format msgid "substr: length %g is not >= 1" msgstr "substr: la longitud %g es <= 0" -#: builtin.c:1264 +#: builtin.c:1327 #, fuzzy, c-format msgid "substr: length %g is not >= 0" msgstr "substr: la longitud %g es <= 0" -#: builtin.c:1271 +#: builtin.c:1334 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: la longitud no entera %g será truncada" -#: builtin.c:1276 +#: builtin.c:1339 #, c-format msgid "substr: length %g too big for string indexing, truncating to %g" msgstr "" "substr: la longitud %g es demasiado grande para ser índice de cadena, se " "trunca a %g" -#: builtin.c:1288 +#: builtin.c:1351 msgid "substr: source string is zero length" msgstr "substr: la cadena de origen es de longitud cero" -#: builtin.c:1294 +#: builtin.c:1357 #, c-format msgid "substr: start index %g is past end of string" msgstr "substr: el índice de inicio %g está después del fin de la cadena" -#: builtin.c:1302 +#: builtin.c:1365 #, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" @@ -576,243 +577,269 @@ "substr: la cadena %g en el índice de inicio %g excede la longitud del primer " "argumento (%lu)" -#: builtin.c:1337 +#: builtin.c:1400 msgid "strftime: received non-string first argument" msgstr "strftime: el primer argumento que se recibió no es una cadena" -#: builtin.c:1343 +#: builtin.c:1406 msgid "strftime: received empty format string" msgstr "strftime: se recibió una cadena de formato vacía" -#: builtin.c:1352 +#: builtin.c:1415 msgid "strftime: received non-numeric second argument" msgstr "strftime: el segundo argumento que se recibió no es un número" -#: builtin.c:1415 +#: builtin.c:1478 msgid "mktime: received non-string argument" msgstr "mktime: se recibió un argumento que no es una cadena" -#: builtin.c:1460 +#: builtin.c:1523 msgid "system: received non-string argument" msgstr "system: se recibió un argumento que no es una cadena" -#: builtin.c:1581 eval.c:1883 +#: builtin.c:1644 eval.c:2019 #, c-format msgid "reference to uninitialized field `$%d'" msgstr "referencia al campo sin inicializar `$%d'" -#: builtin.c:1608 +#: builtin.c:1671 msgid "tolower: received non-string argument" msgstr "tolower: se recibió un argumento que no es una cadena" -#: builtin.c:1657 +#: builtin.c:1720 msgid "toupper: received non-string argument" msgstr "toupper: se recibió un argumento que no es una cadena" -#: builtin.c:1702 +#: builtin.c:1765 msgid "atan2: received non-numeric first argument" msgstr "atan2: el primer argumento recibido no es un número" -#: builtin.c:1704 +#: builtin.c:1767 msgid "atan2: received non-numeric second argument" msgstr "atan2: el segundo argumento recibido no es un número" -#: builtin.c:1723 +#: builtin.c:1786 msgid "sin: received non-numeric argument" msgstr "sin: se recibió un argumento que no es un número" -#: builtin.c:1739 +#: builtin.c:1802 msgid "cos: received non-numeric argument" msgstr "cos: se recibió un argumento que no es un número" -#: builtin.c:1788 +#: builtin.c:1852 msgid "srand: received non-numeric argument" msgstr "srand: se recibió un argumento que no es un número" -#: builtin.c:1823 +#: builtin.c:1887 msgid "match: third argument is not an array" msgstr "match: el tercer argumento no es una matriz" -#: builtin.c:2307 +#: builtin.c:2414 +#, fuzzy msgid "gensub: third argument of 0 treated as 1" msgstr "gensub: el tercer argumento de 0 se trata como 1" -#: builtin.c:2416 builtin.c:2418 +#: builtin.c:2572 msgid "lshift: received non-numeric first argument" msgstr "lshift: el primer argumento recibido no es un número" -#: builtin.c:2420 +#: builtin.c:2574 +#, fuzzy +msgid "lshift: received non-numeric second argument" +msgstr "strftime: el segundo argumento que se recibió no es un número" + +#: builtin.c:2580 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "lshift(%lf, %lf): los valores negativos darán resultados extraños" -#: builtin.c:2422 +#: builtin.c:2582 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): los valores fraccionarios serán truncados" -#: builtin.c:2424 +#: builtin.c:2584 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "" "lshift(%lf, %lf): un valor de desplazamiento muy grande dará resultados " "extraños" -#: builtin.c:2453 builtin.c:2455 +#: builtin.c:2610 msgid "rshift: received non-numeric first argument" msgstr "rshift: el primer argumento recibido no es un número" -#: builtin.c:2457 +#: builtin.c:2612 +#, fuzzy +msgid "rshift: received non-numeric second argument" +msgstr "strftime: el segundo argumento que se recibió no es un número" + +#: builtin.c:2618 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "rshift(%lf, %lf): los valores negativos darán resultados extraños" -#: builtin.c:2459 +#: builtin.c:2620 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): los valores fraccionarios serán truncados" -#: builtin.c:2461 +#: builtin.c:2622 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "" "rshift(%lf, %lf): un valor de desplazamiento muy grande dará resultados " "extraños" -#: builtin.c:2490 builtin.c:2492 +#: builtin.c:2648 msgid "and: received non-numeric first argument" msgstr "and: el primer argumento recibido no es un número" -#: builtin.c:2494 +#: builtin.c:2650 +#, fuzzy +msgid "and: received non-numeric second argument" +msgstr "atan2: el segundo argumento recibido no es un número" + +#: builtin.c:2656 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "and(%lf, %lf): los valores negativos darán resultados extraños" -#: builtin.c:2496 +#: builtin.c:2658 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): los valores fraccionarios serán truncados" -#: builtin.c:2525 builtin.c:2527 +#: builtin.c:2684 msgid "or: received non-numeric first argument" msgstr "or: el primer argumento recibido no es un número" -#: builtin.c:2529 +#: builtin.c:2686 +#, fuzzy +msgid "or: received non-numeric second argument" +msgstr "atan2: el segundo argumento recibido no es un número" + +#: builtin.c:2692 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "or(%lf, %lf): los valores negativos darán resultados extraños" -#: builtin.c:2531 +#: builtin.c:2694 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): los valores fraccionarios serán truncados" -#: builtin.c:2560 builtin.c:2562 +#: builtin.c:2720 msgid "xor: received non-numeric first argument" msgstr "xor: el primer argumento recibido no es un número" -#: builtin.c:2564 +#: builtin.c:2722 +#, fuzzy +msgid "xor: received non-numeric second argument" +msgstr "atan2: el segundo argumento recibido no es un número" + +#: builtin.c:2728 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "xor(%lf, %lf): los valores negativos darán resultados extraños" -#: builtin.c:2566 +#: builtin.c:2730 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): los valores fraccionarios serán truncados" -#: builtin.c:2594 +#: builtin.c:2754 msgid "compl: received non-numeric argument" msgstr "compl: se recibió un argumento que no es un número" -#: builtin.c:2596 +#: builtin.c:2760 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): el valor negativo dará resultados extraños" -#: builtin.c:2598 +#: builtin.c:2762 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): el valor fraccionario será truncado" -#: builtin.c:2771 +#: builtin.c:2935 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: `%s' no es una categoría local válida" -#: eval.c:266 +#: eval.c:303 #, c-format msgid "unknown nodetype %d" msgstr "tipo de nodo %d desconocido" -#: eval.c:312 +#: eval.c:350 msgid "buffer overflow in genflags2str" msgstr "desbordamiento de almacenamiento temporal en genflags2str" -#: eval.c:647 +#: eval.c:382 eval.c:388 profile.c:837 +#, c-format +msgid "attempt to use array `%s' in a scalar context" +msgstr "se intentó usar la matriz `%s' en un contexto escalar" + +#: eval.c:730 #, c-format msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" "ciclo for: la matriz `%s' cambió de tamaño de %ld a %ld durante la ejecución " "del ciclo" -#: eval.c:668 +#: eval.c:751 msgid "`break' outside a loop is not portable" msgstr "`break' fuera de un ciclo no es transportable" -#: eval.c:672 +#: eval.c:755 msgid "`break' outside a loop is not allowed" msgstr "no se permite `break' fuera de un ciclo" -#: eval.c:689 +#: eval.c:772 msgid "`continue' outside a loop is not portable" msgstr "`continue' fuera de un ciclo no es transportable" -#: eval.c:693 +#: eval.c:776 msgid "`continue' outside a loop is not allowed" msgstr "no se permite `continue' fuera de un ciclo" -#: eval.c:727 +#: eval.c:810 msgid "`next' cannot be called from a BEGIN rule" msgstr "`next' no se puede llamar desde una regla BEGIN" -#: eval.c:729 +#: eval.c:812 msgid "`next' cannot be called from an END rule" msgstr "`next' no se puede llamar desde una regla END" -#: eval.c:738 +#: eval.c:821 msgid "`nextfile' cannot be called from a BEGIN rule" msgstr "`nextfile' no se puede llamar desde una regla BEGIN" -#: eval.c:740 +#: eval.c:823 msgid "`nextfile' cannot be called from an END rule" msgstr "`nextfile' no se puede llamar desde una regla END" -#: eval.c:785 +#: eval.c:872 msgid "statement has no effect" msgstr "la sentencia no tiene efecto" -#: eval.c:828 eval.c:1726 +#: eval.c:915 eval.c:1873 #, c-format msgid "can't use function name `%s' as variable or array" msgstr "no se puede usar el nombre de la función `%s' como variable o matriz" -#: eval.c:835 eval.c:841 +#: eval.c:922 eval.c:928 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "referencia al argumento sin inicializar `%s'" -#: eval.c:848 eval.c:907 eval.c:1732 eval.c:1742 profile.c:807 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "se intentó usar la matriz `%s' en un contexto escalar" - -#: eval.c:858 eval.c:1752 +#: eval.c:937 eval.c:1882 #, c-format msgid "reference to uninitialized variable `%s'" msgstr "referencia a la variable sin inicializar `%s'" -#: eval.c:1007 +#: eval.c:1083 msgid "" "concatenation: side effects in one expression have changed the length of " "another!" @@ -820,49 +847,50 @@ "concatenación: ¡Los efectos laterales en una expresión han cambiado la " "longitud de otra!" -#: eval.c:1032 +#: eval.c:1162 msgid "assignment used in conditional context" msgstr "se usó una asignación en un contexto condicional" -#: eval.c:1122 +#: eval.c:1252 msgid "division by zero attempted" msgstr "se intentó una división por cero" -#: eval.c:1137 +#: eval.c:1267 #, c-format msgid "division by zero attempted in `%%'" msgstr "se intentó una división por cero en `%%'" -#: eval.c:1152 profile.c:683 +#: eval.c:1282 profile.c:713 #, c-format msgid "illegal type (%s) in tree_eval" msgstr "tipo ilegal (%s) en tree_eval" -#: eval.c:1328 +#: eval.c:1459 msgid "division by zero attempted in `/='" msgstr "se intentó una división por cero en `/='" -#: eval.c:1346 +#: eval.c:1477 #, c-format msgid "division by zero attempted in `%%='" msgstr "se intentó una división por cero en `%%='" -#: eval.c:1586 +#: eval.c:1738 #, c-format msgid "function `%s' called with more arguments than declared" msgstr "se llamó a la función `%s' con más argumentos de los declarados" -#: eval.c:1633 +#: eval.c:1782 #, c-format msgid "function `%s' not defined" msgstr "la función `%s' no está definida" -#: eval.c:1639 +#: eval.c:1788 #, c-format msgid "function %s called\n" msgstr "se llamó a la función %s\n" -#: eval.c:1698 +#: eval.c:1845 +#, c-format msgid "" "\n" "\t# Function Call Stack:\n" @@ -872,41 +900,42 @@ "\t# Pila de Llamadas de Funciones:\n" "\n" -#: eval.c:1701 +#: eval.c:1848 +#, c-format msgid "\t# -- main --\n" msgstr "\t# -- principal --\n" -#: eval.c:1867 +#: eval.c:2003 msgid "attempt to field reference from non-numeric value" msgstr "se intentó una referencia de campo desde un valor que no es un número" -#: eval.c:1869 +#: eval.c:2005 msgid "attempt to reference from null string" msgstr "se intentó una referencia desde una cadena nula" -#: eval.c:1875 +#: eval.c:2011 #, c-format msgid "attempt to access field %d" msgstr "se intentó accesar al campo %d" -#: eval.c:1896 eval.c:1903 profile.c:900 +#: eval.c:2032 eval.c:2039 profile.c:934 msgid "assignment is not allowed to result of builtin function" msgstr "no se permite asignación como resultado de una función interna" -#: eval.c:1951 +#: eval.c:2103 msgid "`IGNORECASE' is a gawk extension" msgstr "`IGNORECASE' es una extensión de gawk" -#: eval.c:1980 +#: eval.c:2133 msgid "`BINMODE' is a gawk extension" msgstr "`BINMODE' es una extensión de gawk" -#: eval.c:2092 +#: eval.c:2255 #, c-format msgid "bad `%sFMT' specification `%s'" msgstr "especificación `%sFMT' `%s' errónea" -#: eval.c:2170 +#: eval.c:2333 msgid "turning off `--lint' due to assignment to `LINT'" msgstr "desactivando `--lint' debido a una asignación a `LINT'" @@ -925,7 +954,57 @@ msgstr "" "extension: biblioteca `%s': no se puede llamar a la función `%s' (%s)\n" -#: ext.c:183 +#: ext.c:102 +msgid "extension: missing function name" +msgstr "" + +#: ext.c:107 +#, fuzzy, c-format +msgid "extension: illegal character `%c' in function name `%s'" +msgstr "" +"extension: biblioteca `%s': no se puede llamar a la función `%s' (%s)\n" + +#: ext.c:113 +#, fuzzy, c-format +msgid "extension: can't redefine function `%s'" +msgstr "extension: no se puede abrir `%s' (%s)\n" + +#: ext.c:117 +#, fuzzy, c-format +msgid "extension: function `%s' already defined" +msgstr "la función `%s' no está definida" + +#: ext.c:122 +#, c-format +msgid "extension: can't use gawk built-in `%s' as function name" +msgstr "" + +#: ext.c:124 +#, fuzzy, c-format +msgid "extension: function name `%s' previously defined" +msgstr "el nombre de función `%s' se definió previamente" + +#: ext.c:201 +#, c-format +msgid "function `%s' defined to take no more than `%d' argument(s)" +msgstr "" + +#: ext.c:204 +#, fuzzy, c-format +msgid "function `%s': missing argument #%d" +msgstr "la función `%s' no está definida" + +#: ext.c:214 +#, fuzzy, c-format +msgid "function `%s': argument #%d: attempt to use scalar as an array" +msgstr "se intentó usar el dato escalar `%s' como una matriz" + +#: ext.c:218 +#, c-format +msgid "function `%s': argument #%d: attempt to use array as a scalar" +msgstr "" + +#: ext.c:243 msgid "Operation Not Supported" msgstr "No Se Da Soporte A La Operación" @@ -955,539 +1034,539 @@ msgid "null string for `FS' is a gawk extension" msgstr "la cadena nula para `FS' es una extensión de gawk" -#: getopt.c:692 getopt.c:704 +#: getopt.c:692 getopt.c:711 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s: la opción `%s' es ambigua\n" -#: getopt.c:737 getopt.c:741 +#: getopt.c:744 getopt.c:748 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "%s: la opción `--%s' no admite ningún argumento\n" -#: getopt.c:750 getopt.c:755 +#: getopt.c:757 getopt.c:762 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "%s: la opción `%c%s' no admite ningún argumento\n" -#: getopt.c:791 getopt.c:804 getopt.c:1093 getopt.c:1106 +#: getopt.c:807 getopt.c:829 getopt.c:1159 getopt.c:1181 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "%s: la opción `%s' requiere un argumento\n" -#: getopt.c:842 getopt.c:845 +#: getopt.c:867 getopt.c:870 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s: no se reconoce la opción `--%s'\n" -#: getopt.c:853 getopt.c:856 +#: getopt.c:878 getopt.c:881 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s: no se reconoce la opción `%c%s'\n" -#: getopt.c:903 getopt.c:906 +#: getopt.c:936 getopt.c:939 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: opción ilegal -- %c\n" -#: getopt.c:912 getopt.c:915 +#: getopt.c:945 getopt.c:948 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s: opción inválida -- %c\n" -#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:434 +#: getopt.c:1003 getopt.c:1022 getopt.c:1234 getopt.c:1255 main.c:433 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: la opción requiere un argumento -- %c\n" -#: getopt.c:1025 getopt.c:1036 +#: getopt.c:1074 getopt.c:1093 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s: la opción `-W %s' es ambigua\n" -#: getopt.c:1060 getopt.c:1072 +#: getopt.c:1117 getopt.c:1138 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: la opción `-W %s' no admite ningún argumento\n" -#: io.c:305 +#: io.c:308 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "no se puede abrir el fichero `%s' para lectura (%s)" -#: io.c:392 +#: io.c:395 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "falló al cerrar el df %d (`%s') (%s)" -#: io.c:530 +#: io.c:533 #, c-format msgid "invalid tree type %s in redirect()" msgstr "tipo de árbol %s inválido en redirect()" -#: io.c:536 +#: io.c:539 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "la expresión en la redirección `%s' sólo tiene un valor numérico" -#: io.c:542 +#: io.c:545 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "la expresión para la redirección `%s' tiene un valor de cadena nula" -#: io.c:547 +#: io.c:550 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "el fichero `%s' para la redirección `%s' puede ser resultado de una " "expresión lógica" -#: io.c:569 +#: io.c:588 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "mezcla innecesaria de `>' y `>>' para el fichero `%.*s'" -#: io.c:621 +#: io.c:640 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "no se puede abrir la tubería `%s' para la salida (%s)" -#: io.c:630 +#: io.c:649 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "no se puede abrir la tubería `%s' para la entrada (%s)" -#: io.c:643 +#: io.c:662 #, c-format msgid "can't open two way socket `%s' for input/output (%s)" msgstr "" "no se puede abrir el `socket' de dos vías `%s' para entrada/salida (%s)" -#: io.c:647 +#: io.c:666 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "no se puede abrir la tubería de dos vías `%s' para entrada/salida (%s)" -#: io.c:723 +#: io.c:742 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "no se puede redirigir desde `%s' (%s)" -#: io.c:726 +#: io.c:745 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "no se puede redirigir a `%s' (%s)" -#: io.c:765 +#: io.c:784 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "se alcanzó el límite del sistema para ficheros abiertos: comenzando a " "multiplexar los descriptores de fichero" -#: io.c:777 +#: io.c:800 #, c-format msgid "close of `%s' failed (%s)." msgstr "falló al cerrar `%s' (%s)." -#: io.c:784 +#: io.c:808 msgid "too many pipes or input files open" msgstr "demasiadas tuberías o ficheros de entrada abiertos" -#: io.c:807 +#: io.c:831 msgid "close: second argument must be `to' or `from'" msgstr "close: el segundo argumento debe ser `to' o `from'" -#: io.c:821 +#: io.c:845 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "close: `%.*s' no es un fichero abierto, tubería o co-proceso" -#: io.c:825 +#: io.c:849 msgid "close of redirection that was never opened" msgstr "cerrado de una redirección que nunca fue abierta" -#: io.c:862 +#: io.c:945 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: la redirección `%s' no se abre con `|&', se ignoró el segundo " "argumento" -#: io.c:924 +#: io.c:960 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "estado de fallo (%d) al cerrar la tubería de `%s' (%s)" -#: io.c:927 +#: io.c:963 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "estado de fallo (%d) al cerrar el fichero de `%s' (%s)" -#: io.c:946 +#: io.c:983 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "no se provee el cerrado explícito del `socket' `%s'" -#: io.c:949 +#: io.c:986 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "no se provee el cerrado explícito del co-proceso `%s'" -#: io.c:952 +#: io.c:989 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "no se provee el cerrado explícito del la tubería `%s'" -#: io.c:955 +#: io.c:992 #, c-format msgid "no explicit close of file `%s' provided" msgstr "no se provee el cerrado explícito del fichero `%s'" -#: io.c:984 io.c:1038 +#: io.c:1021 io.c:1075 #, c-format msgid "error writing standard output (%s)" msgstr "error al escribir en la salida estándar (%s)" -#: io.c:988 io.c:1042 +#: io.c:1025 io.c:1079 #, c-format msgid "error writing standard error (%s)" msgstr "error al escribir en la salida estándar de error (%s)" -#: io.c:996 +#: io.c:1033 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "falló la limpieza de la tubería de `%s' (%s)." -#: io.c:999 +#: io.c:1036 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "falló la limpieza del co-proceso de la tubería a `%s' (%s)." -#: io.c:1002 +#: io.c:1039 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "falló la limpieza del fichero de `%s' (%s)." -#: io.c:1161 +#: io.c:1198 msgid "/inet/raw client not ready yet, sorry" msgstr "el cliente /inet/raw no está listo aún, perdón" -#: io.c:1163 io.c:1200 +#: io.c:1200 io.c:1237 msgid "only root may use `/inet/raw'." msgstr "sólo root puede utilizar `/inet/raw'." -#: io.c:1198 +#: io.c:1235 msgid "/inet/raw server not ready yet, sorry" msgstr "el servidor /inet/raw no está listo aún, perdón" -#: io.c:1288 +#: io.c:1325 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "" "no se proporciona algún protocolo (conocido) en el nombre de fichero " "especial `%s'" -#: io.c:1306 +#: io.c:1343 #, c-format msgid "special file name `%s' is incomplete" msgstr "el nombre de fichero especial `%s' está incompleto" -#: io.c:1318 +#: io.c:1355 #, c-format msgid "local port invalid in `%s'" msgstr "puerto local inválido en `%s'" -#: io.c:1330 +#: io.c:1367 msgid "must supply a remote hostname to `/inet'" msgstr "se debe proporcionar a `/inet' un nombre de anfitrión remoto" -#: io.c:1345 +#: io.c:1382 msgid "must supply a remote port to `/inet'" msgstr "se debe proporcionar a `/inet' un puerto remoto" -#: io.c:1351 +#: io.c:1388 #, c-format msgid "remote port invalid in `%s'" msgstr "puerto remoto inválido en `%s'" -#: io.c:1361 +#: io.c:1398 msgid "TCP/IP communications are not supported" msgstr "No tienen soporte las comunicaciones TCP/IP" -#: io.c:1370 io.c:1551 +#: io.c:1407 io.c:1588 #, c-format msgid "file `%s' is a directory" msgstr "el fichero `%s' es un directorio" -#: io.c:1440 +#: io.c:1477 #, c-format msgid "use `PROCINFO[\"%s\"]' instead of `%s'" msgstr "use `PROCINFO[\"%s\"]' en lugar de `%s'" -#: io.c:1472 +#: io.c:1509 msgid "use `PROCINFO[...]' instead of `/dev/user'" msgstr "use `PROCINFO[...]' en lugar de `/dev/user'" -#: io.c:1537 io.c:1711 +#: io.c:1574 io.c:1748 #, c-format msgid "could not open `%s', mode `%s'" msgstr "no se puede abrir `%s', modo `%s'" -#: io.c:1762 +#: io.c:1799 #, c-format msgid "close of master pty failed (%s)" msgstr "falló al cerrar el pty maestro (%s)" -#: io.c:1764 io.c:1916 io.c:2068 +#: io.c:1801 io.c:1953 io.c:2105 #, c-format msgid "close of stdout in child failed (%s)" msgstr "falló al cerrar la salida estándar en el hijo (%s)" -#: io.c:1767 +#: io.c:1804 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "" "falló el movimiento del pty esclavo a la salida estándar en el hijo (dup: %s)" -#: io.c:1769 io.c:1921 +#: io.c:1806 io.c:1958 #, c-format msgid "close of stdin in child failed (%s)" msgstr "falló al cerrar la entrada estándar en el hijo (%s)" -#: io.c:1772 +#: io.c:1809 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "" "falló el movimiento del pty esclavo a la entrada estándar en el hijo (dup: %" "s)" -#: io.c:1774 io.c:1793 +#: io.c:1811 io.c:1830 #, c-format msgid "close of slave pty failed (%s)" msgstr "falló al cerrar el pty esclavo (%s)" -#: io.c:1867 io.c:1919 io.c:2049 io.c:2071 +#: io.c:1904 io.c:1956 io.c:2086 io.c:2108 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "falló el movimiento a la salida estándar en el hijo (dup: %s)" -#: io.c:1871 io.c:1924 +#: io.c:1908 io.c:1961 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "" "falló el movimiento de la tubería a la entrada estándar en el hijo (dup: %s)" -#: io.c:1888 io.c:2062 +#: io.c:1925 io.c:2099 msgid "restoring stdout in parent process failed\n" msgstr "falló la restauración de la salida estándar en el proceso padre\n" -#: io.c:1893 +#: io.c:1930 msgid "restoring stdin in parent process failed\n" msgstr "falló la restauración de la entrada estándar en el proceso padre\n" -#: io.c:1927 io.c:2073 io.c:2084 +#: io.c:1964 io.c:2110 io.c:2121 #, c-format msgid "close of pipe failed (%s)" msgstr "falló al cerrar la tubería (%s)" -#: io.c:1972 +#: io.c:2009 msgid "`|&' not supported" msgstr "`|&' no tiene soporte" -#: io.c:2039 +#: io.c:2076 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "no se puede abrir la tubería `%s' (%s)" -#: io.c:2080 +#: io.c:2117 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "no se puede crear el proceso hijo para `%s' (fork: %s)" -#: io.c:2423 +#: io.c:2460 #, c-format msgid "data file `%s' is empty" msgstr "el fichero de datos `%s' está vacío" -#: io.c:2466 io.c:2474 +#: io.c:2503 io.c:2511 msgid "could not allocate more input memory" msgstr "no se puede reservar más memoria de entrada" -#: io.c:2832 io.c:2895 +#: io.c:2869 io.c:2932 #, c-format msgid "error reading input file `%s': %s" msgstr "error al leer el fichero de entrada `%s': %s" -#: io.c:3020 +#: io.c:3057 msgid "multicharacter value of `RS' is a gawk extension" msgstr "el valor multicaracter de `RS' es una extensión de gawk" -#: main.c:324 +#: main.c:323 msgid "`-m[fr]' option irrelevant in gawk" msgstr "la opción -m[fr] es irrelevante en gawk" -#: main.c:326 +#: main.c:325 msgid "-m option usage: `-m[fr] nnn'" msgstr "uso de la opción -m: `-m[fr]' nnn" -#: main.c:343 +#: main.c:342 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: no se reconoce la opción `-W %s', se ignora\n" -#: main.c:380 +#: main.c:379 msgid "empty argument to `--source' ignored" msgstr "se ignora el argumento vacío para `--source'" -#: main.c:451 +#: main.c:450 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" "la variable de ambiente `POSIXLY_CORRECT' está establecida: activando `--" "posix'" -#: main.c:456 +#: main.c:455 msgid "`--posix' overrides `--traditional'" msgstr "`--posix' se impone a `--traditional'" -#: main.c:467 +#: main.c:466 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "`--posix'/`--traditional' se imponen a `--non-decimal-data'" -#: main.c:471 +#: main.c:470 #, c-format msgid "running %s setuid root may be a security problem" msgstr "ejecutar %s como setuid root puede ser un problema de seguridad" -#: main.c:512 +#: main.c:511 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "no se puede establecer el modo binario en la entrada estándar (%s)" -#: main.c:515 +#: main.c:514 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "no se puede establecer el modo binario en la salida estándar (%s)" -#: main.c:517 +#: main.c:516 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "" "no se puede establecer el modo binario en la salida estándar de error (%s)" -#: main.c:547 +#: main.c:546 msgid "no program text at all!" msgstr "¡No hay ningún programa de texto!" -#: main.c:620 +#: main.c:623 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "" "Modo de empleo: %s [opciones estilo POSIX o GNU] -f fichprog [--] " "fichero ...\n" -#: main.c:622 +#: main.c:625 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "" "Modo de empleo: %s [opciones estilo POSIX o GNU] [--] %cprograma%c " "fichero ...\n" -#: main.c:627 +#: main.c:630 msgid "POSIX options:\t\tGNU long options:\n" msgstr "Opciones POSIX:\t\tOpciones largas GNU:\n" -#: main.c:628 +#: main.c:631 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f fichprog\t\t--file=fichprog\n" -#: main.c:629 +#: main.c:632 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F sc\t\t\t--field-separator=sc\n" -#: main.c:630 +#: main.c:633 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v var=valor\t\t--assign=var=valor\n" -#: main.c:631 +#: main.c:634 msgid "\t-m[fr] val\n" msgstr "\t-m[fr] valor\n" -#: main.c:632 +#: main.c:635 msgid "\t-W compat\t\t--compat\n" msgstr "\t-W compat\t\t--compat\n" -#: main.c:633 +#: main.c:636 msgid "\t-W copyleft\t\t--copyleft\n" msgstr "\t-W copyleft\t\t--copyleft\n" -#: main.c:634 +#: main.c:637 msgid "\t-W copyright\t\t--copyright\n" msgstr "\t-W copyright\t\t--copyright\n" -#: main.c:635 +#: main.c:638 msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" msgstr "\t-W dump-variables[=fichero]\t--dump-variables[=fichero]\n" -#: main.c:636 +#: main.c:639 msgid "\t-W gen-po\t\t--gen-po\n" msgstr "\t-W gen-po\t\t--gen-po\n" -#: main.c:637 +#: main.c:640 msgid "\t-W help\t\t\t--help\n" msgstr "\t-W help\t\t\t--help\n" -#: main.c:638 +#: main.c:641 msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -#: main.c:639 +#: main.c:642 msgid "\t-W lint-old\t\t--lint-old\n" msgstr "\t-W lint-old\t\t--lint-old\n" -#: main.c:640 +#: main.c:643 msgid "\t-W non-decimal-data\t--non-decimal-data\n" msgstr "\t-W non-decimal-data\t--non-decimal-data\n" -#: main.c:642 +#: main.c:645 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" -#: main.c:645 +#: main.c:648 msgid "\t-W parsedebug\t\t--parsedebug\n" msgstr "\t-W parsedebug\t\t--parsedebug\n" -#: main.c:647 +#: main.c:650 msgid "\t-W profile[=file]\t--profile[=file]\n" msgstr "\t-W profile[=fichero]\t--profile[=fichero]\n" -#: main.c:648 +#: main.c:651 msgid "\t-W posix\t\t--posix\n" msgstr "\t-W posix\t\t--posix\n" -#: main.c:649 +#: main.c:652 msgid "\t-W re-interval\t\t--re-interval\n" msgstr "\t-W re-interval\t\t--re-interval\n" # Esta es la línea más larga de la lista de argumentos. # Probar con gawk para revisar tabuladores. cfuga -#: main.c:650 +#: main.c:653 msgid "\t-W source=program-text\t--source=program-text\n" msgstr "\t-W source=texto-prog\t--source=texto-prog\n" -#: main.c:651 +#: main.c:654 msgid "\t-W traditional\t\t--traditional\n" msgstr "\t-W traditional\t\t--traditional\n" -#: main.c:652 +#: main.c:655 msgid "\t-W usage\t\t--usage\n" msgstr "\t-W usage\t\t--usage\n" -#: main.c:653 +#: main.c:656 msgid "\t-W version\t\t--version\n" msgstr "\t-W version\t\t--version\n" -#: main.c:657 +#: main.c:660 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1500,7 +1579,7 @@ "impresa.\n" "\n" -#: main.c:661 +#: main.c:664 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -1510,7 +1589,7 @@ "Por omisión lee la entrada estándar y escribe en la salida estándar.\n" "\n" -#: main.c:665 +#: main.c:668 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -1520,7 +1599,7 @@ "\tgawk '{ sum += $1 }; END { print sum }' fichero\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:682 +#: main.c:685 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1540,7 +1619,7 @@ "(a su elección) cualquier versión posterior.\n" "\n" -#: main.c:690 +#: main.c:693 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -1554,7 +1633,7 @@ "Licencia Pública General de GNU para más detalles.\n" "\n" -#: main.c:696 +#: main.c:699 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, write to the Free Software\n" @@ -1564,11 +1643,11 @@ "junto con este programa; si no es así, escriba a la Free Software\n" "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n" -#: main.c:730 +#: main.c:733 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft no establece FS a tabulador en el awk de POSIX" -#: main.c:956 +#: main.c:962 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" @@ -1577,40 +1656,41 @@ "%s: el argumento `%s' para `-v' no es de la forma `var=valor'\n" "\n" -#: main.c:976 +#: main.c:982 #, c-format msgid "`%s' is not a legal variable name" msgstr "`%s' no es un nombre de variable legal" -#: main.c:979 +#: main.c:985 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "`%s' no es un nombre de variable, se busca el fichero `%s=%s'" -#: main.c:1012 +#: main.c:1018 msgid "floating point exception" msgstr "excepción de coma flotante" -#: main.c:1019 +#: main.c:1025 msgid "fatal error: internal error" msgstr "error fatal: error interno" -#: main.c:1069 +#: main.c:1075 #, c-format msgid "no pre-opened fd %d" msgstr "no existe el df %d abierto previamente" -#: main.c:1074 +#: main.c:1082 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "no se puede abrir previamente /dev/null para el df %d" -#: main.c:1097 main.c:1106 +#: main.c:1105 main.c:1114 #, c-format msgid "could not find groups: %s" msgstr "no se pueden encontrar los grupos: %s" #: msg.c:54 +#, c-format msgid "cmd. line:" msgstr "línea ord.:" @@ -1630,19 +1710,19 @@ msgid "can't convert string to float" msgstr "no se puede convertir una cadena a coma flotante" -#: node.c:355 +#: node.c:357 msgid "backslash at end of string" msgstr "barra invertida al final de la cadena" -#: node.c:539 +#: node.c:541 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX no permite escapes `\\x'" -#: node.c:545 +#: node.c:547 msgid "no hex digits in `\\x' escape sequence" msgstr "no hay dígitos hexadecimales en la secuencia de escape `\\x'" -#: node.c:579 +#: node.c:581 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "la secuencia de escape `\\%c' tratada como una simple `%c'" @@ -1657,21 +1737,27 @@ msgid "could not open `%s' for writing: %s" msgstr "no se puede abrir `%s' para escritura: %s" -#: profile.c:449 +#: profile.c:467 #, c-format msgid "internal error: %s with null vname" msgstr "error interno: %s con vname nulo" -#: profile.c:512 +#: profile.c:530 msgid "# treated internally as `delete'" msgstr "# se trata internamente como `delete'" -#: profile.c:1162 +#: profile.c:1167 +#, c-format +msgid "# this is a dynamically loaded extension function" +msgstr "" + +#: profile.c:1198 #, c-format msgid "\t# gawk profile, created %s\n" msgstr "\t# perfil de gawk, creado %s\n" -#: profile.c:1165 +#: profile.c:1201 +#, c-format msgid "" "\t# BEGIN block(s)\n" "\n" @@ -1679,7 +1765,8 @@ "\t# bloque(s) BEGIN\n" "\n" -#: profile.c:1175 +#: profile.c:1211 +#, c-format msgid "" "\t# Rule(s)\n" "\n" @@ -1687,7 +1774,8 @@ "\t# Regla(s)\n" "\n" -#: profile.c:1181 +#: profile.c:1217 +#, c-format msgid "" "\t# END block(s)\n" "\n" @@ -1695,7 +1783,8 @@ "\t# bloque(s) END\n" "\n" -#: profile.c:1201 +#: profile.c:1237 +#, c-format msgid "" "\n" "\t# Functions, listed alphabetically\n" @@ -1703,93 +1792,94 @@ "\n" "\t# Funciones, enumeradas alfabéticamente\n" -#: profile.c:1413 +#: profile.c:1452 #, c-format msgid "unexpected type %s in prec_level" msgstr "tipo %s inesperado en prec_level" -#: re.c:193 -#, c-format -msgid "regex match failed, not enough memory to match string \"%.*s%s\"" -msgstr "" -"falló la coincidencia de la expresión regular, no hay suficiente memoria " -"para que coincida la cadena \"%.*s%s\"" - -#: regcomp.c:136 +#: regcomp.c:150 msgid "Success" msgstr "Éxito" -#: regcomp.c:139 +#: regcomp.c:153 msgid "No match" msgstr "No hay coincidencia" -#: regcomp.c:142 +#: regcomp.c:156 msgid "Invalid regular expression" msgstr "Expresión regular inválida" -#: regcomp.c:145 +#: regcomp.c:159 msgid "Invalid collation character" msgstr "Caracter de ordenación inválido" -#: regcomp.c:148 +#: regcomp.c:162 msgid "Invalid character class name" msgstr "Nombre de clase de caracter inválido" -#: regcomp.c:151 +#: regcomp.c:165 msgid "Trailing backslash" msgstr "Barra invertida extra al final" -#: regcomp.c:154 +#: regcomp.c:168 msgid "Invalid back reference" msgstr "Referencia hacia atrás inválida" -#: regcomp.c:157 +#: regcomp.c:171 msgid "Unmatched [ or [^" msgstr "[ o [^ desemparejados" -#: regcomp.c:160 +#: regcomp.c:174 msgid "Unmatched ( or \\(" msgstr "( o \\( desemparejados" -#: regcomp.c:163 +#: regcomp.c:177 msgid "Unmatched \\{" msgstr "\\{ desemparejado" -#: regcomp.c:166 +#: regcomp.c:180 msgid "Invalid content of \\{\\}" msgstr "Contenido inválido de \\{\\}" -#: regcomp.c:169 +#: regcomp.c:183 msgid "Invalid range end" msgstr "Final de rango inválido" -#: regcomp.c:172 +#: regcomp.c:186 msgid "Memory exhausted" msgstr "Memoria agotada" -#: regcomp.c:175 +#: regcomp.c:189 msgid "Invalid preceding regular expression" msgstr "Expresión regular precedente inválida" -#: regcomp.c:178 +#: regcomp.c:192 msgid "Premature end of regular expression" msgstr "Fin prematuro de la expresión regular" -#: regcomp.c:181 +#: regcomp.c:195 msgid "Regular expression too big" msgstr "La expresión regular es demasiado grande" -#: regcomp.c:184 +#: regcomp.c:198 msgid "Unmatched ) or \\)" msgstr ") o \\) desemparejados" -#: regcomp.c:621 +#: regcomp.c:668 msgid "No previous regular expression" msgstr "No hay una expresión regular previa" +#~ msgid "or used as a variable or an array" +#~ msgstr "o se usó como una variable o una matriz" + #~ msgid "substr: length %g is < 0" #~ msgstr "substr: la longitud %g es < 0" +#~ msgid "regex match failed, not enough memory to match string \"%.*s%s\"" +#~ msgstr "" +#~ "falló la coincidencia de la expresión regular, no hay suficiente memoria " +#~ "para que coincida la cadena \"%.*s%s\"" + #~ msgid "delete: illegal use of variable `%s' as array" #~ msgstr "delete: uso ilegal de la variable `%s' como una matriz" @@ -1808,9 +1898,6 @@ #~ msgid "or used in other expression context" #~ msgstr "se usó or en otro contexto de la expresión" -#~ msgid "attempt to use function `%s' as array" -#~ msgstr "se intentó usar la función `%s' como una matriz" - #~ msgid "`%s' is a function, assignment is not allowed" #~ msgstr "`%s' es una función, no se permite asignación" diff -urN gawk-3.1.3/po/fr.po gawk-3.1.4/po/fr.po --- gawk-3.1.3/po/fr.po 2003-07-07 21:20:33.000000000 +0300 +++ gawk-3.1.4/po/fr.po 2004-07-28 16:55:29.000000000 +0300 @@ -1,83 +1,90 @@ -# Messages français pour gawk. -# Copyright © 1996 Free Software Foundation, Inc. -# Michel Robitaille , since 1996. +# Messages français pour make. +# Copyright (C) 2004 Free Software Foundation, Inc. +# Michel Robitaille , 1996. # msgid "" msgstr "" -"Project-Id-Version: gawk 3.1.2g\n" +"Project-Id-Version: gawk 3.1.31\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2003-07-07 11:20-0700\n" -"PO-Revision-Date: 2003-06-26 08:00-0500\n" +"POT-Creation-Date: 2004-07-15 13:02+0300\n" +"PO-Revision-Date: 2004-05-10 08:00-0500\n" "Last-Translator: Michel Robitaille \n" "Language-Team: French \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" #: array.c:112 +#, fuzzy, c-format +msgid "attempt to use function `%s' as an array" +msgstr "tentative d'utilisation de la fonction « %s » dans le tableau" + +#: array.c:115 #, c-format msgid "attempt to use scalar parameter `%s' as an array" msgstr "" "tentative d'utilisation d'un paramètre scalaire « %s » comme un tableau" -#: array.c:113 +#: array.c:118 #, c-format msgid "attempt to use scalar `%s' as array" msgstr "tentative d'utilisation du scalaire « %s » comme un tableau" -#: array.c:151 -#, c-format +#: array.c:156 +#, fuzzy, c-format msgid "from %s" -msgstr "de %s" +msgstr "%s (de %s)" -#: array.c:506 +#: array.c:511 #, c-format msgid "reference to uninitialized element `%s[\"%s\"]'" msgstr "référence à un élément non initialisé « %s[\"%s\"] »" -#: array.c:512 +#: array.c:517 #, c-format msgid "subscript of array `%s' is null string" msgstr "sous-description du tableau « %s » contient une chaîne nulle" -#: array.c:609 +#: array.c:621 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "destruction: index « %s » n'est pas dans le tableau « %s »" -#: array.c:769 +#: array.c:791 #, c-format msgid "%s: empty (null)\n" msgstr "%s: vide (null)\n" -#: array.c:774 +#: array.c:796 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: vide (zéro)\n" -#: array.c:778 +#: array.c:800 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: table_size = %d, array_size = %d\n" -#: array.c:807 -#, c-format +#: array.c:829 +#, fuzzy, c-format msgid "%s: is parameter\n" msgstr "%s: est un paramètre\n" -#: array.c:812 +#: array.c:834 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: array_ref de %s\n" #: awkgram.y:208 -#, c-format +#, fuzzy, c-format msgid "%s blocks must have an action part" -msgstr "Les blocs %s doivent avoir une partie action" +msgstr "Les blocs de FIN doivent avoir une partie action" #: awkgram.y:211 +#, fuzzy msgid "each rule must have a pattern or an action part" -msgstr "chaque règle doit avoir un pattern ou une partie action" +msgstr "Les blocs de FIN doivent avoir une partie action" #: awkgram.y:267 #, c-format @@ -91,728 +98,757 @@ "la constante d'expression régulière « /%s/ » ressemble à un commentaire en " "C, mais ne l'est pas" -#: awkgram.y:340 awkgram.y:615 +#: awkgram.y:341 awkgram.y:619 msgid "statement may have no effect" msgstr "la déclaration peut n'avoir aucun effet" -#: awkgram.y:435 awkgram.y:455 -#, c-format +#: awkgram.y:436 awkgram.y:456 +#, fuzzy, c-format msgid "`%s' used in %s action" -msgstr "« %s » utilisé dans l'action %s" +msgstr "« next » utilisé dans l'action BEGIN ou END" -#: awkgram.y:448 awkgram.y:451 +#: awkgram.y:449 awkgram.y:452 msgid "`nextfile' is a gawk extension" msgstr "« nextfile » est une extension de gawk" -#: awkgram.y:465 +#: awkgram.y:466 msgid "`return' used outside function context" msgstr "« return » utilisé en dehors du contexte d'une fonction" -#: awkgram.y:504 +#: awkgram.y:508 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "utilisation de « print » dans une règle BEGIN ou END doit être probablement " "« print \"\" »" -#: awkgram.y:517 awkgram.y:524 +#: awkgram.y:521 awkgram.y:528 msgid "`delete array' is a gawk extension" msgstr "« delete array » est une extension de gawk" -#: awkgram.y:532 awkgram.y:539 +#: awkgram.y:536 awkgram.y:543 +#, fuzzy msgid "`delete(array)' is a non-portable tawk extension" -msgstr "« delete(array) » est une extension tawk non portable" +msgstr "« delete array » est une extension de gawk" -#: awkgram.y:583 +#: awkgram.y:587 #, c-format msgid "duplicate case values in switch body: %s" -msgstr "valeur de case en double dans le corp du switch: %s" +msgstr "" -#: awkgram.y:593 +#: awkgram.y:597 msgid "Duplicate `default' detected in switch body" -msgstr "Double « default » détecté dans le corps du switch" +msgstr "" -#: awkgram.y:681 +#: awkgram.y:686 msgid "multistage two-way pipelines don't work" msgstr "pipelines bidirectionnel à multi-étapes ne fonctionnent pas" -#: awkgram.y:772 +#: awkgram.y:777 msgid "regular expression on right of assignment" msgstr "expression régulière à la droite de l'affectation" -#: awkgram.y:782 +#: awkgram.y:800 msgid "regular expression on left of `~' or `!~' operator" msgstr "expression régulière sur la gauche de l'opérateur « ~ » ou « !~ »" -#: awkgram.y:790 +#: awkgram.y:808 msgid "regular expression on right of comparison" msgstr "expression régulière sur la droite de la comparaison" -#: awkgram.y:857 +#: awkgram.y:875 msgid "non-redirected `getline' undefined inside END action" msgstr "« getline » non redirigé indéfini à l'intérieur de l'action END" -#: awkgram.y:884 +#: awkgram.y:902 msgid "call of `length' without parentheses is not portable" msgstr "l'appel de « length » sans les parenthèses n'est pas portable" -#: awkgram.y:887 +#: awkgram.y:905 msgid "call of `length' without parentheses is deprecated by POSIX" msgstr "l'appel de « length » sans les parenthèses est déprécié par POSIX" -#: awkgram.y:940 +#: awkgram.y:958 msgid "use of non-array as array" -msgstr "utilisation d'un non-tableau comme tableau" +msgstr "" -#: awkgram.y:942 +#: awkgram.y:960 msgid "invalid subscript expression" msgstr "sous-expression invalide" -#: awkgram.y:1140 +#: awkgram.y:1158 +#, fuzzy msgid "unexpected newline or end of string" -msgstr "nouvelle ligne inattendue ou fin de chaîne" +msgstr "nouvelle ligne inattendue" -#: awkgram.y:1235 +#: awkgram.y:1254 msgid "empty program text on command line" msgstr "texte du programme sur la ligne de commande est vide" -#: awkgram.y:1292 +#: awkgram.y:1307 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "ne peut ouvrir le fichier source « %s » pour lecture (%s)" -#: awkgram.y:1327 +#: awkgram.y:1384 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "ne peut lire le fichier source « %s » (%s)" -#: awkgram.y:1335 +#: awkgram.y:1392 #, c-format msgid "source file `%s' is empty" msgstr "fichier source « %s » est vide" -#: awkgram.y:1537 awkgram.y:1647 awkgram.y:1665 awkgram.y:2015 awkgram.y:2100 +#: awkgram.y:1590 awkgram.y:1700 awkgram.y:1718 awkgram.y:2068 awkgram.y:2153 msgid "source file does not end in newline" msgstr "fichier source ne se termine pas par un retour de chariot" -#: awkgram.y:1601 +#: awkgram.y:1654 msgid "unterminated regexp ends with `\\' at end of file" msgstr "" "expression régulière non termineé se terminant par « \\ » à la fin du fichier" -#: awkgram.y:1621 +#: awkgram.y:1674 msgid "unterminated regexp" msgstr "expression régulière non terminée" -#: awkgram.y:1624 +#: awkgram.y:1677 msgid "unterminated regexp at end of file" msgstr "expression régulière non terminée à la fin du fichier" -#: awkgram.y:1691 +#: awkgram.y:1744 msgid "use of `\\ #...' line continuation is not portable" msgstr "" "utilisation de « \\ #... » comme continuation de ligne n'est pas portable" -#: awkgram.y:1703 +#: awkgram.y:1756 msgid "backslash not last character on line" msgstr "la barre oblique inverse n'est pas le dernier caractère sur la ligne" -#: awkgram.y:1748 +#: awkgram.y:1801 msgid "POSIX does not allow operator `**='" msgstr "POSIX ne permet un opérateur « **= »" -#: awkgram.y:1750 +#: awkgram.y:1803 msgid "old awk does not support operator `**='" msgstr "l'ancien awk ne supporte pas l'opérateur « **= »" -#: awkgram.y:1759 +#: awkgram.y:1812 msgid "POSIX does not allow operator `**'" msgstr "POSIX ne permet pas l'opérateur « ** »" -#: awkgram.y:1761 +#: awkgram.y:1814 msgid "old awk does not support operator `**'" msgstr "l'ancien awk ne supporte pas l'opérateur « ** »" -#: awkgram.y:1792 +#: awkgram.y:1845 msgid "operator `^=' is not supported in old awk" msgstr "l'opérateur « ^= » n'est pas supporté dans l'ancien awk" -#: awkgram.y:1800 +#: awkgram.y:1853 msgid "operator `^' is not supported in old awk" msgstr "l'opérateur « ^ » n'est pas supporté dans l'ancien awk" -#: awkgram.y:1884 awkgram.y:1901 +#: awkgram.y:1937 awkgram.y:1954 msgid "unterminated string" msgstr "chaîne non complétée" -#: awkgram.y:2061 +#: awkgram.y:2114 #, c-format msgid "invalid char '%c' in expression" msgstr "caractère invalide « %c » dans l'expression" -#: awkgram.y:2121 +#: awkgram.y:2162 #, c-format msgid "`%s' is a gawk extension" msgstr "« %s » est une extension de gawk" -#: awkgram.y:2124 +#: awkgram.y:2165 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "« %s » est une extension de Bell Labs" -#: awkgram.y:2127 +#: awkgram.y:2168 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX ne permet pas « %s »" -#: awkgram.y:2131 +#: awkgram.y:2172 #, c-format msgid "`%s' is not supported in old awk" msgstr "« %s » n'est pas supporté dans l'ancien awk" -#: awkgram.y:2158 +#: awkgram.y:2198 msgid "`goto' considered harmful!\n" msgstr "« goto » considéré néfaste!\n" -#: awkgram.y:2220 +#: awkgram.y:2260 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d est invalide comme nombre d'arguments pour %s" -#: awkgram.y:2239 awkgram.y:2242 +#: awkgram.y:2279 awkgram.y:2282 msgid "match: third argument is a gawk extension" msgstr "match: 3e argument est une extension de gawk" -#: awkgram.y:2255 +#: awkgram.y:2295 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "" -"%s: la chaîne litérale comme dernier argument d'une substitution n'a aucun " +"%s: la chaîne litérale comme dernier arguement d'une substitution n'a aucun " "effet" -#: awkgram.y:2258 -#, c-format +#: awkgram.y:2298 +#, fuzzy, c-format msgid "%s third parameter is not a changeable object" -msgstr "3e paramètre %s n'est pas un objet modifiable" +msgstr "sub: 3e paramètre n'est pas un objet interchangeable" -#: awkgram.y:2285 awkgram.y:2288 +#: awkgram.y:2325 awkgram.y:2328 msgid "close: second argument is a gawk extension" msgstr "close: 2e argument est une extension de gawk" -#: awkgram.y:2298 +#: awkgram.y:2338 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "utilisation de dcgettext(_\"...\") est incorrect: enlever les soulignés en " "en-tête" -#: awkgram.y:2313 +#: awkgram.y:2353 +#, fuzzy msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" -"utilisation de dcgettext(_\"...\") est incorrecte: enlever les soulignés de " -"l'en-tête" +"utilisation de dcgettext(_\"...\") est incorrect: enlever les soulignés en " +"en-tête" -#: awkgram.y:2384 +#: awkgram.y:2424 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "fonction « %s »: paramètre #%d, « %s » est un double du paramètre #%d" -#: awkgram.y:2417 +#: awkgram.y:2457 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "fonction « %s »: paramètre « %s » porte ombrage à la variable globale" -#: awkgram.y:2529 +#: awkgram.y:2569 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "ne peut ourvrir « %s » en écriture (%s)" -#: awkgram.y:2530 profile.c:93 +#: awkgram.y:2570 profile.c:93 msgid "sending profile to standard error" msgstr "redirection du profile vers stderr" -#: awkgram.y:2562 +#: awkgram.y:2602 #, c-format msgid "%s: close failed (%s)" msgstr "%s: échec de fermeture (%s)" -#: awkgram.y:2684 +#: awkgram.y:2723 msgid "shadow_funcs() called twice!" msgstr "shadows_funcs() appelé deux fois!" -#: awkgram.y:2711 +#: awkgram.y:2750 msgid "there were shadowed variables." -msgstr "il y a quelques variables qui sont cachées par ombrage" +msgstr "" -#: awkgram.y:2784 +#: awkgram.y:2823 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "fonction « %s »: ne peut utilise le nom de la fonction comme paramètre" -#: awkgram.y:2794 +#: awkgram.y:2833 #, c-format msgid "function name `%s' previously defined" msgstr "nom de la fonction « %s » définie précédemment" -#: awkgram.y:2945 awkgram.y:2951 +#: awkgram.y:2984 awkgram.y:2990 #, c-format msgid "function `%s' called but never defined" msgstr "fonction « %s » appelé mais jamais définie" -#: awkgram.y:2954 +#: awkgram.y:2993 #, c-format msgid "function `%s' defined but never called" msgstr "fonction « %s » définie mais jamais utilisée" -#: awkgram.y:2981 +#: awkgram.y:3020 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "" "expression régulière constante pour le paramètre #%d conduit à une valeur " "booléenne" -#: awkgram.y:2994 -#, c-format +#: awkgram.y:3033 +#, fuzzy, c-format msgid "" "function `%s' called with space between name and `(',\n" -"%s" +"or used as a variable or an array" msgstr "" "fonction « %s » appelée avec un espace entre le nom et « ( »,\n" "%s" -#: awkgram.y:2996 -msgid "or used as a variable or an array" -msgstr "ou utilisé comme une variable ou un tableau" - -#: builtin.c:137 +#: builtin.c:149 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s vers « %s » échec (%s)" -#: builtin.c:138 +#: builtin.c:150 msgid "standard output" msgstr "sortie standard" -#: builtin.c:139 +#: builtin.c:151 msgid "reason unknown" msgstr "raison inconnue" -#: builtin.c:152 +#: builtin.c:164 msgid "exp: received non-numeric argument" -msgstr "exp: argument fourni n'est pas numérique" +msgstr "exp: argument n'est pas numérique" -#: builtin.c:158 +#: builtin.c:170 #, c-format msgid "exp: argument %g is out of range" -msgstr "exp: argument fourni %g est hors gamme" +msgstr "exp: argument %g est hors limite" -#: builtin.c:216 +#: builtin.c:228 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" "fflush: ne peut vider: le pipe « %s » est oouvert en lecture, pas en écriture" -#: builtin.c:219 +#: builtin.c:231 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "" "fflush: ne peut vider: fichier « %s » ouvert en lecture, pas en écriture" -#: builtin.c:231 +#: builtin.c:243 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "" "fflush: « %s » n'est pas ni un fichier ouvert, un pipe ou un co-processus" -#: builtin.c:325 +#: builtin.c:338 msgid "index: received non-string first argument" -msgstr "index: premier argument fourni n'est pas une chaîne" +msgstr "index: premier argument n'est pas une chaîne" -#: builtin.c:327 +#: builtin.c:340 msgid "index: received non-string second argument" -msgstr "index: second argument fourni n'est pas une chaîne" +msgstr "index: second argument n'est pas une chaîne" -#: builtin.c:437 +#: builtin.c:454 msgid "int: received non-numeric argument" -msgstr "int: argument fourni n'est pas numérique" +msgstr "int: argument n'est pas numérique" -#: builtin.c:454 +#: builtin.c:471 msgid "length: received non-string argument" -msgstr "length: argument fourni n'est pas une chaîne" +msgstr "length: argument n'est pas une chaîne" -#: builtin.c:470 +#: builtin.c:487 msgid "log: received non-numeric argument" -msgstr "log: argument fourni n'est pas numérique" +msgstr "log: argument n'est pas numérique" -#: builtin.c:473 +#: builtin.c:490 #, c-format msgid "log: received negative argument %g" -msgstr "log: argument fourni négatif %g" +msgstr "log: argument négatif %g" -#: builtin.c:635 builtin.c:638 +#: builtin.c:654 builtin.c:657 msgid "must use `count$' on all formats or none" -msgstr "doit utiliser « count$ » pour tous les formats ou aucun" +msgstr "" -#: builtin.c:740 +#: builtin.c:759 msgid "`$' is not permitted in awk formats" msgstr "« $ » n'est pas permis dans les formats awk" -#: builtin.c:746 +#: builtin.c:765 msgid "arg count with `$' must be > 0" msgstr "décompte d'arguments avec « $ » doit être > 0" -#: builtin.c:748 -#, c-format +#: builtin.c:767 +#, fuzzy, c-format msgid "arg count %ld greater than total number of supplied arguments" -msgstr "compteur d'arguments %ld est > que le nombre total fournis d'arguments" +msgstr "compteur d'arguments %d est > que le nombre total fournis d'arguments" -#: builtin.c:750 +#: builtin.c:769 msgid "`$' not permitted after period in format" msgstr "« $ » n'est pas permis après le point" -#: builtin.c:763 +#: builtin.c:782 msgid "no `$' supplied for positional field width or precision" msgstr "aucun « $ » fourni dans le champ positionnel (longueur ou précision)" -#: builtin.c:821 +#: builtin.c:848 msgid "`l' is meaningless in awk formats; ignored" msgstr "« l » n'a aucun sens dans les formats de awk; ignoré" -#: builtin.c:825 +#: builtin.c:852 msgid "`l' is not permitted in POSIX awk formats" msgstr "« l » n'est pas permis dans les format POSIX de awk" -#: builtin.c:836 +#: builtin.c:863 msgid "`L' is meaningless in awk formats; ignored" msgstr "« L » n'a aucun sens dans les formats s de awk; ignoré" -#: builtin.c:840 +#: builtin.c:867 msgid "`L' is not permitted in POSIX awk formats" msgstr "« L » n'est pas permis dans les formats POSIX de awk" -#: builtin.c:851 +#: builtin.c:878 msgid "`h' is meaningless in awk formats; ignored" msgstr "« h » n'a aucun send dans les formats de awk; ignoré" -#: builtin.c:855 +#: builtin.c:882 msgid "`h' is not permitted in POSIX awk formats" msgstr "« h » n'est pas permis dans les formats POSIX de awk" -#: builtin.c:1055 +#: builtin.c:1111 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" -msgstr "[s]printf: valeur %g est hors gamme pour le format « %%%c »" +msgstr "" -#: builtin.c:1108 +#: builtin.c:1171 msgid "not enough arguments to satisfy format string" msgstr "pas assez d'arguments pour satisfaire le format d'une chaîne" -#: builtin.c:1110 +#: builtin.c:1173 msgid "^ ran out for this one" msgstr "^ débordement pour celle-ci" -#: builtin.c:1115 +#: builtin.c:1178 msgid "[s]printf: format specifier does not have control letter" msgstr "" "[s]printf: spécificateur de format ne contient pas de lettre de contrôle" -#: builtin.c:1118 +#: builtin.c:1181 msgid "too many arguments supplied for format string" msgstr "trop d'arguments pour la chaîne de format" -#: builtin.c:1184 builtin.c:1187 +#: builtin.c:1247 builtin.c:1250 msgid "printf: no arguments" msgstr "printf: aucun argument" -#: builtin.c:1211 +#: builtin.c:1274 msgid "sqrt: received non-numeric argument" -msgstr "sqrt: argument fourni n'est pas numérique" +msgstr "sqrt: argument n'est pas numérique" -#: builtin.c:1215 +#: builtin.c:1278 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: appelé avec un argument négatif %g" -#: builtin.c:1238 +#: builtin.c:1301 #, c-format msgid "substr: start index %g is invalid, using 1" msgstr "substr: début de l'index %g est invalide, utilise 1" -#: builtin.c:1243 +#: builtin.c:1306 #, c-format msgid "substr: non-integer start index %g will be truncated" msgstr "substr: début avec un nombre non entier %g sera tronqué" -#: builtin.c:1262 +#: builtin.c:1325 #, fuzzy, c-format msgid "substr: length %g is not >= 1" msgstr "substr: longueur %g est <= 0" -#: builtin.c:1264 +#: builtin.c:1327 #, fuzzy, c-format msgid "substr: length %g is not >= 0" msgstr "substr: longueur %g est <= 0" -#: builtin.c:1271 +#: builtin.c:1334 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: longueur avec un nombre non entier %g sera tronqué" -#: builtin.c:1276 +#: builtin.c:1339 #, c-format msgid "substr: length %g too big for string indexing, truncating to %g" msgstr "" -"substr: longueur %g trop grande pour l'indexation de chaîne, troncation à %g" -#: builtin.c:1288 +#: builtin.c:1351 msgid "substr: source string is zero length" msgstr "substr: chaîne de départ est de longueur zéro" -#: builtin.c:1294 -#, c-format +#: builtin.c:1357 +#, fuzzy, c-format msgid "substr: start index %g is past end of string" -msgstr "substr: début de l'index %g dépasse la fin de la chaîne" +msgstr "substr: début de l'index %d dépasse la fin de la chaîne" -#: builtin.c:1302 -#, c-format +#: builtin.c:1365 +#, fuzzy, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" msgstr "" -"substr: longueur %g débute avec l'index %g déborde la longueur du 1er " -"argument (%lu)" +"substr: longueur %d début avec l'index %d déborde la longueur du 1er " +"arguement (%d)" -#: builtin.c:1337 +#: builtin.c:1400 +#, fuzzy msgid "strftime: received non-string first argument" -msgstr "strftime: premier argument fourni n'est pas une chaîne" +msgstr "strftim: premier argument n'est pas une chaîne" -#: builtin.c:1343 +#: builtin.c:1406 msgid "strftime: received empty format string" msgstr "strftime: chaîne de format vide" -#: builtin.c:1352 +#: builtin.c:1415 +#, fuzzy msgid "strftime: received non-numeric second argument" -msgstr "strftime: second argument fourni n'est pas numérique" +msgstr "strftime: second argument n'est pas un chaîne" -#: builtin.c:1415 +#: builtin.c:1478 msgid "mktime: received non-string argument" -msgstr "mktime: argument fourni n'est pas une chaîne" +msgstr "mktime: argument n'est pas une chaîne" -#: builtin.c:1460 +#: builtin.c:1523 +#, fuzzy msgid "system: received non-string argument" -msgstr "system: argument fourni n'est pas une chaîne" +msgstr "system: argument n'est pas une chaîne" -#: builtin.c:1581 eval.c:1883 -#, c-format +#: builtin.c:1644 eval.c:2019 +#, fuzzy, c-format msgid "reference to uninitialized field `$%d'" -msgstr "référence à un champ non initialisée « $%d »" +msgstr "référence à une variable non initialisée « %s »" -#: builtin.c:1608 +#: builtin.c:1671 +#, fuzzy msgid "tolower: received non-string argument" -msgstr "tolower: argument fourni n'est pas une chaîne" +msgstr "tolower: argument n'est pas une chaîne" -#: builtin.c:1657 +#: builtin.c:1720 +#, fuzzy msgid "toupper: received non-string argument" -msgstr "toupper: argument fourni n'est pas une chaîne" +msgstr "toupper: argument n'est pas une chaîne" -#: builtin.c:1702 +#: builtin.c:1765 msgid "atan2: received non-numeric first argument" -msgstr "atan2: premier argument fourni n'est pas numérique" +msgstr "atan2: premier argument n'est pas numérique" -#: builtin.c:1704 +#: builtin.c:1767 msgid "atan2: received non-numeric second argument" -msgstr "atan2: second argument fourni n'est pas numérique" +msgstr "atan2: second argument n'est pas numérique" -#: builtin.c:1723 +#: builtin.c:1786 msgid "sin: received non-numeric argument" -msgstr "sin: argument fourni n'est pas numérique" +msgstr "sin: argument n'est pas numérique" -#: builtin.c:1739 +#: builtin.c:1802 msgid "cos: received non-numeric argument" -msgstr "cos: argument fourni n'est pas numérique" +msgstr "cos: argument n'est pas numérique" -#: builtin.c:1788 +#: builtin.c:1852 msgid "srand: received non-numeric argument" -msgstr "srand: argument fourni n'est pas numérique" +msgstr "srand: argument n'est pas numérique" -#: builtin.c:1823 +#: builtin.c:1887 msgid "match: third argument is not an array" -msgstr "match: le 3e argument fourni n'est pas un tableau" +msgstr "match: le 3e argument n'est pas un tableau" -#: builtin.c:2307 +#: builtin.c:2414 +#, fuzzy msgid "gensub: third argument of 0 treated as 1" -msgstr "gensub: le 3e argument fourni de 0 traité comme un 1" +msgstr "gensub: le 3e argument de 0 traité comme un 1" -#: builtin.c:2416 builtin.c:2418 +#: builtin.c:2572 msgid "lshift: received non-numeric first argument" -msgstr "lshift: premier argument fourni n'est pas numérique" +msgstr "lshift: premier argument n'est pas numérique" + +#: builtin.c:2574 +#, fuzzy +msgid "lshift: received non-numeric second argument" +msgstr "atan2: second argument n'est pas numérique" -#: builtin.c:2420 +#: builtin.c:2580 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "lshift(%lf, %lf): valeurs négatives donneront d'étranges résultats" -#: builtin.c:2422 +#: builtin.c:2582 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): valeurs fractionnaires seront tronquées" -#: builtin.c:2424 +#: builtin.c:2584 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "lshift(%lf, %lf): trop grand déplacement donnera d'étranges résultats" -#: builtin.c:2453 builtin.c:2455 +#: builtin.c:2610 msgid "rshift: received non-numeric first argument" -msgstr "rshift: premier argument fourni n'est pas numérique" +msgstr "rshift: premier argument n'est pas numérique" + +#: builtin.c:2612 +#, fuzzy +msgid "rshift: received non-numeric second argument" +msgstr "atan2: second argument n'est pas numérique" -#: builtin.c:2457 +#: builtin.c:2618 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "rshift(%lf, %lf): valeurs négatives donneront d'étranges résultats" -#: builtin.c:2459 +#: builtin.c:2620 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): valeurs fractionnaires seront tronquées" -#: builtin.c:2461 +#: builtin.c:2622 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "rshift(%lf, %lf): trop grand déplacement donnera d'étranges résultats" -#: builtin.c:2490 builtin.c:2492 +#: builtin.c:2648 msgid "and: received non-numeric first argument" -msgstr "and: premier argument fourni n'est pas numérique" +msgstr "and: premier argument n'est pas numérique" -#: builtin.c:2494 +#: builtin.c:2650 +#, fuzzy +msgid "and: received non-numeric second argument" +msgstr "atan2: second argument n'est pas numérique" + +#: builtin.c:2656 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "and(%lf, %lf): valeurs négatives donneront d'étranges résultats" -#: builtin.c:2496 +#: builtin.c:2658 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): valeurs fractionnaires seront tronquées" -#: builtin.c:2525 builtin.c:2527 +#: builtin.c:2684 msgid "or: received non-numeric first argument" -msgstr "or: premier argument fourni n'est pas numérique" +msgstr "or: premier argument n'est pas numérique" + +#: builtin.c:2686 +#, fuzzy +msgid "or: received non-numeric second argument" +msgstr "atan2: second argument n'est pas numérique" -#: builtin.c:2529 +#: builtin.c:2692 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "or(%lf, %lf): valeurs négatives donneront d'étranges résultats" -#: builtin.c:2531 +#: builtin.c:2694 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): valeurs fractionnaires seront tronquées" -#: builtin.c:2560 builtin.c:2562 +#: builtin.c:2720 msgid "xor: received non-numeric first argument" -msgstr "xor: premier argument fourni n'est pas numérique" +msgstr "xor: premier argument n'est pas numérique" + +#: builtin.c:2722 +#, fuzzy +msgid "xor: received non-numeric second argument" +msgstr "atan2: second argument n'est pas numérique" -#: builtin.c:2564 +#: builtin.c:2728 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "xor(%lf, %lf): valeurs négatives donneront d'étranges résultats" -#: builtin.c:2566 +#: builtin.c:2730 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): valeurs fractionnaires seront tronquées" -#: builtin.c:2594 +#: builtin.c:2754 msgid "compl: received non-numeric argument" -msgstr "compl: argument fourni n'est pas numérique" +msgstr "compl: argument n'est pas numérique" -#: builtin.c:2596 +#: builtin.c:2760 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): valeurs négatives donneront d'étranges résultats" -#: builtin.c:2598 +#: builtin.c:2762 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): valeurs fractionnaires seront tronquées" -#: builtin.c:2771 +#: builtin.c:2935 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: « %s » n'est pas dans un catégorie de localisation valide" -#: eval.c:266 +#: eval.c:303 #, c-format msgid "unknown nodetype %d" msgstr "type de noeud inconnu %d" -#: eval.c:312 +#: eval.c:350 msgid "buffer overflow in genflags2str" msgstr "débordement de tampo dans genflag2str" -#: eval.c:647 +#: eval.c:382 eval.c:388 profile.c:837 #, c-format +msgid "attempt to use array `%s' in a scalar context" +msgstr "tentative d'utilisation du tableau « %s » dans un contexte scalaire" + +#: eval.c:730 +#, fuzzy, c-format msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" -"for loop: tableau « %s » a changé de taille de %ld à %ld durant l'exécution " -"de la boucle" +"for loop: tableau « %s » a changé de taille de %d à %d durant l'exécution de " +"la boucle" -#: eval.c:668 +#: eval.c:751 msgid "`break' outside a loop is not portable" msgstr "« break » en dehors de la boucle n'est pas portable" -#: eval.c:672 +#: eval.c:755 msgid "`break' outside a loop is not allowed" msgstr "« break » en dehors de la boucle n'est pas permis" -#: eval.c:689 +#: eval.c:772 msgid "`continue' outside a loop is not portable" msgstr "« continue » en dehors de la boucle n'est pas portable" -#: eval.c:693 +#: eval.c:776 msgid "`continue' outside a loop is not allowed" msgstr "« continue » en dehors de la boucle n'est pas permis" -#: eval.c:727 +#: eval.c:810 msgid "`next' cannot be called from a BEGIN rule" msgstr "« next » ne peut être appelé depuis une règle BEGIN" -#: eval.c:729 +#: eval.c:812 msgid "`next' cannot be called from an END rule" msgstr "« next » ne peut être appelé depuis une règle END" -#: eval.c:738 +#: eval.c:821 msgid "`nextfile' cannot be called from a BEGIN rule" msgstr "« nextfile » ne peut être appelé depuis une règle BEGIN" -#: eval.c:740 +#: eval.c:823 msgid "`nextfile' cannot be called from an END rule" msgstr "« nextfile » ne peut être appelé depuis une règle END" -#: eval.c:785 +#: eval.c:872 msgid "statement has no effect" msgstr "la déclaration n'a aucun effet" -#: eval.c:828 eval.c:1726 +#: eval.c:915 eval.c:1873 #, c-format msgid "can't use function name `%s' as variable or array" msgstr "" "ne peut utiliser le nom de la fonction « %s » comme variable ou tableau" -#: eval.c:835 eval.c:841 +#: eval.c:922 eval.c:928 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "référence à un argument non initialisé « %s »" -#: eval.c:848 eval.c:907 eval.c:1732 eval.c:1742 profile.c:807 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "tentative d'utilisation du tableau « %s » dans un contexte scalaire" - -#: eval.c:858 eval.c:1752 +#: eval.c:937 eval.c:1882 #, c-format msgid "reference to uninitialized variable `%s'" msgstr "référence à une variable non initialisée « %s »" -#: eval.c:1007 +#: eval.c:1083 msgid "" "concatenation: side effects in one expression have changed the length of " "another!" @@ -820,49 +856,50 @@ "concaténation: effects de bord dans une expression a modifié la longueur " "d'une autre!" -#: eval.c:1032 +#: eval.c:1162 msgid "assignment used in conditional context" msgstr "affectation utilisé dans un contexte conditionnel" -#: eval.c:1122 +#: eval.c:1252 msgid "division by zero attempted" msgstr "tentative de division par zéro" -#: eval.c:1137 +#: eval.c:1267 #, c-format msgid "division by zero attempted in `%%'" msgstr "tentative de division par zéro dans « %% »" -#: eval.c:1152 profile.c:683 +#: eval.c:1282 profile.c:713 #, c-format msgid "illegal type (%s) in tree_eval" msgstr "type illégal (%s) dans tree_eval" -#: eval.c:1328 +#: eval.c:1459 msgid "division by zero attempted in `/='" msgstr "tentative de division par zéro dans « /= »" -#: eval.c:1346 +#: eval.c:1477 #, c-format msgid "division by zero attempted in `%%='" msgstr "tentative de division par zéro dans « %%= »" -#: eval.c:1586 +#: eval.c:1738 #, c-format msgid "function `%s' called with more arguments than declared" msgstr "fonction « %s » appelée avec plus d'arguments que déclarées" -#: eval.c:1633 +#: eval.c:1782 #, c-format msgid "function `%s' not defined" msgstr "fonction « %s » non définie" -#: eval.c:1639 +#: eval.c:1788 #, c-format msgid "function %s called\n" msgstr "fonction %s appelée\n" -#: eval.c:1698 +#: eval.c:1845 +#, c-format msgid "" "\n" "\t# Function Call Stack:\n" @@ -872,43 +909,44 @@ "\t# Appel d'une fonction sur la pile:\n" "\n" -#: eval.c:1701 +#: eval.c:1848 +#, c-format msgid "\t# -- main --\n" msgstr "#t# -- main --\n" -#: eval.c:1867 +#: eval.c:2003 msgid "attempt to field reference from non-numeric value" msgstr "tentative de référence un champ à partir d'une valeur non numérique" -#: eval.c:1869 +#: eval.c:2005 msgid "attempt to reference from null string" msgstr "tentative de référence à partir d'une chaîne nulle" -#: eval.c:1875 +#: eval.c:2011 #, c-format msgid "attempt to access field %d" msgstr "tentative d'accès du champ %d" -#: eval.c:1896 eval.c:1903 profile.c:900 +#: eval.c:2032 eval.c:2039 profile.c:934 msgid "assignment is not allowed to result of builtin function" msgstr "" "l'affectation n'est pas permise pour obtenir un résultat d'une fonction " "interne" -#: eval.c:1951 +#: eval.c:2103 msgid "`IGNORECASE' is a gawk extension" msgstr "« IGNORECASE » est une extension de gawk" -#: eval.c:1980 +#: eval.c:2133 msgid "`BINMODE' is a gawk extension" msgstr "« BINMODE » est une extension de gawk" -#: eval.c:2092 +#: eval.c:2255 #, c-format msgid "bad `%sFMT' specification `%s'" msgstr "« %sFMT » spécification erronée « %s »" -#: eval.c:2170 +#: eval.c:2333 msgid "turning off `--lint' due to assignment to `LINT'" msgstr "désactivation « --lint » en raison d'une affectation à « LINT »" @@ -926,7 +964,56 @@ msgid "extension: library `%s': cannot call function `%s' (%s)\n" msgstr "extension: librairie « %s »: ne peut appeler la fonction « %s » (%s)\n" -#: ext.c:183 +#: ext.c:102 +msgid "extension: missing function name" +msgstr "" + +#: ext.c:107 +#, fuzzy, c-format +msgid "extension: illegal character `%c' in function name `%s'" +msgstr "extension: librairie « %s »: ne peut appeler la fonction « %s » (%s)\n" + +#: ext.c:113 +#, fuzzy, c-format +msgid "extension: can't redefine function `%s'" +msgstr "extension: ne peut ouvrir « %s » (%s)\n" + +#: ext.c:117 +#, fuzzy, c-format +msgid "extension: function `%s' already defined" +msgstr "fonction « %s » non définie" + +#: ext.c:122 +#, c-format +msgid "extension: can't use gawk built-in `%s' as function name" +msgstr "" + +#: ext.c:124 +#, fuzzy, c-format +msgid "extension: function name `%s' previously defined" +msgstr "nom de la fonction « %s » définie précédemment" + +#: ext.c:201 +#, c-format +msgid "function `%s' defined to take no more than `%d' argument(s)" +msgstr "" + +#: ext.c:204 +#, fuzzy, c-format +msgid "function `%s': missing argument #%d" +msgstr "fonction « %s » non définie" + +#: ext.c:214 +#, fuzzy, c-format +msgid "function `%s': argument #%d: attempt to use scalar as an array" +msgstr "tentative d'utilisation du scalaire « %s » comme un tableau" + +#: ext.c:218 +#, c-format +msgid "function `%s': argument #%d: attempt to use array as a scalar" +msgstr "" + +#: ext.c:243 msgid "Operation Not Supported" msgstr "Opération non supportée" @@ -955,564 +1042,554 @@ msgid "null string for `FS' is a gawk extension" msgstr "chaîne vide pour « FS » est une extension de gawk" -#: getopt.c:692 getopt.c:704 +#: getopt.c:692 getopt.c:711 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s: option « %s » est ambiguë\n" -#: getopt.c:737 getopt.c:741 +#: getopt.c:744 getopt.c:748 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" -msgstr "%s: option « --%s » n'admet pas d'argument\n" +msgstr "%s: option « --%s » n'admet pas d'arguement\n" -#: getopt.c:750 getopt.c:755 +#: getopt.c:757 getopt.c:762 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" -msgstr "%s: l'option « %c%s » ne requiert pas d'argument\n" +msgstr "%s: l'option « %c%s » ne requiert pas d'arguement\n" -#: getopt.c:791 getopt.c:804 getopt.c:1093 getopt.c:1106 +#: getopt.c:807 getopt.c:829 getopt.c:1159 getopt.c:1181 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "%s: l'option « %s » requiert un argument\n" -#: getopt.c:842 getopt.c:845 +#: getopt.c:867 getopt.c:870 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s: option non reconnue « --%s »\n" -#: getopt.c:853 getopt.c:856 +#: getopt.c:878 getopt.c:881 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s: option non reconnue « %c%s »\n" -#: getopt.c:903 getopt.c:906 +#: getopt.c:936 getopt.c:939 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: option illégale -- %c\n" -#: getopt.c:912 getopt.c:915 +#: getopt.c:945 getopt.c:948 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s: option invalide -- %c\n" -#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:434 +#: getopt.c:1003 getopt.c:1022 getopt.c:1234 getopt.c:1255 main.c:433 #, c-format msgid "%s: option requires an argument -- %c\n" -msgstr "%s: l'option requiert un argument -- %c\n" +msgstr "%s: l'option requiert un arguement -- %c\n" -#: getopt.c:1025 getopt.c:1036 +#: getopt.c:1074 getopt.c:1093 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s: l'option « -W %s » est ambiguë\n" -#: getopt.c:1060 getopt.c:1072 +#: getopt.c:1117 getopt.c:1138 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" -msgstr "%s: l'option « -W %s » ne requiert pas d'argument\n" +msgstr "%s: l'option « -W %s » ne requiert pas d'arguement\n" -#: io.c:305 +#: io.c:308 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "ne peut ouvrir le fichier « %s » en lecture (%s)" -#: io.c:392 +#: io.c:395 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "fermeture de fd %d (« %s ») en échec (%s)" -#: io.c:530 +#: io.c:533 #, c-format msgid "invalid tree type %s in redirect()" msgstr "type d'arbre invalide %s dans redirect()" -#: io.c:536 +#: io.c:539 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "" "l'expression de la redirection de « %s » a seulement une valeur numérique" -#: io.c:542 +#: io.c:545 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "" "l'expression de la redirection de « %s » a une valeur nulle pour la chaîne" -#: io.c:547 +#: io.c:550 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "nom de fichier « %s » pour le redirection « %s » peut être le résultat d'une " "expression logique" -#: io.c:569 +#: io.c:588 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "mélange non nécessaire de « > » et de « >> » pour le fichier « %.*s »" -#: io.c:621 +#: io.c:640 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "ne peut ouvrir un pipe « %s » en sortie (%s)" -#: io.c:630 +#: io.c:649 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "ne peut ouvrir un pipe « %s » en entrée (%s)" -#: io.c:643 +#: io.c:662 #, c-format msgid "can't open two way socket `%s' for input/output (%s)" msgstr "" "ne peut ouvrir un socket bidirectionnel « %s » pour les entrées/sorties (%s)" -#: io.c:647 +#: io.c:666 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "" "ne peut ouvrir un pipe bidirectionnel « %s » pour les entrées/sorties (%s)" -#: io.c:723 +#: io.c:742 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "ne peut rediriger de « %s » (%s)" -#: io.c:726 +#: io.c:745 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "ne peut rediriger vers « %s » (%s)" -#: io.c:765 +#: io.c:784 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "limite système atteinte pour l'ouverture des fichiers: début du multiplexage " "des descripteurs de fichiers" -#: io.c:777 +#: io.c:800 #, c-format msgid "close of `%s' failed (%s)." msgstr "fermeture de « %s » en échec (%s)" -#: io.c:784 +#: io.c:808 msgid "too many pipes or input files open" msgstr "trop de pipes ou de fichiers en lecture ouverts" -#: io.c:807 +#: io.c:831 msgid "close: second argument must be `to' or `from'" msgstr "close: 2e argument doit être « to » ou « from »" -#: io.c:821 +#: io.c:845 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "close: « %.*s » n'est pas ni un fichier ouvert, pipe ou co-processus" -#: io.c:825 +#: io.c:849 msgid "close of redirection that was never opened" msgstr "fermeture de la redirection qui n'a jamais été ouverte" -#: io.c:862 +#: io.c:945 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: redirection « %s » n'a pas été ouverte ave « |& » 2e argument ignoré" -#: io.c:924 +#: io.c:960 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "constat d'échec (%d) lors de la fermeture du pipe « %s » (%s)" -#: io.c:927 +#: io.c:963 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "constat d'échec (%d) lors de la fermeture du fichier « %s » (%s)" -#: io.c:946 +#: io.c:983 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "aucune fermeture explicite du socket « %s » fournie" -#: io.c:949 +#: io.c:986 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "aucune fermeture explicite du co-processus « %s » fournie" -#: io.c:952 +#: io.c:989 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "aucune fermeture explicite du pipe « %s » fournie" -#: io.c:955 +#: io.c:992 #, c-format msgid "no explicit close of file `%s' provided" msgstr "aucune fermeture explicite du fichier « %s » fournie" -#: io.c:984 io.c:1038 +#: io.c:1021 io.c:1075 #, c-format msgid "error writing standard output (%s)" msgstr "erreur lors de l'écriture vers stdout (%s)" -#: io.c:988 io.c:1042 +#: io.c:1025 io.c:1079 #, c-format msgid "error writing standard error (%s)" msgstr "erreur lors de l'écriture vers stderr (%s)" -#: io.c:996 +#: io.c:1033 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "vidange du pipie de « %s » en échec (%s)" -#: io.c:999 +#: io.c:1036 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "vidange du pipe par le co-processus vers « %s » en échec (%s)" -#: io.c:1002 +#: io.c:1039 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "vidange du fichier « %s » en échec (%s)" -#: io.c:1161 +#: io.c:1198 msgid "/inet/raw client not ready yet, sorry" msgstr "le client /inet/raw n'est pas encore prêt, désolé" -#: io.c:1163 io.c:1200 +#: io.c:1200 io.c:1237 msgid "only root may use `/inet/raw'." msgstr "seul root peut utiliser « /inet/raw »" -#: io.c:1198 +#: io.c:1235 msgid "/inet/raw server not ready yet, sorry" msgstr "le serveur /inet/raw n'est pas encore prêt, désolé" -#: io.c:1288 +#: io.c:1325 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "aucun protocole (connu) fourni dans le nom de fichier spécial « %s »" -#: io.c:1306 +#: io.c:1343 #, c-format msgid "special file name `%s' is incomplete" msgstr "nom spécial de fichier « %s » est incomplet" -#: io.c:1318 +#: io.c:1355 #, c-format msgid "local port invalid in `%s'" msgstr "port local invalide dans « %s »" -#: io.c:1330 +#: io.c:1367 msgid "must supply a remote hostname to `/inet'" msgstr "un nom de hôte distant doit être fourni à « /inet »" -#: io.c:1345 +#: io.c:1382 msgid "must supply a remote port to `/inet'" msgstr "un port distant doit être fournis à « /inet »" -#: io.c:1351 +#: io.c:1388 #, c-format msgid "remote port invalid in `%s'" msgstr "port distant invalide dans « %s »" -#: io.c:1361 +#: io.c:1398 msgid "TCP/IP communications are not supported" msgstr "les communications TCP/IP ne sont pas supportées" -#: io.c:1370 io.c:1551 +#: io.c:1407 io.c:1588 #, c-format msgid "file `%s' is a directory" msgstr "le fichier « %s » est un répertoire" -#: io.c:1440 +#: io.c:1477 #, c-format msgid "use `PROCINFO[\"%s\"]' instead of `%s'" msgstr "utliser « PROCINFO[\"%s\"] » au lieu de « %s »" -#: io.c:1472 +#: io.c:1509 msgid "use `PROCINFO[...]' instead of `/dev/user'" msgstr "utliser « PROCINFO[\"%s\"] » au lieu de « /dev/user »" -#: io.c:1537 io.c:1711 +#: io.c:1574 io.c:1748 #, c-format msgid "could not open `%s', mode `%s'" msgstr "ne peut ouvrir « %s », mode « %s »" -#: io.c:1762 -#, c-format +#: io.c:1799 +#, fuzzy, c-format msgid "close of master pty failed (%s)" -msgstr "échec de la fermeture du pty maître (%s)" +msgstr "échec de la fermeture du pipe (%s)" -#: io.c:1764 io.c:1916 io.c:2068 +#: io.c:1801 io.c:1953 io.c:2105 #, c-format msgid "close of stdout in child failed (%s)" msgstr "échec de fermeture de stdout du processus fils (%s)" -#: io.c:1767 -#, c-format +#: io.c:1804 +#, fuzzy, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" -msgstr "" -"échec de redirection du pty esclave vers stdout du processus fils (dup: %s)" +msgstr "échec de redirection du pipe vers stdout du processus fils (dup: %s)" -#: io.c:1769 io.c:1921 +#: io.c:1806 io.c:1958 #, c-format msgid "close of stdin in child failed (%s)" msgstr "échec de fermeture de stdin du processus fils (%s)" -#: io.c:1772 -#, c-format +#: io.c:1809 +#, fuzzy, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" -msgstr "" -"échec de redirection du pty esclave vers stdin du processus fils (dup: %s)" +msgstr "échec de redirection du pipe vers stdin du processus fils (dup: %s)" -#: io.c:1774 io.c:1793 -#, c-format +#: io.c:1811 io.c:1830 +#, fuzzy, c-format msgid "close of slave pty failed (%s)" -msgstr "échec de la fermeture du pty esclave (%s)" +msgstr "échec de la fermeture du pipe (%s)" -#: io.c:1867 io.c:1919 io.c:2049 io.c:2071 +#: io.c:1904 io.c:1956 io.c:2086 io.c:2108 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "échec de redirection du pipe vers stdout du processus fils (dup: %s)" -#: io.c:1871 io.c:1924 +#: io.c:1908 io.c:1961 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "échec de redirection du pipe vers stdin du processus fils (dup: %s)" -#: io.c:1888 io.c:2062 +#: io.c:1925 io.c:2099 msgid "restoring stdout in parent process failed\n" msgstr "restauration de stdout par le processus parent a échoué\n" -#: io.c:1893 +#: io.c:1930 msgid "restoring stdin in parent process failed\n" msgstr "restauration de stdin par le processus parent a échoué\n" -#: io.c:1927 io.c:2073 io.c:2084 +#: io.c:1964 io.c:2110 io.c:2121 #, c-format msgid "close of pipe failed (%s)" msgstr "échec de la fermeture du pipe (%s)" -#: io.c:1972 +#: io.c:2009 msgid "`|&' not supported" msgstr "« |& » non supporté" -#: io.c:2039 +#: io.c:2076 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "ne ouvrir un pipe « %s » (%s)" -#: io.c:2080 +#: io.c:2117 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "ne créer le processus fils pour « %s » (fork: %s)" -#: io.c:2423 +#: io.c:2460 #, c-format msgid "data file `%s' is empty" msgstr "le fichier de données « %s » est vide" -#: io.c:2466 io.c:2474 +#: io.c:2503 io.c:2511 msgid "could not allocate more input memory" -msgstr "ne peut allouer plus de mémoire pour l'entrée" +msgstr "" -#: io.c:2832 io.c:2895 +#: io.c:2869 io.c:2932 #, c-format msgid "error reading input file `%s': %s" msgstr "erreur lors de la lecture du fichier source « %s »: %s" -#: io.c:3020 +#: io.c:3057 msgid "multicharacter value of `RS' is a gawk extension" msgstr "valeur de « RS » avec multiple caractères est une extension gawk" -#: main.c:324 +#: main.c:323 msgid "`-m[fr]' option irrelevant in gawk" msgstr "« -m[fr] » est une option non pertinente en gawk" -#: main.c:326 +#: main.c:325 msgid "-m option usage: `-m[fr] nnn'" msgstr "-m usage de l'option: « -m[fr] nnn »" -#: main.c:343 +#: main.c:342 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: l'option « -W %s » n'est pas reconnue, ignorée\n" -#: main.c:380 +#: main.c:379 msgid "empty argument to `--source' ignored" msgstr "argument vide à l'option « --source », ignorée" -#: main.c:451 +#: main.c:450 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" "variable d'environnement « POSIXLY__CORRECT » initialisée: utilisation de « " "--posix »" -#: main.c:456 +#: main.c:455 msgid "`--posix' overrides `--traditional'" msgstr "« --posix » écrase « --traditional »" -#: main.c:467 +#: main.c:466 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "« --posix »/« --traditional » écrase « --non-decimal-data »" -#: main.c:471 -#, c-format +#: main.c:470 +#, fuzzy, c-format msgid "running %s setuid root may be a security problem" msgstr "" -"l'exécution de %s en mode setuid root peut causer un problème de sécurité" +"exécution de %s en mode setuid root peut causer un problème de sécurité" -#: main.c:512 -#, c-format +#: main.c:511 +#, fuzzy, c-format msgid "can't set binary mode on stdin (%s)" -msgstr "ne peut initialiser le mode binaire sur stdin (%s)" +msgstr "ne peut initialiser le mode sur stdin (%s)" -#: main.c:515 -#, c-format +#: main.c:514 +#, fuzzy, c-format msgid "can't set binary mode on stdout (%s)" -msgstr "ne peut initialiser le mode binaire sur stdout (%s)" +msgstr "ne peut initialiser le mode sur stdout (%s)" -#: main.c:517 -#, c-format +#: main.c:516 +#, fuzzy, c-format msgid "can't set binary mode on stderr (%s)" -msgstr "ne peut initialiser le mode binaire sur stderr (%s)" +msgstr "ne peut initialiser le mode sur stderr (%s)" -#: main.c:547 +#: main.c:546 msgid "no program text at all!" msgstr "aucun programme!" -#: main.c:620 +#: main.c:623 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "" "Usage: %s [style des options POSIX ou GNU] -f fichierprog [--] fichier ...\n" -#: main.c:622 +#: main.c:625 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "" "Usage: %s [style des options POSIX ou GNU] [--] %cprogram%c fichier ...\n" -#: main.c:627 +#: main.c:630 msgid "POSIX options:\t\tGNU long options:\n" msgstr "Options POSIX:\t\toptions de long format GNU:\n" -#: main.c:628 +#: main.c:631 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f fichierprog\t\t--file=fichierprog\n" -#: main.c:629 +#: main.c:632 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "#t-F fs\t\t\t--field-separator=fs\n" -#: main.c:630 +#: main.c:633 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "#t-v var=valeur\t\t--assign=var=valeur\n" -#: main.c:631 +#: main.c:634 msgid "\t-m[fr] val\n" msgstr "\t-m[fr] valeur\n" -#: main.c:632 +#: main.c:635 msgid "\t-W compat\t\t--compat\n" msgstr "\t-W compat\t\t--compat\n" -#: main.c:633 +#: main.c:636 msgid "\t-W copyleft\t\t--copyleft\n" msgstr "\t-W copyleft\t\t--copyleft\n" -#: main.c:634 +#: main.c:637 msgid "\t-W copyright\t\t--copyright\n" msgstr "\t-W copyright\t\t--copyright\n" -#: main.c:635 +#: main.c:638 msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" msgstr "\t-W dump-variables[=fichier]\t--dump-variables[=fichier]\n" -#: main.c:636 +#: main.c:639 msgid "\t-W gen-po\t\t--gen-po\n" msgstr "\t-W gen-po\t\t--gen-po\n" -#: main.c:637 +#: main.c:640 msgid "\t-W help\t\t\t--help\n" msgstr "\t-W help\t\t\t--help\n" -#: main.c:638 +#: main.c:641 msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -#: main.c:639 +#: main.c:642 msgid "\t-W lint-old\t\t--lint-old\n" msgstr "\t-W lint-old\t\t--lint-old\n" -#: main.c:640 +#: main.c:643 msgid "\t-W non-decimal-data\t--non-decimal-data\n" msgstr "\t-W non-decimal-data\t--non-decimal-data\n" -#: main.c:642 +#: main.c:645 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" -#: main.c:645 +#: main.c:648 msgid "\t-W parsedebug\t\t--parsedebug\n" msgstr "\t-W parsedebug\t\t--parsedebug\n" -#: main.c:647 +#: main.c:650 msgid "\t-W profile[=file]\t--profile[=file]\n" msgstr "\t-W profile[=fichier]\t--profile[=fichier]\n" -#: main.c:648 +#: main.c:651 msgid "\t-W posix\t\t--posix\n" msgstr "\t-W posix\t\t--posix\n" -#: main.c:649 +#: main.c:652 msgid "\t-W re-interval\t\t--re-interval\n" msgstr "\t-W re-interval\t\t--re-interval\n" -#: main.c:650 +#: main.c:653 msgid "\t-W source=program-text\t--source=program-text\n" msgstr "\t-W source=program-text\t--source=program-text\n" -#: main.c:651 +#: main.c:654 msgid "\t-W traditional\t\t--traditional\n" msgstr "\t-W traditional\t\t--traditional\n" -#: main.c:652 +#: main.c:655 msgid "\t-W usage\t\t--usage\n" msgstr "\t-W usage\t\t--usage\n" -#: main.c:653 +#: main.c:656 msgid "\t-W version\t\t--version\n" msgstr "\t-W version\t\t--version\n" -#: main.c:657 +#: main.c:660 +#, fuzzy msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" "section `Reporting Problems and Bugs' in the printed version.\n" "\n" -msgstr "" -"\n" -"Pour rapporter une anomalie, voir la rubrique « Bugs » dans « gawk.info »\n" -"dans la section « Reporting Problems and Bugs » de la version imprimée.\n" +msgstr "section « Reporting Problems and Bugs » dans la version imprimée.\n" -#: main.c:661 +#: main.c:664 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" "\n" msgstr "" -"gawk est un analyseur de patron et un traitement de langage.\n" -"Par défaut, il lit de l'entrée standard et écrit sur la sortie standard.\n" -"\n" -#: main.c:665 +#: main.c:668 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" msgstr "" -"Exemples:\n" -"\tgawk '{ sum += $1 }; END { print sum }' fichier\n" -"\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:682 +#: main.c:685 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1531,7 +1608,7 @@ "soit (selon vos préférences) toute version ultérieure.\n" "\n" -#: main.c:690 +#: main.c:693 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -1546,7 +1623,7 @@ "Pour plus d'informations à ce sujet, consulter la « GNU General Public " "License ».\n" -#: main.c:696 +#: main.c:699 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, write to the Free Software\n" @@ -1556,55 +1633,54 @@ "avec ce programme; sinon, écrire à la Free Software Foundation, Inc.,\n" "59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n" -#: main.c:730 +#: main.c:733 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "" "-Ft ne permet pas d'initialiser FS à un tabulateur dans la version POSIX de " "awk" -#: main.c:956 +#: main.c:962 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" "\n" msgstr "" -"%s: `%s' argument à `-v' n'a pas le format `var=valeur'\n" -"\n" -#: main.c:976 +#: main.c:982 #, c-format msgid "`%s' is not a legal variable name" -msgstr "`%s' n'est pas un nom de variable légal" +msgstr "" -#: main.c:979 +#: main.c:985 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" -msgstr "`%s' n'est pas un nom de variable, recherche du fichier `%s=%s'" +msgstr "" -#: main.c:1012 +#: main.c:1018 msgid "floating point exception" msgstr "exception de la virgule flottante" -#: main.c:1019 +#: main.c:1025 msgid "fatal error: internal error" msgstr "erreur fatale: erreur interne" -#: main.c:1069 +#: main.c:1075 #, c-format msgid "no pre-opened fd %d" msgstr "aucun fd pré-ouvert pour %d" -#: main.c:1074 +#: main.c:1082 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "ne peut pré-ouvrir /dev/null pour le descripteud fd %d" -#: main.c:1097 main.c:1106 +#: main.c:1105 main.c:1114 #, c-format msgid "could not find groups: %s" msgstr "n'a pu trouvé les groupes: %s" #: msg.c:54 +#, c-format msgid "cmd. line:" msgstr "cmd. ligne:" @@ -1624,19 +1700,19 @@ msgid "can't convert string to float" msgstr "ne peut convertir la chaîne en nombre flottant" -#: node.c:355 +#: node.c:357 msgid "backslash at end of string" msgstr "barre oblique inverse à la fin de la chaîne" -#: node.c:539 +#: node.c:541 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX ne permet pas de séquence d'échappement « \\x »" -#: node.c:545 +#: node.c:547 msgid "no hex digits in `\\x' escape sequence" msgstr "aucun chiffre hexadécimal dans la séquence d'échappement « \\x » " -#: node.c:579 +#: node.c:581 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "séquence d'échappement « \\%c » traitée simplement comme « %c »" @@ -1651,21 +1727,27 @@ msgid "could not open `%s' for writing: %s" msgstr "ne peut ouvrir « %s » en écriture: %s" -#: profile.c:449 -#, c-format +#: profile.c:467 +#, fuzzy, c-format msgid "internal error: %s with null vname" -msgstr "erreur interne: %s avec un vname nul" +msgstr "erreur interne: Node_var avec un vname nul" -#: profile.c:512 +#: profile.c:530 msgid "# treated internally as `delete'" -msgstr "# traitée de manière interne comme « delete »" +msgstr "" -#: profile.c:1162 +#: profile.c:1167 +#, c-format +msgid "# this is a dynamically loaded extension function" +msgstr "" + +#: profile.c:1198 #, c-format msgid "\t# gawk profile, created %s\n" msgstr "\t# profile gawk, créé %s\n" -#: profile.c:1165 +#: profile.c:1201 +#, c-format msgid "" "\t# BEGIN block(s)\n" "\n" @@ -1673,7 +1755,8 @@ "#t# DÉBUT de bloc(s)\n" "\n" -#: profile.c:1175 +#: profile.c:1211 +#, c-format msgid "" "\t# Rule(s)\n" "\n" @@ -1681,7 +1764,8 @@ "\t# Règle(s)\n" "\n" -#: profile.c:1181 +#: profile.c:1217 +#, c-format msgid "" "\t# END block(s)\n" "\n" @@ -1689,7 +1773,8 @@ "\t# FIN de bloc(s)\n" "\n" -#: profile.c:1201 +#: profile.c:1237 +#, c-format msgid "" "\n" "\t# Functions, listed alphabetically\n" @@ -1697,115 +1782,109 @@ "\n" "\t# Liste alphabétique des fonctions\n" -#: profile.c:1413 +#: profile.c:1452 #, c-format msgid "unexpected type %s in prec_level" msgstr "type %s inattendu dans prec_level" -#: re.c:193 -#, c-format -msgid "regex match failed, not enough memory to match string \"%.*s%s\"" -msgstr "" -"échec de concordance de regex, pas assez de mémoire pour traiter la chaîne " -"\"%.*s%s\"" - -#: regcomp.c:136 +#: regcomp.c:150 msgid "Success" msgstr "Succès" -#: regcomp.c:139 +#: regcomp.c:153 msgid "No match" msgstr "Aucune concordance" -#: regcomp.c:142 +#: regcomp.c:156 msgid "Invalid regular expression" msgstr "Expression régulière invalide" -#: regcomp.c:145 +#: regcomp.c:159 msgid "Invalid collation character" msgstr "Caractère de collation invalide" -#: regcomp.c:148 +#: regcomp.c:162 msgid "Invalid character class name" msgstr "Nom de classe de caractères invalide" -#: regcomp.c:151 +#: regcomp.c:165 msgid "Trailing backslash" msgstr "Barre oblique inverse de terminaison" -#: regcomp.c:154 +#: regcomp.c:168 msgid "Invalid back reference" msgstr "Mauvaise référence arrière" -#: regcomp.c:157 +#: regcomp.c:171 msgid "Unmatched [ or [^" msgstr "Non appariement de [ ou [^" -#: regcomp.c:160 +#: regcomp.c:174 msgid "Unmatched ( or \\(" msgstr "Non appariement de ( ou \\(" -#: regcomp.c:163 +#: regcomp.c:177 msgid "Unmatched \\{" msgstr "Non appariement de \\{" -#: regcomp.c:166 +#: regcomp.c:180 msgid "Invalid content of \\{\\}" msgstr "Contenu invalide de \\{\\}" -#: regcomp.c:169 +#: regcomp.c:183 msgid "Invalid range end" msgstr "Borne finale invalide" -#: regcomp.c:172 +#: regcomp.c:186 msgid "Memory exhausted" msgstr "Mémoire épuisée" -#: regcomp.c:175 +#: regcomp.c:189 msgid "Invalid preceding regular expression" msgstr "Expression régulière précédente invalide" -#: regcomp.c:178 +#: regcomp.c:192 msgid "Premature end of regular expression" msgstr "Fin prématurée de l'expression régulière" -#: regcomp.c:181 +#: regcomp.c:195 msgid "Regular expression too big" msgstr "Expression régulière trop grande" -#: regcomp.c:184 +#: regcomp.c:198 msgid "Unmatched ) or \\)" msgstr "Non appariement de ) ou \\)" -#: regcomp.c:621 +#: regcomp.c:668 msgid "No previous regular expression" msgstr "Aucune expression régulière antérieure" -#~ msgid "substr: length %g is < 0" -#~ msgstr "substr: longueur %g est < 0" - #~ msgid "delete: illegal use of variable `%s' as array" #~ msgstr "" #~ "destruction: utilisation illégale d'une variable « %s » comme tableau" #~ msgid "asort: first argument is not an array" -#~ msgstr "asort(): le premier argument fourni n'est pas dans le tableau" +#~ msgstr "asort(): le premier argument n'est pas dans le tableau" #~ msgid "asort: second argument is not an array" -#~ msgstr "asort(): le second argument fourni n'est pas dans le tableau" +#~ msgstr "asort(): le scond argument n'est pas dans le tableau" -#~ msgid "internal error: Node_var_array with null vname" -#~ msgstr "erreur interne: Node_var_array avec un vname nul" +#~ msgid "" +#~ "\n" +#~ "To report bugs, see node `Bugs' in `gawk.info', which is\n" +#~ msgstr "" +#~ "\n" +#~ "Pour rapporter une anomalie, voir « Bugs » dans « gawk.info », dans la\n" #~ msgid "invalid syntax in name `%s' for variable assignment" #~ msgstr "syntaxe invalide dans le nom « %s » pour l'affectation de variable" +#~ msgid "internal error: Node_var_array with null vname" +#~ msgstr "erreur interne: Node_var_array avec un vname nul" + #~ msgid "or used in other expression context" #~ msgstr "ou utilisée dans un autre contexte d'expression" -#~ msgid "attempt to use function `%s' as array" -#~ msgstr "tentative d'utilisation de la fonction « %s » dans le tableau" - #~ msgid "`%s' is a function, assignment is not allowed" #~ msgstr "« %s » est une fonction, l'affectation n'est pas permise" @@ -1825,9 +1904,6 @@ #~ msgid "gsub third parameter is not a changeable object" #~ msgstr "gsub: 3e paramètre n'est pas un objet interchangeable" -#~ msgid "Unbalanced [" -#~ msgstr "Non appariement de [" - #~ msgid "Unfinished \\ escape" #~ msgstr "séquence d'échappement \\ non terminée" @@ -1837,6 +1913,9 @@ #~ msgid "malformed repeat count" #~ msgstr "compteur de répétition mal composé" +#~ msgid "Unbalanced [" +#~ msgstr "Non appariement de [" + #~ msgid "Unbalanced (" #~ msgstr "Non appariement de (" @@ -1852,13 +1931,6 @@ #~ msgid "internal error: file `%s', line %d\n" #~ msgstr "erreur interne: fichier « %s », ligne %d\n" -#~ msgid "" -#~ "\n" -#~ "To report bugs, see node `Bugs' in `gawk.info', which is\n" -#~ msgstr "" -#~ "\n" -#~ "Pour rapporter une anomalie, voir « Bugs » dans « gawk.info », dans la\n" - #~ msgid "pipe from `%s': could not set close-on-exec (fcntl: %s)" #~ msgstr "pipe de `%s': ne peut initialiser close-on-exec (fcntl: %s)" diff -urN gawk-3.1.3/po/gawk.pot gawk-3.1.4/po/gawk.pot --- gawk-3.1.3/po/gawk.pot 2003-07-07 21:20:32.000000000 +0300 +++ gawk-3.1.4/po/gawk.pot 2004-07-15 13:02:11.000000000 +0300 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2003-07-07 11:20-0700\n" +"POT-Creation-Date: 2004-07-15 13:02+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,55 +18,60 @@ #: array.c:112 #, c-format +msgid "attempt to use function `%s' as an array" +msgstr "" + +#: array.c:115 +#, c-format msgid "attempt to use scalar parameter `%s' as an array" msgstr "" -#: array.c:113 +#: array.c:118 #, c-format msgid "attempt to use scalar `%s' as array" msgstr "" -#: array.c:151 +#: array.c:156 #, c-format msgid "from %s" msgstr "" -#: array.c:506 +#: array.c:511 #, c-format msgid "reference to uninitialized element `%s[\"%s\"]'" msgstr "" -#: array.c:512 +#: array.c:517 #, c-format msgid "subscript of array `%s' is null string" msgstr "" -#: array.c:609 +#: array.c:621 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "" -#: array.c:769 +#: array.c:791 #, c-format msgid "%s: empty (null)\n" msgstr "" -#: array.c:774 +#: array.c:796 #, c-format msgid "%s: empty (zero)\n" msgstr "" -#: array.c:778 +#: array.c:800 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "" -#: array.c:807 +#: array.c:829 #, c-format msgid "%s: is parameter\n" msgstr "" -#: array.c:812 +#: array.c:834 #, c-format msgid "%s: array_ref to %s\n" msgstr "" @@ -90,793 +95,811 @@ msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "" -#: awkgram.y:340 awkgram.y:615 +#: awkgram.y:341 awkgram.y:619 msgid "statement may have no effect" msgstr "" -#: awkgram.y:435 awkgram.y:455 +#: awkgram.y:436 awkgram.y:456 #, c-format msgid "`%s' used in %s action" msgstr "" -#: awkgram.y:448 awkgram.y:451 +#: awkgram.y:449 awkgram.y:452 msgid "`nextfile' is a gawk extension" msgstr "" -#: awkgram.y:465 +#: awkgram.y:466 msgid "`return' used outside function context" msgstr "" -#: awkgram.y:504 +#: awkgram.y:508 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" -#: awkgram.y:517 awkgram.y:524 +#: awkgram.y:521 awkgram.y:528 msgid "`delete array' is a gawk extension" msgstr "" -#: awkgram.y:532 awkgram.y:539 +#: awkgram.y:536 awkgram.y:543 msgid "`delete(array)' is a non-portable tawk extension" msgstr "" -#: awkgram.y:583 +#: awkgram.y:587 #, c-format msgid "duplicate case values in switch body: %s" msgstr "" -#: awkgram.y:593 +#: awkgram.y:597 msgid "Duplicate `default' detected in switch body" msgstr "" -#: awkgram.y:681 +#: awkgram.y:686 msgid "multistage two-way pipelines don't work" msgstr "" -#: awkgram.y:772 +#: awkgram.y:777 msgid "regular expression on right of assignment" msgstr "" -#: awkgram.y:782 +#: awkgram.y:800 msgid "regular expression on left of `~' or `!~' operator" msgstr "" -#: awkgram.y:790 +#: awkgram.y:808 msgid "regular expression on right of comparison" msgstr "" -#: awkgram.y:857 +#: awkgram.y:875 msgid "non-redirected `getline' undefined inside END action" msgstr "" -#: awkgram.y:884 +#: awkgram.y:902 msgid "call of `length' without parentheses is not portable" msgstr "" -#: awkgram.y:887 +#: awkgram.y:905 msgid "call of `length' without parentheses is deprecated by POSIX" msgstr "" -#: awkgram.y:940 +#: awkgram.y:958 msgid "use of non-array as array" msgstr "" -#: awkgram.y:942 +#: awkgram.y:960 msgid "invalid subscript expression" msgstr "" -#: awkgram.y:1140 +#: awkgram.y:1158 msgid "unexpected newline or end of string" msgstr "" -#: awkgram.y:1235 +#: awkgram.y:1254 msgid "empty program text on command line" msgstr "" -#: awkgram.y:1292 +#: awkgram.y:1307 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "" -#: awkgram.y:1327 +#: awkgram.y:1384 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "" -#: awkgram.y:1335 +#: awkgram.y:1392 #, c-format msgid "source file `%s' is empty" msgstr "" -#: awkgram.y:1537 awkgram.y:1647 awkgram.y:1665 awkgram.y:2015 awkgram.y:2100 +#: awkgram.y:1590 awkgram.y:1700 awkgram.y:1718 awkgram.y:2068 awkgram.y:2153 msgid "source file does not end in newline" msgstr "" -#: awkgram.y:1601 +#: awkgram.y:1654 msgid "unterminated regexp ends with `\\' at end of file" msgstr "" -#: awkgram.y:1621 +#: awkgram.y:1674 msgid "unterminated regexp" msgstr "" -#: awkgram.y:1624 +#: awkgram.y:1677 msgid "unterminated regexp at end of file" msgstr "" -#: awkgram.y:1691 +#: awkgram.y:1744 msgid "use of `\\ #...' line continuation is not portable" msgstr "" -#: awkgram.y:1703 +#: awkgram.y:1756 msgid "backslash not last character on line" msgstr "" -#: awkgram.y:1748 +#: awkgram.y:1801 msgid "POSIX does not allow operator `**='" msgstr "" -#: awkgram.y:1750 +#: awkgram.y:1803 msgid "old awk does not support operator `**='" msgstr "" -#: awkgram.y:1759 +#: awkgram.y:1812 msgid "POSIX does not allow operator `**'" msgstr "" -#: awkgram.y:1761 +#: awkgram.y:1814 msgid "old awk does not support operator `**'" msgstr "" -#: awkgram.y:1792 +#: awkgram.y:1845 msgid "operator `^=' is not supported in old awk" msgstr "" -#: awkgram.y:1800 +#: awkgram.y:1853 msgid "operator `^' is not supported in old awk" msgstr "" -#: awkgram.y:1884 awkgram.y:1901 +#: awkgram.y:1937 awkgram.y:1954 msgid "unterminated string" msgstr "" -#: awkgram.y:2061 +#: awkgram.y:2114 #, c-format msgid "invalid char '%c' in expression" msgstr "" -#: awkgram.y:2121 +#: awkgram.y:2162 #, c-format msgid "`%s' is a gawk extension" msgstr "" -#: awkgram.y:2124 +#: awkgram.y:2165 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "" -#: awkgram.y:2127 +#: awkgram.y:2168 #, c-format msgid "POSIX does not allow `%s'" msgstr "" -#: awkgram.y:2131 +#: awkgram.y:2172 #, c-format msgid "`%s' is not supported in old awk" msgstr "" -#: awkgram.y:2158 +#: awkgram.y:2198 msgid "`goto' considered harmful!\n" msgstr "" -#: awkgram.y:2220 +#: awkgram.y:2260 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "" -#: awkgram.y:2239 awkgram.y:2242 +#: awkgram.y:2279 awkgram.y:2282 msgid "match: third argument is a gawk extension" msgstr "" -#: awkgram.y:2255 +#: awkgram.y:2295 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "" -#: awkgram.y:2258 +#: awkgram.y:2298 #, c-format msgid "%s third parameter is not a changeable object" msgstr "" -#: awkgram.y:2285 awkgram.y:2288 +#: awkgram.y:2325 awkgram.y:2328 msgid "close: second argument is a gawk extension" msgstr "" -#: awkgram.y:2298 +#: awkgram.y:2338 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" -#: awkgram.y:2313 +#: awkgram.y:2353 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" -#: awkgram.y:2384 +#: awkgram.y:2424 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "" -#: awkgram.y:2417 +#: awkgram.y:2457 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "" -#: awkgram.y:2529 +#: awkgram.y:2569 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "" -#: awkgram.y:2530 profile.c:93 +#: awkgram.y:2570 profile.c:93 msgid "sending profile to standard error" msgstr "" -#: awkgram.y:2562 +#: awkgram.y:2602 #, c-format msgid "%s: close failed (%s)" msgstr "" -#: awkgram.y:2684 +#: awkgram.y:2723 msgid "shadow_funcs() called twice!" msgstr "" -#: awkgram.y:2711 +#: awkgram.y:2750 msgid "there were shadowed variables." msgstr "" -#: awkgram.y:2784 +#: awkgram.y:2823 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "" -#: awkgram.y:2794 +#: awkgram.y:2833 #, c-format msgid "function name `%s' previously defined" msgstr "" -#: awkgram.y:2945 awkgram.y:2951 +#: awkgram.y:2984 awkgram.y:2990 #, c-format msgid "function `%s' called but never defined" msgstr "" -#: awkgram.y:2954 +#: awkgram.y:2993 #, c-format msgid "function `%s' defined but never called" msgstr "" -#: awkgram.y:2981 +#: awkgram.y:3020 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "" -#: awkgram.y:2994 +#: awkgram.y:3033 #, c-format msgid "" "function `%s' called with space between name and `(',\n" -"%s" -msgstr "" - -#: awkgram.y:2996 -msgid "or used as a variable or an array" +"or used as a variable or an array" msgstr "" -#: builtin.c:137 +#: builtin.c:149 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "" -#: builtin.c:138 +#: builtin.c:150 msgid "standard output" msgstr "" -#: builtin.c:139 +#: builtin.c:151 msgid "reason unknown" msgstr "" -#: builtin.c:152 +#: builtin.c:164 msgid "exp: received non-numeric argument" msgstr "" -#: builtin.c:158 +#: builtin.c:170 #, c-format msgid "exp: argument %g is out of range" msgstr "" -#: builtin.c:216 +#: builtin.c:228 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" -#: builtin.c:219 +#: builtin.c:231 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "" -#: builtin.c:231 +#: builtin.c:243 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "" -#: builtin.c:325 +#: builtin.c:338 msgid "index: received non-string first argument" msgstr "" -#: builtin.c:327 +#: builtin.c:340 msgid "index: received non-string second argument" msgstr "" -#: builtin.c:437 +#: builtin.c:454 msgid "int: received non-numeric argument" msgstr "" -#: builtin.c:454 +#: builtin.c:471 msgid "length: received non-string argument" msgstr "" -#: builtin.c:470 +#: builtin.c:487 msgid "log: received non-numeric argument" msgstr "" -#: builtin.c:473 +#: builtin.c:490 #, c-format msgid "log: received negative argument %g" msgstr "" -#: builtin.c:635 builtin.c:638 +#: builtin.c:654 builtin.c:657 msgid "must use `count$' on all formats or none" msgstr "" -#: builtin.c:740 +#: builtin.c:759 msgid "`$' is not permitted in awk formats" msgstr "" -#: builtin.c:746 +#: builtin.c:765 msgid "arg count with `$' must be > 0" msgstr "" -#: builtin.c:748 +#: builtin.c:767 #, c-format msgid "arg count %ld greater than total number of supplied arguments" msgstr "" -#: builtin.c:750 +#: builtin.c:769 msgid "`$' not permitted after period in format" msgstr "" -#: builtin.c:763 +#: builtin.c:782 msgid "no `$' supplied for positional field width or precision" msgstr "" -#: builtin.c:821 +#: builtin.c:848 msgid "`l' is meaningless in awk formats; ignored" msgstr "" -#: builtin.c:825 +#: builtin.c:852 msgid "`l' is not permitted in POSIX awk formats" msgstr "" -#: builtin.c:836 +#: builtin.c:863 msgid "`L' is meaningless in awk formats; ignored" msgstr "" -#: builtin.c:840 +#: builtin.c:867 msgid "`L' is not permitted in POSIX awk formats" msgstr "" -#: builtin.c:851 +#: builtin.c:878 msgid "`h' is meaningless in awk formats; ignored" msgstr "" -#: builtin.c:855 +#: builtin.c:882 msgid "`h' is not permitted in POSIX awk formats" msgstr "" -#: builtin.c:1055 +#: builtin.c:1111 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" msgstr "" -#: builtin.c:1108 +#: builtin.c:1171 msgid "not enough arguments to satisfy format string" msgstr "" -#: builtin.c:1110 +#: builtin.c:1173 msgid "^ ran out for this one" msgstr "" -#: builtin.c:1115 +#: builtin.c:1178 msgid "[s]printf: format specifier does not have control letter" msgstr "" -#: builtin.c:1118 +#: builtin.c:1181 msgid "too many arguments supplied for format string" msgstr "" -#: builtin.c:1184 builtin.c:1187 +#: builtin.c:1247 builtin.c:1250 msgid "printf: no arguments" msgstr "" -#: builtin.c:1211 +#: builtin.c:1274 msgid "sqrt: received non-numeric argument" msgstr "" -#: builtin.c:1215 +#: builtin.c:1278 #, c-format msgid "sqrt: called with negative argument %g" msgstr "" -#: builtin.c:1238 +#: builtin.c:1301 #, c-format msgid "substr: start index %g is invalid, using 1" msgstr "" -#: builtin.c:1243 +#: builtin.c:1306 #, c-format msgid "substr: non-integer start index %g will be truncated" msgstr "" -#: builtin.c:1262 +#: builtin.c:1325 #, c-format msgid "substr: length %g is not >= 1" msgstr "" -#: builtin.c:1264 +#: builtin.c:1327 #, c-format msgid "substr: length %g is not >= 0" msgstr "" -#: builtin.c:1271 +#: builtin.c:1334 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "" -#: builtin.c:1276 +#: builtin.c:1339 #, c-format msgid "substr: length %g too big for string indexing, truncating to %g" msgstr "" -#: builtin.c:1288 +#: builtin.c:1351 msgid "substr: source string is zero length" msgstr "" -#: builtin.c:1294 +#: builtin.c:1357 #, c-format msgid "substr: start index %g is past end of string" msgstr "" -#: builtin.c:1302 +#: builtin.c:1365 #, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" msgstr "" -#: builtin.c:1337 +#: builtin.c:1400 msgid "strftime: received non-string first argument" msgstr "" -#: builtin.c:1343 +#: builtin.c:1406 msgid "strftime: received empty format string" msgstr "" -#: builtin.c:1352 +#: builtin.c:1415 msgid "strftime: received non-numeric second argument" msgstr "" -#: builtin.c:1415 +#: builtin.c:1478 msgid "mktime: received non-string argument" msgstr "" -#: builtin.c:1460 +#: builtin.c:1523 msgid "system: received non-string argument" msgstr "" -#: builtin.c:1581 eval.c:1883 +#: builtin.c:1644 eval.c:2019 #, c-format msgid "reference to uninitialized field `$%d'" msgstr "" -#: builtin.c:1608 +#: builtin.c:1671 msgid "tolower: received non-string argument" msgstr "" -#: builtin.c:1657 +#: builtin.c:1720 msgid "toupper: received non-string argument" msgstr "" -#: builtin.c:1702 +#: builtin.c:1765 msgid "atan2: received non-numeric first argument" msgstr "" -#: builtin.c:1704 +#: builtin.c:1767 msgid "atan2: received non-numeric second argument" msgstr "" -#: builtin.c:1723 +#: builtin.c:1786 msgid "sin: received non-numeric argument" msgstr "" -#: builtin.c:1739 +#: builtin.c:1802 msgid "cos: received non-numeric argument" msgstr "" -#: builtin.c:1788 +#: builtin.c:1852 msgid "srand: received non-numeric argument" msgstr "" -#: builtin.c:1823 +#: builtin.c:1887 msgid "match: third argument is not an array" msgstr "" -#: builtin.c:2307 +#: builtin.c:2414 msgid "gensub: third argument of 0 treated as 1" msgstr "" -#: builtin.c:2416 builtin.c:2418 +#: builtin.c:2572 msgid "lshift: received non-numeric first argument" msgstr "" -#: builtin.c:2420 +#: builtin.c:2574 +msgid "lshift: received non-numeric second argument" +msgstr "" + +#: builtin.c:2580 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "" -#: builtin.c:2422 +#: builtin.c:2582 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "" -#: builtin.c:2424 +#: builtin.c:2584 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "" -#: builtin.c:2453 builtin.c:2455 +#: builtin.c:2610 msgid "rshift: received non-numeric first argument" msgstr "" -#: builtin.c:2457 +#: builtin.c:2612 +msgid "rshift: received non-numeric second argument" +msgstr "" + +#: builtin.c:2618 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "" -#: builtin.c:2459 +#: builtin.c:2620 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "" -#: builtin.c:2461 +#: builtin.c:2622 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "" -#: builtin.c:2490 builtin.c:2492 +#: builtin.c:2648 msgid "and: received non-numeric first argument" msgstr "" -#: builtin.c:2494 +#: builtin.c:2650 +msgid "and: received non-numeric second argument" +msgstr "" + +#: builtin.c:2656 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "" -#: builtin.c:2496 +#: builtin.c:2658 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "" -#: builtin.c:2525 builtin.c:2527 +#: builtin.c:2684 msgid "or: received non-numeric first argument" msgstr "" -#: builtin.c:2529 +#: builtin.c:2686 +msgid "or: received non-numeric second argument" +msgstr "" + +#: builtin.c:2692 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "" -#: builtin.c:2531 +#: builtin.c:2694 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "" -#: builtin.c:2560 builtin.c:2562 +#: builtin.c:2720 msgid "xor: received non-numeric first argument" msgstr "" -#: builtin.c:2564 +#: builtin.c:2722 +msgid "xor: received non-numeric second argument" +msgstr "" + +#: builtin.c:2728 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "" -#: builtin.c:2566 +#: builtin.c:2730 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "" -#: builtin.c:2594 +#: builtin.c:2754 msgid "compl: received non-numeric argument" msgstr "" -#: builtin.c:2596 +#: builtin.c:2760 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "" -#: builtin.c:2598 +#: builtin.c:2762 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "" -#: builtin.c:2771 +#: builtin.c:2935 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "" -#: eval.c:266 +#: eval.c:303 #, c-format msgid "unknown nodetype %d" msgstr "" -#: eval.c:312 +#: eval.c:350 msgid "buffer overflow in genflags2str" msgstr "" -#: eval.c:647 +#: eval.c:382 eval.c:388 profile.c:837 +#, c-format +msgid "attempt to use array `%s' in a scalar context" +msgstr "" + +#: eval.c:730 #, c-format msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" -#: eval.c:668 +#: eval.c:751 msgid "`break' outside a loop is not portable" msgstr "" -#: eval.c:672 +#: eval.c:755 msgid "`break' outside a loop is not allowed" msgstr "" -#: eval.c:689 +#: eval.c:772 msgid "`continue' outside a loop is not portable" msgstr "" -#: eval.c:693 +#: eval.c:776 msgid "`continue' outside a loop is not allowed" msgstr "" -#: eval.c:727 +#: eval.c:810 msgid "`next' cannot be called from a BEGIN rule" msgstr "" -#: eval.c:729 +#: eval.c:812 msgid "`next' cannot be called from an END rule" msgstr "" -#: eval.c:738 +#: eval.c:821 msgid "`nextfile' cannot be called from a BEGIN rule" msgstr "" -#: eval.c:740 +#: eval.c:823 msgid "`nextfile' cannot be called from an END rule" msgstr "" -#: eval.c:785 +#: eval.c:872 msgid "statement has no effect" msgstr "" -#: eval.c:828 eval.c:1726 +#: eval.c:915 eval.c:1873 #, c-format msgid "can't use function name `%s' as variable or array" msgstr "" -#: eval.c:835 eval.c:841 +#: eval.c:922 eval.c:928 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "" -#: eval.c:848 eval.c:907 eval.c:1732 eval.c:1742 profile.c:807 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "" - -#: eval.c:858 eval.c:1752 +#: eval.c:937 eval.c:1882 #, c-format msgid "reference to uninitialized variable `%s'" msgstr "" -#: eval.c:1007 +#: eval.c:1083 msgid "" "concatenation: side effects in one expression have changed the length of " "another!" msgstr "" -#: eval.c:1032 +#: eval.c:1162 msgid "assignment used in conditional context" msgstr "" -#: eval.c:1122 +#: eval.c:1252 msgid "division by zero attempted" msgstr "" -#: eval.c:1137 +#: eval.c:1267 #, c-format msgid "division by zero attempted in `%%'" msgstr "" -#: eval.c:1152 profile.c:683 +#: eval.c:1282 profile.c:713 #, c-format msgid "illegal type (%s) in tree_eval" msgstr "" -#: eval.c:1328 +#: eval.c:1459 msgid "division by zero attempted in `/='" msgstr "" -#: eval.c:1346 +#: eval.c:1477 #, c-format msgid "division by zero attempted in `%%='" msgstr "" -#: eval.c:1586 +#: eval.c:1738 #, c-format msgid "function `%s' called with more arguments than declared" msgstr "" -#: eval.c:1633 +#: eval.c:1782 #, c-format msgid "function `%s' not defined" msgstr "" -#: eval.c:1639 +#: eval.c:1788 #, c-format msgid "function %s called\n" msgstr "" -#: eval.c:1698 +#: eval.c:1845 +#, c-format msgid "" "\n" "\t# Function Call Stack:\n" "\n" msgstr "" -#: eval.c:1701 +#: eval.c:1848 +#, c-format msgid "\t# -- main --\n" msgstr "" -#: eval.c:1867 +#: eval.c:2003 msgid "attempt to field reference from non-numeric value" msgstr "" -#: eval.c:1869 +#: eval.c:2005 msgid "attempt to reference from null string" msgstr "" -#: eval.c:1875 +#: eval.c:2011 #, c-format msgid "attempt to access field %d" msgstr "" -#: eval.c:1896 eval.c:1903 profile.c:900 +#: eval.c:2032 eval.c:2039 profile.c:934 msgid "assignment is not allowed to result of builtin function" msgstr "" -#: eval.c:1951 +#: eval.c:2103 msgid "`IGNORECASE' is a gawk extension" msgstr "" -#: eval.c:1980 +#: eval.c:2133 msgid "`BINMODE' is a gawk extension" msgstr "" -#: eval.c:2092 +#: eval.c:2255 #, c-format msgid "bad `%sFMT' specification `%s'" msgstr "" -#: eval.c:2170 +#: eval.c:2333 msgid "turning off `--lint' due to assignment to `LINT'" msgstr "" @@ -894,7 +917,56 @@ msgid "extension: library `%s': cannot call function `%s' (%s)\n" msgstr "" -#: ext.c:183 +#: ext.c:102 +msgid "extension: missing function name" +msgstr "" + +#: ext.c:107 +#, c-format +msgid "extension: illegal character `%c' in function name `%s'" +msgstr "" + +#: ext.c:113 +#, c-format +msgid "extension: can't redefine function `%s'" +msgstr "" + +#: ext.c:117 +#, c-format +msgid "extension: function `%s' already defined" +msgstr "" + +#: ext.c:122 +#, c-format +msgid "extension: can't use gawk built-in `%s' as function name" +msgstr "" + +#: ext.c:124 +#, c-format +msgid "extension: function name `%s' previously defined" +msgstr "" + +#: ext.c:201 +#, c-format +msgid "function `%s' defined to take no more than `%d' argument(s)" +msgstr "" + +#: ext.c:204 +#, c-format +msgid "function `%s': missing argument #%d" +msgstr "" + +#: ext.c:214 +#, c-format +msgid "function `%s': argument #%d: attempt to use scalar as an array" +msgstr "" + +#: ext.c:218 +#, c-format +msgid "function `%s': argument #%d: attempt to use array as a scalar" +msgstr "" + +#: ext.c:243 msgid "Operation Not Supported" msgstr "" @@ -923,517 +995,517 @@ msgid "null string for `FS' is a gawk extension" msgstr "" -#: getopt.c:692 getopt.c:704 +#: getopt.c:692 getopt.c:711 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "" -#: getopt.c:737 getopt.c:741 +#: getopt.c:744 getopt.c:748 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "" -#: getopt.c:750 getopt.c:755 +#: getopt.c:757 getopt.c:762 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "" -#: getopt.c:791 getopt.c:804 getopt.c:1093 getopt.c:1106 +#: getopt.c:807 getopt.c:829 getopt.c:1159 getopt.c:1181 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "" -#: getopt.c:842 getopt.c:845 +#: getopt.c:867 getopt.c:870 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "" -#: getopt.c:853 getopt.c:856 +#: getopt.c:878 getopt.c:881 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "" -#: getopt.c:903 getopt.c:906 +#: getopt.c:936 getopt.c:939 #, c-format msgid "%s: illegal option -- %c\n" msgstr "" -#: getopt.c:912 getopt.c:915 +#: getopt.c:945 getopt.c:948 #, c-format msgid "%s: invalid option -- %c\n" msgstr "" -#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:434 +#: getopt.c:1003 getopt.c:1022 getopt.c:1234 getopt.c:1255 main.c:433 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "" -#: getopt.c:1025 getopt.c:1036 +#: getopt.c:1074 getopt.c:1093 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "" -#: getopt.c:1060 getopt.c:1072 +#: getopt.c:1117 getopt.c:1138 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "" -#: io.c:305 +#: io.c:308 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "" -#: io.c:392 +#: io.c:395 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "" -#: io.c:530 +#: io.c:533 #, c-format msgid "invalid tree type %s in redirect()" msgstr "" -#: io.c:536 +#: io.c:539 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "" -#: io.c:542 +#: io.c:545 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "" -#: io.c:547 +#: io.c:550 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" -#: io.c:569 +#: io.c:588 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "" -#: io.c:621 +#: io.c:640 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "" -#: io.c:630 +#: io.c:649 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "" -#: io.c:643 +#: io.c:662 #, c-format msgid "can't open two way socket `%s' for input/output (%s)" msgstr "" -#: io.c:647 +#: io.c:666 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "" -#: io.c:723 +#: io.c:742 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "" -#: io.c:726 +#: io.c:745 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "" -#: io.c:765 +#: io.c:784 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" -#: io.c:777 +#: io.c:800 #, c-format msgid "close of `%s' failed (%s)." msgstr "" -#: io.c:784 +#: io.c:808 msgid "too many pipes or input files open" msgstr "" -#: io.c:807 +#: io.c:831 msgid "close: second argument must be `to' or `from'" msgstr "" -#: io.c:821 +#: io.c:845 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "" -#: io.c:825 +#: io.c:849 msgid "close of redirection that was never opened" msgstr "" -#: io.c:862 +#: io.c:945 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" -#: io.c:924 +#: io.c:960 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "" -#: io.c:927 +#: io.c:963 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "" -#: io.c:946 +#: io.c:983 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "" -#: io.c:949 +#: io.c:986 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "" -#: io.c:952 +#: io.c:989 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "" -#: io.c:955 +#: io.c:992 #, c-format msgid "no explicit close of file `%s' provided" msgstr "" -#: io.c:984 io.c:1038 +#: io.c:1021 io.c:1075 #, c-format msgid "error writing standard output (%s)" msgstr "" -#: io.c:988 io.c:1042 +#: io.c:1025 io.c:1079 #, c-format msgid "error writing standard error (%s)" msgstr "" -#: io.c:996 +#: io.c:1033 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "" -#: io.c:999 +#: io.c:1036 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "" -#: io.c:1002 +#: io.c:1039 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "" -#: io.c:1161 +#: io.c:1198 msgid "/inet/raw client not ready yet, sorry" msgstr "" -#: io.c:1163 io.c:1200 +#: io.c:1200 io.c:1237 msgid "only root may use `/inet/raw'." msgstr "" -#: io.c:1198 +#: io.c:1235 msgid "/inet/raw server not ready yet, sorry" msgstr "" -#: io.c:1288 +#: io.c:1325 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "" -#: io.c:1306 +#: io.c:1343 #, c-format msgid "special file name `%s' is incomplete" msgstr "" -#: io.c:1318 +#: io.c:1355 #, c-format msgid "local port invalid in `%s'" msgstr "" -#: io.c:1330 +#: io.c:1367 msgid "must supply a remote hostname to `/inet'" msgstr "" -#: io.c:1345 +#: io.c:1382 msgid "must supply a remote port to `/inet'" msgstr "" -#: io.c:1351 +#: io.c:1388 #, c-format msgid "remote port invalid in `%s'" msgstr "" -#: io.c:1361 +#: io.c:1398 msgid "TCP/IP communications are not supported" msgstr "" -#: io.c:1370 io.c:1551 +#: io.c:1407 io.c:1588 #, c-format msgid "file `%s' is a directory" msgstr "" -#: io.c:1440 +#: io.c:1477 #, c-format msgid "use `PROCINFO[\"%s\"]' instead of `%s'" msgstr "" -#: io.c:1472 +#: io.c:1509 msgid "use `PROCINFO[...]' instead of `/dev/user'" msgstr "" -#: io.c:1537 io.c:1711 +#: io.c:1574 io.c:1748 #, c-format msgid "could not open `%s', mode `%s'" msgstr "" -#: io.c:1762 +#: io.c:1799 #, c-format msgid "close of master pty failed (%s)" msgstr "" -#: io.c:1764 io.c:1916 io.c:2068 +#: io.c:1801 io.c:1953 io.c:2105 #, c-format msgid "close of stdout in child failed (%s)" msgstr "" -#: io.c:1767 +#: io.c:1804 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "" -#: io.c:1769 io.c:1921 +#: io.c:1806 io.c:1958 #, c-format msgid "close of stdin in child failed (%s)" msgstr "" -#: io.c:1772 +#: io.c:1809 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "" -#: io.c:1774 io.c:1793 +#: io.c:1811 io.c:1830 #, c-format msgid "close of slave pty failed (%s)" msgstr "" -#: io.c:1867 io.c:1919 io.c:2049 io.c:2071 +#: io.c:1904 io.c:1956 io.c:2086 io.c:2108 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "" -#: io.c:1871 io.c:1924 +#: io.c:1908 io.c:1961 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "" -#: io.c:1888 io.c:2062 +#: io.c:1925 io.c:2099 msgid "restoring stdout in parent process failed\n" msgstr "" -#: io.c:1893 +#: io.c:1930 msgid "restoring stdin in parent process failed\n" msgstr "" -#: io.c:1927 io.c:2073 io.c:2084 +#: io.c:1964 io.c:2110 io.c:2121 #, c-format msgid "close of pipe failed (%s)" msgstr "" -#: io.c:1972 +#: io.c:2009 msgid "`|&' not supported" msgstr "" -#: io.c:2039 +#: io.c:2076 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "" -#: io.c:2080 +#: io.c:2117 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "" -#: io.c:2423 +#: io.c:2460 #, c-format msgid "data file `%s' is empty" msgstr "" -#: io.c:2466 io.c:2474 +#: io.c:2503 io.c:2511 msgid "could not allocate more input memory" msgstr "" -#: io.c:2832 io.c:2895 +#: io.c:2869 io.c:2932 #, c-format msgid "error reading input file `%s': %s" msgstr "" -#: io.c:3020 +#: io.c:3057 msgid "multicharacter value of `RS' is a gawk extension" msgstr "" -#: main.c:324 +#: main.c:323 msgid "`-m[fr]' option irrelevant in gawk" msgstr "" -#: main.c:326 +#: main.c:325 msgid "-m option usage: `-m[fr] nnn'" msgstr "" -#: main.c:343 +#: main.c:342 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "" -#: main.c:380 +#: main.c:379 msgid "empty argument to `--source' ignored" msgstr "" -#: main.c:451 +#: main.c:450 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" -#: main.c:456 +#: main.c:455 msgid "`--posix' overrides `--traditional'" msgstr "" -#: main.c:467 +#: main.c:466 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "" -#: main.c:471 +#: main.c:470 #, c-format msgid "running %s setuid root may be a security problem" msgstr "" -#: main.c:512 +#: main.c:511 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "" -#: main.c:515 +#: main.c:514 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "" -#: main.c:517 +#: main.c:516 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "" -#: main.c:547 +#: main.c:546 msgid "no program text at all!" msgstr "" -#: main.c:620 +#: main.c:623 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "" -#: main.c:622 +#: main.c:625 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "" -#: main.c:627 +#: main.c:630 msgid "POSIX options:\t\tGNU long options:\n" msgstr "" -#: main.c:628 +#: main.c:631 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "" -#: main.c:629 +#: main.c:632 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "" -#: main.c:630 +#: main.c:633 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "" -#: main.c:631 +#: main.c:634 msgid "\t-m[fr] val\n" msgstr "" -#: main.c:632 +#: main.c:635 msgid "\t-W compat\t\t--compat\n" msgstr "" -#: main.c:633 +#: main.c:636 msgid "\t-W copyleft\t\t--copyleft\n" msgstr "" -#: main.c:634 +#: main.c:637 msgid "\t-W copyright\t\t--copyright\n" msgstr "" -#: main.c:635 +#: main.c:638 msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" msgstr "" -#: main.c:636 +#: main.c:639 msgid "\t-W gen-po\t\t--gen-po\n" msgstr "" -#: main.c:637 +#: main.c:640 msgid "\t-W help\t\t\t--help\n" msgstr "" -#: main.c:638 +#: main.c:641 msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" msgstr "" -#: main.c:639 +#: main.c:642 msgid "\t-W lint-old\t\t--lint-old\n" msgstr "" -#: main.c:640 +#: main.c:643 msgid "\t-W non-decimal-data\t--non-decimal-data\n" msgstr "" -#: main.c:642 +#: main.c:645 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "" -#: main.c:645 +#: main.c:648 msgid "\t-W parsedebug\t\t--parsedebug\n" msgstr "" -#: main.c:647 +#: main.c:650 msgid "\t-W profile[=file]\t--profile[=file]\n" msgstr "" -#: main.c:648 +#: main.c:651 msgid "\t-W posix\t\t--posix\n" msgstr "" -#: main.c:649 +#: main.c:652 msgid "\t-W re-interval\t\t--re-interval\n" msgstr "" -#: main.c:650 +#: main.c:653 msgid "\t-W source=program-text\t--source=program-text\n" msgstr "" -#: main.c:651 +#: main.c:654 msgid "\t-W traditional\t\t--traditional\n" msgstr "" -#: main.c:652 +#: main.c:655 msgid "\t-W usage\t\t--usage\n" msgstr "" -#: main.c:653 +#: main.c:656 msgid "\t-W version\t\t--version\n" msgstr "" -#: main.c:657 +#: main.c:660 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1441,21 +1513,21 @@ "\n" msgstr "" -#: main.c:661 +#: main.c:664 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" "\n" msgstr "" -#: main.c:665 +#: main.c:668 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" msgstr "" -#: main.c:682 +#: main.c:685 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1467,7 +1539,7 @@ "\n" msgstr "" -#: main.c:690 +#: main.c:693 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -1476,58 +1548,59 @@ "\n" msgstr "" -#: main.c:696 +#: main.c:699 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, write to the Free Software\n" "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n" msgstr "" -#: main.c:730 +#: main.c:733 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "" -#: main.c:956 +#: main.c:962 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" "\n" msgstr "" -#: main.c:976 +#: main.c:982 #, c-format msgid "`%s' is not a legal variable name" msgstr "" -#: main.c:979 +#: main.c:985 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "" -#: main.c:1012 +#: main.c:1018 msgid "floating point exception" msgstr "" -#: main.c:1019 +#: main.c:1025 msgid "fatal error: internal error" msgstr "" -#: main.c:1069 +#: main.c:1075 #, c-format msgid "no pre-opened fd %d" msgstr "" -#: main.c:1074 +#: main.c:1082 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "" -#: main.c:1097 main.c:1106 +#: main.c:1105 main.c:1114 #, c-format msgid "could not find groups: %s" msgstr "" #: msg.c:54 +#, c-format msgid "cmd. line:" msgstr "" @@ -1547,19 +1620,19 @@ msgid "can't convert string to float" msgstr "" -#: node.c:355 +#: node.c:357 msgid "backslash at end of string" msgstr "" -#: node.c:539 +#: node.c:541 msgid "POSIX does not allow `\\x' escapes" msgstr "" -#: node.c:545 +#: node.c:547 msgid "no hex digits in `\\x' escape sequence" msgstr "" -#: node.c:579 +#: node.c:581 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "" @@ -1574,122 +1647,126 @@ msgid "could not open `%s' for writing: %s" msgstr "" -#: profile.c:449 +#: profile.c:467 #, c-format msgid "internal error: %s with null vname" msgstr "" -#: profile.c:512 +#: profile.c:530 msgid "# treated internally as `delete'" msgstr "" -#: profile.c:1162 +#: profile.c:1167 +#, c-format +msgid "# this is a dynamically loaded extension function" +msgstr "" + +#: profile.c:1198 #, c-format msgid "\t# gawk profile, created %s\n" msgstr "" -#: profile.c:1165 +#: profile.c:1201 +#, c-format msgid "" "\t# BEGIN block(s)\n" "\n" msgstr "" -#: profile.c:1175 +#: profile.c:1211 +#, c-format msgid "" "\t# Rule(s)\n" "\n" msgstr "" -#: profile.c:1181 +#: profile.c:1217 +#, c-format msgid "" "\t# END block(s)\n" "\n" msgstr "" -#: profile.c:1201 +#: profile.c:1237 +#, c-format msgid "" "\n" "\t# Functions, listed alphabetically\n" msgstr "" -#: profile.c:1413 +#: profile.c:1452 #, c-format msgid "unexpected type %s in prec_level" msgstr "" -#: re.c:193 -#, c-format -msgid "regex match failed, not enough memory to match string \"%.*s%s\"" -msgstr "" - -#: regcomp.c:136 +#: regcomp.c:150 msgid "Success" msgstr "" -#: regcomp.c:139 +#: regcomp.c:153 msgid "No match" msgstr "" -#: regcomp.c:142 +#: regcomp.c:156 msgid "Invalid regular expression" msgstr "" -#: regcomp.c:145 +#: regcomp.c:159 msgid "Invalid collation character" msgstr "" -#: regcomp.c:148 +#: regcomp.c:162 msgid "Invalid character class name" msgstr "" -#: regcomp.c:151 +#: regcomp.c:165 msgid "Trailing backslash" msgstr "" -#: regcomp.c:154 +#: regcomp.c:168 msgid "Invalid back reference" msgstr "" -#: regcomp.c:157 +#: regcomp.c:171 msgid "Unmatched [ or [^" msgstr "" -#: regcomp.c:160 +#: regcomp.c:174 msgid "Unmatched ( or \\(" msgstr "" -#: regcomp.c:163 +#: regcomp.c:177 msgid "Unmatched \\{" msgstr "" -#: regcomp.c:166 +#: regcomp.c:180 msgid "Invalid content of \\{\\}" msgstr "" -#: regcomp.c:169 +#: regcomp.c:183 msgid "Invalid range end" msgstr "" -#: regcomp.c:172 +#: regcomp.c:186 msgid "Memory exhausted" msgstr "" -#: regcomp.c:175 +#: regcomp.c:189 msgid "Invalid preceding regular expression" msgstr "" -#: regcomp.c:178 +#: regcomp.c:192 msgid "Premature end of regular expression" msgstr "" -#: regcomp.c:181 +#: regcomp.c:195 msgid "Regular expression too big" msgstr "" -#: regcomp.c:184 +#: regcomp.c:198 msgid "Unmatched ) or \\)" msgstr "" -#: regcomp.c:621 +#: regcomp.c:668 msgid "No previous regular expression" msgstr "" diff -urN gawk-3.1.3/po/he.po gawk-3.1.4/po/he.po --- gawk-3.1.3/po/he.po 2003-07-07 21:20:33.000000000 +0300 +++ gawk-3.1.4/po/he.po 2004-07-15 13:02:12.000000000 +0300 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: gawk 3.1.1a\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2003-07-07 11:20-0700\n" +"POT-Creation-Date: 2004-07-15 13:02+0300\n" "PO-Revision-Date: 2002-04-28 21:46+0300\n" "Last-Translator: Eli Zaretskii \n" "Language-Team: Hebrew \n" @@ -15,58 +15,63 @@ "Content-Transfer-Encoding: 8-bit\n" #: array.c:112 +#, fuzzy, c-format +msgid "attempt to use function `%s' as an array" +msgstr "êøòîë `%s' äéö÷ðåôá ùåîéù ïåéñð" + +#: array.c:115 #, c-format msgid "attempt to use scalar parameter `%s' as an array" msgstr "êøòî äéä åìéàë `%s' éøì÷ñ øèîøôá ùåîéù ïåéñð" -#: array.c:113 +#: array.c:118 #, c-format msgid "attempt to use scalar `%s' as array" msgstr "êøòîë `%s' øàì÷ñá éåâù ùåîéù" # This is not translated because it cannot be reworded in Hebrew # without looking awkward. -#: array.c:151 +#: array.c:156 #, fuzzy, c-format msgid "from %s" msgstr "%s (from %s)" -#: array.c:506 +#: array.c:511 #, c-format msgid "reference to uninitialized element `%s[\"%s\"]'" msgstr "ìçåúî åðéàù `%s[\"%s\"]' èðîìàì äééðô" -#: array.c:512 +#: array.c:517 #, c-format msgid "subscript of array `%s' is null string" msgstr "`%s' êøòî ïééöîë ä÷éø úæåøçîá ùåîéù" -#: array.c:609 +#: array.c:621 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "`%s' ïééöî ìéëî åðéà `%s' êøòî :delete" -#: array.c:769 +#: array.c:791 #, c-format msgid "%s: empty (null)\n" msgstr "%s: (ñôåàî) ÷éø\n" -#: array.c:774 +#: array.c:796 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: (ä÷éø hash úìáè) ÷éø\n" -#: array.c:778 +#: array.c:800 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: table_size = %d, array_size = %d\n" -#: array.c:807 +#: array.c:829 #, c-format msgid "%s: is parameter\n" msgstr "øèîøô åðéä %s\n" -#: array.c:812 +#: array.c:834 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: %s-ì (array_ref) äéðôä\n" @@ -91,759 +96,780 @@ msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "äøòä åðéà êà ,C úôùá äøòä åîë äàøð `/%s/' éøìåâø éåèéá" -#: awkgram.y:340 awkgram.y:615 +#: awkgram.y:341 awkgram.y:619 msgid "statement may have no effect" msgstr "úéìëú íåù äéäú àì äæ éåèéáìù ïëúé" -#: awkgram.y:435 awkgram.y:455 +#: awkgram.y:436 awkgram.y:456 #, fuzzy, c-format msgid "`%s' used in %s action" msgstr "END åà BEGIN ìù äìåòô úøãâäá `next'-á ùåîéù" -#: awkgram.y:448 awkgram.y:451 +#: awkgram.y:449 awkgram.y:452 msgid "`nextfile' is a gawk extension" msgstr "gawk-ì úéôéöôñ äáçøä åðéä `nextfile'" -#: awkgram.y:465 +#: awkgram.y:466 msgid "`return' used outside function context" msgstr "äéö÷ðåô ìù èñ÷èðå÷á àìù `return'-á ùåîéù" -#: awkgram.y:504 +#: awkgram.y:508 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "`print \"\"' úåéäì íúñä ïî êéøö END åà BEGIN éììëá èåùô `print'" -#: awkgram.y:517 awkgram.y:524 +#: awkgram.y:521 awkgram.y:528 msgid "`delete array' is a gawk extension" msgstr "gawk-ì úéôéöôñ äáçøä åðéä `delete array'" -#: awkgram.y:532 awkgram.y:539 +#: awkgram.y:536 awkgram.y:543 #, fuzzy msgid "`delete(array)' is a non-portable tawk extension" msgstr "gawk-ì úéôéöôñ äáçøä åðéä `delete array'" -#: awkgram.y:583 +#: awkgram.y:587 #, c-format msgid "duplicate case values in switch body: %s" msgstr "" -#: awkgram.y:593 +#: awkgram.y:597 msgid "Duplicate `default' detected in switch body" msgstr "" -#: awkgram.y:681 +#: awkgram.y:686 msgid "multistage two-way pipelines don't work" msgstr "íéãáåò íðéà íéáìù éáåøî íééðååéë-åã íé÷éôà" -#: awkgram.y:772 +#: awkgram.y:777 msgid "regular expression on right of assignment" msgstr "êøò úîùä úàøåä ìù ïéîé ãöá éøìåâø éåèéá" -#: awkgram.y:782 +#: awkgram.y:800 msgid "regular expression on left of `~' or `!~' operator" msgstr "`!~' åà `~' øåèøôåàì ìàîùî éøìåâø éåèéá" -#: awkgram.y:790 +#: awkgram.y:808 msgid "regular expression on right of comparison" msgstr "äàååùä ìù ïéîé ãöá éøìåâø éåèéá" -#: awkgram.y:857 +#: awkgram.y:875 msgid "non-redirected `getline' undefined inside END action" msgstr "END úìåòô êåúá øãâåî åðéà äééðôä àìì `getline'" -#: awkgram.y:884 +#: awkgram.y:902 msgid "call of `length' without parentheses is not portable" msgstr "úéìéáèøåô äðéà íééøâåñ àìì `length'-ì äàéø÷" -#: awkgram.y:887 +#: awkgram.y:905 msgid "call of `length' without parentheses is deprecated by POSIX" msgstr "POSIX ï÷úì ãåâéðá äðéä íééøâåñ àìì `length'-ì äàéø÷" -#: awkgram.y:940 +#: awkgram.y:958 msgid "use of non-array as array" msgstr "" -#: awkgram.y:942 +#: awkgram.y:960 msgid "invalid subscript expression" msgstr "êøòî ïééöîá éåâù øéáçú ìòá éåèéá" -#: awkgram.y:1140 +#: awkgram.y:1158 #, fuzzy msgid "unexpected newline or end of string" msgstr "éåôö-éúìá íå÷îá äøåù óåñ" -#: awkgram.y:1235 +#: awkgram.y:1254 msgid "empty program text on command line" msgstr "äãå÷ôä úøåùî äìá÷úä ä÷éø úéðëú" -#: awkgram.y:1292 +#: awkgram.y:1307 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "åúàéø÷ íùì `%s' øå÷î õáå÷ úçéúôá (%s) äì÷ú" -#: awkgram.y:1327 +#: awkgram.y:1384 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "`%s' øå÷î õáå÷î äàéø÷á (%s) äì÷ú" -#: awkgram.y:1335 +#: awkgram.y:1392 #, c-format msgid "source file `%s' is empty" msgstr "÷éø åðéä `%s' øå÷î õáå÷" -#: awkgram.y:1537 awkgram.y:1647 awkgram.y:1665 awkgram.y:2015 awkgram.y:2100 +#: awkgram.y:1590 awkgram.y:1700 awkgram.y:1718 awkgram.y:2068 awkgram.y:2153 msgid "source file does not end in newline" msgstr "äøåù-óåñ åúá íééúñî åðéà øå÷îä õáå÷" -#: awkgram.y:1601 +#: awkgram.y:1654 msgid "unterminated regexp ends with `\\' at end of file" msgstr "õáå÷ä óñá `\\'-á íééúñî øåîâ-éúìá éøìåâø éåèéá" -#: awkgram.y:1621 +#: awkgram.y:1674 msgid "unterminated regexp" msgstr "øåîâ-éúìá éøìåâø éåèéá" -#: awkgram.y:1624 +#: awkgram.y:1677 msgid "unterminated regexp at end of file" msgstr "õáå÷ä óåñá øåîâ-éúìá éøìåâø éåèéá" -#: awkgram.y:1691 +#: awkgram.y:1744 msgid "use of `\\ #...' line continuation is not portable" msgstr "éìéáèøåô åðéà äøåù êùîäì ïîéñë `\\ #...'-á ùåîéù" -#: awkgram.y:1703 +#: awkgram.y:1756 msgid "backslash not last character on line" msgstr "äøåùá ïåøçà åú åðéàù êåôä ïñëåì" -#: awkgram.y:1748 +#: awkgram.y:1801 msgid "POSIX does not allow operator `**='" msgstr "`**=' øåèøôåà äùøî åðéà POSIX" -#: awkgram.y:1750 +#: awkgram.y:1803 msgid "old awk does not support operator `**='" msgstr "`**=' øåèøôåàá êîåú åðéà ïùé awk" -#: awkgram.y:1759 +#: awkgram.y:1812 msgid "POSIX does not allow operator `**'" msgstr "`**' øåèøôåà äùøî åðéà POSIX" -#: awkgram.y:1761 +#: awkgram.y:1814 msgid "old awk does not support operator `**'" msgstr "`**' øåèøôåàá êîåú åðéà ïùé awk" -#: awkgram.y:1792 +#: awkgram.y:1845 msgid "operator `^=' is not supported in old awk" msgstr "ïùé awk-á êîúð åðéà `^=' øåèøôåà" -#: awkgram.y:1800 +#: awkgram.y:1853 msgid "operator `^' is not supported in old awk" msgstr "ïùé awk-á êîúð åðéà `^' øåèøôåà" -#: awkgram.y:1884 awkgram.y:1901 +#: awkgram.y:1937 awkgram.y:1954 msgid "unterminated string" msgstr "äøåîâ-éúìá úæåøçî" -#: awkgram.y:2061 +#: awkgram.y:2114 #, c-format msgid "invalid char '%c' in expression" msgstr "éåèéáá '%c' éåâù åú" -#: awkgram.y:2121 +#: awkgram.y:2162 #, c-format msgid "`%s' is a gawk extension" msgstr "gawk-ì úéôéöôñ äáçøä äðéä `%s'" -#: awkgram.y:2124 +#: awkgram.y:2165 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "Bell úåãáòî úñøâá awk-ì úéôéöôñ äáçøä åðéä `%s'" -#: awkgram.y:2127 +#: awkgram.y:2168 #, c-format msgid "POSIX does not allow `%s'" msgstr "`%s' äùøî åðéà POSIX" -#: awkgram.y:2131 +#: awkgram.y:2172 #, c-format msgid "`%s' is not supported in old awk" msgstr "ïùé awk-á êîúð åðéà `%s'" -#: awkgram.y:2158 +#: awkgram.y:2198 msgid "`goto' considered harmful!\n" msgstr "!òø-òâô áùçð `goto'\n" -#: awkgram.y:2220 +#: awkgram.y:2260 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "íéèðîåâøà øôñîë %d ìá÷ì ìåëé åðéà %s" -#: awkgram.y:2239 awkgram.y:2242 +#: awkgram.y:2279 awkgram.y:2282 msgid "match: third argument is a gawk extension" msgstr "gawk-ì úéôéöôñ äáçøä åðéä `match' ìù éùéìù èðîåâøà" -#: awkgram.y:2255 +#: awkgram.y:2295 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "úéìëú íåù äì ïéà `%s' ìù ïåøçà èðîåâøàë äòåá÷ úæåøçî" -#: awkgram.y:2258 +#: awkgram.y:2298 #, fuzzy, c-format msgid "%s third parameter is not a changeable object" msgstr "éåðéù-øá è÷ééáåà åðéà `sub' ìù éùéìù èðîåâøà" -#: awkgram.y:2285 awkgram.y:2288 +#: awkgram.y:2325 awkgram.y:2328 msgid "close: second argument is a gawk extension" msgstr "gawk-ì úéôéöôñ äáçøä åðéä `close' ìù éðù èðîåâøà" -#: awkgram.y:2298 +#: awkgram.y:2338 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "èðîåâøà úîã÷áù ïåúçú-ó÷î ÷ìñì ùé :dcgettext(_\"...\")-á éåâù ùåîéù" -#: awkgram.y:2313 +#: awkgram.y:2353 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "èðîåâøà úîã÷áù ïåúçú-ó÷î ÷ìñì ùé :dncgettext(_\"...\")-á éåâù ùåîéù" -#: awkgram.y:2384 +#: awkgram.y:2424 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "`%s' äéö÷ðåôá %d 'ñî øèîøôì ääæ ,`%s' ,%d 'ñî øèîøô ìù åîù" -#: awkgram.y:2417 +#: awkgram.y:2457 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "éìáåìâ äðúùî ìò ìéôàî `%s' äéö÷ðåôá `%s' øèîøô" -#: awkgram.y:2529 +#: awkgram.y:2569 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "äáéúë íùì `%s' úçéúôá (%s) äì÷ú" -#: awkgram.y:2530 profile.c:93 +#: awkgram.y:2570 profile.c:93 msgid "sending profile to standard error" msgstr "éð÷ú úåàéâù õåøòì çìùð òåöéá ìéôåøô" -#: awkgram.y:2562 +#: awkgram.y:2602 #, c-format msgid "%s: close failed (%s)" msgstr "`%s' úøéâñ úòá (%s) äì÷ú" -#: awkgram.y:2684 +#: awkgram.y:2723 msgid "shadow_funcs() called twice!" msgstr "!íééîòô äàø÷ð shadow_funcs()" -#: awkgram.y:2711 +#: awkgram.y:2750 msgid "there were shadowed variables." msgstr "" -#: awkgram.y:2784 +#: awkgram.y:2823 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "øèîøô íùë ùîùì ìåëé åðéà äéö÷ðåô íù :`%s' äéö÷ðåôá" -#: awkgram.y:2794 +#: awkgram.y:2833 #, c-format msgid "function name `%s' previously defined" msgstr "úøãâåî øáë `%s' íùá äéö÷ðåô" -#: awkgram.y:2945 awkgram.y:2951 +#: awkgram.y:2984 awkgram.y:2990 #, c-format msgid "function `%s' called but never defined" msgstr "úøãâåî äðéàù `%s' äéö÷ðåôì äàéø÷" -#: awkgram.y:2954 +#: awkgram.y:2993 #, c-format msgid "function `%s' defined but never called" msgstr "úàø÷ð àì êà ,äøãâåä `%s' äéö÷ðåô" -#: awkgram.y:2981 +#: awkgram.y:3020 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "éðàéìåá êøò áéðî %d 'ñî øèîøôë òåá÷ éøìåâø éåèéá" -#: awkgram.y:2994 -#, c-format +#: awkgram.y:3033 +#, fuzzy, c-format msgid "" "function `%s' called with space between name and `(',\n" -"%s" +"or used as a variable or an array" msgstr "" ",`(' ïéáì äîù ïéá íéçååø íò `%s' äéö÷ðåôì äàéø÷\n" "%s" -#: awkgram.y:2996 -#, fuzzy -msgid "or used as a variable or an array" -msgstr "êøòî åà äðúùîë `%s' äéö÷ðåô íùá ùîúùäì ïéà" - -#: builtin.c:137 +#: builtin.c:149 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s é\"ò \"%s\"-ì äáéúëá (%s) äì÷ú" -#: builtin.c:138 +#: builtin.c:150 msgid "standard output" msgstr "úéèøãðèñ èìô úãéçé" -#: builtin.c:139 +#: builtin.c:151 msgid "reason unknown" msgstr "äòåãé-éúìá äáéñî" -#: builtin.c:152 +#: builtin.c:164 msgid "exp: received non-numeric argument" msgstr "øôñî åðéà èðîåâøà :exp" -#: builtin.c:158 +#: builtin.c:170 #, c-format msgid "exp: argument %g is out of range" msgstr "øúåîä íåçúá åðéà %g èðîåâøà :exp" -#: builtin.c:216 +#: builtin.c:228 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "äáéúëì àì ,äàéø÷ì çåúô `%s' ÷éôà :õöåçä ï÷åøì ïúéð àì :fflush" -#: builtin.c:219 +#: builtin.c:231 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "äáéúëì àì ,äàéø÷ì çåúô `%s' õáå÷ :õöåçä ï÷åøì ïúéð àì :fflush" -#: builtin.c:231 +#: builtin.c:243 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "ìéá÷î êéìäú åà çåúô ÷éôà ,çåúô õáå÷ åðéà `%s' :fflush" -#: builtin.c:325 +#: builtin.c:338 msgid "index: received non-string first argument" msgstr "úæåøçî åðéà ïåùàø èðîåâøà :index" -#: builtin.c:327 +#: builtin.c:340 msgid "index: received non-string second argument" msgstr "úæåøçî åðéà éðù èðîåâøà :index" -#: builtin.c:437 +#: builtin.c:454 msgid "int: received non-numeric argument" msgstr "øôñî åðéà èðîåâøà :int" -#: builtin.c:454 +#: builtin.c:471 msgid "length: received non-string argument" msgstr "úæåøçî åðéà èðîåâøà :length" -#: builtin.c:470 +#: builtin.c:487 msgid "log: received non-numeric argument" msgstr "øôñî åðéà èðîåâøà :log" -#: builtin.c:473 +#: builtin.c:490 #, c-format msgid "log: received negative argument %g" msgstr "%g éìéìù èðîåâøà íò àø÷ð :log" -#: builtin.c:635 builtin.c:638 +#: builtin.c:654 builtin.c:657 msgid "must use `count$' on all formats or none" msgstr "ãçà óàá åà íéèîøåôä ìëá åà øúåî `count$'-á ùåîéù" -#: builtin.c:740 +#: builtin.c:759 msgid "`$' is not permitted in awk formats" msgstr "awk ìù íéèîøåôá ùåîéùì øåñà `$'" -#: builtin.c:746 +#: builtin.c:765 msgid "arg count with `$' must be > 0" msgstr "0-î ìåãâ úåéäì áééç `$' ãéì èðîåâøàä äðåî" -#: builtin.c:748 +#: builtin.c:767 #, fuzzy, c-format msgid "arg count %ld greater than total number of supplied arguments" msgstr "íéèðîåâøàä ìù ììåëä íøôñîî ìåãâ %d èðîåâøàä äðåî" -#: builtin.c:750 +#: builtin.c:769 msgid "`$' not permitted after period in format" msgstr "èîøåôá äãå÷ðä éøçà òéôåäì ìåëé åðéà `$'" -#: builtin.c:763 +#: builtin.c:782 msgid "no `$' supplied for positional field width or precision" msgstr "å÷åéã åà äãù áçåø ïééöîá èðîåâøàä äðåî øåáò `$' àöîð àì" -#: builtin.c:821 +#: builtin.c:848 msgid "`l' is meaningless in awk formats; ignored" msgstr "çðæåä ;awk ìù èîøåôá úåòîùî øñç åðéä `l'" -#: builtin.c:825 +#: builtin.c:852 msgid "`l' is not permitted in POSIX awk formats" msgstr "POSIX éô-ìò awk ìù èîøåôá òéôåäì ìåëé åðéà `l'" -#: builtin.c:836 +#: builtin.c:863 msgid "`L' is meaningless in awk formats; ignored" msgstr "çðæåä ;awk ìù èîøåôá úåòîùî øñç åðéä `L'" -#: builtin.c:840 +#: builtin.c:867 msgid "`L' is not permitted in POSIX awk formats" msgstr "POSIX éô-ìò awk ìù èîøåôá òéôåäì ìåëé åðéà `L'" -#: builtin.c:851 +#: builtin.c:878 msgid "`h' is meaningless in awk formats; ignored" msgstr "çðæåä ;awk ìù èîøåôá úåòîùî øñç åðéä `h'" -#: builtin.c:855 +#: builtin.c:882 msgid "`h' is not permitted in POSIX awk formats" msgstr "POSIX éô-ìò awk ìù èîøåôá òéôåäì ìåëé åðéà `h'" -#: builtin.c:1055 +#: builtin.c:1111 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" msgstr "" -#: builtin.c:1108 +#: builtin.c:1171 msgid "not enough arguments to satisfy format string" msgstr "èîøåôä øåáò íéèðîåâøà ÷éôñî ïéà" -#: builtin.c:1110 +#: builtin.c:1173 msgid "^ ran out for this one" msgstr "^ íéèðîåâøàä éì åøîâð ïàë" -#: builtin.c:1115 +#: builtin.c:1178 msgid "[s]printf: format specifier does not have control letter" msgstr "äøîää úø÷á úåà ìéëî åðéà èîøåôä :[s]printf" -#: builtin.c:1118 +#: builtin.c:1181 msgid "too many arguments supplied for format string" msgstr "èîøåôä øåáò íéèðîåâøà éãî øúåé" -#: builtin.c:1184 builtin.c:1187 +#: builtin.c:1247 builtin.c:1250 msgid "printf: no arguments" msgstr "èðîåâøà óà ïéà :printf" -#: builtin.c:1211 +#: builtin.c:1274 msgid "sqrt: received non-numeric argument" msgstr "øôñî åðéà èðîåâøà :sqrt" -#: builtin.c:1215 +#: builtin.c:1278 #, c-format msgid "sqrt: called with negative argument %g" msgstr "%g éìéìù èðîåâøà íò àø÷ð :sqrt" -#: builtin.c:1238 +#: builtin.c:1301 #, c-format msgid "substr: start index %g is invalid, using 1" msgstr "1-á óìçåä ,éåâù åðéä %g äìçúä ïééöî :substr" -#: builtin.c:1243 +#: builtin.c:1306 #, c-format msgid "substr: non-integer start index %g will be truncated" msgstr "õöå÷é ,íìù øôñî åðéàù, %g äìçúä ïééöî ìù åëøò :substr" -#: builtin.c:1262 +#: builtin.c:1325 #, fuzzy, c-format msgid "substr: length %g is not >= 1" msgstr "0-î ìåãâ øôñî åððéà %g êøåà :substr" -#: builtin.c:1264 +#: builtin.c:1327 #, fuzzy, c-format msgid "substr: length %g is not >= 0" msgstr "0-î ìåãâ øôñî åððéà %g êøåà :substr" -#: builtin.c:1271 +#: builtin.c:1334 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "õöå÷é ,íìù øôñî åðéàù ,%g êøåà :substr" -#: builtin.c:1276 +#: builtin.c:1339 #, c-format msgid "substr: length %g too big for string indexing, truncating to %g" msgstr "" -#: builtin.c:1288 +#: builtin.c:1351 msgid "substr: source string is zero length" msgstr "ñôà êøåàá äðéä øå÷îä úæåøçî :substr" -#: builtin.c:1294 +#: builtin.c:1357 #, fuzzy, c-format msgid "substr: start index %g is past end of string" msgstr "úæåøçîä óåñì øáòî åðéä %d äìçúä ïééöî :substr" -#: builtin.c:1302 +#: builtin.c:1365 #, fuzzy, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" msgstr "" "%d äëøåàå %d ïééöîá äúìéçúù úæåøçî-úúì ÷éôñî åðéà (%d) úæåøçî êøåà :substr" -#: builtin.c:1337 +#: builtin.c:1400 msgid "strftime: received non-string first argument" msgstr "úæåøçî åðéà ïåùàø èðîåâøà :strftime" -#: builtin.c:1343 +#: builtin.c:1406 msgid "strftime: received empty format string" msgstr "ä÷éø èîøåô úæåøçî :strftime" -#: builtin.c:1352 +#: builtin.c:1415 msgid "strftime: received non-numeric second argument" msgstr "øôñî åðéà éðù èðîåâøà :strftime" -#: builtin.c:1415 +#: builtin.c:1478 msgid "mktime: received non-string argument" msgstr "úæåøçî åðéà èðîåâøà :mktime" -#: builtin.c:1460 +#: builtin.c:1523 msgid "system: received non-string argument" msgstr "úæåøçî åðéà èðîåâøà :system" -#: builtin.c:1581 eval.c:1883 +#: builtin.c:1644 eval.c:2019 #, fuzzy, c-format msgid "reference to uninitialized field `$%d'" msgstr "`%s' ìçåúî-éúìá äðúùîì äéðôä" -#: builtin.c:1608 +#: builtin.c:1671 msgid "tolower: received non-string argument" msgstr "úæåøçî åðéà èðîåâøà :tolower" -#: builtin.c:1657 +#: builtin.c:1720 msgid "toupper: received non-string argument" msgstr "úæåøçî åðéà èðîåâøà :toupper" -#: builtin.c:1702 +#: builtin.c:1765 msgid "atan2: received non-numeric first argument" msgstr "øôñî åðéà ïåùàø èðîåâøà :atan2" -#: builtin.c:1704 +#: builtin.c:1767 msgid "atan2: received non-numeric second argument" msgstr "øôñî åðéà éðù èðîåâøà :atan2" -#: builtin.c:1723 +#: builtin.c:1786 msgid "sin: received non-numeric argument" msgstr "øôñî åðéà èðîåâøà :sin" -#: builtin.c:1739 +#: builtin.c:1802 msgid "cos: received non-numeric argument" msgstr "øôñî åðéà èðîåâøà :cos" -#: builtin.c:1788 +#: builtin.c:1852 msgid "srand: received non-numeric argument" msgstr "øôñî åðéà èðîåâøà :srand" -#: builtin.c:1823 +#: builtin.c:1887 msgid "match: third argument is not an array" msgstr "êøòî åðéà éùéìù èðîåâøà :match" -#: builtin.c:2307 +#: builtin.c:2414 msgid "gensub: third argument of 0 treated as 1" msgstr "1-á óìçåä 0 åëøòù éùéìù èðîåâøà :gensub" -#: builtin.c:2416 builtin.c:2418 +#: builtin.c:2572 msgid "lshift: received non-numeric first argument" msgstr "øôñî åðéà ïåùàø èðîåâøà :lshift" -#: builtin.c:2420 +#: builtin.c:2574 +#, fuzzy +msgid "lshift: received non-numeric second argument" +msgstr "øôñî åðéà éðù èðîåâøà :strftime" + +#: builtin.c:2580 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "úåéåôö-éúìá úåàöåú åáéðé íééìéìù íéëøò :lshift(%lf, %lf)" -#: builtin.c:2422 +#: builtin.c:2582 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "åööå÷é íéøåáù íéëøò :lshift(%lf, %lf)" -#: builtin.c:2424 +#: builtin.c:2584 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "úåéåôö-éúìá úåàöåú áéðé éãî ìåãâ äææä øåòéù :lshift(%lf, %lf)" -#: builtin.c:2453 builtin.c:2455 +#: builtin.c:2610 msgid "rshift: received non-numeric first argument" msgstr "øôñî åðéà ïåùàø èðîåâøà :rshift" -#: builtin.c:2457 +#: builtin.c:2612 +#, fuzzy +msgid "rshift: received non-numeric second argument" +msgstr "øôñî åðéà éðù èðîåâøà :strftime" + +#: builtin.c:2618 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "úåéåôö-éúìá úåàöåú åáéðé íééìéìù íéëøò :rshift(%lf, %lf)" -#: builtin.c:2459 +#: builtin.c:2620 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "åööå÷é íéøåáù íéëøò :rshift(%lf, %lf)" -#: builtin.c:2461 +#: builtin.c:2622 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "úåéåôö-éúìá úåàöåú áéðé éãî ìåãâ äææä øåòéù :rshift(%lf, %lf)" -#: builtin.c:2490 builtin.c:2492 +#: builtin.c:2648 msgid "and: received non-numeric first argument" msgstr "øôñî åðéà ïåùàø èðîåâøà :and" -#: builtin.c:2494 +#: builtin.c:2650 +#, fuzzy +msgid "and: received non-numeric second argument" +msgstr "øôñî åðéà éðù èðîåâøà :atan2" + +#: builtin.c:2656 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "úåéåôö-éúìá úåàöåú åáéðé íééìéìù íéëøò :and(%lf, %lf)" -#: builtin.c:2496 +#: builtin.c:2658 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "åööå÷é íéøåáù íéëøò :and(%lf, %lf)" -#: builtin.c:2525 builtin.c:2527 +#: builtin.c:2684 msgid "or: received non-numeric first argument" msgstr "øôñî åðéà ïåùàø èðîåâøà :or" -#: builtin.c:2529 +#: builtin.c:2686 +#, fuzzy +msgid "or: received non-numeric second argument" +msgstr "øôñî åðéà éðù èðîåâøà :atan2" + +#: builtin.c:2692 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "úåéåôö-éúìá úåàöåú åáéðé íééìéìù íéëøò :or(%lf, %lf)" -#: builtin.c:2531 +#: builtin.c:2694 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "åööå÷é íéøåáù íéëøò :or(%lf, %lf)" -#: builtin.c:2560 builtin.c:2562 +#: builtin.c:2720 msgid "xor: received non-numeric first argument" msgstr "øôñî åðéà ïåùàø èðîåâøà :xor" -#: builtin.c:2564 +#: builtin.c:2722 +#, fuzzy +msgid "xor: received non-numeric second argument" +msgstr "øôñî åðéà éðù èðîåâøà :atan2" + +#: builtin.c:2728 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "úåéåôö-éúìá úåàöåú åáéðé íééìéìù íéëøò :xor(%lf, %lf)" -#: builtin.c:2566 +#: builtin.c:2730 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "åööå÷é íéøåáù íéëøò :xor(%lf, %lf)" -#: builtin.c:2594 +#: builtin.c:2754 msgid "compl: received non-numeric argument" msgstr "øôñî åðéà èðîåâøà :compl" -#: builtin.c:2596 +#: builtin.c:2760 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "úåéåôö-éúìá úåàöåú áéðé éìéìù êøò :compl(%lf)" -#: builtin.c:2598 +#: builtin.c:2762 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "õöå÷é øåáù êøò :compl(%lf)" -#: builtin.c:2771 +#: builtin.c:2935 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "äðé÷ú íå÷éî úééøåâè÷ åðéà `%s' :dcgettext" -#: eval.c:266 +#: eval.c:303 #, c-format msgid "unknown nodetype %d" msgstr "%d ääåæî-éúìá âåñ ìòá node" -#: eval.c:312 +#: eval.c:350 msgid "buffer overflow in genflags2str" msgstr "genflags2str-á õöåç úùéìâ" -#: eval.c:647 +#: eval.c:382 eval.c:388 profile.c:837 +#, c-format +msgid "attempt to use array `%s' in a scalar context" +msgstr "øàì÷ñ ùøåãä èñ÷èðå÷á `%s' êøòîá ùåîéù ïåéñð" + +#: eval.c:730 #, fuzzy, c-format msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "(`%s' êøòî) äàìåìä òåöéá êìäîá %d-î %d-ì äðåù êøòî ìù åìãåâ :for úàìåì" -#: eval.c:668 +#: eval.c:751 msgid "`break' outside a loop is not portable" msgstr "éìéáèøåô åðéà äàìåìì õåçî `break'" -#: eval.c:672 +#: eval.c:755 msgid "`break' outside a loop is not allowed" msgstr "äàìåìì õåçî `break'-á ùîúùäì ïéà" -#: eval.c:689 +#: eval.c:772 msgid "`continue' outside a loop is not portable" msgstr "éìéáèøåô åðéà äàìåìì õåçî `continue'" -#: eval.c:693 +#: eval.c:776 msgid "`continue' outside a loop is not allowed" msgstr "äàìåìì õåçî `continue'-á ùîúùäì ïéà" -#: eval.c:727 +#: eval.c:810 msgid "`next' cannot be called from a BEGIN rule" msgstr "BEGIN éììë êåúî `next'-ì àåø÷ì ïéà" -#: eval.c:729 +#: eval.c:812 msgid "`next' cannot be called from an END rule" msgstr "END éììë êåúî `next'-ì àåø÷ì ïéà" -#: eval.c:738 +#: eval.c:821 msgid "`nextfile' cannot be called from a BEGIN rule" msgstr "BEGIN éììë êåúî `nextfile'-ì àåø÷ì ïéà" -#: eval.c:740 +#: eval.c:823 msgid "`nextfile' cannot be called from an END rule" msgstr "END éììë êåúî `nextfile'-ì àåø÷ì ïéà" -#: eval.c:785 +#: eval.c:872 msgid "statement has no effect" msgstr "úéìëú-úìåèð äàøåä" -#: eval.c:828 eval.c:1726 +#: eval.c:915 eval.c:1873 #, c-format msgid "can't use function name `%s' as variable or array" msgstr "êøòî åà äðúùîë `%s' äéö÷ðåô íùá ùîúùäì ïéà" -#: eval.c:835 eval.c:841 +#: eval.c:922 eval.c:928 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "`%s' ìçåúî-éúìá èðîåâøàì äéðôä" -#: eval.c:848 eval.c:907 eval.c:1732 eval.c:1742 profile.c:807 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "øàì÷ñ ùøåãä èñ÷èðå÷á `%s' êøòîá ùåîéù ïåéñð" - -#: eval.c:858 eval.c:1752 +#: eval.c:937 eval.c:1882 #, c-format msgid "reference to uninitialized variable `%s'" msgstr "`%s' ìçåúî-éúìá äðúùîì äéðôä" -#: eval.c:1007 +#: eval.c:1083 msgid "" "concatenation: side effects in one expression have changed the length of " "another!" msgstr "" "!øçà éåèéá ìù åëøåà éåðéùì åîøâ ãçà éåèéá áåùéç ìù éàåì-úåòôåú :concatenation" -#: eval.c:1032 +#: eval.c:1162 msgid "assignment used in conditional context" msgstr "éàðú ìù èñ÷èðå÷á äîùäá ùåîéù" -#: eval.c:1122 +#: eval.c:1252 msgid "division by zero attempted" msgstr "ñôàá ä÷åìç ïåéñð" -#: eval.c:1137 +#: eval.c:1267 #, c-format msgid "division by zero attempted in `%%'" msgstr "`%%'-á ñôàá ä÷åìç ïåéñð" -#: eval.c:1152 profile.c:683 +#: eval.c:1282 profile.c:713 #, c-format msgid "illegal type (%s) in tree_eval" msgstr "tree_eval-á (%s) éåâù âåñ" -#: eval.c:1328 +#: eval.c:1459 msgid "division by zero attempted in `/='" msgstr "`/='-á ñôàá ä÷åìç ïåéñð" -#: eval.c:1346 +#: eval.c:1477 #, c-format msgid "division by zero attempted in `%%='" msgstr "`%%='-á ñôàá ä÷åìç ïåéñð" -#: eval.c:1586 +#: eval.c:1738 #, c-format msgid "function `%s' called with more arguments than declared" msgstr "äúæøëäá øùàî íéèðîåâøà øúåé íò `%s' äéö÷ðåôì äàéø÷" -#: eval.c:1633 +#: eval.c:1782 #, c-format msgid "function `%s' not defined" msgstr "úøãâåî äðéà `%s' äéö÷ðåô" -#: eval.c:1639 +#: eval.c:1788 #, c-format msgid "function %s called\n" msgstr "`%s' äéö÷ðåôì äàéø÷\n" -#: eval.c:1698 +#: eval.c:1845 +#, c-format msgid "" "\n" "\t# Function Call Stack:\n" @@ -853,41 +879,42 @@ "\t# :úåéö÷ðåôì úåàéø÷ä úéðñçî\n" "\n" -#: eval.c:1701 +#: eval.c:1848 +#, c-format msgid "\t# -- main --\n" msgstr "\t# -- main --\n" -#: eval.c:1867 +#: eval.c:2003 msgid "attempt to field reference from non-numeric value" msgstr "øôñî åðéàù êøò úåòöîàá äãùì äéðôä ïåéñð" -#: eval.c:1869 +#: eval.c:2005 msgid "attempt to reference from null string" msgstr "ä÷éø úæåøçî úåòöîàá äãùì äéðôä ïåéñð" -#: eval.c:1875 +#: eval.c:2011 #, c-format msgid "attempt to access field %d" msgstr "%d 'ñî äãùì äùéâ ïåéñð" -#: eval.c:1896 eval.c:1903 profile.c:900 +#: eval.c:2032 eval.c:2039 profile.c:934 msgid "assignment is not allowed to result of builtin function" msgstr "úéðáåî äéö÷ðåô ìù äàöåúá êøò áéöäì ïéà" -#: eval.c:1951 +#: eval.c:2103 msgid "`IGNORECASE' is a gawk extension" msgstr "gawk-ì úéôéöôñ äáçøä åðéä `IGNORECASE'" -#: eval.c:1980 +#: eval.c:2133 msgid "`BINMODE' is a gawk extension" msgstr "gawk-ì úéôéöôñ äáçøä åðéä `BINMODE'" -#: eval.c:2092 +#: eval.c:2255 #, c-format msgid "bad `%sFMT' specification `%s'" msgstr "äðé÷ú `%sFMT' úøãâä åðéà `%s'" -#: eval.c:2170 +#: eval.c:2333 msgid "turning off `--lint' due to assignment to `LINT'" msgstr "`LINT'-ì êøò úîùä á÷ò `--lint' ìèáî" @@ -905,7 +932,56 @@ msgid "extension: library `%s': cannot call function `%s' (%s)\n" msgstr "`%s' äéøôñî `%s' äéö÷ðåôì äàéø÷á (%s) äì÷ú äòøéà :extension\n" -#: ext.c:183 +#: ext.c:102 +msgid "extension: missing function name" +msgstr "" + +#: ext.c:107 +#, fuzzy, c-format +msgid "extension: illegal character `%c' in function name `%s'" +msgstr "`%s' äéøôñî `%s' äéö÷ðåôì äàéø÷á (%s) äì÷ú äòøéà :extension\n" + +#: ext.c:113 +#, fuzzy, c-format +msgid "extension: can't redefine function `%s'" +msgstr "`%s' úçéúô úòá (%s) äì÷ú äòøéà :extension\n" + +#: ext.c:117 +#, fuzzy, c-format +msgid "extension: function `%s' already defined" +msgstr "úøãâåî äðéà `%s' äéö÷ðåô" + +#: ext.c:122 +#, c-format +msgid "extension: can't use gawk built-in `%s' as function name" +msgstr "" + +#: ext.c:124 +#, fuzzy, c-format +msgid "extension: function name `%s' previously defined" +msgstr "úøãâåî øáë `%s' íùá äéö÷ðåô" + +#: ext.c:201 +#, c-format +msgid "function `%s' defined to take no more than `%d' argument(s)" +msgstr "" + +#: ext.c:204 +#, fuzzy, c-format +msgid "function `%s': missing argument #%d" +msgstr "úøãâåî äðéà `%s' äéö÷ðåô" + +#: ext.c:214 +#, fuzzy, c-format +msgid "function `%s': argument #%d: attempt to use scalar as an array" +msgstr "êøòîë `%s' øàì÷ñá éåâù ùåîéù" + +#: ext.c:218 +#, c-format +msgid "function `%s': argument #%d: attempt to use array as a scalar" +msgstr "" + +#: ext.c:243 msgid "Operation Not Supported" msgstr "úëîúð äðéà åæ äìåòô" @@ -936,523 +1012,523 @@ # The way the leading "%s:" is translated is a terrible kludge, # but what can I do? FIXME. -#: getopt.c:692 getopt.c:704 +#: getopt.c:692 getopt.c:711 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s úéðëú øåáò éòîùî-ãç åðéà `%s' ïééôàî\n" -#: getopt.c:737 getopt.c:741 +#: getopt.c:744 getopt.c:748 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "%s úéðëú øåáò èðîåâøà ìá÷î åðéà `--%s' ïééôàî\n" -#: getopt.c:750 getopt.c:755 +#: getopt.c:757 getopt.c:762 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "%s úéðëú øåáò èðîåâøà ìá÷î åðéà `%c%s' ïééôàî\n" -#: getopt.c:791 getopt.c:804 getopt.c:1093 getopt.c:1106 +#: getopt.c:807 getopt.c:829 getopt.c:1159 getopt.c:1181 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "%s úéðëú øåáò èðîåâøà áééçî `%s' ïééôàî\n" -#: getopt.c:842 getopt.c:845 +#: getopt.c:867 getopt.c:870 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s úéðëú øåáò `--%s' ääåæî-éúìá ïééôàî\n" -#: getopt.c:853 getopt.c:856 +#: getopt.c:878 getopt.c:881 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s úéðëú øåáò `%c%s' ääåæî-éúìá ïééôàî\n" # "Illegal" is against GNU coding standards, but since Posix requires # it (see the comment below), let's say that in Hebrew as well... -#: getopt.c:903 getopt.c:906 +#: getopt.c:936 getopt.c:939 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: é÷åç-éúìá ïééôàî -- %c\n" -#: getopt.c:912 getopt.c:915 +#: getopt.c:945 getopt.c:948 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s úéðëú øåáò éåâù ïééôàî -- %c\n" -#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:434 +#: getopt.c:1003 getopt.c:1022 getopt.c:1234 getopt.c:1255 main.c:433 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: èðîåâøà áééçî ïééôàî -- %c\n" -#: getopt.c:1025 getopt.c:1036 +#: getopt.c:1074 getopt.c:1093 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s úéðëú øåáò éòîùî-ãç åðéà `-W %s' ïééôàî\n" -#: getopt.c:1060 getopt.c:1072 +#: getopt.c:1117 getopt.c:1138 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s úéðëú øåáò èðîåâøà ìá÷î åðéà `-W %s' ïééôàî\n" -#: io.c:305 +#: io.c:308 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "åúàéø÷ íùì `%s' õáå÷ úçéúôá (%s) äì÷ú" -#: io.c:392 +#: io.c:395 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "(%d èìô/èì÷ õåøò) `%s' úøéâñá (%s) äì÷ú" -#: io.c:530 +#: io.c:533 #, c-format msgid "invalid tree type %s in redirect()" msgstr "redirect() äéö÷ðåôá %s éåâù õò âåñ" -#: io.c:536 +#: io.c:539 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "ãáìá éøîåð êøò áéðî `%s' èìô/èì÷ úééðôäá éåèéá" -#: io.c:542 +#: io.c:545 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "ä÷éø úæåøçî áéðî `%s' èìô/èì÷ úééðôäá éåèéá" -#: io.c:547 +#: io.c:550 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "éâåì éåèéá ìù äàöåú úåéäì ìåìò `%s' õáå÷ íù `%s' èìô/èì÷ úééðôäá" -#: io.c:569 +#: io.c:588 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "`%.*s' õáå÷ øåáò `>>'-á ïäå `>'-á ïä øúåéî ùåîéù" -#: io.c:621 +#: io.c:640 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "èìô êøåöì `%s' ÷éôà úçéúôá (%s) äì÷ú" -#: io.c:630 +#: io.c:649 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "èì÷ êøåöì `%s' ÷éôà úçéúôá (%s) äì÷ú" -#: io.c:643 +#: io.c:662 #, c-format msgid "can't open two way socket `%s' for input/output (%s)" msgstr "èìô/èì÷ êøåöì éðååéë-åã (socket) ò÷ùë `%s' úçéúôá (%s) äì÷ú" -#: io.c:647 +#: io.c:666 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "èìô/èì÷ êøåöì éðååéë-åã (pipe) ÷éôàë `%s' úçéúôá (%s) äì÷ú" -#: io.c:723 +#: io.c:742 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "`%s'-î äééðôäá (%s) äì÷ú" -#: io.c:726 +#: io.c:745 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "`%s' ìà äééðôäá (%s) äì÷ú" -#: io.c:765 +#: io.c:784 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "èìô/èì÷ éöåøò áåáéø úìéçú ;íéçåúô íéöá÷ øôñî ìù úëøòî úìáâîì äòâä" -#: io.c:777 +#: io.c:800 #, c-format msgid "close of `%s' failed (%s)." msgstr "`%s' úøéâñá (%s) äì÷ú" -#: io.c:784 +#: io.c:808 msgid "too many pipes or input files open" msgstr "úéðîæ-åá íéçåúô èì÷ éöá÷ åà (pipes) íé÷éôà éãî øúåé" -#: io.c:807 +#: io.c:831 msgid "close: second argument must be `to' or `from'" msgstr "`from' åà `to' úåéäì áééç `close' ìù éðùä èðîåâøàä" -#: io.c:821 +#: io.c:845 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "ìéá÷î êéìäú åà çåúô ÷éôà ,çåúô õáå÷ åðéà `%.*s' :close" -#: io.c:825 +#: io.c:849 msgid "close of redirection that was never opened" msgstr "íìåòî äçúôð àìù äééðôä úøéâñ" -#: io.c:862 +#: io.c:945 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "çðæåä éðùä èðîåâøàä ,`|&' é\"ò äçúôð àì `%s' äééðôä" -#: io.c:924 +#: io.c:960 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "(%d äì÷ú ãå÷) `%s'-ì ÷éôà úøéâñá (%s) äì÷ú" -#: io.c:927 +#: io.c:963 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "(%d äì÷ú ãå÷) `%s' õáå÷ úøéâñá (%s) äì÷ú" -#: io.c:946 +#: io.c:983 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "ùøåôîá øâñð àì (socket) `%s' ò÷ù" -#: io.c:949 +#: io.c:986 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "ùøåôîá øâñð àì (co-process) `%s' ìéá÷î êéìäú" -#: io.c:952 +#: io.c:989 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "ùøåôîá øâñð àì (pipe) `%s' ÷éôà" -#: io.c:955 +#: io.c:992 #, c-format msgid "no explicit close of file `%s' provided" msgstr "ùøåôîá øâñð àì `%s' õáå÷" -#: io.c:984 io.c:1038 +#: io.c:1021 io.c:1075 #, c-format msgid "error writing standard output (%s)" msgstr "éð÷ú èìô õåøòì äáéúëá (%s) äì÷ú" -#: io.c:988 io.c:1042 +#: io.c:1025 io.c:1079 #, c-format msgid "error writing standard error (%s)" msgstr "éð÷ú úåàéâù õåøòì äáéúëá (%s) äì÷ú" -#: io.c:996 +#: io.c:1033 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "`%s'-ì ÷éôà ìù õöåç ïå÷éøá (%s) äì÷ú" -#: io.c:999 +#: io.c:1036 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "`%s'-ì ìéá÷î êéìäú ÷éôà ìù õöåç ïå÷éøá (%s) äì÷ú" -#: io.c:1002 +#: io.c:1039 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "`%s' ìù õáå÷ éðåúð õöåç ïå÷éøá (%s) äì÷ú" -#: io.c:1161 +#: io.c:1198 msgid "/inet/raw client not ready yet, sorry" msgstr "ïëåî íøè /inet/raw çå÷ì ,íéøòèöî" -#: io.c:1163 io.c:1200 +#: io.c:1200 io.c:1237 msgid "only root may use `/inet/raw'." msgstr "ãáìá root ùîúùîì øúåî `inet/raw'-á ùåîéù" -#: io.c:1198 +#: io.c:1235 msgid "/inet/raw server not ready yet, sorry" msgstr "ïëåî íøè /inet/raw úøù ,íéøòèöî" -#: io.c:1288 +#: io.c:1325 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "`%s' ãçåéî õáå÷ íùá ääåæî-éúìá åà øñç ìå÷åèåøô" -#: io.c:1306 +#: io.c:1343 #, c-format msgid "special file name `%s' is incomplete" msgstr "íìù åðéà `%s' ãçåéî õáå÷" -#: io.c:1318 +#: io.c:1355 #, c-format msgid "local port invalid in `%s'" msgstr "`%s'-á äéåâù úéîå÷î äàéöé" -#: io.c:1330 +#: io.c:1367 msgid "must supply a remote hostname to `/inet'" msgstr "`/inet' øåáò ÷çåøî çøàî-áùçî íù øéãâäì äáåç" -#: io.c:1345 +#: io.c:1382 msgid "must supply a remote port to `/inet'" msgstr "`/inet' øåáò ú÷çåøî äàéöé øéãâäì äáåç" -#: io.c:1351 +#: io.c:1388 #, c-format msgid "remote port invalid in `%s'" msgstr "`%s'-á äéåâù ú÷çåøî äàéöé" -#: io.c:1361 +#: io.c:1398 msgid "TCP/IP communications are not supported" msgstr "TCP/IP úøåù÷úá äëéîú ïéà" -#: io.c:1370 io.c:1551 +#: io.c:1407 io.c:1588 #, c-format msgid "file `%s' is a directory" msgstr "äé÷éú åðéä `%s' õáå÷" -#: io.c:1440 +#: io.c:1477 #, c-format msgid "use `PROCINFO[\"%s\"]' instead of `%s'" msgstr "`PROCINFO[\"%s\"]'-á ùîúùäì óéãò `%s' íå÷îá" -#: io.c:1472 +#: io.c:1509 msgid "use `PROCINFO[...]' instead of `/dev/user'" msgstr "`/dev/user' éðô-ìò óéãò `PROCINFO[...]'-á ùåîéù" # This probably sounds nonsensical in Hebrew, but what can I do, # given the original message text? -#: io.c:1537 io.c:1711 +#: io.c:1574 io.c:1748 #, c-format msgid "could not open `%s', mode `%s'" msgstr "`%s' øåáò `%s' äìåòô ïôåà úçéúôá ïåìùë" -#: io.c:1762 +#: io.c:1799 #, fuzzy, c-format msgid "close of master pty failed (%s)" msgstr "÷éôà úøéâñá (%s) äì÷ú" -#: io.c:1764 io.c:1916 io.c:2068 +#: io.c:1801 io.c:1953 io.c:2105 #, c-format msgid "close of stdout in child failed (%s)" msgstr "úá-úéðëúá stdout úøéâñá (%s) äì÷ú" -#: io.c:1767 +#: io.c:1804 #, fuzzy, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "úá-úéðëúá stdout-ì ÷éôà ìåôëùá (dup: %s) äì÷ú" -#: io.c:1769 io.c:1921 +#: io.c:1806 io.c:1958 #, c-format msgid "close of stdin in child failed (%s)" msgstr "úá-úéðëúá stdin úøéâñá (%s) äì÷ú" -#: io.c:1772 +#: io.c:1809 #, fuzzy, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "úá-úéðëúá stdin-ì ÷éôà ìåôëùá (dup: %s) äì÷ú" -#: io.c:1774 io.c:1793 +#: io.c:1811 io.c:1830 #, fuzzy, c-format msgid "close of slave pty failed (%s)" msgstr "÷éôà úøéâñá (%s) äì÷ú" -#: io.c:1867 io.c:1919 io.c:2049 io.c:2071 +#: io.c:1904 io.c:1956 io.c:2086 io.c:2108 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "úá-úéðëúá stdout-ì ÷éôà ìåôëùá (dup: %s) äì÷ú" -#: io.c:1871 io.c:1924 +#: io.c:1908 io.c:1961 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "úá-úéðëúá stdin-ì ÷éôà ìåôëùá (dup: %s) äì÷ú" -#: io.c:1888 io.c:2062 +#: io.c:1925 io.c:2099 msgid "restoring stdout in parent process failed\n" msgstr "áà-úéðëúá stdout ÷éôà øåæçùá äì÷ú\n" -#: io.c:1893 +#: io.c:1930 msgid "restoring stdin in parent process failed\n" msgstr "áà-úéðëúá stdin ÷éôà øåæçùá äì÷ú\n" -#: io.c:1927 io.c:2073 io.c:2084 +#: io.c:1964 io.c:2110 io.c:2121 #, c-format msgid "close of pipe failed (%s)" msgstr "÷éôà úøéâñá (%s) äì÷ú" -#: io.c:1972 +#: io.c:2009 msgid "`|&' not supported" msgstr "`|&'-á äëéîú ïéà" -#: io.c:2039 +#: io.c:2076 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "`%s' ÷éôà úçéúôá (%s) äì÷ú" -#: io.c:2080 +#: io.c:2117 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "`%s' úá-úéðëúì êéìäú úøéöéá (fork: %s) äì÷ú" -#: io.c:2423 +#: io.c:2460 #, c-format msgid "data file `%s' is empty" msgstr "÷éø åðéä `%s' íéðåúð õáå÷" -#: io.c:2466 io.c:2474 +#: io.c:2503 io.c:2511 msgid "could not allocate more input memory" msgstr "" -#: io.c:2832 io.c:2895 +#: io.c:2869 io.c:2932 #, c-format msgid "error reading input file `%s': %s" msgstr "`%s' õáå÷ úàéø÷á (%s) äì÷ú" -#: io.c:3020 +#: io.c:3057 msgid "multicharacter value of `RS' is a gawk extension" msgstr "gawk-ì úéôéöôñ äáçøä äðéä `RS' ìù êøòá íéåú øôñîá äëéîú" -#: main.c:324 +#: main.c:323 msgid "`-m[fr]' option irrelevant in gawk" msgstr "gawk øåáò éèðååìø åðéà `-m[fr]' ïééôàî" -#: main.c:326 +#: main.c:325 msgid "-m option usage: `-m[fr] nnn'" msgstr "`-m[fr] nnn' :-m ïééôàîá ùåîéù ïôåà" -#: main.c:343 +#: main.c:342 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "çðæåä ,%s úéðëú øåáò øëåî åðéà `-W %s' ïééôàî\n" -#: main.c:380 +#: main.c:379 msgid "empty argument to `--source' ignored" msgstr "çðæåä `--source'-ì ÷éø èðîåâøà" -#: main.c:451 +#: main.c:450 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "`--posix' ìéòôî :øãâåî `POSIXLY_CORRECT' äáéáñ äðúùî" -#: main.c:456 +#: main.c:455 msgid "`--posix' overrides `--traditional'" msgstr "`--traditional' ìò øáåâ `--posix'" -#: main.c:467 +#: main.c:466 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "`--non-decimal-data' ìò øáåâ `--posix'/`--traditional'" -#: main.c:471 +#: main.c:470 #, c-format msgid "running %s setuid root may be a security problem" msgstr "òãéî úçèáàá òåâôì äìåìò setuid root-ë %s úöøä" -#: main.c:512 +#: main.c:511 #, fuzzy, c-format msgid "can't set binary mode on stdin (%s)" msgstr "stdin úìåòô ïôåà úòéá÷á (%s) äì÷ú" -#: main.c:515 +#: main.c:514 #, fuzzy, c-format msgid "can't set binary mode on stdout (%s)" msgstr "stdout úìåòô ïôåà úòéá÷á (%s) äì÷ú" -#: main.c:517 +#: main.c:516 #, fuzzy, c-format msgid "can't set binary mode on stderr (%s)" msgstr "stderr úìåòô ïôåà úòéá÷á (%s) äì÷ú" -#: main.c:547 +#: main.c:546 msgid "no program text at all!" msgstr "!ììë àöîðá äéä àì úéðëú ìù èñ÷è" -#: main.c:620 +#: main.c:623 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "" "%s [GNU åà POSIX ïåðâñá íéðééôàî] -f úéðëú-íù [--] õáå÷-íù ... :ùåîéù ïôåà\n" -#: main.c:622 +#: main.c:625 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "" "%s [GNU åà POSIX ïåðâñá íéðééôàî] [--] %cúéðëú%c õáå÷-íù ... :ùåîéù ïôåà\n" -#: main.c:627 +#: main.c:630 msgid "POSIX options:\t\tGNU long options:\n" msgstr ":POSIX éðééôàî\t\t:íéëåøà GNU éðééôàî\n" -#: main.c:628 +#: main.c:631 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f úéðëú-õáå÷\t\t--file=úéðëú-õáå÷\n" -#: main.c:629 +#: main.c:632 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F úåãù-ãéøôî\t\t--field-separator=úåãù-ãéøôî\n" -#: main.c:630 +#: main.c:633 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v äðúùî=êøò\t\t--assign=äðúùî=êøò\n" -#: main.c:631 +#: main.c:634 msgid "\t-m[fr] val\n" msgstr "\t-m[fr] êøò\n" -#: main.c:632 +#: main.c:635 msgid "\t-W compat\t\t--compat\n" msgstr "\t-W compat\t\t--compat\n" -#: main.c:633 +#: main.c:636 msgid "\t-W copyleft\t\t--copyleft\n" msgstr "\t-W copyleft\t\t--copyleft\n" -#: main.c:634 +#: main.c:637 msgid "\t-W copyright\t\t--copyright\n" msgstr "\t-W copyright\t\t--copyright\n" -#: main.c:635 +#: main.c:638 msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" msgstr "\t-W dump-variables[=õáå÷-íù]\t--dump-variables[=õáå÷-íù]\n" -#: main.c:636 +#: main.c:639 msgid "\t-W gen-po\t\t--gen-po\n" msgstr "\t-W gen-po\t\t--gen-po\n" -#: main.c:637 +#: main.c:640 msgid "\t-W help\t\t\t--help\n" msgstr "\t-W help\t\t\t--help\n" -#: main.c:638 +#: main.c:641 msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -#: main.c:639 +#: main.c:642 msgid "\t-W lint-old\t\t--lint-old\n" msgstr "\t-W lint-old\t\t--lint-old\n" -#: main.c:640 +#: main.c:643 msgid "\t-W non-decimal-data\t--non-decimal-data\n" msgstr "\t-W non-decimal-data\t--non-decimal-data\n" -#: main.c:642 +#: main.c:645 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" -#: main.c:645 +#: main.c:648 msgid "\t-W parsedebug\t\t--parsedebug\n" msgstr "\t-W parsedebug\t\t--parsedebug\n" -#: main.c:647 +#: main.c:650 msgid "\t-W profile[=file]\t--profile[=file]\n" msgstr "\t-W profile[=õáå÷-íù]\t--profile[=õáå÷-íù]\n" -#: main.c:648 +#: main.c:651 msgid "\t-W posix\t\t--posix\n" msgstr "\t-W posix\t\t--posix\n" -#: main.c:649 +#: main.c:652 msgid "\t-W re-interval\t\t--re-interval\n" msgstr "\t-W re-interval\t\t--re-interval\n" -#: main.c:650 +#: main.c:653 msgid "\t-W source=program-text\t--source=program-text\n" msgstr "\t-W source=úéðëú-èñ÷è\t--source=úéðëú-èñ÷è\n" -#: main.c:651 +#: main.c:654 msgid "\t-W traditional\t\t--traditional\n" msgstr "\t-W traditional\t\t--traditional\n" -#: main.c:652 +#: main.c:655 msgid "\t-W usage\t\t--usage\n" msgstr "\t-W usage\t\t--usage\n" -#: main.c:653 +#: main.c:656 msgid "\t-W version\t\t--version\n" msgstr "\t-W version\t\t--version\n" -#: main.c:657 +#: main.c:660 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1464,7 +1540,7 @@ " .ñôãåîä êéøãîá `Reporting Problems and Bugs' ä÷ñô\n" "\n" -#: main.c:661 +#: main.c:664 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -1473,7 +1549,7 @@ ".èñ÷è úåéðáú ìù ãåáéòå äé÷øñì äôù åðéä gawk\n" ".éð÷ú èìôì áúåëå éð÷ú èì÷ õåøò àøå÷ àåä ìãçî úøéøáë\n" -#: main.c:665 +#: main.c:668 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -1483,7 +1559,7 @@ "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:682 +#: main.c:685 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1501,7 +1577,7 @@ " íàå ,ïåéùøä ìù 2 àñøâá íà ;Free Software Foundation\n" " .øúåé úøçåàî àñøâ ìëá (íëì äøåîùä äéöôåàë)\n" -#: main.c:690 +#: main.c:693 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -1514,7 +1590,7 @@ ",íéèøôì .úîéåñî úéìëú åæéàì äîàúä åà úåøéçñ ìù\n" " .GNU General Public License-á åðééò àðà\n" -#: main.c:696 +#: main.c:699 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, write to the Free Software\n" @@ -1524,48 +1600,48 @@ "Free Software Foundation, Inc.-ì åáúë àðà ,åúåà íúìáé÷ àì íà\n" ".59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n" -#: main.c:730 +#: main.c:733 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "awk ìù POSIX úñøâá TAB úåéäì FS-ì íøåâ åðéà -Ft" -#: main.c:956 +#: main.c:962 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" "\n" msgstr "" -#: main.c:976 +#: main.c:982 #, c-format msgid "`%s' is not a legal variable name" msgstr "" -#: main.c:979 +#: main.c:985 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "" -#: main.c:1012 +#: main.c:1018 msgid "floating point exception" msgstr "äôö äãå÷ð éáåùéçá äâéøç" -#: main.c:1019 +#: main.c:1025 msgid "fatal error: internal error" msgstr "úéîéðô äðëú úàéâù :äøåîç äì÷ú" # FIXME: I wonder how many people will understand what "fd 2" means. -#: main.c:1069 +#: main.c:1075 #, c-format msgid "no pre-opened fd %d" msgstr "ùàøî çåúô åðéà %d èìô/èì÷ õåøò" # FIXME: /dev/null might not be known to all. -#: main.c:1074 +#: main.c:1082 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "/dev/null-ì %d èìô/èì÷ õåøò çåúôì ïúéð àì" -#: main.c:1097 main.c:1106 +#: main.c:1105 main.c:1114 #, c-format msgid "could not find groups: %s" msgstr "%s :úëøòîá íéùîúùî úåöåá÷ ìò òãéî ïéà" @@ -1575,6 +1651,7 @@ # wrong if both these headings and the message text after them is in # Hebrew, due to changed directionality. #: msg.c:54 +#, c-format msgid "cmd. line:" msgstr "cmd. line:" @@ -1594,19 +1671,19 @@ msgid "can't convert string to float" msgstr "øôñîì äøîäì úðúéð äðéà úæåøçî" -#: node.c:355 +#: node.c:357 msgid "backslash at end of string" msgstr "úæåøçî óåñá êåôä ïñëåì" -#: node.c:539 +#: node.c:541 msgid "POSIX does not allow `\\x' escapes" msgstr "`\\x' âåñî äø÷á úåøãñ äùøî åðéà POSIX ï÷ú" -#: node.c:545 +#: node.c:547 msgid "no hex digits in `\\x' escape sequence" msgstr "`\\x' äø÷á úøãñá úåéìîéöãñ÷ä úåøôñá ùîúùäì ïéà" -#: node.c:579 +#: node.c:581 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "éìåìéî åúë ìôåè `\\%c' äø÷á úøãñá `%c' åú" @@ -1621,21 +1698,27 @@ msgid "could not open `%s' for writing: %s" msgstr "äáéúë êøåöì `%s' úçéúô úòá (%s) äì÷ú" -#: profile.c:449 +#: profile.c:467 #, fuzzy, c-format msgid "internal error: %s with null vname" msgstr "ñôåàî åìù vname-äù Node_var :úéîéðô äðëú úàéâù" -#: profile.c:512 +#: profile.c:530 msgid "# treated internally as `delete'" msgstr "" -#: profile.c:1162 +#: profile.c:1167 +#, c-format +msgid "# this is a dynamically loaded extension function" +msgstr "" + +#: profile.c:1198 #, c-format msgid "\t# gawk profile, created %s\n" msgstr "\t# %s êéøàúî gawk ìù ìéôåøô\n" -#: profile.c:1165 +#: profile.c:1201 +#, c-format msgid "" "\t# BEGIN block(s)\n" "\n" @@ -1643,7 +1726,8 @@ "\t# BEGIN ÷åìá\n" "\n" -#: profile.c:1175 +#: profile.c:1211 +#, c-format msgid "" "\t# Rule(s)\n" "\n" @@ -1651,7 +1735,8 @@ "\t# (íé)ììë\n" "\n" -#: profile.c:1181 +#: profile.c:1217 +#, c-format msgid "" "\t# END block(s)\n" "\n" @@ -1659,7 +1744,8 @@ "\t# END ÷åìá\n" "\n" -#: profile.c:1201 +#: profile.c:1237 +#, c-format msgid "" "\n" "\t# Functions, listed alphabetically\n" @@ -1667,89 +1753,92 @@ "\n" "\t# úéá-óìà øãñá ,úåéö÷ðåô\n" -#: profile.c:1413 +#: profile.c:1452 #, c-format msgid "unexpected type %s in prec_level" msgstr "prec_level-á %s éåâù âåñ" -#: re.c:193 -#, c-format -msgid "regex match failed, not enough memory to match string \"%.*s%s\"" -msgstr "\"%.*s%s\" úæåøçî úîàúäì ïåøëæ éã ïéà ,ìùëð éøìåâø éåèéáì äîàúä ùåôéç" - -#: regcomp.c:136 +#: regcomp.c:150 msgid "Success" msgstr "äçìöä" -#: regcomp.c:139 +#: regcomp.c:153 msgid "No match" msgstr "äîéàúî úæåøçî äàöîð àì" -#: regcomp.c:142 +#: regcomp.c:156 msgid "Invalid regular expression" msgstr "éåâù éøìåâø éåèéá" -#: regcomp.c:145 +#: regcomp.c:159 msgid "Invalid collation character" msgstr "øãâåî-éúìá øåãéñ åú" -#: regcomp.c:148 +#: regcomp.c:162 msgid "Invalid character class name" msgstr "íéåú úöåá÷ ìù øãâåî-éúìá íù" -#: regcomp.c:151 +#: regcomp.c:165 msgid "Trailing backslash" msgstr "`\\' éøåçà ïñëåìá íééúñî éøìåâø éåèéá" -#: regcomp.c:154 +#: regcomp.c:168 msgid "Invalid back reference" msgstr "íãå÷ éåèéá-úúì äéåâù äééðôä" -#: regcomp.c:157 +#: regcomp.c:171 msgid "Unmatched [ or [^" msgstr "âåæ-ïá åì ïéàù [^ åà [" -#: regcomp.c:160 +#: regcomp.c:174 msgid "Unmatched ( or \\(" msgstr "âåæ-ïá åì ïéàù \\( åà (" -#: regcomp.c:163 +#: regcomp.c:177 msgid "Unmatched \\{" msgstr "âåæ-ïá åì ïéàù \\{" -#: regcomp.c:166 +#: regcomp.c:180 msgid "Invalid content of \\{\\}" msgstr "\\{\\} êåúá éåâù äðáî" -#: regcomp.c:169 +#: regcomp.c:183 msgid "Invalid range end" msgstr "íéåú íåçú ìù äéåâù äøãâä" -#: regcomp.c:172 +#: regcomp.c:186 msgid "Memory exhausted" msgstr "ïåøëæä øîâð" -#: regcomp.c:175 +#: regcomp.c:189 msgid "Invalid preceding regular expression" msgstr "íéé÷ åðéà åà éåâù íãå÷ éøìåâø éåèéá" -#: regcomp.c:178 +#: regcomp.c:192 msgid "Premature end of regular expression" msgstr "éãî íã÷åî íééúñî éøìåâø éåèéá" -#: regcomp.c:181 +#: regcomp.c:195 msgid "Regular expression too big" msgstr "éãî áëøåî åà ìåãâ éøìåâø éåèéá" -#: regcomp.c:184 +#: regcomp.c:198 msgid "Unmatched ) or \\)" msgstr "âåæ-ïá åì ïéàù \\) åà )" -#: regcomp.c:621 +#: regcomp.c:668 msgid "No previous regular expression" msgstr "íãå÷ éøìåâø éåèéá ïéà" #, fuzzy +#~ msgid "or used as a variable or an array" +#~ msgstr "êøòî åà äðúùîë `%s' äéö÷ðåô íùá ùîúùäì ïéà" + +#~ msgid "regex match failed, not enough memory to match string \"%.*s%s\"" +#~ msgstr "" +#~ "\"%.*s%s\" úæåøçî úîàúäì ïåøëæ éã ïéà ,ìùëð éøìåâø éåèéáì äîàúä ùåôéç" + +#, fuzzy #~ msgid "substr: length %g is < 0" #~ msgstr "0-î ìåãâ øôñî åððéà %g êøåà :substr" @@ -1787,9 +1876,6 @@ #~ msgid "or used in other expression context" #~ msgstr "øçà éåèéá ìù èñ÷èðå÷á äá ùåîéù åà" -#~ msgid "attempt to use function `%s' as array" -#~ msgstr "êøòîë `%s' äéö÷ðåôá ùåîéù ïåéñð" - #~ msgid "`%s' is a function, assignment is not allowed" #~ msgstr "äøåñà äá êøò úîùä ,äéö÷ðåô àéä `%s'" diff -urN gawk-3.1.3/po/it.po gawk-3.1.4/po/it.po --- gawk-3.1.3/po/it.po 2003-07-07 21:20:33.000000000 +0300 +++ gawk-3.1.4/po/it.po 2004-07-15 13:02:12.000000000 +0300 @@ -1,14 +1,14 @@ # Italian messages for GNU Awk -# Copyright (C) 2002-2003 Free Software Foundation, Inc. -# Antonio Colombo , 2003. +# Copyright (C) 2002-2004 Free Software Foundation, Inc. +# Antonio Colombo . # msgid "" msgstr "" "Project-Id-Version: gawk 3.1.35\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2003-07-07 11:20-0700\n" -"PO-Revision-Date: 2003-06-10 11:11+0100\n" -"Last-Translator: Antonio Colombo \n" +"POT-Creation-Date: 2004-07-15 13:02+0300\n" +"PO-Revision-Date: 2004-07-09 07:25+0100\n" +"Last-Translator: Antonio Colombo \n" "Language-Team: Italian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-8\n" @@ -16,55 +16,60 @@ #: array.c:112 #, c-format +msgid "attempt to use function `%s' as an array" +msgstr "tentativo di usare funzione '%s' come vettore" + +#: array.c:115 +#, c-format msgid "attempt to use scalar parameter `%s' as an array" msgstr "tentativo di unare il parametro scalare `%s' come un vettore" -#: array.c:113 +#: array.c:118 #, c-format msgid "attempt to use scalar `%s' as array" msgstr "tentativo di usare scalare '%s' come vettore" -#: array.c:151 +#: array.c:156 #, c-format msgid "from %s" msgstr "da %s" -#: array.c:506 +#: array.c:511 #, c-format msgid "reference to uninitialized element `%s[\"%s\"]'" msgstr "referenza a elemento non inizializzato `%s[\"%s\"]'" -#: array.c:512 +#: array.c:517 #, c-format msgid "subscript of array `%s' is null string" msgstr "l'indice del vettore '%s' è una stringa nulla" -#: array.c:609 +#: array.c:621 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: indice `%s' non presente nel vettore `%s'" -#: array.c:769 +#: array.c:791 #, c-format msgid "%s: empty (null)\n" msgstr "%s: vuoto (nullo)\n" -#: array.c:774 +#: array.c:796 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: vuoto (zero)\n" -#: array.c:778 +#: array.c:800 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: dimensione_tabella = %d, dimensione_vettore = %d\n" -#: array.c:807 +#: array.c:829 #, c-format msgid "%s: is parameter\n" msgstr "%s: è parametro\n" -#: array.c:812 +#: array.c:834 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: referenza_vettoriale a %s\n" @@ -88,478 +93,474 @@ msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "costante 'regexp' `/%s/' sembra un commento commento C, ma non lo è" -#: awkgram.y:340 awkgram.y:615 +#: awkgram.y:341 awkgram.y:619 msgid "statement may have no effect" msgstr "istruzione che può non aver alcun effetto" -#: awkgram.y:435 awkgram.y:455 +#: awkgram.y:436 awkgram.y:456 #, c-format msgid "`%s' used in %s action" msgstr "`%s' usato in 'azione' %s" -#: awkgram.y:448 awkgram.y:451 +#: awkgram.y:449 awkgram.y:452 msgid "`nextfile' is a gawk extension" msgstr "`nextfile' è un'estensione gawk" -#: awkgram.y:465 +#: awkgram.y:466 msgid "`return' used outside function context" msgstr "`return' usato fuori da una funzione" -#: awkgram.y:504 +#: awkgram.y:508 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "`print' da solo in BEGIN o END dovrebbe forse essere `print \"\"'" -#: awkgram.y:517 awkgram.y:524 +#: awkgram.y:521 awkgram.y:528 msgid "`delete array' is a gawk extension" msgstr "`delete array' è un'estensione gawk" -#: awkgram.y:532 awkgram.y:539 +#: awkgram.y:536 awkgram.y:543 msgid "`delete(array)' is a non-portable tawk extension" msgstr "`delete(array)' è un'estensione tawk non-portabile" -#: awkgram.y:583 +#: awkgram.y:587 #, c-format msgid "duplicate case values in switch body: %s" msgstr "valori di 'case' doppi all'interno di uno 'switch': %s" -#: awkgram.y:593 +#: awkgram.y:597 msgid "Duplicate `default' detected in switch body" msgstr "Valori per difetto doppi all'interno di uno 'switch'" -#: awkgram.y:681 +#: awkgram.y:686 msgid "multistage two-way pipelines don't work" msgstr "'pipelines' multistadio bidirezionali non funzionano" -#: awkgram.y:772 +#: awkgram.y:777 msgid "regular expression on right of assignment" msgstr "espressione regolare usata per assegnare un valore" -#: awkgram.y:782 +#: awkgram.y:800 msgid "regular expression on left of `~' or `!~' operator" msgstr "espressione regolare prima di operatore `~' o `!~'" -#: awkgram.y:790 +#: awkgram.y:808 msgid "regular expression on right of comparison" msgstr "espressione regolare a destra in un confronto" -#: awkgram.y:857 +#: awkgram.y:875 msgid "non-redirected `getline' undefined inside END action" msgstr "`getline' non re-diretta indefinita dentro 'azione' END" -#: awkgram.y:884 +#: awkgram.y:902 msgid "call of `length' without parentheses is not portable" msgstr "chiamata a `length' senza parentesi non portabile" -#: awkgram.y:887 +#: awkgram.y:905 msgid "call of `length' without parentheses is deprecated by POSIX" msgstr "chiamata a `length' senza parentesi sconsigliata da POSIX" -#: awkgram.y:940 +#: awkgram.y:958 msgid "use of non-array as array" msgstr "uso di non-vettore come vettore" -#: awkgram.y:942 +#: awkgram.y:960 msgid "invalid subscript expression" msgstr "espressione indice invalida" -#: awkgram.y:1140 +#: awkgram.y:1158 msgid "unexpected newline or end of string" msgstr "carattere 'a capo' o fine stringa inaspettati" -#: awkgram.y:1235 +#: awkgram.y:1254 msgid "empty program text on command line" msgstr "programma nullo sulla linea comandi" -#: awkgram.y:1292 +#: awkgram.y:1307 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "non riesco ad aprire file sorgente `%s' in lettura (%s)" -#: awkgram.y:1327 +#: awkgram.y:1384 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "non riesco a leggere file sorgente `%s' (%s)" -#: awkgram.y:1335 +#: awkgram.y:1392 #, c-format msgid "source file `%s' is empty" msgstr "file sorgente `%s' vuoto" -#: awkgram.y:1537 awkgram.y:1647 awkgram.y:1665 awkgram.y:2015 awkgram.y:2100 +#: awkgram.y:1590 awkgram.y:1700 awkgram.y:1718 awkgram.y:2068 awkgram.y:2153 msgid "source file does not end in newline" msgstr "file sorgente non termina con carattere 'a capo'" -#: awkgram.y:1601 +#: awkgram.y:1654 msgid "unterminated regexp ends with `\\' at end of file" msgstr "espressione regolare non completata termina con `\\' a fine file" -#: awkgram.y:1621 +#: awkgram.y:1674 msgid "unterminated regexp" msgstr "espressione regolare non completata" -#: awkgram.y:1624 +#: awkgram.y:1677 msgid "unterminated regexp at end of file" msgstr "espressione regolare non completata a fine file" -#: awkgram.y:1691 +#: awkgram.y:1744 msgid "use of `\\ #...' line continuation is not portable" msgstr "uso di `\\ #...' continuazione linea non portabile" -#: awkgram.y:1703 +#: awkgram.y:1756 msgid "backslash not last character on line" msgstr "'\\' non è l'ultimo carattere della linea" -#: awkgram.y:1748 +#: awkgram.y:1801 msgid "POSIX does not allow operator `**='" msgstr "POSIX non permette l'operatore `**='" -#: awkgram.y:1750 +#: awkgram.y:1803 msgid "old awk does not support operator `**='" msgstr "il vecchio awk non supporta l'operatore `**='" -#: awkgram.y:1759 +#: awkgram.y:1812 msgid "POSIX does not allow operator `**'" msgstr "POSIX non permette l'operatore `**'" -#: awkgram.y:1761 +#: awkgram.y:1814 msgid "old awk does not support operator `**'" msgstr "il vecchio awk non supporta l'operatore `**'" -#: awkgram.y:1792 +#: awkgram.y:1845 msgid "operator `^=' is not supported in old awk" msgstr "l'operatore `^=' non è supportato nel vecchio awk" -#: awkgram.y:1800 +#: awkgram.y:1853 msgid "operator `^' is not supported in old awk" msgstr "l'operatore `^' non è supportato nel vecchio awk" -#: awkgram.y:1884 awkgram.y:1901 +#: awkgram.y:1937 awkgram.y:1954 msgid "unterminated string" msgstr "stringa non terminata" -#: awkgram.y:2061 +#: awkgram.y:2114 #, c-format msgid "invalid char '%c' in expression" msgstr "carattere '%c' invalido in un'espressione" -#: awkgram.y:2121 +#: awkgram.y:2162 #, c-format msgid "`%s' is a gawk extension" msgstr "`%s' è un'estensione gawk" -#: awkgram.y:2124 +#: awkgram.y:2165 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "`%s' è un'estensione Bell Labs" -#: awkgram.y:2127 +#: awkgram.y:2168 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX non permette `%s'" -#: awkgram.y:2131 +#: awkgram.y:2172 #, c-format msgid "`%s' is not supported in old awk" msgstr "`%s' non è supportato nel vecchio awk" -#: awkgram.y:2158 +#: awkgram.y:2198 msgid "`goto' considered harmful!\n" msgstr "`goto' considerato pericoloso!\n" -#: awkgram.y:2220 +#: awkgram.y:2260 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d invalido come numero di argomenti per %s" -#: awkgram.y:2239 awkgram.y:2242 +#: awkgram.y:2279 awkgram.y:2282 msgid "match: third argument is a gawk extension" msgstr "match: il terzo argomento è un'estensione gawk" -#: awkgram.y:2255 +#: awkgram.y:2295 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "%s: una stringa come ultimo argomento di 'substitute' non ha effetto" -#: awkgram.y:2258 +#: awkgram.y:2298 #, c-format msgid "%s third parameter is not a changeable object" msgstr "il terzo parametro di '%s' non è un oggetto modificabile" -#: awkgram.y:2285 awkgram.y:2288 +#: awkgram.y:2325 awkgram.y:2328 msgid "close: second argument is a gawk extension" msgstr "close: il secondo argomento è un'estensione gawk" -#: awkgram.y:2298 +#: awkgram.y:2338 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "uso scorretto di dcgettext(_\"...\"): togliere il carattere '_' iniziale" -#: awkgram.y:2313 +#: awkgram.y:2353 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "uso scorretto di dcngettext(_\"...\"): togliere il carattere '_' iniziale" -#: awkgram.y:2384 +#: awkgram.y:2424 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "funzione `%s': parametro #%d, `%s', duplica parametro #%d" -#: awkgram.y:2417 +#: awkgram.y:2457 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "funzione `%s': parametro `%s' nasconde variabile globale" -#: awkgram.y:2529 +#: awkgram.y:2569 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "non riesco ad aprire `%s' in scrittura (%s)" -#: awkgram.y:2530 profile.c:93 +#: awkgram.y:2570 profile.c:93 msgid "sending profile to standard error" msgstr "mando profilo a 'standard error'" -#: awkgram.y:2562 +#: awkgram.y:2602 #, c-format msgid "%s: close failed (%s)" msgstr "%s: 'close' fallita (%s)" -#: awkgram.y:2684 +#: awkgram.y:2723 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() chiamata due volte!" -#: awkgram.y:2711 +#: awkgram.y:2750 msgid "there were shadowed variables." msgstr "c'erano variabili nascoste." -#: awkgram.y:2784 +#: awkgram.y:2823 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "funzione `%s': non posso usare nome della funzione come nome parametro" -#: awkgram.y:2794 +#: awkgram.y:2833 #, c-format msgid "function name `%s' previously defined" msgstr "funzione di nome `%s' definita in precedenza" -#: awkgram.y:2945 awkgram.y:2951 +#: awkgram.y:2984 awkgram.y:2990 #, c-format msgid "function `%s' called but never defined" msgstr "funzione `%s' chiamata ma mai definita" -#: awkgram.y:2954 +#: awkgram.y:2993 #, c-format msgid "function `%s' defined but never called" msgstr "funzione `%s' definita ma mai chiamata" -#: awkgram.y:2981 +#: awkgram.y:3020 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "" "espressione regolare di valore costante per parametro #%d genera valore " "booleano" -#: awkgram.y:2994 +#: awkgram.y:3033 #, c-format msgid "" "function `%s' called with space between name and `(',\n" -"%s" +"or used as a variable or an array" msgstr "" "funzione `%s' chiamata con spazio tra il nome e `(',\n" -"%s" +"o usata come variabile o vettore" -#: awkgram.y:2996 -msgid "or used as a variable or an array" -msgstr "o usato come variabile o come vettore" - -#: builtin.c:137 +#: builtin.c:149 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s a \"%s\" fallita (%s)" -#: builtin.c:138 +#: builtin.c:150 msgid "standard output" msgstr "standard output" -#: builtin.c:139 +#: builtin.c:151 msgid "reason unknown" msgstr "ragione indeterminata" -#: builtin.c:152 +#: builtin.c:164 msgid "exp: received non-numeric argument" msgstr "exp: argomento non numerico" -#: builtin.c:158 +#: builtin.c:170 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: argomento %g non accettabile" -#: builtin.c:216 +#: builtin.c:228 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" "fflush: non posso scaricare: 'pipe' `%s' aperta in lettura, non in scrittura" -#: builtin.c:219 +#: builtin.c:231 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "" "fflush: non posso scaricare: file `%s' aperto in lettura, non in scrittura" -#: builtin.c:231 +#: builtin.c:243 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "fflush: `%s' non è un file aperto, una 'pipe' o un co-processo" -#: builtin.c:325 +#: builtin.c:338 msgid "index: received non-string first argument" msgstr "index: il primo argomento non è una stringa" -#: builtin.c:327 +#: builtin.c:340 msgid "index: received non-string second argument" msgstr "index: il secondo argomento non è una stringa" -#: builtin.c:437 +#: builtin.c:454 msgid "int: received non-numeric argument" msgstr "int: argomento non numerico" -#: builtin.c:454 +#: builtin.c:471 msgid "length: received non-string argument" msgstr "length: l'argomento non è una stringa" -#: builtin.c:470 +#: builtin.c:487 msgid "log: received non-numeric argument" msgstr "log: argomento non numerico" -#: builtin.c:473 +#: builtin.c:490 #, c-format msgid "log: received negative argument %g" msgstr "log: argomento negativo %g" -#: builtin.c:635 builtin.c:638 +#: builtin.c:654 builtin.c:657 msgid "must use `count$' on all formats or none" msgstr "'count$' va usato per tutti i formati o per nessuno" -#: builtin.c:740 +#: builtin.c:759 msgid "`$' is not permitted in awk formats" msgstr "`$' non permesso nei 'format' awk" -#: builtin.c:746 +#: builtin.c:765 msgid "arg count with `$' must be > 0" msgstr "il numero di argomento con `$' deve essere > 0" -#: builtin.c:748 +#: builtin.c:767 #, c-format msgid "arg count %ld greater than total number of supplied arguments" msgstr "" "numero di argomenti (%ld) maggiore del numero totale di argomenti specificati" -#: builtin.c:750 +#: builtin.c:769 msgid "`$' not permitted after period in format" msgstr "`$' non permesso dopo un punto nel 'format'" -#: builtin.c:763 +#: builtin.c:782 msgid "no `$' supplied for positional field width or precision" msgstr "" "nessun `$' specificato per larghezza o precisione di un campo posizionale" -#: builtin.c:821 +#: builtin.c:848 msgid "`l' is meaningless in awk formats; ignored" msgstr "`l' non ha senso nei 'format' awk; ignorata" -#: builtin.c:825 +#: builtin.c:852 msgid "`l' is not permitted in POSIX awk formats" msgstr "`l' non permessa nei 'format' awk POSIX" -#: builtin.c:836 +#: builtin.c:863 msgid "`L' is meaningless in awk formats; ignored" msgstr "`L' non ha senso nei 'format' awk; ignorata" -#: builtin.c:840 +#: builtin.c:867 msgid "`L' is not permitted in POSIX awk formats" msgstr "`L' non permessa nei 'format' awk POSIX" -#: builtin.c:851 +#: builtin.c:878 msgid "`h' is meaningless in awk formats; ignored" msgstr "`h' non ha senso nei 'format' awk; ignorata" -#: builtin.c:855 +#: builtin.c:882 msgid "`h' is not permitted in POSIX awk formats" msgstr "`h' non permessa nei 'format' awk POSIX" -#: builtin.c:1055 +#: builtin.c:1111 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" msgstr "[s]printf: valore %g non accettabile per il 'format' `%%%c'" -#: builtin.c:1108 +#: builtin.c:1171 msgid "not enough arguments to satisfy format string" msgstr "mancano argomenti per completare il 'format'" -#: builtin.c:1110 +#: builtin.c:1173 msgid "^ ran out for this one" msgstr "^ uscito per questo" -#: builtin.c:1115 +#: builtin.c:1178 msgid "[s]printf: format specifier does not have control letter" msgstr "[s]printf: il designatore di 'format' non ha una lettera di controllo" -#: builtin.c:1118 +#: builtin.c:1181 msgid "too many arguments supplied for format string" msgstr "troppi argomenti specificati per il 'format'" -#: builtin.c:1184 builtin.c:1187 +#: builtin.c:1247 builtin.c:1250 msgid "printf: no arguments" msgstr "printf: manca argomento" -#: builtin.c:1211 +#: builtin.c:1274 msgid "sqrt: received non-numeric argument" msgstr "sqrt: argomento non numerico" -#: builtin.c:1215 +#: builtin.c:1278 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: chiamata con argomento negativo %g" -#: builtin.c:1238 +#: builtin.c:1301 #, c-format msgid "substr: start index %g is invalid, using 1" msgstr "substr: indice di partenza %g invalido, uso 1" -#: builtin.c:1243 +#: builtin.c:1306 #, c-format msgid "substr: non-integer start index %g will be truncated" msgstr "substr: indice di partenza non intero %g: sarà troncato" -#: builtin.c:1262 -#, fuzzy, c-format +#: builtin.c:1325 +#, c-format msgid "substr: length %g is not >= 1" -msgstr "substr: lunghezza %g <= 0" +msgstr "substr: lunghezza %g non >= 1" -#: builtin.c:1264 -#, fuzzy, c-format +#: builtin.c:1327 +#, c-format msgid "substr: length %g is not >= 0" -msgstr "substr: lunghezza %g <= 0" +msgstr "substr: lunghezza %g non >= 0" -#: builtin.c:1271 +#: builtin.c:1334 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: lunghezza non intera %g: sarà truncata" -#: builtin.c:1276 +#: builtin.c:1339 #, c-format msgid "substr: length %g too big for string indexing, truncating to %g" msgstr "substr: lunghezza %g troppo elevata per indice stringa, tronco a %g" -#: builtin.c:1288 +#: builtin.c:1351 msgid "substr: source string is zero length" msgstr "substr: stringa di partenza lunga zero" -#: builtin.c:1294 +#: builtin.c:1357 #, c-format msgid "substr: start index %g is past end of string" msgstr "substr: indice di partenza %g oltre la fine della stringa" -#: builtin.c:1302 +#: builtin.c:1365 #, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" @@ -567,239 +568,259 @@ "substr: lunghezza %g all'indice di partenza %g supera la lunghezza del primo " "argomento (%lu)" -#: builtin.c:1337 +#: builtin.c:1400 msgid "strftime: received non-string first argument" msgstr "strftime: il primo argomento non è una stringa" -#: builtin.c:1343 +#: builtin.c:1406 msgid "strftime: received empty format string" msgstr "strftime: 'format' è una stringa nulla" -#: builtin.c:1352 +#: builtin.c:1415 msgid "strftime: received non-numeric second argument" msgstr "strftime: il secondo argomento non è numerico" -#: builtin.c:1415 +#: builtin.c:1478 msgid "mktime: received non-string argument" msgstr "mktime: l'argomento non è una stringa" -#: builtin.c:1460 +#: builtin.c:1523 msgid "system: received non-string argument" msgstr "system: l'argomento non è una stringa" -#: builtin.c:1581 eval.c:1883 +#: builtin.c:1644 eval.c:2019 #, c-format msgid "reference to uninitialized field `$%d'" msgstr "referenza a variabile non inizializzata `$%d'" -#: builtin.c:1608 +#: builtin.c:1671 msgid "tolower: received non-string argument" msgstr "tolower: l'argomento non è una stringa" -#: builtin.c:1657 +#: builtin.c:1720 msgid "toupper: received non-string argument" msgstr "toupper: l'argomento non è una stringa" -#: builtin.c:1702 +#: builtin.c:1765 msgid "atan2: received non-numeric first argument" msgstr "atan2: il primo argomento non è numerico" -#: builtin.c:1704 +#: builtin.c:1767 msgid "atan2: received non-numeric second argument" msgstr "atan2: il secondo argomento non è numerico" -#: builtin.c:1723 +#: builtin.c:1786 msgid "sin: received non-numeric argument" msgstr "sin: l'argomento non è numerico" -#: builtin.c:1739 +#: builtin.c:1802 msgid "cos: received non-numeric argument" msgstr "cos: l'argomento non è numerico" -#: builtin.c:1788 +#: builtin.c:1852 msgid "srand: received non-numeric argument" msgstr "srand: l'argomento non è numerico" -#: builtin.c:1823 +#: builtin.c:1887 msgid "match: third argument is not an array" msgstr "match: il terzo argomento non è un vettore" -#: builtin.c:2307 +#: builtin.c:2414 msgid "gensub: third argument of 0 treated as 1" msgstr "gensub: il terzo argomento è 0, trattato come 1" -#: builtin.c:2416 builtin.c:2418 +#: builtin.c:2572 msgid "lshift: received non-numeric first argument" msgstr "lshift: il primo argomento non è numerico" -#: builtin.c:2420 +#: builtin.c:2574 +msgid "lshift: received non-numeric second argument" +msgstr "lshift: il secondo argomento non è numerico" + +#: builtin.c:2580 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "lshift(%lf, %lf): valori negativi daranno risultati strani" -#: builtin.c:2422 +#: builtin.c:2582 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): valori con decimali verranno troncati" -#: builtin.c:2424 +#: builtin.c:2584 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "lshift(%lf, %lf): valori troppo alti daranno risultati strani" -#: builtin.c:2453 builtin.c:2455 +#: builtin.c:2610 msgid "rshift: received non-numeric first argument" msgstr "rshift: il primo argomento non è numerico" -#: builtin.c:2457 +#: builtin.c:2612 +msgid "rshift: received non-numeric second argument" +msgstr "rshift: il secondo argomento non è numerico" + +#: builtin.c:2618 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "rshift(%lf, %lf): valori negativi daranno risultati strani" -#: builtin.c:2459 +#: builtin.c:2620 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): valori con decimali verranno troncati" -#: builtin.c:2461 +#: builtin.c:2622 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "rshift(%lf, %lf): valori troppo alti daranno risultati strani" -#: builtin.c:2490 builtin.c:2492 +#: builtin.c:2648 msgid "and: received non-numeric first argument" msgstr "and: il primo argomento non è numerico" -#: builtin.c:2494 +#: builtin.c:2650 +msgid "and: received non-numeric second argument" +msgstr "and: il secondo argomento non è numerico" + +#: builtin.c:2656 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "and(%lf, %lf): valori negativi daranno risultati strani" -#: builtin.c:2496 +#: builtin.c:2658 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): valori con decimali verranno troncati" -#: builtin.c:2525 builtin.c:2527 +#: builtin.c:2684 msgid "or: received non-numeric first argument" msgstr "or: il primo argomento non è numerico" -#: builtin.c:2529 +#: builtin.c:2686 +msgid "or: received non-numeric second argument" +msgstr "or: il secondo argomento non è numerico" + +#: builtin.c:2692 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "or(%lf, %lf): valori negativi daranno risultati strani" -#: builtin.c:2531 +#: builtin.c:2694 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): valori con decimali verranno troncati" -#: builtin.c:2560 builtin.c:2562 +#: builtin.c:2720 msgid "xor: received non-numeric first argument" msgstr "xor: il primo argomento non è numerico" -#: builtin.c:2564 +#: builtin.c:2722 +msgid "xor: received non-numeric second argument" +msgstr "xor: il secondo argomento non è numerico" + +#: builtin.c:2728 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "xor(%lf, %lf): valori negativi daranno risultati strani" -#: builtin.c:2566 +#: builtin.c:2730 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): valori con decimali verranno troncati" -#: builtin.c:2594 +#: builtin.c:2754 msgid "compl: received non-numeric argument" msgstr "compl: l'argomento non è numerico" -#: builtin.c:2596 +#: builtin.c:2760 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): valore negativo darà risultati strani" -#: builtin.c:2598 +#: builtin.c:2762 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): valore con decimali verrà troncato" -#: builtin.c:2771 +#: builtin.c:2935 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: `%s' non è una categoria 'locale' valida" -#: eval.c:266 +#: eval.c:303 #, c-format msgid "unknown nodetype %d" msgstr "tipo nodo sconosciuto %d" -#: eval.c:312 +#: eval.c:350 msgid "buffer overflow in genflags2str" msgstr "superament limiti buffer in 'genflags2str'" -#: eval.c:647 +#: eval.c:382 eval.c:388 profile.c:837 +#, c-format +msgid "attempt to use array `%s' in a scalar context" +msgstr "tentativo di usare vettore `%s' in un contesto scalare" + +#: eval.c:730 #, c-format msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" "ciclo for: vettore `%s' ha cambiato dimensione da %ld a %ld durante " "l'esecuzione del ciclo" -#: eval.c:668 +#: eval.c:751 msgid "`break' outside a loop is not portable" msgstr "`break' all'esterno di un ciclo non è portabile" -#: eval.c:672 +#: eval.c:755 msgid "`break' outside a loop is not allowed" msgstr "`break' all'esterno di un ciclo non è consentito" -#: eval.c:689 +#: eval.c:772 msgid "`continue' outside a loop is not portable" msgstr "`continue' all'esterno di un ciclo non è portabile" -#: eval.c:693 +#: eval.c:776 msgid "`continue' outside a loop is not allowed" msgstr "`continue' all'esterno di un ciclo non è consentito" -#: eval.c:727 +#: eval.c:810 msgid "`next' cannot be called from a BEGIN rule" msgstr "`next' non può essere chiamato da una regola BEGIN" -#: eval.c:729 +#: eval.c:812 msgid "`next' cannot be called from an END rule" msgstr "`next' non può essere chiamato da una regola END" -#: eval.c:738 +#: eval.c:821 msgid "`nextfile' cannot be called from a BEGIN rule" msgstr "`nextfile' non può essere chiamato da una regola BEGIN" -#: eval.c:740 +#: eval.c:823 msgid "`nextfile' cannot be called from an END rule" msgstr "`nextfile' non può essere chiamato da una regola END" -#: eval.c:785 +#: eval.c:872 msgid "statement has no effect" msgstr "istruzione che non fa nulla" -#: eval.c:828 eval.c:1726 +#: eval.c:915 eval.c:1873 #, c-format msgid "can't use function name `%s' as variable or array" msgstr "non posso usare nome di funzione `%s' come variabile o vettore" -#: eval.c:835 eval.c:841 +#: eval.c:922 eval.c:928 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "referenza ad argomento non inizializzato `%s'" -#: eval.c:848 eval.c:907 eval.c:1732 eval.c:1742 profile.c:807 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "tentativo di usare vettore `%s' in un contesto scalare" - -#: eval.c:858 eval.c:1752 +#: eval.c:937 eval.c:1882 #, c-format msgid "reference to uninitialized variable `%s'" msgstr "referenza a variabile non inizializzata `%s'" -#: eval.c:1007 +#: eval.c:1083 msgid "" "concatenation: side effects in one expression have changed the length of " "another!" @@ -807,49 +828,50 @@ "concatenatione: effetti secondari in una espressione hanno modificato la " "lunghezza di un'altra espressione!" -#: eval.c:1032 +#: eval.c:1162 msgid "assignment used in conditional context" msgstr "assegnamento usato nel contesto di un test condizionale" -#: eval.c:1122 +#: eval.c:1252 msgid "division by zero attempted" msgstr "tentativo di dividere per zero" -#: eval.c:1137 +#: eval.c:1267 #, c-format msgid "division by zero attempted in `%%'" msgstr "divisione per zero tentata in `%%'" -#: eval.c:1152 profile.c:683 +#: eval.c:1282 profile.c:713 #, c-format msgid "illegal type (%s) in tree_eval" msgstr "tipo non ammesso (%s) in 'tree_eval'" -#: eval.c:1328 +#: eval.c:1459 msgid "division by zero attempted in `/='" msgstr "divisione per zero tentata in `/='" -#: eval.c:1346 +#: eval.c:1477 #, c-format msgid "division by zero attempted in `%%='" msgstr "divisione per zero tentata in `%%='" -#: eval.c:1586 +#: eval.c:1738 #, c-format msgid "function `%s' called with more arguments than declared" msgstr "funzione `%s' chiamata con più argomenti di quelli previsti" -#: eval.c:1633 +#: eval.c:1782 #, c-format msgid "function `%s' not defined" msgstr "funzione `%s' non definita" -#: eval.c:1639 +#: eval.c:1788 #, c-format msgid "function %s called\n" msgstr "funzione %s chiamata\n" -#: eval.c:1698 +#: eval.c:1845 +#, c-format msgid "" "\n" "\t# Function Call Stack:\n" @@ -859,41 +881,42 @@ "\t# 'Stack' (Pila) Chiamate Funzione:\n" "\n" -#: eval.c:1701 +#: eval.c:1848 +#, c-format msgid "\t# -- main --\n" msgstr "\t# -- principale --\n" -#: eval.c:1867 +#: eval.c:2003 msgid "attempt to field reference from non-numeric value" msgstr "tentativo di referenziare campo da valore non numerico" -#: eval.c:1869 +#: eval.c:2005 msgid "attempt to reference from null string" msgstr "tentativo to referenziare da stringa nulla" -#: eval.c:1875 +#: eval.c:2011 #, c-format msgid "attempt to access field %d" msgstr "tentativo di accedere al campo %d" -#: eval.c:1896 eval.c:1903 profile.c:900 +#: eval.c:2032 eval.c:2039 profile.c:934 msgid "assignment is not allowed to result of builtin function" msgstr "assegnamento non permesso al risultato di una funzione interna" -#: eval.c:1951 +#: eval.c:2103 msgid "`IGNORECASE' is a gawk extension" msgstr "`IGNORECASE' è un'estensione gawk" -#: eval.c:1980 +#: eval.c:2133 msgid "`BINMODE' is a gawk extension" msgstr "`BINMODE' è un'estensione gawk" -#: eval.c:2092 +#: eval.c:2255 #, c-format msgid "bad `%sFMT' specification `%s'" msgstr "specificazione invalida `%sFMT' `%s'" -#: eval.c:2170 +#: eval.c:2333 msgid "turning off `--lint' due to assignment to `LINT'" msgstr "disabilito `--lint' a causa di assegnamento a `LINT'" @@ -904,14 +927,65 @@ #: ext.c:74 #, c-format msgid "extension: cannot open `%s' (%s)\n" -msgstr "extension: non riesco ad aprire `%s' (%s)\n" +msgstr "estensione: non riesco ad aprire `%s' (%s)\n" #: ext.c:82 #, c-format msgid "extension: library `%s': cannot call function `%s' (%s)\n" -msgstr "extension: biblioteca `%s': non riesco a chiamare funzione `%s' (%s)\n" +msgstr "" +"estensione: biblioteca `%s': non riesco a chiamare funzione `%s' (%s)\n" + +#: ext.c:102 +msgid "extension: missing function name" +msgstr "estensione: manca nome di funzione" + +#: ext.c:107 +#, c-format +msgid "extension: illegal character `%c' in function name `%s'" +msgstr "estensione: carattere non ammesso `%c' nel nome di funzione `%s'" + +#: ext.c:113 +#, c-format +msgid "extension: can't redefine function `%s'" +msgstr "estensione: non riesco a ridefinire funzione `%s'" + +#: ext.c:117 +#, c-format +msgid "extension: function `%s' already defined" +msgstr "estensione: funzione `%s' già definita" + +#: ext.c:122 +#, c-format +msgid "extension: can't use gawk built-in `%s' as function name" +msgstr "" +"estensione: nome funzione interna gawk `%s' non ammesso come nome funzione" -#: ext.c:183 +#: ext.c:124 +#, c-format +msgid "extension: function name `%s' previously defined" +msgstr "estensione: funzione di nome `%s' definita in precedenza" + +#: ext.c:201 +#, c-format +msgid "function `%s' defined to take no more than `%d' argument(s)" +msgstr "funzione `%s' definita con al massimo `%d' argumenti/o" + +#: ext.c:204 +#, c-format +msgid "function `%s': missing argument #%d" +msgstr "funzione `%s': manca argomento #%d" + +#: ext.c:214 +#, c-format +msgid "function `%s': argument #%d: attempt to use scalar as an array" +msgstr "funzione `%s': argomento #%d: tentativo di usare scalare come vettore" + +#: ext.c:218 +#, c-format +msgid "function `%s': argument #%d: attempt to use array as a scalar" +msgstr "funzione `%s': argomento #%d: tentativo di usare vettore come scalare" + +#: ext.c:243 msgid "Operation Not Supported" msgstr "Operazione Non Supportata" @@ -940,526 +1014,526 @@ msgid "null string for `FS' is a gawk extension" msgstr "la stringa nulla usata come `FS' è un'estensione gawk" -#: getopt.c:692 getopt.c:704 +#: getopt.c:692 getopt.c:711 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s: opzione `%s' ambigua\n" -#: getopt.c:737 getopt.c:741 +#: getopt.c:744 getopt.c:748 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "%s: opzione `--%s' non prevede un argomento\n" -#: getopt.c:750 getopt.c:755 +#: getopt.c:757 getopt.c:762 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "%s: opzione `%c%s' non prevede un argomento\n" -#: getopt.c:791 getopt.c:804 getopt.c:1093 getopt.c:1106 +#: getopt.c:807 getopt.c:829 getopt.c:1159 getopt.c:1181 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "%s: opzione `%s' richiede un argomento\n" -#: getopt.c:842 getopt.c:845 +#: getopt.c:867 getopt.c:870 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s: opzione sconosciuta `--%s'\n" -#: getopt.c:853 getopt.c:856 +#: getopt.c:878 getopt.c:881 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s: opzione sconosciuta `%c%s'\n" -#: getopt.c:903 getopt.c:906 +#: getopt.c:936 getopt.c:939 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: opzione non permessa -- %c\n" -#: getopt.c:912 getopt.c:915 +#: getopt.c:945 getopt.c:948 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s: opzione non valida -- %c\n" -#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:434 +#: getopt.c:1003 getopt.c:1022 getopt.c:1234 getopt.c:1255 main.c:433 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: l'opzione richiede un argomento -- %c\n" -#: getopt.c:1025 getopt.c:1036 +#: getopt.c:1074 getopt.c:1093 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s: opzione `-W %s' ambigua\n" -#: getopt.c:1060 getopt.c:1072 +#: getopt.c:1117 getopt.c:1138 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: opzione `-W %s' non prevede un argomento\n" -#: io.c:305 +#: io.c:308 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "non riesco ad aprire file `%s' in lettura (%s)" -#: io.c:392 +#: io.c:395 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "chiusura di fd %d (`%s') fallita (%s)" -#: io.c:530 +#: io.c:533 #, c-format msgid "invalid tree type %s in redirect()" msgstr "tipo di albero invalido %s in redirect()" -#: io.c:536 +#: io.c:539 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "espressione nella re-direzione `%s' ha solo un valore numerico" -#: io.c:542 +#: io.c:545 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "espressione nella re-direzione `%s' ha per valore la stringa nulla" -#: io.c:547 +#: io.c:550 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "nome file `%s' per la re-direzione `%s' può essere il risultato di una " "espressione logica" -#: io.c:569 +#: io.c:588 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "mistura non necessaria di `>' e `>>' per il file `%.*s'" -#: io.c:621 +#: io.c:640 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "non posso aprire 'pipe' `%s' in scrittura (%s)" -#: io.c:630 +#: io.c:649 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "non posso aprire 'pipe' `%s' in lettura (%s)" -#: io.c:643 +#: io.c:662 #, c-format msgid "can't open two way socket `%s' for input/output (%s)" msgstr "" "non posso aprire 'socket' bidirezionale `%s' per lettura/scrittura (%s)" -#: io.c:647 +#: io.c:666 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "non posso aprire 'pipe' bidirezionale `%s' per lettura/scrittura (%s)" -#: io.c:723 +#: io.c:742 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "non posso re-dirigere da `%s' (%s)" -#: io.c:726 +#: io.c:745 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "non posso re-dirigere a `%s' (%s)" -#: io.c:765 +#: io.c:784 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "numero massimo consentito di file aperti raggiunto: comincio a riutilizzare " "i descrittori di file" -#: io.c:777 +#: io.c:800 #, c-format msgid "close of `%s' failed (%s)." msgstr "chiusura di `%s' fallita (%s)." -#: io.c:784 +#: io.c:808 msgid "too many pipes or input files open" msgstr "troppe 'pipe' o file di input aperti" -#: io.c:807 +#: io.c:831 msgid "close: second argument must be `to' or `from'" msgstr "close: il secondo argomento deve essere `a' o `da'" -#: io.c:821 +#: io.c:845 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "close: `%.*s' non è un file aperto, una 'pipe' o un co-processo" -#: io.c:825 +#: io.c:849 msgid "close of redirection that was never opened" msgstr "chiusura di una re-direzione mai aperta" -#: io.c:862 +#: io.c:945 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "close: re-direzione `%s' non aperta con `|&', ignoro secondo argomento" -#: io.c:924 +#: io.c:960 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "errore ritornato (%d) dalla chiusura della 'pipe' `%s' (%s)" -#: io.c:927 +#: io.c:963 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "errore ritornato (%d) dalla chiusura del file `%s' (%s)" -#: io.c:946 +#: io.c:983 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "nessuna chiusura esplicita richiesta per 'socket' `%s'" -#: io.c:949 +#: io.c:986 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "nessuna chiusura esplicita richiesta per co-processo `%s'" -#: io.c:952 +#: io.c:989 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "nessuna chiusura esplicita richiesta per 'pipe' `%s'" -#: io.c:955 +#: io.c:992 #, c-format msgid "no explicit close of file `%s' provided" msgstr "nessuna chiusura esplicita richiesta per file `%s'" -#: io.c:984 io.c:1038 +#: io.c:1021 io.c:1075 #, c-format msgid "error writing standard output (%s)" msgstr "errore scrivendo 'standard output' (%s)" -#: io.c:988 io.c:1042 +#: io.c:1025 io.c:1079 #, c-format msgid "error writing standard error (%s)" msgstr "errore scrivendo 'standard error' (%s)" -#: io.c:996 +#: io.c:1033 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "scaricamento di 'pipe' `%s' fallita (%s)." -#: io.c:999 +#: io.c:1036 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "scaricamento da co-processo di 'pipe' a `%s' fallita (%s)." -#: io.c:1002 +#: io.c:1039 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "scaricamento di file `%s' fallita (%s)." -#: io.c:1161 +#: io.c:1198 msgid "/inet/raw client not ready yet, sorry" msgstr "spiacente, 'client' /inet/raw non ancora pronto" -#: io.c:1163 io.c:1200 +#: io.c:1200 io.c:1237 msgid "only root may use `/inet/raw'." msgstr "solo root può usare `/inet/raw'." -#: io.c:1198 +#: io.c:1235 msgid "/inet/raw server not ready yet, sorry" msgstr "spiacente, 'server' /inet/raw non ancora pronto" -#: io.c:1288 +#: io.c:1325 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "nessuno protocollo (conosciuto) specificato nel filename speciale `%s'" -#: io.c:1306 +#: io.c:1343 #, c-format msgid "special file name `%s' is incomplete" msgstr "nome file speciale `%s' incompleto" -#: io.c:1318 +#: io.c:1355 #, c-format msgid "local port invalid in `%s'" msgstr "porta locale invalida in `%s'" -#: io.c:1330 +#: io.c:1367 msgid "must supply a remote hostname to `/inet'" msgstr "va fornito nome di 'host' remoto a `/inet'" -#: io.c:1345 +#: io.c:1382 msgid "must supply a remote port to `/inet'" msgstr "va fornita porta remota a `/inet'" -#: io.c:1351 +#: io.c:1388 #, c-format msgid "remote port invalid in `%s'" msgstr "porta remota invalida in `%s'" -#: io.c:1361 +#: io.c:1398 msgid "TCP/IP communications are not supported" msgstr "comunicazioni TCP/IP non supportate" -#: io.c:1370 io.c:1551 +#: io.c:1407 io.c:1588 #, c-format msgid "file `%s' is a directory" msgstr "file `%s' è una 'directory'" -#: io.c:1440 +#: io.c:1477 #, c-format msgid "use `PROCINFO[\"%s\"]' instead of `%s'" msgstr "usa `PROCINFO[\"%s\"]' invece che `%s'" -#: io.c:1472 +#: io.c:1509 msgid "use `PROCINFO[...]' instead of `/dev/user'" msgstr "usa `PROCINFO[...]' invece che `/dev/user'" -#: io.c:1537 io.c:1711 +#: io.c:1574 io.c:1748 #, c-format msgid "could not open `%s', mode `%s'" msgstr "non riesco ad aprire `%s', modo `%s'" -#: io.c:1762 +#: io.c:1799 #, c-format msgid "close of master pty failed (%s)" msgstr "fallita chiusura di 'pty' principale (%s)" -#: io.c:1764 io.c:1916 io.c:2068 +#: io.c:1801 io.c:1953 io.c:2105 #, c-format msgid "close of stdout in child failed (%s)" msgstr "fallita chiusura di 'stdout' nel processo-figlio (%s)" -#: io.c:1767 +#: io.c:1804 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "" "fallito trasferimento di 'pty' secondaria a 'stdout' nel processo-figlio " "(dup: %s)" -#: io.c:1769 io.c:1921 +#: io.c:1806 io.c:1958 #, c-format msgid "close of stdin in child failed (%s)" msgstr "fallita chiusura di 'stdin' nel processo-figlio (%s)" -#: io.c:1772 +#: io.c:1809 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "" "fallito trasferimento di 'pty' secondaria a 'stdin' nel processo-figlio " "(dup: %s)" -#: io.c:1774 io.c:1793 +#: io.c:1811 io.c:1830 #, c-format msgid "close of slave pty failed (%s)" msgstr "fallita chiusura di 'pty' secondaria (%s)" -#: io.c:1867 io.c:1919 io.c:2049 io.c:2071 +#: io.c:1904 io.c:1956 io.c:2086 io.c:2108 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "fallito passaggio di 'pipe' a 'stdout' nel processo-figlio (dup: %s)" -#: io.c:1871 io.c:1924 +#: io.c:1908 io.c:1961 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "fallito passaggio di pipe a 'stdin' nel processo-figlio (dup: %s)" -#: io.c:1888 io.c:2062 +#: io.c:1925 io.c:2099 msgid "restoring stdout in parent process failed\n" msgstr "fallito ripristino di 'stdout' nel processo-padre\n" -#: io.c:1893 +#: io.c:1930 msgid "restoring stdin in parent process failed\n" msgstr "fallito ripristino di 'stdin' nel processo-padre\n" -#: io.c:1927 io.c:2073 io.c:2084 +#: io.c:1964 io.c:2110 io.c:2121 #, c-format msgid "close of pipe failed (%s)" msgstr "fallita chiusura di 'pipe' (%s)" -#: io.c:1972 +#: io.c:2009 msgid "`|&' not supported" msgstr "`|&' non supportato" -#: io.c:2039 +#: io.c:2076 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "non riesco ad aprire 'pipe' `%s' (%s)" -#: io.c:2080 +#: io.c:2117 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "non riesco a creare processo-figlio per `%s' (fork: %s)" -#: io.c:2423 +#: io.c:2460 #, c-format msgid "data file `%s' is empty" msgstr "file dati `%s' vuoto" -#: io.c:2466 io.c:2474 +#: io.c:2503 io.c:2511 msgid "could not allocate more input memory" msgstr "non riesco ad allocare ulteriore memoria per l'input" -#: io.c:2832 io.c:2895 +#: io.c:2869 io.c:2932 #, c-format msgid "error reading input file `%s': %s" msgstr "errore leggendo file di input `%s': %s" -#: io.c:3020 +#: io.c:3057 msgid "multicharacter value of `RS' is a gawk extension" msgstr "valore multicarattere per `RS' è un'estensione gawk" -#: main.c:324 +#: main.c:323 msgid "`-m[fr]' option irrelevant in gawk" msgstr "`-m[fr]' opzione irrilevante per gawk" -#: main.c:326 +#: main.c:325 msgid "-m option usage: `-m[fr] nnn'" msgstr "-m uso opzione: `-m[fr] nnn'" -#: main.c:343 +#: main.c:342 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: opzione `-W %s' non riconosciuta, ignorata\n" -#: main.c:380 +#: main.c:379 msgid "empty argument to `--source' ignored" msgstr "argomento di `--source' mancante, comando ignorato" -#: main.c:451 +#: main.c:450 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "variable d'ambiente `POSIXLY_CORRECT' impostata: attivo `--posix'" -#: main.c:456 +#: main.c:455 msgid "`--posix' overrides `--traditional'" msgstr "`--posix' annulla `--traditional'" -#: main.c:467 +#: main.c:466 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "`--posix'/`--traditional' annulla `--non-decimal-data'" -#: main.c:471 +#: main.c:470 #, c-format msgid "running %s setuid root may be a security problem" msgstr "eseguire %s con 'setuid' root può essere un rischio per la sicurezza" -#: main.c:512 +#: main.c:511 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "non posso impostare modalità binaria su 'stdin'(%s)" -#: main.c:515 +#: main.c:514 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "non posso impostare modalità binaria su 'stdout'(%s)" -#: main.c:517 +#: main.c:516 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "non posso impostare modalità binaria su 'stderr'(%s)" -#: main.c:547 +#: main.c:546 msgid "no program text at all!" msgstr "manca del tutto il testo del programma!" -#: main.c:620 +#: main.c:623 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "Uso: %s [opzioni in stile POSIX o GNU] -f fileprog [--] file ...\n" -#: main.c:622 +#: main.c:625 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "Usage: %s [opzioni in stile POSIX o GNU] [--] %cprogramma%c file ...\n" -#: main.c:627 +#: main.c:630 msgid "POSIX options:\t\tGNU long options:\n" msgstr "Opzioni POSIX:\t\topzioni lunghe GNU:\n" -#: main.c:628 +#: main.c:631 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f fileprog\t\t--file=fileprog\n" -#: main.c:629 +#: main.c:632 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F fs\t\t\t--field-separator=fs\n" -#: main.c:630 +#: main.c:633 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v var=valore\t\t--assign=var=valore\n" -#: main.c:631 +#: main.c:634 msgid "\t-m[fr] val\n" msgstr "\t-m[fr] valore\n" -#: main.c:632 +#: main.c:635 msgid "\t-W compat\t\t--compat\n" msgstr "\t-W compat\t\t--compat\n" -#: main.c:633 +#: main.c:636 msgid "\t-W copyleft\t\t--copyleft\n" msgstr "\t-W copyleft\t\t--copyleft\n" -#: main.c:634 +#: main.c:637 msgid "\t-W copyright\t\t--copyright\n" msgstr "\t-W copyright\t\t--copyright\n" -#: main.c:635 +#: main.c:638 msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" msgstr "\t-W dump-variables[=file]\t--dump-variables[=file]\n" -#: main.c:636 +#: main.c:639 msgid "\t-W gen-po\t\t--gen-po\n" msgstr "\t-W gen-po\t\t--gen-po\n" -#: main.c:637 +#: main.c:640 msgid "\t-W help\t\t\t--help\n" msgstr "\t-W help\t\t\t--help\n" -#: main.c:638 +#: main.c:641 msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -#: main.c:639 +#: main.c:642 msgid "\t-W lint-old\t\t--lint-old\n" msgstr "\t-W lint-old\t\t--lint-old\n" -#: main.c:640 +#: main.c:643 msgid "\t-W non-decimal-data\t--non-decimal-data\n" msgstr "\t-W non-decimal-data\t--non-decimal-data\n" -#: main.c:642 +#: main.c:645 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" -#: main.c:645 +#: main.c:648 msgid "\t-W parsedebug\t\t--parsedebug\n" msgstr "\t-W parsedebug\t\t--parsedebug\n" -#: main.c:647 +#: main.c:650 msgid "\t-W profile[=file]\t--profile[=file]\n" msgstr "\t-W profile[=file]\t--profile[=file]\n" -#: main.c:648 +#: main.c:651 msgid "\t-W posix\t\t--posix\n" msgstr "\t-W posix\t\t--posix\n" -#: main.c:649 +#: main.c:652 msgid "\t-W re-interval\t\t--re-interval\n" msgstr "\t-W re-interval\t\t--re-interval\n" -#: main.c:650 +#: main.c:653 msgid "\t-W source=program-text\t--source=program-text\n" msgstr "\t-W source=testo-programma\t--source=testo-programma\n" -#: main.c:651 +#: main.c:654 msgid "\t-W traditional\t\t--traditional\n" msgstr "\t-W traditional\t\t--traditional\n" -#: main.c:652 +#: main.c:655 msgid "\t-W usage\t\t--usage\n" msgstr "\t-W usage\t\t--usage\n" -#: main.c:653 +#: main.c:656 msgid "\t-W version\t\t--version\n" msgstr "\t-W version\t\t--version\n" -#: main.c:657 +#: main.c:660 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1471,7 +1545,7 @@ "sezione `Reporting Problems and Bugs' nella versione a stampa.\n" "\n" -#: main.c:661 +#: main.c:664 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -1481,7 +1555,7 @@ "Senza parametri, legge da 'standard input' e scrive su 'standard output'.\n" "\n" -#: main.c:665 +#: main.c:668 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -1491,7 +1565,7 @@ "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:682 +#: main.c:685 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1510,7 +1584,7 @@ "Licenza, o (a tua scelta) a una qualsiasi versione successiva.\n" "\n" -#: main.c:690 +#: main.c:693 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -1524,7 +1598,7 @@ "Vedi la 'GNU General Public License' per ulteriori dettagli.\n" "\n" -#: main.c:696 +#: main.c:699 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, write to the Free Software\n" @@ -1534,11 +1608,11 @@ "assieme a questo programma; se non è così, scrivi alla Free Software\n" "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n" -#: main.c:730 +#: main.c:733 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft non imposta FS a 'tab' nell'awk POSIX" -#: main.c:956 +#: main.c:962 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" @@ -1547,40 +1621,41 @@ "%s: `%s' argomento di `-v' non in forma `var=valore'\n" "\n" -#: main.c:976 +#: main.c:982 #, c-format msgid "`%s' is not a legal variable name" msgstr "`%s' non è un nome di variabile ammesso" -#: main.c:979 +#: main.c:985 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "`%s' non è un nome di variabile, cerco il file `%s=%s'" -#: main.c:1012 +#: main.c:1018 msgid "floating point exception" msgstr "eccezione floating point" -#: main.c:1019 +#: main.c:1025 msgid "fatal error: internal error" msgstr "errore fatale: errore interno" -#: main.c:1069 +#: main.c:1075 #, c-format msgid "no pre-opened fd %d" msgstr "manca 'fd' predefinita %d" -#: main.c:1074 +#: main.c:1082 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "non riesco a predefinire /dev/null per 'fd' %d" -#: main.c:1097 main.c:1106 +#: main.c:1105 main.c:1114 #, c-format msgid "could not find groups: %s" msgstr "non riesco a trovare gruppi: %s" #: msg.c:54 +#, c-format msgid "cmd. line:" msgstr "linea progr.:" @@ -1600,19 +1675,19 @@ msgid "can't convert string to float" msgstr "non riesco a convertire stringa a valore in virgola mobile" -#: node.c:355 +#: node.c:357 msgid "backslash at end of string" msgstr "'\\' a fine stringa" -#: node.c:539 +#: node.c:541 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX non permette formato `\\x'" -#: node.c:545 +#: node.c:547 msgid "no hex digits in `\\x' escape sequence" msgstr "niente cifre esadecimanli nel formato `\\x'" -#: node.c:579 +#: node.c:581 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr " sequenza in formato `\\%c' considerata come semplice `%c'" @@ -1627,21 +1702,27 @@ msgid "could not open `%s' for writing: %s" msgstr "non riesco ad aprire `%s' in scrittura: %s" -#: profile.c:449 +#: profile.c:467 #, c-format msgid "internal error: %s with null vname" msgstr "errore interno: %s con 'vname' nullo" -#: profile.c:512 +#: profile.c:530 msgid "# treated internally as `delete'" msgstr "# gestito internamente come 'delete' (cancellazione)" -#: profile.c:1162 +#: profile.c:1167 +#, c-format +msgid "# this is a dynamically loaded extension function" +msgstr "# questa è una funzione di estensione caricata dinamicamente" + +#: profile.c:1198 #, c-format msgid "\t# gawk profile, created %s\n" msgstr "\t# profilo gawk, creato %s\n" -#: profile.c:1165 +#: profile.c:1201 +#, c-format msgid "" "\t# BEGIN block(s)\n" "\n" @@ -1649,7 +1730,8 @@ "\t# blocco(hi) BEGIN\n" "\n" -#: profile.c:1175 +#: profile.c:1211 +#, c-format msgid "" "\t# Rule(s)\n" "\n" @@ -1657,7 +1739,8 @@ "\t# Regola(e)\n" "\n" -#: profile.c:1181 +#: profile.c:1217 +#, c-format msgid "" "\t# END block(s)\n" "\n" @@ -1665,7 +1748,8 @@ "\t# blocco(hi) END\n" "\n" -#: profile.c:1201 +#: profile.c:1237 +#, c-format msgid "" "\n" "\t# Functions, listed alphabetically\n" @@ -1673,89 +1757,79 @@ "\n" "\t# Funzioni, listate in ordine alfabetico\n" -#: profile.c:1413 +#: profile.c:1452 #, c-format msgid "unexpected type %s in prec_level" msgstr "tipo non previsto %s in 'prec_level'" -#: re.c:193 -#, c-format -msgid "regex match failed, not enough memory to match string \"%.*s%s\"" -msgstr "" -"fallita ricerca di 'espressione regolare', non c'è memoria sufficiente a " -"ricercare la stringa \"%.*s%s\"" - -#: regcomp.c:136 +#: regcomp.c:150 msgid "Success" msgstr "Successo" -#: regcomp.c:139 +#: regcomp.c:153 msgid "No match" msgstr "Nessuna corrispondenza" -#: regcomp.c:142 +#: regcomp.c:156 msgid "Invalid regular expression" msgstr "Espressione regolare invalida" -#: regcomp.c:145 +#: regcomp.c:159 msgid "Invalid collation character" msgstr "Carattere di ordinamento non valido" -#: regcomp.c:148 +#: regcomp.c:162 msgid "Invalid character class name" msgstr "Nome di 'classe di caratteri' invalido" -#: regcomp.c:151 +#: regcomp.c:165 msgid "Trailing backslash" msgstr "'\\' finale" -#: regcomp.c:154 +#: regcomp.c:168 msgid "Invalid back reference" msgstr "Riferimento indietro invalido" -#: regcomp.c:157 +#: regcomp.c:171 msgid "Unmatched [ or [^" msgstr "[ or [^ non chiusa" -#: regcomp.c:160 +#: regcomp.c:174 msgid "Unmatched ( or \\(" msgstr "( or \\( non chiusa" -#: regcomp.c:163 +#: regcomp.c:177 msgid "Unmatched \\{" msgstr "\\{ non chiusa" -#: regcomp.c:166 +#: regcomp.c:180 msgid "Invalid content of \\{\\}" msgstr "Contenuto di \\{\\} invalido" -#: regcomp.c:169 +#: regcomp.c:183 msgid "Invalid range end" msgstr "Fine di intervallo invalido" -#: regcomp.c:172 +#: regcomp.c:186 msgid "Memory exhausted" msgstr "Memoria esaurita" -#: regcomp.c:175 +#: regcomp.c:189 msgid "Invalid preceding regular expression" msgstr "Espressione regolare precedente invalida" -#: regcomp.c:178 +#: regcomp.c:192 msgid "Premature end of regular expression" msgstr "Fine di expressione regolare inaspettata" -#: regcomp.c:181 +#: regcomp.c:195 msgid "Regular expression too big" msgstr "Espressione regolare troppo complessa" -#: regcomp.c:184 +#: regcomp.c:198 msgid "Unmatched ) or \\)" msgstr ") or \\) non aperta" -#: regcomp.c:621 +#: regcomp.c:668 msgid "No previous regular expression" msgstr "Nessuna espressione regolare precedente" - -#~ msgid "substr: length %g is < 0" -#~ msgstr "substr: lunghezza %g < 0" diff -urN gawk-3.1.3/po/pt_BR.po gawk-3.1.4/po/pt_BR.po --- gawk-3.1.3/po/pt_BR.po 2003-07-07 21:20:35.000000000 +0300 +++ gawk-3.1.4/po/pt_BR.po 2004-07-15 13:02:12.000000000 +0300 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: gawk 3.1.2g\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2003-07-07 11:20-0700\n" +"POT-Creation-Date: 2004-07-15 13:02+0300\n" "PO-Revision-Date: 2003-06-26 16:18+0300\n" "Last-Translator: Juan Carlos Castro y Castro \n" "Language-Team: Brazilian Portuguese \n" @@ -16,56 +16,61 @@ "Content-Transfer-Encoding: 8bit\n" #: array.c:112 +#, fuzzy, c-format +msgid "attempt to use function `%s' as an array" +msgstr "tentativa de usar escalar `%s' como vetor" + +#: array.c:115 #, c-format msgid "attempt to use scalar parameter `%s' as an array" msgstr "tentativa de usar parâmetro escalar `%s' como vetor" -#: array.c:113 +#: array.c:118 #, c-format msgid "attempt to use scalar `%s' as array" msgstr "tentativa de usar escalar `%s' como vetor" -#: array.c:151 +#: array.c:156 #, c-format msgid "from %s" msgstr "de %s" -#: array.c:506 +#: array.c:511 #, c-format msgid "reference to uninitialized element `%s[\"%s\"]'" msgstr "referência a elemento não inicializado `%s[\"%s\"]'" -#: array.c:512 +#: array.c:517 #, c-format msgid "subscript of array `%s' is null string" msgstr "índice do vetor `%s' é uma string nula" -#: array.c:609 +#: array.c:621 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: índice `%s' não está no vetor `%s'" -#: array.c:769 +#: array.c:791 #, c-format msgid "%s: empty (null)\n" msgstr "%s: vazio (nulo)\n" -#: array.c:774 +#: array.c:796 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: vazio (zero)\n" -#: array.c:778 +#: array.c:800 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: table_size = %d, array_size = %d\n" -#: array.c:807 +#: array.c:829 #, c-format msgid "%s: is parameter\n" msgstr "%s: é parâmetro\n" -#: array.c:812 +#: array.c:834 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: array_ref para %s\n" @@ -89,475 +94,471 @@ msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "constante de expr. reg. `/%s/' parece um comentário C, mas não é" -#: awkgram.y:340 awkgram.y:615 +#: awkgram.y:341 awkgram.y:619 msgid "statement may have no effect" msgstr "declaração pode não ter efeito" -#: awkgram.y:435 awkgram.y:455 +#: awkgram.y:436 awkgram.y:456 #, c-format msgid "`%s' used in %s action" msgstr "`%s' usado em ação %s" -#: awkgram.y:448 awkgram.y:451 +#: awkgram.y:449 awkgram.y:452 msgid "`nextfile' is a gawk extension" msgstr "`nextfile' é uma extensão do gawk" -#: awkgram.y:465 +#: awkgram.y:466 msgid "`return' used outside function context" msgstr "`return' usado fora do contexto de função" -#: awkgram.y:504 +#: awkgram.y:508 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "`print' sozinho em regra BEGIN ou END provavelmente deveria ser `print \"\"'" -#: awkgram.y:517 awkgram.y:524 +#: awkgram.y:521 awkgram.y:528 msgid "`delete array' is a gawk extension" msgstr "`delete array' é uma extensão do gawk" -#: awkgram.y:532 awkgram.y:539 +#: awkgram.y:536 awkgram.y:543 msgid "`delete(array)' is a non-portable tawk extension" msgstr "`delete(array)' é uma extensão não-portável do tawk" -#: awkgram.y:583 +#: awkgram.y:587 #, c-format msgid "duplicate case values in switch body: %s" msgstr "valores de case duplicados no corpo do switch: %s" -#: awkgram.y:593 +#: awkgram.y:597 msgid "Duplicate `default' detected in switch body" msgstr "Detectado `default' duplicado no corpo do switch" -#: awkgram.y:681 +#: awkgram.y:686 msgid "multistage two-way pipelines don't work" msgstr "pipelines bidirecionais de múltiplos estágios não funcionam" -#: awkgram.y:772 +#: awkgram.y:777 msgid "regular expression on right of assignment" msgstr "expressão regular à direita de atribuição" -#: awkgram.y:782 +#: awkgram.y:800 msgid "regular expression on left of `~' or `!~' operator" msgstr "expressão regular à esquerda de operador `~' ou `!~'" -#: awkgram.y:790 +#: awkgram.y:808 msgid "regular expression on right of comparison" msgstr "expressão regular à direita de comparação" -#: awkgram.y:857 +#: awkgram.y:875 msgid "non-redirected `getline' undefined inside END action" msgstr "`getline' não-redirecionado não é definido dentro da ação END" -#: awkgram.y:884 +#: awkgram.y:902 msgid "call of `length' without parentheses is not portable" msgstr "chamada a `length' sem parênteses não é portável" -#: awkgram.y:887 +#: awkgram.y:905 msgid "call of `length' without parentheses is deprecated by POSIX" msgstr "chamada a `length' sem parênteses é obsoleta de acordo com POSIX" -#: awkgram.y:940 +#: awkgram.y:958 msgid "use of non-array as array" msgstr "uso de não-vetor como vetor" -#: awkgram.y:942 +#: awkgram.y:960 msgid "invalid subscript expression" msgstr "expressão de índice inválida" -#: awkgram.y:1140 +#: awkgram.y:1158 msgid "unexpected newline or end of string" msgstr "fim de linha ou de string inesperado" -#: awkgram.y:1235 +#: awkgram.y:1254 msgid "empty program text on command line" msgstr "texto de programa vazio na linha de comando" -#: awkgram.y:1292 +#: awkgram.y:1307 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "impossível abrir arquivo-fonte `%s' para leitura (%s)" -#: awkgram.y:1327 +#: awkgram.y:1384 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "impossível ler arquivo-fonte `%s' (%s)" -#: awkgram.y:1335 +#: awkgram.y:1392 #, c-format msgid "source file `%s' is empty" msgstr "arquivo-fonte `%s' está vazio" -#: awkgram.y:1537 awkgram.y:1647 awkgram.y:1665 awkgram.y:2015 awkgram.y:2100 +#: awkgram.y:1590 awkgram.y:1700 awkgram.y:1718 awkgram.y:2068 awkgram.y:2153 msgid "source file does not end in newline" msgstr "arquivo-fonte não termina em fim-de-linha" -#: awkgram.y:1601 +#: awkgram.y:1654 msgid "unterminated regexp ends with `\\' at end of file" msgstr "expressão regular inacabada termina com `\\' ao fim do arquivo" -#: awkgram.y:1621 +#: awkgram.y:1674 msgid "unterminated regexp" msgstr "expressão regular inacabada" -#: awkgram.y:1624 +#: awkgram.y:1677 msgid "unterminated regexp at end of file" msgstr "expressão regular inacabada no fim do arquivo" -#: awkgram.y:1691 +#: awkgram.y:1744 msgid "use of `\\ #...' line continuation is not portable" msgstr "uso da continuação de linha `\\ #...' não é portável" -#: awkgram.y:1703 +#: awkgram.y:1756 msgid "backslash not last character on line" msgstr "`\\' não é o último caracter da linha" -#: awkgram.y:1748 +#: awkgram.y:1801 msgid "POSIX does not allow operator `**='" msgstr "POSIX não permite o operador `**='" -#: awkgram.y:1750 +#: awkgram.y:1803 msgid "old awk does not support operator `**='" msgstr "o velho awk não suporta o operador `**='" -#: awkgram.y:1759 +#: awkgram.y:1812 msgid "POSIX does not allow operator `**'" msgstr "POSIX não permite o operador `**'" -#: awkgram.y:1761 +#: awkgram.y:1814 msgid "old awk does not support operator `**'" msgstr "o velho awk não suporta o operador `**'" -#: awkgram.y:1792 +#: awkgram.y:1845 msgid "operator `^=' is not supported in old awk" msgstr "o velho awk não suporta o operador `^='" -#: awkgram.y:1800 +#: awkgram.y:1853 msgid "operator `^' is not supported in old awk" msgstr "o velho awk não suporta o operador `^'" -#: awkgram.y:1884 awkgram.y:1901 +#: awkgram.y:1937 awkgram.y:1954 msgid "unterminated string" msgstr "string inacabada" -#: awkgram.y:2061 +#: awkgram.y:2114 #, c-format msgid "invalid char '%c' in expression" msgstr "caracter inválido '%c' em expressão" -#: awkgram.y:2121 +#: awkgram.y:2162 #, c-format msgid "`%s' is a gawk extension" msgstr "`%s' é uma extensão do gawk" -#: awkgram.y:2124 +#: awkgram.y:2165 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "`%s' é uma extensão da Bell Labs" -#: awkgram.y:2127 +#: awkgram.y:2168 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX não permite `%s'" -#: awkgram.y:2131 +#: awkgram.y:2172 #, c-format msgid "`%s' is not supported in old awk" msgstr "`%s' não é suportado no velho awk" -#: awkgram.y:2158 +#: awkgram.y:2198 msgid "`goto' considered harmful!\n" msgstr "`goto' é considerado danoso!\n" -#: awkgram.y:2220 +#: awkgram.y:2260 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d é inválido como número de argumentos para %s" -#: awkgram.y:2239 awkgram.y:2242 +#: awkgram.y:2279 awkgram.y:2282 msgid "match: third argument is a gawk extension" msgstr "match: terceiro argumento é uma extensão do gawk" -#: awkgram.y:2255 +#: awkgram.y:2295 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "" "%s: string literal como último argumento de substituição não tem efeito" -#: awkgram.y:2258 +#: awkgram.y:2298 #, c-format msgid "%s third parameter is not a changeable object" msgstr "terceiro parâmetro %s não é um objeto modificável" -#: awkgram.y:2285 awkgram.y:2288 +#: awkgram.y:2325 awkgram.y:2328 msgid "close: second argument is a gawk extension" msgstr "close: segundo argumento é uma extensão do gawk" -#: awkgram.y:2298 +#: awkgram.y:2338 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "uso de dcgettext(_\"...\") é incorreto: remova o `_' precedente" -#: awkgram.y:2313 +#: awkgram.y:2353 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "uso de dcngettext(_\"...\") é incorreto: remova o `_' precedente" -#: awkgram.y:2384 +#: awkgram.y:2424 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "função `%s': parâmetro #%d, `%s', duplica parâmetro #%d" -#: awkgram.y:2417 +#: awkgram.y:2457 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "função `%s': parâmetro `%s' encobre variável global" -#: awkgram.y:2529 +#: awkgram.y:2569 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "impossível abrir `%s' para escrita (%s)" -#: awkgram.y:2530 profile.c:93 +#: awkgram.y:2570 profile.c:93 msgid "sending profile to standard error" msgstr "enviando perfil para saída de erros" -#: awkgram.y:2562 +#: awkgram.y:2602 #, c-format msgid "%s: close failed (%s)" msgstr "%s: `close' falhou (%s)" -#: awkgram.y:2684 +#: awkgram.y:2723 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() chamada duas vezes!" -#: awkgram.y:2711 +#: awkgram.y:2750 msgid "there were shadowed variables." msgstr "houve variáveis encobertas." -#: awkgram.y:2784 +#: awkgram.y:2823 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "função `%s': não se pode usar o nome da função como nome de parâmetro" -#: awkgram.y:2794 +#: awkgram.y:2833 #, c-format msgid "function name `%s' previously defined" msgstr "nome de função `%s' definido anteriormente" -#: awkgram.y:2945 awkgram.y:2951 +#: awkgram.y:2984 awkgram.y:2990 #, c-format msgid "function `%s' called but never defined" msgstr "função `%s' chamada mas nunca definida" -#: awkgram.y:2954 +#: awkgram.y:2993 #, c-format msgid "function `%s' defined but never called" msgstr "função `%s' definida mas nunca chamada" -#: awkgram.y:2981 +#: awkgram.y:3020 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "" "constante com expr. regular para parâmetro nº %d retorna valor booleano" -#: awkgram.y:2994 -#, c-format +#: awkgram.y:3033 +#, fuzzy, c-format msgid "" "function `%s' called with space between name and `(',\n" -"%s" +"or used as a variable or an array" msgstr "" "função `%s' chamada com espaço entre o nome e o `(',\n" "%s" -#: awkgram.y:2996 -msgid "or used as a variable or an array" -msgstr "ou usado como uma variável ou vetor" - -#: builtin.c:137 +#: builtin.c:149 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s para \"%s\" falhou (%s)" -#: builtin.c:138 +#: builtin.c:150 msgid "standard output" msgstr "saída padrão" -#: builtin.c:139 +#: builtin.c:151 msgid "reason unknown" msgstr "motivo desconhecido" -#: builtin.c:152 +#: builtin.c:164 msgid "exp: received non-numeric argument" msgstr "exp: recebeu argumento não-numérico" -#: builtin.c:158 +#: builtin.c:170 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: argumento %g está fora da faixa" -#: builtin.c:216 +#: builtin.c:228 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" "fflush: erro ao descarregar: pipe `%s' aberto para leitura, não gravação" -#: builtin.c:219 +#: builtin.c:231 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "" "fflush: erro ao descarregar: arquivo `%s' aberto para leitura, não gravação" -#: builtin.c:231 +#: builtin.c:243 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "fflush: `%s' não é um arquivo aberto, pipe ou co-processo" -#: builtin.c:325 +#: builtin.c:338 msgid "index: received non-string first argument" msgstr "index: recebeu primeiro argumento não-string" -#: builtin.c:327 +#: builtin.c:340 msgid "index: received non-string second argument" msgstr "index: recebeu segundo argumento não-string" -#: builtin.c:437 +#: builtin.c:454 msgid "int: received non-numeric argument" msgstr "int: recebeu argumento não-numérico" -#: builtin.c:454 +#: builtin.c:471 msgid "length: received non-string argument" msgstr "length: recebeu argumento não-string" -#: builtin.c:470 +#: builtin.c:487 msgid "log: received non-numeric argument" msgstr "log: recebeu argumento não-numérico" -#: builtin.c:473 +#: builtin.c:490 #, c-format msgid "log: received negative argument %g" msgstr "log: recebeu argumento negativo %g" -#: builtin.c:635 builtin.c:638 +#: builtin.c:654 builtin.c:657 msgid "must use `count$' on all formats or none" msgstr "deve usar `count$' em todos os formatos ou nenhum" -#: builtin.c:740 +#: builtin.c:759 msgid "`$' is not permitted in awk formats" msgstr "`$' não é permitido em formatos awk" -#: builtin.c:746 +#: builtin.c:765 msgid "arg count with `$' must be > 0" msgstr "nº de argumentos com `$' deve ser > 0" -#: builtin.c:748 +#: builtin.c:767 #, c-format msgid "arg count %ld greater than total number of supplied arguments" msgstr "nº de argumentos %ld maior que nº total de argumentos fornecidos" -#: builtin.c:750 +#: builtin.c:769 msgid "`$' not permitted after period in format" msgstr "`$' não é permitido depois de ponto no formato" -#: builtin.c:763 +#: builtin.c:782 msgid "no `$' supplied for positional field width or precision" msgstr "nenhum `$' fornecido para tamanho ou precisão de campo posicional" -#: builtin.c:821 +#: builtin.c:848 msgid "`l' is meaningless in awk formats; ignored" msgstr "`l' não faz sentido em formatos awk; ignorado" -#: builtin.c:825 +#: builtin.c:852 msgid "`l' is not permitted in POSIX awk formats" msgstr "`l' não é permitido em formatos POSIX awk" -#: builtin.c:836 +#: builtin.c:863 msgid "`L' is meaningless in awk formats; ignored" msgstr "`L' não faz sentido em formatos awk; ignorado" -#: builtin.c:840 +#: builtin.c:867 msgid "`L' is not permitted in POSIX awk formats" msgstr "`L' não é permitido em formatos POSIX awk" -#: builtin.c:851 +#: builtin.c:878 msgid "`h' is meaningless in awk formats; ignored" msgstr "`h' não faz sentido em formatos awk; ignorado" -#: builtin.c:855 +#: builtin.c:882 msgid "`h' is not permitted in POSIX awk formats" msgstr "`h' não é permitido em formatos POSIX awk" -#: builtin.c:1055 +#: builtin.c:1111 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" msgstr "[s]printf: valor %g fora da faixa para formato `%%%c'" -#: builtin.c:1108 +#: builtin.c:1171 msgid "not enough arguments to satisfy format string" msgstr "argumentos insuficientes para a string de formato" -#: builtin.c:1110 +#: builtin.c:1173 msgid "^ ran out for this one" msgstr "^ acabou para este aqui" -#: builtin.c:1115 +#: builtin.c:1178 msgid "[s]printf: format specifier does not have control letter" msgstr "[s]printf: declaração de formato não tem letra de controle" -#: builtin.c:1118 +#: builtin.c:1181 msgid "too many arguments supplied for format string" msgstr "excesso de argumentos para a string de formato" -#: builtin.c:1184 builtin.c:1187 +#: builtin.c:1247 builtin.c:1250 msgid "printf: no arguments" msgstr "printf: nenhum argumento" -#: builtin.c:1211 +#: builtin.c:1274 msgid "sqrt: received non-numeric argument" msgstr "sqrt: recebeu argumento não-numérico" -#: builtin.c:1215 +#: builtin.c:1278 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: chamada com argumento negativo %g" -#: builtin.c:1238 +#: builtin.c:1301 #, c-format msgid "substr: start index %g is invalid, using 1" msgstr "substr: posição inicial %g é inválida, usando 1" -#: builtin.c:1243 +#: builtin.c:1306 #, c-format msgid "substr: non-integer start index %g will be truncated" msgstr "substr: posição inicial %g não-inteira será truncada" -#: builtin.c:1262 +#: builtin.c:1325 #, fuzzy, c-format msgid "substr: length %g is not >= 1" msgstr "substr: comprimento %g é <= 0" -#: builtin.c:1264 +#: builtin.c:1327 #, fuzzy, c-format msgid "substr: length %g is not >= 0" msgstr "substr: comprimento %g é <= 0" -#: builtin.c:1271 +#: builtin.c:1334 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: comprimento %g não-inteiro será truncado" -#: builtin.c:1276 +#: builtin.c:1339 #, c-format msgid "substr: length %g too big for string indexing, truncating to %g" msgstr "substr: comprimento %g excessivo para indexação, truncando para %g" -#: builtin.c:1288 +#: builtin.c:1351 msgid "substr: source string is zero length" msgstr "substr: string origem tem comprimento zero" -#: builtin.c:1294 +#: builtin.c:1357 #, c-format msgid "substr: start index %g is past end of string" msgstr "substr: posição inicial %g além do fim da string" -#: builtin.c:1302 +#: builtin.c:1365 #, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" @@ -565,238 +566,263 @@ "substr: comprimento %g a partir da posição %g excede tamanho do 1º argumento " "(%lu)" -#: builtin.c:1337 +#: builtin.c:1400 msgid "strftime: received non-string first argument" msgstr "strftime: recebeu primeiro argumento não-string" -#: builtin.c:1343 +#: builtin.c:1406 msgid "strftime: received empty format string" msgstr "strftime: recebeu string de formato vazia" -#: builtin.c:1352 +#: builtin.c:1415 msgid "strftime: received non-numeric second argument" msgstr "strftime: recebeu segundo argumento não-numérico" -#: builtin.c:1415 +#: builtin.c:1478 msgid "mktime: received non-string argument" msgstr "mktime: recebeu argumento não-string" -#: builtin.c:1460 +#: builtin.c:1523 msgid "system: received non-string argument" msgstr "system: recebeu argumento não-string" -#: builtin.c:1581 eval.c:1883 +#: builtin.c:1644 eval.c:2019 #, c-format msgid "reference to uninitialized field `$%d'" msgstr "referência a campo não inicializado `$%d'" -#: builtin.c:1608 +#: builtin.c:1671 msgid "tolower: received non-string argument" msgstr "tolower: recebeu argumento não-string" -#: builtin.c:1657 +#: builtin.c:1720 msgid "toupper: received non-string argument" msgstr "toupper: recebeu argumento não-string" -#: builtin.c:1702 +#: builtin.c:1765 msgid "atan2: received non-numeric first argument" msgstr "atan2: recebeu primeiro argumento não-numérico" -#: builtin.c:1704 +#: builtin.c:1767 msgid "atan2: received non-numeric second argument" msgstr "atan2: recebeu segundo argumento não-numérico" -#: builtin.c:1723 +#: builtin.c:1786 msgid "sin: received non-numeric argument" msgstr "sin: recebeu argumento não-numérico" -#: builtin.c:1739 +#: builtin.c:1802 msgid "cos: received non-numeric argument" msgstr "cos: recebeu argumento não-numérico" -#: builtin.c:1788 +#: builtin.c:1852 msgid "srand: received non-numeric argument" msgstr "srand: recebeu argumento não-numérico" -#: builtin.c:1823 +#: builtin.c:1887 msgid "match: third argument is not an array" msgstr "match: terceiro argumento não é um vetor" -#: builtin.c:2307 +#: builtin.c:2414 msgid "gensub: third argument of 0 treated as 1" msgstr "gensub: 3º argumento 0 tratado como 1" -#: builtin.c:2416 builtin.c:2418 +#: builtin.c:2572 msgid "lshift: received non-numeric first argument" msgstr "lshift: recebeu primeiro argumento não-numérico" -#: builtin.c:2420 +#: builtin.c:2574 +#, fuzzy +msgid "lshift: received non-numeric second argument" +msgstr "strftime: recebeu segundo argumento não-numérico" + +#: builtin.c:2580 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "lshift(%lf, %lf): valores negativos darão resultados estranhos" -#: builtin.c:2422 +#: builtin.c:2582 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): valores fracionários serão truncados" -#: builtin.c:2424 +#: builtin.c:2584 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "lshift(%lf, %lf): deslocamento excessivo dará resultados estranhos" -#: builtin.c:2453 builtin.c:2455 +#: builtin.c:2610 msgid "rshift: received non-numeric first argument" msgstr "rshift: recebeu primeiro argumento não-numérico" -#: builtin.c:2457 +#: builtin.c:2612 +#, fuzzy +msgid "rshift: received non-numeric second argument" +msgstr "strftime: recebeu segundo argumento não-numérico" + +#: builtin.c:2618 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "rshift(%lf, %lf): valores negativos darão resultados estranhos" -#: builtin.c:2459 +#: builtin.c:2620 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): valores fracionários serão truncados" -#: builtin.c:2461 +#: builtin.c:2622 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "rshift(%lf, %lf): deslocamento excessivo dará resultados estranhos" -#: builtin.c:2490 builtin.c:2492 +#: builtin.c:2648 msgid "and: received non-numeric first argument" msgstr "and: recebeu primeiro argumento não-numérico" -#: builtin.c:2494 +#: builtin.c:2650 +#, fuzzy +msgid "and: received non-numeric second argument" +msgstr "atan2: recebeu segundo argumento não-numérico" + +#: builtin.c:2656 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "and(%lf, %lf): valores negativos darão resultados estranhos" -#: builtin.c:2496 +#: builtin.c:2658 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): valores fracionários serão truncados" -#: builtin.c:2525 builtin.c:2527 +#: builtin.c:2684 msgid "or: received non-numeric first argument" msgstr "or: recebeu primeiro argumento não-numérico" -#: builtin.c:2529 +#: builtin.c:2686 +#, fuzzy +msgid "or: received non-numeric second argument" +msgstr "atan2: recebeu segundo argumento não-numérico" + +#: builtin.c:2692 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "or(%lf, %lf): valores negativos darão resultados estranhos" -#: builtin.c:2531 +#: builtin.c:2694 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): valores fracionários serão truncados" -#: builtin.c:2560 builtin.c:2562 +#: builtin.c:2720 msgid "xor: received non-numeric first argument" msgstr "xor: recebeu primeiro argumento não-numérico" -#: builtin.c:2564 +#: builtin.c:2722 +#, fuzzy +msgid "xor: received non-numeric second argument" +msgstr "atan2: recebeu segundo argumento não-numérico" + +#: builtin.c:2728 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "xor(%lf, %lf): valores negativos darão resultados estranhos" -#: builtin.c:2566 +#: builtin.c:2730 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): valores fracionários serão truncados" -#: builtin.c:2594 +#: builtin.c:2754 msgid "compl: received non-numeric argument" msgstr "compl: recebeu primeiro argumento não-numérico" -#: builtin.c:2596 +#: builtin.c:2760 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): valores negativos darão resultados estranhos" -#: builtin.c:2598 +#: builtin.c:2762 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): valores fracionários serão truncados" -#: builtin.c:2771 +#: builtin.c:2935 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: `%s' não é uma categoria de \"locale\" válida" -#: eval.c:266 +#: eval.c:303 #, c-format msgid "unknown nodetype %d" msgstr "tipo de nodo desconhecido %d" -#: eval.c:312 +#: eval.c:350 msgid "buffer overflow in genflags2str" msgstr "estouro de buffer em genflags2str" -#: eval.c:647 +#: eval.c:382 eval.c:388 profile.c:837 +#, c-format +msgid "attempt to use array `%s' in a scalar context" +msgstr "tentativa de usar vetor `%s' em um contexto escalar" + +#: eval.c:730 #, c-format msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" "loop for: vetor `%s' mudou de tamanho de %ld para %ld durante a execução" -#: eval.c:668 +#: eval.c:751 msgid "`break' outside a loop is not portable" msgstr "`break' fora de um loop não é portável" -#: eval.c:672 +#: eval.c:755 msgid "`break' outside a loop is not allowed" msgstr "`break' fora de um loop não é permitido" -#: eval.c:689 +#: eval.c:772 msgid "`continue' outside a loop is not portable" msgstr "`continue' fora de um loop não é portável" -#: eval.c:693 +#: eval.c:776 msgid "`continue' outside a loop is not allowed" msgstr "`continue' fora de um loop não é permitido" -#: eval.c:727 +#: eval.c:810 msgid "`next' cannot be called from a BEGIN rule" msgstr "`next' não pode ser chamado de uma regra BEGIN" -#: eval.c:729 +#: eval.c:812 msgid "`next' cannot be called from an END rule" msgstr "`next' não pode ser chamado de uma regra END" -#: eval.c:738 +#: eval.c:821 msgid "`nextfile' cannot be called from a BEGIN rule" msgstr "`nextfile' não pode ser chamado de uma regra BEGIN" -#: eval.c:740 +#: eval.c:823 msgid "`nextfile' cannot be called from an END rule" msgstr "`nextfile' não pode ser chamado de uma regra END" -#: eval.c:785 +#: eval.c:872 msgid "statement has no effect" msgstr "declaração não tem efeito" -#: eval.c:828 eval.c:1726 +#: eval.c:915 eval.c:1873 #, c-format msgid "can't use function name `%s' as variable or array" msgstr "não se pode usar o nome de função `%s' como variável ou vetor" -#: eval.c:835 eval.c:841 +#: eval.c:922 eval.c:928 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "referência a argumento não inicializado `%s'" -#: eval.c:848 eval.c:907 eval.c:1732 eval.c:1742 profile.c:807 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "tentativa de usar vetor `%s' em um contexto escalar" - -#: eval.c:858 eval.c:1752 +#: eval.c:937 eval.c:1882 #, c-format msgid "reference to uninitialized variable `%s'" msgstr "referência a variável não inicializada `%s'" -#: eval.c:1007 +#: eval.c:1083 msgid "" "concatenation: side effects in one expression have changed the length of " "another!" @@ -804,49 +830,50 @@ "concatenação: efeitos colaterais em um contexto mudaram o comprimento de " "outro!" -#: eval.c:1032 +#: eval.c:1162 msgid "assignment used in conditional context" msgstr "atribuição usada em contexto condicional" -#: eval.c:1122 +#: eval.c:1252 msgid "division by zero attempted" msgstr "tentativa de divisão por zero" -#: eval.c:1137 +#: eval.c:1267 #, c-format msgid "division by zero attempted in `%%'" msgstr "tentativa de divisão por zero em `%%'" -#: eval.c:1152 profile.c:683 +#: eval.c:1282 profile.c:713 #, c-format msgid "illegal type (%s) in tree_eval" msgstr "tipo ilegal (%s) em tree_eval" -#: eval.c:1328 +#: eval.c:1459 msgid "division by zero attempted in `/='" msgstr "tentativa de divisão por zero em `/='" -#: eval.c:1346 +#: eval.c:1477 #, c-format msgid "division by zero attempted in `%%='" msgstr "tentativa de divisão por zero em `%%='" -#: eval.c:1586 +#: eval.c:1738 #, c-format msgid "function `%s' called with more arguments than declared" msgstr "função `%s' chamada com mais argumentos que os declarados" -#: eval.c:1633 +#: eval.c:1782 #, c-format msgid "function `%s' not defined" msgstr "função `%s' não definida" -#: eval.c:1639 +#: eval.c:1788 #, c-format msgid "function %s called\n" msgstr "função %s chamada\n" -#: eval.c:1698 +#: eval.c:1845 +#, c-format msgid "" "\n" "\t# Function Call Stack:\n" @@ -856,41 +883,42 @@ "\t# Pilha de Chamadas de Função:\n" "\n" -#: eval.c:1701 +#: eval.c:1848 +#, c-format msgid "\t# -- main --\n" msgstr "\t# -- main --\n" -#: eval.c:1867 +#: eval.c:2003 msgid "attempt to field reference from non-numeric value" msgstr "tentativa de referência a campo a partir de valor não-numérico" -#: eval.c:1869 +#: eval.c:2005 msgid "attempt to reference from null string" msgstr "tentativa de referência a partir de string nula" -#: eval.c:1875 +#: eval.c:2011 #, c-format msgid "attempt to access field %d" msgstr "tentativa de acessar campo %d" -#: eval.c:1896 eval.c:1903 profile.c:900 +#: eval.c:2032 eval.c:2039 profile.c:934 msgid "assignment is not allowed to result of builtin function" msgstr "atribuição não pode resultar de funções intrínsecas" -#: eval.c:1951 +#: eval.c:2103 msgid "`IGNORECASE' is a gawk extension" msgstr "`IGNORECASE' é uma extensão do gawk" -#: eval.c:1980 +#: eval.c:2133 msgid "`BINMODE' is a gawk extension" msgstr "`BINMODE' é uma extensão do gawk" -#: eval.c:2092 +#: eval.c:2255 #, c-format msgid "bad `%sFMT' specification `%s'" msgstr "especificação `%sFMT' inválida `%s'" -#: eval.c:2170 +#: eval.c:2333 msgid "turning off `--lint' due to assignment to `LINT'" msgstr "desativando `--lint' devido a atribuição a `LINT'" @@ -908,7 +936,56 @@ msgid "extension: library `%s': cannot call function `%s' (%s)\n" msgstr "extension: biblioteca `%s': impossível chamar função `%s' (%s)\n" -#: ext.c:183 +#: ext.c:102 +msgid "extension: missing function name" +msgstr "" + +#: ext.c:107 +#, fuzzy, c-format +msgid "extension: illegal character `%c' in function name `%s'" +msgstr "extension: biblioteca `%s': impossível chamar função `%s' (%s)\n" + +#: ext.c:113 +#, fuzzy, c-format +msgid "extension: can't redefine function `%s'" +msgstr "extension: impossível abrir `%s' (%s)\n" + +#: ext.c:117 +#, fuzzy, c-format +msgid "extension: function `%s' already defined" +msgstr "função `%s' não definida" + +#: ext.c:122 +#, c-format +msgid "extension: can't use gawk built-in `%s' as function name" +msgstr "" + +#: ext.c:124 +#, fuzzy, c-format +msgid "extension: function name `%s' previously defined" +msgstr "nome de função `%s' definido anteriormente" + +#: ext.c:201 +#, c-format +msgid "function `%s' defined to take no more than `%d' argument(s)" +msgstr "" + +#: ext.c:204 +#, fuzzy, c-format +msgid "function `%s': missing argument #%d" +msgstr "função `%s' não definida" + +#: ext.c:214 +#, fuzzy, c-format +msgid "function `%s': argument #%d: attempt to use scalar as an array" +msgstr "tentativa de usar escalar `%s' como vetor" + +#: ext.c:218 +#, c-format +msgid "function `%s': argument #%d: attempt to use array as a scalar" +msgstr "" + +#: ext.c:243 msgid "Operation Not Supported" msgstr "Operação Não Suportada" @@ -937,524 +1014,524 @@ msgid "null string for `FS' is a gawk extension" msgstr "string nula para `FS' é uma extensão do gawk" -#: getopt.c:692 getopt.c:704 +#: getopt.c:692 getopt.c:711 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s: opção `%s' é ambígua\n" -#: getopt.c:737 getopt.c:741 +#: getopt.c:744 getopt.c:748 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "%s: opção `--%s' não aceita argumento\n" -#: getopt.c:750 getopt.c:755 +#: getopt.c:757 getopt.c:762 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "%s: opção `%c%s' não aceita argumento\n" -#: getopt.c:791 getopt.c:804 getopt.c:1093 getopt.c:1106 +#: getopt.c:807 getopt.c:829 getopt.c:1159 getopt.c:1181 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "%s: opção `%s' requer argumento\n" -#: getopt.c:842 getopt.c:845 +#: getopt.c:867 getopt.c:870 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s: opção não reconhecida `--%s'\n" -#: getopt.c:853 getopt.c:856 +#: getopt.c:878 getopt.c:881 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s: opção não reconhecida `%c%s'\n" -#: getopt.c:903 getopt.c:906 +#: getopt.c:936 getopt.c:939 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: opção ilegal -- %c\n" -#: getopt.c:912 getopt.c:915 +#: getopt.c:945 getopt.c:948 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s: opção inválida -- %c\n" -#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:434 +#: getopt.c:1003 getopt.c:1022 getopt.c:1234 getopt.c:1255 main.c:433 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: opção requer argumento -- %c\n" -#: getopt.c:1025 getopt.c:1036 +#: getopt.c:1074 getopt.c:1093 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s: opção `-W %s' é ambígua\n" -#: getopt.c:1060 getopt.c:1072 +#: getopt.c:1117 getopt.c:1138 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: opção `-W %s' não aceita argumento\n" -#: io.c:305 +#: io.c:308 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "impossível abrir arquivo `%s' para leitura (%s)" -#: io.c:392 +#: io.c:395 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "fechamento do descritor %d (`%s') falhou (%s)" -#: io.c:530 +#: io.c:533 #, c-format msgid "invalid tree type %s in redirect()" msgstr "tipo de árvore %s inválido em redirect()" -#: io.c:536 +#: io.c:539 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "expressão no redirecionamento `%s' só tem valor numérico" -#: io.c:542 +#: io.c:545 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "expressão para o redirecionamento `%s' tem valor string nulo" -#: io.c:547 +#: io.c:550 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "nome de arquivo `%s' para redirecionamento `%s' pode ser resultado de " "expressão lógica" -#: io.c:569 +#: io.c:588 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "mistura desnecessária de `>' e `>>' para arquivo `%.*s'" -#: io.c:621 +#: io.c:640 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "impossível abrir pipe `%s' para saída (%s)" -#: io.c:630 +#: io.c:649 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "impossível abrir pipe `%s' para entrada (%s)" -#: io.c:643 +#: io.c:662 #, c-format msgid "can't open two way socket `%s' for input/output (%s)" msgstr "impossível abrir socket bidirecional `%s' para entrada/saída (%s)" -#: io.c:647 +#: io.c:666 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "impossível abrir pipe bidirecional `%s' para entrada/saída (%s)" -#: io.c:723 +#: io.c:742 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "impossível redirecionar de `%s' (%s)" -#: io.c:726 +#: io.c:745 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "impossível redirecionar para `%s' (%s)" -#: io.c:765 +#: io.c:784 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "alcançado limite do sistema para arquivos abertos; começando a multiplexar " "descritores de arquivos" -#: io.c:777 +#: io.c:800 #, c-format msgid "close of `%s' failed (%s)." msgstr "fechamento de `%s' falhou (%s)" -#: io.c:784 +#: io.c:808 msgid "too many pipes or input files open" msgstr "excesso de pipes ou arquivos de entrada abertos" -#: io.c:807 +#: io.c:831 msgid "close: second argument must be `to' or `from'" msgstr "close: segundo argumento deve ser `to' ou `from'" -#: io.c:821 +#: io.c:845 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "close: `%.*s' não é um arquivo aberto, pipe ou co-processo" -#: io.c:825 +#: io.c:849 msgid "close of redirection that was never opened" msgstr "fechamento de redirecionamento que nunca foi aberto" -#: io.c:862 +#: io.c:945 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: redirecionamento `%s' não foi aberto com `|&', segundo argumento " "ignorado" -#: io.c:924 +#: io.c:960 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "status de falha (%d) ao fechar pipe de `%s' (%s)" -#: io.c:927 +#: io.c:963 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "status de falha (%d) ao fechar arquivo de `%s' (%s)" -#: io.c:946 +#: io.c:983 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "fechamento explícito do socket `%s' não fornecido" -#: io.c:949 +#: io.c:986 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "fechamento explícito do co-processo `%s' não fornecido" -#: io.c:952 +#: io.c:989 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "fechamento explícito do pipe `%s' não fornecido" -#: io.c:955 +#: io.c:992 #, c-format msgid "no explicit close of file `%s' provided" msgstr "fechamento explícito do arquivo `%s' não fornecido" -#: io.c:984 io.c:1038 +#: io.c:1021 io.c:1075 #, c-format msgid "error writing standard output (%s)" msgstr "erro ao escrever na saída padrão (%s)" -#: io.c:988 io.c:1042 +#: io.c:1025 io.c:1079 #, c-format msgid "error writing standard error (%s)" msgstr "erro ao escrever na saída padrão de erros (%s)" -#: io.c:996 +#: io.c:1033 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "descarga de pipe de `%s' falhou (%s)." -#: io.c:999 +#: io.c:1036 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "descarga de co-processo de pipe para `%s' falhou (%s)." -#: io.c:1002 +#: io.c:1039 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "descarga de arquivo de `%s' falhou (%s)." -#: io.c:1161 +#: io.c:1198 msgid "/inet/raw client not ready yet, sorry" msgstr "infelizmente, o cliente de /inet/raw não está concluído" -#: io.c:1163 io.c:1200 +#: io.c:1200 io.c:1237 msgid "only root may use `/inet/raw'." msgstr "apenas root pode usar `/inet/raw'." -#: io.c:1198 +#: io.c:1235 msgid "/inet/raw server not ready yet, sorry" msgstr "infelizmente, o servidor de /inet/raw não está concluído" -#: io.c:1288 +#: io.c:1325 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "" "nenhum protocolo (conhecido) fornecido em nome de arquivo especial `%s'" -#: io.c:1306 +#: io.c:1343 #, c-format msgid "special file name `%s' is incomplete" msgstr "nome de arquivo especial `%s' está incompleto" -#: io.c:1318 +#: io.c:1355 #, c-format msgid "local port invalid in `%s'" msgstr "porta local inválida em `%s'" -#: io.c:1330 +#: io.c:1367 msgid "must supply a remote hostname to `/inet'" msgstr "deve ser fornecido um nome de host remoto para `/inet'" -#: io.c:1345 +#: io.c:1382 msgid "must supply a remote port to `/inet'" msgstr "deve ser fornecida uma porta remota para `/inet'" -#: io.c:1351 +#: io.c:1388 #, c-format msgid "remote port invalid in `%s'" msgstr "porta remota inválida em `%s'" -#: io.c:1361 +#: io.c:1398 msgid "TCP/IP communications are not supported" msgstr "comunicação TCP/IP não é suportada" -#: io.c:1370 io.c:1551 +#: io.c:1407 io.c:1588 #, c-format msgid "file `%s' is a directory" msgstr "arquivo `%s' é um diretório" -#: io.c:1440 +#: io.c:1477 #, c-format msgid "use `PROCINFO[\"%s\"]' instead of `%s'" msgstr "use `PROCINFO[\"%s\"]' em vez de `%s'" -#: io.c:1472 +#: io.c:1509 msgid "use `PROCINFO[...]' instead of `/dev/user'" msgstr "use `PROCINFO[...]' em vez de `/dev/user'" -#: io.c:1537 io.c:1711 +#: io.c:1574 io.c:1748 #, c-format msgid "could not open `%s', mode `%s'" msgstr "impossível abrir `%s', modo `%s'" -#: io.c:1762 +#: io.c:1799 #, c-format msgid "close of master pty failed (%s)" msgstr "falha ao fechar pty mestre (%s)" -#: io.c:1764 io.c:1916 io.c:2068 +#: io.c:1801 io.c:1953 io.c:2105 #, c-format msgid "close of stdout in child failed (%s)" msgstr "falha ao fechar stdout em filho (%s)" -#: io.c:1767 +#: io.c:1804 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "falha ao mover pty escrava para stdout em filho (dup: %s)" -#: io.c:1769 io.c:1921 +#: io.c:1806 io.c:1958 #, c-format msgid "close of stdin in child failed (%s)" msgstr "falha ao fechar stdin em filho (%s)" -#: io.c:1772 +#: io.c:1809 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "falha ao mover pty escrava para stdin em filho (dup: %s)" -#: io.c:1774 io.c:1793 +#: io.c:1811 io.c:1830 #, c-format msgid "close of slave pty failed (%s)" msgstr "falha ao fechar pty escrava (%s)" -#: io.c:1867 io.c:1919 io.c:2049 io.c:2071 +#: io.c:1904 io.c:1956 io.c:2086 io.c:2108 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "falha ao mover pipe para stdout em processo pai (dup: %s)" -#: io.c:1871 io.c:1924 +#: io.c:1908 io.c:1961 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "falha ao mover pipe para stdin em processo pai (dup: %s)" -#: io.c:1888 io.c:2062 +#: io.c:1925 io.c:2099 msgid "restoring stdout in parent process failed\n" msgstr "falha ao restaurar stdout em processo pai\n" -#: io.c:1893 +#: io.c:1930 msgid "restoring stdin in parent process failed\n" msgstr "falha ao restaurar stdin em processo pai\n" -#: io.c:1927 io.c:2073 io.c:2084 +#: io.c:1964 io.c:2110 io.c:2121 #, c-format msgid "close of pipe failed (%s)" msgstr "falha ao fechar pipe (%s)" -#: io.c:1972 +#: io.c:2009 msgid "`|&' not supported" msgstr "`|&' não suportado" -#: io.c:2039 +#: io.c:2076 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "impossível abrir pipe `%s' (%s)" -#: io.c:2080 +#: io.c:2117 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "impossível criar processo filho para `%s' (fork: %s)" -#: io.c:2423 +#: io.c:2460 #, c-format msgid "data file `%s' is empty" msgstr "arquivo de dados `%s' vazio" -#: io.c:2466 io.c:2474 +#: io.c:2503 io.c:2511 msgid "could not allocate more input memory" msgstr "impossível alocar mais memória de entrada" -#: io.c:2832 io.c:2895 +#: io.c:2869 io.c:2932 #, c-format msgid "error reading input file `%s': %s" msgstr "erro ao ler arquivo de entrada `%s': %s" -#: io.c:3020 +#: io.c:3057 msgid "multicharacter value of `RS' is a gawk extension" msgstr "valor de múltiplos caracteres para `RS' é uma extensão do gawk" -#: main.c:324 +#: main.c:323 msgid "`-m[fr]' option irrelevant in gawk" msgstr "opção `-m[fr] é irrelevante no gawk" -#: main.c:326 +#: main.c:325 msgid "-m option usage: `-m[fr] nnn'" msgstr "uso da opção -m: `-m[fr] nnn'" -#: main.c:343 +#: main.c:342 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: opção `-W %s' não reconhecida, ignorada\n" -#: main.c:380 +#: main.c:379 msgid "empty argument to `--source' ignored" msgstr "argumento vazio para --source ignorado" -#: main.c:451 +#: main.c:450 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "variável de ambiente `POSIXLY_CORRECT' ativada: ligando `--posix'" -#: main.c:456 +#: main.c:455 msgid "`--posix' overrides `--traditional'" msgstr "`--posix' sobrepõe `--traditional'" -#: main.c:467 +#: main.c:466 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "`--posix'/`--traditional' sobrepõe `--non-decimal-data'" -#: main.c:471 +#: main.c:470 #, c-format msgid "running %s setuid root may be a security problem" msgstr "rodar %s com setuid root pode ser um problema de segurança" -#: main.c:512 +#: main.c:511 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "impossível ativar modo binário em stdin (%s)" -#: main.c:515 +#: main.c:514 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "impossível ativar modo binário em stdout (%s)" -#: main.c:517 +#: main.c:516 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "impossível ativar modo binário em stderr (%s)" -#: main.c:547 +#: main.c:546 msgid "no program text at all!" msgstr "nenhum texto de programa" -#: main.c:620 +#: main.c:623 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "Uso: %s [opções estilo POSIX ou GNU] -f arqprog [--] arquivo ...\n" -#: main.c:622 +#: main.c:625 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "Uso: %s [opções estilo POSIX ou GNU] [--] %cprograma%c arquivo ...\n" -#: main.c:627 +#: main.c:630 msgid "POSIX options:\t\tGNU long options:\n" msgstr "Opções POSIX: \t\tOpções longas GNU:\n" -#: main.c:628 +#: main.c:631 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f arqprog \t\t--file=arqprog\n" -#: main.c:629 +#: main.c:632 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F fs\t\t\t--field-separator=fs\n" -#: main.c:630 +#: main.c:633 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v var=val\t\t--assign=var=val\n" -#: main.c:631 +#: main.c:634 msgid "\t-m[fr] val\n" msgstr "\t-m[fr] val\n" -#: main.c:632 +#: main.c:635 msgid "\t-W compat\t\t--compat\n" msgstr "\t-W compat\t\t--compat\n" -#: main.c:633 +#: main.c:636 msgid "\t-W copyleft\t\t--copyleft\n" msgstr "\t-W copyleft\t\t--copyleft\n" -#: main.c:634 +#: main.c:637 msgid "\t-W copyright\t\t--copyright\n" msgstr "\t-W copyright\t\t--copyright\n" -#: main.c:635 +#: main.c:638 msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" msgstr "\t-W dump-variables[=arq] \t--dump-variables[=arq]\n" -#: main.c:636 +#: main.c:639 msgid "\t-W gen-po\t\t--gen-po\n" msgstr "\t-W gen-po\t\t--gen-po\n" -#: main.c:637 +#: main.c:640 msgid "\t-W help\t\t\t--help\n" msgstr "\t-W help\t\t\t--help\n" -#: main.c:638 +#: main.c:641 msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -#: main.c:639 +#: main.c:642 msgid "\t-W lint-old\t\t--lint-old\n" msgstr "\t-W lint-old\t\t--lint-old\n" -#: main.c:640 +#: main.c:643 msgid "\t-W non-decimal-data\t--non-decimal-data\n" msgstr "\t-W non-decimal-data\t--non-decimal-data\n" -#: main.c:642 +#: main.c:645 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" -#: main.c:645 +#: main.c:648 msgid "\t-W parsedebug\t\t--parsedebug\n" msgstr "\t-W parsedebug\t\t--parsedebug\n" -#: main.c:647 +#: main.c:650 msgid "\t-W profile[=file]\t--profile[=file]\n" msgstr "\t-W profile[=arq] \t--profile[=arq]\n" -#: main.c:648 +#: main.c:651 msgid "\t-W posix\t\t--posix\n" msgstr "\t-W posix\t\t--posix\n" -#: main.c:649 +#: main.c:652 msgid "\t-W re-interval\t\t--re-interval\n" msgstr "\t-W re-interval\t\t--re-interval\n" -#: main.c:650 +#: main.c:653 msgid "\t-W source=program-text\t--source=program-text\n" msgstr "\t-W source=program-text\t--source=program-text\n" -#: main.c:651 +#: main.c:654 msgid "\t-W traditional\t\t--traditional\n" msgstr "\t-W traditional\t\t--traditional\n" -#: main.c:652 +#: main.c:655 msgid "\t-W usage\t\t--usage\n" msgstr "\t-W usage\t\t--usage\n" -#: main.c:653 +#: main.c:656 msgid "\t-W version\t\t--version\n" msgstr "\t-W version\t\t--version\n" -#: main.c:657 +#: main.c:660 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1466,7 +1543,7 @@ "seção `Reportando Problemas e Bugs' na versão impressa.\n" "\n" -#: main.c:661 +#: main.c:664 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -1476,7 +1553,7 @@ "Por padrão, o gawk lê a entrada padrão e escreve na saída padrão.\n" "\n" -#: main.c:665 +#: main.c:668 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -1486,7 +1563,7 @@ "\tgawk '{ soma += $1 }; END { print soma }' arquivo\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:682 +#: main.c:685 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1505,7 +1582,7 @@ "(aoseu critério) qualquer versão posterior.\n" "\n" -#: main.c:690 +#: main.c:693 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -1517,7 +1594,7 @@ "QUALQUER GARANTIA. Veja a Licença Pública Geral GNU (GNU GPL)\n" "para mais detalhes.\n" -#: main.c:696 +#: main.c:699 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, write to the Free Software\n" @@ -1527,11 +1604,11 @@ "junto com este programa; caso contrário, escreva à Free Software\n" "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n" -#: main.c:730 +#: main.c:733 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft não faz FS ser tab no awk POSIX" -#: main.c:956 +#: main.c:962 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" @@ -1540,40 +1617,41 @@ "%s: argumento `%s' para `-v' não está na forma `var=valor'\n" "\n" -#: main.c:976 +#: main.c:982 #, c-format msgid "`%s' is not a legal variable name" msgstr "`%s' não é um nome legal de variável" -#: main.c:979 +#: main.c:985 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "`%s' não é um nome de variável, procurando arquivo `%s=%s'" -#: main.c:1012 +#: main.c:1018 msgid "floating point exception" msgstr "exceção de ponto flutuante" -#: main.c:1019 +#: main.c:1025 msgid "fatal error: internal error" msgstr "erro fatal: erro interno" -#: main.c:1069 +#: main.c:1075 #, c-format msgid "no pre-opened fd %d" msgstr "nenhum descritor pré-aberto %d" -#: main.c:1074 +#: main.c:1082 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "impossível pré-abrir /dev/null para descritor %d" -#: main.c:1097 main.c:1106 +#: main.c:1105 main.c:1114 #, c-format msgid "could not find groups: %s" msgstr "impossível achar grupos: %s" #: msg.c:54 +#, c-format msgid "cmd. line:" msgstr "lin. de com.:" @@ -1593,19 +1671,19 @@ msgid "can't convert string to float" msgstr "impossível converter string para float" -#: node.c:355 +#: node.c:357 msgid "backslash at end of string" msgstr "barra invertida (\\) no fim da string" -#: node.c:539 +#: node.c:541 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX não permite escapes do tipo `\\x'" -#: node.c:545 +#: node.c:547 msgid "no hex digits in `\\x' escape sequence" msgstr "nenhum dígito hexa em seqüência de escape `\\x'" -#: node.c:579 +#: node.c:581 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "seqüência de escape `\\%c' tratada como `%c' normal" @@ -1620,21 +1698,27 @@ msgid "could not open `%s' for writing: %s" msgstr "impossível abrir `%s' para escrita: %s" -#: profile.c:449 +#: profile.c:467 #, c-format msgid "internal error: %s with null vname" msgstr "erro interno: %s com vname nulo" -#: profile.c:512 +#: profile.c:530 msgid "# treated internally as `delete'" msgstr "# tratado internamente como `delete'" -#: profile.c:1162 +#: profile.c:1167 +#, c-format +msgid "# this is a dynamically loaded extension function" +msgstr "" + +#: profile.c:1198 #, c-format msgid "\t# gawk profile, created %s\n" msgstr "\t# perfil gawk, criado %s\n" -#: profile.c:1165 +#: profile.c:1201 +#, c-format msgid "" "\t# BEGIN block(s)\n" "\n" @@ -1642,7 +1726,8 @@ "\t# bloco(s) BEGIN\n" "\n" -#: profile.c:1175 +#: profile.c:1211 +#, c-format msgid "" "\t# Rule(s)\n" "\n" @@ -1650,7 +1735,8 @@ "\t# Regra(s)\n" "\n" -#: profile.c:1181 +#: profile.c:1217 +#, c-format msgid "" "\t# END block(s)\n" "\n" @@ -1658,7 +1744,8 @@ "\t# bloco(s) END\n" "\n" -#: profile.c:1201 +#: profile.c:1237 +#, c-format msgid "" "\n" "\t# Functions, listed alphabetically\n" @@ -1666,90 +1753,91 @@ "\n" "\t# Funções, listadas alfabeticamente\n" -#: profile.c:1413 +#: profile.c:1452 #, c-format msgid "unexpected type %s in prec_level" msgstr "tipo inesperado %s em prec_level" -#: re.c:193 -#, c-format -msgid "regex match failed, not enough memory to match string \"%.*s%s\"" -msgstr "" -"busca por exp. reg. falhou, memória insuficiente para testar string \"%.*s%s" -"\"" - -#: regcomp.c:136 +#: regcomp.c:150 msgid "Success" msgstr "Sucesso" -#: regcomp.c:139 +#: regcomp.c:153 msgid "No match" msgstr "Sem combinação" -#: regcomp.c:142 +#: regcomp.c:156 msgid "Invalid regular expression" msgstr "Expressão regular inválida" -#: regcomp.c:145 +#: regcomp.c:159 msgid "Invalid collation character" msgstr "Caracter de combinação inválido" -#: regcomp.c:148 +#: regcomp.c:162 msgid "Invalid character class name" msgstr "Nome de classe de caracter inválido" -#: regcomp.c:151 +#: regcomp.c:165 msgid "Trailing backslash" msgstr "contra-barra (\\) finalizando" -#: regcomp.c:154 +#: regcomp.c:168 msgid "Invalid back reference" msgstr "Referência anterior inválida" -#: regcomp.c:157 +#: regcomp.c:171 msgid "Unmatched [ or [^" msgstr "[ ou [^ não emparelhado" -#: regcomp.c:160 +#: regcomp.c:174 msgid "Unmatched ( or \\(" msgstr "( ou \\( não emparelhado" -#: regcomp.c:163 +#: regcomp.c:177 msgid "Unmatched \\{" msgstr "\\{ não emparelhado" -#: regcomp.c:166 +#: regcomp.c:180 msgid "Invalid content of \\{\\}" msgstr "Conteúdo inválido de \\{\\}" -#: regcomp.c:169 +#: regcomp.c:183 msgid "Invalid range end" msgstr "Fim de faixa inválido" -#: regcomp.c:172 +#: regcomp.c:186 msgid "Memory exhausted" msgstr "Memória esgotada" -#: regcomp.c:175 +#: regcomp.c:189 msgid "Invalid preceding regular expression" msgstr "Expressão regular anterior inválida" -#: regcomp.c:178 +#: regcomp.c:192 msgid "Premature end of regular expression" msgstr "Fim prematuro da expressão regular" -#: regcomp.c:181 +#: regcomp.c:195 msgid "Regular expression too big" msgstr "Expressão regular grande demais" -#: regcomp.c:184 +#: regcomp.c:198 msgid "Unmatched ) or \\)" msgstr ") ou \\) desemparelhado" -#: regcomp.c:621 +#: regcomp.c:668 msgid "No previous regular expression" msgstr "Nenhuma expressão regular anterior" +#~ msgid "or used as a variable or an array" +#~ msgstr "ou usado como uma variável ou vetor" + +#~ msgid "regex match failed, not enough memory to match string \"%.*s%s\"" +#~ msgstr "" +#~ "busca por exp. reg. falhou, memória insuficiente para testar string \"%.*s" +#~ "%s\"" + #~ msgid "substr: length %g is < 0" #~ msgstr "substr: comprimento %g é < 0" diff -urN gawk-3.1.3/po/sv.po gawk-3.1.4/po/sv.po --- gawk-3.1.3/po/sv.po 2003-07-07 21:20:33.000000000 +0300 +++ gawk-3.1.4/po/sv.po 2004-07-15 13:02:12.000000000 +0300 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: gawk 3.1.1m\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2003-07-07 11:20-0700\n" +"POT-Creation-Date: 2004-07-15 13:02+0300\n" "PO-Revision-Date: 2003-02-27 19:54+0100\n" "Last-Translator: Martin Sjögren \n" "Language-Team: Swedish \n" @@ -17,56 +17,61 @@ "Content-Transfer-Encoding: 8bit\n" #: array.c:112 +#, fuzzy, c-format +msgid "attempt to use function `%s' as an array" +msgstr "försök att använda funktionen \"%s\" som vektor" + +#: array.c:115 #, c-format msgid "attempt to use scalar parameter `%s' as an array" msgstr "försök att använda skalärparametern \"%s\" som en vektor" -#: array.c:113 +#: array.c:118 #, c-format msgid "attempt to use scalar `%s' as array" msgstr "försök att använda skalären \"%s\" som vektor" -#: array.c:151 +#: array.c:156 #, fuzzy, c-format msgid "from %s" msgstr "%s (från %s)" -#: array.c:506 +#: array.c:511 #, c-format msgid "reference to uninitialized element `%s[\"%s\"]'" msgstr "referens till ickeinitierat element \"%s[\"%s\"]\"" -#: array.c:512 +#: array.c:517 #, c-format msgid "subscript of array `%s' is null string" msgstr "index i vektorn \"%s\" är en tom sträng" -#: array.c:609 +#: array.c:621 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: index \"%s\" finns inte i vektorn \"%s\"" -#: array.c:769 +#: array.c:791 #, c-format msgid "%s: empty (null)\n" msgstr "%s: tom (null)\n" -#: array.c:774 +#: array.c:796 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: tom (noll)\n" -#: array.c:778 +#: array.c:800 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: tabellstorlek = %d, vektorstorlek = %d\n" -#: array.c:807 +#: array.c:829 #, c-format msgid "%s: is parameter\n" msgstr "%s: är en parameter\n" -#: array.c:812 +#: array.c:834 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: vektorreferens till %s\n" @@ -90,478 +95,474 @@ msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "regexp-konstanten \"/%s/\" ser ut som en C-kommentar men är inte det" -#: awkgram.y:340 awkgram.y:615 +#: awkgram.y:341 awkgram.y:619 msgid "statement may have no effect" msgstr "kommandot kanske inte har någon effekt" -#: awkgram.y:435 awkgram.y:455 +#: awkgram.y:436 awkgram.y:456 #, c-format msgid "`%s' used in %s action" msgstr "\"%s\" använd i %s-åtgärden" -#: awkgram.y:448 awkgram.y:451 +#: awkgram.y:449 awkgram.y:452 msgid "`nextfile' is a gawk extension" msgstr "\"nextfile\" är en gawk-utökning" -#: awkgram.y:465 +#: awkgram.y:466 msgid "`return' used outside function context" msgstr "\"return\" använd utanför funktion" -#: awkgram.y:504 +#: awkgram.y:508 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "ensamt \"print\" i BEGIN eller END-regel bör troligen vara 'print \"\"'" -#: awkgram.y:517 awkgram.y:524 +#: awkgram.y:521 awkgram.y:528 msgid "`delete array' is a gawk extension" msgstr "\"delete array\" är en gawk-utökning" -#: awkgram.y:532 awkgram.y:539 +#: awkgram.y:536 awkgram.y:543 msgid "`delete(array)' is a non-portable tawk extension" msgstr "\"delete(array)\" är en icke portabel tawk-utökning" -#: awkgram.y:583 +#: awkgram.y:587 #, c-format msgid "duplicate case values in switch body: %s" msgstr "" -#: awkgram.y:593 +#: awkgram.y:597 msgid "Duplicate `default' detected in switch body" msgstr "" -#: awkgram.y:681 +#: awkgram.y:686 msgid "multistage two-way pipelines don't work" msgstr "flerstegs dubbelriktade rör fungerar inte" -#: awkgram.y:772 +#: awkgram.y:777 msgid "regular expression on right of assignment" msgstr "reguljärt uttryck i högerledet av en tilldelning" -#: awkgram.y:782 +#: awkgram.y:800 msgid "regular expression on left of `~' or `!~' operator" msgstr "reguljärt uttryck på vänster sida om en \"~\"- eller \"!~\"-operator" -#: awkgram.y:790 +#: awkgram.y:808 msgid "regular expression on right of comparison" msgstr "reguljärt uttryck i högerledet av en jämförelse" -#: awkgram.y:857 +#: awkgram.y:875 msgid "non-redirected `getline' undefined inside END action" msgstr "icke omdirigerad \"getline\" odefinierad inuti END-åtgärd" -#: awkgram.y:884 +#: awkgram.y:902 msgid "call of `length' without parentheses is not portable" msgstr "anrop av \"length\" utan parenteser är inte portabelt" -#: awkgram.y:887 +#: awkgram.y:905 msgid "call of `length' without parentheses is deprecated by POSIX" msgstr "anrop av \"length\" utan parenteser är föråldrat enligt POSIX" -#: awkgram.y:940 +#: awkgram.y:958 msgid "use of non-array as array" msgstr "" -#: awkgram.y:942 +#: awkgram.y:960 msgid "invalid subscript expression" msgstr "ogiltig indexuttryck" -#: awkgram.y:1140 +#: awkgram.y:1158 msgid "unexpected newline or end of string" msgstr "oväntat nyradstecken eller slut på strängen" -#: awkgram.y:1235 +#: awkgram.y:1254 msgid "empty program text on command line" msgstr "tom programtext på kommandoraden" -#: awkgram.y:1292 +#: awkgram.y:1307 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "kan inte öppna källfilen \"%s\" för läsning (%s)" -#: awkgram.y:1327 +#: awkgram.y:1384 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "kan inte läsa källfilen \"%s\" (%s)" -#: awkgram.y:1335 +#: awkgram.y:1392 #, c-format msgid "source file `%s' is empty" msgstr "källfilen \"%s\" är tom" -#: awkgram.y:1537 awkgram.y:1647 awkgram.y:1665 awkgram.y:2015 awkgram.y:2100 +#: awkgram.y:1590 awkgram.y:1700 awkgram.y:1718 awkgram.y:2068 awkgram.y:2153 msgid "source file does not end in newline" msgstr "källfilen slutar inte med en ny rad" -#: awkgram.y:1601 +#: awkgram.y:1654 msgid "unterminated regexp ends with `\\' at end of file" msgstr "oavslutat reguljärt uttryck slutar med \"\\\" i slutet av filen" -#: awkgram.y:1621 +#: awkgram.y:1674 msgid "unterminated regexp" msgstr "oavslutat reguljärt uttryck" -#: awkgram.y:1624 +#: awkgram.y:1677 msgid "unterminated regexp at end of file" msgstr "oavslutat reguljärt uttryck i slutet av filen" -#: awkgram.y:1691 +#: awkgram.y:1744 msgid "use of `\\ #...' line continuation is not portable" msgstr "Användning av \"\\ #...\" för radfortsättning är inte portabelt" -#: awkgram.y:1703 +#: awkgram.y:1756 msgid "backslash not last character on line" msgstr "sista tecknet på raden är inte ett omvänt snedstreck" -#: awkgram.y:1748 +#: awkgram.y:1801 msgid "POSIX does not allow operator `**='" msgstr "POSIX tillåter inte operatorn \"**=\"" -#: awkgram.y:1750 +#: awkgram.y:1803 msgid "old awk does not support operator `**='" msgstr "gamla awk stöder inte operatorn \"**=\"" -#: awkgram.y:1759 +#: awkgram.y:1812 msgid "POSIX does not allow operator `**'" msgstr "POSIX tillåter inte operatorn \"**\"" -#: awkgram.y:1761 +#: awkgram.y:1814 msgid "old awk does not support operator `**'" msgstr "gamla awk stöder inte operatorn \"**\"" -#: awkgram.y:1792 +#: awkgram.y:1845 msgid "operator `^=' is not supported in old awk" msgstr "operatorn \"^=\" stöds inte i gamla awk" -#: awkgram.y:1800 +#: awkgram.y:1853 msgid "operator `^' is not supported in old awk" msgstr "operatorn \"^\" stöds inte i gamla awk" -#: awkgram.y:1884 awkgram.y:1901 +#: awkgram.y:1937 awkgram.y:1954 msgid "unterminated string" msgstr "oavslutad sträng" -#: awkgram.y:2061 +#: awkgram.y:2114 #, c-format msgid "invalid char '%c' in expression" msgstr "ogiltigt tecken \"%c\" i uttryck" -#: awkgram.y:2121 +#: awkgram.y:2162 #, c-format msgid "`%s' is a gawk extension" msgstr "\"%s\" är en gawk-utökning" -#: awkgram.y:2124 +#: awkgram.y:2165 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "\"%s\" är en Bell Labs-utökning" -#: awkgram.y:2127 +#: awkgram.y:2168 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX tillåter inte \"%s\"" -#: awkgram.y:2131 +#: awkgram.y:2172 #, c-format msgid "`%s' is not supported in old awk" msgstr "\"%s\" stöds inte i gamla awk" -#: awkgram.y:2158 +#: awkgram.y:2198 msgid "`goto' considered harmful!\n" msgstr "\"goto\" anses skadlig!\n" -#: awkgram.y:2220 +#: awkgram.y:2260 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d är ett ogiltigt antal argument för %s" -#: awkgram.y:2239 awkgram.y:2242 +#: awkgram.y:2279 awkgram.y:2282 msgid "match: third argument is a gawk extension" msgstr "match: tredje argumentet är en gawk-utökning" -#: awkgram.y:2255 +#: awkgram.y:2295 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "" "%s: bokstavlig sträng som sista argument till ersättning har ingen effekt" -#: awkgram.y:2258 +#: awkgram.y:2298 #, c-format msgid "%s third parameter is not a changeable object" msgstr "%s: tredje argumentet är inte ett ändringsbart objekt" -#: awkgram.y:2285 awkgram.y:2288 +#: awkgram.y:2325 awkgram.y:2328 msgid "close: second argument is a gawk extension" msgstr "close: andra argumentet är en gawk-utökning" -#: awkgram.y:2298 +#: awkgram.y:2338 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "användandet av dcgettext(_\"...\") är felaktigt: ta bort det inledande " "understrykningstecknet" -#: awkgram.y:2313 +#: awkgram.y:2353 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "användandet av dcngettext(_\"...\") är felaktigt: ta bort det inledande " "understrykningstecknet" -#: awkgram.y:2384 +#: awkgram.y:2424 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "funktionen \"%s\": parameter %d, \"%s\", är samma som parameter %d" -#: awkgram.y:2417 +#: awkgram.y:2457 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "funktionen \"%s\": parametern \"%s\" överskuggar en global variabel" -#: awkgram.y:2529 +#: awkgram.y:2569 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "kunde inte öpnna \"%s\" för skrivning (%s)" -#: awkgram.y:2530 profile.c:93 +#: awkgram.y:2570 profile.c:93 msgid "sending profile to standard error" msgstr "skickar profilen till standard fel" -#: awkgram.y:2562 +#: awkgram.y:2602 #, c-format msgid "%s: close failed (%s)" msgstr "%s: misslyckades att stänga (%s)" -#: awkgram.y:2684 +#: awkgram.y:2723 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() anropad två gånger!" -#: awkgram.y:2711 +#: awkgram.y:2750 msgid "there were shadowed variables." msgstr "det fanns överskuggade variabler." -#: awkgram.y:2784 +#: awkgram.y:2823 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "funktionen \"%s\": kan inte använda funktionsnamn som parameternamn" -#: awkgram.y:2794 +#: awkgram.y:2833 #, c-format msgid "function name `%s' previously defined" msgstr "funktionsnamnet \"%s\" är definierat sedan tidigare" -#: awkgram.y:2945 awkgram.y:2951 +#: awkgram.y:2984 awkgram.y:2990 #, c-format msgid "function `%s' called but never defined" msgstr "funktionen \"%s\" anropad men aldrig definierad" -#: awkgram.y:2954 +#: awkgram.y:2993 #, c-format msgid "function `%s' defined but never called" msgstr "funktionen \"%s\" definierad men aldrig anropad" -#: awkgram.y:2981 +#: awkgram.y:3020 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "konstant reguljärt uttryck för parameter %d ger ett booleskt värde" -#: awkgram.y:2994 -#, c-format +#: awkgram.y:3033 +#, fuzzy, c-format msgid "" "function `%s' called with space between name and `(',\n" -"%s" +"or used as a variable or an array" msgstr "" "funktionen \"%s\" anropad med blanktecken mellan namnet och \"(\",\n" "%s" -#: awkgram.y:2996 -msgid "or used as a variable or an array" -msgstr "eller använd som variabel eller vektor" - -#: builtin.c:137 +#: builtin.c:149 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s till \"%s\" misslyckades (%s)" -#: builtin.c:138 +#: builtin.c:150 msgid "standard output" msgstr "standard ut" -#: builtin.c:139 +#: builtin.c:151 msgid "reason unknown" msgstr "okänd anledning" -#: builtin.c:152 +#: builtin.c:164 msgid "exp: received non-numeric argument" msgstr "exp: fick ett ickenumeriskt argument" -#: builtin.c:158 +#: builtin.c:170 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: argumentet %g är inte inom tillåten gräns" -#: builtin.c:216 +#: builtin.c:228 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" "fflush: kan inte spola: röret \"%s\" öppnat för läsning, inte skrivning" -#: builtin.c:219 +#: builtin.c:231 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "" "fflush: kan inte spola: filen \"%s\" öppnad för läsning, inte skrivning" -#: builtin.c:231 +#: builtin.c:243 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "fflush: \"%s\" är inte en öppen fil, rör eller koprocess" -#: builtin.c:325 +#: builtin.c:338 msgid "index: received non-string first argument" msgstr "index: första argumentet är inte en sträng" -#: builtin.c:327 +#: builtin.c:340 msgid "index: received non-string second argument" msgstr "index: andra argumentet är inte en sträng" -#: builtin.c:437 +#: builtin.c:454 msgid "int: received non-numeric argument" msgstr "int: fick ett ickenumeriskt argument" -#: builtin.c:454 +#: builtin.c:471 msgid "length: received non-string argument" msgstr "length: fick ett argument som inte är en sträng" -#: builtin.c:470 +#: builtin.c:487 msgid "log: received non-numeric argument" msgstr "log: fick ett ickenumeriskt argument" -#: builtin.c:473 +#: builtin.c:490 #, c-format msgid "log: received negative argument %g" msgstr "log: fick ett negativt argumentet %g" -#: builtin.c:635 builtin.c:638 +#: builtin.c:654 builtin.c:657 msgid "must use `count$' on all formats or none" msgstr "måste använda \"count$\" på alla eller inga format" -#: builtin.c:740 +#: builtin.c:759 msgid "`$' is not permitted in awk formats" msgstr "\"$\" tillåts inte i awkformat" -#: builtin.c:746 +#: builtin.c:765 msgid "arg count with `$' must be > 0" msgstr "argumentantalet med \"$\" måste vara > 0" -#: builtin.c:748 +#: builtin.c:767 #, c-format msgid "arg count %ld greater than total number of supplied arguments" msgstr "argumentantalet %ld är större än antalet givna argument" -#: builtin.c:750 +#: builtin.c:769 msgid "`$' not permitted after period in format" msgstr "\"$\" tillåts inte efter en punkt i formatet" -#: builtin.c:763 +#: builtin.c:782 msgid "no `$' supplied for positional field width or precision" msgstr "inget \"$\" bifogat för positionsangiven fältbredd eller precision" -#: builtin.c:821 +#: builtin.c:848 msgid "`l' is meaningless in awk formats; ignored" msgstr "\"l\" är meningslös i awk-format, ignorerad" -#: builtin.c:825 +#: builtin.c:852 msgid "`l' is not permitted in POSIX awk formats" msgstr "\"l\" tillåts inte i POSIX awk-format" -#: builtin.c:836 +#: builtin.c:863 msgid "`L' is meaningless in awk formats; ignored" msgstr "\"L\" är meningslös i awk-format, ignorerad" -#: builtin.c:840 +#: builtin.c:867 msgid "`L' is not permitted in POSIX awk formats" msgstr "\"L\" tillåts inte i POSIX awk-format" -#: builtin.c:851 +#: builtin.c:878 msgid "`h' is meaningless in awk formats; ignored" msgstr "\"h\" är meningslös i awk-format, ignorerad" -#: builtin.c:855 +#: builtin.c:882 msgid "`h' is not permitted in POSIX awk formats" msgstr "\"h\" tillåts inte i POSIX awk-format" -#: builtin.c:1055 +#: builtin.c:1111 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" msgstr "" -#: builtin.c:1108 +#: builtin.c:1171 msgid "not enough arguments to satisfy format string" msgstr "för få argument för formatsträngen" -#: builtin.c:1110 +#: builtin.c:1173 msgid "^ ran out for this one" msgstr "^ tog slut här" -#: builtin.c:1115 +#: builtin.c:1178 msgid "[s]printf: format specifier does not have control letter" msgstr "[s]printf: formatspecifieraren har ingen kommandobokstav" -#: builtin.c:1118 +#: builtin.c:1181 msgid "too many arguments supplied for format string" msgstr "för många argument för formatsträngen" -#: builtin.c:1184 builtin.c:1187 +#: builtin.c:1247 builtin.c:1250 msgid "printf: no arguments" msgstr "printf: inga argument" -#: builtin.c:1211 +#: builtin.c:1274 msgid "sqrt: received non-numeric argument" msgstr "sqrt: fick ickenumeriskt argument" -#: builtin.c:1215 +#: builtin.c:1278 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: anropad med negativt argument %g" -#: builtin.c:1238 +#: builtin.c:1301 #, c-format msgid "substr: start index %g is invalid, using 1" msgstr "substr: startindex %g är ogiltigt, använder 1" -#: builtin.c:1243 +#: builtin.c:1306 #, c-format msgid "substr: non-integer start index %g will be truncated" msgstr "substr: startindex %g som inte är ett heltal kommer trunkeras" -#: builtin.c:1262 +#: builtin.c:1325 #, fuzzy, c-format msgid "substr: length %g is not >= 1" msgstr "substr: längden %g är <= 0" -#: builtin.c:1264 +#: builtin.c:1327 #, fuzzy, c-format msgid "substr: length %g is not >= 0" msgstr "substr: längden %g är <= 0" -#: builtin.c:1271 +#: builtin.c:1334 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: längden %g som inte är ett heltal kommer trunkeras" -#: builtin.c:1276 +#: builtin.c:1339 #, c-format msgid "substr: length %g too big for string indexing, truncating to %g" msgstr "substr: längden %g är för stor för strängindexering, trunkeras till %g" -#: builtin.c:1288 +#: builtin.c:1351 msgid "substr: source string is zero length" msgstr "substr: källsträngen är tom" -#: builtin.c:1294 +#: builtin.c:1357 #, c-format msgid "substr: start index %g is past end of string" msgstr "substr: startindex %g är bortom strängens slut" -#: builtin.c:1302 +#: builtin.c:1365 #, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" @@ -569,288 +570,314 @@ "substr: längden %g vid startindex %g överskrider det första argumentets " "längd (%lu)" -#: builtin.c:1337 +#: builtin.c:1400 msgid "strftime: received non-string first argument" msgstr "strftime: fick ett första argument som inte är en sträng" -#: builtin.c:1343 +#: builtin.c:1406 msgid "strftime: received empty format string" msgstr "strftime: fick en tom formatsträng" -#: builtin.c:1352 +#: builtin.c:1415 msgid "strftime: received non-numeric second argument" msgstr "strftime: fick ett ickenumeriskt andra argument" -#: builtin.c:1415 +#: builtin.c:1478 msgid "mktime: received non-string argument" msgstr "mktime: fick ett argument som inte är en sträng" -#: builtin.c:1460 +#: builtin.c:1523 msgid "system: received non-string argument" msgstr "system: fick ett argument som inte är en sträng" -#: builtin.c:1581 eval.c:1883 +#: builtin.c:1644 eval.c:2019 #, fuzzy, c-format msgid "reference to uninitialized field `$%d'" msgstr "referens till icke initierad variabel \"%s\"" -#: builtin.c:1608 +#: builtin.c:1671 msgid "tolower: received non-string argument" msgstr "tolower: fick ett argument som inte är en sträng" -#: builtin.c:1657 +#: builtin.c:1720 msgid "toupper: received non-string argument" msgstr "toupper: fick ett argument som inte är en sträng" -#: builtin.c:1702 +#: builtin.c:1765 msgid "atan2: received non-numeric first argument" msgstr "atan2: fick ett ickenumeriskt första argument" -#: builtin.c:1704 +#: builtin.c:1767 msgid "atan2: received non-numeric second argument" msgstr "atan2: fick ett ickenumeriskt andra argument" -#: builtin.c:1723 +#: builtin.c:1786 msgid "sin: received non-numeric argument" msgstr "sin: fick ett ickenumeriskt argument" -#: builtin.c:1739 +#: builtin.c:1802 msgid "cos: received non-numeric argument" msgstr "cos: fick ett ickenumeriskt argument" -#: builtin.c:1788 +#: builtin.c:1852 msgid "srand: received non-numeric argument" msgstr "srand: fick ett ickenumeriskt argument" -#: builtin.c:1823 +#: builtin.c:1887 msgid "match: third argument is not an array" msgstr "match: tredje argumentet är inte en vektor" -#: builtin.c:2307 +#: builtin.c:2414 msgid "gensub: third argument of 0 treated as 1" msgstr "gensub: Nollan i tredje argumentet behandlad som en etta" -#: builtin.c:2416 builtin.c:2418 +#: builtin.c:2572 msgid "lshift: received non-numeric first argument" msgstr "lshift: fick ett ickenumeriskt första argument" -#: builtin.c:2420 +#: builtin.c:2574 +#, fuzzy +msgid "lshift: received non-numeric second argument" +msgstr "strftime: fick ett ickenumeriskt andra argument" + +#: builtin.c:2580 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "lshift(%lf, %lf): negativa värden kommer ge konstiga resultat" -#: builtin.c:2422 +#: builtin.c:2582 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): flyttalsvärden kommer trunkeras" -#: builtin.c:2424 +#: builtin.c:2584 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "lshift(%lf, %lf): för stora skiftvärden kommer ge konstiga resultat" -#: builtin.c:2453 builtin.c:2455 +#: builtin.c:2610 msgid "rshift: received non-numeric first argument" msgstr "rshift: fick ett ickenumeriskt första argument" -#: builtin.c:2457 +#: builtin.c:2612 +#, fuzzy +msgid "rshift: received non-numeric second argument" +msgstr "strftime: fick ett ickenumeriskt andra argument" + +#: builtin.c:2618 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "rshift(%lf, %lf): negativa värden kommer ge konstiga resultat" -#: builtin.c:2459 +#: builtin.c:2620 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): flyttalsvärden kommer trunkeras" -#: builtin.c:2461 +#: builtin.c:2622 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "rshift(%lf, %lf): för stora skiftvärden kommer ge konstiga resultat" -#: builtin.c:2490 builtin.c:2492 +#: builtin.c:2648 msgid "and: received non-numeric first argument" msgstr "and: fick ett ickenumeriskt första argument" -#: builtin.c:2494 +#: builtin.c:2650 +#, fuzzy +msgid "and: received non-numeric second argument" +msgstr "atan2: fick ett ickenumeriskt andra argument" + +#: builtin.c:2656 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "and(%lf, %lf): negativa värden kommer ge konstiga resultat" -#: builtin.c:2496 +#: builtin.c:2658 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): flyttalsvärden kommer trunkeras" -#: builtin.c:2525 builtin.c:2527 +#: builtin.c:2684 msgid "or: received non-numeric first argument" msgstr "or: fick ett ickenumeriskt första argument" -#: builtin.c:2529 +#: builtin.c:2686 +#, fuzzy +msgid "or: received non-numeric second argument" +msgstr "atan2: fick ett ickenumeriskt andra argument" + +#: builtin.c:2692 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "or(%lf, %lf): negativa värden kommer ge konstiga resultat" -#: builtin.c:2531 +#: builtin.c:2694 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): flyttalsvärden kommer trunkeras" -#: builtin.c:2560 builtin.c:2562 +#: builtin.c:2720 msgid "xor: received non-numeric first argument" msgstr "xor: fick ett ickenumeriskt första argument" -#: builtin.c:2564 +#: builtin.c:2722 +#, fuzzy +msgid "xor: received non-numeric second argument" +msgstr "atan2: fick ett ickenumeriskt andra argument" + +#: builtin.c:2728 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "xor(%lf, %lf): negativa värden kommer ge konstiga resultat" -#: builtin.c:2566 +#: builtin.c:2730 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): flyttalsvärden kommer trunkeras" -#: builtin.c:2594 +#: builtin.c:2754 msgid "compl: received non-numeric argument" msgstr "compl: fick ett ickenumeriskt argument" -#: builtin.c:2596 +#: builtin.c:2760 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): negativa värden kommer ge konstiga resultat" -#: builtin.c:2598 +#: builtin.c:2762 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): flyttalsvärden kommer trunkeras" -#: builtin.c:2771 +#: builtin.c:2935 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: \"%s\" är inte en giltig lokalkategori" -#: eval.c:266 +#: eval.c:303 #, c-format msgid "unknown nodetype %d" msgstr "okänd nodtyp %d" -#: eval.c:312 +#: eval.c:350 msgid "buffer overflow in genflags2str" msgstr "buffertöverflöd i genflags2str" -#: eval.c:647 +#: eval.c:382 eval.c:388 profile.c:837 +#, c-format +msgid "attempt to use array `%s' in a scalar context" +msgstr "försök att använda vektorn \"%s\" i skalärsammanhang" + +#: eval.c:730 #, c-format msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" "forslinga: vektorn \"%s\" ändrade storlek från %ld till %ld under " "slingexekvering" -#: eval.c:668 +#: eval.c:751 msgid "`break' outside a loop is not portable" msgstr "\"break\" utanför en slinga är inte portabelt" -#: eval.c:672 +#: eval.c:755 msgid "`break' outside a loop is not allowed" msgstr "\"break\" utanför en slinga är inte tillåtet" -#: eval.c:689 +#: eval.c:772 msgid "`continue' outside a loop is not portable" msgstr "\"continue\" utanför en slinga är inte portabelt" -#: eval.c:693 +#: eval.c:776 msgid "`continue' outside a loop is not allowed" msgstr "\"continue\" utanför en slinga är inte tillåtet" -#: eval.c:727 +#: eval.c:810 msgid "`next' cannot be called from a BEGIN rule" msgstr "\"next\" kan inte anropas från en BEGIN-regel" -#: eval.c:729 +#: eval.c:812 msgid "`next' cannot be called from an END rule" msgstr "\"next\" kan inte anropas från en END-regel" -#: eval.c:738 +#: eval.c:821 msgid "`nextfile' cannot be called from a BEGIN rule" msgstr "\"nextfile\" kan inte anropas från en BEGIN-regel" -#: eval.c:740 +#: eval.c:823 msgid "`nextfile' cannot be called from an END rule" msgstr "\"nextfile\" kan inte anropas från en END-regel" -#: eval.c:785 +#: eval.c:872 msgid "statement has no effect" msgstr "kommandot har ingen effekt" -#: eval.c:828 eval.c:1726 +#: eval.c:915 eval.c:1873 #, c-format msgid "can't use function name `%s' as variable or array" msgstr "kan inte använda funktionsnamnet \"%s\" som variabel eller vektor" -#: eval.c:835 eval.c:841 +#: eval.c:922 eval.c:928 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "referens till icke initierat argument \"%s\"" -#: eval.c:848 eval.c:907 eval.c:1732 eval.c:1742 profile.c:807 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "försök att använda vektorn \"%s\" i skalärsammanhang" - -#: eval.c:858 eval.c:1752 +#: eval.c:937 eval.c:1882 #, c-format msgid "reference to uninitialized variable `%s'" msgstr "referens till icke initierad variabel \"%s\"" -#: eval.c:1007 +#: eval.c:1083 msgid "" "concatenation: side effects in one expression have changed the length of " "another!" msgstr "" "concatenation: sidoeffekter i ett uttryck har ändrat längden av ett annat!" -#: eval.c:1032 +#: eval.c:1162 msgid "assignment used in conditional context" msgstr "tilldelning använt i jämförelsesammanhang" -#: eval.c:1122 +#: eval.c:1252 msgid "division by zero attempted" msgstr "försökte dividera med noll" -#: eval.c:1137 +#: eval.c:1267 #, c-format msgid "division by zero attempted in `%%'" msgstr "försökte dividera med noll i \"%%\"" -#: eval.c:1152 profile.c:683 +#: eval.c:1282 profile.c:713 #, c-format msgid "illegal type (%s) in tree_eval" msgstr "otillåten typ (%s) i tree_eval" -#: eval.c:1328 +#: eval.c:1459 msgid "division by zero attempted in `/='" msgstr "försökte dividera med noll i \"/=\"" -#: eval.c:1346 +#: eval.c:1477 #, c-format msgid "division by zero attempted in `%%='" msgstr "försökte dividera med noll i \"%%=\"" -#: eval.c:1586 +#: eval.c:1738 #, c-format msgid "function `%s' called with more arguments than declared" msgstr "funktionen \"%s\" anropad med fler argument än vad som deklarerats" -#: eval.c:1633 +#: eval.c:1782 #, c-format msgid "function `%s' not defined" msgstr "funktionen \"%s\" är inte definierad" -#: eval.c:1639 +#: eval.c:1788 #, c-format msgid "function %s called\n" msgstr "funktionen %s anropad\n" -#: eval.c:1698 +#: eval.c:1845 +#, c-format msgid "" "\n" "\t# Function Call Stack:\n" @@ -860,41 +887,42 @@ "\t# Funktionsanropsstack:\n" "\n" -#: eval.c:1701 +#: eval.c:1848 +#, c-format msgid "\t# -- main --\n" msgstr "\t# -- main --\n" -#: eval.c:1867 +#: eval.c:2003 msgid "attempt to field reference from non-numeric value" msgstr "försök att fältreferera från ickenumeriskt värde" -#: eval.c:1869 +#: eval.c:2005 msgid "attempt to reference from null string" msgstr "försök att referera från tom sträng" -#: eval.c:1875 +#: eval.c:2011 #, c-format msgid "attempt to access field %d" msgstr "försök att komma åt fält nummer %d" -#: eval.c:1896 eval.c:1903 profile.c:900 +#: eval.c:2032 eval.c:2039 profile.c:934 msgid "assignment is not allowed to result of builtin function" msgstr "det är inte tillåtet att tilldela resultatet från en inbyggd funktion" -#: eval.c:1951 +#: eval.c:2103 msgid "`IGNORECASE' is a gawk extension" msgstr "\"IGNORECASE\" är en gawk-utökning" -#: eval.c:1980 +#: eval.c:2133 msgid "`BINMODE' is a gawk extension" msgstr "\"BINMODE\" är en gawk-utökning" -#: eval.c:2092 +#: eval.c:2255 #, c-format msgid "bad `%sFMT' specification `%s'" msgstr "felaktig \"%sFMT\"-specifikation \"%s\"" -#: eval.c:2170 +#: eval.c:2333 msgid "turning off `--lint' due to assignment to `LINT'" msgstr "slår av \"--lint\" på grund av en tilldelning till \"LINT\"" @@ -912,7 +940,56 @@ msgid "extension: library `%s': cannot call function `%s' (%s)\n" msgstr "extension: bibliotek \"%s\": kan inte anropa funktionen \"%s\" (%s)\n" -#: ext.c:183 +#: ext.c:102 +msgid "extension: missing function name" +msgstr "" + +#: ext.c:107 +#, fuzzy, c-format +msgid "extension: illegal character `%c' in function name `%s'" +msgstr "extension: bibliotek \"%s\": kan inte anropa funktionen \"%s\" (%s)\n" + +#: ext.c:113 +#, fuzzy, c-format +msgid "extension: can't redefine function `%s'" +msgstr "extension: kan inte öppna \"%s\" (%s)\n" + +#: ext.c:117 +#, fuzzy, c-format +msgid "extension: function `%s' already defined" +msgstr "funktionen \"%s\" är inte definierad" + +#: ext.c:122 +#, c-format +msgid "extension: can't use gawk built-in `%s' as function name" +msgstr "" + +#: ext.c:124 +#, fuzzy, c-format +msgid "extension: function name `%s' previously defined" +msgstr "funktionsnamnet \"%s\" är definierat sedan tidigare" + +#: ext.c:201 +#, c-format +msgid "function `%s' defined to take no more than `%d' argument(s)" +msgstr "" + +#: ext.c:204 +#, fuzzy, c-format +msgid "function `%s': missing argument #%d" +msgstr "funktionen \"%s\" är inte definierad" + +#: ext.c:214 +#, fuzzy, c-format +msgid "function `%s': argument #%d: attempt to use scalar as an array" +msgstr "försök att använda skalären \"%s\" som vektor" + +#: ext.c:218 +#, c-format +msgid "function `%s': argument #%d: attempt to use array as a scalar" +msgstr "" + +#: ext.c:243 msgid "Operation Not Supported" msgstr "Operationen stöds inte" @@ -941,524 +1018,524 @@ msgid "null string for `FS' is a gawk extension" msgstr "tom sträng som \"FS\" är en gawk-utökning" -#: getopt.c:692 getopt.c:704 +#: getopt.c:692 getopt.c:711 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s: flaggan \"%s\" är tvetydig\n" -#: getopt.c:737 getopt.c:741 +#: getopt.c:744 getopt.c:748 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "%s: flaggan \"--%s\" tillåter inte argument\n" -#: getopt.c:750 getopt.c:755 +#: getopt.c:757 getopt.c:762 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "%s: flaggan \"%c%s\" tillåter inte argument\n" -#: getopt.c:791 getopt.c:804 getopt.c:1093 getopt.c:1106 +#: getopt.c:807 getopt.c:829 getopt.c:1159 getopt.c:1181 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "%s: flaggan \"%s\" kräver ett argument\n" -#: getopt.c:842 getopt.c:845 +#: getopt.c:867 getopt.c:870 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s: okänd flagga \"--%s\"\n" -#: getopt.c:853 getopt.c:856 +#: getopt.c:878 getopt.c:881 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s: okänd flagga \"%c%s\"\n" -#: getopt.c:903 getopt.c:906 +#: getopt.c:936 getopt.c:939 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: otillåten flagga -- %c\n" -#: getopt.c:912 getopt.c:915 +#: getopt.c:945 getopt.c:948 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s: ogiltig flagga -- %c\n" -#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:434 +#: getopt.c:1003 getopt.c:1022 getopt.c:1234 getopt.c:1255 main.c:433 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: flaggan kräver ett argument -- %c\n" -#: getopt.c:1025 getopt.c:1036 +#: getopt.c:1074 getopt.c:1093 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s: flaggan \"-W %s\" är tvetydig\n" -#: getopt.c:1060 getopt.c:1072 +#: getopt.c:1117 getopt.c:1138 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: flaggan \"-W %s\" tillåter inte något argument\n" -#: io.c:305 +#: io.c:308 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "kan inte öppna filen \"%s\" för läsning (%s)" -#: io.c:392 +#: io.c:395 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "stängning av fd %d (\"%s\") misslyckades (%s)" -#: io.c:530 +#: io.c:533 #, c-format msgid "invalid tree type %s in redirect()" msgstr "ogiltig trädtyp %s i redirect()" -#: io.c:536 +#: io.c:539 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "uttrycket i \"%s\"-omdirigering har bara numeriskt värde" -#: io.c:542 +#: io.c:545 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "uttrycket för \"%s\"-omdirigering har en tom sträng som värde" -#: io.c:547 +#: io.c:550 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "filnamnet \"%s\" för \"%s\"-omdirigering kan vara resultatet av ett logiskt " "uttryck" -#: io.c:569 +#: io.c:588 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "onödig blandning av \">\" och \">>\" för filen \"%.*s\"" -#: io.c:621 +#: io.c:640 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "kan inte öppna röret \"%s\" för utmatning (%s)" -#: io.c:630 +#: io.c:649 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "kan inte öppna röret \"%s\" för inmatning (%s)" -#: io.c:643 +#: io.c:662 #, c-format msgid "can't open two way socket `%s' for input/output (%s)" msgstr "kan inte öppna tvåvägsuttaget \"%s\" för in-/utmatning (%s)" -#: io.c:647 +#: io.c:666 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "kan inte öppna tvåvägsröret \"%s\" för in-/utmatning (%s)" -#: io.c:723 +#: io.c:742 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "kan inte dirigera om från \"%s\" (%s)" -#: io.c:726 +#: io.c:745 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "kan inte dirigera om till \"%s\" (%s)" -#: io.c:765 +#: io.c:784 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "nådde systembegränsningen för öppna filer: börjar multiplexa fildeskriptorer" -#: io.c:777 +#: io.c:800 #, c-format msgid "close of `%s' failed (%s)." msgstr "stängning av \"%s\" misslyckades (%s)" -#: io.c:784 +#: io.c:808 msgid "too many pipes or input files open" msgstr "för många rör eller indatafiler öppna" -#: io.c:807 +#: io.c:831 msgid "close: second argument must be `to' or `from'" msgstr "close: andra argumentet måste vara \"to\" eller \"from\"" -#: io.c:821 +#: io.c:845 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "close: \"%.*s\" är inte en öppen fil, rör eller koprocess" -#: io.c:825 +#: io.c:849 msgid "close of redirection that was never opened" msgstr "stängning av omdirigering som aldrig öppnades" -#: io.c:862 +#: io.c:945 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: omdirigeringen \"%s\" öppnades inte med \"|&\", andra argumentet " "ignorerat" -#: io.c:924 +#: io.c:960 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "felstatus (%d) från rörstängning av \"%s\" (%s)" -#: io.c:927 +#: io.c:963 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "felstatus (%d) från filstängning av \"%s\" (%s)" -#: io.c:946 +#: io.c:983 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "ingen explicit stängning av uttaget \"%s\" tillhandahållen" -#: io.c:949 +#: io.c:986 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "ingen explicit stängning av koprocessen \"%s\" tillhandahållen" -#: io.c:952 +#: io.c:989 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "ingen explicit stängning av röret \"%s\" tillhandahållen" -#: io.c:955 +#: io.c:992 #, c-format msgid "no explicit close of file `%s' provided" msgstr "ingen explicit stängning av filen \"%s\" tillhandahållen" -#: io.c:984 io.c:1038 +#: io.c:1021 io.c:1075 #, c-format msgid "error writing standard output (%s)" msgstr "fel vid skrivning till standard ut (%s)" -#: io.c:988 io.c:1042 +#: io.c:1025 io.c:1079 #, c-format msgid "error writing standard error (%s)" msgstr "fel vid skrivning till standard fel (%s)" -#: io.c:996 +#: io.c:1033 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "rörspolning av \"%s\" misslyckades (%s)" -#: io.c:999 +#: io.c:1036 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "koprocesspolning av röret till \"%s\" misslyckades (%s)" -#: io.c:1002 +#: io.c:1039 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "filspolning av \"%s\" misslyckades (%s)" -#: io.c:1161 +#: io.c:1198 msgid "/inet/raw client not ready yet, sorry" msgstr "/inet/raw-klient är tyvärr inte klar än" -#: io.c:1163 io.c:1200 +#: io.c:1200 io.c:1237 msgid "only root may use `/inet/raw'." msgstr "bara root kan använda \"/inet/raw\"." -#: io.c:1198 +#: io.c:1235 msgid "/inet/raw server not ready yet, sorry" msgstr "/inet/raw-server inte redo än, ledsen" -#: io.c:1288 +#: io.c:1325 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "" "inget (känt) protokoll tillhandahållet i det speciella filnamnet \"%s\"" -#: io.c:1306 +#: io.c:1343 #, c-format msgid "special file name `%s' is incomplete" msgstr "speciellt filnamn \"%s\" är ofullständigt" -#: io.c:1318 +#: io.c:1355 #, c-format msgid "local port invalid in `%s'" msgstr "lokal port ogiltig i \"%s\"" -#: io.c:1330 +#: io.c:1367 msgid "must supply a remote hostname to `/inet'" msgstr "måste tillhandahålla ett fjärrdatornamn till \"/inet\"" -#: io.c:1345 +#: io.c:1382 msgid "must supply a remote port to `/inet'" msgstr "måste tillhandahålla en fjärrport till \"/inet\"" -#: io.c:1351 +#: io.c:1388 #, c-format msgid "remote port invalid in `%s'" msgstr "fjärrporten ogiltig i \"%s\"" -#: io.c:1361 +#: io.c:1398 msgid "TCP/IP communications are not supported" msgstr "TCP/IP-kommunikation stöds inte" -#: io.c:1370 io.c:1551 +#: io.c:1407 io.c:1588 #, c-format msgid "file `%s' is a directory" msgstr "filen \"%s\" är en katalog" -#: io.c:1440 +#: io.c:1477 #, c-format msgid "use `PROCINFO[\"%s\"]' instead of `%s'" msgstr "använd \"PROCINFO[\"%s\"]\" istället för \"%s\"" -#: io.c:1472 +#: io.c:1509 msgid "use `PROCINFO[...]' instead of `/dev/user'" msgstr "använd \"PROCINFO[...]\" istället för \"dev/user\"" -#: io.c:1537 io.c:1711 +#: io.c:1574 io.c:1748 #, c-format msgid "could not open `%s', mode `%s'" msgstr "kunde inte öppna \"%s\", läge \"%s\"" -#: io.c:1762 +#: io.c:1799 #, c-format msgid "close of master pty failed (%s)" msgstr "stängning av huvudpty misslyckades (%s)" -#: io.c:1764 io.c:1916 io.c:2068 +#: io.c:1801 io.c:1953 io.c:2105 #, c-format msgid "close of stdout in child failed (%s)" msgstr "stängning av standard ut i barnet misslyckades (%s)" -#: io.c:1767 +#: io.c:1804 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "flyttandet av slavpty till standard ut i barnet misslyckades (dup: %s)" -#: io.c:1769 io.c:1921 +#: io.c:1806 io.c:1958 #, c-format msgid "close of stdin in child failed (%s)" msgstr "stängning av standard in i barnet misslyckades (%s)" -#: io.c:1772 +#: io.c:1809 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "flyttandet av slavpty till standard in i barnet misslyckades (dup: %s)" -#: io.c:1774 io.c:1793 +#: io.c:1811 io.c:1830 #, c-format msgid "close of slave pty failed (%s)" msgstr "stängning av slavpty misslyckades (%s)" -#: io.c:1867 io.c:1919 io.c:2049 io.c:2071 +#: io.c:1904 io.c:1956 io.c:2086 io.c:2108 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "flyttande av rör till standard ut i barnet misslyckades (dup: %s)" -#: io.c:1871 io.c:1924 +#: io.c:1908 io.c:1961 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "flyttande av rör till standard in i barnet misslyckades (dup: %s)" -#: io.c:1888 io.c:2062 +#: io.c:1925 io.c:2099 msgid "restoring stdout in parent process failed\n" msgstr "återställande av standard ut i förälderprocessen misslyckades\n" -#: io.c:1893 +#: io.c:1930 msgid "restoring stdin in parent process failed\n" msgstr "återställande av standard in i förälderprocessen misslyckades\n" -#: io.c:1927 io.c:2073 io.c:2084 +#: io.c:1964 io.c:2110 io.c:2121 #, c-format msgid "close of pipe failed (%s)" msgstr "stängning av röret misslyckades (%s)" -#: io.c:1972 +#: io.c:2009 msgid "`|&' not supported" msgstr "\"|&\" stöds inte" -#: io.c:2039 +#: io.c:2076 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "kan inte öppna röret \"%s\" (%s)" -#: io.c:2080 +#: io.c:2117 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "kan inte skapa barnprocess för \"%s\" (fork: %s)" -#: io.c:2423 +#: io.c:2460 #, c-format msgid "data file `%s' is empty" msgstr "datafilen \"%s\" är tom" -#: io.c:2466 io.c:2474 +#: io.c:2503 io.c:2511 msgid "could not allocate more input memory" msgstr "kunde inte allokera mer indataminne" -#: io.c:2832 io.c:2895 +#: io.c:2869 io.c:2932 #, c-format msgid "error reading input file `%s': %s" msgstr "fel vid läsning av indatafilen \"%s\": %s" -#: io.c:3020 +#: io.c:3057 msgid "multicharacter value of `RS' is a gawk extension" msgstr "flerteckensvärdet av \"RS\" är en gawk-utökning" -#: main.c:324 +#: main.c:323 msgid "`-m[fr]' option irrelevant in gawk" msgstr "\"-m[fr]\"-flaggan är irrelevant i gawk" -#: main.c:326 +#: main.c:325 msgid "-m option usage: `-m[fr] nnn'" msgstr "-m-flaggans användning: \"-m[fr] nnn\"" -#: main.c:343 +#: main.c:342 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: flaggan \"-W %s\" okänd, ignorerad\n" -#: main.c:380 +#: main.c:379 msgid "empty argument to `--source' ignored" msgstr "tomt argument till \"--source\" ignorerat" -#: main.c:451 +#: main.c:450 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "miljövariabeln \"POSIXLY_CORRECT\" satt: slår på \"--posix\"" -#: main.c:456 +#: main.c:455 msgid "`--posix' overrides `--traditional'" msgstr "\"--posix\" åsidosätter \"--traditional\"" -#: main.c:467 +#: main.c:466 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "\"--posix\"/\"--traditional\" åsidosätter \"--non-decimal-data\"" -#: main.c:471 +#: main.c:470 #, c-format msgid "running %s setuid root may be a security problem" msgstr "att köra %s setuid root kan vara ett säkerhetsproblem" -#: main.c:512 +#: main.c:511 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "kan inte sätta binärläge på standard in (%s)" -#: main.c:515 +#: main.c:514 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "kan inte sätta binärläge på standard ut (%s)" -#: main.c:517 +#: main.c:516 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "kan inte sätta binärläge på standard fel (%s)" -#: main.c:547 +#: main.c:546 msgid "no program text at all!" msgstr "ingen programtext alls!" -#: main.c:620 +#: main.c:623 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "" "Användning: %s [POSIX- eller GNU-stilsflaggor] -f progfil [--] fil ...\n" -#: main.c:622 +#: main.c:625 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "Användning: %s [POSIX- eller GNU-stilsflaggor] %cprogram%c fil ...\n" -#: main.c:627 +#: main.c:630 msgid "POSIX options:\t\tGNU long options:\n" msgstr "POSIX-flaggor:\t\tGNU långa flaggor:\n" -#: main.c:628 +#: main.c:631 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f progfil\t\t--file=progfil\n" -#: main.c:629 +#: main.c:632 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F fs\t\t\t--field-separator=fs\n" -#: main.c:630 +#: main.c:633 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v var=värde\t\t--assign=var=värde\n" -#: main.c:631 +#: main.c:634 msgid "\t-m[fr] val\n" msgstr "\t-m[fr] värde\n" -#: main.c:632 +#: main.c:635 msgid "\t-W compat\t\t--compat\n" msgstr "\t-W compat\t\t--compat\n" -#: main.c:633 +#: main.c:636 msgid "\t-W copyleft\t\t--copyleft\n" msgstr "\t-W copyleft\t\t--copyleft\n" -#: main.c:634 +#: main.c:637 msgid "\t-W copyright\t\t--copyright\n" msgstr "\t-W copyright\t\t--copyright\n" -#: main.c:635 +#: main.c:638 msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" msgstr "\t-W dump-variables[=fil]\t--dump-variables[=fil]\n" -#: main.c:636 +#: main.c:639 msgid "\t-W gen-po\t\t--gen-po\n" msgstr "\t-W gen-po\t\t--gen-po\n" -#: main.c:637 +#: main.c:640 msgid "\t-W help\t\t\t--help\n" msgstr "\t-W help\t\t\t--help\n" -#: main.c:638 +#: main.c:641 msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -#: main.c:639 +#: main.c:642 msgid "\t-W lint-old\t\t--lint-old\n" msgstr "\t-W lint-old\t\t--lint-old\n" -#: main.c:640 +#: main.c:643 msgid "\t-W non-decimal-data\t--non-decimal-data\n" msgstr "\t-W non-decimal-data\t--non-decimal-data\n" -#: main.c:642 +#: main.c:645 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" -#: main.c:645 +#: main.c:648 msgid "\t-W parsedebug\t\t--parsedebug\n" msgstr "\t-W parsedebug\t\t--parsedebug\n" -#: main.c:647 +#: main.c:650 msgid "\t-W profile[=file]\t--profile[=file]\n" msgstr "\t-W profile[=fil]\t--profile[=fil]\n" -#: main.c:648 +#: main.c:651 msgid "\t-W posix\t\t--posix\n" msgstr "\t-W posix\t\t--posix\n" -#: main.c:649 +#: main.c:652 msgid "\t-W re-interval\t\t--re-interval\n" msgstr "\t-W re-interval\t\t--re-interval\n" -#: main.c:650 +#: main.c:653 msgid "\t-W source=program-text\t--source=program-text\n" msgstr "\t-W source=programtext\t--source=programtext\n" -#: main.c:651 +#: main.c:654 msgid "\t-W traditional\t\t--traditional\n" msgstr "\t-W traditional\t\t--traditional\n" -#: main.c:652 +#: main.c:655 msgid "\t-W usage\t\t--usage\n" msgstr "\t-W usage\t\t--usage\n" -#: main.c:653 +#: main.c:656 msgid "\t-W version\t\t--version\n" msgstr "\t-W version\t\t--version\n" -#: main.c:657 +#: main.c:660 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1472,7 +1549,7 @@ "Rapportera synpunkter på översättningen till .\n" "\n" -#: main.c:661 +#: main.c:664 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -1482,7 +1559,7 @@ "Normalt läser det från standard in och skriver till standard ut.\n" "\n" -#: main.c:665 +#: main.c:668 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -1492,7 +1569,7 @@ "\tgawk '{ sum += $1 }; END { print sum }' fil\n" "\tgawk -F: '{print $1 }' /etc/passwd\n" -#: main.c:682 +#: main.c:685 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1511,7 +1588,7 @@ "någon senare version.\n" "\n" -#: main.c:690 +#: main.c:693 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -1525,7 +1602,7 @@ "General Public License för ytterligare information.\n" "\n" -#: main.c:696 +#: main.c:699 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, write to the Free Software\n" @@ -1535,51 +1612,52 @@ "med detta program. Om inte, skriv till Free Software Foundation,\n" "Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n" -#: main.c:730 +#: main.c:733 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft sätter inte FS till tab i POSIX-awk" -#: main.c:956 +#: main.c:962 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" "\n" msgstr "%s: Argumentet \"%s\" till \"-v\" är inte på formatet \"var=värde\"\n" -#: main.c:976 +#: main.c:982 #, c-format msgid "`%s' is not a legal variable name" msgstr "\"%s\" är inte ett giltigt variabelnamn" -#: main.c:979 +#: main.c:985 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "\"%s\" är inte ett variabelnamn, letar efter filen \"%s=%s\"" -#: main.c:1012 +#: main.c:1018 msgid "floating point exception" msgstr "flyttalsundantag" -#: main.c:1019 +#: main.c:1025 msgid "fatal error: internal error" msgstr "ödesdigert fel: internt fel" -#: main.c:1069 +#: main.c:1075 #, c-format msgid "no pre-opened fd %d" msgstr "ingen föröppnad fd %d" -#: main.c:1074 +#: main.c:1082 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "kunde inte föröppna /dev/null för fd %d" -#: main.c:1097 main.c:1106 +#: main.c:1105 main.c:1114 #, c-format msgid "could not find groups: %s" msgstr "kunde inte hitta grupper: %s" #: msg.c:54 +#, c-format msgid "cmd. line:" msgstr "kommandorad:" @@ -1599,19 +1677,19 @@ msgid "can't convert string to float" msgstr "kan inte konvertera en sträng till flyttal" -#: node.c:355 +#: node.c:357 msgid "backslash at end of string" msgstr "omvänt snedstreck i slutet av strängen" -#: node.c:539 +#: node.c:541 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX tillåter inte \"\\x\"-kontrollsekvenser" -#: node.c:545 +#: node.c:547 msgid "no hex digits in `\\x' escape sequence" msgstr "inga hexadecimala siffror i \"\\x\"-kontrollsekvenser" -#: node.c:579 +#: node.c:581 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "kontrollsekvensen \"\\%c\" behandlad som bara \"%c\"" @@ -1626,21 +1704,27 @@ msgid "could not open `%s' for writing: %s" msgstr "kunde inte öppna \"%s\" för skrivning: %s" -#: profile.c:449 +#: profile.c:467 #, fuzzy, c-format msgid "internal error: %s with null vname" msgstr "internt fel: Node_var med null vname" -#: profile.c:512 +#: profile.c:530 msgid "# treated internally as `delete'" msgstr "# behandlad internt som \"delete\"" -#: profile.c:1162 +#: profile.c:1167 +#, c-format +msgid "# this is a dynamically loaded extension function" +msgstr "" + +#: profile.c:1198 #, c-format msgid "\t# gawk profile, created %s\n" msgstr "\t# gawkprofil, skapad %s\n" -#: profile.c:1165 +#: profile.c:1201 +#, c-format msgid "" "\t# BEGIN block(s)\n" "\n" @@ -1648,7 +1732,8 @@ "\t# BEGIN-block\n" "\n" -#: profile.c:1175 +#: profile.c:1211 +#, c-format msgid "" "\t# Rule(s)\n" "\n" @@ -1656,7 +1741,8 @@ "\t# Regel/regler\n" "\n" -#: profile.c:1181 +#: profile.c:1217 +#, c-format msgid "" "\t# END block(s)\n" "\n" @@ -1664,7 +1750,8 @@ "\t# END-block\n" "\n" -#: profile.c:1201 +#: profile.c:1237 +#, c-format msgid "" "\n" "\t# Functions, listed alphabetically\n" @@ -1672,90 +1759,91 @@ "\n" "\t# Funktioner, listade alfabetiskt\n" -#: profile.c:1413 +#: profile.c:1452 #, c-format msgid "unexpected type %s in prec_level" msgstr "oväntad typ %s i prec_level" -#: re.c:193 -#, c-format -msgid "regex match failed, not enough memory to match string \"%.*s%s\"" -msgstr "" -"regexmatchning misslyckades, inte tillräckligt mycket minne för att matcha " -"\"%.*s%s\"" - -#: regcomp.c:136 +#: regcomp.c:150 msgid "Success" msgstr "Lyckades" -#: regcomp.c:139 +#: regcomp.c:153 msgid "No match" msgstr "Misslyckades" -#: regcomp.c:142 +#: regcomp.c:156 msgid "Invalid regular expression" msgstr "Ogiltigt reguljärt uttryck" -#: regcomp.c:145 +#: regcomp.c:159 msgid "Invalid collation character" msgstr "Ogiltigt kollationeringstecken" -#: regcomp.c:148 +#: regcomp.c:162 msgid "Invalid character class name" msgstr "Ogiltigt teckenklassnamn" -#: regcomp.c:151 +#: regcomp.c:165 msgid "Trailing backslash" msgstr "Eftersläpande omvänt snedstreck" -#: regcomp.c:154 +#: regcomp.c:168 msgid "Invalid back reference" msgstr "Ogiltig bakåtrerefens" -#: regcomp.c:157 +#: regcomp.c:171 msgid "Unmatched [ or [^" msgstr "Obalanserad [ eller [^" -#: regcomp.c:160 +#: regcomp.c:174 msgid "Unmatched ( or \\(" msgstr "Obalanserad ( eller \\(" -#: regcomp.c:163 +#: regcomp.c:177 msgid "Unmatched \\{" msgstr "Obalanserad \\{" -#: regcomp.c:166 +#: regcomp.c:180 msgid "Invalid content of \\{\\}" msgstr "Ogiltigt innehåll i \\{\\}" -#: regcomp.c:169 +#: regcomp.c:183 msgid "Invalid range end" msgstr "Ogiltigt omfångsslut" -#: regcomp.c:172 +#: regcomp.c:186 msgid "Memory exhausted" msgstr "Minnet slut" -#: regcomp.c:175 +#: regcomp.c:189 msgid "Invalid preceding regular expression" msgstr "Ogiltigt föregående reguljärt uttryck" -#: regcomp.c:178 +#: regcomp.c:192 msgid "Premature end of regular expression" msgstr "För tidigt slut på reguljärt uttryck" -#: regcomp.c:181 +#: regcomp.c:195 msgid "Regular expression too big" msgstr "Reguljärt uttryck för stort" -#: regcomp.c:184 +#: regcomp.c:198 msgid "Unmatched ) or \\)" msgstr "Obalanserad ) eller \\)" -#: regcomp.c:621 +#: regcomp.c:668 msgid "No previous regular expression" msgstr "Inget föregående reguljärt uttryck" +#~ msgid "or used as a variable or an array" +#~ msgstr "eller använd som variabel eller vektor" + +#~ msgid "regex match failed, not enough memory to match string \"%.*s%s\"" +#~ msgstr "" +#~ "regexmatchning misslyckades, inte tillräckligt mycket minne för att " +#~ "matcha \"%.*s%s\"" + #~ msgid "substr: length %g is < 0" #~ msgstr "substr: längden %g är < 0" @@ -1794,9 +1882,6 @@ #~ msgid "or used in other expression context" #~ msgstr "eller använt i andra uttryckssammanhang" -#~ msgid "attempt to use function `%s' as array" -#~ msgstr "försök att använda funktionen \"%s\" som vektor" - #~ msgid "`%s' is a function, assignment is not allowed" #~ msgstr "\"%s\" är en funktion, tilldelning är inte tillåtet" diff -urN gawk-3.1.3/po/tr.po gawk-3.1.4/po/tr.po --- gawk-3.1.3/po/tr.po 2003-07-07 21:20:34.000000000 +0300 +++ gawk-3.1.4/po/tr.po 2004-07-28 16:55:29.000000000 +0300 @@ -1,13 +1,13 @@ # Turkish translations for GNU awk messages -# Copyright (C) 2003 Free Software Foundation, Inc. -# Nilgün Belma Bugüner , 2001, 2002, 2003. +# Copyright (C) 2004 Free Software Foundation, Inc. +# Nilgün Belma Bugüner , 2001, ..., 2004. # msgid "" msgstr "" -"Project-Id-Version: gawk 3.1.2g\n" +"Project-Id-Version: gawk 3.1.3l\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2003-07-07 11:20-0700\n" -"PO-Revision-Date: 2003-06-25 07:43+0300\n" +"POT-Creation-Date: 2004-07-15 13:02+0300\n" +"PO-Revision-Date: 2004-07-19 10:15+0300\n" "Last-Translator: Nilgün Belma Bugüner \n" "Language-Team: Turkish \n" "MIME-Version: 1.0\n" @@ -17,55 +17,60 @@ #: array.c:112 #, c-format +msgid "attempt to use function `%s' as an array" +msgstr "`%s' iÅŸlevi dizi olarak kullanılmaya çalışılıyor" + +#: array.c:115 +#, c-format msgid "attempt to use scalar parameter `%s' as an array" msgstr "sayısal paramaetre `%s' bir dizi olarak kullanılmaya çalışılıyor" -#: array.c:113 +#: array.c:118 #, c-format msgid "attempt to use scalar `%s' as array" msgstr "sayısal `%s' dizi olarak kullanılmaya çalışılıyor" -#: array.c:151 +#: array.c:156 #, c-format msgid "from %s" msgstr "%s'den" -#: array.c:506 +#: array.c:511 #, c-format msgid "reference to uninitialized element `%s[\"%s\"]'" msgstr "ilklendirilmemiÅŸ öğeye ( %s[\"%s\"] ) baÅŸvuru yapılıyor" -#: array.c:512 +#: array.c:517 #, c-format msgid "subscript of array `%s' is null string" msgstr "dizinin indisi `%s' bir null dizge" -#: array.c:609 +#: array.c:621 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: `%s' indeksi `%s' dizisinde deÄŸil" -#: array.c:769 +#: array.c:791 #, c-format msgid "%s: empty (null)\n" msgstr "%s: boÅŸ (null)\n" -#: array.c:774 +#: array.c:796 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: boÅŸ (sıfır)\n" -#: array.c:778 +#: array.c:800 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: tablo_uzunluÄŸu = %d, dizi_indisi = %d\n" -#: array.c:807 +#: array.c:829 #, c-format msgid "%s: is parameter\n" msgstr "%s: parametredir\n" -#: array.c:812 +#: array.c:834 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: %s için dizi baÅŸvurusu\n" @@ -89,476 +94,472 @@ msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "düzenli ifade sabiti `/%s/' bir C açıklaması gibi görünüyor ama deÄŸil" -#: awkgram.y:340 awkgram.y:615 +#: awkgram.y:341 awkgram.y:619 msgid "statement may have no effect" msgstr "deyim bir etkiye sahip olmayabilir" -#: awkgram.y:435 awkgram.y:455 +#: awkgram.y:436 awkgram.y:456 #, c-format msgid "`%s' used in %s action" msgstr "`%s' %s eyleminde kullanılmış" -#: awkgram.y:448 awkgram.y:451 +#: awkgram.y:449 awkgram.y:452 msgid "`nextfile' is a gawk extension" msgstr "`nextfile' bir gawk uzantısıdır" -#: awkgram.y:465 +#: awkgram.y:466 msgid "`return' used outside function context" msgstr "`return' iÅŸlev baÄŸlamının dışında kullanılmış" -#: awkgram.y:504 +#: awkgram.y:508 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "BEGIN veya END kuralındaki `print' aslında `print \"\"' olmalıydı" -#: awkgram.y:517 awkgram.y:524 +#: awkgram.y:521 awkgram.y:528 msgid "`delete array' is a gawk extension" msgstr "`delete array' bir gawk uzantısıdır" -#: awkgram.y:532 awkgram.y:539 +#: awkgram.y:536 awkgram.y:543 msgid "`delete(array)' is a non-portable tawk extension" msgstr "`delete array' uyarlanabilir olmayan bir gawk uzantısıdır" -#: awkgram.y:583 +#: awkgram.y:587 #, c-format msgid "duplicate case values in switch body: %s" msgstr "switch içinde yinelenmiÅŸ case deÄŸerleri var: %s" -#: awkgram.y:593 +#: awkgram.y:597 msgid "Duplicate `default' detected in switch body" msgstr "switch içinde yinelenmiÅŸ `default' saptandı" -#: awkgram.y:681 +#: awkgram.y:686 msgid "multistage two-way pipelines don't work" msgstr "çok katlı iki yönlü veriyolları çalışmaz" -#: awkgram.y:772 +#: awkgram.y:777 msgid "regular expression on right of assignment" msgstr "düzenli ifade atamanın sağında" -#: awkgram.y:782 +#: awkgram.y:800 msgid "regular expression on left of `~' or `!~' operator" msgstr "düzenli ifade `~' ya da `!~' iÅŸlemiminin solunda" -#: awkgram.y:790 +#: awkgram.y:808 msgid "regular expression on right of comparison" msgstr "düzenli ifade karşılaÅŸtırmanın sağında" -#: awkgram.y:857 +#: awkgram.y:875 msgid "non-redirected `getline' undefined inside END action" msgstr "END eyleminin içinde yönlendirme yapmayan `getline' tanımsız" -#: awkgram.y:884 +#: awkgram.y:902 msgid "call of `length' without parentheses is not portable" msgstr "parantezsiz `length' çaÄŸrısı taşınabilir deÄŸil" -#: awkgram.y:887 +#: awkgram.y:905 msgid "call of `length' without parentheses is deprecated by POSIX" msgstr "parantezsiz `length' çaÄŸrısı POSIX'e uygun deÄŸil" -#: awkgram.y:940 +#: awkgram.y:958 msgid "use of non-array as array" msgstr "dizi olmayan deÄŸiÅŸken dizi olarak kullanılmış" -#: awkgram.y:942 +#: awkgram.y:960 msgid "invalid subscript expression" msgstr "indis ifadesi geçersiz" -#: awkgram.y:1140 +#: awkgram.y:1158 msgid "unexpected newline or end of string" msgstr "beklenmeyen satırsonu ya da dizge sonu" -#: awkgram.y:1235 +#: awkgram.y:1254 msgid "empty program text on command line" msgstr "komut satırında boÅŸ program metni" -#: awkgram.y:1292 +#: awkgram.y:1307 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "kaynak dosyası `%s' okumak için açılamıyor (%s)" -#: awkgram.y:1327 +#: awkgram.y:1384 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "kaynak dosyası `%s' okunamıyor (%s)" -#: awkgram.y:1335 +#: awkgram.y:1392 #, c-format msgid "source file `%s' is empty" msgstr "kaynak dosyası `%s' boÅŸ" -#: awkgram.y:1537 awkgram.y:1647 awkgram.y:1665 awkgram.y:2015 awkgram.y:2100 +#: awkgram.y:1590 awkgram.y:1700 awkgram.y:1718 awkgram.y:2068 awkgram.y:2153 msgid "source file does not end in newline" msgstr "kaynak dosyasının sonunda satırsonu eksik" -#: awkgram.y:1601 +#: awkgram.y:1654 msgid "unterminated regexp ends with `\\' at end of file" msgstr "sonlandırılmamış düzenli ifade dosya sonunda `\\' ile bitiyor" -#: awkgram.y:1621 +#: awkgram.y:1674 msgid "unterminated regexp" msgstr "sonlandırılmamış düzenli ifade" -#: awkgram.y:1624 +#: awkgram.y:1677 msgid "unterminated regexp at end of file" msgstr "dosya sonunda sonlandırılmamış düzenli ifade" -#: awkgram.y:1691 +#: awkgram.y:1744 msgid "use of `\\ #...' line continuation is not portable" msgstr "`\\ #...' satır uzatma kullanımı taşınabilir deÄŸil" -#: awkgram.y:1703 +#: awkgram.y:1756 msgid "backslash not last character on line" msgstr "tersbölü satırdaki son karakter deÄŸil" -#: awkgram.y:1748 +#: awkgram.y:1801 msgid "POSIX does not allow operator `**='" msgstr "`**=' iÅŸlemimi POSIX uyumlu deÄŸil" -#: awkgram.y:1750 +#: awkgram.y:1803 msgid "old awk does not support operator `**='" msgstr "`**=' iÅŸlemimini eski awk desteklemiyor" -#: awkgram.y:1759 +#: awkgram.y:1812 msgid "POSIX does not allow operator `**'" msgstr "`**' iÅŸlemimi POSIX uyumlu deÄŸil" -#: awkgram.y:1761 +#: awkgram.y:1814 msgid "old awk does not support operator `**'" msgstr "`**' iÅŸlemimini eski awk desteklemiyor" -#: awkgram.y:1792 +#: awkgram.y:1845 msgid "operator `^=' is not supported in old awk" msgstr "`^=' iÅŸlemimini eski awk desteklemiyor" -#: awkgram.y:1800 +#: awkgram.y:1853 msgid "operator `^' is not supported in old awk" msgstr "`^' iÅŸlemimini eski awk desteklemiyor" -#: awkgram.y:1884 awkgram.y:1901 +#: awkgram.y:1937 awkgram.y:1954 msgid "unterminated string" msgstr "sonlandırılmamış dizge" -#: awkgram.y:2061 +#: awkgram.y:2114 #, c-format msgid "invalid char '%c' in expression" msgstr "ifade içinde '%c' karakteri geçersiz" -#: awkgram.y:2121 +#: awkgram.y:2162 #, c-format msgid "`%s' is a gawk extension" msgstr "`%s' bir gawk uzantısıdır" -#: awkgram.y:2124 +#: awkgram.y:2165 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "`%s' bir Bell Laboratuarları uzantısıdır" -#: awkgram.y:2127 +#: awkgram.y:2168 #, c-format msgid "POSIX does not allow `%s'" msgstr "`%s' POSIX uyumlu deÄŸil" -#: awkgram.y:2131 +#: awkgram.y:2172 #, c-format msgid "`%s' is not supported in old awk" msgstr "`%s' eski awk tarafından desteklemiyor" -#: awkgram.y:2158 +#: awkgram.y:2198 msgid "`goto' considered harmful!\n" msgstr "`goto' zararlı sayılır!\n" -#: awkgram.y:2220 +#: awkgram.y:2260 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d argüman sayısı olarak %s için geçersiz" -#: awkgram.y:2239 awkgram.y:2242 +#: awkgram.y:2279 awkgram.y:2282 msgid "match: third argument is a gawk extension" msgstr "match: üçüncü argüman bir gawk uzantısı" -#: awkgram.y:2255 +#: awkgram.y:2295 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "%s: yerine kullanılan son argüman olarak dizge sabiti etkisiz" -#: awkgram.y:2258 +#: awkgram.y:2298 #, c-format msgid "%s third parameter is not a changeable object" msgstr "üçüncü %s parametresi deÄŸiÅŸtirilebilir bir nesne deÄŸil" -#: awkgram.y:2285 awkgram.y:2288 +#: awkgram.y:2325 awkgram.y:2328 msgid "close: second argument is a gawk extension" msgstr "close: ikinci argüman bir gawk uzantısı" -#: awkgram.y:2298 +#: awkgram.y:2338 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "dcgettext(_\"...\") kullanımı yanlış: altçizgiyi kaldırın" -#: awkgram.y:2313 +#: awkgram.y:2353 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "dcngettext(_\"...\") kullanımı yanlış: altçizgiyi kaldırın" -#: awkgram.y:2384 +#: awkgram.y:2424 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "`%s' iÅŸlevi: %d. parametre, `%s', %d. parametrenin tekrarı" -#: awkgram.y:2417 +#: awkgram.y:2457 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "`%s' iÅŸlevi: parametre, `%s'global deÄŸiÅŸkeni gölgeliyor" -#: awkgram.y:2529 +#: awkgram.y:2569 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "`%s' yazmak için açılamadı (%s)" -#: awkgram.y:2530 profile.c:93 +#: awkgram.y:2570 profile.c:93 msgid "sending profile to standard error" msgstr "profil standart hataya gönderiliyor" -#: awkgram.y:2562 +#: awkgram.y:2602 #, c-format msgid "%s: close failed (%s)" msgstr "%s: kapatma baÅŸarısız (%s)" -#: awkgram.y:2684 +#: awkgram.y:2723 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() iki kere çaÄŸrıldı!" -#: awkgram.y:2711 +#: awkgram.y:2750 msgid "there were shadowed variables." msgstr "gölgeli deÄŸiÅŸkenler vardı." -#: awkgram.y:2784 +#: awkgram.y:2823 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "iÅŸlev `%s': iÅŸlev ismi parametre ismi olarak kullanılamaz" -#: awkgram.y:2794 +#: awkgram.y:2833 #, c-format msgid "function name `%s' previously defined" msgstr "iÅŸlev ismi `%s' önceden atanmış" -#: awkgram.y:2945 awkgram.y:2951 +#: awkgram.y:2984 awkgram.y:2990 #, c-format msgid "function `%s' called but never defined" msgstr "`%s' iÅŸlevi çaÄŸrıldı ama hiç atanmamış" -#: awkgram.y:2954 +#: awkgram.y:2993 #, c-format msgid "function `%s' defined but never called" msgstr "`%s' iÅŸlevi atanmış ama hiç çaÄŸrılmadı" -#: awkgram.y:2981 +#: awkgram.y:3020 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "%d numaralı argüman bir düzenli ifade sabiti" -#: awkgram.y:2994 +#: awkgram.y:3033 #, c-format msgid "" "function `%s' called with space between name and `(',\n" -"%s" +"or used as a variable or an array" msgstr "" "`%s' iÅŸlevi `(' ile isim arasında boÅŸlukla çaÄŸrılmış,\n" -"%s" +"ya da bir deÄŸiÅŸken veya bir dizi olarak kullanılmış" -#: awkgram.y:2996 -msgid "or used as a variable or an array" -msgstr "ya da bir deÄŸiÅŸken ya da dizi olarak kullanılmış" - -#: builtin.c:137 +#: builtin.c:149 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s \"%s\"ya yazılamadı (%s)" -#: builtin.c:138 +#: builtin.c:150 msgid "standard output" msgstr "standart çıktı" -#: builtin.c:139 +#: builtin.c:151 msgid "reason unknown" msgstr "sebebi bilinmiyor" -#: builtin.c:152 +#: builtin.c:164 msgid "exp: received non-numeric argument" msgstr "exp: sayısal olmayan argüman alındı" -#: builtin.c:158 +#: builtin.c:170 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: %g kapsamdışı" -#: builtin.c:216 +#: builtin.c:228 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" "fflush: kanala yazılamadı: veriyolu `%s' okumak için açıldı, yazmak için " "deÄŸil" -#: builtin.c:219 +#: builtin.c:231 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "" "fflush: kanala yazılamadı: dosya `%s' okumak için açıldı, yazmak için deÄŸil" -#: builtin.c:231 +#: builtin.c:243 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "fflush: `%s' bir açık dosya, veriyolu ya da bir yan iÅŸlem deÄŸil" -#: builtin.c:325 +#: builtin.c:338 msgid "index: received non-string first argument" msgstr "index: ilk argüman dizge olmayan türde alındı" -#: builtin.c:327 +#: builtin.c:340 msgid "index: received non-string second argument" msgstr "index: ikinci argüman dizge olmayan türde alındı" -#: builtin.c:437 +#: builtin.c:454 msgid "int: received non-numeric argument" msgstr "int: sayısal olmayan argüman alındı" -#: builtin.c:454 +#: builtin.c:471 msgid "length: received non-string argument" msgstr "length: dizge olmayan argüman alındı" -#: builtin.c:470 +#: builtin.c:487 msgid "log: received non-numeric argument" msgstr "log: sayısal olmayan argüman alındı" -#: builtin.c:473 +#: builtin.c:490 #, c-format msgid "log: received negative argument %g" msgstr "log: negatif argüman %g alındı" -#: builtin.c:635 builtin.c:638 +#: builtin.c:654 builtin.c:657 msgid "must use `count$' on all formats or none" msgstr "tüm biçemlerde ya `count$' kullanmalısınız ya da hiçbir ÅŸey" -#: builtin.c:740 +#: builtin.c:759 msgid "`$' is not permitted in awk formats" msgstr "`$' awk biçemlerde kullanılmaz" -#: builtin.c:746 +#: builtin.c:765 msgid "arg count with `$' must be > 0" msgstr "`$' ile birlikte verilen argüman sayısı > 0 olmalıdır" -#: builtin.c:748 +#: builtin.c:767 #, c-format msgid "arg count %ld greater than total number of supplied arguments" msgstr "argüman sayısı %ld saÄŸlanmış toplam argüman sayısından büyük" -#: builtin.c:750 +#: builtin.c:769 msgid "`$' not permitted after period in format" msgstr "`$' biçem içinde noktadan sonra kullanılmaz" -#: builtin.c:763 +#: builtin.c:782 msgid "no `$' supplied for positional field width or precision" msgstr "konumsal alan geniÅŸliÄŸi ya da duyarlığı için `$' kullanılmamış" -#: builtin.c:821 +#: builtin.c:848 msgid "`l' is meaningless in awk formats; ignored" msgstr "`l' awk biçemlerde anlamsız; yoksayıldı" -#: builtin.c:825 +#: builtin.c:852 msgid "`l' is not permitted in POSIX awk formats" msgstr "`l' POSIX awk biçemlerde kullanılmaz" -#: builtin.c:836 +#: builtin.c:863 msgid "`L' is meaningless in awk formats; ignored" msgstr "`L' awk biçemlerde anlamsız; yoksayıldı" -#: builtin.c:840 +#: builtin.c:867 msgid "`L' is not permitted in POSIX awk formats" msgstr "`L' POSIX awk biçemlerde kullanılmaz" -#: builtin.c:851 +#: builtin.c:878 msgid "`h' is meaningless in awk formats; ignored" msgstr "`h' awk biçemlerde anlamsız; yoksayıldı" -#: builtin.c:855 +#: builtin.c:882 msgid "`h' is not permitted in POSIX awk formats" msgstr "`h' POSIX awk biçemlerde kullanılmaz" -#: builtin.c:1055 +#: builtin.c:1111 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" msgstr "[s]printf: %g deÄŸeri `%%%c' biçimi için kapsamdışı" -#: builtin.c:1108 +#: builtin.c:1171 msgid "not enough arguments to satisfy format string" msgstr "biçem dizgesini oluÅŸturacak yeterli argüman yok" -#: builtin.c:1110 +#: builtin.c:1173 msgid "^ ran out for this one" msgstr "bir bunun için ^ tükendi" -#: builtin.c:1115 +#: builtin.c:1178 msgid "[s]printf: format specifier does not have control letter" msgstr "[s]printf: biçem belirteci denetim karakteri içermiyor" -#: builtin.c:1118 +#: builtin.c:1181 msgid "too many arguments supplied for format string" msgstr "biçem dizgesi için çok fazla argüman saÄŸlanmış" -#: builtin.c:1184 builtin.c:1187 +#: builtin.c:1247 builtin.c:1250 msgid "printf: no arguments" msgstr "printf: argüman yok" -#: builtin.c:1211 +#: builtin.c:1274 msgid "sqrt: received non-numeric argument" msgstr "sqrt: sayısal olmayan argüman alındı" -#: builtin.c:1215 +#: builtin.c:1278 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: negatif argüman %g ile çaÄŸrıldı" -#: builtin.c:1238 +#: builtin.c:1301 #, c-format msgid "substr: start index %g is invalid, using 1" msgstr "substr: baÅŸlangıç indeksi olarak %g geçersiz, 1 kullanılıyor" -#: builtin.c:1243 +#: builtin.c:1306 #, c-format msgid "substr: non-integer start index %g will be truncated" msgstr "" "substr: tamsayı olmayan baÅŸlangıç indeksi %g den ondalık kısım çıkarılacak" -#: builtin.c:1262 -#, fuzzy, c-format +#: builtin.c:1325 +#, c-format msgid "substr: length %g is not >= 1" -msgstr "substr: uzunluk %g <= 0 dır" +msgstr "substr: uzunluk %g >= 1 deÄŸil" -#: builtin.c:1264 -#, fuzzy, c-format +#: builtin.c:1327 +#, c-format msgid "substr: length %g is not >= 0" -msgstr "substr: uzunluk %g <= 0 dır" +msgstr "substr: uzunluk %g => 0 deÄŸil" -#: builtin.c:1271 +#: builtin.c:1334 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: tamsayı olmayan uzunluk %g den ondalık kısım çıkarılacak" -#: builtin.c:1276 +#: builtin.c:1339 #, c-format msgid "substr: length %g too big for string indexing, truncating to %g" msgstr "" "substr: dizge indislemesi için uzunluk olarak %g çok fazla, %g den sonrası " "gözardı ediliyor" -#: builtin.c:1288 +#: builtin.c:1351 msgid "substr: source string is zero length" msgstr "substr: kaynak dizge sıfır uzunlukta" -#: builtin.c:1294 +#: builtin.c:1357 #, c-format msgid "substr: start index %g is past end of string" msgstr "substr: baÅŸlangıç indisi %g dizgenin sonundan sonra" -#: builtin.c:1302 +#: builtin.c:1365 #, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" @@ -566,288 +567,309 @@ "substr: uzunluk %g, %g baÅŸlangıç indisinde ilk argümanın uzunluÄŸunu (%lu) " "aÅŸar" -#: builtin.c:1337 +#: builtin.c:1400 msgid "strftime: received non-string first argument" msgstr "strftime: ilk argüman dizge olmayan türde alındı" -#: builtin.c:1343 +#: builtin.c:1406 msgid "strftime: received empty format string" msgstr "strftime: boÅŸ biçem dizgesi alındı" -#: builtin.c:1352 +#: builtin.c:1415 msgid "strftime: received non-numeric second argument" msgstr "strftime: ikinci argüman sayısal olmayan türde alındı" -#: builtin.c:1415 +#: builtin.c:1478 msgid "mktime: received non-string argument" msgstr "mktime: dizge olmayan argüman alındı" -#: builtin.c:1460 +#: builtin.c:1523 msgid "system: received non-string argument" msgstr "system: dizge olmayan argüman alındı" -#: builtin.c:1581 eval.c:1883 +#: builtin.c:1644 eval.c:2019 #, c-format msgid "reference to uninitialized field `$%d'" msgstr "ilklendirilmemiÅŸ `$%d' alanına baÅŸvuru" -#: builtin.c:1608 +#: builtin.c:1671 msgid "tolower: received non-string argument" msgstr "tolower: dizge olmayan argüman alındı" -#: builtin.c:1657 +#: builtin.c:1720 msgid "toupper: received non-string argument" msgstr "toupper: dizge olmayan argüman alındı" -#: builtin.c:1702 +#: builtin.c:1765 msgid "atan2: received non-numeric first argument" msgstr "atan2: ilk argüman sayısal olmayan türde alındı" -#: builtin.c:1704 +#: builtin.c:1767 msgid "atan2: received non-numeric second argument" msgstr "atan2: ikinci argüman sayısal olmayan türde alındı" -#: builtin.c:1723 +#: builtin.c:1786 msgid "sin: received non-numeric argument" msgstr "sin: sayısal olmayan argüman alındı" -#: builtin.c:1739 +#: builtin.c:1802 msgid "cos: received non-numeric argument" msgstr "cos: sayısal olmayan argüman alındı" -#: builtin.c:1788 +#: builtin.c:1852 msgid "srand: received non-numeric argument" msgstr "srand: sayısal olmayan argüman alındı" -#: builtin.c:1823 +#: builtin.c:1887 msgid "match: third argument is not an array" msgstr "match: üçüncü argüman bir dizi deÄŸil" -#: builtin.c:2307 +#: builtin.c:2414 msgid "gensub: third argument of 0 treated as 1" msgstr "gensub: 0 olan 3. argüman 1 kabul edildi" -#: builtin.c:2416 builtin.c:2418 +#: builtin.c:2572 msgid "lshift: received non-numeric first argument" msgstr "lshift: ilk argüman sayısal olmayan türde alındı" -#: builtin.c:2420 +#: builtin.c:2574 +msgid "lshift: received non-numeric second argument" +msgstr "lshift: ikinci argüman sayısal deÄŸil" + +#: builtin.c:2580 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "lshift(%lf, %lf): negatif deÄŸerler tuhaf sonuçlar verecek" -#: builtin.c:2422 +#: builtin.c:2582 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): tamsayı kısım kalacak ÅŸekilde kalanı atılacak" -#: builtin.c:2424 +#: builtin.c:2584 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "lshift(%lf, %lf): çok büyük kaydırma deÄŸeri tuhaf sonuçlar verecek" -#: builtin.c:2453 builtin.c:2455 +#: builtin.c:2610 msgid "rshift: received non-numeric first argument" msgstr "rshift: ilk argüman sayısal olmayan türde alındı" -#: builtin.c:2457 +#: builtin.c:2612 +msgid "rshift: received non-numeric second argument" +msgstr "rshift: ikinci argüman sayısal deÄŸil" + +#: builtin.c:2618 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "rshift(%lf, %lf): negatif deÄŸerler tuhaf sonuçlar verecek" -#: builtin.c:2459 +#: builtin.c:2620 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): tamsayı kısım kalacak ÅŸekilde kalanı atılacak" -#: builtin.c:2461 +#: builtin.c:2622 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "rshift(%lf, %lf): çok büyük kaydırma deÄŸeri tuhaf sonuçlar verecek" -#: builtin.c:2490 builtin.c:2492 +#: builtin.c:2648 msgid "and: received non-numeric first argument" msgstr "and: ilk argüman sayısal olmayan türde alındı" -#: builtin.c:2494 +#: builtin.c:2650 +msgid "and: received non-numeric second argument" +msgstr "and: ikinci argüman sayısal deÄŸil" + +#: builtin.c:2656 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "and(%lf, %lf): negatif deÄŸerler tuhaf sonuçlar verecek" -#: builtin.c:2496 +#: builtin.c:2658 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): tamsayı kısım kalacak ÅŸekilde kalanı atılacak" -#: builtin.c:2525 builtin.c:2527 +#: builtin.c:2684 msgid "or: received non-numeric first argument" msgstr "or: ilk argüman sayısal olmayan türde alındı" -#: builtin.c:2529 +#: builtin.c:2686 +msgid "or: received non-numeric second argument" +msgstr "or: ikinci argüman sayısal deÄŸil" + +#: builtin.c:2692 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "or(%lf, %lf): negatif deÄŸerler tuhaf sonuçlar verecek" -#: builtin.c:2531 +#: builtin.c:2694 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): tamsayı kısım kalacak ÅŸekilde kalanı atılacak" -#: builtin.c:2560 builtin.c:2562 +#: builtin.c:2720 msgid "xor: received non-numeric first argument" msgstr "xor: ilk argüman sayısal olmayan türde alındı" -#: builtin.c:2564 +#: builtin.c:2722 +msgid "xor: received non-numeric second argument" +msgstr "xor: ikinci argüman sayısal deÄŸil" + +#: builtin.c:2728 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "xor(%lf, %lf): negatif deÄŸerler tuhaf sonuçlar verecek" -#: builtin.c:2566 +#: builtin.c:2730 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): tamsayı kısım kalacak ÅŸekilde kalanı atılacak" -#: builtin.c:2594 +#: builtin.c:2754 msgid "compl: received non-numeric argument" msgstr "compl: sayısal olmayan argüman alındı" -#: builtin.c:2596 +#: builtin.c:2760 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): negatif deÄŸerler tuhaf sonuçlar verecek" -#: builtin.c:2598 +#: builtin.c:2762 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): tamsayı kısım kalacak ÅŸekilde kalanı atılacak" -#: builtin.c:2771 +#: builtin.c:2935 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: `%s' geçerli bir yerel kategori deÄŸil" -#: eval.c:266 +#: eval.c:303 #, c-format msgid "unknown nodetype %d" msgstr "%d. düğümtürü bilinmiyor" -#: eval.c:312 +#: eval.c:350 msgid "buffer overflow in genflags2str" msgstr "genflags2str içinde tampon taÅŸtı" -#: eval.c:647 +#: eval.c:382 eval.c:388 profile.c:837 +#, c-format +msgid "attempt to use array `%s' in a scalar context" +msgstr "`%s' dizisi bir sayısal baÄŸlamda kullanılmaya çalışılıyor" + +#: eval.c:730 #, c-format msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" "for loop: `%s' dizisinin boyu döngünün yorumlanması sırasında %ld iken %ld " "oldu" -#: eval.c:668 +#: eval.c:751 msgid "`break' outside a loop is not portable" msgstr "döngü dışında `break' kullanımı taşınabilir deÄŸil" -#: eval.c:672 +#: eval.c:755 msgid "`break' outside a loop is not allowed" msgstr "döngü dışında `break' kullanımı yasak" -#: eval.c:689 +#: eval.c:772 msgid "`continue' outside a loop is not portable" msgstr "döngü dışında `continue' kullanımı taşınabilir deÄŸil" -#: eval.c:693 +#: eval.c:776 msgid "`continue' outside a loop is not allowed" msgstr "döngü dışında `continue' kullanımı yasak" -#: eval.c:727 +#: eval.c:810 msgid "`next' cannot be called from a BEGIN rule" msgstr "`next' bir BEGIN kuralından çaÄŸrılamaz" -#: eval.c:729 +#: eval.c:812 msgid "`next' cannot be called from an END rule" msgstr "`next' bir END kuralından çaÄŸrılamaz" -#: eval.c:738 +#: eval.c:821 msgid "`nextfile' cannot be called from a BEGIN rule" msgstr "`nextfile' bir BEGIN kuralından çaÄŸrılamaz" -#: eval.c:740 +#: eval.c:823 msgid "`nextfile' cannot be called from an END rule" msgstr "`nextfile' bir END kuralından çaÄŸrılamaz" -#: eval.c:785 +#: eval.c:872 msgid "statement has no effect" msgstr "deyim etkisiz" -#: eval.c:828 eval.c:1726 +#: eval.c:915 eval.c:1873 #, c-format msgid "can't use function name `%s' as variable or array" msgstr "`%s' iÅŸlev ismi bir deÄŸiÅŸken ya da dizi olarak kullanılamaz" -#: eval.c:835 eval.c:841 +#: eval.c:922 eval.c:928 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "baÅŸlangıç deÄŸeri olmayan `%s' argümanına baÅŸvuru" -#: eval.c:848 eval.c:907 eval.c:1732 eval.c:1742 profile.c:807 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "`%s' dizisi bir sayısal baÄŸlamda kullanılmaya çalışılıyor" - -#: eval.c:858 eval.c:1752 +#: eval.c:937 eval.c:1882 #, c-format msgid "reference to uninitialized variable `%s'" msgstr "öndeÄŸer ataması yapılmamış `%s' deÄŸiÅŸkenine baÅŸvuru" -#: eval.c:1007 +#: eval.c:1083 msgid "" "concatenation: side effects in one expression have changed the length of " "another!" msgstr "" "bitiÅŸtirme: bir ifadenin yan etkileri diÄŸerinin uzunluÄŸunu deÄŸiÅŸtirmiÅŸ!" -#: eval.c:1032 +#: eval.c:1162 msgid "assignment used in conditional context" msgstr "koÅŸul baÄŸlamında atama yapılmış" -#: eval.c:1122 +#: eval.c:1252 msgid "division by zero attempted" msgstr "sıfırla bölme hatası" -#: eval.c:1137 +#: eval.c:1267 #, c-format msgid "division by zero attempted in `%%'" msgstr "`%%'de sıfırla bölme hatası" -#: eval.c:1152 profile.c:683 +#: eval.c:1282 profile.c:713 #, c-format msgid "illegal type (%s) in tree_eval" msgstr "tree_eval içinde kuraldışı tür (%s)" -#: eval.c:1328 +#: eval.c:1459 msgid "division by zero attempted in `/='" msgstr "`/='de sıfırla bölme hatası" -#: eval.c:1346 +#: eval.c:1477 #, c-format msgid "division by zero attempted in `%%='" msgstr "`%%='de sıfırla bölme hatası" -#: eval.c:1586 +#: eval.c:1738 #, c-format msgid "function `%s' called with more arguments than declared" msgstr "`%s' iÅŸlevi bildirilenden daha fazla argümanla çaÄŸrıldı" -#: eval.c:1633 +#: eval.c:1782 #, c-format msgid "function `%s' not defined" msgstr "`%s' iÅŸlevi tanımsız" -#: eval.c:1639 +#: eval.c:1788 #, c-format msgid "function %s called\n" msgstr "%s iÅŸlevi çaÄŸrıldı\n" -#: eval.c:1698 +#: eval.c:1845 +#, c-format msgid "" "\n" "\t# Function Call Stack:\n" @@ -857,41 +879,42 @@ "\t# Ä°ÅŸlev ÇaÄŸrı Yığını:\n" "\n" -#: eval.c:1701 +#: eval.c:1848 +#, c-format msgid "\t# -- main --\n" msgstr "\t# -- main --\n" -#: eval.c:1867 +#: eval.c:2003 msgid "attempt to field reference from non-numeric value" msgstr "sayısal olmayan deÄŸerden alan baÅŸvurusu" -#: eval.c:1869 +#: eval.c:2005 msgid "attempt to reference from null string" msgstr "null dizgeden alan baÅŸvurusu" -#: eval.c:1875 +#: eval.c:2011 #, c-format msgid "attempt to access field %d" msgstr "%d. alana eriÅŸilmeye çalışılıyor" -#: eval.c:1896 eval.c:1903 profile.c:900 +#: eval.c:2032 eval.c:2039 profile.c:934 msgid "assignment is not allowed to result of builtin function" msgstr "deÄŸiÅŸken ismine yerleÅŸik iÅŸlevin sonucu atanamaz" -#: eval.c:1951 +#: eval.c:2103 msgid "`IGNORECASE' is a gawk extension" msgstr "`IGNORECASE' bir gawk uzantısıdır" -#: eval.c:1980 +#: eval.c:2133 msgid "`BINMODE' is a gawk extension" msgstr "`BINMODE' bir gawk uzantısıdır" -#: eval.c:2092 +#: eval.c:2255 #, c-format msgid "bad `%sFMT' specification `%s'" msgstr "`%sFMT' özelliÄŸi `%s' hatalı" -#: eval.c:2170 +#: eval.c:2333 msgid "turning off `--lint' due to assignment to `LINT'" msgstr "`LINT' atamasından dolayı `--lint' kapatılıyor" @@ -909,7 +932,60 @@ msgid "extension: library `%s': cannot call function `%s' (%s)\n" msgstr "extension: kitaplık `%s': `%s' iÅŸlevi çaÄŸrılamıyor (%s)\n" -#: ext.c:183 +#: ext.c:102 +msgid "extension: missing function name" +msgstr "extension: iÅŸlev ismi eksik" + +#: ext.c:107 +#, c-format +msgid "extension: illegal character `%c' in function name `%s'" +msgstr "extension: `%2$s' iÅŸlevindeki `%1$c' karakteri kuraldışı" + +#: ext.c:113 +#, c-format +msgid "extension: can't redefine function `%s'" +msgstr "extension: `%s' iÅŸlevi yeniden tanımlanamaz" + +#: ext.c:117 +#, c-format +msgid "extension: function `%s' already defined" +msgstr "extension: `%s' iÅŸlevi zaten tanımlı" + +#: ext.c:122 +#, c-format +msgid "extension: can't use gawk built-in `%s' as function name" +msgstr "extension: bir gawk yerleÅŸiÄŸi olan `%s' iÅŸlev ismi olamaz" + +#: ext.c:124 +#, c-format +msgid "extension: function name `%s' previously defined" +msgstr "extension: iÅŸlev ismi `%s' evvelce tanımlanmış" + +#: ext.c:201 +#, c-format +msgid "function `%s' defined to take no more than `%d' argument(s)" +msgstr "`%s' iÅŸlevi en çok `%d' argüman alabilecek ÅŸekilde tanımlı" + +#: ext.c:204 +#, c-format +msgid "function `%s': missing argument #%d" +msgstr "`%s' iÅŸlevi: %d. argüman eksik" + +#: ext.c:214 +#, c-format +msgid "function `%s': argument #%d: attempt to use scalar as an array" +msgstr "" +"`%s' iÅŸlevi: %d. argüman: tek deÄŸerli deÄŸiÅŸken bir dizi olarak kullanılmaya " +"çalışılıyor" + +#: ext.c:218 +#, c-format +msgid "function `%s': argument #%d: attempt to use array as a scalar" +msgstr "" +"`%s' iÅŸlevi: %d. argüman: dizi tek deÄŸerli bir deÄŸiÅŸken olarak kullanılmaya " +"çalışılıyor" + +#: ext.c:243 msgid "Operation Not Supported" msgstr "Ä°ÅŸlem Desteklenmiyor" @@ -938,526 +1014,526 @@ msgid "null string for `FS' is a gawk extension" msgstr "`FS' için null dizge bir gawk uzantısıdır" -#: getopt.c:692 getopt.c:704 +#: getopt.c:692 getopt.c:711 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s: `%s' seçeneÄŸi belirsiz\n" -#: getopt.c:737 getopt.c:741 +#: getopt.c:744 getopt.c:748 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "%s: `--%s' seçeneÄŸi argümansız kullanılır\n" -#: getopt.c:750 getopt.c:755 +#: getopt.c:757 getopt.c:762 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "%s: seçenek `%c%s' argümansız kullanılır\n" -#: getopt.c:791 getopt.c:804 getopt.c:1093 getopt.c:1106 +#: getopt.c:807 getopt.c:829 getopt.c:1159 getopt.c:1181 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "%s: `%s' seçeneÄŸi bir argümanla kullanılır\n" -#: getopt.c:842 getopt.c:845 +#: getopt.c:867 getopt.c:870 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s: `--%s' seçeneÄŸi bilinmiyor\n" -#: getopt.c:853 getopt.c:856 +#: getopt.c:878 getopt.c:881 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s: `%c%s' seçeneÄŸi bilinmiyor\n" -#: getopt.c:903 getopt.c:906 +#: getopt.c:936 getopt.c:939 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: kuraldışı seçenek -- %c\n" -#: getopt.c:912 getopt.c:915 +#: getopt.c:945 getopt.c:948 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s: geçersiz seçenek -- %c\n" -#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:434 +#: getopt.c:1003 getopt.c:1022 getopt.c:1234 getopt.c:1255 main.c:433 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: seçenek bir argümanla kullanılır -- %c\n" -#: getopt.c:1025 getopt.c:1036 +#: getopt.c:1074 getopt.c:1093 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s: `-W %s' seçeneÄŸi belirsiz\n" -#: getopt.c:1060 getopt.c:1072 +#: getopt.c:1117 getopt.c:1138 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: `-W %s' seçeneÄŸi argümansız kullanılır\n" -#: io.c:305 +#: io.c:308 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "`%s' okumak için açılamıyor (%s)" -#: io.c:392 +#: io.c:395 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "dosya tanımlayıcı %d (`%s') baÅŸarısız (%s)" -#: io.c:530 +#: io.c:533 #, c-format msgid "invalid tree type %s in redirect()" msgstr "redirect() içindeki aÄŸaç türü %s geçersiz" -#: io.c:536 +#: io.c:539 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "`%s' yönlendirmesi içindeki ifade sadece sayısal deÄŸer içeriyor" -#: io.c:542 +#: io.c:545 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "`%s' yönlendirmesi içindeki ifade null dizge deÄŸeri içeriyor" -#: io.c:547 +#: io.c:550 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "`%s' dosya ismi (`%s' yönlendirmesi için) mantıksal ifadenin sonucu olabilir" -#: io.c:569 +#: io.c:588 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "`%.*s' dosyası için `>' ve `>>' karışımı gereksiz" -#: io.c:621 +#: io.c:640 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "`%s' veriyolu çıktı için açılamadı (%s)" -#: io.c:630 +#: io.c:649 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "`%s' veriyolu girdi için açılamadı (%s)" -#: io.c:643 +#: io.c:662 #, c-format msgid "can't open two way socket `%s' for input/output (%s)" msgstr "iki yönlü `%s' soketi G/Ç için açılamıyor (%s)" -#: io.c:647 +#: io.c:666 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "iki yönlü `%s' veriyolu G/Ç için açılamıyor (%s)" -#: io.c:723 +#: io.c:742 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "`%s'den yönlendirilemiyor (%s)" -#: io.c:726 +#: io.c:745 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "`%s'e yönlendirilemiyor (%s)" -#: io.c:765 +#: io.c:784 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "açık dosyalar için sistem sınırı aşıldı: çoÄŸul dosya tanımlayıcılara " "baÅŸlarken" -#: io.c:777 +#: io.c:800 #, c-format msgid "close of `%s' failed (%s)." msgstr "`%s' kapatılamadı (%s)." -#: io.c:784 +#: io.c:808 msgid "too many pipes or input files open" msgstr "çok fazla veriyolu ya da dosya açık" -#: io.c:807 +#: io.c:831 msgid "close: second argument must be `to' or `from'" msgstr "close: ikinci argüman `to' ya da `from' olmalı" -#: io.c:821 +#: io.c:845 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "close: `%.*s' bir açık dosya, veriyolu ya da alt-iÅŸlem deÄŸil" -#: io.c:825 +#: io.c:849 msgid "close of redirection that was never opened" msgstr "hiç açılmamış bir yönlendirmenin kapatılması" -#: io.c:862 +#: io.c:945 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: `%s' yönlendirmesi bir `|&' ile açılmamış, ikinci argüman yoksayıldı" -#: io.c:924 +#: io.c:960 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "baÅŸarısızlık durumu (%d): `%s' veriyolunun kapatılması (%s)" -#: io.c:927 +#: io.c:963 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "baÅŸarısızlık durumu (%d): `%s' dosyasının kapatılması (%s)" -#: io.c:946 +#: io.c:983 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "`%s' soketinin açıkça kapatılması istenmedi" -#: io.c:949 +#: io.c:986 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "`%s' alt-iÅŸleminin açıkça kapatılması istenmedi" -#: io.c:952 +#: io.c:989 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "`%s' veriyolunun açıkça kapatılması istenmedi" -#: io.c:955 +#: io.c:992 #, c-format msgid "no explicit close of file `%s' provided" msgstr "`%s' dosyasının açıkça kapatılması istenmedi" -#: io.c:984 io.c:1038 +#: io.c:1021 io.c:1075 #, c-format msgid "error writing standard output (%s)" msgstr "standart çıktıya yazarken hata (%s)" -#: io.c:988 io.c:1042 +#: io.c:1025 io.c:1079 #, c-format msgid "error writing standard error (%s)" msgstr "standart hataya yazarken hata (%s)" -#: io.c:996 +#: io.c:1033 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "`%s'in veriyolu ile veri aktarımı baÅŸarısız (%s)." -#: io.c:999 +#: io.c:1036 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "`%s'e veriyolunun alt-iÅŸlemi ile veri aktarımı baÅŸarısız (%s)." -#: io.c:1002 +#: io.c:1039 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "`%s'in dosya ile veri aktarımı baÅŸarısız (%s)." -#: io.c:1161 +#: io.c:1198 msgid "/inet/raw client not ready yet, sorry" msgstr "/inet/raw istemci henüz hazır deÄŸil" -#: io.c:1163 io.c:1200 +#: io.c:1200 io.c:1237 msgid "only root may use `/inet/raw'." msgstr "`/inet/raw' sadece root tarafından kullanılabilir" -#: io.c:1198 +#: io.c:1235 msgid "/inet/raw server not ready yet, sorry" msgstr "/inet/raw sunucu henüz hazır deÄŸil" -#: io.c:1288 +#: io.c:1325 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "özel dosya ismi `%s' içinde (bilinen) bir protokol saÄŸlanmamış" -#: io.c:1306 +#: io.c:1343 #, c-format msgid "special file name `%s' is incomplete" msgstr "özel dosya ismi `%s' tamamlanmamış" -#: io.c:1318 +#: io.c:1355 #, c-format msgid "local port invalid in `%s'" msgstr "`%s' deki yerel port geçersiz" -#: io.c:1330 +#: io.c:1367 msgid "must supply a remote hostname to `/inet'" msgstr "`/inet' e bir karşı makina ismi saÄŸlanmalı" -#: io.c:1345 +#: io.c:1382 msgid "must supply a remote port to `/inet'" msgstr "`/inet' e bir karşı port saÄŸlanmalı" -#: io.c:1351 +#: io.c:1388 #, c-format msgid "remote port invalid in `%s'" msgstr "`%s' de karşı port geçersiz" -#: io.c:1361 +#: io.c:1398 msgid "TCP/IP communications are not supported" msgstr "TCP/IP haberleÅŸmesi desteklenmiyor" -#: io.c:1370 io.c:1551 +#: io.c:1407 io.c:1588 #, c-format msgid "file `%s' is a directory" msgstr "`%s' dosya deÄŸil dizin" -#: io.c:1440 +#: io.c:1477 #, c-format msgid "use `PROCINFO[\"%s\"]' instead of `%s'" msgstr "`PROCINFO[\"%s\"]' kullanın (`%s' yerine)" -#: io.c:1472 +#: io.c:1509 msgid "use `PROCINFO[...]' instead of `/dev/user'" msgstr "`/dev/user' yerine `PROCINFO[...]' kullanın" -#: io.c:1537 io.c:1711 +#: io.c:1574 io.c:1748 #, c-format msgid "could not open `%s', mode `%s'" msgstr "`%s', `%s' kipinde açılamadı" -#: io.c:1762 +#: io.c:1799 #, c-format msgid "close of master pty failed (%s)" msgstr "ana pty kapatılamadı (%s)" -#: io.c:1764 io.c:1916 io.c:2068 +#: io.c:1801 io.c:1953 io.c:2105 #, c-format msgid "close of stdout in child failed (%s)" msgstr "ast süreçte stdÇ kapatılamadı (%s)" -#: io.c:1767 +#: io.c:1804 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "ast süreçte yardımcı pty standart çıktıya taşınamadı (dup: %s)" -#: io.c:1769 io.c:1921 +#: io.c:1806 io.c:1958 #, c-format msgid "close of stdin in child failed (%s)" msgstr "ast süreçte stdG kapatılamadı (%s)" -#: io.c:1772 +#: io.c:1809 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "ast süreçte yardımcı pty standart girdiye taşınamadı (dup: %s)" -#: io.c:1774 io.c:1793 +#: io.c:1811 io.c:1830 #, c-format msgid "close of slave pty failed (%s)" msgstr "yardımcı pty kapatılamadı (%s)" -#: io.c:1867 io.c:1919 io.c:2049 io.c:2071 +#: io.c:1904 io.c:1956 io.c:2086 io.c:2108 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "ast süreçte veriyolu standart çıktıya taşınamadı (dup: %s)" -#: io.c:1871 io.c:1924 +#: io.c:1908 io.c:1961 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "ast süreçte veriyolu standart girdiye taşınamadı (dup: %s)" -#: io.c:1888 io.c:2062 +#: io.c:1925 io.c:2099 msgid "restoring stdout in parent process failed\n" msgstr "üst süreçte stdÇ eski durumuna getirilemedi\n" -#: io.c:1893 +#: io.c:1930 msgid "restoring stdin in parent process failed\n" msgstr "üst süreçte stdG eski durumuna getirilemedi\n" -#: io.c:1927 io.c:2073 io.c:2084 +#: io.c:1964 io.c:2110 io.c:2121 #, c-format msgid "close of pipe failed (%s)" msgstr "veriyolu kapatılamadı (%s)" -#: io.c:1972 +#: io.c:2009 msgid "`|&' not supported" msgstr "`|&' desteklenmiyor" -#: io.c:2039 +#: io.c:2076 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "`%s' veriyolu açılamıyor (%s)" -#: io.c:2080 +#: io.c:2117 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "`%s' için ast süreç oluÅŸturulamıyor (fork: %s)" -#: io.c:2423 +#: io.c:2460 #, c-format msgid "data file `%s' is empty" msgstr "veri dosyası `%s' boÅŸ" -#: io.c:2466 io.c:2474 +#: io.c:2503 io.c:2511 msgid "could not allocate more input memory" msgstr "daha fazla girdi belleÄŸi ayrılamadı" -#: io.c:2832 io.c:2895 +#: io.c:2869 io.c:2932 #, c-format msgid "error reading input file `%s': %s" msgstr "`%s' girdi dosyası okunurken hata: %s" -#: io.c:3020 +#: io.c:3057 msgid "multicharacter value of `RS' is a gawk extension" msgstr "`RS' çoklu karakter deÄŸeri bir gawk uzantısıdır" -#: main.c:324 +#: main.c:323 msgid "`-m[fr]' option irrelevant in gawk" msgstr "`-m[fr]' seçeneÄŸi gawk'da böyle kullanılmaz" -#: main.c:326 +#: main.c:325 msgid "-m option usage: `-m[fr] nnn'" msgstr "-m seçeneÄŸinin kullanımı: `-m[fr] nnn'" -#: main.c:343 +#: main.c:342 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: `-W %s' seçeneÄŸi tanımlı deÄŸil, yok sayıldı\n" -#: main.c:380 +#: main.c:379 msgid "empty argument to `--source' ignored" msgstr "`--source' seçeneÄŸi için boÅŸ argüman yoksayıldı" -#: main.c:451 +#: main.c:450 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "ortam deÄŸiÅŸkeni `POSIXLY_CORRECT' var: `--posix' kullanılıyor" -#: main.c:456 +#: main.c:455 msgid "`--posix' overrides `--traditional'" msgstr "`--posix' seçeneÄŸi `--traditional' seçeneÄŸini etkisiz kılar" -#: main.c:467 +#: main.c:466 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "" "`--posix'/`--traditional' seçenekleri `--non-decimal-data' seçeneÄŸini " "etkisiz kılar" -#: main.c:471 +#: main.c:470 #, c-format msgid "running %s setuid root may be a security problem" msgstr "%s root yetkileriyle çalıştırıldığında güvenlik sorunları olabilir" -#: main.c:512 +#: main.c:511 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "standart girdi ikilik kipe ayarlanamaz (%s)" -#: main.c:515 +#: main.c:514 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "standart çıktı ikilik kipe ayarlanamaz (%s)" -#: main.c:517 +#: main.c:516 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "standart hata ikilik kipe ayarlanamaz (%s)" -#: main.c:547 +#: main.c:546 msgid "no program text at all!" msgstr "program metni hiç yok!" -#: main.c:620 +#: main.c:623 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "" "Kullanımı: %s [POSIX veya GNU tarzı seçenekler] -f progdosyası [--] " "dosya ...\n" -#: main.c:622 +#: main.c:625 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "" "Kullanımı: %s [POSIX veya GNU tarzı seçenekler] %cprogram%c dosya ...\n" -#: main.c:627 +#: main.c:630 msgid "POSIX options:\t\tGNU long options:\n" msgstr "POSIX seçenekleri: GNU uzun seçenekleri:\n" -#: main.c:628 +#: main.c:631 msgid "\t-f progfile\t\t--file=progfile\n" msgstr " -f progDosyası --file=progDosyası\n" -#: main.c:629 +#: main.c:632 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr " -F ayraç --field-separator=ayraç\n" -#: main.c:630 +#: main.c:633 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr " -v var=deÄŸer --assign=var=deÄŸer\n" -#: main.c:631 +#: main.c:634 msgid "\t-m[fr] val\n" msgstr " -m[fr] deÄŸer\n" -#: main.c:632 +#: main.c:635 msgid "\t-W compat\t\t--compat\n" msgstr " -W compat --compat\n" -#: main.c:633 +#: main.c:636 msgid "\t-W copyleft\t\t--copyleft\n" msgstr " -W copyleft --copyleft\n" -#: main.c:634 +#: main.c:637 msgid "\t-W copyright\t\t--copyright\n" msgstr " -W copyright --copyright\n" -#: main.c:635 +#: main.c:638 msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" msgstr " -W dump-variables[=dosya] --dump-variables[=dosya]\n" -#: main.c:636 +#: main.c:639 msgid "\t-W gen-po\t\t--gen-po\n" msgstr " -W gen-po --gen-po\n" -#: main.c:637 +#: main.c:640 msgid "\t-W help\t\t\t--help\n" msgstr " -W help --help\n" -#: main.c:638 +#: main.c:641 msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" msgstr " -W lint[=ölümcül] --lint[=ölümcül]\n" -#: main.c:639 +#: main.c:642 msgid "\t-W lint-old\t\t--lint-old\n" msgstr " -W lint-old --lint-old\n" -#: main.c:640 +#: main.c:643 msgid "\t-W non-decimal-data\t--non-decimal-data\n" msgstr " -W non-decimal-data --non-decimal-data\n" -#: main.c:642 +#: main.c:645 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr " -W nostalgia --nostalgia\n" -#: main.c:645 +#: main.c:648 msgid "\t-W parsedebug\t\t--parsedebug\n" msgstr " -W parsedebug --parsedebug\n" -#: main.c:647 +#: main.c:650 msgid "\t-W profile[=file]\t--profile[=file]\n" msgstr " -W profile[=dosya] --profile[=dosya]\n" -#: main.c:648 +#: main.c:651 msgid "\t-W posix\t\t--posix\n" msgstr " -W posix --posix\n" -#: main.c:649 +#: main.c:652 msgid "\t-W re-interval\t\t--re-interval\n" msgstr " -W re-interval --re-interval\n" -#: main.c:650 +#: main.c:653 msgid "\t-W source=program-text\t--source=program-text\n" msgstr " -W source=program-metni --source=program-metni\n" -#: main.c:651 +#: main.c:654 msgid "\t-W traditional\t\t--traditional\n" msgstr " -W traditional --traditional\n" -#: main.c:652 +#: main.c:655 msgid "\t-W usage\t\t--usage\n" msgstr " -W usage --usage\n" -#: main.c:653 +#: main.c:656 msgid "\t-W version\t\t--version\n" msgstr " -W version --version\n" -#: main.c:657 +#: main.c:660 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1471,7 +1547,7 @@ "Çeviri hatalarını adresine bildiriniz.\n" "\n" -#: main.c:661 +#: main.c:664 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -1481,7 +1557,7 @@ "Öntanımlı olarak standart girdiyi okur ve standart çıktıya yazar.\n" "\n" -#: main.c:665 +#: main.c:668 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -1491,7 +1567,7 @@ "\tgawk '{ sum += $1 }; END { print sum }' dosya\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:682 +#: main.c:685 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1510,7 +1586,7 @@ "üzerinde deÄŸiÅŸiklik yapabilirsiniz.\n" "\n" -#: main.c:690 +#: main.c:693 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -1524,7 +1600,7 @@ "edinmek için GNU Genel Kamu Lisansına bakınız.\n" "\n" -#: main.c:696 +#: main.c:699 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, write to the Free Software\n" @@ -1534,11 +1610,11 @@ "olacaksınız; yoksa Free Software Foundation, Inc., 59 Temple Place\n" "Suite 330, Boston, MA 02111-1307, USA. adresinden isteyebilirsiniz.\n" -#: main.c:730 +#: main.c:733 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "POSIX awk -Ft ile dosya sistemini belirlemez" -#: main.c:956 +#: main.c:962 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" @@ -1547,40 +1623,41 @@ "%s: `-v' ile verilen `%s' argümanı `var=deÄŸer' biçiminde deÄŸil\n" "\n" -#: main.c:976 +#: main.c:982 #, c-format msgid "`%s' is not a legal variable name" msgstr "`%s' kurala uygun bir deÄŸiÅŸken ismi deÄŸil" -#: main.c:979 +#: main.c:985 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "`%2$s=%3$s' için dosyaya bakınca, `%1$s' bir deÄŸiÅŸken ismi deÄŸil" -#: main.c:1012 +#: main.c:1018 msgid "floating point exception" msgstr "Gerçel sayı istisnası" -#: main.c:1019 +#: main.c:1025 msgid "fatal error: internal error" msgstr "ölümcül iç hata" -#: main.c:1069 +#: main.c:1075 #, c-format msgid "no pre-opened fd %d" msgstr "ön açılışlı bir %d dosya tanımlayıcısı yok" -#: main.c:1074 +#: main.c:1082 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "%d dosya tanımlayıcısı için /dev/null ön açılışı yapılamadı" -#: main.c:1097 main.c:1106 +#: main.c:1105 main.c:1114 #, c-format msgid "could not find groups: %s" msgstr "gruplar bulunamadı: %s" #: msg.c:54 +#, c-format msgid "cmd. line:" msgstr "komut satırı:" @@ -1600,19 +1677,19 @@ msgid "can't convert string to float" msgstr "dizge gerçel sayıya dönüştürülemiyor" -#: node.c:355 +#: node.c:357 msgid "backslash at end of string" msgstr "dizge sonunda tersbölü" -#: node.c:539 +#: node.c:541 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX `\\x' öncelemelerine izin vermez" -#: node.c:545 +#: node.c:547 msgid "no hex digits in `\\x' escape sequence" msgstr "`\\x' önceleme dizgesinde onaltılık rakamlar yok" -#: node.c:579 +#: node.c:581 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "`\\%c' önceleme dizgesi `%c' olarak kullanıldı" @@ -1627,21 +1704,27 @@ msgid "could not open `%s' for writing: %s" msgstr "`%s' yazmak için açılamadı: %s" -#: profile.c:449 +#: profile.c:467 #, c-format msgid "internal error: %s with null vname" msgstr "iç hata: null vname'li %s" -#: profile.c:512 +#: profile.c:530 msgid "# treated internally as `delete'" msgstr "# dahili olarak `delete' varsayıldı" -#: profile.c:1162 +#: profile.c:1167 +#, c-format +msgid "# this is a dynamically loaded extension function" +msgstr "# bu özdevimli olarak yüklenmiÅŸ bir ek iÅŸlevdir" + +#: profile.c:1198 #, c-format msgid "\t# gawk profile, created %s\n" msgstr "\t# gawk profili, oluÅŸturuldu: %s\n" -#: profile.c:1165 +#: profile.c:1201 +#, c-format msgid "" "\t# BEGIN block(s)\n" "\n" @@ -1649,7 +1732,8 @@ "\t# BEGIN blokları\n" "\n" -#: profile.c:1175 +#: profile.c:1211 +#, c-format msgid "" "\t# Rule(s)\n" "\n" @@ -1657,7 +1741,8 @@ "\t# Kurallar\n" "\n" -#: profile.c:1181 +#: profile.c:1217 +#, c-format msgid "" "\t# END block(s)\n" "\n" @@ -1665,7 +1750,8 @@ "\t# END blokları\n" "\n" -#: profile.c:1201 +#: profile.c:1237 +#, c-format msgid "" "\n" "\t# Functions, listed alphabetically\n" @@ -1673,93 +1759,94 @@ "\n" "\t# Ä°ÅŸlevler, alfabetik sırayla\n" -#: profile.c:1413 +#: profile.c:1452 #, c-format msgid "unexpected type %s in prec_level" msgstr "prec_level'da anlaşılamayan tür %s" -#: re.c:193 -#, c-format -msgid "regex match failed, not enough memory to match string \"%.*s%s\"" -msgstr "" -"düzenli ifade eÅŸleÅŸmesi saÄŸlanamadı, \"%.*s%s\" dizgesini eÅŸleÅŸtirmek için " -"yeterli bellek yok" - -#: regcomp.c:136 +#: regcomp.c:150 msgid "Success" msgstr "BaÅŸarılı" -#: regcomp.c:139 +#: regcomp.c:153 msgid "No match" msgstr "EÅŸleÅŸmez" -#: regcomp.c:142 +#: regcomp.c:156 msgid "Invalid regular expression" msgstr "Düzenli ifade geçersiz" -#: regcomp.c:145 +#: regcomp.c:159 msgid "Invalid collation character" msgstr "KarşılaÅŸtırma karakteri geçersiz" -#: regcomp.c:148 +#: regcomp.c:162 msgid "Invalid character class name" msgstr "Karakter sınıf ismi geçersiz" -#: regcomp.c:151 +#: regcomp.c:165 msgid "Trailing backslash" msgstr "Ä°zleyen tersbölü" -#: regcomp.c:154 +#: regcomp.c:168 msgid "Invalid back reference" msgstr "Geriye baÅŸvuru geçersiz" -#: regcomp.c:157 +#: regcomp.c:171 msgid "Unmatched [ or [^" msgstr "[ ya da [^ eÅŸleÅŸmiyor" -#: regcomp.c:160 +#: regcomp.c:174 msgid "Unmatched ( or \\(" msgstr "( ya da \\( eÅŸleÅŸmiyor" -#: regcomp.c:163 +#: regcomp.c:177 msgid "Unmatched \\{" msgstr "\\{ eÅŸleÅŸmiyor" -#: regcomp.c:166 +#: regcomp.c:180 msgid "Invalid content of \\{\\}" msgstr "\\{\\} içeriÄŸi geçersiz" -#: regcomp.c:169 +#: regcomp.c:183 msgid "Invalid range end" msgstr "Kapsam sonu geçersiz" -#: regcomp.c:172 +#: regcomp.c:186 msgid "Memory exhausted" msgstr "Bellek tükendi" -#: regcomp.c:175 +#: regcomp.c:189 msgid "Invalid preceding regular expression" msgstr "düzenli ifade önceliÄŸi geçersiz" -#: regcomp.c:178 +#: regcomp.c:192 msgid "Premature end of regular expression" msgstr "Düzenli ifade sonu eksik kalmış" -#: regcomp.c:181 +#: regcomp.c:195 msgid "Regular expression too big" msgstr "Düzenli ifade çok büyük" -#: regcomp.c:184 +#: regcomp.c:198 msgid "Unmatched ) or \\)" msgstr ") ya da \\) eÅŸleÅŸmiyor" -#: regcomp.c:621 +#: regcomp.c:668 msgid "No previous regular expression" msgstr "Daha önce düzenli ifade yok" +#~ msgid "or used as a variable or an array" +#~ msgstr "ya da bir deÄŸiÅŸken ya da dizi olarak kullanılmış" + #~ msgid "substr: length %g is < 0" #~ msgstr "substr: uzunluk %g < 0" +#~ msgid "regex match failed, not enough memory to match string \"%.*s%s\"" +#~ msgstr "" +#~ "düzenli ifade eÅŸleÅŸmesi saÄŸlanamadı, \"%.*s%s\" dizgesini eÅŸleÅŸtirmek " +#~ "için yeterli bellek yok" + #~ msgid "delete: illegal use of variable `%s' as array" #~ msgstr "delete: `%s' deÄŸiÅŸkeninin dizi olarak kullanımı kuraldışı" @@ -1778,9 +1865,6 @@ #~ msgid "or used in other expression context" #~ msgstr "ya da diÄŸer ifadenin içeriÄŸinde kullanılmış" -#~ msgid "attempt to use function `%s' as array" -#~ msgstr "`%s' iÅŸlevi dizi olarak kullanılmaya çalışılıyor" - #~ msgid "`%s' is a function, assignment is not allowed" #~ msgstr "`%s' bir iÅŸlevdir, bir deÄŸiÅŸken ismi olarak kullanılamaz" diff -urN gawk-3.1.3/posix/ChangeLog gawk-3.1.4/posix/ChangeLog --- gawk-3.1.3/posix/ChangeLog 2003-07-07 21:02:40.000000000 +0300 +++ gawk-3.1.4/posix/ChangeLog 2004-08-02 12:19:15.000000000 +0300 @@ -1,10 +1,14 @@ +Mon Aug 2 12:18:15 2004 Arnold D. Robbins + + * Release 3.1.4: Release tar file made. + Mon Jul 7 11:01:43 2003 Arnold D. Robbins * Release 3.1.3: Release tar file made. Sun May 25 16:23:43 2003 Corinna Vinschen - * gawkmisc.c (cygwin_premain0): New function. + * gawkmisc.c (cygwin_premain0): New function. Wed Mar 19 14:10:31 2003 Arnold D. Robbins diff -urN gawk-3.1.3/posix/gawkmisc.c gawk-3.1.4/posix/gawkmisc.c --- gawk-3.1.3/posix/gawkmisc.c 2003-05-25 16:26:19.000000000 +0300 +++ gawk-3.1.4/posix/gawkmisc.c 2004-07-28 16:46:43.000000000 +0300 @@ -1,6 +1,6 @@ /* gawkmisc.c --- miscellaneous gawk routines that are OS specific. - Copyright (C) 1986, 1988, 1989, 1991 - 1998, 2001 - 2003 the Free Software Foundation, Inc. + Copyright (C) 1986, 1988, 1989, 1991 - 1998, 2001 - 2004 the 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 @@ -128,7 +128,7 @@ #ifdef HAVE_ST_BLKSIZE #define DEFBLKSIZE (stb->st_blksize > 0 ? stb->st_blksize : BUFSIZ) #else -#define DEFBLKSIZE BUFSIZ +#define DEFBLKSIZE BUFSIZ #endif if (S_ISREG(stb->st_mode) /* regular file */ @@ -204,7 +204,7 @@ /* os_setbinmode --- set binary mode on file */ int -os_setbinmode (fd, mode) +os_setbinmode(fd, mode) int fd, mode; { return 0; diff -urN gawk-3.1.3/profile.c gawk-3.1.4/profile.c --- gawk-3.1.3/profile.c 2003-06-08 17:26:46.000000000 +0300 +++ gawk-3.1.4/profile.c 2004-07-28 16:47:17.000000000 +0300 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1999-2003 the Free Software Foundation, Inc. + * Copyright (C) 1999-2004 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -427,6 +427,24 @@ } } +/* varname --- print a variable name, handling vars done with -v */ + +/* + * When `-v x=x' is given, the varname field ends up including the + * entire text. This gets printed in the profiled output if we're + * not careful. Oops. + * + * XXX: This is a band-aid; we really should fix the -v code. + */ + +static void +varname(const char *name) +{ + for (; *name != '\0' && *name != '='; name++) + putc(*name, prof_fp); + return; +} + /* tree_eval --- evaluate a subtree */ static void @@ -444,7 +462,7 @@ case Node_var: case Node_var_array: if (tree->vname != NULL) - fprintf(prof_fp, "%s", tree->vname); + varname(tree->vname); else fatal(_("internal error: %s with null vname"), nodetype2str(tree->type)); @@ -570,6 +588,10 @@ fprintf(prof_fp, "BINMODE"); return; + case Node_SUBSEP: + fprintf(prof_fp, "SUBSEP"); + return; + case Node_TEXTDOMAIN: fprintf(prof_fp, "TEXTDOMAIN"); return; @@ -612,6 +634,14 @@ tree_eval(tree->rnode); return; + case Node_assign_concat: + tree_eval(tree->lnode); + fprintf(prof_fp, " = "); + tree_eval(tree->lnode); + fprintf(prof_fp, " "); + tree_eval(tree->rnode); + return; + case Node_concat: fprintf(prof_fp, "("); tree_eval(tree->lnode); @@ -864,6 +894,10 @@ fprintf(prof_fp, "OFS"); break; + case Node_SUBSEP: + fprintf(prof_fp, "SUBSEP"); + break; + case Node_TEXTDOMAIN: fprintf(prof_fp, "TEXTDOMAIN"); break; @@ -1125,10 +1159,12 @@ { const char *func = getfname(tree->builtin); - fprintf(prof_fp, "%s(", func ? func : "extension_function"); - if (func) + if (func != NULL) { + fprintf(prof_fp, "%s(", func); pp_list(tree->subnode); - fprintf(prof_fp, ")"); + fprintf(prof_fp, ")"); + } else + fprintf(prof_fp, _("# this is a dynamically loaded extension function")); } /* pp_func_call --- print a function call */ @@ -1306,6 +1342,7 @@ case Node_OFS: case Node_ORS: case Node_RS: + case Node_SUBSEP: case Node_TEXTDOMAIN: case Node_subscript: return TRUE; @@ -1342,6 +1379,7 @@ case Node_OFS: case Node_ORS: case Node_RS: + case Node_SUBSEP: case Node_TEXTDOMAIN: return 15; @@ -1407,6 +1445,7 @@ case Node_assign_plus: case Node_assign_minus: case Node_assign_exp: + case Node_assign_concat: return 1; default: diff -urN gawk-3.1.3/re.c gawk-3.1.4/re.c --- gawk-3.1.3/re.c 2003-06-18 10:05:40.000000000 +0300 +++ gawk-3.1.4/re.c 2004-07-28 16:47:37.000000000 +0300 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1991-2003 the Free Software Foundation, Inc. + * Copyright (C) 1991-2004 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -30,7 +30,7 @@ /* make_regexp --- generate compiled regular expressions */ Regexp * -make_regexp(const char *s, size_t len, int ignorecase) +make_regexp(const char *s, size_t len, int ignorecase, int dfa) { Regexp *rp; const char *rerr; @@ -39,6 +39,9 @@ const char *end = s + len; register char *dest; register int c, c2; + static short first = TRUE; + static short no_dfa = FALSE; + int has_anchor = FALSE; #ifdef MBS_SUPPORT /* The number of bytes in the current multbyte character. It is 0, when the current character is a singlebyte character. */ @@ -49,6 +52,11 @@ memset(&mbs, 0, sizeof(mbstate_t)); /* Initialize. */ #endif + if (first) { + first = FALSE; + no_dfa = (getenv("GAWK_NO_DFA") != NULL); /* for debugging and testing */ + } + /* Handle escaped characters first. */ /* @@ -131,8 +139,12 @@ src++; break; } /* switch */ - } else + } else { + c = *src; + if (c == '^' || c == '$') + has_anchor = TRUE; *dest++ = *src++; /* not '\\' */ + } #ifdef MBS_SUPPORT if (gawk_mb_cur_max > 1 && is_multibyte) is_multibyte--; @@ -145,56 +157,98 @@ rp->pat.allocated = 0; /* regex will allocate the buffer */ emalloc(rp->pat.fastmap, char *, 256, "make_regexp"); + /* + * Lo these many years ago, had I known what a P.I.T.A. IGNORECASE + * was going to turn out to be, I wouldn't have bothered with it. + * + * In the case where we have a multibyte character set, we have no + * choice but to use RE_ICASE, since the casetable is for single-byte + * character sets only. + * + * On the other hand, if we do have a single-byte character set, + * using the casetable should give a performance improvement, since + * it's computed only once, not each time a regex is compiled. We + * also think it's probably better for portability. See the + * discussion by the definition of casetable[] in eval.c. + */ +#ifdef MBS_SUPPORT + if (ignorecase) { + if (gawk_mb_cur_max > 1) { + syn |= RE_ICASE; + rp->pat.translate = NULL; + } else { + syn &= ~RE_ICASE; + rp->pat.translate = (char *) casetable; + } + } else { + rp->pat.translate = NULL; + syn &= ~RE_ICASE; + } +#else /* ! MBS_SUPPORT */ if (ignorecase) - rp->pat.translate = casetable; + rp->pat.translate = (char *) casetable; else rp->pat.translate = NULL; +#endif /* ! MBS_SUPPORT */ + + dfasyntax(syn | (ignorecase ? RE_ICASE : 0), ignorecase ? TRUE : FALSE, '\n'); + re_set_syntax(syn); + len = dest - temp; if ((rerr = re_compile_pattern(temp, len, &(rp->pat))) != NULL) fatal("%s: /%s/", rerr, temp); /* rerr already gettextized inside regex routines */ /* gack. this must be done *after* re_compile_pattern */ rp->pat.newline_anchor = FALSE; /* don't get \n in middle of string */ + if (dfa && ! no_dfa) { + dfacomp(temp, len, &(rp->dfareg), TRUE); + rp->dfa = TRUE; + } else + rp->dfa = FALSE; + rp->has_anchor = has_anchor; free(temp); return rp; } -/* research --- do a regexp search */ +/* research --- do a regexp search. use dfa if possible */ int -research(Regexp *rp, register const char *str, int start, +research(Regexp *rp, register char *str, int start, register size_t len, int need_start) { const char *ret = str; + int try_backref; - if (ret) { - /* - * Passing NULL as last arg speeds up search for cases - * where we don't need the start/end info. + /* + * Always do dfa search if can; if it fails, then even if + * need_start is true, we won't bother with the regex search. + */ + if (rp->dfa) { + char save; + int count = 0; + /* + * dfa likes to stick a '\n' right after the matched + * text. So we just save and restore the character. */ - int res = re_search(&(rp->pat), str, start+len, + save = str[start+len]; + ret = dfaexec(&(rp->dfareg), str+start, str+start+len, TRUE, + &count, &try_backref); + str[start+len] = save; + } + + if (ret) { + if (need_start || rp->dfa == FALSE || try_backref) { + /* + * Passing NULL as last arg speeds up search for cases + * where we don't need the start/end info. + */ + int res = re_search(&(rp->pat), str, start+len, start, len, need_start ? &(rp->regs) : NULL); - /* - * A return of -2 indicates that a heuristic in - * regex decided it might allocate too much memory - * on the C stack. This doesn't apply to gawk, which - * uses REGEX_MALLOC. This is dealt with by the - * assignment to re_max_failures in resetup(). - * Naetheless, we keep this code here as a fallback. - * - * XXX: The above comment is obsolete; the new regex - * doesn't have an re_max_failures variable. But we - * keep the code here just in case. - */ - if (res == -2) { - /* the 10 here is arbitrary */ - fatal(_("regex match failed, not enough memory to match string \"%.*s%s\""), - (int) (len > 10 ? 10 : len), str + start, - len > 10 ? "..." : ""); - } - return res; + return res; + } else + return 1; } else return -1; } @@ -217,8 +271,18 @@ free(rp->regs.start); if (rp->regs.end) free(rp->regs.end); + if (rp->dfa) + dfafree(&(rp->dfareg)); free(rp); } + +/* dfaerror --- print an error message for the dfa routines */ + +void +dfaerror(const char *s) +{ + fatal("%s", s); +} /* re_update --- recompile a dynamic regexp */ @@ -245,6 +309,10 @@ } if (t->re_reg != NULL) refree(t->re_reg); + if (t->re_cnt > 0) + t->re_cnt++; + if (t->re_cnt > 10) + t->re_cnt = 0; if (t->re_text == NULL || (t->re_flags & CASE) != IGNORECASE) { t1 = force_string(tree_eval(t->re_exp)); unref(t->re_text); @@ -252,7 +320,7 @@ free_temp(t1); } t->re_reg = make_regexp(t->re_text->stptr, t->re_text->stlen, - IGNORECASE); + IGNORECASE, t->re_cnt); t->re_flags &= ~CASE; t->re_flags |= IGNORECASE; return t->re_reg; @@ -278,6 +346,24 @@ syn |= RE_INTERVALS; (void) re_set_syntax(syn); + dfasyntax(syn, FALSE, '\n'); +} + +/* avoid_dfa --- FIXME: temporary kludge function until we have a new dfa.c */ + +int +avoid_dfa(NODE *re, char *str, size_t len) +{ + char *end; + + if (! re->re_reg->has_anchor) + return FALSE; + + for (end = str + len; str < end; str++) + if (*str == '\n') + return TRUE; + + return FALSE; } /* reisstring --- return TRUE if the RE match is a simple string match */ diff -urN gawk-3.1.3/regcomp.c gawk-3.1.4/regcomp.c --- gawk-3.1.3/regcomp.c 2003-03-11 11:42:51.000000000 +0200 +++ gawk-3.1.4/regcomp.c 2004-07-15 12:23:56.000000000 +0300 @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -18,112 +18,126 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -static reg_errcode_t re_compile_internal _RE_ARGS((regex_t *preg, const char * pattern, - int length, reg_syntax_t syntax)); -static void re_compile_fastmap_iter _RE_ARGS((regex_t *bufp, +static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, + int 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_ARGS((re_dfa_t *dfa, int pat_len)); -static reg_errcode_t init_word_char _RE_ARGS((re_dfa_t *dfa)); -#ifdef RE_ENABLE_I18N -static void free_charset _RE_ARGS((re_charset_t *cset)); -#endif /* RE_ENABLE_I18N */ -static void free_workarea_compile _RE_ARGS((regex_t *preg)); -static reg_errcode_t create_initial_state _RE_ARGS((re_dfa_t *dfa)); -static reg_errcode_t analyze _RE_ARGS((re_dfa_t *dfa)); -static reg_errcode_t analyze_tree _RE_ARGS((re_dfa_t *dfa, bin_tree_t *node)); -static void calc_first _RE_ARGS((re_dfa_t *dfa, bin_tree_t *node)); -static void calc_next _RE_ARGS((re_dfa_t *dfa, bin_tree_t *node)); -static void calc_epsdest _RE_ARGS((re_dfa_t *dfa, bin_tree_t *node)); -static reg_errcode_t duplicate_node_closure _RE_ARGS((re_dfa_t *dfa, int top_org_node, + char *fastmap); +static reg_errcode_t init_dfa (re_dfa_t *dfa, int pat_len); +static void init_word_char (re_dfa_t *dfa); +#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 (re_dfa_t *dfa); +static reg_errcode_t analyze_tree (re_dfa_t *dfa, bin_tree_t *node); +static void calc_first (re_dfa_t *dfa, bin_tree_t *node); +static void calc_next (re_dfa_t *dfa, bin_tree_t *node); +static void calc_epsdest (re_dfa_t *dfa, bin_tree_t *node); +static reg_errcode_t duplicate_node_closure (re_dfa_t *dfa, int top_org_node, int top_clone_node, int root_node, - unsigned int constraint)); -static reg_errcode_t duplicate_node _RE_ARGS((int *new_idx, re_dfa_t *dfa, int org_idx, - unsigned int constraint)); -static int search_duplicated_node _RE_ARGS((re_dfa_t *dfa, int org_node, - unsigned int constraint)); -static reg_errcode_t calc_eclosure _RE_ARGS((re_dfa_t *dfa)); -static reg_errcode_t calc_eclosure_iter _RE_ARGS((re_node_set *new_set, re_dfa_t *dfa, - int node, int root)); -static void calc_inveclosure _RE_ARGS((re_dfa_t *dfa)); -static int fetch_number _RE_ARGS((re_string_t *input, re_token_t *token, - reg_syntax_t syntax)); -static re_token_t fetch_token _RE_ARGS((re_string_t *input, reg_syntax_t syntax)); -static int peek_token _RE_ARGS((re_token_t *token, re_string_t *input, - reg_syntax_t syntax)); -static int peek_token_bracket _RE_ARGS((re_token_t *token, re_string_t *input, - reg_syntax_t syntax)); -static bin_tree_t *parse _RE_ARGS((re_string_t *regexp, regex_t *preg, - reg_syntax_t syntax, reg_errcode_t *err)); -static bin_tree_t *parse_reg_exp _RE_ARGS((re_string_t *regexp, regex_t *preg, + unsigned int constraint); +static reg_errcode_t duplicate_node (int *new_idx, re_dfa_t *dfa, int org_idx, + unsigned int constraint); +static int search_duplicated_node (re_dfa_t *dfa, int 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, + int node, int root); +static void calc_inveclosure (re_dfa_t *dfa); +static int fetch_number (re_string_t *input, re_token_t *token, + reg_syntax_t syntax); +static void fetch_token (re_token_t *result, re_string_t *input, + reg_syntax_t syntax); +static int peek_token (re_token_t *token, re_string_t *input, + reg_syntax_t syntax); +static int peek_token_bracket (re_token_t *token, re_string_t *input, + reg_syntax_t syntax); +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, - int nest, reg_errcode_t *err)); -static bin_tree_t *parse_branch _RE_ARGS((re_string_t *regexp, regex_t *preg, + int 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, - int nest, reg_errcode_t *err)); -static bin_tree_t *parse_expression _RE_ARGS((re_string_t *regexp, regex_t *preg, + int 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, - int nest, reg_errcode_t *err)); -static bin_tree_t *parse_sub_exp _RE_ARGS((re_string_t *regexp, regex_t *preg, + int 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, - int nest, reg_errcode_t *err)); -static bin_tree_t *parse_dup_op _RE_ARGS((bin_tree_t *dup_elem, re_string_t *regexp, + int 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_ARGS((re_string_t *regexp, re_dfa_t *dfa, + 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 _RE_ARGS((bracket_elem_t *elem, + 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)); -static reg_errcode_t parse_bracket_symbol _RE_ARGS((bracket_elem_t *elem, + reg_syntax_t syntax, + int accept_hyphen); +static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, - re_token_t *token)); + re_token_t *token); #ifndef _LIBC # ifdef RE_ENABLE_I18N -static reg_errcode_t build_range_exp _RE_ARGS((re_bitset_ptr_t sbcset, +static reg_errcode_t build_range_exp (re_bitset_ptr_t sbcset, re_charset_t *mbcset, int *range_alloc, bracket_elem_t *start_elem, - bracket_elem_t *end_elem)); -static reg_errcode_t build_collating_symbol _RE_ARGS((re_bitset_ptr_t sbcset, + bracket_elem_t *end_elem); +static reg_errcode_t build_collating_symbol (re_bitset_ptr_t sbcset, re_charset_t *mbcset, int *coll_sym_alloc, - const unsigned char *name)); + const unsigned char *name); # else /* not RE_ENABLE_I18N */ -static reg_errcode_t build_range_exp _RE_ARGS((re_bitset_ptr_t sbcset, +static reg_errcode_t build_range_exp (re_bitset_ptr_t sbcset, bracket_elem_t *start_elem, - bracket_elem_t *end_elem)); -static reg_errcode_t build_collating_symbol _RE_ARGS((re_bitset_ptr_t sbcset, - const unsigned char *name)); + bracket_elem_t *end_elem); +static reg_errcode_t build_collating_symbol (re_bitset_ptr_t sbcset, + const unsigned char *name); # endif /* not RE_ENABLE_I18N */ #endif /* not _LIBC */ #ifdef RE_ENABLE_I18N -static reg_errcode_t build_equiv_class _RE_ARGS((re_bitset_ptr_t sbcset, +static reg_errcode_t build_equiv_class (re_bitset_ptr_t sbcset, re_charset_t *mbcset, int *equiv_class_alloc, - const unsigned char *name)); -static reg_errcode_t build_charclass _RE_ARGS((RE_TRANSLATE_TYPE trans, + const unsigned char *name); +static reg_errcode_t build_charclass (unsigned RE_TRANSLATE_TYPE trans, re_bitset_ptr_t sbcset, re_charset_t *mbcset, int *char_class_alloc, - const unsigned char *class_name, - reg_syntax_t syntax)); + const char *class_name, + reg_syntax_t syntax); #else /* not RE_ENABLE_I18N */ -static reg_errcode_t build_equiv_class _RE_ARGS((re_bitset_ptr_t sbcset, - const unsigned char *name)); -static reg_errcode_t build_charclass _RE_ARGS((RE_TRANSLATE_TYPE trans, +static reg_errcode_t build_equiv_class (re_bitset_ptr_t sbcset, + const unsigned char *name); +static reg_errcode_t build_charclass (unsigned RE_TRANSLATE_TYPE trans, re_bitset_ptr_t sbcset, - const unsigned char *class_name, - reg_syntax_t syntax)); + const char *class_name, + reg_syntax_t syntax); #endif /* not RE_ENABLE_I18N */ -static bin_tree_t *build_word_op _RE_ARGS((re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, - int not, reg_errcode_t *err)); -static void free_bin_tree _RE_ARGS((bin_tree_t *tree)); -static bin_tree_t *create_tree _RE_ARGS((bin_tree_t *left, bin_tree_t *right, - re_token_type_t type, int index)); -static bin_tree_t *duplicate_tree _RE_ARGS((const bin_tree_t *src, re_dfa_t *dfa)); +static bin_tree_t *build_charclass_op (re_dfa_t *dfa, + unsigned RE_TRANSLATE_TYPE trans, + const char *class_name, + const char *extra, + int 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, int index); +static bin_tree_t *re_dfa_add_tree_node (re_dfa_t *dfa, + bin_tree_t *left, bin_tree_t *right, + const re_token_t *token) + __attribute ((noinline)); +static bin_tree_t *duplicate_tree (const bin_tree_t *src, re_dfa_t *dfa); +static void mark_opt_subexp (const bin_tree_t *src, re_dfa_t *dfa); +static void mark_opt_subexp_iter (const bin_tree_t *src, re_dfa_t *dfa, int idx); /* 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. @@ -262,9 +276,6 @@ reg_syntax_t ret = re_syntax_options; re_syntax_options = syntax; -#ifdef RE_ENABLE_I18N - re_mb_cur_max = MB_CUR_MAX; -#endif return ret; } #ifdef _LIBC @@ -294,6 +305,7 @@ #endif static inline void +__attribute ((always_inline)) re_set_fastmap (char *fastmap, int icase, int ch) { fastmap[ch] = 1; @@ -312,24 +324,42 @@ { re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; int node_cnt; -#ifdef RE_ENABLE_I18N - int icase = (re_mb_cur_max == 1 && (bufp->syntax & RE_ICASE)); -#else - int icase = (bufp->syntax & RE_ICASE); -#endif + int icase = (dfa->mb_cur_max == 1 && (bufp->syntax & RE_ICASE)); for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt) { int 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); + { + 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 = alloca (dfa->mb_cur_max), *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) > 0) + re_set_fastmap (fastmap, 0, buf[0]); + } +#endif + } else if (type == SIMPLE_BRACKET) { int i, j, ch; for (i = 0, ch = 0; i < BITSET_UINTS; ++i) for (j = 0; j < UINT_BITS; ++j, ++ch) - if (dfa->nodes[node].opr.sbcset[i] & (1UL << j)) + if (dfa->nodes[node].opr.sbcset[i] & (1 << j)) re_set_fastmap (fastmap, icase, ch); } #ifdef RE_ENABLE_I18N @@ -358,7 +388,7 @@ re_set_fastmap (fastmap, icase, ch); } # else - if (re_mb_cur_max > 1) + if (dfa->mb_cur_max > 1) for (i = 0; i < SBC_MAX; ++i) if (__btowc (i) == WEOF) re_set_fastmap (fastmap, icase, i); @@ -371,10 +401,19 @@ memset (&state, '\0', sizeof (state)); __wcrtomb (buf, cset->mbchars[i], &state); re_set_fastmap (fastmap, icase, *(unsigned char *) buf); + if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) + { + __wcrtomb (buf, towlower (cset->mbchars[i]), &state); + re_set_fastmap (fastmap, 0, *(unsigned char *) buf); + } } } #endif /* RE_ENABLE_I18N */ - else if (type == END_OF_RE || type == OP_PERIOD) + 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) @@ -464,7 +503,7 @@ /* 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 nevers fails in this implementation. */ + buffer. This function never fails in this implementation. */ (void) re_compile_fastmap (preg); else { @@ -530,17 +569,18 @@ re_free (dfa->subexps); - for (i = 0; i < dfa->nodes_len; ++i) - { - re_token_t *node = dfa->nodes + i; + if (dfa->nodes) + for (i = 0; i < dfa->nodes_len; ++i) + { + re_token_t *node = dfa->nodes + i; #ifdef RE_ENABLE_I18N - if (node->type == COMPLEX_BRACKET && node->duplicated == 0) - free_charset (node->opr.mbcset); - else + 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); - } + if (node->type == SIMPLE_BRACKET && node->duplicated == 0) + re_free (node->opr.sbcset); + } re_free (dfa->nexts); for (i = 0; i < dfa->nodes_len; ++i) { @@ -556,20 +596,21 @@ re_free (dfa->inveclosures); re_free (dfa->nodes); - 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); - } + 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); - - if (dfa->word_char != NULL) - re_free (dfa->word_char); +#ifdef RE_ENABLE_I18N + re_free (dfa->sb_char); +#endif #ifdef DEBUG re_free (dfa->re_str); #endif @@ -587,8 +628,14 @@ 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) @@ -689,7 +736,7 @@ /* Initialize the dfa. */ dfa = (re_dfa_t *) preg->buffer; - if (preg->allocated < sizeof (re_dfa_t)) + 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 @@ -699,14 +746,14 @@ if (dfa == NULL) return REG_ESPACE; preg->allocated = sizeof (re_dfa_t); + preg->buffer = (unsigned char *) dfa; } - preg->buffer = (unsigned char *) dfa; preg->used = sizeof (re_dfa_t); err = init_dfa (dfa, length); if (BE (err != REG_NOERROR, 0)) { - re_free (dfa); + free_dfa_content (dfa); preg->buffer = NULL; preg->allocated = 0; return err; @@ -717,10 +764,13 @@ #endif err = re_string_construct (®exp, pattern, length, preg->translate, - syntax & RE_ICASE); + syntax & RE_ICASE, dfa); if (BE (err != REG_NOERROR, 0)) { - re_free (dfa); + 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; @@ -732,6 +782,12 @@ if (BE (dfa->str_tree == NULL, 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 + /* Analyze the tree and collect information which is necessary to create the dfa. */ err = analyze (dfa); @@ -747,7 +803,6 @@ if (BE (err != REG_NOERROR, 0)) { - re_compile_internal_free_return: free_dfa_content (dfa); preg->buffer = NULL; preg->allocated = 0; @@ -768,6 +823,9 @@ 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; + dfa->nodes_alloc = pat_len + 1; dfa->nodes = re_malloc (re_token_t, dfa->nodes_alloc); @@ -783,18 +841,36 @@ dfa->subexps_alloc = 1; dfa->subexps = re_malloc (re_subexp_t, dfa->subexps_alloc); - dfa->word_char = NULL; - if (BE (dfa->nodes == NULL || dfa->state_table == NULL - || dfa->subexps == NULL, 0)) + 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); +#endif +#ifdef RE_ENABLE_I18N + if (dfa->mb_cur_max > 1) { - /* We don't bother to free anything which was allocated. Very - soon the process will go down anyway. */ - dfa->subexps = NULL; - dfa->state_table = NULL; - dfa->nodes = NULL; - return REG_ESPACE; + int i, j, ch; + + dfa->sb_char = (re_bitset_ptr_t) calloc (sizeof (bitset), 1); + if (BE (dfa->sb_char == NULL, 0)) + return REG_ESPACE; + if (dfa->is_utf8) + memset (dfa->sb_char, 255, sizeof (unsigned int) * BITSET_UINTS / 2); + else + for (i = 0, ch = 0; i < BITSET_UINTS; ++i) + for (j = 0; j < UINT_BITS; ++j, ++ch) + if (btowc (ch) != WEOF) + dfa->sb_char[i] |= 1 << j; } +#endif + + if (BE (dfa->nodes == NULL || dfa->state_table == NULL + || dfa->subexps == NULL, 0)) + return REG_ESPACE; return REG_NOERROR; } @@ -802,19 +878,16 @@ "word". In this case "word" means that it is the word construction character used by some operators like "\<", "\>", etc. */ -static reg_errcode_t +static void init_word_char (dfa) re_dfa_t *dfa; { int i, j, ch; - dfa->word_char = (re_bitset_ptr_t) calloc (sizeof (bitset), 1); - if (BE (dfa->word_char == NULL, 0)) - return REG_ESPACE; + dfa->word_ops_used = 1; for (i = 0, ch = 0; i < BITSET_UINTS; ++i) for (j = 0; j < UINT_BITS; ++j, ++ch) if (isalnum (ch) || ch == '_') - dfa->word_char[i] |= 1UL << j; - return REG_NOERROR; + dfa->word_char[i] |= 1 << j; } /* Free the work area which are only used while compiling. */ @@ -824,7 +897,14 @@ regex_t *preg; { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; - free_bin_tree (dfa->str_tree); + 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; @@ -910,6 +990,75 @@ 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 (dfa) + re_dfa_t *dfa; +{ + int node, i, mb_chars = 0, has_period = 0; + + for (node = 0; node < dfa->nodes_len; ++node) + switch (dfa->nodes[node].type) + { + case CHARACTER: + if (dfa->nodes[node].opr.c >= 0x80) + mb_chars = 1; + break; + case ANCHOR: + switch (dfa->nodes[node].opr.idx) + { + case LINE_FIRST: + case LINE_LAST: + case BUF_FIRST: + case BUF_LAST: + break; + default: + /* Word anchors etc. cannot be handled. */ + return; + } + break; + case OP_PERIOD: + has_period = 1; + break; + case OP_BACK_REF: + case OP_ALT: + case END_OF_RE: + case OP_DUP_ASTERISK: + case OP_DUP_QUESTION: + case OP_OPEN_SUBEXP: + case OP_CLOSE_SUBEXP: + break; + case SIMPLE_BRACKET: + /* Just double check. */ + for (i = 0x80 / UINT_BITS; i < BITSET_UINTS; ++i) + if (dfa->nodes[node].opr.sbcset[i]) + return; + break; + default: + return; + } + + if (mb_chars || has_period) + for (node = 0; node < dfa->nodes_len; ++node) + { + if (dfa->nodes[node].type == CHARACTER + && dfa->nodes[node].opr.c >= 0x80) + 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". */ @@ -998,6 +1147,7 @@ case OP_CLOSE_BRACKET: case OP_OPEN_DUP_NUM: case OP_CLOSE_DUP_NUM: + case OP_DUP_PLUS: case OP_NON_MATCH_LIST: case OP_OPEN_COLL_ELEM: case OP_CLOSE_COLL_ELEM: @@ -1005,7 +1155,7 @@ case OP_CLOSE_EQUIV_CLASS: case OP_OPEN_CHAR_CLASS: case OP_CLOSE_CHAR_CLASS: - /* These must not be appeared here. */ + /* These must not appear here. */ assert (0); #endif case END_OF_RE: @@ -1014,6 +1164,7 @@ case OP_DUP_ASTERISK: case OP_DUP_QUESTION: #ifdef RE_ENABLE_I18N + case OP_UTF8_PERIOD: case COMPLEX_BRACKET: #endif /* RE_ENABLE_I18N */ case SIMPLE_BRACKET: @@ -1023,14 +1174,6 @@ case OP_CLOSE_SUBEXP: node->first = idx; break; - case OP_DUP_PLUS: -#ifdef DEBUG - assert (node->left != NULL); -#endif - if (node->left->first == -1) - calc_first (dfa, node->left); - node->first = node->left->first; - break; case OP_ALT: node->first = idx; break; @@ -1070,7 +1213,6 @@ switch (type) { case OP_DUP_ASTERISK: - case OP_DUP_PLUS: node->next = idx; break; case CONCAT: @@ -1105,7 +1247,6 @@ if (node->type == 0) { if (dfa->nodes[idx].type == OP_DUP_ASTERISK - || dfa->nodes[idx].type == OP_DUP_PLUS || dfa->nodes[idx].type == OP_DUP_QUESTION) { if (node->left->first == -1) @@ -1149,6 +1290,8 @@ || dfa->nodes[idx].type == OP_CLOSE_SUBEXP || dfa->nodes[idx].type == OP_BACK_REF) re_node_set_init_1 (dfa->edests + idx, node->next); + else + assert (!IS_EPSILON_NODE (dfa->nodes[idx].type)); } } @@ -1296,11 +1439,7 @@ int *new_idx, org_idx; unsigned int constraint; { - re_token_t dup; - int dup_idx; - - dup = dfa->nodes[org_idx]; - dup_idx = re_dfa_add_node (dfa, dup, 1); + int dup_idx = re_dfa_add_node (dfa, dfa->nodes[org_idx], 1); if (BE (dup_idx == -1, 0)) return REG_ESPACE; dfa->nodes[dup_idx].constraint = constraint; @@ -1459,16 +1598,13 @@ /* Fetch a token from INPUT. We must not use this function inside bracket expressions. */ -static re_token_t -fetch_token (input, syntax) +static void +fetch_token (result, input, syntax) + re_token_t *result; re_string_t *input; reg_syntax_t syntax; { - re_token_t token; - int consumed_byte; - consumed_byte = peek_token (&token, input, syntax); - re_string_skip_bytes (input, consumed_byte); - return token; + re_string_skip_bytes (input, peek_token (result, input, syntax)); } /* Peek a token from INPUT, and return the length of the token. @@ -1491,9 +1627,10 @@ c = re_string_peek_byte (input, 0); token->opr.c = c; + token->word_char = 0; #ifdef RE_ENABLE_I18N token->mb_partial = 0; - if (re_mb_cur_max > 1 && + if (input->mb_cur_max > 1 && !re_string_first_byte (input, re_string_cur_idx (input))) { token->type = CHARACTER; @@ -1513,6 +1650,17 @@ 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 '|': @@ -1531,28 +1679,28 @@ if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; - token->opr.idx = WORD_FIRST; + token->opr.ctx_type = WORD_FIRST; } break; case '>': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; - token->opr.idx = WORD_LAST; + token->opr.ctx_type = WORD_LAST; } break; case 'b': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; - token->opr.idx = WORD_DELIM; + token->opr.ctx_type = WORD_DELIM; } break; case 'B': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; - token->opr.idx = INSIDE_WORD; + token->opr.ctx_type = INSIDE_WORD; } break; case 'w': @@ -1563,18 +1711,28 @@ if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_NOTWORD; break; +#ifndef GAWK + 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; +#endif case '`': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; - token->opr.idx = BUF_FIRST; + token->opr.ctx_type = BUF_FIRST; } break; case '\'': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; - token->opr.idx = BUF_LAST; + token->opr.ctx_type = BUF_LAST; } break; case '(': @@ -1608,6 +1766,16 @@ } 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': @@ -1652,16 +1820,15 @@ token->type = OP_PERIOD; break; case '^': - if (!(syntax & RE_CONTEXT_INDEP_ANCHORS) && + 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 (prev != '|' && prev != '(' && - (!(syntax & RE_NEWLINE_ALT) || prev != '\n')) + if (!(syntax & RE_NEWLINE_ALT) || prev != '\n') break; } token->type = ANCHOR; - token->opr.idx = LINE_FIRST; + token->opr.ctx_type = LINE_FIRST; break; case '$': if (!(syntax & RE_CONTEXT_INDEP_ANCHORS) && @@ -1675,7 +1842,7 @@ break; } token->type = ANCHOR; - token->opr.idx = LINE_LAST; + token->opr.ctx_type = LINE_LAST; break; default: break; @@ -1702,7 +1869,7 @@ token->opr.c = c; #ifdef RE_ENABLE_I18N - if (re_mb_cur_max > 1 && + if (input->mb_cur_max > 1 && !re_string_first_byte (input, re_string_cur_idx (input))) { token->type = CHARACTER; @@ -1710,7 +1877,8 @@ } #endif /* RE_ENABLE_I18N */ - if (c == '\\' && (syntax & RE_BACKSLASH_ESCAPE_IN_LISTS)) + 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; @@ -1724,7 +1892,10 @@ { unsigned char c2; int token_len; - c2 = re_string_peek_byte (input, 1); + 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) @@ -1791,18 +1962,17 @@ re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree, *eor, *root; re_token_t current_token; - int new_idx; - current_token = fetch_token (regexp, syntax); + 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; - new_idx = re_dfa_add_node (dfa, current_token, 0); - eor = create_tree (NULL, NULL, 0, new_idx); + eor = re_dfa_add_tree_node (dfa, NULL, NULL, ¤t_token); if (tree != NULL) - root = create_tree (tree, eor, CONCAT, 0); + root = create_tree (dfa, tree, eor, CONCAT, 0); else root = eor; - if (BE (new_idx == -1 || eor == NULL || root == NULL, 0)) + if (BE (eor == NULL || root == NULL, 0)) { *err = REG_ESPACE; return NULL; @@ -1830,31 +2000,25 @@ { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree, *branch = NULL; - int new_idx; tree = parse_branch (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; while (token->type == OP_ALT) { - re_token_t alt_token; - alt_token = *token; - new_idx = re_dfa_add_node (dfa, alt_token, 0); - *token = fetch_token (regexp, syntax); + re_token_t alt_token = *token; + 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)) - { - free_bin_tree (tree); - return NULL; - } + return NULL; } else branch = NULL; - tree = create_tree (tree, branch, 0, new_idx); - if (BE (new_idx == -1 || tree == NULL, 0)) + tree = re_dfa_add_tree_node (dfa, tree, branch, &alt_token); + if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; @@ -1883,6 +2047,7 @@ reg_errcode_t *err; { bin_tree_t *tree, *exp; + 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; @@ -1893,12 +2058,11 @@ exp = parse_expression (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && exp == NULL, 0)) { - free_bin_tree (tree); return NULL; } if (tree != NULL && exp != NULL) { - tree = create_tree (tree, exp, CONCAT, 0); + tree = create_tree (dfa, tree, exp, CONCAT, 0); if (tree == NULL) { *err = REG_ESPACE; @@ -1929,29 +2093,26 @@ { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree; - int new_idx; switch (token->type) { case CHARACTER: - new_idx = re_dfa_add_node (dfa, *token, 0); - tree = create_tree (NULL, NULL, 0, new_idx); - if (BE (new_idx == -1 || tree == NULL, 0)) + tree = re_dfa_add_tree_node (dfa, NULL, NULL, token); + if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } #ifdef RE_ENABLE_I18N - if (re_mb_cur_max > 1) + 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; - *token = fetch_token (regexp, syntax); - new_idx = re_dfa_add_node (dfa, *token, 0); - mbc_remain = create_tree (NULL, NULL, 0, new_idx); - tree = create_tree (tree, mbc_remain, CONCAT, 0); - if (BE (new_idx == -1 || mbc_remain == NULL || tree == NULL, 0)) + fetch_token (token, regexp, syntax); + mbc_remain = re_dfa_add_tree_node (dfa, NULL, NULL, token); + tree = create_tree (dfa, tree, mbc_remain, CONCAT, 0); + if (BE (mbc_remain == NULL || tree == NULL, 0)) { *err = REG_ESPACE; return NULL; @@ -1977,10 +2138,9 @@ *err = REG_ESUBREG; return NULL; } - dfa->used_bkref_map |= 1UL << (token->opr.idx - 1); - new_idx = re_dfa_add_node (dfa, *token, 0); - tree = create_tree (NULL, NULL, 0, new_idx); - if (BE (new_idx == -1 || tree == NULL, 0)) + dfa->used_bkref_map |= 1 << (token->opr.idx - 1); + tree = re_dfa_add_tree_node (dfa, NULL, NULL, token); + if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; @@ -1988,10 +2148,16 @@ ++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: - case OP_OPEN_DUP_NUM: if (syntax & RE_CONTEXT_INVALID_OPS) { *err = REG_BADRPT; @@ -1999,7 +2165,7 @@ } else if (syntax & RE_CONTEXT_INDEP_OPS) { - *token = fetch_token (regexp, syntax); + fetch_token (token, regexp, syntax); return parse_expression (regexp, preg, token, syntax, nest, err); } /* else fall through */ @@ -2016,37 +2182,30 @@ /* Then we can these characters as normal characters. */ token->type = CHARACTER; - new_idx = re_dfa_add_node (dfa, *token, 0); - tree = create_tree (NULL, NULL, 0, new_idx); - if (BE (new_idx == -1 || tree == NULL, 0)) + /* mb_partial and word_char bits should be initialized already + by peek_token. */ + tree = re_dfa_add_tree_node (dfa, NULL, NULL, token); + if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } break; case ANCHOR: - if (dfa->word_char == NULL) - { - *err = init_word_char (dfa); - if (BE (*err != REG_NOERROR, 0)) - return NULL; - } + if ((token->opr.ctx_type + & (WORD_DELIM | INSIDE_WORD | WORD_FIRST | WORD_LAST)) + && dfa->word_ops_used == 0) + init_word_char (dfa); if (token->opr.ctx_type == WORD_DELIM) { bin_tree_t *tree_first, *tree_last; - int idx_first, idx_last; token->opr.ctx_type = WORD_FIRST; - idx_first = re_dfa_add_node (dfa, *token, 0); - tree_first = create_tree (NULL, NULL, 0, idx_first); + tree_first = re_dfa_add_tree_node (dfa, NULL, NULL, token); token->opr.ctx_type = WORD_LAST; - idx_last = re_dfa_add_node (dfa, *token, 0); - tree_last = create_tree (NULL, NULL, 0, idx_last); + tree_last = re_dfa_add_tree_node (dfa, NULL, NULL, token); token->type = OP_ALT; - new_idx = re_dfa_add_node (dfa, *token, 0); - tree = create_tree (tree_first, tree_last, 0, new_idx); - if (BE (idx_first == -1 || idx_last == -1 || new_idx == -1 - || tree_first == NULL || tree_last == NULL - || tree == NULL, 0)) + tree = re_dfa_add_tree_node (dfa, tree_first, tree_last, token); + if (BE (tree_first == NULL || tree_last == NULL || tree == NULL, 0)) { *err = REG_ESPACE; return NULL; @@ -2054,9 +2213,8 @@ } else { - new_idx = re_dfa_add_node (dfa, *token, 0); - tree = create_tree (NULL, NULL, 0, new_idx); - if (BE (new_idx == -1 || tree == NULL, 0)) + tree = re_dfa_add_tree_node (dfa, NULL, NULL, token); + if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; @@ -2066,28 +2224,35 @@ by repetition operators. eg. RE"^*" is invalid or "", it must not be "". */ - *token = fetch_token (regexp, syntax); + fetch_token (token, regexp, syntax); return tree; case OP_PERIOD: - new_idx = re_dfa_add_node (dfa, *token, 0); - tree = create_tree (NULL, NULL, 0, new_idx); - if (BE (new_idx == -1 || tree == NULL, 0)) + tree = re_dfa_add_tree_node (dfa, NULL, NULL, token); + if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } -#ifdef RE_ENABLE_I18N - if (re_mb_cur_max > 1) + if (dfa->mb_cur_max > 1) dfa->has_mb_node = 1; -#endif break; case OP_WORD: - tree = build_word_op (dfa, regexp->trans, 0, err); + tree = build_charclass_op (dfa, regexp->trans, "alnum", "_", 0, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_NOTWORD: - tree = build_word_op (dfa, regexp->trans, 1, err); + tree = build_charclass_op (dfa, regexp->trans, "alnum", "_", 1, err); + if (BE (*err != REG_NOERROR && tree == NULL, 0)) + return NULL; + break; + case OP_SPACE: + tree = build_charclass_op (dfa, regexp->trans, "space", "", 0, err); + if (BE (*err != REG_NOERROR && tree == NULL, 0)) + return NULL; + break; + case OP_NOTSPACE: + tree = build_charclass_op (dfa, regexp->trans, "space", "", 1, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; @@ -2104,7 +2269,7 @@ #endif return NULL; } - *token = fetch_token (regexp, syntax); + 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) @@ -2112,6 +2277,14 @@ 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; + } dfa->has_plural_match = 1; } @@ -2137,9 +2310,8 @@ re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree, *left_par, *right_par; size_t cur_nsub; - int new_idx; cur_nsub = preg->re_nsub++; - if (dfa->subexps_alloc < preg->re_nsub) + if (BE (dfa->subexps_alloc < preg->re_nsub, 0)) { re_subexp_t *new_array; dfa->subexps_alloc *= 2; @@ -2155,15 +2327,14 @@ dfa->subexps[cur_nsub].start = dfa->nodes_len; dfa->subexps[cur_nsub].end = -1; - new_idx = re_dfa_add_node (dfa, *token, 0); - left_par = create_tree (NULL, NULL, 0, new_idx); - if (BE (new_idx == -1 || left_par == NULL, 0)) + left_par = re_dfa_add_tree_node (dfa, NULL, NULL, token); + if (BE (left_par == NULL, 0)) { *err = REG_ESPACE; return NULL; } - dfa->nodes[new_idx].opr.idx = cur_nsub; - *token = fetch_token (regexp, syntax); + dfa->nodes[left_par->node_idx].opr.idx = cur_nsub; + fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE); /* The subexpression may be a null string. */ if (token->type == OP_CLOSE_SUBEXP) @@ -2176,22 +2347,20 @@ } if (BE (token->type != OP_CLOSE_SUBEXP, 0)) { - free_bin_tree (tree); - *err = REG_BADPAT; + *err = REG_EPAREN; return NULL; } - new_idx = re_dfa_add_node (dfa, *token, 0); + right_par = re_dfa_add_tree_node (dfa, NULL, NULL, token); dfa->subexps[cur_nsub].end = dfa->nodes_len; - right_par = create_tree (NULL, NULL, 0, new_idx); tree = ((tree == NULL) ? right_par - : create_tree (tree, right_par, CONCAT, 0)); - tree = create_tree (left_par, tree, CONCAT, 0); - if (BE (new_idx == -1 || right_par == NULL || tree == NULL, 0)) + : create_tree (dfa, tree, right_par, CONCAT, 0)); + tree = create_tree (dfa, left_par, tree, CONCAT, 0); + if (BE (right_par == NULL || tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } - dfa->nodes[new_idx].opr.idx = cur_nsub; + dfa->nodes[right_par->node_idx].opr.idx = cur_nsub; return tree; } @@ -2199,8 +2368,8 @@ /* This function parse repetition operators like "*", "+", "{1,3}" etc. */ static bin_tree_t * -parse_dup_op (dup_elem, regexp, dfa, token, syntax, err) - bin_tree_t *dup_elem; +parse_dup_op (elem, regexp, dfa, token, syntax, err) + bin_tree_t *elem; re_string_t *regexp; re_dfa_t *dfa; re_token_t *token; @@ -2208,16 +2377,14 @@ reg_errcode_t *err; { re_token_t dup_token; - bin_tree_t *tree = dup_elem, *work_tree; - int new_idx, start_idx = re_string_cur_idx (regexp); - re_token_t start_token; - start_token = *token; + bin_tree_t *tree = NULL; + int i, start, end, start_idx = re_string_cur_idx (regexp); + re_token_t start_token = *token; + if (token->type == OP_OPEN_DUP_NUM) { - int i; - int end = 0; - int start = fetch_number (regexp, token, syntax); - bin_tree_t *elem; + end = 0; + start = fetch_number (regexp, token, syntax); if (start == -1) { if (token->type == CHARACTER && token->opr.c == ',') @@ -2238,120 +2405,104 @@ if (BE (start == -2 || end == -2, 0)) { /* Invalid sequence. */ - if (token->type == OP_CLOSE_DUP_NUM) - goto parse_dup_op_invalid_interval; - else - goto parse_dup_op_ebrace; + 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 (start == 0 && end == 0, 0)) + + if (BE (end != -1 && start > end, 0)) { - /* We treat "{0}" and "{0,0}" as null string. */ - *token = fetch_token (regexp, syntax); - free_bin_tree (dup_elem); + /* 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 : -1; + } - /* Extract "{n,m}" to "...{0,}". */ - elem = tree; - for (i = 0; i < start; ++i) - if (i != 0) - { - work_tree = duplicate_tree (elem, dfa); - tree = create_tree (tree, work_tree, CONCAT, 0); - if (BE (work_tree == NULL || tree == NULL, 0)) - goto parse_dup_op_espace; - } + /* Treat "{0}*" etc. as "{0}". */ + if (BE (elem == NULL, 0)) + start = end = 0; - if (end == -1) + /* Extract "{n,m}" to "...{0,}". */ + else if (BE (start > 0, 0)) + { + tree = elem; + for (i = 2; i <= start; ++i) { - /* We treat "{0,}" as "*". */ - dup_token.type = OP_DUP_ASTERISK; - if (start > 0) - { - elem = duplicate_tree (elem, dfa); - new_idx = re_dfa_add_node (dfa, dup_token, 0); - work_tree = create_tree (elem, NULL, 0, new_idx); - tree = create_tree (tree, work_tree, CONCAT, 0); - if (BE (elem == NULL || new_idx == -1 || work_tree == NULL - || tree == NULL, 0)) - goto parse_dup_op_espace; - } - else - { - new_idx = re_dfa_add_node (dfa, dup_token, 0); - tree = create_tree (elem, NULL, 0, new_idx); - if (BE (new_idx == -1 || tree == NULL, 0)) - goto parse_dup_op_espace; - } - } - else if (end - start > 0) - { - /* Then extract "{0,m}" to "??...?". */ - dup_token.type = OP_DUP_QUESTION; - if (start > 0) - { - elem = duplicate_tree (elem, dfa); - new_idx = re_dfa_add_node (dfa, dup_token, 0); - elem = create_tree (elem, NULL, 0, new_idx); - tree = create_tree (tree, elem, CONCAT, 0); - if (BE (elem == NULL || new_idx == -1 || tree == NULL, 0)) - goto parse_dup_op_espace; - } - else - { - new_idx = re_dfa_add_node (dfa, dup_token, 0); - tree = elem = create_tree (elem, NULL, 0, new_idx); - if (BE (new_idx == -1 || tree == NULL, 0)) - goto parse_dup_op_espace; - } - for (i = 1; i < end - start; ++i) - { - work_tree = duplicate_tree (elem, dfa); - tree = create_tree (tree, work_tree, CONCAT, 0); - if (BE (work_tree == NULL || tree == NULL, 0)) - { - *err = REG_ESPACE; - return NULL; - } - } + elem = duplicate_tree (elem, dfa); + tree = create_tree (dfa, tree, elem, CONCAT, 0); + if (BE (elem == NULL || tree == NULL, 0)) + goto parse_dup_op_espace; } } - else + + if (BE (end != start, 1)) { - new_idx = re_dfa_add_node (dfa, *token, 0); - tree = create_tree (tree, NULL, 0, new_idx); - if (BE (new_idx == -1 || tree == NULL, 0)) + dup_token.type = (end == -1 ? OP_DUP_ASTERISK : OP_DUP_QUESTION); + if (BE (start > 0, 0)) { - *err = REG_ESPACE; - return NULL; + elem = duplicate_tree (elem, dfa); + if (BE (elem == NULL, 0)) + goto parse_dup_op_espace; + + /* This subexpression will be marked as optional, so that + empty matches do not touch the registers. */ + mark_opt_subexp (elem, dfa); + + /* Prepare the tree with the modifier. */ + elem = re_dfa_add_tree_node (dfa, elem, NULL, &dup_token); + tree = create_tree (dfa, tree, elem, CONCAT, 0); } + else + { + /* We do not need to duplicate the tree because we have not + created it yet. */ + mark_opt_subexp (elem, dfa); + tree = elem = re_dfa_add_tree_node (dfa, elem, NULL, &dup_token); + } + + if (BE (elem == NULL || tree == NULL, 0)) + goto parse_dup_op_espace; + + /* This loop is actually executed only when end != -1, + to rewrite {0,n} as ???... We have + already created the start+1-th copy. */ + for (i = start + 2; i <= end; ++i) + { + elem = duplicate_tree (elem, dfa); + tree = create_tree (dfa, tree, elem, CONCAT, 0); + if (BE (elem == NULL || tree == NULL, 0)) + { + *err = REG_ESPACE; + return NULL; + } + } } - *token = fetch_token (regexp, syntax); + + fetch_token (token, regexp, syntax); return tree; parse_dup_op_espace: - free_bin_tree (tree); *err = REG_ESPACE; return NULL; - - parse_dup_op_ebrace: - if (BE (!(syntax & RE_INVALID_INTERVAL_ORD), 0)) - { - *err = REG_EBRACE; - return NULL; - } - goto parse_dup_op_rollback; - parse_dup_op_invalid_interval: - if (BE (!(syntax & RE_INVALID_INTERVAL_ORD), 0)) - { - *err = REG_BADBR; - return NULL; - } - parse_dup_op_rollback: - re_string_set_index (regexp, start_idx); - *token = start_token; - token->type = CHARACTER; - return dup_elem; } /* Size of the names for collating symbol/equivalence_class/character_class. @@ -2407,37 +2558,45 @@ ? __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); - cmp_buf[0] = start_wc; - cmp_buf[4] = end_wc; + cmp_buf[0] = start_wc != WEOF ? start_wc : start_ch; + cmp_buf[4] = end_wc != WEOF ? end_wc : end_ch; if (wcscoll (cmp_buf, cmp_buf + 4) > 0) return REG_ERANGE; - /* Check the space of the arrays. */ - if (*range_alloc == mbcset->nranges) + /* 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) { - /* There are not enough space, need realloc. */ - wchar_t *new_array_start, *new_array_end; - int 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; - } + /* 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; + int 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; + 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) @@ -2522,6 +2681,7 @@ Return the index of the symbol in the SYMB_TABLE. */ static inline int32_t + __attribute ((always_inline)) seek_collating_symbol_entry (name, name_len) const unsigned char *name; size_t name_len; @@ -2554,25 +2714,26 @@ Return the value if succeeded, UINT_MAX otherwise. */ static inline unsigned int + __attribute ((always_inline)) lookup_collation_sequence_value (br_elem) bracket_elem_t *br_elem; { if (br_elem->type == SB_CHAR) { /* - if (re_mb_cur_max == 1) + 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); + return __collseq_table_lookup (collseqwc, wc); } } else if (br_elem->type == MB_CHAR) { - return collseq_table_lookup (collseqwc, br_elem->opr.wch); + return __collseq_table_lookup (collseqwc, br_elem->opr.wch); } else if (br_elem->type == COLL_SYM) { @@ -2621,13 +2782,10 @@ update it. */ static inline reg_errcode_t -# ifdef RE_ENABLE_I18N + __attribute ((always_inline)) build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem) re_charset_t *mbcset; int *range_alloc; -# else /* not RE_ENABLE_I18N */ - build_range_exp (sbcset, start_elem, end_elem) -# endif /* not RE_ENABLE_I18N */ re_bitset_ptr_t sbcset; bracket_elem_t *start_elem, *end_elem; { @@ -2635,33 +2793,6 @@ uint32_t start_collseq; uint32_t end_collseq; -# ifdef RE_ENABLE_I18N - /* Check the space of the arrays. */ - if (*range_alloc == mbcset->nranges) - { - /* There are not enough space, need realloc. */ - uint32_t *new_array_start; - uint32_t *new_array_end; - int 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, 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; - } -# endif /* RE_ENABLE_I18N */ - /* Equivalence Classes and Character Classes can't be a range start/end. */ if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS @@ -2677,23 +2808,50 @@ if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_collseq > end_collseq, 0)) return REG_ERANGE; -# ifdef RE_ENABLE_I18N - /* Got valid collation sequence values, add them as a new entry. */ - mbcset->range_starts[mbcset->nranges] = start_collseq; - mbcset->range_ends[mbcset->nranges++] = end_collseq; -# endif /* RE_ENABLE_I18N */ + /* 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; + int 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 (re_mb_cur_max == 1) + if (MB_CUR_MAX == 1) */ if (nrules == 0) ch_collseq = collseqmb[ch]; else - ch_collseq = collseq_table_lookup (collseqwc, __btowc (ch)); + ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch)); if (start_collseq <= ch_collseq && ch_collseq <= end_collseq) bitset_set (sbcset, ch); } @@ -2707,13 +2865,10 @@ pointer argument sinse we may update it. */ static inline reg_errcode_t -# ifdef RE_ENABLE_I18N + __attribute ((always_inline)) build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name) re_charset_t *mbcset; int *coll_sym_alloc; -# else /* not RE_ENABLE_I18N */ - build_collating_symbol (sbcset, name) -# endif /* not RE_ENABLE_I18N */ re_bitset_ptr_t sbcset; const unsigned char *name; { @@ -2739,23 +2894,23 @@ else return REG_ECOLLATE; -# ifdef RE_ENABLE_I18N /* Got valid collation sequence, add it as a new entry. */ /* Check the space of the arrays. */ - if (*coll_sym_alloc == mbcset->ncoll_syms) + if (BE (*coll_sym_alloc == mbcset->ncoll_syms, 0)) { /* Not enough, realloc it. */ /* +1 in case of mbcset->ncoll_syms is 0. */ - *coll_sym_alloc = 2 * mbcset->ncoll_syms + 1; + int new_coll_sym_alloc = 2 * mbcset->ncoll_syms + 1; /* Use realloc since mbcset->coll_syms is NULL if *alloc == 0. */ - mbcset->coll_syms = re_realloc (mbcset->coll_syms, int32_t, - *coll_sym_alloc); - if (BE (mbcset->coll_syms == NULL, 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; -# endif /* RE_ENABLE_I18N */ return REG_NOERROR; } else @@ -2777,11 +2932,11 @@ re_charset_t *mbcset; int coll_sym_alloc = 0, range_alloc = 0, mbchar_alloc = 0; int equiv_class_alloc = 0, char_class_alloc = 0; -#else /* not RE_ENABLE_I18N */ - int non_match = 0; #endif /* not RE_ENABLE_I18N */ + int non_match = 0; bin_tree_t *work_tree; - int token_len, new_idx; + int token_len; + int first_round = 1; #ifdef _LIBC collseqmb = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB); @@ -2789,7 +2944,7 @@ if (nrules) { /* - if (re_mb_cur_max > 1) + 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); @@ -2822,11 +2977,9 @@ if (token->type == OP_NON_MATCH_LIST) { #ifdef RE_ENABLE_I18N - int i; mbcset->non_match = 1; -#else /* not RE_ENABLE_I18N */ - non_match = 1; #endif /* not RE_ENABLE_I18N */ + non_match = 1; if (syntax & RE_HAT_LISTS_NOT_NEWLINE) bitset_set (sbcset, '\0'); re_string_skip_bytes (regexp, token_len); /* Skip a token. */ @@ -2836,12 +2989,6 @@ *err = REG_BADPAT; goto parse_bracket_exp_free_return; } -#ifdef RE_ENABLE_I18N - if (re_mb_cur_max > 1) - for (i = 0; i < SBC_MAX; ++i) - if (__btowc (i) == WEOF) - bitset_set (sbcset, i); -#endif /* RE_ENABLE_I18N */ } /* We treat the first ']' as a normal character. */ @@ -2859,43 +3006,50 @@ start_elem.opr.name = start_name_buf; ret = parse_bracket_element (&start_elem, regexp, token, token_len, dfa, - syntax); + syntax, first_round); if (BE (ret != REG_NOERROR, 0)) { *err = ret; goto parse_bracket_exp_free_return; } + first_round = 0; + /* Get information about the next token. We need it in any case. */ 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_CHARSET_RANGE) + + /* Do not check for ranges if we know they are not allowed. */ + if (start_elem.type != CHAR_CLASS && start_elem.type != EQUIV_CLASS) { - re_string_skip_bytes (regexp, token_len); /* Skip '-'. */ - token_len2 = peek_token_bracket (&token2, regexp, syntax); if (BE (token->type == END_OF_RE, 0)) { - *err = REG_BADPAT; + *err = REG_EBRACK; goto parse_bracket_exp_free_return; } - if (token2.type == OP_CLOSE_BRACKET) + if (token->type == OP_CHARSET_RANGE) { - /* We treat the last '-' as a normal character. */ - re_string_skip_bytes (regexp, -token_len); - token->type = CHARACTER; + 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 = 1; } - else - is_range_exp = 1; } if (is_range_exp == 1) { end_elem.opr.name = end_name_buf; ret = parse_bracket_element (&end_elem, regexp, &token2, token_len2, - dfa, syntax); + dfa, syntax, 1); if (BE (ret != REG_NOERROR, 0)) { *err = ret; @@ -2903,16 +3057,19 @@ } 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; - } + +#ifdef _LIBC + *err = build_range_exp (sbcset, mbcset, &range_alloc, + &start_elem, &end_elem); +#else +# ifdef RE_ENABLE_I18N *err = build_range_exp (sbcset, -#ifdef RE_ENABLE_I18N - mbcset, &range_alloc, + dfa->mb_cur_max > 1 ? mbcset : NULL, + &range_alloc, &start_elem, &end_elem); +# else + *err = build_range_exp (sbcset, &start_elem, &end_elem); +# endif #endif /* RE_ENABLE_I18N */ - &start_elem, &end_elem); if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; } @@ -2926,16 +3083,18 @@ #ifdef RE_ENABLE_I18N case MB_CHAR: /* Check whether the array has enough space. */ - if (mbchar_alloc == mbcset->nmbchars) + 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. */ - mbcset->mbchars = re_realloc (mbcset->mbchars, wchar_t, - mbchar_alloc); - if (BE (mbcset->mbchars == NULL, 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; @@ -2959,19 +3118,24 @@ goto parse_bracket_exp_free_return; break; case CHAR_CLASS: - ret = build_charclass (regexp->trans, sbcset, + *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 (ret != REG_NOERROR, 0)) - goto parse_bracket_exp_espace; + 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; } @@ -2979,42 +3143,54 @@ re_string_skip_bytes (regexp, token_len); /* Skip a token. */ /* If it is non-matching list. */ -#ifdef RE_ENABLE_I18N - if (mbcset->non_match) -#else /* not RE_ENABLE_I18N */ if (non_match) -#endif /* not RE_ENABLE_I18N */ 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 /* RE_ENABLE_I18N */ + /* Build a tree for simple bracket. */ br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; - new_idx = re_dfa_add_node (dfa, br_token, 0); - work_tree = create_tree (NULL, NULL, 0, new_idx); - if (BE (new_idx == -1 || work_tree == NULL, 0)) + work_tree = re_dfa_add_tree_node (dfa, NULL, NULL, &br_token); + if (BE (work_tree == NULL, 0)) goto parse_bracket_exp_espace; #ifdef RE_ENABLE_I18N if (mbcset->nmbchars || mbcset->ncoll_syms || mbcset->nequiv_classes - || mbcset->nranges || (re_mb_cur_max > 1 && (mbcset->nchar_classes - || mbcset->non_match))) + || mbcset->nranges || (dfa->mb_cur_max > 1 && (mbcset->nchar_classes + || mbcset->non_match))) { re_token_t alt_token; bin_tree_t *mbc_tree; + int sbc_idx; /* Build a tree for complex bracket. */ + dfa->has_mb_node = 1; + for (sbc_idx = 0; sbc_idx < BITSET_UINTS; ++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_UINTS) + { + re_free (sbcset); + dfa->nodes[work_tree->node_idx].type = COMPLEX_BRACKET; + dfa->nodes[work_tree->node_idx].opr.mbcset = mbcset; + return work_tree; + } br_token.type = COMPLEX_BRACKET; br_token.opr.mbcset = mbcset; - dfa->has_mb_node = 1; - new_idx = re_dfa_add_node (dfa, br_token, 0); - mbc_tree = create_tree (NULL, NULL, 0, new_idx); - if (BE (new_idx == -1 || mbc_tree == NULL, 0)) + mbc_tree = re_dfa_add_tree_node (dfa, NULL, NULL, &br_token); + if (BE (mbc_tree == NULL, 0)) goto parse_bracket_exp_espace; /* Then join them by ALT node. */ - dfa->has_plural_match = 1; alt_token.type = OP_ALT; - new_idx = re_dfa_add_node (dfa, alt_token, 0); - work_tree = create_tree (work_tree, mbc_tree, 0, new_idx); - if (BE (new_idx != -1 && mbc_tree != NULL, 1)) + dfa->has_plural_match = 1; + work_tree = re_dfa_add_tree_node (dfa, work_tree, mbc_tree, &alt_token); + if (BE (mbc_tree != NULL, 1)) return work_tree; } else @@ -3039,13 +3215,15 @@ /* Parse an element in the bracket expression. */ static reg_errcode_t -parse_bracket_element (elem, regexp, token, token_len, dfa, syntax) +parse_bracket_element (elem, regexp, token, token_len, dfa, syntax, + accept_hyphen) bracket_elem_t *elem; re_string_t *regexp; re_token_t *token; int token_len; re_dfa_t *dfa; reg_syntax_t syntax; + int accept_hyphen; { #ifdef RE_ENABLE_I18N int cur_char_size; @@ -3062,6 +3240,17 @@ 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; @@ -3079,14 +3268,18 @@ { unsigned char ch, delim = token->opr.c; int i = 0; + if (re_string_eoi(regexp)) + return REG_EBRACK; for (;; ++i) { - if (re_string_eoi(regexp) || i >= BRACKET_NAME_BUF_SIZE) + 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; @@ -3127,7 +3320,7 @@ re_bitset_ptr_t sbcset; const unsigned char *name; { -#if defined _LIBC && defined RE_ENABLE_I18N +#if defined _LIBC uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { @@ -3179,21 +3372,24 @@ } } /* Check whether the array has enough space. */ - if (*equiv_class_alloc == mbcset->nequiv_classes) + if (BE (*equiv_class_alloc == mbcset->nequiv_classes, 0)) { /* Not enough, realloc it. */ /* +1 in case of mbcset->nequiv_classes is 0. */ - *equiv_class_alloc = 2 * mbcset->nequiv_classes + 1; + int new_equiv_class_alloc = 2 * mbcset->nequiv_classes + 1; /* Use realloc since the array is NULL if *alloc == 0. */ - mbcset->equiv_classes = re_realloc (mbcset->equiv_classes, int32_t, - *equiv_class_alloc); - if (BE (mbcset->equiv_classes == NULL, 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 && RE_ENABLE_I18N */ +#endif /* _LIBC */ { if (BE (strlen ((const char *) name) != 1, 0)) return REG_ECOLLATE; @@ -3216,69 +3412,70 @@ #else /* not RE_ENABLE_I18N */ build_charclass (trans, sbcset, class_name, syntax) #endif /* not RE_ENABLE_I18N */ - RE_TRANSLATE_TYPE trans; + unsigned RE_TRANSLATE_TYPE trans; re_bitset_ptr_t sbcset; - const unsigned char *class_name; + const char *class_name; reg_syntax_t syntax; { 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"; + && (strcmp (class_name, "upper") == 0 || strcmp (class_name, "lower") == 0)) + class_name = "alpha"; #ifdef RE_ENABLE_I18N /* Check the space of the arrays. */ - if (*char_class_alloc == mbcset->nchar_classes) + if (BE (*char_class_alloc == mbcset->nchar_classes, 0)) { /* Not enough, realloc it. */ /* +1 in case of mbcset->nchar_classes is 0. */ - *char_class_alloc = 2 * mbcset->nchar_classes + 1; + int new_char_class_alloc = 2 * mbcset->nchar_classes + 1; /* Use realloc since array is NULL if *alloc == 0. */ - mbcset->char_classes = re_realloc (mbcset->char_classes, wctype_t, - *char_class_alloc); - if (BE (mbcset->char_classes == NULL, 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); + mbcset->char_classes[mbcset->nchar_classes++] = __wctype (class_name); #endif /* RE_ENABLE_I18N */ -#define BUILD_CHARCLASS_LOOP(ctype_func)\ - for (i = 0; i < SBC_MAX; ++i) \ - { \ - if (ctype_func (i)) \ +#define BUILD_CHARCLASS_LOOP(ctype_func) \ + for (i = 0; i < SBC_MAX; ++i) \ + { \ + if (ctype_func (i)) \ { \ int ch = trans ? trans[i] : i; \ bitset_set (sbcset, ch); \ } \ } - if (strcmp (name, "alnum") == 0) + if (strcmp (class_name, "alnum") == 0) BUILD_CHARCLASS_LOOP (isalnum) - else if (strcmp (name, "cntrl") == 0) + else if (strcmp (class_name, "cntrl") == 0) BUILD_CHARCLASS_LOOP (iscntrl) - else if (strcmp (name, "lower") == 0) + else if (strcmp (class_name, "lower") == 0) BUILD_CHARCLASS_LOOP (islower) - else if (strcmp (name, "space") == 0) + else if (strcmp (class_name, "space") == 0) BUILD_CHARCLASS_LOOP (isspace) - else if (strcmp (name, "alpha") == 0) + else if (strcmp (class_name, "alpha") == 0) BUILD_CHARCLASS_LOOP (isalpha) - else if (strcmp (name, "digit") == 0) + else if (strcmp (class_name, "digit") == 0) BUILD_CHARCLASS_LOOP (isdigit) - else if (strcmp (name, "print") == 0) + else if (strcmp (class_name, "print") == 0) BUILD_CHARCLASS_LOOP (isprint) - else if (strcmp (name, "upper") == 0) + else if (strcmp (class_name, "upper") == 0) BUILD_CHARCLASS_LOOP (isupper) - else if (strcmp (name, "blank") == 0) + else if (strcmp (class_name, "blank") == 0) BUILD_CHARCLASS_LOOP (isblank) - else if (strcmp (name, "graph") == 0) + else if (strcmp (class_name, "graph") == 0) BUILD_CHARCLASS_LOOP (isgraph) - else if (strcmp (name, "punct") == 0) + else if (strcmp (class_name, "punct") == 0) BUILD_CHARCLASS_LOOP (ispunct) - else if (strcmp (name, "xdigit") == 0) + else if (strcmp (class_name, "xdigit") == 0) BUILD_CHARCLASS_LOOP (isxdigit) else return REG_ECTYPE; @@ -3287,23 +3484,22 @@ } static bin_tree_t * -build_word_op (dfa, trans, not, err) +build_charclass_op (dfa, trans, class_name, extra, non_match, err) re_dfa_t *dfa; - RE_TRANSLATE_TYPE trans; - int not; + unsigned RE_TRANSLATE_TYPE trans; + const char *class_name; + const char *extra; + int non_match; reg_errcode_t *err; { re_bitset_ptr_t sbcset; #ifdef RE_ENABLE_I18N re_charset_t *mbcset; int alloc = 0; -#else /* not RE_ENABLE_I18N */ - int non_match = 0; #endif /* not RE_ENABLE_I18N */ reg_errcode_t ret; re_token_t br_token; bin_tree_t *tree; - int new_idx; sbcset = (re_bitset_ptr_t) calloc (sizeof (unsigned int), BITSET_UINTS); #ifdef RE_ENABLE_I18N @@ -3320,21 +3516,14 @@ return NULL; } - if (not) + if (non_match) { #ifdef RE_ENABLE_I18N - int i; /* if (syntax & RE_HAT_LISTS_NOT_NEWLINE) bitset_set(cset->sbcset, '\0'); */ mbcset->non_match = 1; - if (re_mb_cur_max > 1) - for (i = 0; i < SBC_MAX; ++i) - if (__btowc (i) == WEOF) - bitset_set (sbcset, i); -#else /* not RE_ENABLE_I18N */ - non_match = 1; #endif /* not RE_ENABLE_I18N */ } @@ -3343,7 +3532,7 @@ #ifdef RE_ENABLE_I18N mbcset, &alloc, #endif /* RE_ENABLE_I18N */ - (const unsigned char *) "alpha", 0); + class_name, 0); if (BE (ret != REG_NOERROR, 0)) { @@ -3355,26 +3544,28 @@ return NULL; } /* \w match '_' also. */ - bitset_set (sbcset, '_'); + for (; *extra; extra++) + bitset_set (sbcset, *extra); /* If it is non-matching list. */ -#ifdef RE_ENABLE_I18N - if (mbcset->non_match) -#else /* not RE_ENABLE_I18N */ if (non_match) -#endif /* not RE_ENABLE_I18N */ 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; - new_idx = re_dfa_add_node (dfa, br_token, 0); - tree = create_tree (NULL, NULL, 0, new_idx); - if (BE (new_idx == -1 || tree == NULL, 0)) + tree = re_dfa_add_tree_node (dfa, NULL, NULL, &br_token); + if (BE (tree == NULL, 0)) goto build_word_op_espace; #ifdef RE_ENABLE_I18N - if (re_mb_cur_max > 1) + if (dfa->mb_cur_max > 1) { re_token_t alt_token; bin_tree_t *mbc_tree; @@ -3382,15 +3573,14 @@ br_token.type = COMPLEX_BRACKET; br_token.opr.mbcset = mbcset; dfa->has_mb_node = 1; - new_idx = re_dfa_add_node (dfa, br_token, 0); - mbc_tree = create_tree (NULL, NULL, 0, new_idx); - if (BE (new_idx == -1 || mbc_tree == NULL, 0)) + mbc_tree = re_dfa_add_tree_node (dfa, NULL, NULL, &br_token); + if (BE (mbc_tree == NULL, 0)) goto build_word_op_espace; /* Then join them by ALT node. */ alt_token.type = OP_ALT; - new_idx = re_dfa_add_node (dfa, alt_token, 0); - tree = create_tree (tree, mbc_tree, 0, new_idx); - if (BE (new_idx != -1 && mbc_tree != NULL, 1)) + dfa->has_plural_match = 1; + tree = re_dfa_add_tree_node (dfa, tree, mbc_tree, &alt_token); + if (BE (mbc_tree != NULL, 1)) return tree; } else @@ -3426,7 +3616,7 @@ unsigned char c; while (1) { - *token = fetch_token (input, syntax); + fetch_token (token, input, syntax); c = token->opr.c; if (BE (token->type == END_OF_RE, 0)) return -2; @@ -3457,24 +3647,29 @@ /* Functions for binary tree operation. */ -/* Create a node of tree. - Note: This function automatically free left and right if malloc fails. */ +/* Create a tree node. */ static bin_tree_t * -create_tree (left, right, type, index) +create_tree (dfa, left, right, type, index) + re_dfa_t *dfa; bin_tree_t *left; bin_tree_t *right; re_token_type_t type; int index; { bin_tree_t *tree; - tree = re_malloc (bin_tree_t, 1); - if (BE (tree == NULL, 0)) + if (BE (dfa->str_tree_storage_idx == BIN_TREE_STORAGE_SIZE, 0)) { - free_bin_tree (left); - free_bin_tree (right); - return NULL; + 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; @@ -3491,20 +3686,66 @@ return tree; } -/* Free the sub tree pointed by TREE. */ +/* Create both a DFA node and a tree for it. */ + +static bin_tree_t * +re_dfa_add_tree_node (dfa, left, right, token) + re_dfa_t *dfa; + bin_tree_t *left; + bin_tree_t *right; + const re_token_t *token; +{ + int new_idx = re_dfa_add_node (dfa, *token, 0); + + if (new_idx == -1) + return NULL; + + return create_tree (dfa, left, right, 0, new_idx); +} + +/* Mark the tree SRC as an optional subexpression. */ static void -free_bin_tree (tree) - bin_tree_t *tree; +mark_opt_subexp (src, dfa) + const bin_tree_t *src; + re_dfa_t *dfa; { - if (tree == NULL) - return; - /*re_node_set_free (&tree->eclosure);*/ - free_bin_tree (tree->left); - free_bin_tree (tree->right); - re_free (tree); + /* Pass an OPT_SUBEXP_IDX which is != 1 if the duplicated tree is + a subexpression. */ + if (src->type == CONCAT + && src->left->type == NON_TYPE + && dfa->nodes[src->left->node_idx].type == OP_OPEN_SUBEXP) + mark_opt_subexp_iter (src, dfa, dfa->nodes[src->left->node_idx].opr.idx); } + +/* Recursive tree walker for mark_opt_subexp. */ + +static void +mark_opt_subexp_iter (src, dfa, idx) + const bin_tree_t *src; + re_dfa_t *dfa; + int idx; +{ + int node_idx; + + if (src->type == NON_TYPE) + { + node_idx = src->node_idx; + if ((dfa->nodes[node_idx].type == OP_OPEN_SUBEXP + || dfa->nodes[node_idx].type == OP_CLOSE_SUBEXP) + && dfa->nodes[node_idx].opr.idx == idx) + dfa->nodes[node_idx].opt_subexp = 1; + } + + if (src->left != NULL) + mark_opt_subexp_iter (src->left, dfa, idx); + + if (src->right != NULL) + mark_opt_subexp_iter (src->right, dfa, idx); +} + + /* Duplicate the node SRC, and return new node. */ static bin_tree_t * @@ -3528,10 +3769,7 @@ { right = duplicate_tree (src->right, dfa); if (right == NULL) - { - free_bin_tree (left); - return NULL; - } + return NULL; } /* At last, duplicate itself. */ @@ -3540,20 +3778,11 @@ new_node_idx = re_dfa_add_node (dfa, dfa->nodes[src->node_idx], 0); dfa->nodes[new_node_idx].duplicated = 1; if (BE (new_node_idx == -1, 0)) - { - free_bin_tree (left); - free_bin_tree (right); - return NULL; - } + return NULL; } else new_node_idx = src->type; - new_tree = create_tree (left, right, src->type, new_node_idx); - if (BE (new_tree == NULL, 0)) - { - free_bin_tree (left); - free_bin_tree (right); - } + new_tree = create_tree (dfa, left, right, src->type, new_node_idx); return new_tree; } diff -urN gawk-3.1.3/regex.c gawk-3.1.4/regex.c --- gawk-3.1.3/regex.c 2003-05-11 15:21:17.000000000 +0300 +++ gawk-3.1.4/regex.c 2004-01-15 15:27:40.000000000 +0200 @@ -18,27 +18,57 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifdef _AIX +#pragma alloca +#else +# ifndef allocax /* predefined by HP cc +Olibcalls */ +# ifdef __GNUC__ +# define alloca(size) __builtin_alloca (size) +# else +# if HAVE_ALLOCA_H +# include +# else +# ifdef __hpux + void *alloca (); +# else +# if !defined __OS2__ && !defined WIN32 + char *alloca (); +# else +# include /* OS/2 defines alloca in here */ +# endif +# endif +# endif +# endif +# endif +#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) \ +# 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) \ +# 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) \ +# 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) \ +# define re_match(bufp, string, size, pos, regs) \ __re_match (bufp, string, size, pos, regs) -# define re_search(bufp, string, size, startpos, range, 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) \ +# 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) \ +# 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) +# define re_compile_fastmap(bufp) __re_compile_fastmap (bufp) + +# include "../locale/localeinfo.h" #endif #ifdef HAVE_CONFIG_H diff -urN gawk-3.1.3/regex.h gawk-3.1.4/regex.h --- gawk-3.1.3/regex.h 2003-02-25 11:58:52.000000000 +0200 +++ gawk-3.1.4/regex.h 2004-01-07 15:45:34.000000000 +0200 @@ -1,6 +1,6 @@ /* Definitions for data structures and routines for the regular expression library. - Copyright (C) 1985,1989-93,1995-98,2000,2001,2002 + Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -22,6 +22,8 @@ #ifndef _REGEX_H #define _REGEX_H 1 +#include + /* Allow the use in C++ code. */ #ifdef __cplusplus extern "C" { @@ -168,6 +170,15 @@ 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 an bre or + immediately after an alternation or begin-group operator. */ +#define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1) + /* 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 @@ -222,7 +233,7 @@ | RE_INTERVALS | RE_NO_EMPTY_RANGES) #define RE_SYNTAX_POSIX_BASIC \ - (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM) + (_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 diff -urN gawk-3.1.3/regex_internal.c gawk-3.1.4/regex_internal.c --- gawk-3.1.3/regex_internal.c 2003-02-25 15:00:30.000000000 +0200 +++ gawk-3.1.4/regex_internal.c 2004-02-24 11:56:48.000000000 +0200 @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -18,27 +18,28 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -static void re_string_construct_common _RE_ARGS((const char *str, int len, +static void re_string_construct_common (const char *str, int len, re_string_t *pstr, - RE_TRANSLATE_TYPE trans, int icase)); + RE_TRANSLATE_TYPE trans, int icase, + const re_dfa_t *dfa) internal_function; #ifdef RE_ENABLE_I18N -static int re_string_skip_chars _RE_ARGS((re_string_t *pstr, int new_raw_idx, - wint_t *last_wc)); +static int re_string_skip_chars (re_string_t *pstr, int new_raw_idx, + wint_t *last_wc) internal_function; #endif /* RE_ENABLE_I18N */ -static re_dfastate_t *create_newstate_common _RE_ARGS((re_dfa_t *dfa, +static re_dfastate_t *create_newstate_common (re_dfa_t *dfa, const re_node_set *nodes, - unsigned int hash)); -static reg_errcode_t register_state _RE_ARGS((re_dfa_t *dfa, re_dfastate_t *newstate, - unsigned int hash)); -static re_dfastate_t *create_ci_newstate _RE_ARGS((re_dfa_t *dfa, + unsigned int hash) internal_function; +static reg_errcode_t register_state (re_dfa_t *dfa, re_dfastate_t *newstate, + unsigned int hash) internal_function; +static re_dfastate_t *create_ci_newstate (re_dfa_t *dfa, const re_node_set *nodes, - unsigned int hash)); -static re_dfastate_t *create_cd_newstate _RE_ARGS((re_dfa_t *dfa, + unsigned int hash) internal_function; +static re_dfastate_t *create_cd_newstate (re_dfa_t *dfa, const re_node_set *nodes, unsigned int context, - unsigned int hash)); -static inline unsigned int calc_state_hash _RE_ARGS((const re_node_set *nodes, - unsigned int context)); + unsigned int hash) internal_function; +static unsigned int inline calc_state_hash (const re_node_set *nodes, + unsigned int context) internal_function; /* Functions for string operation. */ @@ -46,46 +47,47 @@ re_string_reconstruct before using the object. */ static reg_errcode_t -re_string_allocate (pstr, str, len, init_len, trans, icase) +re_string_allocate (pstr, str, len, init_len, trans, icase, dfa) re_string_t *pstr; const char *str; int len, init_len, icase; RE_TRANSLATE_TYPE trans; + const re_dfa_t *dfa; { reg_errcode_t ret; - int init_buf_len = (len + 1 < init_len) ? len + 1: init_len; - re_string_construct_common (str, len, pstr, trans, icase); - pstr->stop = pstr->len; + int 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->mbs_case = (MBS_CASE_ALLOCATED (pstr) ? pstr->mbs_case - : (unsigned char *) str); - pstr->mbs = MBS_ALLOCATED (pstr) ? pstr->mbs : pstr->mbs_case; - pstr->valid_len = (MBS_CASE_ALLOCATED (pstr) || MBS_ALLOCATED (pstr) -#ifdef RE_ENABLE_I18N - || re_mb_cur_max > 1 -#endif - ) ? pstr->valid_len : len; + 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 -re_string_construct (pstr, str, len, trans, icase) +re_string_construct (pstr, str, len, trans, icase, dfa) re_string_t *pstr; const char *str; int len, icase; RE_TRANSLATE_TYPE trans; + const re_dfa_t *dfa; { reg_errcode_t ret; - re_string_construct_common (str, len, pstr, trans, icase); - pstr->stop = pstr->len; - /* Set 0 so that this function can initialize whole buffers. */ - pstr->valid_len = 0; + memset (pstr, '\0', sizeof (re_string_t)); + re_string_construct_common (str, len, pstr, trans, icase, dfa); if (len > 0) { @@ -93,15 +95,27 @@ if (BE (ret != REG_NOERROR, 0)) return ret; } - pstr->mbs_case = (MBS_CASE_ALLOCATED (pstr) ? pstr->mbs_case - : (unsigned char *) str); - pstr->mbs = MBS_ALLOCATED (pstr) ? pstr->mbs : pstr->mbs_case; + pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; if (icase) { #ifdef RE_ENABLE_I18N - if (re_mb_cur_max > 1) - build_wcs_upper_buffer (pstr); + 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); @@ -109,7 +123,7 @@ else { #ifdef RE_ENABLE_I18N - if (re_mb_cur_max > 1) + if (dfa->mb_cur_max > 1) build_wcs_buffer (pstr); else #endif /* RE_ENABLE_I18N */ @@ -117,12 +131,13 @@ if (trans != NULL) re_string_translate_buffer (pstr); else - pstr->valid_len = len; + { + pstr->valid_len = pstr->bufs_len; + pstr->valid_raw_len = pstr->bufs_len; + } } } - /* Initialized whole buffers, then valid_len == bufs_len. */ - pstr->valid_len = pstr->bufs_len; return REG_NOERROR; } @@ -134,15 +149,22 @@ int new_buf_len; { #ifdef RE_ENABLE_I18N - if (re_mb_cur_max > 1) + if (pstr->mb_cur_max > 1) { wint_t *new_array = re_realloc (pstr->wcs, wint_t, new_buf_len); if (BE (new_array == NULL, 0)) return REG_ESPACE; pstr->wcs = new_array; + if (pstr->offsets != NULL) + { + int *new_array = re_realloc (pstr->offsets, int, new_buf_len); + if (BE (new_array == NULL, 0)) + return REG_ESPACE; + pstr->offsets = new_array; + } } #endif /* RE_ENABLE_I18N */ - if (MBS_ALLOCATED (pstr)) + if (pstr->mbs_allocated) { unsigned char *new_array = re_realloc (pstr->mbs, unsigned char, new_buf_len); @@ -150,34 +172,31 @@ return REG_ESPACE; pstr->mbs = new_array; } - if (MBS_CASE_ALLOCATED (pstr)) - { - unsigned char *new_array = re_realloc (pstr->mbs_case, unsigned char, - new_buf_len); - if (BE (new_array == NULL, 0)) - return REG_ESPACE; - pstr->mbs_case = new_array; - if (!MBS_ALLOCATED (pstr)) - pstr->mbs = pstr->mbs_case; - } pstr->bufs_len = new_buf_len; return REG_NOERROR; } static void -re_string_construct_common (str, len, pstr, trans, icase) +re_string_construct_common (str, len, pstr, trans, icase, dfa) const char *str; int len; re_string_t *pstr; RE_TRANSLATE_TYPE trans; int icase; + const re_dfa_t *dfa; { - memset (pstr, '\0', sizeof (re_string_t)); pstr->raw_mbs = (const unsigned char *) str; pstr->len = len; - pstr->trans = trans; + pstr->raw_len = len; + pstr->trans = (unsigned RE_TRANSLATE_TYPE) trans; pstr->icase = icase ? 1 : 0; + 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 @@ -197,18 +216,39 @@ build_wcs_buffer (pstr) re_string_t *pstr; { +#ifdef _LIBC + unsigned char buf[pstr->mb_cur_max]; +#else + unsigned char buf[64]; +#endif mbstate_t prev_st; int byte_idx, end_idx, mbclen, remain_len; + /* 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; + 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; - mbclen = mbrtowc (&wc, ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx - + byte_idx), remain_len, &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->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. */ @@ -220,15 +260,11 @@ /* 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; } - /* Apply the translateion if we need. */ - if (pstr->trans != NULL && mbclen == 1) - { - int ch = pstr->trans[pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]]; - pstr->mbs_case[byte_idx] = ch; - } /* Write wide character and padding. */ pstr->wcs[byte_idx++] = wc; /* Write paddings. */ @@ -236,62 +272,224 @@ 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 void +static int build_wcs_upper_buffer (pstr) re_string_t *pstr; { mbstate_t prev_st; - int byte_idx, end_idx, mbclen, remain_len; - /* 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;) + int src_idx, byte_idx, end_idx, mbclen, remain_len; +#ifdef _LIBC + unsigned char buf[pstr->mb_cur_max]; +#else + unsigned char buf[64]; +#endif + + byte_idx = pstr->valid_len; + end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; + +#ifdef _LIBC + /* The following optimization assumes that the wchar_t encoding is + always ISO 10646. */ + if (! pstr->map_notascii && pstr->trans == NULL && !pstr->offsets_needed) { - wchar_t wc; - 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, 0)) + while (byte_idx < end_idx) { - /* The buffer doesn't have enough space, finish to build. */ - pstr->cur_state = prev_st; - break; - } - else if (mbclen == 1 || mbclen == (size_t) -1 || mbclen == 0) - { - /* In case of a singlebyte character. */ - int ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; - /* Apply the translateion if we need. */ - if (pstr->trans != NULL && mbclen == 1) + wchar_t wc; + + if (isascii (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]) + && mbsinit (&pstr->cur_state)) { - ch = pstr->trans[ch]; - pstr->mbs_case[byte_idx] = ch; + /* 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 + with ISO 10646: 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 > 0, 1)) + { + wchar_t wcu = wc; + if (iswlower (wc)) + { + int 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; } - pstr->wcs[byte_idx] = iswlower (wc) ? toupper (wc) : wc; - pstr->mbs[byte_idx++] = islower (ch) ? toupper (ch) : ch; - if (BE (mbclen == (size_t) -1, 0)) - pstr->cur_state = prev_st; - } - else /* mbclen > 1 */ - { - if (iswlower (wc)) - wcrtomb ((char *) pstr->mbs + byte_idx, towupper (wc), &prev_st); else - memcpy (pstr->mbs + byte_idx, - pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx, mbclen); - pstr->wcs[byte_idx++] = iswlower (wc) ? toupper (wc) : wc; - /* Write paddings. */ - for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) - pstr->wcs[byte_idx++] = WEOF; + { + /* 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 +#endif + for (src_idx = pstr->valid_raw_len; byte_idx < end_idx;) + { + wchar_t wc; + const char *p; +#ifdef _LIBC +offsets_needed: +#endif + 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 > 0, 1)) + { + wchar_t wcu = wc; + if (iswlower (wc)) + { + int mbcdlen; + + wcu = towupper (wc); + mbcdlen = wcrtomb ((char *)buf, wcu, &prev_st); + if (BE (mbclen == mbcdlen, 1)) + memcpy (pstr->mbs + byte_idx, buf, mbclen); + else + { + int i; + + if (byte_idx + mbcdlen > pstr->bufs_len) + { + pstr->cur_state = prev_st; + break; + } + + if (pstr->offsets == NULL) + { + pstr->offsets = re_malloc (int, pstr->bufs_len); + + if (pstr->offsets == NULL) + return REG_ESPACE; + } + if (!pstr->offsets_needed) + { + for (i = 0; i < 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); + + if (BE (pstr->offsets_needed != 0, 0)) + { + int 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. @@ -308,7 +506,7 @@ wchar_t wc = 0; /* Skip the characters which are not necessary to check. */ - for (rawbuf_idx = pstr->raw_mbs_idx + pstr->valid_len; + for (rawbuf_idx = pstr->raw_mbs_idx + pstr->valid_raw_len; rawbuf_idx < new_raw_idx;) { int remain_len; @@ -343,17 +541,15 @@ for (char_idx = pstr->valid_len; char_idx < end_idx; ++char_idx) { int ch = pstr->raw_mbs[pstr->raw_mbs_idx + char_idx]; - if (pstr->trans != NULL) - { - ch = pstr->trans[ch]; - pstr->mbs_case[char_idx] = ch; - } + 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. */ @@ -368,37 +564,39 @@ 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_case[buf_idx] = pstr->trans[ch]; + 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 re_mb_cur_max > 1, + 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 -re_string_reconstruct (pstr, idx, eflags, newline) +re_string_reconstruct (pstr, idx, eflags) re_string_t *pstr; - int idx, eflags, newline; + int idx, eflags; { int offset = idx - pstr->raw_mbs_idx; if (offset < 0) { /* Reset buffer. */ #ifdef RE_ENABLE_I18N - if (re_mb_cur_max > 1) + if (pstr->mb_cur_max > 1) memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); #endif /* RE_ENABLE_I18N */ - pstr->len += pstr->raw_mbs_idx; - pstr->stop += pstr->raw_mbs_idx; - pstr->valid_len = pstr->raw_mbs_idx = 0; + 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 (!MBS_CASE_ALLOCATED (pstr)) - pstr->mbs_case = (unsigned char *) pstr->raw_mbs; - if (!MBS_ALLOCATED (pstr) && !MBS_CASE_ALLOCATED (pstr)) + if (!pstr->mbs_allocated) pstr->mbs = (unsigned char *) pstr->raw_mbs; offset = idx; } @@ -406,23 +604,26 @@ if (offset != 0) { /* Are the characters which are already checked remain? */ - if (offset < pstr->valid_len) + if (offset < pstr->valid_raw_len +#ifdef RE_ENABLE_I18N + /* Handling this would enlarge the code too much. + Accept a slowdown in that case. */ + && pstr->offsets_needed == 0 +#endif + ) { /* Yes, move them to the front of the buffer. */ - pstr->tip_context = re_string_context_at (pstr, offset - 1, eflags, - newline); + pstr->tip_context = re_string_context_at (pstr, offset - 1, eflags); #ifdef RE_ENABLE_I18N - if (re_mb_cur_max > 1) + if (pstr->mb_cur_max > 1) memmove (pstr->wcs, pstr->wcs + offset, (pstr->valid_len - offset) * sizeof (wint_t)); #endif /* RE_ENABLE_I18N */ - if (MBS_ALLOCATED (pstr)) + if (pstr->mbs_allocated) memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); - if (MBS_CASE_ALLOCATED (pstr)) - memmove (pstr->mbs_case, pstr->mbs_case + offset, - pstr->valid_len - offset); pstr->valid_len -= offset; + pstr->valid_raw_len -= offset; #if DEBUG assert (pstr->valid_len > 0); #endif @@ -430,19 +631,78 @@ else { /* No, skip all characters until IDX. */ +#ifdef RE_ENABLE_I18N + 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; + pstr->valid_raw_len = 0; #ifdef RE_ENABLE_I18N - if (re_mb_cur_max > 1) + if (pstr->mb_cur_max > 1) { int wcs_idx; - wint_t wc; - pstr->valid_len = re_string_skip_chars (pstr, idx, &wc) - idx; - for (wcs_idx = 0; wcs_idx < pstr->valid_len; ++wcs_idx) - pstr->wcs[wcs_idx] = WEOF; - if (pstr->trans && wc <= 0xff) - wc = pstr->trans[wc]; - pstr->tip_context = (IS_WIDE_WORD_CHAR (wc) ? CONTEXT_WORD - : ((newline && IS_WIDE_NEWLINE (wc)) + wint_t wc = WEOF; + +#ifdef _LIBC + if (pstr->is_utf8) + { + const unsigned char *raw, *p, *q, *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); + for (p = raw + offset - 1; p >= end; --p) + if ((*p & 0xc0) != 0x80) + { + mbstate_t cur_state; + wchar_t wc2; + int mlen = raw + pstr->len - p; + unsigned char buf[6]; + + q = p; + if (BE (pstr->trans != NULL, 0)) + { + int i = mlen < 6 ? mlen : 6; + while (--i >= 0) + buf[i] = pstr->trans[p[i]]; + q = buf; + } + /* XXX Don't use mbrtowc, we know which conversion + to use (UTF-8 -> UCS4). */ + memset (&cur_state, 0, sizeof (cur_state)); + mlen = mbrtowc (&wc2, p, mlen, &cur_state) + - (raw + offset - p); + if (mlen >= 0) + { + memset (&pstr->cur_state, '\0', + sizeof (mbstate_t)); + pstr->valid_len = mlen; + wc = wc2; + } + break; + } + } +#endif + if (wc == WEOF) + pstr->valid_len = re_string_skip_chars (pstr, idx, &wc) - idx; + 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; + 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)); } else @@ -451,18 +711,14 @@ int c = pstr->raw_mbs[pstr->raw_mbs_idx + offset - 1]; if (pstr->trans) c = pstr->trans[c]; - pstr->tip_context = (IS_WORD_CHAR (c) ? CONTEXT_WORD - : ((newline && IS_NEWLINE (c)) + pstr->tip_context = (bitset_contain (pstr->word_char, c) + ? CONTEXT_WORD + : ((IS_NEWLINE (c) && pstr->newline_anchor) ? CONTEXT_NEWLINE : 0)); } } - if (!MBS_CASE_ALLOCATED (pstr)) - { - pstr->mbs_case += offset; - /* In case of !MBS_ALLOCATED && !MBS_CASE_ALLOCATED. */ - if (!MBS_ALLOCATED (pstr)) - pstr->mbs += offset; - } + if (!pstr->mbs_allocated) + pstr->mbs += offset; } pstr->raw_mbs_idx = idx; pstr->len -= offset; @@ -470,10 +726,14 @@ /* Then build the buffers. */ #ifdef RE_ENABLE_I18N - if (re_mb_cur_max > 1) + if (pstr->mb_cur_max > 1) { if (pstr->icase) - build_wcs_upper_buffer (pstr); + { + int ret = build_wcs_upper_buffer (pstr); + if (BE (ret != REG_NOERROR, 0)) + return ret; + } else build_wcs_buffer (pstr); } @@ -484,31 +744,106 @@ 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 +re_string_peek_byte_case (pstr, idx) + const re_string_t *pstr; + int idx; +{ + int ch, 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 +re_string_fetch_byte_case (pstr) + re_string_t *pstr; +{ + if (BE (!pstr->mbs_allocated, 1)) + return re_string_fetch_byte (pstr); + +#ifdef RE_ENABLE_I18N + if (pstr->offsets_needed) + { + int off, 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 re_string_destruct (pstr) re_string_t *pstr; { #ifdef RE_ENABLE_I18N re_free (pstr->wcs); + re_free (pstr->offsets); #endif /* RE_ENABLE_I18N */ - if (MBS_ALLOCATED (pstr)) + if (pstr->mbs_allocated) re_free (pstr->mbs); - if (MBS_CASE_ALLOCATED (pstr)) - re_free (pstr->mbs_case); } /* Return the context at IDX in INPUT. */ static unsigned int -re_string_context_at (input, idx, eflags, newline_anchor) +re_string_context_at (input, idx, eflags) const re_string_t *input; - int idx, eflags, newline_anchor; + int idx, eflags; { int c; if (idx < 0 || idx == input->len) @@ -522,7 +857,7 @@ : CONTEXT_NEWLINE | CONTEXT_ENDBUF); } #ifdef RE_ENABLE_I18N - if (re_mb_cur_max > 1) + if (input->mb_cur_max > 1) { wint_t wc; int wc_idx = idx; @@ -537,17 +872,18 @@ return input->tip_context; } wc = input->wcs[wc_idx]; - if (IS_WIDE_WORD_CHAR (wc)) + if (BE (input->word_ops_used != 0, 0) && IS_WIDE_WORD_CHAR (wc)) return CONTEXT_WORD; - return (newline_anchor && IS_WIDE_NEWLINE (wc)) ? CONTEXT_NEWLINE : 0; + return (IS_WIDE_NEWLINE (wc) && input->newline_anchor + ? CONTEXT_NEWLINE : 0); } else #endif { c = re_string_byte_at (input, idx); - if (IS_WORD_CHAR (c)) + if (bitset_contain (input->word_char, c)) return CONTEXT_WORD; - return (newline_anchor && IS_NEWLINE (c)) ? CONTEXT_NEWLINE : 0; + return IS_NEWLINE (c) && input->newline_anchor ? CONTEXT_NEWLINE : 0; } } @@ -645,43 +981,86 @@ re_node_set *dest; const re_node_set *src1, *src2; { - int i1, i2, id; - if (src1->nelem > 0 && src2->nelem > 0) + int 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) + { + int new_alloc = src1->nelem + src2->nelem + dest->alloc; + int *new_elems = re_realloc (dest->elems, int, 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->nelem + src2->nelem + dest->nelem > dest->alloc) + if (src1->elems[i1] == src2->elems[i2]) { - dest->alloc = src1->nelem + src2->nelem + dest->nelem; - dest->elems = re_realloc (dest->elems, int, dest->alloc); - if (BE (dest->elems == NULL, 0)) - return REG_ESPACE; + /* Try to find the item in DEST. Maybe we could binary search? */ + while (id >= 0 && dest->elems[id] > src1->elems[i1]) + --id; + + if (id < 0 || dest->elems[id] != src1->elems[i1]) + dest->elems[--sbase] = src1->elems[i1]; + + if (--i1 < 0 || --i2 < 0) + break; } - } - else - return REG_NOERROR; - for (i1 = i2 = id = 0 ; i1 < src1->nelem && i2 < src2->nelem ;) - { - if (src1->elems[i1] > src2->elems[i2]) + /* Lower the highest of the two items. */ + else if (src1->elems[i1] < src2->elems[i2]) { - ++i2; - continue; + if (--i2 < 0) + break; } - if (src1->elems[i1] == src2->elems[i2]) + else { - while (id < dest->nelem && dest->elems[id] < src2->elems[i2]) - ++id; - if (id < dest->nelem && dest->elems[id] == src2->elems[i2]) - ++id; - else - { - memmove (dest->elems + id + 1, dest->elems + id, - sizeof (int) * (dest->nelem - id)); - dest->elems[id++] = src2->elems[i2++]; - ++dest->nelem; - } + if (--i1 < 0) + break; } - ++i1; } + + 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 && id >= 0) + 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 (--id < 0) + break; + } + } + + /* Copy remaining SRC elements. */ + memcpy (dest->elems, dest->elems + sbase, delta * sizeof (int)); + return REG_NOERROR; } @@ -746,70 +1125,83 @@ re_node_set *dest; const re_node_set *src; { - int si, di; + int is, id, sbase, delta; if (src == NULL || src->nelem == 0) return REG_NOERROR; - if (dest->alloc < src->nelem + dest->nelem) + if (dest->alloc < 2 * src->nelem + dest->nelem) { - int *new_buffer; - dest->alloc = 2 * (src->nelem + dest->alloc); - new_buffer = re_realloc (dest->elems, int, dest->alloc); + int new_alloc = 2 * (src->nelem + dest->alloc); + int *new_buffer = re_realloc (dest->elems, int, new_alloc); if (BE (new_buffer == NULL, 0)) return REG_ESPACE; dest->elems = new_buffer; + dest->alloc = new_alloc; } - for (si = 0, di = 0 ; si < src->nelem && di < dest->nelem ;) + if (BE (dest->nelem == 0, 0)) { - int cp_from, ncp, mid, right, src_elem = src->elems[si]; - /* Binary search the spot we will add the new element. */ - right = dest->nelem; - while (di < right) - { - mid = (di + right) / 2; - if (dest->elems[mid] < src_elem) - di = mid + 1; - else - right = mid; - } - if (di >= dest->nelem) - break; + dest->nelem = src->nelem; + memcpy (dest->elems, src->elems, src->nelem * sizeof (int)); + return REG_NOERROR; + } - if (dest->elems[di] == src_elem) - { - /* Skip since, DEST already has the element. */ - ++di; - ++si; - continue; - } + /* 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; is >= 0 && id >= 0; ) + { + 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 (is >= 0) + { + /* If DEST is exhausted, the remaining items of SRC must be unique. */ + sbase -= is + 1; + memcpy (dest->elems + sbase, src->elems, (is + 1) * sizeof (int)); + } + + id = dest->nelem - 1; + is = dest->nelem + 2 * src->nelem - 1; + delta = is - sbase + 1; + if (delta == 0) + return REG_NOERROR; - /* Skip the src elements which are less than dest->elems[di]. */ - cp_from = si; - while (si < src->nelem && src->elems[si] < dest->elems[di]) - ++si; - /* Copy these src elements. */ - ncp = si - cp_from; - memmove (dest->elems + di + ncp, dest->elems + di, - sizeof (int) * (dest->nelem - di)); - memcpy (dest->elems + di, src->elems + cp_from, - sizeof (int) * ncp); - /* Update counters. */ - di += ncp; - dest->nelem += ncp; - } - - /* Copy remaining src elements. */ - if (si < src->nelem) - { - memcpy (dest->elems + di, src->elems + si, - sizeof (int) * (src->nelem - si)); - dest->nelem += src->nelem - si; + /* 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 (--id < 0) + { + /* Copy remaining SRC elements. */ + memcpy (dest->elems, dest->elems + sbase, + delta * sizeof (int)); + break; + } + } } + return REG_NOERROR; } /* Insert the new element ELEM to the re_node_set* SET. - return 0 if SET already has ELEM, + SET should not already have ELEM. return -1 if an error is occured, return 1 otherwise. */ static int @@ -817,9 +1209,9 @@ re_node_set *set; int elem; { - int idx, right, mid; - /* In case of the set is empty. */ - if (set->elems == NULL || set->alloc == 0) + int idx; + /* In case the set is empty. */ + if (set->alloc == 0) { if (BE (re_node_set_init_1 (set, elem) == REG_NOERROR, 1)) return 1; @@ -827,43 +1219,39 @@ return -1; } - /* Binary search the spot we will add the new element. */ - idx = 0; - right = set->nelem; - while (idx < right) + if (BE (set->nelem, 0) == 0) { - mid = (idx + right) / 2; - if (set->elems[mid] < elem) - idx = mid + 1; - else - right = mid; + /* We already guaranteed above that set->alloc != 0. */ + set->elems[0] = elem; + ++set->nelem; + return 1; } /* Realloc if we need. */ - if (set->alloc < set->nelem + 1) + if (set->alloc == set->nelem) { int *new_array; set->alloc = set->alloc * 2; - new_array = re_malloc (int, set->alloc); + new_array = re_realloc (set->elems, int, set->alloc); if (BE (new_array == NULL, 0)) return -1; - /* Copy the elements they are followed by the new element. */ - if (idx > 0) - memcpy (new_array, set->elems, sizeof (int) * (idx)); - /* Copy the elements which follows the new element. */ - if (set->nelem - idx > 0) - memcpy (new_array + idx + 1, set->elems + idx, - sizeof (int) * (set->nelem - idx)); - re_free (set->elems); set->elems = new_array; } + + /* 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 { - /* Move the elements which follows the new element. */ - if (set->nelem - idx > 0) - memmove (set->elems + idx + 1, set->elems + idx, - sizeof (int) * (set->nelem - idx)); + 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; @@ -871,7 +1259,7 @@ } /* Compare two node sets SET1 and SET2. - return 1 if SET1 and SET2 are equivalent, retrun 0 otherwise. */ + return 1 if SET1 and SET2 are equivalent, return 0 otherwise. */ static int re_node_set_compare (set1, set2) @@ -880,7 +1268,7 @@ int i; if (set1 == NULL || set2 == NULL || set1->nelem != set2->nelem) return 0; - for (i = 0 ; i < set1->nelem ; i++) + for (i = set1->nelem ; --i >= 0 ; ) if (set1->elems[i] != set2->elems[i]) return 0; return 1; @@ -918,10 +1306,9 @@ { if (idx < 0 || idx >= set->nelem) return; - if (idx < set->nelem - 1) - memmove (set->elems + idx, set->elems + idx + 1, - sizeof (int) * (set->nelem - idx - 1)); --set->nelem; + for (; idx < set->nelem; idx++) + set->elems[idx] = set->elems[idx + 1]; } @@ -934,27 +1321,26 @@ re_token_t token; int mode; { - if (dfa->nodes_len >= dfa->nodes_alloc) + if (BE (dfa->nodes_len >= dfa->nodes_alloc, 0)) { - re_token_t *new_array; - dfa->nodes_alloc *= 2; - new_array = re_realloc (dfa->nodes, re_token_t, dfa->nodes_alloc); + int new_nodes_alloc = dfa->nodes_alloc * 2; + re_token_t *new_array = re_realloc (dfa->nodes, re_token_t, + new_nodes_alloc); if (BE (new_array == NULL, 0)) return -1; - else - dfa->nodes = new_array; + dfa->nodes = new_array; if (mode) { int *new_nexts, *new_indices; re_node_set *new_edests, *new_eclosures, *new_inveclosures; - new_nexts = re_realloc (dfa->nexts, int, dfa->nodes_alloc); - new_indices = re_realloc (dfa->org_indices, int, dfa->nodes_alloc); - new_edests = re_realloc (dfa->edests, re_node_set, dfa->nodes_alloc); + new_nexts = re_realloc (dfa->nexts, int, new_nodes_alloc); + new_indices = re_realloc (dfa->org_indices, int, new_nodes_alloc); + new_edests = re_realloc (dfa->edests, re_node_set, new_nodes_alloc); new_eclosures = re_realloc (dfa->eclosures, re_node_set, - dfa->nodes_alloc); + new_nodes_alloc); new_inveclosures = re_realloc (dfa->inveclosures, re_node_set, - dfa->nodes_alloc); + new_nodes_alloc); if (BE (new_nexts == NULL || new_indices == NULL || new_edests == NULL || new_eclosures == NULL || new_inveclosures == NULL, 0)) @@ -965,8 +1351,10 @@ dfa->eclosures = new_eclosures; dfa->inveclosures = new_inveclosures; } + dfa->nodes_alloc = new_nodes_alloc; } dfa->nodes[dfa->nodes_len] = token; + dfa->nodes[dfa->nodes_len].opt_subexp = 0; dfa->nodes[dfa->nodes_len].duplicated = 0; dfa->nodes[dfa->nodes_len].constraint = 0; return dfa->nodes_len++; @@ -1063,10 +1451,9 @@ 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->entrance_nodes, nodes) - && state->context == context) + 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. */ @@ -1101,7 +1488,6 @@ return NULL; } newstate->trtable = NULL; - newstate->trtable_search = NULL; newstate->hash = hash; return newstate; } @@ -1118,14 +1504,15 @@ struct re_state_table_entry *spot; spot = dfa->state_table + (hash & dfa->state_hash_mask); - if (spot->alloc <= spot->num) + if (BE (spot->alloc <= spot->num, 0)) { - re_dfastate_t **new_array; - spot->alloc = 2 * spot->num + 2; - new_array = re_realloc (spot->array, re_dfastate_t *, spot->alloc); + int 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; @@ -1160,7 +1547,8 @@ newstate->halt = 1; #ifdef RE_ENABLE_I18N else if (type == COMPLEX_BRACKET - || (type == OP_PERIOD && re_mb_cur_max > 1)) + || type == OP_UTF8_PERIOD + || (type == OP_PERIOD && dfa->mb_cur_max > 1)) newstate->accept_mb = 1; #endif /* RE_ENABLE_I18N */ else if (type == OP_BACK_REF) @@ -1211,7 +1599,8 @@ newstate->halt = 1; #ifdef RE_ENABLE_I18N else if (type == COMPLEX_BRACKET - || (type == OP_PERIOD && re_mb_cur_max > 1)) + || type == OP_UTF8_PERIOD + || (type == OP_PERIOD && dfa->mb_cur_max > 1)) newstate->accept_mb = 1; #endif /* RE_ENABLE_I18N */ else if (type == OP_BACK_REF) @@ -1261,6 +1650,5 @@ } re_node_set_free (&state->nodes); re_free (state->trtable); - re_free (state->trtable_search); re_free (state); } diff -urN gawk-3.1.3/regex_internal.h gawk-3.1.4/regex_internal.h --- gawk-3.1.3/regex_internal.h 2003-03-11 11:44:35.000000000 +0200 +++ gawk-3.1.4/regex_internal.h 2004-06-01 18:40:10.000000000 +0300 @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -21,10 +21,6 @@ #ifndef _REGEX_INTERNAL_H #define _REGEX_INTERNAL_H 1 -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include #if 0 @@ -81,7 +77,9 @@ # define gettext_noop(String) String #endif -#if (defined MB_CUR_MAX && HAVE_LOCALE_H && HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_WCRTOMB && HAVE_MBRTOWC && HAVE_WCSCOLL) || _LIBC +#include "mbsupport.h" /* gawk */ + +#if (defined MBS_SUPPORT) || _LIBC # define RE_ENABLE_I18N #endif @@ -108,11 +106,17 @@ # define __wctype wctype # define __iswctype iswctype # define __btowc btowc +# define __mempcpy mempcpy # define __wcrtomb wcrtomb # define attribute_hidden -# define __thread #endif /* not _LIBC */ +#ifdef __GNUC__ +# define __attribute(arg) __attribute__ (arg) +#else +# define __attribute(arg) +#endif + #if _LIBC || __GNUC__ >= 3 # define BE(expr, val) __builtin_expect (expr, val) #else @@ -120,10 +124,6 @@ # define inline #endif -#ifdef RE_ENABLE_I18N -__thread int re_mb_cur_max = 1; -#endif - extern const char __re_error_msgid[] attribute_hidden; extern const size_t __re_error_msgid_idx[] attribute_hidden; @@ -133,18 +133,20 @@ #define BITSET_UINTS ((SBC_MAX + UINT_BITS - 1) / UINT_BITS) typedef unsigned int bitset[BITSET_UINTS]; typedef unsigned int *re_bitset_ptr_t; +typedef const unsigned int *re_const_bitset_ptr_t; -#define bitset_set(set,i) (set[i / UINT_BITS] |= 1UL << i % UINT_BITS) -#define bitset_clear(set,i) (set[i / UINT_BITS] &= ~(1UL << i % UINT_BITS)) -#define bitset_contain(set,i) (set[i / UINT_BITS] & (1UL << i % UINT_BITS)) +#define bitset_set(set,i) (set[i / UINT_BITS] |= 1 << i % UINT_BITS) +#define bitset_clear(set,i) (set[i / UINT_BITS] &= ~(1 << i % UINT_BITS)) +#define bitset_contain(set,i) (set[i / UINT_BITS] & (1 << i % UINT_BITS)) #define bitset_empty(set) memset (set, 0, sizeof (unsigned int) * BITSET_UINTS) #define bitset_set_all(set) \ memset (set, 255, sizeof (unsigned int) * BITSET_UINTS) #define bitset_copy(dest,src) \ memcpy (dest, src, sizeof (unsigned int) * BITSET_UINTS) -static inline void bitset_not _RE_ARGS((bitset set)); -static inline void bitset_merge _RE_ARGS((bitset dest, const bitset src)); -static inline void bitset_not_merge _RE_ARGS((bitset dest, const bitset src)); +static inline void bitset_not (bitset set); +static inline void bitset_merge (bitset dest, const bitset src); +static inline void bitset_not_merge (bitset dest, const bitset src); +static inline void bitset_mask (bitset dest, const bitset src); #define PREV_WORD_CONSTRAINT 0x0001 #define PREV_NOTWORD_CONSTRAINT 0x0002 @@ -179,8 +181,33 @@ { 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, + OP_DUP_PLUS = EPSILON_BIT | 4, + OP_DUP_QUESTION = EPSILON_BIT | 5, + ANCHOR = EPSILON_BIT | 6, + + /* Tree type, these are used only by tree. */ + CONCAT = 16, + /* Token type, these are used only by token. */ - OP_OPEN_BRACKET, + OP_OPEN_BRACKET = 17, OP_CLOSE_BRACKET, OP_CHARSET_RANGE, OP_OPEN_DUP_NUM, @@ -194,32 +221,10 @@ OP_CLOSE_CHAR_CLASS, OP_WORD, OP_NOTWORD, - BACK_SLASH, + OP_SPACE, + OP_NOTSPACE, + BACK_SLASH - /* Tree type, these are used only by tree. */ - CONCAT, - ALT, - SUBEXP, - SIMPLE_BRACKET, -#ifdef RE_ENABLE_I18N - COMPLEX_BRACKET, -#endif /* RE_ENABLE_I18N */ - - /* Node type, These are used by token, node, tree. */ - OP_OPEN_SUBEXP, - OP_CLOSE_SUBEXP, - OP_PERIOD, - CHARACTER, - END_OF_RE, - OP_ALT, - OP_DUP_ASTERISK, - OP_DUP_PLUS, - OP_DUP_QUESTION, - OP_BACK_REF, - ANCHOR, - - /* Dummy marker. */ - END_OF_RE_TOKEN_T } re_token_type_t; #ifdef RE_ENABLE_I18N @@ -289,18 +294,18 @@ #endif unsigned int constraint : 10; /* context constraint */ unsigned int duplicated : 1; + unsigned int opt_subexp : 1; #ifdef RE_ENABLE_I18N + /* 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) == OP_ALT || (type) == OP_DUP_ASTERISK || (type) == OP_DUP_PLUS \ - || (type) == OP_DUP_QUESTION || (type) == ANCHOR \ - || (type) == OP_OPEN_SUBEXP || (type) == OP_CLOSE_SUBEXP) - +#define IS_EPSILON_NODE(type) ((type) & EPSILON_BIT) #define ACCEPT_MB_NODE(type) \ - ((type) == COMPLEX_BRACKET || (type) == OP_PERIOD) + ((type) >= OP_PERIOD && (type) <= OP_UTF8_PERIOD) struct re_string_t { @@ -311,13 +316,10 @@ REG_ICASE, upper cases of the string are stored, otherwise MBS points the same address that RAW_MBS points. */ unsigned char *mbs; - /* Store the case sensitive multibyte string. In case of - "case insensitive mode", the original string are stored, - otherwise MBS_CASE points the same address that MBS points. */ - unsigned char *mbs_case; #ifdef RE_ENABLE_I18N /* Store the wide character string which is corresponding to MBS. */ wint_t *wcs; + int *offsets; mbstate_t cur_state; #endif /* Index in RAW_MBS. Each character mbs[i] corresponds to @@ -325,15 +327,21 @@ int raw_mbs_idx; /* The length of the valid characters in the buffers. */ int valid_len; - /* The length of the buffers MBS, MBS_CASE, and WCS. */ + /* The corresponding number of bytes in raw_mbs array. */ + int valid_raw_len; + /* The length of the buffers MBS and WCS. */ int bufs_len; /* The index in MBS, which is updated by re_string_fetch_byte. */ int cur_idx; - /* This is length_of_RAW_MBS - RAW_MBS_IDX. */ + /* length of RAW_MBS array. */ + int raw_len; + /* This is RAW_LEN - RAW_MBS_IDX + VALID_LEN - VALID_RAW_LEN. */ int 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. */ + int raw_stop; + /* This is RAW_STOP - RAW_MBS_IDX adjusted through OFFSETS. */ int stop; /* The context of mbs[0]. We store the context independently, since @@ -341,51 +349,78 @@ 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; + unsigned RE_TRANSLATE_TYPE trans; + /* Copy of re_dfa_t's word_char. */ + re_const_bitset_ptr_t word_char; /* 1 if REG_ICASE. */ - unsigned int icase : 1; + 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; -/* In case of REG_ICASE, we allocate the buffer dynamically for mbs. */ -#define MBS_ALLOCATED(pstr) (pstr->icase) -/* In case that we need translation, we allocate the buffer dynamically - for mbs_case. Note that mbs == mbs_case if not REG_ICASE. */ -#define MBS_CASE_ALLOCATED(pstr) (pstr->trans != NULL) -static reg_errcode_t re_string_allocate _RE_ARGS((re_string_t *pstr, const char *str, + +struct re_dfa_t; +typedef struct re_dfa_t re_dfa_t; + +#ifndef _LIBC +# ifdef __i386__ +# define internal_function __attribute ((regparm (3), stdcall)) +# else +# define internal_function +# endif +#endif + +#ifndef RE_NO_INTERNAL_PROTOTYPES +static reg_errcode_t re_string_allocate (re_string_t *pstr, const char *str, int len, int init_len, - RE_TRANSLATE_TYPE trans, int icase)); -static reg_errcode_t re_string_construct _RE_ARGS((re_string_t *pstr, const char *str, int len, - RE_TRANSLATE_TYPE trans, int icase)); -static reg_errcode_t re_string_reconstruct _RE_ARGS((re_string_t *pstr, int idx, - int eflags, int newline)); -static reg_errcode_t re_string_realloc_buffers _RE_ARGS((re_string_t *pstr, int new_buf_len)); -#ifdef RE_ENABLE_I18N -static void build_wcs_buffer _RE_ARGS((re_string_t *pstr)); -static void build_wcs_upper_buffer _RE_ARGS((re_string_t *pstr)); -#endif /* RE_ENABLE_I18N */ -static void build_upper_buffer _RE_ARGS((re_string_t *pstr)); -static void re_string_translate_buffer _RE_ARGS((re_string_t *pstr)); -static void re_string_destruct _RE_ARGS((re_string_t *pstr)); -#ifdef RE_ENABLE_I18N -static int re_string_elem_size_at _RE_ARGS((const re_string_t *pstr, int idx)); -static inline int re_string_char_size_at _RE_ARGS((const re_string_t *pstr, int idx)); -static inline wint_t re_string_wchar_at _RE_ARGS((const re_string_t *pstr, int idx)); -#endif /* RE_ENABLE_I18N */ -static unsigned int re_string_context_at _RE_ARGS((const re_string_t *input, int idx, - int eflags, int newline_anchor)); + RE_TRANSLATE_TYPE trans, int icase, + const re_dfa_t *dfa) + internal_function; +static reg_errcode_t re_string_construct (re_string_t *pstr, const char *str, + int len, RE_TRANSLATE_TYPE trans, + int icase, const re_dfa_t *dfa) + internal_function; +static reg_errcode_t re_string_reconstruct (re_string_t *pstr, int idx, + int eflags) internal_function; +static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr, + int new_buf_len) + internal_function; +# ifdef RE_ENABLE_I18N +static void build_wcs_buffer (re_string_t *pstr) internal_function; +static int 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 void re_string_destruct (re_string_t *pstr) internal_function; +# ifdef RE_ENABLE_I18N +static int re_string_elem_size_at (const re_string_t *pstr, int idx) + internal_function; +static inline int re_string_char_size_at (const re_string_t *pstr, int idx) + internal_function; +static inline wint_t re_string_wchar_at (const re_string_t *pstr, int idx) + internal_function; +# endif /* RE_ENABLE_I18N */ +static unsigned int re_string_context_at (const re_string_t *input, int idx, + int eflags) internal_function; +static unsigned char re_string_peek_byte_case (const re_string_t *pstr, + int idx) internal_function; +static unsigned char re_string_fetch_byte_case (re_string_t *pstr) + internal_function; +#endif #define re_string_peek_byte(pstr, offset) \ ((pstr)->mbs[(pstr)->cur_idx + offset]) -#define re_string_peek_byte_case(pstr, offset) \ - ((pstr)->mbs_case[(pstr)->cur_idx + offset]) #define re_string_fetch_byte(pstr) \ ((pstr)->mbs[(pstr)->cur_idx++]) -#define re_string_fetch_byte_case(pstr) \ - ((pstr)->mbs_case[(pstr)->cur_idx++]) #define re_string_first_byte(pstr, idx) \ - ((idx) == (pstr)->len || (pstr)->wcs[idx] != WEOF) + ((idx) == (pstr)->valid_len || (pstr)->wcs[idx] != WEOF) #define re_string_is_single_byte_char(pstr, idx) \ - ((pstr)->wcs[idx] != WEOF && ((pstr)->len == (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) @@ -396,7 +431,9 @@ #define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx)) #define re_malloc(t,n) ((t *) malloc ((n) * sizeof (t))) -#define re_realloc(p,t,n) ((t *) realloc (p, (n) * sizeof (t))) +/* SunOS 4.1.x realloc doesn't accept null pointers: pre-Standard C. Sigh. */ +#define re_realloc(p,t,n) ((p != NULL) ? (t *) realloc (p,(n)*sizeof(t)) : (t *) calloc(n,sizeof(t))) + #define re_free(p) free (p) struct bin_tree_t @@ -416,6 +453,15 @@ }; 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) @@ -451,11 +497,7 @@ re_node_set nodes; re_node_set *entrance_nodes; struct re_dfastate_t **trtable; - struct re_dfastate_t **trtable_search; - /* If this state is a special state. - A state is a special state if the state is the halt state, or - a anchor. */ - unsigned int context : 2; + 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 @@ -464,6 +506,7 @@ /* If this state has backreference node(s). */ unsigned int has_backref : 1; unsigned int has_constraint : 1; + unsigned int word_trtable : 1; }; typedef struct re_dfastate_t re_dfastate_t; @@ -525,13 +568,18 @@ typedef struct { + /* The string object corresponding to the input string. */ + re_string_t input; +#if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) + re_dfa_t *const dfa; +#else + re_dfa_t *dfa; +#endif /* EFLAGS of the argument of regexec. */ int eflags; /* Where the matching ends. */ int match_last; int last_node; - /* The string object corresponding to the input string. */ - re_string_t *input; /* The state log used by the matcher. */ re_dfastate_t **state_log; int state_log_top; @@ -577,71 +625,83 @@ struct re_dfa_t { - re_bitset_ptr_t word_char; - - /* number of subexpressions `re_nsub' is in regex_t. */ - int subexps_alloc; re_subexp_t *subexps; - re_token_t *nodes; int nodes_alloc; int nodes_len; - bin_tree_t *str_tree; int *nexts; int *org_indices; re_node_set *edests; re_node_set *eclosures; re_node_set *inveclosures; struct re_state_table_entry *state_table; - unsigned int state_hash_mask; 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. */ + int subexps_alloc; + unsigned int state_hash_mask; int states_alloc; int init_node; int nbackref; /* The number of backreference in this dfa. */ /* Bitmap expressing which backreference is used. */ unsigned int used_bkref_map; -#ifdef DEBUG - char* re_str; -#endif 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 word_char; + reg_syntax_t syntax; +#ifdef DEBUG + char* re_str; +#endif }; -typedef struct re_dfa_t re_dfa_t; -static reg_errcode_t re_node_set_alloc _RE_ARGS((re_node_set *set, int size)); -static reg_errcode_t re_node_set_init_1 _RE_ARGS((re_node_set *set, int elem)); -static reg_errcode_t re_node_set_init_2 _RE_ARGS((re_node_set *set, int elem1, int elem2)); +#ifndef RE_NO_INTERNAL_PROTOTYPES +static reg_errcode_t re_node_set_alloc (re_node_set *set, int size) internal_function; +static reg_errcode_t re_node_set_init_1 (re_node_set *set, int elem) internal_function; +static reg_errcode_t re_node_set_init_2 (re_node_set *set, int elem1, + int elem2) internal_function; #define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set)) -static reg_errcode_t re_node_set_init_copy _RE_ARGS((re_node_set *dest, - const re_node_set *src)); -static reg_errcode_t re_node_set_add_intersect _RE_ARGS((re_node_set *dest, +static reg_errcode_t re_node_set_init_copy (re_node_set *dest, + const re_node_set *src) internal_function; +static reg_errcode_t re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1, - const re_node_set *src2)); -static reg_errcode_t re_node_set_init_union _RE_ARGS((re_node_set *dest, + const re_node_set *src2) internal_function; +static reg_errcode_t re_node_set_init_union (re_node_set *dest, const re_node_set *src1, - const re_node_set *src2)); -static reg_errcode_t re_node_set_merge _RE_ARGS((re_node_set *dest, const re_node_set *src)); -static int re_node_set_insert _RE_ARGS((re_node_set *set, int elem)); -static int re_node_set_compare _RE_ARGS((const re_node_set *set1, const re_node_set *set2)); -static int re_node_set_contains _RE_ARGS((const re_node_set *set, int elem)); -static void re_node_set_remove_at _RE_ARGS((re_node_set *set, int idx)); + const re_node_set *src2) internal_function; +static reg_errcode_t re_node_set_merge (re_node_set *dest, + const re_node_set *src) internal_function; +static int re_node_set_insert (re_node_set *set, int elem) internal_function; +static int re_node_set_compare (const re_node_set *set1, + const re_node_set *set2) internal_function; +static int re_node_set_contains (const re_node_set *set, int elem) internal_function; +static void re_node_set_remove_at (re_node_set *set, int idx) internal_function; #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) -static int re_dfa_add_node _RE_ARGS((re_dfa_t *dfa, re_token_t token, int mode)); -static re_dfastate_t *re_acquire_state _RE_ARGS((reg_errcode_t *err, re_dfa_t *dfa, - const re_node_set *nodes)); -static re_dfastate_t *re_acquire_state_context _RE_ARGS((reg_errcode_t *err, re_dfa_t *dfa, +static int re_dfa_add_node (re_dfa_t *dfa, re_token_t token, int mode) internal_function; +static re_dfastate_t *re_acquire_state (reg_errcode_t *err, re_dfa_t *dfa, + const re_node_set *nodes) internal_function; +static re_dfastate_t *re_acquire_state_context (reg_errcode_t *err, + re_dfa_t *dfa, const re_node_set *nodes, - unsigned int context)); -static void free_state _RE_ARGS((re_dfastate_t *state)); + unsigned int context) internal_function; +static void free_state (re_dfastate_t *state) internal_function; +#endif typedef enum @@ -667,8 +727,7 @@ /* Inline functions for bitset operation. */ static inline void -bitset_not (set) - bitset set; +bitset_not (bitset set) { int bitset_i; for (bitset_i = 0; bitset_i < BITSET_UINTS; ++bitset_i) @@ -676,9 +735,7 @@ } static inline void -bitset_merge (dest, src) - bitset dest; - const bitset src; +bitset_merge (bitset dest, const bitset src) { int bitset_i; for (bitset_i = 0; bitset_i < BITSET_UINTS; ++bitset_i) @@ -686,45 +743,48 @@ } static inline void -bitset_not_merge (dest, src) - bitset dest; - const bitset src; +bitset_not_merge (bitset dest, const bitset src) { int i; for (i = 0; i < BITSET_UINTS; ++i) dest[i] |= ~src[i]; } -#ifdef RE_ENABLE_I18N +static inline void +bitset_mask (bitset dest, const bitset src) +{ + int bitset_i; + for (bitset_i = 0; bitset_i < BITSET_UINTS; ++bitset_i) + dest[bitset_i] &= src[bitset_i]; +} + +#if defined RE_ENABLE_I18N && !defined RE_NO_INTERNAL_PROTOTYPES /* Inline functions for re_string. */ static inline int -re_string_char_size_at (pstr, idx) - const re_string_t *pstr; - int idx; +internal_function +re_string_char_size_at (const re_string_t *pstr, int idx) { int byte_idx; - if (re_mb_cur_max == 1) + if (pstr->mb_cur_max == 1) return 1; - for (byte_idx = 1; idx + byte_idx < pstr->len; ++byte_idx) + 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 -re_string_wchar_at (pstr, idx) - const re_string_t *pstr; - int idx; +internal_function +re_string_wchar_at (const re_string_t *pstr, int idx) { - if (re_mb_cur_max == 1) + if (pstr->mb_cur_max == 1) return (wint_t) pstr->mbs[idx]; return (wint_t) pstr->wcs[idx]; } static int -re_string_elem_size_at (pstr, idx) - const re_string_t *pstr; - int idx; +internal_function +re_string_elem_size_at (const re_string_t *pstr, int idx) { #ifdef _LIBC const unsigned char *p, *extra; diff -urN gawk-3.1.3/regexec.c gawk-3.1.4/regexec.c --- gawk-3.1.3/regexec.c 2003-02-28 10:57:02.000000000 +0200 +++ gawk-3.1.4/regexec.c 2004-02-03 13:31:49.000000000 +0200 @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -18,178 +18,172 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -static reg_errcode_t match_ctx_init _RE_ARGS((re_match_context_t *cache, int eflags, - re_string_t *input, int n)); -static void match_ctx_clean _RE_ARGS((re_match_context_t *mctx)); -static void match_ctx_free _RE_ARGS((re_match_context_t *cache)); -static void match_ctx_free_subtops _RE_ARGS((re_match_context_t *mctx)); -static reg_errcode_t match_ctx_add_entry _RE_ARGS((re_match_context_t *cache, int node, - int str_idx, int from, int to)); -static int search_cur_bkref_entry _RE_ARGS((re_match_context_t *mctx, int str_idx)); -static void match_ctx_clear_flag _RE_ARGS((re_match_context_t *mctx)); -static reg_errcode_t match_ctx_add_subtop _RE_ARGS((re_match_context_t *mctx, int node, - int str_idx)); -static re_sub_match_last_t * match_ctx_add_sublast _RE_ARGS((re_sub_match_top_t *subtop, - int node, int str_idx)); -static void sift_ctx_init _RE_ARGS((re_sift_context_t *sctx, re_dfastate_t **sifted_sts, +static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags, + int 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 void match_ctx_free_subtops (re_match_context_t *mctx) + internal_function; +static reg_errcode_t match_ctx_add_entry (re_match_context_t *cache, int node, + int str_idx, int from, int to) + internal_function; +static int search_cur_bkref_entry (re_match_context_t *mctx, int str_idx) + internal_function; +static void match_ctx_clear_flag (re_match_context_t *mctx) internal_function; +static reg_errcode_t match_ctx_add_subtop (re_match_context_t *mctx, int node, + int str_idx) internal_function; +static re_sub_match_last_t * match_ctx_add_sublast (re_sub_match_top_t *subtop, + int node, int str_idx) + internal_function; +static void sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, re_dfastate_t **limited_sts, int last_node, - int last_str_idx, int check_subexp)); -static reg_errcode_t re_search_internal _RE_ARGS((const regex_t *preg, + int last_str_idx, int check_subexp) + internal_function; +static reg_errcode_t re_search_internal (const regex_t *preg, const char *string, int length, int start, int range, int stop, size_t nmatch, regmatch_t pmatch[], - int eflags)); -static int re_search_2_stub _RE_ARGS((struct re_pattern_buffer *bufp, + int eflags) internal_function; +static int re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1, int length1, const char *string2, int length2, int start, int range, struct re_registers *regs, - int stop, int ret_len)); -static int re_search_stub _RE_ARGS((struct re_pattern_buffer *bufp, + int stop, int ret_len) internal_function; +static int re_search_stub (struct re_pattern_buffer *bufp, const char *string, int length, int start, int range, int stop, struct re_registers *regs, - int ret_len)); -static unsigned re_copy_regs _RE_ARGS((struct re_registers *regs, regmatch_t *pmatch, - int nregs, int regs_allocated)); -static inline re_dfastate_t *acquire_init_state_context _RE_ARGS((reg_errcode_t *err, - const regex_t *preg, - const re_match_context_t *mctx, - int idx)); -static reg_errcode_t prune_impossible_nodes _RE_ARGS((const regex_t *preg, - re_match_context_t *mctx)); -static int check_matching _RE_ARGS((const regex_t *preg, re_match_context_t *mctx, - int fl_search, int fl_longest_match)); -static int check_halt_node_context _RE_ARGS((const re_dfa_t *dfa, int node, - unsigned int context)); -static int check_halt_state_context _RE_ARGS((const regex_t *preg, - const re_dfastate_t *state, - const re_match_context_t *mctx, int idx)); -static void update_regs _RE_ARGS((re_dfa_t *dfa, regmatch_t *pmatch, int cur_node, - int cur_idx, int nmatch)); -static int proceed_next_node _RE_ARGS((const regex_t *preg, int nregs, regmatch_t *regs, - const re_match_context_t *mctx, + int ret_len) internal_function; +static unsigned re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, + int nregs, int regs_allocated) internal_function; +static inline re_dfastate_t *acquire_init_state_context + (reg_errcode_t *err, const re_match_context_t *mctx, int idx) + __attribute ((always_inline)) internal_function; +static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx) + internal_function; +static int check_matching (re_match_context_t *mctx, int fl_longest_match, + int *p_match_first) + internal_function; +static int check_halt_node_context (const re_dfa_t *dfa, int node, + unsigned int context) internal_function; +static int check_halt_state_context (const re_match_context_t *mctx, + const re_dfastate_t *state, int idx) + internal_function; +static void update_regs (re_dfa_t *dfa, regmatch_t *pmatch, + regmatch_t *prev_idx_match, int cur_node, + int cur_idx, int nmatch) internal_function; +static int proceed_next_node (const re_match_context_t *mctx, + int nregs, regmatch_t *regs, int *pidx, int node, re_node_set *eps_via_nodes, - struct re_fail_stack_t *fs)); -static reg_errcode_t push_fail_stack _RE_ARGS((struct re_fail_stack_t *fs, + struct re_fail_stack_t *fs) internal_function; +static reg_errcode_t push_fail_stack (struct re_fail_stack_t *fs, int str_idx, int *dests, int nregs, regmatch_t *regs, - re_node_set *eps_via_nodes)); -static int pop_fail_stack _RE_ARGS((struct re_fail_stack_t *fs, int *pidx, int nregs, - regmatch_t *regs, re_node_set *eps_via_nodes)); -static reg_errcode_t set_regs _RE_ARGS((const regex_t *preg, + re_node_set *eps_via_nodes) internal_function; +static int pop_fail_stack (struct re_fail_stack_t *fs, int *pidx, int 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, - int fl_backtrack)); -static reg_errcode_t free_fail_stack_return _RE_ARGS((struct re_fail_stack_t *fs)); + int 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 _RE_ARGS((const regex_t *preg, - const re_match_context_t *mctx, +static int sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, - int node_idx, int str_idx, int max_str_idx)); + int node_idx, int str_idx, int max_str_idx) internal_function; #endif /* RE_ENABLE_I18N */ -static reg_errcode_t sift_states_backward _RE_ARGS((const regex_t *preg, - re_match_context_t *mctx, - re_sift_context_t *sctx)); -static reg_errcode_t update_cur_sifted_state _RE_ARGS((const regex_t *preg, - re_match_context_t *mctx, +static reg_errcode_t sift_states_backward (re_match_context_t *mctx, + re_sift_context_t *sctx) internal_function; +static reg_errcode_t update_cur_sifted_state (re_match_context_t *mctx, re_sift_context_t *sctx, int str_idx, - re_node_set *dest_nodes)); -static reg_errcode_t add_epsilon_src_nodes _RE_ARGS((re_dfa_t *dfa, + re_node_set *dest_nodes) internal_function; +static reg_errcode_t add_epsilon_src_nodes (re_dfa_t *dfa, re_node_set *dest_nodes, - const re_node_set *candidates)); -static reg_errcode_t sub_epsilon_src_nodes _RE_ARGS((re_dfa_t *dfa, int node, + const re_node_set *candidates) internal_function; +static reg_errcode_t sub_epsilon_src_nodes (re_dfa_t *dfa, int node, re_node_set *dest_nodes, - const re_node_set *and_nodes)); -static int check_dst_limits _RE_ARGS((re_dfa_t *dfa, re_node_set *limits, - re_match_context_t *mctx, int dst_node, - int dst_idx, int src_node, int src_idx)); -static int check_dst_limits_calc_pos _RE_ARGS((re_dfa_t *dfa, re_match_context_t *mctx, + const re_node_set *and_nodes) internal_function; +static int check_dst_limits (re_match_context_t *mctx, re_node_set *limits, + int dst_node, int dst_idx, int src_node, + int src_idx) internal_function; +static int check_dst_limits_calc_pos (re_match_context_t *mctx, int limit, re_node_set *eclosures, - int subexp_idx, int node, int str_idx)); -static reg_errcode_t check_subexp_limits _RE_ARGS((re_dfa_t *dfa, + int subexp_idx, int node, int str_idx) internal_function; +static reg_errcode_t check_subexp_limits (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, - int str_idx)); -static reg_errcode_t sift_states_bkref _RE_ARGS((const regex_t *preg, - re_match_context_t *mctx, + int str_idx) internal_function; +static reg_errcode_t sift_states_bkref (re_match_context_t *mctx, re_sift_context_t *sctx, - int str_idx, re_node_set *dest_nodes)); -static reg_errcode_t clean_state_log_if_need _RE_ARGS((re_match_context_t *mctx, - int next_state_log_idx)); -static reg_errcode_t merge_state_array _RE_ARGS((re_dfa_t *dfa, re_dfastate_t **dst, - re_dfastate_t **src, int num)); -static re_dfastate_t *transit_state _RE_ARGS((reg_errcode_t *err, const regex_t *preg, + int str_idx, re_node_set *dest_nodes) internal_function; +static reg_errcode_t clean_state_log_if_needed (re_match_context_t *mctx, + int next_state_log_idx) internal_function; +static reg_errcode_t merge_state_array (re_dfa_t *dfa, re_dfastate_t **dst, + re_dfastate_t **src, int num) internal_function; +static re_dfastate_t *transit_state (reg_errcode_t *err, re_match_context_t *mctx, - re_dfastate_t *state, int fl_search)); -static reg_errcode_t check_subexp_matching_top _RE_ARGS((re_dfa_t *dfa, - re_match_context_t *mctx, + re_dfastate_t *state) internal_function; +static reg_errcode_t check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, - int str_idx)); -static re_dfastate_t *transit_state_sb _RE_ARGS((reg_errcode_t *err, const regex_t *preg, - re_dfastate_t *pstate, - int fl_search, - re_match_context_t *mctx)); + int 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_ARGS((const regex_t *preg, - re_dfastate_t *pstate, - re_match_context_t *mctx)); +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_ARGS((const regex_t *preg, - re_node_set *nodes, - re_match_context_t *mctx)); -static reg_errcode_t get_subexp _RE_ARGS((const regex_t *preg, re_match_context_t *mctx, - int bkref_node, int bkref_str_idx)); -static reg_errcode_t get_subexp_sub _RE_ARGS((const regex_t *preg, - re_match_context_t *mctx, - re_sub_match_top_t *sub_top, +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, + int bkref_node, int 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, - int bkref_node, int bkref_str)); -static int find_subexp_node _RE_ARGS((re_dfa_t *dfa, re_node_set *nodes, - int subexp_idx, int fl_open)); -static reg_errcode_t check_arrival _RE_ARGS((const regex_t *preg, - re_match_context_t *mctx, + int bkref_node, int bkref_str) internal_function; +static int find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, + int subexp_idx, int type) internal_function; +static reg_errcode_t check_arrival (re_match_context_t *mctx, state_array_t *path, int top_node, int top_str, int last_node, int last_str, - int fl_open)); -static reg_errcode_t check_arrival_add_next_nodes _RE_ARGS((const regex_t *preg, - re_dfa_t *dfa, - re_match_context_t *mctx, + int type) internal_function; +static reg_errcode_t check_arrival_add_next_nodes (re_match_context_t *mctx, int str_idx, re_node_set *cur_nodes, - re_node_set *next_nodes)); -static reg_errcode_t check_arrival_expand_ecl _RE_ARGS((re_dfa_t *dfa, + re_node_set *next_nodes) internal_function; +static reg_errcode_t check_arrival_expand_ecl (re_dfa_t *dfa, re_node_set *cur_nodes, - int ex_subexp, int fl_open)); -static reg_errcode_t check_arrival_expand_ecl_sub _RE_ARGS((re_dfa_t *dfa, + int ex_subexp, int type) internal_function; +static reg_errcode_t check_arrival_expand_ecl_sub (re_dfa_t *dfa, re_node_set *dst_nodes, int target, int ex_subexp, - int fl_open)); -static reg_errcode_t expand_bkref_cache _RE_ARGS((const regex_t *preg, - re_match_context_t *mctx, + int type) internal_function; +static reg_errcode_t expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, int cur_str, int last_str, int subexp_num, - int fl_open)); -static re_dfastate_t **build_trtable _RE_ARGS((const regex_t *dfa, - const re_dfastate_t *state, - int fl_search)); + int type) internal_function; +static re_dfastate_t **build_trtable (re_dfa_t *dfa, + re_dfastate_t *state) internal_function; #ifdef RE_ENABLE_I18N -static int check_node_accept_bytes _RE_ARGS((const regex_t *preg, int node_idx, - const re_string_t *input, int idx)); +static int check_node_accept_bytes (re_dfa_t *dfa, int node_idx, + const re_string_t *input, int idx) internal_function; # ifdef _LIBC -static unsigned int find_collation_sequence_value _RE_ARGS((const unsigned char *mbs, - size_t name_len)); +static unsigned int find_collation_sequence_value (const unsigned char *mbs, + size_t name_len) internal_function; # endif /* _LIBC */ #endif /* RE_ENABLE_I18N */ -static int group_nodes_into_DFAstates _RE_ARGS((const regex_t *dfa, +static int group_nodes_into_DFAstates (re_dfa_t *dfa, const re_dfastate_t *state, re_node_set *states_node, - bitset *states_ch)); -static int check_node_accept _RE_ARGS((const regex_t *preg, const re_token_t *node, - const re_match_context_t *mctx, int idx)); -static reg_errcode_t extend_buffers _RE_ARGS((re_match_context_t *mctx)); + bitset *states_ch) internal_function; +static int check_node_accept (const re_match_context_t *mctx, + const re_token_t *node, int idx) internal_function; +static reg_errcode_t extend_buffers (re_match_context_t *mctx) internal_function; /* Entry point for POSIX code. */ @@ -455,35 +449,23 @@ 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; - } + if (BE (regs->start == NULL, 0) || BE (regs->end == NULL, 0)) + 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 (need_regs > regs->num_regs) + if (BE (need_regs > regs->num_regs, 0)) { - regs->start = re_realloc (regs->start, regoff_t, need_regs); - if (BE (regs->start == NULL, 0)) - { - if (regs->end != NULL) - re_free (regs->end); - return REGS_UNALLOCATED; - } - regs->end = re_realloc (regs->end, regoff_t, need_regs); - if (BE (regs->end == NULL, 0)) - { - re_free (regs->start); - return REGS_UNALLOCATED; - } + regoff_t *new_start = re_realloc (regs->start, regoff_t, need_regs); + regoff_t *new_end = re_realloc (regs->end, regoff_t, need_regs); + if (BE (new_start == NULL, 0) || BE (new_end == NULL, 0)) + return REGS_UNALLOCATED; + regs->start = new_start; + regs->end = new_end; regs->num_regs = need_regs; } } @@ -584,33 +566,60 @@ { reg_errcode_t err; re_dfa_t *dfa = (re_dfa_t *)preg->buffer; - re_string_t input; int left_lim, right_lim, incr; int fl_longest_match, match_first, match_last = -1; int fast_translate, sb; +#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 && range && !preg->can_be_null) ? preg->fastmap : NULL); +#if !(defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) + memset (&mctx, '\0', sizeof (re_match_context_t)); + mctx.dfa = dfa; +#endif + /* 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 (start + range >= 0 && start + range <= 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 && start + range != 0) + return REG_NOMATCH; + start = range = 0; + } + re_node_set_init_empty (&empty_set); - memset (&mctx, '\0', sizeof (re_match_context_t)); /* We must check the longest matching, if nmatch > 0. */ fl_longest_match = (nmatch != 0 || dfa->nbackref); - err = re_string_allocate (&input, string, length, dfa->nodes_len + 1, - preg->translate, preg->syntax & RE_ICASE); + err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1, + preg->translate, preg->syntax & RE_ICASE, dfa); if (BE (err != REG_NOERROR, 0)) goto free_return; - input.stop = stop; + mctx.input.stop = stop; + mctx.input.raw_stop = stop; + mctx.input.newline_anchor = preg->newline_anchor; - err = match_ctx_init (&mctx, eflags, &input, dfa->nbackref * 2); + err = match_ctx_init (&mctx, eflags, dfa->nbackref * 2); if (BE (err != REG_NOERROR, 0)) goto free_return; @@ -620,7 +629,7 @@ multi character collating element. */ if (nmatch > 1 || dfa->has_mb_node) { - mctx.state_log = re_malloc (re_dfastate_t *, dfa->nodes_len + 1); + mctx.state_log = re_malloc (re_dfastate_t *, mctx.input.bufs_len + 1); if (BE (mctx.state_log == NULL, 0)) { err = REG_ESPACE; @@ -630,24 +639,15 @@ else mctx.state_log = NULL; -#ifdef DEBUG - /* We assume front-end functions already check them. */ - assert (start + range >= 0 && start + range <= length); -#endif - match_first = start; - input.tip_context = ((eflags & REG_NOTBOL) ? CONTEXT_BEGBUF - : CONTEXT_NEWLINE | CONTEXT_BEGBUF); + mctx.input.tip_context = (eflags & REG_NOTBOL) ? CONTEXT_BEGBUF + : CONTEXT_NEWLINE | CONTEXT_BEGBUF; /* Check incrementally whether of not the input string match. */ incr = (range < 0) ? -1 : 1; left_lim = (range < 0) ? start + range : start; right_lim = (range < 0) ? start : start + range; -#ifdef RE_ENABLE_I18N - sb = re_mb_cur_max == 1; -#else - sb = 1; -#endif + sb = dfa->mb_cur_max == 1; fast_translate = sb || !(preg->syntax & RE_ICASE || preg->translate); for (;;) @@ -707,19 +707,21 @@ instead. */ /* If MATCH_FIRST is out of the valid range, reconstruct the buffers. */ - if (input.raw_mbs_idx + input.valid_len <= match_first - || match_first < input.raw_mbs_idx) + if (mctx.input.raw_mbs_idx + mctx.input.valid_raw_len + <= match_first + || match_first < mctx.input.raw_mbs_idx) { - err = re_string_reconstruct (&input, match_first, eflags, - preg->newline_anchor); + err = re_string_reconstruct (&mctx.input, match_first, + eflags); if (BE (err != REG_NOERROR, 0)) goto free_return; } /* 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 (&input, - match_first - input.raw_mbs_idx)); + : re_string_byte_at (&mctx.input, + match_first + - mctx.input.raw_mbs_idx)); if (fastmap[ch]) break; match_first += incr; @@ -731,21 +733,21 @@ } /* Reconstruct the buffers so that the matcher can assume that - the matching starts from the begining of the buffer. */ - err = re_string_reconstruct (&input, match_first, eflags, - preg->newline_anchor); + 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 /* Eliminate it when it is a component of a multibyte character and isn't the head of a multibyte character. */ - if (sb || re_string_first_byte (&input, 0)) + if (sb || re_string_first_byte (&mctx.input, 0)) #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 (preg, &mctx, 0, fl_longest_match); + match_last = check_matching (&mctx, fl_longest_match, + range >= 0 ? &match_first : NULL); if (match_last != -1) { if (BE (match_last == -2, 0)) @@ -759,20 +761,21 @@ if ((!preg->no_sub && nmatch > 1) || dfa->nbackref) { re_dfastate_t *pstate = mctx.state_log[match_last]; - mctx.last_node = check_halt_state_context (preg, pstate, - &mctx, 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 (preg, &mctx); + err = prune_impossible_nodes (&mctx); if (err == REG_NOERROR) break; if (BE (err != REG_NOMATCH, 0)) goto free_return; + match_last = -1; } else - break; /* We found a matching. */ + break; /* We found a match. */ } } match_ctx_clean (&mctx); @@ -789,7 +792,7 @@ int reg_idx; /* Initialize registers. */ - for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) + 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. */ @@ -805,10 +808,26 @@ } /* At last, add the offset to the each registers, since we slided - the buffers so that We can assume that the matching starts from 0. */ + 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)) + { + if (pmatch[reg_idx].rm_so == mctx.input.valid_len) + pmatch[reg_idx].rm_so += mctx.input.valid_raw_len - mctx.input.valid_len; + else + pmatch[reg_idx].rm_so = mctx.input.offsets[pmatch[reg_idx].rm_so]; + if (pmatch[reg_idx].rm_eo == mctx.input.valid_len) + pmatch[reg_idx].rm_eo += mctx.input.valid_raw_len - mctx.input.valid_len; + else + pmatch[reg_idx].rm_eo = 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; } @@ -818,18 +837,17 @@ re_free (mctx.state_log); if (dfa->nbackref) match_ctx_free (&mctx); - re_string_destruct (&input); + re_string_destruct (&mctx.input); return err; } static reg_errcode_t -prune_impossible_nodes (preg, mctx) - const regex_t *preg; +prune_impossible_nodes (mctx) re_match_context_t *mctx; { + re_dfa_t *const dfa = mctx->dfa; int halt_node, match_last; reg_errcode_t ret; - re_dfa_t *dfa = (re_dfa_t *)preg->buffer; re_dfastate_t **sifted_states; re_dfastate_t **lim_states = NULL; re_sift_context_t sctx; @@ -859,7 +877,7 @@ match_ctx_clear_flag (mctx); sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last, 0); - ret = sift_states_backward (preg, mctx, &sctx); + ret = sift_states_backward (mctx, &sctx); re_node_set_free (&sctx.limits); if (BE (ret != REG_NOERROR, 0)) goto free_return; @@ -873,10 +891,11 @@ ret = REG_NOMATCH; goto free_return; } - } while (!mctx->state_log[match_last]->halt); - halt_node = check_halt_state_context (preg, + } 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], - mctx, match_last); + match_last); } ret = merge_state_array (dfa, sifted_states, lim_states, match_last + 1); @@ -889,7 +908,7 @@ { sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last, 0); - ret = sift_states_backward (preg, mctx, &sctx); + ret = sift_states_backward (mctx, &sctx); re_node_set_free (&sctx.limits); if (BE (ret != REG_NOERROR, 0)) goto free_return; @@ -911,20 +930,17 @@ since initial states may have constraints like "\<", "^", etc.. */ static inline re_dfastate_t * -acquire_init_state_context (err, preg, mctx, idx) +acquire_init_state_context (err, mctx, idx) reg_errcode_t *err; - const regex_t *preg; const re_match_context_t *mctx; int idx; { - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; - + re_dfa_t *const dfa = mctx->dfa; *err = REG_NOERROR; if (dfa->init_state->has_constraint) { unsigned int context; - context = re_string_context_at (mctx->input, idx - 1, mctx->eflags, - preg->newline_anchor); + 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)) @@ -951,25 +967,27 @@ /* Check whether the regular expression match input string INPUT or not, and return the index where the matching end, return -1 if not match, or return -2 in case of an error. - FL_SEARCH means we must search where the matching starts, 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 int -check_matching (preg, mctx, fl_search, fl_longest_match) - const regex_t *preg; +check_matching (mctx, fl_longest_match, p_match_first) re_match_context_t *mctx; - int fl_search, fl_longest_match; + int fl_longest_match; + int *p_match_first; { - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; + re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; int match = 0; int match_last = -1; - int cur_str_idx = re_string_cur_idx (mctx->input); + int cur_str_idx = re_string_cur_idx (&mctx->input); re_dfastate_t *cur_state; + int at_init_state = p_match_first != NULL, skipped = 0; - cur_state = acquire_init_state_context (&err, preg, mctx, cur_str_idx); + cur_state = acquire_init_state_context (&err, mctx, cur_str_idx); /* An initial state must not be NULL(invalid state). */ if (BE (cur_state == NULL, 0)) return -2; @@ -978,25 +996,26 @@ /* Check OP_OPEN_SUBEXP in the initial state in case that we use them later. E.g. Processing back references. */ - if (dfa->nbackref) + if (BE (dfa->nbackref, 0)) { - err = check_subexp_matching_top (dfa, mctx, &cur_state->nodes, 0); + at_init_state = 0; + 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 (preg, &cur_state->nodes, mctx); - 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 (cur_state->halt) + if (BE (cur_state->halt, 0)) { if (!cur_state->has_constraint - || check_halt_state_context (preg, cur_state, mctx, cur_str_idx)) + || check_halt_state_context (mctx, cur_state, cur_str_idx)) { if (!fl_longest_match) return cur_str_idx; @@ -1008,33 +1027,26 @@ } } - while (!re_string_eoi (mctx->input)) + while (!re_string_eoi (&mctx->input)) { - cur_state = transit_state (&err, preg, mctx, cur_state, - fl_search && !match); + re_dfastate_t *old_state = cur_state; + cur_state = transit_state (&err, mctx, cur_state); + if (at_init_state) + { + if (old_state == cur_state) + skipped++; + else + at_init_state = 0; + } + if (cur_state == NULL) /* Reached at the invalid state or an error. */ { - cur_str_idx = re_string_cur_idx (mctx->input); + cur_str_idx = re_string_cur_idx (&mctx->input); if (BE (err != REG_NOERROR, 0)) return -2; - if (fl_search && !match) - { - /* Restart from initial state, since we are searching - the point from where matching start. */ -#ifdef RE_ENABLE_I18N - if (re_mb_cur_max == 1 - || re_string_first_byte (mctx->input, cur_str_idx)) -#endif /* RE_ENABLE_I18N */ - cur_state = acquire_init_state_context (&err, preg, mctx, - cur_str_idx); - if (BE (cur_state == NULL && err != REG_NOERROR, 0)) - return -2; - if (mctx->state_log != NULL) - mctx->state_log[cur_str_idx] = cur_state; - } - else if (!fl_longest_match && match) + if (!fl_longest_match && match) break; - else /* (fl_longest_match && match) || (!fl_search && !match) */ + else { if (mctx->state_log == NULL) break; @@ -1055,17 +1067,21 @@ /* Reached at a halt state. Check the halt state can satisfy the current context. */ if (!cur_state->has_constraint - || check_halt_state_context (preg, cur_state, mctx, - re_string_cur_idx (mctx->input))) + || 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_last = re_string_cur_idx (&mctx->input); match = 1; if (!fl_longest_match) break; } } } + + if (match_last == -1 && skipped) + *p_match_first += skipped; + return match_last; } @@ -1092,22 +1108,19 @@ match the context, return the node. */ static int -check_halt_state_context (preg, state, mctx, idx) - const regex_t *preg; - const re_dfastate_t *state; +check_halt_state_context (mctx, state, idx) const re_match_context_t *mctx; + const re_dfastate_t *state; int idx; { - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; int i; unsigned int context; #ifdef DEBUG assert (state->halt); #endif - context = re_string_context_at (mctx->input, idx, mctx->eflags, - preg->newline_anchor); + context = re_string_context_at (&mctx->input, idx, mctx->eflags); for (i = 0; i < state->nodes.nelem; ++i) - if (check_halt_node_context (dfa, state->nodes.elems[i], context)) + if (check_halt_node_context (mctx->dfa, state->nodes.elems[i], context)) return state->nodes.elems[i]; return 0; } @@ -1118,15 +1131,14 @@ of errors. */ static int -proceed_next_node (preg, nregs, regs, mctx, pidx, node, eps_via_nodes, fs) - const regex_t *preg; - regmatch_t *regs; +proceed_next_node (mctx, nregs, regs, pidx, node, eps_via_nodes, fs) const re_match_context_t *mctx; + regmatch_t *regs; int nregs, *pidx, node; re_node_set *eps_via_nodes; struct re_fail_stack_t *fs; { - re_dfa_t *dfa = (re_dfa_t *)preg->buffer; + re_dfa_t *const dfa = mctx->dfa; int i, err, dest_node; dest_node = -1; if (IS_EPSILON_NODE (dfa->nodes[node].type)) @@ -1135,7 +1147,7 @@ int ndest, dest_nodes[2]; err = re_node_set_insert (eps_via_nodes, node); if (BE (err < 0, 0)) - return -1; + return -2; /* Pick up valid destinations. */ for (ndest = 0, i = 0; i < dfa->edests[node].nelem; ++i) { @@ -1151,8 +1163,10 @@ /* In order to avoid infinite loop like "(a*)*". */ if (re_node_set_contains (eps_via_nodes, dest_nodes[0])) return dest_nodes[1]; - if (fs != NULL) - push_fail_stack (fs, *pidx, dest_nodes, nregs, regs, eps_via_nodes); + if (fs != NULL + && push_fail_stack (fs, *pidx, dest_nodes, nregs, regs, + eps_via_nodes)) + return -2; return dest_nodes[0]; } else @@ -1162,7 +1176,7 @@ #ifdef RE_ENABLE_I18N if (ACCEPT_MB_NODE (type)) - naccepted = check_node_accept_bytes (preg, node, mctx->input, *pidx); + naccepted = check_node_accept_bytes (dfa, node, &mctx->input, *pidx); else #endif /* RE_ENABLE_I18N */ if (type == OP_BACK_REF) @@ -1175,7 +1189,7 @@ return -1; else if (naccepted) { - char *buf = (char *) re_string_get_buffer (mctx->input); + char *buf = (char *) re_string_get_buffer (&mctx->input); if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx, naccepted) != 0) return -1; @@ -1195,7 +1209,7 @@ } if (naccepted != 0 - || check_node_accept (preg, dfa->nodes + node, mctx, *pidx)) + || check_node_accept (mctx, dfa->nodes + node, *pidx)) { dest_node = dfa->nexts[node]; *pidx = (naccepted == 0) ? *pidx + 1 : *pidx + naccepted; @@ -1222,16 +1236,18 @@ if (fs->num == fs->alloc) { struct re_fail_stack_ent_t *new_array; - fs->alloc *= 2; new_array = realloc (fs->stack, (sizeof (struct re_fail_stack_ent_t) - * fs->alloc)); + * 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 = dests[1]; 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; @@ -1246,7 +1262,7 @@ { int num = --fs->num; assert (num >= 0); - *pidx = fs->stack[num].idx; + *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); @@ -1257,7 +1273,7 @@ /* 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 (i > 1). */ + pmatch[i].rm_so == pmatch[i].rm_eo == -1 for 0 < i < nmatch. */ static reg_errcode_t set_regs (preg, mctx, nmatch, pmatch, fl_backtrack) @@ -1267,14 +1283,13 @@ regmatch_t *pmatch; int fl_backtrack; { - re_dfa_t *dfa = (re_dfa_t *)preg->buffer; + re_dfa_t *dfa = (re_dfa_t *) preg->buffer; int idx, cur_node, real_nmatch; re_node_set eps_via_nodes; struct re_fail_stack_t *fs; - struct re_fail_stack_t fs_body; - fs_body.num = 0; - fs_body.alloc = 2; - fs_body.stack = NULL; + struct re_fail_stack_t fs_body = { 0, 2, NULL }; + regmatch_t *prev_idx_match; + #ifdef DEBUG assert (nmatch > 1); assert (mctx->state_log != NULL); @@ -1283,15 +1298,23 @@ { 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; real_nmatch = (nmatch <= preg->re_nsub) ? nmatch : preg->re_nsub + 1; re_node_set_init_empty (&eps_via_nodes); + + prev_idx_match = (regmatch_t *) alloca (sizeof (regmatch_t) * real_nmatch); + memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * real_nmatch); + for (idx = pmatch[0].rm_so; idx <= pmatch[0].rm_eo ;) { - update_regs (dfa, pmatch, cur_node, idx, real_nmatch); + update_regs (dfa, pmatch, prev_idx_match, cur_node, idx, real_nmatch); + if (idx == pmatch[0].rm_eo && cur_node == mctx->last_node) { int reg_idx; @@ -1316,13 +1339,17 @@ } /* Proceed to next node. */ - cur_node = proceed_next_node (preg, nmatch, pmatch, mctx, &idx, cur_node, + cur_node = proceed_next_node (mctx, nmatch, pmatch, &idx, cur_node, &eps_via_nodes, fs); if (BE (cur_node < 0, 0)) { - if (cur_node == -2) - return REG_ESPACE; + if (BE (cur_node == -2, 0)) + { + re_node_set_free (&eps_via_nodes); + free_fail_stack_return (fs); + return REG_ESPACE; + } if (fs) cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch, &eps_via_nodes); @@ -1355,31 +1382,55 @@ } static void -update_regs (dfa, pmatch, cur_node, cur_idx, nmatch) +update_regs (dfa, pmatch, prev_idx_match, cur_node, cur_idx, nmatch) re_dfa_t *dfa; - regmatch_t *pmatch; + regmatch_t *pmatch, *prev_idx_match; int cur_node, cur_idx, nmatch; { int type = dfa->nodes[cur_node].type; - int reg_num; - if (type != OP_OPEN_SUBEXP && type != OP_CLOSE_SUBEXP) - return; - reg_num = dfa->nodes[cur_node].opr.idx + 1; - if (reg_num >= nmatch) - return; if (type == OP_OPEN_SUBEXP) { + int reg_num = dfa->nodes[cur_node].opr.idx + 1; + /* We are at the first node of this sub expression. */ - pmatch[reg_num].rm_so = cur_idx; - pmatch[reg_num].rm_eo = -1; + if (reg_num < nmatch) + { + pmatch[reg_num].rm_so = cur_idx; + pmatch[reg_num].rm_eo = -1; + } } else if (type == OP_CLOSE_SUBEXP) - /* We are at the first node of this sub expression. */ - pmatch[reg_num].rm_eo = cur_idx; + { + int 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; + } + } + } } -#define NUMBER_OF_STATE 1 - /* 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. @@ -1393,24 +1444,23 @@ 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 - throwed away, we throw away the node `a'. - 3. When 0 <= STR_IDX < n and 'a' epsilon transit to 'b': + 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 throwed away, + 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 -sift_states_backward (preg, mctx, sctx) - const regex_t *preg; +sift_states_backward (mctx, sctx) re_match_context_t *mctx; re_sift_context_t *sctx; { + re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; - re_dfa_t *dfa = (re_dfa_t *)preg->buffer; int null_cnt = 0; int str_idx = sctx->last_str_idx; re_node_set cur_dest; @@ -1426,7 +1476,7 @@ err = re_node_set_init_1 (&cur_dest, sctx->last_node); if (BE (err != REG_NOERROR, 0)) return err; - err = update_cur_sifted_state (preg, mctx, sctx, str_idx, &cur_dest); + err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); if (BE (err != REG_NOERROR, 0)) goto free_return; @@ -1460,12 +1510,12 @@ int naccepted = 0; re_token_type_t type = dfa->nodes[prev_node].type; - if (IS_EPSILON_NODE(type)) + if (IS_EPSILON_NODE (type)) continue; #ifdef RE_ENABLE_I18N /* If the node may accept `multi byte'. */ if (ACCEPT_MB_NODE (type)) - naccepted = sift_states_iter_mb (preg, mctx, sctx, prev_node, + naccepted = sift_states_iter_mb (mctx, sctx, prev_node, str_idx, sctx->last_str_idx); #endif /* RE_ENABLE_I18N */ @@ -1473,8 +1523,7 @@ See update_cur_sifted_state(). */ if (!naccepted - && check_node_accept (preg, dfa->nodes + prev_node, mctx, - str_idx) + && 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; @@ -1485,7 +1534,7 @@ if (sctx->limits.nelem) { int to_idx = str_idx + naccepted; - if (check_dst_limits (dfa, &sctx->limits, mctx, + if (check_dst_limits (mctx, &sctx->limits, dfa->nexts[prev_node], to_idx, prev_node, str_idx)) continue; @@ -1502,7 +1551,7 @@ - It can epsilon transit to a node in CUR_DEST. - It is in CUR_SRC. And update state_log. */ - err = update_cur_sifted_state (preg, mctx, sctx, str_idx, &cur_dest); + err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); if (BE (err != REG_NOERROR, 0)) goto free_return; } @@ -1514,16 +1563,16 @@ /* Helper functions. */ -static inline reg_errcode_t -clean_state_log_if_need (mctx, next_state_log_idx) +static reg_errcode_t +clean_state_log_if_needed (mctx, next_state_log_idx) re_match_context_t *mctx; int next_state_log_idx; { int 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)) + 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); @@ -1570,15 +1619,14 @@ } static reg_errcode_t -update_cur_sifted_state (preg, mctx, sctx, str_idx, dest_nodes) - const regex_t *preg; +update_cur_sifted_state (mctx, sctx, str_idx, dest_nodes) re_match_context_t *mctx; re_sift_context_t *sctx; int str_idx; re_node_set *dest_nodes; { + re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; - re_dfa_t *dfa = (re_dfa_t *)preg->buffer; const re_node_set *candidates; candidates = ((mctx->state_log[str_idx] == NULL) ? &empty_set : &mctx->state_log[str_idx]->nodes); @@ -1609,7 +1657,7 @@ if ((mctx->state_log[str_idx] != NULL && mctx->state_log[str_idx]->has_backref)) { - err = sift_states_bkref (preg, mctx, sctx, str_idx, dest_nodes); + err = sift_states_bkref (mctx, sctx, str_idx, dest_nodes); if (BE (err != REG_NOERROR, 0)) return err; } @@ -1696,12 +1744,12 @@ } static int -check_dst_limits (dfa, limits, mctx, dst_node, dst_idx, src_node, src_idx) - re_dfa_t *dfa; - re_node_set *limits; +check_dst_limits (mctx, limits, dst_node, dst_idx, src_node, src_idx) re_match_context_t *mctx; + re_node_set *limits; int dst_node, dst_idx, src_node, src_idx; { + re_dfa_t *const dfa = mctx->dfa; int lim_idx, src_pos, dst_pos; for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx) @@ -1711,10 +1759,10 @@ ent = mctx->bkref_ents + limits->elems[lim_idx]; subexp_idx = dfa->nodes[ent->node].opr.idx - 1; - dst_pos = check_dst_limits_calc_pos (dfa, mctx, limits->elems[lim_idx], + dst_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], dfa->eclosures + dst_node, subexp_idx, dst_node, dst_idx); - src_pos = check_dst_limits_calc_pos (dfa, mctx, limits->elems[lim_idx], + src_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], dfa->eclosures + src_node, subexp_idx, src_node, src_idx); @@ -1731,60 +1779,98 @@ } static int -check_dst_limits_calc_pos (dfa, mctx, limit, eclosures, subexp_idx, node, +check_dst_limits_calc_pos (mctx, limit, eclosures, subexp_idx, from_node, str_idx) - re_dfa_t *dfa; re_match_context_t *mctx; re_node_set *eclosures; - int limit, subexp_idx, node, str_idx; + int limit, subexp_idx, from_node, str_idx; { + re_dfa_t *const dfa = mctx->dfa; struct re_backref_cache_entry *lim = mctx->bkref_ents + limit; - int pos = (str_idx < lim->subexp_from ? -1 - : (lim->subexp_to < str_idx ? 1 : 0)); - if (pos == 0 - && (str_idx == lim->subexp_from || str_idx == lim->subexp_to)) - { - int node_idx; - for (node_idx = 0; node_idx < eclosures->nelem; ++node_idx) - { - int node = eclosures->elems[node_idx]; - re_token_type_t type= dfa->nodes[node].type; - if (type == OP_BACK_REF) - { - int bi = search_cur_bkref_entry (mctx, str_idx); - for (; bi < mctx->nbkref_ents; ++bi) - { - struct re_backref_cache_entry *ent = mctx->bkref_ents + bi; - if (ent->str_idx > str_idx) - break; - if (ent->node == node && ent->subexp_from == ent->subexp_to) - { - int cpos, dst; - dst = dfa->edests[node].elems[0]; - cpos = check_dst_limits_calc_pos (dfa, mctx, limit, - dfa->eclosures + dst, - subexp_idx, dst, - str_idx); - if ((str_idx == lim->subexp_from && cpos == -1) - || (str_idx == lim->subexp_to && cpos == 0)) - return cpos; - } - } - } - if (type == OP_OPEN_SUBEXP && subexp_idx == dfa->nodes[node].opr.idx - && str_idx == lim->subexp_from) - { - pos = -1; + int node_idx; + + /* 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. */ + if (str_idx != lim->subexp_from && str_idx != lim->subexp_to) + return 0; + + /* Else, we are on the boundary: examine the nodes on the epsilon + closure. */ + for (node_idx = 0; node_idx < eclosures->nelem; ++node_idx) + { + int node = eclosures->elems[node_idx]; + switch (dfa->nodes[node].type) + { + case OP_BACK_REF: + { + int bi = search_cur_bkref_entry (mctx, str_idx); + for (; bi < mctx->nbkref_ents; ++bi) + { + struct re_backref_cache_entry *ent = mctx->bkref_ents + bi; + int dst, cpos; + + /* If this backreference goes beyond the point we're + examining, don't go any further. */ + if (ent->str_idx > str_idx) + break; + + if (ent->node != node || ent->subexp_from != ent->subexp_to) + 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 (str_idx == lim->subexp_from) + return -1; + else /* if (str_idx == lim->subexp_to) */ + return 0; + } + + cpos = check_dst_limits_calc_pos (mctx, limit, + dfa->eclosures + dst, + subexp_idx, dst, + str_idx); + + if (cpos == -1 && str_idx == lim->subexp_from) + return -1; + + if (cpos == 0 /* && str_idx == lim->lim->subexp_to */) + return 0; + } break; } - if (type == OP_CLOSE_SUBEXP && subexp_idx == dfa->nodes[node].opr.idx - && str_idx == lim->subexp_to) + + case OP_OPEN_SUBEXP: + if (str_idx == lim->subexp_from && subexp_idx == dfa->nodes[node].opr.idx) + return -1; + break; + + case OP_CLOSE_SUBEXP: + if (str_idx == lim->subexp_to && subexp_idx == dfa->nodes[node].opr.idx) + return 0; + break; + + default: break; } - if (node_idx == eclosures->nelem && str_idx == lim->subexp_to) - pos = 1; } - return pos; + + if (str_idx == lim->subexp_to) + return 1; + else + return 0; } /* Check the limitations of sub expressions LIMITS, and remove the nodes @@ -1819,7 +1905,7 @@ for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) { int node = dest_nodes->elems[node_idx]; - re_token_type_t type= dfa->nodes[node].type; + re_token_type_t type = dfa->nodes[node].type; if (type == OP_OPEN_SUBEXP && subexp_idx == dfa->nodes[node].opr.idx) ops_node = node; @@ -1832,34 +1918,38 @@ /* Note that (ent->subexp_to = str_idx != ent->subexp_from). */ if (ops_node >= 0) { - err = sub_epsilon_src_nodes(dfa, ops_node, dest_nodes, - candidates); + 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. */ - for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) - { - int 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; - } - } + if (cls_node >= 0) + for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) + { + int 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) { int node = dest_nodes->elems[node_idx]; - re_token_type_t type= dfa->nodes[node].type; + 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) @@ -1869,8 +1959,8 @@ { /* It is against this limitation. Remove it form the current sifted state. */ - err = sub_epsilon_src_nodes(dfa, node, dest_nodes, - candidates); + err = sub_epsilon_src_nodes (dfa, node, dest_nodes, + candidates); if (BE (err != REG_NOERROR, 0)) return err; } @@ -1882,15 +1972,14 @@ } static reg_errcode_t -sift_states_bkref (preg, mctx, sctx, str_idx, dest_nodes) - const regex_t *preg; +sift_states_bkref (mctx, sctx, str_idx, dest_nodes) re_match_context_t *mctx; re_sift_context_t *sctx; int str_idx; re_node_set *dest_nodes; { + re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; - re_dfa_t *dfa = (re_dfa_t *)preg->buffer; int node_idx, node; re_sift_context_t local_sctx; const re_node_set *candidates; @@ -1900,7 +1989,7 @@ for (node_idx = 0; node_idx < candidates->nelem; ++node_idx) { - int cur_bkref_idx = re_string_cur_idx (mctx->input); + int cur_bkref_idx = re_string_cur_idx (&mctx->input); re_token_type_t type; node = candidates->elems[node_idx]; type = dfa->nodes[node].type; @@ -1930,7 +2019,7 @@ || sctx->sifted_states[to_idx] == NULL || !STATE_NODE_CONTAINS (sctx->sifted_states[to_idx], dst_node) - || check_dst_limits (dfa, &sctx->limits, mctx, node, + || check_dst_limits (mctx, &sctx->limits, node, str_idx, dst_node, to_idx)) continue; { @@ -1963,7 +2052,7 @@ goto free_return; } cur_state = local_sctx.sifted_states[str_idx]; - err = sift_states_backward (preg, mctx, &local_sctx); + err = sift_states_backward (mctx, &local_sctx); if (BE (err != REG_NOERROR, 0)) goto free_return; if (sctx->limited_states != NULL) @@ -2006,21 +2095,20 @@ #ifdef RE_ENABLE_I18N static int -sift_states_iter_mb (preg, mctx, sctx, node_idx, str_idx, max_str_idx) - const regex_t *preg; +sift_states_iter_mb (mctx, sctx, node_idx, str_idx, max_str_idx) const re_match_context_t *mctx; re_sift_context_t *sctx; int node_idx, str_idx, max_str_idx; { - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; + re_dfa_t *const dfa = mctx->dfa; int naccepted; /* Check the node can accept `multi byte'. */ - naccepted = check_node_accept_bytes (preg, node_idx, mctx->input, str_idx); + 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 throwed away, then the node + 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 @@ -2038,21 +2126,19 @@ update the destination of STATE_LOG. */ static re_dfastate_t * -transit_state (err, preg, mctx, state, fl_search) +transit_state (err, mctx, state) reg_errcode_t *err; - const regex_t *preg; re_match_context_t *mctx; re_dfastate_t *state; - int fl_search; { - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; + re_dfa_t *const dfa = mctx->dfa; re_dfastate_t **trtable, *next_state; unsigned char ch; int cur_idx; - if (re_string_cur_idx (mctx->input) + 1 >= mctx->input->bufs_len - || (re_string_cur_idx (mctx->input) + 1 >= mctx->input->valid_len - && mctx->input->valid_len < mctx->input->len)) + if (re_string_cur_idx (&mctx->input) + 1 >= mctx->input.bufs_len + || (re_string_cur_idx (&mctx->input) + 1 >= mctx->input.valid_len + && mctx->input.valid_len < mctx->input.len)) { *err = extend_buffers (mctx); if (BE (*err != REG_NOERROR, 0)) @@ -2063,7 +2149,7 @@ if (state == NULL) { next_state = state; - re_string_skip_bytes (mctx->input, 1); + re_string_skip_bytes (&mctx->input, 1); } else { @@ -2071,7 +2157,7 @@ /* If the current state can accept multibyte. */ if (state->accept_mb) { - *err = transit_state_mb (preg, state, mctx); + *err = transit_state_mb (mctx, state); if (BE (*err != REG_NOERROR, 0)) return NULL; } @@ -2081,28 +2167,44 @@ if (1) { /* Use transition table */ - ch = re_string_fetch_byte (mctx->input); - trtable = fl_search ? state->trtable_search : state->trtable; + ch = re_string_fetch_byte (&mctx->input); + trtable = state->trtable; if (trtable == NULL) { - trtable = build_trtable (preg, state, fl_search); - if (fl_search) - state->trtable_search = trtable; + trtable = build_trtable (dfa, state); + if (trtable == NULL) + { + *err = REG_ESPACE; + return NULL; + } + } + if (BE (state->word_trtable, 0)) + { + unsigned int context; + context + = re_string_context_at (&mctx->input, + re_string_cur_idx (&mctx->input) - 1, + mctx->eflags); + if (IS_WORD_CONTEXT (context)) + next_state = trtable[ch + SBC_MAX]; else - state->trtable = trtable; + next_state = trtable[ch]; } - next_state = trtable[ch]; + else + next_state = trtable[ch]; } +#if 0 else { /* don't use transition table */ - next_state = transit_state_sb (err, preg, state, fl_search, mctx); + next_state = transit_state_sb (err, mctx, state); if (BE (next_state == NULL && err != REG_NOERROR, 0)) return NULL; } +#endif } - cur_idx = re_string_cur_idx (mctx->input); + cur_idx = re_string_cur_idx (&mctx->input); /* Update the state_log if we need. */ if (mctx->state_log != NULL) { @@ -2139,9 +2241,9 @@ /* 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, preg->newline_anchor); + 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 @@ -2152,24 +2254,24 @@ } } - /* 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. */ - if (dfa->nbackref && next_state/* && fl_process_bkref */) + if (BE (dfa->nbackref, 0) && next_state != NULL) { - *err = check_subexp_matching_top (dfa, mctx, &next_state->nodes, + /* 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 != NULL && next_state->has_backref) - { - *err = transit_state_bkref (preg, &next_state->nodes, mctx); - if (BE (*err != REG_NOERROR, 0)) - return NULL; - next_state = mctx->state_log[cur_idx]; + /* 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; } @@ -2182,12 +2284,12 @@ correspoding back references. */ static reg_errcode_t -check_subexp_matching_top (dfa, mctx, cur_nodes, str_idx) - re_dfa_t *dfa; +check_subexp_matching_top (mctx, cur_nodes, str_idx) re_match_context_t *mctx; re_node_set *cur_nodes; int str_idx; { + re_dfa_t *const dfa = mctx->dfa; int node_idx; reg_errcode_t err; @@ -2200,6 +2302,7 @@ { int node = cur_nodes->elems[node_idx]; if (dfa->nodes[node].type == OP_OPEN_SUBEXP + && dfa->nodes[node].opr.idx < (8 * sizeof (dfa->used_bkref_map)) && dfa->used_bkref_map & (1 << dfa->nodes[node].opr.idx)) { err = match_ctx_add_subtop (mctx, node, str_idx); @@ -2210,21 +2313,20 @@ 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 (err, preg, state, fl_search, mctx) +transit_state_sb (err, mctx, state) reg_errcode_t *err; - const regex_t *preg; - re_dfastate_t *state; - int fl_search; re_match_context_t *mctx; + re_dfastate_t *state; { - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; + re_dfa_t *const dfa = mctx->dfa; re_node_set next_nodes; re_dfastate_t *next_state; - int node_cnt, cur_str_idx = re_string_cur_idx (mctx->input); + int 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); @@ -2233,7 +2335,7 @@ for (node_cnt = 0; node_cnt < state->nodes.nelem; ++node_cnt) { int cur_node = state->nodes.elems[node_cnt]; - if (check_node_accept (preg, dfa->nodes + cur_node, mctx, cur_str_idx)) + 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]); @@ -2244,49 +2346,25 @@ } } } - if (fl_search) - { -#ifdef RE_ENABLE_I18N - int not_initial = 0; - if (re_mb_cur_max > 1) - for (node_cnt = 0; node_cnt < next_nodes.nelem; ++node_cnt) - if (dfa->nodes[next_nodes.elems[node_cnt]].type == CHARACTER) - { - not_initial = dfa->nodes[next_nodes.elems[node_cnt]].mb_partial; - break; - } - if (!not_initial) -#endif - { - *err = re_node_set_merge (&next_nodes, - dfa->init_state->entrance_nodes); - 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, - preg->newline_anchor); + 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); + re_string_skip_bytes (&mctx->input, 1); return next_state; } +#endif #ifdef RE_ENABLE_I18N static reg_errcode_t -transit_state_mb (preg, pstate, mctx) - const regex_t *preg; - re_dfastate_t *pstate; +transit_state_mb (mctx, pstate) re_match_context_t *mctx; + re_dfastate_t *pstate; { + re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; int i; for (i = 0; i < pstate->nodes.nelem; ++i) @@ -2299,26 +2377,26 @@ if (dfa->nodes[cur_node_idx].constraint) { - context = re_string_context_at (mctx->input, - re_string_cur_idx (mctx->input), - mctx->eflags, preg->newline_anchor); + 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 accepts? */ + /* How many bytes the node can accept? */ if (ACCEPT_MB_NODE (dfa->nodes[cur_node_idx].type)) - naccepted = check_node_accept_bytes (preg, cur_node_idx, mctx->input, - re_string_cur_idx (mctx->input)); + 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; + 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_need (mctx, dest_idx); + err = clean_state_log_if_needed (mctx, dest_idx); if (BE (err != REG_NOERROR, 0)) return err; #ifdef DEBUG @@ -2338,8 +2416,7 @@ if (BE (err != REG_NOERROR, 0)) return err; } - context = re_string_context_at (mctx->input, dest_idx - 1, mctx->eflags, - preg->newline_anchor); + 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) @@ -2352,22 +2429,21 @@ #endif /* RE_ENABLE_I18N */ static reg_errcode_t -transit_state_bkref (preg, nodes, mctx) - const regex_t *preg; - re_node_set *nodes; +transit_state_bkref (mctx, nodes) re_match_context_t *mctx; + const re_node_set *nodes; { + re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; int i; - int cur_str_idx = re_string_cur_idx (mctx->input); + int cur_str_idx = re_string_cur_idx (&mctx->input); for (i = 0; i < nodes->nelem; ++i) { int dest_str_idx, prev_nelem, bkc_idx; int node_idx = nodes->elems[i]; unsigned int context; - re_token_t *node = dfa->nodes + node_idx; + const re_token_t *node = dfa->nodes + node_idx; re_node_set *new_dest_nodes; /* Check whether `node' is a backreference or not. */ @@ -2376,8 +2452,8 @@ if (node->constraint) { - context = re_string_context_at (mctx->input, cur_str_idx, - mctx->eflags, preg->newline_anchor); + context = re_string_context_at (&mctx->input, cur_str_idx, + mctx->eflags); if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context)) continue; } @@ -2385,7 +2461,7 @@ /* `node' is a backreference. Check the substring which the substring matched. */ bkc_idx = mctx->nbkref_ents; - err = get_subexp (preg, mctx, node_idx, cur_str_idx); + err = get_subexp (mctx, node_idx, cur_str_idx); if (BE (err != REG_NOERROR, 0)) goto free_return; @@ -2408,8 +2484,8 @@ : 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, preg->newline_anchor); + 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); @@ -2446,11 +2522,11 @@ if (subexp_len == 0 && mctx->state_log[cur_str_idx]->nodes.nelem > prev_nelem) { - err = check_subexp_matching_top (dfa, mctx, new_dest_nodes, + 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 (preg, new_dest_nodes, mctx); + err = transit_state_bkref (mctx, new_dest_nodes); if (BE (err != REG_NOERROR, 0)) goto free_return; } @@ -2468,19 +2544,19 @@ delay these checking for prune_impossible_nodes(). */ static reg_errcode_t -get_subexp (preg, mctx, bkref_node, bkref_str_idx) - const regex_t *preg; +get_subexp (mctx, bkref_node, bkref_str_idx) re_match_context_t *mctx; int bkref_node, bkref_str_idx; { + re_dfa_t *const dfa = mctx->dfa; int subexp_num, sub_top_idx; - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; - char *buf = (char *) re_string_get_buffer (mctx->input); + const char *buf = (const char *) re_string_get_buffer (&mctx->input); /* Return if we have already checked BKREF_NODE at BKREF_STR_IDX. */ int cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx); for (; cache_idx < mctx->nbkref_ents; ++cache_idx) { - struct re_backref_cache_entry *entry = mctx->bkref_ents + cache_idx; + const struct re_backref_cache_entry *entry + = &mctx->bkref_ents[cache_idx]; if (entry->str_idx > bkref_str_idx) break; if (entry->node == bkref_node) @@ -2494,14 +2570,14 @@ reg_errcode_t err; re_sub_match_top_t *sub_top = mctx->sub_tops[sub_top_idx]; re_sub_match_last_t *sub_last; - int sub_last_idx, sl_str; - char *bkref_str; + int sub_last_idx, sl_str, bkref_str_off; + const char *bkref_str; if (dfa->nodes[sub_top->node].opr.idx != subexp_num) continue; /* It isn't related. */ sl_str = sub_top->str_idx; - bkref_str = buf + bkref_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) @@ -2512,17 +2588,24 @@ /* The matched string by the sub expression match with the substring at the back reference? */ if (sl_str_diff > 0 - && memcmp (bkref_str, buf + sl_str, sl_str_diff) != 0) + && memcmp (buf + bkref_str_off, buf + sl_str, sl_str_diff) != 0) break; /* We don't need to search this sub expression any more. */ - bkref_str += sl_str_diff; + bkref_str_off += sl_str_diff; sl_str += sl_str_diff; - err = get_subexp_sub (preg, mctx, sub_top, sub_last, bkref_node, + 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; } + bkref_str = buf + bkref_str_off; + if (sub_last_idx < sub_top->nlasts) continue; if (sub_last_idx > 0) @@ -2531,18 +2614,17 @@ for (; sl_str <= bkref_str_idx; ++sl_str) { int cls_node, sl_str_off; - re_node_set *nodes; + 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 - && memcmp (bkref_str++, buf + sl_str - 1, 1) != 0) + if (sl_str_off > 0 && *bkref_str++ != 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, 0); + cls_node = find_subexp_node (dfa, nodes, subexp_num, OP_CLOSE_SUBEXP); if (cls_node == -1) continue; /* No. */ if (sub_top->path == NULL) @@ -2554,8 +2636,8 @@ } /* Can the OP_OPEN_SUBEXP node arrive the OP_CLOSE_SUBEXP node in the current context? */ - err = check_arrival (preg, mctx, sub_top->path, sub_top->node, - sub_top->str_idx, cls_node, sl_str, 0); + 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)) @@ -2563,7 +2645,7 @@ 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 (preg, mctx, sub_top, sub_last, bkref_node, + err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, bkref_str_idx); if (err == REG_NOMATCH) continue; @@ -2579,18 +2661,17 @@ and SUB_LAST. */ static reg_errcode_t -get_subexp_sub (preg, mctx, sub_top, sub_last, bkref_node, bkref_str) - const regex_t *preg; +get_subexp_sub (mctx, sub_top, sub_last, bkref_node, bkref_str) re_match_context_t *mctx; - re_sub_match_top_t *sub_top; + const re_sub_match_top_t *sub_top; re_sub_match_last_t *sub_last; int bkref_node, bkref_str; { reg_errcode_t err; int to_idx; /* Can the subexpression arrive the back reference? */ - err = check_arrival (preg, mctx, &sub_last->path, sub_last->node, - sub_last->str_idx, bkref_node, bkref_str, 1); + 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, @@ -2598,7 +2679,7 @@ if (BE (err != REG_NOERROR, 0)) return err; to_idx = bkref_str + sub_last->str_idx - sub_top->str_idx; - clean_state_log_if_need (mctx, to_idx); + clean_state_log_if_needed (mctx, to_idx); return REG_NOERROR; } @@ -2611,18 +2692,17 @@ E.g. RE: (a){2} */ static int -find_subexp_node (dfa, nodes, subexp_idx, fl_open) - re_dfa_t *dfa; - re_node_set *nodes; - int subexp_idx, fl_open; +find_subexp_node (dfa, nodes, subexp_idx, type) + const re_dfa_t *dfa; + const re_node_set *nodes; + int subexp_idx, type; { int cls_idx; for (cls_idx = 0; cls_idx < nodes->nelem; ++cls_idx) { int cls_node = nodes->elems[cls_idx]; - re_token_t *node = dfa->nodes + cls_node; - if (((fl_open && node->type == OP_OPEN_SUBEXP) - || (!fl_open && node->type == OP_CLOSE_SUBEXP)) + const re_token_t *node = dfa->nodes + cls_node; + if (node->type == type && node->opr.idx == subexp_idx) return cls_node; } @@ -2635,14 +2715,13 @@ Return REG_NOERROR if it can arrive, or REG_NOMATCH otherwise. */ static reg_errcode_t -check_arrival (preg, mctx, path, top_node, top_str, last_node, last_str, - fl_open) - const regex_t *preg; +check_arrival (mctx, path, top_node, top_str, last_node, last_str, + type) re_match_context_t *mctx; state_array_t *path; - int top_node, top_str, last_node, last_str, fl_open; + int top_node, top_str, last_node, last_str, type; { - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; + re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; int subexp_num, backup_cur_idx, str_idx, null_cnt; re_dfastate_t *cur_state = NULL; @@ -2652,14 +2731,17 @@ subexp_num = dfa->nodes[top_node].opr.idx; /* Extend the buffer if we need. */ - if (path->alloc < last_str + mctx->max_mb_elem_len + 1) + if (BE (path->alloc < last_str + mctx->max_mb_elem_len + 1, 0)) { re_dfastate_t **new_array; int old_alloc = path->alloc; path->alloc += last_str + mctx->max_mb_elem_len + 1; new_array = re_realloc (path->array, re_dfastate_t *, path->alloc); if (new_array == NULL) - return REG_ESPACE; + { + path->alloc = old_alloc; + return REG_ESPACE; + } path->array = new_array; memset (new_array + old_alloc, '\0', sizeof (re_dfastate_t *) * (path->alloc - old_alloc)); @@ -2669,19 +2751,18 @@ /* Temporary modify MCTX. */ backup_state_log = mctx->state_log; - backup_cur_idx = mctx->input->cur_idx; + backup_cur_idx = mctx->input.cur_idx; mctx->state_log = path->array; - mctx->input->cur_idx = str_idx; + mctx->input.cur_idx = str_idx; /* Setup initial node set. */ - context = re_string_context_at (mctx->input, str_idx - 1, mctx->eflags, - preg->newline_anchor); + 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, fl_open); + err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); @@ -2704,8 +2785,8 @@ { if (next_nodes.nelem) { - err = expand_bkref_cache (preg, mctx, &next_nodes, str_idx, last_str, - subexp_num, fl_open); + err = expand_bkref_cache (mctx, &next_nodes, str_idx, last_str, + subexp_num, type); if (BE ( err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); @@ -2736,8 +2817,8 @@ } if (cur_state) { - err = check_arrival_add_next_nodes(preg, dfa, mctx, str_idx, - &cur_state->nodes, &next_nodes); + err = check_arrival_add_next_nodes (mctx, str_idx, + &cur_state->nodes, &next_nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); @@ -2747,23 +2828,21 @@ ++str_idx; if (next_nodes.nelem) { - err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, - fl_open); + 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 (preg, mctx, &next_nodes, str_idx, last_str, - subexp_num, fl_open); + err = expand_bkref_cache (mctx, &next_nodes, str_idx, last_str, + 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, - preg->newline_anchor); + 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)) { @@ -2780,14 +2859,13 @@ /* Fix MCTX. */ mctx->state_log = backup_state_log; - mctx->input->cur_idx = backup_cur_idx; + mctx->input.cur_idx = backup_cur_idx; - if (cur_nodes == NULL) - return REG_NOMATCH; /* Then check the current node set has the node LAST_NODE. */ - return (re_node_set_contains (cur_nodes, last_node) - || re_node_set_contains (cur_nodes, last_node) ? REG_NOERROR - : REG_NOMATCH); + if (cur_nodes != NULL && re_node_set_contains (cur_nodes, last_node)) + return REG_NOERROR; + + return REG_NOMATCH; } /* Helper functions for check_arrival. */ @@ -2799,13 +2877,12 @@ Can't we unify them? */ static reg_errcode_t -check_arrival_add_next_nodes (preg, dfa, mctx, str_idx, cur_nodes, next_nodes) - const regex_t *preg; - re_dfa_t *dfa; +check_arrival_add_next_nodes (mctx, str_idx, cur_nodes, next_nodes) re_match_context_t *mctx; int str_idx; re_node_set *cur_nodes, *next_nodes; { + re_dfa_t *const dfa = mctx->dfa; int cur_idx; reg_errcode_t err; re_node_set union_set; @@ -2815,13 +2892,13 @@ int naccepted = 0; int cur_node = cur_nodes->elems[cur_idx]; re_token_type_t type = dfa->nodes[cur_node].type; - if (IS_EPSILON_NODE(type)) + if (IS_EPSILON_NODE (type)) continue; #ifdef RE_ENABLE_I18N /* If the node may accept `multi byte'. */ if (ACCEPT_MB_NODE (type)) { - naccepted = check_node_accept_bytes (preg, cur_node, mctx->input, + naccepted = check_node_accept_bytes (dfa, cur_node, &mctx->input, str_idx); if (naccepted > 1) { @@ -2838,21 +2915,12 @@ re_node_set_free (&union_set); return err; } - err = re_node_set_insert (&union_set, next_node); - if (BE (err < 0, 0)) - { - re_node_set_free (&union_set); - return REG_ESPACE; - } } - else + err = re_node_set_insert (&union_set, next_node); + if (BE (err < 0, 0)) { - err = re_node_set_insert (&union_set, next_node); - if (BE (err < 0, 0)) - { - re_node_set_free (&union_set); - return REG_ESPACE; - } + re_node_set_free (&union_set); + return REG_ESPACE; } mctx->state_log[next_idx] = re_acquire_state (&err, dfa, &union_set); @@ -2866,8 +2934,7 @@ } #endif /* RE_ENABLE_I18N */ if (naccepted - || check_node_accept (preg, dfa->nodes + cur_node, mctx, - str_idx)) + || check_node_accept (mctx, dfa->nodes + cur_node, str_idx)) { err = re_node_set_insert (next_nodes, dfa->nexts[cur_node]); if (BE (err < 0, 0)) @@ -2888,10 +2955,10 @@ */ static reg_errcode_t -check_arrival_expand_ecl (dfa, cur_nodes, ex_subexp, fl_open) +check_arrival_expand_ecl (dfa, cur_nodes, ex_subexp, type) re_dfa_t *dfa; re_node_set *cur_nodes; - int ex_subexp, fl_open; + int ex_subexp, type; { reg_errcode_t err; int idx, outside_node; @@ -2909,7 +2976,7 @@ { int cur_node = cur_nodes->elems[idx]; re_node_set *eclosure = dfa->eclosures + cur_node; - outside_node = find_subexp_node (dfa, eclosure, ex_subexp, fl_open); + outside_node = find_subexp_node (dfa, eclosure, ex_subexp, type); if (outside_node == -1) { /* There are no problematic nodes, just merge them. */ @@ -2924,7 +2991,7 @@ { /* There are problematic nodes, re-calculate incrementally. */ err = check_arrival_expand_ecl_sub (dfa, &new_nodes, cur_node, - ex_subexp, fl_open); + ex_subexp, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&new_nodes); @@ -2942,22 +3009,20 @@ problematic append it to DST_NODES. */ static reg_errcode_t -check_arrival_expand_ecl_sub (dfa, dst_nodes, target, ex_subexp, fl_open) +check_arrival_expand_ecl_sub (dfa, dst_nodes, target, ex_subexp, type) re_dfa_t *dfa; - int target, ex_subexp, fl_open; + int target, ex_subexp, type; re_node_set *dst_nodes; { - int cur_node, type; + int cur_node; for (cur_node = target; !re_node_set_contains (dst_nodes, cur_node);) { int err; - type = dfa->nodes[cur_node].type; - if (((type == OP_OPEN_SUBEXP && fl_open) - || (type == OP_CLOSE_SUBEXP && !fl_open)) + if (dfa->nodes[cur_node].type == type && dfa->nodes[cur_node].opr.idx == ex_subexp) { - if (!fl_open) + if (type == OP_CLOSE_SUBEXP) { err = re_node_set_insert (dst_nodes, cur_node); if (BE (err == -1, 0)) @@ -2974,7 +3039,7 @@ { err = check_arrival_expand_ecl_sub (dfa, dst_nodes, dfa->edests[cur_node].elems[1], - ex_subexp, fl_open); + ex_subexp, type); if (BE (err != REG_NOERROR, 0)) return err; } @@ -2989,15 +3054,14 @@ in MCTX->BKREF_ENTS. */ static reg_errcode_t -expand_bkref_cache (preg, mctx, cur_nodes, cur_str, last_str, subexp_num, - fl_open) - const regex_t *preg; +expand_bkref_cache (mctx, cur_nodes, cur_str, last_str, subexp_num, + type) re_match_context_t *mctx; - int cur_str, last_str, subexp_num, fl_open; + int cur_str, last_str, subexp_num, type; re_node_set *cur_nodes; { + re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; int cache_idx, cache_idx_start; /* The current state. */ @@ -3025,8 +3089,7 @@ 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, - fl_open); + 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 @@ -3080,14 +3143,13 @@ Return the new table if succeeded, otherwise return NULL. */ static re_dfastate_t ** -build_trtable (preg, state, fl_search) - const regex_t *preg; - const re_dfastate_t *state; - int fl_search; +build_trtable (dfa, state) + re_dfa_t *dfa; + re_dfastate_t *state; { reg_errcode_t err; - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; - int i, j, k, ch; + int i, j, ch; + unsigned int elem, mask; int dests_node_malloced = 0, dest_states_malloced = 0; int ndests; /* Number of the destination states from `state'. */ re_dfastate_t **trtable; @@ -3116,25 +3178,22 @@ dests_ch = (bitset *) (dests_node + SBC_MAX); /* Initialize transiton table. */ - trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX); - if (BE (trtable == NULL, 0)) - { - if (dests_node_malloced) - free (dests_node); - return NULL; - } + state->word_trtable = 0; /* At first, group all nodes belonging to `state' into several destinations. */ - ndests = group_nodes_into_DFAstates (preg, state, dests_node, dests_ch); + ndests = group_nodes_into_DFAstates (dfa, state, dests_node, dests_ch); if (BE (ndests <= 0, 0)) { if (dests_node_malloced) free (dests_node); /* Return NULL in case of an error, trtable otherwise. */ if (ndests == 0) - return trtable; - free (trtable); + { + state->trtable = (re_dfastate_t **) + calloc (sizeof (re_dfastate_t *), SBC_MAX);; + return state->trtable; + } return NULL; } @@ -3160,7 +3219,6 @@ re_node_set_free (&follows); for (i = 0; i < ndests; ++i) re_node_set_free (dests_node + i); - free (trtable); if (dests_node_malloced) free (dests_node); return NULL; @@ -3187,26 +3245,6 @@ goto out_free; } } - /* If search flag is set, merge the initial state. */ - if (fl_search) - { -#ifdef RE_ENABLE_I18N - int not_initial = 0; - for (j = 0; j < follows.nelem; ++j) - if (dfa->nodes[follows.elems[j]].type == CHARACTER) - { - not_initial = dfa->nodes[follows.elems[j]].mb_partial; - break; - } - if (!not_initial) -#endif - { - err = re_node_set_merge (&follows, - dfa->init_state->entrance_nodes); - 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; @@ -3218,11 +3256,16 @@ 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) + state->word_trtable = 1; + 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]; @@ -3231,47 +3274,76 @@ bitset_merge (acceptable, dests_ch[i]); } - /* Update the transition table. */ - /* For all characters ch...: */ - for (i = 0, ch = 0; i < BITSET_UINTS; ++i) - for (j = 0; j < UINT_BITS; ++j, ++ch) - if ((acceptable[i] >> j) & 1) - { - /* The current state accepts the character ch. */ - if (IS_WORD_CHAR (ch)) - { - for (k = 0; k < ndests; ++k) - if ((dests_ch[k][i] >> j) & 1) - { - /* k-th destination accepts the word character ch. */ - trtable[ch] = dest_states_word[k]; - /* There must be only one destination which accepts - character ch. See group_nodes_into_DFAstates. */ - break; - } + if (!BE (state->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 = (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_UINTS; ++i) + for (ch = i * UINT_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 /* not WORD_CHAR */ - { - for (k = 0; k < ndests; ++k) - if ((dests_ch[k][i] >> j) & 1) - { - /* k-th destination accepts the non-word character ch. */ - trtable[ch] = dest_states[k]; - /* There must be only one destination which accepts - character ch. See group_nodes_into_DFAstates. */ - break; - } + } + 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 = (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_UINTS; ++i) + for (ch = i * UINT_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 (k = 0; k < ndests; ++k) - if (bitset_contain (dests_ch[k], NEWLINE_CHAR)) + 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[k]; + trtable[NEWLINE_CHAR] = dest_states_nl[j]; + if (state->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; @@ -3288,6 +3360,7 @@ if (dests_node_malloced) free (dests_node); + state->trtable = trtable; return trtable; } @@ -3297,14 +3370,13 @@ to DEST_CH[i]. This function return the number of destinations. */ static int -group_nodes_into_DFAstates (preg, state, dests_node, dests_ch) - const regex_t *preg; +group_nodes_into_DFAstates (dfa, state, dests_node, dests_ch) + re_dfa_t *dfa; const re_dfastate_t *state; re_node_set *dests_node; bitset *dests_ch; { reg_errcode_t err; - const re_dfa_t *dfa = (re_dfa_t *) preg->buffer; int i, j, k; int ndests; /* Number of the destinations from `state'. */ bitset accepts; /* Characters a node can accept. */ @@ -3328,12 +3400,27 @@ } else if (type == OP_PERIOD) { - bitset_set_all (accepts); - if (!(preg->syntax & RE_DOT_NEWLINE)) +#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 (preg->syntax & RE_DOT_NOT_NULL) + if (dfa->syntax & RE_DOT_NOT_NULL) bitset_clear (accepts, '\0'); } +#ifdef RE_ENABLE_I18N + else if (type == OP_UTF8_PERIOD) + { + memset (accepts, 255, sizeof (unsigned int) * BITSET_UINTS / 2); + if (!(dfa->syntax & RE_DOT_NEWLINE)) + bitset_clear (accepts, '\n'); + if (dfa->syntax & RE_DOT_NOT_NULL) + bitset_clear (accepts, '\0'); + } +#endif else continue; @@ -3341,12 +3428,6 @@ match it the context. */ if (constraint) { - if (constraint & NEXT_WORD_CONSTRAINT) - for (j = 0; j < BITSET_UINTS; ++j) - accepts[j] &= dfa->word_char[j]; - if (constraint & NEXT_NOTWORD_CONSTRAINT) - for (j = 0; j < BITSET_UINTS; ++j) - accepts[j] &= ~dfa->word_char[j]; if (constraint & NEXT_NEWLINE_CONSTRAINT) { int accepts_newline = bitset_contain (accepts, NEWLINE_CHAR); @@ -3356,10 +3437,54 @@ else continue; } + if (constraint & NEXT_ENDBUF_CONSTRAINT) + { + bitset_empty (accepts); + continue; + } + + if (constraint & NEXT_WORD_CONSTRAINT) + { + unsigned int 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_UINTS; ++j) + any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j])); + else +#endif + for (j = 0; j < BITSET_UINTS; ++j) + any_set |= (accepts[j] &= dfa->word_char[j]); + if (!any_set) + continue; + } + if (constraint & NEXT_NOTWORD_CONSTRAINT) + { + unsigned int 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_UINTS; ++j) + any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j])); + else +#endif + for (j = 0; j < BITSET_UINTS; ++j) + any_set |= (accepts[j] &= ~dfa->word_char[j]); + if (!any_set) + continue; + } } /* Then divide `accepts' into DFA states, or create a new - state. */ + state. Above, we make sure that accepts is not empty. */ for (j = 0; j < ndests; ++j) { bitset intersec; /* Intersection sets, see below. */ @@ -3436,37 +3561,94 @@ can only accept one byte. */ static int -check_node_accept_bytes (preg, node_idx, input, str_idx) - const regex_t *preg; +check_node_accept_bytes (dfa, node_idx, input, str_idx) + re_dfa_t *dfa; int node_idx, str_idx; const re_string_t *input; { - const re_dfa_t *dfa = (re_dfa_t *) preg->buffer; const re_token_t *node = dfa->nodes + node_idx; - int elem_len = re_string_elem_size_at (input, str_idx); - int char_len = re_string_char_size_at (input, str_idx); + int char_len, elem_len; int i; -# ifdef _LIBC - int j; - uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); -# endif /* _LIBC */ - if (elem_len <= 1 && char_len <= 1) - return 0; + + 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 ((!(preg->syntax & RE_DOT_NEWLINE) && + if ((!(dfa->syntax & RE_DOT_NEWLINE) && re_string_byte_at (input, str_idx) == '\n') || - ((preg->syntax & RE_DOT_NOT_NULL) && + ((dfa->syntax & RE_DOT_NOT_NULL) && re_string_byte_at (input, str_idx) == '\0')) return 0; return char_len; } - else if (node->type == COMPLEX_BRACKET) + + elem_len = re_string_elem_size_at (input, str_idx); + if (elem_len <= 1 && char_len <= 1) + return 0; + + if (node->type == COMPLEX_BRACKET) { const re_charset_t *cset = node->opr.mbcset; # ifdef _LIBC - const unsigned char *pin = re_string_get_buffer (input) + str_idx; + const unsigned char *pin = ((char *) re_string_get_buffer (input) + + str_idx); + int j; + uint32_t nrules; # endif /* _LIBC */ int match_len = 0; wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars) @@ -3491,6 +3673,7 @@ } # ifdef _LIBC + nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { unsigned int in_collseq = 0; @@ -3529,7 +3712,7 @@ if (elem_len <= char_len) { collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); - in_collseq = collseq_table_lookup (collseqwc, wc); + in_collseq = __collseq_table_lookup (collseqwc, wc); } else in_collseq = find_collation_sequence_value (pin, elem_len); @@ -3676,33 +3859,41 @@ byte of the INPUT. */ static int -check_node_accept (preg, node, mctx, idx) - const regex_t *preg; - const re_token_t *node; +check_node_accept (mctx, node, idx) const re_match_context_t *mctx; + const re_token_t *node; int idx; { + re_dfa_t *const dfa = mctx->dfa; unsigned char ch; 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, - preg->newline_anchor); + unsigned int context = re_string_context_at (&mctx->input, idx, + mctx->eflags); if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context)) return 0; } - ch = re_string_byte_at (mctx->input, idx); - if (node->type == CHARACTER) - return node->opr.c == ch; - else if (node->type == SIMPLE_BRACKET) - return bitset_contain (node->opr.sbcset, ch); - else if (node->type == OP_PERIOD) - return !((ch == '\n' && !(preg->syntax & RE_DOT_NEWLINE)) - || (ch == '\0' && (preg->syntax & RE_DOT_NOT_NULL))); - else - return 0; + ch = re_string_byte_at (&mctx->input, idx); + switch (node->type) + { + case CHARACTER: + return node->opr.c == ch; + case SIMPLE_BRACKET: + return bitset_contain (node->opr.sbcset, ch); +#ifdef RE_ENABLE_I18N + case OP_UTF8_PERIOD: + if (ch >= 0x80) + return 0; + /* FALLTHROUGH */ +#endif + case OP_PERIOD: + return !((ch == '\n' && !(dfa->syntax & RE_DOT_NEWLINE)) + || (ch == '\0' && (dfa->syntax & RE_DOT_NOT_NULL))); + default: + return 0; + } } /* Extend the buffers, if the buffers have run out. */ @@ -3712,7 +3903,7 @@ re_match_context_t *mctx; { reg_errcode_t ret; - re_string_t *pstr = mctx->input; + re_string_t *pstr = &mctx->input; /* Double the lengthes of the buffers. */ ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); @@ -3722,9 +3913,11 @@ if (mctx->state_log != NULL) { /* And double the length of state_log. */ - re_dfastate_t **new_array; - new_array = re_realloc (mctx->state_log, re_dfastate_t *, - pstr->bufs_len * 2); + /* 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; @@ -3734,8 +3927,12 @@ if (pstr->icase) { #ifdef RE_ENABLE_I18N - if (re_mb_cur_max > 1) - build_wcs_upper_buffer (pstr); + 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); @@ -3743,15 +3940,13 @@ else { #ifdef RE_ENABLE_I18N - if (re_mb_cur_max > 1) + if (pstr->mb_cur_max > 1) build_wcs_buffer (pstr); else #endif /* RE_ENABLE_I18N */ { if (pstr->trans != NULL) re_string_translate_buffer (pstr); - else - pstr->valid_len = pstr->bufs_len; } } return REG_NOERROR; @@ -3763,13 +3958,11 @@ /* Initialize MCTX. */ static reg_errcode_t -match_ctx_init (mctx, eflags, input, n) +match_ctx_init (mctx, eflags, n) re_match_context_t *mctx; int eflags, n; - re_string_t *input; { mctx->eflags = eflags; - mctx->input = input; mctx->match_last = -1; if (n > 0) { @@ -3778,12 +3971,13 @@ if (BE (mctx->bkref_ents == NULL || mctx->sub_tops == NULL, 0)) return REG_ESPACE; } - else - mctx->bkref_ents = NULL; - mctx->nbkref_ents = 0; + /* 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->nsub_tops = 0; mctx->asub_tops = n; return REG_NOERROR; } @@ -3901,9 +4095,7 @@ { int i; for (i = 0; i < mctx->nbkref_ents; ++i) - { - mctx->bkref_ents[i].flag = 0; - } + mctx->bkref_ents[i].flag = 0; } /* Register the node NODE, whose type is OP_OPEN_SUBEXP, and which matches @@ -3918,18 +4110,19 @@ assert (mctx->sub_tops != NULL); assert (mctx->asub_tops > 0); #endif - if (mctx->nsub_tops == mctx->asub_tops) + if (BE (mctx->nsub_tops == mctx->asub_tops, 0)) { - re_sub_match_top_t **new_array; - mctx->asub_tops *= 2; - new_array = re_realloc (mctx->sub_tops, re_sub_match_top_t *, - mctx->asub_tops); + int 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 (mctx->sub_tops[mctx->nsub_tops] == NULL) + 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; @@ -3945,23 +4138,25 @@ int node, str_idx; { re_sub_match_last_t *new_entry; - if (subtop->nlasts == subtop->alasts) + if (BE (subtop->nlasts == subtop->alasts, 0)) { - re_sub_match_last_t **new_array; - subtop->alasts = 2 * subtop->alasts + 1; - new_array = re_realloc (subtop->lasts, re_sub_match_last_t *, - subtop->alasts); + int 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, 0)) - return NULL; - subtop->lasts[subtop->nlasts] = new_entry; - new_entry->node = node; - new_entry->str_idx = str_idx; - ++subtop->nlasts; + 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; } diff -urN gawk-3.1.3/replace.c gawk-3.1.4/replace.c --- gawk-3.1.3/replace.c 2002-10-28 10:16:13.000000000 +0200 +++ gawk-3.1.4/replace.c 2004-05-31 18:48:48.000000000 +0300 @@ -35,6 +35,10 @@ #include "missing_d/memset.c" #endif /* HAVE_MEMSET */ +#ifndef HAVE_MEMMOVE +#include "missing_d/memmove.c" +#endif /* HAVE_MEMMOVE */ + #ifndef HAVE_STRNCASECMP #include "missing_d/strncasecmp.c" #endif /* HAVE_STRCASE */ @@ -55,16 +59,22 @@ #include "missing_d/strtod.c" #endif /* HAVE_STRTOD */ +#ifndef HAVE_STRTOUL +#include "missing_d/strtoul.c" +#endif /* HAVE_STRTOUL */ + #ifndef HAVE_TZSET #include "missing_d/tzset.c" #endif /* HAVE_TZSET */ -#ifndef HAVE_MKTIME -#include "missing_d/mktime.c" -#endif /* HAVE_MKTIME */ - #if defined TANDEM #include "strdupc" #include "getidc" #include "strnchkc" #endif /* TANDEM */ + +#ifndef HAVE_MKTIME +/* mktime.c defines main() if DEBUG is set */ +#undef DEBUG +#include "missing_d/mktime.c" +#endif /* HAVE_MKTIME */ diff -urN gawk-3.1.3/test/ChangeLog gawk-3.1.4/test/ChangeLog --- gawk-3.1.3/test/ChangeLog 2003-07-07 21:02:44.000000000 +0300 +++ gawk-3.1.4/test/ChangeLog 2004-08-02 12:19:21.000000000 +0300 @@ -1,3 +1,93 @@ +Mon Aug 2 12:18:15 2004 Arnold D. Robbins + + * Release 3.1.4: Release tar file made. + +Wed Jul 14 16:04:46 2004 Arnold D. Robbins + + * Makefile.am (rstest6): new test. + * rstest6.awk, rstest6.in, rstest6.ok: new files. + +Tue Jul 13 10:53:32 2004 Arnold D. Robbins + + * strftlng: Use `$(CMP) ... >/dev/null 2>&1' instead of `-s' + for OS/2 and other systems that use `CMP = diff -a'. + +Mon Jun 14 18:44:39 2004 Pat Rankin + + * longwrds.awk: allow caller the means to override SORT command. + +Tue Jun 8 14:12:52 2004 Arnold D. Robbins + + * Makefile.am (fordel, printfbad1): new tests. + * fordel.awk, fordel.ok: new files. + * printfbad1.awk, printfbad1.ok: new files. + +Mon Apr 19 20:29:52 2004 Arnold D. Robbins + + * Makefile.am (manglprm): new test. + * manglprm.awk, manglprm.in, manglprm.ok: new files. + +Mon Feb 23 18:39:24 2004 Arnold D. Robbins + + * inftest.awk: Add loop limit per Nelson H.F. Beebe. + * Makefile.am (strftime): Use LC_ALL=C for `date' invocation. + +Thu Feb 12 02:08:15 2004 Stepan Kasal + + * Makefile.am (diffout): Use $(srcdir), when we are not building + in the source tree. + +Wed Feb 11 10:23:39 2004 Arnold D. Robbins + + * Makefile.am (strcat1): new test. + * strcat1.awk, strcat1.ok: new files. + +Fri Feb 6 12:09:55 2004 Arnold D. Robbins + + * Makefile.am (CLEANFILES): Added. + +Thu Feb 5 15:34:14 2004 Arnold D. Robbins + + * Makefile.am (exitval1): new test. + * exitval1.awk, exitval1.ok: new files. + +Mon Feb 2 10:29:19 2004 Arnold D. Robbins + + * Makefile.am (subamp): new test. + * subamp.awk, subamp.in, subamp.ok: new files. + + * subamp, ignrcas2, strftime: Set GAWK_LOCALE, not LC_ALL. + +Wed Jan 14 15:28:34 2004 Arnold D. Robbins + + * Makefile.am (backw): new test. + * backw.awk, backw.in, backw.ok: new files. + +Mon Dec 1 10:29:22 2003 Arnold D. Robbins + + * Makefile.am (concat3): new test. + * concat3.awk, concat3.ok: new files. + +Sun Nov 2 16:05:21 2003 Arnold D. Robbins + + * Makefile.am (concat2): new test. + * concat2.awk, concat2.ok: new files. + +Wed Oct 29 13:35:37 2003 Arnold D. Robbins + + * Makefile.am (subsepnm): new test. + * subsepnm.awk, subsepnm.ok: new files. + +Mon Sep 15 16:05:37 2003 Arnold D. Robbins + + * Makefile.am (ignrcas2): new test. + * ignrcas2.awk, ignrcas2.ok: new files. + +Tue Sep 9 16:03:34 2003 Arnold D. Robbins + + * Makefile.am (unterm): new test. + * unterm.awk, unterm.ok: new files. + Mon Jul 7 11:01:43 2003 Arnold D. Robbins * Release 3.1.3: Release tar file made. @@ -9,7 +99,7 @@ Thu Jun 26 15:44:33 2003 Arnold D. Robbins - * Makefile.am (match2, whiny): new test. + * Makefile.am (match2, whiny): new tests. * match2.awk, match2.ok: new files. * whiny.awk, whiny.ok: new files. diff -urN gawk-3.1.3/test/Makefile.am gawk-3.1.4/test/Makefile.am --- gawk-3.1.3/test/Makefile.am 2003-07-04 21:11:59.000000000 +0300 +++ gawk-3.1.4/test/Makefile.am 2004-07-28 16:48:08.000000000 +0300 @@ -1,7 +1,7 @@ # # test/Makefile.am --- automake input file for gawk # -# Copyright (C) 1988-2003 the Free Software Foundation, Inc. +# Copyright (C) 1988-2004 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. @@ -95,6 +95,9 @@ backgsub.awk \ backgsub.in \ backgsub.ok \ + backw.awk \ + backw.in \ + backw.ok \ badargs.ok \ childin.awk \ childin.in \ @@ -114,6 +117,10 @@ concat1.awk \ concat1.in \ concat1.ok \ + concat2.awk \ + concat2.ok \ + concat3.awk \ + concat3.ok \ convfmt.awk \ convfmt.ok \ datanonl.awk \ @@ -125,10 +132,14 @@ delarprm.ok \ delarpm2.awk \ delarpm2.ok \ + delfunc.awk \ + delfunc.ok \ dynlj.awk \ dynlj.ok \ eofsplit.awk \ eofsplit.ok \ + exitval1.awk \ + exitval1.ok \ fflush.ok \ fflush.sh \ fieldwdth.awk \ @@ -160,6 +171,8 @@ fnmisc.ok \ fnparydl.awk \ fnparydl.ok \ + fordel.awk \ + fordel.ok \ forsimp.awk \ forsimp.ok \ fsbs.awk \ @@ -237,6 +250,8 @@ ignrcase.awk \ ignrcase.in \ ignrcase.ok \ + ignrcas2.awk \ + ignrcas2.ok \ inftest.awk \ inftest.ok \ inputred.awk \ @@ -260,6 +275,9 @@ longwrds.awk \ longwrds.ok \ longwrds.in \ + manglprm.awk \ + manglprm.in \ + manglprm.ok \ manyfiles.awk \ manyfiles.ok \ match1.awk \ @@ -380,6 +398,8 @@ printf0.ok \ printf1.awk \ printf1.ok \ + printfbad1.awk \ + printfbad1.ok \ printfloat.awk \ printlang.awk \ prmarscl.awk \ @@ -442,6 +462,9 @@ rstest4.ok \ rstest5.awk \ rstest5.ok \ + rstest6.awk \ + rstest6.in \ + rstest6.ok \ rswhite.awk \ rswhite.in \ rswhite.ok \ @@ -473,6 +496,8 @@ sprintfc.awk \ sprintfc.in \ sprintfc.ok \ + strcat1.awk \ + strcat1.ok \ strtod.awk \ strtod.in \ strtod.ok \ @@ -481,6 +506,11 @@ strftime.awk \ strftlng.awk \ strftlng.ok \ + subamp.awk \ + subamp.in \ + subamp.ok \ + subsepnm.awk \ + subsepnm.ok \ subslash.awk \ subslash.ok \ substr.awk \ @@ -505,6 +535,8 @@ uninit4.ok \ uninitialized.awk \ uninitialized.ok \ + unterm.awk \ + unterm.ok \ whiny.awk \ whiny.in \ whiny.ok \ @@ -513,18 +545,21 @@ zeroflag.awk \ zeroflag.ok +# Get rid of core files when cleaning +CLEANFILES = core core.* + # try to keep these sorted BASIC_TESTS = addcomma anchgsub argarray arrayparm arrayref arrymem1 \ arrayprm2 arrayprm3 arryref2 arryref3 arryref4 arryref5 arynasty \ arynocls aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 \ aryprm8 arysubnm asgext awkpath back89 backgsub childin clobber \ - clsflnam compare compare2 concat1 convfmt datanonl defref \ - delarprm delarpm2 dynlj eofsplit fldchg fldchgnf fmttest fnamedat \ + clsflnam compare compare2 concat1 concat2 concat3 convfmt datanonl defref \ + delarprm delarpm2 delfunc dynlj eofsplit exitval1 fldchg fldchgnf fmttest fnamedat \ fnarray fnarray2 fnarydel fnaryscl fnasgnm fnmisc fnparydl \ - forsimp fsbs fsrs fstabplus funsemnl funsmnam funstack getline \ + fordel forsimp fsbs fsrs fstabplus funsemnl funsmnam funstack getline \ getline2 getline3 getlnbuf getnr2tb getnr2tm gsubasgn gsubtest \ gsubtst2 gsubtst3 gsubtst4 gsubtst5 hsprint inputred intest \ - intprec leaddig leadnl litoct longsub longwrds math membug1 \ + intprec leaddig leadnl litoct longsub longwrds manglprm math membug1 \ messages minusstr mmap8k nasty nasty2 negexp nested nfldstr \ nfneg nfset nlfldsep nlinstr nlstrina noeffect nofmtch noloop1 \ noloop2 nonl noparms nors nulrsend numindex numsubstr octsub ofmt \ @@ -534,15 +569,15 @@ reindops reparse resplit rs rsnul1nl rsnulbig rsnulbig2 rstest1 \ rstest2 rstest3 rstest4 rstest5 rswhite scalar sclforin sclifin \ sortempty splitargv splitarr splitdef splitvar splitwht sprintfc \ - strtod subslash substr swaplns synerr1 tradanch tweakfld uninit2 \ - uninit3 uninit4 uninitialized zeroe0 zeroflag + strcat1 strtod subamp subsepnm subslash substr swaplns synerr1 tradanch \ + tweakfld uninit2 uninit3 uninit4 uninitialized unterm zeroe0 zeroflag UNIX_TESTS = fflush getlnhd pid pipeio1 pipeio2 poundbang space strftlng -GAWK_EXT_TESTS = argtest asort asorti badargs clos1way fieldwdth fsfwfs \ - gensub gnuops2 gnureops icasefs icasers igncdym igncfs ignrcase lint \ - match1 match2 manyfiles nondec posix procinfs regx8bit rebuf reint \ - shadow sort1 strtonum strftime whiny +GAWK_EXT_TESTS = argtest asort asorti backw badargs clos1way fieldwdth fsfwfs \ + gensub gnuops2 gnureops icasefs icasers igncdym igncfs ignrcase \ + ignrcas2 lint match1 match2 manyfiles nondec posix procinfs \ + printfbad1 regx8bit rebuf reint rstest6 shadow sort1 strtonum strftime whiny EXTRA_TESTS = regtest inftest @@ -559,6 +594,9 @@ # This business forces the locale to be C for running the tests, # unless we override it to something else for testing. +# +# This can also be done in individual tests where we wish to +# check things specifically not in the C locale. AWK = LC_ALL=$${GAWKLOCALE:-C} LANG=$${GAWKLOCALE:-C} $(AWKPROG) # Message stuff is to make it a little easier to follow. @@ -701,9 +739,9 @@ @echo This test could fail on slow machines or on a minute boundary, @echo so if it does, double check the actual results: @echo $@ - @LC_ALL=C; export LC_ALL; LANG=C; export LANG; \ + @GAWK_LOCALE=C; export GAWK_LOCALE; \ TZ=GMT0; export TZ; \ - date | $(AWK) -v OUTPUT=_$@ -f $(srcdir)/strftime.awk + (LC_ALL=C date) | $(AWK) -v OUTPUT=_$@ -f $(srcdir)/strftime.awk @-$(CMP) strftime.ok _$@ && rm -f _$@ strftime.ok || exit 0 litoct:: @@ -742,7 +780,7 @@ strftlng:: @echo $@ @TZ=UTC; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ - @if $(CMP) -s $(srcdir)/strftlng.ok _$@ ; then : ; else \ + @if $(CMP) $(srcdir)/strftlng.ok _$@ >/dev/null 2>&1 ; then : ; else \ TZ=UTC0; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ ; \ fi @-$(CMP) $(srcdir)/strftlng.ok _$@ && rm -f _$@ @@ -854,6 +892,25 @@ @WHINY_USERS=1 $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +ignrcas2:: + @echo $@ + @GAWK_LOCALE=en_US ; export GAWK_LOCALE ; \ + $(AWK) -f $(srcdir)/$@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +subamp:: + @echo $@ + @GAWK_LOCALE=en_US.UTF-8 ; export GAWK_LOCALE ; \ + $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +# This test makes sure gawk exits with a zero code. +# Thus, unconditionally generate the exit code. +exitval1:: + @echo $@ + @$(AWK) -f $(srcdir)/exitval1.awk >_$@ 2>&1; echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + # Targets generated for other tests: include Maketests @@ -876,7 +933,7 @@ for i in _* ; \ do \ echo ============== $$i ============= ; \ - diff -c $${i#_}.ok $$i ; \ + diff -c $(srcdir)/$${i#_}.ok $$i ; \ done | more # This target is for testing with electric fence. diff -urN gawk-3.1.3/test/Makefile.in gawk-3.1.4/test/Makefile.in --- gawk-3.1.3/test/Makefile.in 2003-07-04 21:12:47.000000000 +0300 +++ gawk-3.1.4/test/Makefile.in 2004-08-02 12:16:31.000000000 +0300 @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.7.5 from Makefile.am. +# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004 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. @@ -17,7 +17,7 @@ # # test/Makefile.am --- automake input file for gawk # -# Copyright (C) 1988-2003 the Free Software Foundation, Inc. +# Copyright (C) 1988-2004 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. @@ -36,7 +36,6 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # - srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -44,7 +43,6 @@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. - am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 @@ -59,6 +57,35 @@ PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ +DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/Maketests ChangeLog +subdir = test +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ + $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ + $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ + $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/size_max.m4 \ + $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/stdint_h.m4 \ + $(top_srcdir)/m4/strtod.m4 $(top_srcdir)/m4/uintmax_t.m4 \ + $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/wchar_t.m4 \ + $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ @@ -70,6 +97,9 @@ # This business forces the locale to be C for running the tests, # unless we override it to something else for testing. +# +# This can also be done in individual tests where we wish to +# check things specifically not in the C locale. AWK = LC_ALL=$${GAWKLOCALE:-C} LANG=$${GAWKLOCALE:-C} $(AWKPROG) BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ @@ -90,6 +120,10 @@ GENCAT = @GENCAT@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ +HAVE_ASPRINTF = @HAVE_ASPRINTF@ +HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ +HAVE_SNPRINTF = @HAVE_SNPRINTF@ +HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -160,6 +194,7 @@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ +mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ @@ -167,7 +202,6 @@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ - EXTRA_DIST = \ reg \ lib \ @@ -240,6 +274,9 @@ backgsub.awk \ backgsub.in \ backgsub.ok \ + backw.awk \ + backw.in \ + backw.ok \ badargs.ok \ childin.awk \ childin.in \ @@ -259,6 +296,10 @@ concat1.awk \ concat1.in \ concat1.ok \ + concat2.awk \ + concat2.ok \ + concat3.awk \ + concat3.ok \ convfmt.awk \ convfmt.ok \ datanonl.awk \ @@ -270,10 +311,14 @@ delarprm.ok \ delarpm2.awk \ delarpm2.ok \ + delfunc.awk \ + delfunc.ok \ dynlj.awk \ dynlj.ok \ eofsplit.awk \ eofsplit.ok \ + exitval1.awk \ + exitval1.ok \ fflush.ok \ fflush.sh \ fieldwdth.awk \ @@ -305,6 +350,8 @@ fnmisc.ok \ fnparydl.awk \ fnparydl.ok \ + fordel.awk \ + fordel.ok \ forsimp.awk \ forsimp.ok \ fsbs.awk \ @@ -382,6 +429,8 @@ ignrcase.awk \ ignrcase.in \ ignrcase.ok \ + ignrcas2.awk \ + ignrcas2.ok \ inftest.awk \ inftest.ok \ inputred.awk \ @@ -405,6 +454,9 @@ longwrds.awk \ longwrds.ok \ longwrds.in \ + manglprm.awk \ + manglprm.in \ + manglprm.ok \ manyfiles.awk \ manyfiles.ok \ match1.awk \ @@ -525,6 +577,8 @@ printf0.ok \ printf1.awk \ printf1.ok \ + printfbad1.awk \ + printfbad1.ok \ printfloat.awk \ printlang.awk \ prmarscl.awk \ @@ -587,6 +641,9 @@ rstest4.ok \ rstest5.awk \ rstest5.ok \ + rstest6.awk \ + rstest6.in \ + rstest6.ok \ rswhite.awk \ rswhite.in \ rswhite.ok \ @@ -618,6 +675,8 @@ sprintfc.awk \ sprintfc.in \ sprintfc.ok \ + strcat1.awk \ + strcat1.ok \ strtod.awk \ strtod.in \ strtod.ok \ @@ -626,6 +685,11 @@ strftime.awk \ strftlng.awk \ strftlng.ok \ + subamp.awk \ + subamp.in \ + subamp.ok \ + subsepnm.awk \ + subsepnm.ok \ subslash.awk \ subslash.ok \ substr.awk \ @@ -650,6 +714,8 @@ uninit4.ok \ uninitialized.awk \ uninitialized.ok \ + unterm.awk \ + unterm.ok \ whiny.awk \ whiny.in \ whiny.ok \ @@ -659,18 +725,21 @@ zeroflag.ok +# Get rid of core files when cleaning +CLEANFILES = core core.* + # try to keep these sorted BASIC_TESTS = addcomma anchgsub argarray arrayparm arrayref arrymem1 \ arrayprm2 arrayprm3 arryref2 arryref3 arryref4 arryref5 arynasty \ arynocls aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 \ aryprm8 arysubnm asgext awkpath back89 backgsub childin clobber \ - clsflnam compare compare2 concat1 convfmt datanonl defref \ - delarprm delarpm2 dynlj eofsplit fldchg fldchgnf fmttest fnamedat \ + clsflnam compare compare2 concat1 concat2 concat3 convfmt datanonl defref \ + delarprm delarpm2 delfunc dynlj eofsplit exitval1 fldchg fldchgnf fmttest fnamedat \ fnarray fnarray2 fnarydel fnaryscl fnasgnm fnmisc fnparydl \ - forsimp fsbs fsrs fstabplus funsemnl funsmnam funstack getline \ + fordel forsimp fsbs fsrs fstabplus funsemnl funsmnam funstack getline \ getline2 getline3 getlnbuf getnr2tb getnr2tm gsubasgn gsubtest \ gsubtst2 gsubtst3 gsubtst4 gsubtst5 hsprint inputred intest \ - intprec leaddig leadnl litoct longsub longwrds math membug1 \ + intprec leaddig leadnl litoct longsub longwrds manglprm math membug1 \ messages minusstr mmap8k nasty nasty2 negexp nested nfldstr \ nfneg nfset nlfldsep nlinstr nlstrina noeffect nofmtch noloop1 \ noloop2 nonl noparms nors nulrsend numindex numsubstr octsub ofmt \ @@ -680,20 +749,16 @@ reindops reparse resplit rs rsnul1nl rsnulbig rsnulbig2 rstest1 \ rstest2 rstest3 rstest4 rstest5 rswhite scalar sclforin sclifin \ sortempty splitargv splitarr splitdef splitvar splitwht sprintfc \ - strtod subslash substr swaplns synerr1 tradanch tweakfld uninit2 \ - uninit3 uninit4 uninitialized zeroe0 zeroflag - + strcat1 strtod subamp subsepnm subslash substr swaplns synerr1 tradanch \ + tweakfld uninit2 uninit3 uninit4 uninitialized unterm zeroe0 zeroflag UNIX_TESTS = fflush getlnhd pid pipeio1 pipeio2 poundbang space strftlng - -GAWK_EXT_TESTS = argtest asort asorti badargs clos1way fieldwdth fsfwfs \ - gensub gnuops2 gnureops icasefs icasers igncdym igncfs ignrcase lint \ - match1 match2 manyfiles nondec posix procinfs regx8bit rebuf reint \ - shadow sort1 strtonum strftime whiny - +GAWK_EXT_TESTS = argtest asort asorti backw badargs clos1way fieldwdth fsfwfs \ + gensub gnuops2 gnureops icasefs icasers igncdym igncfs ignrcase \ + ignrcas2 lint match1 match2 manyfiles nondec posix procinfs \ + printfbad1 regx8bit rebuf reint rstest6 shadow sort1 strtonum strftime whiny EXTRA_TESTS = regtest inftest - INET_TESTS = inetechu inetecht inetdayu inetdayt # List of the tests which should be run with --lint option: @@ -701,25 +766,40 @@ # List of the files that appear in manual tests or are for reserve testing: GENTESTS_UNUSED = Makefile.in gtlnbufv.awk printfloat.awk switch2.awk - CMP = cmp AWKPROG = ../gawk$(EXEEXT) -subdir = test -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -DIST_SOURCES = -DIST_COMMON = README $(srcdir)/Maketests ChangeLog Makefile.am \ - Makefile.in all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: Makefile.am $(srcdir)/Maketests $(top_srcdir)/configure.ac $(ACLOCAL_M4) +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/Maketests $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu test/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) +.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 uninstall-info-am: tags: TAGS TAGS: @@ -727,10 +807,6 @@ ctags: CTAGS CTAGS: -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = .. -distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @@ -744,7 +820,7 @@ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ - $(mkinstalldirs) "$(distdir)$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ @@ -762,7 +838,6 @@ check-am: all-am check: check-am all-am: Makefile - installdirs: install: install-am install-exec: install-exec-am @@ -775,31 +850,32 @@ installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - INSTALL_STRIP_FLAG=-s \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f $(CONFIG_CLEAN_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 mostlyclean-am distclean: distclean-am - + -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: +html: html-am + info: info-am info-am: @@ -815,7 +891,7 @@ installcheck-am: maintainer-clean: maintainer-clean-am - + -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am @@ -833,8 +909,8 @@ uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic distclean \ - distclean-generic distdir dvi dvi-am info info-am install \ - install-am install-data install-data-am install-exec \ + distclean-generic distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ @@ -981,9 +1057,9 @@ @echo This test could fail on slow machines or on a minute boundary, @echo so if it does, double check the actual results: @echo $@ - @LC_ALL=C; export LC_ALL; LANG=C; export LANG; \ + @GAWK_LOCALE=C; export GAWK_LOCALE; \ TZ=GMT0; export TZ; \ - date | $(AWK) -v OUTPUT=_$@ -f $(srcdir)/strftime.awk + (LC_ALL=C date) | $(AWK) -v OUTPUT=_$@ -f $(srcdir)/strftime.awk @-$(CMP) strftime.ok _$@ && rm -f _$@ strftime.ok || exit 0 litoct:: @@ -1022,7 +1098,7 @@ strftlng:: @echo $@ @TZ=UTC; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ - @if $(CMP) -s $(srcdir)/strftlng.ok _$@ ; then : ; else \ + @if $(CMP) $(srcdir)/strftlng.ok _$@ >/dev/null 2>&1 ; then : ; else \ TZ=UTC0; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ ; \ fi @-$(CMP) $(srcdir)/strftlng.ok _$@ && rm -f _$@ @@ -1133,6 +1209,25 @@ @echo $@ @WHINY_USERS=1 $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +ignrcas2:: + @echo $@ + @GAWK_LOCALE=en_US ; export GAWK_LOCALE ; \ + $(AWK) -f $(srcdir)/$@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +subamp:: + @echo $@ + @GAWK_LOCALE=en_US.UTF-8 ; export GAWK_LOCALE ; \ + $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +# This test makes sure gawk exits with a zero code. +# Thus, unconditionally generate the exit code. +exitval1:: + @echo $@ + @$(AWK) -f $(srcdir)/exitval1.awk >_$@ 2>&1; echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: @@ -1275,6 +1370,16 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +concat2: + @echo concat2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +concat3: + @echo concat3 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + convfmt: @echo convfmt @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1300,6 +1405,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +delfunc: + @echo delfunc + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + dynlj: @echo dynlj @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1365,6 +1475,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +fordel: + @echo fordel + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + forsimp: @echo forsimp @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1480,6 +1595,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +manglprm: + @echo manglprm + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + math: @echo math @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1810,11 +1930,21 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +strcat1: + @echo strcat1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + strtod: @echo strtod @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +subsepnm: + @echo subsepnm + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + subslash: @echo subslash @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1855,6 +1985,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +unterm: + @echo unterm + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + zeroe0: @echo zeroe0 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1880,6 +2015,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +backw: + @echo backw + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + clos1way: @echo clos1way @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1965,6 +2105,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +printfbad1: + @echo printfbad1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + regx8bit: @echo regx8bit @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1975,6 +2120,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +rstest6: + @echo rstest6 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + shadow: @echo shadow @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2013,7 +2163,7 @@ for i in _* ; \ do \ echo ============== $$i ============= ; \ - diff -c $${i#_}.ok $$i ; \ + diff -c $(srcdir)/$${i#_}.ok $$i ; \ done | more # This target is for testing with electric fence. diff -urN gawk-3.1.3/test/Maketests gawk-3.1.4/test/Maketests --- gawk-3.1.3/test/Maketests 2003-07-04 21:12:44.000000000 +0300 +++ gawk-3.1.4/test/Maketests 2004-07-28 16:54:51.000000000 +0300 @@ -140,6 +140,16 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +concat2: + @echo concat2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +concat3: + @echo concat3 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + convfmt: @echo convfmt @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -165,6 +175,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +delfunc: + @echo delfunc + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + dynlj: @echo dynlj @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -230,6 +245,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +fordel: + @echo fordel + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + forsimp: @echo forsimp @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -345,6 +365,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +manglprm: + @echo manglprm + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + math: @echo math @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -675,11 +700,21 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +strcat1: + @echo strcat1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + strtod: @echo strtod @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +subsepnm: + @echo subsepnm + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + subslash: @echo subslash @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -720,6 +755,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +unterm: + @echo unterm + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + zeroe0: @echo zeroe0 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -745,6 +785,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +backw: + @echo backw + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + clos1way: @echo clos1way @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -830,6 +875,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +printfbad1: + @echo printfbad1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + regx8bit: @echo regx8bit @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -840,6 +890,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +rstest6: + @echo rstest6 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + shadow: @echo shadow @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff -urN gawk-3.1.3/test/backw.awk gawk-3.1.4/test/backw.awk --- gawk-3.1.3/test/backw.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/backw.awk 2004-01-14 15:26:51.000000000 +0200 @@ -0,0 +1 @@ +/\w+/ diff -urN gawk-3.1.3/test/backw.in gawk-3.1.4/test/backw.in --- gawk-3.1.3/test/backw.in 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/backw.in 2004-01-14 15:27:05.000000000 +0200 @@ -0,0 +1,3 @@ +123 +abc +456 diff -urN gawk-3.1.3/test/backw.ok gawk-3.1.4/test/backw.ok --- gawk-3.1.3/test/backw.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/backw.ok 2004-01-14 15:27:37.000000000 +0200 @@ -0,0 +1,3 @@ +123 +abc +456 diff -urN gawk-3.1.3/test/concat2.awk gawk-3.1.4/test/concat2.awk --- gawk-3.1.3/test/concat2.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/concat2.awk 2003-11-02 16:01:35.000000000 +0200 @@ -0,0 +1,8 @@ +function f(s, x) { + x = 1 + s = 3 + s = s x + print s +} + +BEGIN { for (i = 1; i <=12; i++) f() } diff -urN gawk-3.1.3/test/concat2.ok gawk-3.1.4/test/concat2.ok --- gawk-3.1.3/test/concat2.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/concat2.ok 2003-11-02 16:04:44.000000000 +0200 @@ -0,0 +1,12 @@ +31 +31 +31 +31 +31 +31 +31 +31 +31 +31 +31 +31 diff -urN gawk-3.1.3/test/concat3.awk gawk-3.1.4/test/concat3.awk --- gawk-3.1.3/test/concat3.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/concat3.awk 2003-12-01 10:28:22.000000000 +0200 @@ -0,0 +1 @@ +BEGIN { a; a = a (b "c"); print a; print b } diff -urN gawk-3.1.3/test/concat3.ok gawk-3.1.4/test/concat3.ok --- gawk-3.1.3/test/concat3.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/concat3.ok 2003-12-01 10:28:36.000000000 +0200 @@ -0,0 +1,2 @@ +c + diff -urN gawk-3.1.3/test/delfunc.awk gawk-3.1.4/test/delfunc.awk --- gawk-3.1.3/test/delfunc.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/delfunc.awk 2004-05-31 15:27:56.000000000 +0300 @@ -0,0 +1,7 @@ +# from Stepan Kasal, 9 July 2003 +function f() +{ + delete f +} + +BEGIN { f() } diff -urN gawk-3.1.3/test/delfunc.ok gawk-3.1.4/test/delfunc.ok --- gawk-3.1.3/test/delfunc.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/delfunc.ok 2004-05-31 15:29:49.000000000 +0300 @@ -0,0 +1,2 @@ +gawk: delfunc.awk:4: fatal: attempt to use function `f' as an array +EXIT CODE: 2 diff -urN gawk-3.1.3/test/exitval1.awk gawk-3.1.4/test/exitval1.awk --- gawk-3.1.3/test/exitval1.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/exitval1.awk 2004-02-05 15:32:43.000000000 +0200 @@ -0,0 +1,3 @@ +# This should exit 0, even though child exits 1 +BEGIN { "exit 1" | getline junk ; exit 12 } +END { exit 0 } diff -urN gawk-3.1.3/test/exitval1.ok gawk-3.1.4/test/exitval1.ok --- gawk-3.1.3/test/exitval1.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/exitval1.ok 2004-02-05 15:35:36.000000000 +0200 @@ -0,0 +1 @@ +EXIT CODE: 0 diff -urN gawk-3.1.3/test/fordel.awk gawk-3.1.4/test/fordel.awk --- gawk-3.1.3/test/fordel.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/fordel.awk 2004-06-08 14:11:13.000000000 +0300 @@ -0,0 +1,65 @@ +#Date: Mon, 7 Jun 2004 10:40:28 -0500 +#From: mary1john8@earthlink.net +#To: arnold@skeeve.com +#Subject: gawk internal errors +#Message-ID: <20040607154028.GA2457@apollo> +# +#Hello, +# +# gawk-3.1.3i internal errors: +# +#[1] +# +#$> ./gawk 'BEGIN { for (i in a) delete a; }' +BEGIN { for (i in a) delete a; } +#gawk: fatal error: internal error +#Aborted +# +#------------------------------------------------------------------ +#--- awkgram.y.orig 2004-06-07 09:42:14.000000000 -0500 +#+++ awkgram.y 2004-06-07 09:45:58.000000000 -0500 +#@@ -387,7 +387,7 @@ +# * Check that the body is a `delete a[i]' statement, +# * and that both the loop var and array names match. +# */ +#- if ($8 != NULL && $8->type == Node_K_delete) { +#+ if ($8 != NULL && $8->type == Node_K_delete && $8->rnode != NULL) { +# NODE *arr, *sub; +# +# assert($8->rnode->type == Node_expression_list); +#------------------------------------------------------------------ +# +# +#[2] +# +#$> ./gawk 'BEGIN { printf("%3$*10$.*1$s\n", 20, 10, "hello"); }' +#gawk: fatal error: internal error +#Aborted +# +#------------------------------------------------------------------ +#--- builtin.c.orig 2004-06-07 10:04:20.000000000 -0500 +#+++ builtin.c 2004-06-07 10:06:08.000000000 -0500 +#@@ -780,7 +780,10 @@ +# s1++; +# n0--; +# } +#- +#+ if (val >= num_args) { +#+ toofew = TRUE; +#+ break; +#+ } +# arg = the_args[val]; +# } else { +# parse_next_arg(); +#------------------------------------------------------------------ +# +# +# Finally, a test for the rewritten get_src_buf(): +# +#$> AWKBUFSIZE=2 make check +# +#I get 3 failed tests. Not sure this is of any interest. +# +# +#Thanks, +#John diff -urN gawk-3.1.3/test/ignrcas2.awk gawk-3.1.4/test/ignrcas2.awk --- gawk-3.1.3/test/ignrcas2.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/ignrcas2.awk 2003-09-15 16:05:28.000000000 +0300 @@ -0,0 +1,13 @@ +# Based on test program submitted by: +# Date: Sun, 7 Sep 2003 23:11:51 +0200 +# From: Michael Mauch +# To: bug-gawk@gnu.org +# Subject: Internal error in gawk-3.1.3 with character class + +BEGIN { + IGNORECASE = 1 + if ("a" ~ /[[:alnum:]]/) + print "OK" + else + print "NOT OK" +} diff -urN gawk-3.1.3/test/ignrcas2.ok gawk-3.1.4/test/ignrcas2.ok --- gawk-3.1.3/test/ignrcas2.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/ignrcas2.ok 2003-09-15 16:02:29.000000000 +0300 @@ -0,0 +1 @@ +OK diff -urN gawk-3.1.3/test/inftest.awk gawk-3.1.4/test/inftest.awk --- gawk-3.1.3/test/inftest.awk 2001-05-06 13:30:16.000000000 +0300 +++ gawk-3.1.4/test/inftest.awk 2004-02-23 17:44:23.000000000 +0200 @@ -1,5 +1,8 @@ BEGIN { + k = 0 x = 100 - do { y = x ; x *= 1000; print x,y } while ( y < x ) + # Added k limit test after finding some systems that didn't terminate + # the loop correctly, sigh... + do { k++; y = x ; x *= 1000; print x,y } while ( y < x && k < 1700) print "loop terminated" } diff -urN gawk-3.1.3/test/longwrds.awk gawk-3.1.4/test/longwrds.awk --- gawk-3.1.3/test/longwrds.awk 2002-11-03 15:19:19.000000000 +0200 +++ gawk-3.1.4/test/longwrds.awk 2004-06-15 14:16:06.000000000 +0300 @@ -1,4 +1,10 @@ # From Gawk Manual modified by bug fix and removal of punctuation + +# Invoker can customize sort command if necessary. +BEGIN { + if (!SORT) SORT = "LC_ALL=C sort" +} + # Record every word which is used at least once { for (i = 1; i <= NF; i++) { @@ -14,8 +20,8 @@ for (x in used) if (length(x) > 10) { ++num_long_words - print x | "LC_ALL=C sort" + print x | SORT } - print(num_long_words, "long words") | "LC_ALL=C sort" - close("LC_ALL=C sort") + print(num_long_words, "long words") | SORT + close(SORT) } diff -urN gawk-3.1.3/test/manglprm.awk gawk-3.1.4/test/manglprm.awk --- gawk-3.1.3/test/manglprm.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/manglprm.awk 2004-05-31 15:13:29.000000000 +0300 @@ -0,0 +1,41 @@ +# From beebe@sunshine.math.utah.edu Thu Jul 10 00:36:16 2003 +# Date: Wed, 9 Jul 2003 06:42:54 -0600 (MDT) +# From: "Nelson H. F. Beebe" +# To: "Arnold Robbins" +# Cc: beebe@math.utah.edu +# X-US-Mail: "Center for Scientific Computing, Department of Mathematics, 110 +# LCB, University of Utah, 155 S 1400 E RM 233, Salt Lake City, UT +# 84112-0090, USA" +# X-Telephone: +1 801 581 5254 +# X-FAX: +1 801 585 1640, +1 801 581 4148 +# X-URL: http://www.math.utah.edu/~beebe +# Subject: gawk-3.1.3 (and earlier): reproducible core dump +# X-SpamBouncer: 1.4 (10/07/01) +# X-SBClass: OK +# +# I have a reproducible core dump in gawk-3.1.3, and recent gawk +# versions. +# +# Consider the following test program, reduced from a much larger one: +# +# % cat gawk-dump.awk + + { process($0) } + + function out_debug(s) + { + print s + } + + function process(s, n,parts) + { + out_debug("Buffer = [" protect(Buffer) "]") + Buffer = Buffer s + n = split(Buffer,parts,"\n") + } + + function protect(s) + { + gsub("\n", "\\n", s) + return (s) + } diff -urN gawk-3.1.3/test/manglprm.in gawk-3.1.4/test/manglprm.in --- gawk-3.1.3/test/manglprm.in 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/manglprm.in 2003-07-10 03:42:07.000000000 +0300 @@ -0,0 +1 @@ +Testing diff -urN gawk-3.1.3/test/manglprm.ok gawk-3.1.4/test/manglprm.ok --- gawk-3.1.3/test/manglprm.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/manglprm.ok 2004-04-19 20:28:44.000000000 +0300 @@ -0,0 +1 @@ +Buffer = [] diff -urN gawk-3.1.3/test/printfbad1.awk gawk-3.1.4/test/printfbad1.awk --- gawk-3.1.3/test/printfbad1.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/printfbad1.awk 2004-06-08 14:11:33.000000000 +0300 @@ -0,0 +1,65 @@ +#Date: Mon, 7 Jun 2004 10:40:28 -0500 +#From: mary1john8@earthlink.net +#To: arnold@skeeve.com +#Subject: gawk internal errors +#Message-ID: <20040607154028.GA2457@apollo> +# +#Hello, +# +# gawk-3.1.3i internal errors: +# +#[1] +# +#$> ./gawk 'BEGIN { for (i in a) delete a; }' +#gawk: fatal error: internal error +#Aborted +# +#------------------------------------------------------------------ +#--- awkgram.y.orig 2004-06-07 09:42:14.000000000 -0500 +#+++ awkgram.y 2004-06-07 09:45:58.000000000 -0500 +#@@ -387,7 +387,7 @@ +# * Check that the body is a `delete a[i]' statement, +# * and that both the loop var and array names match. +# */ +#- if ($8 != NULL && $8->type == Node_K_delete) { +#+ if ($8 != NULL && $8->type == Node_K_delete && $8->rnode != NULL) { +# NODE *arr, *sub; +# +# assert($8->rnode->type == Node_expression_list); +#------------------------------------------------------------------ +# +# +#[2] +# +#$> ./gawk 'BEGIN { printf("%3$*10$.*1$s\n", 20, 10, "hello"); }' +BEGIN { printf("%3$*10$.*1$s\n", 20, 10, "hello"); } +#gawk: fatal error: internal error +#Aborted +# +#------------------------------------------------------------------ +#--- builtin.c.orig 2004-06-07 10:04:20.000000000 -0500 +#+++ builtin.c 2004-06-07 10:06:08.000000000 -0500 +#@@ -780,7 +780,10 @@ +# s1++; +# n0--; +# } +#- +#+ if (val >= num_args) { +#+ toofew = TRUE; +#+ break; +#+ } +# arg = the_args[val]; +# } else { +# parse_next_arg(); +#------------------------------------------------------------------ +# +# +# Finally, a test for the rewritten get_src_buf(): +# +#$> AWKBUFSIZE=2 make check +# +#I get 3 failed tests. Not sure this is of any interest. +# +# +#Thanks, +#John diff -urN gawk-3.1.3/test/printfbad1.ok gawk-3.1.4/test/printfbad1.ok --- gawk-3.1.3/test/printfbad1.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/printfbad1.ok 2004-06-08 14:14:18.000000000 +0300 @@ -0,0 +1,5 @@ +gawk: printfbad1.awk:35: fatal: not enough arguments to satisfy format string + `%3$*10$.*1$s +' + ^ ran out for this one +EXIT CODE: 2 diff -urN gawk-3.1.3/test/rstest6.awk gawk-3.1.4/test/rstest6.awk --- gawk-3.1.3/test/rstest6.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/rstest6.awk 2004-07-14 16:03:20.000000000 +0300 @@ -0,0 +1,6 @@ +# Wed Jul 14 16:02:45 IDT 2004 +# Test case from John Haque mary1john8@earthlink.net + +BEGIN { RS = "XYZ" } + +{ print } diff -urN gawk-3.1.3/test/rstest6.in gawk-3.1.4/test/rstest6.in --- gawk-3.1.3/test/rstest6.in 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/rstest6.in 2004-07-14 16:02:27.000000000 +0300 @@ -0,0 +1 @@ +ABCD \ No newline at end of file diff -urN gawk-3.1.3/test/rstest6.ok gawk-3.1.4/test/rstest6.ok --- gawk-3.1.3/test/rstest6.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/rstest6.ok 2004-07-14 16:03:39.000000000 +0300 @@ -0,0 +1 @@ +ABCD diff -urN gawk-3.1.3/test/strcat1.awk gawk-3.1.4/test/strcat1.awk --- gawk-3.1.3/test/strcat1.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/strcat1.awk 2004-02-11 10:05:54.000000000 +0200 @@ -0,0 +1,6 @@ + +function f1(b) { b = b "c"; print f(b); } + +function f(a) { a = a "b"; return a; } + +BEGIN { A = "a"; f1(A); } diff -urN gawk-3.1.3/test/strcat1.ok gawk-3.1.4/test/strcat1.ok --- gawk-3.1.3/test/strcat1.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/strcat1.ok 2004-02-11 10:22:35.000000000 +0200 @@ -0,0 +1 @@ +acb diff -urN gawk-3.1.3/test/subamp.awk gawk-3.1.4/test/subamp.awk --- gawk-3.1.3/test/subamp.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/subamp.awk 2004-01-29 16:41:03.000000000 +0200 @@ -0,0 +1 @@ +{ sub(/[a-z]/, "&") ; print } diff -urN gawk-3.1.3/test/subamp.in gawk-3.1.4/test/subamp.in --- gawk-3.1.3/test/subamp.in 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/subamp.in 2004-01-29 16:41:07.000000000 +0200 @@ -0,0 +1 @@ +aaa diff -urN gawk-3.1.3/test/subamp.ok gawk-3.1.4/test/subamp.ok --- gawk-3.1.3/test/subamp.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/subamp.ok 2004-02-02 10:26:59.000000000 +0200 @@ -0,0 +1 @@ +aaa diff -urN gawk-3.1.3/test/subsepnm.awk gawk-3.1.4/test/subsepnm.awk --- gawk-3.1.3/test/subsepnm.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/subsepnm.awk 2003-10-29 13:33:42.000000000 +0200 @@ -0,0 +1 @@ +BEGIN { SUBSEP = 10; a[1, 1] = 100 ; print a[1 SUBSEP 1] } diff -urN gawk-3.1.3/test/subsepnm.ok gawk-3.1.4/test/subsepnm.ok --- gawk-3.1.3/test/subsepnm.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/subsepnm.ok 2003-10-29 13:34:32.000000000 +0200 @@ -0,0 +1 @@ +100 diff -urN gawk-3.1.3/test/unterm.awk gawk-3.1.4/test/unterm.awk --- gawk-3.1.3/test/unterm.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/unterm.awk 2003-09-09 14:15:42.000000000 +0300 @@ -0,0 +1 @@ +BEGIN{x=".........................................................................................................................................................................................................................................................} \ No newline at end of file diff -urN gawk-3.1.3/test/unterm.ok gawk-3.1.4/test/unterm.ok --- gawk-3.1.3/test/unterm.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.4/test/unterm.ok 2003-09-09 16:04:07.000000000 +0300 @@ -0,0 +1,3 @@ +gawk: unterm.awk:1: BEGIN{x=".........................................................................................................................................................................................................................................................} +gawk: unterm.awk:1: ^ unterminated string +EXIT CODE: 1 diff -urN gawk-3.1.3/unsupported/atari/ChangeLog gawk-3.1.4/unsupported/atari/ChangeLog --- gawk-3.1.3/unsupported/atari/ChangeLog 2003-07-07 21:02:50.000000000 +0300 +++ gawk-3.1.4/unsupported/atari/ChangeLog 2004-08-02 12:19:25.000000000 +0300 @@ -1,3 +1,7 @@ +Mon Aug 2 12:18:15 2004 Arnold D. Robbins + + * Release 3.1.4: Release tar file made. + Mon Jul 7 11:01:43 2003 Arnold D. Robbins * Release 3.1.3: Release tar file made. diff -urN gawk-3.1.3/unsupported/tandem/ChangeLog gawk-3.1.4/unsupported/tandem/ChangeLog --- gawk-3.1.3/unsupported/tandem/ChangeLog 2003-07-07 21:02:56.000000000 +0300 +++ gawk-3.1.4/unsupported/tandem/ChangeLog 2004-08-02 12:19:30.000000000 +0300 @@ -1,3 +1,7 @@ +Mon Aug 2 12:18:15 2004 Arnold D. Robbins + + * Release 3.1.4: Release tar file made. + Mon Jul 7 11:01:43 2003 Arnold D. Robbins * Release 3.1.3: Release tar file made. diff -urN gawk-3.1.3/version.c gawk-3.1.4/version.c --- gawk-3.1.3/version.c 2003-07-04 20:50:18.000000000 +0300 +++ gawk-3.1.4/version.c 2004-08-02 12:16:45.000000000 +0300 @@ -1,7 +1,6 @@ -#if ! defined(__STDC__) || __STDC__ < 1 -#define const -#endif -const char *version_string = "@(#)GNU Awk 3.1"; +#include "config.h" + +const char *version_string = "@(#)GNU Awk 3.1.4"; /* 1.02 fixed /= += *= etc to return the new Left Hand Side instead of the Right Hand Side */ diff -urN gawk-3.1.3/version.in gawk-3.1.4/version.in --- gawk-3.1.3/version.in 2003-03-04 10:39:45.000000000 +0200 +++ gawk-3.1.4/version.in 2004-06-06 19:15:43.000000000 +0300 @@ -1,7 +1,6 @@ -#if ! defined(__STDC__) || __STDC__ < 1 -#define const -#endif -const char *version_string = "@(#)GNU Awk X.Y"; +#include "config.h" + +const char *version_string = "@(#)GNU Awk @VERSION@"; /* 1.02 fixed /= += *= etc to return the new Left Hand Side instead of the Right Hand Side */ diff -urN gawk-3.1.3/vms/ChangeLog gawk-3.1.4/vms/ChangeLog --- gawk-3.1.3/vms/ChangeLog 2003-07-07 21:03:05.000000000 +0300 +++ gawk-3.1.4/vms/ChangeLog 2004-08-02 12:19:33.000000000 +0300 @@ -1,3 +1,16 @@ +Mon Aug 2 12:18:15 2004 Arnold D. Robbins + + * Release 3.1.4: Release tar file made. + +Mon Jun 14 18:40:22 2004 Pat Rankin + + * descrip.mms (dfa.c, dfa.h): reinstate these. + (gettext.h, mbsupport.h): add these. + (patchlev.h): remove this. + + * vmstest.com (longwrds): customize it. + (getline, getline2): replace getline with getline2. + Mon Jul 7 11:01:43 2003 Arnold D. Robbins * Release 3.1.3: Release tar file made. diff -urN gawk-3.1.3/vms/descrip.mms gawk-3.1.4/vms/descrip.mms --- gawk-3.1.3/vms/descrip.mms 2003-07-06 22:44:43.000000000 +0300 +++ gawk-3.1.4/vms/descrip.mms 2004-07-28 16:51:07.000000000 +0300 @@ -88,7 +88,7 @@ NOOP = continue # object files -AWKOBJ1 = array.obj,awkgram.obj,builtin.obj,ext.obj,\ +AWKOBJ1 = array.obj,awkgram.obj,builtin.obj,dfa.obj,ext.obj,\ field.obj,gawkmisc.obj,getopt.obj,getopt1.obj,io.obj,main.obj,\ msg.obj,node.obj,random.obj,re.obj AWKOBJ2 = regex.obj,replace.obj,version.obj,eval.obj,profile.obj @@ -102,13 +102,13 @@ VMSOBJS = $(VMSCODE),$(VMSCMD) # source and documentation files -AWKSRC = array.c,builtin.c,ext.c,eval.c,field.c,gawkmisc.c,\ +AWKSRC = array.c,builtin.c,ext.c,eval.c,dfa.c,field.c,gawkmisc.c,\ getopt.c,getopt1.c,io.c,main.c,msg.c,node.c,random.c,re.c,\ random.c,regcomp.c,regex.c,regex_internal.c,regexec.c,\ replace.c,version.c,eval.c,profile.c -ALLSRC = $(AWKSRC),awkgram.y,awk.h,custom.h,getopt.h,\ - patchlev.h,protos.h,random.h +ALLSRC = $(AWKSRC),awkgram.y,awk.h,custom.h,dfa.h,getopt.h,\ + gettext.h,mbsupport.h,protos.h,random.h VMSSRC = $(VMSDIR)gawkmisc.vms,$(VMSDIR)vms_misc.c,$(VMSDIR)vms_popen.c,\ $(VMSDIR)vms_fwrite.c,$(VMSDIR)vms_args.c,$(VMSDIR)vms_gawk.c,\ @@ -122,7 +122,7 @@ # Release of gawk REL=3.1 -PATCHLVL=3 +PATCHLVL=4 # generic target all : gawk @@ -159,11 +159,12 @@ gawkmisc.obj : gawkmisc.c $(VMSDIR)gawkmisc.vms -$(AWKOBJS) : awk.h regex.h config.h $(VMSDIR)redirect.h +$(AWKOBJS) : awk.h gettext.h mbsupport.h regex.h dfa.h \ + config.h $(VMSDIR)redirect.h random.obj : random.h builtin.obj : random.h -main.obj : patchlev.h awkgram.obj : awkgram.c awk.h +dfa.obj : dfa.c dfa.h regex.obj : regex.c regcomp.c regex_internal.c regexec.c regex.h regex_internal.h # bison or yacc required diff -urN gawk-3.1.3/vms/vmsbuild.com gawk-3.1.4/vms/vmsbuild.com --- gawk-3.1.3/vms/vmsbuild.com 2003-07-06 22:44:15.000000000 +0300 +++ gawk-3.1.4/vms/vmsbuild.com 2004-07-28 16:50:46.000000000 +0300 @@ -9,7 +9,7 @@ $! gawk 3.1.1 revised, Apr'02 $! $ REL = "3.1" !release version number -$ PATCHLVL = "3" +$ PATCHLVL = "4" $! $! $ CCFLAGS = "/noList" ! "/noOpt/Debug" diff -urN gawk-3.1.3/vms/vmstest.com gawk-3.1.4/vms/vmstest.com --- gawk-3.1.3/vms/vmstest.com 2002-11-24 18:46:35.000000000 +0200 +++ gawk-3.1.4/vms/vmstest.com 2004-06-15 14:17:24.000000000 +0300 @@ -32,7 +32,7 @@ $ return $ $basic: basic_lst1 = "msg swaplns messages argarray longwrds" - - + " getline fstabplus compare arrayref rs fsrs rand" - + + " getline2 fstabplus compare arrayref rs fsrs rand" - + " fsbs negexp asgext anchgsub splitargv awkpath nfset" - + " reparse convfmt arrayparm paramdup nonl defref" - + " nofmtch litoct resplit rswhite prmarscl sclforin" - @@ -172,10 +172,9 @@ $ return $ $longwrds: echo "longwrds" -$ gawk -f longwrds.awk manpage >tmp.too -$ sort tmp.too tmp. +$ gawk -v "SORT=sort sys$input: tmp." -f longwrds.awk longwrds.in >_NL: $ cmp longwrds.ok tmp. -$ if $status then rm tmp.;,tmp.too; +$ if $status then rm tmp.; $ return $ $fieldwdth: echo "fieldwdth" @@ -258,9 +257,9 @@ $ set On $ return $ -$getline: echo "getline" -$ gawk -f getline.awk getline.awk getline.awk >tmp. -$ cmp getline.ok tmp. +$getline2: echo "getline2" +$ gawk -f getline2.awk getline2.awk getline2.awk >tmp. +$ cmp getline2.ok tmp. $ if $status then rm tmp.; $ return $ @@ -590,7 +589,7 @@ $ set noOn $ AWKPATH_srcdir $ gawk -f fnarray.awk >tmp. 2>&1 -$ if .not.$status then call exit_code 2 +$ if .not.$status then call exit_code 1 $ set On $ cmp fnarray.ok tmp. $ if $status then rm tmp.; EOF # Final cleanup echo Sleeping and touching files to update timestamps. # touch list of zero length files touch test/fordel.ok sleep 2 touch aclocal.m4 configh.in Makefile.in */Makefile.in touch intl/plural.c sleep 2 chmod +x install-sh touch configure echo Remove any .orig or "'~'" files that may remain. echo Use '"configure && make"' to rebuild any dependent files. echo Use "'make distclean'" to clean up.