diff -aNrc2 bash-2.05b-patched/ABOUT-NLS bash-3.0/ABOUT-NLS *** bash-2.05b-patched/ABOUT-NLS Wed Dec 31 19:00:00 1969 --- bash-3.0/ABOUT-NLS Tue Dec 9 12:39:10 2003 *************** *** 0 **** --- 1,625 ---- + 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'. + + 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 May 2003. + 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 am az be bg ca cs da de el en en_GB eo es + +-------------------------------------------+ + a2ps | [] [] [] [] | + aegis | () | + anubis | | + ap-utils | | + bash | [] [] [] | + batchelor | | + bfd | [] [] | + binutils | [] [] | + bison | [] [] [] | + bluez-pin | [] [] | + clisp | | + clisp | [] [] [] | + coreutils | [] [] [] [] | + cpio | [] [] [] | + darkstat | () [] | + diffutils | [] [] [] [] [] [] [] | + e2fsprogs | [] [] | + enscript | [] [] [] [] | + error | [] [] [] [] [] | + fetchmail | [] () [] [] [] [] | + fileutils | [] [] [] | + findutils | [] [] [] [] [] [] | + flex | [] [] [] [] | + gas | [] | + gawk | [] [] [] [] | + gcal | [] | + gcc | [] [] | + gettext | [] [] [] [] [] | + gettext-runtime | [] [] [] [] [] | + gettext-tools | [] [] | + gimp-print | [] [] [] [] [] | + gliv | | + glunarclock | [] [] [] | + gnucash | () [] | + gnucash-glossary | [] () [] | + gnupg | [] () [] [] [] [] | + gpe-calendar | [] | + gpe-conf | [] | + gpe-contacts | [] | + gpe-edit | | + gpe-login | [] | + gpe-ownerinfo | [] | + gpe-sketchbook | [] | + gpe-timesheet | | + gpe-today | [] | + gpe-todo | [] | + gphoto2 | [] [] [] [] | + gprof | [] [] | + gpsdrive | () () () | + grep | [] [] [] [] [] | + gretl | [] | + hello | [] [] [] [] [] [] | + id-utils | [] [] | + indent | [] [] [] [] | + jpilot | [] [] [] [] | + jwhois | [] | + kbd | [] [] [] [] [] | + ld | [] [] | + libc | [] [] [] [] [] [] | + libgpewidget | [] | + libiconv | [] [] [] [] [] | + lifelines | [] () | + lilypond | [] | + lingoteach | | + lingoteach_lessons | () () | + lynx | [] [] [] [] | + m4 | [] [] [] [] | + mailutils | [] [] | + make | [] [] [] | + man-db | [] () [] [] () | + mysecretdiary | [] [] [] | + nano | [] () [] [] [] | + nano_1_0 | [] () [] [] [] | + opcodes | [] [] | + parted | [] [] [] [] [] | + ptx | [] [] [] [] [] | + python | | + radius | | + recode | [] [] [] [] [] [] | + screem | | + sed | [] [] [] [] [] | + sh-utils | [] [] [] | + sharutils | [] [] [] [] [] [] | + sketch | [] () [] | + soundtracker | [] [] [] | + sp | [] | + tar | [] [] [] [] | + texinfo | [] [] [] [] | + textutils | [] [] [] [] | + tin | () () | + util-linux | [] [] [] [] [] | + vorbis-tools | [] [] [] | + wastesedge | () | + wdiff | [] [] [] [] | + wget | [] [] [] [] [] [] [] | + xchat | [] [] [] | + xpad | | + +-------------------------------------------+ + am az be bg ca cs da de el en en_GB eo es + 0 1 4 2 31 17 54 60 14 1 4 12 56 + + et fa fi fr ga gl he hr hu id it ja ko + +----------------------------------------+ + a2ps | [] [] [] () () | + aegis | | + anubis | [] | + ap-utils | [] | + bash | [] [] | + batchelor | [] | + bfd | [] [] | + binutils | [] [] | + bison | [] [] [] [] | + bluez-pin | [] [] [] [] | + clisp | | + clisp | [] | + coreutils | [] [] [] [] | + cpio | [] [] [] [] | + darkstat | () [] [] [] | + diffutils | [] [] [] [] [] [] [] | + e2fsprogs | | + enscript | [] [] | + error | [] [] [] [] | + fetchmail | [] | + fileutils | [] [] [] [] [] | + findutils | [] [] [] [] [] [] [] [] [] [] [] | + flex | [] [] | + gas | [] | + gawk | [] [] | + gcal | [] | + gcc | [] | + gettext | [] [] [] | + gettext-runtime | [] [] [] [] | + gettext-tools | [] | + gimp-print | [] [] | + gliv | () | + glunarclock | [] [] [] [] | + gnucash | [] | + gnucash-glossary | [] | + gnupg | [] [] [] [] [] [] [] | + gpe-calendar | [] | + gpe-conf | | + gpe-contacts | [] | + gpe-edit | [] [] | + gpe-login | [] | + gpe-ownerinfo | [] [] [] | + gpe-sketchbook | [] | + gpe-timesheet | [] [] [] | + gpe-today | [] [] | + gpe-todo | [] [] | + gphoto2 | [] [] [] | + gprof | [] [] | + gpsdrive | () [] () () | + grep | [] [] [] [] [] [] [] [] [] [] [] | + gretl | [] | + hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | + id-utils | [] [] [] | + indent | [] [] [] [] [] [] [] [] | + jpilot | [] () | + jwhois | [] [] [] [] | + kbd | [] | + ld | [] | + libc | [] [] [] [] [] [] | + libgpewidget | [] [] [] | + libiconv | [] [] [] [] [] [] [] [] | + lifelines | () | + lilypond | [] | + lingoteach | [] [] | + lingoteach_lessons | | + lynx | [] [] [] [] | + m4 | [] [] [] [] | + mailutils | | + make | [] [] [] [] [] [] | + man-db | [] () () | + mysecretdiary | [] [] | + nano | [] [] [] [] | + nano_1_0 | [] [] [] [] | + opcodes | [] [] | + parted | [] [] [] | + ptx | [] [] [] [] [] [] [] | + python | | + radius | | + recode | [] [] [] [] [] [] | + screem | | + sed | [] [] [] [] [] [] [] [] | + sh-utils | [] [] [] [] [] [] | + sharutils | [] [] [] [] [] | + sketch | [] | + soundtracker | [] [] [] | + sp | [] () | + tar | [] [] [] [] [] [] [] [] [] | + texinfo | [] [] [] [] | + textutils | [] [] [] [] [] | + tin | [] () | + util-linux | [] [] [] [] () [] | + vorbis-tools | [] | + wastesedge | () | + wdiff | [] [] [] [] [] | + wget | [] [] [] [] [] [] [] [] | + xchat | [] [] [] | + xpad | | + +----------------------------------------+ + et fa fi fr ga gl he hr hu id it ja ko + 20 1 15 73 14 24 8 10 30 31 19 31 9 + + lg lt lv ms nb nl nn no pl pt pt_BR ro + +----------------------------------------+ + a2ps | [] [] () () () [] [] | + aegis | () | + anubis | [] [] | + ap-utils | () | + bash | [] | + batchelor | | + bfd | | + binutils | | + bison | [] [] [] [] | + bluez-pin | [] | + clisp | | + clisp | [] | + coreutils | [] | + cpio | [] [] [] | + darkstat | [] [] [] [] | + diffutils | [] [] [] | + e2fsprogs | | + enscript | [] [] | + error | [] [] | + fetchmail | () () | + fileutils | [] | + findutils | [] [] [] [] | + flex | [] | + gas | | + gawk | [] | + gcal | | + gcc | | + gettext | [] | + gettext-runtime | [] | + gettext-tools | | + gimp-print | [] | + gliv | [] | + glunarclock | [] | + gnucash | | + gnucash-glossary | [] [] | + gnupg | | + gpe-calendar | [] [] | + gpe-conf | [] [] | + gpe-contacts | [] | + gpe-edit | [] [] | + gpe-login | [] [] | + gpe-ownerinfo | [] [] | + gpe-sketchbook | [] [] | + gpe-timesheet | [] [] | + gpe-today | [] [] | + gpe-todo | [] [] | + gphoto2 | | + gprof | [] | + gpsdrive | () () () | + grep | [] [] [] [] | + gretl | | + hello | [] [] [] [] [] [] [] [] [] | + id-utils | [] [] [] | + indent | [] [] [] | + jpilot | () () | + jwhois | [] [] [] | + kbd | | + ld | | + libc | [] [] [] [] | + libgpewidget | [] [] | + libiconv | [] [] | + lifelines | | + lilypond | [] | + lingoteach | | + lingoteach_lessons | | + lynx | [] [] | + m4 | [] [] [] [] | + mailutils | | + make | [] [] | + man-db | [] | + mysecretdiary | [] | + nano | [] [] [] [] | + nano_1_0 | [] [] [] [] | + opcodes | [] [] [] | + parted | [] [] [] | + ptx | [] [] [] [] [] [] [] | + python | | + radius | | + recode | [] [] [] | + screem | | + sed | [] [] | + sh-utils | [] | + sharutils | [] | + sketch | [] | + soundtracker | | + sp | | + tar | [] [] [] [] [] [] | + texinfo | [] | + textutils | [] | + tin | | + util-linux | [] [] | + vorbis-tools | [] [] | + wastesedge | | + wdiff | [] [] [] [] | + wget | [] [] [] | + xchat | [] [] | + xpad | [] | + +----------------------------------------+ + lg lt lv ms nb nl nn no pl pt pt_BR ro + 0 0 2 11 7 26 3 4 18 15 34 34 + + ru sk sl sr sv ta tr uk vi wa zh_CN zh_TW + +-------------------------------------------+ + a2ps | [] [] [] [] [] | 16 + aegis | () | 0 + anubis | [] [] | 5 + ap-utils | () | 1 + bash | [] | 7 + batchelor | | 1 + bfd | [] [] [] | 7 + binutils | [] [] [] | 7 + bison | [] [] | 13 + bluez-pin | | 7 + clisp | | 0 + clisp | | 5 + coreutils | [] [] [] [] [] | 14 + cpio | [] [] [] | 13 + darkstat | [] () () | 9 + diffutils | [] [] [] [] | 21 + e2fsprogs | [] | 3 + enscript | [] [] [] | 11 + error | [] [] [] | 14 + fetchmail | [] | 7 + fileutils | [] [] [] [] [] [] | 15 + findutils | [] [] [] [] [] [] | 27 + flex | [] [] [] | 10 + gas | [] | 3 + gawk | [] [] | 9 + gcal | [] [] | 4 + gcc | [] | 4 + gettext | [] [] [] [] [] [] | 15 + gettext-runtime | [] [] [] [] [] [] | 16 + gettext-tools | [] [] | 5 + gimp-print | [] [] | 10 + gliv | | 1 + glunarclock | [] [] [] | 11 + gnucash | [] [] | 4 + gnucash-glossary | [] [] [] | 8 + gnupg | [] [] [] [] | 16 + gpe-calendar | [] | 5 + gpe-conf | | 3 + gpe-contacts | [] | 4 + gpe-edit | [] | 5 + gpe-login | [] | 5 + gpe-ownerinfo | [] | 7 + gpe-sketchbook | [] | 5 + gpe-timesheet | [] | 6 + gpe-today | [] | 6 + gpe-todo | [] | 6 + gphoto2 | [] [] | 9 + gprof | [] [] | 7 + gpsdrive | [] [] | 3 + grep | [] [] [] [] | 24 + gretl | | 2 + hello | [] [] [] [] [] | 33 + id-utils | [] [] [] | 11 + indent | [] [] [] [] | 19 + jpilot | [] [] [] [] [] | 10 + jwhois | () () [] [] | 10 + kbd | [] [] | 8 + ld | [] [] | 5 + libc | [] [] [] [] | 20 + libgpewidget | | 6 + libiconv | [] [] [] [] [] [] | 21 + lifelines | [] | 2 + lilypond | [] | 4 + lingoteach | | 2 + lingoteach_lessons | () | 0 + lynx | [] [] [] [] | 14 + m4 | [] [] [] | 15 + mailutils | | 2 + make | [] [] [] [] | 15 + man-db | [] | 6 + mysecretdiary | [] [] | 8 + nano | [] [] [] | 15 + nano_1_0 | [] [] [] | 15 + opcodes | [] [] | 9 + parted | [] [] | 13 + ptx | [] [] [] | 22 + python | | 0 + radius | | 0 + recode | [] [] [] [] | 19 + screem | [] | 1 + sed | [] [] [] [] [] | 20 + sh-utils | [] [] [] | 13 + sharutils | [] [] [] [] | 16 + sketch | [] | 5 + soundtracker | [] | 7 + sp | [] | 3 + tar | [] [] [] [] [] | 24 + texinfo | [] [] [] [] | 13 + textutils | [] [] [] [] [] | 15 + tin | | 1 + util-linux | [] [] | 14 + vorbis-tools | [] | 7 + wastesedge | | 0 + wdiff | [] [] [] [] | 17 + wget | [] [] [] [] [] [] [] | 25 + xchat | [] [] [] | 11 + xpad | | 1 + +-------------------------------------------+ + 50 teams ru sk sl sr sv ta tr uk vi wa zh_CN zh_TW + 97 domains 32 19 16 0 56 0 48 10 1 1 12 23 913 + + 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 May 2003 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. + diff -aNrc2 bash-2.05b-patched/AUTHORS bash-3.0/AUTHORS *** bash-2.05b-patched/AUTHORS Wed Apr 3 08:29:41 2002 --- bash-3.0/AUTHORS Sat Jan 10 20:14:20 2004 *************** *** 2,5 **** --- 2,7 ---- # Master author manifest for bash # + # The files in lib/intl were taken from the GNU gettext distribution. + # # Any files appearing in the bash distribution not listed in this file # were created by Chet Ramey. *************** *** 101,104 **** --- 103,107 ---- builtins/break.def Brian Fox, Chet Ramey builtins/builtin.def Brian Fox, Chet Ramey + builtins/caller.def Rocky Bernstein, Chet Ramey builtins/cd.def Brian Fox, Chet Ramey builtins/colon.def Brian Fox, Chet Ramey diff -aNrc2 bash-2.05b-patched/CHANGES bash-3.0/CHANGES *** bash-2.05b-patched/CHANGES Tue Jul 2 14:53:21 2002 --- bash-3.0/CHANGES Fri Jul 16 21:21:56 2004 *************** *** 1,2 **** --- 1,711 ---- + This document details the changes between this version, bash-3.0-release, + and the previous version, bash-3.0-rc1. + + 1. Changes to Bash + + a. Fixed a boundary overrun that could cause segmentation faults when the + completion code hands an incomplete construct to the word expansion + functions. + + b. Changed posix mode behavior so that an error in a variable assignment + preceding a special builtin causes a non-interactive shell to exit. + + c. Change the directory expansion portion of the completion code to not + expand embedded command substitutions if the directory name appears in + the file system. + + d. Fixed a problem that caused `bash -r' to turn on restrictions before + reading the startup files. + + e. Fixed a problem with the default operation of the `umask' builtin. + + 2. Changes to Readline + + a. Fixed a problem with readline saving the contents of the current line + before beginning a non-interactive search. + + b. Fixed a problem with EOF detection when using rl_event_hook. + + c. Fixed a problem with the vi mode `p' and `P' commands ignoring numeric + arguments. + + ------------------------------------------------------------------------------ + This document details the changes between this version, bash-3.0-rc1, + and the previous version, bash-3.0-beta1. + + 1. Changes to Bash + + a. Fixed a bug that caused incorrect behavior when referecing element 0 of + an array using $array, element 0 was unset, and `set -u' was enabled. + + b. System-specific changes for: SCO Unix 3.2, Tandem. + + c. Fixed a bug that caused inappropriate word splitting when a variable was + expanded within a double-quoted string that also included $@. + + d. Fixed a bug that caused `pwd' to not display anything in physical mode + when the file system had changed underneath the shell. + + e. Fixed a bug in the pre- and post- increment and decrement parsing in the + expression evaluator that caused errors when the operands and corresponding + operators were separated by whitespace. + + f. Fixed a bug that caused `history -p' to add an entry to the history list, + counter to the documentation. (Keeps the history expansions invoked by + emacs-mode command line editing from doing that as well.) + + g. Fixed a bug that could cause a core dump if `cd' is asked to print out a + pathname longer than PATH_MAX characters. + + h. Fixed a bug that caused jobs to be put into the wrong process group under + some circumstances after enabling job control with `set -m'. + + i. `unalias' now returns failure if no alias name arguments are supplied. + + j. Documented the characters not allowed to appear in an alias name. + + k. $* is no longer expanded as if in double quotes when it appears in the + body of a here document, as the SUS seems to require. + + l. The `bashbug' script now uses a directory in $TMPDIR for exclusive + access rather than trying to guess how the underlying OS provides for + secure temporary file creation. + + m. Fixed a few problems with `cd' and `pwd' when asked to operate on pathnames + longer than PATH_MAX characters. + + n. Fixed a memory leak caused when creating multiple local array variables + with identical names. + + o. Fixed a problem with calls to getcwd() so that bash now operates better + when the full pathname to the current directory is longer than PATH_MAX + bytes. + + p. The `trap' builtin now reports an error if a single non-signal argument + is specified. + + q. Fixed a bug that caused `umask' to not work correctly when presented + with a mask of all 0s. + + r. When `getopts' reaches the end of options, OPTARG is unset, as POSIX + appears to specify. + + s. Interactive mode now depends on whether or not stdin and stderr are + connected to a tty; formerly it was stdin and stdout. POSIX requires + this. + + t. Fixed vi-mode completion to work more as POSIX specifies (e.g., doing the + right kind of filename generation). + + 2. Changes to Readline + + a. Fixed a problem that could cause readline to refer to freed memory when + moving between history lines while doing searches. + + b. Improvements to the code that expands and displays prompt strings + containing multibyte characters. + + c. Fixed a problem with vi-mode not correctly remembering the numeric argument + to the last `c'hange command for later use with `.'. + + d. Fixed a bug in vi-mode that caused multi-digit count arguments to work + incorrectly. + + e. Fixed a problem in vi-mode that caused the last text modification command + to not be remembered across different command lines. + + f. Fixed problems with changing characters and changing case at the end of + the line. + + 3. New Features in Bash + + a. The `jobs', `kill', and `wait' builtins now accept job control notation + even if job control is not enabled. + + b. The historical behavior of `trap' that allows a missing `action' argument + to cause each specified signal's handling to be reset to its default is + now only supported when `trap' is given a single non-option argument. + + 4. New Features in Readline + + a. When listing completions, directories have a `/' appended if the + `mark-directories' option has been enabled. + + ------------------------------------------------------------------------------ + This document details the changes between this version, bash-3.0-beta1, + and the previous version, bash-3.0-alpha. + + 1. Changes to Bash + + a. Fixes to build correctly when arrays are not compiled into the shell. + + b. Fixed command substitution to run any exit trap defined in the command + substitution before returning; the exit trap is not inherited from the + calling shell. + + c. Fixes to process group synchronization code so that every child process + attempts to set the terminal's process group; fixes some synchronization + problems on Linux kernels that schedule the child to always run before + the parent. + + d. Fixed processing of octal and hex constants in printf builtin for POSIX.2 + compliance. + + e. Fixed a couple of core dumps in the pattern removal code. + + f. Fixes to the array subrange extraction code to deal better with sparse + arrays. + + g. Parser errors and other errors that result in the shell exiting now cause + the exit trap to be run. + + h. Change the command substitution completion functions to not append any + closing quote, because it would be inserted a closing "`" or ")". + + i. Fix history initialization so assignments to $histchars made in startup + files are honored. + + j. If an exit trap does not contain a call to `exit', the shell now uses + the exit status of the last command executed before the trap as the exit + status of the shell. + + k. The parser now prompts with $PS2 if it reads a newline while parsing a + compound array assignment statement. + + l. When performing a compound array assignment, the parser doesn't treat + words of the form [index]=value as assignments if they're the result of + expansions. + + m. Fixed a bug that caused `return' executed in a trap command to make the + shell think it was still running the trap. + + n. Fixed the value of errno set by the pathname canonicalization functions. + + o. Changed the grammar so that `time' alone on a line times a null command + rather than being a syntax error. + + p. The pattern substitution coded no longer performs quote removal on the + pattern before trying to match it, as the pattern removal functions do. + + q. Fixed a bug that could cause core dumps when checking whether a quoted + command name was being completed. + + r. Fixes to the pattern removal and pattern replacement expansions to deal + with multibyte characters better (and faster). + + s. Fix to the substring expansion (${param:off[:len]}) to deal with (possibly + multibyte) characters instead of raw bytes. + + t. Fixed a bug that caused some key bindings set in an inputrc to be ignored + at shell startup. + + u. Fixed a bug that caused unsetting a local variable within a function to + not work correctly. + + v. Fixed a bug that caused invalid variables to be created when using + `read -a'. + + w. Fixed a bug that caused "$@" to expand incorrectly when used as the right + hand side of a parameter expansion such as ${word:="$@"} if the first + character of $IFS was not a space. + + x. Fixed a slight cosmetic problem when printing commands containing a + `>&word' redirection. + + y. Fixed a problem that could cause here documents to not be created correctly + if the system temporary directory did not allow writing. + + 2. Changes to Readline + + a. Change to history expansion functions to treat `^' as equivalent to word + one, as the documention states. + + b. Some changes to the display code to improve display and redisplay of + multibyte characters. + + c. Changes to speed up the multibyte character redisplay code. + + d. Fixed a bug in the vi-mode `E' command that caused it to skip over the + last character of a word if invoked while point was on the word's + next-to-last character. + + e. Fixed a bug that could cause incorrect filename quoting when + case-insensitive completion was enabled and the word being completed + contained backslashes quoting word break characters. + + f. Fixed a bug in redisplay triggered when the prompt string contains + invisible characters. + + g. Fixed some display (and other) bugs encountered in multibyte locales + when a non-ascii character was the last character on a line. + + h. Fixed some display bugs caused by multibyte characters in prompt strings. + + i. Fixed a problem with history expansion caused by non-whitespace characters + used as history word delimiters. + + 3. New Features in Bash + + a. printf builtin understands two new escape sequences: \" and \?. + + b. `echo -e' understands two new escape sequences: \" and \?. + + c. The GNU `gettext' package and libintl have been integrated; the shell's + messages can be translated into different languages. + + d. The `\W' prompt expansion now abbreviates $HOME as `~', like `\w'. + + e. The error message printed when bash cannot open a shell script supplied + as argument 1 now includes the name of the shell, to better identify + the error as coming from bash. + + 4. New Features in Readline + + a. New application variable, rl_completion_quote_character, set to any + quote character readline finds before it calls the application completion + function. + + b. New application variable, rl_completion_suppress_quote, settable by an + application completion function. If set to non-zero, readline does not + attempt to append a closing quote to a completed word. + + c. New application variable, rl_completion_found_quote, set to a non-zero + value if readline determines that the word to be completed is quoted. + Set before readline calls any application completion function. + + d. New function hook, rl_completion_word_break_hook, called when readline + needs to break a line into words when completion is attempted. Allows + the word break characters to vary based on position in the line. + + e. New bindable command: unix-filename-rubout. Does the same thing as + unix-word-rubout, but adds `/' to the set of word delimiters. + + ------------------------------------------------------------------------------ + This document details the changes between this version, bash-3.0-alpha, + and the previous version, bash-2.05b-release. + + 1. Changes to Bash + + a. Fixes so that the shell will compile without some of the default options + defined. + + b. Fixed an error message that did not pass enough arguments to printf. + + c. Fixed a bug that caused input redirection to a builtin inside a script + being read from standard input to result in the rest of the already- + read and buffered script to be discarded. + + d. Fixed a bug that caused subshell initialization to close the file + descriptor from which the shell was reading a script under certain + circumstances. + + e. Fixed a bug that caused the shell to not advance a string pointer over + a null wide character when doing string operations. + + f. Fixed the internal logout code so that shells that time out waiting for + input (using $TMOUT) run ~/.bash_logout. + + g. Portability and configuration changes for: cygwin, HP/UX, GNU/FreeBSD. + + h. The parser no longer adds implicit double quotes to ((...)) arithmetic + commands. + + i. The ((...)) arithmetic command evaluation code was fixed to not dump core + when the expanded string is null. + + j. The ((...)) arithmetic command evaluation code was fixed to not perform + variable assignments while expanding the expression. + + k. Fixed a bug that caused word splitting to be performed incorrectly when + IFS is set, but null. + + l. Fixed a bug in brace expansion that caused a quoted `$' preceding an + open brace to inhibit brace expansion. + + m. Fixed a bug that caused a leading `-' in the shell's name to cause it to + not be recognized as a restricted shell. + + n. Fixed a bug in the arithmetic evaluation code that could cause longjmps + to an invalid location and result in a core dump. + + o. Fixed a bug in the calculation of how many history lines are new in a + single shell session when reading new history lines from a file with + `history -n'. + + p. Fixed a bug in pathname canonicalization that caused the shell to dump + core when presented with a pathname longer than PATH_MAX. + + q. Fixed the parser so that it doesn't try to compare a char variable to + EOF, which fails when chars are unsigned. + + r. Fixed a bug in the simple command execution code that caused occasional + core dumps. + + s. The shell does a better job of saving any partial parsing state during + operations which cause a command to be executed while a line is being + entered and parsed. + + t. The completion code now splits words more like the expansion code when + $IFS is used to split. + + u. The locale code does a better job of recomputing the various locale + variable values when LC_ALL is unset. + + v. The programmable completion code does a better job of dequoting expanded + word lists before comparing them against the word to be matched. + + w. The shell no longer seg faults if the expanded value of $PS4 is null + and `set -x' is enabled. + + x. Fixed a bug that caused core dumps when a here string expanded to NULL. + + y. The mail checking code now makes sure the mailbox is bigger before + reporting the existence of new mail. + + z. The parser does not try to expand $'...' and $"..." when the appear + within double quotes unless the `extquote' option has been enabled with + `shopt'. For backwards compatibility, it is enabled by default. + + aa. Fixed a bug that caused `for x; do ...' and `select x; do ... to use + $@ instead of "$@" for the implicit list of arguments. + + bb. Fixed a bug that caused a subshell of a restricted shell (e.g., one + spawned to execute a pipeline) to not exit immediately if attempting + to use a command containing a slash. + + cc. Fixed a problem with empty replacements for a pattern that doesn't match + when performing ${param/word/} expansion. + + dd. Word expansions performed while expanding redirections no longer search + a command's temporary environment to expand variable values. + + ee. Improvements to the alias expansion code when expanding subsequent words + because an aliase's value ends with a space. + + ff. `cd -' now prints the current working directory after a successful chdir + even when the shell is not interactive, as the standard requires. + + gg. The shell does a better job of ensuring a child process dies of SIGINT + before resending SIGINT to itself. + + hh. The arithmetic expansion variable assignment code now does the right + thing when assigning to `special' variables like OPTIND. + + ii. When history expansion verification is enabled, the bash readline helper + functions that do history expansion on the current line don't print + the results. + + jj. Fixed bugs with multiple consecutive alias expansion when one of the + expansions ends with a space. + + kk. Fixed a problem in the programmable completion code that could cause core + dumps when trying to initialize a set of possible completions from a + list of variables. + + ll. The \[ and \] escape characters are now ignored when decoding the prompt + string if the shell is started with editing disabled. + + mm. Fixed a bug that could leave extra characters in a string when doing + quoted null character removal. + + nn. Command substitution and other subshell operations no longer reset the + line number (aids the bash debugger). + + oo. Better line number management when executing simple commands, conditional + commands, for commands, and select commands. + + pp. The globbing code now uses malloc, with its better failure properties, + rather than alloca(). + + qq. Fixed a bug that caused expansions like #{a[2]:=value} to create the + appropriate array element instead of a variable named `a[2]'. + + rr. Fixed a bug in the handling of a `?(...)' pattern immediately following + a `*' when extglob is enabled. + + ss. Fixed a bug that caused a `return' invoked in an exit trap when exit is + invoked in a function to misbehave. + + tt. Fixed a bug that caused CTLESC and CTLNUL characters to not be escaped + by the internal shell string quoting functions. + + uu. Fixed a bug that caused quoted null characters in an expanded word list + to be inappropriately assigned to an array variable when using `read -a'. + + vv. Fixed a bug that caused redirections accompanying a null command to persist + in the current shell. + + ww. Fixed a bug that caused the prompt to be printed when the shell was + expanding a multiline alias. + + xx. Fixed a bug that resulted in core dumps when the completion for a command + changed the compspec. + + yy. Fixed a bug that caused evaluation of programmable completions to print + notifications of completed jobs. + + zz. Bash now disables line editing when $EMACS == `t' and $TERM == `dumb' + (which is what emacs shell windows do). + + aaa. In posix mode, `kill -l' causes signal names to be displayed without + a leading `SIG'. + + bbb. Clear error flag on standard output so it doesn't persist across multiple + builtin commands. + + ccc. In posix mode, `alias' displays alias values without the leading `alias', + so the output cannot be used as subsequent input. + + ddd. In posix mode, the `trap' builtin doesn't check whether or not its + first argument is a signal specification and revert the signal handling + to its original disposition if it is. + + eee. Fixed several bugs in the handling of "$*" and "${array[*]}" by the + pattern substitution and removal expansions. + + fff. Fixed several problems with the handling of ${array[@]}, ${array[*]}, + $@, and $* by the indirect variable expansion code. + + ggg. Fixed a bug that did not allow `time' to be aliased. + + hhh. Improved the mail checking code so it won't check (and possibly cause an + NFS file system mount) until MAILPATH or MAIL is given a value -- there + is no default if DEFAULT_MAIL_DIRECTORY is not defined at compile time. + (It is computed by configure, but can be #undef'd in config-bot.h.) + + iii. If the `chkwinsize' option is enabled, the shell checks for window size + changes if a child process exits due to a signal. + + jjj. Removed the attempts to avoid adding a slash at the end of a completed + executable name if there was a directory with the same name in the + current directory. + + kkk. Fixed PATH lookup code so it treats the permission bits separately for + owner, group, and other, rather than checking them all. + + lll. Fixed the locale code to reset the parser's idea of the character class + , which controls how it splits tokens, when the locale changes. + + mmm. The shell now binds its special readline functions and key bindings only + if the user's inputrc file has not already bound them. + + nnn. The shell now reports on processes that dump core due to signals when + invoked as `-c command'. + + 2. Changes to Readline + + a. Fixes to avoid core dumps because of null pointer references in the + multibyte character code. + + b. Fix to avoid infinite recursion caused by certain key combinations. + + c. Fixed a bug that caused the vi-mode `last command' to be set incorrectly. + + d. Readline no longer tries to read ahead more than one line of input, even + when more is available. + + e. Fixed the code that adjusts the point to not mishandle null wide + characters. + + f. Fixed a bug in the history expansion `g' modifier that caused it to skip + every other match. + + g. Fixed a bug that caused the prompt to overwrite previous output when the + output doesn't contain a newline and the locale supports multibyte + characters. This same change fixes the problem of readline redisplay + slowing down dramatically as the line gets longer in multibyte locales. + + h. History traversal with arrow keys in vi insertion mode causes the cursor + to be placed at the end of the new line, like in emacs mode. + + i. The locale initialization code does a better job of using the right + precedence and defaulting when checking the appropriate environment + variables. + + j. Fixed the history word tokenizer to handle <( and >( better when used as + part of bash. + + k. The overwrite mode code received several bug fixes to improve undo. + + l. Many speedups to the multibyte character redisplay code. + + m. The callback character reading interface should not hang waiting to read + keyboard input. + + n. Fixed a bug with redoing vi-mode `s' command. + + o. The code that initializes the terminal tracks changes made to the terminal + special characters with stty(1) (or equivalent), so that these changes + are reflected in the readline bindings. New application-callable function + to make it work: rl_tty_unset_default_bindings(). + + p. Fixed a bug that could cause garbage to be inserted in the buffer when + changing character case in vi mode when using a multibyte locale. + + q. Fixed a bug in the redisplay code that caused problems on systems + supporting multibyte characters when moving between history lines when the + new line has more glyphs but fewer bytes. + + r. Undo and redo now work better after exiting vi insertion mode. + + s. Make sure system calls are restarted after a SIGWINCH is received using + SA_RESTART. + + t. Improvements to the code that displays possible completions when using + multibyte characters. + + u. Fixed a problem when parsing nested if statements in inputrc files. + + v. The completer now takes multibyte characters into account when looking for + quoted substrings on which to perform completion. + + w. The history search functions now perform better bounds checking on the + history list. + + 3. New Features in Bash + + a. ANSI string expansion now implements the \x{hexdigits} escape. + + b. There is a new loadable `strftime' builtin. + + c. New variable, COMP_WORDBREAKS, which controls the readline completer's + idea of word break characters. + + d. The `type' builtin no longer reports on aliases unless alias expansion + will actually be performed. + + e. HISTCONTROL is now a colon-separated list of values, which permits + more extensibility and backwards compatibility. + + f. HISTCONTROL may now include the `erasedups' option, which causes all lines + matching a line being added to be removed from the history list. + + g. `configure' has a new `--enable-multibyte' argument that permits multibyte + character support to be disabled even on systems that support it. + + h. New variables to support the bash debugger: BASH_ARGC, BASH_ARGV, + BASH_SOURCE, BASH_LINENO, BASH_SUBSHELL, BASH_EXECUTION_STRING, + BASH_COMMAND + + i. FUNCNAME has been changed to support the debugger: it's now an array + variable. + + j. for, case, select, arithmetic commands now keep line number information + for the debugger. + + k. There is a new `RETURN' trap executed when a function or sourced script + returns (not inherited child processes; inherited by command substitution + if function tracing is enabled and the debugger is active). + + l. New invocation option: --debugger. Enables debugging and turns on new + `extdebug' shell option. + + m. New `functrace' and `errtrace' options to `set -o' cause DEBUG and ERR + traps, respectively, to be inherited by shell functions. Equivalent to + `set -T' and `set -E' respectively. The `functrace' option also controls + whether or not the DEBUG trap is inherited by sourced scripts. + + n. The DEBUG trap is run before binding the variable and running the action + list in a `for' command, binding the selection variable and running the + query in a `select' command, and before attempting a match in a `case' + command. + + o. New `--enable-debugger' option to `configure' to compile in the debugger + support code. + + p. `declare -F' now prints out extra line number and source file information + if the `extdebug' option is set. + + q. If `extdebug' is enabled, a non-zero return value from a DEBUG trap causes + the next command to be skipped, and a return value of 2 while in a + function or sourced script forces a `return'. + + r. New `caller' builtin to provide a call stack for the bash debugger. + + s. The DEBUG trap is run just before the first command in a function body is + executed, for the debugger. + + t. `for', `select', and `case' command heads are printed when `set -x' is + enabled. + + u. There is a new {x..y} brace expansion, which is shorthand for {x.x+1, + x+2,...,y}. x and y can be integers or single characters; the sequence + may ascend or descend; the increment is always 1. + + v. New ksh93-like ${!array[@]} expansion, expands to all the keys (indices) + of array. + + w. New `force_fignore' shopt option; if enabled, suffixes specified by + FIGNORE cause words to be ignored when performing word completion even + if they're the only possibilities. + + x. New `gnu_errfmt' shopt option; if enabled, error messages follow the `gnu + style' (filename:lineno:message) format. + + y. New `-o bashdefault' option to complete and compgen; if set, causes the + whole set of bash completions to be performed if the compspec doesn't + result in a match. + + z. New `-o plusdirs' option to complete and compgen; if set, causes directory + name completion to be performed and the results added to the rest of the + possible completions. + + aa. `kill' is available as a builtin even when the shell is built without + job control. + + bb. New HISTTIMEFORMAT variable; value is a format string to pass to + strftime(3). If set and not null, the `history' builtin prints out + timestamp information according to the specified format when displaying + history entries. If set, bash tells the history library to write out + timestamp information when the history file is written. + + cc. The [[ ... ]] command has a new binary `=~' operator that performs + extended regular expression (egrep-like) matching. + + dd. `configure' has a new `--enable-cond-regexp' option (enabled by default) + to enable the =~ operator and regexp matching in [[ ... ]]. + + ee. Subexpressions matched by the =~ operator are placed in the new + BASH_REMATCH array variable. + + ff. New `failglob' option that causes an expansion error when pathname + expansion fails to produce a match. + + gg. New `set -o pipefail' option that causes a pipeline to return a failure + status if any of the processes in the pipeline fail, not just the last + one. + + 4. New Features in Readline + + a. History expansion has a new `a' modifier equivalent to the `g' modifier + for compatibility with the BSD csh. + + b. History expansion has a new `G' modifier equivalent to the BSD csh `g' + modifier, which performs a substitution once per word. + + c. All non-incremental search operations may now undo the operation of + replacing the current line with the history line. + + d. The text inserted by an `a' command in vi mode can be reinserted with + `.'. + + e. New bindable variable, `show-all-if-unmodified'. If set, the readline + completer will list possible completions immediately if there is more + than one completion and partial completion cannot be performed. + + f. There is a new application-callable `free_history_entry()' function. + + g. History list entries now contain timestamp information; the history file + functions know how to read and write timestamp information associated + with each entry. + + h. Four new key binding functions have been added: + + rl_bind_key_if_unbound() + rl_bind_key_if_unbound_in_map() + rl_bind_keyseq_if_unbound() + rl_bind_keyseq_if_unbound_in_map() + + ------------------------------------------------------------------------------ This document details the changes between this version, bash-2.05b-release, and the previous version, bash-2.05b-beta2. *************** *** 158,162 **** the history list from the shell startup files. ! g. `history -s args' now works bettern in compound commands. h. The tilde expansion code was fixed to better recognize when it's being --- 867,871 ---- the history list from the shell startup files. ! g. `history -s args' now works better in compound commands. h. The tilde expansion code was fixed to better recognize when it's being diff -aNrc2 bash-2.05b-patched/COMPAT bash-3.0/COMPAT *** bash-2.05b-patched/COMPAT Wed Jul 3 17:28:54 2002 --- bash-3.0/COMPAT Fri Jul 16 21:32:11 2004 *************** *** 1,10 **** This document details the incompatibilites between this version of bash, ! bash-2.05b, and the previous widely-available version, bash-1.14 (which ! is still the `standard' version for many Linux distributions). These ! were discovered by users of bash-2.x, so this list is not comprehensive. ! Some of these incompatibilities occur between the current version and ! versions 2.0 and above. ! 1. Bash now uses a new quoting syntax, $"...", to do locale-specific string translation. Users who have relied on the (undocumented) behavior of bash-1.14 will have to change their scripts. For --- 1,11 ---- This document details the incompatibilites between this version of bash, ! bash-3.0, and a previous widely-available version, bash-1.14 (which ! is still the `standard' version for a few Linux distributions). These ! were discovered by users of bash-2.x and 3.x, so this list is not ! comprehensive. Some of these incompatibilities occur between the current ! version and versions 2.0 and above. (The differences between bash-1.14 ! and bash-2.0 were significant.) ! 1. Bash uses a new quoting syntax, $"...", to do locale-specific string translation. Users who have relied on the (undocumented) behavior of bash-1.14 will have to change their scripts. For *************** *** 209,210 **** --- 210,214 ---- SSH2_CLIENT variables, and no longer attempts to discover whether or not it has been invoked by sshd in order to run the startup files. + + 18. Bash no longer requires that the body of a function be a group command; + any compound command is accepted. diff -aNrc2 bash-2.05b-patched/CWRU/changelog bash-3.0/CWRU/changelog *** bash-2.05b-patched/CWRU/changelog Wed Jul 10 16:17:58 2002 --- bash-3.0/CWRU/changelog Sat Jul 17 15:44:32 2004 *************** *** 501,505 **** input.c ! - check for read error before doing \r\n translation on cygnus in b_fill_buffer - reset bp->b_used to 0 instead of leaving it at -1 on read error --- 501,505 ---- input.c ! - check for read error before doing \r\n translation on cygwin in b_fill_buffer - reset bp->b_used to 0 instead of leaving it at -1 on read error *************** *** 6255,6256 **** --- 6255,9640 ---- builtins/set.def - remove mention of `-i' from long help doc, since it has no effect + + 7/17 + ---- + [bash-2.05b released] + + 7/18 + ---- + + lib/malloc/malloc.c + - make sure that the `free_return' label has a non-empty statement + to branch to + + 7/19 + ---- + locale.c + - only call setlocale() from set_lang() if HAVE_SETLOCALE is defined; + otherwise just return 0 + + lib/readline/mbutil.c + - only try to memset `ps' in _rl_get_char_len if it's non-NULL. Ditto + for _rl_adjust_point + + 7/23 + ---- + execute_cmd.c + - fix for executing_line_number() when compiling without conditional + commands, dparen arithmetic or the arithmetic for command + + + 7/24 + ---- + support/Makefile.in + - fix maintainer-clean, distclean, mostlyclean targets + + builtins/common.c + - fix bug in sh_nojobs where it doesn't pass the right number of args + to builtin_error + + bashline.c + - when using command completion and trying to avoid appending a slash + if there's a directory with the same name in the current directory, + use absolute_pathname() instead of just checking whether the first + char of the match is a slash to catch things like ./ and ../ + + examples/complete/bashcc-1.0.1.tar.gz + - a package of completions for Clear Case, from Richard S. Smith + (http://www.rssnet.org/bashcc.html) + + input.c + - fix check_bash_input to call sync_buffered_stream if the passed fd + is 0 and the shell is currently reading input from fd 0 -- all it + should cost is maybe an additional read system call, and it fixes + the bug where an input redirection to a builtin inside a script + which is being read from stdin causes the already-read-and-buffered + part of the script to be thrown away, e.g.: + + bash < x1 + + where x1 is + + hostname + read Input < t.in + echo $Input + echo xxx + + execute_cmd.c + - in initialize_subshell(), call unset_bash_input (0) to not mess with + fd 0 if that's where bash thinks it's reading input from. Fixes + bug reported by jg@cs.tu-berlin.de on 17 July 2002. Should be a way + to check whether or not the current fd 0 at the time of the call has + not been redirected, like in the bug report. Also might eventually + want to throw in a sync_buffered_stream if bash is reading input + from fd 0 in a non-interactive shell into a buffered stream, so the + stream is sync'd -- might be necessary for some uses + + 7/25 + ---- + lib/readline/signals.c + - make sure rl_catch_sigwinch is declared even if SIGWINCH is not + defined, so the readline state saving and restoring functions in + readline.c are always the same size even if SIGWINCH is not defined, + and undefined references don't occur when SIGWINCH is not defined + + 7/30 + ---- + bashline.c + - augment patch from 7/24 to not disable rl_filename_completion_desired + if the first char of the match is `~' + + lib/readline/bind.c + - when creating `shadow' keymaps `bound' to ANYOTHERKEY, don't bind + a key whose type is ISFUNC but whose function is the `fake' + rl_do_lowercase_version (fixes debian bash bug #154123) + + lib/readline/readline.c + - don't call _rl_vi_set_last from _rl_dispatch_subseq if + key == ANYOTHERKEY (when truncated to `sizeof(char)', it will be 0, + which strchr will find in `vi_textmod') + + 7/31 + ---- + lib/readline/input.c + - fix rl_gather_tyi to only slurp up one line of available input, even + if more than one line is available (fixes debian bash bug #144585) + + 8/3 + --- + bashline.c + - better fix for command completion problem -- test for directory + explicitly with test_for_directory before turning off + rl_filename_completion_desired, since that's the case we're trying + to protect against + + 8/5 + --- + include/shmbutil.h + - fix ADVANCE_CHAR macro to advance the string pointer if mbrlen + returns 0, indicating that the null wide character (wide string + terminator) was found (debian bash bug #155436) + + lib/readline/mbutil.c + - fix _rl_adjust_point to increment the string pointer if mbrlen + returns 0 + + support/shobj-conf + - fix for the `-install_name' value in SHLIB_XLDFLAGS assignment for + Darwin from the fink folks + + 8/6 + --- + builtins/exit.def + - broke code that runs ~/.bash_logout out into a separate function: + bash_logout() + + builtins/common.h + - extern declaration for bash_logout() + + eval.c + - call bash_logout() from alrm_catcher(), so timed-out login shells + run ~/.bash_logout before processing the exit trap + + lib/sh/strtrans.c + - implemented $'\x{hexdigits}' expansion from ksh93 + + configure.in + - define RECYCLES_PIDS in LOCAL_CFLAGS for cygwin; don't bother to + link with -luser32 + + examples/loadables/strftime.c + - new loadable builtin, interface to strftime(3) + + 8/7 + --- + parse.y + - parse_arith_cmd now takes a second argument, a flag saying whether + or not to add double quotes to a parsed arithmetic command; changed + callers + - changed parse_dparen so it tells parse_arith_cmd to not add the + double quotes and therefore doesn't need to remove them + - change parse_dparen to add W_NOGLOB|W_NOSPLIT|W_QUOTED flags to word + created when parsing (( ... )) arithmetic command, since the double + quotes are no longer added + + make_cmd.c + - in make_arith_for_expr, set the flags on the created word to + W_NOGLOB|W_NOSPLIT|W_QUOTED + + execute_cmd.c + - change execute_arith_command to expand the expression with + expand_words_no_vars, like the arithmetic for command code does + - fix execute_arith_command to handle the case where the expanded + expression results in a NULL word without crashing + + tests/{arith-for,cprint}.tests + - change expected output to account for no longer adding quotes to + ((...)) commands + + 8/8 + --- + print_cmd.c + - take out the space after printing the `((' and before printing the + `))' in print_arith_command, print_arith_for_command, and + xtrace_print_arith_cmd + + tests/{arith-for,cprint}.tests + - change expected output to account for no longer adding leading and + trailing spaces when printing ((...)) and arithmetic for commands + + 8/17 + ---- + subst.c + - fix issep() define to handle case where separators[0] == '\0', in + which case it always returns false + + lib/readline/histexpand.c + - fix off-by-one error in history_expand_internal when using the `g' + modifier that causes it to skip every other match when matching a + single character (reported by gjyun90@resl.auto.inha.ac.kr) + + doc/{bash.1,bashref.texi} + - make sure that the name=word form of argument to declare/typeset, + export, and readonly is documented in the description + + 8/30 + ---- + lib/readline/histexpand.c + - make history_expand_internal understand double quotes, because + single quotes are not special inside double quotes, according to + our shell-like quoting conventions. We don't want unmatched + single quotes inside double-quoted strings inhibiting history + expansion + - make `a' modifier equivalent to `g' modifier for compatibility with + the BSD csh + - add a `G' modifier that performs a given substitution once per word + (tokenized as the shell would do it) like the BSD csh `g' modifier + + 8/31 + ---- + braces.c + - when compiling for the shell, treat ${...} like \{...} instead of + trying to peek backward when we see a `{'. This makes it easier + to handle things like \${, which should be brace expanded because + the $ is quoted + + 9/7 + --- + aclocal.m4 + - redirect stdin from /dev/null in BASH_CHECK_DEV_FD before testing + the readability of /dev/fd/0, so we're dealing with a known quantity + + 9/11 + ---- + [prayers for the victims of 9/11/01] + + shell.c + - fix maybe_make_restricted to handle a restricted login shell with a + base pathname of `-rbash' and skip over any leading `-' + + 9/13 + ---- + builtins/evalstring.c + - in parse_and_execute, make sure we don't try to run unwind-protects + back to `pe_dispose' after a longjmp back to top_level if the + pe_dispose frame hasn't been initialized + + lib/readline/display.c + - fix problem with prompt overwriting previous output when the output + doesn't contain a newline in a multi-byte locale. This also should + fix the problem of bash slowing down drastically on long lines when + using a multi-byte locale, because it no longer tries to rewrite the + entire line each time. Patch from Jiro SEKIBA + + parse.y + - move the typedef for alias_t that is compiled in if ALIAS is not + defined up before the prototype for push_string, since that takes + an alias_t * parameter + + lib/readline/terminal.c + - bind the termcap description's left and right arrow keys to + rl_backward_char and rl_forward_char, respectively, instead of + rl_forward and rl_backward (which are just there for backwards + compatibility) + + aclocal.m4 + - when testing readability of /dev/stdin, redirect stdin from /dev/null + to make sure it's a readable file + + 9/17 + ---- + config-bot.h + - don't test __STDC__ when deciding whether or not to use stdarg.h; + just use it if it's present + + tests/read2.sub + - redirect from /dev/tty when using `read -t' + + 9/20 + ---- + builtins/history.def + - when reading `new' entries from the history file with `history -n', + fix increment of history_lines_this_session by taking any change + in history_base into account + + lib/sh/pathphys.c + - changes to sh_physpath to deal with pathnames that end up being + longer than PATH_MAX without dumping core + + lib/readline/doc/{history.3,hsuser.texinfo},doc/ bash.1 + - documented new `a' and `G' history modifiers + + 9/25 + ---- + lib/readline/misc.c + - when traversing the history list with arrow keys in vi insertion + mode, put the cursor at the end of the line (like in emacs mode) + + mksyntax.c + - don't try to use \a and \v unless __STDC__ is defined; use the + ascii integer equivalents otherwise + - include "config.h" in the generated syntax.c file for a possible + definition of `const' + + doc/{bash.1,bashref.texi} + - document the meaning of a null directory in $PATH + + 9/26 + ---- + parse.y + - fix set_line_mbstate to handle case where mbrlen() returns 0, + indicating the null wide character + - fix set_line_mbstate so we don't directly compare a char variable + to EOF, since char can (and is) unsigned on some machines + + bashline.c + - change bash_execute_unix_command to save a little bit more state: + last_shell_builtin, this_shell_builtin, last_command_exit_value + + 9/27 + ---- + execute_cmd.c + - tentative change to execute_simple_command to avoid freeing freed + memory in the case where bash forks early but still ends up calling + execute_disk_command, without passing newly-allocated memory to + make_child. This may fix the core dumps with the linux-from-scratch + folks + + 9/28 + ---- + Makefile.in,{builtins,lib/sh}/Makefile.in + - fix up dependencies, mostly on ${BUILD_DIR}/version.h, so that + parallel makes work with GNU and BSD makes + + shell.h + - new struct to save partial parsing state when doing things like + bash_execute_unix_command and other operations that execute + commands while a line is being entered and parsed + + parse.y + - new functions, save_parser_state() and restore_parser_state(), to + save and restore partial parsing state + + bashline.c + - change bash_execute_unix_command to call {save,restore}_parser_state + + builtins/jobs.def + - change execute_list_with_replacements to eliminate a run_unwind_frame + in favor of calling the cleanup explicitly and discarding the frame + + execute_cmd.c + - change execute_for_command to avoid a run_unwind_frame in the case + where the loop variable is readonly or otherwise not assignable + - change execute_select_command and execute_simple_command to use + discard_unwind_frame by running the cleanup code explicitly, instead + of using run_unwind_frame + - make sure execute_select_command decreases loop_level even on error + + 9/30 + ---- + doc/{bash.1,bashref.texi} + - fixed description of `unset' now that unsetting a previously-unset + variable is no longer an error + + 10/3 + ---- + {configure,config.h}.in + - augment check for strtold with additional check to detect the + horribly broken hp/ux 11.x implementation that returns `long_double'; + defines STRTOLD_BROKEN if so + + builtins/printf.def + - define floatmax_t as `double' if STRTOLD_BROKEN is defined + + 10/5 + ---- + lib/readline/keymaps.c + - don't automatically bind uppercase keys to rl_do_lowercase_version + in rl_make_bare_keymap + + lib/readline/readline.c + - explicitly check for ANYOTHERKEY binding to rl_do_lowercase_version + and dispatch to lowercase of key when a prefix is not matched + + 10/12 + ----- + bashline.c + - set COMP_WORDBREAKS in enable_hostname_completion to the value + of rl_completer_word_break_characters + + variables.c + - new special variable COMP_WORDBREAKS, controls the value of + rl_completer_word_break_characters + + variables.h + - new extern declaration for sv_comp_wordbreaks() + + subst.c + - change split_at_delims to behave more like shell word splitting if + the passed value for the delimiters is NULL, indicating that the + function is to use $IFS to split + + {execute_cmd,jobs,test,findcmd,input,make_cmd,redir,shell}.c + builtins/mkbuiltins.c,builtins/{fc,history,source,umask}.def + lib/sh/netconn.c + lib/termcap/termcap.c + lib/readline/histfile.c + - make sure all inclusions of are protected by + HAVE_SYS_FILE_H + + bashline.c + - don't turn off rl_filename_completion_desired in + attempt_shell_completion if the partial pathname contains a slash. + This still doesn't solve the problem of partial pathname completion + starting with a directory in the current directory without a + leading `./'. There's no way to tell the difference between that + and a file found in $PATH (which may contain `.') at the point that + attempt_shell_completion acts + + 10/18 + ----- + locale.c + - don't set lc_all to the default locale when LC_ALL is being unset + - new function, reset_locale_vars(), called to recompute the correct + locale variable values when LC_ALL is unset + - changed set_lang to not set LC_ALL, which it never should have been + doing in the first place, and to maintain a local variable `lang' + corresponding to $LANG + - change get_locale_var to use the precedence posix.2 specifies: + LC_ALL overrides individual variables; LANG, if set, is the default + - change set_locale_var to call get_locale_var to get the appropriate + value for the variable being set or unset + - call get_locale_var instead of using passed value in set_locale_var + to get the defaulting and precedence right + + lib/readline/nls.c + - new function, _rl_get_locale_var(), which does the same thing as + locale.c:get_locale_var(), with the right precedence and defaulting, + using sh_get_env_value to get the right bash variable values + - if HAVE_SETLOCALE is defined, _rl_init_eightbit first calls + _rl_get_locale_var to get the right value for LC_CTYPE, and uses + that in the call to setlocale. If _rl_get_locale_var returns NULL, + call setlocale() to get the current international environment, and, + finally, if that returns null, call setlocale with a second argument + of "" to force the implementation's `native' environment + + pcomplete.c + - change gen_wordlist_completions to dequote the text before comparing + it against the expanded word list + - changed gen_matches_from_itemlist to do the same thing + + bashline.c + - new global function, bash_dequote_word, calls bash_dequote_filename + on the text passed. Used by the programmable completion code + + lib/readline/histfile.c + - make sure that whenever read_history_range returns a non-zero value + that it sets errno to some useful value + + 10/19 + ----- + variables.c + - COMP_WORDBREAKS is now a dynamic variable, mirroring value of + rl_completer_word_break_characters. Makes sure that the variable + always points to dynamic memory if it's not null or the readline + default + + bashline.c + - change enable_hostname_completion to manage a dynamic value of + rl_completer_word_break_characters, since assignments to + COMP_WORDBREAKS can change its value unpredictably + + lib/readline/{complete.c,readline.h} + - rl_completer_word_break_characters no longer has `const' attribute + + bashline.c + - clean up necessary places due to rl_completer_word_break_characters + no longer being `const' + + doc/{bash.1,bashref.texi} + - document new COMP_WORDBREAKS variable + + 10/21 + ----- + print_cmd.c + - fix indirection_level_string to handle the case where the decoded + $PS4 is null without seg faulting + + 10/22 + ----- + builtins/shift.def + - make sure that there is actually an argument when reporting a shift + count that exceeds the number of positional paramters and + shift_verbose is enabled + + lib/readline/rltty.c + - change SET_SPECIAL to call a new function, set_special_char, since + it contains a block. It's called infrequently, so the performance + impact of making it a function should be negligible, and it helps + debugging + + 10/29 + ----- + bashline.c + - make sure the editor in VI_EDIT_COMMAND and EMACS_EDIT_COMMAND is + quoted; it might contain spaces (e.g., `emacs -nw') + + aclocal.m4 + - cache ac_cv_rl_version in RL_LIB_READLINE_VERSION macro + + configure.in + - change logic that sets RL_INCLUDEDIR so that it doesn't try to set + a bogus include path if the argument to --with-installed-readline + is `yes' -- helps with cross-compiling + + lib/readline/histexpand.c + - fix history_tokenize_word so that it handles <( and >( better + + 10/30 + ----- + redir.c + - fix write_here_string so it handles the case where `herestr' expands + to NULL without seg faulting + + 10/31 + ----- + mailcheck.c + - reverse logic flip from bash-2.05 that handled systems that don't + change the atime when the mailbox is accessed; make sure the file + is bigger before we report new mail. This is the case in the vast + majority of cases. Reported by jim@jtan.com + + 11/5 + ---- + parse.y + - change action for `for x; { list; }' and corresponding `select' + production to use \"$@\" instead of just $@, as it is with all the + other actions + + 11/9 + ---- + parse.y + - new flag for parse_matched_pair: P_DQUOTE, indicating that the + pair of characters being matched is between double quotes + - parse_matched_pair now passes P_DQUOTE down to recursive calls: + if the open char to be matched is a `"' or the passed-in flags + include P_DQUOTE, set the local `rflags' variable to P_DQUOTE and + pass `rflags' down to recursive calls + - if `rflags' includes P_DQUOTE, don't try to ansiexpand $'...' or + locale expand $"..."; consistent with other quoting constructs + + 11/11 + ----- + doc/{bash.1,bashref.texi} + - explicitly note that variables referenced in arithmetic expressions + without using `$' evaluate to 0 if they are null or unset + - note that a null variable value evaluates to 0 when used in an + arithmetic context, like when a variable with the `-i' attribute is + assigned a null value + - document the ${!prefix@} expansion as equivalent to ${!prefix*} + + 11/12 + ----- + doc/{bash.1,bashref.texi} + - note that the value of an arithmetic expression is as in C + - change the wording to note that `arithmetic evaluation' (not + arithmetic expansion, which has a different meaning) is performed + on the value assigned to a variable whose integer attribute is set + + 11/13 + ----- + execute_cmd.c + - fix execute_disk_command so it calls exit() after printing the error + message in a restricted shell context if the shell has already forked + (nofork != 0 && there are no pipes) + + 11/19 + ----- + builtins/type.def + - don't report on aliases unless expand_aliases is set and the parser + is performing alias expansion; changed tests/type.tests and + tests/type.right accordingly + + 11/25 + ----- + general.c + - fix for full pathnames including drive letters on cygwin from + Corinna (convert to posix-style paths, which the rest of the + code handles much better) + + lib/readline/text.c + - fixes to overwrite mode from jimmy@is-vn.bg: + o in _rl_overwrite_char, do the overwrite mode self-insert + as one group, even when overwriting more than 1 char + o in _rl_overwrite_char, do the insert before the delete so + that an undo positions the cursor on the character restored, + not to the right of it + o in _rl_overwrite_rubout, don't do rl_insert_char(' ') unless + rl_point < rl_end. Since overwrite-mode self-insert acts as + in insert-mode when at eol, make rubout behave like + insert-mode rubout + + 11/30 + ----- + lib/readline/misc.c + - call rl_replace_line with `1' as second parameter if we're going to + immediately overwrite the undo list + + lib/readline/search.c + - in make_history_line_current, use _rl_replace_text to make the line + replacement an undoable operation. Affects all non-incremental + search functions. + + parse.y + - make behavior introduced on 11/9 dependent on extended_quote + variable, controllable by extquote shopt option. Default setting is + on for backwards compatibility + + builtins/shopt.def + - new `extquote' option to control extended_quote variable + + 12/3 + ---- + jobs.c + - change message printed when attempting to put a background job in + the background with `bg' to include the job id and make the + statement declarative + + 12/10 + ----- + bashhist.h + - define explicit flag values for history_control + + variables.c + - change sv_history_control to use new flag values + - change sv_history_control to parse $HISTCONTROL as a colon-separated + list of values for the history_control variable + + bashhist.c + - change check_history_control to use new flag values and restructure + to remove case statement + - new function hc_erasedups(line); removes all entries matching LINE + from the history list + - call hc_erasedups() from check_add_history after we've determined + that we're saving the line + + doc/{bash.1,bashref.texi} + - documented new options available for $HISTCONTROL and that it can + be a colon-separated list of history control options + + 12/11 + ----- + subst.c + - fix pat_subst() to not increment `e' (pointer to the end of the + matched portion of the string) until after we're sure we're going + around the loop again; fixes problem with empty replacements for + a pattern that doesn't match (bug reported by Don Coleman + ) + + 12/17 + ----- + lib/readline/display.c + - fixes to multibyte redisplay from jir@yamato.ibm.com (Jiro SEKIBA): + o speed up calculation of first difference between old and new + lines in the common case + o don't try to see if we're in the middle of a multbyte char + in update_line (we'll see how this one works out) + + 12/18 + ----- + doc/bashref.texi + - make it clear that the `command-list' function definition may be + terminated by an ampersand before the closing brace + + 12/28 + ----- + redir.c + - set `expanding_redir' flag when expanding words in a redirection + + subst.c + - new function, exp_jump_to_top_level(), to do any word expansion + cleanup before a call to jump_to_top_level from within that file; + sets expanding_redir back to 0 before jump_to_top_level + + variables.c + - in find_variable(), don't call find_variable_internal with a second + parameter of 1 if expanding_redir is non-zero + - in find_variable_internal(), don't search the temporary env if + subshell_environment includes SUBSHELL_FORK (indicating a simple + command) and expanding_redir is non-zero + + parse.y + - increment line_number when we read a \ pair + + array.c + - added array_unshift_element and array_shift_element (which just call + array_shift and array_rshift, respectively), for bash debugger + support + + 1/4/2003 + -------- + doc/{bash.1,bashref.texi} + - note in the section describing the execution environment passed to + children that subshells inherit shell functions marked for export + - note in the section describing shell functions the possibility + that exported functions may result in two entries in the environment + with the same name + + parse.y + - when pushing an alias expansion onto the pushed_string list, append + a space to the expanded definition to make the parser's lookahead + work without using the `mustpop' hack in shell_getc + + 1/8 + --- + shell.c + - change calls to exit() with EX_USAGE as a parameter to use + EX_BADUSAGE instead, since EX_USAGE is defined as 258 and is + technically out of range + + 1/14 + ---- + aclocal.m4 + - check for the termcap functions in libc first: if we don't have + to link in another library, let's not do it + - change the test for mbstate_t to use AC_TRY_COMPILE instead of + AC_TRY_RUN + + doc/{bash.1,bashref.texi} + - document that bash turns line editing off if environment variable + EMACS is set to `t' when it starts up + + doc/bash.1 + - minor change to give the ftp url for the latest version of bash in + the bug reports section + + lib/readline/histexpand.c + - in get_history_event, cast a couple of `const char *' variables to + `char *' in function call parameter lists to avoid compiler warnings + + 1/21 + ---- + builtins/cd.def + - change `cd -' so it prints the current working directory after a + successful chdir even when the shell is not interactive + + 1/31 + ---- + lib/readline/doc/rltech.texinfo + - clarified exactly what is meant by the term `application-specific + completion function', made its use consistent, and documented + what variables are changed before such a function is called + + lib/readline/input.c + - new function, _rl_pushed_input_available(), returns non-zero if + there are characters in the input queue managed by rl_get_char + and _rl_unget_char + + lib/readline/rlprivate.h + - new extern declaration for _rl_pushed_input_available + + lib/readline/callback.c + - change rl_callback_read_char to check _rl_pushed_input_available + and loop if there's something there, so characters don't languish + until more keyboard input is read + + execute_cmd.c + - new variable, last_command_exit_signal, non-zero if + last_command_exit_value result from wait_for was result of a signal + + nojobs.c + - keep track of whether or not a given pid was killed by a signal with + a new flag in the pid_list array + - new function int find_termsig_by_pid(pid_t pid) to get the + terminating signal, if any, for a particular pid + - new function int get_termsig(WAIT status) returns the terminating + signal corresponding to status + - set last_command_exit_signal in wait_for and the various wait_for_xx + functions + + jobs.c + - new functions, process_exit_signal and job_exit_signal, return the + signal that killed a given process or job, if a signal caused its + death + - set last_command_exit_signal in wait_for by calling job_exit_signal + or process_exit_signal appropriately + + subst.c + - don't resend SIGINT to ourselves unless last_command_exit_signal is + SIGINT and last_command_exit_value == 128 + SIGINT. This fixes the + $(exit 130) bug reported by Paul Jarc + + expr.c + - new function, expr_bind_variable, calls bind_int_variable and + then stupidly_hack_special_variables. This fixes the + `let OPTIND=1' bug + + bashline.c + - change history_and_alias_expand_line and shell_expand_line to call + history_expand_line_internal so calls to pre_process_line are + localized + - change history_expand_line_internal and cleanup_expansion_error to + temporarily turn off hist_verify before calling pre_process_line + to avoid the effects described by teirllm@dms.auburn.edu + + parse.y + - don't unconditionally turn off PST_ALEXPNEXT in push_string. This + fixes the multiple alias expansion bug reported by Paul Jarc. + + lib/readline/vi_mode.c + - change rl_vi_subst to push `l' instead of ` ' -- it should be + equivalent, but this has been reported to fix a problem in multibyte + locales + + lib/readline/readline.h + - new state flag value RL_STATE_TTYCSAVED, indicates that save_tty_chars + has been called. Since it's only used and visible internally, it's + undocumented + + lib/readline/rltty.h + - changed all of the members of _rl_tty_chars struct to `unsigned char' + + lib/readline/rltty.c + - set the RL_STATE_TTYCSAVED after save_tty_chars is called + - new function, rl_tty_unset_default_bindings(), resets bindings for + everything rl_tty_set_default_bindings() messes with back to + rl_insert, so rl_tty_set_default_bindings can be called again with + possible changes + - new function that does the bulk of the work for + rltty_set_default_bindings: _rl_bind_tty_special_chars() + - change prepare_terminal_settings so that it can track changes to the + terminal special chars made by stty(1): unset the bindings with + rl_tty_unset_default_bindings before calling save_tty_chars, and + _rl_tty_set_default_bindings after, with the new values from + get_tty_settings(). This implements a long-standing request, most + recently made by Tim Waugh of Red Hat. + + lib/readline/readline.h + - extern declaration for rl_tty_unset_default_bindings() + + lib/readline/readline.c + - new function, reset_default_bindings, calls + rl_tty_unset_default_bindings() to reset the terminal special chars + back to rl_insert and then read the new ones + + lib/readline/doc/rltech.texinfo + - documented rl_tty_unset_default_bindings() + + 2/1 + --- + [prayers and condolences to the families of the space shuttle crew members] + + aclocal.m4 + - add checks for mbrtowc and mbrlen in BASH_CHECK_MULTIBYTE + - new check, BASH_FUNC_CTYPE_NONASCII, checks whether or not the ctype + functions handle non-ascii characters correctly + + config.h.in + - add HAVE_MBRTOWC and HAVE_MBRLEN + - add NO_MULTIBYTE_SUPPORT for new configure argument + - add CTYPE_NON_ASCII + + config-bot.h, lib/readline/rlmbutil.h + - make sure that mbrtowc, mbrlen, and wcwidth are all present before + turning on HANDLE_MULTIBYTE + - turn off multibyte chars if NO_MULTIBYTE_SUPPORT is defined + + configure.in + - new argument --enable-multibyte (enabled by default), allows + multibyte support to be turned off even on systems that support it + + lib/readline/chardefs.h + - define NON_NEGATIVE as 1 if CTYPE_NON_ASCII is defined + + 2/3 + --- + config.h.in + - add HAVE_WCTOMB + + aclocal.m4 + - check for wctomb in BASH_CHECK_MULTIBYTE + + 2/4 + --- + lib/readline/vi_mode.c + - in _rl_vi_change_mbchar_case, make sure the result from wctomb() + is NULL-terminated before trying to insert it with rl_insert_text() + + 2/5 + --- + lib/readline/display.c + - fix to update_line to avoid problems on systems with multibyte + characters when moving between history lines when the new line + has more glyphs but fewer bytes (twaugh@redhat.com) + + lib/readline/vi_mode.c + - use wcrtomb() instead of wctomb() in _rl_vi_change_mbchar_case + + pcomplete.c + - fix init_itemlist_from_varlist to handle the case where the + `varlist' is NULL + + doc/{bash.1,bashref.texi} + - clarified when a simple command may fail without the shell exiting + when -e is set + + 2/13 + ---- + parse.y + - when bash is started with --nolineediting, ignore \[ and \] when + decoding the prompt string + + subst.c + - fix remove_quoted_nulls so that a string with a CTLESC appearing + after a CTLNUL (which was removed) does not leave characters in + the string inappropriately + + 2/14 + ---- + builtins/common.h + - new flag value for parse_and_execute(): SEVAL_RESETLINE, which + allows the caller to specify whether or not the internal idea + of the line number should be reset to 1 + + builtins/evalstring.c + - parse_and_execute() now tells push_string to reset the line + number only if the SEVAL_RESETLINE flag is set by the caller + + 2/15 + ---- + builtins/evalfile.c + - pass SEVAL_RESETLINE from _evalfile() to parse_and_execute() + + subst.c + - if the shell is currently interactive, pass SEVAL_RESETLINE to + parse_and_execute() when doing command substitution + + jobs.c + - add SEVAL_RESETLINE to parse_and_execute while running SIGCHLD trap + + command.h + - add `line' members to case_com, for_com, select_com + - rearranged order of members in some of the command structs, so + `flags' and `line' are first + - added a `source_file' member to the function_def struct; keeps + track of where the function was defined + + doc/Makefile.in + - add some new suffix rules: .dvi.ps + + doc/{bash.1,bashref.texi} + - added text to the description of the `trap' builtin tightening up + the language describing when the ERR trap will be run + + error.c + - if $BASH_SOURCE (internally-maintained) exists, use BASH_SOURCE[0] + in get_name_for_error if the shell is not interactive + + array.h + - new convenience defines: array_push and array_pop + + variables.c + - change get_funcname to return this_shell_function->name only if + arrays have not been compiled into the shell + - change init_funcname_var to initialize FUNCNAME as an array variable + if we have arrays + - new function: get_self(SHELL_VAR *self), a degenerate `dynamic_value' + function for dynamic variables + - new function: init_dynamic_array_var(), a generic dynamic array + variable initializer to handle the common case + - use init_dynamic_array_var() instead of explicit init_dirstack_var() + - use init_dynamic_array_var() instead of explicit init_groups_var() + - new dynamic array variables: BASH_ARGC, BASH_ARGV, BASH_SOURCE, + BASH_LINENO, initialized with init_dynamic_array_var + + shell.c + - initialize BASH_LINENO, BASH_SOURCE, FUNCNAME in open_shell_script + + {execute_cmd,trap}.c + - take out trap_line_number, since parse_and_execute doesn't reset the + line number any more when running the trap commands + + make_cmd.c + - augment make_function_def to get source file name and call + bind_function_def to save the entire FUNCTION_DEF + + variables.c + - new hash table: shell_function_defs, keeps table of shell function + definitions including source file and line number info corresponding + to shell_functions table + - new functions: find_function_def and bind_function_def to manage + the shell_function_defs hash table + - new function: unbind_function_def to remove a function definition + from the shell_function_defs table (right now uncalled) + + variables.h + - extern declaration for bind_function_def, find_function_def + - new extern declaration for unbind_function_def + + execute_cmd.c + - in function prologue and epilogue, push and pop FUNCNAME, + BASH_SOURCE, and BASH_LINENO information + + dispose_cmd.c + - broke the code that disposes a FUNCTION_DEF out into two new + functions: dispose_function_def and dispose_function_def_contents + + dispose_cmd.h + - new extern declarations for dispose_function_def_contents and + dispose_function_def + + copy_cmd.c + - move body of copy_function_def (other than allocating a new + FUNCTION_DEF) to copy_function_def_contents + - make sure to copy the new source_file member of a function_def in + copy_function_def_contents + - copy_function_def is no longer static, copy_function_def_contents + is not either + + command.h + - new extern declaration for copy_function_def_contents and + copy_function_def + + parse.y + - keep a stack of line numbers where case, select, and for commands + start, with a maximum nesting level of 128; increment when reading + word after `for', `select' or `case' in read_token_word; decrement + in grammar actions after parsing a complete for, arith_for, select, + or case command + - create for, case, arith_for, and select commands with an extra + line number (word_lineno[word_top]) argument + + make_cmd.c + - make_for_or_select, make_for_command, make_case_command, and + make_select_command all take an extra `line_number' argument + + make_cmd.h + - corresponding changes to extern declarations for those functions + + 2/16 + ---- + {execute_cmd,shell,variables}.c + - follow each call to remember_args with a call to push_args or + pop_args to manage the BASH_ARGV and BASH_ARGC arrays. Only set + when the shell is started to run shell script or runs a shell + function. Doesn't handle `set' or `shift' yet, nor `source'. + + execute_cmd.c + - keep track of the level of subshells with a new variable, manipulated + in execute_in_subshell + - set currently_executing_command in execute_command_internal(), + even if we're running a trap + - better line number management when executing simple commands, + conditional commands, for commands in execute_command_internal() + and the various functions that implement the commands + (execute_cond_command, execute_for_command, execute_etc.) + + variables.c + - new dynamic variable BASH_SUBSHELL, with new get_subshell and + assign_subshell functions to manipulate it + - new functions push_args (WORD_LIST *list) and pop_args (void) to + manage the BASH_ARGC and BASH_ARGV dynamic array variables + + variables.h + - new extern declarations for push_args and pop_args + + builtins/evalfile.c + - in _evalfile, do appropriate things to the FUNCNAME, BASH_ARGV, + BASH_ARGC, BASH_SOURCE, and BASH_LINENO variables + + support/mksignames.c + - add another fake signal for `trap'; make NSIG+2 == `RETURN' + + trap.c + - _run_trap_internal now returns an int: the exit value of the command + run as the result of the trap + - run_debug_trap now returns an int: the exit value of the command + run as the result of the trap + - RETURN is a new special trap + - new function: set_return_trap(char *command) interface for the rest + of the shell, like set_{debug,error}_trap + - new function: run_return_trap() + - command substitution and other child processes don't inherit the + return trap + + trap.h + - new extern declaration for set_return_trap() and run_return_trap + - new defines for RETURN_TRAP; increment BASH_NSIG + - change extern declaration for run_debug_trap() since it now returns + an int + + shell.c + - new invocation long option: --debugger, turns on debugging and + sets internal `debugging_mode' variable + + execute_cmd.c + - new code to save return trap when executing a shell function, so + shell functions don't inherit it + - run debug trap before binding the variable and running the action + list in a `for' command + - run debug trap before binding the selection variable and running + the query in a `select' command + - run debug trap before running matcher in a `case' command + + builtins/set.def + - new `set -o functrace' (set -T), causes DEBUG trap to be inherited + by shell functions + - new `set -o errtrace' (set -E), causes ERR trap to be inherited + by shell functions + + flags.c + - new flags -E and -T, control error_trace_mode and + function_trace_mode respectively + + flags.h + - new extern declarations for error_trace_mode and function_trace_mode + + 2/17 + ---- + doc/bashref.texi + - changed the `dircategory' as per Karl Berry's suggestion + + doc/texinfo.tex + - update to version of 2003/02/04 from texinfo.org + + support/texi2dvi + - update to version 1.14 from texinfo-4.5 distribution + + 2/20 + ---- + support/config.{guess,sub} + - update to versions of 2002/11/30 + + lib/readline/doc/manvers.texinfo + - renamed to version.texi to match other GNU software + - UPDATE-MONTH variable is now `UPDATED-MONTH' + + lib/readline/doc/{hist,rlman,rluserman}.texinfo + - include version.texi + + doc/version.texi + - new file, with standard stuff matching other GNU distributions + + {doc,lib/readline/doc}/Makefile.in + - include right stuff for `version.texi' + + lib/readline/doc/{rluserman,rlman,hist}.texinfo + - use @copying and @insertcopying and @ifnottex instead of @ifinfo + - add FDL as an appendix entitled `Copying This Manual' + + lib/readline/doc/{rltech,rluser,hstech,hsuser}.texi + - changed the suffix from `texinfo' to `texi' + + lib/readline/doc/{rlman,rluserman}.texinfo, doc/bashref.texi + - include rltech.texi,rluser.texi,hstech.texi, and hsuser.texi + + lib/readline/doc/Makefile.in,doc/Makefile.in + - made appropriate changes for {{rl,hs}tech,{rl,hs}user}.texi + + lib/readline/doc/{rlman,rluserman}.texinfo + - changed the suffix from `texinfo' to `texi' + + lib/readline/doc/hist.texinfo + - renamed to history.texi + + 2/25 + ---- + pathnames.h.in + - moved pathnames.h here so value of DEBUGGER_START_FILE can be + substituted by configure + + aclocal.m4 + - added AM_PATH_LISPDIR for debugger + + configure.in + - added some variables: `bashvers', `relstatus' to use info in more + than one place + - call AM_PATH_LISPDIR + - new option: --enable-debugger, sets DEBUGGER cpp option + - new option with AC_ARG_VAR: DEBUGGER_START_FILE + - make `pathnames.h' a file generated by configure + + Makefile.in + - add rule to create pathnames.h + + builtins/declare.def + - added extra line number and source file name to `declare -F' output + if `--debugger' is used at startup + + builtins/evalfile.c + - call run_return_trap from source_file before returning the result + from _evalfile() + + execute_cmd.c + - call run_return_trap in execute_function before restoring the old + context + + builtins/source.def + - arrange to save and restore DEBUG traps when sourcing files if + function_trace_mode (set -o functrace) is not set + + print_cmd.c + - broke print_for_command, print_select_command, print_case_command + into two functions each: one to print the `header' and one for + the body + - print_cond_command is no longer static + - print_arith_command now takes a WORD_LIST *, since it doesn't + actually do anything with the ARITH_COM it's passed except print + the enclosed WORD_LIST + - print_arith_command is no longer static + + externs.h + - extern declarations for print_{for,select,case}_command_head, + print_cond_command, print_arith_command + + {.,builtins,lib/sh}/Makefile.in + - corrected dependencies on pathnames.h, since it's now created in + the build directory + + 3/5 + --- + lib/glob/glob.c + - handle alloca() failing (it's supposed to return NULL) + - use malloc() (with its attendent bookkeeping) instead of alloca() + in glob_filename() + + subst.c + - check whether shell_glob_filename returns NULL in + glob_expand_word_list + - change parameter_brace_expand_rhs to handle cases like + ${a[2]:=value} by properly creating the array element instead of a + variable named `a[2]' (reported by ) + + variables.c + - change bind_int_variable to use valid_array_reference instead + of looking for `[' + + lib/readline/vi_mode.c + - check for `a' in _rl_vi_done_inserting so the text inserted by an + `a' command can be reinserted with a `.' + + lib/readline/readline.c + - when entering vi insertion mode in readline_internal_setup(), make + sure that _rl_vi_last_key_before_insert is set to `i' so that undo + groups and redo work better (reported by ) + + lib/glob/sm_loop.c + - handle ?(...) in a pattern immediately following a `*', instead of + ignoring the `(' and treating the `?' as a single-char match, as + long as FNM_EXTFLAG is set (reported by ) + + aclocal.m4 + - new test for presence of struct timezone, BASH_STRUCT_TIMEZONE + + config.h.in + - add HAVE_STRUCT_TIMEZONE + + configure.in + - call BASH_STRUCT_TIMEZONE + + execute_cmd.c + - don't try to use `struct timezone' in calls to gettimeofday unless + HAVE_STRUCT_TIMEZONE is defined; use (void *)NULL otherwise + + 3/20 + ---- + execute_cmd.c + - new variable, the_printed_command_except_trap, saves the command + being executed before a trap is executed, for the debugger + + trap.c + - if in debugging mode, let command substitutions and other child + processes inherit the DEBUG and ERR traps if the `functrace' + (which is really a bad name, given this semantic) or `errtrace' + options, respectively, have been set + + shell.c + - local_pending_command renamed to command_execution_string; no longer + static + + variables.c + - new dynamic variable, BASH_COMMAND, set to the command string + currently executing, or the one that caused a trap to execute + (mapped to the_printed_command_except_trap) + - new variable, BASH_EXECUTION_STRING, set to the argument to the + -c invocation option, if the shell was started that way + + 3/22 + ---- + execute_cmd.c + - changed execute_for_command, eval_arith_for_expr, + execute_select_command, execute_arith_command, execute_cond_command, + execute_simple_command to implement new DEBUG trap semantics + for the debugger: if the DEBUG trap commands return a non-zero + status and debugging_mode is non-zero, we skip the command to be + executed + + trap.c + - change run_debug_trap for the debugger: if we're in the debugger + and the DEBUG trap returns 2 while we're in a function or sourced + script, we force a `return' + + shell.c + - new function, start_debugger(), that sources the debugger start file + and turns the debugger on + + builtins/shopt.def + - new settable option, `extdebug', turns on debugging_mode, as if + --debugger had been supplied at invocation (but does not source + debugger startup file) + + trap.c + - make sure that run_exit_trap arranges for `returns' to come back + there, too, so a `return' executed by an `exit' invoked within a + shell function behaves correctly + + support/shobj-conf + - change darwin/MacOS X stanza based on advice from mac os x developers + + lib/sh/mailstat.c + - set the atime member of the synthesized stat struct to 0 if `cur/' + is empty, rather than leaving it undefined + + 3/24 + ---- + builtins/caller.def + - new builtin to provide a call stack for the debugger + + builtins/evalfile.c + - added a second `flags' argument to source_file() + - new flag value for flags argument to _evalfile(): FEVAL_NOPUSHARGS. + If included in flags arg, it means to not manipulate the BASH_ARGV + and BASH_ARGC arrays + + builtins/common.h + - change prototype for source_file() + + builtins/source.def + - add flag value to call to source_file(): set to 1 if we replaced + the positional parameters + - add call to push_args if additional arguments supplied to the + source builtin + - add call to pop_args in maybe_pop_dollar_vars + + execute_cmd.c + - run the debug trap in execute_function so the debugger can stop + before the first command in a function body is executed + - modify subshell_level before executing a builtin or function in a + subshell + - print `for', `select', `case' command heads when set -x is enabled + + print_cmd.c + - `xtrace_print_word_list' now takes an additional flags argument, + which, if non-zero, says to print indirection_level_string() + - new functions to print for, select, and case command heads when + set -x is enabled + - add spaces after `((' and before `))' in xtrace_print_arith_command + + externs.h + - changed extern declaration for xtrace_print_word_list + - new declarations for xtrace_print_{for,case,select}_command_head() + + subst.c + - modify subshell_level when executing a command substitution + + 3/25 + ---- + execute_cmd.c + - use `line_number' in executing_line_number instead of looking into + the current command if it's a simple command; rearrange code to + make this simpler to compile in and out + - need to save and restore value of currently_executing_command around + calls to debug trap and return trap in execute_function + + make_cmd.c + - make sure make_arith_for_command() disposes the WORD_LIST * it is + passed, since nothing else does and it's not used directly + + 3/28 + ---- + Makefile.in + - fixed dependencies for `error.o' on shell.h and version.h -- makes + parallel makes (gmake -j 4) work correctly + + doc/{bash.1,bashref.texi} + - documented all new features added to support the debugger + + 4/1 + --- + lib/sh/shquote.c + - make sure CTLESC and CTLNUL characters are escaped with CTLESC + by sh_double_quote, sh_backslash_quote and + sh_backslash_quote_for_double_quotes + Fixes vulnerability reported by svdb@stack.nl + + shell.h + - new `pipestatus' member of sh_parser_state_t, to save and restore + $PIPESTATUS + + parse.y + - changes to save_parser_state and restore_parser_state to save and + restore $PIPESTATUS + + builtins/read.def + - add a call to word_list_remove_quoted_nulls before assigning the + word list read from standard input to an array variable. Fixes + bug reported by holzhey@ppprs1.phy.tu-dresden.de + + 4/3 + --- + execute_cmd.c + - in execute_null_command, if redirections are supplied, make sure + things like 3 for possible definitions of intmax_t, uintmax_t + (reported by ro@techfak.uni-bielefeld.de) + + 7/30 + ---- + parse.y + - remove checking for `time' reserved word from special_case_tokens(); + use regular mechanism in CHECK_FOR_RESERVED_WORD. This allows `time' + to be aliased. (Reported by Glenn Morris + ) + + 7/31 + ---- + lib/readline/history.h + - extern declaration for history_write_timestamps + + lib/readline/histfile.c + - don't write timestamps to the history file in history_do_write + unless history_write_timestamps is set to non-zero by the application + (set to 0 by default) + + lib/readline/doc/{hstech.texi,history.3} + - document history_write_timestamps + + variables.[ch] + - new special variable function, HISTTIMEFORMAT; special function + sets history_write_timestamps to 1 if HISTTIMEFORMAT is set + + 8/4 + --- + builtins/history.def + - added support for printing time stamps based on the value of the + HISTTIMEFORMAT variable when displaying history entries + + doc/{bash.1,bashref.texi} + - added description of new HISTTIMEFORMAT variable + + 8/5 + --- + config-top.h + - remove /usr/ucb from any default paths + + mailcheck.c + - make_default_mailpath now returns NULL if DEFAULT_MAIL_DIRECTORY + is not defined + - remember_mail_dates now returns if make_default_mailpath returns + NULL + + config-bot.h + - reorganized the sections; provide an explicit placeholder for + builders to #undef any feature defines they don't want that + configure creates for them, like the default mail path + + 8/9 + --- + config.h.in + - add HAVE_REGEX_H, HAVE_REGCOMP, HAVE_REGEXEC for detection of POSIX.2 + regular expression functions + - add COND_REGEXP define to enable and disable the =~ operator for + matching extended regular expressions in [[...]] commands + + configure.in + - new option, --enable-cond-regexp, enables =~ and code to perform + regular expression matching in [[...]] + + config-bot.h + - undef COND_REGEXP if the OS doesn't provide posix regexp support + + doc/bashref.texi + - documnent new --enable-cond-regexp option to configure + + 8/18 + ---- + support/shobj-conf + - support for shared objects on FreeBSD-gnu (from Robert Millan) + + 8/25 + ---- + lib/sh/shmatch.c + - new file, shell interface to posix extended regular expression + matching + + externs.h + - new extern declarations for functions in shmatch.c + + execute_cmd.c + - incorporate code into execute_cond_node that does extended regular + expression matching for the =~ operator + + parse.y + - add `=~' to the list of binary operators accepted by the conditional + command parser + + doc/{bash.1,bashref.texi} + - documented =~ conditional binary operator and the BASH_REMATCH + variable + + 8/27 + ---- + lib/readline/display.c + - take multibyte characters into account when looking for quoted + substrings on which to do completion (fix from jir@yamato.ibm.com) + + lib/readline/util.c + - fix typo in _rl_strpbrk + + lib/readline/rldefs.h + - use function version of _rl_strpbrk in multibyte locales, because + it understands to skip over special characters in multibyte + character sequences + + 8/28 + ---- + jobs.c + - in wait_for, check for window size changes if a job that exits due + to a signal or is stopped was in the foreground, not just if it's + the current job + + 9/10 + ---- + support/config.{guess,sub} + - add support to recognize FreeBSD running on the amd64 + + subst.c + - if the new `fail_glob_expansion' variable is non-zero, globbing that + fails to match anything causes an expansion error + + builtins/shopt.def + - new `failglob' expansion: if enabled, failed globs cause an error + + test/shopt.right + - take `failglob' into account + + doc/{bash.1,bashref.texi} + - documented new `failglob' option and its effects + + 9/12 + ---- + findcmd.c + - fix file_status to treat the mode bits and uid right -- in particular, + don't assume the `other' bits always apply. Bug reported by + ; fix inspired by + + command.h + - new word flag: W_NOCOMSUB, meaning to not perform command + substitution on a word + + subst.c + - new flag for param_expand: PF_NOCOMSUB. If non-zero, $(...) + command substitutions are not expanded, but returned unchanged + - change expand_word_internal to pass through `` command substitutions + unchanged if (word->flags & W_NOCOMSUB) != 0 + - change expand_word_internal to pass PF_NOCOMSUB to param_expand + if (word->flags & W_NOCOMSUB) != 0 + + builtins/shopt.def + - rename set_interactive_comments to set_shellopts_after_change, which + more accurately reflects its purpose + + syntax.h + - add a define for isblank() in case the system doesn't provide one + + jobs.c + - change raw_job_exit_status to understand `pipefail', using the new + `pipefail_opt' variable + + flags.[ch] + - declare pipefail_opt + - reset pipefail_opt to 0 in reset_shell_flags + + builtins/set.def + - add `set -o pipefail' and document it in help output + + doc/{bash.1,bashref.texi} + - document `set -o pipefail' and the effect of the pipefail option + + mksyntax.c,syntax.h + - sh_syntaxtab is no longer `const' + - new generated variable, sh_syntabsiz, set to number of entries in + sh_syntaxtab, written to generated syntax.c + + locale.c + - new function, locale_setblanks(), sets each member of the current + locale's class to have the CSHBRK flag in sh_syntaxtab + + 9/17 + ---- + arrayfunc.c + - change convert_var_to_array to not set array[0] to a NULL value + (if the scalar variable had no value; e.g., after being created + with `local arrayvar') + + lib/readline/display.c + - save and restore the value of prompt_invis_chars_first_line in + rl_{save,restore}_prompt, and reinitialize it to 0 before printing + something in the message area + + lib/readline/bind.c + - new functions: rl_bind_keyseq_if_unbound_in_map(ks, func, kmap); + binds key sequence KS to function FUNC in keymap KMAP, and + rl_bind_keyseq_if_unbound (ks, func); binds key sequence KS to + function FUNC in the current keymap + + lib/readline/readline.h + - extern function declarations for rl_bind_keyseq_if_unbound_in_map and + rl_bind_keyseq_if_unbound + + lib/readline/{readline,terminal}.c + - _rl_bind_if_unbound -> rl_bind_keyseq_if_unbound + + lib/readline/{bind.c,rlprivate.h} + - remove _rl_bind_if_unbound + + 9/18 + ---- + lib/readline/doc/rltech.texi + - document rl_bind_keyseq_if_unbound and + rl_bind_keyseq_if_unbound_in_map + + 9/19 + ---- + lib/readline/bind.c + - new functions rl_bind_key_if_unbound_in_map and + rl_bind_key_if_unbound; analogous to (and implemented in terms of) + keyseq functions + - rl_bind_keyseq_in_map: a new function, equivalent to rl_set_key + (which remains for backwards compatibility); changed callers to + use it + - new function, rl_bind_keyseq, equivalent to rl_bind_keyseq_in_map + with a third argument of _rl_keymap + + lib/readline/readline.h + - extern declarations for rl_bind_key_if_unbound_in_map and + rl_bind_key_if_unbound + - extern declarations for rl_bind_keyseq_in_map and rl_bind_keyseq + + lib/readline/doc/rltech.texi + - document rl_bind_keyseq and rl_bind_keyseq_in_map + + configure.in + - require at least readline-5.0 + + config-bot.h + - define SYS_SIGLIST_DECLARED if it's not defined, but + HAVE_DECL_SYS_SIGLIST is, to deal with differences between + autoconf versions + + bashline.c + - use rl_bind_key_if_unbound_in_map when binding bash keybindings in + initialize_readline(), so inputrc files can override them + + 9/22 + ---- + lib/readline/histsearch.c + - do better bounds checking for history_offset and history_length in + history_search_internal + + builtins/history.def + - in delete_last_history(), make sure we don't leave the history + offset longer than the history length after calling delete_histent + + 9/23 + ---- + jobs.c + - small change to notify_of_job_status so job status messages get + printed even if the shell was started to run `-c command'. The + old behavior was intentional, but I cannot remember why, so we'll + try it the other way for a while (debian bash bug #211693) + + 9/24 + ---- + jobs.c + - slightly modify change from 9/23 so that jobs started to run + command substitutions don't print job status messages + + 9/25 + ---- + lib/readline/search.c + - when reading a non-incremental search string from the terminal, + use a separate undo list rather than chaining it to the undo list + from the rest of the line, since the whole undo list will get + freed when the search string is complete + + lib/readline/readline.h + - changed the defines guarding the stdarg prototype for rl_message to + match what's actually used in display.c, where it's defined + + 9/26 + ---- + [bash-3.0-alpha released] + + 9/29 + ---- + lib/sh/shmatch.c + - fix to build correctly when arrays are not compiled into the shell + + subst.c + - fix command substitution to run any exit trap defined in the + command substitution before returning; the exit trap is not inherited + from the calling shell + + lib/readline/shell.c + - change sh_set_lines_and_columns to free the memory allocated and + passed to setenv(), since setenv is specified by POSIX to allocate + new memory and copy its arguments + + jobs.c + - change logic in make_child so that every child process attempts to + set the terminal's process group to the pipeline's process group + when PGRP_PIPE is defined, just like when it's undefined. This is + reported to fix some tricky synchronization problems on Red Hat + Enterprise Linux 3. Fix from Ernie Petrides . + + 9/30 + ---- + builtins/printf.def + - tescape no longer needs a `trans_squote' argument, since it's the + same as the `sawc' argument. The `sawc' argument now means to do + the %b argument processing if non-null + - fix processing of octal constants for %b arguments (\0 followed by + up to three octal digits) and other escape sequences (\ followed by + up to three octal digits) + - hex constants `\xHHH' are now allowed to contain any positive + number of digits; previously they were restricted to two [removed] + - allow two new escape sequences: \" and \?, for compatibility with + ksh93 and ANSI C + + doc/{bash.1,bashref.texi} + - documented processing that printf performs for arguments to %b + escape sequences + + lib/sh/strtrans.c + - add \" and \? to escape sequences recognized by `echo -e' + + 10/1 + ---- + version.c + - use snprintf instead of sprintf if configure tells us we have it + + 10/3 + ---- + subst.c + - in list_remove_pattern, take into account the fact that one of the + list elements may be NULL, and don't free the result of + remove_pattern() without checking + - in remove_pattern, return savestring(param) if *param == '\0', + since callers expect to free() non-null return values + + 10/4 + ---- + subst.c + - change verify_substring_values to make it clearer that the first + offset deals with array indices and the second deals with numbers + of elements, when doing array subranges with ${a[@]:e1:e2} + + array.c + - change array_subrange to make it explicit that the second offset + argument is a count of the desired number of elements, not an + ending index. This deals with sparse arrays correctly. + + 10/6 + ---- + variables.c + - fix memory leak in assign_in_env + + 10/8 + ---- + subst.c + - in parameter_brace_expand, check that the last characters are `]}' + before checking for ${!array[@]} + + execute_cmd.c,builtins/source.def + - push and pop the args (BASH_ARGV and BASH_ARGC) when executing a + shell function or sourcing a script only when in debugging mode + + 10/11 + ----- + arrayfunc.c + - make sure array_variable_name returns values for the SUBP and LENP + arguments if they're non-null, since callers expect to use them + even if the array subscript is bad + + error.c + - call exit_shell instead of sh_exit from parser_error and + report_error so the right things happen (running exit trap, doing + the right interactive cleanup, etc.) + + lib/readline/complete.c + - new variable, rl_completion_quote_character, set to any quote char + readline thinks it finds before any application completion + function is called + - new variable, rl_completion_suppress_quote, settable by an + application-specific completion function. If set to non-zero, the + completion code does not append a closing quote in append_to_match + + lib/readline/readline.h + - extern declarations for rl_completion_quote_character and + rl_completion_suppress_quote + + bashline.c + - set rl_completion_suppress_quote in command_subst_completion_function + because that would be inserted before any closing "`" or ")", which + is somewhat disconcerting + + lib/readline/doc/rltech.texi + - documented rl_completion_suppress_quote and + rl_completion_quote_character + + 10/13 + ----- + bashhist.c + - use sv_histchars instead of setting history_comment_char directly in + bash_initialize_history so assignments to $histchars made in + ~/.bashrc are honored + + 10/21 + ----- + trap.c + - make sure run_exit_trap sets `running_trap' appropriately + - new variable, trap_saved_exit_value, set to last_command_exit_value + before running any trap commands; available to the rest of the + shell; use trap_saved_exit_value to replace some function-local + variables + + builtins/exit.def + - if the shell is running the exit trap, and no argument is given + to `exit', use trap_saved_exit_value as the exit status instead + of the last command exit value (which could be the previous command + run in the exit trap), as required by POSIX.2 + + 10/25 + ----- + doc/{bash.1,bashref.texi} + - add `alias' to the list of documented `assignment statement' builtins + + 11/1 + ---- + doc/bash.1 + - remove the `.' from the sample $PATH value + + parse.y + - make sure parse_compound_assignment prompts with $PS2 if it reads + a newline while parsing the compound assignment statement. Bug + reported by Stephane Chazelas + - parse_string_to_word_list now takes a new second argument: `int flags' + - new parser state flag: PST_COMPASSIGN; indicates that the shell is + parsing a compound assignment statement + - parse_string_to_word_list turns on PST_COMPASSIGN if `flags' arg + has low bit set + - turn PST_COMPASSIGN on and off in parse_compound_assignment + + externs.h + - change prototype declaration for parse_string_to_word_list + + arrayfunc.c + - change call to parse_string_to_word_list to add new flags arg + + general.c + - assignment() takes a new `flags' second argument + - if `flags' is non-zero, accept `[' as a legal assignment statement + starter character (for parsing compound array assignments) + + general.h + - add new argument to prototype declaration for assignment() + + parse.y,{subst,variables}.c, builtins/{setattr,declare}.def + - change calls to assignment() (parse.y calls with flags == 1 when + parser_state inlcudes PST_COMPASSIGN) + + arrayfunc.c + - in assign_array_var_from_string(), don't treat an expanded word + of the form [ind]=value specially unless the W_ASSIGNMENT flag is + set. This means that words that are the result of expansions but + happen to have the same format as compound assignment statement + words will not be treated as such. For instance + + v='[12]=foobar' + a=( $v ) + + will result in a[0]='[12]=foobar' instead of a[12]=foobar. This + is closer to how `regular' assignment statements are treated and + compatible with ksh93. Bug reported by Stephane Chazelas + + shell.c + - new --protected argument, disables command substitution when used + with --wordexp (like --wordexp, it remains undocumented) + - change run_wordexp to turn on the W_NOCOMSUB flag in each word + to be expanded if protected_mode is set + + 11/7 + ---- + doc/{bash.1,bashref.texi} + - clarified the language concerning inherited signal dispositions and + when traps are run + + support/shobj-conf + - slight changes to the darwin (Mac OS X) stanza for MacOS X 10.3 + (for the readline shared library builds, which shares this script) + + lib/readline/histexpand.c + - change to make `^' behave as equivalent to word one, as csh does, + and as the documentation states + + lib/readline/display.c + - in update_line, make sure to use col_lendiff in all calculations + where the cursor position is concerned (like when calculating + the value of _rl_last_c_pos). Fixes bug reported by Andreas + Schwab + + 11/12 + ----- + trap.c + - make _run_trap_internal catch `return' builtin longjmps and clean + up before longjmping on to where the return was intended to go + (fixes bug with not turning off SIG_INPROGRESS flag when `return' + executed in trap command) + + 11/18 + ----- + builtins/cd.def + - in posix mode, set errno to ENOTDIR if canonicalization fails, + unless the canonicalization functions leave it set to ENOENT + + 11/25 + ----- + make_cmd.c + - in make_simple_command, don't blindly dereference element.redirect + + parse.y + - the list_terminator production now has an `int' value so it can be + used in other grammar productions + - add a rule that makes `time' on a line by itself time a null + command (this is iffy) + + 11/28 + ----- + subst.c + - change the pattern substitution code (${var//pat/rep}) to use the + same pattern expansion function (getpattern()) as the pattern + removal expansions. This has the effect of no longer performing + quote removal on the pattern before trying to match it. This + fixes an incompatibility with ksh93 reported on comp.unix.shell + + nojobs.c + - add replacement function for siginterrupt on the off chance that a + system has posix signals but lacks siginterrrupt + + lib/readline/display.c + - fix from Tim Waugh at Red Hat to speed up inserting characters into + long lines in a UTF-8 environment by optimizing the calculation of + the first difference between old and new lines by checking to see + whether the old line is a subset of the new + + 11/29 + ----- + lib/malloc/stats.c + - break code that opens file (and interprets %p) into separate function + _imalloc_fopen(char *s, char *fn, char *def, char *defbuf, size_t defsiz) + for use by rest of library + - default stats file is now `stats.PID' + + lib/malloc/trace.c + - new function, malloc_set_tracefn (char *s, char *fn), sets tracing + to the file named by FN (with %p interpolated as the pid), using + some default if FN is NULL + + lib/malloc/shmalloc.h + - new extern declaration for malloc_set_tracefn + + 12/4 + ---- + execute_cmd.c + - combined several common strings from do_piping() into one + dup_error() function + + builtins/common.[ch] + - new function, `sh_notbuiltin(s)' prints error message about s not + being a shell builtin + + builtins/{builtin,enable}.def + - call sh_notbuiltin instead of using literal string + + {arrayfunc,expr,error}.c + - use one string variable for `bad array subscript' error message; use + in calls to various error reporting functions + + Makefile.in + - add variables for localedir and the PACKAGE_* variables, auto-set + by configure + + configure.in + - un-cache values for gettext, textdomain, and bindtextdomain if they're + not in libc but in libintl so the right variables get set + + bashintl.h + - add necessary defines for marking strings to be translated using + gettext + + locale.c + - set textdomain and directory in set_default_locale + - don't call textdomain with the value of $TEXTDOMAIN, since we don't + want to override the default domain ("bash") + - don't call bindtextdomain unless default_domain already has a value + - when translating $"..." strings, use dgettext with the script's + default domain (value of $TEXTDOMAIN) + + 12/9 + ---- + builtins/mkbuiltins.c + - include "bashintl.h" in the generated "builtins.c" + + support/{config.rpath,mkinstalldirs} + - new files to support gettext i18n + + ABOUT-NLS + - new readme file for gettext internationalization + + po/{Makefile.in.in,Rules-quot,boldquot.sed,en@boldquot.header,en@quot.header,insert-header.sin,quot.sed,remove-potcdate.sin} + po/{POTFILES.in,bash.pot} + - new files for gettext + + lib/intl + - new directory, with libintl stuff from gettext + + aclocal.m4 + - add m4 files from gettext distribution needed by libintl + + configure.in + - create po/Makefile.in and lib/intl/Makefile in AC_OUTPUT + - add call to AM_GNU_GETTEXT to initialize gettext stuff + + Makefile.in + - use mkinstalldirs instead of mkdirs in the `installdirs' target + - changes for intl/ and po/ subdirectories in build and install + - changes to have libintl linked in, as determined by configure + - changes to have libintl built, just in case it's used (though I'd + rather not) + + 12/10 + ----- + config.h.in + - additional #defines required by the libintl library + - add ENABLE_NLS define for AM_GNU_GETTEXT + - take out defines for HAVE_{BINDTEXTDOMAIN,GETTEXT,TEXTDOMAIN} + + configure.in + - removed old tests for libintl and gettext/textdomain/bindtextdomain + + locale.c + - remove HAVE_GETTEXT code; we have gettext unconditionally now + + bashintl.h + - change to include "gettext.h" and remove the conditional code based + on whether or not gettext is present + + 12/16 + ----- + lib/readline/vi_mode.c + - fix problem with rl_vi_eWord that caused it to skip over the last + character of a word if invoked while point was on the next-to-last + character + + 12/18 + ----- + {arrayfunc,bashhist,bashline,error,eval,execute_cmd,expr,general,input,jobs}.c + {mailcheck,make_cmd,nojobs,pcomplete,pcomplib,print_cmd,redir,shell,sig}.c + {subst,test,trap,variables,version,xmalloc}.c + parse.y + builtins/{common,evalfile,getopt}.c + builtins/{bind,break,caller,cd,complete,declare,enable,exec,exit,fc,fg_bg}.def + builtins/{hash,help,history,jobs,kill,printf,pushd,read,return,set,setattr}.def + builtins/{shift,shopt,source,suspend,type,ulimit,umask}.def + lib/sh/{fmtulong,netopen}.c + - include "bashintl.h" for gettext defines + + Makefile.in + - add `-DBUILDTOOL' to CFLAGS for buildversion.o + + bashintl.h + - if `BUILDTOOL' is defined, define ENABLE_NLS to 0 so we don't have + to compile and link in the gettext stuff + + Makefile.in,lib/sh/Makefile.in,builtins/Makefile.in + - update dependencies on bashintl.h and include/gettext.h + + 12/19 + ----- + {arrayfunc,bashhist,bashline,error,eval,execute_cmd,expr,general,input,jobs}.c + {mailcheck,make_cmd,nojobs,pcomplete,pcomplib,print_cmd,redir,shell,sig}.c + {subst,test,trap,variables,version,xmalloc}.c + builtins/{common,evalfile,getopt}.c + builtins/{bind,break,caller,cd,complete,declare,enable,exec,exit,fc,fg_bg}.def + builtins/{hash,help,history,jobs,kill,let,printf,pushd,read,return,set}.def + builtins/{setattr,shift,shopt,source,suspend,type,ulimit,umask}.def + lib/sh/{fmtulong,netopen}.c + lib/malloc/{malloc,stats,table,watch}.c + - mark up strings in source files for gettext processing + + lib/malloc/imalloc.h + - include "bashintl.h" if SHELL is defined, otherwise make _(x) an + identity define + + lib/malloc/Makefile.in + - add dependencies on ${topdir}/bashintl.h and ${BASHINCDIR}/gettext.h + + 12/21 + ----- + bashline.c + - make sure we index into rl_line_buffer with indexes > 0 in + attempt_shell_completion + + 12/31 + ----- + Makefile.in + - descend into `po' and run make recursively for the various clean + targets + + 1/4 + --- + include/shmbutil.h + - two new macros: BACKUP_CHAR(str, strsize, i), which backs up one + multibyte character in STR starting at index I, and + BACKUP_CHAR_P(str, strsize, p), which backs up one multibyte + character in STR starting at P, which is a char * + + 1/6 + --- + pcomplete.c + - in pcomp_filename_completion_function, use the quote character + readline found (and assigned to rl_complete_quote_character) when + dequoting the filename by a completion call from readline (when + rl_dispatching != 0) + + bashline.c + - ditto for bash_directory_completion_matches + + 1/7 + --- + lib/readline/complete.c + - new variable, rl_completion_found_quote, set to non-zero value if + readline finds what it thinks is quoting in the word to be completed + + lib/readline/readline.h + - extern declaration for rl_completion_found_quote + + 1/8 + --- + lib/readline/doc/rltech.texi + - documented rl_completion_found_quote + + lib/readline/complete.c + - in compute_lcd_of_matches, if it looks like what the user typed was + dequoted before generating filename matches, dequote the user's + text again before figuring out the case-insensitive lcd + + 1/9 + --- + lib/readline/display.c + - fix from Edward Catmur to logic that handles + invisible characters in prompt string. Original code was wrong + about local_prompt_prefix; it gave incorrect results when prompt + contained invisible characters after a line break + + 1/10 + ---- + subst.c + - new function, mb_substring(), does character (possibly multibyte) + oriented rather than strictly byte-oriented substring extraction. + The passed indices, rather than strictly indexing into the string, + indicate character positions that need to be calculated. From + Tim Waugh + - change parameter_brace_substring to use mb_substring if necessary + + included/shmbutil.h + - new define SADD_MBQCHAR_BODY, common code for adding a quoted + (preceded by CTLESC) multibyte character to an accumulating string + in the subst.c expansion code + + subst.c + - use SADD_MBQCHAR_BODY in expand_word_internal + - new static function, mb_getcharlens, allocates and returns an array + of character lengths for (possibly multibyte) characters in the + argument string + - change pattern matching operations to use while loops instead of + for loops to handle multibyte characters better (no more simple + increment or decrement) + - change pattern matching operations to use multibyte character + operations instead of simple increments and decrements. Don't + use BACKUP_CHAR_P -- use the mblen array instead, because that + avoids the N**2 behavior of having to count from the beginning + of the string each time you want to back up one character. Changes + to remove_pattern and match_pattern + + 1/12 + ---- + lib/readline/display.c + - make expand_prompt count multbyte characters in the prompt string + by using _rl_find_next_mbchar (and copying possibly more than one + byte) instead of a simple increment and single byte copy + + 1/13 + ---- + lib/readline/display.c + - expand_prompt takes a new reference argument -- it returns + the actual count of (possibly multibyte) characters displayed + on the screen + - don't short-circuit in expand_prompt unless we're not going to + be using any multibyte characters + - change calls to expand_prompt to pass an argument for the + number of physical characters the prompt occupies + (prompt_physical_chars) + - initialize `lpos' (the physical cursor position) from + prompt_physical_chars in rl_redisplay + + lib/readline/mbutil.c + - in _rl_find_prev_mbchar_internal, if mbrtowc returns -1 or -2, and + we assume that the character is a single-byte char, make sure we + update `prev' so it doesn't get lost. Fixes problems encountered + when a non-ascii char is the last char on the line and we're moving + back past it with ^B, and other display problems caused by the same + situation + + 1/15 + ---- + lib/readline/doc/rltech.texi + - document RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE in the + description of rl_expand_prompt() + + 1/20 + ---- + bashline.c + - in initialize_readline, make sure M-C-j and M-C-m are still bound to + vi-editing-mode before unbinding them -- they may have been rebound + in an inputrc + + variables.c + - in unbind_variable, unset attributes other than `local' and exported + (if the variable came from a temporary environment) when unsetting a + local variable inside a function + + 1/21 + ---- + configure.in + - add libintl build directory to the list of include directories if + it's being built (using INTL_BUILDDIR) + + Makefile.in,{builtins,lib/{sh,malloc}}/Makefile.in + - substitute LIBBUILD as ${BUILD_DIR}/${LIBSUBDIR} + - define INTL_BUILDDIR as ${LIBBUILD}/intl + + {builtins,lib/sh}/Makefile.in + - make sure INTL_INC is added to the list of include directories + - make sure INTL_LIBSRC is defined with the correct value + + {configure,Makefile,{builtins,lib/sh}/Makefile}.in + - substitute LIBINTL_H as ${INTL_BUILDDIR}/libintl.h + + Makefile.in,builtins/Makefile.iin + - all files depending on bashintl.h also depend on ${LIBINTL_H} + (which may be empty) + + Makefile.in + - make a rule telling how to build lib/intl/libintl.h if necessary + + 1/24 + ---- + builtins/read.def + - make sure that the array name supplied as an argument to -a is a + valid identifier + + parse.y + - make the \W expansion abbreviate $HOME with a ~ (seems to be more + useful) + + doc/{bash.1,bashref.texi} + - document new behavior of \W + + subst.c + - make sure parameter_brace_expand_rhs uses the first character of + $IFS when making the string to return from the expanded word + (which, in the case of "$@" or $@, contains multiple words that + need to be separated) + + 1/25 + ---- + builtins/common.c + - change get_job_spec to make `%' by itself or an empty argument + return NO_JOB + + jobs.h + - new possible value for a job spec return value: BAD_JOBSPEC + (for syntactically invalid specs, like the empty string) + + shell.c + - in open_shell_script, check to see whether or not we can find and + open the filename argument before setting dollar_vars[0] or + manipulating BASH_SOURCE, so the error messages come out better + + subst.c + - in string_list_internal, short-circuit right away to savestring() + if the list only has a single element + + 1/28 + ---- + lib/readline/rltypedefs.h + - new set of typedefs for functions returning char * with various + arguments (standard set) + + lib/readline/complete.c + - new function pointer, rl_completion_word_break_hook, called by + _rl_find_completion_word, used to set word break characters at + completion time, allowing them to be position-based + + lib/readline/doc/rltech.texi + - documented rl_completion_word_break_hook + + lib/readline/kill.c + - added new rl_unix_filename_rubout, which deletes one filename + component in a Unix pathname backward (delimiters are whitespace + and `/') + + lib/readline/readline.h + - extern declaration for rl_unix_filename_rubout + + lib/readline/funmap.c + - new bindable readline command `unix-filename-rubout' + + lib/readline/doc/{readline.3,rluser.texi},doc/bash.1 + - documented `unix-filename-rubout' + + 1/29 + ---- + lib/readline/histexpand.c + - change history_tokenize_internal to handle non-whitespace delimiter + characters by creating separate fields (like the shell does when + splitting on $IFS) + + 1/30 + ---- + lib/glob/xmbsrtowcs.c + - new function, xdupmbstowcs, for convenience: calls xmbsrtowcs + while allocating memory for the new wide character string + - some small efficiency improvments to xmbsrtowcs + + include/shmbutil.h + - extern declaration for xdupmbstowcs + + lib/glob/strmatch.h + - include config.h for definition of HANDLE_MULTIBYTE + - remove the HAVE_LIBC_FNM_EXTMATCH tests + - new extern declaration for wcsmatch(whchar_t *, wchar_t *, int) + + configure.in + - remove call to BASH_FUNC_FNMATCH_EXTMATCH; it's no longer used + + lib/glob/smatch.c + - simplify xstrmatch() by using xdupmbstowcs() instead of inline code + + lib/glob/glob.c + - modify mbskipname() to avoid the use of alloca + - simplify mbskipname() by using xdupmbstowcs() instead of inline code + - simplify glob_pattern_p() by using xdupmbstowcs() instead of + inline code + - fix memory leak in wdequote_pathname + - simplify wdequote_pathname() by using xdupmbstowcs() instead of + inline code + + lib/glob/strmatch.c + - new function, wcsmatch(), `exported' wide-character equivalent of + strmatch() + + subst.c + - old match_pattern is now match_upattern + - match_pattern now either calls match_upattern or converts + mbstrings to wide chars and calls match_wpattern + - match_upattern reverted to old non-multibyte code + - new function: match_pattern_wchar, wide character version of + match_pattern_char + + 2/1 + --- + subst.c + - old remove_pattern is now remove_upattern + - remove_upattern reverted to old non-multibyte code (pre-Waugh patch) + - new multibyte version of remove_pattern: remove_wpattern + - remove_pattern now calls either remove_upattern or converts a + multibyte string to a wide character string and calls + remove_wpattern + - new function, wcsdup, wide-character version of strdup(3) + + 2/4 + --- + print_cmd.c + - temporarily translate a >&filename redirection from + r_duplicating_output_word to r_err_and_out (as the expansion code + in redir.c does) so it prints without a leading `1' (file + descriptor) + + 2/5 + --- + aclocal.m4 + - add a check for wcsdup to BASH_CHECK_MULTIBYTE + + config.h.in + - add HAVE_WCSDUP define + + 2/9 + --- + builtins/shift.def + - fix a call to sh_erange that possibly dereferences a NULL pointer + + 2/12 + ---- + general.c + - start at a general set of file property checking functions: + file_isdir(), file_iswdir() (is writable directory) + + general.h + - extern declarations for new functions + + lib/sh/tmpfile.c + - use file_iswdir() to make sure the temporary directory used for + here documents and other temp files is writable in get_sys_tmpdir() + + 2/17 + ---- + bashline.c + - fix conditional binding of emacs-mode M-~ -- there is a default + binding for it (rl_tilde_expand), so a straight call to + rl_bind_key_if_unbound_in_map doesn't do the right thing + + 2/27 + ---- + [bash-3.0-beta1 released] + + 2/29 + ---- + subst.c + - fixed expansion so referencing $a, when a is an array variable + without an element assigned to index 0, exits the shell when + `-u' is enabled + + expr.c + - make the exponentiation operator (**) associative, so things like + 2**3**4 work right (change `if' to `while') + + 3/3 + --- + lib/sh/strftime.c + - SCO Unix 3.2, like Solaris, requires that the system's `timezone' + variable be declared as long + + lib/readline/{bind,histfile,input,parens}.c + - changes for Tandem (including `floss.h' (?)) + + 3/4 + --- + subst.c + - change param_expand to quote the entire expanded string instead + of just the escape characters if the expansion appears between + double quotes or in a here-document (for simple variable expansions + or expansions of positional parameters) + + 3/8 + --- + subst.c + - analogous changes to parameter_brace_expand_word to fix the same + quoting problem as on 3/4; fix callers to understand that the + value returned might be quoted now and should be dequoted if + necessary + - add a `quoted' argument to get_var_and_type, change callers + - change today's fix and fix from 3/4 to not call quote_string if the + value is "" (because quote_string turns that into CTLNUL\0) + + 3/9 + --- + builtins/cd.def + - resetpwd() now takes a `caller' argument so it can be used by pwd + as well as cd + - change pwd_builtin to call resetpwd() if sh_physpath() fails to + return a valid pathname + + 3/14 + ---- + expr.c + - reworked exp0 and readtok() to make post-increment and post-decrement + into real tokens, which may be separated from their accompanying + variables by whitesapce + - made analogous changes to readtok() to make pre-increment and + pre-decrement work when separated from their accompanying identifier + by whitespace + + 3/18 + ---- + lib/readline/misc.c + - in rl_maybe_unsave_line, don't force rl_replace_line to clear + the undo_list, since it might point directly at an undo list + from a history entry (to which we have no handle) + + 3/19 + ---- + lib/readline/display.c + - rl_save_prompt and rl_restore_prompt now save and restore the value + of prompt_physical_chars + - set prompt_physical_chars in rl_redisplay when expand_prompt has + not been called (e.g., when rl_display_prompt is set and is not + equal to rl_prompt, like when searching) + + lib/readline/histexpand.c + - don't call add_history in history_expand if the `:p' modifier is + supplied; leave that to the calling application. This means that + `history -p', for example, will not add anything to the history + list (as documented), nor will history expansions invoked by + emacs-mode M-C-e line editing + + config-bot.h + - check whether HAVE_DECL_SYS_SIGLIST is defined to 1 rather than just + defined, to work around newer versions of autoconf defining it to 0 + + config.h.in + - change default status of HAVE_MALLOC to #undef instead of #define + + bashhist.c + - extern declarations for rl_done and rl_dispatching + - don't call re_edit from pre_process_line unless rl_dispatcing is zero, + so we don't call it from something like shell-expand-line + - change pre_process_line to add an expanded history specification + that returned `print only' to the history list, since history_expand + no longer does it (and, when using readline, do it only when + rl_dispatching is zero) + + 3/22 + ---- + config.h.in,aclocal.m4 + - change bash-specific functions that look in struct dirent to define + HAVE_STRUCT_DIRENT_xxx, like AC_CHECK_MEMBERS does (though the + functions are otherwise the same) + - new function, BASH_STRUCT_DIRENT_D_NAMLEN, define + HAVE_STRUCT_DIRENT_D_NAMLEN if struct dirent has a `d_namlen' member + + configure.in + - call BASH_STRUCT_DIRENT_D_NAMLEN + + include/posixdir.h + - use new and renamed HAVE_STRUCT_DIRENT_D_xxx defines + + 4/7 + --- + builtins/cd.def + - ensure that we print out a non-null pathname after getting a + directory from CDPATH and canonicalizing it (e.g., if the result + exceeds PATH_MAX in length and the_current_working_directory is + set to NULL) + + 4/12 + ---- + print_cmd.c + - new function to print out assignment statements when `set -x' has + been enabled: xtrace_print_assignment + + externs.h + - extern declaration for xtrace_print_assignment + + 4/13 + ---- + {subst,variables}.c + - call xtrace_print_assignment instead of using inline code + + jobs.c + - if turning on job control when it was previously off, set + pipeline_pgrp to 0 in set_job_control so make_child puts + subsequent children in their own process group + + 4/14 + ---- + general.c + - new function, legal_alias_name, called to decide whether an + argument to add_alias is a valid alias name -- essentially any + character except one which must be quoted to the shell parser + and `/' + + general.h + - new extern declaration for legal_alias_name + + builtins/alias.def + - `unalias' now returns failure status if no NAME arguments are + supplied and -a is not given + - call legal_alias_name to make sure alias name is valid before + calling add_alias from alias_builtin + + 4/19 + ---- + include/shmbutil.h + - include for definition of HANDLE_MULTIBYTE rather than + duplicating logic + + 4/20 + ---- + + doc/{bash.1,bashref.texi} + - make sure $0 is consistently referred to as a `special parameter' + - document which characters are now not allowed in alias names + + 4/23 + ---- + + builtins/{jobs,kill,wait}.def + - removed requirement that job control be enabled to use job control + notation, as SUSv3 implies + + subst.c + - based on a message from David Korn, change param_expand to not call + string_list_dollar_star if the only quoting is Q_HERE_DOCUMENT -- + quoted here documents are like double quoting, but not exactly + - analogous changes to list_remove_pattern and pos_params + + 4/24 + ---- + lib/readline/doc/rluser.texi + - fix error in description of emacs-mode C-xC-e command (uses $VISUAL + instead of $FCEDIT) + + 4/28 + ---- + support/bashbug.sh + - integrate a patch from Stefan Nordhausen + that reduces race conditions + by using a temporary directory inside $TMPDIR and creating the + temp files in that + + 4/30 + ---- + builtins/common.c + - use pathconf(".", _PC_PATH_MAX) where available to size the argument + to getcwd() rather than using a straight PATH_MAX + + builtins/cd.def + - if get_working_directory fails and returns null (causing resetpwd + to return NULL), use set_working_directory to set $PWD to the + absolute pathname for which chdir just succeeded + + 5/1 + --- + lib/readline/vi_mode.c + - in rl_vi_change_to, call _rl_vi_set_last with rl_numeric_arg instead + of `last', since they're equal at call time and rl_vi_domove can + change rl_numeric_arg (which vi apparently updates). Fixes redo bug + of `c2....' reported by Marion Berryman + + 5/4 + --- + parse.y + - fix decode_prompt_string to properly deal with strftime() returning 0 + + 5/6 + --- + variables.c + - in make_local_array_variable, return an already-existing local array + variable immediately rather than creating a new array (causing a + memory leak) + + 5/8 + --- + lib/readline/vi_mode.c + - change rl_vi_domove to set rl_explicit_arg before calling + rl_digit_loop1 so that multi-digit numeric arguments work right + - _rl_vi_last_command is no longer static + + lib/readline/rlprivate.h + - new extern declaration for _rl_vi_last_command + + lib/readline/text.c + - change rl_newline to only call _rl_vi_reset_last if the last command + (_rl_vi_last_command) is not a text modification command. This lets + the last-command and last-argument work across command lines + + 5/13 + ---- + builtins/common.c + - use getcwd(0,0) rather than providing a fixed pathname with a fixed + length (PATH_MAX) so getcwd() will allocate sufficient memory + + aclocal.m4 + - change BASH_FUNC_GETCWD to check whether or not getcwd(0,0) will + allocate memory for the returned value -- nobody implements that + and getcwd-via-popen, so it should capture the old test as well + + 5/27 + ---- + + builtins/trap.def + - the historical behavior of assuming that a signal's handling should + be set to its original disposition is only in effect if a single + argument is given, otherwise the first argument is assumed to be a + command to execute + - when in posix mode, if trap gets a single argument, display an + error message and return EX_USAGE + - change the help message and usage string to better explain trap's + behavior + + doc/{bash.1,bashref.texi} + - describe the new default behavior when the first argument is a + signal spec + - note that signal names are case insensitive and the SIG prefix is + optional in arguments to `trap' + - note that signal name arguments to `kill' are case-insensitive + + lib/readline/display.c + - make sure rl_on_new_line_with_prompt sets rl_display_prompt to + rl_prompt (just to make sure it's set) + - have rl_on_new_line_with_prompt use local_prompt if it's set + + 6/2 + --- + subst.c + - in string_extract_double_quoted, cope with extract_delimited_string + returning NULL, as it can when attempting completion on an unclosed + command substitution + + 6/24 + ---- + lib/readline/complete.c + - change print_filename to add a `/' to listed directory names if + `mark-directories' has been enabled + + builtins/umask.def + - make sure that the mask passed to parse_symbolic_mode has all but + the operative low eight bits masked off, to avoid complementing + all 0s to -1, which is the error return code. This makes things + like `a=rwx' and `ugo=rwx' work and turn off the umask + + 6/26 + ---- + builtins/getopts.def + - when `getopts' reaches the end of options, unset OPTARG before + returning EOF. In response to a bug report from Apple + + configure.in + - when cross-compiling, don't set CPPFLAGS_FOR_BUILD and + LDFLAGS_FOR_BUILD from CPPFLAGS and LDFLAGS, respectively, since + those are for the target instead of the build platform (report + from robert@schwebel.de) + + shell.c + - a shell whose standard error (but not standard output) is directed + to a terminal should be interactive, according to POSIX/SUS. This + means that sh > sh.out will start an interactive shell. Bug report + from llattanzi@apple.com + + doc/{bash.1,bashref.texi} + - change mention of standard output to standard error in definition + of interactive shell + + lib/readline/vi_mode.c + - new convenience function, rl_vi_start_inserting, calls + _rl_vi_set_last to save the last textmod command state and then calls + rl_vi_insertion_mode to enter insert mode + - change functions to use rl_vi_start_inserting + + lib/readline/readline.h + - extern declaration for rl_vi_start_inserting + + bashline.c + - new function for vi-mode completion, bash_vi_complete. Does + filename expansion as POSIX specifies, unlike the default readline + bindings (which don't know about globbing). Bound to `\', `*', + and `=' in vi command keymap. Internals very similar to + rl_vi_complete; just calls bash glob expansion functions + + lib/readline/vi_mode.c + - change rl_vi_change_char so that an entire change is a single + undoable event, rather than each individual change in a [count]r + command + - fix rl_vi_change_char so that replacing characters up to EOL works + rather than generating rl_ding + - fix rl_vi_change_case so that replacing characters up to EOL works + rather than generating rl_ding + + 6/28 + ---- + builtins/echo.def + - call clearerr(stdout) before writing anything and testing its + failure or success + + 6/29 + ---- + bashline.c + - only set rl_explicit_arg in bash_glob_complete_word if readline is + in emacs mode; let bash_vi_complete take care of setting it in vi + mode + - fix bash_vi_complete to only set rl_explicit_arg unless the posix + conditions are met: no globbing characters in the vi `bigword' + being completed + + 6/30 + ---- + [bash-3.0-rc1 released] + + 7/1 + --- + lib/readline/complete.c + - make sure `extension_char' is initialized before deciding whether + or not the append a `/' to a possible completion when visible-stats + is not enabled + + 7/2 + --- + subst.c + - fix a boundary overrun in string_extract_double_quoted that could + occur when the word completion code attempts to expand an incomplete + construct (like a quoted unclosed command substitution) + + 7/4 + --- + subst.c + - set tempenv_assign_error to non-zero if an assignment to the + temporary environment fails for some reason (e.g., attempted + assignment to a readonly variable) + + execute_cmd.c + - fix execute_simple_command to force a non-interactive shell in + POSIX mode to exit if an assignment to the temporary environment + preceding a special builtin fails (bug report from + llattanzi@apple.com) + + 7/5 + --- + bashline.c + - in bash_directory_completion_hook, don't perform word expansions + if the filename appears to have been completed from the file + system rather than typed in by the user. Bug reported by Tim + Waugh + + 7/7 + --- + lib/readline/misc.c + - if _rl_maybe_save_line is being asked to save a line other than + what's already saved, free up the current saved line and save the + current contents of rl_line_buffer. Bug reported by + llattanzi@apple.com + + 7/12 + ---- + lib/readline/input.c + - do better EOF detection in rl_gather_tyi -- if a read returns 0 when + the fd is in non-blocking mode, stuff an EOF into the input stream + (reported by mattias@virtutech.se) + + 7/13 + ---- + lib/readline/vi_mode.c + - make sure rl_vi_put honors `count' arguments and yanks things + multiple times if requested + + 7/16 + ---- + builtins/umask.def + - make sure that the `who' part of the umask symbolic mode argument + defaults to `a' if it's missing + + flags.c + - make sure that maybe_make_restricted only gets called after the + shell is initialized, so `bash -r' doesn't result in inappropriate + error messages + + [bash-3.0 frozen] diff -aNrc2 bash-2.05b-patched/INSTALL bash-3.0/INSTALL *** bash-2.05b-patched/INSTALL Wed Jun 26 17:09:18 2002 --- bash-3.0/INSTALL Tue Jul 27 09:13:39 2004 *************** *** 284,288 **** `--enable-cond-command' ! Include support for the `[[' conditional command (*note Conditional Constructs::). --- 284,293 ---- `--enable-cond-command' ! Include support for the `[[' conditional command. (*note ! Conditional Constructs::). ! ! `--enable-cond-regexp' ! Include support for matching POSIX regular expressions using the ! `=~' binary operator in the `[[' conditional command. (*note Conditional Constructs::). *************** *** 316,319 **** --- 321,328 ---- This enables the job control features (*note Job Control::), if the operating system supports them. + + `--enable-multibyte' + This enables support for multibyte characters if the operating + system provides the necessary support. `--enable-net-redirections' diff -aNrc2 bash-2.05b-patched/MANIFEST bash-3.0/MANIFEST *** bash-2.05b-patched/MANIFEST Mon May 13 13:09:00 2002 --- bash-3.0/MANIFEST Thu May 6 09:01:58 2004 *************** *** 27,30 **** --- 27,31 ---- lib/glob d lib/glob/doc d + lib/intl d lib/malloc d lib/readline d *************** *** 36,42 **** --- 37,45 ---- lib/tilde d lib/tilde/doc d + po d support d tests d tests/misc d + ABOUT-NLS f CHANGES f COMPAT f *************** *** 141,149 **** bashtypes.h f mailcheck.h f - pathnames.h f xmalloc.h f y.tab.c f y.tab.h f parser-built f builtins/Makefile.in f builtins/alias.def f --- 144,152 ---- bashtypes.h f mailcheck.h f xmalloc.h f y.tab.c f y.tab.h f parser-built f + pathnames.h.in f builtins/Makefile.in f builtins/alias.def f *************** *** 151,154 **** --- 154,158 ---- builtins/break.def f builtins/builtin.def f + builtins/caller.def f builtins/cd.def f builtins/colon.def f *************** *** 208,211 **** --- 212,216 ---- include/chartypes.h f include/filecntl.h f + include/gettext.h f include/maxpath.h f include/memalloc.h f *************** *** 235,238 **** --- 240,284 ---- lib/glob/doc/glob.texi f lib/glob/ndir.h f + lib/intl/ChangeLog f + lib/intl/Makefile.in f + lib/intl/VERSION f + lib/intl/bindtextdom.c f + lib/intl/config.charset f + lib/intl/dcgettext.c f + lib/intl/dcigettext.c f + lib/intl/dcngettext.c f + lib/intl/dgettext.c f + lib/intl/dngettext.c f + lib/intl/eval-plural.h f + lib/intl/explodename.c f + lib/intl/finddomain.c f + lib/intl/gettext.c f + lib/intl/gettextP.h f + lib/intl/gmo.h f + lib/intl/hash-string.h f + lib/intl/intl-compat.c f + lib/intl/l10nflist.c f + lib/intl/libgnuintl.h.in f + lib/intl/loadinfo.h f + lib/intl/loadmsgcat.c f + lib/intl/localcharset.c f + lib/intl/localcharset.h f + lib/intl/locale.alias f + lib/intl/localealias.c f + lib/intl/localename.c f + lib/intl/log.c f + lib/intl/ngettext.c f + lib/intl/os2compat.c f + lib/intl/os2compat.h f + lib/intl/osdep.c f + lib/intl/plural-exp.c f + lib/intl/plural-exp.h f + lib/intl/plural.c f + lib/intl/plural.y f + lib/intl/ref-add.sin f + lib/intl/ref-del.sin f + lib/intl/relocatable.c f + lib/intl/relocatable.h f + lib/intl/textdomain.c f lib/malloc/Makefile.in f lib/malloc/getpagesize.h f *************** *** 314,325 **** lib/readline/xmalloc.h f lib/readline/doc/Makefile f ! lib/readline/doc/manvers.texinfo f ! lib/readline/doc/rlman.texinfo f ! lib/readline/doc/rltech.texinfo f ! lib/readline/doc/rluser.texinfo f ! lib/readline/doc/rluserman.texinfo f ! lib/readline/doc/hist.texinfo f ! lib/readline/doc/hstech.texinfo f ! lib/readline/doc/hsuser.texinfo f lib/readline/examples/Makefile f lib/readline/examples/excallback.c f --- 360,372 ---- lib/readline/xmalloc.h f lib/readline/doc/Makefile f ! lib/readline/doc/version.texi f ! lib/readline/doc/rlman.texi f ! lib/readline/doc/rltech.texi f ! lib/readline/doc/rluser.texi f ! lib/readline/doc/rluserman.texi f ! lib/readline/doc/history.texi f ! lib/readline/doc/hstech.texi f ! lib/readline/doc/hsuser.texi f ! lib/readline/doc/fdl.texi f lib/readline/examples/Makefile f lib/readline/examples/excallback.c f *************** *** 352,355 **** --- 399,403 ---- lib/sh/rename.c f lib/sh/setlinebuf.c f + lib/sh/shmatch.c f lib/sh/shquote.c f lib/sh/shtty.c f *************** *** 363,366 **** --- 411,415 ---- lib/sh/stringvec.c f lib/sh/strpbrk.c f + lib/sh/strstr.c f lib/sh/strtod.c f lib/sh/strtoimax.c f *************** *** 407,410 **** --- 456,477 ---- lib/tilde/tilde.h f lib/tilde/shell.c f + po/LINGUAS f + po/Makefile.in.in f + po/Makevars f + po/POTFILES.in f + po/Rules-builtins f + po/Rules-quot f + po/bash.pot f + po/boldquot.sed f + po/builtins.pot f + po/en@quot.header f + po/en@boldquot.header f + po/en@quot.po f + po/en@boldquot.po f + po/en@quot.gmo f + po/en@boldquot.gmo f + po/insert-header.sin f + po/quot.sed f + po/remove-potcdate.sin f CWRU/misc/open-files.c f CWRU/misc/sigs.c f *************** *** 428,437 **** --- 495,509 ---- doc/texinfo.tex f doc/bashref.texi f + doc/version.texi f doc/bashref.info f doc/article.ms f doc/htmlpost.sh f 755 + doc/infopost.sh f 755 + doc/fdl.texi f + doc/fdl.txt f support/Makefile.in f support/bashversion.c f support/config.guess f + support/config.rpath f 755 support/config.sub f support/printenv.sh f 755 *************** *** 442,445 **** --- 514,518 ---- support/mkconffiles f 755 support/mkdirs f 755 + support/mkinstalldirs f 755 support/mkversion.sh f 755 support/mksignames.c f *************** *** 451,455 **** support/fixlinks f 755 support/install.sh f 755 ! support/texi2dvi f support/texi2html f 755 support/xenix-link.sh f 755 --- 524,528 ---- support/fixlinks f 755 support/install.sh f 755 ! support/texi2dvi f 755 support/texi2html f 755 support/xenix-link.sh f 755 *************** *** 469,472 **** --- 542,546 ---- examples/complete/complete.freebsd f examples/complete/complete.gnu-longopt f + examples/complete/bashcc-1.0.1.tar.gz f examples/loadables/README f examples/loadables/template.c f *************** *** 477,480 **** --- 551,555 ---- examples/loadables/realpath.c f examples/loadables/sleep.c f + examples/loadables/strftime.c f examples/loadables/truefalse.c f examples/loadables/getconf.h f *************** *** 602,614 **** examples/misc/cshtobash f tests/README f tests/arith-for.tests f tests/arith-for.right f tests/arith.tests f tests/arith.right f tests/array.tests f tests/array.right f tests/array-at-star f tests/array2.right f ! tests/braces-tests f tests/braces.right f tests/builtins.tests f --- 677,693 ---- examples/misc/cshtobash f tests/README f + tests/alias.tests f + tests/alias.right f tests/arith-for.tests f tests/arith-for.right f tests/arith.tests f tests/arith.right f + tests/arith1.sub f + tests/arith2.sub f tests/array.tests f tests/array.right f tests/array-at-star f tests/array2.right f ! tests/braces.tests f tests/braces.right f tests/builtins.tests f *************** *** 625,629 **** --- 704,716 ---- tests/cprint.tests f tests/cprint.right f + tests/dbg-support.right f + tests/dbg-support.sub f + tests/dbg-support.tests f + tests/dbg-support2.right f + tests/dbg-support2.tests f tests/dollar-at-star f + tests/dollar-at1.sub f + tests/dollar-at2.sub f + tests/dollar-star1.sub f tests/dollar.right f tests/dstack.tests f *************** *** 641,644 **** --- 728,732 ---- tests/exec5.sub f tests/exec6.sub f + tests/exec7.sub f tests/exp-tests f tests/exp.right f *************** *** 684,687 **** --- 772,776 ---- tests/jobs2.sub f tests/jobs3.sub f + tests/jobs4.sub f tests/jobs.right f tests/more-exp.tests f *************** *** 691,694 **** --- 780,784 ---- tests/new-exp2.sub f tests/new-exp3.sub f + tests/new-exp4.sub f tests/new-exp.right f tests/nquote.tests f *************** *** 700,703 **** --- 790,795 ---- tests/nquote3.tests f tests/nquote3.right f + tests/nquote4.tests f + tests/nquote4.right f tests/posix2.tests f tests/posix2.right f *************** *** 716,719 **** --- 808,812 ---- tests/read3.sub f tests/read4.sub f + tests/read5.sub f tests/redir.tests f tests/redir.right f *************** *** 726,729 **** --- 819,823 ---- tests/redir4.in1 f tests/redir5.sub f + tests/redir6.sub f tests/rhs-exp.tests f tests/rhs-exp.right f *************** *** 732,735 **** --- 826,830 ---- tests/run-all f tests/run-minimal f + tests/run-alias f tests/run-arith-for f tests/run-arith f *************** *** 740,743 **** --- 835,840 ---- tests/run-cond f tests/run-cprint f + tests/run-dbg-support f + tests/run-dbg-support2 f tests/run-dirstack f tests/run-dollars f *************** *** 764,767 **** --- 861,865 ---- tests/run-nquote2 f tests/run-nquote3 f + tests/run-nquote4 f tests/run-posix2 f tests/run-posixpat f *************** *** 774,777 **** --- 872,876 ---- tests/run-rsh f tests/run-set-e f + tests/run-set-x f tests/run-shopt f tests/run-strip f *************** *** 783,786 **** --- 882,887 ---- tests/set-e-test f tests/set-e.right f + tests/set-x.tests f + tests/set-x.right f tests/shopt.tests f tests/shopt.right f diff -aNrc2 bash-2.05b-patched/Makefile.in bash-3.0/Makefile.in *** bash-2.05b-patched/Makefile.in Fri May 31 13:44:23 2002 --- bash-3.0/Makefile.in Wed Mar 17 08:34:39 2004 *************** *** 1,5 **** ! # Makefile for bash-2.05b, version 2.142 # ! # Copyright (C) 1996-2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify --- 1,5 ---- ! # Makefile for bash-3.0, version 2.152 # ! # Copyright (C) 1996-2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,31 ---- all: .made + PACKAGE = @PACKAGE_NAME@ + VERSION = @PACKAGE_VERSION@ + + PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + # Include some boilerplate Gnu makefile definitions. prefix = @prefix@ *************** *** 29,32 **** --- 37,41 ---- includedir = @includedir@ datadir = @datadir@ + localedir = $(datadir)/locale mandir = @mandir@ *************** *** 45,48 **** --- 54,58 ---- topdir = @top_srcdir@ BUILD_DIR = @BUILD_DIR@ + top_builddir = @BUILD_DIR@ srcdir = @srcdir@ VPATH = .:@srcdir@ *************** *** 114,117 **** --- 124,129 ---- LOCAL_DEFS = @LOCAL_DEFS@ + LOCALE_DEFS = -DLOCALEDIR='"$(localedir)"' -DPACKAGE='"$(PACKAGE)"' + LOCAL_LIBS = @LOCAL_LIBS@ LIBS = $(BUILTINS_LIB) $(LIBRARIES) @LIBS@ *************** *** 119,123 **** LOCAL_LDFLAGS = @LOCAL_LDFLAGS@ ! SYSTEM_FLAGS = -DPROGRAM='"$(Program)"' -DCONF_HOSTTYPE='"$(Machine)"' -DCONF_OSTYPE='"$(OS)"' -DCONF_MACHTYPE='"$(MACHTYPE)"' -DCONF_VENDOR='"$(VENDOR)"' BASE_CCFLAGS = $(PROFILE_FLAGS) $(SYSTEM_FLAGS) $(LOCAL_DEFS) \ --- 131,135 ---- LOCAL_LDFLAGS = @LOCAL_LDFLAGS@ ! SYSTEM_FLAGS = -DPROGRAM='"$(Program)"' -DCONF_HOSTTYPE='"$(Machine)"' -DCONF_OSTYPE='"$(OS)"' -DCONF_MACHTYPE='"$(MACHTYPE)"' -DCONF_VENDOR='"$(VENDOR)"' $(LOCALE_DEFS) BASE_CCFLAGS = $(PROFILE_FLAGS) $(SYSTEM_FLAGS) $(LOCAL_DEFS) \ *************** *** 131,135 **** LDFLAGS_FOR_BUILD = $(LDFLAGS) ! INCLUDES = -I. @RL_INCLUDE@ -I$(srcdir) -I$(BASHINCDIR) -I$(LIBSRC) GCC_LINT_FLAGS = -Wall -Wshadow -Wpointer-arith -Wcast-qual \ --- 143,147 ---- LDFLAGS_FOR_BUILD = $(LDFLAGS) ! INCLUDES = -I. @RL_INCLUDE@ -I$(srcdir) -I$(BASHINCDIR) -I$(LIBSRC) $(INTL_INC) GCC_LINT_FLAGS = -Wall -Wshadow -Wpointer-arith -Wcast-qual \ *************** *** 148,153 **** --- 160,170 ---- LIBSRC = $(srcdir)/$(LIBSUBDIR) + LIBBUILD = ${BUILD_DIR}/${LIBSUBDIR} + SUBDIR_INCLUDES = -I. @RL_INCLUDE@ -I$(topdir) -I$(topdir)/$(LIBSUBDIR) + BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ + USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ + # the bash library # the library is a mix of functions that the C library does not provide on *************** *** 180,184 **** ${SH_LIBSRC}/mktime.c ${SH_LIBSRC}/strftime.c \ ${SH_LIBSRC}/memset.c ${SH_LIBSRC}/xstrchr.c \ ! ${SH_LIBSRC}/zcatfd.c SHLIB_LIB = -lsh --- 197,201 ---- ${SH_LIBSRC}/mktime.c ${SH_LIBSRC}/strftime.c \ ${SH_LIBSRC}/memset.c ${SH_LIBSRC}/xstrchr.c \ ! ${SH_LIBSRC}/zcatfd.c ${SH_LIBSRC}/shmatch.c SHLIB_LIB = -lsh *************** *** 222,226 **** $(RL_LIBSRC)/input.c $(RL_LIBSRC)/xmalloc.c \ $(RL_LIBSRC)/shell.c $(RL_LIBSRC)/savestring.c \ ! $(RL_LIBSRC)/misc.c $(RL_LIBSRC)/compat.c \ $(RL_LIBSRC)/histexpand.c $(RL_LIBSRC)/history.c \ $(RL_LIBSRC)/histsearch.c $(RL_LIBSRC)/histfile.c --- 239,243 ---- $(RL_LIBSRC)/input.c $(RL_LIBSRC)/xmalloc.c \ $(RL_LIBSRC)/shell.c $(RL_LIBSRC)/savestring.c \ ! $(RL_LIBSRC)/misc.c $(RL_LIBSRC)/mbutil.c $(RL_LIBSRC)/compat.c \ $(RL_LIBSRC)/histexpand.c $(RL_LIBSRC)/history.c \ $(RL_LIBSRC)/histsearch.c $(RL_LIBSRC)/histfile.c *************** *** 237,241 **** $(RL_LIBDIR)/terminal.o $(RL_LIBDIR)/callback.o \ $(RL_LIBDIR)/shell.o $(RL_LIBDIR)/savestring.o \ ! $(RL_LIBDIR)/compat.o \ $(RL_LIBDIR)/history.o $(RL_LIBDIR)/histexpand.o \ $(RL_LIBDIR)/histsearch.o $(RL_LIBDIR)/histfile.o --- 254,258 ---- $(RL_LIBDIR)/terminal.o $(RL_LIBDIR)/callback.o \ $(RL_LIBDIR)/shell.o $(RL_LIBDIR)/savestring.o \ ! $(RL_LIBDIR)/mbutil.o $(RL_LIBDIR)/compat.o \ $(RL_LIBDIR)/history.o $(RL_LIBDIR)/histexpand.o \ $(RL_LIBDIR)/histsearch.o $(RL_LIBDIR)/histfile.o *************** *** 301,304 **** --- 318,340 ---- TILDE_OBJ = $(TILDE_LIBDIR)/tilde.o + # libintl + INTL_LIBSRC = $(LIBSRC)/intl + INTL_LIBDIR = $(dot)/$(LIBSUBDIR)/intl + INTL_ABSSRC = ${topdir}/$(INTL_LIB) + INTL_BUILDDIR = ${LIBBUILD}/intl + + INTL_LIB = @LIBINTL@ + INTL_LIBRARY = $(INTL_LIBDIR)/libintl.a + INTL_DEP = @INTL_DEP@ + INTL_INC = @INTL_INC@ + + LIBINTL_H = @LIBINTL_H@ + + # tests + LIBINTL = @LIBINTL@ + LTLIBINTL = @LTLIBINTL@ + INTLLIBS = @INTLLIBS@ + INTLOBJS = @INTLOBJS@ + # Our malloc. MALLOC_TARGET = @MALLOC_TARGET@ *************** *** 342,348 **** LIBRARIES = $(SHLIB_LIB) $(READLINE_LIB) $(HISTORY_LIB) $(TERMCAP_LIB) $(GLOB_LIB) \ ! $(TILDE_LIB) $(MALLOC_LIB) $(LOCAL_LIBS) ! LIBDEP = $(SHLIB_DEP) $(READLINE_DEP) $(HISTORY_DEP) $(TERMCAP_DEP) $(GLOB_DEP) \ $(TILDE_DEP) $(MALLOC_DEP) --- 378,384 ---- LIBRARIES = $(SHLIB_LIB) $(READLINE_LIB) $(HISTORY_LIB) $(TERMCAP_LIB) $(GLOB_LIB) \ ! $(TILDE_LIB) $(MALLOC_LIB) $(INTL_LIB) $(LOCAL_LIBS) ! LIBDEP = $(SHLIB_DEP) $(INTL_DEP) $(READLINE_DEP) $(HISTORY_DEP) $(TERMCAP_DEP) $(GLOB_DEP) \ $(TILDE_DEP) $(MALLOC_DEP) *************** *** 396,404 **** BUILTIN_ABSSRC=${topdir}/builtins DEFDIR = $(dot)/builtins BUILTIN_DEFS = $(DEFSRC)/alias.def $(DEFSRC)/bind.def $(DEFSRC)/break.def \ $(DEFSRC)/builtin.def $(DEFSRC)/cd.def $(DEFSRC)/colon.def \ $(DEFSRC)/command.def ${DEFSRC}/complete.def \ ! $(DEFSRC)/declare.def \ $(DEFSRC)/echo.def $(DEFSRC)/enable.def $(DEFSRC)/eval.def \ $(DEFSRC)/exec.def $(DEFSRC)/exit.def $(DEFSRC)/fc.def \ --- 432,441 ---- BUILTIN_ABSSRC=${topdir}/builtins DEFDIR = $(dot)/builtins + DEBUGGER_DIR = $(dot)/debugger BUILTIN_DEFS = $(DEFSRC)/alias.def $(DEFSRC)/bind.def $(DEFSRC)/break.def \ $(DEFSRC)/builtin.def $(DEFSRC)/cd.def $(DEFSRC)/colon.def \ $(DEFSRC)/command.def ${DEFSRC}/complete.def \ ! $(DEFSRC)/caller.def $(DEFSRC)/declare.def \ $(DEFSRC)/echo.def $(DEFSRC)/enable.def $(DEFSRC)/eval.def \ $(DEFSRC)/exec.def $(DEFSRC)/exit.def $(DEFSRC)/fc.def \ *************** *** 419,423 **** BUILTIN_OBJS = $(DEFDIR)/alias.o $(DEFDIR)/bind.o $(DEFDIR)/break.o \ $(DEFDIR)/builtin.o $(DEFDIR)/cd.o $(DEFDIR)/colon.o \ ! $(DEFDIR)/command.o $(DEFDIR)/declare.o \ $(DEFDIR)/echo.o $(DEFDIR)/enable.o $(DEFDIR)/eval.o \ $(DEFDIR)/exec.o $(DEFDIR)/exit.o $(DEFDIR)/fc.o \ --- 456,460 ---- BUILTIN_OBJS = $(DEFDIR)/alias.o $(DEFDIR)/bind.o $(DEFDIR)/break.o \ $(DEFDIR)/builtin.o $(DEFDIR)/cd.o $(DEFDIR)/colon.o \ ! $(DEFDIR)/command.o $(DEFDIR)/caller.o $(DEFDIR)/declare.o \ $(DEFDIR)/echo.o $(DEFDIR)/enable.o $(DEFDIR)/eval.o \ $(DEFDIR)/exec.o $(DEFDIR)/exit.o $(DEFDIR)/fc.o \ *************** *** 443,446 **** --- 480,487 ---- DOCDIR = $(dot)/doc + # Translations and other i18n support files + PO_SRC = $(srcdir)/po/ + PO_DIR = $(dot)/po/ + SIGNAMES_SUPPORT = $(SUPPORT_SRC)mksignames.c *************** *** 455,464 **** buildversion.o CREATED_CONFIGURE = config.h config.cache config.status config.log \ ! stamp-h CREATED_MAKEFILES = Makefile builtins/Makefile doc/Makefile \ lib/readline/Makefile lib/glob/Makefile \ lib/sh/Makefile lib/tilde/Makefile lib/malloc/Makefile \ lib/termcap/Makefile examples/loadables/Makefile \ ! examples/loadables/perl/Makefile support/Makefile # Keep GNU Make from exporting the entire environment for small machines. --- 496,506 ---- buildversion.o CREATED_CONFIGURE = config.h config.cache config.status config.log \ ! stamp-h po/POTFILES CREATED_MAKEFILES = Makefile builtins/Makefile doc/Makefile \ lib/readline/Makefile lib/glob/Makefile \ lib/sh/Makefile lib/tilde/Makefile lib/malloc/Makefile \ lib/termcap/Makefile examples/loadables/Makefile \ ! examples/loadables/perl/Makefile support/Makefile \ ! lib/intl/Makefile po/Makefile po/Makefile.in # Keep GNU Make from exporting the entire environment for small machines. *************** *** 507,511 **** buildversion.o: version.h conftypes.h patchlevel.h $(srcdir)/version.c ! $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -c -o $@ $(srcdir)/version.c # old rules --- 549,553 ---- buildversion.o: version.h conftypes.h patchlevel.h $(srcdir)/version.c ! $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -DBUILDTOOL -c -o $@ $(srcdir)/version.c # old rules *************** *** 559,562 **** --- 601,611 ---- $(MAKE) $(MFLAGS) DEBUG=${DEBUG} ${SHLIB_LIBNAME}) || exit 1 + ${INTL_LIBRARY}: config.h ${INTL_LIBDIR}/Makefile + @echo making $@ in ${INTL_LIBDIR} + @(cd ${INTL_LIBDIR} && \ + $(MAKE) $(MFLAGS) all) || exit 1 + + ${LIBINTL_H}: ${INTL_LIBRARY} + mksignames$(EXEEXT): $(SUPPORT_SRC)mksignames.c $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)mksignames.c *************** *** 579,583 **** ./mksyntax -o $@ ! $(BUILTINS_LIBRARY): $(BUILTIN_DEFS) $(BUILTIN_C_SRC) config.h ${BASHINCDIR}/memalloc.h @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) DEBUG=${DEBUG} libbuiltins.a ) || exit 1 --- 628,632 ---- ./mksyntax -o $@ ! $(BUILTINS_LIBRARY): $(BUILTIN_DEFS) $(BUILTIN_C_SRC) config.h ${BASHINCDIR}/memalloc.h version.h @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) DEBUG=${DEBUG} libbuiltins.a ) || exit 1 *************** *** 598,601 **** --- 647,653 ---- CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status + pathnames.h: config.status $(srcdir)/Makefile.in + CONFIG_HEADERS= $(SHELL) ./config.status + Makefiles makefiles: config.status $(srcdir)/Makefile.in @for mf in $(CREATED_MAKEFILES); do \ *************** *** 642,648 **** installdirs: ! @${SHELL} $(SUPPORT_SRC)mkdirs $(DESTDIR)$(bindir) ! @${SHELL} $(SUPPORT_SRC)mkdirs $(DESTDIR)$(man1dir) ! @${SHELL} $(SUPPORT_SRC)mkdirs $(DESTDIR)$(infodir) install: .made installdirs --- 694,701 ---- installdirs: ! @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(bindir) ! @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(man1dir) ! @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(infodir) ! -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) install: .made installdirs *************** *** 654,657 **** --- 707,711 ---- infodir=$(infodir) htmldir=$(htmldir) DESTDIR=$(DESTDIR) $@ ) -( cd $(DEFDIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) + -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) install-strip: *************** *** 666,675 **** man3dir=$(man3dir) man3ext=$(man3ext) \ infodir=$(infodir) htmldir=$(htmldir) DESTDIR=$(DESTDIR) $@ ) .PHONY: basic-clean clean realclean maintainer-clean distclean mostlyclean maybe-clean basic-clean: $(RM) $(OBJECTS) $(Program) bashbug ! $(RM) .build .made version.h clean: basic-clean --- 720,733 ---- man3dir=$(man3dir) man3ext=$(man3ext) \ infodir=$(infodir) htmldir=$(htmldir) DESTDIR=$(DESTDIR) $@ ) + -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) .PHONY: basic-clean clean realclean maintainer-clean distclean mostlyclean maybe-clean + LIB_SUBDIRS = ${RL_LIBDIR} ${HIST_LIBDIR} ${TERM_LIBDIR} ${GLOB_LIBDIR} \ + ${INTL_LIBDIR} ${TILDE_LIBDIR} ${ALLOC_LIBDIR} ${SH_LIBDIR} + basic-clean: $(RM) $(OBJECTS) $(Program) bashbug ! $(RM) .build .made version.h pathnames.h clean: basic-clean *************** *** 677,687 **** ( cd builtins && $(MAKE) $(MFLAGS) $@ ) -( cd $(SDIR) && $(MAKE) $(MFLAGS) $@ ) ! -(cd $(RL_LIBDIR) && $(MAKE) $(MFLAGS) $@) ! -(cd $(HIST_LIBDIR) && test -f Makefile && $(MAKE) $(MFLAGS) $@) ! -(cd $(TERM_LIBDIR) && $(MAKE) $(MFLAGS) $@) ! -(cd $(GLOB_LIBDIR) && $(MAKE) $(MFLAGS) $@) ! -(cd $(TILDE_LIBDIR) && $(MAKE) $(MFLAGS) $@) ! -(cd $(ALLOC_LIBDIR) && $(MAKE) $(MFLAGS) $@) ! -(cd $(SH_LIBDIR) && $(MAKE) $(MFLAGS) $@) $(RM) $(CREATED_SUPPORT) --- 735,742 ---- ( cd builtins && $(MAKE) $(MFLAGS) $@ ) -( cd $(SDIR) && $(MAKE) $(MFLAGS) $@ ) ! -for libdir in ${LIB_SUBDIRS}; do \ ! (cd $$libdir && test -f Makefile && $(MAKE) $(MFLAGS) $@) ;\ ! done ! -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) $(RM) $(CREATED_SUPPORT) *************** *** 690,700 **** ( cd builtins && $(MAKE) $(MFLAGS) $@ ) -( cd $(SDIR) && $(MAKE) $(MFLAGS) $@ ) ! -(cd $(RL_LIBDIR) && $(MAKE) $(MFLAGS) $@) ! -(cd $(HIST_LIBDIR) && test -f Makefile && $(MAKE) $(MFLAGS) $@) ! -(cd $(TERM_LIBDIR) && $(MAKE) $(MFLAGS) $@) ! -(cd $(GLOB_LIBDIR) && $(MAKE) $(MFLAGS) $@) ! -(cd $(TILDE_LIBDIR) && $(MAKE) $(MFLAGS) $@) ! -(cd $(ALLOC_LIBDIR) && $(MAKE) $(MFLAGS) $@) ! -(cd $(SH_LIBDIR) && $(MAKE) $(MFLAGS) $@) distclean: basic-clean maybe-clean --- 745,752 ---- ( cd builtins && $(MAKE) $(MFLAGS) $@ ) -( cd $(SDIR) && $(MAKE) $(MFLAGS) $@ ) ! -for libdir in ${LIB_SUBDIRS}; do \ ! (cd $$libdir && test -f Makefile && $(MAKE) $(MFLAGS) $@) ;\ ! done ! -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) distclean: basic-clean maybe-clean *************** *** 702,712 **** ( cd builtins && $(MAKE) $(MFLAGS) $@ ) -( cd $(SDIR) && $(MAKE) $(MFLAGS) $@ ) ! -(cd $(RL_LIBDIR) && $(MAKE) $(MFLAGS) $@) ! -(cd $(HIST_LIBDIR) && test -f Makefile && $(MAKE) $(MFLAGS) $@) ! -(cd $(TERM_LIBDIR) && $(MAKE) $(MFLAGS) $@) ! -(cd $(GLOB_LIBDIR) && $(MAKE) $(MFLAGS) $@) ! -(cd $(TILDE_LIBDIR) && $(MAKE) $(MFLAGS) $@) ! -(cd $(ALLOC_LIBDIR) && $(MAKE) $(MFLAGS) $@) ! -(cd $(SH_LIBDIR) && $(MAKE) $(MFLAGS) $@) $(RM) $(CREATED_CONFIGURE) tags TAGS $(RM) $(CREATED_SUPPORT) Makefile $(CREATED_MAKEFILES) --- 754,761 ---- ( cd builtins && $(MAKE) $(MFLAGS) $@ ) -( cd $(SDIR) && $(MAKE) $(MFLAGS) $@ ) ! -for libdir in ${LIB_SUBDIRS}; do \ ! (cd $$libdir && test -f Makefile && $(MAKE) $(MFLAGS) $@) ;\ ! done ! -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) $(RM) $(CREATED_CONFIGURE) tags TAGS $(RM) $(CREATED_SUPPORT) Makefile $(CREATED_MAKEFILES) *************** *** 719,729 **** ( cd builtins && $(MAKE) $(MFLAGS) $@ ) ( cd $(SDIR) && $(MAKE) $(MFLAGS) $@ ) ! -(cd $(RL_LIBDIR) && $(MAKE) $(MFLAGS) $@) ! -(cd $(HIST_LIBDIR) && test -f Makefile && $(MAKE) $(MFLAGS) $@) ! -(cd $(TERM_LIBDIR) && $(MAKE) $(MFLAGS) $@) ! -(cd $(GLOB_LIBDIR) && $(MAKE) $(MFLAGS) $@) ! -(cd $(TILDE_LIBDIR) && $(MAKE) $(MFLAGS) $@) ! -(cd $(ALLOC_LIBDIR) && $(MAKE) $(MFLAGS) $@) ! -(cd $(SH_LIBDIR) && $(MAKE) $(MFLAGS) $@) $(RM) $(CREATED_CONFIGURE) $(CREATED_MAKEFILES) $(RM) $(CREATED_SUPPORT) Makefile --- 768,775 ---- ( cd builtins && $(MAKE) $(MFLAGS) $@ ) ( cd $(SDIR) && $(MAKE) $(MFLAGS) $@ ) ! -for libdir in ${LIB_SUBDIRS}; do \ ! (cd $$libdir && test -f Makefile && $(MAKE) $(MFLAGS) $@) ;\ ! done ! -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) $(RM) $(CREATED_CONFIGURE) $(CREATED_MAKEFILES) $(RM) $(CREATED_SUPPORT) Makefile *************** *** 755,761 **** @echo Bash distributions are created using $(srcdir)/support/mkdist. @echo Here is a sample of the necessary commands: ! @echo $(Program) $(srcdir)/support/mkdist -m $(srcdir)/MANIFEST -s $(srcdir) -r ${Program} $(Version)-${RELSTATUS} ! @echo tar cf $(Program)-$(Version)-${RELSTATUS}.tar ${Program}-$(Version)-${RELSTATUS} ! @echo gzip $(Program)-$(Version)-${RELSTATUS}.tar depend: depends --- 801,807 ---- @echo Bash distributions are created using $(srcdir)/support/mkdist. @echo Here is a sample of the necessary commands: ! @echo $(Program) $(srcdir)/support/mkdist -m $(srcdir)/MANIFEST -s $(srcdir) -r ${PACKAGE} $(PACKAGE_VERSION) ! @echo tar cf $(PACKAGE)-${PACKAGE_VERSION}.tar ${PACKAGE}-$(PACKAGE_VERSION) ! @echo gzip $(PACKAGE)-$(PACKAGE_VERSION).tar depend: depends *************** *** 800,803 **** --- 846,854 ---- error.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h flags.h ${BASHINCDIR}/stdc.h error.h error.o: command.h general.h xmalloc.h externs.h input.h bashhist.h + error.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h + error.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h + error.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h + error.o: make_cmd.h subst.h sig.h pathnames.h externs.h + error.o: input.h execute_cmd.h eval.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h trap.h flags.h ${DEFSRC}/common.h eval.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h *************** *** 805,819 **** eval.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h eval.o: make_cmd.h subst.h sig.h pathnames.h externs.h ! eval.o: input.h execute_cmd.h execute_cmd.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h execute_cmd.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h execute_cmd.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h execute_cmd.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! execute_cmd.o: make_cmd.h subst.h sig.h pathnames.h externs.h execute_cmd.o: ${BASHINCDIR}/memalloc.h ${GRAM_H} flags.h builtins.h jobs.h quit.h siglist.h execute_cmd.o: execute_cmd.h findcmd.h redir.h trap.h test.h pathexp.h execute_cmd.o: $(DEFSRC)/common.h ${DEFDIR}/builtext.h ${GLOB_LIBSRC}/strmatch.h execute_cmd.o: ${BASHINCDIR}/posixtime.h ${BASHINCDIR}/chartypes.h ! expr.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h expr.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h expr.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h --- 856,870 ---- eval.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h eval.o: make_cmd.h subst.h sig.h pathnames.h externs.h ! eval.o: input.h execute_cmd.h execute_cmd.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h execute_cmd.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h execute_cmd.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h execute_cmd.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! execute_cmd.o: make_cmd.h subst.h sig.h pathnames.h externs.h execute_cmd.o: ${BASHINCDIR}/memalloc.h ${GRAM_H} flags.h builtins.h jobs.h quit.h siglist.h execute_cmd.o: execute_cmd.h findcmd.h redir.h trap.h test.h pathexp.h execute_cmd.o: $(DEFSRC)/common.h ${DEFDIR}/builtext.h ${GLOB_LIBSRC}/strmatch.h execute_cmd.o: ${BASHINCDIR}/posixtime.h ${BASHINCDIR}/chartypes.h ! expr.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h expr.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h expr.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h *************** *** 827,831 **** findcmd.o: flags.h hashlib.h pathexp.h hashcmd.h findcmd.o: ${BASHINCDIR}/chartypes.h ! flags.o: config.h flags.h flags.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h flags.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h --- 878,882 ---- findcmd.o: flags.h hashlib.h pathexp.h hashcmd.h findcmd.o: ${BASHINCDIR}/chartypes.h ! flags.o: config.h flags.h flags.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h flags.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h *************** *** 836,840 **** general.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h general.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! general.o: make_cmd.h subst.h sig.h pathnames.h externs.h general.o: ${BASHINCDIR}/maxpath.h ${BASHINCDIR}/posixtime.h general.o: ${BASHINCDIR}/chartypes.h --- 887,891 ---- general.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h general.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! general.o: make_cmd.h subst.h sig.h pathnames.h externs.h general.o: ${BASHINCDIR}/maxpath.h ${BASHINCDIR}/posixtime.h general.o: ${BASHINCDIR}/chartypes.h *************** *** 847,851 **** hashlib.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h hashlib.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! hashlib.o: make_cmd.h subst.h sig.h pathnames.h externs.h input.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h input.o: command.h ${BASHINCDIR}/stdc.h general.h xmalloc.h input.h error.h externs.h --- 898,902 ---- hashlib.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h hashlib.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! hashlib.o: make_cmd.h subst.h sig.h pathnames.h externs.h input.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h input.o: command.h ${BASHINCDIR}/stdc.h general.h xmalloc.h input.h error.h externs.h *************** *** 853,862 **** list.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h list.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! list.o: make_cmd.h subst.h sig.h pathnames.h externs.h ! locale.o: config.h bashtypes.h bashintl.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h locale.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h locale.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h locale.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! locale.o: make_cmd.h subst.h sig.h pathnames.h externs.h locale.o: ${BASHINCDIR}/chartypes.h mailcheck.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h --- 904,913 ---- list.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h list.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! list.o: make_cmd.h subst.h sig.h pathnames.h externs.h ! locale.o: config.h bashtypes.h bashintl.h ${LIBINTL_H} bashansi.h ${BASHINCDIR}/ansi_stdlib.h locale.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h locale.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h locale.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! locale.o: make_cmd.h subst.h sig.h pathnames.h externs.h locale.o: ${BASHINCDIR}/chartypes.h mailcheck.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h *************** *** 866,870 **** mailcheck.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h mailcheck.o: make_cmd.h subst.h sig.h pathnames.h externs.h ! mailcheck.o: execute_cmd.h mailcheck.h make_cmd.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h bashansi.h make_cmd.o: command.h ${BASHINCDIR}/stdc.h general.h xmalloc.h error.h flags.h make_cmd.h --- 917,921 ---- mailcheck.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h mailcheck.o: make_cmd.h subst.h sig.h pathnames.h externs.h ! mailcheck.o: execute_cmd.h mailcheck.h make_cmd.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h bashansi.h make_cmd.o: command.h ${BASHINCDIR}/stdc.h general.h xmalloc.h error.h flags.h make_cmd.h *************** *** 891,900 **** print_cmd.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h print_cmd.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! print_cmd.o: make_cmd.h subst.h sig.h pathnames.h externs.h print_cmd.o: ${GRAM_H} $(DEFSRC)/common.h redir.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/filecntl.h redir.o: ${BASHINCDIR}/memalloc.h shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h redir.o: general.h xmalloc.h variables.h arrayfunc.h conftypes.h array.h hashlib.h quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h ! redir.o: dispose_cmd.h make_cmd.h subst.h sig.h pathnames.h externs.h redir.o: flags.h execute_cmd.h redir.h input.h shell.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/filecntl.h --- 942,951 ---- print_cmd.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h print_cmd.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! print_cmd.o: make_cmd.h subst.h sig.h pathnames.h externs.h print_cmd.o: ${GRAM_H} $(DEFSRC)/common.h redir.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/filecntl.h redir.o: ${BASHINCDIR}/memalloc.h shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h redir.o: general.h xmalloc.h variables.h arrayfunc.h conftypes.h array.h hashlib.h quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h ! redir.o: dispose_cmd.h make_cmd.h subst.h sig.h pathnames.h externs.h redir.o: flags.h execute_cmd.h redir.h input.h shell.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/filecntl.h *************** *** 902,906 **** shell.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h shell.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! shell.o: make_cmd.h subst.h sig.h pathnames.h externs.h version.h shell.o: flags.h trap.h mailcheck.h builtins.h $(DEFSRC)/common.h shell.o: jobs.h siglist.h input.h execute_cmd.h findcmd.h bashhist.h --- 953,957 ---- shell.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h shell.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! shell.o: make_cmd.h subst.h sig.h pathnames.h externs.h shell.o: flags.h trap.h mailcheck.h builtins.h $(DEFSRC)/common.h shell.o: jobs.h siglist.h input.h execute_cmd.h findcmd.h bashhist.h *************** *** 910,914 **** sig.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h sig.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! sig.o: make_cmd.h subst.h sig.h pathnames.h externs.h sig.o: jobs.h siglist.h trap.h $(DEFSRC)/common.h bashline.h bashhist.h siglist.o: config.h bashtypes.h siglist.h trap.h --- 961,965 ---- sig.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h sig.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! sig.o: make_cmd.h subst.h sig.h pathnames.h externs.h sig.o: jobs.h siglist.h trap.h $(DEFSRC)/common.h bashline.h bashhist.h siglist.o: config.h bashtypes.h siglist.h trap.h *************** *** 917,921 **** stringlib.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h stringlib.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! stringlib.o: make_cmd.h subst.h sig.h pathnames.h externs.h stringlib.o: ${GLOB_LIBSRC}/glob.h ${GLOB_LIBSRC}/strmatch.h subst.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/posixstat.h --- 968,972 ---- stringlib.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h stringlib.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! stringlib.o: make_cmd.h subst.h sig.h pathnames.h externs.h stringlib.o: ${GLOB_LIBSRC}/glob.h ${GLOB_LIBSRC}/strmatch.h subst.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/posixstat.h *************** *** 923,927 **** subst.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h subst.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! subst.o: make_cmd.h subst.h sig.h pathnames.h externs.h subst.o: flags.h jobs.h siglist.h execute_cmd.h ${BASHINCDIR}/filecntl.h trap.h pathexp.h subst.o: mailcheck.h input.h $(DEFSRC)/getopt.h $(DEFSRC)/common.h --- 974,978 ---- subst.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h subst.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! subst.o: make_cmd.h subst.h sig.h pathnames.h externs.h subst.o: flags.h jobs.h siglist.h execute_cmd.h ${BASHINCDIR}/filecntl.h trap.h pathexp.h subst.o: mailcheck.h input.h $(DEFSRC)/getopt.h $(DEFSRC)/common.h *************** *** 934,944 **** test.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h test.o: make_cmd.h subst.h sig.h pathnames.h externs.h test.h ! test.o: ${DEFSRC}/common.h trap.o: config.h bashtypes.h trap.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h trap.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h trap.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h trap.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! trap.o: make_cmd.h subst.h sig.h pathnames.h externs.h trap.o: signames.h $(DEFSRC)/common.h unwind_prot.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h command.h ${BASHINCDIR}/stdc.h unwind_prot.o: general.h xmalloc.h unwind_prot.h quit.h sig.h --- 985,996 ---- test.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h test.o: make_cmd.h subst.h sig.h pathnames.h externs.h test.h ! test.o: ${DEFSRC}/common.h trap.o: config.h bashtypes.h trap.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h trap.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h trap.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h trap.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! trap.o: make_cmd.h subst.h sig.h pathnames.h externs.h trap.o: signames.h $(DEFSRC)/common.h + trap.o: ${DEFDIR}/builtext.h unwind_prot.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h command.h ${BASHINCDIR}/stdc.h unwind_prot.o: general.h xmalloc.h unwind_prot.h quit.h sig.h *************** *** 947,956 **** variables.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h variables.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! variables.o: make_cmd.h subst.h sig.h pathnames.h externs.h variables.o: flags.h execute_cmd.h mailcheck.h input.h $(DEFSRC)/common.h variables.o: findcmd.h bashhist.h hashcmd.h pathexp.h ! variables.o: pcomplete.h version.h ${BASHINCDIR}/chartypes.h variables.o: ${BASHINCDIR}/posixtime.h ! version.o: version.h conftypes.h patchlevel.h xmalloc.o: config.h bashtypes.h ${BASHINCDIR}/ansi_stdlib.h error.h --- 999,1008 ---- variables.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h variables.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! variables.o: make_cmd.h subst.h sig.h pathnames.h externs.h variables.o: flags.h execute_cmd.h mailcheck.h input.h $(DEFSRC)/common.h variables.o: findcmd.h bashhist.h hashcmd.h pathexp.h ! variables.o: pcomplete.h ${BASHINCDIR}/chartypes.h variables.o: ${BASHINCDIR}/posixtime.h ! version.o: conftypes.h patchlevel.h version.h xmalloc.o: config.h bashtypes.h ${BASHINCDIR}/ansi_stdlib.h error.h *************** *** 962,966 **** jobs.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h jobs.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! jobs.o: make_cmd.h subst.h sig.h pathnames.h externs.h jobs.o: jobs.h flags.h $(DEFSRC)/common.h $(DEFDIR)/builtext.h jobs.o: ${BASHINCDIR}/posixwait.h ${BASHINCDIR}/unionwait.h --- 1014,1018 ---- jobs.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h jobs.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! jobs.o: make_cmd.h subst.h sig.h pathnames.h externs.h jobs.o: jobs.h flags.h $(DEFSRC)/common.h $(DEFDIR)/builtext.h jobs.o: ${BASHINCDIR}/posixwait.h ${BASHINCDIR}/unionwait.h *************** *** 976,980 **** array.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h array.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! array.o: make_cmd.h subst.h sig.h pathnames.h externs.h array.o: $(DEFSRC)/common.h arrayfunc.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h --- 1028,1032 ---- array.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h array.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! array.o: make_cmd.h subst.h sig.h pathnames.h externs.h array.o: $(DEFSRC)/common.h arrayfunc.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h *************** *** 982,986 **** arrayfunc.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h arrayfunc.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! arrayfunc.o: make_cmd.h subst.h sig.h pathnames.h externs.h arrayfunc.o: $(DEFSRC)/common.h arrayfunc.o: ${BASHINCDIR}/shmbutil.h --- 1034,1038 ---- arrayfunc.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h arrayfunc.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! arrayfunc.o: make_cmd.h subst.h sig.h pathnames.h externs.h arrayfunc.o: $(DEFSRC)/common.h arrayfunc.o: ${BASHINCDIR}/shmbutil.h *************** *** 989,997 **** braces.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h braces.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! braces.o: make_cmd.h subst.h sig.h pathnames.h externs.h braces.o: ${BASHINCDIR}/shmbutil.h alias.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h command.h ${BASHINCDIR}/stdc.h alias.o: general.h xmalloc.h bashtypes.h externs.h alias.h ! alias.o: pcomplete.h alias.o: ${BASHINCDIR}/chartypes.h --- 1041,1049 ---- braces.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h braces.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! braces.o: make_cmd.h subst.h sig.h pathnames.h externs.h braces.o: ${BASHINCDIR}/shmbutil.h alias.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h command.h ${BASHINCDIR}/stdc.h alias.o: general.h xmalloc.h bashtypes.h externs.h alias.h ! alias.o: pcomplete.h alias.o: ${BASHINCDIR}/chartypes.h *************** *** 1006,1010 **** pcomplete.o: bashjmp.h command.h general.h xmalloc.h error.h variables.h arrayfunc.h conftypes.h quit.h pcomplete.o: unwind_prot.h dispose_cmd.h make_cmd.h subst.h sig.h pathnames.h ! pcomplete.o: externs.h ${BASHINCDIR}/maxpath.h execute_cmd.h # library support files --- 1058,1062 ---- pcomplete.o: bashjmp.h command.h general.h xmalloc.h error.h variables.h arrayfunc.h conftypes.h quit.h pcomplete.o: unwind_prot.h dispose_cmd.h make_cmd.h subst.h sig.h pathnames.h ! pcomplete.o: externs.h ${BASHINCDIR}/maxpath.h execute_cmd.h # library support files *************** *** 1015,1019 **** bashhist.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h bashhist.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! bashhist.o: make_cmd.h subst.h sig.h pathnames.h externs.h bashhist.o: flags.h input.h parser.h pathexp.h $(DEFSRC)/common.h bashline.h bashhist.o: $(GLOB_LIBSRC)/strmatch.h --- 1067,1071 ---- bashhist.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h bashhist.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! bashhist.o: make_cmd.h subst.h sig.h pathnames.h externs.h bashhist.o: flags.h input.h parser.h pathexp.h $(DEFSRC)/common.h bashline.h bashhist.o: $(GLOB_LIBSRC)/strmatch.h *************** *** 1022,1026 **** bashline.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h bashline.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! bashline.o: make_cmd.h subst.h sig.h pathnames.h externs.h bashline.o: builtins.h bashhist.h bashline.h execute_cmd.h findcmd.h pathexp.h bashline.o: $(DEFSRC)/common.h $(GLOB_LIBSRC)/glob.h alias.h --- 1074,1078 ---- bashline.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h bashline.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! bashline.o: make_cmd.h subst.h sig.h pathnames.h externs.h bashline.o: builtins.h bashhist.h bashline.h execute_cmd.h findcmd.h pathexp.h bashline.o: $(DEFSRC)/common.h $(GLOB_LIBSRC)/glob.h alias.h *************** *** 1030,1034 **** bracecomp.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h bracecomp.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! bracecomp.o: make_cmd.h subst.h sig.h pathnames.h externs.h bracecomp.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h command.h hashlib.h builtins.h general.h xmalloc.h bracecomp.o: quit.h alias.h config.h variables.h arrayfunc.h conftypes.h --- 1082,1086 ---- bracecomp.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h bracecomp.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! bracecomp.o: make_cmd.h subst.h sig.h pathnames.h externs.h bracecomp.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h command.h hashlib.h builtins.h general.h xmalloc.h bracecomp.o: quit.h alias.h config.h variables.h arrayfunc.h conftypes.h *************** *** 1060,1063 **** --- 1112,1145 ---- variables.o: $(TILDE_LIBSRC)/tilde.h + # libintl dependencies + arrayfunc.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + bashhist.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + bashline.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + braces.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + error.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + eval.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + execute_cmd.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + expr.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + general.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + input.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + jobs.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + mailcheck.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + make_cmd.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + nojobs.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + parse.y: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + pcomplete.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + pcomplib.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + print_cmd.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + redir.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + shell.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + sig.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + siglist.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + subst.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + test.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + trap.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + variables.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + version.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + xmalloc.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + # XXX - dependencies checked through here *************** *** 1066,1070 **** builtins/bashgetopt.o: shell.h syntax.h config.h bashjmp.h command.h general.h xmalloc.h error.h builtins/bashgetopt.o: variables.h arrayfunc.h conftypes.h quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! builtins/bashgetopt.o: make_cmd.h subst.h sig.h pathnames.h externs.h builtins/bashgetopt.o: $(DEFSRC)/common.h builtins/bashgetopt.o: ${BASHINCDIR}/chartypes.h --- 1148,1152 ---- builtins/bashgetopt.o: shell.h syntax.h config.h bashjmp.h command.h general.h xmalloc.h error.h builtins/bashgetopt.o: variables.h arrayfunc.h conftypes.h quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! builtins/bashgetopt.o: make_cmd.h subst.h sig.h pathnames.h externs.h builtins/bashgetopt.o: $(DEFSRC)/common.h builtins/bashgetopt.o: ${BASHINCDIR}/chartypes.h *************** *** 1073,1077 **** builtins/common.o: ${BASHINCDIR}/memalloc.h variables.h arrayfunc.h conftypes.h input.h siglist.h builtins/common.o: quit.h unwind_prot.h ${BASHINCDIR}/maxpath.h jobs.h builtins.h ! builtins/common.o: dispose_cmd.h make_cmd.h subst.h externs.h bashhist.h builtins/common.o: execute_cmd.h ${BASHINCDIR}/stdc.h general.h xmalloc.h error.h pathnames.h builtins/common.o: ${DEFDIR}/builtext.h --- 1155,1159 ---- builtins/common.o: ${BASHINCDIR}/memalloc.h variables.h arrayfunc.h conftypes.h input.h siglist.h builtins/common.o: quit.h unwind_prot.h ${BASHINCDIR}/maxpath.h jobs.h builtins.h ! builtins/common.o: dispose_cmd.h make_cmd.h subst.h externs.h bashhist.h builtins/common.o: execute_cmd.h ${BASHINCDIR}/stdc.h general.h xmalloc.h error.h pathnames.h builtins/common.o: ${DEFDIR}/builtext.h *************** *** 1080,1084 **** builtins/evalfile.o: shell.h syntax.h config.h bashjmp.h command.h general.h xmalloc.h error.h builtins/evalfile.o: variables.h arrayfunc.h conftypes.h quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! builtins/evalfile.o: make_cmd.h subst.h sig.h pathnames.h externs.h builtins/evalfile.o: jobs.h builtins.h flags.h input.h execute_cmd.h builtins/evalfile.o: bashhist.h $(DEFSRC)/common.h --- 1162,1166 ---- builtins/evalfile.o: shell.h syntax.h config.h bashjmp.h command.h general.h xmalloc.h error.h builtins/evalfile.o: variables.h arrayfunc.h conftypes.h quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! builtins/evalfile.o: make_cmd.h subst.h sig.h pathnames.h externs.h builtins/evalfile.o: jobs.h builtins.h flags.h input.h execute_cmd.h builtins/evalfile.o: bashhist.h $(DEFSRC)/common.h *************** *** 1093,1097 **** builtins/getopt.o: shell.h syntax.h bashjmp.h command.h general.h xmalloc.h error.h builtins/getopt.o: variables.h arrayfunc.h conftypes.h quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! builtins/getopt.o: make_cmd.h subst.h sig.h pathnames.h externs.h builtins/getopt.o: $(DEFSRC)/getopt.h builtins/mkbuiltins.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h --- 1175,1179 ---- builtins/getopt.o: shell.h syntax.h bashjmp.h command.h general.h xmalloc.h error.h builtins/getopt.o: variables.h arrayfunc.h conftypes.h quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h ! builtins/getopt.o: make_cmd.h subst.h sig.h pathnames.h externs.h builtins/getopt.o: $(DEFSRC)/getopt.h builtins/mkbuiltins.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h *************** *** 1114,1117 **** --- 1196,1205 ---- builtins/builtin.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h builtins/builtin.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h + builtins/caller.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h + builtins/caller.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h + builtins/caller.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h + builtins/caller.o: $(DEFSRC)/common.h quit.h + builtins/caller.o: ${BASHINCDIR}/chartypes.h bashtypes.h + builtins/caller.o: ${DEFDIR}/builtext.h builtins/cd.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h builtins/cd.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h *************** *** 1132,1145 **** builtins/enable.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h builtins/enable.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h ! builtins/enable.o: pcomplete.h builtins/eval.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h builtins/eval.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h builtins/eval.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h ! builtins/exec.o: bashtypes.h builtins/exec.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h builtins/exec.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h ! builtins/exec.o: dispose_cmd.h make_cmd.h subst.h externs.h execute_cmd.h builtins/exec.o: findcmd.h flags.h quit.h $(DEFSRC)/common.h ${BASHINCDIR}/stdc.h ! builtins/exit.o: bashtypes.h builtins/exit.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h builtins/exit.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h --- 1220,1233 ---- builtins/enable.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h builtins/enable.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h ! builtins/enable.o: pcomplete.h builtins/eval.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h builtins/eval.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h builtins/eval.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h ! builtins/exec.o: bashtypes.h builtins/exec.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h builtins/exec.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h ! builtins/exec.o: dispose_cmd.h make_cmd.h subst.h externs.h execute_cmd.h builtins/exec.o: findcmd.h flags.h quit.h $(DEFSRC)/common.h ${BASHINCDIR}/stdc.h ! builtins/exit.o: bashtypes.h builtins/exit.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h builtins/exit.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h *************** *** 1152,1156 **** builtins/fc.o: $(DEFSRC)/bashgetopt.h bashhist.h builtins/fc.o: ${BASHINCDIR}/chartypes.h ! builtins/fg_bg.o: bashtypes.h $(DEFSRC)/bashgetopt.h builtins/fg_bg.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h builtins/fg_bg.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h --- 1240,1244 ---- builtins/fc.o: $(DEFSRC)/bashgetopt.h bashhist.h builtins/fc.o: ${BASHINCDIR}/chartypes.h ! builtins/fg_bg.o: bashtypes.h $(DEFSRC)/bashgetopt.h builtins/fg_bg.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h builtins/fg_bg.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h *************** *** 1159,1163 **** builtins/getopts.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h builtins/getopts.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h ! builtins/hash.o: bashtypes.h builtins/hash.o: builtins.h command.h findcmd.h ${BASHINCDIR}/stdc.h $(DEFSRC)/common.h builtins/hash.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h --- 1247,1251 ---- builtins/getopts.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h builtins/getopts.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h ! builtins/hash.o: bashtypes.h builtins/hash.o: builtins.h command.h findcmd.h ${BASHINCDIR}/stdc.h $(DEFSRC)/common.h builtins/hash.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h *************** *** 1166,1171 **** builtins/help.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h builtins/help.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h ! builtins/help.o: $(GLOB_LIBSRC)/glob.h version.h ! builtins/history.o: bashtypes.h builtins/history.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h builtins/history.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h --- 1254,1259 ---- builtins/help.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h builtins/help.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h ! builtins/help.o: $(GLOB_LIBSRC)/glob.h ! builtins/history.o: bashtypes.h builtins/history.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h builtins/history.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h *************** *** 1218,1222 **** builtins/source.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h builtins/source.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h ! builtins/source.o: findcmd.h $(DEFSRC)/bashgetopt.h builtins/suspend.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h builtins/suspend.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h --- 1306,1310 ---- builtins/source.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h builtins/source.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h ! builtins/source.o: findcmd.h $(DEFSRC)/bashgetopt.h flags.h trap.h builtins/suspend.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h builtins/suspend.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h *************** *** 1225,1229 **** builtins/test.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h builtins/test.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h ! builtins/test.o: test.h builtins/times.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h builtins/times.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h --- 1313,1317 ---- builtins/test.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h builtins/test.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h ! builtins/test.o: test.h builtins/times.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h builtins/times.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h *************** *** 1252,1259 **** builtins/complete.o: unwind_prot.h variables.h arrayfunc.h conftypes.h builtins/complete.o: bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h ! builtins/complete.o: builtins.h builtins/complete.o: pcomplete.h builtins/complete.o: ${DEFSRC}/common.h ${DEFSRC}/bashgetopt.h # builtin library dependencies builtins/bind.o: $(RL_LIBSRC)/chardefs.h $(RL_LIBSRC)/readline.h --- 1340,1384 ---- builtins/complete.o: unwind_prot.h variables.h arrayfunc.h conftypes.h builtins/complete.o: bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h ! builtins/complete.o: builtins.h builtins/complete.o: pcomplete.h builtins/complete.o: ${DEFSRC}/common.h ${DEFSRC}/bashgetopt.h + # libintl dependencies + builtins/bind.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/break.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/caller.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/cd.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/common.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/complete.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/declare.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/enable.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/evalfile.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/exec.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/exit.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/fc.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/fg_bg.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/getopt.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/hash.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/help.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/history.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/inlib.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/jobs.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/kill.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/let.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/mkbuiltins.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/printf.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/pushd.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/read.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/return.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/set.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/setattr.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/shift.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/shopt.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/source.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/suspend.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/type.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/ulimit.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + builtins/umask.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + # builtin library dependencies builtins/bind.o: $(RL_LIBSRC)/chardefs.h $(RL_LIBSRC)/readline.h *************** *** 1271,1274 **** --- 1396,1400 ---- builtins/break.o: $(DEFSRC)/break.def builtins/builtin.o: $(DEFSRC)/builtin.def + builtins/caller.o: $(DEFSRC)/caller.def builtins/cd.o: $(DEFSRC)/cd.def builtins/colon.o: $(DEFSRC)/colon.def diff -aNrc2 bash-2.05b-patched/NEWS bash-3.0/NEWS *** bash-2.05b-patched/NEWS Tue Jul 2 14:53:13 2002 --- bash-3.0/NEWS Fri Jul 2 18:57:20 2004 *************** *** 1,2 **** --- 1,196 ---- + This is a terse description of the new features added to bash-3.0 since + the release of bash-2.05b. As always, the manual page (doc/bash.1) is + the place to look for complete descriptions. + + 1. New Features in Bash + + a. ANSI string expansion now implements the \x{hexdigits} escape. + + b. There is a new loadable `strftime' builtin. + + c. New variable, COMP_WORDBREAKS, which controls the readline completer's + idea of word break characters. + + d. The `type' builtin no longer reports on aliases unless alias expansion + will actually be performed. + + e. HISTCONTROL is now a colon-separated list of values, which permits + more extensibility and backwards compatibility. + + f. HISTCONTROL may now include the `erasedups' option, which causes all lines + matching a line being added to be removed from the history list. + + g. `configure' has a new `--enable-multibyte' argument that permits multibyte + character support to be disabled even on systems that support it. + + h. New variables to support the bash debugger: BASH_ARGC, BASH_ARGV, + BASH_SOURCE, BASH_LINENO, BASH_SUBSHELL, BASH_EXECUTION_STRING, + BASH_COMMAND + + i. FUNCNAME has been changed to support the debugger: it's now an array + variable. + + j. for, case, select, arithmetic commands now keep line number information + for the debugger. + + k. There is a new `RETURN' trap executed when a function or sourced script + returns (not inherited child processes; inherited by command substitution + if function tracing is enabled and the debugger is active). + + l. New invocation option: --debugger. Enables debugging and turns on new + `extdebug' shell option. + + m. New `functrace' and `errtrace' options to `set -o' cause DEBUG and ERR + traps, respectively, to be inherited by shell functions. Equivalent to + `set -T' and `set -E' respectively. The `functrace' option also controls + whether or not the DEBUG trap is inherited by sourced scripts. + + n. The DEBUG trap is run before binding the variable and running the action + list in a `for' command, binding the selection variable and running the + query in a `select' command, and before attempting a match in a `case' + command. + + o. New `--enable-debugger' option to `configure' to compile in the debugger + support code. + + p. `declare -F' now prints out extra line number and source file information + if the `extdebug' option is set. + + q. If `extdebug' is enabled, a non-zero return value from a DEBUG trap causes + the next command to be skipped, and a return value of 2 while in a + function or sourced script forces a `return'. + + r. New `caller' builtin to provide a call stack for the bash debugger. + + s. The DEBUG trap is run just before the first command in a function body is + executed, for the debugger. + + t. `for', `select', and `case' command heads are printed when `set -x' is + enabled. + + u. There is a new {x..y} brace expansion, which is shorthand for {x.x+1, + x+2,...,y}. x and y can be integers or single characters; the sequence + may ascend or descend; the increment is always 1. + + v. New ksh93-like ${!array[@]} expansion, expands to all the keys (indices) + of array. + + w. New `force_fignore' shopt option; if enabled, suffixes specified by + FIGNORE cause words to be ignored when performing word completion even + if they're the only possibilities. + + x. New `gnu_errfmt' shopt option; if enabled, error messages follow the `gnu + style' (filename:lineno:message) format. + + y. New `-o bashdefault' option to complete and compgen; if set, causes the + whole set of bash completions to be performed if the compspec doesn't + result in a match. + + z. New `-o plusdirs' option to complete and compgen; if set, causes directory + name completion to be performed and the results added to the rest of the + possible completions. + + aa. `kill' is available as a builtin even when the shell is built without + job control. + + bb. New HISTTIMEFORMAT variable; value is a format string to pass to + strftime(3). If set and not null, the `history' builtin prints out + timestamp information according to the specified format when displaying + history entries. If set, bash tells the history library to write out + timestamp information when the history file is written. + + cc. The [[ ... ]] command has a new binary `=~' operator that performs + extended regular expression (egrep-like) matching. + + dd. `configure' has a new `--enable-cond-regexp' option (enabled by default) + to enable the =~ operator and regexp matching in [[ ... ]]. + + ee. Subexpressions matched by the =~ operator are placed in the new + BASH_REMATCH array variable. + + ff. New `failglob' option that causes an expansion error when pathname + expansion fails to produce a match. + + gg. New `set -o pipefail' option that causes a pipeline to return a failure + status if any of the processes in the pipeline fail, not just the last + one. + + hh. printf builtin understands two new escape sequences: \" and \?. + + ii. `echo -e' understands two new escape sequences: \" and \?. + + jj. The GNU `gettext' package and libintl have been integrated; the shell's + messages can be translated into different languages. + + kk. The `\W' prompt expansion now abbreviates $HOME as `~', like `\w'. + + ll. The error message printed when bash cannot open a shell script supplied + as argument 1 now includes the name of the shell, to better identify + the error as coming from bash. + + mm. The parameter pattern removal and substitution expansions are now much + faster and more efficient when using multibyte characters. + + nn. The `jobs', `kill', and `wait' builtins now accept job control notation + even if job control is not enabled. + + oo. The historical behavior of `trap' that allows a missing `action' argument + to cause each specified signal's handling to be reset to its default is + now only supported when `trap' is given a single non-option argument. + + 2. New Features in Readline + + a. History expansion has a new `a' modifier equivalent to the `g' modifier + for compatibility with the BSD csh. + + b. History expansion has a new `G' modifier equivalent to the BSD csh `g' + modifier, which performs a substitution once per word. + + c. All non-incremental search operations may now undo the operation of + replacing the current line with the history line. + + d. The text inserted by an `a' command in vi mode can be reinserted with + `.'. + + e. New bindable variable, `show-all-if-unmodified'. If set, the readline + completer will list possible completions immediately if there is more + than one completion and partial completion cannot be performed. + + f. There is a new application-callable `free_history_entry()' function. + + g. History list entries now contain timestamp information; the history file + functions know how to read and write timestamp information associated + with each entry. + + h. Four new key binding functions have been added: + + rl_bind_key_if_unbound() + rl_bind_key_if_unbound_in_map() + rl_bind_keyseq_if_unbound() + rl_bind_keyseq_if_unbound_in_map() + + i. New application variable, rl_completion_quote_character, set to any + quote character readline finds before it calls the application completion + function. + + j. New application variable, rl_completion_suppress_quote, settable by an + application completion function. If set to non-zero, readline does not + attempt to append a closing quote to a completed word. + + k. New application variable, rl_completion_found_quote, set to a non-zero + value if readline determines that the word to be completed is quoted. + Set before readline calls any application completion function. + + l. New function hook, rl_completion_word_break_hook, called when readline + needs to break a line into words when completion is attempted. Allows + the word break characters to vary based on position in the line. + + m. New bindable command: unix-filename-rubout. Does the same thing as + unix-word-rubout, but adds `/' to the set of word delimiters. + + n. When listing completions, directories have a `/' appended if the + `mark-directories' option has been enabled. + + ------------------------------------------------------------------------------- This is a terse description of the new features added to bash-2.05b since the release of bash-2.05a. As always, the manual page (doc/bash.1) is diff -aNrc2 bash-2.05b-patched/NOTES bash-3.0/NOTES *** bash-2.05b-patched/NOTES Wed Jun 26 17:36:58 2002 --- bash-3.0/NOTES Tue Oct 14 11:27:37 2003 *************** *** 325,326 **** --- 325,329 ---- 15. Configure with `CC=xlc' if you don't have gcc on AIX 4.2 and later versions. `xlc' running in `cc' mode has trouble compiling error.c. + + 16. Configure --disable-multibyte on NetBSD versions (1.4 through at least + 1.6.1) that include wctype.h but do not define wctype_t. diff -aNrc2 bash-2.05b-patched/POSIX bash-3.0/POSIX *** bash-2.05b-patched/POSIX Wed Jun 26 17:08:57 2002 --- bash-3.0/POSIX Tue Jul 27 09:24:05 2004 *************** *** 30,47 **** setting of the `promptvars' option. ! 6. Interactive comments are enabled by default. (Bash has them on by ! default anyway.) ! ! 7. The POSIX 1003.2 startup files are executed (`$ENV') rather than the normal Bash files. ! 8. Tilde expansion is only performed on assignments preceding a command name, rather than on all assignment statements on the line. ! 9. The default history file is `~/.sh_history' (this is the default value of `$HISTFILE'). ! 10. The output of `kill -l' prints all the signal names on a single ! line, separated by spaces. 11. Non-interactive shells exit if FILENAME in `.' FILENAME is not --- 30,47 ---- setting of the `promptvars' option. ! 6. The POSIX 1003.2 startup files are executed (`$ENV') rather than the normal Bash files. ! 7. Tilde expansion is only performed on assignments preceding a command name, rather than on all assignment statements on the line. ! 8. The default history file is `~/.sh_history' (this is the default value of `$HISTFILE'). ! 9. The output of `kill -l' prints all the signal names on a single ! line, separated by spaces, without the `SIG' prefix. ! ! 10. The `kill' builtin does not accept signal names with a `SIG' ! prefix. 11. Non-interactive shells exit if FILENAME in `.' FILENAME is not *************** *** 104,124 **** 26. The `trap' builtin displays signal names without the leading `SIG'. ! 27. The `.' and `source' builtins do not search the current directory for the filename argument if it is not found by searching `PATH'. ! 28. Subshells spawned to execute command substitutions inherit the value of the `-e' option from the parent shell. When not in POSIX mode, Bash clears the `-e' option in such subshells. ! 29. Alias expansion is always enabled, even in non-interactive shells. ! 30. When the `set' builtin is invoked without options, it does not display shell function names and definitions. ! 31. When the `set' builtin is invoked without options, it displays variable values without quotes, unless they contain shell metacharacters, even if the result contains nonprinting characters. ! 32. When the `cd' builtin is invoked in LOGICAL mode, and the pathname constructed from `$PWD' and the directory name supplied as an argument does not refer to an existing directory, `cd' will fail --- 104,134 ---- 26. The `trap' builtin displays signal names without the leading `SIG'. ! 27. The `trap' builtin doesn't check the first argument for a possible ! signal specification and revert the signal handling to the original ! disposition if it is. If users want to reset the handler for a ! given signal to the original disposition, they should use `-' as ! the first argument. ! ! 28. The `.' and `source' builtins do not search the current directory for the filename argument if it is not found by searching `PATH'. ! 29. Subshells spawned to execute command substitutions inherit the value of the `-e' option from the parent shell. When not in POSIX mode, Bash clears the `-e' option in such subshells. ! 30. Alias expansion is always enabled, even in non-interactive shells. ! ! 31. When the `alias' builtin displays alias definitions, it does not ! display them with a leading `alias ' unless the `-p' option is ! supplied. ! 32. When the `set' builtin is invoked without options, it does not display shell function names and definitions. ! 33. When the `set' builtin is invoked without options, it displays variable values without quotes, unless they contain shell metacharacters, even if the result contains nonprinting characters. ! 34. When the `cd' builtin is invoked in LOGICAL mode, and the pathname constructed from `$PWD' and the directory name supplied as an argument does not refer to an existing directory, `cd' will fail diff -aNrc2 bash-2.05b-patched/README bash-3.0/README *** bash-2.05b-patched/README Thu Apr 4 11:02:55 2002 --- bash-3.0/README Fri Jul 16 21:24:37 2004 *************** *** 2,6 **** ============ ! This is GNU Bash, version 2.05b. Bash is the GNU Project's Bourne Again SHell, a complete implementation of the POSIX.2 shell spec, but also with interactive command line editing, job control on --- 2,6 ---- ============ ! This is GNU Bash, version 3.0. Bash is the GNU Project's Bourne Again SHell, a complete implementation of the POSIX.2 shell spec, but also with interactive command line editing, job control on *************** *** 12,20 **** of the shell's features. ! See the file CWRU/POSIX.NOTES for a discussion of how Bash differs from the POSIX.2 spec and a description of the Bash `posix mode'. There are some user-visible incompatibilities between this version ! of Bash and the previous widely-distributed version, bash-1.14. For details, see the file COMPAT. The NEWS file tersely lists features that are new in this release. --- 12,20 ---- of the shell's features. ! See the file POSIX for a discussion of how the Bash defaults differ from the POSIX.2 spec and a description of the Bash `posix mode'. There are some user-visible incompatibilities between this version ! of Bash and a previous widely-distributed version, bash-1.14. For details, see the file COMPAT. The NEWS file tersely lists features that are new in this release. diff -aNrc2 bash-2.05b-patched/Y2K bash-3.0/Y2K *** bash-2.05b-patched/Y2K Tue Jan 26 16:57:06 1999 --- bash-3.0/Y2K Sat Jan 10 20:16:08 2004 *************** *** 2,5 **** The only thing that Bash does with date strings is manipulate the string ! returned by ctime(3) in the prompt customization code. In all cases, ! it discards the year. --- 2,4 ---- The only thing that Bash does with date strings is manipulate the string ! returned by ctime(3) or strftime(3) in the prompt customization code. diff -aNrc2 bash-2.05b-patched/aclocal.m4 bash-3.0/aclocal.m4 *** bash-2.05b-patched/aclocal.m4 Tue Jun 25 09:45:43 2002 --- bash-3.0/aclocal.m4 Thu May 13 13:37:25 2004 *************** *** 686,691 **** AC_DEFUN(BASH_FUNC_GETCWD, ! [AC_MSG_CHECKING([if getcwd() calls popen()]) ! AC_CACHE_VAL(bash_cv_getcwd_calls_popen, [AC_TRY_RUN([ #include --- 686,691 ---- AC_DEFUN(BASH_FUNC_GETCWD, ! [AC_MSG_CHECKING([if getcwd() will dynamically allocate memory]) ! AC_CACHE_VAL(bash_cv_getcwd_malloc, [AC_TRY_RUN([ #include *************** *** 694,748 **** #endif - #ifndef __STDC__ - #ifndef const - #define const - #endif - #endif - - int popen_called; - - FILE * - popen(command, type) - const char *command; - const char *type; - { - popen_called = 1; - return (FILE *)NULL; - } - - FILE *_popen(command, type) - const char *command; - const char *type; - { - return (popen (command, type)); - } - - int - pclose(stream) - FILE *stream; - { - return 0; - } - - int - _pclose(stream) - FILE *stream; - { - return 0; - } - main() { ! char lbuf[32]; ! popen_called = 0; ! getcwd(lbuf, 32); ! exit (popen_called); } ! ], bash_cv_getcwd_calls_popen=no, bash_cv_getcwd_calls_popen=yes, ! [AC_MSG_WARN(cannot check whether getcwd calls popen if cross compiling -- defaulting to no) ! bash_cv_getcwd_calls_popen=no] )]) ! AC_MSG_RESULT($bash_cv_getcwd_calls_popen) ! if test $bash_cv_getcwd_calls_popen = yes; then AC_DEFINE(GETCWD_BROKEN) AC_LIBOBJ(getcwd) --- 694,709 ---- #endif main() { ! char *xpwd; ! xpwd = getcwd(0, 0); ! exit (xpwd == 0); } ! ], bash_cv_getcwd_malloc=yes, bash_cv_getcwd_malloc=no, ! [AC_MSG_WARN(cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no) ! bash_cv_getcwd_malloc=no] )]) ! AC_MSG_RESULT($bash_cv_getcwd_malloc) ! if test $bash_cv_getcwd_malloc = no; then AC_DEFINE(GETCWD_BROKEN) AC_LIBOBJ(getcwd) *************** *** 982,990 **** fi AC_CACHE_VAL(bash_cv_termcap_lib, ! [AC_CHECK_LIB(termcap, tgetent, bash_cv_termcap_lib=libtermcap, [AC_CHECK_LIB(tinfo, tgetent, bash_cv_termcap_lib=libtinfo, [AC_CHECK_LIB(curses, tgetent, bash_cv_termcap_lib=libcurses, [AC_CHECK_LIB(ncurses, tgetent, bash_cv_termcap_lib=libncurses, ! bash_cv_termcap_lib=gnutermcap)])])])]) if test "X$_bash_needmsg" = "Xyes"; then AC_MSG_CHECKING(which library has the termcap functions) --- 943,952 ---- fi AC_CACHE_VAL(bash_cv_termcap_lib, ! [AC_CHECK_FUNC(tgetent, bash_cv_termcap_lib=libc, ! [AC_CHECK_LIB(termcap, tgetent, bash_cv_termcap_lib=libtermcap, [AC_CHECK_LIB(tinfo, tgetent, bash_cv_termcap_lib=libtinfo, [AC_CHECK_LIB(curses, tgetent, bash_cv_termcap_lib=libcurses, [AC_CHECK_LIB(ncurses, tgetent, bash_cv_termcap_lib=libncurses, ! bash_cv_termcap_lib=gnutermcap)])])])])]) if test "X$_bash_needmsg" = "Xyes"; then AC_MSG_CHECKING(which library has the termcap functions) *************** *** 1004,1007 **** --- 966,972 ---- TERMCAP_LIB=-lncurses TERMCAP_DEP= + elif test $bash_cv_termcap_lib = libc; then + TERMCAP_LIB= + TERMCAP_DEP= else TERMCAP_LIB=-lcurses *************** *** 1062,1066 **** AC_DEFUN(BASH_STRUCT_DIRENT_D_INO, [AC_REQUIRE([AC_HEADER_DIRENT]) ! AC_MSG_CHECKING(if struct dirent has a d_ino member) AC_CACHE_VAL(bash_cv_dirent_has_dino, [AC_TRY_COMPILE([ --- 1027,1031 ---- AC_DEFUN(BASH_STRUCT_DIRENT_D_INO, [AC_REQUIRE([AC_HEADER_DIRENT]) ! AC_MSG_CHECKING(for struct dirent.d_ino) AC_CACHE_VAL(bash_cv_dirent_has_dino, [AC_TRY_COMPILE([ *************** *** 1089,1093 **** AC_MSG_RESULT($bash_cv_dirent_has_dino) if test $bash_cv_dirent_has_dino = yes; then ! AC_DEFINE(STRUCT_DIRENT_HAS_D_INO) fi ]) --- 1054,1058 ---- AC_MSG_RESULT($bash_cv_dirent_has_dino) if test $bash_cv_dirent_has_dino = yes; then ! AC_DEFINE(HAVE_STRUCT_DIRENT_D_INO) fi ]) *************** *** 1095,1099 **** AC_DEFUN(BASH_STRUCT_DIRENT_D_FILENO, [AC_REQUIRE([AC_HEADER_DIRENT]) ! AC_MSG_CHECKING(if struct dirent has a d_fileno member) AC_CACHE_VAL(bash_cv_dirent_has_d_fileno, [AC_TRY_COMPILE([ --- 1060,1064 ---- AC_DEFUN(BASH_STRUCT_DIRENT_D_FILENO, [AC_REQUIRE([AC_HEADER_DIRENT]) ! AC_MSG_CHECKING(for struct dirent.d_fileno) AC_CACHE_VAL(bash_cv_dirent_has_d_fileno, [AC_TRY_COMPILE([ *************** *** 1122,1126 **** AC_MSG_RESULT($bash_cv_dirent_has_d_fileno) if test $bash_cv_dirent_has_d_fileno = yes; then ! AC_DEFINE(STRUCT_DIRENT_HAS_D_FILENO) fi ]) --- 1087,1124 ---- AC_MSG_RESULT($bash_cv_dirent_has_d_fileno) if test $bash_cv_dirent_has_d_fileno = yes; then ! AC_DEFINE(HAVE_STRUCT_DIRENT_D_FILENO) ! fi ! ]) ! ! AC_DEFUN(BASH_STRUCT_DIRENT_D_NAMLEN, ! [AC_REQUIRE([AC_HEADER_DIRENT]) ! AC_MSG_CHECKING(for struct dirent.d_namlen) ! AC_CACHE_VAL(bash_cv_dirent_has_d_namlen, ! [AC_TRY_COMPILE([ ! #include ! #include ! #ifdef HAVE_UNISTD_H ! # include ! #endif /* HAVE_UNISTD_H */ ! #if defined(HAVE_DIRENT_H) ! # include ! #else ! # define dirent direct ! # ifdef HAVE_SYS_NDIR_H ! # include ! # endif /* SYSNDIR */ ! # ifdef HAVE_SYS_DIR_H ! # include ! # endif /* SYSDIR */ ! # ifdef HAVE_NDIR_H ! # include ! # endif ! #endif /* HAVE_DIRENT_H */ ! ],[ ! struct dirent d; int z; z = d.d_namlen; ! ], bash_cv_dirent_has_d_namlen=yes, bash_cv_dirent_has_d_namlen=no)]) ! AC_MSG_RESULT($bash_cv_dirent_has_d_namlen) ! if test $bash_cv_dirent_has_d_namlen = yes; then ! AC_DEFINE(HAVE_STRUCT_DIRENT_D_NAMLEN) fi ]) *************** *** 1142,1145 **** --- 1140,1159 ---- ]) + AC_DEFUN(BASH_STRUCT_TIMEZONE, + [AC_MSG_CHECKING(for struct timezone in sys/time.h and time.h) + AC_CACHE_VAL(bash_cv_struct_timezone, + [ + AC_EGREP_HEADER(struct timezone, sys/time.h, + bash_cv_struct_timezone=yes, + AC_EGREP_HEADER(struct timezone, time.h, + bash_cv_struct_timezone=yes, + bash_cv_struct_timezone=no)) + ]) + AC_MSG_RESULT($bash_cv_struct_timezone) + if test $bash_cv_struct_timezone = yes; then + AC_DEFINE(HAVE_STRUCT_TIMEZONE) + fi + ]) + AC_DEFUN(BASH_STRUCT_WINSIZE, [AC_MSG_CHECKING(for struct winsize in sys/ioctl.h and termios.h) *************** *** 1527,1533 **** [AC_MSG_CHECKING(whether /dev/fd is available) AC_CACHE_VAL(bash_cv_dev_fd, ! [if test -d /dev/fd && test -r /dev/fd/0; then bash_cv_dev_fd=standard ! elif test -d /proc/self/fd && test -r /proc/self/fd/0; then bash_cv_dev_fd=whacky else --- 1541,1547 ---- [AC_MSG_CHECKING(whether /dev/fd is available) AC_CACHE_VAL(bash_cv_dev_fd, ! [if test -d /dev/fd && test -r /dev/fd/0 < /dev/null; then bash_cv_dev_fd=standard ! elif test -d /proc/self/fd && test -r /proc/self/fd/0 < /dev/null; then bash_cv_dev_fd=whacky else *************** *** 1548,1554 **** [AC_MSG_CHECKING(whether /dev/stdin stdout stderr are available) AC_CACHE_VAL(bash_cv_dev_stdin, ! [if test -d /dev/fd && test -r /dev/stdin; then bash_cv_dev_stdin=present ! elif test -d /proc/self/fd && test -r /dev/stdin; then bash_cv_dev_stdin=present else --- 1562,1568 ---- [AC_MSG_CHECKING(whether /dev/stdin stdout stderr are available) AC_CACHE_VAL(bash_cv_dev_stdin, ! [if test -d /dev/fd && test -r /dev/stdin < /dev/null; then bash_cv_dev_stdin=present ! elif test -d /proc/self/fd && test -r /dev/stdin < /dev/null; then bash_cv_dev_stdin=present else *************** *** 1654,1668 **** AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS)) AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH)) AC_CACHE_CHECK([for mbstate_t], bash_cv_have_mbstate_t, ! [AC_TRY_RUN([ ! #include ! int ! main () ! { mbstate_t ps; ! return 0; ! }], bash_cv_have_mbstate_t=yes, bash_cv_have_mbstate_t=no)]) if test $bash_cv_have_mbstate_t = yes; then AC_DEFINE(HAVE_MBSTATE_T) --- 1668,1684 ---- AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS)) + AC_CHECK_FUNC(mbrtowc, AC_DEFINE(HAVE_MBRTOWC)) + AC_CHECK_FUNC(mbrlen, AC_DEFINE(HAVE_MBRLEN)) + AC_CHECK_FUNC(wctomb, AC_DEFINE(HAVE_WCTOMB)) AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH)) + AC_CHECK_FUNC(wcsdup, AC_DEFINE(HAVE_WCSDUP)) AC_CACHE_CHECK([for mbstate_t], bash_cv_have_mbstate_t, ! [AC_TRY_COMPILE([ ! #include ], [ mbstate_t ps; ! mbstate_t *psp; ! psp = (mbstate_t *)0; ! ], bash_cv_have_mbstate_t=yes, bash_cv_have_mbstate_t=no)]) if test $bash_cv_have_mbstate_t = yes; then AC_DEFINE(HAVE_MBSTATE_T) *************** *** 1713,1717 **** LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}" ! AC_TRY_RUN([ #include #include --- 1729,1734 ---- LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}" ! AC_CACHE_VAL(ac_cv_rl_version, ! [AC_TRY_RUN([ #include #include *************** *** 1729,1733 **** ac_cv_rl_version=`cat conftest.rlv`, ac_cv_rl_version='0.0', ! ac_cv_rl_version='4.2') CFLAGS="$_save_CFLAGS" --- 1746,1750 ---- ac_cv_rl_version=`cat conftest.rlv`, ac_cv_rl_version='0.0', ! ac_cv_rl_version='4.2')]) CFLAGS="$_save_CFLAGS" *************** *** 1790,1792 **** --- 1807,3913 ---- fi + ]) + + AC_DEFUN(BASH_FUNC_CTYPE_NONASCII, + [ + AC_MSG_CHECKING(whether the ctype macros accept non-ascii characters) + AC_CACHE_VAL(bash_cv_func_ctype_nonascii, + [AC_TRY_RUN([ + #ifdef HAVE_LOCALE_H + #include + #endif + #include + #include + + main(c, v) + int c; + char *v[]; + { + char *deflocale; + unsigned char x; + int r1, r2; + + #ifdef HAVE_SETLOCALE + /* We take a shot here. If that locale is not known, try the + system default. We try this one because '\342' (226) is + known to be a printable character in that locale. */ + deflocale = setlocale(LC_ALL, "en_US.ISO8859-1"); + if (deflocale == 0) + deflocale = setlocale(LC_ALL, ""); + #endif + + x = '\342'; + r1 = isprint(x); + x -= 128; + r2 = isprint(x); + exit (r1 == 0 || r2 == 0); + } + ], bash_cv_func_ctype_nonascii=yes, bash_cv_func_ctype_nonascii=no, + [AC_MSG_WARN(cannot check ctype macros if cross compiling -- defaulting to no) + bash_cv_func_ctype_nonascii=no] + )]) + AC_MSG_RESULT($bash_cv_func_ctype_nonascii) + if test $bash_cv_func_ctype_nonascii = yes; then + AC_DEFINE(CTYPE_NON_ASCII) + fi + ]) + + dnl + dnl tests added for bashdb + dnl + + + AC_DEFUN([AM_PATH_LISPDIR], + [AC_ARG_WITH(lispdir, AC_HELP_STRING([--with-lispdir], [override the default lisp directory]), + [ lispdir="$withval" + AC_MSG_CHECKING([where .elc files should go]) + AC_MSG_RESULT([$lispdir])], + [ + # If set to t, that means we are running in a shell under Emacs. + # If you have an Emacs named "t", then use the full path. + test x"$EMACS" = xt && EMACS= + AC_CHECK_PROGS(EMACS, emacs xemacs, no) + if test $EMACS != "no"; then + if test x${lispdir+set} != xset; then + AC_CACHE_CHECK([where .elc files should go], [am_cv_lispdir], [dnl + am_cv_lispdir=`$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' | sed -n -e 's,/$,,' -e '/.*\/lib\/\(x\?emacs\/site-lisp\)$/{s,,${libdir}/\1,;p;q;}' -e '/.*\/share\/\(x\?emacs\/site-lisp\)$/{s,,${datadir}/\1,;p;q;}'` + if test -z "$am_cv_lispdir"; then + am_cv_lispdir='${datadir}/emacs/site-lisp' + fi + ]) + lispdir="$am_cv_lispdir" + fi + fi + ]) + AC_SUBST(lispdir) + ]) + + dnl + dnl tests added for gettext + dnl + # codeset.m4 serial AM1 (gettext-0.10.40) + dnl Copyright (C) 2000-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([AM_LANGINFO_CODESET], + [ + AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, + [AC_TRY_LINK([#include ], + [char* cs = nl_langinfo(CODESET);], + am_cv_langinfo_codeset=yes, + am_cv_langinfo_codeset=no) + ]) + if test $am_cv_langinfo_codeset = yes; then + AC_DEFINE(HAVE_LANGINFO_CODESET, 1, + [Define if you have and nl_langinfo(CODESET).]) + fi + ]) + # gettext.m4 serial 20 (gettext-0.12) + 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 + 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 + dnl This file can can be used in projects which are not available under + dnl the GNU General Public License or the GNU Library General Public + dnl License but which still want to provide support for the GNU gettext + dnl functionality. + dnl Please note that the actual code of the GNU gettext library is covered + dnl by the GNU Library General Public License, and the rest of the GNU + dnl gettext package package is covered by the GNU General Public License. + dnl They are *not* in the public domain. + + dnl Authors: + dnl Ulrich Drepper , 1995-2000. + dnl Bruno Haible , 2000-2003. + + dnl Macro to add for using GNU gettext. + + dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). + dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The + dnl default (if it is not specified or empty) is 'no-libtool'. + dnl INTLSYMBOL should be 'external' for packages with no intl directory, + dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. + dnl If INTLSYMBOL is 'use-libtool', then a libtool library + dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, + dnl depending on --{enable,disable}-{shared,static} and on the presence of + dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library + dnl $(top_builddir)/intl/libintl.a will be created. + dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext + dnl implementations (in libc or libintl) without the ngettext() function + dnl will be ignored. If NEEDSYMBOL is specified and is + dnl 'need-formatstring-macros', then GNU gettext implementations that don't + dnl support the ISO C 99 formatstring macros will be ignored. + dnl INTLDIR is used to find the intl libraries. If empty, + dnl the value `$(top_builddir)/intl/' is used. + dnl + dnl The result of the configuration is one of three cases: + dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled + dnl and used. + dnl Catalog format: GNU --> install in $(datadir) + dnl Catalog extension: .mo after installation, .gmo in source tree + dnl 2) GNU gettext has been found in the system's C library. + dnl Catalog format: GNU --> install in $(datadir) + dnl Catalog extension: .mo after installation, .gmo in source tree + dnl 3) No internationalization, always use English msgid. + dnl Catalog format: none + dnl Catalog extension: none + dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. + dnl The use of .gmo is historical (it was needed to avoid overwriting the + dnl GNU format catalogs when building on a platform with an X/Open gettext), + dnl but we keep it in order not to force irrelevant filename changes on the + dnl maintainers. + dnl + AC_DEFUN([AM_GNU_GETTEXT], + [ + dnl Argument checking. + ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , + [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT + ])])])])]) + ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , + [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT + ])])])]) + define(gt_included_intl, ifelse([$1], [external], [no], [yes])) + define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], [])) + + AC_REQUIRE([AM_PO_SUBDIRS])dnl + ifelse(gt_included_intl, yes, [ + AC_REQUIRE([AM_INTL_SUBDIR])dnl + ]) + + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Sometimes libintl requires libiconv, so first search for libiconv. + dnl Ideally we would do this search only after the + dnl if test "$USE_NLS" = "yes"; then + dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then + dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT + dnl the configure script would need to contain the same shell code + dnl again, outside any 'if'. There are two solutions: + dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. + dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. + dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not + dnl documented, we avoid it. + ifelse(gt_included_intl, yes, , [ + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + ]) + + dnl Set USE_NLS. + AM_NLS + + ifelse(gt_included_intl, yes, [ + BUILD_INCLUDED_LIBINTL=no + USE_INCLUDED_LIBINTL=no + ]) + LIBINTL= + LTLIBINTL= + POSUB= + + dnl If we use NLS figure out what method + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + ifelse(gt_included_intl, yes, [ + AC_MSG_CHECKING([whether included gettext is requested]) + AC_ARG_WITH(included-gettext, + [ --with-included-gettext use the GNU gettext library included here], + nls_cv_force_use_gnu_gettext=$withval, + nls_cv_force_use_gnu_gettext=no) + AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + ]) + dnl User does not insist on using GNU NLS library. Figure out what + dnl to use. If GNU gettext is available we use this. Else we have + dnl to fall back to GNU NLS library. + + dnl Add a version number to the cache macros. + define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) + define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) + define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) + + AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, + [AC_TRY_LINK([#include + ]ifelse([$2], [need-formatstring-macros], + [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION + #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) + #endif + changequote(,)dnl + typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; + changequote([,])dnl + ], [])[extern int _nl_msg_cat_cntr; + extern int *_nl_domain_bindings;], + [bindtextdomain ("", ""); + return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], + gt_cv_func_gnugettext_libc=yes, + gt_cv_func_gnugettext_libc=no)]) + + if test "$gt_cv_func_gnugettext_libc" != "yes"; then + dnl Sometimes libintl requires libiconv, so first search for libiconv. + ifelse(gt_included_intl, yes, , [ + AM_ICONV_LINK + ]) + dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL + dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) + dnl because that would add "-liconv" to LIBINTL and LTLIBINTL + dnl even if libiconv doesn't exist. + AC_LIB_LINKFLAGS_BODY([intl]) + AC_CACHE_CHECK([for GNU gettext in libintl], + gt_cv_func_gnugettext_libintl, + [gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + dnl Now see whether libintl exists and does not depend on libiconv. + AC_TRY_LINK([#include + ]ifelse([$2], [need-formatstring-macros], + [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION + #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) + #endif + changequote(,)dnl + typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; + changequote([,])dnl + ], [])[extern int _nl_msg_cat_cntr; + extern + #ifdef __cplusplus + "C" + #endif + const char *_nl_expand_alias ();], + [bindtextdomain ("", ""); + return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], + gt_cv_func_gnugettext_libintl=yes, + gt_cv_func_gnugettext_libintl=no) + dnl Now see whether libintl exists and depends on libiconv. + if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + AC_TRY_LINK([#include + ]ifelse([$2], [need-formatstring-macros], + [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION + #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) + #endif + changequote(,)dnl + typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; + changequote([,])dnl + ], [])[extern int _nl_msg_cat_cntr; + extern + #ifdef __cplusplus + "C" + #endif + const char *_nl_expand_alias ();], + [bindtextdomain ("", ""); + return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], + [LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + gt_cv_func_gnugettext_libintl=yes + ]) + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS"]) + fi + + dnl If an already present or preinstalled GNU gettext() is found, + dnl use it. But if this macro is used in GNU gettext, and GNU + dnl gettext is already preinstalled in libintl, we update this + dnl libintl. (Cf. the install rule in intl/Makefile.in.) + if test "$gt_cv_func_gnugettext_libc" = "yes" \ + || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ + && test "$PACKAGE" != gettext-runtime \ + && test "$PACKAGE" != gettext-tools; }; then + gt_use_preinstalled_gnugettext=yes + else + dnl Reset the values set by searching for libintl. + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + ifelse(gt_included_intl, yes, [ + if test "$gt_use_preinstalled_gnugettext" != "yes"; then + dnl GNU gettext is not found in the C library. + dnl Fall back on included GNU gettext library. + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions used to generate GNU NLS library. + BUILD_INCLUDED_LIBINTL=yes + USE_INCLUDED_LIBINTL=yes + LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV" + LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV" + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions to use GNU gettext tools. + CATOBJEXT=.gmo + fi + ]) + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + AC_DEFINE(ENABLE_NLS, 1, + [Define to 1 if translation of program messages to the user's native language + is requested.]) + else + USE_NLS=no + fi + fi + + AC_MSG_CHECKING([whether to use NLS]) + AC_MSG_RESULT([$USE_NLS]) + if test "$USE_NLS" = "yes"; then + AC_MSG_CHECKING([where the gettext function comes from]) + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if test "$gt_cv_func_gnugettext_libintl" = "yes"; then + gt_source="external libintl" + else + gt_source="libc" + fi + else + gt_source="included intl directory" + fi + AC_MSG_RESULT([$gt_source]) + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if test "$gt_cv_func_gnugettext_libintl" = "yes"; then + AC_MSG_CHECKING([how to link with libintl]) + AC_MSG_RESULT([$LIBINTL]) + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) + fi + + dnl For backward compatibility. Some packages may be using this. + AC_DEFINE(HAVE_GETTEXT, 1, + [Define if the GNU gettext() function is already present or preinstalled.]) + AC_DEFINE(HAVE_DCGETTEXT, 1, + [Define if the GNU dcgettext() function is already present or preinstalled.]) + fi + + dnl We need to process the po/ directory. + POSUB=po + fi + + ifelse(gt_included_intl, yes, [ + dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL + dnl to 'yes' because some of the testsuite requires it. + if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then + BUILD_INCLUDED_LIBINTL=yes + fi + + dnl Make all variables we use known to autoconf. + AC_SUBST(BUILD_INCLUDED_LIBINTL) + AC_SUBST(USE_INCLUDED_LIBINTL) + AC_SUBST(CATOBJEXT) + + dnl For backward compatibility. Some configure.ins may be using this. + nls_cv_header_intl= + nls_cv_header_libgt= + + dnl For backward compatibility. Some Makefiles may be using this. + DATADIRNAME=share + AC_SUBST(DATADIRNAME) + + dnl For backward compatibility. Some Makefiles may be using this. + INSTOBJEXT=.mo + AC_SUBST(INSTOBJEXT) + + dnl For backward compatibility. Some Makefiles may be using this. + GENCAT=gencat + AC_SUBST(GENCAT) + + dnl For backward compatibility. Some Makefiles may be using this. + if test "$USE_INCLUDED_LIBINTL" = yes; then + INTLOBJS="\$(GETTOBJS)" + fi + AC_SUBST(INTLOBJS) + + dnl Enable libtool support if the surrounding package wishes it. + INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix + AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) + ]) + + dnl For backward compatibility. Some Makefiles may be using this. + INTLLIBS="$LIBINTL" + AC_SUBST(INTLLIBS) + + dnl Make all documented variables known to autoconf. + AC_SUBST(LIBINTL) + AC_SUBST(LTLIBINTL) + AC_SUBST(POSUB) + ]) + + + dnl Checks for all prerequisites of the intl subdirectory, + dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, + dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. + AC_DEFUN([AM_INTL_SUBDIR], + [ + AC_REQUIRE([AC_PROG_INSTALL])dnl + AC_REQUIRE([AM_MKINSTALLDIRS])dnl + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl + AC_REQUIRE([AC_PROG_RANLIB])dnl + AC_REQUIRE([AC_ISC_POSIX])dnl + AC_REQUIRE([AC_HEADER_STDC])dnl + AC_REQUIRE([AC_C_CONST])dnl + AC_REQUIRE([AC_C_INLINE])dnl + AC_REQUIRE([AC_TYPE_OFF_T])dnl + AC_REQUIRE([AC_TYPE_SIZE_T])dnl + AC_REQUIRE([AC_FUNC_ALLOCA])dnl + AC_REQUIRE([AC_FUNC_MMAP])dnl + AC_REQUIRE([jm_GLIBC21])dnl + AC_REQUIRE([gt_INTDIV0])dnl + AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl + AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl + AC_REQUIRE([gt_INTTYPES_PRI])dnl + + 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 \ + __fsetlocking]) + + AM_ICONV + AM_LANGINFO_CODESET + if test $ac_cv_header_locale_h = yes; then + AM_LC_MESSAGES + fi + + dnl intl/plural.c is generated from intl/plural.y. It requires bison, + dnl because plural.y uses bison specific features. It requires at least + dnl bison-1.26 because earlier versions generate a plural.c that doesn't + dnl compile. + dnl bison is only needed for the maintainer (who touches plural.y). But in + dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put + dnl the rule in general Makefile. Now, some people carelessly touch the + dnl files or have a broken "make" program, hence the plural.c rule will + dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not + dnl present or too old. + AC_CHECK_PROGS([INTLBISON], [bison]) + if test -z "$INTLBISON"; then + ac_verc_fail=yes + else + dnl Found it, now check the version. + AC_MSG_CHECKING([version of bison]) + changequote(<<,>>)dnl + ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) + changequote([,])dnl + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + esac + AC_MSG_RESULT([$ac_prog_version]) + fi + if test $ac_verc_fail = yes; then + INTLBISON=: + fi + ]) + + + dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) + AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) + # glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40) + dnl Copyright (C) 2000-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. + + # Test for the GNU C Library, version 2.1 or newer. + # From Bruno Haible. + + AC_DEFUN([jm_GLIBC21], + [ + AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, + ac_cv_gnu_library_2_1, + [AC_EGREP_CPP([Lucky GNU user], + [ + #include + #ifdef __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) + Lucky GNU user + #endif + #endif + ], + ac_cv_gnu_library_2_1=yes, + ac_cv_gnu_library_2_1=no) + ] + ) + AC_SUBST(GLIBC21) + GLIBC21="$ac_cv_gnu_library_2_1" + ] + ) + # iconv.m4 serial AM4 (gettext-0.11.3) + dnl Copyright (C) 2000-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([AM_ICONV_LINKFLAGS_BODY], + [ + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([iconv]) + ]) + + AC_DEFUN([AM_ICONV_LINK], + [ + dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and + dnl those with the standalone portable GNU libiconv installed). + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + + dnl Add $INCICONV to CPPFLAGS before performing the following checks, + dnl because if the user has installed libiconv and not disabled its use + dnl via --without-libiconv-prefix, he wants to use it. The first + dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. + am_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) + + AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + AC_TRY_LINK([#include + #include ], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + am_cv_func_iconv=yes) + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + AC_TRY_LINK([#include + #include ], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + am_cv_lib_iconv=yes + am_cv_func_iconv=yes) + LIBS="$am_save_LIBS" + fi + ]) + if test "$am_cv_func_iconv" = yes; then + AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) + fi + if test "$am_cv_lib_iconv" = yes; then + AC_MSG_CHECKING([how to link with libiconv]) + AC_MSG_RESULT([$LIBICONV]) + else + dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV + dnl either. + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + AC_SUBST(LIBICONV) + AC_SUBST(LTLIBICONV) + ]) + + AC_DEFUN([AM_ICONV], + [ + AM_ICONV_LINK + if test "$am_cv_func_iconv" = yes; then + AC_MSG_CHECKING([for iconv declaration]) + AC_CACHE_VAL(am_cv_proto_iconv, [ + AC_TRY_COMPILE([ + #include + #include + extern + #ifdef __cplusplus + "C" + #endif + #if defined(__STDC__) || defined(__cplusplus) + size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); + #else + size_t iconv(); + #endif + ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") + 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);"]) + am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + AC_MSG_RESULT([$]{ac_t:- + }[$]am_cv_proto_iconv) + AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, + [Define as const if the declaration of iconv() needs const.]) + fi + ]) + # intdiv0.m4 serial 1 (gettext-0.11.3) + dnl Copyright (C) 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([gt_INTDIV0], + [ + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl + + AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], + gt_cv_int_divbyzero_sigfpe, + [ + AC_TRY_RUN([ + #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); + } + ], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, + [ + # Guess based on the CPU. + case "$host_cpu" in + alpha* | i[34567]86 | m68k | s390*) + gt_cv_int_divbyzero_sigfpe="guessing yes";; + *) + gt_cv_int_divbyzero_sigfpe="guessing no";; + esac + ]) + ]) + case "$gt_cv_int_divbyzero_sigfpe" in + *yes) value=1;; + *) value=0;; + esac + AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, + [Define if integer division by zero raises signal SIGFPE.]) + ]) + # inttypes.m4 serial 1 (gettext-0.11.4) + dnl Copyright (C) 1997-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 Paul Eggert. + + # Define HAVE_INTTYPES_H if exists and doesn't clash with + # . + + AC_DEFUN([gt_HEADER_INTTYPES_H], + [ + AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h, + [ + AC_TRY_COMPILE( + [#include + #include ], + [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no) + ]) + if test $gt_cv_header_inttypes_h = yes; then + AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1, + [Define if exists and doesn't clash with .]) + fi + ]) + # inttypes_h.m4 serial 5 (gettext-0.12) + dnl Copyright (C) 1997-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. + + # Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, + # doesn't clash with , and declares uintmax_t. + + AC_DEFUN([jm_AC_HEADER_INTTYPES_H], + [ + AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h, + [AC_TRY_COMPILE( + [#include + #include ], + [uintmax_t i = (uintmax_t) -1;], + jm_ac_cv_header_inttypes_h=yes, + jm_ac_cv_header_inttypes_h=no)]) + if test $jm_ac_cv_header_inttypes_h = yes; then + AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, + [Define if exists, doesn't clash with , + and declares uintmax_t. ]) + fi + ]) + # inttypes-pri.m4 serial 1 (gettext-0.11.4) + dnl Copyright (C) 1997-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. + + # Define PRI_MACROS_BROKEN if exists and defines the PRI* + # macros to non-string values. This is the case on AIX 4.3.3. + + AC_DEFUN([gt_INTTYPES_PRI], + [ + AC_REQUIRE([gt_HEADER_INTTYPES_H]) + if test $gt_cv_header_inttypes_h = yes; then + AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], + gt_cv_inttypes_pri_broken, + [ + AC_TRY_COMPILE([#include + #ifdef PRId32 + char *p = PRId32; + #endif + ], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) + ]) + fi + if test "$gt_cv_inttypes_pri_broken" = yes; then + AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, + [Define if exists and defines unusable PRI* macros.]) + fi + ]) + # isc-posix.m4 serial 2 (gettext-0.11.2) + dnl Copyright (C) 1995-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. + + # This file is not needed with autoconf-2.53 and newer. Remove it in 2005. + + # This test replaces the one in autoconf. + # Currently this macro should have the same name as the autoconf macro + # because gettext's gettext.m4 (distributed in the automake package) + # still uses it. Otherwise, the use in gettext.m4 makes autoheader + # give these diagnostics: + # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX + # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX + + undefine([AC_ISC_POSIX]) + + AC_DEFUN([AC_ISC_POSIX], + [ + dnl This test replaces the obsolescent AC_ISC_POSIX kludge. + AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) + ] + ) + # lcmessage.m4 serial 3 (gettext-0.11.3) + dnl Copyright (C) 1995-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 + dnl This file can can be used in projects which are not available under + dnl the GNU General Public License or the GNU Library General Public + dnl License but which still want to provide support for the GNU gettext + dnl functionality. + dnl Please note that the actual code of the GNU gettext library is covered + dnl by the GNU Library General Public License, and the rest of the GNU + dnl gettext package package is covered by the GNU General Public License. + dnl They are *not* in the public domain. + + dnl Authors: + dnl Ulrich Drepper , 1995. + + # Check whether LC_MESSAGES is available in . + + AC_DEFUN([AM_LC_MESSAGES], + [ + AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, + [AC_TRY_LINK([#include ], [return LC_MESSAGES], + am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) + if test $am_cv_val_LC_MESSAGES = yes; then + AC_DEFINE(HAVE_LC_MESSAGES, 1, + [Define if your file defines LC_MESSAGES.]) + fi + ]) + # lib-ld.m4 serial 2 (gettext-0.12) + 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 + 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 Subroutines of libtool.m4, + dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision + dnl with libtool.m4. + + dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. + 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]) + with_gnu_ld=$acl_cv_prog_gnu_ld + ]) + + dnl From libtool-1.4. Sets the variable LD. + AC_DEFUN([AC_LIB_PROG_LD], + [AC_ARG_WITH(gnu-ld, + [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], + test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl + # 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. + AC_MSG_CHECKING([for ld used by GCC]) + 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 + AC_MSG_CHECKING([for GNU ld]) + else + AC_MSG_CHECKING([for non-GNU ld]) + fi + AC_CACHE_VAL(acl_cv_path_LD, + [if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + 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" + else + acl_cv_path_LD="$LD" # Let the user override the test with a path. + fi]) + LD="$acl_cv_path_LD" + if test -n "$LD"; then + AC_MSG_RESULT($LD) + else + AC_MSG_RESULT(no) + fi + test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) + AC_LIB_PROG_LD_GNU + ]) + # lib-link.m4 serial 4 (gettext-0.12) + 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 + 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 AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and + dnl the libraries corresponding to explicit and implicit dependencies. + dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and + dnl augments the CPPFLAGS variable. + AC_DEFUN([AC_LIB_LINKFLAGS], + [ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + define([Name],[translit([$1],[./-], [___])]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + ac_cv_lib[]Name[]_libs="$LIB[]NAME" + ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" + ac_cv_lib[]Name[]_cppflags="$INC[]NAME" + ]) + LIB[]NAME="$ac_cv_lib[]Name[]_libs" + LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" + INC[]NAME="$ac_cv_lib[]Name[]_cppflags" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the + dnl results of this search when this library appears as a dependency. + HAVE_LIB[]NAME=yes + undefine([Name]) + undefine([NAME]) + ]) + + dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) + dnl searches for libname and the libraries corresponding to explicit and + dnl implicit dependencies, together with the specified include files and + dnl the ability to compile and link the specified testcode. If found, it + dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and + dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and + dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs + dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. + AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], + [ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + define([Name],[translit([$1],[./-], [___])]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + + dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + + dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, + dnl because if the user has installed lib[]Name and not disabled its use + dnl via --without-lib[]Name-prefix, he wants to use it. + ac_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + + AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ + ac_save_LIBS="$LIBS" + LIBS="$LIBS $LIB[]NAME" + AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) + LIBS="$ac_save_LIBS" + ]) + if test "$ac_cv_lib[]Name" = yes; then + HAVE_LIB[]NAME=yes + AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) + AC_MSG_CHECKING([how to link with lib[]$1]) + AC_MSG_RESULT([$LIB[]NAME]) + else + HAVE_LIB[]NAME=no + dnl If $LIB[]NAME didn't lead to a usable library, we don't need + dnl $INC[]NAME either. + CPPFLAGS="$ac_save_CPPFLAGS" + LIB[]NAME= + LTLIB[]NAME= + fi + AC_SUBST([HAVE_LIB]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + undefine([Name]) + undefine([NAME]) + ]) + + dnl Determine the platform dependent parameters needed to use rpath: + dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, + dnl hardcode_direct, hardcode_minus_L. + AC_DEFUN([AC_LIB_RPATH], + [ + AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS + AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld + AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host + AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir + AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ + 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 + ]) + 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" + dnl Determine whether the user wants rpath handling at all. + AC_ARG_ENABLE(rpath, + [ --disable-rpath do not hardcode runtime library paths], + :, enable_rpath=yes) + ]) + + dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and + dnl the libraries corresponding to explicit and implicit dependencies. + dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. + AC_DEFUN([AC_LIB_LINKFLAGS_BODY], + [ + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_LIB_ARG_WITH([lib$1-prefix], + [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib + --without-lib$1-prefix don't search for lib$1 in includedir and libdir], + [ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/lib" + fi + fi + ]) + dnl Search the library and its dependencies in $additional_libdir and + dnl $LDFLAGS. Using breadth-first-seach. + LIB[]NAME= + LTLIB[]NAME= + INC[]NAME= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='$1 $2' + 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" + dnl See if it was already located by an earlier AC_LIB_LINKFLAGS + dnl or AC_LIB_HAVE_LINKFLAGS call. + 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" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" + else + dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined + dnl that this library doesn't exist. So just drop it. + : + fi + else + dnl Search the library lib$name in $additional_libdir and $LDFLAGS + dnl and the already constructed $LIBNAME/$LTLIBNAME. + 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 $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + 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 + dnl Found the library. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + dnl Linking with a shared library. We attempt to hardcode its + dnl directory into the executable's runpath, unless it's the + dnl standard /usr/lib. + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then + dnl No hardcoding is needed. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + 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 + dnl The hardcoding into $LIBNAME is system dependent. + if test "$hardcode_direct" = yes; then + dnl Using DIR/libNAME.so during linking hardcodes DIR into the + dnl resulting binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + 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 + dnl Rely on "-L$found_dir". + dnl But don't add it if it's already contained in the LDFLAGS + dnl or the already constructed $LIBNAME + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" + fi + if test "$hardcode_minus_L" != no; then + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH + dnl here, because this doesn't fit in flags passed to the + dnl compiler. So give up. No hardcoding. This affects only + dnl very old systems. + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + dnl Linking with a static library. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" + else + dnl We shouldn't come here, but anyway it's good to have a + dnl fallback. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" + fi + fi + dnl Assume the include files are nearby. + 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 + dnl Potentially add $additional_includedir to $INCNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's /usr/local/include and we are using GCC on Linux, + dnl 3. if it's already present in $CPPFLAGS or the already + dnl constructed $INCNAME, + dnl 4. if it doesn't exist as a directory. + 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 $INC[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + 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 + dnl Really add $additional_includedir to $INCNAME. + INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + dnl Look for dependencies. + if test -n "$found_la"; then + dnl Read the .la file. It defines the variables + dnl dlname, library_names, old_library, dependency_libs, current, + dnl age, revision, installed, dlopen, dlpreopen, libdir. + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + dnl We use only dependency_libs. + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's /usr/local/lib and we are using GCC on Linux, + dnl 3. if it's already present in $LDFLAGS or the already + dnl constructed $LIBNAME, + dnl 4. if it doesn't exist as a directory. + 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 $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + 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 + dnl Really add $additional_libdir to $LIBNAME. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + 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 + dnl Really add $additional_libdir to $LTLIBNAME. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + 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 + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + 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*) + dnl Handle this in the next round. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + dnl Handle this in the next round. Throw away the .la's + dnl directory; it is already contained in a preceding -L + dnl option. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + dnl Most likely an immediate library name. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" + ;; + esac + done + fi + else + dnl Didn't find the library; assume it is in the system directories + dnl known to the linker and runtime loader. (All the system + dnl directories known to the linker should also be known to the + dnl runtime loader, otherwise the system is severely misconfigured.) + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user must + dnl pass all path elements in one option. We can arrange that for a + dnl single library, but not when more than one $LIBNAMEs are used. + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" + done + dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + else + dnl The -rpath options are cumulative. + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + dnl When using libtool, the option that works for both libraries and + dnl executables is -R. The -R options are cumulative. + for found_dir in $ltrpathdirs; do + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" + done + fi + ]) + + dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, + dnl unless already present in VAR. + dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes + dnl contains two or three consecutive elements that belong together. + AC_DEFUN([AC_LIB_APPENDTOVAR], + [ + for element in [$2]; do + haveit= + for x in $[$1]; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + [$1]="${[$1]}${[$1]:+ }$element" + fi + done + ]) + # lib-prefix.m4 serial 2 (gettext-0.12) + 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 + 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 AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and + dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't + 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])])]) + + 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 + dnl a user will want packages to use other packages he previously installed + dnl with the same --prefix option. + dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate + dnl libraries, but is otherwise very convenient. + AC_DEFUN([AC_LIB_PREFIX], + [ + AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_LIB_ARG_WITH([lib-prefix], + [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib + --without-lib-prefix don't search for libraries in includedir and libdir], + [ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/lib" + fi + fi + ]) + if test $use_additional = yes; then + dnl Potentially add $additional_includedir to $CPPFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's already present in $CPPFLAGS, + dnl 3. if it's /usr/local/include and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + for x in $CPPFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + 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 + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $CPPFLAGS. + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" + fi + fi + fi + fi + dnl Potentially add $additional_libdir to $LDFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's already present in $LDFLAGS, + dnl 3. if it's /usr/local/lib and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/lib"; then + haveit= + for x in $LDFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + 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 + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LDFLAGS. + LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" + fi + fi + fi + fi + fi + ]) + + dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, + dnl acl_final_exec_prefix, containing the values to which $prefix and + dnl $exec_prefix will expand at the end of the configure script. + AC_DEFUN([AC_LIB_PREPARE_PREFIX], + [ + dnl Unfortunately, prefix and exec_prefix get only finally determined + dnl at the end of configure. + 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" + ]) + + dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the + dnl variables prefix and exec_prefix bound to the values they will have + dnl at the end of the configure script. + AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], + [ + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + $1 + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + ]) + # nls.m4 serial 1 (gettext-0.12) + 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 + 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 + dnl This file can can be used in projects which are not available under + dnl the GNU General Public License or the GNU Library General Public + dnl License but which still want to provide support for the GNU gettext + dnl functionality. + dnl Please note that the actual code of the GNU gettext library is covered + dnl by the GNU Library General Public License, and the rest of the GNU + dnl gettext package package is covered by the GNU General Public License. + dnl They are *not* in the public domain. + + dnl Authors: + dnl Ulrich Drepper , 1995-2000. + dnl Bruno Haible , 2000-2003. + + AC_DEFUN([AM_NLS], + [ + AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE(nls, + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + AC_MSG_RESULT($USE_NLS) + AC_SUBST(USE_NLS) + ]) + + AC_DEFUN([AM_MKINSTALLDIRS], + [ + dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly + dnl find the mkinstalldirs script in another subdir but $(top_srcdir). + dnl Try to locate it. + 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 + AC_SUBST(MKINSTALLDIRS) + ]) + # po.m4 serial 1 (gettext-0.12) + 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 + 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 + dnl This file can can be used in projects which are not available under + dnl the GNU General Public License or the GNU Library General Public + dnl License but which still want to provide support for the GNU gettext + dnl functionality. + dnl Please note that the actual code of the GNU gettext library is covered + dnl by the GNU Library General Public License, and the rest of the GNU + dnl gettext package package is covered by the GNU General Public License. + dnl They are *not* in the public domain. + + dnl Authors: + dnl Ulrich Drepper , 1995-2000. + dnl Bruno Haible , 2000-2003. + + dnl Checks for all prerequisites of the po subdirectory. + AC_DEFUN([AM_PO_SUBDIRS], + [ + AC_REQUIRE([AC_PROG_MAKE_SET])dnl + AC_REQUIRE([AC_PROG_INSTALL])dnl + AC_REQUIRE([AM_MKINSTALLDIRS])dnl + AC_REQUIRE([AM_NLS])dnl + + dnl Perform the following tests also if --disable-nls has been given, + dnl because they are needed for "make dist" to work. + + dnl Search for GNU msgfmt in the PATH. + dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. + dnl The second test excludes FreeBSD msgfmt. + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [$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)], + :) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + + dnl Search for GNU xgettext 0.12 or newer in the PATH. + dnl The first test excludes Solaris xgettext and early GNU xgettext versions. + dnl The second test excludes FreeBSD xgettext. + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [$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)], + :) + dnl Remove leftover from FreeBSD xgettext call. + rm -f messages.po + + dnl Search for GNU msgmerge 0.11 or newer in the PATH. + AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, + [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :) + + dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. + dnl Test whether we really found GNU msgfmt. + if test "$GMSGFMT" != ":"; then + dnl If it is no GNU msgfmt we define it as : so that the + dnl Makefiles still can work. + 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,^.*/,,'` + AC_MSG_RESULT( + [found $GMSGFMT program is not GNU msgfmt; ignore it]) + GMSGFMT=":" + fi + fi + + dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. + dnl Test whether we really found GNU xgettext. + if test "$XGETTEXT" != ":"; then + dnl If it is no GNU xgettext we define it as : so that the + dnl Makefiles still can work. + if $XGETTEXT --omit-header --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 + AC_MSG_RESULT( + [found xgettext program is not GNU xgettext; ignore it]) + XGETTEXT=":" + fi + dnl Remove leftover from FreeBSD xgettext call. + rm -f messages.po + fi + + AC_OUTPUT_COMMANDS([ + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + POMAKEFILEDEPS="POTFILES.in" + # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$OBSOLETE_ALL_LINGUAS"; then + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" + fi + ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` + # Hide the ALL_LINGUAS assigment from automake. + eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" + else + # The set of available languages was given in configure.in. + eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' + fi + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + GMOFILES= + UPDATEPOFILES= + DUMMYPOFILES= + 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" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@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" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done], + [# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, 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%}" + ]) + ]) + # progtest.m4 serial 3 (gettext-0.12) + 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 + 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 + dnl This file can can be used in projects which are not available under + dnl the GNU General Public License or the GNU Library General Public + dnl License but which still want to provide support for the GNU gettext + dnl functionality. + dnl Please note that the actual code of the GNU gettext library is covered + dnl by the GNU Library General Public License, and the rest of the GNU + dnl gettext package package is covered by the GNU General Public License. + dnl They are *not* in the public domain. + + dnl Authors: + dnl Ulrich Drepper , 1996. + + # Search path for a program which passes the given test. + + dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, + dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) + AC_DEFUN([AM_PATH_PROG_WITH_TEST], + [ + # Prepare PATH_SEPARATOR. + # The user is always right. + if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh + fi + + # Find out how to test for executable files. Don't use a zero-byte file, + # as systems may use methods other than mode bits to determine executability. + cat >conf$$.file <<_ASEOF + #! /bin/sh + exit 0 + _ASEOF + chmod +x conf$$.file + if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" + else + ac_executable_p="test -f" + fi + rm -f conf$$.file + + # Extract the first word of "$2", so it can be a program name with args. + set dummy $2; ac_word=[$]2 + AC_MSG_CHECKING([for $ac_word]) + AC_CACHE_VAL(ac_cv_path_$1, + [case "[$]$1" in + [[\\/]]* | ?:[[\\/]]*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in ifelse([$5], , $PATH, [$5]); 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 [$3]; then + ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + dnl If no 4th arg is given, leave the cache variable unset, + dnl so AC_PATH_PROGS will keep looking. + ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" + ])dnl + ;; + esac])dnl + $1="$ac_cv_path_$1" + if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then + AC_MSG_RESULT([$]$1) + else + AC_MSG_RESULT(no) + fi + AC_SUBST($1)dnl + ]) + # stdint_h.m4 serial 3 (gettext-0.12) + dnl Copyright (C) 1997-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. + + # Define HAVE_STDINT_H_WITH_UINTMAX if exists, + # doesn't clash with , and declares uintmax_t. + + AC_DEFUN([jm_AC_HEADER_STDINT_H], + [ + AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h, + [AC_TRY_COMPILE( + [#include + #include ], + [uintmax_t i = (uintmax_t) -1;], + jm_ac_cv_header_stdint_h=yes, + jm_ac_cv_header_stdint_h=no)]) + if test $jm_ac_cv_header_stdint_h = yes; then + AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, + [Define if exists, doesn't clash with , + and declares uintmax_t. ]) + fi + ]) + # uintmax_t.m4 serial 7 (gettext-0.12) + dnl Copyright (C) 1997-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. + + AC_PREREQ(2.13) + + # Define uintmax_t to 'unsigned long' or 'unsigned long long' + # if it is not already defined in or . + + AC_DEFUN([jm_AC_TYPE_UINTMAX_T], + [ + AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) + AC_REQUIRE([jm_AC_HEADER_STDINT_H]) + if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then + AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG]) + test $ac_cv_type_unsigned_long_long = yes \ + && ac_type='unsigned long long' \ + || ac_type='unsigned long' + AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, + [Define to unsigned long or unsigned long long + if and don't define.]) + else + AC_DEFINE(HAVE_UINTMAX_T, 1, + [Define if you have the 'uintmax_t' type in or .]) + fi + ]) + # ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40) + dnl Copyright (C) 1999-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 Paul Eggert. + + 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.]) + fi ]) diff -aNrc2 bash-2.05b-patched/array.c bash-3.0/array.c *** bash-2.05b-patched/array.c Mon Mar 18 13:16:50 2002 --- bash-3.0/array.c Thu May 6 08:24:13 2004 *************** *** 10,14 **** */ ! /* Copyright (C) 1997-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 10,14 ---- */ ! /* Copyright (C) 1997-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 155,161 **** */ void ! array_walk(a, func) ARRAY *a; sh_ae_map_func_t *func; { register ARRAY_ELEMENT *ae; --- 155,162 ---- */ void ! array_walk(a, func, udata) ARRAY *a; sh_ae_map_func_t *func; + void *udata; { register ARRAY_ELEMENT *ae; *************** *** 164,168 **** return; for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae)) ! if ((*func)(ae) < 0) return; } --- 165,169 ---- return; for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae)) ! if ((*func)(ae, udata) < 0) return; } *************** *** 266,269 **** --- 267,285 ---- } + ARRAY_ELEMENT * + array_unshift_element(a) + ARRAY *a; + { + return (array_shift (a, 1, 0)); + } + + int + array_shift_element(a, v) + ARRAY *a; + char *v; + { + return (array_rshift (a, 1, v)); + } + ARRAY * array_quote(array) *************** *** 283,307 **** } char * ! array_subrange (a, start, end, quoted) ARRAY *a; ! arrayind_t start, end; ! int quoted; { ARRAY_ELEMENT *h, *p; arrayind_t i; p = array_head (a); ! if (p == 0 || array_empty (a) || start > array_num_elements (a)) return ((char *)NULL); ! for (i = 0, p = element_forw(p); p != a->head && i < start; i++, p = element_forw(p)) ; if (p == a->head) return ((char *)NULL); ! for (h = p; p != a->head && i < end; i++, p = element_forw(p)) ; ! return (array_to_string_internal (h, p, " ", quoted)); } --- 299,346 ---- } + /* + * Return a string whose elements are the members of array A beginning at + * index START and spanning NELEM members. Null elements are counted. + * Since arrays are sparse, unset array elements are not counted. + */ char * ! array_subrange (a, start, nelem, starsub, quoted) ARRAY *a; ! arrayind_t start, nelem; ! int starsub, quoted; { ARRAY_ELEMENT *h, *p; arrayind_t i; + char *ifs, sep[2]; p = array_head (a); ! if (p == 0 || array_empty (a) || start > array_max_index(a)) return ((char *)NULL); ! /* ! * Find element with index START. If START corresponds to an unset ! * element (arrays can be sparse), use the first element whose index ! * is >= START. If START is < 0, we count START indices back from ! * the end of A (not elements, even with sparse arrays -- START is an ! * index). ! */ ! for (p = element_forw(p); p != array_head(a) && start > element_index(p); p = element_forw(p)) ; + if (p == a->head) return ((char *)NULL); ! ! /* Starting at P, take NELEM elements, inclusive. */ ! for (i = 0, h = p; p != a->head && i < nelem; i++, p = element_forw(p)) ; ! if (starsub && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))) { ! ifs = getifs(); ! sep[0] = ifs ? *ifs : '\0'; ! } else ! sep[0] = ' '; ! sep[1] = '\0'; ! ! return (array_to_string_internal (h, p, sep, quoted)); } *************** *** 314,318 **** ARRAY *a2; ARRAY_ELEMENT *e; ! char *t; if (array_head (a) == 0 || array_empty (a)) --- 353,357 ---- ARRAY *a2; ARRAY_ELEMENT *e; ! char *t, *ifs, sifs[2]; if (array_head (a) == 0 || array_empty (a)) *************** *** 328,332 **** if (mflags & MATCH_QUOTED) array_quote (a2); ! t = array_to_string (a2, " ", 0); array_dispose (a2); --- 367,377 ---- if (mflags & MATCH_QUOTED) array_quote (a2); ! if (mflags & MATCH_STARSUB) { ! ifs = getifs(); ! sifs[0] = ifs ? *ifs : '\0'; ! sifs[1] = '\0'; ! t = array_to_string (a2, sifs, 0); ! } else ! t = array_to_string (a2, " ", 0); array_dispose (a2); *************** *** 366,371 **** ARRAY_ELEMENT *ae; { ! FREE(ae->value); ! free(ae); } --- 411,418 ---- ARRAY_ELEMENT *ae; { ! if (ae) { ! FREE(ae->value); ! free(ae); ! } } *************** *** 461,464 **** --- 508,512 ---- /* Convenience routines for the shell to translate to and from the form used by the rest of the code. */ + WORD_LIST * array_to_word_list(a) *************** *** 488,491 **** --- 536,558 ---- } + WORD_LIST * + array_keys_to_word_list(a) + ARRAY *a; + { + WORD_LIST *list; + ARRAY_ELEMENT *ae; + char *t; + + if (a == 0 || array_empty(a)) + return((WORD_LIST *)NULL); + list = (WORD_LIST *)NULL; + for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae)) { + t = itos(element_index(ae)); + list = make_word_list (make_bare_word(t), list); + free(t); + } + return (REVERSE_LIST(list, WORD_LIST *)); + } + ARRAY * array_assign_list (array, list) *************** *** 768,772 **** { printf("\n"); ! array_walk(a, print_element); } --- 835,839 ---- { printf("\n"); ! array_walk(a, print_element, (void *)NULL); } diff -aNrc2 bash-2.05b-patched/array.h bash-3.0/array.h *** bash-2.05b-patched/array.h Thu Mar 14 08:42:51 2002 --- bash-3.0/array.h Sun Jun 1 15:50:30 2003 *************** *** 41,45 **** } ARRAY_ELEMENT; ! typedef int sh_ae_map_func_t __P((ARRAY_ELEMENT *)); /* Basic operations on entire arrays */ --- 41,45 ---- } ARRAY_ELEMENT; ! typedef int sh_ae_map_func_t __P((ARRAY_ELEMENT *, void *)); /* Basic operations on entire arrays */ *************** *** 49,59 **** extern ARRAY *array_copy __P((ARRAY *)); extern ARRAY *array_slice __P((ARRAY *, ARRAY_ELEMENT *, ARRAY_ELEMENT *)); ! extern void array_walk __P((ARRAY *, sh_ae_map_func_t *)); extern ARRAY_ELEMENT *array_shift __P((ARRAY *, int, int)); extern int array_rshift __P((ARRAY *, int, char *)); extern ARRAY *array_quote __P((ARRAY *)); ! extern char *array_subrange __P((ARRAY *, arrayind_t, arrayind_t, int)); extern char *array_patsub __P((ARRAY *, char *, char *, int)); --- 49,61 ---- extern ARRAY *array_copy __P((ARRAY *)); extern ARRAY *array_slice __P((ARRAY *, ARRAY_ELEMENT *, ARRAY_ELEMENT *)); ! extern void array_walk __P((ARRAY *, sh_ae_map_func_t *, void *)); extern ARRAY_ELEMENT *array_shift __P((ARRAY *, int, int)); extern int array_rshift __P((ARRAY *, int, char *)); + extern ARRAY_ELEMENT *array_unshift_element __P((ARRAY *)); + extern int array_shift_element __P((ARRAY *, char *)); extern ARRAY *array_quote __P((ARRAY *)); ! extern char *array_subrange __P((ARRAY *, arrayind_t, arrayind_t, int, int)); extern char *array_patsub __P((ARRAY *, char *, char *, int)); *************** *** 70,73 **** --- 72,77 ---- extern WORD_LIST *array_to_word_list __P((ARRAY *)); extern ARRAY *array_from_word_list __P((WORD_LIST *)); + extern WORD_LIST *array_keys_to_word_list __P((ARRAY *)); + extern ARRAY *array_assign_list __P((ARRAY *, WORD_LIST *)); *************** *** 90,93 **** --- 94,109 ---- #define element_forw(ae) ((ae)->next) #define element_back(ae) ((ae)->prev) + + /* Convenience */ + #define array_push(a,v) \ + do { array_rshift ((a), 1, (v)); } while (0) + #define array_pop(a) \ + do { array_dispose_element (array_shift ((a), 1, 0)); } while (0) + + #define GET_ARRAY_FROM_VAR(n, v, a) \ + do { \ + (v) = find_variable (n); \ + (a) = ((v) && array_p ((v))) ? array_cell (v) : (ARRAY *)0; \ + } while (0) #define ALL_ELEMENT_SUB(c) ((c) == '@' || (c) == '*') diff -aNrc2 bash-2.05b-patched/arrayfunc.c bash-3.0/arrayfunc.c *** bash-2.05b-patched/arrayfunc.c Mon May 6 14:00:36 2002 --- bash-3.0/arrayfunc.c Fri Dec 19 00:03:09 2003 *************** *** 1,5 **** /* arrayfunc.c -- High-level array functions used by other parts of the shell. */ ! /* Copyright (C) 2001-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,5 ---- /* arrayfunc.c -- High-level array functions used by other parts of the shell. */ ! /* Copyright (C) 2001-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 28,31 **** --- 28,33 ---- #include + #include "bashintl.h" + #include "shell.h" *************** *** 40,43 **** --- 42,48 ---- static char *array_value_internal __P((char *, int, int, int *)); + /* Standard error message to use when encountering an invalid array subscript */ + char *bash_badsub_errmsg = N_("bad array subscript"); + /* **************************************************************** */ /* */ *************** *** 57,61 **** oldval = value_cell (var); array = array_create (); ! array_insert (array, 0, oldval); FREE (value_cell (var)); --- 62,67 ---- oldval = value_cell (var); array = array_create (); ! if (oldval) ! array_insert (array, 0, oldval); FREE (value_cell (var)); *************** *** 246,250 **** /* First we split the string on whitespace, using the shell parser (ksh93 seems to do this). */ ! list = parse_string_to_word_list (val, "array assign"); /* If we're using [subscript]=value, we need to quote each [ and ] to --- 252,256 ---- /* First we split the string on whitespace, using the shell parser (ksh93 seems to do this). */ ! list = parse_string_to_word_list (val, 1, "array assign"); /* If we're using [subscript]=value, we need to quote each [ and ] to *************** *** 274,278 **** /* We have a word of the form [ind]=value */ ! if (w[0] == '[') { len = skipsubscript (w, 0); --- 280,284 ---- /* We have a word of the form [ind]=value */ ! if ((list->word->flags & W_ASSIGNMENT) && w[0] == '[') { len = skipsubscript (w, 0); *************** *** 298,302 **** if (ALL_ELEMENT_SUB (w[1]) && len == 2) { ! report_error ("%s: cannot assign to non-numeric index", w); continue; } --- 304,308 ---- if (ALL_ELEMENT_SUB (w[1]) && len == 2) { ! report_error (_("%s: cannot assign to non-numeric index"), w); continue; } *************** *** 396,400 **** mblength = mbrlen (s + i, slength, &state); ! if (mblength == (size_t)-2 || mblength == (size_t)-1) { state = state_bak; --- 402,406 ---- mblength = mbrlen (s + i, slength, &state); ! if (MB_INVALIDCH (mblength)) { state = state_bak; *************** *** 402,406 **** slength--; } ! else if (mblength == 0) return i; else --- 408,412 ---- slength--; } ! else if (MB_NULLWCH (mblength)) return i; else *************** *** 442,446 **** if (sub[len] != ']' || len == 0) { ! builtin_error ("%s[%s: bad array subscript", var->name, sub); return -1; } --- 448,452 ---- if (sub[len] != ']' || len == 0) { ! builtin_error ("%s[%s: %s", var->name, sub, _(bash_badsub_errmsg)); return -1; } *************** *** 455,459 **** if (ind < 0) { ! builtin_error ("[%s]: bad array subscript", sub); return -1; } --- 461,465 ---- if (ind < 0) { ! builtin_error ("[%s]: %s", sub, _(bash_badsub_errmsg)); return -1; } *************** *** 558,562 **** t = xstrchr (s, '['); if (t == 0) ! return ((char *)NULL); ind = t - s; ni = skipsubscript (s, ind); --- 564,574 ---- t = xstrchr (s, '['); if (t == 0) ! { ! if (subp) ! *subp = t; ! if (lenp) ! *lenp = 0; ! return ((char *)NULL); ! } ind = t - s; ni = skipsubscript (s, ind); *************** *** 564,567 **** --- 576,583 ---- { err_badarraysub (s); + if (subp) + *subp = t; + if (lenp) + *lenp = 0; return ((char *)NULL); } *************** *** 624,627 **** --- 640,646 ---- #endif + if (len == 0) + return ((char *)NULL); /* error message already printed */ + /* [ */ if (ALL_ELEMENT_SUB (t[0]) && t[1] == ']') *************** *** 705,707 **** --- 724,763 ---- } + char * + array_keys (s, quoted) + char *s; + int quoted; + { + int len; + char *retval, *t, *temp; + WORD_LIST *l; + SHELL_VAR *var; + + var = array_variable_part (s, &t, &len); + + /* [ */ + if (var == 0 || ALL_ELEMENT_SUB (t[0]) == 0 || t[1] != ']') + return (char *)NULL; + + if (array_p (var) == 0) + l = add_string_to_list ("0", (WORD_LIST *)NULL); + else + { + l = array_keys_to_word_list (array_cell (var)); + if (l == (WORD_LIST *)NULL) + return ((char *) NULL); + } + + if (t[0] == '*' && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) + { + temp = string_list_dollar_star (l); + retval = quote_string (temp); + free (temp); + } + else /* ${!name[@]} or unquoted ${!name[*]} */ + retval = string_list_dollar_at (l, quoted); + + dispose_words (l); + return retval; + } #endif /* ARRAY_VARS */ diff -aNrc2 bash-2.05b-patched/arrayfunc.h bash-3.0/arrayfunc.h *** bash-2.05b-patched/arrayfunc.h Wed Mar 27 09:31:44 2002 --- bash-3.0/arrayfunc.h Thu Apr 10 09:14:06 2003 *************** *** 46,49 **** --- 46,51 ---- extern char *get_array_value __P((char *, int, int *)); + extern char *array_keys __P((char *, int)); + extern char *array_variable_name __P((char *, char **, int *)); extern SHELL_VAR *array_variable_part __P((char *, char **, int *)); diff -aNrc2 bash-2.05b-patched/bashhist.c bash-3.0/bashhist.c *** bash-2.05b-patched/bashhist.c Tue Mar 12 10:29:56 2002 --- bash-3.0/bashhist.c Mon Mar 22 08:27:59 2004 *************** *** 1,5 **** /* bashhist.c -- bash interface to the GNU history library. */ ! /* Copyright (C) 1993 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,5 ---- /* bashhist.c -- bash interface to the GNU history library. */ ! /* Copyright (C) 1993-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 37,40 **** --- 37,42 ---- #include "filecntl.h" + #include "bashintl.h" + #include "shell.h" #include "flags.h" *************** *** 51,54 **** --- 53,57 ---- #if defined (READLINE) # include "bashline.h" + extern int rl_done, rl_dispatching; /* should really include readline.h */ #endif *************** *** 59,62 **** --- 62,66 ---- static int histignore_item_func __P((struct ign *)); static int check_history_control __P((char *)); + static void hc_erasedups __P((char *)); static void really_add_history __P((char *)); *************** *** 78,82 **** int remember_on_history = 1; ! /* The number of lines that Bash has added to this history session. */ int history_lines_this_session; --- 82,89 ---- int remember_on_history = 1; ! /* The number of lines that Bash has added to this history session. The ! difference between the number of the top element in the history list ! (offset from history_base) and the number of lines in the history file. ! Appending this session's history to the history file resets this to 0. */ int history_lines_this_session; *************** *** 135,142 **** int force_append_history; ! /* A nit for picking at history saving. ! Value of 0 means save all lines parsed by the shell on the history. ! Value of 1 means save all lines that do not start with a space. ! Value of 2 means save all lines that do not match the last line saved. */ int history_control; --- 142,153 ---- int force_append_history; ! /* A nit for picking at history saving. Flags have the following values: ! ! Value == 0 means save all lines parsed by the shell on the history. ! Value & HC_IGNSPACE means save all lines that do not start with a space. ! Value & HC_IGNDUPS means save all lines that do not match the last ! line saved. ! Value & HC_ERASEDUPS means to remove all other matching lines from the ! history list before saving the latest line. */ int history_control; *************** *** 207,210 **** --- 218,222 ---- history_search_delimiter_chars = ";&()|<>"; history_inhibit_expansion_function = bash_history_inhibit_expansion; + sv_histchars ("histchars"); } *************** *** 308,312 **** if (fd < 0) { ! builtin_error ("%s: cannot create: %s", filename, strerror (errno)); return (EXECUTION_FAILURE); } --- 320,324 ---- if (fd < 0) { ! builtin_error (_("%s: cannot create: %s"), filename, strerror (errno)); return (EXECUTION_FAILURE); } *************** *** 434,437 **** --- 446,456 ---- if (expanded < 0 || expanded == 2) /* 2 == print only */ { + # if defined (READLINE) + if (expanded == 2 && rl_dispatching == 0 && *history_value) + # else + if (expanded == 2 && *history_value) + # endif /* !READLINE */ + maybe_add_history (history_value); + free (history_value); *************** *** 439,443 **** /* New hack. We can allow the user to edit the failed history expansion. */ ! if (history_reediting && expanded < 0) re_edit (line); # endif /* READLINE */ --- 458,462 ---- /* New hack. We can allow the user to edit the failed history expansion. */ ! if (history_reediting && expanded < 0 && rl_done) re_edit (line); # endif /* READLINE */ *************** *** 512,526 **** int r; ! switch (history_control) { - case 0: /* nothing */ - return 1; - case 1: /* ignorespace */ - return (*line != ' '); - case 3: /* ignoreboth */ - if (*line == ' ') - return 0; - /* FALLTHROUGH if case == 3 (`ignoreboth') */ - case 2: /* ignoredups */ using_history (); temp = previous_history (); --- 531,544 ---- int r; ! if (history_control == 0) ! return 1; ! ! /* ignorespace or ignoreboth */ ! if ((history_control & HC_IGNSPACE) && *line == ' ') ! return 0; ! ! /* ignoredups or ignoreboth */ ! if (history_control & HC_IGNDUPS) { using_history (); temp = previous_history (); *************** *** 529,536 **** using_history (); ! return r; } ! return 0; } --- 547,577 ---- using_history (); ! ! if (r == 0) ! return r; } ! return 1; ! } ! ! /* Remove all entries matching LINE from the history list. Triggered when ! HISTCONTROL includes `erasedups'. */ ! static void ! hc_erasedups (line) ! char *line; ! { ! HIST_ENTRY *temp; ! int r; ! ! using_history (); ! while (temp = previous_history ()) ! { ! if (STREQ (temp->line, line)) ! { ! r = where_history (); ! remove_history (r); ! } ! } ! using_history (); } *************** *** 578,581 **** --- 619,627 ---- if (check_history_control (line) && history_should_ignore (line) == 0) { + /* We're committed to saving the line. If the user has requested it, + remove other matching lines from the history. */ + if (history_control & HC_ERASEDUPS) + hc_erasedups (line); + if (force) { *************** *** 636,643 **** if (old) ! { ! FREE (old->line); ! free (old); ! } add_it = 0; } --- 682,687 ---- if (old) ! free_history_entry (old); ! add_it = 0; } diff -aNrc2 bash-2.05b-patched/bashhist.h bash-3.0/bashhist.h *** bash-2.05b-patched/bashhist.h Fri Nov 30 14:34:32 2001 --- bash-3.0/bashhist.h Tue Dec 10 10:14:43 2002 *************** *** 24,27 **** --- 24,34 ---- #include "stdc.h" + /* Flag values for history_control */ + #define HC_IGNSPACE 0x01 + #define HC_IGNDUPS 0x02 + #define HC_ERASEDUPS 0x04 + + #define HC_IGNBOTH (HC_IGNSPACE|HC_IGNDUPS) + extern int remember_on_history; extern int history_lines_this_session; diff -aNrc2 bash-2.05b-patched/bashintl.h bash-3.0/bashintl.h *** bash-2.05b-patched/bashintl.h Thu Aug 5 07:01:56 1999 --- bash-3.0/bashintl.h Thu Dec 18 17:12:20 2003 *************** *** 1,5 **** /* bashintl.h -- Internationalization stuff ! Copyright (C) 1996 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,5 ---- /* bashintl.h -- Internationalization stuff ! Copyright (C) 1996-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 22,34 **** #define _BASHINTL_H_ ! /* Include this *after* config.h */ ! #if defined (HAVE_LIBINTL_H) ! # include #endif #if defined (HAVE_LOCALE_H) # include #endif #if defined (HAVE_SETLOCALE) && !defined (LC_ALL) # undef HAVE_SETLOCALE --- 22,41 ---- #define _BASHINTL_H_ ! #if defined (BUILDTOOL) ! # undef ENABLE_NLS ! # define ENABLE_NLS 0 #endif + /* Include this *after* config.h */ + #include "gettext.h" + #if defined (HAVE_LOCALE_H) # include #endif + #define _(msgid) gettext(msgid) + #define N_(msgid) msgid + #define D_(d, msgid) dgettext(d, msgid) + #if defined (HAVE_SETLOCALE) && !defined (LC_ALL) # undef HAVE_SETLOCALE *************** *** 37,48 **** #if !defined (HAVE_SETLOCALE) # define setlocale(cat, loc) - #endif - - #if !defined (HAVE_TEXTDOMAIN) - # define textdomain(dom) - #endif - - #if !defined (HAVE_BINDTEXTDOMAIN) - # define bindtextdomain(dom, dir) #endif --- 44,47 ---- diff -aNrc2 bash-2.05b-patched/bashjmp.h bash-3.0/bashjmp.h *** bash-2.05b-patched/bashjmp.h Thu Aug 5 07:24:12 1999 --- bash-3.0/bashjmp.h Tue Jun 3 13:45:58 2003 *************** *** 34,41 **** /* Values for the second argument to longjmp/siglongjmp. */ ! #define NOT_JUMPED 0 /* Not returning from a longjmp. */ ! #define FORCE_EOF 1 /* We want to stop parsing. */ ! #define DISCARD 2 /* Discard current command. */ ! #define EXITPROG 3 /* Unconditionally exit the program now. */ #endif /* _BASHJMP_H_ */ --- 34,42 ---- /* Values for the second argument to longjmp/siglongjmp. */ ! #define NOT_JUMPED 0 /* Not returning from a longjmp. */ ! #define FORCE_EOF 1 /* We want to stop parsing. */ ! #define DISCARD 2 /* Discard current command. */ ! #define EXITPROG 3 /* Unconditionally exit the program now. */ ! #define ERREXIT 4 /* Exit due to error condition */ #endif /* _BASHJMP_H_ */ diff -aNrc2 bash-2.05b-patched/bashline.c bash-3.0/bashline.c *** bash-2.05b-patched/bashline.c Thu Sep 5 10:52:38 2002 --- bash-3.0/bashline.c Mon Jul 5 23:22:12 2004 *************** *** 1,5 **** /* bashline.c -- Bash's interface to the readline library. */ ! /* Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,5 ---- /* bashline.c -- Bash's interface to the readline library. */ ! /* Copyright (C) 1987-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 41,44 **** --- 41,46 ---- #include "chartypes.h" #include "bashansi.h" + #include "bashintl.h" + #include "shell.h" #include "input.h" *************** *** 151,158 **** /* Variables used here but defined in other files. */ ! extern int current_command_line_count; extern int posixly_correct, no_symbolic_links; extern char *current_prompt_string, *ps1_prompt; extern STRING_INT_ALIST word_token_alist[]; /* SPECIFIC_COMPLETION_FUNCTIONS specifies that we have individual --- 153,165 ---- /* Variables used here but defined in other files. */ ! #if defined (BANG_HISTORY) ! extern int hist_verify; ! #endif ! ! extern int current_command_line_count, last_command_exit_value; extern int posixly_correct, no_symbolic_links; extern char *current_prompt_string, *ps1_prompt; extern STRING_INT_ALIST word_token_alist[]; + extern sh_builtin_func_t *last_shell_builtin, *this_shell_builtin; /* SPECIFIC_COMPLETION_FUNCTIONS specifies that we have individual *************** *** 187,190 **** --- 194,198 ---- static int bash_glob_expand_word __P((int, int)); static int bash_glob_list_expansions __P((int, int)); + #endif /* SPECIFIC_COMPLETION_FUNCTIONS */ *************** *** 192,195 **** --- 200,204 ---- #if defined (VI_MODE) static int vi_edit_and_execute_command __P((int, int)); + static int bash_vi_complete __P((int, int)); #endif static int emacs_edit_and_execute_command __P((int, int)); *************** *** 206,211 **** --- 215,226 ---- int no_empty_command_completion; + /* Set FORCE_FIGNORE if you want to honor FIGNORE even if it ignores the + only possible matches. Set to 0 if you want to match filenames if they + are the only possible matches, even if FIGNORE says to. */ + int force_fignore = 1; + static char *bash_completer_word_break_characters = " \t\n\"'@><=;|&(:"; static char *bash_nohostname_word_break_characters = " \t\n\"'><=;|&(:"; + /* )) */ static rl_hook_func_t *old_rl_startup_hook = (rl_hook_func_t *)NULL; *************** *** 234,237 **** --- 249,254 ---- } + /* When this function returns, rl_completer_word_break_characters points to + dynamically allocated memory. */ int enable_hostname_completion (on_or_off) *************** *** 239,242 **** --- 256,260 ---- { int old_value; + char *at, *nv, *nval; old_value = perform_hostname_completion; *************** *** 246,250 **** perform_hostname_completion = 1; rl_special_prefixes = "$@"; - rl_completer_word_break_characters = bash_completer_word_break_characters; } else --- 264,267 ---- *************** *** 252,256 **** perform_hostname_completion = 0; rl_special_prefixes = "$"; ! rl_completer_word_break_characters = bash_nohostname_word_break_characters; } --- 269,321 ---- perform_hostname_completion = 0; rl_special_prefixes = "$"; ! } ! ! /* Now we need to figure out how to appropriately modify and assign ! rl_completer_word_break_characters depending on whether we want ! hostname completion on or off. */ ! ! /* If this is the first time this has been called ! (bash_readline_initialized == 0), use the sames values as before, but ! allocate new memory for rl_completer_word_break_characters. */ ! ! if (bash_readline_initialized == 0 && ! (rl_completer_word_break_characters == 0 || ! rl_completer_word_break_characters == rl_basic_word_break_characters)) ! { ! if (on_or_off) ! rl_completer_word_break_characters = savestring (bash_completer_word_break_characters); ! else ! rl_completer_word_break_characters = savestring (bash_nohostname_word_break_characters); ! } ! else ! { ! /* See if we have anything to do. */ ! at = strchr (rl_completer_word_break_characters, '@'); ! if ((at == 0 && on_or_off == 0) || (at != 0 && on_or_off != 0)) ! return; ! ! /* We have something to do. Do it. */ ! nval = (char *)xmalloc (strlen (rl_completer_word_break_characters) + 1 + on_or_off); ! ! if (on_or_off == 0) ! { ! /* Turn it off -- just remove `@' from word break chars. We want ! to remove all occurrences of `@' from the char list, so we loop ! rather than just copy the rest of the list over AT. */ ! for (nv = nval, at = rl_completer_word_break_characters; *at; ) ! if (*at != '@') ! *nv++ = *at++; ! else ! at++; ! *nv = '\0'; ! } ! else ! { ! nval[0] = '@'; ! strcpy (nval + 1, rl_completer_word_break_characters); ! } ! ! free (rl_completer_word_break_characters); ! rl_completer_word_break_characters = nval; } *************** *** 262,265 **** --- 327,333 ---- initialize_readline () { + rl_command_func_t *func; + char kseq[2]; + if (bash_readline_initialized) return; *************** *** 321,339 **** /* Bind up our special shell functions. */ ! rl_bind_key_in_map (CTRL('E'), shell_expand_line, emacs_meta_keymap); - /* Bind up our special shell functions. */ #ifdef BANG_HISTORY ! rl_bind_key_in_map ('^', history_expand_line, emacs_meta_keymap); #endif ! rl_bind_key_in_map (CTRL ('O'), operate_and_get_next, emacs_standard_keymap); ! rl_bind_key_in_map (CTRL ('V'), display_shell_version, emacs_ctlx_keymap); /* In Bash, the user can switch editing modes with "set -o [vi emacs]", so it is not necessary to allow C-M-j for context switching. Turn off this occasionally confusing behaviour. */ ! rl_unbind_key_in_map (CTRL('J'), emacs_meta_keymap); ! rl_unbind_key_in_map (CTRL('M'), emacs_meta_keymap); #if defined (VI_MODE) rl_unbind_key_in_map (CTRL('E'), vi_movement_keymap); --- 389,413 ---- /* Bind up our special shell functions. */ ! rl_bind_key_if_unbound_in_map (CTRL('E'), shell_expand_line, emacs_meta_keymap); #ifdef BANG_HISTORY ! rl_bind_key_if_unbound_in_map ('^', history_expand_line, emacs_meta_keymap); #endif ! rl_bind_key_if_unbound_in_map (CTRL ('O'), operate_and_get_next, emacs_standard_keymap); ! rl_bind_key_if_unbound_in_map (CTRL ('V'), display_shell_version, emacs_ctlx_keymap); /* In Bash, the user can switch editing modes with "set -o [vi emacs]", so it is not necessary to allow C-M-j for context switching. Turn off this occasionally confusing behaviour. */ ! kseq[0] = CTRL('J'); ! kseq[1] = '\0'; ! func = rl_function_of_keyseq (kseq, emacs_meta_keymap, (int *)NULL); ! if (func == rl_vi_editing_mode) ! rl_unbind_key_in_map (CTRL('J'), emacs_meta_keymap); ! kseq[0] = CTRL('M'); ! func = rl_function_of_keyseq (kseq, emacs_meta_keymap, (int *)NULL); ! if (func == rl_vi_editing_mode) ! rl_unbind_key_in_map (CTRL('M'), emacs_meta_keymap); #if defined (VI_MODE) rl_unbind_key_in_map (CTRL('E'), vi_movement_keymap); *************** *** 341,370 **** #if defined (BRACE_COMPLETION) ! rl_bind_key_in_map ('{', bash_brace_completion, emacs_meta_keymap); #endif /* BRACE_COMPLETION */ #if defined (SPECIFIC_COMPLETION_FUNCTIONS) ! rl_bind_key_in_map ('/', bash_complete_filename, emacs_meta_keymap); ! rl_bind_key_in_map ('/', bash_possible_filename_completions, emacs_ctlx_keymap); ! ! rl_bind_key_in_map ('~', bash_complete_username, emacs_meta_keymap); ! rl_bind_key_in_map ('~', bash_possible_username_completions, emacs_ctlx_keymap); ! rl_bind_key_in_map ('@', bash_complete_hostname, emacs_meta_keymap); ! rl_bind_key_in_map ('@', bash_possible_hostname_completions, emacs_ctlx_keymap); ! ! rl_bind_key_in_map ('$', bash_complete_variable, emacs_meta_keymap); ! rl_bind_key_in_map ('$', bash_possible_variable_completions, emacs_ctlx_keymap); ! ! rl_bind_key_in_map ('!', bash_complete_command, emacs_meta_keymap); ! rl_bind_key_in_map ('!', bash_possible_command_completions, emacs_ctlx_keymap); ! ! rl_bind_key_in_map ('g', bash_glob_complete_word, emacs_meta_keymap); ! rl_bind_key_in_map ('*', bash_glob_expand_word, emacs_ctlx_keymap); ! rl_bind_key_in_map ('g', bash_glob_list_expansions, emacs_ctlx_keymap); #endif /* SPECIFIC_COMPLETION_FUNCTIONS */ ! rl_bind_key_in_map (TAB, dynamic_complete_history, emacs_meta_keymap); /* Tell the completer that we want a crack first. */ --- 415,451 ---- #if defined (BRACE_COMPLETION) ! rl_bind_key_if_unbound_in_map ('{', bash_brace_completion, emacs_meta_keymap); /*}*/ #endif /* BRACE_COMPLETION */ #if defined (SPECIFIC_COMPLETION_FUNCTIONS) ! rl_bind_key_if_unbound_in_map ('/', bash_complete_filename, emacs_meta_keymap); ! rl_bind_key_if_unbound_in_map ('/', bash_possible_filename_completions, emacs_ctlx_keymap); ! /* Have to jump through hoops here because there is a default binding for ! M-~ (rl_tilde_expand) */ ! kseq[0] = '~'; ! kseq[1] = '\0'; ! func = rl_function_of_keyseq (kseq, emacs_meta_keymap, (int *)NULL); ! if (func == 0 || func == rl_tilde_expand) ! rl_bind_keyseq_in_map (kseq, bash_complete_username, emacs_meta_keymap); ! ! rl_bind_key_if_unbound_in_map ('~', bash_possible_username_completions, emacs_ctlx_keymap); ! ! rl_bind_key_if_unbound_in_map ('@', bash_complete_hostname, emacs_meta_keymap); ! rl_bind_key_if_unbound_in_map ('@', bash_possible_hostname_completions, emacs_ctlx_keymap); ! ! rl_bind_key_if_unbound_in_map ('$', bash_complete_variable, emacs_meta_keymap); ! rl_bind_key_if_unbound_in_map ('$', bash_possible_variable_completions, emacs_ctlx_keymap); ! ! rl_bind_key_if_unbound_in_map ('!', bash_complete_command, emacs_meta_keymap); ! rl_bind_key_if_unbound_in_map ('!', bash_possible_command_completions, emacs_ctlx_keymap); ! ! rl_bind_key_if_unbound_in_map ('g', bash_glob_complete_word, emacs_meta_keymap); ! rl_bind_key_if_unbound_in_map ('*', bash_glob_expand_word, emacs_ctlx_keymap); ! rl_bind_key_if_unbound_in_map ('g', bash_glob_list_expansions, emacs_ctlx_keymap); #endif /* SPECIFIC_COMPLETION_FUNCTIONS */ ! rl_bind_key_if_unbound_in_map (TAB, dynamic_complete_history, emacs_meta_keymap); /* Tell the completer that we want a crack first. */ *************** *** 379,388 **** /* Bind C-xC-e to invoke emacs and run result as commands. */ ! rl_bind_key_in_map (CTRL ('E'), emacs_edit_and_execute_command, emacs_ctlx_keymap); #if defined (VI_MODE) ! rl_bind_key_in_map ('v', vi_edit_and_execute_command, vi_movement_keymap); # if defined (ALIAS) ! rl_bind_key_in_map ('@', posix_edit_macros, vi_movement_keymap); # endif #endif --- 460,473 ---- /* Bind C-xC-e to invoke emacs and run result as commands. */ ! rl_bind_key_if_unbound_in_map (CTRL ('E'), emacs_edit_and_execute_command, emacs_ctlx_keymap); #if defined (VI_MODE) ! rl_bind_key_if_unbound_in_map ('v', vi_edit_and_execute_command, vi_movement_keymap); # if defined (ALIAS) ! rl_bind_key_if_unbound_in_map ('@', posix_edit_macros, vi_movement_keymap); # endif + + rl_bind_key_in_map ('\\', bash_vi_complete, vi_movement_keymap); + rl_bind_key_in_map ('*', bash_vi_complete, vi_movement_keymap); + rl_bind_key_in_map ('=', bash_vi_complete, vi_movement_keymap); #endif *************** *** 709,714 **** a command from the history file. */ ! #define VI_EDIT_COMMAND "fc -e ${VISUAL:-${EDITOR:-vi}}" ! #define EMACS_EDIT_COMMAND "fc -e ${VISUAL:-${EDITOR:-emacs}}" static int --- 794,799 ---- a command from the history file. */ ! #define VI_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-vi}}\"" ! #define EMACS_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-emacs}}\"" static int *************** *** 811,814 **** --- 896,900 ---- #define COMMAND_SEPARATORS ";|&{(`" + /* )} */ static int *************** *** 923,927 **** /* If this is an open quote, maybe we're trying to complete a quoted command name. */ ! if (rl_line_buffer[ti] == '"' || rl_line_buffer[ti] == '\'') { qc = rl_line_buffer[ti]; --- 1009,1013 ---- /* If this is an open quote, maybe we're trying to complete a quoted command name. */ ! if (ti >= 0 && (rl_line_buffer[ti] == '"' || rl_line_buffer[ti] == '\'')) { qc = rl_line_buffer[ti]; *************** *** 1009,1017 **** if ((foundcs & COPT_DEFAULT) == 0) rl_attempted_completion_over = 1; /* no default */ ! return (matches); } } #endif /* New posix-style command substitution or variable name? */ if (!matches && *text == '$') --- 1095,1119 ---- if ((foundcs & COPT_DEFAULT) == 0) rl_attempted_completion_over = 1; /* no default */ ! if (matches || ((foundcs & COPT_BASHDEFAULT) == 0)) ! return (matches); } } #endif + if (matches == 0) + matches = bash_default_completion (text, start, end, qc, in_command_position); + + return matches; + } + + char ** + bash_default_completion (text, start, end, qc, in_command_position) + const char *text; + int start, end, qc, in_command_position; + { + char **matches; + + matches = (char **)NULL; + /* New posix-style command substitution or variable name? */ if (!matches && *text == '$') *************** *** 1045,1049 **** else { ! #define CMD_IS_DIR(x) (absolute_pathname(x) == 0 && *(x) != '~' && test_for_directory (x)) matches = rl_completion_matches (text, command_word_completion_function); --- 1147,1151 ---- else { ! #define CMD_IS_DIR(x) (absolute_pathname(x) == 0 && absolute_program(x) == 0 && *(x) != '~' && test_for_directory (x)) matches = rl_completion_matches (text, command_word_completion_function); *************** *** 1056,1059 **** --- 1158,1162 ---- if (matches == (char **)NULL) rl_ignore_some_completions_function = bash_ignore_filenames; + #if 0 else if (matches[1] == 0 && CMD_IS_DIR(matches[0])) /* Turn off rl_filename_completion_desired so readline doesn't *************** *** 1075,1078 **** --- 1178,1182 ---- make a difference and the problem won't occur. */ rl_filename_completion_desired = 0; + #endif } } *************** *** 1369,1372 **** --- 1473,1479 ---- else if (*text == '$' && text[1] == '(') /* ) */ text += 2; + /* If the text was quoted, suppress any quote character that the + readline completion code would insert. */ + rl_completion_suppress_quote = 1; start_len = text - orig_start; filename_text = savestring (text); *************** *** 1635,1640 **** --- 1742,1752 ---- { char *new_line; + int old_verify; + old_verify = hist_verify; + hist_verify = 0; new_line = pre_process_line (line, 0, 0); + hist_verify = old_verify; + return (new_line == line) ? savestring (line) : new_line; } *************** *** 1647,1655 **** { char *to_free; fprintf (rl_outstream, "\r\n"); to_free = pre_process_line (rl_line_buffer, 1, 0); if (to_free != rl_line_buffer) ! free (to_free); putc ('\r', rl_outstream); rl_forced_update_display (); --- 1759,1776 ---- { char *to_free; + #if defined (BANG_HISTORY) + int old_verify; + + old_verify = hist_verify; + hist_verify = 0; + #endif fprintf (rl_outstream, "\r\n"); to_free = pre_process_line (rl_line_buffer, 1, 0); + #if defined (BANG_HISTORY) + hist_verify = old_verify; + #endif if (to_free != rl_line_buffer) ! FREE (to_free); putc ('\r', rl_outstream); rl_forced_update_display (); *************** *** 1777,1783 **** char *new_line; ! new_line = pre_process_line (rl_line_buffer, 0, 0); ! if (new_line == rl_line_buffer) ! new_line = savestring (new_line); #if defined (ALIAS) --- 1898,1902 ---- char *new_line; ! new_line = history_expand_line_internal (rl_line_buffer); #if defined (ALIAS) *************** *** 1815,1821 **** WORD_LIST *expanded_string; ! new_line = pre_process_line (rl_line_buffer, 0, 0); ! if (new_line == rl_line_buffer) ! new_line = savestring (new_line); #if defined (ALIAS) --- 1934,1938 ---- WORD_LIST *expanded_string; ! new_line = history_expand_line_internal (rl_line_buffer); #if defined (ALIAS) *************** *** 1877,1884 **** } - /* Define NO_FORCE_FIGNORE if you want to match filenames that would - otherwise be ignored if they are the only possible matches. */ - /* #define NO_FORCE_FIGNORE */ - /* If FIGNORE is set, then don't match files with the given suffixes when completing filenames. If only one of the possibilities has an acceptable --- 1994,1997 ---- *************** *** 1905,1912 **** char **newnames; int idx, nidx; - #ifdef NO_FORCE_FIGNORE char **oldnames; int oidx; - #endif /* If there is only one completion, see if it is acceptable. If it is --- 2018,2023 ---- *************** *** 1916,1926 **** if (names[1] == (char *)0) { ! #ifndef NO_FORCE_FIGNORE ! if ((*name_func) (names[0]) == 0) ! { ! free (names[0]); ! names[0] = (char *)NULL; ! } ! #endif return; } --- 2027,2037 ---- if (names[1] == (char *)0) { ! if (force_fignore) ! if ((*name_func) (names[0]) == 0) ! { ! free (names[0]); ! names[0] = (char *)NULL; ! } ! return; } *************** *** 1931,1938 **** ; newnames = strvec_create (nidx + 1); ! #ifdef NO_FORCE_FIGNORE ! oldnames = strvec_create (nidx - 1); ! oidx = 0; ! #endif newnames[0] = names[0]; --- 2042,2051 ---- ; newnames = strvec_create (nidx + 1); ! ! if (force_fignore == 0) ! { ! oldnames = strvec_create (nidx - 1); ! oidx = 0; ! } newnames[0] = names[0]; *************** *** 1941,1950 **** if ((*name_func) (names[idx])) newnames[nidx++] = names[idx]; else - #ifndef NO_FORCE_FIGNORE free (names[idx]); - #else - oldnames[oidx++] = names[idx]; - #endif } --- 2054,2061 ---- if ((*name_func) (names[idx])) newnames[nidx++] = names[idx]; + else if (force_fignore == 0) + oldnames[oidx++] = names[idx]; else free (names[idx]); } *************** *** 1954,1972 **** if (nidx == 1) { ! #ifndef NO_FORCE_FIGNORE ! free (names[0]); ! names[0] = (char *)NULL; ! #else ! free (oldnames); ! #endif free (newnames); return; } ! #ifdef NO_FORCE_FIGNORE ! while (oidx) ! free (oldnames[--oidx]); ! free (oldnames); ! #endif /* If only one is acceptable, copy it to names[0] and return. */ --- 2065,2086 ---- if (nidx == 1) { ! if (force_fignore) ! { ! free (names[0]); ! names[0] = (char *)NULL; ! } ! else ! free (oldnames); ! free (newnames); return; } ! if (force_fignore == 0) ! { ! while (oidx) ! free (oldnames[--oidx]); ! free (oldnames); ! } /* If only one is acceptable, copy it to names[0] and return. */ *************** *** 2083,2086 **** --- 2197,2201 ---- int return_value, should_expand_dirname; WORD_LIST *wl; + struct stat sb; return_value = should_expand_dirname = 0; *************** *** 2100,2103 **** --- 2215,2225 ---- #endif + #if defined (HAVE_LSTAT) + if (should_expand_dirname && lstat (local_dirname, &sb) == 0) + #else + if (should_expand_dirname && stat (local_dirname, &sb) == 0) + #endif + should_expand_dirname = 0; + if (should_expand_dirname) { *************** *** 2296,2300 **** rl_completion_func_t *orig_attempt_func; rl_icppfunc_t *orig_dir_func; ! const char *orig_rl_completer_word_break_characters; int r; --- 2418,2422 ---- rl_completion_func_t *orig_attempt_func; rl_icppfunc_t *orig_dir_func; ! /*const*/ char *orig_rl_completer_word_break_characters; int r; *************** *** 2453,2457 **** rl_quote_func_t *orig_quoting_function; ! rl_explicit_arg = 1; /* force `*' append */ orig_quoting_function = rl_filename_quoting_function; rl_filename_quoting_function = bash_glob_quote_filename; --- 2575,2580 ---- rl_quote_func_t *orig_quoting_function; ! if (rl_editing_mode == EMACS_EDITING_MODE) ! rl_explicit_arg = 1; /* force `*' append */ orig_quoting_function = rl_filename_quoting_function; rl_filename_quoting_function = bash_glob_quote_filename; *************** *** 2501,2504 **** --- 2624,2684 ---- #endif /* SPECIFIC_COMPLETION_FUNCTIONS */ + #if defined (VI_MODE) + /* Completion, from vi mode's point of view. This is a modified version of + rl_vi_complete which uses the bash globbing code to implement what POSIX + specifies, which is to append a `*' and attempt filename generation (which + has the side effect of expanding any globbing characters in the word). */ + static int + bash_vi_complete (count, key) + int count, key; + { + #if defined (SPECIFIC_COMPLETION_FUNCTIONS) + int p, r; + char *t; + + if ((rl_point < rl_end) && (!whitespace (rl_line_buffer[rl_point]))) + { + if (!whitespace (rl_line_buffer[rl_point + 1])) + rl_vi_end_word (1, 'E'); + rl_point++; + } + + /* Find boundaries of current word, according to vi definition of a + `bigword'. */ + t = 0; + if (rl_point > 0) + { + p = rl_point; + rl_vi_bWord (1, 'B'); + r = rl_point; + rl_point = p; + p = r; + + t = substring (rl_line_buffer, p, rl_point); + } + + if (t && glob_pattern_p (t) == 0) + rl_explicit_arg = 1; /* XXX - force glob_complete_word to append `*' */ + FREE (t); + + if (key == '*') /* Expansion and replacement. */ + r = bash_glob_expand_word (count, key); + else if (key == '=') /* List possible completions. */ + r = bash_glob_list_expansions (count, key); + else if (key == '\\') /* Standard completion */ + r = bash_glob_complete_word (count, key); + else + r = rl_complete (0, key); + + if (key == '*' || key == '\\') + rl_vi_start_inserting (key, 1, 1); + + return (r); + #else + return rl_vi_complete (count, key); + #endif /* !SPECIFIC_COMPLETION_FUNCTIONS */ + } + #endif /* VI_MODE */ + /* Filename quoting for completion. */ /* A function to strip unquoted quote characters (single quotes, double *************** *** 2680,2685 **** register int i; char *cmd; ! int old_line_count; ! int *ts; /* First, we need to find the right command to execute. This is tricky, --- 2860,2864 ---- register int i; char *cmd; ! sh_parser_state_t ps; /* First, we need to find the right command to execute. This is tricky, *************** *** 2699,2703 **** { rl_crlf (); ! internal_error ("bash_execute_unix_command: cannot find keymap for command"); rl_forced_update_display (); return 1; --- 2878,2882 ---- { rl_crlf (); ! internal_error (_("bash_execute_unix_command: cannot find keymap for command")); rl_forced_update_display (); return 1; *************** *** 2717,2728 **** rl_crlf (); /* move to a new line */ ! old_line_count = current_command_line_count; ! ts = save_token_state (); cmd = savestring (cmd); parse_and_execute (cmd, "bash_execute_unix_command", SEVAL_NOHIST); ! current_command_line_count = old_line_count; ! restore_token_state (ts); /* and restore the readline buffer and display after command execution. */ --- 2896,2905 ---- rl_crlf (); /* move to a new line */ ! save_parser_state (&ps); cmd = savestring (cmd); parse_and_execute (cmd, "bash_execute_unix_command", SEVAL_NOHIST); ! restore_parser_state (&ps); /* and restore the readline buffer and display after command execution. */ *************** *** 2750,2754 **** if (need_dquote && string[i] != '"') { ! builtin_error ("%s: first non-whitespace character is not `\"'", string); return -1; } --- 2927,2931 ---- if (need_dquote && string[i] != '"') { ! builtin_error (_("%s: first non-whitespace character is not `\"'"), string); return -1; } *************** *** 2779,2783 **** if (delim && string[i] != delim) { ! builtin_error ("%s: no closing `%c'", string, delim); return -1; } --- 2956,2960 ---- if (delim && string[i] != delim) { ! builtin_error (_("no closing `%c' in %s"), delim, string); return -1; } *************** *** 2813,2817 **** if (line[i] != ':') { ! builtin_error ("%s: missing colon separator", line); return -1; } --- 2990,2994 ---- if (line[i] != ':') { ! builtin_error (_("%s: missing colon separator"), line); return -1; } *************** *** 2829,2833 **** /* and bind the key sequence in the current keymap to a function that understands how to execute from CMD_XMAP */ ! rl_set_key (kseq, bash_execute_unix_command, kmap); return 0; --- 3006,3010 ---- /* and bind the key sequence in the current keymap to a function that understands how to execute from CMD_XMAP */ ! rl_bind_keyseq_in_map (kseq, bash_execute_unix_command, kmap); return 0; *************** *** 2845,2849 **** --- 3022,3030 ---- int qc; + #if 0 qc = (text[0] == '"' || text[0] == '\'') ? text[0] : 0; + #else + qc = rl_dispatching ? rl_completion_quote_character : 0; + #endif dfn = bash_dequote_filename ((char *)text, qc); m1 = rl_completion_matches (dfn, rl_filename_completion_function); *************** *** 2857,2860 **** --- 3038,3053 ---- (void)bash_ignore_filenames (m1); return m1; + } + + char * + bash_dequote_text (text) + const char *text; + { + char *dtxt; + int qc; + + qc = (text[0] == '"' || text[0] == '\'') ? text[0] : 0; + dtxt = bash_dequote_filename ((char *)text, qc); + return (dtxt); } #endif /* READLINE */ diff -aNrc2 bash-2.05b-patched/bashline.h bash-3.0/bashline.h *** bash-2.05b-patched/bashline.h Tue Mar 5 13:10:20 2002 --- bash-3.0/bashline.h Fri Apr 25 18:17:07 2003 *************** *** 34,37 **** --- 34,39 ---- extern int bind_keyseq_to_unix_command __P((char *)); + extern char **bash_default_completion __P((const char *, int, int, int, int)); + /* Used by programmable completion code. */ extern char *command_word_completion_function __P((const char *, int)); *************** *** 43,46 **** --- 45,49 ---- extern char **bash_directory_completion_matches __P((const char *)); + extern char *bash_dequote_text __P((const char *)); #endif /* _BASHLINE_H_ */ diff -aNrc2 bash-2.05b-patched/braces.c bash-3.0/braces.c *** bash-2.05b-patched/braces.c Mon May 6 13:50:40 2002 --- bash-3.0/braces.c Thu Dec 4 11:09:52 2003 *************** *** 1,5 **** /* braces.c -- code for doing word expansion in curly braces. */ ! /* Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,5 ---- /* braces.c -- code for doing word expansion in curly braces. */ ! /* Copyright (C) 1987-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 40,46 **** --- 40,49 ---- #include "general.h" #include "shmbutil.h" + #include "chartypes.h" #define brace_whitespace(c) (!(c) || (c) == ' ' || (c) == '\t' || (c) == '\n') + #define BRACE_SEQ_SPECIFIER ".." + /* Basic idea: *************** *** 57,65 **** #if defined (__P) static int brace_gobbler __P((char *, size_t, int *, int)); ! static char **expand_amble __P((char *, size_t)); static char **array_concat __P((char **, char **)); #else static int brace_gobbler (); static char **expand_amble (); static char **array_concat (); #endif --- 60,72 ---- #if defined (__P) static int brace_gobbler __P((char *, size_t, int *, int)); ! static char **expand_amble __P((char *, size_t, int)); ! static char **expand_seqterm __P((char *, size_t)); ! static char **mkseq __P((int, int, int)); static char **array_concat __P((char **, char **)); #else static int brace_gobbler (); static char **expand_amble (); + static char **expand_seqterm (); + static char **mkseq(); static char **array_concat (); #endif *************** *** 118,124 **** if (text[j] == brace_arg_separator) ! { strvec_dispose (result); ! report_error ("missing `}'"); throw_to_top_level (); } --- 125,131 ---- if (text[j] == brace_arg_separator) ! { /* { */ strvec_dispose (result); ! report_error ("no closing `%c' in %s", '}', text); throw_to_top_level (); } *************** *** 162,181 **** } ! if (!amble[j]) { ! free (amble); ! free (preamble); ! result[0] = savestring (text); ! return (result); } #endif /* SHELL */ ! postamble = &text[i + 1]; ! ! tack = expand_amble (amble, alen); result = array_concat (result, tack); free (amble); strvec_dispose (tack); tack = brace_expand (postamble); result = array_concat (result, tack); --- 169,195 ---- } ! if (amble[j] == 0) { ! tack = expand_seqterm (amble, alen); ! if (tack) ! goto add_tack; ! else ! { ! free (amble); ! free (preamble); ! result[0] = savestring (text); ! return (result); ! } } #endif /* SHELL */ ! tack = expand_amble (amble, alen, 0); ! add_tack: result = array_concat (result, tack); free (amble); strvec_dispose (tack); + postamble = text + i + 1; + tack = brace_expand (postamble); result = array_concat (result, tack); *************** *** 190,196 **** need it. */ static char ** ! expand_amble (text, tlen) char *text; size_t tlen; { char **result, **partial; --- 204,211 ---- need it. */ static char ** ! expand_amble (text, tlen, flags) char *text; size_t tlen; + int flags; { char **result, **partial; *************** *** 221,227 **** else { ! register int lr = strvec_len (result); ! register int lp = strvec_len (partial); ! register int j; result = strvec_resize (result, lp + lr + 1); --- 236,243 ---- else { ! register int lr, lp, j; ! ! lr = strvec_len (result); ! lp = strvec_len (partial); result = strvec_resize (result, lp + lr + 1); *************** *** 240,243 **** --- 256,361 ---- } + #define ST_BAD 0 + #define ST_INT 1 + #define ST_CHAR 2 + + static char ** + mkseq (start, end, type) + int start, end, type; + { + int n, incr, i; + char **result, *t; + + n = abs (end - start) + 1; + result = strvec_create (n + 1); + + incr = (start < end) ? 1 : -1; + + /* Make sure we go through the loop at least once, so {3..3} prints `3' */ + i = 0; + n = start; + do + { + if (type == ST_INT) + result[i++] = itos (n); + else + { + t = (char *)xmalloc (2); + t[0] = n; + t[1] = '\0'; + result[i++] = t; + } + if (n == end) + break; + n += incr; + } + while (1); + + result[i] = (char *)0; + return (result); + } + + static char ** + expand_seqterm (text, tlen) + char *text; + size_t tlen; + { + char *t, *lhs, *rhs; + int i, lhs_t, rhs_t, lhs_v, rhs_v; + intmax_t tl, tr; + char **result; + + t = strstr (text, BRACE_SEQ_SPECIFIER); + if (t == 0) + return ((char **)NULL); + + i = t - text; /* index of start of BRACE_SEQ_SPECIFIER */ + lhs = substring (text, 0, i); + rhs = substring (text, i + sizeof(BRACE_SEQ_SPECIFIER) - 1, tlen); + + if (lhs[0] == 0 || rhs[0] == 0) + { + free (lhs); + free (rhs); + return ((char **)NULL); + } + + /* Now figure out whether LHS and RHS are integers or letters. Both + sides have to match. */ + lhs_t = (legal_number (lhs, &tl)) ? ST_INT : + ((ISALPHA (lhs[0]) && lhs[1] == 0) ? ST_CHAR : ST_BAD); + rhs_t = (legal_number (rhs, &tr)) ? ST_INT : + ((ISALPHA (rhs[0]) && rhs[1] == 0) ? ST_CHAR : ST_BAD); + + if (lhs_t != rhs_t || lhs_t == ST_BAD || rhs_t == ST_BAD) + { + free (lhs); + free (rhs); + return ((char **)NULL); + } + + /* OK, we have something. It's either a sequence of integers, ascending + or descending, or a sequence or letters, ditto. Generate the sequence, + put it into a string vector, and return it. */ + + if (lhs_t == ST_CHAR) + { + lhs_v = lhs[0]; + rhs_v = rhs[0]; + } + else + { + lhs_v = tl; /* integer truncation */ + rhs_v = tr; + } + + result = mkseq (lhs_v, rhs_v, lhs_t); + + free (lhs); + free (rhs); + + return (result); + } + /* Start at INDEX, and skip characters in TEXT. Set INDEX to the index of the character matching SATISFY. This understands about *************** *** 279,282 **** --- 397,410 ---- } + #if defined (SHELL) + /* If compiling for the shell, treat ${...} like \{...} */ + if (c == '$' && text[i+1] == '{' && quoted != '\'') /* } */ + { + pass_next = 1; + i++; + continue; + } + #endif + if (quoted) { *************** *** 319,327 **** continue; } ! #if defined (SHELL) ! /* If this is being compiled as part of bash, ignore the `{' ! in a `${}' construct */ ! if ((c != '{') || i == 0 || (text[i - 1] != '$')) ! #endif /* SHELL */ break; } --- 447,451 ---- continue; } ! break; } *************** *** 369,374 **** for (j = 0; j < len2; j++) { ! result[len] = ! (char *)xmalloc (1 + strlen_1 + strlen (arr2[j])); strcpy (result[len], arr1[i]); strcpy (result[len] + strlen_1, arr2[j]); --- 493,497 ---- for (j = 0; j < len2; j++) { ! result[len] = (char *)xmalloc (1 + strlen_1 + strlen (arr2[j])); strcpy (result[len], arr1[i]); strcpy (result[len] + strlen_1, arr2[j]); diff -aNrc2 bash-2.05b-patched/builtins/Makefile.in bash-3.0/builtins/Makefile.in *** bash-2.05b-patched/builtins/Makefile.in Tue Apr 23 09:24:23 2002 --- bash-3.0/builtins/Makefile.in Wed Jan 21 14:22:50 2004 *************** *** 1,5 **** # This Makefile for building libbuiltins.a is in -*- text -*- for Emacs. # ! # Copyright (C) 1996 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify --- 1,5 ---- # This Makefile for building libbuiltins.a is in -*- text -*- for Emacs. # ! # Copyright (C) 1996-2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify *************** *** 17,20 **** --- 17,26 ---- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + PACKAGE = @PACKAGE@ + PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + # SHELL = @MAKE_SHELL@ *************** *** 36,39 **** --- 42,46 ---- includedir = @includedir@ datadir = @datadir@ + localedir = $(datadir)/locale # Support an alternate destination root directory for package building *************** *** 44,47 **** --- 51,56 ---- BUILD_DIR = @BUILD_DIR@ + LIBBUILD = ${BUILD_DIR}/lib + PROFILE_FLAGS = @PROFILE_FLAGS@ CFLAGS = @CFLAGS@ *************** *** 64,71 **** RL_INCLUDEDIR = @RL_INCLUDEDIR@ HELPDIR = @HELPDIR@ MKDIRS = ${topdir}/support/mkdirs ! INCLUDES = -I. -I.. @RL_INCLUDE@ -I$(topdir) -I$(BASHINCDIR) -I$(topdir)/lib -I$(srcdir) BASE_CCFLAGS = ${PROFILE_FLAGS} $(DEFS) $(LOCAL_DEFS) $(SYSTEM_FLAGS) \ --- 73,85 ---- RL_INCLUDEDIR = @RL_INCLUDEDIR@ + INTL_LIBSRC = ${topdir}/lib/intl + INTL_BUILDDIR = ${LIBBUILD}/intl + INTL_INC = @INTL_INC@ + LIBINTL_H = @LIBINTL_H@ + HELPDIR = @HELPDIR@ MKDIRS = ${topdir}/support/mkdirs ! INCLUDES = -I. -I.. @RL_INCLUDE@ -I$(topdir) -I$(BASHINCDIR) -I$(topdir)/lib -I$(srcdir) ${INTL_INC} BASE_CCFLAGS = ${PROFILE_FLAGS} $(DEFS) $(LOCAL_DEFS) $(SYSTEM_FLAGS) \ *************** *** 107,111 **** DEFSRC = $(srcdir)/alias.def $(srcdir)/bind.def $(srcdir)/break.def \ ! $(srcdir)/builtin.def $(srcdir)/cd.def $(srcdir)/colon.def \ $(srcdir)/command.def $(srcdir)/declare.def $(srcdir)/echo.def \ $(srcdir)/enable.def $(srcdir)/eval.def $(srcdir)/getopts.def \ --- 121,126 ---- DEFSRC = $(srcdir)/alias.def $(srcdir)/bind.def $(srcdir)/break.def \ ! $(srcdir)/builtin.def $(srcdir)/caller.def \ ! $(srcdir)/cd.def $(srcdir)/colon.def \ $(srcdir)/command.def $(srcdir)/declare.def $(srcdir)/echo.def \ $(srcdir)/enable.def $(srcdir)/eval.def $(srcdir)/getopts.def \ *************** *** 125,129 **** OFILES = builtins.o \ ! alias.o bind.o break.o builtin.o cd.o colon.o command.o \ common.o declare.o echo.o enable.o eval.o evalfile.o \ evalstring.o exec.o \ --- 140,144 ---- OFILES = builtins.o \ ! alias.o bind.o break.o builtin.o caller.o cd.o colon.o command.o \ common.o declare.o echo.o enable.o eval.o evalfile.o \ evalstring.o exec.o \ *************** *** 215,222 **** --- 230,247 ---- $(OFILES): $(MKBUILTINS) ../config.h + ../version.h: ../config.h ../Makefile Makefile + -( cd ${BUILD_DIR} && ${MAKE} ${MFLAGS} version.h ) + + # maintainer special - for now + po: builtins.c + xgettext -L C -o $(topdir)/po/builtins.pot --keyword='N_' builtins.c 2>/dev/null + + # dependencies + alias.o: alias.def bind.o: bind.def break.o: break.def builtin.o: builtin.def + caller.o: caller.def cd.o: cd.def colon.o: colon.def *************** *** 264,268 **** bashgetopt.o: $(topdir)/unwind_prot.h $(topdir)/dispose_cmd.h bashgetopt.o: $(topdir)/make_cmd.h $(topdir)/subst.h $(topdir)/sig.h ! bashgetopt.o: $(topdir)/pathnames.h $(topdir)/externs.h $(srcdir)/common.h bashgetopt.o: $(BASHINCDIR)/chartypes.h common.o: $(topdir)/bashtypes.h $(BASHINCDIR)/posixstat.h $(topdir)/bashansi.h $(BASHINCDIR)/ansi_stdlib.h --- 289,293 ---- bashgetopt.o: $(topdir)/unwind_prot.h $(topdir)/dispose_cmd.h bashgetopt.o: $(topdir)/make_cmd.h $(topdir)/subst.h $(topdir)/sig.h ! bashgetopt.o: ../pathnames.h $(topdir)/externs.h $(srcdir)/common.h bashgetopt.o: $(BASHINCDIR)/chartypes.h common.o: $(topdir)/bashtypes.h $(BASHINCDIR)/posixstat.h $(topdir)/bashansi.h $(BASHINCDIR)/ansi_stdlib.h *************** *** 275,279 **** common.o: $(topdir)/builtins.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h common.o: $(topdir)/subst.h $(topdir)/execute_cmd.h $(topdir)/error.h ! common.o: $(topdir)/externs.h $(topdir)/pathnames.h ./builtext.h common.o: $(BASHINCDIR)/chartypes.h evalfile.o: $(topdir)/bashtypes.h $(BASHINCDIR)/posixstat.h ${BASHINCDIR}/filecntl.h --- 300,304 ---- common.o: $(topdir)/builtins.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h common.o: $(topdir)/subst.h $(topdir)/execute_cmd.h $(topdir)/error.h ! common.o: $(topdir)/externs.h ../pathnames.h ./builtext.h common.o: $(BASHINCDIR)/chartypes.h evalfile.o: $(topdir)/bashtypes.h $(BASHINCDIR)/posixstat.h ${BASHINCDIR}/filecntl.h *************** *** 284,288 **** evalfile.o: $(topdir)/unwind_prot.h $(topdir)/dispose_cmd.h evalfile.o: $(topdir)/make_cmd.h $(topdir)/subst.h $(topdir)/sig.h ! evalfile.o: $(topdir)/pathnames.h $(topdir)/externs.h evalfile.o: $(topdir)/jobs.h $(topdir)/builtins.h $(topdir)/flags.h evalfile.o: $(topdir)/input.h $(topdir)/execute_cmd.h --- 309,313 ---- evalfile.o: $(topdir)/unwind_prot.h $(topdir)/dispose_cmd.h evalfile.o: $(topdir)/make_cmd.h $(topdir)/subst.h $(topdir)/sig.h ! evalfile.o: ../pathnames.h $(topdir)/externs.h evalfile.o: $(topdir)/jobs.h $(topdir)/builtins.h $(topdir)/flags.h evalfile.o: $(topdir)/input.h $(topdir)/execute_cmd.h *************** *** 304,309 **** getopt.o: $(topdir)/quit.h $(BASHINCDIR)/maxpath.h $(topdir)/unwind_prot.h getopt.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h ! getopt.o: $(topdir)/sig.h $(topdir)/pathnames.h $(topdir)/externs.h ! getopt.o: $(srcdir)/getopt.h mkbuiltins.o: ../config.h $(topdir)/bashtypes.h $(BASHINCDIR)/posixstat.h mkbuiltins.o: ${BASHINCDIR}/filecntl.h --- 329,334 ---- getopt.o: $(topdir)/quit.h $(BASHINCDIR)/maxpath.h $(topdir)/unwind_prot.h getopt.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h ! getopt.o: $(topdir)/sig.h ../pathnames.h $(topdir)/externs.h ! getopt.o: $(srcdir)/getopt.h mkbuiltins.o: ../config.h $(topdir)/bashtypes.h $(BASHINCDIR)/posixstat.h mkbuiltins.o: ${BASHINCDIR}/filecntl.h *************** *** 332,335 **** --- 357,366 ---- builtin.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h builtin.o: $(srcdir)/bashgetopt.h + caller.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h + caller.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/quit.h $(topdir)/dispose_cmd.h + caller.o: $(topdir)/make_cmd.h $(topdir)/subst.h $(topdir)/externs.h + caller.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h + caller.o: $(srcdir)/common.h $(BASHINCDIR)/maxpath.h ./builtext.h + caller.o: ${BASHINCDIR}/chartypes.h $(topdir)/bashtypes.h cd.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h cd.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/quit.h $(topdir)/dispose_cmd.h *************** *** 348,351 **** --- 379,383 ---- declare.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h declare.o: $(topdir)/arrayfunc.h $(srcdir)/bashgetopt.h + declare.o: ./builtext.h echo.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h echo.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/subst.h $(topdir)/externs.h *************** *** 363,367 **** eval.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h eval.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h ! eval.o: $(topdir)/subst.h $(topdir)/externs.h eval.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h eval.o: $(BASHINCDIR)/maxpath.h --- 395,399 ---- eval.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h eval.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h ! eval.o: $(topdir)/subst.h $(topdir)/externs.h eval.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h eval.o: $(BASHINCDIR)/maxpath.h *************** *** 378,382 **** exit.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h exit.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h ! exit.o: $(topdir)/subst.h $(topdir)/externs.h exit.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h exit.o: $(BASHINCDIR)/maxpath.h ./builtext.h --- 410,414 ---- exit.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h exit.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h ! exit.o: $(topdir)/subst.h $(topdir)/externs.h exit.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h exit.o: $(BASHINCDIR)/maxpath.h ./builtext.h *************** *** 417,421 **** history.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h history.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h ! history.o: $(topdir)/subst.h $(topdir)/externs.h history.o: ${BASHINCDIR}/filecntl.h $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h history.o: $(topdir)/variables.h $(topdir)/conftypes.h $(topdir)/bashhist.h $(BASHINCDIR)/maxpath.h --- 449,453 ---- history.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h history.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h ! history.o: $(topdir)/subst.h $(topdir)/externs.h history.o: ${BASHINCDIR}/filecntl.h $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h history.o: $(topdir)/variables.h $(topdir)/conftypes.h $(topdir)/bashhist.h $(BASHINCDIR)/maxpath.h *************** *** 427,431 **** jobs.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h jobs.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/quit.h $(srcdir)/bashgetopt.h ! jobs.o: $(BASHINCDIR)/maxpath.h $(topdir)/externs.h jobs.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h jobs.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h --- 459,463 ---- jobs.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h jobs.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/quit.h $(srcdir)/bashgetopt.h ! jobs.o: $(BASHINCDIR)/maxpath.h $(topdir)/externs.h jobs.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h jobs.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h *************** *** 444,448 **** printf.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h printf.o: $(topdir)/subst.h $(topdir)/externs.h $(topdir)/sig.h ! printf.o: $(topdir)/pathnames.h $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h printf.o: $(topdir)/variables.h $(topdir)/conftypes.h $(BASHINCDIR)/stdc.h $(srcdir)/bashgetopt.h printf.o: $(topdir)/bashtypes.h ${srcdir}/common.h $(BASHINCDIR)/chartypes.h --- 476,480 ---- printf.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h printf.o: $(topdir)/subst.h $(topdir)/externs.h $(topdir)/sig.h ! printf.o: ../pathnames.h $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h printf.o: $(topdir)/variables.h $(topdir)/conftypes.h $(BASHINCDIR)/stdc.h $(srcdir)/bashgetopt.h printf.o: $(topdir)/bashtypes.h ${srcdir}/common.h $(BASHINCDIR)/chartypes.h *************** *** 450,454 **** pushd.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h pushd.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h ! pushd.o: $(topdir)/subst.h $(topdir)/externs.h pushd.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h pushd.o: $(BASHINCDIR)/maxpath.h $(srcdir)/common.h ./builtext.h --- 482,486 ---- pushd.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h pushd.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h ! pushd.o: $(topdir)/subst.h $(topdir)/externs.h pushd.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h pushd.o: $(BASHINCDIR)/maxpath.h $(srcdir)/common.h ./builtext.h *************** *** 475,479 **** setattr.o: $(topdir)/quit.h $(srcdir)/common.h $(srcdir)/bashgetopt.h setattr.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h ! setattr.o: $(topdir)/externs.h setattr.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h setattr.o: $(topdir)/arrayfunc.h --- 507,511 ---- setattr.o: $(topdir)/quit.h $(srcdir)/common.h $(srcdir)/bashgetopt.h setattr.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h ! setattr.o: $(topdir)/externs.h setattr.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h setattr.o: $(topdir)/arrayfunc.h *************** *** 488,492 **** source.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h source.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h ! source.o: $(srcdir)/bashgetopt.h suspend.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h suspend.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h --- 520,524 ---- source.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h source.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h ! source.o: $(srcdir)/bashgetopt.h $(topdir)/flags.h $(topdir)/trap.h suspend.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h suspend.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h *************** *** 542,546 **** shopt.o: $(srcdir)/common.h $(srcdir)/bashgetopt.h ! complete.o: ../config.h complete.o: ${topdir}/shell.h $(topdir)/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h ${topdir}/sig.h complete.o: ${topdir}/unwind_prot.h ${topdir}/variables.h --- 574,578 ---- shopt.o: $(srcdir)/common.h $(srcdir)/bashgetopt.h ! complete.o: ../config.h complete.o: ${topdir}/shell.h $(topdir)/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h ${topdir}/sig.h complete.o: ${topdir}/unwind_prot.h ${topdir}/variables.h *************** *** 551,552 **** --- 583,621 ---- #bind.o: $(RL_LIBSRC)chardefs.h $(RL_LIBSRC)readline.h $(RL_LIBSRC)keymaps.h + + # libintl dependencies + bind.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + break.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + caller.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + cd.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + common.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + complete.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + declare.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + enable.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + evalfile.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + exec.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + exit.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + fc.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + fg_bg.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + getopt.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + hash.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + help.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + history.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + inlib.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + jobs.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + kill.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + let.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + mkbuiltins.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + printf.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + pushd.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + read.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + return.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + set.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + setattr.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + shift.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + shopt.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + source.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + suspend.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + type.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + ulimit.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h + umask.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h diff -aNrc2 bash-2.05b-patched/builtins/alias.def bash-3.0/builtins/alias.def *** bash-2.05b-patched/builtins/alias.def Tue Mar 19 11:41:57 2002 --- bash-3.0/builtins/alias.def Thu Apr 22 10:48:43 2004 *************** *** 2,6 **** It implements the builtins "alias" and "unalias" in Bash. ! Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the builtins "alias" and "unalias" in Bash. ! Copyright (C) 1987-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 45,48 **** --- 45,49 ---- # include "../bashansi.h" + # include "../bashintl.h" # include *************** *** 52,56 **** # include "bashgetopt.h" ! static void print_alias __P((alias_t *)); /* Hack the alias command in a Korn shell way. */ --- 53,62 ---- # include "bashgetopt.h" ! /* Flags for print_alias */ ! #define AL_REUSABLE 0x01 ! ! static void print_alias __P((alias_t *, int)); ! ! extern int posixly_correct; /* Hack the alias command in a Korn shell way. */ *************** *** 59,66 **** WORD_LIST *list; { ! int any_failed, offset, pflag; alias_t **alias_list, *t; char *name, *value; pflag = 0; reset_internal_getopt (); --- 65,73 ---- WORD_LIST *list; { ! int any_failed, offset, pflag, dflags; alias_t **alias_list, *t; char *name, *value; + dflags = posixly_correct ? 0 : AL_REUSABLE; pflag = 0; reset_internal_getopt (); *************** *** 71,74 **** --- 78,82 ---- case 'p': pflag = 1; + dflags |= AL_REUSABLE; break; default: *************** *** 91,95 **** for (offset = 0; alias_list[offset]; offset++) ! print_alias (alias_list[offset]); free (alias_list); /* XXX - Do not free the strings. */ --- 99,103 ---- for (offset = 0; alias_list[offset]; offset++) ! print_alias (alias_list[offset], dflags); free (alias_list); /* XXX - Do not free the strings. */ *************** *** 112,116 **** value = name + offset + 1; ! add_alias (name, value); } else --- 120,130 ---- value = name + offset + 1; ! if (legal_alias_name (name, 0) == 0) ! { ! builtin_error (_("`%s': invalid alias name"), name); ! any_failed++; ! } ! else ! add_alias (name, value); } else *************** *** 118,122 **** t = find_alias (name); if (t) ! print_alias (t); else { --- 132,136 ---- t = find_alias (name); if (t) ! print_alias (t, dflags); else { *************** *** 135,139 **** $FUNCTION unalias_builtin $DEPENDS_ON ALIAS ! $SHORT_DOC unalias [-a] [name ...] Remove NAMEs from the list of defined aliases. If the -a option is given, then remove all alias definitions. --- 149,153 ---- $FUNCTION unalias_builtin $DEPENDS_ON ALIAS ! $SHORT_DOC unalias [-a] name [name ...] Remove NAMEs from the list of defined aliases. If the -a option is given, then remove all alias definitions. *************** *** 172,175 **** --- 186,195 ---- } + if (list == 0) + { + builtin_usage (); + return (EX_USAGE); + } + aflag = 0; while (list) *************** *** 193,203 **** /* Output ALIAS in such a way as to allow it to be read back in. */ static void ! print_alias (alias) alias_t *alias; { char *value; value = sh_single_quote (alias->value); ! printf ("alias %s=%s\n", alias->name, value); free (value); --- 213,226 ---- /* Output ALIAS in such a way as to allow it to be read back in. */ static void ! print_alias (alias, flags) alias_t *alias; + int flags; { char *value; value = sh_single_quote (alias->value); ! if (flags & AL_REUSABLE) ! printf ("alias "); ! printf ("%s=%s\n", alias->name, value); free (value); diff -aNrc2 bash-2.05b-patched/builtins/bind.def bash-3.0/builtins/bind.def *** bash-2.05b-patched/builtins/bind.def Thu Apr 4 11:24:15 2002 --- bash-3.0/builtins/bind.def Fri Dec 19 17:56:34 2003 *************** *** 2,6 **** It implements the builtin "bind" in Bash. ! Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the builtin "bind" in Bash. ! Copyright (C) 1987-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 73,76 **** --- 73,78 ---- #include + #include "../bashintl.h" + #include "../shell.h" #include "../bashline.h" *************** *** 190,194 **** if (!kmap) { ! builtin_error ("`%s': invalid keymap name", map_name); BIND_RETURN (EXECUTION_FAILURE); } --- 192,196 ---- if (!kmap) { ! builtin_error (_("`%s': invalid keymap name"), map_name); BIND_RETURN (EXECUTION_FAILURE); } *************** *** 229,233 **** if (rl_read_init_file (initfile) != 0) { ! builtin_error ("%s: cannot read: %s", initfile, strerror (errno)); BIND_RETURN (EXECUTION_FAILURE); } --- 231,235 ---- if (rl_read_init_file (initfile) != 0) { ! builtin_error (_("%s: cannot read: %s"), initfile, strerror (errno)); BIND_RETURN (EXECUTION_FAILURE); } *************** *** 244,248 **** if (rl_set_key (remove_seq, (rl_command_func_t *)NULL, rl_get_keymap ()) != 0) { ! builtin_error ("`%s': cannot unbind", remove_seq); BIND_RETURN (EXECUTION_FAILURE); } --- 246,250 ---- if (rl_set_key (remove_seq, (rl_command_func_t *)NULL, rl_get_keymap ()) != 0) { ! builtin_error (_("`%s': cannot unbind"), remove_seq); BIND_RETURN (EXECUTION_FAILURE); } *************** *** 279,283 **** if (function == 0) { ! builtin_error ("`%s': unknown function name", name); return EXECUTION_FAILURE; } --- 281,285 ---- if (function == 0) { ! builtin_error (_("`%s': unknown function name"), name); return EXECUTION_FAILURE; } *************** *** 287,295 **** if (!keyseqs) { ! printf ("%s is not bound to any keys.\n", name); return EXECUTION_FAILURE; } ! printf ("%s can be invoked via ", name); for (j = 0; j < 5 && keyseqs[j]; j++) printf ("\"%s\"%s", keyseqs[j], keyseqs[j + 1] ? ", " : ".\n"); --- 289,297 ---- if (!keyseqs) { ! printf (_("%s is not bound to any keys.\n"), name); return EXECUTION_FAILURE; } ! printf (_("%s can be invoked via "), name); for (j = 0; j < 5 && keyseqs[j]; j++) printf ("\"%s\"%s", keyseqs[j], keyseqs[j + 1] ? ", " : ".\n"); diff -aNrc2 bash-2.05b-patched/builtins/break.def bash-3.0/builtins/break.def *** bash-2.05b-patched/builtins/break.def Tue Mar 19 14:03:59 2002 --- bash-3.0/builtins/break.def Fri Dec 19 17:56:38 2003 *************** *** 2,6 **** It implements the builtins "break" and "continue" in Bash. ! Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the builtins "break" and "continue" in Bash. ! Copyright (C) 1987-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 37,40 **** --- 37,42 ---- #endif + #include "../bashintl.h" + #include "../shell.h" #include "common.h" *************** *** 124,128 **** #if defined (BREAK_COMPLAINS) if (loop_level == 0 && posixly_correct == 0) ! builtin_error ("only meaningful in a `for', `while', or `until' loop"); #endif /* BREAK_COMPLAINS */ --- 126,130 ---- #if defined (BREAK_COMPLAINS) if (loop_level == 0 && posixly_correct == 0) ! builtin_error (_("only meaningful in a `for', `while', or `until' loop")); #endif /* BREAK_COMPLAINS */ diff -aNrc2 bash-2.05b-patched/builtins/builtin.def bash-3.0/builtins/builtin.def *** bash-2.05b-patched/builtins/builtin.def Mon Apr 8 13:19:08 2002 --- bash-3.0/builtins/builtin.def Thu Dec 4 10:32:13 2003 *************** *** 69,73 **** if (!function) { ! builtin_error ("%s: not a shell builtin", command); return (EXECUTION_FAILURE); } --- 69,73 ---- if (!function) { ! sh_notbuiltin (command); return (EXECUTION_FAILURE); } diff -aNrc2 bash-2.05b-patched/builtins/caller.def bash-3.0/builtins/caller.def *** bash-2.05b-patched/builtins/caller.def Wed Dec 31 19:00:00 1969 --- bash-3.0/builtins/caller.def Fri Dec 19 17:56:47 2003 *************** *** 0 **** --- 1,147 ---- + This file is caller.def, from which is created caller.c. It implements the + builtin "caller" in Bash. + + Copyright (C) 2002-2003 Rocky Bernstein for Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software; you can 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. + + Bash is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License along + with Bash; see the file COPYING. If not, write to the Free Software + Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. + + $PRODUCES caller.c + + $BUILTIN caller + $FUNCTION caller_builtin + $DEPENDS_ON DEBUGGER + $SHORT_DOC caller [EXPR] + + Returns the context of the current subroutine call. + + Without EXPR, returns returns "$line $filename". With EXPR, + returns "$line $subroutine $filename"; this extra information + can be used used to provide a stack trace. + + The value of EXPR indicates how many call frames to go back before the + current one; the top frame is frame 0. + $END + + #include + #include + #include "chartypes.h" + #include "bashtypes.h" + + #if defined (HAVE_UNISTD_H) + # ifdef _MINIX + # include + # endif + # include + #endif + + #include + + #include "../bashintl.h" + + #include "../shell.h" + #include "common.h" + #include "builtext.h" + + #ifdef LOADABLE_BUILTIN + # include "builtins.h" + #endif + + #if !defined (errno) + extern int errno; + #endif /* !errno */ + + int + caller_builtin (list) + WORD_LIST *list; + { + #if !defined (ARRAY_VARS) + printf ("1 NULL\n"); + return (EXECUTION_FAILURE); + #else + SHELL_VAR *funcname_v, *bash_source_v, *bash_lineno_v; + ARRAY *funcname_a, *bash_source_a, *bash_lineno_a; + char *funcname_s, *source_s, *lineno_s; + ARRAY_ELEMENT *ae; + intmax_t num; + + GET_ARRAY_FROM_VAR ("FUNCNAME", funcname_v, funcname_a); + GET_ARRAY_FROM_VAR ("BASH_SOURCE", bash_source_v, bash_source_a); + GET_ARRAY_FROM_VAR ("BASH_LINENO", bash_lineno_v, bash_lineno_a); + + if (bash_lineno_a == 0 || array_empty (bash_lineno_a)) + return (EXECUTION_FAILURE); + + if (bash_source_a == 0 || array_empty (bash_source_a)) + return (EXECUTION_FAILURE); + + /* If there is no argument list, then give short form: line filename. */ + if (list == 0) + { + lineno_s = array_reference (bash_lineno_a, 0); + source_s = array_reference (bash_source_a, 1); + printf("%s %s\n", lineno_s ? lineno_s : "NULL", source_s ? source_s : "NULL"); + return (EXECUTION_SUCCESS); + } + + if (funcname_a == 0 || array_empty (funcname_a)) + return (EXECUTION_FAILURE); + + if (legal_number (list->word->word, &num)) + { + lineno_s = array_reference (bash_lineno_a, num); + source_s = array_reference (bash_source_a, num+1); + funcname_s = array_reference (funcname_a, num+1); + + if (lineno_s == NULL|| source_s == NULL || funcname_s == NULL) + return (EXECUTION_FAILURE); + + printf("%s %s %s\n", lineno_s, funcname_s, source_s); + } + else + { + sh_invalidnum (list->word->word); + builtin_usage (); + return (EXECUTION_FAILURE); + } + + return (EXECUTION_SUCCESS); + #endif + } + + #ifdef LOADABLE_BUILTIN + static char *caller_doc[] = { + N_("Returns the context of the current subroutine call."), + N_(""), + N_("Without EXPR, returns returns \"$line $filename\". With EXPR,"), + N_("returns \"$line $subroutine $filename\"; this extra information"), + N_("can be used used to provide a stack trace."), + N_(""), + N_("The value of EXPR indicates how many call frames to go back before the"), + N_("current one; the top frame is frame 0."), + (char *)NULL + }; + + struct builtin caller_struct = { + "caller", + caller_builtin, + BUILTIN_ENABLED, + caller_doc, + "caller [EXPR]", + 0 + }; + + #endif /* LOADABLE_BUILTIN */ diff -aNrc2 bash-2.05b-patched/builtins/cd.def bash-3.0/builtins/cd.def *** bash-2.05b-patched/builtins/cd.def Mon Jul 15 14:51:39 2002 --- bash-3.0/builtins/cd.def Thu May 13 11:08:45 2004 *************** *** 2,6 **** builtins "cd" and "pwd" in Bash. ! Copyright (C) 1987, 1989, 1991 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- builtins "cd" and "pwd" in Bash. ! Copyright (C) 1987-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 40,43 **** --- 40,44 ---- #include "../bashansi.h" + #include "../bashintl.h" #include *************** *** 107,114 **** } ! tvar = bind_variable ("PWD", dirname); if (old_anm == 0 && array_needs_making && exported_p (tvar)) { ! update_export_env_inplace ("PWD=", 4, dirname); array_needs_making = 0; } --- 108,115 ---- } ! tvar = bind_variable ("PWD", dirname ? dirname : ""); if (old_anm == 0 && array_needs_making && exported_p (tvar)) { ! update_export_env_inplace ("PWD=", 4, dirname ? dirname : ""); array_needs_making = 0; } *************** *** 116,119 **** --- 117,121 ---- if (dirname && dirname != the_current_working_directory) free (dirname); + return (EXECUTION_SUCCESS); } *************** *** 122,126 **** the_current_working_directory () */ static char * ! resetpwd () { char *tdir; --- 124,129 ---- the_current_working_directory () */ static char * ! resetpwd (caller) ! char *caller; { char *tdir; *************** *** 128,132 **** FREE (the_current_working_directory); the_current_working_directory = (char *)NULL; ! tdir = get_working_directory ("cd"); return (tdir); } --- 131,135 ---- FREE (the_current_working_directory); the_current_working_directory = (char *)NULL; ! tdir = get_working_directory (caller); return (tdir); } *************** *** 185,189 **** if (dirname == 0) { ! builtin_error ("HOME not set"); return (EXECUTION_FAILURE); } --- 188,192 ---- if (dirname == 0) { ! builtin_error (_("HOME not set")); return (EXECUTION_FAILURE); } *************** *** 197,204 **** if (dirname == 0) { ! builtin_error ("OLDPWD not set"); return (EXECUTION_FAILURE); } lflag = interactive ? LCD_PRINTPATH : 0; } else if (absolute_pathname (list->word->word)) --- 200,211 ---- if (dirname == 0) { ! builtin_error (_("OLDPWD not set")); return (EXECUTION_FAILURE); } + #if 0 lflag = interactive ? LCD_PRINTPATH : 0; + #else + lflag = LCD_PRINTPATH; /* According to SUSv3 */ + #endif } else if (absolute_pathname (list->word->word)) *************** *** 223,228 **** directory name is echoed to stdout, whether or not the shell is interactive. */ ! if (opt) ! printf ("%s\n", no_symlinks ? temp : the_current_working_directory); free (temp); --- 230,235 ---- directory name is echoed to stdout, whether or not the shell is interactive. */ ! if (opt && (path = no_symlinks ? temp : the_current_working_directory)) ! printf ("%s\n", path); free (temp); *************** *** 333,336 **** --- 340,349 ---- directory = tcwd ? (verbatim_pwd ? sh_physpath (tcwd, 0) : tcwd) : get_working_directory ("pwd"); + + /* Try again using getcwd() if canonicalization fails (for instance, if + the file system has changed state underneath bash). */ + if (tcwd && directory == 0) + directory = resetpwd ("pwd"); + #undef tcwd *************** *** 343,349 **** if (ferror (stdout)) { ! builtin_error ("write error: %s", strerror (errno)); return (EXECUTION_FAILURE); } return (EXECUTION_SUCCESS); } --- 356,364 ---- if (ferror (stdout)) { ! builtin_error (_("write error: %s"), strerror (errno)); ! clearerr (stdout); return (EXECUTION_FAILURE); } + return (EXECUTION_SUCCESS); } *************** *** 364,368 **** { char *t, *tdir; ! int err, canon_failed; tdir = (char *)NULL; --- 379,383 ---- { char *t, *tdir; ! int err, canon_failed, r; tdir = (char *)NULL; *************** *** 399,403 **** if (posixly_correct && nolinks == 0 && canon_failed) { ! errno = ENOENT; return (0); } --- 414,423 ---- if (posixly_correct && nolinks == 0 && canon_failed) { ! #if defined ENAMETOOLONG ! if (errno != ENOENT && errno != ENAMETOOLONG) ! #else ! if (errno != ENOENT) ! #endif ! errno = ENOTDIR; return (0); } *************** *** 409,418 **** shell's idea of the_current_working_directory. */ if (canon_failed) - resetpwd (); - else { ! FREE (the_current_working_directory); ! the_current_working_directory = tdir; } return (1); --- 429,439 ---- shell's idea of the_current_working_directory. */ if (canon_failed) { ! t = resetpwd ("cd"); ! if (t == 0) ! set_working_directory (tdir); } + else + set_working_directory (tdir); return (1); *************** *** 425,429 **** err = errno; - free (tdir); /* We're not in physical mode (nolinks == 0), but we failed to change to --- 446,449 ---- *************** *** 432,445 **** if (chdir (newdir) == 0) { ! tdir = resetpwd (); ! FREE (tdir); ! return (1); } else { errno = err; ! return (0); } } --- 452,471 ---- if (chdir (newdir) == 0) { ! t = resetpwd ("cd"); ! if (t == 0) ! set_working_directory (tdir); ! else ! free (t); ! r = 1; } else { errno = err; ! r = 0; } + + free (tdir); + return r; } diff -aNrc2 bash-2.05b-patched/builtins/common.c bash-3.0/builtins/common.c *** bash-2.05b-patched/builtins/common.c Fri Jun 28 12:24:31 2002 --- bash-3.0/builtins/common.c Thu May 13 12:48:24 2004 *************** *** 1,3 **** ! /* Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,3 ---- ! /* Copyright (C) 1987-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 41,44 **** --- 41,45 ---- #include "../bashansi.h" + #include "../bashintl.h" #include "../shell.h" *************** *** 130,134 **** if (list) { ! builtin_error ("too many arguments"); jump_to_top_level (DISCARD); } --- 131,135 ---- if (list) { ! builtin_error (_("too many arguments")); jump_to_top_level (DISCARD); } *************** *** 154,158 **** char *s; { ! builtin_error ("%s: option requires an argument", s); } --- 155,159 ---- char *s; { ! builtin_error (_("%s: option requires an argument"), s); } *************** *** 161,165 **** char *s; { ! builtin_error ("%s: numeric argument required", s); } --- 162,166 ---- char *s; { ! builtin_error (_("%s: numeric argument required"), s); } *************** *** 168,172 **** char *s; { ! builtin_error ("%s: not found", s); } --- 169,173 ---- char *s; { ! builtin_error (_("%s: not found"), s); } *************** *** 177,181 **** char *s; { ! builtin_error ("%s: invalid option", s); } --- 178,182 ---- char *s; { ! builtin_error (_("%s: invalid option"), s); } *************** *** 184,188 **** char *s; { ! builtin_error ("%s: invalid option name", s); } --- 185,189 ---- char *s; { ! builtin_error (_("%s: invalid option name"), s); } *************** *** 191,195 **** char *s; { ! builtin_error ("`%s': not a valid identifier", s); } --- 192,196 ---- char *s; { ! builtin_error (_("`%s': not a valid identifier"), s); } *************** *** 198,202 **** char *s; { ! builtin_error ("%s: invalid number", s); } --- 199,203 ---- char *s; { ! builtin_error (_("%s: invalid number"), s); } *************** *** 205,209 **** char *s; { ! builtin_error ("%s: invalid signal specification", s); } --- 206,210 ---- char *s; { ! builtin_error (_("%s: invalid signal specification"), s); } *************** *** 212,216 **** char *s; { ! builtin_error ("`%s': not a pid or valid job spec", s); } --- 213,217 ---- char *s; { ! builtin_error (_("`%s': not a pid or valid job spec"), s); } *************** *** 219,223 **** const char *s; { ! builtin_error ("%s: readonly variable", s); } --- 220,224 ---- const char *s; { ! builtin_error (_("%s: readonly variable"), s); } *************** *** 227,233 **** { if (s) ! builtin_error ("%s: %s out of range", s, desc ? desc : "argument"); else ! builtin_error ("%s out of range", desc ? desc : "argument"); } --- 228,234 ---- { if (s) ! builtin_error (_("%s: %s out of range"), s, desc ? desc : _("argument")); else ! builtin_error (_("%s out of range"), desc ? desc : _("argument")); } *************** *** 237,241 **** char *s; { ! builtin_error ("%s: no such job", s); } --- 238,242 ---- char *s; { ! builtin_error (_("%s: no such job"), s); } *************** *** 245,251 **** { if (s) ! builtin_error ("%s: no job control"); else ! builtin_error ("no job control"); } #endif --- 246,252 ---- { if (s) ! builtin_error (_("%s: no job control"), s); else ! builtin_error (_("no job control")); } #endif *************** *** 257,266 **** { if (s) ! builtin_error ("%s: restricted", s); else ! builtin_error ("restricted"); } #endif /* **************************************************************** */ /* */ --- 258,274 ---- { if (s) ! builtin_error (_("%s: restricted"), s); else ! builtin_error (_("restricted")); } #endif + void + sh_notbuiltin (s) + char *s; + { + builtin_error (_("%s: not a shell builtin"), s); + } + /* **************************************************************** */ /* */ *************** *** 455,464 **** { char *directory; if (no_symbolic_links) { ! if (the_current_working_directory) ! free (the_current_working_directory); ! the_current_working_directory = (char *)NULL; } --- 463,471 ---- { char *directory; + size_t dsize; if (no_symbolic_links) { ! FREE (the_current_working_directory); the_current_working_directory = (char *)NULL; } *************** *** 466,480 **** if (the_current_working_directory == 0) { ! the_current_working_directory = (char *)xmalloc (PATH_MAX); ! the_current_working_directory[0] = '\0'; ! directory = getcwd (the_current_working_directory, PATH_MAX); ! if (directory == 0) { ! fprintf (stderr, "%s: could not get current directory: %s: %s\n", (for_whom && *for_whom) ? for_whom : get_name_for_error (), ! bash_getcwd_errstr, strerror (errno)); ! ! free (the_current_working_directory); ! the_current_working_directory = (char *)NULL; return (char *)NULL; } --- 473,482 ---- if (the_current_working_directory == 0) { ! the_current_working_directory = getcwd (0, 0); ! if (the_current_working_directory == 0) { ! fprintf (stderr, _("%s: error retrieving current directory: %s: %s\n"), (for_whom && *for_whom) ? for_whom : get_name_for_error (), ! _(bash_getcwd_errstr), strerror (errno)); return (char *)NULL; } *************** *** 538,544 **** { if (this_shell_builtin) ! builtin_error ("%s: ambiguous job spec", name); else ! report_error ("%s: ambiguous job spec", name); return (DUP_JOB); } --- 540,546 ---- { if (this_shell_builtin) ! builtin_error (_("%s: ambiguous job spec"), name); else ! report_error (_("%s: ambiguous job spec"), name); return (DUP_JOB); } *************** *** 566,570 **** if (*word == '\0') ! return (current_job); if (*word == '%') --- 568,572 ---- if (*word == '\0') ! return (NO_JOB); if (*word == '%') *************** *** 574,582 **** { job = atoi (word); - #if 0 - return (job >= job_slots ? NO_JOB : job - 1); - #else return (job > job_slots ? NO_JOB : job - 1); - #endif } --- 576,580 ---- *************** *** 585,588 **** --- 583,587 ---- { case 0: + return NO_JOB; case '%': case '+': *************** *** 603,606 **** --- 602,608 ---- #endif /* JOB_CONTROL */ + /* + * NOTE: `kill' calls this function with forcecols == 0 + */ int display_signal_list (list, forcecols) *************** *** 610,615 **** register int i, column; char *name; ! int result; ! int signum; intmax_t lsignum; --- 612,616 ---- register int i, column; char *name; ! int result, signum, dflags; intmax_t lsignum; *************** *** 624,628 **** if (posixly_correct && !forcecols) ! printf ("%s%s", name, (i == NSIG - 1) ? "" : " "); else { --- 625,635 ---- if (posixly_correct && !forcecols) ! { ! /* This is for the kill builtin. POSIX.2 says the signal names ! are displayed without the `SIG' prefix. */ ! if (STREQN (name, "SIG", 3)) ! name += 3; ! printf ("%s%s", name, (i == NSIG - 1) ? "" : " "); ! } else { *************** *** 678,682 **** else { ! signum = decode_signal (list->word->word); if (signum == NO_SIG) { --- 685,692 ---- else { ! dflags = DSIG_NOCASE; ! if (posixly_correct == 0 || this_shell_builtin != kill_builtin) ! dflags |= DSIG_SIGPREFIX; ! signum = decode_signal (list->word->word, dflags); if (signum == NO_SIG) { diff -aNrc2 bash-2.05b-patched/builtins/common.h bash-3.0/builtins/common.h *** bash-2.05b-patched/builtins/common.h Fri May 10 12:25:08 2002 --- bash-3.0/builtins/common.h Fri Apr 23 16:51:00 2004 *************** *** 1,5 **** /* common.h -- extern declarations for functions defined in common.c. */ ! /* Copyright (C) 1993-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,5 ---- /* common.h -- extern declarations for functions defined in common.c. */ ! /* Copyright (C) 1993-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 31,34 **** --- 31,35 ---- #define SEVAL_NOHIST 0x004 #define SEVAL_NOFREE 0x008 + #define SEVAL_RESETLINE 0x010 /* Flags for describe_command, shared between type.def and command.def */ *************** *** 75,78 **** --- 76,80 ---- extern void sh_nojobs __P((char *)); extern void sh_restricted __P((char *)); + extern void sh_notbuiltin __P((char *)); extern char **make_builtin_argv __P((WORD_LIST *, int *)); *************** *** 106,109 **** --- 108,114 ---- extern void initialize_shell_builtins __P((void)); + /* Functions from exit.def */ + extern void bash_logout __P((void)); + /* Functions from getopts.def */ extern void getopts_reset __P((int)); *************** *** 151,155 **** /* Functions from evalfile.c */ extern int maybe_execute_file __P((const char *, int)); ! extern int source_file __P((const char *)); extern int fc_execute_file __P((const char *)); --- 156,160 ---- /* Functions from evalfile.c */ extern int maybe_execute_file __P((const char *, int)); ! extern int source_file __P((const char *, int)); extern int fc_execute_file __P((const char *)); diff -aNrc2 bash-2.05b-patched/builtins/complete.def bash-3.0/builtins/complete.def *** bash-2.05b-patched/builtins/complete.def Tue Mar 19 12:21:05 2002 --- bash-3.0/builtins/complete.def Fri Dec 19 17:57:03 2003 *************** *** 2,6 **** It implements the builtins "complete" and "compgen" in Bash. ! Copyright (C) 1999-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the builtins "complete" and "compgen" in Bash. ! Copyright (C) 1999-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 44,51 **** --- 44,53 ---- #include "../bashansi.h" + #include "../bashintl.h" #include "../shell.h" #include "../builtins.h" #include "../pcomplete.h" + #include "../bashline.h" #include "common.h" *************** *** 107,114 **** --- 109,118 ---- int optflag; } compopts[] = { + { "bashdefault", COPT_BASHDEFAULT }, { "default", COPT_DEFAULT }, { "dirnames", COPT_DIRNAMES }, { "filenames",COPT_FILENAMES}, { "nospace", COPT_NOSPACE }, + { "plusdirs", COPT_PLUSDIRS }, { (char *)NULL, 0 }, }; *************** *** 245,249 **** if (ind < 0) { ! builtin_error ("%s: invalid action name", list_optarg); return (EX_USAGE); } --- 249,253 ---- if (ind < 0) { ! builtin_error (_("%s: invalid action name"), list_optarg); return (EX_USAGE); } *************** *** 375,379 **** if (progcomp_remove (l->word->word) == 0) { ! builtin_error ("%s: no completion specification", l->word->word); ret = EXECUTION_FAILURE; } --- 379,383 ---- if (progcomp_remove (l->word->word) == 0) { ! builtin_error (_("%s: no completion specification"), l->word->word); ret = EXECUTION_FAILURE; } *************** *** 429,436 **** --- 433,442 ---- /* First, print the -o options. */ + PRINTCOMPOPT (COPT_BASHDEFAULT, "bashdefault"); PRINTCOMPOPT (COPT_DEFAULT, "default"); PRINTCOMPOPT (COPT_DIRNAMES, "dirnames"); PRINTCOMPOPT (COPT_FILENAMES, "filenames"); PRINTCOMPOPT (COPT_NOSPACE, "nospace"); + PRINTCOMPOPT (COPT_PLUSDIRS, "plusdirs"); acts = cs->actions; *************** *** 516,520 **** else { ! builtin_error ("%s: no completion specification", l->word->word); ret = EXECUTION_FAILURE; } --- 522,526 ---- else { ! builtin_error (_("%s: no completion specification"), l->word->word); ret = EXECUTION_FAILURE; } *************** *** 541,545 **** COMPSPEC *cs; STRINGLIST *sl; ! char *word; if (list == 0) --- 547,551 ---- COMPSPEC *cs; STRINGLIST *sl; ! char *word, **matches; if (list == 0) *************** *** 563,569 **** if (Farg) ! internal_warning ("compgen: -F option may not work as you expect"); if (Carg) ! internal_warning ("compgen: -C option may not work as you expect"); /* If we get here, we need to build a compspec and evaluate it. */ --- 569,575 ---- if (Farg) ! builtin_error (_("warning: -F option may not work as you expect")); if (Carg) ! builtin_error (_("warning: -C option may not work as you expect")); /* If we get here, we need to build a compspec and evaluate it. */ *************** *** 584,593 **** sl = gen_compspec_completions (cs, "compgen", word, 0, 0); /* This isn't perfect, but it's the best we can do, given what readline exports from its set of completion utility functions. */ if ((sl == 0 || sl->list_len == 0) && (copts & COPT_DEFAULT)) { - char **matches; - matches = rl_completion_matches (word, rl_filename_completion_function); sl = completions_to_stringlist (matches); --- 590,606 ---- sl = gen_compspec_completions (cs, "compgen", word, 0, 0); + /* If the compspec wants the bash default completions, temporarily + turn off programmable completion and call the bash completion code. */ + if ((sl == 0 || sl->list_len == 0) && (copts & COPT_BASHDEFAULT)) + { + matches = bash_default_completion (word, 0, 0, 0, 0); + sl = completions_to_stringlist (matches); + strvec_dispose (matches); + } + /* This isn't perfect, but it's the best we can do, given what readline exports from its set of completion utility functions. */ if ((sl == 0 || sl->list_len == 0) && (copts & COPT_DEFAULT)) { matches = rl_completion_matches (word, rl_filename_completion_function); sl = completions_to_stringlist (matches); diff -aNrc2 bash-2.05b-patched/builtins/declare.def bash-3.0/builtins/declare.def *** bash-2.05b-patched/builtins/declare.def Mon Apr 8 13:20:55 2002 --- bash-3.0/builtins/declare.def Fri Dec 19 16:59:18 2003 *************** *** 2,6 **** It implements the builtins "declare" and "local" in Bash. ! Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the builtins "declare" and "local" in Bash. ! Copyright (C) 1987-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 24,28 **** $BUILTIN declare $FUNCTION declare_builtin ! $SHORT_DOC declare [-afFirtx] [-p] name[=value] ... Declare variables and/or give them attributes. If no NAMEs are given, then display the values of variables instead. The -p option --- 24,28 ---- $BUILTIN declare $FUNCTION declare_builtin ! $SHORT_DOC declare [-afFirtx] [-p] [name[=value] ...] Declare variables and/or give them attributes. If no NAMEs are given, then display the values of variables instead. The -p option *************** *** 33,37 **** -a to make NAMEs arrays (if supported) -f to select from among function names only ! -F to display function names without definitions -i to make NAMEs have the `integer' attribute -r to make NAMEs readonly --- 33,38 ---- -a to make NAMEs arrays (if supported) -f to select from among function names only ! -F to display function names (and line number and source file name if ! debugging) without definitions -i to make NAMEs have the `integer' attribute -r to make NAMEs readonly *************** *** 68,71 **** --- 69,73 ---- #include "../bashansi.h" + #include "../bashintl.h" #include "../shell.h" *************** *** 101,105 **** else { ! builtin_error ("can only be used in a function"); return (EXECUTION_FAILURE); } --- 103,107 ---- else { ! builtin_error (_("can only be used in a function")); return (EXECUTION_FAILURE); } *************** *** 121,124 **** --- 123,127 ---- char *t, *subscript_start; SHELL_VAR *var; + FUNCTION_DEF *shell_fn; flags_on = flags_off = any_failed = assign_error = pflag = nodefs = 0; *************** *** 226,230 **** name = savestring (list->word->word); ! offset = assignment (name); if (offset) /* declare [-afFirx] name=value */ --- 229,233 ---- name = savestring (list->word->word); ! offset = assignment (name, 0); if (offset) /* declare [-afFirx] name=value */ *************** *** 290,294 **** if (offset) /* declare -f [-rix] foo=bar */ { ! builtin_error ("cannot use `-f' to make functions"); free (name); return (EXECUTION_FAILURE); --- 293,297 ---- if (offset) /* declare -f [-rix] foo=bar */ { ! builtin_error (_("cannot use `-f' to make functions")); free (name); return (EXECUTION_FAILURE); *************** *** 302,306 **** if (readonly_p (var) && (flags_off & att_readonly)) { ! builtin_error ("%s: readonly function", name); any_failed++; NEXT_VARIABLE (); --- 305,309 ---- if (readonly_p (var) && (flags_off & att_readonly)) { ! builtin_error (_("%s: readonly function"), name); any_failed++; NEXT_VARIABLE (); *************** *** 310,316 **** if (flags_on == att_function && flags_off == 0) { ! t = nodefs ? var->name ! : named_function_string (name, function_cell (var), 1); ! printf ("%s\n", t); } else /* declare -[fF] -[rx] name [name...] */ --- 313,332 ---- if (flags_on == att_function && flags_off == 0) { ! #if defined (DEBUGGER) ! if (nodefs && debugging_mode) ! { ! shell_fn = find_function_def (var->name); ! if (shell_fn) ! printf ("%s %d %s\n", var->name, shell_fn->line, shell_fn->source_file); ! else ! printf ("%s\n", var->name); ! } ! else ! #endif /* DEBUGGER */ ! { ! t = nodefs ? var->name ! : named_function_string (name, function_cell (var), 1); ! printf ("%s\n", t); ! } } else /* declare -[fF] -[rx] name [name...] */ *************** *** 371,375 **** if ((flags_off & att_array) && array_p (var)) { ! builtin_error ("%s: cannot destroy array variables in this way", name); any_failed++; NEXT_VARIABLE (); --- 387,391 ---- if ((flags_off & att_array) && array_p (var)) { ! builtin_error (_("%s: cannot destroy array variables in this way"), name); any_failed++; NEXT_VARIABLE (); diff -aNrc2 bash-2.05b-patched/builtins/echo.def bash-3.0/builtins/echo.def *** bash-2.05b-patched/builtins/echo.def Tue Mar 19 10:45:28 2002 --- bash-3.0/builtins/echo.def Mon Jun 28 14:27:40 2004 *************** *** 134,137 **** --- 134,139 ---- just_echo: + clearerr (stdout); /* clear error before writing and testing success */ + while (list) { diff -aNrc2 bash-2.05b-patched/builtins/enable.def bash-3.0/builtins/enable.def *** bash-2.05b-patched/builtins/enable.def Tue Mar 19 13:54:00 2002 --- bash-3.0/builtins/enable.def Fri Dec 19 18:07:07 2003 *************** *** 2,6 **** It implements the builtin "enable" in Bash. ! Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the builtin "enable" in Bash. ! Copyright (C) 1987-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 51,54 **** --- 51,56 ---- #include #include "../bashansi.h" + #include "../bashintl.h" + #include "../shell.h" #include "../builtins.h" *************** *** 124,128 **** break; #else ! builtin_error ("dynamic loading not available"); return (EX_USAGE); #endif --- 126,130 ---- break; #else ! builtin_error (_("dynamic loading not available")); return (EX_USAGE); #endif *************** *** 132,136 **** break; #else ! builtin_error ("dynamic loading not available"); return (EX_USAGE); #endif /* HAVE_DLCLOSE */ --- 134,138 ---- break; #else ! builtin_error (_("dynamic loading not available")); return (EX_USAGE); #endif /* HAVE_DLCLOSE */ *************** *** 198,202 **** if (opt == EXECUTION_FAILURE) { ! builtin_error ("%s: not a shell builtin", list->word->word); result = EXECUTION_FAILURE; } --- 200,204 ---- if (opt == EXECUTION_FAILURE) { ! sh_notbuiltin (list->word->word); result = EXECUTION_FAILURE; } *************** *** 299,303 **** if (handle == 0) { ! builtin_error ("cannot open shared object %s: %s", filename, dlerror ()); return (EXECUTION_FAILURE); } --- 301,305 ---- if (handle == 0) { ! builtin_error (_("cannot open shared object %s: %s"), filename, dlerror ()); return (EXECUTION_FAILURE); } *************** *** 322,327 **** if (b == 0) { ! builtin_error ("cannot find %s in shared object %s: %s", struct_name, ! filename, dlerror ()); free (struct_name); continue; --- 324,329 ---- if (b == 0) { ! builtin_error (_("cannot find %s in shared object %s: %s"), ! struct_name, filename, dlerror ()); free (struct_name); continue; *************** *** 441,450 **** if (b == 0) { ! builtin_error ("%s: not a shell builtin", name); return (EXECUTION_FAILURE); } if (b->flags & STATIC_BUILTIN) { ! builtin_error ("%s: not dynamically loaded", name); return (EXECUTION_FAILURE); } --- 443,452 ---- if (b == 0) { ! sh_notbuiltin (name); return (EXECUTION_FAILURE); } if (b->flags & STATIC_BUILTIN) { ! builtin_error (_("%s: not dynamically loaded"), name); return (EXECUTION_FAILURE); } *************** *** 461,465 **** if (ref == 1 && local_dlclose (handle) != 0) { ! builtin_error ("%s: cannot delete: %s", name, dlerror ()); return (EXECUTION_FAILURE); } --- 463,467 ---- if (ref == 1 && local_dlclose (handle) != 0) { ! builtin_error (_("%s: cannot delete: %s"), name, dlerror ()); return (EXECUTION_FAILURE); } diff -aNrc2 bash-2.05b-patched/builtins/evalfile.c bash-3.0/builtins/evalfile.c *** bash-2.05b-patched/builtins/evalfile.c Thu Feb 21 15:08:52 2002 --- bash-3.0/builtins/evalfile.c Fri Dec 19 16:48:53 2003 *************** *** 1,3 **** ! /* Copyright (C) 1996 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,3 ---- ! /* Copyright (C) 1996-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 32,35 **** --- 32,36 ---- #include "../bashansi.h" + #include "../bashintl.h" #include "../shell.h" *************** *** 59,62 **** --- 60,64 ---- #define FEVAL_CHECKBINARY 0x040 #define FEVAL_REGFILE 0x080 + #define FEVAL_NOPUSHARGS 0x100 extern int posixly_correct; *************** *** 80,86 **** --- 82,107 ---- size_t file_size; sh_vmsg_func_t *errfunc; + #if defined (ARRAY_VARS) + SHELL_VAR *funcname_v, *bash_source_v, *bash_lineno_v; + ARRAY *funcname_a, *bash_source_a, *bash_lineno_a; + # if defined (DEBUGGER) + SHELL_VAR *bash_argv_v, *bash_argc_v; + ARRAY *bash_argv_a, *bash_argc_a; + # endif + char *t, tt[2]; + #endif USE_VAR(pflags); + #if defined (ARRAY_VARS) + GET_ARRAY_FROM_VAR ("FUNCNAME", funcname_v, funcname_a); + GET_ARRAY_FROM_VAR ("BASH_SOURCE", bash_source_v, bash_source_a); + GET_ARRAY_FROM_VAR ("BASH_LINENO", bash_lineno_v, bash_lineno_a); + # if defined (DEBUGGER) + GET_ARRAY_FROM_VAR ("BASH_ARGV", bash_argv_v, bash_argv_a); + GET_ARRAY_FROM_VAR ("BASH_ARGC", bash_argc_v, bash_argc_a); + # endif + #endif + fd = open (filename, O_RDONLY); *************** *** 105,114 **** if (S_ISDIR (finfo.st_mode)) { ! (*errfunc) ("%s: is a directory", filename); return ((flags & FEVAL_BUILTIN) ? EXECUTION_FAILURE : -1); } else if ((flags & FEVAL_REGFILE) && S_ISREG (finfo.st_mode) == 0) { ! (*errfunc) ("%s: not a regular file", filename); return ((flags & FEVAL_BUILTIN) ? EXECUTION_FAILURE : -1); } --- 126,135 ---- if (S_ISDIR (finfo.st_mode)) { ! (*errfunc) (_("%s: is a directory"), filename); return ((flags & FEVAL_BUILTIN) ? EXECUTION_FAILURE : -1); } else if ((flags & FEVAL_REGFILE) && S_ISREG (finfo.st_mode) == 0) { ! (*errfunc) (_("%s: not a regular file"), filename); return ((flags & FEVAL_BUILTIN) ? EXECUTION_FAILURE : -1); } *************** *** 118,122 **** if (file_size != finfo.st_size || file_size + 1 < file_size) { ! (*errfunc) ("%s: file is too large", filename); return ((flags & FEVAL_BUILTIN) ? EXECUTION_FAILURE : -1); } --- 139,143 ---- if (file_size != finfo.st_size || file_size + 1 < file_size) { ! (*errfunc) (_("%s: file is too large"), filename); return ((flags & FEVAL_BUILTIN) ? EXECUTION_FAILURE : -1); } *************** *** 177,182 **** sourcelevel++; /* set the flags to be passed to parse_and_execute */ ! pflags = (flags & FEVAL_HISTORY) ? 0 : SEVAL_NOHIST; if (flags & FEVAL_BUILTIN) --- 198,222 ---- sourcelevel++; + #if defined (ARRAY_VARS) + array_push (bash_source_a, (char *)filename); + t = itos (executing_line_number ()); + array_push (bash_lineno_a, t); + free (t); + array_push (funcname_a, "source"); /* not exactly right */ + # if defined (DEBUGGER) + /* Have to figure out a better way to do this when `source' is supplied + arguments */ + if ((flags & FEVAL_NOPUSHARGS) == 0) + { + array_push (bash_argv_a, (char *)filename); + tt[0] = '1'; tt[1] = '\0'; + array_push (bash_argc_a, tt); + } + # endif + #endif + /* set the flags to be passed to parse_and_execute */ ! pflags = SEVAL_RESETLINE; ! pflags |= (flags & FEVAL_HISTORY) ? 0 : SEVAL_NOHIST; if (flags & FEVAL_BUILTIN) *************** *** 206,209 **** --- 246,262 ---- } + #if defined (ARRAY_VARS) + array_pop (bash_source_a); + array_pop (bash_lineno_a); + array_pop (funcname_a); + # if defined (DEBUGGER) + if ((flags & FEVAL_NOPUSHARGS) == 0) + { + array_pop (bash_argc_a); + array_pop (bash_argv_a); + } + # endif + #endif + return ((flags & FEVAL_BUILTIN) ? result : 1); } *************** *** 241,253 **** int ! source_file (filename) const char *filename; { ! int flags; flags = FEVAL_BUILTIN|FEVAL_UNWINDPROT|FEVAL_NONINT; /* POSIX shells exit if non-interactive and file error. */ if (posixly_correct && !interactive_shell) flags |= FEVAL_LONGJMP; ! return (_evalfile (filename, flags)); } --- 294,312 ---- int ! source_file (filename, sflags) const char *filename; + int sflags; { ! int flags, rval; flags = FEVAL_BUILTIN|FEVAL_UNWINDPROT|FEVAL_NONINT; + if (sflags) + flags |= FEVAL_NOPUSHARGS; /* POSIX shells exit if non-interactive and file error. */ if (posixly_correct && !interactive_shell) flags |= FEVAL_LONGJMP; ! rval = _evalfile (filename, flags); ! ! run_return_trap (); ! return rval; } diff -aNrc2 bash-2.05b-patched/builtins/evalstring.c bash-3.0/builtins/evalstring.c *** bash-2.05b-patched/builtins/evalstring.c Thu Apr 4 13:38:50 2002 --- bash-3.0/builtins/evalstring.c Tue Jun 3 13:53:12 2003 *************** *** 85,88 **** --- 85,89 ---- (flags & SEVAL_NOHIST) -> call bash_history_disable () (flags & SEVAL_NOFREE) -> don't free STRING when finished + (flags & SEVAL_RESETLINE) -> reset line_number to 1 */ *************** *** 93,97 **** int flags; { ! int code, x; volatile int should_jump_to_top_level, last_result; char *orig_string; --- 94,98 ---- int flags; { ! int code, x, lreset; volatile int should_jump_to_top_level, last_result; char *orig_string; *************** *** 108,111 **** --- 109,114 ---- unwind_protect_int (interactive); + lreset = flags & SEVAL_RESETLINE; + #if defined (HISTORY) unwind_protect_int (remember_on_history); /* can be used in scripts */ *************** *** 130,134 **** parse_and_execute_level++; ! push_stream (1); /* reset the line number */ indirection_level++; if (flags & (SEVAL_NONINT|SEVAL_INTERACT)) --- 133,145 ---- parse_and_execute_level++; ! ! /* Reset the line number if the caller wants us to. If we don't reset the ! line number, we have to subtract one, because we will add one just ! before executing the next command (resetting the line number sets it to ! 0; the first line number is 1). */ ! push_stream (lreset); ! if (lreset == 0) ! line_number--; ! indirection_level++; if (flags & (SEVAL_NONINT|SEVAL_INTERACT)) *************** *** 142,150 **** code = should_jump_to_top_level = 0; last_result = EXECUTION_SUCCESS; - command = (COMMAND *)NULL; with_input_from_string (string, from_file); while (*(bash_input.location.string)) { if (interrupt_state) { --- 153,162 ---- code = should_jump_to_top_level = 0; last_result = EXECUTION_SUCCESS; with_input_from_string (string, from_file); while (*(bash_input.location.string)) { + command = (COMMAND *)NULL; + if (interrupt_state) { *************** *** 164,169 **** { case FORCE_EOF: case EXITPROG: ! run_unwind_frame ("pe_dispose"); /* Remember to call longjmp (top_level) after the old value for it is restored. */ --- 176,183 ---- { case FORCE_EOF: + case ERREXIT: case EXITPROG: ! if (command) ! run_unwind_frame ("pe_dispose"); /* Remember to call longjmp (top_level) after the old value for it is restored. */ *************** *** 172,176 **** case DISCARD: ! run_unwind_frame ("pe_dispose"); last_result = last_command_exit_value = EXECUTION_FAILURE; /* XXX */ if (subshell_environment) --- 186,191 ---- case DISCARD: ! if (command) ! run_unwind_frame ("pe_dispose"); last_result = last_command_exit_value = EXECUTION_FAILURE; /* XXX */ if (subshell_environment) diff -aNrc2 bash-2.05b-patched/builtins/exec.def bash-3.0/builtins/exec.def *** bash-2.05b-patched/builtins/exec.def Tue Mar 19 10:38:49 2002 --- bash-3.0/builtins/exec.def Fri Dec 19 17:55:25 2003 *************** *** 2,6 **** It implements the builtin "exec" in Bash. ! Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the builtin "exec" in Bash. ! Copyright (C) 1987-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 47,50 **** --- 47,51 ---- #include "../bashansi.h" + #include "../bashintl.h" #include "../shell.h" *************** *** 202,206 **** if (executable_file (command) == 0) { ! builtin_error ("%s: cannot execute: %s", command, strerror (errno)); exit_value = EX_NOEXEC; /* As per Posix.2, 3.14.6 */ } --- 203,207 ---- if (executable_file (command) == 0) { ! builtin_error (_("%s: cannot execute: %s"), command, strerror (errno)); exit_value = EX_NOEXEC; /* As per Posix.2, 3.14.6 */ } *************** *** 209,214 **** failed_exec: ! if (command) ! free (command); if (subshell_environment || (interactive == 0 && no_exit_on_failed_exec == 0)) --- 210,214 ---- failed_exec: ! FREE (command); if (subshell_environment || (interactive == 0 && no_exit_on_failed_exec == 0)) diff -aNrc2 bash-2.05b-patched/builtins/exit.def bash-3.0/builtins/exit.def *** bash-2.05b-patched/builtins/exit.def Mon Apr 8 13:21:24 2002 --- bash-3.0/builtins/exit.def Fri Dec 19 17:56:04 2003 *************** *** 2,6 **** It implements the builtins "exit", and "logout" in Bash. ! Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the builtins "exit", and "logout" in Bash. ! Copyright (C) 1987-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 38,41 **** --- 38,43 ---- #endif + #include "../bashintl.h" + #include "../shell.h" #include "../jobs.h" *************** *** 45,48 **** --- 47,51 ---- extern int last_command_exit_value; + extern int running_trap, trap_saved_exit_value; extern int subshell_environment; extern sh_builtin_func_t *this_shell_builtin; *************** *** 78,82 **** if (login_shell == 0 /* && interactive */) { ! builtin_error ("not login shell: use `exit'"); return (EXECUTION_FAILURE); } --- 81,85 ---- if (login_shell == 0 /* && interactive */) { ! builtin_error (_("not login shell: use `exit'")); return (EXECUTION_FAILURE); } *************** *** 106,110 **** if (jobs[i] && STOPPED (i)) { ! fprintf (stderr, "There are stopped jobs.\n"); /* This is NOT superfluous because EOF can get here without --- 109,113 ---- if (jobs[i] && STOPPED (i)) { ! fprintf (stderr, _("There are stopped jobs.\n")); /* This is NOT superfluous because EOF can get here without *************** *** 121,126 **** `logout 5' to a shell, and it returns 5. */ ! exit_value = get_exitstat (list); /* Run our `~/.bash_logout' file if it exists, and this is a login shell. */ if (login_shell && sourced_logout++ == 0 && subshell_environment == 0) --- 124,145 ---- `logout 5' to a shell, and it returns 5. */ ! /* If we're running the exit trap (running_trap == 1, since running_trap ! gets set to SIG+1), and we don't have a argument given to `exit' ! (list == 0), use the exit status we saved before running the trap ! commands (trap_saved_exit_value). */ ! exit_value = (running_trap == 1 && list == 0) ? trap_saved_exit_value : get_exitstat (list); ! ! bash_logout (); ! ! last_command_exit_value = exit_value; ! ! /* Exit the program. */ ! jump_to_top_level (EXITPROG); ! /*NOTREACHED*/ ! } + void + bash_logout () + { /* Run our `~/.bash_logout' file if it exists, and this is a login shell. */ if (login_shell && sourced_logout++ == 0 && subshell_environment == 0) *************** *** 131,139 **** #endif } - - last_command_exit_value = exit_value; - - /* Exit the program. */ - jump_to_top_level (EXITPROG); - /*NOTREACHED*/ } --- 150,152 ---- diff -aNrc2 bash-2.05b-patched/builtins/fc.def bash-3.0/builtins/fc.def *** bash-2.05b-patched/builtins/fc.def Tue Mar 19 14:05:18 2002 --- bash-3.0/builtins/fc.def Fri Dec 19 17:58:15 2003 *************** *** 2,6 **** It implements the builtin "fc" in Bash. ! Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the builtin "fc" in Bash. ! Copyright (C) 1987-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 26,30 **** $DEPENDS_ON HISTORY $SHORT_DOC fc [-e ename] [-nlr] [first] [last] or fc -s [pat=rep] [cmd] - fc is used to list or edit and re-execute commands from the history list. FIRST and LAST can be numbers specifying the range, or FIRST can be a --- 26,29 ---- *************** *** 55,59 **** #include "../bashtypes.h" #include "posixstat.h" ! #ifndef _MINIX # include #endif --- 54,58 ---- #include "../bashtypes.h" #include "posixstat.h" ! #if ! defined(_MINIX) && defined (HAVE_SYS_FILE_H) # include #endif *************** *** 67,70 **** --- 66,70 ---- #include "../bashansi.h" + #include "../bashintl.h" #include *************** *** 250,254 **** if (command == NULL) { ! builtin_error ("no command found"); if (rlist) FREE_RLIST (); --- 250,254 ---- if (command == NULL) { ! builtin_error (_("no command found")); if (rlist) FREE_RLIST (); *************** *** 315,319 **** if ((histbeg < 0) || (histend < 0)) { ! sh_erange ((char *)NULL, "history specification"); return (EXECUTION_FAILURE); } --- 315,319 ---- if ((histbeg < 0) || (histend < 0)) { ! sh_erange ((char *)NULL, _("history specification")); return (EXECUTION_FAILURE); } *************** *** 336,340 **** if (stream == 0) { ! builtin_error ("cannot open temp file %s", fn ? fn : ""); FREE (fn); return (EXECUTION_FAILURE); --- 336,340 ---- if (stream == 0) { ! builtin_error (_("%s: cannot open temp file: %s"), fn ? fn : "", strerror (errno)); FREE (fn); return (EXECUTION_FAILURE); diff -aNrc2 bash-2.05b-patched/builtins/fg_bg.def bash-3.0/builtins/fg_bg.def *** bash-2.05b-patched/builtins/fg_bg.def Mon Apr 8 13:21:32 2002 --- bash-3.0/builtins/fg_bg.def Fri Dec 19 17:58:42 2003 *************** *** 2,6 **** It implements the builtins "bg" and "fg" in Bash. ! Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the builtins "bg" and "fg" in Bash. ! Copyright (C) 1987-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 40,43 **** --- 40,45 ---- #endif + #include "../bashintl.h" + #include "../shell.h" #include "../jobs.h" *************** *** 129,133 **** if (IS_JOBCONTROL (job) == 0) { ! builtin_error ("job %%%d started without job control", job + 1); goto failure; } --- 131,135 ---- if (IS_JOBCONTROL (job) == 0) { ! builtin_error (_("job %d started without job control"), job + 1); goto failure; } diff -aNrc2 bash-2.05b-patched/builtins/getopt.c bash-3.0/builtins/getopt.c *** bash-2.05b-patched/builtins/getopt.c Tue Mar 19 12:03:27 2002 --- bash-3.0/builtins/getopt.c Fri Dec 19 16:49:36 2003 *************** *** 29,32 **** --- 29,33 ---- #include #include "memalloc.h" + #include "../bashintl.h" #include "../shell.h" #include "getopt.h" *************** *** 106,111 **** /* 1003.2 specifies the format of this message. */ ! #define BADOPT(x) fprintf (stderr, "%s: illegal option -- %c\n", argv[0], x) ! #define NEEDARG(x) fprintf (stderr, "%s: option requires an argument -- %c\n", argv[0], x) int --- 107,112 ---- /* 1003.2 specifies the format of this message. */ ! #define BADOPT(x) fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], x) ! #define NEEDARG(x) fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], x) int diff -aNrc2 bash-2.05b-patched/builtins/getopts.def bash-3.0/builtins/getopts.def *** bash-2.05b-patched/builtins/getopts.def Tue Mar 19 12:03:06 2002 --- bash-3.0/builtins/getopts.def Sat Jun 26 13:59:18 2004 *************** *** 45,49 **** sets OPTARG to the option character found. If getopts is not in silent mode, and an invalid option is seen, getopts places '?' into ! NAME and unsets OPTARG. If a required option is not found, a '?' is placed in NAME, OPTARG is unset, and a diagnostic message is printed. --- 45,49 ---- sets OPTARG to the option character found. If getopts is not in silent mode, and an invalid option is seen, getopts places '?' into ! NAME and unsets OPTARG. If a required argument is not found, a '?' is placed in NAME, OPTARG is unset, and a diagnostic message is printed. *************** *** 246,249 **** --- 246,250 ---- if (ret == G_EOF) { + unbind_variable ("OPTARG"); getopts_bind_variable (name, "?"); return (EXECUTION_FAILURE); diff -aNrc2 bash-2.05b-patched/builtins/hash.def bash-3.0/builtins/hash.def *** bash-2.05b-patched/builtins/hash.def Tue Mar 19 14:43:26 2002 --- bash-3.0/builtins/hash.def Fri Dec 19 17:59:31 2003 *************** *** 2,6 **** It implements the builtin "hash" in Bash. ! Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the builtin "hash" in Bash. ! Copyright (C) 1987-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 50,53 **** --- 50,54 ---- #include "../bashansi.h" + #include "../bashintl.h" #include "../shell.h" *************** *** 80,84 **** if (hashing_enabled == 0) { ! builtin_error ("hashing disabled"); return (EXECUTION_FAILURE); } --- 81,85 ---- if (hashing_enabled == 0) { ! builtin_error (_("hashing disabled")); return (EXECUTION_FAILURE); } *************** *** 125,129 **** { if (print_hashed_commands (list_portably) == 0) ! printf ("%s: hash table empty\n", this_command_name); return (EXECUTION_SUCCESS); --- 126,130 ---- { if (print_hashed_commands (list_portably) == 0) ! printf (_("%s: hash table empty\n"), this_command_name); return (EXECUTION_SUCCESS); diff -aNrc2 bash-2.05b-patched/builtins/help.def bash-3.0/builtins/help.def *** bash-2.05b-patched/builtins/help.def Mon Apr 8 13:22:07 2002 --- bash-3.0/builtins/help.def Fri Dec 19 18:01:17 2003 *************** *** 2,6 **** It implements the builtin "help" in Bash. ! Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the builtin "help" in Bash. ! Copyright (C) 1987-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 49,52 **** --- 49,54 ---- #include + #include "../bashintl.h" + #include "../shell.h" #include "../builtins.h" *************** *** 103,107 **** if (glob_pattern_p (list->word->word)) { ! printf ("Shell commands matching keyword%s `", list->next ? "s" : ""); print_word_list (list, ", "); printf ("'\n\n"); --- 105,112 ---- if (glob_pattern_p (list->word->word)) { ! if (list->next) ! printf (_("Shell commands matching keywords `")); ! else ! printf (_("Shell commands matching keyword `")); print_word_list (list, ", "); printf ("'\n\n"); *************** *** 131,135 **** if (match_found == 0) { ! builtin_error ("no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'.", pattern, pattern, pattern); return (EXECUTION_FAILURE); } --- 136,140 ---- if (match_found == 0) { ! builtin_error (_("no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."), pattern, pattern, pattern); return (EXECUTION_FAILURE); } *************** *** 157,161 **** if (fd == -1) { ! builtin_error ("%s: cannot open: %s", doc[0], strerror (errno)); return; } --- 162,166 ---- if (fd == -1) { ! builtin_error (_("%s: cannot open: %s"), doc[0], strerror (errno)); return; } *************** *** 165,169 **** else for (j = 0; doc[j]; j++) ! printf (" %s\n", doc[j]); } --- 170,174 ---- else for (j = 0; doc[j]; j++) ! printf (" %s\n", _(doc[j])); } *************** *** 175,179 **** printf ( ! "These shell commands are defined internally. Type `help' to see this list.\n\ Type `help name' to find out more about the function `name'.\n\ Use `info bash' to find out more about the shell in general.\n\ --- 180,184 ---- printf ( ! _("These shell commands are defined internally. Type `help' to see this list.\n\ Type `help name' to find out more about the function `name'.\n\ Use `info bash' to find out more about the shell in general.\n\ *************** *** 181,185 **** \n\ A star (*) next to a name means that the command is disabled.\n\ ! \n"); for (i = 0; i < num_shell_builtins; i++) --- 186,190 ---- \n\ A star (*) next to a name means that the command is disabled.\n\ ! \n")); for (i = 0; i < num_shell_builtins; i++) diff -aNrc2 bash-2.05b-patched/builtins/history.def bash-3.0/builtins/history.def *** bash-2.05b-patched/builtins/history.def Tue Mar 19 14:06:33 2002 --- bash-3.0/builtins/history.def Fri Dec 19 18:02:09 2003 *************** *** 2,6 **** It implements the builtin "history" in Bash. ! Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the builtin "history" in Bash. ! Copyright (C) 1987-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 35,40 **** to append history lines from this session to the history file. Argument `-n' means to read all history lines not already read ! from the history file and append them to the history list. If ! FILENAME is given, then that is used as the history file else if $HISTFILE has a value, that is used, else ~/.bash_history. If the -s option is supplied, the non-option ARGs are appended to --- 35,41 ---- to append history lines from this session to the history file. Argument `-n' means to read all history lines not already read ! from the history file and append them to the history list. ! ! If FILENAME is given, then that is used as the history file else if $HISTFILE has a value, that is used, else ~/.bash_history. If the -s option is supplied, the non-option ARGs are appended to *************** *** 42,45 **** --- 43,50 ---- history expansion on each ARG and display the result, without storing anything in the history list. + + If the $HISTTIMEFORMAT variable is set and not null, its value is used + as a format string for strftime(3) to print the time stamp associated + with each displayed history entry. No time stamps are printed otherwise. $END *************** *** 48,52 **** #if defined (HISTORY) #include "../bashtypes.h" ! #ifndef _MINIX # include #endif --- 53,57 ---- #if defined (HISTORY) #include "../bashtypes.h" ! #if ! defined(_MINIX) && defined (HAVE_SYS_FILE_H) # include #endif *************** *** 60,63 **** --- 65,69 ---- #include "../bashansi.h" + #include "../bashintl.h" #include "../shell.h" *************** *** 73,76 **** --- 79,83 ---- extern int current_command_line_count; + static char *histtime __P((HIST_ENTRY *, const char *)); static void display_history __P((WORD_LIST *)); static int delete_histent __P((int)); *************** *** 92,96 **** WORD_LIST *list; { ! int flags, opt, result, old_history_lines; char *filename, *delete_arg; intmax_t delete_offset; --- 99,103 ---- WORD_LIST *list; { ! int flags, opt, result, old_history_lines, obase; char *filename, *delete_arg; intmax_t delete_offset; *************** *** 139,143 **** if (opt && opt != AFLAG && opt != RFLAG && opt != WFLAG && opt != NFLAG) { ! builtin_error ("cannot use more than one of -anrw"); return (EXECUTION_FAILURE); } --- 146,150 ---- if (opt && opt != AFLAG && opt != RFLAG && opt != WFLAG && opt != NFLAG) { ! builtin_error (_("cannot use more than one of -anrw")); return (EXECUTION_FAILURE); } *************** *** 171,175 **** || (delete_offset > (history_base + history_length))) { ! sh_erange (delete_arg, "history position"); return (EXECUTION_FAILURE); } --- 178,182 ---- || (delete_offset > (history_base + history_length))) { ! sh_erange (delete_arg, _("history position")); return (EXECUTION_FAILURE); } *************** *** 201,209 **** /* Read all of the lines in the file that we haven't already read. */ old_history_lines = history_lines_in_file; using_history (); result = read_history_range (filename, history_lines_in_file, -1); using_history (); history_lines_in_file = where_history (); ! history_lines_this_session += history_lines_in_file - old_history_lines; } --- 208,228 ---- /* Read all of the lines in the file that we haven't already read. */ old_history_lines = history_lines_in_file; + obase = history_base; + using_history (); result = read_history_range (filename, history_lines_in_file, -1); using_history (); + history_lines_in_file = where_history (); ! /* The question is whether we reset history_lines_this_session to 0, ! losing any history entries we had before we read the new entries ! from the history file, or whether we count the new entries we just ! read from the file as history lines added during this session. ! Right now, we do the latter. This will cause these history entries ! to be written to the history file along with any intermediate entries ! we add when we do a `history -a', but the alternative is losing ! them altogether. */ ! history_lines_this_session += history_lines_in_file - old_history_lines + ! history_base - obase; } *************** *** 215,218 **** --- 234,253 ---- #define histdata(i) (hlist[(i)]->data) + static char * + histtime (hlist, histtimefmt) + HIST_ENTRY *hlist; + const char *histtimefmt; + { + static char timestr[128]; + time_t t; + + t = history_get_time (hlist); + if (t) + strftime (timestr, sizeof (timestr), histtimefmt, localtime (&t)); + else + strcpy (timestr, "??"); + return timestr; + } + static void display_history (list) *************** *** 222,225 **** --- 257,261 ---- intmax_t limit; HIST_ENTRY **hlist; + char *histtimefmt, *timestr; if (list) *************** *** 244,252 **** i = 0; while (hlist[i]) { QUIT; ! printf ("%5d%c %s\n", i + history_base, histdata(i) ? '*' : ' ', histline(i)); i++; --- 280,294 ---- i = 0; + + histtimefmt = get_string_value ("HISTTIMEFORMAT"); + while (hlist[i]) { QUIT; ! ! timestr = (histtimefmt && *histtimefmt) ? histtime (hlist[i], histtimefmt) : (char *)NULL; ! printf ("%5d%c %s%s\n", i + history_base, histdata(i) ? '*' : ' ', + ((timestr && *timestr) ? timestr : ""), histline(i)); i++; *************** *** 264,272 **** discard = remove_history (i); if (discard) ! { ! if (discard->line) ! free (discard->line); ! free ((char *) discard); ! } return 1; } --- 306,311 ---- discard = remove_history (i); if (discard) ! free_history_entry (discard); ! return 1; } *************** *** 277,280 **** --- 316,320 ---- register int i; HIST_ENTRY **hlist, *histent; + int r; hlist = history_list (); *************** *** 291,295 **** return 0; ! return (delete_histent (i)); } --- 331,340 ---- return 0; ! r = delete_histent (i); ! ! if (where_history () > history_length) ! history_set_pos (history_length); ! ! return r; } *************** *** 343,347 **** if (r < 0) { ! builtin_error ("%s: history expansion failed", list->word->word); result = EXECUTION_FAILURE; } --- 388,392 ---- if (r < 0) { ! builtin_error (_("%s: history expansion failed"), list->word->word); result = EXECUTION_FAILURE; } diff -aNrc2 bash-2.05b-patched/builtins/jobs.def bash-3.0/builtins/jobs.def *** bash-2.05b-patched/builtins/jobs.def Tue Mar 19 12:58:18 2002 --- bash-3.0/builtins/jobs.def Fri Apr 23 16:21:15 2004 *************** *** 2,6 **** It implements the builtins "jobs" and "disown" in Bash. ! Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the builtins "jobs" and "disown" in Bash. ! Copyright (C) 1987-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 47,50 **** --- 47,51 ---- #include "../bashansi.h" + #include "../bashintl.h" #include "../shell.h" *************** *** 75,81 **** sigset_t set, oset; - if (job_control == 0 && interactive_shell == 0) - return (EXECUTION_SUCCESS); - execute = any_failed = 0; form = JLIST_STANDARD; --- 76,79 ---- *************** *** 99,103 **** if (form != JLIST_STANDARD) { ! builtin_error ("no other options allowed with `-x'"); return (EXECUTION_FAILURE); } --- 97,101 ---- if (form != JLIST_STANDARD) { ! builtin_error (_("no other options allowed with `-x'")); return (EXECUTION_FAILURE); } *************** *** 164,167 **** --- 162,166 ---- register WORD_LIST *l; int job, result; + COMMAND *command; /* First do the replacement of job specifications with pids. */ *************** *** 183,201 **** /* Next make a new simple command and execute it. */ begin_unwind_frame ("jobs_builtin"); - { - COMMAND *command = (COMMAND *)NULL; - - add_unwind_protect (dispose_command, command); - - command = make_bare_simple_command (); - command->value.Simple->words = copy_word_list (list); - command->value.Simple->redirects = (REDIRECT *)NULL; - command->flags |= CMD_INHIBIT_EXPANSION; - command->value.Simple->flags |= CMD_INHIBIT_EXPANSION; ! result = execute_command (command); ! } ! run_unwind_frame ("jobs_builtin"); return (result); } --- 182,197 ---- /* Next make a new simple command and execute it. */ begin_unwind_frame ("jobs_builtin"); ! command = make_bare_simple_command (); ! command->value.Simple->words = copy_word_list (list); ! command->value.Simple->redirects = (REDIRECT *)NULL; ! command->flags |= CMD_INHIBIT_EXPANSION; ! command->value.Simple->flags |= CMD_INHIBIT_EXPANSION; ! ! add_unwind_protect (dispose_command, command); ! result = execute_command (command); ! dispose_command (command); ! discard_unwind_frame ("jobs_builtin"); return (result); } diff -aNrc2 bash-2.05b-patched/builtins/kill.def bash-3.0/builtins/kill.def *** bash-2.05b-patched/builtins/kill.def Tue Mar 19 13:44:11 2002 --- bash-3.0/builtins/kill.def Fri Apr 23 16:50:31 2004 *************** *** 2,6 **** It implements the builtin "kill" in Bash. ! Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the builtin "kill" in Bash. ! Copyright (C) 1987-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 24,28 **** $BUILTIN kill $FUNCTION kill_builtin - $DEPENDS_ON JOB_CONTROL $SHORT_DOC kill [-s sigspec | -n signum | -sigspec] [pid | job]... or kill -l [sigspec] Send the processes named by PID (or JOB) the signal SIGSPEC. If --- 24,27 ---- *************** *** 47,50 **** --- 46,50 ---- #include "../bashansi.h" + #include "../bashintl.h" #include "../shell.h" *************** *** 58,64 **** #endif /* !errno */ - #if defined (JOB_CONTROL) extern int posixly_correct; #if !defined (CONTINUE_AFTER_KILL_ERROR) # define CONTINUE_OR_FAIL return (EXECUTION_FAILURE) --- 58,65 ---- #endif /* !errno */ extern int posixly_correct; + static void kill_error __P((pid_t, int)); + #if !defined (CONTINUE_AFTER_KILL_ERROR) # define CONTINUE_OR_FAIL return (EXECUTION_FAILURE) *************** *** 74,78 **** WORD_LIST *list; { ! int sig, any_succeeded, listing, saw_signal; char *sigspec, *word; pid_t pid; --- 75,79 ---- WORD_LIST *list; { ! int sig, any_succeeded, listing, saw_signal, dflags; char *sigspec, *word; pid_t pid; *************** *** 89,92 **** --- 90,94 ---- sigspec = "TERM"; + dflags = DSIG_NOCASE | ((posixly_correct == 0) ? DSIG_SIGPREFIX : 0); /* Process options. */ while (list) *************** *** 108,112 **** sig = 0; else ! sig = decode_signal (sigspec); list = list->next; } --- 110,114 ---- sig = 0; else ! sig = decode_signal (sigspec, dflags); list = list->next; } *************** *** 133,137 **** { sigspec = word + 1; ! sig = decode_signal (sigspec); saw_signal++; list = list->next; --- 135,139 ---- { sigspec = word + 1; ! sig = decode_signal (sigspec, dflags); saw_signal++; list = list->next; *************** *** 170,183 **** if ((pid < -1 ? kill_pid (-pid, sig, 1) : kill_pid (pid, sig, 0)) < 0) ! goto signal_error; else any_succeeded++; } else if (*list->word->word && *list->word->word != '%') { ! builtin_error ("%s: no such pid", list->word->word); CONTINUE_OR_FAIL; } ! else if (*word && (interactive || job_control)) /* Posix.2 says you can kill without job control active (4.32.4) */ { /* Must be a job spec. Check it out. */ --- 172,192 ---- if ((pid < -1 ? kill_pid (-pid, sig, 1) : kill_pid (pid, sig, 0)) < 0) ! { ! if (errno == EINVAL) ! sh_invalidsig (sigspec); ! else ! kill_error (pid, errno); ! CONTINUE_OR_FAIL; ! } else any_succeeded++; } + #if defined (JOB_CONTROL) else if (*list->word->word && *list->word->word != '%') { ! builtin_error (_("%s: arguments must be process or job IDs"), list->word->word); CONTINUE_OR_FAIL; } ! else if (*word) /* Posix.2 says you can kill without job control active (4.32.4) */ { /* Must be a job spec. Check it out. */ *************** *** 206,214 **** if (kill_pid (pid, sig, 1) < 0) { - signal_error: if (errno == EINVAL) sh_invalidsig (sigspec); else ! builtin_error ("(%ld) - %s", (long)pid, strerror (errno)); CONTINUE_OR_FAIL; } --- 215,222 ---- if (kill_pid (pid, sig, 1) < 0) { if (errno == EINVAL) sh_invalidsig (sigspec); else ! kill_error (pid, errno); CONTINUE_OR_FAIL; } *************** *** 216,219 **** --- 224,228 ---- any_succeeded++; } + #endif /* !JOB_CONTROL */ else { *************** *** 227,229 **** return (any_succeeded ? EXECUTION_SUCCESS : EXECUTION_FAILURE); } ! #endif /* JOB_CONTROL */ --- 236,250 ---- return (any_succeeded ? EXECUTION_SUCCESS : EXECUTION_FAILURE); } ! ! static void ! kill_error (pid, e) ! pid_t pid; ! int e; ! { ! char *x; ! ! x = strerror (e); ! if (x == 0) ! x = _("Unknown error"); ! builtin_error ("(%ld) - %s", (long)pid, x); ! } diff -aNrc2 bash-2.05b-patched/builtins/let.def bash-3.0/builtins/let.def *** bash-2.05b-patched/builtins/let.def Mon Apr 8 13:22:17 2002 --- bash-3.0/builtins/let.def Fri Dec 19 00:07:57 2003 *************** *** 46,50 **** || logical OR expr ? expr : expr ! conditional expression =, *=, /=, %=, +=, -=, <<=, >>=, --- 46,50 ---- || logical OR expr ? expr : expr ! conditional operator =, *=, /=, %=, +=, -=, <<=, >>=, *************** *** 73,76 **** --- 73,78 ---- #endif + #include "../bashintl.h" + #include "../shell.h" #include "common.h" *************** *** 90,94 **** if (list == 0) { ! builtin_error ("expression expected"); return (EXECUTION_FAILURE); } --- 92,96 ---- if (list == 0) { ! builtin_error (_("expression expected")); return (EXECUTION_FAILURE); } *************** *** 115,119 **** if (list == 0) { ! builtin_error ("expression expected"); return (EXECUTION_FAILURE); } --- 117,121 ---- if (list == 0) { ! builtin_error (_("expression expected")); return (EXECUTION_FAILURE); } diff -aNrc2 bash-2.05b-patched/builtins/mkbuiltins.c bash-3.0/builtins/mkbuiltins.c *** bash-2.05b-patched/builtins/mkbuiltins.c Mon Apr 8 13:22:44 2002 --- bash-3.0/builtins/mkbuiltins.c Tue Dec 9 11:42:07 2003 *************** *** 30,35 **** #ifndef _MINIX ! #include "../bashtypes.h" ! #include #endif --- 30,37 ---- #ifndef _MINIX ! # include "../bashtypes.h" ! # if defined (HAVE_SYS_FILE_H) ! # include ! # endif #endif *************** *** 1128,1131 **** --- 1130,1136 ---- fprintf (structfile, "#include \"%s\"\n", extern_filename ? extern_filename : "builtext.h"); + + fprintf (structfile, "#include \"bashintl.h\"\n"); + fprintf (structfile, "\nstruct builtin static_shell_builtins[] = {\n"); } *************** *** 1368,1373 **** } if (string_array) ! fprintf (stream, " \""); if (indentation) --- 1373,1379 ---- } + /* prefix with N_( for gettext */ if (string_array) ! fprintf (stream, " N_(\""); if (indentation) *************** *** 1391,1395 **** } ! fprintf (stream, "\",\n"); } else if (texinfo) --- 1397,1402 ---- } ! /* closing right paren for gettext */ ! fprintf (stream, "\"),\n"); } else if (texinfo) diff -aNrc2 bash-2.05b-patched/builtins/printf.def bash-3.0/builtins/printf.def *** bash-2.05b-patched/builtins/printf.def Mon May 13 14:36:04 2002 --- bash-3.0/builtins/printf.def Fri Dec 19 18:04:06 2003 *************** *** 2,6 **** It implements the builtin "printf" in Bash. ! Copyright (C) 1997-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the builtin "printf" in Bash. ! Copyright (C) 1997-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 56,59 **** --- 56,60 ---- #include "../bashansi.h" + #include "../bashintl.h" #include "../shell.h" *************** *** 106,110 **** static void printf_erange __P((char *)); static void printstr __P((char *, char *, int, int, int)); ! static int tescape __P((char *, int, char *, int *)); static char *bexpand __P((char *, int, int *, int *)); static char *mklong __P((char *, char *, size_t)); --- 107,111 ---- static void printf_erange __P((char *)); static void printstr __P((char *, char *, int, int, int)); ! static int tescape __P((char *, char *, int *)); static char *bexpand __P((char *, int, int *, int *)); static char *mklong __P((char *, char *, size_t)); *************** *** 115,119 **** static uintmax_t getuintmax __P((void)); ! #if defined (HAVE_LONG_DOUBLE) && HAVE_DECL_STRTOLD typedef long double floatmax_t; # define FLOATMAX_CONV "L" --- 116,120 ---- static uintmax_t getuintmax __P((void)); ! #if defined (HAVE_LONG_DOUBLE) && HAVE_DECL_STRTOLD && !defined(STRTOLD_BROKEN) typedef long double floatmax_t; # define FLOATMAX_CONV "L" *************** *** 183,193 **** have_fieldwidth = have_precision = 0; - if (*fmt == '\\') { fmt++; ! /* A NULL fourth argument to tescape means to not do special ! processing for \c. */ ! fmt += tescape (fmt, 1, &nextch, (int *)NULL); putchar (nextch); fmt--; /* for loop will increment it for us again */ --- 184,193 ---- have_fieldwidth = have_precision = 0; if (*fmt == '\\') { fmt++; ! /* A NULL third argument to tescape means to bypass the ! special processing for arguments to %b. */ ! fmt += tescape (fmt, &nextch, (int *)NULL); putchar (nextch); fmt--; /* for loop will increment it for us again */ *************** *** 247,251 **** if (*fmt == 0) { ! builtin_error ("`%s': missing format character", start); PRETURN (EXECUTION_FAILURE); } --- 247,251 ---- if (*fmt == 0) { ! builtin_error (_("`%s': missing format character"), start); PRETURN (EXECUTION_FAILURE); } *************** *** 406,410 **** error message and return a failure exit status. */ default: ! builtin_error ("`%c': invalid format character", convch); PRETURN (EXECUTION_FAILURE); } --- 406,410 ---- error message and return a failure exit status. */ default: ! builtin_error (_("`%c': invalid format character"), convch); PRETURN (EXECUTION_FAILURE); } *************** *** 532,535 **** --- 532,536 ---- /* Convert STRING by expanding the escape sequences specified by the POSIX standard for printf's `%b' format string. If SAWC is non-null, + perform the processing appropriate for %b arguments. In particular, recognize `\c' and use that as a string terminator. If we see \c, set *SAWC to 1 before returning. LEN is the length of STRING. */ *************** *** 541,549 **** to short-circuit the rest of the processing. If SAWC is null, we don't do the \c short-circuiting, and \c is treated as an unrecognized escape ! sequence. */ static int ! tescape (estart, trans_squote, cp, sawc) char *estart; - int trans_squote; char *cp; int *sawc; --- 542,549 ---- to short-circuit the rest of the processing. If SAWC is null, we don't do the \c short-circuiting, and \c is treated as an unrecognized escape ! sequence; we also bypass the other processing specific to %b arguments. */ static int ! tescape (estart, cp, sawc) char *estart; char *cp; int *sawc; *************** *** 577,588 **** case 'v': *cp = '\v'; break; ! /* %b octal constants are `\0' followed by one, two, or three ! octal digits... */ ! case '0': ! /* but, as an extension, the other echo-like octal escape ! sequences are supported as well. */ ! case '1': case '2': case '3': case '4': ! case '5': case '6': case '7': ! for (temp = 2+(c=='0'), evalue = c - '0'; ISOCTAL (*p) && temp--; p++) evalue = (evalue * 8) + OCTVALUE (*p); *cp = evalue & 0xFF; --- 577,587 ---- case 'v': *cp = '\v'; break; ! /* The octal escape sequences are `\0' followed by up to three octal ! digits (if SAWC), or `\' followed by up to three octal digits (if ! !SAWC). As an extension, we allow the latter form even if SAWC. */ ! case '0': case '1': case '2': case '3': ! case '4': case '5': case '6': case '7': ! evalue = OCTVALUE (c); ! for (temp = 2 + (!evalue && !!sawc); ISOCTAL (*p) && temp--; p++) evalue = (evalue * 8) + OCTVALUE (*p); *cp = evalue & 0xFF; *************** *** 592,600 **** hex digit. */ case 'x': for (temp = 2, evalue = 0; ISXDIGIT ((unsigned char)*p) && temp--; p++) evalue = (evalue * 16) + HEXVALUE (*p); ! if (temp == 2) { ! builtin_error ("missing hex digit for \\x"); *cp = '\\'; return 0; --- 591,603 ---- hex digit. */ case 'x': + #if 0 + for (evalue = 0; ISXDIGIT ((unsigned char)*p); p++) + #else for (temp = 2, evalue = 0; ISXDIGIT ((unsigned char)*p) && temp--; p++) + #endif evalue = (evalue * 16) + HEXVALUE (*p); ! if (p == estart + 1) { ! builtin_error (_("missing hex digit for \\x")); *cp = '\\'; return 0; *************** *** 607,612 **** break; ! case '\'': /* TRANS_SQUOTE != 0 means \' -> ' */ ! if (trans_squote) *cp = c; else --- 610,618 ---- break; ! /* SAWC == 0 means that \', \", and \? are recognized as escape ! sequences, though the only processing performed is backslash ! removal. */ ! case '\'': case '"': case '?': ! if (!sawc) *cp = c; else *************** *** 658,662 **** } temp = 0; ! s += tescape (s, 0, &c, &temp); if (temp) { --- 664,668 ---- } temp = 0; ! s += tescape (s, &c, &temp); if (temp) { diff -aNrc2 bash-2.05b-patched/builtins/pushd.def bash-3.0/builtins/pushd.def *** bash-2.05b-patched/builtins/pushd.def Mon Apr 8 13:23:16 2002 --- bash-3.0/builtins/pushd.def Fri Dec 19 18:05:04 2003 *************** *** 2,6 **** builtins "pushd", "popd", and "dirs" in Bash. ! Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- builtins "pushd", "popd", and "dirs" in Bash. ! Copyright (C) 1987-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 108,111 **** --- 108,112 ---- #include "../bashansi.h" + #include "../bashintl.h" #include *************** *** 165,169 **** if (directory_list_offset == 0) { ! builtin_error ("no other directory"); return (EXECUTION_FAILURE); } --- 166,170 ---- if (directory_list_offset == 0) { ! builtin_error (_("no other directory")); return (EXECUTION_FAILURE); } *************** *** 432,436 **** temp = get_working_directory ("dirs"); if (temp == 0) ! temp = savestring (""); if (vflag & 2) printf ("%2d %s", 0, DIRSTACK_FORMAT (temp)); --- 433,437 ---- temp = get_working_directory ("dirs"); if (temp == 0) ! temp = savestring (_("")); if (vflag & 2) printf ("%2d %s", 0, DIRSTACK_FORMAT (temp)); *************** *** 649,712 **** #ifdef LOADABLE_BUILTIN static char *dirs_doc[] = { ! "Display the list of currently remembered directories. Directories", ! "find their way onto the list with the `pushd' command; you can get", ! "back up through the list with the `popd' command.", ! "", ! "The -l flag specifies that `dirs' should not print shorthand versions", ! "of directories which are relative to your home directory. This means", ! "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag", ! "causes `dirs' to print the directory stack with one entry per line,", ! "prepending the directory name with its position in the stack. The -p", ! "flag does the same thing, but the stack position is not prepended.", ! "The -c flag clears the directory stack by deleting all of the elements.", ! "", ! "+N displays the Nth entry counting from the left of the list shown by", ! " dirs when invoked without options, starting with zero.", ! "", ! "-N displays the Nth entry counting from the right of the list shown by", ! " dirs when invoked without options, starting with zero.", (char *)NULL }; static char *pushd_doc[] = { ! "Adds a directory to the top of the directory stack, or rotates", ! "the stack, making the new top of the stack the current working", ! "directory. With no arguments, exchanges the top two directories.", ! "", ! "+N Rotates the stack so that the Nth directory (counting", ! " from the left of the list shown by `dirs', starting with", ! " zero) is at the top.", ! "", ! "-N Rotates the stack so that the Nth directory (counting", ! " from the right of the list shown by `dirs', starting with", ! " zero) is at the top.", ! "", ! "-n suppress the normal change of directory when adding directories", ! " to the stack, so only the stack is manipulated.", ! "", ! "dir adds DIR to the directory stack at the top, making it the", ! " new current working directory.", ! "", ! "You can see the directory stack with the `dirs' command.", (char *)NULL }; static char *popd_doc[] = { ! "Removes entries from the directory stack. With no arguments,", ! "removes the top directory from the stack, and cd's to the new", ! "top directory.", ! "", ! "+N removes the Nth entry counting from the left of the list", ! " shown by `dirs', starting with zero. For example: `popd +0'", ! " removes the first directory, `popd +1' the second.", ! "", ! "-N removes the Nth entry counting from the right of the list", ! " shown by `dirs', starting with zero. For example: `popd -0'", ! " removes the last directory, `popd -1' the next to last.", ! "", ! "-n suppress the normal change of directory when removing directories", ! " from the stack, so only the stack is manipulated.", ! "", ! "You can see the directory stack with the `dirs' command.", (char *)NULL }; --- 650,713 ---- #ifdef LOADABLE_BUILTIN static char *dirs_doc[] = { ! N_("Display the list of currently remembered directories. Directories"), ! N_("find their way onto the list with the `pushd' command; you can get"), ! N_("back up through the list with the `popd' command."), ! N_(""), ! N_("The -l flag specifies that `dirs' should not print shorthand versions"), ! N_("of directories which are relative to your home directory. This means"), ! N_("that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag"), ! N_("causes `dirs' to print the directory stack with one entry per line,"), ! N_("prepending the directory name with its position in the stack. The -p"), ! N_("flag does the same thing, but the stack position is not prepended."), ! N_("The -c flag clears the directory stack by deleting all of the elements."), ! N_(""), ! N_("+N displays the Nth entry counting from the left of the list shown by"), ! N_(" dirs when invoked without options, starting with zero."), ! N_(""), ! N_("-N displays the Nth entry counting from the right of the list shown by"), ! N_(" dirs when invoked without options, starting with zero."), (char *)NULL }; static char *pushd_doc[] = { ! N_("Adds a directory to the top of the directory stack, or rotates"), ! N_("the stack, making the new top of the stack the current working"), ! N_("directory. With no arguments, exchanges the top two directories."), ! N_(""), ! N_("+N Rotates the stack so that the Nth directory (counting"), ! N_(" from the left of the list shown by `dirs', starting with"), ! N_(" zero) is at the top."), ! N_(""), ! N_("-N Rotates the stack so that the Nth directory (counting"), ! N_(" from the right of the list shown by `dirs', starting with"), ! N_(" zero) is at the top."), ! N_(""), ! N_("-n suppress the normal change of directory when adding directories"), ! N_(" to the stack, so only the stack is manipulated."), ! N_(""), ! N_("dir adds DIR to the directory stack at the top, making it the"), ! N_(" new current working directory."), ! N_(""), ! N_("You can see the directory stack with the `dirs' command."), (char *)NULL }; static char *popd_doc[] = { ! N_("Removes entries from the directory stack. With no arguments,"), ! N_("removes the top directory from the stack, and cd's to the new"), ! N_("top directory."), ! N_(""), ! N_("+N removes the Nth entry counting from the left of the list"), ! N_(" shown by `dirs', starting with zero. For example: `popd +0'"), ! N_(" removes the first directory, `popd +1' the second."), ! N_(""), ! N_("-N removes the Nth entry counting from the right of the list"), ! N_(" shown by `dirs', starting with zero. For example: `popd -0'"), ! N_(" removes the last directory, `popd -1' the next to last."), ! N_(""), ! N_("-n suppress the normal change of directory when removing directories"), ! N_(" from the stack, so only the stack is manipulated."), ! N_(""), ! N_("You can see the directory stack with the `dirs' command."), (char *)NULL }; diff -aNrc2 bash-2.05b-patched/builtins/read.def bash-3.0/builtins/read.def *** bash-2.05b-patched/builtins/read.def Tue Mar 19 14:33:41 2002 --- bash-3.0/builtins/read.def Sat Jan 24 13:16:36 2004 *************** *** 2,6 **** It implements the builtin "read" in Bash. ! Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the builtin "read" in Bash. ! Copyright (C) 1987-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 67,70 **** --- 67,72 ---- #endif + #include "../bashintl.h" + #include "../shell.h" #include "common.h" *************** *** 203,207 **** if (code == 0 || intval < 0 || intval != (unsigned int)intval) { ! builtin_error ("%s: invalid timeout specification", list_optarg); return (EXECUTION_FAILURE); } --- 205,209 ---- if (code == 0 || intval < 0 || intval != (unsigned int)intval) { ! builtin_error (_("%s: invalid timeout specification"), list_optarg); return (EXECUTION_FAILURE); } *************** *** 226,230 **** if (code == 0 || intval < 0 || intval != (int)intval) { ! builtin_error ("%s: invalid file descriptor specification", list_optarg); return (EXECUTION_FAILURE); } --- 228,232 ---- if (code == 0 || intval < 0 || intval != (int)intval) { ! builtin_error (_("%s: invalid file descriptor specification"), list_optarg); return (EXECUTION_FAILURE); } *************** *** 233,237 **** if (sh_validfd (fd) == 0) { ! builtin_error ("%d: invalid file descriptor: %s", fd, strerror (errno)); return (EXECUTION_FAILURE); } --- 235,239 ---- if (sh_validfd (fd) == 0) { ! builtin_error (_("%d: invalid file descriptor: %s"), fd, strerror (errno)); return (EXECUTION_FAILURE); } *************** *** 459,463 **** if (retval < 0) { ! builtin_error ("read error: %d: %s", fd, strerror (errno)); return (EXECUTION_FAILURE); } --- 461,465 ---- if (retval < 0) { ! builtin_error (_("read error: %d: %s"), fd, strerror (errno)); return (EXECUTION_FAILURE); } *************** *** 498,501 **** --- 500,510 ---- if (arrayname) { + if (legal_identifier (arrayname) == 0) + { + sh_invalidid (arrayname); + xfree (input_string); + return (EXECUTION_FAILURE); + } + var = find_or_make_array_variable (arrayname, 1); if (var == 0) *************** *** 506,509 **** --- 515,519 ---- if (alist) { + word_list_remove_quoted_nulls (alist); assign_array_var_from_word_list (var, alist); dispose_words (alist); diff -aNrc2 bash-2.05b-patched/builtins/return.def bash-3.0/builtins/return.def *** bash-2.05b-patched/builtins/return.def Mon Apr 8 13:23:25 2002 --- bash-3.0/builtins/return.def Fri Dec 19 18:30:47 2003 *************** *** 2,6 **** It implements the builtin "return" in Bash. ! Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the builtin "return" in Bash. ! Copyright (C) 1987-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 39,42 **** --- 39,44 ---- #endif + #include "../bashintl.h" + #include "../shell.h" #include "common.h" *************** *** 59,63 **** else { ! builtin_error ("can only `return' from a function or sourced script"); return (EXECUTION_FAILURE); } --- 61,65 ---- else { ! builtin_error (_("can only `return' from a function or sourced script")); return (EXECUTION_FAILURE); } diff -aNrc2 bash-2.05b-patched/builtins/set.def bash-3.0/builtins/set.def *** bash-2.05b-patched/builtins/set.def Wed Jul 10 16:17:20 2002 --- bash-3.0/builtins/set.def Fri Dec 19 19:00:46 2003 *************** *** 34,37 **** --- 34,38 ---- #include "../bashansi.h" + #include "../bashintl.h" #include "../shell.h" *************** *** 78,81 **** --- 79,84 ---- #endif /* READLINE */ errexit same as -e + errtrace same as -E + functrace same as -T hashall same as -h #if defined (BANG_HISTORY) *************** *** 98,101 **** --- 101,107 ---- onecmd same as -t physical same as -P + pipefail the return value of a pipeline is the status of + the last command to exit with a non-zero status, + or zero if no command exited with a non-zero status posix change the behavior of bash where the default operation differs from the 1003.2 standard to *************** *** 120,123 **** --- 126,130 ---- -C If set, disallow existing regular files to be overwritten by redirection of output. + -E If set, the ERR trap is inherited by shell functions. #if defined (BANG_HISTORY) -H Enable ! style history substitution. This flag is on *************** *** 126,129 **** --- 133,137 ---- -P If set, do not follow symbolic links when executing commands such as cd which change the current directory. + -T If set, the DEBUG trap is inherited by shell functions. Using + rather than - causes these flags to be turned off. The *************** *** 173,176 **** --- 181,186 ---- #endif { "errexit", 'e', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, + { "errtrace", 'E', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, + { "functrace", 'T', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, { "hashall", 'h', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, #if defined (BANG_HISTORY) *************** *** 196,199 **** --- 206,210 ---- { "onecmd", 't', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, { "physical", 'P', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, + { "pipefail", '\0', &pipefail_opt, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, { "posix", '\0', &posixly_correct, set_posix_mode, (setopt_get_func_t *)NULL }, { "privileged", 'p', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, *************** *** 730,734 **** if (unset_function && unset_variable) { ! builtin_error ("cannot simultaneously unset a function and a variable"); return (EXECUTION_FAILURE); } --- 741,745 ---- if (unset_function && unset_variable) { ! builtin_error (_("cannot simultaneously unset a function and a variable")); return (EXECUTION_FAILURE); } *************** *** 767,771 **** if (var && !unset_function && non_unsettable_p (var)) { ! builtin_error ("%s: cannot unset", name); NEXT_VARIABLE (); } --- 778,782 ---- if (var && !unset_function && non_unsettable_p (var)) { ! builtin_error (_("%s: cannot unset"), name); NEXT_VARIABLE (); } *************** *** 774,778 **** if (var && readonly_p (var)) { ! builtin_error ("%s: cannot unset: readonly %s", name, unset_function ? "function" : "variable"); NEXT_VARIABLE (); --- 785,789 ---- if (var && readonly_p (var)) { ! builtin_error (_("%s: cannot unset: readonly %s"), name, unset_function ? "function" : "variable"); NEXT_VARIABLE (); *************** *** 785,789 **** if (array_p (var) == 0) { ! builtin_error ("%s: not an array variable", name); NEXT_VARIABLE (); } --- 796,800 ---- if (array_p (var) == 0) { ! builtin_error (_("%s: not an array variable"), name); NEXT_VARIABLE (); } diff -aNrc2 bash-2.05b-patched/builtins/setattr.def bash-3.0/builtins/setattr.def *** bash-2.05b-patched/builtins/setattr.def Fri Jun 21 17:11:02 2002 --- bash-3.0/builtins/setattr.def Fri Dec 19 19:01:16 2003 *************** *** 2,6 **** It implements the builtins "export" and "readonly", in Bash. ! Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the builtins "export" and "readonly", in Bash. ! Copyright (C) 1987-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 33,36 **** --- 33,37 ---- #include #include "../bashansi.h" + #include "../bashintl.h" #include "../shell.h" *************** *** 76,86 **** $BUILTIN readonly $FUNCTION readonly_builtin ! $SHORT_DOC readonly [-anf] [name[=value] ...] or readonly -p The given NAMEs are marked readonly and the values of these NAMEs may not be changed by subsequent assignment. If the -f option is given, then functions corresponding to the NAMEs are so marked. If no arguments are given, or if `-p' is given, a list of all readonly names ! is printed. An argument of `-n' says to remove the readonly property ! from subsequent NAMEs. The `-a' option means to treat each NAME as an array variable. An argument of `--' disables further option processing. --- 77,86 ---- $BUILTIN readonly $FUNCTION readonly_builtin ! $SHORT_DOC readonly [-af] [name[=value] ...] or readonly -p The given NAMEs are marked readonly and the values of these NAMEs may not be changed by subsequent assignment. If the -f option is given, then functions corresponding to the NAMEs are so marked. If no arguments are given, or if `-p' is given, a list of all readonly names ! is printed. The `-a' option means to treat each NAME as an array variable. An argument of `--' disables further option processing. *************** *** 104,108 **** /* For each variable name in LIST, make that variable have the specified ATTRIBUTE. An arg of `-n' says to remove the attribute from the the ! remaining names in LIST. */ int set_or_show_attributes (list, attribute, nodefs) --- 104,108 ---- /* For each variable name in LIST, make that variable have the specified ATTRIBUTE. An arg of `-n' says to remove the attribute from the the ! remaining names in LIST (doesn't work for readonly). */ int set_or_show_attributes (list, attribute, nodefs) *************** *** 163,167 **** if (var == 0) { ! builtin_error ("%s: not a function", name); any_failed++; } --- 163,167 ---- if (var == 0) { ! builtin_error (_("%s: not a function"), name); any_failed++; } *************** *** 174,178 **** /* xxx [-np] name[=value] */ ! assign = assignment (name); if (assign) --- 174,178 ---- /* xxx [-np] name[=value] */ ! assign = assignment (name, 0); if (assign) diff -aNrc2 bash-2.05b-patched/builtins/shift.def bash-3.0/builtins/shift.def *** bash-2.05b-patched/builtins/shift.def Tue Mar 19 14:08:56 2002 --- bash-3.0/builtins/shift.def Mon Feb 9 15:02:41 2004 *************** *** 2,6 **** It implements the builtin "shift" in Bash. ! Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the builtin "shift" in Bash. ! Copyright (C) 1987-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 32,35 **** --- 32,36 ---- #include "../bashansi.h" + #include "../bashintl.h" #include "../shell.h" *************** *** 63,67 **** else if (times < 0) { ! sh_erange (list->word->word, "shift count"); return (EXECUTION_FAILURE); } --- 64,68 ---- else if (times < 0) { ! sh_erange (list ? list->word->word : NULL, _("shift count")); return (EXECUTION_FAILURE); } *************** *** 69,73 **** { if (print_shift_error) ! sh_erange (list->word->word, "shift count"); return (EXECUTION_FAILURE); } --- 70,74 ---- { if (print_shift_error) ! sh_erange (list ? list->word->word : NULL, _("shift count")); return (EXECUTION_FAILURE); } diff -aNrc2 bash-2.05b-patched/builtins/shopt.def bash-3.0/builtins/shopt.def *** bash-2.05b-patched/builtins/shopt.def Thu Apr 4 14:21:32 2002 --- bash-3.0/builtins/shopt.def Fri Dec 19 19:02:29 2003 *************** *** 2,6 **** It implements the Bash `shopt' builtin. ! Copyright (C) 1994-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the Bash `shopt' builtin. ! Copyright (C) 1994-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 46,49 **** --- 46,51 ---- #include + #include "../bashintl.h" + #include "../shell.h" #include "../flags.h" *************** *** 56,68 **** #define OPTFMT "%-15s\t%s\n" ! extern int allow_null_glob_expansion, glob_dot_filenames; extern int cdable_vars, mail_warning, source_uses_path; extern int no_exit_on_failed_exec, print_shift_error; extern int check_hashed_filenames, promptvars; extern int cdspelling, expand_aliases; extern int check_window_size; extern int glob_ignore_case; extern int hup_on_exit; extern int xpg_echo; #if defined (EXTENDED_GLOB) --- 58,72 ---- #define OPTFMT "%-15s\t%s\n" ! extern int allow_null_glob_expansion, fail_glob_expansion, glob_dot_filenames; extern int cdable_vars, mail_warning, source_uses_path; extern int no_exit_on_failed_exec, print_shift_error; extern int check_hashed_filenames, promptvars; extern int cdspelling, expand_aliases; + extern int extended_quote; extern int check_window_size; extern int glob_ignore_case; extern int hup_on_exit; extern int xpg_echo; + extern int gnu_error_format; #if defined (EXTENDED_GLOB) *************** *** 78,81 **** --- 82,86 ---- extern int hist_verify, history_reediting, perform_hostname_completion; extern int no_empty_command_completion; + extern int force_fignore; extern int enable_hostname_completion __P((int)); #endif *************** *** 89,95 **** #endif static void shopt_error __P((char *)); ! static int set_interactive_comments __P((int)); #if defined (RESTRICTED_SHELL) --- 94,104 ---- #endif + #if defined (DEBUGGER) + extern int debugging_mode; + #endif + static void shopt_error __P((char *)); ! static int set_shellopts_after_change __P((int)); #if defined (RESTRICTED_SHELL) *************** *** 116,123 **** --- 125,139 ---- { "execfail", &no_exit_on_failed_exec, (shopt_set_func_t *)NULL }, { "expand_aliases", &expand_aliases, (shopt_set_func_t *)NULL }, + #if defined (DEBUGGER) + { "extdebug", &debugging_mode, (shopt_set_func_t *)NULL }, + #endif #if defined (EXTENDED_GLOB) { "extglob", &extended_glob, (shopt_set_func_t *)NULL }, #endif + { "extquote", &extended_quote, (shopt_set_func_t *)NULL }, + { "failglob", &fail_glob_expansion, (shopt_set_func_t *)NULL }, #if defined (READLINE) + { "force_fignore", &force_fignore, (shopt_set_func_t *)NULL }, + { "gnu_errfmt", &gnu_error_format, (shopt_set_func_t *)NULL }, { "histreedit", &history_reediting, (shopt_set_func_t *)NULL }, #endif *************** *** 130,134 **** #endif { "huponexit", &hup_on_exit, (shopt_set_func_t *)NULL }, ! { "interactive_comments", &interactive_comments, set_interactive_comments }, #if defined (HISTORY) { "lithist", &literal_history, (shopt_set_func_t *)NULL }, --- 146,150 ---- #endif { "huponexit", &hup_on_exit, (shopt_set_func_t *)NULL }, ! { "interactive_comments", &interactive_comments, set_shellopts_after_change }, #if defined (HISTORY) { "lithist", &literal_history, (shopt_set_func_t *)NULL }, *************** *** 208,212 **** if ((flags & (SFLAG|UFLAG)) == (SFLAG|UFLAG)) { ! builtin_error ("cannot set and unset shell options simultaneously"); return (EXECUTION_FAILURE); } --- 224,228 ---- if ((flags & (SFLAG|UFLAG)) == (SFLAG|UFLAG)) { ! builtin_error (_("cannot set and unset shell options simultaneously")); return (EXECUTION_FAILURE); } *************** *** 273,277 **** char *s; { ! builtin_error ("%s: invalid shell option name", s); } --- 289,293 ---- char *s; { ! builtin_error (_("%s: invalid shell option name"), s); } *************** *** 436,440 **** change is reflected in $SHELLOPTS. */ static int ! set_interactive_comments (mode) int mode; { --- 452,456 ---- change is reflected in $SHELLOPTS. */ static int ! set_shellopts_after_change (mode) int mode; { diff -aNrc2 bash-2.05b-patched/builtins/source.def bash-3.0/builtins/source.def *** bash-2.05b-patched/builtins/source.def Fri May 10 12:36:56 2002 --- bash-3.0/builtins/source.def Fri Dec 19 19:03:06 2003 *************** *** 2,6 **** It implements the builtins "." and "source" in Bash. ! Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the builtins "." and "source" in Bash. ! Copyright (C) 1987-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 24,37 **** $BUILTIN source $FUNCTION source_builtin ! $SHORT_DOC source filename Read and execute commands from FILENAME and return. The pathnames ! in $PATH are used to find the directory containing FILENAME. $END $BUILTIN . $DOCNAME dot $FUNCTION source_builtin ! $SHORT_DOC . filename Read and execute commands from FILENAME and return. The pathnames ! in $PATH are used to find the directory containing FILENAME. $END /* source.c - Implements the `.' and `source' builtins. */ --- 24,41 ---- $BUILTIN source $FUNCTION source_builtin ! $SHORT_DOC source filename [arguments] Read and execute commands from FILENAME and return. The pathnames ! in $PATH are used to find the directory containing FILENAME. If any ! ARGUMENTS are supplied, they become the positional parameters when ! FILENAME is executed. $END $BUILTIN . $DOCNAME dot $FUNCTION source_builtin ! $SHORT_DOC . filename [arguments] Read and execute commands from FILENAME and return. The pathnames ! in $PATH are used to find the directory containing FILENAME. If any ! ARGUMENTS are supplied, they become the positional parameters when ! FILENAME is executed. $END /* source.c - Implements the `.' and `source' builtins. */ *************** *** 42,46 **** #include "posixstat.h" #include "filecntl.h" ! #ifndef _MINIX # include #endif --- 46,50 ---- #include "posixstat.h" #include "filecntl.h" ! #if ! defined(_MINIX) && defined (HAVE_SYS_FILE_H) # include #endif *************** *** 52,60 **** --- 56,67 ---- #include "../bashansi.h" + #include "../bashintl.h" #include "../shell.h" + #include "../flags.h" #include "../findcmd.h" #include "common.h" #include "bashgetopt.h" + #include "../trap.h" #if !defined (errno) *************** *** 86,89 **** --- 93,98 ---- else pop_dollar_vars (); + if (debugging_mode) + pop_args (); /* restore BASH_ARGC and BASH_ARGV */ set_dollar_vars_unchanged (); } *************** *** 98,102 **** { int result; ! char *filename; if (no_options (list)) --- 107,111 ---- { int result; ! char *filename, *debug_trap; if (no_options (list)) *************** *** 106,110 **** if (list == 0) { ! builtin_error ("filename argument required"); builtin_usage (); return (EX_USAGE); --- 115,119 ---- if (list == 0) { ! builtin_error (_("filename argument required")); builtin_usage (); return (EX_USAGE); *************** *** 126,130 **** if (source_searches_cwd == 0) { ! builtin_error ("%s: file not found", list->word->word); return (EXECUTION_FAILURE); } --- 135,139 ---- if (source_searches_cwd == 0) { ! builtin_error (_("%s: file not found"), list->word->word); return (EXECUTION_FAILURE); } *************** *** 141,148 **** add_unwind_protect ((Function *)maybe_pop_dollar_vars, (char *)NULL); remember_args (list->next, 1); } set_dollar_vars_unchanged (); ! result = source_file (filename); run_unwind_frame ("source"); --- 150,171 ---- add_unwind_protect ((Function *)maybe_pop_dollar_vars, (char *)NULL); remember_args (list->next, 1); + if (debugging_mode) + push_args (list->next); /* Update BASH_ARGV and BASH_ARGC */ } set_dollar_vars_unchanged (); ! /* Don't inherit the DEBUG trap unless function_trace_mode (overloaded) ! is set. XXX - should sourced files inherit the RETURN trap? Functions ! don't. */ ! debug_trap = TRAP_STRING (DEBUG_TRAP); ! if (debug_trap && function_trace_mode == 0) ! { ! debug_trap = savestring (debug_trap); ! add_unwind_protect (xfree, debug_trap); ! add_unwind_protect (set_debug_trap, debug_trap); ! restore_default_signal (DEBUG_TRAP); ! } ! ! result = source_file (filename, (list && list->next)); run_unwind_frame ("source"); diff -aNrc2 bash-2.05b-patched/builtins/suspend.def bash-3.0/builtins/suspend.def *** bash-2.05b-patched/builtins/suspend.def Tue Mar 19 13:03:15 2002 --- bash-3.0/builtins/suspend.def Fri Dec 19 19:03:42 2003 *************** *** 2,6 **** It implements the builtin "suspend" in Bash. ! Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the builtin "suspend" in Bash. ! Copyright (C) 1987-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 43,46 **** --- 43,47 ---- #include "../bashtypes.h" #include + #include "../bashintl.h" #include "../shell.h" #include "../jobs.h" *************** *** 90,94 **** if (job_control == 0) { ! sh_nojobs ("cannot suspend"); return (EXECUTION_FAILURE); } --- 91,95 ---- if (job_control == 0) { ! sh_nojobs (_("cannot suspend")); return (EXECUTION_FAILURE); } *************** *** 100,108 **** if (login_shell) { ! builtin_error ("cannot suspend a login shell"); return (EXECUTION_FAILURE); } } old_cont = (SigHandler *)set_signal_handler (SIGCONT, suspend_continue); #if 0 --- 101,112 ---- if (login_shell) { ! builtin_error (_("cannot suspend a login shell")); return (EXECUTION_FAILURE); } } + /* XXX - should we put ourselves back into the original pgrp now? If so, + call end_job_control() here and do the right thing in suspend_continue + (that is, call restart_job_control()). */ old_cont = (SigHandler *)set_signal_handler (SIGCONT, suspend_continue); #if 0 diff -aNrc2 bash-2.05b-patched/builtins/trap.def bash-3.0/builtins/trap.def *** bash-2.05b-patched/builtins/trap.def Tue Mar 19 12:40:18 2002 --- bash-3.0/builtins/trap.def Thu May 27 22:26:19 2004 *************** *** 2,6 **** It implements the builtin "trap" in Bash. ! Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the builtin "trap" in Bash. ! Copyright (C) 1987-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 24,41 **** $BUILTIN trap $FUNCTION trap_builtin ! $SHORT_DOC trap [arg] [signal_spec ...] or trap -l The command ARG is to be read and executed when the shell receives ! signal(s) SIGNAL_SPEC. If ARG is absent all specified signals are ! reset to their original values. If ARG is the null string each ! SIGNAL_SPEC is ignored by the shell and by the commands it invokes. ! If a SIGNAL_SPEC is EXIT (0) the command ARG is executed on exit from ! the shell. If a SIGNAL_SPEC is DEBUG, ARG is executed after every ! command. If ARG is `-p' then the trap commands associated with ! each SIGNAL_SPEC are displayed. If no arguments are supplied or if ! only `-p' is given, trap prints the list of commands associated with ! each signal number. Each SIGNAL_SPEC is either a signal name in ! or a signal number. `trap -l' prints a list of signal names and their ! corresponding numbers. Note that a signal can be sent to the shell ! with "kill -signal $$". $END --- 24,42 ---- $BUILTIN trap $FUNCTION trap_builtin ! $SHORT_DOC trap [-lp] [[arg] signal_spec ...] The command ARG is to be read and executed when the shell receives ! signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC ! is supplied) or `-', each specified signal is reset to its original ! value. If ARG is the null string each SIGNAL_SPEC is ignored by the ! shell and by the commands it invokes. If a SIGNAL_SPEC is EXIT (0) ! the command ARG is executed on exit from the shell. If a SIGNAL_SPEC ! is DEBUG, ARG is executed after every simple command. If the`-p' option ! is supplied then the trap commands associated with each SIGNAL_SPEC are ! displayed. If no arguments are supplied or if only `-p' is given, trap ! prints the list of commands associated with each signal. Each SIGNAL_SPEC ! is either a signal name in or a signal number. Signal names ! are case insensitive and the SIG prefix is optional. `trap -l' prints ! a list of signal names and their corresponding numbers. Note that a ! signal can be sent to the shell with "kill -signal $$". $END *************** *** 109,112 **** --- 110,115 ---- list = loptend; + opt = DSIG_NOCASE|DSIG_SIGPREFIX; /* flags for decode_signal */ + if (list_signal_names) return (display_signal_list ((WORD_LIST *)NULL, 1)); *************** *** 120,130 **** operation = SET; first_arg = list->word->word; ! if (first_arg && *first_arg && (*first_arg != '-' || first_arg[1]) && ! signal_object_p (first_arg)) operation = REVERT; else { list = list->next; ! if (*first_arg == '\0') operation = IGNORE; else if (first_arg[0] == '-' && !first_arg[1]) --- 123,142 ---- operation = SET; first_arg = list->word->word; ! /* When in posix mode, the historical behavior of looking for a ! missing first argument is disabled. To revert to the original ! signal handling disposition, use `-' as the first argument. */ ! if (posixly_correct == 0 && first_arg && *first_arg && ! (*first_arg != '-' || first_arg[1]) && ! signal_object_p (first_arg, opt) && list->next == 0) operation = REVERT; else { list = list->next; ! if (list == 0) ! { ! builtin_usage (); ! return (EX_USAGE); ! } ! else if (*first_arg == '\0') operation = IGNORE; else if (first_arg[0] == '-' && !first_arg[1]) *************** *** 134,138 **** while (list) { ! sig = decode_signal (list->word->word); if (sig == NO_SIG) --- 146,150 ---- while (list) { ! sig = decode_signal (list->word->word, opt); if (sig == NO_SIG) *************** *** 236,240 **** for (result = EXECUTION_SUCCESS; list; list = list->next) { ! i = decode_signal (list->word->word); if (i == NO_SIG) { --- 248,252 ---- for (result = EXECUTION_SUCCESS; list; list = list->next) { ! i = decode_signal (list->word->word, DSIG_NOCASE|DSIG_SIGPREFIX); if (i == NO_SIG) { diff -aNrc2 bash-2.05b-patched/builtins/type.def bash-3.0/builtins/type.def *** bash-2.05b-patched/builtins/type.def Tue Mar 19 10:41:37 2002 --- bash-3.0/builtins/type.def Fri Dec 19 19:05:51 2003 *************** *** 59,62 **** --- 59,63 ---- #include #include "../bashansi.h" + #include "../bashintl.h" #include "../shell.h" *************** *** 74,77 **** --- 75,79 ---- extern char *this_command_name; + extern int expand_aliases; /* For each word in LIST, find out what the shell is going to do with *************** *** 222,231 **** #if defined (ALIAS) /* Command is an alias? */ ! if (((dflags & CDESC_FORCE_PATH) == 0) && (alias = find_alias (command))) { if (dflags & CDESC_TYPE) puts ("alias"); else if (dflags & CDESC_SHORTDESC) ! printf ("%s is aliased to `%s'\n", command, alias->value); else if (dflags & CDESC_REUSABLE) { --- 224,233 ---- #if defined (ALIAS) /* Command is an alias? */ ! if (((dflags & CDESC_FORCE_PATH) == 0) && expand_aliases && (alias = find_alias (command))) { if (dflags & CDESC_TYPE) puts ("alias"); else if (dflags & CDESC_SHORTDESC) ! printf (_("%s is aliased to `%s'\n"), command, alias->value); else if (dflags & CDESC_REUSABLE) { *************** *** 248,252 **** puts ("keyword"); else if (dflags & CDESC_SHORTDESC) ! printf ("%s is a shell keyword\n", command); else if (dflags & CDESC_REUSABLE) printf ("%s\n", command); --- 250,254 ---- puts ("keyword"); else if (dflags & CDESC_SHORTDESC) ! printf (_("%s is a shell keyword\n"), command); else if (dflags & CDESC_REUSABLE) printf ("%s\n", command); *************** *** 268,272 **** char *result; ! printf ("%s is a function\n", command); /* We're blowing away THE_PRINTED_COMMAND here... */ --- 270,274 ---- char *result; ! printf (_("%s is a function\n"), command); /* We're blowing away THE_PRINTED_COMMAND here... */ *************** *** 293,297 **** puts ("builtin"); else if (dflags & CDESC_SHORTDESC) ! printf ("%s is a shell builtin\n", command); else if (dflags & CDESC_REUSABLE) printf ("%s\n", command); --- 295,299 ---- puts ("builtin"); else if (dflags & CDESC_SHORTDESC) ! printf (_("%s is a shell builtin\n"), command); else if (dflags & CDESC_REUSABLE) printf ("%s\n", command); *************** *** 314,318 **** puts ("file"); else if (dflags & CDESC_SHORTDESC) ! printf ("%s is %s\n", command, command); else if (dflags & (CDESC_REUSABLE|CDESC_PATH_ONLY)) printf ("%s\n", command); --- 316,320 ---- puts ("file"); else if (dflags & CDESC_SHORTDESC) ! printf (_("%s is %s\n"), command, command); else if (dflags & (CDESC_REUSABLE|CDESC_PATH_ONLY)) printf ("%s\n", command); *************** *** 334,338 **** puts ("file"); else if (dflags & CDESC_SHORTDESC) ! printf ("%s is hashed (%s)\n", command, full_path); else if (dflags & (CDESC_REUSABLE|CDESC_PATH_ONLY)) printf ("%s\n", full_path); --- 336,340 ---- puts ("file"); else if (dflags & CDESC_SHORTDESC) ! printf (_("%s is hashed (%s)\n"), command, full_path); else if (dflags & (CDESC_REUSABLE|CDESC_PATH_ONLY)) printf ("%s\n", full_path); diff -aNrc2 bash-2.05b-patched/builtins/ulimit.def bash-3.0/builtins/ulimit.def *** bash-2.05b-patched/builtins/ulimit.def Tue Mar 19 14:39:14 2002 --- bash-3.0/builtins/ulimit.def Fri Dec 19 19:07:27 2003 *************** *** 2,6 **** It implements the builtin "ulimit" in Bash. ! Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the builtin "ulimit" in Bash. ! Copyright (C) 1987-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 71,74 **** --- 71,76 ---- #include + #include "../bashintl.h" + #include "../shell.h" #include "common.h" *************** *** 328,332 **** if (STREQ (list->word->word, "unlimited") == 0) { ! builtin_error ("%s: invalid limit argument", list->word->word); return (EXECUTION_FAILURE); } --- 330,334 ---- if (STREQ (list->word->word, "unlimited") == 0) { ! builtin_error (_("%s: invalid limit argument"), list->word->word); return (EXECUTION_FAILURE); } *************** *** 354,358 **** if (limind == -1) { ! builtin_error ("`%c': bad command", cmdlist[c].cmd); return (EX_USAGE); } --- 356,360 ---- if (limind == -1) { ! builtin_error (_("`%c': bad command"), cmdlist[c].cmd); return (EX_USAGE); } *************** *** 383,387 **** if (opt < 0) { ! builtin_error ("%s: cannot get limit: %s", limits[limind].description, strerror (errno)); return (EXECUTION_FAILURE); --- 385,389 ---- if (opt < 0) { ! builtin_error (_("%s: cannot get limit: %s"), limits[limind].description, strerror (errno)); return (EXECUTION_FAILURE); *************** *** 421,425 **** if (set_limit (limind, real_limit, mode) < 0) { ! builtin_error ("%s: cannot modify limit: %s", limits[limind].description, strerror (errno)); return (EXECUTION_FAILURE); --- 423,427 ---- if (set_limit (limind, real_limit, mode) < 0) { ! builtin_error (_("%s: cannot modify limit: %s"), limits[limind].description, strerror (errno)); return (EXECUTION_FAILURE); diff -aNrc2 bash-2.05b-patched/builtins/umask.def bash-3.0/builtins/umask.def *** bash-2.05b-patched/builtins/umask.def Tue Mar 19 14:29:37 2002 --- bash-3.0/builtins/umask.def Fri Jul 16 21:02:58 2004 *************** *** 2,6 **** It implements the builtin "umask" in Bash. ! Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the builtin "umask" in Bash. ! Copyright (C) 1987-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 38,42 **** #include "../bashtypes.h" #include "filecntl.h" ! #ifndef _MINIX # include #endif --- 38,42 ---- #include "../bashtypes.h" #include "filecntl.h" ! #if ! defined(_MINIX) && defined (HAVE_SYS_FILE_H) # include #endif *************** *** 49,52 **** --- 49,54 ---- #include + #include "../bashintl.h" + #include "../shell.h" #include "posixstat.h" *************** *** 108,112 **** if (umask_value == -1) { ! sh_erange (list->word->word, "octal number"); return (EXECUTION_FAILURE); } --- 110,114 ---- if (umask_value == -1) { ! sh_erange (list->word->word, _("octal number")); return (EXECUTION_FAILURE); } *************** *** 222,226 **** break; default: ! builtin_error ("`%c': invalid symbolic mode operator", op); return (-1); } --- 224,228 ---- break; default: ! builtin_error (_("`%c': invalid symbolic mode operator"), op); return (-1); } *************** *** 261,264 **** --- 263,268 ---- break; case '=': + if (who == 0) + who = S_IRWXU | S_IRWXG | S_IRWXO; bits &= ~who; bits |= perm; *************** *** 275,279 **** else { ! builtin_error ("`%c': invalid symbolic mode character", *s); return (-1); } --- 279,283 ---- else { ! builtin_error (_("`%c': invalid symbolic mode character"), *s); return (-1); } *************** *** 299,303 **** more intuitive and easier to deal with. It is complemented again before being returned. */ ! bits = parse_symbolic_mode (list->word->word, ~um); if (bits == -1) return (-1); --- 303,307 ---- more intuitive and easier to deal with. It is complemented again before being returned. */ ! bits = parse_symbolic_mode (list->word->word, ~um & 0777); if (bits == -1) return (-1); diff -aNrc2 bash-2.05b-patched/builtins/wait.def bash-3.0/builtins/wait.def *** bash-2.05b-patched/builtins/wait.def Mon Apr 8 13:25:00 2002 --- bash-3.0/builtins/wait.def Fri Apr 23 17:39:07 2004 *************** *** 2,6 **** It implements the builtin "wait" in Bash. ! Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- It implements the builtin "wait" in Bash. ! Copyright (C) 1987-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 142,146 **** } #if defined (JOB_CONTROL) ! else if (job_control && *w) /* Must be a job spec. Check it out. */ { --- 142,146 ---- } #if defined (JOB_CONTROL) ! else if (*w && *w == '%') /* Must be a job spec. Check it out. */ { *************** *** 164,173 **** UNBLOCK_CHILD (oset); status = wait_for_job (job); - } - else if (job_control == 0 && *w == '%') - { - /* can't use jobspecs as arguments if job control is not active. */ - sh_nojobs ((char *)NULL); - status = EXECUTION_FAILURE; } #endif /* JOB_CONTROL */ --- 164,167 ---- diff -aNrc2 bash-2.05b-patched/command.h bash-3.0/command.h *** bash-2.05b-patched/command.h Tue Mar 12 15:28:36 2002 --- bash-3.0/command.h Fri Sep 12 15:13:04 2003 *************** *** 68,79 **** /* Possible values for the `flags' field of a WORD_DESC. */ ! #define W_HASDOLLAR 0x01 /* Dollar sign present. */ ! #define W_QUOTED 0x02 /* Some form of quote character is present. */ ! #define W_ASSIGNMENT 0x04 /* This word is a variable assignment. */ ! #define W_GLOBEXP 0x08 /* This word is the result of a glob expansion. */ ! #define W_NOSPLIT 0x10 /* Do not perform word splitting on this word. */ ! #define W_NOGLOB 0x20 /* Do not perform globbing on this word. */ ! #define W_NOSPLIT2 0x40 /* Don't split word except for $@ expansion. */ ! #define W_TILDEEXP 0x80 /* Tilde expand this assignment word */ /* Possible values for subshell_environment */ --- 68,82 ---- /* Possible values for the `flags' field of a WORD_DESC. */ ! #define W_HASDOLLAR 0x0001 /* Dollar sign present. */ ! #define W_QUOTED 0x0002 /* Some form of quote character is present. */ ! #define W_ASSIGNMENT 0x0004 /* This word is a variable assignment. */ ! #define W_GLOBEXP 0x0008 /* This word is the result of a glob expansion. */ ! #define W_NOSPLIT 0x0010 /* Do not perform word splitting on this word. */ ! #define W_NOGLOB 0x0020 /* Do not perform globbing on this word. */ ! #define W_NOSPLIT2 0x0040 /* Don't split word except for $@ expansion. */ ! #define W_TILDEEXP 0x0080 /* Tilde expand this assignment word */ ! #define W_DOLLARAT 0x0100 /* $@ and its special handling */ ! #define W_DOLLARSTAR 0x0200 /* $* and its special handling */ ! #define W_NOCOMSUB 0x0400 /* Don't perform command substitution on this word */ /* Possible values for subshell_environment */ *************** *** 196,199 **** --- 199,203 ---- typedef struct case_com { int flags; /* See description of CMD flags. */ + int line; /* line number the `case' keyword appears on */ WORD_DESC *word; /* The thing to test. */ PATTERN_LIST *clauses; /* The clauses to test against, or NULL. */ *************** *** 203,206 **** --- 207,211 ---- typedef struct for_com { int flags; /* See description of CMD flags. */ + int line; /* line number the `for' keyword appears on */ WORD_DESC *name; /* The variable name to get mapped over. */ WORD_LIST *map_list; /* The things to map over. This is never NULL. */ *************** *** 225,228 **** --- 230,234 ---- typedef struct select_com { int flags; /* See description of CMD flags. */ + int line; /* line number the `select' keyword appears on */ WORD_DESC *name; /* The variable name to get mapped over. */ WORD_LIST *map_list; /* The things to map over. This is never NULL. */ *************** *** 254,259 **** typedef struct arith_com { int flags; - WORD_LIST *exp; int line; } ARITH_COM; #endif /* DPAREN_ARITHMETIC */ --- 260,265 ---- typedef struct arith_com { int flags; int line; + WORD_LIST *exp; } ARITH_COM; #endif /* DPAREN_ARITHMETIC */ *************** *** 279,286 **** typedef struct simple_com { int flags; /* See description of CMD flags. */ WORD_LIST *words; /* The program name, the arguments, variable assignments, etc. */ REDIRECT *redirects; /* Redirections to perform. */ - int line; /* line number the command starts on */ } SIMPLE_COM; --- 285,292 ---- typedef struct simple_com { int flags; /* See description of CMD flags. */ + int line; /* line number the command starts on */ WORD_LIST *words; /* The program name, the arguments, variable assignments, etc. */ REDIRECT *redirects; /* Redirections to perform. */ } SIMPLE_COM; *************** *** 288,294 **** typedef struct function_def { int flags; /* See description of CMD flags. */ WORD_DESC *name; /* The name of the function. */ COMMAND *command; /* The parsed execution tree. */ ! int line; /* Line number the function def starts on. */ } FUNCTION_DEF; --- 294,301 ---- typedef struct function_def { int flags; /* See description of CMD flags. */ + int line; /* Line number the function def starts on. */ WORD_DESC *name; /* The name of the function. */ COMMAND *command; /* The parsed execution tree. */ ! char *source_file; /* file in which function was defined, if any */ } FUNCTION_DEF; *************** *** 316,319 **** --- 323,329 ---- /* Forward declarations of functions declared in copy_cmd.c. */ + + extern FUNCTION_DEF *copy_function_def_contents __P((FUNCTION_DEF *, FUNCTION_DEF *)); + extern FUNCTION_DEF *copy_function_def __P((FUNCTION_DEF *)); extern WORD_DESC *copy_word __P((WORD_DESC *)); diff -aNrc2 bash-2.05b-patched/config-bot.h bash-3.0/config-bot.h *** bash-2.05b-patched/config-bot.h Tue Apr 16 17:01:03 2002 --- bash-3.0/config-bot.h Fri Mar 19 17:56:23 2004 *************** *** 20,23 **** --- 20,27 ---- Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + /*********************************************************/ + /* Modify or set defines based on the configure results. */ + /*********************************************************/ + #if !defined (HAVE_VPRINTF) && defined (HAVE_DOPRNT) # define USE_VFPRINTF_EMULATION *************** *** 25,28 **** --- 29,68 ---- #endif + #if defined (HAVE_SYS_RESOURCE_H) && defined (HAVE_GETRLIMIT) + # define HAVE_RESOURCE + #endif + + #if !defined (GETPGRP_VOID) + # define HAVE_BSD_PGRP + #endif + + /* Try this without testing __STDC__ for the time being. */ + #if defined (HAVE_STDARG_H) + # define PREFER_STDARG + # define USE_VARARGS + #else + # if defined (HAVE_VARARGS_H) + # define PREFER_VARARGS + # define USE_VARARGS + # endif + #endif + + #if defined (HAVE_SYS_SOCKET_H) && defined (HAVE_GETPEERNAME) && defined (HAVE_NETINET_IN_H) + # define HAVE_NETWORK + #endif + + #if defined (HAVE_REGEX_H) && defined (HAVE_REGCOMP) && defined (HAVE_REGEXEC) + # define HAVE_POSIX_REGEXP + #endif + + /* backwards compatibility between different autoconf versions */ + #if HAVE_DECL_SYS_SIGLIST && !defined (SYS_SIGLIST_DECLARED) + # define SYS_SIGLIST_DECLARED + #endif + + /***********************************************************************/ + /* Unset defines based on what configure reports as missing or broken. */ + /***********************************************************************/ + /* Ultrix botches type-ahead when switching from canonical to non-canonical mode, at least through version 4.3 */ *************** *** 37,50 **** #endif ! #if defined (HAVE_SYS_RESOURCE_H) && defined (HAVE_GETRLIMIT) ! # define HAVE_RESOURCE #endif ! #if !defined (GETPGRP_VOID) ! # define HAVE_BSD_PGRP #endif ! #if !defined (HAVE_DEV_FD) && defined (NAMED_PIPES_MISSING) ! # undef PROCESS_SUBSTITUTION #endif --- 77,94 ---- #endif ! #if !defined (HAVE_DEV_FD) && defined (NAMED_PIPES_MISSING) ! # undef PROCESS_SUBSTITUTION #endif ! #if defined (JOB_CONTROL_MISSING) ! # undef JOB_CONTROL #endif ! #if defined (STRCOLL_BROKEN) ! # undef HAVE_STRCOLL ! #endif ! ! #if !defined (HAVE_POSIX_REGEXP) ! # undef COND_REGEXP #endif *************** *** 54,57 **** --- 98,105 ---- #endif + /***********************************************************/ + /* Make sure feature defines have necessary prerequisites. */ + /***********************************************************/ + /* BANG_HISTORY requires HISTORY. */ #if defined (BANG_HISTORY) && !defined (HISTORY) *************** *** 71,96 **** #endif - #if defined (JOB_CONTROL_MISSING) - # undef JOB_CONTROL - #endif - - #if defined (__STDC__) && defined (HAVE_STDARG_H) - # define PREFER_STDARG - # define USE_VARARGS - #else - # if defined (HAVE_VARARGS_H) - # define PREFER_VARARGS - # define USE_VARARGS - # endif - #endif - - #if defined (STRCOLL_BROKEN) - # undef HAVE_STRCOLL - #endif - - #if defined (HAVE_SYS_SOCKET_H) && defined (HAVE_GETPEERNAME) && defined (HAVE_NETINET_IN_H) - # define HAVE_NETWORK - #endif - #if !defined (PROMPT_STRING_DECODE) # undef PPROMPT --- 119,122 ---- *************** *** 108,116 **** # include # include ! # if defined (HAVE_MBSRTOWCS) /* system is supposed to support XPG5 */ # define HANDLE_MULTIBYTE 1 # endif #endif /* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ #if HANDLE_MULTIBYTE && !defined (HAVE_MBSTATE_T) --- 134,149 ---- # include # include ! # if defined (HAVE_MBSRTOWCS) && defined (HAVE_MBRTOWC) && defined (HAVE_MBRLEN) && defined (HAVE_WCWIDTH) ! /* system is supposed to support XPG5 */ # define HANDLE_MULTIBYTE 1 # endif #endif + /* If we don't want multibyte chars even on a system that supports them, let + the configuring user turn multibyte support off. */ + #if defined (NO_MULTIBYTE_SUPPORT) + # undef HANDLE_MULTIBYTE + #endif + /* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ #if HANDLE_MULTIBYTE && !defined (HAVE_MBSTATE_T) *************** *** 138,139 **** --- 171,181 ---- /* end of multibyte capability checks for I18N */ /************************************************/ + + /******************************************************************/ + /* Placeholder for builders to #undef any unwanted features from */ + /* config-top.h or created by configure (such as the default mail */ + /* file for mail checking). */ + /******************************************************************/ + + /* If you don't want bash to provide a default mail file to check. */ + /* #undef DEFAULT_MAIL_DIRECTORY */ diff -aNrc2 bash-2.05b-patched/config-top.h bash-3.0/config-top.h *** bash-2.05b-patched/config-top.h Tue Apr 16 17:01:17 2002 --- bash-3.0/config-top.h Tue Aug 5 10:36:12 2003 *************** *** 53,57 **** #ifndef DEFAULT_PATH_VALUE #define DEFAULT_PATH_VALUE \ ! "/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin:." #endif --- 53,57 ---- #ifndef DEFAULT_PATH_VALUE #define DEFAULT_PATH_VALUE \ ! "/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:." #endif *************** *** 60,64 **** #ifndef STANDARD_UTILS_PATH #define STANDARD_UTILS_PATH \ ! "/bin:/usr/bin:/usr/ucb:/sbin:/usr/sbin:/etc:/usr/etc" #endif --- 60,64 ---- #ifndef STANDARD_UTILS_PATH #define STANDARD_UTILS_PATH \ ! "/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc" #endif diff -aNrc2 bash-2.05b-patched/config.h.in bash-3.0/config.h.in *** bash-2.05b-patched/config.h.in Tue Jun 25 09:48:52 2002 --- bash-3.0/config.h.in Wed Jul 21 16:08:31 2004 *************** *** 1,5 **** /* config.h -- Configuration file for bash. */ ! /* Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,5 ---- /* config.h -- Configuration file for bash. */ ! /* Copyright (C) 1987-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 120,123 **** --- 120,127 ---- #undef COND_COMMAND + /* Define COND_REGEXP if you want extended regular expression matching and the + =~ binary operator in the [[...]] conditional command. */ + #define COND_REGEXP + /* Define ARITH_FOR_COMMAND if you want the ksh93-style for (( init; test; step )) do list; done *************** *** 133,136 **** --- 137,148 ---- #undef PROGRAMMABLE_COMPLETION + /* Define NO_MULTIBYTE_SUPPORT to not compile in support for multibyte + characters, even if the OS supports them. */ + #undef NO_MULTIBYTE_SUPPORT + + /* Define DEBUGGER if you want to compile in some features used only by the + bash debugger. */ + #undef DEBUGGER + /* Define MEMSCRAMBLE if you want the bash malloc and free to scramble memory contents on malloc() and free(). */ *************** *** 140,143 **** --- 152,157 ---- #undef AFS + #undef ENABLE_NLS + /* End of configuration settings controllable by autoconf. */ /* Other settable options appear in config-top.h. */ *************** *** 315,318 **** --- 329,333 ---- /* Define if `sys_siglist' is declared by or . */ + #undef HAVE_DECL_SYS_SIGLIST #undef SYS_SIGLIST_DECLARED *************** *** 326,331 **** #undef HAVE_SYS_ERRLIST - #undef HAVE_TIMEVAL - #undef HAVE_TZNAME --- 341,344 ---- *************** *** 333,339 **** /* Characteristics of some of the system structures. */ ! #undef STRUCT_DIRENT_HAS_D_INO ! #undef STRUCT_DIRENT_HAS_D_FILENO #undef TIOCSTAT_IN_SYS_IOCTL --- 346,354 ---- /* Characteristics of some of the system structures. */ ! #undef HAVE_STRUCT_DIRENT_D_INO ! ! #undef HAVE_STRUCT_DIRENT_D_FILENO ! #undef HAVE_STRUCT_DIRENT_D_NAMLEN #undef TIOCSTAT_IN_SYS_IOCTL *************** *** 360,363 **** --- 375,382 ---- #undef HAVE_TM_ZONE + #undef HAVE_TIMEVAL + + #undef HAVE_STRUCT_TIMEZONE + /* Characteristics of definitions in the system header files. */ *************** *** 381,384 **** --- 400,404 ---- #undef HAVE_DECL_STRTOLD + #undef STRTOLD_BROKEN #undef HAVE_MBSTATE_T *************** *** 421,424 **** --- 441,446 ---- #undef HAVE_PRINTF_A_FORMAT + #undef CTYPE_NON_ASCII + /* Define if you have and nl_langinfo(CODESET). */ #undef HAVE_LANGINFO_CODESET *************** *** 466,472 **** #undef HAVE_BCOPY - /* Define if you have the bindtextdomain function. */ - #undef HAVE_BINDTEXTDOMAIN - /* Define if you have the bzero function. */ #undef HAVE_BZERO --- 488,491 ---- *************** *** 526,532 **** #undef HAVE_GETSERVENT - /* Define if you have the gettext function. */ - #undef HAVE_GETTEXT - /* Define if you have the gettimeofday function. */ #undef HAVE_GETTIMEOFDAY --- 545,548 ---- *************** *** 565,568 **** --- 581,590 ---- #undef HAVE_LSTAT + /* Define if you have the mbrlen function. */ + #undef HAVE_MBRLEN + + /* Define if you have the mbrtowc function. */ + #undef HAVE_MBRTOWC + /* Define if you have the mbsrtowcs function. */ #undef HAVE_MBSRTOWCS *************** *** 586,589 **** --- 608,617 ---- #undef HAVE_READLINK + /* Define if you have the regcomp function. */ + #undef HAVE_REGCOMP + + /* Define if you have the regexec function. */ + #undef HAVE_REGEXEC + /* Define if you have the rename function. */ #undef HAVE_RENAME *************** *** 640,643 **** --- 668,674 ---- #undef HAVE_STRPBRK + /* Define if you have the strstr function. */ + #undef HAVE_STRSTR + /* Define if you have the strtod function. */ #undef HAVE_STRTOD *************** *** 673,679 **** #undef HAVE_TCGETPGRP - /* Define if you have the textdomain function. */ - #undef HAVE_TEXTDOMAIN - /* Define if you have the times function. */ #undef HAVE_TIMES --- 704,707 ---- *************** *** 709,712 **** --- 737,746 ---- #undef HAVE_WAIT3 + /* Define if you have the wcsdup function. */ + #undef HAVE_WCSDUP + + /* Define if you have the wctomb function. */ + #undef HAVE_WCTOMB + /* Define if you have the wcwidth function. */ #undef HAVE_WCWIDTH *************** *** 750,753 **** --- 784,790 ---- #undef HAVE_NETINET_IN_H + /* Define if you have the header file. */ + #undef HAVE_REGEX_H + /* Define if you have the header file. */ #undef HAVE_STDLIB_H *************** *** 798,801 **** --- 835,841 ---- #undef HAVE_SYS_SOCKET_H + /* Define if you have the header file. */ + #undef HAVE_SYS_STAT_H + /* Define if you have the header file. */ #undef HAVE_SYS_STREAM_H *************** *** 809,812 **** --- 849,855 ---- #undef HAVE_SYS_TIMES_H + /* Define if you have the header file. */ + #undef HAVE_SYS_TYPES_H + /* Define if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H *************** *** 873,876 **** --- 916,974 ---- #undef GETCWD_BROKEN + + /* Additional defines for configuring lib/intl, maintained by autoscan/autoheader */ + + /* Define if you have the header file. */ + #undef HAVE_ARGZ_H + + /* Define if you have the header file. */ + #undef HAVE_ERRNO_H + + /* Define if you have the header file. */ + #undef HAVE_FCNTL_H + + /* Define if you have the header file. */ + #undef HAVE_MALLOC_H + + /* Define if you have the header file. */ + #undef HAVE_STDIO_EXT_H + + /* Define if you have the `dcgettext' function. */ + #undef HAVE_DCGETTEXT + + /* Define if your system has a working `malloc' function. */ + /* #undef HAVE_MALLOC */ + + /* Define if you have the `mempcpy' function. */ + #undef HAVE_MEMPCPY + + /* Define if you have a working `mmap' system call. */ + #undef HAVE_MMAP + + /* Define if you have the `munmap' function. */ + #undef HAVE_MUNMAP + + /* Define if you have the `nl_langinfo' function. */ + #undef HAVE_NL_LANGINFO + + /* Define if you have the `stpcpy' function. */ + #undef HAVE_STPCPY + + /* Define if you have the `strcspn' function. */ + #undef HAVE_STRCSPN + + /* Define if you have the `strdup' function. */ + #undef HAVE_STRDUP + + /* Define if you have the `__argz_count' function. */ + #undef HAVE___ARGZ_COUNT + + /* Define if you have the `__argz_next' function. */ + #undef HAVE___ARGZ_NEXT + + /* Define if you have the `__argz_stringify' function. */ + #undef HAVE___ARGZ_STRINGIFY + + /* End additions for lib/intl */ #include "config-bot.h" diff -aNrc2 bash-2.05b-patched/configure bash-3.0/configure *** bash-2.05b-patched/configure Tue Jul 16 09:31:47 2002 --- bash-3.0/configure Wed Jul 21 16:18:56 2004 *************** *** 1,14 **** #! /bin/sh ! # From configure.in for Bash 2.05b, version 2.144, from autoconf version 2.52. # Guess values for system-dependent variables and create Makefiles. ! # Generated by Autoconf 2.52 for bash 2.05b. # # Report bugs to . # ! # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' --- 1,83 ---- #! /bin/sh ! # From configure.in for Bash 3.0, version 3.166, from autoconf version AC_ACVERSION. # Guess values for system-dependent variables and create Makefiles. ! # Generated by GNU Autoconf 2.57 for bash 3.0-release. # # Report bugs to . # ! # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. + ## --------------------- ## + ## M4sh Initialization. ## + ## --------------------- ## + # Be Bourne compatible + if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix + fi + + # Support unset when possible. + if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset + else + as_unset=false + fi + + + # Work around bugs in pre-3.0 UWIN ksh. + $as_unset ENV MAIL MAILPATH + PS1='$ ' + PS2='> ' + PS4='+ ' + + # NLS nuisances. + for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + 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 + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi + done + + # Required to use basename. + if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr + else + as_expr=false + fi + + if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename + else + as_basename=false + fi + + + # Name of the executable. + as_me=`$as_basename "$0" || + $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || + echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + + # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' *************** *** 18,37 **** as_cr_alnum=$as_cr_Letters$as_cr_digits ! # Sed expression to map a string onto a valid variable name. ! as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" - # 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" ! # Be Bourne compatible ! if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then ! emulate sh ! NULLCMD=: ! elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then ! set -o posix ! fi ! # Name of the executable. ! as_me=`echo "$0" |sed 's,.*[\\/],,'` if expr a : '\(a\)' >/dev/null 2>&1; then --- 87,197 ---- as_cr_alnum=$as_cr_Letters$as_cr_digits ! # 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 ! as_lineno_1=$LINENO ! as_lineno_2=$LINENO ! as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` ! test "x$as_lineno_1" != "x$as_lineno_2" && ! test "x$as_lineno_3" = "x$as_lineno_2" || { ! # Find who we are. Look in the path if we contain no path at all ! # relative or not. ! case $0 in ! *[\\/]* ) as_myself=$0 ;; ! *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break ! done ! ;; ! esac ! # We did not find ourselves, most probably we were run as `sh COMMAND' ! # in which case we are not to be found in the path. ! if test "x$as_myself" = x; then ! as_myself=$0 ! fi ! if test ! -f "$as_myself"; then ! { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 ! { (exit 1); exit 1; }; } ! fi ! case $CONFIG_SHELL in ! '') ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for as_base in sh bash ksh sh5; do ! case $as_dir in ! /*) ! if ("$as_dir/$as_base" -c ' ! as_lineno_1=$LINENO ! as_lineno_2=$LINENO ! as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` ! test "x$as_lineno_1" != "x$as_lineno_2" && ! test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then ! $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } ! $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } ! CONFIG_SHELL=$as_dir/$as_base ! export CONFIG_SHELL ! exec "$CONFIG_SHELL" "$0" ${1+"$@"} ! fi;; ! esac ! done ! done ! ;; ! esac ! ! # Create $as_me.lineno as a copy of $as_myself, but with $LINENO ! # uniformly replaced by the line number. The first 'sed' inserts a ! # line-number line before each line; the second 'sed' does the real ! # work. The second script uses 'N' to pair each line-number line ! # with the numbered line, and appends trailing '-' during ! # substitution so that $LINENO is not a special case at line end. ! # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the ! # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) ! sed '=' <$as_myself | ! sed ' ! N ! s,$,-, ! : loop ! s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, ! t loop ! s,-$,, ! s,^['$as_cr_digits']*\n,, ! ' >$as_me.lineno && ! chmod +x $as_me.lineno || ! { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 ! { (exit 1); exit 1; }; } ! ! # Don't try to exec as it changes $[0], causing all sort of problems ! # (the dirname of $[0] is not the place where we might find the ! # original and so on. Autoconf is especially sensible to this). ! . ./$as_me.lineno ! # Exit status is that of the last command. ! exit ! } ! ! ! case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in ! *c*,-n*) ECHO_N= ECHO_C=' ! ' ECHO_T=' ' ;; ! *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; ! *) ECHO_N= ECHO_C='\c' ECHO_T= ;; ! esac if expr a : '\(a\)' >/dev/null 2>&1; then *************** *** 59,80 **** rm -f conf$$ conf$$.exe conf$$.file ! as_executable_p="test -f" ! ! # Support unset when possible. ! if (FOO=FOO; unset FOO) >/dev/null 2>&1; then ! as_unset=unset else ! as_unset=false fi ! # NLS nuisances. ! $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } ! $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } ! $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } ! $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } ! $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } ! $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } ! $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } ! $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } # IFS --- 219,236 ---- rm -f conf$$ conf$$.exe conf$$.file ! if mkdir -p . 2>/dev/null; then ! as_mkdir_p=: else ! 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" ! ! # Sed expression to map a string onto a valid variable name. ! as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" ! # IFS *************** *** 85,89 **** # CDPATH. ! $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } # Name of the host. --- 241,246 ---- # CDPATH. ! $as_unset CDPATH ! # Name of the host. *************** *** 98,104 **** # ac_default_prefix=/usr/local cross_compiling=no subdirs= ! MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} --- 255,263 ---- # ac_default_prefix=/usr/local + ac_config_libobj_dir=. cross_compiling=no subdirs= ! MFLAGS= ! MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} *************** *** 108,111 **** --- 267,277 ---- : ${ac_max_here_lines=38} + # Identity of this package. + PACKAGE_NAME='bash' + PACKAGE_TARNAME='bash' + PACKAGE_VERSION='3.0-release' + PACKAGE_STRING='bash 3.0-release' + PACKAGE_BUGREPORT='bug-bash@gnu.org' + ac_unique_file="shell.h" # Factoring default headers for most tests. *************** *** 146,149 **** --- 312,318 ---- #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 build build_cpu build_vendor build_os host host_cpu host_vendor host_os EMACS lispdir DEBUGGER_START_FILE TESTSCRIPT PURIFY MALLOC_TARGET MALLOC_SRC MALLOC_LIB MALLOC_LIBRARY MALLOC_LDFLAGS MALLOC_DEP htmldir HELPDIR HELPDIRDEFINE HELPINSTALL CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP SIGNAMES_H CC_FOR_BUILD STATIC_LD CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD LDFLAGS_FOR_BUILD RL_VERSION RL_MAJOR RL_MINOR READLINE_LIB READLINE_DEP RL_LIBDIR RL_INCLUDEDIR RL_INCLUDE HISTORY_LIB HISTORY_DEP HIST_LIBDIR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AR RANLIB ac_ct_RANLIB YACC SET_MAKE MAKE_SHELL MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE 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 INTL_DEP INTL_INC LIBINTL_H SIGLIST_O TERMCAP_LIB TERMCAP_DEP JOBS_O SHOBJ_CC SHOBJ_CFLAGS SHOBJ_LD SHOBJ_LDFLAGS SHOBJ_XLDFLAGS SHOBJ_LIBS SHOBJ_STATUS PROFILE_FLAGS incdir BUILD_DIR ARFLAGS BASHVERS RELSTATUS DEBUG MALLOC_DEBUG LOCAL_LIBS LOCAL_CFLAGS LOCAL_LDFLAGS LOCAL_DEFS LTLIBOBJS' + ac_subst_files='' + # Initialize some variables set by options. ac_init_help= *************** *** 184,194 **** mandir='${prefix}/man' - # Identity of this package. - PACKAGE_NAME='bash' - PACKAGE_TARNAME='bash' - PACKAGE_VERSION='2.05b' - PACKAGE_STRING='bash 2.05b' - PACKAGE_BUGREPORT='bug-bash@gnu.org' - ac_prev= for ac_option --- 353,356 ---- *************** *** 323,327 **** -no-create | --no-create | --no-creat | --no-crea | --no-cre \ ! | --no-cr | --no-c) no_create=yes ;; --- 485,489 ---- -no-create | --no-create | --no-creat | --no-crea | --no-cre \ ! | --no-cr | --no-c | -n) no_create=yes ;; *************** *** 502,506 **** case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; ! *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac --- 664,668 ---- case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; ! *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac *************** *** 514,518 **** case $ac_val in [\\/$]* | ?:[\\/]* ) ;; ! *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac --- 676,680 ---- case $ac_val in [\\/$]* | ?:[\\/]* ) ;; ! *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac *************** *** 521,529 **** # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. build=$build_alias host=$host_alias target=$target_alias ! # FIXME: should be removed in autoconf 3.0. if test "x$host_alias" != x; then if test "x$build_alias" = x; then --- 683,692 ---- # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. + # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias ! # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then *************** *** 541,551 **** test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ! ac_prog=$0 ! ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'` ! test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then --- 704,724 ---- test "$silent" = yes && exec 6>/dev/null + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ! ac_confdir=`(dirname "$0") 2>/dev/null || ! $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$0" : 'X\(//\)[^/]' \| \ ! X"$0" : 'X\(//\)$' \| \ ! X"$0" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$0" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then *************** *** 557,567 **** if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then ! { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else ! { echo "$as_me: error: cannot find sources in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} --- 730,743 ---- if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then ! { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else ! { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi + (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} *************** *** 577,580 **** --- 753,760 ---- ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias + ac_env_DEBUGGER_START_FILE_set=${DEBUGGER_START_FILE+set} + ac_env_DEBUGGER_START_FILE_value=$DEBUGGER_START_FILE + ac_cv_env_DEBUGGER_START_FILE_set=${DEBUGGER_START_FILE+set} + ac_cv_env_DEBUGGER_START_FILE_value=$DEBUGGER_START_FILE ac_env_CC_set=${CC+set} ac_env_CC_value=$CC *************** *** 604,609 **** # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. ! cat <. ! EOF fi --- 939,943 ---- Report bugs to . ! _ACEOF fi *************** *** 750,781 **** # If there are subdirs, report their specific --help. ac_popdir=`pwd` ! for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue ! cd $ac_subdir ! # A "../" for each directory in /$ac_subdir. ! ac_dots=`echo $ac_subdir | ! sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'` ! ! case $srcdir in ! .) # No --srcdir option. We are building in place. ! ac_sub_srcdir=$srcdir ;; ! [\\/]* | ?:[\\/]* ) # Absolute path. ! ac_sub_srcdir=$srcdir/$ac_subdir ;; ! *) # Relative path. ! ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;; ! esac # Check for guested configure; otherwise get Cygnus style configure. ! if test -f $ac_sub_srcdir/configure.gnu; then echo ! $SHELL $ac_sub_srcdir/configure.gnu --help=recursive ! elif test -f $ac_sub_srcdir/configure; then echo ! $SHELL $ac_sub_srcdir/configure --help=recursive ! elif test -f $ac_sub_srcdir/configure.ac || ! test -f $ac_sub_srcdir/configure.in; then echo $ac_configure --help else ! echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2 fi cd $ac_popdir --- 945,996 ---- # If there are subdirs, report their specific --help. ac_popdir=`pwd` ! for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue ! test -d $ac_dir || continue ! ac_builddir=. ! ! if test "$ac_dir" != .; then ! ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` ! # A "../" for each directory in $ac_dir_suffix. ! ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` ! else ! ac_dir_suffix= ac_top_builddir= ! fi ! ! case $srcdir in ! .) # No --srcdir option. We are building in place. ! ac_srcdir=. ! if test -z "$ac_top_builddir"; then ! ac_top_srcdir=. ! else ! ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` ! fi ;; ! [\\/]* | ?:[\\/]* ) # Absolute path. ! ac_srcdir=$srcdir$ac_dir_suffix; ! ac_top_srcdir=$srcdir ;; ! *) # Relative path. ! 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` + cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. ! if test -f $ac_srcdir/configure.gnu; then echo ! $SHELL $ac_srcdir/configure.gnu --help=recursive ! elif test -f $ac_srcdir/configure; then echo ! $SHELL $ac_srcdir/configure --help=recursive ! elif test -f $ac_srcdir/configure.ac || ! test -f $ac_srcdir/configure.in; then echo $ac_configure --help else ! echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir *************** *** 785,815 **** test -n "$ac_init_help" && exit 0 if $ac_init_version; then ! cat <<\EOF ! bash configure 2.05b ! generated by GNU Autoconf 2.52 ! Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. ! EOF exit 0 fi exec 5>config.log ! cat >&5 </dev/null | sed 1q` --- 1000,1030 ---- test -n "$ac_init_help" && exit 0 if $ac_init_version; then ! cat <<\_ACEOF ! bash configure 3.0-release ! generated by GNU Autoconf 2.57 ! Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. ! _ACEOF exit 0 fi exec 5>config.log ! cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. ! It was created by bash $as_me 3.0-release, which was ! generated by GNU Autoconf 2.57. Invocation command line was $ $0 $@ ! _ACEOF { cat <<_ASUNAME ! ## --------- ## ! ## Platform. ## ! ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` *************** *** 830,878 **** /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - PATH = $PATH - _ASUNAME } >&5 ! cat >&5 <\?\"\']*) ! ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ! ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" ! ac_sep=" " ;; ! *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg" ! ac_sep=" " ;; ! esac ! # Get rid of the leading space. done # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. trap 'exit_status=$? # Save into config.log some information that might help in debugging. ! echo >&5 ! echo "## ----------------- ##" >&5 ! echo "## Cache variables. ##" >&5 ! echo "## ----------------- ##" >&5 ! echo >&5 ! # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | --- 1045,1138 ---- /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME + + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" + done + } >&5 ! cat >&5 <<_ACEOF ! ! ! ## ----------- ## ! ## Core tests. ## ! ## ----------- ## ! ! _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. + # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. + # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= + ac_configure_args0= + ac_configure_args1= ac_sep= ! ac_must_keep_next=false ! for ac_pass in 1 2 do ! for ac_arg ! do ! case $ac_arg in ! -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; ! -q | -quiet | --quiet | --quie | --qui | --qu | --q \ ! | -silent | --silent | --silen | --sile | --sil) ! continue ;; ! *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ! ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; ! esac ! case $ac_pass in ! 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; ! 2) ! ac_configure_args1="$ac_configure_args1 '$ac_arg'" ! if test $ac_must_keep_next = true; then ! ac_must_keep_next=false # Got value, back to normal. ! else ! case $ac_arg in ! *=* | --config-cache | -C | -disable-* | --disable-* \ ! | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ ! | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ ! | -with-* | --with-* | -without-* | --without-* | --x) ! case "$ac_configure_args0 " in ! "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; ! esac ! ;; ! -* ) ac_must_keep_next=true ;; ! esac ! fi ! ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" ! # Get rid of the leading space. ! ac_sep=" " ! ;; ! esac ! done done + $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } + $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. + # WARNING: Be sure not to use single quotes in there, as some shells, + # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. ! { ! echo ! ! cat <<\_ASBOX ! ## ---------------- ## ! ## Cache variables. ## ! ## ---------------- ## ! _ASBOX ! echo ! # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | *************** *** 888,906 **** ;; esac; ! } >&5 ! sed "/^$/d" confdefs.h >conftest.log ! if test -s conftest.log; then ! echo >&5 ! echo "## ------------ ##" >&5 ! echo "## confdefs.h. ##" >&5 ! echo "## ------------ ##" >&5 ! echo >&5 ! cat conftest.log >&5 ! fi ! (echo; echo) >&5 ! test "$ac_signal" != 0 && ! echo "$as_me: caught signal $ac_signal" >&5 ! echo "$as_me: exit $exit_status" >&5 ! rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files && exit $exit_status ' 0 --- 1148,1198 ---- ;; esac; ! } ! echo ! ! cat <<\_ASBOX ! ## ----------------- ## ! ## Output variables. ## ! ## ----------------- ## ! _ASBOX ! echo ! for ac_var in $ac_subst_vars ! do ! eval ac_val=$`echo $ac_var` ! echo "$ac_var='"'"'$ac_val'"'"'" ! done | sort ! echo ! ! if test -n "$ac_subst_files"; then ! cat <<\_ASBOX ! ## ------------- ## ! ## Output files. ## ! ## ------------- ## ! _ASBOX ! echo ! for ac_var in $ac_subst_files ! do ! eval ac_val=$`echo $ac_var` ! echo "$ac_var='"'"'$ac_val'"'"'" ! done | sort ! echo ! fi ! ! if test -s confdefs.h; then ! cat <<\_ASBOX ! ## ----------- ## ! ## confdefs.h. ## ! ## ----------- ## ! _ASBOX ! echo ! sed "/^$/d" confdefs.h | sort ! echo ! fi ! test "$ac_signal" != 0 && ! echo "$as_me: caught signal $ac_signal" ! echo "$as_me: exit $exit_status" ! } >&5 ! rm -f core core.* *.core && ! rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 *************** *** 915,918 **** --- 1207,1237 ---- echo >confdefs.h + # Predefined preprocessor variables. + + cat >>confdefs.h <<_ACEOF + #define PACKAGE_NAME "$PACKAGE_NAME" + _ACEOF + + + cat >>confdefs.h <<_ACEOF + #define PACKAGE_TARNAME "$PACKAGE_TARNAME" + _ACEOF + + + cat >>confdefs.h <<_ACEOF + #define PACKAGE_VERSION "$PACKAGE_VERSION" + _ACEOF + + + cat >>confdefs.h <<_ACEOF + #define PACKAGE_STRING "$PACKAGE_STRING" + _ACEOF + + + cat >>confdefs.h <<_ACEOF + #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" + _ACEOF + + # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. *************** *** 926,932 **** for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then ! { echo "$as_me:928: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} ! cat "$ac_site_file" >&5 . "$ac_site_file" fi --- 1245,1251 ---- for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then ! { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} ! sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi *************** *** 937,941 **** # files actually), so we avoid doing that. if test -f "$cache_file"; then ! { echo "$as_me:939: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in --- 1256,1260 ---- # files actually), so we avoid doing that. if test -f "$cache_file"; then ! { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in *************** *** 945,949 **** fi else ! { echo "$as_me:947: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file --- 1264,1268 ---- fi else ! { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file *************** *** 961,969 **** case $ac_old_set,$ac_new_set in set,) ! { echo "$as_me:963: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) ! { echo "$as_me:967: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; --- 1280,1288 ---- case $ac_old_set,$ac_new_set in set,) ! { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) ! { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; *************** *** 971,1000 **** *) if test "x$ac_old_val" != "x$ac_new_val"; then ! { echo "$as_me:973: 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:975: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} ! { echo "$as_me:977: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac ! # Pass precious variables to config.status. It doesn't matter if ! # we pass some twice (in addition to the command line arguments). if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ! ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ! ac_configure_args="$ac_configure_args '$ac_arg'" ! ;; ! *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val" ! ;; esac fi done if $ac_cache_corrupted; then ! { echo "$as_me:996: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} ! { { echo "$as_me:998: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } --- 1290,1319 ---- *) 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: error: \`$ac_var' has changed since the previous run:" >&2;} ! { 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: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac ! # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ! ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; ! *) ac_arg=$ac_var=$ac_new_val ;; ! esac ! case " $ac_configure_args " in ! *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. ! *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then ! { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} ! { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } *************** *** 1007,1030 **** ac_compiler_gnu=$ac_cv_c_compiler_gnu ! case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in ! *c*,-n*) ECHO_N= ECHO_C=' ! ' ECHO_T=' ' ;; ! *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; ! *) ECHO_N= ECHO_C='\c' ECHO_T= ;; ! esac ! echo "#! $SHELL" >conftest.sh ! echo "exit 0" >>conftest.sh ! chmod +x conftest.sh ! if { (echo "$as_me:1018: PATH=\".;.\"; conftest.sh") >&5 ! (PATH=".;."; conftest.sh) 2>&5 ! ac_status=$? ! echo "$as_me:1021: \$? = $ac_status" >&5 ! (exit $ac_status); }; then ! ac_path_separator=';' ! else ! ac_path_separator=: ! fi ! PATH_SEPARATOR="$ac_path_separator" ! rm -f conftest.sh ac_aux_dir= --- 1326,1358 ---- ac_compiler_gnu=$ac_cv_c_compiler_gnu ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ac_aux_dir= *************** *** 1045,1049 **** done if test -z "$ac_aux_dir"; then ! { { echo "$as_me:1047: error: cannot find install-sh or install.sh in ./support $srcdir/./support" >&5 echo "$as_me: error: cannot find install-sh or install.sh in ./support $srcdir/./support" >&2;} { (exit 1); exit 1; }; } --- 1373,1377 ---- done if test -z "$ac_aux_dir"; then ! { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ./support $srcdir/./support" >&5 echo "$as_me: error: cannot find install-sh or install.sh in ./support $srcdir/./support" >&2;} { (exit 1); exit 1; }; } *************** *** 1053,1059 **** ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. ! ac_config_headers="$ac_config_headers config.h" ! BASHVERS=2.05b RELSTATUS=release --- 1381,1388 ---- ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. ! ac_config_headers="$ac_config_headers config.h" ! ! BASHVERS=3.0 RELSTATUS=release *************** *** 1065,1073 **** # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || ! { { echo "$as_me:1067: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } ! echo "$as_me:1071: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then --- 1394,1402 ---- # 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 *************** *** 1078,1091 **** ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && ! { { echo "$as_me:1080: 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:1084: 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:1089: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build --- 1407,1420 ---- 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 *************** *** 1094,1098 **** build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ! echo "$as_me:1096: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then --- 1423,1428 ---- 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 *************** *** 1103,1112 **** ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || ! { { echo "$as_me:1105: 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:1110: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host --- 1433,1442 ---- 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 *************** *** 1115,1118 **** --- 1445,1450 ---- host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + opt_bash_malloc=yes opt_purify=no *************** *** 1133,1136 **** --- 1465,1469 ---- m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF + *-freebsd*-gnu) opt_bash_malloc=no ;; # there's some undetermined problem here #*-freebsd*) opt_bash_malloc=no ;; # they claim it's better; I disagree *-openbsd*) opt_bash_malloc=no ;; # they claim it needs eight-bit alignment *************** *** 1155,1158 **** --- 1488,1571 ---- esac + + # Check whether --with-lispdir or --without-lispdir was given. + if test "${with_lispdir+set}" = set; then + withval="$with_lispdir" + lispdir="$withval" + echo "$as_me:$LINENO: checking where .elc files should go" >&5 + echo $ECHO_N "checking where .elc files should go... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $lispdir" >&5 + echo "${ECHO_T}$lispdir" >&6 + else + + # If set to t, that means we are running in a shell under Emacs. + # If you have an Emacs named "t", then use the full path. + test x"$EMACS" = xt && EMACS= + for ac_prog in emacs xemacs + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 + if test "${ac_cv_prog_EMACS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$EMACS"; then + ac_cv_prog_EMACS="$EMACS" # 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_EMACS="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + + fi + fi + EMACS=$ac_cv_prog_EMACS + if test -n "$EMACS"; then + echo "$as_me:$LINENO: result: $EMACS" >&5 + echo "${ECHO_T}$EMACS" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + fi + + test -n "$EMACS" && break + done + test -n "$EMACS" || EMACS="no" + + if test $EMACS != "no"; then + if test x${lispdir+set} != xset; then + echo "$as_me:$LINENO: checking where .elc files should go" >&5 + echo $ECHO_N "checking where .elc files should go... $ECHO_C" >&6 + if test "${am_cv_lispdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + am_cv_lispdir=`$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' | sed -n -e 's,/$,,' -e '/.*\/lib\/\(x\?emacs\/site-lisp\)$/{s,,${libdir}/\1,;p;q;}' -e '/.*\/share\/\(x\?emacs\/site-lisp\)$/{s,,${datadir}/\1,;p;q;}'` + if test -z "$am_cv_lispdir"; then + am_cv_lispdir='${datadir}/emacs/site-lisp' + fi + + fi + echo "$as_me:$LINENO: result: $am_cv_lispdir" >&5 + echo "${ECHO_T}$am_cv_lispdir" >&6 + lispdir="$am_cv_lispdir" + fi + fi + + fi; + + + + + # Check whether --with-afs or --without-afs was given. if test "${with_afs+set}" = set; then *************** *** 1206,1212 **** MALLOC_DEP='$(MALLOC_LIBRARY)' ! cat >>confdefs.h <<\EOF #define USING_BASH_MALLOC 1 ! EOF else --- 1619,1625 ---- MALLOC_DEP='$(MALLOC_LIBRARY)' ! cat >>confdefs.h <<\_ACEOF #define USING_BASH_MALLOC 1 ! _ACEOF else *************** *** 1219,1225 **** if test "$opt_purify" = yes; then PURIFY="purify " ! cat >>confdefs.h <<\EOF #define DISABLE_MALLOC_WRAPPERS 1 ! EOF else --- 1632,1638 ---- if test "$opt_purify" = yes; then PURIFY="purify " ! cat >>confdefs.h <<\_ACEOF #define DISABLE_MALLOC_WRAPPERS 1 ! _ACEOF else *************** *** 1232,1238 **** if test "$opt_afs" = yes; then ! cat >>confdefs.h <<\EOF #define AFS 1 ! EOF fi --- 1645,1651 ---- if test "$opt_afs" = yes; then ! cat >>confdefs.h <<\_ACEOF #define AFS 1 ! _ACEOF fi *************** *** 1242,1245 **** --- 1655,1662 ---- fi + if test -z "${DEBUGGER_START_FILE}"; then + DEBUGGER_START_FILE=${ac_default_prefix}/lib/bashdb/bashdb-main.inc + fi + opt_minimal_config=no *************** *** 1263,1270 **** --- 1680,1690 ---- opt_xpg_echo=no opt_cond_command=yes + opt_cond_regexp=yes opt_arith_for_command=yes opt_net_redirs=yes opt_progcomp=yes opt_separate_help=no + opt_multibyte=yes + opt_debugger=yes opt_static_link=no *************** *** 1285,1288 **** --- 1705,1709 ---- opt_extended_glob=no opt_cond_command=no opt_arith_for_command=no opt_net_redirs=no opt_progcomp=no opt_separate_help=no + opt_multibyte=yes opt_cond_regexp=no fi *************** *** 1322,1325 **** --- 1743,1756 ---- opt_cond_command=$enableval fi; + # Check whether --enable-cond-regexp or --disable-cond-regexp was given. + if test "${enable_cond_regexp+set}" = set; then + enableval="$enable_cond_regexp" + opt_cond_regexp=$enableval + fi; + # Check whether --enable-debugger or --disable-debugger was given. + if test "${enable_debugger+set}" = set; then + enableval="$enable_debugger" + opt_debugger=$enableval + fi; # Check whether --enable-directory-stack or --disable-directory-stack was given. if test "${enable_directory_stack+set}" = set; then *************** *** 1357,1360 **** --- 1788,1796 ---- opt_job_control=$enableval fi; + # Check whether --enable-multibyte or --disable-multibyte was given. + if test "${enable_multibyte+set}" = set; then + enableval="$enable_multibyte" + opt_multibyte=$enableval + fi; # Check whether --enable-net-redirections or --disable-net-redirections was given. if test "${enable_net_redirections+set}" = set; then *************** *** 1424,1540 **** fi; if test $opt_alias = yes; then ! cat >>confdefs.h <<\EOF #define ALIAS 1 ! EOF fi if test $opt_dirstack = yes; then ! cat >>confdefs.h <<\EOF #define PUSHD_AND_POPD 1 ! EOF fi if test $opt_restricted = yes; then ! cat >>confdefs.h <<\EOF #define RESTRICTED_SHELL 1 ! EOF fi if test $opt_process_subst = yes; then ! cat >>confdefs.h <<\EOF #define PROCESS_SUBSTITUTION 1 ! EOF fi if test $opt_prompt_decoding = yes; then ! cat >>confdefs.h <<\EOF #define PROMPT_STRING_DECODE 1 ! EOF fi if test $opt_select = yes; then ! cat >>confdefs.h <<\EOF #define SELECT_COMMAND 1 ! EOF fi if test $opt_help = yes; then ! cat >>confdefs.h <<\EOF #define HELP_BUILTIN 1 ! EOF fi if test $opt_array_variables = yes; then ! cat >>confdefs.h <<\EOF #define ARRAY_VARS 1 ! EOF fi if test $opt_dparen_arith = yes; then ! cat >>confdefs.h <<\EOF #define DPAREN_ARITHMETIC 1 ! EOF fi if test $opt_brace_expansion = yes; then ! cat >>confdefs.h <<\EOF #define BRACE_EXPANSION 1 ! EOF fi if test $opt_disabled_builtins = yes; then ! cat >>confdefs.h <<\EOF #define DISABLED_BUILTINS 1 ! EOF fi if test $opt_command_timing = yes; then ! cat >>confdefs.h <<\EOF #define COMMAND_TIMING 1 ! EOF fi if test $opt_xpg_echo = yes ; then ! cat >>confdefs.h <<\EOF #define DEFAULT_ECHO_TO_XPG 1 ! EOF fi if test $opt_extended_glob = yes ; then ! cat >>confdefs.h <<\EOF #define EXTENDED_GLOB 1 ! EOF fi if test $opt_cond_command = yes ; then ! cat >>confdefs.h <<\EOF #define COND_COMMAND 1 ! EOF fi if test $opt_arith_for_command = yes; then ! cat >>confdefs.h <<\EOF #define ARITH_FOR_COMMAND 1 ! EOF fi if test $opt_net_redirs = yes; then ! cat >>confdefs.h <<\EOF #define NETWORK_REDIRECTIONS 1 ! EOF fi if test $opt_progcomp = yes; then ! cat >>confdefs.h <<\EOF #define PROGRAMMABLE_COMPLETION 1 ! EOF fi if test $opt_memscramble = yes; then ! cat >>confdefs.h <<\EOF #define MEMSCRAMBLE 1 ! EOF fi --- 1860,1996 ---- fi; + + if test $opt_alias = yes; then ! cat >>confdefs.h <<\_ACEOF #define ALIAS 1 ! _ACEOF fi if test $opt_dirstack = yes; then ! cat >>confdefs.h <<\_ACEOF #define PUSHD_AND_POPD 1 ! _ACEOF fi if test $opt_restricted = yes; then ! cat >>confdefs.h <<\_ACEOF #define RESTRICTED_SHELL 1 ! _ACEOF fi if test $opt_process_subst = yes; then ! cat >>confdefs.h <<\_ACEOF #define PROCESS_SUBSTITUTION 1 ! _ACEOF fi if test $opt_prompt_decoding = yes; then ! cat >>confdefs.h <<\_ACEOF #define PROMPT_STRING_DECODE 1 ! _ACEOF fi if test $opt_select = yes; then ! cat >>confdefs.h <<\_ACEOF #define SELECT_COMMAND 1 ! _ACEOF fi if test $opt_help = yes; then ! cat >>confdefs.h <<\_ACEOF #define HELP_BUILTIN 1 ! _ACEOF fi if test $opt_array_variables = yes; then ! cat >>confdefs.h <<\_ACEOF #define ARRAY_VARS 1 ! _ACEOF fi if test $opt_dparen_arith = yes; then ! cat >>confdefs.h <<\_ACEOF #define DPAREN_ARITHMETIC 1 ! _ACEOF fi if test $opt_brace_expansion = yes; then ! cat >>confdefs.h <<\_ACEOF #define BRACE_EXPANSION 1 ! _ACEOF fi if test $opt_disabled_builtins = yes; then ! cat >>confdefs.h <<\_ACEOF #define DISABLED_BUILTINS 1 ! _ACEOF fi if test $opt_command_timing = yes; then ! cat >>confdefs.h <<\_ACEOF #define COMMAND_TIMING 1 ! _ACEOF fi if test $opt_xpg_echo = yes ; then ! cat >>confdefs.h <<\_ACEOF #define DEFAULT_ECHO_TO_XPG 1 ! _ACEOF fi if test $opt_extended_glob = yes ; then ! cat >>confdefs.h <<\_ACEOF #define EXTENDED_GLOB 1 ! _ACEOF fi if test $opt_cond_command = yes ; then ! cat >>confdefs.h <<\_ACEOF #define COND_COMMAND 1 ! _ACEOF ! ! fi ! if test $opt_cond_regexp = yes ; then ! cat >>confdefs.h <<\_ACEOF ! #define COND_REGEXP 1 ! _ACEOF fi if test $opt_arith_for_command = yes; then ! cat >>confdefs.h <<\_ACEOF #define ARITH_FOR_COMMAND 1 ! _ACEOF fi if test $opt_net_redirs = yes; then ! cat >>confdefs.h <<\_ACEOF #define NETWORK_REDIRECTIONS 1 ! _ACEOF fi if test $opt_progcomp = yes; then ! cat >>confdefs.h <<\_ACEOF #define PROGRAMMABLE_COMPLETION 1 ! _ACEOF ! ! fi ! if test $opt_multibyte = no; then ! cat >>confdefs.h <<\_ACEOF ! #define NO_MULTIBYTE_SUPPORT 1 ! _ACEOF ! ! fi ! if test $opt_debugger = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define DEBUGGER 1 ! _ACEOF fi if test $opt_memscramble = yes; then ! cat >>confdefs.h <<\_ACEOF #define MEMSCRAMBLE 1 ! _ACEOF fi *************** *** 1557,1560 **** --- 2013,2032 ---- fi + + + + + + + + + + + + + + + + echo "" echo "Beginning configuration for bash-$BASHVERS-$RELSTATUS for ${host_cpu}-${host_vendor}-${host_os}" *************** *** 1569,1573 **** # 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:1571: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then --- 2041,2045 ---- # 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 *************** *** 1577,1589 **** ac_cv_prog_CC="$CC" # Let the user override the test. else ! ac_save_IFS=$IFS; IFS=$ac_path_separator ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! IFS=$ac_save_IFS ! test -z "$ac_dir" && ac_dir=. ! $as_executable_p "$ac_dir/$ac_word" || continue ! ac_cv_prog_CC="${ac_tool_prefix}gcc" ! echo "$as_me:1586: found $ac_dir/$ac_word" >&5 ! break done --- 2049,2064 ---- 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 *************** *** 1592,1599 **** CC=$ac_cv_prog_CC if test -n "$CC"; then ! echo "$as_me:1594: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else ! echo "$as_me:1597: result: no" >&5 echo "${ECHO_T}no" >&6 fi --- 2067,2074 ---- 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 fi *************** *** 1604,1608 **** # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 ! echo "$as_me:1606: 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 --- 2079,2083 ---- # 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 *************** *** 1612,1624 **** ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else ! ac_save_IFS=$IFS; IFS=$ac_path_separator ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! IFS=$ac_save_IFS ! test -z "$ac_dir" && ac_dir=. ! $as_executable_p "$ac_dir/$ac_word" || continue ! ac_cv_prog_ac_ct_CC="gcc" ! echo "$as_me:1621: found $ac_dir/$ac_word" >&5 ! break done --- 2087,2102 ---- 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 *************** *** 1627,1634 **** ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then ! echo "$as_me:1629: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else ! echo "$as_me:1632: result: no" >&5 echo "${ECHO_T}no" >&6 fi --- 2105,2112 ---- 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 *************** *** 1643,1647 **** # 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:1645: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then --- 2121,2125 ---- # 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 *************** *** 1651,1663 **** ac_cv_prog_CC="$CC" # Let the user override the test. else ! ac_save_IFS=$IFS; IFS=$ac_path_separator ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! IFS=$ac_save_IFS ! test -z "$ac_dir" && ac_dir=. ! $as_executable_p "$ac_dir/$ac_word" || continue ! ac_cv_prog_CC="${ac_tool_prefix}cc" ! echo "$as_me:1660: found $ac_dir/$ac_word" >&5 ! break done --- 2129,2144 ---- 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 *************** *** 1666,1673 **** CC=$ac_cv_prog_CC if test -n "$CC"; then ! echo "$as_me:1668: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else ! echo "$as_me:1671: result: no" >&5 echo "${ECHO_T}no" >&6 fi --- 2147,2154 ---- 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 fi *************** *** 1678,1682 **** # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 ! echo "$as_me:1680: 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 --- 2159,2163 ---- # 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 *************** *** 1686,1698 **** ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else ! ac_save_IFS=$IFS; IFS=$ac_path_separator ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! IFS=$ac_save_IFS ! test -z "$ac_dir" && ac_dir=. ! $as_executable_p "$ac_dir/$ac_word" || continue ! ac_cv_prog_ac_ct_CC="cc" ! echo "$as_me:1695: found $ac_dir/$ac_word" >&5 ! break done --- 2167,2182 ---- 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="cc" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done done *************** *** 1701,1708 **** ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then ! echo "$as_me:1703: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else ! echo "$as_me:1706: result: no" >&5 echo "${ECHO_T}no" >&6 fi --- 2185,2192 ---- 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 *************** *** 1717,1721 **** # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 ! echo "$as_me:1719: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then --- 2201,2205 ---- # 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 *************** *** 1726,1742 **** else ac_prog_rejected=no ! ac_save_IFS=$IFS; IFS=$ac_path_separator ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! IFS=$ac_save_IFS ! test -z "$ac_dir" && ac_dir=. ! $as_executable_p "$ac_dir/$ac_word" || continue ! if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ! ac_prog_rejected=yes ! continue ! fi ! ac_cv_prog_CC="cc" ! echo "$as_me:1739: found $ac_dir/$ac_word" >&5 ! break done --- 2210,2229 ---- 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 *************** *** 1750,1756 **** # first if we set CC to just the basename; use the full file name. shift ! set dummy "$ac_dir/$ac_word" ${1+"$@"} ! shift ! ac_cv_prog_CC="$@" fi fi --- 2237,2241 ---- # 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 *************** *** 1759,1766 **** CC=$ac_cv_prog_CC if test -n "$CC"; then ! echo "$as_me:1761: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else ! echo "$as_me:1764: result: no" >&5 echo "${ECHO_T}no" >&6 fi --- 2244,2251 ---- 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 fi *************** *** 1773,1777 **** # 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:1775: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then --- 2258,2262 ---- # 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 *************** *** 1781,1793 **** ac_cv_prog_CC="$CC" # Let the user override the test. else ! ac_save_IFS=$IFS; IFS=$ac_path_separator ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! IFS=$ac_save_IFS ! test -z "$ac_dir" && ac_dir=. ! $as_executable_p "$ac_dir/$ac_word" || continue ! ac_cv_prog_CC="$ac_tool_prefix$ac_prog" ! echo "$as_me:1790: found $ac_dir/$ac_word" >&5 ! break done --- 2266,2281 ---- 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 *************** *** 1796,1803 **** CC=$ac_cv_prog_CC if test -n "$CC"; then ! echo "$as_me:1798: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else ! echo "$as_me:1801: result: no" >&5 echo "${ECHO_T}no" >&6 fi --- 2284,2291 ---- 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 fi *************** *** 1812,1816 **** # 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:1814: 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 --- 2300,2304 ---- # 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 *************** *** 1820,1832 **** ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else ! ac_save_IFS=$IFS; IFS=$ac_path_separator ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! IFS=$ac_save_IFS ! test -z "$ac_dir" && ac_dir=. ! $as_executable_p "$ac_dir/$ac_word" || continue ! ac_cv_prog_ac_ct_CC="$ac_prog" ! echo "$as_me:1829: found $ac_dir/$ac_word" >&5 ! break done --- 2308,2323 ---- 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 *************** *** 1835,1842 **** ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then ! echo "$as_me:1837: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else ! echo "$as_me:1840: result: no" >&5 echo "${ECHO_T}no" >&6 fi --- 2326,2333 ---- 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 *************** *** 1850,1880 **** fi ! test -z "$CC" && { { echo "$as_me:1852: error: no acceptable cc found in \$PATH" >&5 ! echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. ! echo "$as_me:1857:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` ! { (eval echo "$as_me:1860: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? ! echo "$as_me:1863: \$? = $ac_status" >&5 (exit $ac_status); } ! { (eval echo "$as_me:1865: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? ! echo "$as_me:1868: \$? = $ac_status" >&5 (exit $ac_status); } ! { (eval echo "$as_me:1870: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? ! echo "$as_me:1873: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF ! #line 1877 "configure" ! #include "confdefs.h" int --- 2341,2378 ---- fi ! ! 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); } 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 *************** *** 1887,1935 **** _ACEOF ac_clean_files_save=$ac_clean_files ! ac_clean_files="$ac_clean_files a.out a.exe" # 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:1893: checking for C compiler default output" >&5 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` ! if { (eval echo "$as_me:1896: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? ! echo "$as_me:1899: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. ! for ac_file in `ls a.exe conftest.exe 2>/dev/null; ! ls a.out conftest 2>/dev/null; ! ls a.* conftest.* 2>/dev/null`; do case $ac_file in ! *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; ! a.out ) # 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 --akim. ! export ac_cv_exeext ! break;; ! * ) break;; esac done else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! { { echo "$as_me:1922: error: C compiler cannot create executables" >&5 ! echo "$as_me: error: C compiler cannot create executables" >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext ! echo "$as_me:1928: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. ! echo "$as_me:1933: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 --- 2385,2450 ---- _ACEOF ac_clean_files_save=$ac_clean_files ! ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. ! echo "$as_me:$LINENO: checking for C compiler default output" >&5 echo $ECHO_N "checking for C compiler default output... $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 ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. ! ! # Be careful to initialize this variable, since it used to be cached. ! # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ! ac_cv_exeext= ! # b.out is created by i960 compilers. ! for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out ! do ! 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. ! ;; ! [ab].out ) ! # 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;; ! * ) ! break;; esac done else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! { { echo "$as_me:$LINENO: error: C compiler cannot create executables ! See \`config.log' for more details." >&5 ! echo "$as_me: error: C compiler cannot create executables ! See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext ! echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. ! echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 *************** *** 1937,1944 **** if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' ! { (eval echo "$as_me:1939: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:1942: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no --- 2452,2459 ---- if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' ! { (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 cross_compiling=no *************** *** 1947,1976 **** cross_compiling=yes else ! { { echo "$as_me:1949: error: cannot run C compiled programs. ! If you meant to cross compile, use \`--host'." >&5 echo "$as_me: error: cannot run C compiled programs. ! If you meant to cross compile, use \`--host'." >&2;} { (exit 1); exit 1; }; } fi fi fi ! echo "$as_me:1957: result: yes" >&5 echo "${ECHO_T}yes" >&6 ! rm -f a.out a.exe conftest$ac_cv_exeext ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. ! echo "$as_me:1964: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 ! echo "$as_me:1966: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 ! echo "$as_me:1969: checking for executable suffix" >&5 ! echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 ! if { (eval echo "$as_me:1971: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:1974: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) --- 2462,2493 ---- cross_compiling=yes else ! { { echo "$as_me:$LINENO: error: cannot run C compiled programs. ! If you meant to cross compile, use \`--host'. ! See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. ! If you meant to cross compile, use \`--host'. ! See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi ! echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 ! rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. ! echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 ! echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 ! echo "$as_me:$LINENO: checking for suffix of executables" >&5 ! echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 ! 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); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) *************** *** 1978,1984 **** # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. ! for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do case $ac_file in ! *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext --- 2495,2502 ---- # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. ! for ac_file in conftest.exe conftest conftest.*; do ! test -f "$ac_file" || continue case $ac_file in ! *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext *************** *** 1988,1998 **** done else ! { { echo "$as_me:1990: error: cannot compute EXEEXT: cannot compile and link" >&5 ! echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext ! echo "$as_me:1996: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 --- 2506,2518 ---- done else ! { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link ! See \`config.log' for more details." >&5 ! echo "$as_me: error: cannot compute suffix of executables: cannot compile and link ! See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext ! echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 *************** *** 2000,2011 **** EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT ! echo "$as_me:2002: checking for object suffix" >&5 ! echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF ! #line 2008 "configure" ! #include "confdefs.h" int --- 2520,2535 ---- EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT ! echo "$as_me:$LINENO: checking for suffix of object files" >&5 ! echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+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. */ int *************** *** 2018,2029 **** _ACEOF rm -f conftest.o conftest.obj ! if { (eval echo "$as_me:2020: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2023: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in ! *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; --- 2542,2553 ---- _ACEOF rm -f conftest.o conftest.obj ! 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); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in ! *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; *************** *** 2032,2038 **** else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! { { echo "$as_me:2035: error: cannot compute OBJEXT: cannot compile" >&5 ! echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} { (exit 1); exit 1; }; } fi --- 2556,2565 ---- else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile ! See \`config.log' for more details." >&5 ! echo "$as_me: error: cannot compute suffix of object files: cannot compile ! See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi *************** *** 2040,2048 **** rm -f conftest.$ac_cv_objext conftest.$ac_ext fi ! echo "$as_me:2042: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT ! echo "$as_me:2046: 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 --- 2567,2575 ---- rm -f conftest.$ac_cv_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT ! 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 *************** *** 2050,2055 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 2052 "configure" ! #include "confdefs.h" int --- 2577,2586 ---- 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 *************** *** 2065,2083 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2067: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2070: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2073: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2076: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_compiler_gnu=no fi --- 2596,2615 ---- _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_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_compiler_gnu=no fi *************** *** 2086,2090 **** fi ! echo "$as_me:2088: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` --- 2618,2622 ---- 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` *************** *** 2092,2096 **** ac_save_CFLAGS=$CFLAGS CFLAGS="-g" ! echo "$as_me:2094: 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 --- 2624,2628 ---- 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 *************** *** 2098,2103 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 2100 "configure" ! #include "confdefs.h" int --- 2630,2639 ---- 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 *************** *** 2110,2133 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2112: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2115: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2118: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2121: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:2131: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then --- 2646,2670 ---- _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_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_prog_cc_g=no fi rm -f 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 *************** *** 2146,2149 **** --- 2683,2782 ---- fi fi + 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 + #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]; + ; + 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>&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.$ac_objext + done + rm -f conftest.$ac_ext conftest.$ac_objext + CC=$ac_save_CC + + fi + + 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 + # 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 *************** *** 2156,2169 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2158: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2161: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2164: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2167: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ --- 2789,2802 ---- _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 for ac_declaration in \ *************** *** 2177,2182 **** do cat >conftest.$ac_ext <<_ACEOF ! #line 2179 "configure" ! #include "confdefs.h" #include $ac_declaration --- 2810,2819 ---- 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 *************** *** 2190,2214 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2192: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2195: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2198: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2201: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF ! #line 2211 "configure" ! #include "confdefs.h" $ac_declaration int --- 2827,2856 ---- _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 : else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! continue fi rm -f conftest.$ac_objext conftest.$ac_ext 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_declaration int *************** *** 2221,2239 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2223: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2226: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2229: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2232: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext --- 2863,2882 ---- _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 break else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! fi rm -f conftest.$ac_objext conftest.$ac_ext *************** *** 2248,2252 **** else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext --- 2891,2896 ---- else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! fi rm -f conftest.$ac_objext conftest.$ac_ext *************** *** 2257,2283 **** ac_compiler_gnu=$ac_cv_c_compiler_gnu - echo "$as_me:2259: checking for POSIXized ISC" >&5 - echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6 - if test -d /etc/conf/kconfig.d && - grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 - then - echo "$as_me:2264: result: yes" >&5 - echo "${ECHO_T}yes" >&6 - ISC=yes # If later tests want to check for ISC. - cat >>confdefs.h <<\EOF - #define _POSIX_SOURCE 1 - EOF ! if test "$GCC" = yes; then ! CC="$CC -posix" ! else ! CC="$CC -Xp" ! fi else ! echo "$as_me:2278: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! ISC= fi ac_ext=c --- 2901,2966 ---- ac_compiler_gnu=$ac_cv_c_compiler_gnu ! ! 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 $ECHO_N "(cached) $ECHO_C" >&6 else ! ac_check_lib_save_LIBS=$LIBS ! LIBS="-lcposix $LIBS" ! 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. */ ! ! /* 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>&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 ! 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 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" + fi + + ac_ext=c *************** *** 2286,2290 **** ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ! echo "$as_me:2288: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. --- 2969,2973 ---- ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ! echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. *************** *** 2304,2322 **** # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # 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 2309 "configure" ! #include "confdefs.h" ! #include Syntax error _ACEOF ! if { (eval echo "$as_me:2314: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? ! egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 ! echo "$as_me:2320: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then --- 2987,3015 ---- # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #ifdef __STDC__ ! # include ! #else ! # include ! #endif Syntax error _ACEOF ! if { (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 *************** *** 2332,2336 **** else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 # Broken: fails on valid input. continue --- 3025,3030 ---- else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! # Broken: fails on valid input. continue *************** *** 2341,2355 **** # can be detected and how. cat >conftest.$ac_ext <<_ACEOF ! #line 2343 "configure" ! #include "confdefs.h" #include _ACEOF ! if { (eval echo "$as_me:2347: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? ! egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 ! echo "$as_me:2353: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then --- 3035,3053 ---- # can be detected and how. 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 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 *************** *** 2366,2370 **** else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: --- 3064,3069 ---- else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! # Passes both tests. ac_preproc_ok=: *************** *** 2388,2392 **** ac_cv_prog_CPP=$CPP fi ! echo "$as_me:2390: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false --- 3087,3091 ---- ac_cv_prog_CPP=$CPP fi ! echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false *************** *** 2395,2413 **** # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # 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 2400 "configure" ! #include "confdefs.h" ! #include Syntax error _ACEOF ! if { (eval echo "$as_me:2405: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? ! egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 ! echo "$as_me:2411: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then --- 3094,3122 ---- # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #ifdef __STDC__ ! # include ! #else ! # include ! #endif Syntax error _ACEOF ! if { (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 *************** *** 2423,2427 **** else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 # Broken: fails on valid input. continue --- 3132,3137 ---- else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! # Broken: fails on valid input. continue *************** *** 2432,2446 **** # can be detected and how. cat >conftest.$ac_ext <<_ACEOF ! #line 2434 "configure" ! #include "confdefs.h" #include _ACEOF ! if { (eval echo "$as_me:2438: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? ! egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 ! echo "$as_me:2444: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then --- 3142,3160 ---- # can be detected and how. 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 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 *************** *** 2457,2461 **** else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: --- 3171,3176 ---- else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! # Passes both tests. ac_preproc_ok=: *************** *** 2470,2475 **** : else ! { { echo "$as_me:2472: error: C preprocessor \"$CPP\" fails sanity check" >&5 ! echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} { (exit 1); exit 1; }; } fi --- 3185,3192 ---- : else ! { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check ! See \`config.log' for more details." >&5 ! echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check ! See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi *************** *** 2481,2504 **** ac_compiler_gnu=$ac_cv_c_compiler_gnu ! echo "$as_me:2483: checking for minix/config.h" >&5 ! echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6 ! if test "${ac_cv_header_minix_config_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF ! #line 2489 "configure" ! #include "confdefs.h" ! #include _ACEOF ! if { (eval echo "$as_me:2493: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! egrep -v '^ *\+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:2499: \$? = $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= --- 3198,3507 ---- ac_compiler_gnu=$ac_cv_c_compiler_gnu ! ! echo "$as_me:$LINENO: checking for egrep" >&5 ! echo $ECHO_N "checking for egrep... $ECHO_C" >&6 ! if test "${ac_cv_prog_egrep+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if echo a | (grep -E '(a|b)') >/dev/null 2>&1 ! then ac_cv_prog_egrep='grep -E' ! else ac_cv_prog_egrep='egrep' ! fi ! fi ! echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 ! echo "${ECHO_T}$ac_cv_prog_egrep" >&6 ! EGREP=$ac_cv_prog_egrep ! ! ! 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 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 ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! 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 ! : ! else ! ac_cv_header_stdc=no ! fi ! rm -f conftest* ! ! fi ! ! if test $ac_cv_header_stdc = yes; then ! # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. ! cat >conftest.$ac_ext <<_ACEOF ! #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 "free" >/dev/null 2>&1; then ! : ! else ! ac_cv_header_stdc=no ! fi ! rm -f conftest* ! ! fi ! ! if test $ac_cv_header_stdc = yes; then ! # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. ! if test "$cross_compiling" = yes; then ! : ! else ! cat >conftest.$ac_ext <<_ACEOF ! #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 ! ! #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 ! : ! 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_header_stdc=no ! fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ! fi ! fi ! 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 ! ! fi ! ! # On IRIX 5.3, sys/types and inttypes.h are conflicting. ! ! ! ! ! ! ! ! ! ! for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ ! inttypes.h stdint.h unistd.h ! do ! as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ! 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 ! 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 ! ! #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 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! eval "$as_ac_Header=yes" ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! eval "$as_ac_Header=no" ! fi ! rm -f 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 ! 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 "${ac_cv_header_minix_config_h+set}" = set; then ! echo "$as_me:$LINENO: checking for minix/config.h" >&5 ! echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6 ! if test "${ac_cv_header_minix_config_h+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! fi ! echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 ! echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6 ! else ! # Is the header compilable? ! 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 ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! $ac_includes_default ! #include ! _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_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 ! 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 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 ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #include ! _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 else ac_cpp_err= *************** *** 2508,2521 **** fi if test -z "$ac_cpp_err"; then ! ac_cv_header_minix_config_h=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_header_minix_config_h=no fi rm -f conftest.err conftest.$ac_ext fi ! echo "$as_me:2518: result: $ac_cv_header_minix_config_h" >&5 echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6 if test $ac_cv_header_minix_config_h = yes; then MINIX=yes --- 3511,3569 ---- 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 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 + ;; + 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: 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 + ;; + esac + echo "$as_me:$LINENO: checking for minix/config.h" >&5 + echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6 + if test "${ac_cv_header_minix_config_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_cv_header_minix_config_h=$ac_header_preproc fi ! echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6 + + fi if test $ac_cv_header_minix_config_h = yes; then MINIX=yes *************** *** 2524,2543 **** fi if test "$MINIX" = yes; then ! cat >>confdefs.h <<\EOF #define _POSIX_SOURCE 1 ! EOF ! cat >>confdefs.h <<\EOF #define _POSIX_1_SOURCE 2 ! EOF ! cat >>confdefs.h <<\EOF #define _MINIX 1 ! EOF fi case $host_os in *cygwin* ) CYGWIN=yes;; --- 3572,3596 ---- fi + if test "$MINIX" = yes; then ! cat >>confdefs.h <<\_ACEOF #define _POSIX_SOURCE 1 ! _ACEOF ! ! cat >>confdefs.h <<\_ACEOF #define _POSIX_1_SOURCE 2 ! _ACEOF ! ! cat >>confdefs.h <<\_ACEOF #define _MINIX 1 ! _ACEOF fi + + case $host_os in *cygwin* ) CYGWIN=yes;; *************** *** 2545,2548 **** --- 3598,3602 ---- esac + case $host_os in *mingw32* ) MINGW32=yes;; *************** *** 2550,2553 **** --- 3604,3608 ---- esac + # Check whether --enable-largefile or --disable-largefile was given. if test "${enable_largefile+set}" = set; then *************** *** 2557,2561 **** if test "$enable_largefile" != no; then ! echo "$as_me:2559: checking for special C compiler options needed for large files" >&5 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6 if test "${ac_cv_sys_largefile_CC+set}" = set; then --- 3612,3616 ---- if test "$enable_largefile" != no; then ! echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6 if test "${ac_cv_sys_largefile_CC+set}" = set; then *************** *** 2569,2574 **** # so use the C compiler's -n32 option if that helps. cat >conftest.$ac_ext <<_ACEOF ! #line 2571 "configure" ! #include "confdefs.h" #include /* Check that off_t can represent 2**63 - 1 correctly. --- 3624,3633 ---- # so use the C compiler's -n32 option if that helps. 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 /* Check that off_t can represent 2**63 - 1 correctly. *************** *** 2589,2626 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2591: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2594: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2597: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2600: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext CC="$CC -n32" rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2610: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2613: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2616: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2619: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sys_largefile_CC=' -n32'; break else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext --- 3648,3687 ---- _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 break else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! fi rm -f 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 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_sys_largefile_CC=' -n32'; break else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! fi rm -f conftest.$ac_objext *************** *** 2631,2635 **** fi fi ! echo "$as_me:2633: result: $ac_cv_sys_largefile_CC" >&5 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6 if test "$ac_cv_sys_largefile_CC" != no; then --- 3692,3696 ---- fi fi ! echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6 if test "$ac_cv_sys_largefile_CC" != no; then *************** *** 2637,2641 **** fi ! echo "$as_me:2639: checking for _FILE_OFFSET_BITS value needed for large files" >&5 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6 if test "${ac_cv_sys_file_offset_bits+set}" = set; then --- 3698,3702 ---- fi ! echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6 if test "${ac_cv_sys_file_offset_bits+set}" = set; then *************** *** 2645,2650 **** ac_cv_sys_file_offset_bits=no cat >conftest.$ac_ext <<_ACEOF ! #line 2647 "configure" ! #include "confdefs.h" #include /* Check that off_t can represent 2**63 - 1 correctly. --- 3706,3715 ---- ac_cv_sys_file_offset_bits=no 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 /* Check that off_t can represent 2**63 - 1 correctly. *************** *** 2665,2688 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2667: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2670: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2673: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2676: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF ! #line 2685 "configure" ! #include "confdefs.h" #define _FILE_OFFSET_BITS 64 #include --- 3730,3758 ---- _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 break else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! fi rm -f conftest.$ac_objext conftest.$ac_ext 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 _FILE_OFFSET_BITS 64 #include *************** *** 2704,2722 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2706: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2709: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2712: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2715: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sys_file_offset_bits=64; break else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext --- 3774,3793 ---- _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_sys_file_offset_bits=64; break else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! fi rm -f conftest.$ac_objext conftest.$ac_ext *************** *** 2724,2738 **** done fi ! echo "$as_me:2726: result: $ac_cv_sys_file_offset_bits" >&5 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6 if test "$ac_cv_sys_file_offset_bits" != no; then ! cat >>confdefs.h <&5 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6 if test "${ac_cv_sys_large_files+set}" = set; then --- 3795,3809 ---- done fi ! echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6 if test "$ac_cv_sys_file_offset_bits" != no; then ! cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits ! _ACEOF fi rm -f conftest* ! echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6 if test "${ac_cv_sys_large_files+set}" = set; then *************** *** 2742,2747 **** ac_cv_sys_large_files=no cat >conftest.$ac_ext <<_ACEOF ! #line 2744 "configure" ! #include "confdefs.h" #include /* Check that off_t can represent 2**63 - 1 correctly. --- 3813,3822 ---- ac_cv_sys_large_files=no 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 /* Check that off_t can represent 2**63 - 1 correctly. *************** *** 2762,2785 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2764: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2767: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2770: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2773: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF ! #line 2782 "configure" ! #include "confdefs.h" #define _LARGE_FILES 1 #include --- 3837,3865 ---- _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 break else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! fi rm -f conftest.$ac_objext conftest.$ac_ext 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 _LARGE_FILES 1 #include *************** *** 2801,2819 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2803: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2806: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2809: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2812: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sys_large_files=1; break else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext --- 3881,3900 ---- _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_sys_large_files=1; break else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! fi rm -f conftest.$ac_objext conftest.$ac_ext *************** *** 2821,2831 **** done fi ! echo "$as_me:2823: result: $ac_cv_sys_large_files" >&5 echo "${ECHO_T}$ac_cv_sys_large_files" >&6 if test "$ac_cv_sys_large_files" != no; then ! cat >>confdefs.h <&5 echo "${ECHO_T}$ac_cv_sys_large_files" >&6 if test "$ac_cv_sys_large_files" != no; then ! cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files ! _ACEOF fi *************** *** 2833,2838 **** --- 3914,3923 ---- fi + + SIGNAMES_H=lsignames.h + + if test "x$cross_compiling" = "xyes"; then case "${host}" in *************** *** 2855,2858 **** --- 3940,3944 ---- fi + if test -z "$CC_FOR_BUILD"; then if test "x$cross_compiling" = "xno"; then *************** *** 2863,2866 **** --- 3949,3954 ---- fi + + test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1 *************** *** 2887,2895 **** fi ! test -z "$CPPFLAGS_FOR_BUILD" && CPPFLAGS_FOR_BUILD="$CPPFLAGS" test -z "$CFLAGS_FOR_BUILD" && CFLAGS_FOR_BUILD="-g" if test $ac_cv_c_compiler_gnu = yes; then ! echo "$as_me:2893: checking whether $CC needs -traditional" >&5 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6 if test "${ac_cv_prog_gcc_traditional+set}" = set; then --- 3975,3999 ---- fi ! if test "X$cross_compiling" = "Xno"; then ! CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-"$CPPFLAGS"} ! LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(LDFLAGS)'} ! else ! CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-""} ! LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-""} ! fi ! test -z "$CFLAGS_FOR_BUILD" && CFLAGS_FOR_BUILD="-g" + + + + + + + + + if test $ac_cv_c_compiler_gnu = yes; then ! echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6 if test "${ac_cv_prog_gcc_traditional+set}" = set; then *************** *** 2898,2908 **** ac_pattern="Autoconf.*'x'" cat >conftest.$ac_ext <<_ACEOF ! #line 2900 "configure" ! #include "confdefs.h" #include Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes else --- 4002,4016 ---- ac_pattern="Autoconf.*'x'" 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 Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! $EGREP "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes else *************** *** 2911,2923 **** rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat >conftest.$ac_ext <<_ACEOF ! #line 2915 "configure" ! #include "confdefs.h" #include Autoconf TCGETA _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes fi --- 4019,4036 ---- rm -f conftest* + if test $ac_cv_prog_gcc_traditional = no; then 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 Autoconf TCGETA _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! $EGREP "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes fi *************** *** 2926,2930 **** fi fi ! echo "$as_me:2928: result: $ac_cv_prog_gcc_traditional" >&5 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6 if test $ac_cv_prog_gcc_traditional = yes; then --- 4039,4043 ---- fi fi ! echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6 if test $ac_cv_prog_gcc_traditional = yes; then *************** *** 2933,2936 **** --- 4046,4051 ---- fi + + if test "$opt_readline" = yes && test "$opt_with_installed_readline" != "no" then *************** *** 2939,2946 **** test $opt_with_installed_readline != "yes" && ac_cv_rl_prefix=$opt_with_installed_readline if test "X$bash_cv_termcap_lib" = "X"; then _bash_needmsg=yes else ! echo "$as_me:2944: checking which library has the termcap functions" >&5 echo $ECHO_N "checking which library has the termcap functions... $ECHO_C" >&6 _bash_needmsg= --- 4054,4062 ---- test $opt_with_installed_readline != "yes" && ac_cv_rl_prefix=$opt_with_installed_readline + if test "X$bash_cv_termcap_lib" = "X"; then _bash_needmsg=yes else ! echo "$as_me:$LINENO: checking which library has the termcap functions" >&5 echo $ECHO_N "checking which library has the termcap functions... $ECHO_C" >&6 _bash_needmsg= *************** *** 2949,2953 **** echo $ECHO_N "(cached) $ECHO_C" >&6 else ! echo "$as_me:2951: checking for tgetent in -ltermcap" >&5 echo $ECHO_N "checking for tgetent in -ltermcap... $ECHO_C" >&6 if test "${ac_cv_lib_termcap_tgetent+set}" = set; then --- 4065,4144 ---- echo $ECHO_N "(cached) $ECHO_C" >&6 else ! echo "$as_me:$LINENO: checking for tgetent" >&5 ! echo $ECHO_N "checking for tgetent... $ECHO_C" >&6 ! if test "${ac_cv_func_tgetent+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 tgetent (); 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 tgetent (); ! /* 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_tgetent) || defined (__stub___tgetent) ! choke me ! #else ! char (*f) () = tgetent; ! #endif ! #ifdef __cplusplus ! } ! #endif ! ! int ! main () ! { ! return f != tgetent; ! ; ! 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_tgetent=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_func_tgetent=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_func_tgetent" >&5 ! echo "${ECHO_T}$ac_cv_func_tgetent" >&6 ! if test $ac_cv_func_tgetent = yes; then ! bash_cv_termcap_lib=libc ! else ! echo "$as_me:$LINENO: checking for tgetent in -ltermcap" >&5 echo $ECHO_N "checking for tgetent in -ltermcap... $ECHO_C" >&6 if test "${ac_cv_lib_termcap_tgetent+set}" = set; then *************** *** 2957,2962 **** LIBS="-ltermcap $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 2959 "configure" ! #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ --- 4148,4157 ---- LIBS="-ltermcap $LIBS" 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. */ /* Override any gcc2 internal prototype to avoid an error. */ *************** *** 2976,2994 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:2978: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:2981: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:2984: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2987: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_termcap_tgetent=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_lib_termcap_tgetent=no fi --- 4171,4190 ---- _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_lib_termcap_tgetent=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_lib_termcap_tgetent=no fi *************** *** 2996,3005 **** LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:2998: result: $ac_cv_lib_termcap_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_termcap_tgetent" >&6 if test $ac_cv_lib_termcap_tgetent = yes; then bash_cv_termcap_lib=libtermcap else ! echo "$as_me:3003: checking for tgetent in -ltinfo" >&5 echo $ECHO_N "checking for tgetent in -ltinfo... $ECHO_C" >&6 if test "${ac_cv_lib_tinfo_tgetent+set}" = set; then --- 4192,4201 ---- LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_termcap_tgetent" >&6 if test $ac_cv_lib_termcap_tgetent = yes; then bash_cv_termcap_lib=libtermcap else ! echo "$as_me:$LINENO: checking for tgetent in -ltinfo" >&5 echo $ECHO_N "checking for tgetent in -ltinfo... $ECHO_C" >&6 if test "${ac_cv_lib_tinfo_tgetent+set}" = set; then *************** *** 3009,3014 **** LIBS="-ltinfo $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 3011 "configure" ! #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ --- 4205,4214 ---- LIBS="-ltinfo $LIBS" 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. */ /* Override any gcc2 internal prototype to avoid an error. */ *************** *** 3028,3046 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:3030: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:3033: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:3036: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3039: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_tinfo_tgetent=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_lib_tinfo_tgetent=no fi --- 4228,4247 ---- _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_lib_tinfo_tgetent=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_lib_tinfo_tgetent=no fi *************** *** 3048,3057 **** LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:3050: result: $ac_cv_lib_tinfo_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_tinfo_tgetent" >&6 if test $ac_cv_lib_tinfo_tgetent = yes; then bash_cv_termcap_lib=libtinfo else ! echo "$as_me:3055: checking for tgetent in -lcurses" >&5 echo $ECHO_N "checking for tgetent in -lcurses... $ECHO_C" >&6 if test "${ac_cv_lib_curses_tgetent+set}" = set; then --- 4249,4258 ---- LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:$LINENO: result: $ac_cv_lib_tinfo_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_tinfo_tgetent" >&6 if test $ac_cv_lib_tinfo_tgetent = yes; then bash_cv_termcap_lib=libtinfo else ! echo "$as_me:$LINENO: checking for tgetent in -lcurses" >&5 echo $ECHO_N "checking for tgetent in -lcurses... $ECHO_C" >&6 if test "${ac_cv_lib_curses_tgetent+set}" = set; then *************** *** 3061,3066 **** LIBS="-lcurses $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 3063 "configure" ! #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ --- 4262,4271 ---- LIBS="-lcurses $LIBS" 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. */ /* Override any gcc2 internal prototype to avoid an error. */ *************** *** 3080,3098 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:3082: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:3085: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:3088: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3091: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_curses_tgetent=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_lib_curses_tgetent=no fi --- 4285,4304 ---- _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_lib_curses_tgetent=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_lib_curses_tgetent=no fi *************** *** 3100,3109 **** LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:3102: result: $ac_cv_lib_curses_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_curses_tgetent" >&6 if test $ac_cv_lib_curses_tgetent = yes; then bash_cv_termcap_lib=libcurses else ! echo "$as_me:3107: checking for tgetent in -lncurses" >&5 echo $ECHO_N "checking for tgetent in -lncurses... $ECHO_C" >&6 if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then --- 4306,4315 ---- LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:$LINENO: result: $ac_cv_lib_curses_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_curses_tgetent" >&6 if test $ac_cv_lib_curses_tgetent = yes; then bash_cv_termcap_lib=libcurses else ! echo "$as_me:$LINENO: checking for tgetent in -lncurses" >&5 echo $ECHO_N "checking for tgetent in -lncurses... $ECHO_C" >&6 if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then *************** *** 3113,3118 **** LIBS="-lncurses $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 3115 "configure" ! #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ --- 4319,4328 ---- LIBS="-lncurses $LIBS" 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. */ /* Override any gcc2 internal prototype to avoid an error. */ *************** *** 3132,3150 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:3134: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:3137: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:3140: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3143: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_ncurses_tgetent=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_lib_ncurses_tgetent=no fi --- 4342,4361 ---- _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_lib_ncurses_tgetent=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_lib_ncurses_tgetent=no fi *************** *** 3152,3156 **** LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:3154: result: $ac_cv_lib_ncurses_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_ncurses_tgetent" >&6 if test $ac_cv_lib_ncurses_tgetent = yes; then --- 4363,4367 ---- LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_ncurses_tgetent" >&6 if test $ac_cv_lib_ncurses_tgetent = yes; then *************** *** 3168,3176 **** fi if test "X$_bash_needmsg" = "Xyes"; then ! echo "$as_me:3171: checking which library has the termcap functions" >&5 echo $ECHO_N "checking which library has the termcap functions... $ECHO_C" >&6 fi ! echo "$as_me:3174: result: using $bash_cv_termcap_lib" >&5 echo "${ECHO_T}using $bash_cv_termcap_lib" >&6 if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then --- 4379,4389 ---- fi + fi + if test "X$_bash_needmsg" = "Xyes"; then ! echo "$as_me:$LINENO: checking which library has the termcap functions" >&5 echo $ECHO_N "checking which library has the termcap functions... $ECHO_C" >&6 fi ! echo "$as_me:$LINENO: result: using $bash_cv_termcap_lib" >&5 echo "${ECHO_T}using $bash_cv_termcap_lib" >&6 if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then *************** *** 3187,3190 **** --- 4400,4406 ---- TERMCAP_LIB=-lncurses TERMCAP_DEP= + elif test $bash_cv_termcap_lib = libc; then + TERMCAP_LIB= + TERMCAP_DEP= else TERMCAP_LIB=-lcurses *************** *** 3192,3196 **** fi ! echo "$as_me:3194: checking version of installed readline library" >&5 echo $ECHO_N "checking version of installed readline library... $ECHO_C" >&6 --- 4408,4415 ---- fi ! ! ! ! echo "$as_me:$LINENO: checking version of installed readline library" >&5 echo $ECHO_N "checking version of installed readline library... $ECHO_C" >&6 *************** *** 3217,3226 **** LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}" ! if test "$cross_compiling" = yes; then ac_cv_rl_version='4.2' else cat >conftest.$ac_ext <<_ACEOF ! #line 3223 "configure" ! #include "confdefs.h" #include --- 4436,4452 ---- LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}" ! if test "${ac_cv_rl_version+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test "$cross_compiling" = yes; then ac_cv_rl_version='4.2' 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 *************** *** 3239,3251 **** _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:3241: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:3244: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:3246: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3249: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_rl_version=`cat conftest.rlv` --- 4465,4477 ---- _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_rl_version=`cat conftest.rlv` *************** *** 3253,3261 **** echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_rl_version='0.0' fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$_save_CFLAGS" --- 4479,4491 ---- 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_rl_version='0.0' fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + fi + CFLAGS="$_save_CFLAGS" *************** *** 3293,3297 **** if test $ac_cv_rl_version = '0.0' ; then ! { echo "$as_me:3295: WARNING: Could not test version of installed readline library." >&5 echo "$as_me: WARNING: Could not test version of installed readline library." >&2;} elif test $RL_MAJOR -gt 4 || { test $RL_MAJOR = 4 && test $RL_MINOR -gt 2 ; } ; then --- 4523,4527 ---- if test $ac_cv_rl_version = '0.0' ; then ! { echo "$as_me:$LINENO: WARNING: Could not test version of installed readline library." >&5 echo "$as_me: WARNING: Could not test version of installed readline library." >&2;} elif test $RL_MAJOR -gt 4 || { test $RL_MAJOR = 4 && test $RL_MINOR -gt 2 ; } ; then *************** *** 3300,3318 **** RL_LIBDIR=$ac_cv_rl_libdir RL_INCLUDEDIR=$ac_cv_rl_includedir ! echo "$as_me:3302: result: $ac_cv_rl_version" >&5 echo "${ECHO_T}$ac_cv_rl_version" >&6 else ! cat >>confdefs.h <>confdefs.h <>confdefs.h <&5 echo "${ECHO_T}$ac_cv_rl_version" >&6 else ! ! cat >>confdefs.h <<_ACEOF #define RL_READLINE_VERSION $RL_VERSION ! _ACEOF ! ! cat >>confdefs.h <<_ACEOF #define RL_VERSION_MAJOR $RL_MAJOR ! _ACEOF ! ! cat >>confdefs.h <<_ACEOF #define RL_VERSION_MINOR $RL_MINOR ! _ACEOF ! ! ! ! ! # set these for use by the caller *************** *** 3321,3335 **** RL_INCLUDEDIR=$ac_cv_rl_includedir ! echo "$as_me:3323: result: $ac_cv_rl_version" >&5 echo "${ECHO_T}$ac_cv_rl_version" >&6 fi case "$ac_cv_rl_version" in ! 4.[3-9]*|5*|6*|7*|8*|9*) ;; *) opt_with_installed_readline=no ! { echo "$as_me:3331: WARNING: installed readline library is too old to be linked with bash" >&5 echo "$as_me: WARNING: installed readline library is too old to be linked with bash" >&2;} ! { echo "$as_me:3333: WARNING: using private bash version" >&5 echo "$as_me: WARNING: using private bash version" >&2;} ;; --- 4559,4574 ---- RL_INCLUDEDIR=$ac_cv_rl_includedir ! echo "$as_me:$LINENO: result: $ac_cv_rl_version" >&5 echo "${ECHO_T}$ac_cv_rl_version" >&6 fi + case "$ac_cv_rl_version" in ! 5*|6*|7*|8*|9*) ;; *) opt_with_installed_readline=no ! { echo "$as_me:$LINENO: WARNING: installed readline library is too old to be linked with bash" >&5 echo "$as_me: WARNING: installed readline library is too old to be linked with bash" >&2;} ! { echo "$as_me:$LINENO: WARNING: using private bash version" >&5 echo "$as_me: WARNING: using private bash version" >&2;} ;; *************** *** 3338,3350 **** if test $opt_readline = yes; then ! cat >>confdefs.h <<\EOF #define READLINE 1 ! EOF READLINE_LIB=-lreadline if test "$opt_with_installed_readline" != "no" ; then ! case "$RL_INCLUDEDIR" in ! /usr/include) ;; ! *) RL_INCLUDE='-I${RL_INCLUDEDIR}' esac READLINE_DEP= --- 4577,4593 ---- if test $opt_readline = yes; then ! cat >>confdefs.h <<\_ACEOF #define READLINE 1 ! _ACEOF READLINE_LIB=-lreadline if test "$opt_with_installed_readline" != "no" ; then ! case "$opt_with_installed_readline" in ! yes) RL_INCLUDE= ;; ! *) case "$RL_INCLUDEDIR" in ! /usr/include) ;; ! *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;; ! esac ! ;; esac READLINE_DEP= *************** *** 3359,3371 **** if test $opt_history = yes || test $opt_bang_history = yes; then if test $opt_history = yes; then ! cat >>confdefs.h <<\EOF #define HISTORY 1 ! EOF fi if test $opt_bang_history = yes; then ! cat >>confdefs.h <<\EOF #define BANG_HISTORY 1 ! EOF fi --- 4602,4614 ---- if test $opt_history = yes || test $opt_bang_history = yes; then if test $opt_history = yes; then ! cat >>confdefs.h <<\_ACEOF #define HISTORY 1 ! _ACEOF fi if test $opt_bang_history = yes; then ! cat >>confdefs.h <<\_ACEOF #define BANG_HISTORY 1 ! _ACEOF fi *************** *** 3374,3380 **** HIST_LIBDIR=$RL_LIBDIR HISTORY_DEP= ! case "$RL_INCLUDEDIR" in ! /usr/include) ;; ! *) RL_INCLUDE='-I${RL_INCLUDEDIR}' esac else --- 4617,4627 ---- HIST_LIBDIR=$RL_LIBDIR HISTORY_DEP= ! case "$opt_with_installed_readline" in ! yes) RL_INCLUDE= ;; ! *) case "$RL_INCLUDEDIR" in ! /usr/include) ;; ! *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;; ! esac ! ;; esac else *************** *** 3387,3390 **** --- 4634,4646 ---- fi + + + + + + + + + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or *************** *** 3399,3439 **** # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. ! echo "$as_me:3401: checking for a BSD compatible install" >&5 ! echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! ac_save_IFS=$IFS; IFS=$ac_path_separator ! for ac_dir in $PATH; do ! IFS=$ac_save_IFS ! # Account for people who put trailing slashes in PATH elements. ! case $ac_dir/ in ! / | ./ | .// | /cC/* \ ! | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \ ! | /usr/ucb/* ) ;; ! *) ! # OSF1 and SCO ODT 3.0 have their own names for install. ! # Don't use installbsd from OSF since it installs stuff as root ! # by default. ! for ac_prog in ginstall scoinst install; do ! if $as_executable_p "$ac_dir/$ac_prog"; then ! if test $ac_prog = install && ! grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then ! # AIX install. It has an incompatible calling convention. ! : ! elif test $ac_prog = install && ! grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then ! # program-specific install script used by HP pwplus--don't use. ! : ! else ! ac_cv_path_install="$ac_dir/$ac_prog -c" ! break 2 ! fi ! fi done ! ;; ! esac ! done fi --- 4655,4700 ---- # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./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 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! # Account for people who put trailing slashes in PATH elements. ! case $as_dir/ in ! ./ | .// | /cC/* | \ ! /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ! /usr/ucb/* ) ;; ! *) ! # OSF1 and SCO ODT 3.0 have their own names for install. ! # Don't use installbsd from OSF since it installs stuff as root ! # by default. ! for ac_prog in ginstall scoinst install; do ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $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 ! ;; ! esac ! done ! fi *************** *** 3448,3452 **** fi fi ! echo "$as_me:3450: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 --- 4709,4713 ---- fi fi ! echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 *************** *** 3461,3465 **** # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 ! echo "$as_me:3463: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then --- 4722,4726 ---- # Extract the first word of "ar", so it can be a program name with args. set dummy ar; 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_AR+set}" = set; then *************** *** 3469,3481 **** ac_cv_prog_AR="$AR" # Let the user override the test. else ! ac_save_IFS=$IFS; IFS=$ac_path_separator ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! IFS=$ac_save_IFS ! test -z "$ac_dir" && ac_dir=. ! $as_executable_p "$ac_dir/$ac_word" || continue ! ac_cv_prog_AR="" ! echo "$as_me:3478: found $ac_dir/$ac_word" >&5 ! break done --- 4730,4745 ---- ac_cv_prog_AR="$AR" # Let the user override the test. else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_AR="" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done done *************** *** 3485,3492 **** AR=$ac_cv_prog_AR if test -n "$AR"; then ! echo "$as_me:3487: result: $AR" >&5 echo "${ECHO_T}$AR" >&6 else ! echo "$as_me:3490: result: no" >&5 echo "${ECHO_T}no" >&6 fi --- 4749,4756 ---- AR=$ac_cv_prog_AR if test -n "$AR"; then ! echo "$as_me:$LINENO: result: $AR" >&5 echo "${ECHO_T}$AR" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi *************** *** 3496,3500 **** # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 ! echo "$as_me:3498: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then --- 4760,4764 ---- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then *************** *** 3504,3516 **** ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else ! ac_save_IFS=$IFS; IFS=$ac_path_separator ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! IFS=$ac_save_IFS ! test -z "$ac_dir" && ac_dir=. ! $as_executable_p "$ac_dir/$ac_word" || continue ! ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" ! echo "$as_me:3513: found $ac_dir/$ac_word" >&5 ! break done --- 4768,4783 ---- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done done *************** *** 3519,3526 **** RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then ! echo "$as_me:3521: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else ! echo "$as_me:3524: result: no" >&5 echo "${ECHO_T}no" >&6 fi --- 4786,4793 ---- RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then ! echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi *************** *** 3531,3535 **** # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 ! echo "$as_me:3533: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then --- 4798,4802 ---- # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; 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_RANLIB+set}" = set; then *************** *** 3539,3551 **** ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else ! ac_save_IFS=$IFS; IFS=$ac_path_separator ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! IFS=$ac_save_IFS ! test -z "$ac_dir" && ac_dir=. ! $as_executable_p "$ac_dir/$ac_word" || continue ! ac_cv_prog_ac_ct_RANLIB="ranlib" ! echo "$as_me:3548: found $ac_dir/$ac_word" >&5 ! break done --- 4806,4821 ---- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_ac_ct_RANLIB="ranlib" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done done *************** *** 3555,3562 **** ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then ! echo "$as_me:3557: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else ! echo "$as_me:3560: result: no" >&5 echo "${ECHO_T}no" >&6 fi --- 4825,4832 ---- ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then ! echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi *************** *** 3571,3575 **** # 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:3573: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_YACC+set}" = set; then --- 4841,4845 ---- # 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_YACC+set}" = set; then *************** *** 3579,3591 **** ac_cv_prog_YACC="$YACC" # Let the user override the test. else ! ac_save_IFS=$IFS; IFS=$ac_path_separator ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! IFS=$ac_save_IFS ! test -z "$ac_dir" && ac_dir=. ! $as_executable_p "$ac_dir/$ac_word" || continue ! ac_cv_prog_YACC="$ac_prog" ! echo "$as_me:3588: found $ac_dir/$ac_word" >&5 ! break done --- 4849,4864 ---- ac_cv_prog_YACC="$YACC" # Let the user override the test. else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_YACC="$ac_prog" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done done *************** *** 3594,3601 **** YACC=$ac_cv_prog_YACC if test -n "$YACC"; then ! echo "$as_me:3596: result: $YACC" >&5 echo "${ECHO_T}$YACC" >&6 else ! echo "$as_me:3599: result: no" >&5 echo "${ECHO_T}no" >&6 fi --- 4867,4874 ---- YACC=$ac_cv_prog_YACC if test -n "$YACC"; then ! echo "$as_me:$LINENO: result: $YACC" >&5 echo "${ECHO_T}$YACC" >&6 else ! echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi *************** *** 3605,3618 **** test -n "$YACC" || YACC="yacc" ! echo "$as_me:3607: 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_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.make <<\EOF all: ! @echo 'ac_maketemp="${MAKE}"' ! EOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` --- 4878,4891 ---- test -n "$YACC" || YACC="yacc" ! 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_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.make <<\_ACEOF all: ! @echo 'ac_maketemp="$(MAKE)"' ! _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` *************** *** 3625,3637 **** fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then ! echo "$as_me:3627: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else ! echo "$as_me:3631: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi case "$host_os" in opennt*|interix*) MAKE_SHELL="$INTERIX_ROOT/bin/sh" ;; --- 4898,4911 ---- fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then ! echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else ! echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi + case "$host_os" in opennt*|interix*) MAKE_SHELL="$INTERIX_ROOT/bin/sh" ;; *************** *** 3639,3738 **** esac - cat >>confdefs.h <<\EOF - #define _GNU_SOURCE 1 - EOF ! echo "$as_me:3645: 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 ! #line 3653 "configure" ! #include "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]; ! ; ! 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:3702: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:3705: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3708: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:3711: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg - break - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -f conftest.$ac_objext - done - rm -f conftest.$ac_ext conftest.$ac_objext - CC=$ac_save_CC - fi - - case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:3728: result: none needed" >&5 - echo "${ECHO_T}none needed" >&6 ;; - *) - echo "$as_me:3731: result: $ac_cv_prog_cc_stdc" >&5 - echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; - esac ! echo "$as_me:3736: 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 --- 4913,4923 ---- esac ! cat >>confdefs.h <<\_ACEOF ! #define _GNU_SOURCE 1 _ACEOF ! 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 *************** *** 3740,3745 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 3742 "configure" ! #include "confdefs.h" int --- 4925,4934 ---- 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 *************** *** 3798,3831 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:3800: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:3803: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:3806: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3809: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:3819: 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 <<\EOF #define const ! EOF fi ! echo "$as_me:3829: checking for inline" >&5 echo $ECHO_N "checking for inline... $ECHO_C" >&6 if test "${ac_cv_c_inline+set}" = set; then --- 4987,5021 ---- _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_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 *************** *** 3835,3862 **** for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF ! #line 3837 "configure" ! #include "confdefs.h" #ifndef __cplusplus ! static $ac_kw int static_foo () {return 0; } ! $ac_kw int foo () {return 0; } #endif _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:3846: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:3849: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:3852: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3855: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_inline=$ac_kw; break else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext --- 5025,5058 ---- 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' ! { (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 else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! fi rm -f conftest.$ac_objext conftest.$ac_ext *************** *** 3864,3892 **** fi ! echo "$as_me:3866: 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 <<\EOF #define inline ! EOF ;; ! *) cat >>confdefs.h <&5 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! ac_cv_c_bigendian=unknown ! # See if sys/param.h defines the BYTE_ORDER macro. cat >conftest.$ac_ext <<_ACEOF ! #line 3889 "configure" ! #include "confdefs.h" #include #include --- 5060,5091 ---- 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 ! echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! # See if sys/param.h defines the BYTE_ORDER macro. 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 *************** *** 3904,3922 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:3906: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:3909: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:3912: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3915: \$? = $ac_status" >&5 (exit $ac_status); }; }; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF ! #line 3919 "configure" ! #include "confdefs.h" #include #include --- 5103,5125 ---- _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 # It does; now see whether it defined to BIG_ENDIAN or not. 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 *************** *** 3934,3952 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:3936: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:3939: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:3942: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3945: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi --- 5137,5156 ---- _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_c_bigendian=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_c_bigendian=no fi *************** *** 3954,3969 **** else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - if test "$cross_compiling" = yes; then - { { echo "$as_me:3961: error: cannot run test program while cross compiling" >&5 - echo "$as_me: error: cannot run test program while cross compiling" >&2;} - { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF ! #line 3966 "configure" ! #include "confdefs.h" int main () --- 5158,5225 ---- else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! # It does not; compile a test program. ! if test "$cross_compiling" = yes; then ! # try to guess the endianness by grepping values into an object file ! ac_cv_c_bigendian=unknown ! 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. */ ! short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; ! short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; ! void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } ! short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; ! short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; ! void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } ! int ! main () ! { ! _ascii (); _ebcdic (); ! ; ! 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 ! if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ! ac_cv_c_bigendian=yes ! fi ! if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then ! if test "$ac_cv_c_bigendian" = unknown; then ! ac_cv_c_bigendian=no ! else ! # finding both strings is unlikely to happen, but who knows? ! ac_cv_c_bigendian=unknown ! fi ! fi ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! fi rm -f conftest.$ac_objext conftest.$ac_ext 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 main () *************** *** 3980,3992 **** _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:3982: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:3985: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:3987: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3990: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=no --- 5236,5248 ---- _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_bigendian=no *************** *** 3994,4015 **** echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_c_bigendian=yes fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi ! echo "$as_me:4003: result: $ac_cv_c_bigendian" >&5 echo "${ECHO_T}$ac_cv_c_bigendian" >&6 ! if test $ac_cv_c_bigendian = yes; then ! cat >>confdefs.h <<\EOF #define WORDS_BIGENDIAN 1 ! EOF ! ! fi ! ! echo "$as_me:4013: checking for preprocessor stringizing operator" >&5 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6 if test "${ac_cv_c_stringize+set}" = set; then --- 5250,5283 ---- 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_bigendian=yes fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi + rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 echo "${ECHO_T}$ac_cv_c_bigendian" >&6 ! case $ac_cv_c_bigendian in ! yes) ! cat >>confdefs.h <<\_ACEOF #define WORDS_BIGENDIAN 1 ! _ACEOF ! ;; ! no) ! ;; ! *) ! { { echo "$as_me:$LINENO: error: unknown endianness ! presetting ac_cv_c_bigendian=no (or yes) will help" >&5 ! echo "$as_me: error: unknown endianness ! presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} ! { (exit 1); exit 1; }; } ;; ! esac ! ! echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6 if test "${ac_cv_c_stringize+set}" = set; then *************** *** 4017,4022 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 4019 "configure" ! #include "confdefs.h" #define x(y) #y --- 5285,5294 ---- 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 x(y) #y *************** *** 4024,4028 **** _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "#teststring" >/dev/null 2>&1; then ac_cv_c_stringize=no else --- 5296,5300 ---- _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! $EGREP "#teststring" >/dev/null 2>&1; then ac_cv_c_stringize=no else *************** *** 4032,4316 **** fi ! echo "$as_me:4034: result: $ac_cv_c_stringize" >&5 echo "${ECHO_T}$ac_cv_c_stringize" >&6 if test $ac_cv_c_stringize = yes; then ! cat >>confdefs.h <<\EOF #define HAVE_STRINGIZE 1 ! EOF fi ! echo "$as_me:4044: checking for long double" >&5 ! echo $ECHO_N "checking for long double... $ECHO_C" >&6 if test "${ac_cv_c_long_double+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$GCC" = yes; then - ac_cv_c_long_double=yes - else - if test "$cross_compiling" = yes; then - { { echo "$as_me:4053: error: cannot run test program while cross compiling" >&5 - echo "$as_me: error: cannot run test program while cross compiling" >&2;} - { (exit 1); exit 1; }; } - else cat >conftest.$ac_ext <<_ACEOF ! #line 4058 "configure" ! #include "confdefs.h" int main () { ! /* 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. */ ! exit (sizeof (long double) < sizeof (double)); } _ACEOF ! rm -f conftest$ac_exeext ! if { (eval echo "$as_me:4071: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:4074: \$? = $ac_status" >&5 ! (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:4076: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:4079: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_long_double=yes else ! echo "$as_me: program exited with status $ac_status" >&5 ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_c_long_double=no fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ! fi ! fi fi ! echo "$as_me:4092: result: $ac_cv_c_long_double" >&5 echo "${ECHO_T}$ac_cv_c_long_double" >&6 if test $ac_cv_c_long_double = yes; then ! cat >>confdefs.h <<\EOF #define HAVE_LONG_DOUBLE 1 ! EOF fi ! echo "$as_me:4102: 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:4105: result: yes" >&5 echo "${ECHO_T}yes" >&6 ! cat >>confdefs.h <<\EOF #define PROTOTYPES 1 ! EOF else ! echo "$as_me:4113: result: no" >&5 echo "${ECHO_T}no" >&6 fi ! echo "$as_me:4117: 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 echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF ! #line 4123 "configure" ! #include "confdefs.h" ! #include ! #include ! #include ! #include _ACEOF ! if { (eval echo "$as_me:4131: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? ! egrep -v '^ *\+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:4137: \$? = $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_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_header_stdc=no fi ! rm -f conftest.err 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 4159 "configure" ! #include "confdefs.h" ! #include ! _ACEOF ! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "memchr" >/dev/null 2>&1; then ! : else ! ac_cv_header_stdc=no fi - rm -f conftest* fi ! if test $ac_cv_header_stdc = yes; then ! # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. ! cat >conftest.$ac_ext <<_ACEOF ! #line 4177 "configure" ! #include "confdefs.h" ! #include ! _ACEOF ! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "free" >/dev/null 2>&1; then ! : else ! ac_cv_header_stdc=no fi - rm -f conftest* fi ! if test $ac_cv_header_stdc = yes; then ! # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. ! if test "$cross_compiling" = yes; then ! : else ! cat >conftest.$ac_ext <<_ACEOF ! #line 4198 "configure" ! #include "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 ! ! #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:4224: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:4227: \$? = $ac_status" >&5 ! (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:4229: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:4232: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! : else ! echo "$as_me: program exited with status $ac_status" >&5 ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_header_stdc=no fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi - echo "$as_me:4245: 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 <<\EOF - #define STDC_HEADERS 1 - EOF ! fi ! # On IRIX 5.3, sys/types and inttypes.h are conflicting. ! for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ ! inttypes.h stdint.h unistd.h ! do ! as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ! echo "$as_me:4261: 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 cat >conftest.$ac_ext <<_ACEOF ! #line 4267 "configure" ! #include "confdefs.h" $ac_includes_default ! #include <$ac_header> _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:4273: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:4276: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:4279: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:4282: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! eval "$as_ac_Header=no" fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:4292: result: `eval echo '${'$as_ac_Header'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ! if test `eval echo '${'$as_ac_Header'}'` = yes; then ! cat >>confdefs.h <&5 ! echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 ! if test "${ac_cv_c_char_unsigned+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF ! #line 4308 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !(((char) -1) < 0)] ; return 0; --- 5304,5833 ---- fi ! echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5 echo "${ECHO_T}$ac_cv_c_stringize" >&6 if test $ac_cv_c_stringize = yes; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_STRINGIZE 1 ! _ACEOF fi ! echo "$as_me:$LINENO: checking for working long double with more range or precision than double" >&5 ! echo $ECHO_N "checking for working long double with more range or precision than double... $ECHO_C" >&6 if test "${ac_cv_c_long_double+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 ! long double foo = 0.0; int main () { ! static int test_array [1 - 2 * !(/* Using '|' rather than '||' catches a GCC 2.95.2 x86 bug. */ ! (DBL_MAX < LDBL_MAX) | (LDBL_EPSILON < DBL_EPSILON) ! | (DBL_MAX_EXP < LDBL_MAX_EXP) | (DBL_MANT_DIG < LDBL_MANT_DIG))]; ! 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>&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_c_long_double=yes else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_c_long_double=no fi ! rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_c_long_double" >&5 echo "${ECHO_T}$ac_cv_c_long_double" >&6 if test $ac_cv_c_long_double = yes; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_LONG_DOUBLE 1 ! _ACEOF 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 ! cat >>confdefs.h <<\_ACEOF #define PROTOTYPES 1 ! _ACEOF ! ! ! cat >>confdefs.h <<\_ACEOF ! #define __PROTOTYPES 1 ! _ACEOF else ! echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ! ! echo "$as_me:$LINENO: checking whether char is unsigned" >&5 ! echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 ! if test "${ac_cv_c_char_unsigned+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 () ! { ! static int test_array [1 - 2 * !(((char) -1) < 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>&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_c_char_unsigned=no else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_c_char_unsigned=yes fi ! rm -f 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 ! if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then ! cat >>confdefs.h <<\_ACEOF ! #define __CHAR_UNSIGNED__ 1 ! _ACEOF ! fi ! ! ! 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" + else + ac_executable_p="test -f" + fi + rm -f conf$$.file + + # Extract the first word of "msgfmt", so it can be a program name with args. + set dummy msgfmt; ac_word=$2 + 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 + fi + MSGFMT="$ac_cv_path_MSGFMT" + if test "$MSGFMT" != ":"; then + echo "$as_me:$LINENO: result: $MSGFMT" >&5 + echo "${ECHO_T}$MSGFMT" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 fi ! # 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 ! done ! test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ! ;; ! esac ! 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 + + + # Prepare PATH_SEPARATOR. + # The user is always right. + if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi ! # Find out how to test for executable files. Don't use a zero-byte file, ! # as systems may use methods other than mode bits to determine executability. ! cat >conf$$.file <<_ASEOF ! #! /bin/sh ! exit 0 ! _ASEOF ! chmod +x conf$$.file ! if test -x conf$$.file >/dev/null 2>&1; then ! ac_executable_p="test -x" ! else ! ac_executable_p="test -f" ! fi ! rm -f conf$$.file ! ! # Extract the first word of "xgettext", so it can be a program name with args. ! set dummy xgettext; ac_word=$2 ! 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 ! 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 ! ! 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 + + # 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 ! 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" ! ! ! 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" ! /* 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; ! } _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_off_t=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 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 ! : ! else ! ! cat >>confdefs.h <<_ACEOF ! #define off_t long ! _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; *************** *** 4318,4427 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:4320: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:4323: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:4326: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:4329: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_c_char_unsigned=no else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_c_char_unsigned=yes fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:4339: result: $ac_cv_c_char_unsigned" >&5 ! echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 ! if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then ! cat >>confdefs.h <<\EOF ! #define __CHAR_UNSIGNED__ 1 ! EOF fi ! ac_header_dirent=no ! for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do ! as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` ! echo "$as_me:4351: checking for $ac_hdr that defines DIR" >&5 ! echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 ! if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF ! #line 4357 "configure" ! #include "confdefs.h" ! #include ! #include <$ac_hdr> ! int main () { ! if ((DIR *) 0) ! return 0; ; return 0; } _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:4372: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:4375: \$? = $ac_status" >&5 (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:4378: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:4381: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! eval "$as_ac_Header=no" fi ! rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:4391: result: `eval echo '${'$as_ac_Header'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ! if test `eval echo '${'$as_ac_Header'}'` = yes; then ! cat >>confdefs.h <&5 ! echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6 ! if test "${ac_cv_lib_dir_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! ac_check_lib_save_LIBS=$LIBS ! LIBS="-ldir $LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line 4412 "configure" ! #include "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 opendir (); int main () { ! opendir (); ; return 0; --- 5835,5961 ---- _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 ! ! 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 ! # 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 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; *************** *** 4429,4481 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:4431: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:4434: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:4437: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:4440: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_lib_dir_opendir=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_lib_dir_opendir=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:4451: result: $ac_cv_lib_dir_opendir" >&5 - echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6 - if test $ac_cv_lib_dir_opendir = yes; then - LIBS="$LIBS -ldir" fi else ! echo "$as_me:4458: checking for opendir in -lx" >&5 ! echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6 ! if test "${ac_cv_lib_x_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! ac_check_lib_save_LIBS=$LIBS ! LIBS="-lx $LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line 4466 "configure" ! #include "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 opendir (); int main () { ! opendir (); ; return 0; --- 5963,6086 ---- _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 else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! 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 ! ! ! 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 ! #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 + 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 + #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; *************** *** 4483,4635 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:4485: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:4488: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:4491: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:4494: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_lib_x_opendir=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_lib_x_opendir=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:4505: result: $ac_cv_lib_x_opendir" >&5 ! echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6 ! if test $ac_cv_lib_x_opendir = yes; then ! LIBS="$LIBS -lx" fi fi ! echo "$as_me:4513: checking whether time.h and sys/time.h may both be included" >&5 ! echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 ! if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF ! #line 4519 "configure" ! #include "confdefs.h" ! #include ! #include ! #include int main () { ! if ((struct tm *) 0) ! return 0; ! ; ! return 0; } _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:4535: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:4538: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:4541: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:4544: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_header_time=yes else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_header_time=no fi ! rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:4554: result: $ac_cv_header_time" >&5 ! echo "${ECHO_T}$ac_cv_header_time" >&6 ! if test $ac_cv_header_time = yes; then - cat >>confdefs.h <<\EOF - #define TIME_WITH_SYS_TIME 1 - EOF fi ! for ac_header in inttypes.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ! echo "$as_me:4567: 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 ! cat >conftest.$ac_ext <<_ACEOF ! #line 4573 "configure" ! #include "confdefs.h" #include <$ac_header> _ACEOF ! if { (eval echo "$as_me:4577: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? ! egrep -v '^ *\+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:4583: \$? = $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 ! eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! eval "$as_ac_Header=no" ! fi ! rm -f conftest.err conftest.$ac_ext ! fi ! echo "$as_me:4602: result: `eval echo '${'$as_ac_Header'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ! if test `eval echo '${'$as_ac_Header'}'` = yes; then ! cat >>confdefs.h <&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 ! cat >conftest.$ac_ext <<_ACEOF ! #line 4623 "configure" ! #include "confdefs.h" #include <$ac_header> _ACEOF ! if { (eval echo "$as_me:4627: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? ! egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 ! echo "$as_me:4633: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then --- 6088,6262 ---- _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 ! ! 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 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 ! #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; ! } 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.* *.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 ! #line $LINENO "configure" ! /* 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>&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.$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 ! #line $LINENO "configure" ! /* 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 *************** *** 4642,4776 **** fi if test -z "$ac_cpp_err"; then ! eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! eval "$as_ac_Header=no" ! fi ! rm -f conftest.err conftest.$ac_ext ! fi ! echo "$as_me:4652: result: `eval echo '${'$as_ac_Header'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ! if test `eval echo '${'$as_ac_Header'}'` = yes; then ! cat >>confdefs.h <&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 ! cat >conftest.$ac_ext <<_ACEOF ! #line 4673 "configure" ! #include "confdefs.h" ! #include <$ac_header> ! _ACEOF ! if { (eval echo "$as_me:4677: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! egrep -v '^ *\+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:4683: \$? = $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 ! eval "$as_ac_Header=yes" ! else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! eval "$as_ac_Header=no" ! fi ! rm -f conftest.err conftest.$ac_ext fi ! echo "$as_me:4702: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then ! cat >>confdefs.h <&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 cat >conftest.$ac_ext <<_ACEOF ! #line 4721 "configure" ! #include "confdefs.h" ! #include <$ac_header> _ACEOF ! if { (eval echo "$as_me:4725: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! egrep -v '^ *\+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:4731: \$? = $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 ! eval "$as_ac_Header=yes" ! else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! eval "$as_ac_Header=no" ! fi ! rm -f conftest.err conftest.$ac_ext ! fi ! echo "$as_me:4750: result: `eval echo '${'$as_ac_Header'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ! if test `eval echo '${'$as_ac_Header'}'` = yes; then ! cat >>confdefs.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 4768 "configure" - #include "confdefs.h" - #include int main () { ! char *p = (char *) alloca (2 * sizeof (int)); ; return 0; --- 6269,6385 ---- 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 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" 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 ! #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; *************** *** 4778,5062 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:4780: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:4783: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:4786: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:4789: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_working_alloca_h=yes else echo "$as_me: failed program was:" >&5 ! cat 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:4799: 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 <<\EOF ! #define HAVE_ALLOCA_H 1 ! EOF fi ! echo "$as_me:4809: 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 4815 "configure" ! #include "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:4847: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:4850: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:4853: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:4856: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_func_alloca_works=yes else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_func_alloca_works=no fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:4866: 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 <<\EOF ! #define HAVE_ALLOCA 1 ! EOF ! 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 <<\EOF - #define C_ALLOCA 1 - EOF ! echo "$as_me:4887: 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 ! #line 4893 "configure" ! #include "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:4911: 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:4916: 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 - #line 4922 "configure" - #include "confdefs.h" - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ - #include - /* 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 (); - char (*f) (); - - int - main () - { - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_$ac_func) || defined (__stub___$ac_func) - choke me - #else - f = $ac_func; - #endif - - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:4953: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:4956: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4959: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:4962: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" - else - echo "$as_me: failed program was:" >&5 - cat 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:4972: 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 <&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 ! #line 4995 "configure" ! #include "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:5018: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:5021: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:5023: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:5026: \$? = $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 ! cat conftest.$ac_ext >&5 ! ac_cv_c_stack_direction=-1 fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:5038: result: $ac_cv_c_stack_direction" >&5 ! echo "${ECHO_T}$ac_cv_c_stack_direction" >&6 ! cat >>confdefs.h <&5 ! echo $ECHO_N "checking whether getpgrp takes no argument... $ECHO_C" >&6 ! if test "${ac_cv_func_getpgrp_void+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! # Use it with a single arg. ! cat >conftest.$ac_ext <<_ACEOF ! #line 5054 "configure" ! #include "confdefs.h" ! $ac_includes_default int main () { ! getpgrp (0); ; return 0; --- 6387,6754 ---- _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 ! ! 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 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 ! #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); } _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.* *.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 ! #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 _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 ! #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 () { ! 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.* *.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 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 ! 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 int main () { ! uintmax_t i = (uintmax_t) -1; ; return 0; *************** *** 5064,5094 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:5066: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:5069: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:5072: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:5075: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_func_getpgrp_1=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_func_getpgrp_1=no fi rm -f conftest.$ac_objext conftest.$ac_ext ! # Use it with no arg. ! cat >conftest.$ac_ext <<_ACEOF ! #line 5086 "configure" ! #include "confdefs.h" ! $ac_includes_default int main () { ! getpgrp (); ; return 0; --- 6756,6808 ---- _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 ! jm_ac_cv_header_inttypes_h=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! jm_ac_cv_header_inttypes_h=no fi rm -f 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 ! ! 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 ! 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 int main () { ! uintmax_t i = (uintmax_t) -1; ; return 0; *************** *** 5096,5306 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:5098: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:5101: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:5104: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:5107: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_func_getpgrp_0=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_func_getpgrp_0=no fi rm -f conftest.$ac_objext conftest.$ac_ext ! # If both static checks agree, we are done. ! case $ac_func_getpgrp_0:$ac_func_getpgrp_1 in ! yes:no) ac_cv_func_getpgrp_void=yes;; ! no:yes) ac_cv_func_getpgrp_void=false;; ! *) if test "$cross_compiling" = yes; then ! { { echo "$as_me:5121: error: cannot check getpgrp if cross compiling" >&5 ! echo "$as_me: error: cannot check getpgrp if cross compiling" >&2;} ! { (exit 1); exit 1; }; } ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line 5126 "configure" ! #include "confdefs.h" ! $ac_includes_default ! /* ! * If this system has a BSD-style getpgrp(), ! * which takes a pid argument, exit unsuccessfully. ! * ! * Snarfed from Chet Ramey's bash pgrp.c test program ! */ - int pid; - int pg1, pg2, pg3, pg4; - int ng, np, s, child; int main () { ! pid = getpid (); ! pg1 = getpgrp (0); ! pg2 = getpgrp (); ! pg3 = getpgrp (pid); ! pg4 = getpgrp (1); ! ! /* If all of these values are the same, it's pretty sure that we're ! on a system that ignores getpgrp's first argument. */ ! if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3) ! exit (0); ! ! child = fork (); ! if (child < 0) ! exit(1); ! else if (child == 0) ! { ! np = getpid (); ! /* If this is Sys V, this will not work; pgrp will be set to np ! because setpgrp just changes a pgrp to be the same as the ! pid. */ ! setpgrp (np, pg1); ! ng = getpgrp (0); /* Same result for Sys V and BSD */ ! if (ng == pg1) ! exit (1); ! else ! exit (0); ! } ! else ! { ! wait (&s); ! exit (s>>8); ! } } - _ACEOF ! rm -f conftest$ac_exeext ! if { (eval echo "$as_me:5180: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:5183: \$? = $ac_status" >&5 ! (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:5185: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:5188: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_func_getpgrp_void=yes else ! echo "$as_me: program exited with status $ac_status" >&5 ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_func_getpgrp_void=no ! fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ! fi;; ! esac # $ac_func_getpgrp_0:$ac_func_getpgrp_1 fi ! echo "$as_me:5202: result: $ac_cv_func_getpgrp_void" >&5 ! echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6 ! if test $ac_cv_func_getpgrp_void = yes; then ! cat >>confdefs.h <<\EOF ! #define GETPGRP_VOID 1 ! EOF ! fi ! echo "$as_me:5212: checking whether setvbuf arguments are reversed" >&5 ! echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6 ! if test "${ac_cv_func_setvbuf_reversed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! if test "$cross_compiling" = yes; then ! { { echo "$as_me:5218: error: cannot run test program while cross compiling" >&5 ! echo "$as_me: error: cannot run test program while cross compiling" >&2;} ! { (exit 1); exit 1; }; } ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line 5223 "configure" ! #include "confdefs.h" ! #include ! /* If setvbuf has the reversed format, exit 0. */ int main () { ! /* This call has the arguments reversed. ! A reversed system may check and see that the address of main ! is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */ ! if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0) ! exit(1); ! putc('\r', stdout); ! exit(0); /* Non-reversed systems segv here. */ } _ACEOF ! rm -f conftest$ac_exeext ! if { (eval echo "$as_me:5240: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:5243: \$? = $ac_status" >&5 ! (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:5245: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:5248: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_func_setvbuf_reversed=yes else ! echo "$as_me: program exited with status $ac_status" >&5 ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_func_setvbuf_reversed=no ! fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi ! rm -f core core.* *.core fi ! echo "$as_me:5261: result: $ac_cv_func_setvbuf_reversed" >&5 ! echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6 ! if test $ac_cv_func_setvbuf_reversed = yes; then ! cat >>confdefs.h <<\EOF ! #define SETVBUF_REVERSED 1 ! EOF ! fi ! for ac_func in vprintf ! do ! as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` ! echo "$as_me:5274: 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 ! #line 5280 "configure" ! #include "confdefs.h" ! /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char $ac_func (); below. */ ! #include ! /* 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 (); - char (*f) (); int main () { - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_$ac_func) || defined (__stub___$ac_func) - choke me - #else - f = $ac_func; - #endif ; --- 6810,6998 ---- _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 ! jm_ac_cv_header_stdint_h=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! jm_ac_cv_header_stdint_h=no fi rm -f conftest.$ac_objext conftest.$ac_ext ! fi ! 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 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 + #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; 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>&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.$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 ! #line $LINENO "configure" ! /* 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>&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.$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 ! #line $LINENO "configure" ! /* 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 () { ; *************** *** 5308,5585 **** } _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:5311: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:5314: \$? = $ac_status" >&5 (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:5317: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:5320: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 ! cat 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:5330: 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 <&5 ! echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6 ! if test "${ac_cv_func__doprnt+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line 5343 "configure" ! #include "confdefs.h" ! /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char _doprnt (); below. */ ! #include ! /* 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 _doprnt (); ! char (*f) (); ! int ! main () ! { ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub__doprnt) || defined (__stub____doprnt) ! choke me ! #else ! f = _doprnt; ! #endif - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:5374: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:5377: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5380: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:5383: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func__doprnt=yes - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_func__doprnt=no - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:5393: result: $ac_cv_func__doprnt" >&5 - echo "${ECHO_T}$ac_cv_func__doprnt" >&6 - if test $ac_cv_func__doprnt = yes; then ! cat >>confdefs.h <<\EOF ! #define HAVE_DOPRNT 1 ! EOF - fi fi ! done ! ! echo "$as_me:5406: checking for working strcoll" >&5 ! echo $ECHO_N "checking for working strcoll... $ECHO_C" >&6 ! if test "${ac_cv_func_strcoll_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! if test "$cross_compiling" = yes; then ! ac_cv_func_strcoll_works=no else ! cat >conftest.$ac_ext <<_ACEOF ! #line 5415 "configure" ! #include "confdefs.h" ! $ac_includes_default ! int ! main () ! { ! exit (strcoll ("abc", "def") >= 0 || ! strcoll ("ABC", "DEF") >= 0 || ! strcoll ("123", "456") >= 0) ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest$ac_exeext ! if { (eval echo "$as_me:5429: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:5432: \$? = $ac_status" >&5 ! (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:5434: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:5437: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_func_strcoll_works=yes else ! echo "$as_me: program exited with status $ac_status" >&5 ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_func_strcoll_works=no fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:5449: result: $ac_cv_func_strcoll_works" >&5 ! echo "${ECHO_T}$ac_cv_func_strcoll_works" >&6 ! if test $ac_cv_func_strcoll_works = yes; then - cat >>confdefs.h <<\EOF - #define HAVE_STRCOLL 1 - EOF - fi ! if test "$ac_cv_func_alloca_works" = "no" && test "$opt_bash_malloc" = "no"; then ! MALLOC_TARGET=alloca ! MALLOC_SRC=alloca.c - MALLOC_LIB='-lmalloc' - MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a' - MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)' - MALLOC_DEP='$(MALLOC_LIBRARY)' fi - if test "$ac_cv_func_vprintf" = no; then - echo "$as_me:5470: checking for declaration of vprintf in stdio.h" >&5 - echo $ECHO_N "checking for declaration of vprintf in stdio.h... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF - #line 5473 "configure" - #include "confdefs.h" - #include - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "[int[ ]*vprintf[^a-zA-Z0-9]]" >/dev/null 2>&1; then - ac_cv_func_vprintf=yes - fi - rm -f conftest* - echo "$as_me:5484: result: $ac_cv_func_vprintf" >&5 - echo "${ECHO_T}$ac_cv_func_vprintf" >&6 - if test $ac_cv_func_vprintf = yes; then - cat >>confdefs.h <<\EOF - #define HAVE_VPRINTF 1 - EOF fi - fi ! if test "$ac_cv_func_vprintf" = no && test "$ac_cv_func__doprnt" = "yes"; then ! LIBOBJS="$LIBOBJS vprint.$ac_objext" ! fi ! echo "$as_me:5498: checking return type of signal handlers" >&5 ! echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 ! if test "${ac_cv_type_signal+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line 5504 "configure" ! #include "confdefs.h" ! #include ! #include ! #ifdef signal ! # undef signal ! #endif ! #ifdef __cplusplus ! extern "C" void (*signal (int, void (*)(int)))(int); ! #else ! void (*signal ()) (); ! #endif ! ! int ! main () ! { ! int i; ! ; ! return 0; ! } _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:5526: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:5529: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:5532: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:5535: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_type_signal=void else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_type_signal=int fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:5545: result: $ac_cv_type_signal" >&5 ! echo "${ECHO_T}$ac_cv_type_signal" >&6 ! cat >>confdefs.h <&5 ! echo $ECHO_N "checking for __setostype... $ECHO_C" >&6 ! if test "${ac_cv_func___setostype+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line 5558 "configure" ! #include "confdefs.h" ! /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char __setostype (); below. */ ! #include ! /* 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 __setostype (); ! char (*f) (); ! ! int ! main () { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ ! #if defined (__stub___setostype) || defined (__stub_____setostype) choke me #else ! f = __setostype; #endif ; return 0; --- 7000,7806 ---- } _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 ! 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.$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 ! 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. ! 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" 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. ! if $LD -v 2>&1 &5; then ! acl_cv_prog_gnu_ld=yes ! else ! acl_cv_prog_gnu_ld=no fi 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: 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" ! eval x=\"$x\" ! exec_prefix="$acl_save_exec_prefix" ! prefix="$acl_save_prefix" ! ! if test "X$x" = "X-L$additional_libdir"; then ! haveit=yes ! break ! fi ! done ! if test -z "$haveit"; then ! if test -d "$additional_libdir"; then ! LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" ! fi ! fi ! fi ! fi ! ;; ! -R*) ! dir=`echo "X$dep" | sed -e 's/^X-R//'` ! if test "$enable_rpath" != no; then ! haveit= ! for x in $rpathdirs; do ! if test "X$x" = "X$dir"; then ! haveit=yes ! break ! fi ! done ! if test -z "$haveit"; then ! rpathdirs="$rpathdirs $dir" ! fi ! haveit= ! for x in $ltrpathdirs; do ! if test "X$x" = "X$dir"; then ! haveit=yes ! break ! fi ! done ! if test -z "$haveit"; then ! ltrpathdirs="$ltrpathdirs $dir" ! fi ! fi ! ;; ! -l*) ! names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ! ;; ! *.la) ! names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ! ;; ! *) ! LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" ! LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ! ;; ! esac ! done ! fi ! else ! LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" ! LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" ! fi ! fi ! fi ! done ! done ! if test "X$rpathdirs" != "X"; then ! if test -n "$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 ! ! ! ! ! ! ! ! ! ! ! ! ! ! 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 ! #line $LINENO "configure" ! /* 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>&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.$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 + #line $LINENO "configure" + /* 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 + 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 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" ! 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 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 $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; *************** *** 5587,5650 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:5589: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:5592: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:5595: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:5598: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_func___setostype=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_func___setostype=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:5608: result: $ac_cv_func___setostype" >&5 ! echo "${ECHO_T}$ac_cv_func___setostype" >&6 ! if test $ac_cv_func___setostype = yes; then ! cat >>confdefs.h <<\EOF ! #define HAVE_SETOSTYPE 1 ! EOF fi ! echo "$as_me:5617: checking for wait3" >&5 ! echo $ECHO_N "checking for wait3... $ECHO_C" >&6 ! if test "${ac_cv_func_wait3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF - #line 5623 "configure" - #include "confdefs.h" - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char wait3 (); below. */ - #include - /* 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 wait3 (); - char (*f) (); int main () { ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_wait3) || defined (__stub___wait3) ! choke me ! #else ! f = wait3; ! #endif ! ; return 0; --- 7808,7895 ---- _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 ! ! 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 fi + done ! ! ! ! ! ! ! am_save_CPPFLAGS="$CPPFLAGS" ! ! for element in $INCICONV; do ! haveit= ! for x in $CPPFLAGS; do ! ! acl_save_prefix="$prefix" ! prefix="$acl_final_prefix" ! acl_save_exec_prefix="$exec_prefix" ! exec_prefix="$acl_final_exec_prefix" ! eval x=\"$x\" ! exec_prefix="$acl_save_exec_prefix" ! prefix="$acl_save_prefix" ! ! if test "X$x" = "X$element"; then ! haveit=yes ! break ! fi ! done ! if test -z "$haveit"; then ! CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" ! fi ! done ! ! ! echo "$as_me:$LINENO: checking for iconv" >&5 ! echo $ECHO_N "checking for iconv... $ECHO_C" >&6 ! if test "${am_cv_func_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else + 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 + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include + #include int main () { ! iconv_t cd = iconv_open("",""); ! iconv(cd,NULL,NULL,NULL,NULL); ! iconv_close(cd); ; return 0; *************** *** 5652,5715 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:5654: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:5657: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:5660: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:5663: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_func_wait3=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_func_wait3=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:5673: result: $ac_cv_func_wait3" >&5 ! echo "${ECHO_T}$ac_cv_func_wait3" >&6 ! if test $ac_cv_func_wait3 = yes; then ! cat >>confdefs.h <<\EOF ! #define HAVE_WAIT3 1 ! EOF fi ! ! echo "$as_me:5682: checking for isinf" >&5 ! echo $ECHO_N "checking for isinf... $ECHO_C" >&6 ! if test "${ac_cv_func_isinf+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line 5688 "configure" ! #include "confdefs.h" ! /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char isinf (); below. */ ! #include ! /* 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 isinf (); ! char (*f) (); ! int main () { ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_isinf) || defined (__stub___isinf) ! choke me ! #else ! f = isinf; ! #endif ! ; return 0; --- 7897,7936 ---- _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 ! am_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 fi ! rm -f 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 ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #include ! #include int main () { ! iconv_t cd = iconv_open("",""); ! iconv(cd,NULL,NULL,NULL,NULL); ! iconv_close(cd); ; return 0; *************** *** 5717,5779 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:5719: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:5722: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:5725: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:5728: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_func_isinf=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_func_isinf=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:5738: result: $ac_cv_func_isinf" >&5 ! echo "${ECHO_T}$ac_cv_func_isinf" >&6 ! if test $ac_cv_func_isinf = yes; then ! cat >>confdefs.h <<\EOF ! #define HAVE_ISINF_IN_LIBC 1 ! EOF fi ! echo "$as_me:5747: checking for mkfifo" >&5 ! echo $ECHO_N "checking for mkfifo... $ECHO_C" >&6 ! if test "${ac_cv_func_mkfifo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line 5753 "configure" ! #include "confdefs.h" ! /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char mkfifo (); below. */ ! #include ! /* 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 mkfifo (); - char (*f) (); int main () { - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_mkfifo) || defined (__stub___mkfifo) - choke me - #else - f = mkfifo; - #endif ; --- 7938,8016 ---- _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 ! am_cv_lib_iconv=yes ! am_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! LIBS="$am_save_LIBS" ! fi fi + echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 + echo "${ECHO_T}$am_cv_func_iconv" >&6 + if test "$am_cv_func_iconv" = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_ICONV 1 ! _ACEOF ! ! fi ! if test "$am_cv_lib_iconv" = yes; then ! echo "$as_me:$LINENO: checking how to link with libiconv" >&5 ! echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6 ! echo "$as_me:$LINENO: result: $LIBICONV" >&5 ! echo "${ECHO_T}$LIBICONV" >&6 ! else ! CPPFLAGS="$am_save_CPPFLAGS" ! LIBICONV= ! LTLIBICONV= ! fi ! ! ! ! if test "$am_cv_func_iconv" = yes; then ! echo "$as_me:$LINENO: checking for iconv declaration" >&5 ! echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 ! if test "${am_cv_proto_iconv+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 ! extern #ifdef __cplusplus ! "C" ! #endif ! #if defined(__STDC__) || defined(__cplusplus) ! size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); ! #else ! size_t iconv(); #endif int main () { ; *************** *** 5781,5856 **** } _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:5784: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:5787: \$? = $ac_status" >&5 (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:5790: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:5793: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_func_mkfifo=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_func_mkfifo=no fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi - echo "$as_me:5803: result: $ac_cv_func_mkfifo" >&5 - echo "${ECHO_T}$ac_cv_func_mkfifo" >&6 - if test $ac_cv_func_mkfifo = yes; then - cat >>confdefs.h <<\EOF - #define HAVE_MKFIFO 1 - EOF ! else ! cat >>confdefs.h <<\EOF ! #define MKFIFO_MISSING 1 ! EOF ! fi ! for ac_func in dup2 select getdtablesize getgroups gethostname \ ! setdtablesize getpagesize killpg lstat getpeername sbrk \ ! getrlimit getrusage gettimeofday waitpid tcgetpgrp \ ! readlink ! do ! as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` ! echo "$as_me:5823: 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 ! #line 5829 "configure" ! #include "confdefs.h" ! /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char $ac_func (); below. */ ! #include ! /* 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 (); ! char (*f) (); ! int main () { ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_$ac_func) || defined (__stub___$ac_func) ! choke me ! #else ! f = $ac_func; ! #endif ! ; return 0; --- 8018,8074 ---- } _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_proto_iconv_arg1="" else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! am_cv_proto_iconv_arg1="const" fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi ! am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` ! echo "$as_me:$LINENO: result: ${ac_t:- ! }$am_cv_proto_iconv" >&5 ! echo "${ECHO_T}${ac_t:- ! }$am_cv_proto_iconv" >&6 ! cat >>confdefs.h <<_ACEOF ! #define ICONV_CONST $am_cv_proto_iconv_arg1 ! _ACEOF ! fi ! ! ! echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 ! echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 ! if test "${am_cv_langinfo_codeset+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* cs = nl_langinfo(CODESET); ; return 0; *************** *** 5858,5925 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:5860: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:5863: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:5866: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:5869: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 ! cat 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:5879: 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 <&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 ! #line 5898 "configure" ! #include "confdefs.h" ! /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char $ac_func (); below. */ ! #include ! /* 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 (); ! char (*f) (); ! int main () { ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_$ac_func) || defined (__stub___$ac_func) ! choke me ! #else ! f = $ac_func; ! #endif ! ; return 0; --- 8076,8129 ---- _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 ! am_cv_langinfo_codeset=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! am_cv_langinfo_codeset=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 ! echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 ! if test $am_cv_langinfo_codeset = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_LANGINFO_CODESET 1 ! _ACEOF ! ! fi ! ! if test $ac_cv_header_locale_h = yes; then ! ! echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 ! echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 ! if test "${am_cv_val_LC_MESSAGES+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 () { ! return LC_MESSAGES ; return 0; *************** *** 5927,6069 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:5929: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:5932: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:5935: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:5938: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 ! cat 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:5948: 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 <&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 ! #line 5973 "configure" ! #include "confdefs.h" ! /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char $ac_func (); below. */ ! #include ! /* 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 (); ! char (*f) (); ! ! int ! main () ! { ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_$ac_func) || defined (__stub___$ac_func) ! choke me ! #else ! f = $ac_func; ! #endif ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:6004: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:6007: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:6010: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:6013: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! eval "$as_ac_var=yes" else ! echo "$as_me: failed program was:" >&5 ! cat 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:6023: 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 <&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 ! #line 6042 "configure" ! #include "confdefs.h" ! /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char $ac_func (); below. */ ! #include ! /* 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 (); ! char (*f) (); ! int main () { ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_$ac_func) || defined (__stub___$ac_func) ! choke me ! #else ! f = $ac_func; ! #endif ! ; return 0; --- 8131,8306 ---- _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 ! am_cv_val_LC_MESSAGES=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! am_cv_val_LC_MESSAGES=no fi rm -f 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 ! if test $am_cv_val_LC_MESSAGES = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_LC_MESSAGES 1 ! _ACEOF ! fi ! ! fi ! ! for ac_prog in bison 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_INTLBISON+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! if test -n "$INTLBISON"; then ! ac_cv_prog_INTLBISON="$INTLBISON" # 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_INTLBISON="$ac_prog" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! fi fi ! INTLBISON=$ac_cv_prog_INTLBISON ! if test -n "$INTLBISON"; then ! echo "$as_me:$LINENO: result: $INTLBISON" >&5 ! echo "${ECHO_T}$INTLBISON" >&6 ! else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi + + test -n "$INTLBISON" && break done ! if test -z "$INTLBISON"; then ! ac_verc_fail=yes ! else ! echo "$as_me:$LINENO: checking version of bison" >&5 ! echo $ECHO_N "checking version of bison... $ECHO_C" >&6 ! ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` ! case $ac_prog_version in ! '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; ! 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) ! ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; ! *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; ! esac ! echo "$as_me:$LINENO: result: $ac_prog_version" >&5 ! echo "${ECHO_T}$ac_prog_version" >&6 ! fi ! if test $ac_verc_fail = yes; then ! INTLBISON=: ! 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 ! ! ! ! ! BUILD_INCLUDED_LIBINTL=no ! USE_INCLUDED_LIBINTL=no ! ! LIBINTL= ! LTLIBINTL= ! POSUB= ! ! if test "$USE_NLS" = "yes"; then ! gt_use_preinstalled_gnugettext=no ! ! echo "$as_me:$LINENO: checking whether included gettext is requested" >&5 ! echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6 ! ! # Check whether --with-included-gettext or --without-included-gettext was given. ! if test "${with_included_gettext+set}" = set; then ! withval="$with_included_gettext" ! nls_cv_force_use_gnu_gettext=$withval ! else ! nls_cv_force_use_gnu_gettext=no ! fi; ! echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5 ! echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6 ! ! nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" ! if test "$nls_cv_force_use_gnu_gettext" != "yes"; then ! ! ! ! ! ! ! echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5 ! echo $ECHO_N "checking for GNU gettext in libc... $ECHO_C" >&6 ! if test "${gt_cv_func_gnugettext2_libc+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 ! extern int _nl_msg_cat_cntr; ! extern int *_nl_domain_bindings; int main () { ! bindtextdomain ("", ""); ! return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_domain_bindings ; return 0; *************** *** 6071,6138 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:6073: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:6076: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:6079: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:6082: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 ! cat 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:6092: 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 <&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 ! #line 6111 "configure" ! #include "confdefs.h" ! /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char $ac_func (); below. */ ! #include ! /* 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 (); ! char (*f) (); ! int main () { ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_$ac_func) || defined (__stub___$ac_func) ! choke me ! #else ! f = $ac_func; ! #endif ! ; return 0; --- 8308,8742 ---- _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 ! gt_cv_func_gnugettext2_libc=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! gt_cv_func_gnugettext2_libc=no fi rm -f 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 ! if test "$gt_cv_func_gnugettext2_libc" != "yes"; then ! ! ! use_additional=yes ! ! acl_save_prefix="$prefix" ! prefix="$acl_final_prefix" ! acl_save_exec_prefix="$exec_prefix" ! exec_prefix="$acl_final_exec_prefix" ! ! eval additional_includedir=\"$includedir\" ! eval additional_libdir=\"$libdir\" ! ! exec_prefix="$acl_save_exec_prefix" ! prefix="$acl_save_prefix" ! ! ! # Check whether --with-libintl-prefix or --without-libintl-prefix was given. ! if test "${with_libintl_prefix+set}" = set; then ! withval="$with_libintl_prefix" ! ! if test "X$withval" = "Xno"; then ! use_additional=no ! else ! if test "X$withval" = "X"; then ! ! acl_save_prefix="$prefix" ! prefix="$acl_final_prefix" ! acl_save_exec_prefix="$exec_prefix" ! exec_prefix="$acl_final_exec_prefix" ! ! eval additional_includedir=\"$includedir\" ! eval additional_libdir=\"$libdir\" ! ! exec_prefix="$acl_save_exec_prefix" ! prefix="$acl_save_prefix" ! ! else ! additional_includedir="$withval/include" ! additional_libdir="$withval/lib" ! fi ! fi ! ! fi; ! LIBINTL= ! LTLIBINTL= ! INCINTL= ! rpathdirs= ! ltrpathdirs= ! names_already_handled= ! names_next_round='intl ' ! while test -n "$names_next_round"; do ! names_this_round="$names_next_round" ! names_next_round= ! for name in $names_this_round; do ! already_handled= ! for n in $names_already_handled; do ! if test "$n" = "$name"; then ! already_handled=yes ! break ! fi ! done ! if test -z "$already_handled"; then ! names_already_handled="$names_already_handled $name" ! uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` ! eval value=\"\$HAVE_LIB$uppername\" ! if test -n "$value"; then ! if test "$value" = yes; then ! eval value=\"\$LIB$uppername\" ! test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" ! eval value=\"\$LTLIB$uppername\" ! test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" ! else ! : ! fi ! else ! found_dir= ! found_la= ! found_so= ! found_a= ! 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 $LTLIBINTL; do ! ! acl_save_prefix="$prefix" ! prefix="$acl_final_prefix" ! acl_save_exec_prefix="$exec_prefix" ! exec_prefix="$acl_final_exec_prefix" ! eval x=\"$x\" ! exec_prefix="$acl_save_exec_prefix" ! prefix="$acl_save_prefix" ! ! case "$x" in ! -L*) ! dir=`echo "X$x" | sed -e 's/^X-L//'` ! if test -n "$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 ! LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" ! if test "X$found_so" != "X"; then ! if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then ! LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" ! else ! haveit= ! for x in $ltrpathdirs; do ! if test "X$x" = "X$found_dir"; then ! haveit=yes ! break ! fi ! done ! if test -z "$haveit"; then ! ltrpathdirs="$ltrpathdirs $found_dir" ! fi ! if test "$hardcode_direct" = yes; then ! LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" ! else ! if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then ! LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" ! haveit= ! for x in $rpathdirs; do ! if test "X$x" = "X$found_dir"; then ! haveit=yes ! break ! fi ! done ! if test -z "$haveit"; then ! rpathdirs="$rpathdirs $found_dir" ! fi ! else ! haveit= ! for x in $LDFLAGS $LIBINTL; do ! ! acl_save_prefix="$prefix" ! prefix="$acl_final_prefix" ! acl_save_exec_prefix="$exec_prefix" ! exec_prefix="$acl_final_exec_prefix" ! eval x=\"$x\" ! exec_prefix="$acl_save_exec_prefix" ! prefix="$acl_save_prefix" ! ! if test "X$x" = "X-L$found_dir"; then ! haveit=yes ! break ! fi ! done ! if test -z "$haveit"; then ! LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" ! fi ! if test "$hardcode_minus_L" != no; then ! LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" ! else ! LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" ! fi ! fi ! fi ! fi ! else ! if test "X$found_a" != "X"; then ! LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" ! else ! LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" ! fi ! fi ! additional_includedir= ! case "$found_dir" in ! */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 $INCINTL; do ! ! acl_save_prefix="$prefix" ! prefix="$acl_final_prefix" ! acl_save_exec_prefix="$exec_prefix" ! exec_prefix="$acl_final_exec_prefix" ! eval x=\"$x\" ! exec_prefix="$acl_save_exec_prefix" ! prefix="$acl_save_prefix" ! ! if test "X$x" = "X-I$additional_includedir"; then ! haveit=yes ! break ! fi ! done ! if test -z "$haveit"; then ! if test -d "$additional_includedir"; then ! INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" ! fi ! fi ! fi ! fi ! fi ! if test -n "$found_la"; then ! save_libdir="$libdir" ! case "$found_la" in ! */* | *\\*) . "$found_la" ;; ! *) . "./$found_la" ;; ! esac ! libdir="$save_libdir" ! for dep in $dependency_libs; do ! case "$dep" in ! -L*) ! additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` ! if test "X$additional_libdir" != "X/usr/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 $LIBINTL; do ! ! acl_save_prefix="$prefix" ! prefix="$acl_final_prefix" ! acl_save_exec_prefix="$exec_prefix" ! exec_prefix="$acl_final_exec_prefix" ! eval x=\"$x\" ! exec_prefix="$acl_save_exec_prefix" ! prefix="$acl_save_prefix" ! ! if test "X$x" = "X-L$additional_libdir"; then ! haveit=yes ! break ! fi ! done ! if test -z "$haveit"; then ! if test -d "$additional_libdir"; then ! LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" ! fi ! fi ! haveit= ! for x in $LDFLAGS $LTLIBINTL; do ! ! acl_save_prefix="$prefix" ! prefix="$acl_final_prefix" ! acl_save_exec_prefix="$exec_prefix" ! exec_prefix="$acl_final_exec_prefix" ! eval x=\"$x\" ! exec_prefix="$acl_save_exec_prefix" ! prefix="$acl_save_prefix" ! ! if test "X$x" = "X-L$additional_libdir"; then ! haveit=yes ! break ! fi ! done ! if test -z "$haveit"; then ! if test -d "$additional_libdir"; then ! LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" ! fi ! fi ! fi ! fi ! ;; ! -R*) ! dir=`echo "X$dep" | sed -e 's/^X-R//'` ! if test "$enable_rpath" != no; then ! haveit= ! for x in $rpathdirs; do ! if test "X$x" = "X$dir"; then ! haveit=yes ! break ! fi ! done ! if test -z "$haveit"; then ! rpathdirs="$rpathdirs $dir" ! fi ! haveit= ! for x in $ltrpathdirs; do ! if test "X$x" = "X$dir"; then ! haveit=yes ! break ! fi ! done ! if test -z "$haveit"; then ! ltrpathdirs="$ltrpathdirs $dir" ! fi ! fi ! ;; ! -l*) ! names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ! ;; ! *.la) ! names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ! ;; ! *) ! LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" ! LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" ! ;; ! esac ! done ! fi ! else ! LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" ! LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" ! fi ! fi ! fi ! done ! done ! if test "X$rpathdirs" != "X"; then ! if test -n "$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" ! LIBINTL="${LIBINTL}${LIBINTL:+ }$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" ! LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" ! done ! fi ! fi ! if test "X$ltrpathdirs" != "X"; then ! for found_dir in $ltrpathdirs; do ! LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" ! done ! fi ! ! echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5 ! echo $ECHO_N "checking for GNU gettext in libintl... $ECHO_C" >&6 ! if test "${gt_cv_func_gnugettext2_libintl+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! gt_save_CPPFLAGS="$CPPFLAGS" ! CPPFLAGS="$CPPFLAGS $INCINTL" ! gt_save_LIBS="$LIBS" ! LIBS="$LIBS $LIBINTL" ! 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 ! extern int _nl_msg_cat_cntr; ! extern #ifdef __cplusplus ! "C" #endif ! const char *_nl_expand_alias (); int main () { ! bindtextdomain ("", ""); ! return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_expand_alias (0) ; return 0; *************** *** 6140,6209 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:6142: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:6145: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:6148: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:6151: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 ! cat 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:6161: 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 <&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 ! #line 6182 "configure" ! #include "confdefs.h" ! /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char $ac_func (); below. */ ! #include ! /* 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 (); ! char (*f) (); ! int main () { ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_$ac_func) || defined (__stub___$ac_func) ! choke me ! #else ! f = $ac_func; ! #endif ! ; return 0; --- 8744,8787 ---- _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 ! gt_cv_func_gnugettext2_libintl=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! gt_cv_func_gnugettext2_libintl=no fi ! rm -f 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 ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #include ! extern int _nl_msg_cat_cntr; ! extern #ifdef __cplusplus ! "C" #endif ! const char *_nl_expand_alias (); int main () { ! bindtextdomain ("", ""); ! return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_expand_alias (0) ; return 0; *************** *** 6211,6261 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:6213: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:6216: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:6219: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:6222: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 ! cat 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:6232: 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 <&5 ! echo $ECHO_N "checking whether confstr is declared... $ECHO_C" >&6 ! if test "${ac_cv_have_decl_confstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF ! #line 6250 "configure" ! #include "confdefs.h" ! $ac_includes_default int main () { ! #ifndef confstr ! char *p = (char *) confstr; ! #endif ! ; return 0; --- 8789,8998 ---- _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 ! LIBINTL="$LIBINTL $LIBICONV" ! LTLIBINTL="$LTLIBINTL $LTLIBICONV" ! gt_cv_func_gnugettext2_libintl=yes ! else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! CPPFLAGS="$gt_save_CPPFLAGS" ! LIBS="$gt_save_LIBS" ! fi ! echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext2_libintl" >&5 ! echo "${ECHO_T}$gt_cv_func_gnugettext2_libintl" >&6 ! fi ! ! if test "$gt_cv_func_gnugettext2_libc" = "yes" \ ! || { test "$gt_cv_func_gnugettext2_libintl" = "yes" \ ! && test "$PACKAGE" != gettext-runtime \ ! && test "$PACKAGE" != gettext-tools; }; then ! gt_use_preinstalled_gnugettext=yes ! else ! LIBINTL= ! LTLIBINTL= ! INCINTL= ! fi ! ! ! if test "$gt_use_preinstalled_gnugettext" != "yes"; then ! nls_cv_use_gnu_gettext=yes ! fi ! fi ! if test "$nls_cv_use_gnu_gettext" = "yes"; then ! BUILD_INCLUDED_LIBINTL=yes ! USE_INCLUDED_LIBINTL=yes ! LIBINTL="lib/intl/libintl.a $LIBICONV" ! LTLIBINTL="lib/intl/libintl.a $LTLIBICONV" ! LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` ! fi ! if test "$gt_use_preinstalled_gnugettext" = "yes" \ ! || test "$nls_cv_use_gnu_gettext" = "yes"; then ! CATOBJEXT=.gmo ! fi ! ! ! if test "$gt_use_preinstalled_gnugettext" = "yes" \ ! || test "$nls_cv_use_gnu_gettext" = "yes"; then ! ! cat >>confdefs.h <<\_ACEOF ! #define ENABLE_NLS 1 ! _ACEOF ! ! else ! USE_NLS=no ! fi ! fi ! ! echo "$as_me:$LINENO: checking whether to use NLS" >&5 ! echo $ECHO_N "checking whether to use NLS... $ECHO_C" >&6 ! echo "$as_me:$LINENO: result: $USE_NLS" >&5 ! echo "${ECHO_T}$USE_NLS" >&6 ! if test "$USE_NLS" = "yes"; then ! echo "$as_me:$LINENO: checking where the gettext function comes from" >&5 ! echo $ECHO_N "checking where the gettext function comes from... $ECHO_C" >&6 ! if test "$gt_use_preinstalled_gnugettext" = "yes"; then ! if test "$gt_cv_func_gnugettext2_libintl" = "yes"; then ! gt_source="external libintl" ! else ! gt_source="libc" ! fi ! else ! gt_source="included intl directory" ! fi ! echo "$as_me:$LINENO: result: $gt_source" >&5 ! echo "${ECHO_T}$gt_source" >&6 ! fi ! ! if test "$USE_NLS" = "yes"; then ! ! if test "$gt_use_preinstalled_gnugettext" = "yes"; then ! if test "$gt_cv_func_gnugettext2_libintl" = "yes"; then ! echo "$as_me:$LINENO: checking how to link with libintl" >&5 ! echo $ECHO_N "checking how to link with libintl... $ECHO_C" >&6 ! echo "$as_me:$LINENO: result: $LIBINTL" >&5 ! echo "${ECHO_T}$LIBINTL" >&6 ! ! for element in $INCINTL; do ! haveit= ! for x in $CPPFLAGS; do ! ! acl_save_prefix="$prefix" ! prefix="$acl_final_prefix" ! acl_save_exec_prefix="$exec_prefix" ! exec_prefix="$acl_final_exec_prefix" ! eval x=\"$x\" ! exec_prefix="$acl_save_exec_prefix" ! prefix="$acl_save_prefix" ! ! if test "X$x" = "X$element"; then ! haveit=yes ! break ! fi ! done ! if test -z "$haveit"; then ! CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" ! fi ! done ! ! fi ! ! ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_GETTEXT 1 ! _ACEOF ! ! ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_DCGETTEXT 1 ! _ACEOF ! ! fi ! ! POSUB=po ! fi ! ! ! if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then ! BUILD_INCLUDED_LIBINTL=yes ! fi ! ! ! ! ! ! nls_cv_header_intl= ! nls_cv_header_libgt= ! ! DATADIRNAME=share ! ! ! INSTOBJEXT=.mo ! ! ! GENCAT=gencat ! ! ! if test "$USE_INCLUDED_LIBINTL" = yes; then ! INTLOBJS="\$(GETTOBJS)" ! fi ! ! ! INTL_LIBTOOL_SUFFIX_PREFIX= ! ! ! ! INTLLIBS="$LIBINTL" ! ! ! ! ! ! ! ! ! ! ! ! ! ac_header_dirent=no ! for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do ! as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` ! echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 ! echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 ! if eval "test \"\${$as_ac_Header+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 <$ac_hdr> ! int main () { ! if ((DIR *) 0) ! return 0; ; return 0; *************** *** 6263,6536 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:6265: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:6268: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:6271: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:6274: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_have_decl_confstr=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_have_decl_confstr=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:6284: result: $ac_cv_have_decl_confstr" >&5 ! echo "${ECHO_T}$ac_cv_have_decl_confstr" >&6 ! if test $ac_cv_have_decl_confstr = yes; then ! ! cat >>confdefs.h <>confdefs.h <&5 ! echo $ECHO_N "checking whether printf is declared... $ECHO_C" >&6 ! if test "${ac_cv_have_decl_printf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line 6305 "configure" ! #include "confdefs.h" ! $ac_includes_default int main () { ! #ifndef printf ! char *p = (char *) printf; ! #endif ! ; return 0; } _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:6320: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:6323: \$? = $ac_status" >&5 (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:6326: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:6329: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_have_decl_printf=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_have_decl_printf=no ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! fi ! echo "$as_me:6339: result: $ac_cv_have_decl_printf" >&5 ! echo "${ECHO_T}$ac_cv_have_decl_printf" >&6 ! if test $ac_cv_have_decl_printf = yes; then ! ! cat >>confdefs.h <>confdefs.h <&5 ! echo $ECHO_N "checking whether sbrk is declared... $ECHO_C" >&6 ! if test "${ac_cv_have_decl_sbrk+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line 6360 "configure" ! #include "confdefs.h" ! $ac_includes_default int main () { ! #ifndef sbrk ! char *p = (char *) sbrk; ! #endif ! ; return 0; } _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:6375: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:6378: \$? = $ac_status" >&5 (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:6381: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:6384: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_have_decl_sbrk=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_have_decl_sbrk=no fi ! rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:6394: result: $ac_cv_have_decl_sbrk" >&5 ! echo "${ECHO_T}$ac_cv_have_decl_sbrk" >&6 ! if test $ac_cv_have_decl_sbrk = yes; then ! ! cat >>confdefs.h <>confdefs.h <&5 ! echo $ECHO_N "checking whether strcpy is declared... $ECHO_C" >&6 ! if test "${ac_cv_have_decl_strcpy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line 6415 "configure" ! #include "confdefs.h" ! $ac_includes_default int main () { ! #ifndef strcpy ! char *p = (char *) strcpy; ! #endif ! ; return 0; } _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:6430: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:6433: \$? = $ac_status" >&5 (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:6436: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:6439: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_have_decl_strcpy=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_have_decl_strcpy=no ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! fi ! echo "$as_me:6449: result: $ac_cv_have_decl_strcpy" >&5 ! echo "${ECHO_T}$ac_cv_have_decl_strcpy" >&6 ! if test $ac_cv_have_decl_strcpy = yes; then ! ! cat >>confdefs.h <>confdefs.h <&5 ! echo $ECHO_N "checking whether strsignal is declared... $ECHO_C" >&6 ! if test "${ac_cv_have_decl_strsignal+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line 6470 "configure" ! #include "confdefs.h" ! $ac_includes_default int main () { ! #ifndef strsignal ! char *p = (char *) strsignal; ! #endif ! ; return 0; } _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:6485: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:6488: \$? = $ac_status" >&5 (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:6491: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:6494: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_have_decl_strsignal=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_have_decl_strsignal=no fi ! rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:6504: result: $ac_cv_have_decl_strsignal" >&5 ! echo "${ECHO_T}$ac_cv_have_decl_strsignal" >&6 ! if test $ac_cv_have_decl_strsignal = yes; then ! ! cat >>confdefs.h <>confdefs.h <&5 ! echo $ECHO_N "checking whether strtold is declared... $ECHO_C" >&6 ! if test "${ac_cv_have_decl_strtold+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF ! #line 6525 "configure" ! #include "confdefs.h" ! $ac_includes_default int main () { ! #ifndef strtold ! char *p = (char *) strtold; ! #endif ! ; return 0; --- 9000,9272 ---- _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 ! eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! eval "$as_ac_Header=no" fi rm -f 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 ! if test `eval echo '${'$as_ac_Header'}'` = yes; then ! cat >>confdefs.h <<_ACEOF ! #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 ! _ACEOF + ac_header_dirent=$ac_hdr; break fi ! done ! # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. ! if test $ac_header_dirent = dirent.h; then ! echo "$as_me:$LINENO: checking for library containing opendir" >&5 ! echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 ! if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! ac_func_search_save_LIBS=$LIBS ! ac_cv_search_opendir=no ! 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. */ ! ! /* 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 opendir (); int main () { ! opendir (); ; 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_search_opendir="none required" else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 fi + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + if test "$ac_cv_search_opendir" = no; then + for ac_lib in dir; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + 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. */ ! /* 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 opendir (); int main () { ! opendir (); ; 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_search_opendir="-l$ac_lib" ! break else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! fi ! rm -f 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_opendir" >&5 ! echo "${ECHO_T}$ac_cv_search_opendir" >&6 ! if test "$ac_cv_search_opendir" != no; then ! test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" fi ! else ! echo "$as_me:$LINENO: checking for library containing opendir" >&5 ! echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 ! if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! ac_func_search_save_LIBS=$LIBS ! ac_cv_search_opendir=no ! 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. */ ! ! /* 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 opendir (); int main () { ! opendir (); ; 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_search_opendir="none required" else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 fi + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + if test "$ac_cv_search_opendir" = no; then + for ac_lib in x; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + 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. */ ! /* 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 opendir (); int main () { ! opendir (); ; 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_search_opendir="-l$ac_lib" ! break else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! fi ! rm -f 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_opendir" >&5 ! echo "${ECHO_T}$ac_cv_search_opendir" >&6 ! if test "$ac_cv_search_opendir" != no; then ! test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" ! fi fi ! echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 ! echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 ! if test "${ac_cv_header_time+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 ! int main () { ! if ((struct tm *) 0) ! return 0; ; return 0; *************** *** 6538,6949 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:6540: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:6543: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:6546: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:6549: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_have_decl_strtold=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_have_decl_strtold=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:6559: result: $ac_cv_have_decl_strtold" >&5 ! echo "${ECHO_T}$ac_cv_have_decl_strtold" >&6 ! if test $ac_cv_have_decl_strtold = yes; then ! ! cat >>confdefs.h <>confdefs.h <&5 - echo $ECHO_N "checking for declaration of strtoimax... $ECHO_C" >&6 - if test "${bash_cv_decl_strtoimax+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF - #line 6580 "configure" - #include "confdefs.h" - #if STDC_HEADERS - # include - #endif - #if HAVE_INTTYPES_H - # include - #endif ! int ! main () ! { ! return !strtoimax; ! ; ! return 0; ! } _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:6599: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:6602: \$? = $ac_status" >&5 (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:6605: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:6608: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! bash_cv_decl_strtoimax=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! bash_cv_decl_strtoimax=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:6618: result: $bash_cv_decl_strtoimax" >&5 ! echo "${ECHO_T}$bash_cv_decl_strtoimax" >&6 ! bash_tr_func=HAVE_DECL_`echo strtoimax | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! if test $bash_cv_decl_strtoimax = yes; then ! cat >>confdefs.h <>confdefs.h <&5 ! echo $ECHO_N "checking for declaration of strtol... $ECHO_C" >&6 ! if test "${bash_cv_decl_strtol+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line 6639 "configure" ! #include "confdefs.h" ! ! #if STDC_HEADERS ! # include ! #endif ! #if HAVE_INTTYPES_H ! # include ! #endif - int - main () - { - return !strtol; - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:6658: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:6661: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:6664: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:6667: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - bash_cv_decl_strtol=yes - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - bash_cv_decl_strtol=no fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi - echo "$as_me:6677: result: $bash_cv_decl_strtol" >&5 - echo "${ECHO_T}$bash_cv_decl_strtol" >&6 - bash_tr_func=HAVE_DECL_`echo strtol | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - if test $bash_cv_decl_strtol = yes; then - cat >>confdefs.h <>confdefs.h <&5 - echo $ECHO_N "checking for declaration of strtoll... $ECHO_C" >&6 - if test "${bash_cv_decl_strtoll+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF - #line 6698 "configure" - #include "confdefs.h" - #if STDC_HEADERS - # include - #endif - #if HAVE_INTTYPES_H - # include - #endif ! int ! main () ! { ! return !strtoll; ! ; ! return 0; ! } _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:6717: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:6720: \$? = $ac_status" >&5 (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:6723: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:6726: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! bash_cv_decl_strtoll=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! bash_cv_decl_strtoll=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:6736: result: $bash_cv_decl_strtoll" >&5 ! echo "${ECHO_T}$bash_cv_decl_strtoll" >&6 ! bash_tr_func=HAVE_DECL_`echo strtoll | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! if test $bash_cv_decl_strtoll = yes; then ! cat >>confdefs.h <>confdefs.h <&5 ! echo $ECHO_N "checking for declaration of strtoul... $ECHO_C" >&6 ! if test "${bash_cv_decl_strtoul+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line 6757 "configure" ! #include "confdefs.h" ! #if STDC_HEADERS ! # include ! #endif ! #if HAVE_INTTYPES_H ! # include ! #endif ! int ! main () ! { ! return !strtoul; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:6776: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:6779: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:6782: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:6785: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! bash_cv_decl_strtoul=yes else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! bash_cv_decl_strtoul=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:6795: result: $bash_cv_decl_strtoul" >&5 ! echo "${ECHO_T}$bash_cv_decl_strtoul" >&6 ! bash_tr_func=HAVE_DECL_`echo strtoul | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! if test $bash_cv_decl_strtoul = yes; then ! cat >>confdefs.h <>confdefs.h <&5 ! echo $ECHO_N "checking for declaration of strtoull... $ECHO_C" >&6 ! if test "${bash_cv_decl_strtoull+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line 6816 "configure" ! #include "confdefs.h" - #if STDC_HEADERS - # include - #endif - #if HAVE_INTTYPES_H - # include - #endif ! int ! main () ! { ! return !strtoull; ! ; ! return 0; ! } _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:6835: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:6838: \$? = $ac_status" >&5 (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:6841: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:6844: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! bash_cv_decl_strtoull=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! bash_cv_decl_strtoull=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:6854: result: $bash_cv_decl_strtoull" >&5 ! echo "${ECHO_T}$bash_cv_decl_strtoull" >&6 ! bash_tr_func=HAVE_DECL_`echo strtoull | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! if test $bash_cv_decl_strtoull = yes; then ! cat >>confdefs.h <>confdefs.h <&5 ! echo $ECHO_N "checking for declaration of strtoumax... $ECHO_C" >&6 ! if test "${bash_cv_decl_strtoumax+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line 6875 "configure" ! #include "confdefs.h" ! #if STDC_HEADERS ! # include ! #endif ! #if HAVE_INTTYPES_H ! # include ! #endif ! int ! main () ! { ! return !strtoumax; ! ; ! return 0; ! } _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:6894: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:6897: \$? = $ac_status" >&5 (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:6900: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:6903: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! bash_cv_decl_strtoumax=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! bash_cv_decl_strtoumax=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:6913: result: $bash_cv_decl_strtoumax" >&5 ! echo "${ECHO_T}$bash_cv_decl_strtoumax" >&6 ! bash_tr_func=HAVE_DECL_`echo strtoumax | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! if test $bash_cv_decl_strtoumax = yes; then ! cat >>confdefs.h <>confdefs.h <&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 ! cat >conftest.$ac_ext <<_ACEOF ! #line 6937 "configure" ! #include "confdefs.h" #include <$ac_header> _ACEOF ! if { (eval echo "$as_me:6941: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? ! egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 ! echo "$as_me:6947: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then --- 9274,9839 ---- _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_time=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_header_time=no fi rm -f 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 ! if test $ac_cv_header_time = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define TIME_WITH_SYS_TIME 1 ! _ACEOF fi ! ! for ac_header in inttypes.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 ! #line $LINENO "configure" ! /* 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>&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.$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 + #line $LINENO "configure" + /* 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 + 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 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" ! 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_header in unistd.h stdlib.h stdarg.h varargs.h limits.h string.h \ ! memory.h locale.h termcap.h termio.h termios.h dlfcn.h \ ! stddef.h stdint.h netdb.h grp.h strings.h regex.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 ! #line $LINENO "configure" ! /* 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>&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.$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 + #line $LINENO "configure" + /* 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 + 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 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" 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_header in sys/ptem.h sys/pte.h sys/stream.h sys/select.h sys/file.h \ ! sys/resource.h sys/param.h sys/socket.h sys/stat.h \ ! sys/time.h sys/times.h sys/types.h sys/wait.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 ! #line $LINENO "configure" ! /* 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>&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.$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 + #line $LINENO "configure" + /* 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 + 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 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" ! 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_header in netinet/in.h arpa/inet.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 ! #line $LINENO "configure" ! /* 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>&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.$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 ! #line $LINENO "configure" ! /* 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 *************** *** 6956,7012 **** fi if test -z "$ac_cpp_err"; then ! eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_ext fi ! echo "$as_me:6966: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then ! cat >>confdefs.h <&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 ! #line 6985 "configure" ! #include "confdefs.h" ! /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char $ac_func (); below. */ ! #include ! /* 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 (); ! char (*f) (); ! int main () { ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_$ac_func) || defined (__stub___$ac_func) ! choke me ! #else ! f = $ac_func; ! #endif ! ; return 0; --- 9846,9933 ---- 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 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" 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 ! ! # 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; *************** *** 7014,7250 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:7016: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:7019: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:7022: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:7025: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 ! cat 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:7035: 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 <&5 ! echo $ECHO_N "checking for working mktime... $ECHO_C" >&6 ! if test "${ac_cv_func_working_mktime+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$cross_compiling" = yes; then - ac_cv_func_working_mktime=no - else cat >conftest.$ac_ext <<_ACEOF ! #line 7054 "configure" ! #include "confdefs.h" ! /* Test program from Paul Eggert and Tony Leneis. */ ! #if TIME_WITH_SYS_TIME ! # include ! # include #else ! # if HAVE_SYS_TIME_H ! # include # else ! # include # endif #endif ! #if HAVE_UNISTD_H ! # include ! #endif ! #if !HAVE_ALARM ! # define alarm(X) /* empty */ ! #endif ! /* Work around redefinition to rpl_putenv by other config tests. */ ! #undef putenv ! static time_t time_t_max; ! /* Values we'll use to set the TZ environment variable. */ ! static const char *const tz_strings[] = { ! (const 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])) ! /* Fail if mktime fails to convert a date in the spring-forward gap. ! Based on a problem report from Andreas Jaeger. */ ! static void ! spring_forward_gap () ! { ! /* glibc (up to about 1998-10-07) failed this test. */ ! struct tm tm; ! /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" ! instead of "TZ=America/Vancouver" in order to detect the bug even ! on systems that don't support the Olson extension, or don't have the ! full zoneinfo tables installed. */ ! putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); - tm.tm_year = 98; - tm.tm_mon = 3; - tm.tm_mday = 5; - tm.tm_hour = 2; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_isdst = -1; - if (mktime (&tm) == (time_t)-1) - exit (1); - } ! static void ! mktime_test (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 ! irix_6_4_bug () ! { ! /* Based on code from Ariel Faigon. */ ! struct tm tm; ! tm.tm_year = 96; ! tm.tm_mon = 3; ! tm.tm_mday = 0; ! tm.tm_hour = 0; ! tm.tm_min = 0; ! tm.tm_sec = 0; ! tm.tm_isdst = -1; ! mktime (&tm); ! if (tm.tm_mon != 2 || tm.tm_mday != 31) ! exit (1); ! } ! static void ! bigtime_test (j) ! int j; { ! struct tm tm; ! time_t now; ! tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; ! now = mktime (&tm); ! if (now != (time_t) -1) ! { ! struct tm *lt = localtime (&now); ! if (! (lt ! && lt->tm_year == tm.tm_year ! && lt->tm_mon == tm.tm_mon ! && lt->tm_mday == tm.tm_mday ! && lt->tm_hour == tm.tm_hour ! && lt->tm_min == tm.tm_min ! && lt->tm_sec == tm.tm_sec ! && lt->tm_yday == tm.tm_yday ! && lt->tm_wday == tm.tm_wday ! && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) ! == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) ! exit (1); ! } } int main () { ! time_t t, delta; ! int i, j; ! ! /* This test makes some buggy mktime implementations loop. ! Give up after 60 seconds; a mktime slower than that ! isn't worth using anyway. */ ! alarm (60); ! ! for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2) ! continue; ! time_t_max--; ! delta = time_t_max / 997; /* a suitable prime number */ ! for (i = 0; i < N_STRINGS; i++) ! { ! if (tz_strings[i]) ! putenv (tz_strings[i]); ! ! 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); ! ! for (j = 1; 0 < j; j *= 2) ! bigtime_test (j); ! bigtime_test (j - 1); ! } ! irix_6_4_bug (); ! spring_forward_gap (); ! exit (0); } _ACEOF ! rm -f conftest$ac_exeext ! if { (eval echo "$as_me:7203: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:7206: \$? = $ac_status" >&5 ! (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:7208: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:7211: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_func_working_mktime=yes else ! echo "$as_me: program exited with status $ac_status" >&5 ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_func_working_mktime=no ! fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:7223: 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" fi ! for ac_header in libintl.h ! do ! as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ! echo "$as_me:7232: 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 ! cat >conftest.$ac_ext <<_ACEOF ! #line 7238 "configure" ! #include "confdefs.h" #include <$ac_header> _ACEOF ! if { (eval echo "$as_me:7242: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? ! egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 ! echo "$as_me:7248: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then --- 9935,13938 ---- _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 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 ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! 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 ! 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 ! #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 ! 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 ! #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 ! ! 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 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 ! #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; ! } ! ! 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.* *.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 ! ! echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5 ! echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6 ! if test "${ac_cv_func_getpgrp_void+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&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 ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! $ac_includes_default ! int ! main () ! { ! getpgrp (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_func_getpgrp_void=no ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_func_getpgrp_void=yes ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! ! fi ! echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5 ! echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6 ! if test $ac_cv_func_getpgrp_void = yes; then ! ! cat >>confdefs.h <<\_ACEOF ! #define GETPGRP_VOID 1 ! _ACEOF ! ! fi ! ! echo "$as_me:$LINENO: checking whether setvbuf arguments are reversed" >&5 ! echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6 ! if test "${ac_cv_func_setvbuf_reversed+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! ac_cv_func_setvbuf_reversed=no ! 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 PROTOTYPES ! int (setvbuf) (FILE *, int, char *, size_t); ! # endif ! int ! main () ! { ! char buf; return setvbuf (stdout, _IOLBF, &buf, 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 ! 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 PROTOTYPES ! int (setvbuf) (FILE *, int, char *, size_t); ! # endif ! int ! main () ! { ! char buf; return setvbuf (stdout, &buf, _IOLBF, 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 ! # It compiles and links either way, so it must not be declared ! # with a prototype and most likely this is a K&R C compiler. ! # Try running it. ! if test "$cross_compiling" = yes; then ! : # Assume setvbuf is not reversed when cross-compiling. ! 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 () ! { ! /* This call has the arguments reversed. ! A reversed system may check and see that the address of buf ! is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */ ! char buf; ! if (setvbuf (stdout, _IOLBF, &buf, 1) != 0) ! exit (1); ! putchar ('\r'); ! exit (0); /* Non-reversed systems SEGV here. */ ! ; ! 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 ! ac_cv_func_setvbuf_reversed=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 ) ! rm -f core core.* *.core ! fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ! fi ! ac_cv_func_setvbuf_reversed=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_func_setvbuf_reversed" >&5 ! echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6 ! if test $ac_cv_func_setvbuf_reversed = yes; then ! ! cat >>confdefs.h <<\_ACEOF ! #define SETVBUF_REVERSED 1 ! _ACEOF ! ! fi ! ! ! for ac_func in vprintf ! 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 ! #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 ! ! 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 ! ! echo "$as_me:$LINENO: checking for _doprnt" >&5 ! echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6 ! if test "${ac_cv_func__doprnt+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 _doprnt (); 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 _doprnt (); ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub__doprnt) || defined (__stub____doprnt) ! choke me ! #else ! char (*f) () = _doprnt; ! #endif ! #ifdef __cplusplus ! } ! #endif ! ! int ! main () ! { ! return f != _doprnt; ! ; ! 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__doprnt=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_func__doprnt=no ! fi ! rm -f 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 ! if test $ac_cv_func__doprnt = yes; then ! ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_DOPRNT 1 ! _ACEOF ! ! fi ! ! fi ! done ! ! ! echo "$as_me:$LINENO: checking for working strcoll" >&5 ! echo $ECHO_N "checking for working strcoll... $ECHO_C" >&6 ! if test "${ac_cv_func_strcoll_works+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test "$cross_compiling" = yes; then ! ac_cv_func_strcoll_works=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 ! int ! main () ! { ! exit (strcoll ("abc", "def") >= 0 || ! strcoll ("ABC", "DEF") >= 0 || ! strcoll ("123", "456") >= 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 ! ac_cv_func_strcoll_works=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_strcoll_works=no ! fi ! rm -f core 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_strcoll_works" >&5 ! echo "${ECHO_T}$ac_cv_func_strcoll_works" >&6 ! if test $ac_cv_func_strcoll_works = yes; then ! ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_STRCOLL 1 ! _ACEOF ! ! fi ! ! ! ! if test "$ac_cv_func_alloca_works" = "no" && test "$opt_bash_malloc" = "no"; then ! MALLOC_TARGET=alloca ! MALLOC_SRC=alloca.c ! ! MALLOC_LIB='-lmalloc' ! MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a' ! MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)' ! MALLOC_DEP='$(MALLOC_LIBRARY)' ! fi ! ! if test "$ac_cv_func_vprintf" = no; then ! echo "$as_me:$LINENO: checking for declaration of vprintf in stdio.h" >&5 ! echo $ECHO_N "checking for declaration of vprintf in stdio.h... $ECHO_C" >&6 ! 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 "[int[ ]*vprintf[^a-zA-Z0-9]]" >/dev/null 2>&1; then ! ac_cv_func_vprintf=yes ! fi ! rm -f conftest* ! ! echo "$as_me:$LINENO: result: $ac_cv_func_vprintf" >&5 ! echo "${ECHO_T}$ac_cv_func_vprintf" >&6 ! if test $ac_cv_func_vprintf = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_VPRINTF 1 ! _ACEOF ! ! fi ! fi ! ! if test "$ac_cv_func_vprintf" = no && test "$ac_cv_func__doprnt" = "yes"; then ! LIBOBJS="$LIBOBJS vprint.$ac_objext" ! fi ! ! echo "$as_me:$LINENO: checking return type of signal handlers" >&5 ! echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 ! if test "${ac_cv_type_signal+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 ! #ifdef signal ! # undef signal ! #endif ! #ifdef __cplusplus ! extern "C" void (*signal (int, void (*)(int)))(int); ! #else ! void (*signal ()) (); ! #endif ! ! int ! main () ! { ! int i; ! ; ! 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_signal=void ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_type_signal=int ! fi ! rm -f 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 ! ! cat >>confdefs.h <<_ACEOF ! #define RETSIGTYPE $ac_cv_type_signal ! _ACEOF ! ! ! ! echo "$as_me:$LINENO: checking for __setostype" >&5 ! echo $ECHO_N "checking for __setostype... $ECHO_C" >&6 ! if test "${ac_cv_func___setostype+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 __setostype (); 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 __setostype (); ! /* 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___setostype) || defined (__stub_____setostype) ! choke me ! #else ! char (*f) () = __setostype; ! #endif ! #ifdef __cplusplus ! } ! #endif ! ! int ! main () ! { ! return f != __setostype; ! ; ! 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___setostype=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_func___setostype=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_func___setostype" >&5 ! echo "${ECHO_T}$ac_cv_func___setostype" >&6 ! if test $ac_cv_func___setostype = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_SETOSTYPE 1 ! _ACEOF ! ! fi ! ! echo "$as_me:$LINENO: checking for wait3" >&5 ! echo $ECHO_N "checking for wait3... $ECHO_C" >&6 ! if test "${ac_cv_func_wait3+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 wait3 (); 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 wait3 (); ! /* 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_wait3) || defined (__stub___wait3) ! choke me ! #else ! char (*f) () = wait3; ! #endif ! #ifdef __cplusplus ! } ! #endif ! ! int ! main () ! { ! return f != wait3; ! ; ! 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_wait3=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_func_wait3=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 ! echo "${ECHO_T}$ac_cv_func_wait3" >&6 ! if test $ac_cv_func_wait3 = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_WAIT3 1 ! _ACEOF ! ! fi ! ! echo "$as_me:$LINENO: checking for isinf" >&5 ! echo $ECHO_N "checking for isinf... $ECHO_C" >&6 ! if test "${ac_cv_func_isinf+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 isinf (); 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 isinf (); ! /* 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_isinf) || defined (__stub___isinf) ! choke me ! #else ! char (*f) () = isinf; ! #endif ! #ifdef __cplusplus ! } ! #endif ! ! int ! main () ! { ! return f != isinf; ! ; ! 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_isinf=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_func_isinf=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5 ! echo "${ECHO_T}$ac_cv_func_isinf" >&6 ! if test $ac_cv_func_isinf = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_ISINF_IN_LIBC 1 ! _ACEOF ! ! fi ! ! ! echo "$as_me:$LINENO: checking for mkfifo" >&5 ! echo $ECHO_N "checking for mkfifo... $ECHO_C" >&6 ! if test "${ac_cv_func_mkfifo+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 mkfifo (); 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 mkfifo (); ! /* 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_mkfifo) || defined (__stub___mkfifo) ! choke me ! #else ! char (*f) () = mkfifo; ! #endif ! #ifdef __cplusplus ! } ! #endif ! ! int ! main () ! { ! return f != mkfifo; ! ; ! 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_mkfifo=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_func_mkfifo=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_func_mkfifo" >&5 ! echo "${ECHO_T}$ac_cv_func_mkfifo" >&6 ! if test $ac_cv_func_mkfifo = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_MKFIFO 1 ! _ACEOF ! ! else ! cat >>confdefs.h <<\_ACEOF ! #define MKFIFO_MISSING 1 ! _ACEOF ! ! fi ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! for ac_func in dup2 select getdtablesize getgroups gethostname \ ! setdtablesize getpagesize killpg lstat getpeername sbrk \ ! getrlimit getrusage gettimeofday waitpid tcgetpgrp \ ! readlink ! 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 ! #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 ! ! 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 ! ! fi ! done ! ! ! for ac_func in rename ! 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 ! #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 ! ! 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 ! ! else ! LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ! fi ! done ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! for ac_func in bcopy bzero confstr sysconf pathconf setenv putenv unsetenv \ ! setlinebuf setvbuf setlocale strchr tcgetattr uname \ ! ulimit tzset siginterrupt memmove ttyname times \ ! getaddrinfo gethostbyname getservbyname getservent inet_aton \ ! vsnprintf snprintf vasprintf asprintf fnmatch regcomp regexec ! 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 ! #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 ! ! 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 ! ! fi ! done ! ! ! ! ! ! ! ! for ac_func in isascii isblank isgraph isprint isspace isxdigit ! 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 ! #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 ! ! 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 ! ! fi ! done ! ! ! ! ! ! ! ! ! for ac_func in getcwd strcasecmp strerror strftime strpbrk memset strstr ! 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 ! #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 ! ! 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 ! ! else ! LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ! fi ! done ! ! ! ! ! ! ! ! ! ! for ac_func in strtod strtol strtoul strtoll strtoull strtoimax strtoumax ! 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 ! #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 ! ! 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 ! ! else ! LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ! fi ! done ! ! ! ! echo "$as_me:$LINENO: checking whether confstr is declared" >&5 ! echo $ECHO_N "checking whether confstr is declared... $ECHO_C" >&6 ! if test "${ac_cv_have_decl_confstr+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 () ! { ! #ifndef confstr ! char *p = (char *) confstr; ! #endif ! ! ; ! 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_have_decl_confstr=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_have_decl_confstr=no ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_have_decl_confstr" >&5 ! echo "${ECHO_T}$ac_cv_have_decl_confstr" >&6 ! if test $ac_cv_have_decl_confstr = yes; then ! ! cat >>confdefs.h <<_ACEOF ! #define HAVE_DECL_CONFSTR 1 ! _ACEOF ! ! ! else ! cat >>confdefs.h <<_ACEOF ! #define HAVE_DECL_CONFSTR 0 ! _ACEOF ! ! ! fi ! ! ! echo "$as_me:$LINENO: checking whether printf is declared" >&5 ! echo $ECHO_N "checking whether printf is declared... $ECHO_C" >&6 ! if test "${ac_cv_have_decl_printf+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 () ! { ! #ifndef printf ! char *p = (char *) printf; ! #endif ! ! ; ! 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_have_decl_printf=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_have_decl_printf=no ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_have_decl_printf" >&5 ! echo "${ECHO_T}$ac_cv_have_decl_printf" >&6 ! if test $ac_cv_have_decl_printf = yes; then ! ! cat >>confdefs.h <<_ACEOF ! #define HAVE_DECL_PRINTF 1 ! _ACEOF ! ! ! else ! cat >>confdefs.h <<_ACEOF ! #define HAVE_DECL_PRINTF 0 ! _ACEOF ! ! ! fi ! ! ! echo "$as_me:$LINENO: checking whether sbrk is declared" >&5 ! echo $ECHO_N "checking whether sbrk is declared... $ECHO_C" >&6 ! if test "${ac_cv_have_decl_sbrk+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 () ! { ! #ifndef sbrk ! char *p = (char *) sbrk; ! #endif ! ! ; ! 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_have_decl_sbrk=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_have_decl_sbrk=no ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_have_decl_sbrk" >&5 ! echo "${ECHO_T}$ac_cv_have_decl_sbrk" >&6 ! if test $ac_cv_have_decl_sbrk = yes; then ! ! cat >>confdefs.h <<_ACEOF ! #define HAVE_DECL_SBRK 1 ! _ACEOF ! ! ! else ! cat >>confdefs.h <<_ACEOF ! #define HAVE_DECL_SBRK 0 ! _ACEOF ! ! ! fi ! ! ! echo "$as_me:$LINENO: checking whether strcpy is declared" >&5 ! echo $ECHO_N "checking whether strcpy is declared... $ECHO_C" >&6 ! if test "${ac_cv_have_decl_strcpy+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 () ! { ! #ifndef strcpy ! char *p = (char *) strcpy; ! #endif ! ! ; ! 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_have_decl_strcpy=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_have_decl_strcpy=no ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_have_decl_strcpy" >&5 ! echo "${ECHO_T}$ac_cv_have_decl_strcpy" >&6 ! if test $ac_cv_have_decl_strcpy = yes; then ! ! cat >>confdefs.h <<_ACEOF ! #define HAVE_DECL_STRCPY 1 ! _ACEOF ! ! ! else ! cat >>confdefs.h <<_ACEOF ! #define HAVE_DECL_STRCPY 0 ! _ACEOF ! ! ! fi ! ! ! echo "$as_me:$LINENO: checking whether strsignal is declared" >&5 ! echo $ECHO_N "checking whether strsignal is declared... $ECHO_C" >&6 ! if test "${ac_cv_have_decl_strsignal+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 () ! { ! #ifndef strsignal ! char *p = (char *) strsignal; ! #endif ! ! ; ! 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_have_decl_strsignal=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_have_decl_strsignal=no ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_have_decl_strsignal" >&5 ! echo "${ECHO_T}$ac_cv_have_decl_strsignal" >&6 ! if test $ac_cv_have_decl_strsignal = yes; then ! ! cat >>confdefs.h <<_ACEOF ! #define HAVE_DECL_STRSIGNAL 1 ! _ACEOF ! ! ! else ! cat >>confdefs.h <<_ACEOF ! #define HAVE_DECL_STRSIGNAL 0 ! _ACEOF ! ! ! fi ! ! ! ! echo "$as_me:$LINENO: checking whether strtold is declared" >&5 ! echo $ECHO_N "checking whether strtold is declared... $ECHO_C" >&6 ! if test "${ac_cv_have_decl_strtold+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 () ! { ! #ifndef strtold ! char *p = (char *) strtold; ! #endif ! ! ; ! 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_have_decl_strtold=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_have_decl_strtold=no ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_have_decl_strtold" >&5 ! echo "${ECHO_T}$ac_cv_have_decl_strtold" >&6 ! if test $ac_cv_have_decl_strtold = yes; then ! ! cat >>confdefs.h <<_ACEOF ! #define HAVE_DECL_STRTOLD 1 ! _ACEOF ! ! ! echo "$as_me:$LINENO: checking for broken strtold" >&5 ! echo $ECHO_N "checking for broken strtold... $ECHO_C" >&6 ! if test "${bash_cv_strtold_broken+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 () ! { ! int main() { long double r; char *foo, bar; r = strtold(foo, &bar);} ! ; ! 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 ! bash_cv_strtold_broken=no ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! bash_cv_strtold_broken=yes ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! ! ! fi ! ! echo "$as_me:$LINENO: result: $bash_cv_strtold_broken" >&5 ! echo "${ECHO_T}$bash_cv_strtold_broken" >&6 ! if test "$bash_cv_strtold_broken" = "yes" ; then ! cat >>confdefs.h <<\_ACEOF ! #define STRTOLD_BROKEN 1 ! _ACEOF ! ! fi ! ! else ! cat >>confdefs.h <<_ACEOF ! #define HAVE_DECL_STRTOLD 0 ! _ACEOF ! ! ! fi ! ! ! ! ! ! ! ! echo "$as_me:$LINENO: checking for declaration of strtoimax" >&5 ! echo $ECHO_N "checking for declaration of strtoimax... $ECHO_C" >&6 ! if test "${bash_cv_decl_strtoimax+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 STDC_HEADERS ! # include ! #endif ! #if HAVE_INTTYPES_H ! # include ! #endif ! ! int ! main () ! { ! return !strtoimax; ! ; ! 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 ! bash_cv_decl_strtoimax=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! bash_cv_decl_strtoimax=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $bash_cv_decl_strtoimax" >&5 ! echo "${ECHO_T}$bash_cv_decl_strtoimax" >&6 ! bash_tr_func=HAVE_DECL_`echo strtoimax | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! if test $bash_cv_decl_strtoimax = yes; then ! cat >>confdefs.h <<_ACEOF ! #define $bash_tr_func 1 ! _ACEOF ! ! else ! cat >>confdefs.h <<_ACEOF ! #define $bash_tr_func 0 ! _ACEOF ! ! fi ! ! ! ! ! echo "$as_me:$LINENO: checking for declaration of strtol" >&5 ! echo $ECHO_N "checking for declaration of strtol... $ECHO_C" >&6 ! if test "${bash_cv_decl_strtol+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 STDC_HEADERS ! # include ! #endif ! #if HAVE_INTTYPES_H ! # include ! #endif ! ! int ! main () ! { ! return !strtol; ! ; ! 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 ! bash_cv_decl_strtol=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! bash_cv_decl_strtol=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $bash_cv_decl_strtol" >&5 ! echo "${ECHO_T}$bash_cv_decl_strtol" >&6 ! bash_tr_func=HAVE_DECL_`echo strtol | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! if test $bash_cv_decl_strtol = yes; then ! cat >>confdefs.h <<_ACEOF ! #define $bash_tr_func 1 ! _ACEOF ! ! else ! cat >>confdefs.h <<_ACEOF ! #define $bash_tr_func 0 ! _ACEOF ! ! fi ! ! ! ! ! echo "$as_me:$LINENO: checking for declaration of strtoll" >&5 ! echo $ECHO_N "checking for declaration of strtoll... $ECHO_C" >&6 ! if test "${bash_cv_decl_strtoll+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 STDC_HEADERS ! # include ! #endif ! #if HAVE_INTTYPES_H ! # include ! #endif ! ! int ! main () ! { ! return !strtoll; ! ; ! 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 ! bash_cv_decl_strtoll=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! bash_cv_decl_strtoll=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $bash_cv_decl_strtoll" >&5 ! echo "${ECHO_T}$bash_cv_decl_strtoll" >&6 ! bash_tr_func=HAVE_DECL_`echo strtoll | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! if test $bash_cv_decl_strtoll = yes; then ! cat >>confdefs.h <<_ACEOF ! #define $bash_tr_func 1 ! _ACEOF ! ! else ! cat >>confdefs.h <<_ACEOF ! #define $bash_tr_func 0 ! _ACEOF ! ! fi ! ! ! ! ! echo "$as_me:$LINENO: checking for declaration of strtoul" >&5 ! echo $ECHO_N "checking for declaration of strtoul... $ECHO_C" >&6 ! if test "${bash_cv_decl_strtoul+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 STDC_HEADERS ! # include ! #endif ! #if HAVE_INTTYPES_H ! # include ! #endif ! ! int ! main () ! { ! return !strtoul; ! ; ! 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 ! bash_cv_decl_strtoul=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! bash_cv_decl_strtoul=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $bash_cv_decl_strtoul" >&5 ! echo "${ECHO_T}$bash_cv_decl_strtoul" >&6 ! bash_tr_func=HAVE_DECL_`echo strtoul | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! if test $bash_cv_decl_strtoul = yes; then ! cat >>confdefs.h <<_ACEOF ! #define $bash_tr_func 1 ! _ACEOF ! ! else ! cat >>confdefs.h <<_ACEOF ! #define $bash_tr_func 0 ! _ACEOF ! ! fi ! ! ! ! ! echo "$as_me:$LINENO: checking for declaration of strtoull" >&5 ! echo $ECHO_N "checking for declaration of strtoull... $ECHO_C" >&6 ! if test "${bash_cv_decl_strtoull+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 STDC_HEADERS ! # include ! #endif ! #if HAVE_INTTYPES_H ! # include ! #endif ! ! int ! main () ! { ! return !strtoull; ! ; ! 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 ! bash_cv_decl_strtoull=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! bash_cv_decl_strtoull=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $bash_cv_decl_strtoull" >&5 ! echo "${ECHO_T}$bash_cv_decl_strtoull" >&6 ! bash_tr_func=HAVE_DECL_`echo strtoull | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! if test $bash_cv_decl_strtoull = yes; then ! cat >>confdefs.h <<_ACEOF ! #define $bash_tr_func 1 ! _ACEOF ! ! else ! cat >>confdefs.h <<_ACEOF ! #define $bash_tr_func 0 ! _ACEOF ! ! fi ! ! ! ! ! echo "$as_me:$LINENO: checking for declaration of strtoumax" >&5 ! echo $ECHO_N "checking for declaration of strtoumax... $ECHO_C" >&6 ! if test "${bash_cv_decl_strtoumax+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 STDC_HEADERS ! # include ! #endif ! #if HAVE_INTTYPES_H ! # include ! #endif ! ! int ! main () ! { ! return !strtoumax; ! ; ! 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 ! bash_cv_decl_strtoumax=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! bash_cv_decl_strtoumax=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $bash_cv_decl_strtoumax" >&5 ! echo "${ECHO_T}$bash_cv_decl_strtoumax" >&6 ! bash_tr_func=HAVE_DECL_`echo strtoumax | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! if test $bash_cv_decl_strtoumax = yes; then ! cat >>confdefs.h <<_ACEOF ! #define $bash_tr_func 1 ! _ACEOF ! ! else ! cat >>confdefs.h <<_ACEOF ! #define $bash_tr_func 0 ! _ACEOF ! ! fi ! ! ! ! ! for ac_header in 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 ! 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 ! #line $LINENO "configure" ! /* 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>&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.$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 ! #line $LINENO "configure" ! /* 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 ! 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 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" ! 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 alarm ! 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 ! #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 ! ! 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 ! ! fi ! done ! ! echo "$as_me:$LINENO: checking for working mktime" >&5 ! echo $ECHO_N "checking for working mktime... $ECHO_C" >&6 ! if test "${ac_cv_func_working_mktime+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test "$cross_compiling" = yes; then ! ac_cv_func_working_mktime=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. */ ! /* Test program from Paul Eggert and Tony Leneis. */ ! #if TIME_WITH_SYS_TIME ! # include ! # include ! #else ! # if HAVE_SYS_TIME_H ! # include ! # else ! # include ! # endif ! #endif ! ! #if HAVE_UNISTD_H ! # include ! #endif ! ! #if !HAVE_ALARM ! # define alarm(X) /* empty */ ! #endif ! ! /* Work around redefinition to rpl_putenv by other config tests. */ ! #undef putenv ! ! static time_t time_t_max; ! ! /* Values we'll use to set the TZ environment variable. */ ! static const char *const tz_strings[] = { ! (const 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])) ! ! /* Fail if mktime fails to convert a date in the spring-forward gap. ! Based on a problem report from Andreas Jaeger. */ ! static void ! spring_forward_gap () ! { ! /* glibc (up to about 1998-10-07) failed this test. */ ! struct tm tm; ! ! /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" ! instead of "TZ=America/Vancouver" in order to detect the bug even ! on systems that don't support the Olson extension, or don't have the ! full zoneinfo tables installed. */ ! putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); ! ! tm.tm_year = 98; ! tm.tm_mon = 3; ! tm.tm_mday = 5; ! tm.tm_hour = 2; ! tm.tm_min = 0; ! tm.tm_sec = 0; ! tm.tm_isdst = -1; ! if (mktime (&tm) == (time_t)-1) ! exit (1); ! } ! ! static void ! mktime_test (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 ! irix_6_4_bug () ! { ! /* Based on code from Ariel Faigon. */ ! struct tm tm; ! tm.tm_year = 96; ! tm.tm_mon = 3; ! tm.tm_mday = 0; ! tm.tm_hour = 0; ! tm.tm_min = 0; ! tm.tm_sec = 0; ! tm.tm_isdst = -1; ! mktime (&tm); ! if (tm.tm_mon != 2 || tm.tm_mday != 31) ! exit (1); ! } ! ! static void ! bigtime_test (j) ! int j; ! { ! struct tm tm; ! time_t now; ! tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; ! now = mktime (&tm); ! if (now != (time_t) -1) ! { ! struct tm *lt = localtime (&now); ! if (! (lt ! && lt->tm_year == tm.tm_year ! && lt->tm_mon == tm.tm_mon ! && lt->tm_mday == tm.tm_mday ! && lt->tm_hour == tm.tm_hour ! && lt->tm_min == tm.tm_min ! && lt->tm_sec == tm.tm_sec ! && lt->tm_yday == tm.tm_yday ! && lt->tm_wday == tm.tm_wday ! && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) ! == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) ! exit (1); ! } ! } ! ! int ! main () ! { ! time_t t, delta; ! int i, j; ! ! /* This test makes some buggy mktime implementations loop. ! Give up after 60 seconds; a mktime slower than that ! isn't worth using anyway. */ ! alarm (60); ! ! for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2) ! continue; ! time_t_max--; ! delta = time_t_max / 997; /* a suitable prime number */ ! for (i = 0; i < N_STRINGS; i++) ! { ! if (tz_strings[i]) ! putenv (tz_strings[i]); ! ! 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); ! ! for (j = 1; 0 < j; j *= 2) ! bigtime_test (j); ! bigtime_test (j - 1); ! } ! irix_6_4_bug (); ! spring_forward_gap (); ! 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_working_mktime=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_working_mktime=no ! fi ! rm -f core 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" ! fi ! ! ! ! ! ! ! ! ! for ac_header in argz.h errno.h fcntl.h malloc.h stdio_ext.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 ! #line $LINENO "configure" ! /* 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>&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.$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 ! #line $LINENO "configure" ! /* 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 ! 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 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" ! 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_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 ! #line $LINENO "configure" ! /* 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>&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.$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 ! #line $LINENO "configure" ! /* 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 ! 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 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" ! 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 ! #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 ! ! 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 ! ! 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 ! #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); ! } ! _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.* *.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 ! ! ! ! ! ! ! ! ! ! ! for ac_func in __argz_count __argz_next __argz_stringify dcgettext mempcpy \ ! munmap stpcpy strcspn strdup ! 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 ! #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 ! ! 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 ! ! fi ! done ! ! ! INTL_DEP= INTL_INC= LIBINTL_H= ! if test "x$USE_INCLUDED_LIBINTL" = "xyes"; then ! INTL_DEP='${INTL_LIBDIR}/libintl.a' ! INTL_INC='-I${INTL_LIBSRC} -I${INTL_BUILDDIR}' ! LIBINTL_H='${INTL_BUILDDIR}/libintl.h' ! fi ! ! ! ! ! ! ! ! for ac_header in wctype.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 ! #line $LINENO "configure" ! /* 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>&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.$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 ! #line $LINENO "configure" ! /* 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 ! 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 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" ! 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_header in wchar.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 ! #line $LINENO "configure" ! /* 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>&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.$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 ! #line $LINENO "configure" ! /* 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 ! 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 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" ! 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_header in langinfo.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 ! #line $LINENO "configure" ! /* 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>&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.$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 ! #line $LINENO "configure" ! /* 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 *************** *** 7257,7313 **** fi if test -z "$ac_cpp_err"; then ! eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_ext fi ! echo "$as_me:7267: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then ! cat >>confdefs.h <&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 ! #line 7286 "configure" ! #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char $ac_func (); below. */ ! #include /* 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 (); ! char (*f) (); ! ! int ! main () ! { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ ! #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else ! f = $ac_func; #endif ; return 0; --- 13945,14058 ---- 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 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" 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 mbsrtowcs" >&5 ! echo $ECHO_N "checking for mbsrtowcs... $ECHO_C" >&6 ! if test "${ac_cv_func_mbsrtowcs+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 mbsrtowcs (); 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 mbsrtowcs (); /* 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_mbsrtowcs) || defined (__stub___mbsrtowcs) choke me #else ! char (*f) () = mbsrtowcs; ! #endif ! #ifdef __cplusplus ! } #endif + int + main () + { + return f != mbsrtowcs; ; return 0; *************** *** 7315,7371 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:7317: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:7320: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:7323: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:7326: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 ! cat 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:7336: 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 <&5 ! echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6 ! if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! ac_check_lib_save_LIBS=$LIBS ! LIBS="-lintl $LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line 7356 "configure" ! #include "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 bindtextdomain (); int main () { ! bindtextdomain (); ; return 0; --- 14060,14137 ---- _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_mbsrtowcs=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_func_mbsrtowcs=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_func_mbsrtowcs" >&5 ! echo "${ECHO_T}$ac_cv_func_mbsrtowcs" >&6 ! if test $ac_cv_func_mbsrtowcs = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_MBSRTOWCS 1 ! _ACEOF fi ! echo "$as_me:$LINENO: checking for mbrtowc" >&5 ! echo $ECHO_N "checking for mbrtowc... $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 ! #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 mbrtowc (); 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 mbrtowc (); ! /* 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_mbrtowc) || defined (__stub___mbrtowc) ! choke me ! #else ! char (*f) () = mbrtowc; ! #endif ! #ifdef __cplusplus ! } ! #endif ! int main () { ! return f != mbrtowc; ; return 0; *************** *** 7373,7444 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:7375: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:7378: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:7381: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:7384: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_lib_intl_bindtextdomain=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_lib_intl_bindtextdomain=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:7395: result: $ac_cv_lib_intl_bindtextdomain" >&5 ! echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6 ! if test $ac_cv_lib_intl_bindtextdomain = yes; then ! cat >>confdefs.h <&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 ! #line 7417 "configure" ! #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char $ac_func (); below. */ ! #include /* 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 (); ! char (*f) (); ! ! int ! main () ! { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ ! #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else ! f = $ac_func; #endif ; return 0; --- 14139,14216 ---- _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_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.$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 ! echo "$as_me:$LINENO: checking for mbrlen" >&5 ! echo $ECHO_N "checking for mbrlen... $ECHO_C" >&6 ! if test "${ac_cv_func_mbrlen+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 mbrlen (); 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 mbrlen (); /* 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_mbrlen) || defined (__stub___mbrlen) choke me #else ! char (*f) () = mbrlen; ! #endif ! #ifdef __cplusplus ! } #endif + int + main () + { + return f != mbrlen; ; return 0; *************** *** 7446,7657 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:7448: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:7451: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:7454: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:7457: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 ! cat 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:7467: 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 <&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 ! cat >conftest.$ac_ext <<_ACEOF ! #line 7489 "configure" ! #include "confdefs.h" ! #include <$ac_header> _ACEOF - if { (eval echo "$as_me:7493: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:7499: \$? = $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 - eval "$as_ac_Header=yes" - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - eval "$as_ac_Header=no" - fi - rm -f conftest.err conftest.$ac_ext - fi - echo "$as_me:7518: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <&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 cat >conftest.$ac_ext <<_ACEOF ! #line 7537 "configure" ! #include "confdefs.h" ! #include <$ac_header> _ACEOF ! if { (eval echo "$as_me:7541: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! egrep -v '^ *\+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:7547: \$? = $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 ! eval "$as_ac_Header=yes" ! else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! eval "$as_ac_Header=no" ! fi ! rm -f conftest.err conftest.$ac_ext ! fi ! echo "$as_me:7566: result: `eval echo '${'$as_ac_Header'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ! if test `eval echo '${'$as_ac_Header'}'` = yes; then ! cat >>confdefs.h <&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 ! cat >conftest.$ac_ext <<_ACEOF ! #line 7585 "configure" ! #include "confdefs.h" ! #include <$ac_header> _ACEOF ! if { (eval echo "$as_me:7589: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? ! egrep -v '^ *\+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:7595: \$? = $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 ! eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! eval "$as_ac_Header=no" fi ! rm -f conftest.err conftest.$ac_ext fi ! echo "$as_me:7614: result: `eval echo '${'$as_ac_Header'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ! if test `eval echo '${'$as_ac_Header'}'` = yes; then ! cat >>confdefs.h <&5 ! echo $ECHO_N "checking for mbsrtowcs... $ECHO_C" >&6 ! if test "${ac_cv_func_mbsrtowcs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF ! #line 7630 "configure" ! #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char mbsrtowcs (); below. */ ! #include /* 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 mbsrtowcs (); ! char (*f) (); ! ! int ! main () ! { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ ! #if defined (__stub_mbsrtowcs) || defined (__stub___mbsrtowcs) choke me #else ! f = mbsrtowcs; #endif ; return 0; --- 14218,14374 ---- _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_mbrlen=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_mbrlen=no fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_func_mbrlen" >&5 ! echo "${ECHO_T}$ac_cv_func_mbrlen" >&6 ! if test $ac_cv_func_mbrlen = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_MBRLEN 1 _ACEOF fi ! echo "$as_me:$LINENO: checking for wctomb" >&5 ! echo $ECHO_N "checking for wctomb... $ECHO_C" >&6 ! if test "${ac_cv_func_wctomb+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 wctomb (); 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 wctomb (); ! /* 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_wctomb) || defined (__stub___wctomb) ! choke me ! #else ! char (*f) () = wctomb; ! #endif ! #ifdef __cplusplus ! } ! #endif ! int ! main () ! { ! return f != wctomb; ! ; ! 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_wctomb=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_func_wctomb=no fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_func_wctomb" >&5 ! echo "${ECHO_T}$ac_cv_func_wctomb" >&6 ! if test $ac_cv_func_wctomb = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_WCTOMB 1 ! _ACEOF fi ! echo "$as_me:$LINENO: checking for wcwidth" >&5 ! echo $ECHO_N "checking for wcwidth... $ECHO_C" >&6 ! if test "${ac_cv_func_wcwidth+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 wcwidth (); 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 wcwidth (); /* 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_wcwidth) || defined (__stub___wcwidth) choke me #else ! char (*f) () = wcwidth; ! #endif ! #ifdef __cplusplus ! } #endif + int + main () + { + return f != wcwidth; ; return 0; *************** *** 7659,7722 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:7661: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:7664: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:7667: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:7670: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_func_mbsrtowcs=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_func_mbsrtowcs=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:7680: result: $ac_cv_func_mbsrtowcs" >&5 ! echo "${ECHO_T}$ac_cv_func_mbsrtowcs" >&6 ! if test $ac_cv_func_mbsrtowcs = yes; then ! cat >>confdefs.h <<\EOF ! #define HAVE_MBSRTOWCS 1 ! EOF fi ! echo "$as_me:7689: checking for wcwidth" >&5 ! echo $ECHO_N "checking for wcwidth... $ECHO_C" >&6 ! if test "${ac_cv_func_wcwidth+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF ! #line 7695 "configure" ! #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char wcwidth (); below. */ ! #include /* 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 wcwidth (); ! char (*f) (); ! ! int ! main () ! { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ ! #if defined (__stub_wcwidth) || defined (__stub___wcwidth) choke me #else ! f = wcwidth; #endif ; return 0; --- 14376,14453 ---- _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_wcwidth=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_func_wcwidth=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_func_wcwidth" >&5 ! echo "${ECHO_T}$ac_cv_func_wcwidth" >&6 ! if test $ac_cv_func_wcwidth = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_WCWIDTH 1 ! _ACEOF fi ! echo "$as_me:$LINENO: checking for wcsdup" >&5 ! echo $ECHO_N "checking for wcsdup... $ECHO_C" >&6 ! if test "${ac_cv_func_wcsdup+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 wcsdup (); 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 wcsdup (); /* 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_wcsdup) || defined (__stub___wcsdup) choke me #else ! char (*f) () = wcsdup; ! #endif ! #ifdef __cplusplus ! } #endif + int + main () + { + return f != wcsdup; ; return 0; *************** *** 7724,7768 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:7726: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:7729: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:7732: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:7735: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_func_wcwidth=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_func_wcwidth=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:7745: result: $ac_cv_func_wcwidth" >&5 ! echo "${ECHO_T}$ac_cv_func_wcwidth" >&6 ! if test $ac_cv_func_wcwidth = yes; then ! cat >>confdefs.h <<\EOF ! #define HAVE_WCWIDTH 1 ! EOF fi ! echo "$as_me:7754: checking for mbstate_t" >&5 echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6 if test "${bash_cv_have_mbstate_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$cross_compiling" = yes; then - { { echo "$as_me:7760: error: cannot run test program while cross compiling" >&5 - echo "$as_me: error: cannot run test program while cross compiling" >&2;} - { (exit 1); exit 1; }; } - else cat >conftest.$ac_ext <<_ACEOF ! #line 7765 "configure" ! #include "confdefs.h" #include --- 14455,14500 ---- _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_wcsdup=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_func_wcsdup=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_func_wcsdup" >&5 ! echo "${ECHO_T}$ac_cv_func_wcsdup" >&6 ! if test $ac_cv_func_wcsdup = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_WCSDUP 1 ! _ACEOF fi ! ! echo "$as_me:$LINENO: checking for mbstate_t" >&5 echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6 if test "${bash_cv_have_mbstate_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. */ #include *************** *** 7770,7808 **** main () { mbstate_t ps; return 0; } _ACEOF ! rm -f conftest$ac_exeext ! if { (eval echo "$as_me:7777: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:7780: \$? = $ac_status" >&5 ! (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:7782: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:7785: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_have_mbstate_t=yes else ! echo "$as_me: program exited with status $ac_status" >&5 ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_have_mbstate_t=no fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ! fi fi ! echo "$as_me:7797: result: $bash_cv_have_mbstate_t" >&5 echo "${ECHO_T}$bash_cv_have_mbstate_t" >&6 if test $bash_cv_have_mbstate_t = yes; then ! cat >>confdefs.h <<\EOF #define HAVE_MBSTATE_T 1 ! EOF fi ! echo "$as_me:7806: checking for nl_langinfo and CODESET" >&5 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 if test "${bash_cv_langinfo_codeset+set}" = set; then --- 14502,14545 ---- main () { + mbstate_t ps; + mbstate_t *psp; + psp = (mbstate_t *)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 bash_cv_have_mbstate_t=yes else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! bash_cv_have_mbstate_t=no fi ! rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $bash_cv_have_mbstate_t" >&5 echo "${ECHO_T}$bash_cv_have_mbstate_t" >&6 if test $bash_cv_have_mbstate_t = yes; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_MBSTATE_T 1 ! _ACEOF fi ! echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 if test "${bash_cv_langinfo_codeset+set}" = set; then *************** *** 7810,7815 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 7812 "configure" ! #include "confdefs.h" #include int --- 14547,14556 ---- 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 *************** *** 7822,7856 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:7824: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:7827: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:7830: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:7833: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_langinfo_codeset=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_langinfo_codeset=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:7843: result: $bash_cv_langinfo_codeset" >&5 echo "${ECHO_T}$bash_cv_langinfo_codeset" >&6 if test $bash_cv_langinfo_codeset = yes; then ! cat >>confdefs.h <<\EOF #define HAVE_LANGINFO_CODESET 1 ! EOF fi if test "$opt_static_link" != yes; then ! echo "$as_me:7854: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then --- 14563,14600 ---- _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 bash_cv_langinfo_codeset=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! bash_cv_langinfo_codeset=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $bash_cv_langinfo_codeset" >&5 echo "${ECHO_T}$bash_cv_langinfo_codeset" >&6 if test $bash_cv_langinfo_codeset = yes; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_LANGINFO_CODESET 1 ! _ACEOF fi + + if test "$opt_static_link" != yes; then ! echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then *************** *** 7860,7865 **** LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 7862 "configure" ! #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ --- 14604,14613 ---- LIBS="-ldl $LIBS" 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. */ /* Override any gcc2 internal prototype to avoid an error. */ *************** *** 7879,7897 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:7881: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:7884: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:7887: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:7890: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi --- 14627,14646 ---- _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_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_lib_dl_dlopen=no fi *************** *** 7899,7908 **** LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:7901: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then ! cat >>confdefs.h <&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then ! cat >>confdefs.h <<_ACEOF #define HAVE_LIBDL 1 ! _ACEOF LIBS="-ldl $LIBS" *************** *** 7910,7917 **** fi for ac_func in dlopen dlclose dlsym do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` ! echo "$as_me:7915: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then --- 14659,14669 ---- fi + + + for ac_func in dlopen dlclose dlsym 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 *************** *** 7919,7939 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 7921 "configure" ! #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char $ac_func (); below. */ ! #include /* 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 (); - char (*f) (); - - int - main () - { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named --- 14671,14697 ---- 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 *************** *** 7942,7948 **** choke me #else ! f = $ac_func; #endif ; return 0; --- 14700,14713 ---- choke me #else ! char (*f) () = $ac_func; ! #endif ! #ifdef __cplusplus ! } #endif + int + main () + { + return f != $ac_func; ; return 0; *************** *** 7950,7978 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:7952: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:7955: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:7958: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:7961: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 ! cat 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:7971: 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 <&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 ! 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 fi *************** *** 7981,8003 **** fi ! echo "$as_me:7983: checking for sys_siglist declaration in signal.h or unistd.h" >&5 ! echo $ECHO_N "checking for sys_siglist declaration in signal.h or unistd.h... $ECHO_C" >&6 ! if test "${ac_cv_decl_sys_siglist+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF ! #line 7989 "configure" ! #include "confdefs.h" ! #include ! #include ! /* NetBSD declares sys_siglist in unistd.h. */ ! #if HAVE_UNISTD_H ! # include ! #endif ! int main () { ! char *msg = *(sys_siglist + 1); ; return 0; --- 14747,14770 ---- fi ! echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5 ! echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6 ! if test "${ac_cv_have_decl_sys_siglist+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 () { ! #ifndef sys_siglist ! char *p = (char *) sys_siglist; ! #endif ! ; return 0; *************** *** 8005,8040 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:8007: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:8010: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:8013: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:8016: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_decl_sys_siglist=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_decl_sys_siglist=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:8026: result: $ac_cv_decl_sys_siglist" >&5 ! echo "${ECHO_T}$ac_cv_decl_sys_siglist" >&6 ! if test $ac_cv_decl_sys_siglist = yes; then - cat >>confdefs.h <<\EOF - #define SYS_SIGLIST_DECLARED 1 - EOF fi if test "$ac_cv_func_inet_aton" != 'yes'; then ! echo "$as_me:8038: checking for inet_aton" >&5 echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6 if test "${bash_cv_func_inet_aton+set}" = set; then --- 14772,14818 ---- _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_have_decl_sys_siglist=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_have_decl_sys_siglist=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5 ! echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6 ! if test $ac_cv_have_decl_sys_siglist = yes; then ! ! cat >>confdefs.h <<_ACEOF ! #define HAVE_DECL_SYS_SIGLIST 1 ! _ACEOF ! ! ! else ! cat >>confdefs.h <<_ACEOF ! #define HAVE_DECL_SYS_SIGLIST 0 ! _ACEOF fi + + + if test "$ac_cv_func_inet_aton" != 'yes'; then ! echo "$as_me:$LINENO: checking for inet_aton" >&5 echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6 if test "${bash_cv_func_inet_aton+set}" = set; then *************** *** 8042,8047 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 8044 "configure" ! #include "confdefs.h" #include --- 14820,14829 ---- 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 *************** *** 8058,8086 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:8060: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:8063: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:8066: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:8069: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_func_inet_aton=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_func_inet_aton=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:8079: result: $bash_cv_func_inet_aton" >&5 echo "${ECHO_T}$bash_cv_func_inet_aton" >&6 if test $bash_cv_func_inet_aton = yes; then ! cat >>confdefs.h <<\EOF #define HAVE_INET_ATON 1 ! EOF else --- 14840,14869 ---- _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 bash_cv_func_inet_aton=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! bash_cv_func_inet_aton=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $bash_cv_func_inet_aton" >&5 echo "${ECHO_T}$bash_cv_func_inet_aton" >&6 if test $bash_cv_func_inet_aton = yes; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_INET_ATON 1 ! _ACEOF else *************** *** 8092,8096 **** case "$host_os" in irix4*) ! echo "$as_me:8094: checking for getpwent in -lsun" >&5 echo $ECHO_N "checking for getpwent in -lsun... $ECHO_C" >&6 if test "${ac_cv_lib_sun_getpwent+set}" = set; then --- 14875,14879 ---- case "$host_os" in irix4*) ! echo "$as_me:$LINENO: checking for getpwent in -lsun" >&5 echo $ECHO_N "checking for getpwent in -lsun... $ECHO_C" >&6 if test "${ac_cv_lib_sun_getpwent+set}" = set; then *************** *** 8100,8105 **** LIBS="-lsun $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 8102 "configure" ! #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ --- 14883,14892 ---- LIBS="-lsun $LIBS" 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. */ /* Override any gcc2 internal prototype to avoid an error. */ *************** *** 8119,8137 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:8121: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:8124: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:8127: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:8130: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_sun_getpwent=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_lib_sun_getpwent=no fi --- 14906,14925 ---- _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_lib_sun_getpwent=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_lib_sun_getpwent=no fi *************** *** 8139,8148 **** LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:8141: result: $ac_cv_lib_sun_getpwent" >&5 echo "${ECHO_T}$ac_cv_lib_sun_getpwent" >&6 if test $ac_cv_lib_sun_getpwent = yes; then ! cat >>confdefs.h <&5 echo "${ECHO_T}$ac_cv_lib_sun_getpwent" >&6 if test $ac_cv_lib_sun_getpwent = yes; then ! cat >>confdefs.h <<_ACEOF #define HAVE_LIBSUN 1 ! _ACEOF LIBS="-lsun $LIBS" *************** *** 8157,8161 **** _bash_needmsg= else ! echo "$as_me:8159: checking for socket library" >&5 echo $ECHO_N "checking for socket library... $ECHO_C" >&6 _bash_needmsg=yes --- 14945,14949 ---- _bash_needmsg= else ! echo "$as_me:$LINENO: checking for socket library" >&5 echo $ECHO_N "checking for socket library... $ECHO_C" >&6 _bash_needmsg=yes *************** *** 8164,8168 **** echo $ECHO_N "(cached) $ECHO_C" >&6 else ! echo "$as_me:8166: checking for getpeername in -lsocket" >&5 echo $ECHO_N "checking for getpeername in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_getpeername+set}" = set; then --- 14952,14956 ---- echo $ECHO_N "(cached) $ECHO_C" >&6 else ! echo "$as_me:$LINENO: checking for getpeername in -lsocket" >&5 echo $ECHO_N "checking for getpeername in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_getpeername+set}" = set; then *************** *** 8172,8177 **** LIBS="-lsocket -lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 8174 "configure" ! #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ --- 14960,14969 ---- LIBS="-lsocket -lnsl $LIBS" 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. */ /* Override any gcc2 internal prototype to avoid an error. */ *************** *** 8191,8209 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:8193: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:8196: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:8199: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:8202: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_getpeername=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_lib_socket_getpeername=no fi --- 14983,15002 ---- _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_lib_socket_getpeername=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_lib_socket_getpeername=no fi *************** *** 8211,8215 **** LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:8213: result: $ac_cv_lib_socket_getpeername" >&5 echo "${ECHO_T}$ac_cv_lib_socket_getpeername" >&6 if test $ac_cv_lib_socket_getpeername = yes; then --- 15004,15008 ---- LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getpeername" >&5 echo "${ECHO_T}$ac_cv_lib_socket_getpeername" >&6 if test $ac_cv_lib_socket_getpeername = yes; then *************** *** 8222,8226 **** if test "X$_bash_needmsg" = Xyes; then ! echo "$as_me:8224: result: $bash_cv_have_socklib" >&5 echo "${ECHO_T}$bash_cv_have_socklib" >&6 _bash_needmsg= --- 15015,15019 ---- if test "X$_bash_needmsg" = Xyes; then ! echo "$as_me:$LINENO: result: $bash_cv_have_socklib" >&5 echo "${ECHO_T}$bash_cv_have_socklib" >&6 _bash_needmsg= *************** *** 8231,8235 **** _bash_needmsg= else ! echo "$as_me:8233: checking for libnsl" >&5 echo $ECHO_N "checking for libnsl... $ECHO_C" >&6 _bash_needmsg=yes --- 15024,15028 ---- _bash_needmsg= else ! echo "$as_me:$LINENO: checking for libnsl" >&5 echo $ECHO_N "checking for libnsl... $ECHO_C" >&6 _bash_needmsg=yes *************** *** 8238,8242 **** echo $ECHO_N "(cached) $ECHO_C" >&6 else ! echo "$as_me:8240: checking for t_open in -lnsl" >&5 echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_t_open+set}" = set; then --- 15031,15035 ---- echo $ECHO_N "(cached) $ECHO_C" >&6 else ! echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5 echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_t_open+set}" = set; then *************** *** 8246,8251 **** LIBS="-lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 8248 "configure" ! #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ --- 15039,15048 ---- LIBS="-lnsl $LIBS" 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. */ /* Override any gcc2 internal prototype to avoid an error. */ *************** *** 8265,8283 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:8267: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:8270: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:8273: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:8276: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_nsl_t_open=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_lib_nsl_t_open=no fi --- 15062,15081 ---- _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_lib_nsl_t_open=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_lib_nsl_t_open=no fi *************** *** 8285,8289 **** LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:8287: result: $ac_cv_lib_nsl_t_open" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6 if test $ac_cv_lib_nsl_t_open = yes; then --- 15083,15087 ---- LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6 if test $ac_cv_lib_nsl_t_open = yes; then *************** *** 8296,8300 **** if test "X$_bash_needmsg" = Xyes; then ! echo "$as_me:8298: result: $bash_cv_have_libnsl" >&5 echo "${ECHO_T}$bash_cv_have_libnsl" >&6 _bash_needmsg= --- 15094,15098 ---- if test "X$_bash_needmsg" = Xyes; then ! echo "$as_me:$LINENO: result: $bash_cv_have_libnsl" >&5 echo "${ECHO_T}$bash_cv_have_libnsl" >&6 _bash_needmsg= *************** *** 8305,8315 **** LIBS="-lsocket $LIBS" fi ! cat >>confdefs.h <<\EOF #define HAVE_LIBSOCKET 1 ! EOF ! cat >>confdefs.h <<\EOF #define HAVE_GETPEERNAME 1 ! EOF fi --- 15103,15113 ---- LIBS="-lsocket $LIBS" fi ! cat >>confdefs.h <<\_ACEOF #define HAVE_LIBSOCKET 1 ! _ACEOF ! cat >>confdefs.h <<\_ACEOF #define HAVE_GETPEERNAME 1 ! _ACEOF fi *************** *** 8320,8324 **** _bash_needmsg=yes else ! echo "$as_me:8322: checking for gethostbyname in socket library" >&5 echo $ECHO_N "checking for gethostbyname in socket library... $ECHO_C" >&6 _bash_needmsg= --- 15118,15122 ---- _bash_needmsg=yes else ! echo "$as_me:$LINENO: checking for gethostbyname in socket library" >&5 echo $ECHO_N "checking for gethostbyname in socket library... $ECHO_C" >&6 _bash_needmsg= *************** *** 8328,8333 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 8330 "configure" ! #include "confdefs.h" #include int --- 15126,15135 ---- 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 *************** *** 8342,8360 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:8344: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:8347: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:8350: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:8353: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_have_gethostbyname=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_have_gethostbyname=no fi --- 15144,15163 ---- _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 bash_cv_have_gethostbyname=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! bash_cv_have_gethostbyname=no fi *************** *** 8364,8376 **** if test "X$_bash_needmsg" = Xyes; then ! echo "$as_me:8366: checking for gethostbyname in socket library" >&5 echo $ECHO_N "checking for gethostbyname in socket library... $ECHO_C" >&6 fi ! echo "$as_me:8369: result: $bash_cv_have_gethostbyname" >&5 echo "${ECHO_T}$bash_cv_have_gethostbyname" >&6 if test "$bash_cv_have_gethostbyname" = yes; then ! cat >>confdefs.h <<\EOF #define HAVE_GETHOSTBYNAME 1 ! EOF fi --- 15167,15179 ---- if test "X$_bash_needmsg" = Xyes; then ! echo "$as_me:$LINENO: checking for gethostbyname in socket library" >&5 echo $ECHO_N "checking for gethostbyname in socket library... $ECHO_C" >&6 fi ! echo "$as_me:$LINENO: result: $bash_cv_have_gethostbyname" >&5 echo "${ECHO_T}$bash_cv_have_gethostbyname" >&6 if test "$bash_cv_have_gethostbyname" = yes; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_GETHOSTBYNAME 1 ! _ACEOF fi *************** *** 8378,8382 **** fi ! echo "$as_me:8380: checking for uid_t in sys/types.h" >&5 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 if test "${ac_cv_type_uid_t+set}" = set; then --- 15181,15185 ---- fi ! echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 if test "${ac_cv_type_uid_t+set}" = set; then *************** *** 8384,8394 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 8386 "configure" ! #include "confdefs.h" #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "uid_t" >/dev/null 2>&1; then ac_cv_type_uid_t=yes else --- 15187,15201 ---- 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 _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! $EGREP "uid_t" >/dev/null 2>&1; then ac_cv_type_uid_t=yes else *************** *** 8398,8416 **** fi ! echo "$as_me:8400: result: $ac_cv_type_uid_t" >&5 echo "${ECHO_T}$ac_cv_type_uid_t" >&6 if test $ac_cv_type_uid_t = no; then ! cat >>confdefs.h <<\EOF #define uid_t int ! EOF ! cat >>confdefs.h <<\EOF #define gid_t int ! EOF fi ! echo "$as_me:8414: checking type of array argument to getgroups" >&5 echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6 if test "${ac_cv_type_getgroups+set}" = set; then --- 15205,15224 ---- fi ! echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 echo "${ECHO_T}$ac_cv_type_uid_t" >&6 if test $ac_cv_type_uid_t = no; then ! cat >>confdefs.h <<\_ACEOF #define uid_t int ! _ACEOF ! ! cat >>confdefs.h <<\_ACEOF #define gid_t int ! _ACEOF fi ! echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6 if test "${ac_cv_type_getgroups+set}" = set; then *************** *** 8421,8426 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 8423 "configure" ! #include "confdefs.h" /* Thanks to Mike Rendell for this test. */ #include --- 15229,15238 ---- 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. */ /* Thanks to Mike Rendell for this test. */ #include *************** *** 8447,8459 **** _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:8449: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:8452: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:8454: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:8457: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_getgroups=gid_t --- 15259,15271 ---- _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_type_getgroups=gid_t *************** *** 8461,8478 **** echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_getgroups=int fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_type_getgroups = cross; then cat >conftest.$ac_ext <<_ACEOF ! #line 8470 "configure" ! #include "confdefs.h" #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then ac_cv_type_getgroups=gid_t else --- 15273,15296 ---- 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_type_getgroups=int fi ! rm -f core 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 ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then ac_cv_type_getgroups=gid_t else *************** *** 8483,8494 **** fi fi ! echo "$as_me:8485: result: $ac_cv_type_getgroups" >&5 echo "${ECHO_T}$ac_cv_type_getgroups" >&6 ! cat >>confdefs.h <&5 echo $ECHO_N "checking for off_t... $ECHO_C" >&6 if test "${ac_cv_type_off_t+set}" = set; then --- 15301,15313 ---- fi fi ! echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 echo "${ECHO_T}$ac_cv_type_getgroups" >&6 ! cat >>confdefs.h <<_ACEOF #define GETGROUPS_T $ac_cv_type_getgroups ! _ACEOF ! ! 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 *************** *** 8496,8501 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 8498 "configure" ! #include "confdefs.h" $ac_includes_default int --- 15315,15324 ---- 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 *************** *** 8511,8534 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:8513: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:8516: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:8519: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:8522: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_off_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_off_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:8532: 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 --- 15334,15358 ---- _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_off_t=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 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 *************** *** 8536,8546 **** else ! cat >>confdefs.h <&5 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 if test "${ac_cv_type_mode_t+set}" = set; then --- 15360,15370 ---- else ! cat >>confdefs.h <<_ACEOF #define off_t long ! _ACEOF fi ! echo "$as_me:$LINENO: checking for mode_t" >&5 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 if test "${ac_cv_type_mode_t+set}" = set; then *************** *** 8548,8553 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 8550 "configure" ! #include "confdefs.h" $ac_includes_default int --- 15372,15381 ---- 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 *************** *** 8563,8586 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:8565: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:8568: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:8571: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:8574: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_mode_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:8584: result: $ac_cv_type_mode_t" >&5 echo "${ECHO_T}$ac_cv_type_mode_t" >&6 if test $ac_cv_type_mode_t = yes; then --- 15391,15415 ---- _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_mode_t=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_mode_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 echo "${ECHO_T}$ac_cv_type_mode_t" >&6 if test $ac_cv_type_mode_t = yes; then *************** *** 8588,8598 **** else ! cat >>confdefs.h <&5 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 if test "${ac_cv_type_uid_t+set}" = set; then --- 15417,15427 ---- else ! cat >>confdefs.h <<_ACEOF #define mode_t int ! _ACEOF fi ! echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 if test "${ac_cv_type_uid_t+set}" = set; then *************** *** 8600,8610 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 8602 "configure" ! #include "confdefs.h" #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "uid_t" >/dev/null 2>&1; then ac_cv_type_uid_t=yes else --- 15429,15443 ---- 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 _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! $EGREP "uid_t" >/dev/null 2>&1; then ac_cv_type_uid_t=yes else *************** *** 8614,8632 **** fi ! echo "$as_me:8616: result: $ac_cv_type_uid_t" >&5 echo "${ECHO_T}$ac_cv_type_uid_t" >&6 if test $ac_cv_type_uid_t = no; then ! cat >>confdefs.h <<\EOF #define uid_t int ! EOF ! cat >>confdefs.h <<\EOF #define gid_t int ! EOF fi ! echo "$as_me:8630: checking for pid_t" >&5 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 if test "${ac_cv_type_pid_t+set}" = set; then --- 15447,15466 ---- fi ! echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 echo "${ECHO_T}$ac_cv_type_uid_t" >&6 if test $ac_cv_type_uid_t = no; then ! cat >>confdefs.h <<\_ACEOF #define uid_t int ! _ACEOF ! ! cat >>confdefs.h <<\_ACEOF #define gid_t int ! _ACEOF fi ! echo "$as_me:$LINENO: checking for pid_t" >&5 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 if test "${ac_cv_type_pid_t+set}" = set; then *************** *** 8634,8639 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 8636 "configure" ! #include "confdefs.h" $ac_includes_default int --- 15468,15477 ---- 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 *************** *** 8649,8672 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:8651: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:8654: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:8657: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:8660: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_pid_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:8670: result: $ac_cv_type_pid_t" >&5 echo "${ECHO_T}$ac_cv_type_pid_t" >&6 if test $ac_cv_type_pid_t = yes; then --- 15487,15511 ---- _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_pid_t=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_pid_t=no fi rm -f 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 if test $ac_cv_type_pid_t = yes; then *************** *** 8674,8684 **** else ! cat >>confdefs.h <&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then --- 15513,15523 ---- else ! cat >>confdefs.h <<_ACEOF #define pid_t int ! _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 *************** *** 8686,8691 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 8688 "configure" ! #include "confdefs.h" $ac_includes_default int --- 15525,15534 ---- 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 *************** *** 8701,8724 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:8703: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:8706: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:8709: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:8712: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:8722: 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 --- 15544,15568 ---- _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 ! 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 *************** *** 8726,8736 **** else ! cat >>confdefs.h <&5 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 if test "${ac_cv_type_ssize_t+set}" = set; then --- 15570,15580 ---- else ! cat >>confdefs.h <<_ACEOF #define size_t unsigned ! _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 *************** *** 8738,8743 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 8740 "configure" ! #include "confdefs.h" $ac_includes_default int --- 15582,15591 ---- 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 *************** *** 8753,8776 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:8755: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:8758: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:8761: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:8764: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_ssize_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_ssize_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:8774: result: $ac_cv_type_ssize_t" >&5 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 if test $ac_cv_type_ssize_t = yes; then --- 15601,15625 ---- _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_ssize_t=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_ssize_t=no fi rm -f 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 if test $ac_cv_type_ssize_t = yes; then *************** *** 8778,8788 **** else ! cat >>confdefs.h <&5 echo $ECHO_N "checking for time_t... $ECHO_C" >&6 if test "${ac_cv_type_time_t+set}" = set; then --- 15627,15637 ---- else ! cat >>confdefs.h <<_ACEOF #define ssize_t int ! _ACEOF fi ! echo "$as_me:$LINENO: checking for time_t" >&5 echo $ECHO_N "checking for time_t... $ECHO_C" >&6 if test "${ac_cv_type_time_t+set}" = set; then *************** *** 8790,8795 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 8792 "configure" ! #include "confdefs.h" $ac_includes_default int --- 15639,15648 ---- 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 *************** *** 8805,8828 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:8807: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:8810: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:8813: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:8816: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_time_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_time_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:8826: result: $ac_cv_type_time_t" >&5 echo "${ECHO_T}$ac_cv_type_time_t" >&6 if test $ac_cv_type_time_t = yes; then --- 15658,15682 ---- _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_time_t=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_time_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5 echo "${ECHO_T}$ac_cv_type_time_t" >&6 if test $ac_cv_type_time_t = yes; then *************** *** 8830,8840 **** else ! cat >>confdefs.h <&5 echo $ECHO_N "checking for long long... $ECHO_C" >&6 if test "${bash_cv_type_long_long+set}" = set; then --- 15684,15696 ---- else ! cat >>confdefs.h <<_ACEOF #define time_t long ! _ACEOF fi ! ! ! echo "$as_me:$LINENO: checking for long long" >&5 echo $ECHO_N "checking for long long... $ECHO_C" >&6 if test "${bash_cv_type_long_long+set}" = set; then *************** *** 8842,8847 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 8844 "configure" ! #include "confdefs.h" long long ll = 1; int i = 63; --- 15698,15707 ---- 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; *************** *** 8858,8890 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:8860: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:8863: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:8866: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:8869: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_type_long_long='long long' else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_type_long_long='long' fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:8879: result: $bash_cv_type_long_long" >&5 echo "${ECHO_T}$bash_cv_type_long_long" >&6 if test "$bash_cv_type_long_long" = 'long long'; then ! cat >>confdefs.h <<\EOF #define HAVE_LONG_LONG 1 ! EOF fi ! echo "$as_me:8888: checking for unsigned long long" >&5 echo $ECHO_N "checking for unsigned long long... $ECHO_C" >&6 if test "${bash_cv_type_unsigned_long_long+set}" = set; then --- 15718,15752 ---- _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 bash_cv_type_long_long='long long' else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! bash_cv_type_long_long='long' fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $bash_cv_type_long_long" >&5 echo "${ECHO_T}$bash_cv_type_long_long" >&6 if test "$bash_cv_type_long_long" = 'long long'; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_LONG_LONG 1 ! _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 "${bash_cv_type_unsigned_long_long+set}" = set; then *************** *** 8892,8897 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 8894 "configure" ! #include "confdefs.h" unsigned long long ull = 1; int i = 63; --- 15754,15763 ---- 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; *************** *** 8908,8940 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:8910: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:8913: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:8916: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:8919: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_type_unsigned_long_long='unsigned long long' else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_type_unsigned_long_long='unsigned long' fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:8929: result: $bash_cv_type_unsigned_long_long" >&5 echo "${ECHO_T}$bash_cv_type_unsigned_long_long" >&6 if test "$bash_cv_type_unsigned_long_long" = 'unsigned long long'; then ! cat >>confdefs.h <<\EOF #define HAVE_UNSIGNED_LONG_LONG 1 ! EOF fi ! echo "$as_me:8938: checking return type of signal handlers" >&5 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 if test "${ac_cv_type_signal+set}" = set; then --- 15774,15808 ---- _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 bash_cv_type_unsigned_long_long='unsigned long long' else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! bash_cv_type_unsigned_long_long='unsigned long' fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $bash_cv_type_unsigned_long_long" >&5 echo "${ECHO_T}$bash_cv_type_unsigned_long_long" >&6 if test "$bash_cv_type_unsigned_long_long" = 'unsigned long long'; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_UNSIGNED_LONG_LONG 1 ! _ACEOF fi ! ! echo "$as_me:$LINENO: checking return type of signal handlers" >&5 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 if test "${ac_cv_type_signal+set}" = set; then *************** *** 8942,8947 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 8944 "configure" ! #include "confdefs.h" #include #include --- 15810,15819 ---- 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 *************** *** 8964,8994 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:8966: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:8969: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:8972: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:8975: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_signal=void else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_signal=int fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:8985: result: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6 ! cat >>confdefs.h <&5 echo $ECHO_N "checking for char... $ECHO_C" >&6 if test "${ac_cv_type_char+set}" = set; then --- 15836,15869 ---- _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_signal=void else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_signal=int fi rm -f 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 ! cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal ! _ACEOF ! ! ! echo "$as_me:$LINENO: checking for char" >&5 echo $ECHO_N "checking for char... $ECHO_C" >&6 if test "${ac_cv_type_char+set}" = set; then *************** *** 8996,9001 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 8998 "configure" ! #include "confdefs.h" $ac_includes_default int --- 15871,15880 ---- 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 *************** *** 9011,9037 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:9013: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:9016: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:9019: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:9022: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_char=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_char=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:9032: result: $ac_cv_type_char" >&5 echo "${ECHO_T}$ac_cv_type_char" >&6 ! echo "$as_me:9035: checking size of char" >&5 echo $ECHO_N "checking size of char... $ECHO_C" >&6 if test "${ac_cv_sizeof_char+set}" = set; then --- 15890,15917 ---- _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_char=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_char=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5 echo "${ECHO_T}$ac_cv_type_char" >&6 ! echo "$as_me:$LINENO: checking size of char" >&5 echo $ECHO_N "checking size of char... $ECHO_C" >&6 if test "${ac_cv_sizeof_char+set}" = set; then *************** *** 9039,9052 **** else if test "$ac_cv_type_char" = yes; then if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF ! #line 9044 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (char)) >= 0)] ; return 0; --- 15919,15942 ---- else if test "$ac_cv_type_char" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. 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 () { ! static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)]; ! test_array [0] = 0 ! ; return 0; *************** *** 9054,9078 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:9056: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:9059: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:9062: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:9065: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF ! #line 9070 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (char)) <= $ac_mid)] ; return 0; --- 15944,15974 ---- _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_lo=0 ac_mid=0 while :; 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. */ $ac_includes_default int main () { ! static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)]; ! test_array [0] = 0 ! ; return 0; *************** *** 9080,9099 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:9082: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:9085: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:9088: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:9091: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext --- 15976,16001 ---- _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_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.$ac_objext conftest.$ac_ext *************** *** 9101,9115 **** else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF ! #line 9107 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (char)) >= $ac_mid)] ; return 0; --- 16003,16054 ---- else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! 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 () ! { ! static int test_array [1 - 2 * !(((long) (sizeof (char))) < 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>&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 ! #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 () { ! static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)]; ! test_array [0] = 0 ! ; return 0; *************** *** 9117,9139 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:9119: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:9122: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:9125: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:9128: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.$ac_objext conftest.$ac_ext done fi rm -f conftest.$ac_objext conftest.$ac_ext --- 16056,16091 ---- _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_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.$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.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext *************** *** 9142,9152 **** ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF ! #line 9144 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (char)) <= $ac_mid)] ; return 0; --- 16094,16110 ---- ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` 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 () { ! static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)]; ! test_array [0] = 0 ! ; return 0; *************** *** 9154,9195 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:9156: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:9159: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:9162: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:9165: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_lo=`expr $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done ! ac_cv_sizeof_char=$ac_lo else if test "$cross_compiling" = yes; then ! { { echo "$as_me:9178: error: cannot run test program while cross compiling" >&5 ! echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF ! #line 9183 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! FILE *f = fopen ("conftest.val", "w"); ! if (!f) ! exit (1); ! fprintf (f, "%d", (sizeof (char))); ! fclose (f); ; return 0; --- 16112,16186 ---- _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_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.$ac_objext conftest.$ac_ext done ! case $ac_lo in ! ?*) ac_cv_sizeof_char=$ac_lo;; ! '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77 ! See \`config.log' for more details." >&5 ! echo "$as_me: error: cannot compute sizeof (char), 77 ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } ;; ! 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 ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ $ac_includes_default + long longval () { return (long) (sizeof (char)); } + unsigned long ulongval () { return (long) (sizeof (char)); } + #include + #include int main () { ! ! FILE *f = fopen ("conftest.val", "w"); ! if (! f) ! exit (1); ! if (((long) (sizeof (char))) < 0) ! { ! long i = longval (); ! if (i != ((long) (sizeof (char)))) ! exit (1); ! fprintf (f, "%ld\n", i); ! } ! else ! { ! unsigned long i = ulongval (); ! if (i != ((long) (sizeof (char)))) ! exit (1); ! fprintf (f, "%lu\n", i); ! } ! exit (ferror (f) || fclose (f) != 0); ! ; return 0; *************** *** 9197,9209 **** _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:9199: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:9202: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:9204: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:9207: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_char=`cat conftest.val` --- 16188,16200 ---- _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_sizeof_char=`cat conftest.val` *************** *** 9211,9217 **** echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi --- 16202,16215 ---- 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: error: cannot compute sizeof (char), 77 ! See \`config.log' for more details." >&5 ! echo "$as_me: error: cannot compute sizeof (char), 77 ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi *************** *** 9221,9231 **** fi fi ! echo "$as_me:9223: result: $ac_cv_sizeof_char" >&5 echo "${ECHO_T}$ac_cv_sizeof_char" >&6 ! cat >>confdefs.h <&5 echo $ECHO_N "checking for short... $ECHO_C" >&6 if test "${ac_cv_type_short+set}" = set; then --- 16219,16230 ---- fi fi ! echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5 echo "${ECHO_T}$ac_cv_sizeof_char" >&6 ! cat >>confdefs.h <<_ACEOF #define SIZEOF_CHAR $ac_cv_sizeof_char ! _ACEOF ! ! echo "$as_me:$LINENO: checking for short" >&5 echo $ECHO_N "checking for short... $ECHO_C" >&6 if test "${ac_cv_type_short+set}" = set; then *************** *** 9233,9238 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 9235 "configure" ! #include "confdefs.h" $ac_includes_default int --- 16232,16241 ---- 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 *************** *** 9248,9274 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:9250: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:9253: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:9256: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:9259: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_short=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_short=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:9269: result: $ac_cv_type_short" >&5 echo "${ECHO_T}$ac_cv_type_short" >&6 ! echo "$as_me:9272: checking size of short" >&5 echo $ECHO_N "checking size of short... $ECHO_C" >&6 if test "${ac_cv_sizeof_short+set}" = set; then --- 16251,16278 ---- _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_short=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_short=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 echo "${ECHO_T}$ac_cv_type_short" >&6 ! echo "$as_me:$LINENO: checking size of short" >&5 echo $ECHO_N "checking size of short... $ECHO_C" >&6 if test "${ac_cv_sizeof_short+set}" = set; then *************** *** 9276,9289 **** else if test "$ac_cv_type_short" = yes; then if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF ! #line 9281 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (short)) >= 0)] ; return 0; --- 16280,16303 ---- else if test "$ac_cv_type_short" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. 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 () { ! static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)]; ! test_array [0] = 0 ! ; return 0; *************** *** 9291,9315 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:9293: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:9296: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:9299: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:9302: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF ! #line 9307 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (short)) <= $ac_mid)] ; return 0; --- 16305,16335 ---- _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_lo=0 ac_mid=0 while :; 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. */ $ac_includes_default int main () { ! static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; ! test_array [0] = 0 ! ; return 0; *************** *** 9317,9336 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:9319: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:9322: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:9325: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:9328: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext --- 16337,16362 ---- _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_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.$ac_objext conftest.$ac_ext *************** *** 9338,9352 **** else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF ! #line 9344 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (short)) >= $ac_mid)] ; return 0; --- 16364,16415 ---- else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! 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 () ! { ! static int test_array [1 - 2 * !(((long) (sizeof (short))) < 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>&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 ! #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 () { ! static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)]; ! test_array [0] = 0 ! ; return 0; *************** *** 9354,9376 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:9356: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:9359: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:9362: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:9365: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.$ac_objext conftest.$ac_ext done fi rm -f conftest.$ac_objext conftest.$ac_ext --- 16417,16452 ---- _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_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.$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.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext *************** *** 9379,9389 **** ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF ! #line 9381 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (short)) <= $ac_mid)] ; return 0; --- 16455,16471 ---- ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` 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 () { ! static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; ! test_array [0] = 0 ! ; return 0; *************** *** 9391,9432 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:9393: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:9396: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:9399: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:9402: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_lo=`expr $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done ! ac_cv_sizeof_short=$ac_lo else if test "$cross_compiling" = yes; then ! { { echo "$as_me:9415: error: cannot run test program while cross compiling" >&5 ! echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF ! #line 9420 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! FILE *f = fopen ("conftest.val", "w"); ! if (!f) ! exit (1); ! fprintf (f, "%d", (sizeof (short))); ! fclose (f); ; return 0; --- 16473,16547 ---- _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_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.$ac_objext conftest.$ac_ext done ! case $ac_lo in ! ?*) ac_cv_sizeof_short=$ac_lo;; ! '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 ! See \`config.log' for more details." >&5 ! echo "$as_me: error: cannot compute sizeof (short), 77 ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } ;; ! 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 ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ $ac_includes_default + long longval () { return (long) (sizeof (short)); } + unsigned long ulongval () { return (long) (sizeof (short)); } + #include + #include int main () { ! ! FILE *f = fopen ("conftest.val", "w"); ! if (! f) ! exit (1); ! if (((long) (sizeof (short))) < 0) ! { ! long i = longval (); ! if (i != ((long) (sizeof (short)))) ! exit (1); ! fprintf (f, "%ld\n", i); ! } ! else ! { ! unsigned long i = ulongval (); ! if (i != ((long) (sizeof (short)))) ! exit (1); ! fprintf (f, "%lu\n", i); ! } ! exit (ferror (f) || fclose (f) != 0); ! ; return 0; *************** *** 9434,9446 **** _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:9436: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:9439: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:9441: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:9444: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_short=`cat conftest.val` --- 16549,16561 ---- _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_sizeof_short=`cat conftest.val` *************** *** 9448,9454 **** echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi --- 16563,16576 ---- 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: error: cannot compute sizeof (short), 77 ! See \`config.log' for more details." >&5 ! echo "$as_me: error: cannot compute sizeof (short), 77 ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi *************** *** 9458,9468 **** fi fi ! echo "$as_me:9460: result: $ac_cv_sizeof_short" >&5 echo "${ECHO_T}$ac_cv_sizeof_short" >&6 ! cat >>confdefs.h <&5 echo $ECHO_N "checking for int... $ECHO_C" >&6 if test "${ac_cv_type_int+set}" = set; then --- 16580,16591 ---- fi fi ! echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 echo "${ECHO_T}$ac_cv_sizeof_short" >&6 ! cat >>confdefs.h <<_ACEOF #define SIZEOF_SHORT $ac_cv_sizeof_short ! _ACEOF ! ! echo "$as_me:$LINENO: checking for int" >&5 echo $ECHO_N "checking for int... $ECHO_C" >&6 if test "${ac_cv_type_int+set}" = set; then *************** *** 9470,9475 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 9472 "configure" ! #include "confdefs.h" $ac_includes_default int --- 16593,16602 ---- 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 *************** *** 9485,9511 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:9487: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:9490: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:9493: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:9496: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_int=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_int=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:9506: result: $ac_cv_type_int" >&5 echo "${ECHO_T}$ac_cv_type_int" >&6 ! echo "$as_me:9509: checking size of int" >&5 echo $ECHO_N "checking size of int... $ECHO_C" >&6 if test "${ac_cv_sizeof_int+set}" = set; then --- 16612,16639 ---- _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_int=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_int=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 echo "${ECHO_T}$ac_cv_type_int" >&6 ! echo "$as_me:$LINENO: checking size of int" >&5 echo $ECHO_N "checking size of int... $ECHO_C" >&6 if test "${ac_cv_sizeof_int+set}" = set; then *************** *** 9513,9526 **** else if test "$ac_cv_type_int" = yes; then if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF ! #line 9518 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (int)) >= 0)] ; return 0; --- 16641,16664 ---- else if test "$ac_cv_type_int" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. 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 () { ! static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; ! test_array [0] = 0 ! ; return 0; *************** *** 9528,9552 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:9530: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:9533: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:9536: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:9539: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF ! #line 9544 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)] ; return 0; --- 16666,16696 ---- _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_lo=0 ac_mid=0 while :; 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. */ $ac_includes_default int main () { ! static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; ! test_array [0] = 0 ! ; return 0; *************** *** 9554,9573 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:9556: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:9559: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:9562: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:9565: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext --- 16698,16723 ---- _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_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.$ac_objext conftest.$ac_ext *************** *** 9575,9589 **** else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF ! #line 9581 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (int)) >= $ac_mid)] ; return 0; --- 16725,16776 ---- else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! 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 () ! { ! static int test_array [1 - 2 * !(((long) (sizeof (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>&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 ! #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 () { ! static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; ! test_array [0] = 0 ! ; return 0; *************** *** 9591,9613 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:9593: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:9596: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:9599: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:9602: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.$ac_objext conftest.$ac_ext done fi rm -f conftest.$ac_objext conftest.$ac_ext --- 16778,16813 ---- _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_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.$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.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext *************** *** 9616,9626 **** ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF ! #line 9618 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)] ; return 0; --- 16816,16832 ---- ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` 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 () { ! static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; ! test_array [0] = 0 ! ; return 0; *************** *** 9628,9669 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:9630: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:9633: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:9636: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:9639: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_lo=`expr $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done ! ac_cv_sizeof_int=$ac_lo else if test "$cross_compiling" = yes; then ! { { echo "$as_me:9652: error: cannot run test program while cross compiling" >&5 ! echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF ! #line 9657 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! FILE *f = fopen ("conftest.val", "w"); ! if (!f) ! exit (1); ! fprintf (f, "%d", (sizeof (int))); ! fclose (f); ; return 0; --- 16834,16908 ---- _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_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.$ac_objext conftest.$ac_ext done ! case $ac_lo in ! ?*) ac_cv_sizeof_int=$ac_lo;; ! '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 ! See \`config.log' for more details." >&5 ! echo "$as_me: error: cannot compute sizeof (int), 77 ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } ;; ! 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 ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ $ac_includes_default + long longval () { return (long) (sizeof (int)); } + unsigned long ulongval () { return (long) (sizeof (int)); } + #include + #include int main () { ! ! FILE *f = fopen ("conftest.val", "w"); ! if (! f) ! exit (1); ! if (((long) (sizeof (int))) < 0) ! { ! long i = longval (); ! if (i != ((long) (sizeof (int)))) ! exit (1); ! fprintf (f, "%ld\n", i); ! } ! else ! { ! unsigned long i = ulongval (); ! if (i != ((long) (sizeof (int)))) ! exit (1); ! fprintf (f, "%lu\n", i); ! } ! exit (ferror (f) || fclose (f) != 0); ! ; return 0; *************** *** 9671,9683 **** _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:9673: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:9676: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:9678: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:9681: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_int=`cat conftest.val` --- 16910,16922 ---- _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_sizeof_int=`cat conftest.val` *************** *** 9685,9691 **** echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi --- 16924,16937 ---- 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: error: cannot compute sizeof (int), 77 ! See \`config.log' for more details." >&5 ! echo "$as_me: error: cannot compute sizeof (int), 77 ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi *************** *** 9695,9705 **** fi fi ! echo "$as_me:9697: result: $ac_cv_sizeof_int" >&5 echo "${ECHO_T}$ac_cv_sizeof_int" >&6 ! cat >>confdefs.h <&5 echo $ECHO_N "checking for long... $ECHO_C" >&6 if test "${ac_cv_type_long+set}" = set; then --- 16941,16952 ---- fi fi ! echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 echo "${ECHO_T}$ac_cv_sizeof_int" >&6 ! cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int ! _ACEOF ! ! echo "$as_me:$LINENO: checking for long" >&5 echo $ECHO_N "checking for long... $ECHO_C" >&6 if test "${ac_cv_type_long+set}" = set; then *************** *** 9707,9712 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 9709 "configure" ! #include "confdefs.h" $ac_includes_default int --- 16954,16963 ---- 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 *************** *** 9722,9748 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:9724: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:9727: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:9730: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:9733: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_long=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_long=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:9743: result: $ac_cv_type_long" >&5 echo "${ECHO_T}$ac_cv_type_long" >&6 ! echo "$as_me:9746: checking size of long" >&5 echo $ECHO_N "checking size of long... $ECHO_C" >&6 if test "${ac_cv_sizeof_long+set}" = set; then --- 16973,17000 ---- _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_long=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_long=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 echo "${ECHO_T}$ac_cv_type_long" >&6 ! echo "$as_me:$LINENO: checking size of long" >&5 echo $ECHO_N "checking size of long... $ECHO_C" >&6 if test "${ac_cv_sizeof_long+set}" = set; then *************** *** 9750,9763 **** else if test "$ac_cv_type_long" = yes; then if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF ! #line 9755 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (long)) >= 0)] ; return 0; --- 17002,17025 ---- else if test "$ac_cv_type_long" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. 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 () { ! static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; ! test_array [0] = 0 ! ; return 0; *************** *** 9765,9789 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:9767: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:9770: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:9773: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:9776: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF ! #line 9781 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)] ; return 0; --- 17027,17057 ---- _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_lo=0 ac_mid=0 while :; 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. */ $ac_includes_default int main () { ! static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; ! test_array [0] = 0 ! ; return 0; *************** *** 9791,9810 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:9793: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:9796: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:9799: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:9802: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext --- 17059,17084 ---- _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_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.$ac_objext conftest.$ac_ext *************** *** 9812,9826 **** else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF ! #line 9818 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (long)) >= $ac_mid)] ; return 0; --- 17086,17137 ---- else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! 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 () ! { ! static int test_array [1 - 2 * !(((long) (sizeof (long))) < 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>&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 ! #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 () { ! static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; ! test_array [0] = 0 ! ; return 0; *************** *** 9828,9850 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:9830: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:9833: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:9836: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:9839: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.$ac_objext conftest.$ac_ext done fi rm -f conftest.$ac_objext conftest.$ac_ext --- 17139,17174 ---- _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_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.$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.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext *************** *** 9853,9863 **** ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF ! #line 9855 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)] ; return 0; --- 17177,17193 ---- ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` 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 () { ! static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; ! test_array [0] = 0 ! ; return 0; *************** *** 9865,9906 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:9867: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:9870: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:9873: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:9876: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_lo=`expr $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done ! ac_cv_sizeof_long=$ac_lo else if test "$cross_compiling" = yes; then ! { { echo "$as_me:9889: error: cannot run test program while cross compiling" >&5 ! echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF ! #line 9894 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! FILE *f = fopen ("conftest.val", "w"); ! if (!f) ! exit (1); ! fprintf (f, "%d", (sizeof (long))); ! fclose (f); ; return 0; --- 17195,17269 ---- _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_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.$ac_objext conftest.$ac_ext done ! case $ac_lo in ! ?*) ac_cv_sizeof_long=$ac_lo;; ! '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 ! See \`config.log' for more details." >&5 ! echo "$as_me: error: cannot compute sizeof (long), 77 ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } ;; ! 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 ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ $ac_includes_default + long longval () { return (long) (sizeof (long)); } + unsigned long ulongval () { return (long) (sizeof (long)); } + #include + #include int main () { ! ! FILE *f = fopen ("conftest.val", "w"); ! if (! f) ! exit (1); ! if (((long) (sizeof (long))) < 0) ! { ! long i = longval (); ! if (i != ((long) (sizeof (long)))) ! exit (1); ! fprintf (f, "%ld\n", i); ! } ! else ! { ! unsigned long i = ulongval (); ! if (i != ((long) (sizeof (long)))) ! exit (1); ! fprintf (f, "%lu\n", i); ! } ! exit (ferror (f) || fclose (f) != 0); ! ; return 0; *************** *** 9908,9920 **** _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:9910: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:9913: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:9915: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:9918: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_long=`cat conftest.val` --- 17271,17283 ---- _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_sizeof_long=`cat conftest.val` *************** *** 9922,9928 **** echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi --- 17285,17298 ---- 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: error: cannot compute sizeof (long), 77 ! See \`config.log' for more details." >&5 ! echo "$as_me: error: cannot compute sizeof (long), 77 ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi *************** *** 9932,9942 **** fi fi ! echo "$as_me:9934: result: $ac_cv_sizeof_long" >&5 echo "${ECHO_T}$ac_cv_sizeof_long" >&6 ! cat >>confdefs.h <&5 echo $ECHO_N "checking for char *... $ECHO_C" >&6 if test "${ac_cv_type_char_p+set}" = set; then --- 17302,17313 ---- fi fi ! echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 echo "${ECHO_T}$ac_cv_sizeof_long" >&6 ! cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long ! _ACEOF ! ! echo "$as_me:$LINENO: checking for char *" >&5 echo $ECHO_N "checking for char *... $ECHO_C" >&6 if test "${ac_cv_type_char_p+set}" = set; then *************** *** 9944,9949 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 9946 "configure" ! #include "confdefs.h" $ac_includes_default int --- 17315,17324 ---- 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 *************** *** 9959,9985 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:9961: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:9964: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:9967: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:9970: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_char_p=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_char_p=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:9980: result: $ac_cv_type_char_p" >&5 echo "${ECHO_T}$ac_cv_type_char_p" >&6 ! echo "$as_me:9983: checking size of char *" >&5 echo $ECHO_N "checking size of char *... $ECHO_C" >&6 if test "${ac_cv_sizeof_char_p+set}" = set; then --- 17334,17361 ---- _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_char_p=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_char_p=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_char_p" >&5 echo "${ECHO_T}$ac_cv_type_char_p" >&6 ! echo "$as_me:$LINENO: checking size of char *" >&5 echo $ECHO_N "checking size of char *... $ECHO_C" >&6 if test "${ac_cv_sizeof_char_p+set}" = set; then *************** *** 9987,10000 **** else if test "$ac_cv_type_char_p" = yes; then if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF ! #line 9992 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (char *)) >= 0)] ; return 0; --- 17363,17386 ---- else if test "$ac_cv_type_char_p" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. 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 () { ! static int test_array [1 - 2 * !(((long) (sizeof (char *))) >= 0)]; ! test_array [0] = 0 ! ; return 0; *************** *** 10002,10026 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:10004: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:10007: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:10010: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:10013: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF ! #line 10018 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (char *)) <= $ac_mid)] ; return 0; --- 17388,17418 ---- _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_lo=0 ac_mid=0 while :; 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. */ $ac_includes_default int main () { ! static int test_array [1 - 2 * !(((long) (sizeof (char *))) <= $ac_mid)]; ! test_array [0] = 0 ! ; return 0; *************** *** 10028,10047 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:10030: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:10033: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:10036: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:10039: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext --- 17420,17445 ---- _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_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.$ac_objext conftest.$ac_ext *************** *** 10049,10063 **** else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF ! #line 10055 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (char *)) >= $ac_mid)] ; return 0; --- 17447,17498 ---- else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! 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 () ! { ! static int test_array [1 - 2 * !(((long) (sizeof (char *))) < 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>&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 ! #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 () { ! static int test_array [1 - 2 * !(((long) (sizeof (char *))) >= $ac_mid)]; ! test_array [0] = 0 ! ; return 0; *************** *** 10065,10087 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:10067: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:10070: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:10073: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:10076: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.$ac_objext conftest.$ac_ext done fi rm -f conftest.$ac_objext conftest.$ac_ext --- 17500,17535 ---- _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_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.$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.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext *************** *** 10090,10100 **** ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF ! #line 10092 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (char *)) <= $ac_mid)] ; return 0; --- 17538,17554 ---- ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` 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 () { ! static int test_array [1 - 2 * !(((long) (sizeof (char *))) <= $ac_mid)]; ! test_array [0] = 0 ! ; return 0; *************** *** 10102,10143 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:10104: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:10107: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:10110: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:10113: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_lo=`expr $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done ! ac_cv_sizeof_char_p=$ac_lo else if test "$cross_compiling" = yes; then ! { { echo "$as_me:10126: error: cannot run test program while cross compiling" >&5 ! echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF ! #line 10131 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! FILE *f = fopen ("conftest.val", "w"); ! if (!f) ! exit (1); ! fprintf (f, "%d", (sizeof (char *))); ! fclose (f); ; return 0; --- 17556,17630 ---- _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_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.$ac_objext conftest.$ac_ext done ! case $ac_lo in ! ?*) ac_cv_sizeof_char_p=$ac_lo;; ! '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char *), 77 ! See \`config.log' for more details." >&5 ! echo "$as_me: error: cannot compute sizeof (char *), 77 ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } ;; ! 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 ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ $ac_includes_default + long longval () { return (long) (sizeof (char *)); } + unsigned long ulongval () { return (long) (sizeof (char *)); } + #include + #include int main () { ! ! FILE *f = fopen ("conftest.val", "w"); ! if (! f) ! exit (1); ! if (((long) (sizeof (char *))) < 0) ! { ! long i = longval (); ! if (i != ((long) (sizeof (char *)))) ! exit (1); ! fprintf (f, "%ld\n", i); ! } ! else ! { ! unsigned long i = ulongval (); ! if (i != ((long) (sizeof (char *)))) ! exit (1); ! fprintf (f, "%lu\n", i); ! } ! exit (ferror (f) || fclose (f) != 0); ! ; return 0; *************** *** 10145,10157 **** _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:10147: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:10150: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:10152: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:10155: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_char_p=`cat conftest.val` --- 17632,17644 ---- _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_sizeof_char_p=`cat conftest.val` *************** *** 10159,10165 **** echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi --- 17646,17659 ---- 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: error: cannot compute sizeof (char *), 77 ! See \`config.log' for more details." >&5 ! echo "$as_me: error: cannot compute sizeof (char *), 77 ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi *************** *** 10169,10179 **** fi fi ! echo "$as_me:10171: result: $ac_cv_sizeof_char_p" >&5 echo "${ECHO_T}$ac_cv_sizeof_char_p" >&6 ! cat >>confdefs.h <&5 echo $ECHO_N "checking for double... $ECHO_C" >&6 if test "${ac_cv_type_double+set}" = set; then --- 17663,17674 ---- fi fi ! echo "$as_me:$LINENO: result: $ac_cv_sizeof_char_p" >&5 echo "${ECHO_T}$ac_cv_sizeof_char_p" >&6 ! cat >>confdefs.h <<_ACEOF #define SIZEOF_CHAR_P $ac_cv_sizeof_char_p ! _ACEOF ! ! echo "$as_me:$LINENO: checking for double" >&5 echo $ECHO_N "checking for double... $ECHO_C" >&6 if test "${ac_cv_type_double+set}" = set; then *************** *** 10181,10186 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 10183 "configure" ! #include "confdefs.h" $ac_includes_default int --- 17676,17685 ---- 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 *************** *** 10196,10222 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:10198: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:10201: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:10204: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:10207: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_double=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_double=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:10217: result: $ac_cv_type_double" >&5 echo "${ECHO_T}$ac_cv_type_double" >&6 ! echo "$as_me:10220: checking size of double" >&5 echo $ECHO_N "checking size of double... $ECHO_C" >&6 if test "${ac_cv_sizeof_double+set}" = set; then --- 17695,17722 ---- _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_double=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_double=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5 echo "${ECHO_T}$ac_cv_type_double" >&6 ! echo "$as_me:$LINENO: checking size of double" >&5 echo $ECHO_N "checking size of double... $ECHO_C" >&6 if test "${ac_cv_sizeof_double+set}" = set; then *************** *** 10224,10237 **** else if test "$ac_cv_type_double" = yes; then if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF ! #line 10229 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (double)) >= 0)] ; return 0; --- 17724,17747 ---- else if test "$ac_cv_type_double" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. 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 () { ! static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)]; ! test_array [0] = 0 ! ; return 0; *************** *** 10239,10263 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:10241: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:10244: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:10247: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:10250: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF ! #line 10255 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (double)) <= $ac_mid)] ; return 0; --- 17749,17779 ---- _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_lo=0 ac_mid=0 while :; 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. */ $ac_includes_default int main () { ! static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)]; ! test_array [0] = 0 ! ; return 0; *************** *** 10265,10284 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:10267: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:10270: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:10273: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:10276: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext --- 17781,17806 ---- _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_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.$ac_objext conftest.$ac_ext *************** *** 10286,10300 **** else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF ! #line 10292 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (double)) >= $ac_mid)] ; return 0; --- 17808,17859 ---- else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! 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 () ! { ! static int test_array [1 - 2 * !(((long) (sizeof (double))) < 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>&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 ! #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 () { ! static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)]; ! test_array [0] = 0 ! ; return 0; *************** *** 10302,10324 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:10304: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:10307: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:10310: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:10313: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.$ac_objext conftest.$ac_ext done fi rm -f conftest.$ac_objext conftest.$ac_ext --- 17861,17896 ---- _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_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.$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.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext *************** *** 10327,10337 **** ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF ! #line 10329 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (double)) <= $ac_mid)] ; return 0; --- 17899,17915 ---- ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` 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 () { ! static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)]; ! test_array [0] = 0 ! ; return 0; *************** *** 10339,10380 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:10341: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:10344: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:10347: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:10350: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_lo=`expr $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done ! ac_cv_sizeof_double=$ac_lo else if test "$cross_compiling" = yes; then ! { { echo "$as_me:10363: error: cannot run test program while cross compiling" >&5 ! echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF ! #line 10368 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! FILE *f = fopen ("conftest.val", "w"); ! if (!f) ! exit (1); ! fprintf (f, "%d", (sizeof (double))); ! fclose (f); ; return 0; --- 17917,17991 ---- _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_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.$ac_objext conftest.$ac_ext done ! case $ac_lo in ! ?*) ac_cv_sizeof_double=$ac_lo;; ! '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77 ! See \`config.log' for more details." >&5 ! echo "$as_me: error: cannot compute sizeof (double), 77 ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } ;; ! 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 ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ $ac_includes_default + long longval () { return (long) (sizeof (double)); } + unsigned long ulongval () { return (long) (sizeof (double)); } + #include + #include int main () { ! ! FILE *f = fopen ("conftest.val", "w"); ! if (! f) ! exit (1); ! if (((long) (sizeof (double))) < 0) ! { ! long i = longval (); ! if (i != ((long) (sizeof (double)))) ! exit (1); ! fprintf (f, "%ld\n", i); ! } ! else ! { ! unsigned long i = ulongval (); ! if (i != ((long) (sizeof (double)))) ! exit (1); ! fprintf (f, "%lu\n", i); ! } ! exit (ferror (f) || fclose (f) != 0); ! ; return 0; *************** *** 10382,10394 **** _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:10384: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:10387: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:10389: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:10392: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_double=`cat conftest.val` --- 17993,18005 ---- _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_sizeof_double=`cat conftest.val` *************** *** 10396,10402 **** echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi --- 18007,18020 ---- 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: error: cannot compute sizeof (double), 77 ! See \`config.log' for more details." >&5 ! echo "$as_me: error: cannot compute sizeof (double), 77 ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi *************** *** 10406,10416 **** fi fi ! echo "$as_me:10408: result: $ac_cv_sizeof_double" >&5 echo "${ECHO_T}$ac_cv_sizeof_double" >&6 ! cat >>confdefs.h <&5 echo $ECHO_N "checking for long long... $ECHO_C" >&6 if test "${ac_cv_type_long_long+set}" = set; then --- 18024,18035 ---- fi fi ! echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5 echo "${ECHO_T}$ac_cv_sizeof_double" >&6 ! cat >>confdefs.h <<_ACEOF #define SIZEOF_DOUBLE $ac_cv_sizeof_double ! _ACEOF ! ! 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 *************** *** 10418,10423 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 10420 "configure" ! #include "confdefs.h" $ac_includes_default int --- 18037,18046 ---- 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 *************** *** 10433,10459 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:10435: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:10438: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:10441: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:10444: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_long_long=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_long_long=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:10454: result: $ac_cv_type_long_long" >&5 echo "${ECHO_T}$ac_cv_type_long_long" >&6 ! echo "$as_me:10457: checking size of long long" >&5 echo $ECHO_N "checking size of long long... $ECHO_C" >&6 if test "${ac_cv_sizeof_long_long+set}" = set; then --- 18056,18083 ---- _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_long_long=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_long_long=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 echo "${ECHO_T}$ac_cv_type_long_long" >&6 ! echo "$as_me:$LINENO: checking size of long long" >&5 echo $ECHO_N "checking size of long long... $ECHO_C" >&6 if test "${ac_cv_sizeof_long_long+set}" = set; then *************** *** 10461,10474 **** else if test "$ac_cv_type_long_long" = yes; then if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF ! #line 10466 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (long long)) >= 0)] ; return 0; --- 18085,18108 ---- else if test "$ac_cv_type_long_long" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. 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 () { ! static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)]; ! test_array [0] = 0 ! ; return 0; *************** *** 10476,10500 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:10478: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:10481: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:10484: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:10487: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF ! #line 10492 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (long long)) <= $ac_mid)] ; return 0; --- 18110,18140 ---- _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_lo=0 ac_mid=0 while :; 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. */ $ac_includes_default int main () { ! static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; ! test_array [0] = 0 ! ; return 0; *************** *** 10502,10521 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:10504: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:10507: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:10510: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:10513: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext --- 18142,18167 ---- _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_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.$ac_objext conftest.$ac_ext *************** *** 10523,10537 **** else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF ! #line 10529 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (long long)) >= $ac_mid)] ; return 0; --- 18169,18220 ---- else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! 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 () ! { ! static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 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>&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 ! #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 () { ! static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)]; ! test_array [0] = 0 ! ; return 0; *************** *** 10539,10561 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:10541: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:10544: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:10547: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:10550: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.$ac_objext conftest.$ac_ext done fi rm -f conftest.$ac_objext conftest.$ac_ext --- 18222,18257 ---- _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_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.$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.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext *************** *** 10564,10574 **** ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF ! #line 10566 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! int _array_ [1 - 2 * !((sizeof (long long)) <= $ac_mid)] ; return 0; --- 18260,18276 ---- ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` 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 () { ! static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; ! test_array [0] = 0 ! ; return 0; *************** *** 10576,10617 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:10578: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:10581: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:10584: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:10587: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_lo=`expr $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done ! ac_cv_sizeof_long_long=$ac_lo else if test "$cross_compiling" = yes; then ! { { echo "$as_me:10600: error: cannot run test program while cross compiling" >&5 ! echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF ! #line 10605 "configure" ! #include "confdefs.h" $ac_includes_default int main () { ! FILE *f = fopen ("conftest.val", "w"); ! if (!f) ! exit (1); ! fprintf (f, "%d", (sizeof (long long))); ! fclose (f); ; return 0; --- 18278,18352 ---- _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_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.$ac_objext conftest.$ac_ext done ! case $ac_lo in ! ?*) ac_cv_sizeof_long_long=$ac_lo;; ! '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 ! See \`config.log' for more details." >&5 ! echo "$as_me: error: cannot compute sizeof (long long), 77 ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } ;; ! 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 ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ $ac_includes_default + long longval () { return (long) (sizeof (long long)); } + unsigned long ulongval () { return (long) (sizeof (long long)); } + #include + #include int main () { ! ! FILE *f = fopen ("conftest.val", "w"); ! if (! f) ! exit (1); ! if (((long) (sizeof (long long))) < 0) ! { ! long i = longval (); ! if (i != ((long) (sizeof (long long)))) ! exit (1); ! fprintf (f, "%ld\n", i); ! } ! else ! { ! unsigned long i = ulongval (); ! if (i != ((long) (sizeof (long long)))) ! exit (1); ! fprintf (f, "%lu\n", i); ! } ! exit (ferror (f) || fclose (f) != 0); ! ; return 0; *************** *** 10619,10631 **** _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:10621: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:10624: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:10626: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:10629: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_long_long=`cat conftest.val` --- 18354,18366 ---- _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_sizeof_long_long=`cat conftest.val` *************** *** 10633,10639 **** echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi --- 18368,18381 ---- 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: error: cannot compute sizeof (long long), 77 ! See \`config.log' for more details." >&5 ! echo "$as_me: error: cannot compute sizeof (long long), 77 ! See \`config.log' for more details." >&2;} ! { (exit 1); exit 1; }; } fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi *************** *** 10643,10653 **** fi fi ! echo "$as_me:10645: result: $ac_cv_sizeof_long_long" >&5 echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 ! cat >>confdefs.h <&5 echo $ECHO_N "checking for u_int... $ECHO_C" >&6 if test "${ac_cv_type_u_int+set}" = set; then --- 18385,18397 ---- fi fi ! echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 ! cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long ! _ACEOF ! ! ! echo "$as_me:$LINENO: checking for u_int" >&5 echo $ECHO_N "checking for u_int... $ECHO_C" >&6 if test "${ac_cv_type_u_int+set}" = set; then *************** *** 10655,10660 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 10657 "configure" ! #include "confdefs.h" $ac_includes_default int --- 18399,18408 ---- 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 *************** *** 10670,10693 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:10672: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:10675: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:10678: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:10681: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_u_int=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_u_int=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:10691: result: $ac_cv_type_u_int" >&5 echo "${ECHO_T}$ac_cv_type_u_int" >&6 if test $ac_cv_type_u_int = yes; then --- 18418,18442 ---- _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_u_int=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_u_int=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_u_int" >&5 echo "${ECHO_T}$ac_cv_type_u_int" >&6 if test $ac_cv_type_u_int = yes; then *************** *** 10695,10705 **** else ! cat >>confdefs.h <&5 echo $ECHO_N "checking for u_long... $ECHO_C" >&6 if test "${ac_cv_type_u_long+set}" = set; then --- 18444,18454 ---- else ! cat >>confdefs.h <<_ACEOF #define u_int unsigned int ! _ACEOF fi ! echo "$as_me:$LINENO: checking for u_long" >&5 echo $ECHO_N "checking for u_long... $ECHO_C" >&6 if test "${ac_cv_type_u_long+set}" = set; then *************** *** 10707,10712 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 10709 "configure" ! #include "confdefs.h" $ac_includes_default int --- 18456,18465 ---- 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 *************** *** 10722,10745 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:10724: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:10727: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:10730: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:10733: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_u_long=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_u_long=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:10743: result: $ac_cv_type_u_long" >&5 echo "${ECHO_T}$ac_cv_type_u_long" >&6 if test $ac_cv_type_u_long = yes; then --- 18475,18499 ---- _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_u_long=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_u_long=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_u_long" >&5 echo "${ECHO_T}$ac_cv_type_u_long" >&6 if test $ac_cv_type_u_long = yes; then *************** *** 10747,10758 **** else ! cat >>confdefs.h <&5 echo $ECHO_N "checking for bits16_t... $ECHO_C" >&6 if test "${ac_cv_type_bits16_t+set}" = set; then --- 18501,18514 ---- else ! cat >>confdefs.h <<_ACEOF #define u_long unsigned long ! _ACEOF fi + + if test "$ac_cv_sizeof_short" = 2; then ! echo "$as_me:$LINENO: checking for bits16_t" >&5 echo $ECHO_N "checking for bits16_t... $ECHO_C" >&6 if test "${ac_cv_type_bits16_t+set}" = set; then *************** *** 10760,10765 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 10762 "configure" ! #include "confdefs.h" $ac_includes_default int --- 18516,18525 ---- 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 *************** *** 10775,10798 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:10777: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:10780: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:10783: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:10786: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_bits16_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_bits16_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:10796: result: $ac_cv_type_bits16_t" >&5 echo "${ECHO_T}$ac_cv_type_bits16_t" >&6 if test $ac_cv_type_bits16_t = yes; then --- 18535,18559 ---- _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_bits16_t=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_bits16_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_bits16_t" >&5 echo "${ECHO_T}$ac_cv_type_bits16_t" >&6 if test $ac_cv_type_bits16_t = yes; then *************** *** 10800,10811 **** else ! cat >>confdefs.h <&5 echo $ECHO_N "checking for bits16_t... $ECHO_C" >&6 if test "${ac_cv_type_bits16_t+set}" = set; then --- 18561,18572 ---- else ! cat >>confdefs.h <<_ACEOF #define bits16_t short ! _ACEOF fi elif test "$ac_cv_sizeof_char" = 2; then ! echo "$as_me:$LINENO: checking for bits16_t" >&5 echo $ECHO_N "checking for bits16_t... $ECHO_C" >&6 if test "${ac_cv_type_bits16_t+set}" = set; then *************** *** 10813,10818 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 10815 "configure" ! #include "confdefs.h" $ac_includes_default int --- 18574,18583 ---- 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 *************** *** 10828,10851 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:10830: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:10833: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:10836: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:10839: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_bits16_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_bits16_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:10849: result: $ac_cv_type_bits16_t" >&5 echo "${ECHO_T}$ac_cv_type_bits16_t" >&6 if test $ac_cv_type_bits16_t = yes; then --- 18593,18617 ---- _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_bits16_t=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_bits16_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_bits16_t" >&5 echo "${ECHO_T}$ac_cv_type_bits16_t" >&6 if test $ac_cv_type_bits16_t = yes; then *************** *** 10853,10864 **** else ! cat >>confdefs.h <&5 echo $ECHO_N "checking for bits16_t... $ECHO_C" >&6 if test "${ac_cv_type_bits16_t+set}" = set; then --- 18619,18630 ---- else ! cat >>confdefs.h <<_ACEOF #define bits16_t char ! _ACEOF fi else ! echo "$as_me:$LINENO: checking for bits16_t" >&5 echo $ECHO_N "checking for bits16_t... $ECHO_C" >&6 if test "${ac_cv_type_bits16_t+set}" = set; then *************** *** 10866,10871 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 10868 "configure" ! #include "confdefs.h" $ac_includes_default int --- 18632,18641 ---- 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 *************** *** 10881,10904 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:10883: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:10886: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:10889: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:10892: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_bits16_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_bits16_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:10902: result: $ac_cv_type_bits16_t" >&5 echo "${ECHO_T}$ac_cv_type_bits16_t" >&6 if test $ac_cv_type_bits16_t = yes; then --- 18651,18675 ---- _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_bits16_t=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_bits16_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_bits16_t" >&5 echo "${ECHO_T}$ac_cv_type_bits16_t" >&6 if test $ac_cv_type_bits16_t = yes; then *************** *** 10906,10912 **** else ! cat >>confdefs.h <>confdefs.h <<_ACEOF #define bits16_t short ! _ACEOF fi *************** *** 10914,10919 **** fi if test "$ac_cv_sizeof_short" = 2; then ! echo "$as_me:10917: checking for u_bits16_t" >&5 echo $ECHO_N "checking for u_bits16_t... $ECHO_C" >&6 if test "${ac_cv_type_u_bits16_t+set}" = set; then --- 18685,18691 ---- fi + if test "$ac_cv_sizeof_short" = 2; then ! echo "$as_me:$LINENO: checking for u_bits16_t" >&5 echo $ECHO_N "checking for u_bits16_t... $ECHO_C" >&6 if test "${ac_cv_type_u_bits16_t+set}" = set; then *************** *** 10921,10926 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 10923 "configure" ! #include "confdefs.h" $ac_includes_default int --- 18693,18702 ---- 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 *************** *** 10936,10959 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:10938: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:10941: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:10944: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:10947: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_u_bits16_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_u_bits16_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:10957: result: $ac_cv_type_u_bits16_t" >&5 echo "${ECHO_T}$ac_cv_type_u_bits16_t" >&6 if test $ac_cv_type_u_bits16_t = yes; then --- 18712,18736 ---- _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_u_bits16_t=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_u_bits16_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_u_bits16_t" >&5 echo "${ECHO_T}$ac_cv_type_u_bits16_t" >&6 if test $ac_cv_type_u_bits16_t = yes; then *************** *** 10961,10972 **** else ! cat >>confdefs.h <&5 echo $ECHO_N "checking for u_bits16_t... $ECHO_C" >&6 if test "${ac_cv_type_u_bits16_t+set}" = set; then --- 18738,18749 ---- else ! cat >>confdefs.h <<_ACEOF #define u_bits16_t unsigned short ! _ACEOF fi elif test "$ac_cv_sizeof_char" = 2; then ! echo "$as_me:$LINENO: checking for u_bits16_t" >&5 echo $ECHO_N "checking for u_bits16_t... $ECHO_C" >&6 if test "${ac_cv_type_u_bits16_t+set}" = set; then *************** *** 10974,10979 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 10976 "configure" ! #include "confdefs.h" $ac_includes_default int --- 18751,18760 ---- 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 *************** *** 10989,11012 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:10991: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:10994: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:10997: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:11000: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_u_bits16_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_u_bits16_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:11010: result: $ac_cv_type_u_bits16_t" >&5 echo "${ECHO_T}$ac_cv_type_u_bits16_t" >&6 if test $ac_cv_type_u_bits16_t = yes; then --- 18770,18794 ---- _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_u_bits16_t=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_u_bits16_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_u_bits16_t" >&5 echo "${ECHO_T}$ac_cv_type_u_bits16_t" >&6 if test $ac_cv_type_u_bits16_t = yes; then *************** *** 11014,11025 **** else ! cat >>confdefs.h <&5 echo $ECHO_N "checking for u_bits16_t... $ECHO_C" >&6 if test "${ac_cv_type_u_bits16_t+set}" = set; then --- 18796,18807 ---- else ! cat >>confdefs.h <<_ACEOF #define u_bits16_t unsigned char ! _ACEOF fi else ! echo "$as_me:$LINENO: checking for u_bits16_t" >&5 echo $ECHO_N "checking for u_bits16_t... $ECHO_C" >&6 if test "${ac_cv_type_u_bits16_t+set}" = set; then *************** *** 11027,11032 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 11029 "configure" ! #include "confdefs.h" $ac_includes_default int --- 18809,18818 ---- 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 *************** *** 11042,11065 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:11044: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:11047: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:11050: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:11053: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_u_bits16_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_u_bits16_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:11063: result: $ac_cv_type_u_bits16_t" >&5 echo "${ECHO_T}$ac_cv_type_u_bits16_t" >&6 if test $ac_cv_type_u_bits16_t = yes; then --- 18828,18852 ---- _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_u_bits16_t=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_u_bits16_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_u_bits16_t" >&5 echo "${ECHO_T}$ac_cv_type_u_bits16_t" >&6 if test $ac_cv_type_u_bits16_t = yes; then *************** *** 11067,11073 **** else ! cat >>confdefs.h <>confdefs.h <<_ACEOF #define u_bits16_t unsigned short ! _ACEOF fi *************** *** 11075,11080 **** fi if test "$ac_cv_sizeof_int" = 4; then ! echo "$as_me:11078: checking for bits32_t" >&5 echo $ECHO_N "checking for bits32_t... $ECHO_C" >&6 if test "${ac_cv_type_bits32_t+set}" = set; then --- 18862,18868 ---- fi + if test "$ac_cv_sizeof_int" = 4; then ! echo "$as_me:$LINENO: checking for bits32_t" >&5 echo $ECHO_N "checking for bits32_t... $ECHO_C" >&6 if test "${ac_cv_type_bits32_t+set}" = set; then *************** *** 11082,11087 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 11084 "configure" ! #include "confdefs.h" $ac_includes_default int --- 18870,18879 ---- 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 *************** *** 11097,11120 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:11099: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:11102: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:11105: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:11108: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_bits32_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_bits32_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:11118: result: $ac_cv_type_bits32_t" >&5 echo "${ECHO_T}$ac_cv_type_bits32_t" >&6 if test $ac_cv_type_bits32_t = yes; then --- 18889,18913 ---- _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_bits32_t=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_bits32_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_bits32_t" >&5 echo "${ECHO_T}$ac_cv_type_bits32_t" >&6 if test $ac_cv_type_bits32_t = yes; then *************** *** 11122,11133 **** else ! cat >>confdefs.h <&5 echo $ECHO_N "checking for bits32_t... $ECHO_C" >&6 if test "${ac_cv_type_bits32_t+set}" = set; then --- 18915,18926 ---- else ! cat >>confdefs.h <<_ACEOF #define bits32_t int ! _ACEOF fi elif test "$ac_cv_sizeof_long" = 4; then ! echo "$as_me:$LINENO: checking for bits32_t" >&5 echo $ECHO_N "checking for bits32_t... $ECHO_C" >&6 if test "${ac_cv_type_bits32_t+set}" = set; then *************** *** 11135,11140 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 11137 "configure" ! #include "confdefs.h" $ac_includes_default int --- 18928,18937 ---- 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 *************** *** 11150,11173 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:11152: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:11155: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:11158: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:11161: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_bits32_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_bits32_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:11171: result: $ac_cv_type_bits32_t" >&5 echo "${ECHO_T}$ac_cv_type_bits32_t" >&6 if test $ac_cv_type_bits32_t = yes; then --- 18947,18971 ---- _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_bits32_t=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_bits32_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_bits32_t" >&5 echo "${ECHO_T}$ac_cv_type_bits32_t" >&6 if test $ac_cv_type_bits32_t = yes; then *************** *** 11175,11186 **** else ! cat >>confdefs.h <&5 echo $ECHO_N "checking for bits32_t... $ECHO_C" >&6 if test "${ac_cv_type_bits32_t+set}" = set; then --- 18973,18984 ---- else ! cat >>confdefs.h <<_ACEOF #define bits32_t long ! _ACEOF fi else ! echo "$as_me:$LINENO: checking for bits32_t" >&5 echo $ECHO_N "checking for bits32_t... $ECHO_C" >&6 if test "${ac_cv_type_bits32_t+set}" = set; then *************** *** 11188,11193 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 11190 "configure" ! #include "confdefs.h" $ac_includes_default int --- 18986,18995 ---- 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 *************** *** 11203,11226 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:11205: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:11208: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:11211: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:11214: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_bits32_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_bits32_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:11224: result: $ac_cv_type_bits32_t" >&5 echo "${ECHO_T}$ac_cv_type_bits32_t" >&6 if test $ac_cv_type_bits32_t = yes; then --- 19005,19029 ---- _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_bits32_t=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_bits32_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_bits32_t" >&5 echo "${ECHO_T}$ac_cv_type_bits32_t" >&6 if test $ac_cv_type_bits32_t = yes; then *************** *** 11228,11234 **** else ! cat >>confdefs.h <>confdefs.h <<_ACEOF #define bits32_t int ! _ACEOF fi *************** *** 11236,11241 **** fi if test "$ac_cv_sizeof_int" = 4; then ! echo "$as_me:11239: checking for u_bits32_t" >&5 echo $ECHO_N "checking for u_bits32_t... $ECHO_C" >&6 if test "${ac_cv_type_u_bits32_t+set}" = set; then --- 19039,19045 ---- fi + if test "$ac_cv_sizeof_int" = 4; then ! echo "$as_me:$LINENO: checking for u_bits32_t" >&5 echo $ECHO_N "checking for u_bits32_t... $ECHO_C" >&6 if test "${ac_cv_type_u_bits32_t+set}" = set; then *************** *** 11243,11248 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 11245 "configure" ! #include "confdefs.h" $ac_includes_default int --- 19047,19056 ---- 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 *************** *** 11258,11281 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:11260: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:11263: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:11266: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:11269: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_u_bits32_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_u_bits32_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:11279: result: $ac_cv_type_u_bits32_t" >&5 echo "${ECHO_T}$ac_cv_type_u_bits32_t" >&6 if test $ac_cv_type_u_bits32_t = yes; then --- 19066,19090 ---- _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_u_bits32_t=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_u_bits32_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_u_bits32_t" >&5 echo "${ECHO_T}$ac_cv_type_u_bits32_t" >&6 if test $ac_cv_type_u_bits32_t = yes; then *************** *** 11283,11294 **** else ! cat >>confdefs.h <&5 echo $ECHO_N "checking for u_bits32_t... $ECHO_C" >&6 if test "${ac_cv_type_u_bits32_t+set}" = set; then --- 19092,19103 ---- else ! cat >>confdefs.h <<_ACEOF #define u_bits32_t unsigned int ! _ACEOF fi elif test "$ac_cv_sizeof_long" = 4; then ! echo "$as_me:$LINENO: checking for u_bits32_t" >&5 echo $ECHO_N "checking for u_bits32_t... $ECHO_C" >&6 if test "${ac_cv_type_u_bits32_t+set}" = set; then *************** *** 11296,11301 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 11298 "configure" ! #include "confdefs.h" $ac_includes_default int --- 19105,19114 ---- 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 *************** *** 11311,11334 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:11313: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:11316: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:11319: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:11322: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_u_bits32_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_u_bits32_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:11332: result: $ac_cv_type_u_bits32_t" >&5 echo "${ECHO_T}$ac_cv_type_u_bits32_t" >&6 if test $ac_cv_type_u_bits32_t = yes; then --- 19124,19148 ---- _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_u_bits32_t=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_u_bits32_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_u_bits32_t" >&5 echo "${ECHO_T}$ac_cv_type_u_bits32_t" >&6 if test $ac_cv_type_u_bits32_t = yes; then *************** *** 11336,11347 **** else ! cat >>confdefs.h <&5 echo $ECHO_N "checking for u_bits32_t... $ECHO_C" >&6 if test "${ac_cv_type_u_bits32_t+set}" = set; then --- 19150,19161 ---- else ! cat >>confdefs.h <<_ACEOF #define u_bits32_t unsigned long ! _ACEOF fi else ! echo "$as_me:$LINENO: checking for u_bits32_t" >&5 echo $ECHO_N "checking for u_bits32_t... $ECHO_C" >&6 if test "${ac_cv_type_u_bits32_t+set}" = set; then *************** *** 11349,11354 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 11351 "configure" ! #include "confdefs.h" $ac_includes_default int --- 19163,19172 ---- 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 *************** *** 11364,11387 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:11366: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:11369: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:11372: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:11375: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_u_bits32_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_u_bits32_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:11385: result: $ac_cv_type_u_bits32_t" >&5 echo "${ECHO_T}$ac_cv_type_u_bits32_t" >&6 if test $ac_cv_type_u_bits32_t = yes; then --- 19182,19206 ---- _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_u_bits32_t=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_u_bits32_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_u_bits32_t" >&5 echo "${ECHO_T}$ac_cv_type_u_bits32_t" >&6 if test $ac_cv_type_u_bits32_t = yes; then *************** *** 11389,11395 **** else ! cat >>confdefs.h <>confdefs.h <<_ACEOF #define u_bits32_t unsigned int ! _ACEOF fi *************** *** 11397,11402 **** fi if test "$ac_cv_sizeof_char_p" = 8; then ! echo "$as_me:11400: checking for bits64_t" >&5 echo $ECHO_N "checking for bits64_t... $ECHO_C" >&6 if test "${ac_cv_type_bits64_t+set}" = set; then --- 19216,19222 ---- fi + if test "$ac_cv_sizeof_char_p" = 8; then ! echo "$as_me:$LINENO: checking for bits64_t" >&5 echo $ECHO_N "checking for bits64_t... $ECHO_C" >&6 if test "${ac_cv_type_bits64_t+set}" = set; then *************** *** 11404,11409 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 11406 "configure" ! #include "confdefs.h" $ac_includes_default int --- 19224,19233 ---- 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 *************** *** 11419,11442 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:11421: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:11424: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:11427: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:11430: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_bits64_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_bits64_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:11440: result: $ac_cv_type_bits64_t" >&5 echo "${ECHO_T}$ac_cv_type_bits64_t" >&6 if test $ac_cv_type_bits64_t = yes; then --- 19243,19267 ---- _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_bits64_t=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_bits64_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_bits64_t" >&5 echo "${ECHO_T}$ac_cv_type_bits64_t" >&6 if test $ac_cv_type_bits64_t = yes; then *************** *** 11444,11455 **** else ! cat >>confdefs.h <&5 echo $ECHO_N "checking for bits64_t... $ECHO_C" >&6 if test "${ac_cv_type_bits64_t+set}" = set; then --- 19269,19280 ---- else ! cat >>confdefs.h <<_ACEOF #define bits64_t char * ! _ACEOF fi elif test "$ac_cv_sizeof_double" = 8; then ! echo "$as_me:$LINENO: checking for bits64_t" >&5 echo $ECHO_N "checking for bits64_t... $ECHO_C" >&6 if test "${ac_cv_type_bits64_t+set}" = set; then *************** *** 11457,11462 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 11459 "configure" ! #include "confdefs.h" $ac_includes_default int --- 19282,19291 ---- 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 *************** *** 11472,11495 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:11474: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:11477: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:11480: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:11483: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_bits64_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_bits64_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:11493: result: $ac_cv_type_bits64_t" >&5 echo "${ECHO_T}$ac_cv_type_bits64_t" >&6 if test $ac_cv_type_bits64_t = yes; then --- 19301,19325 ---- _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_bits64_t=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_bits64_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_bits64_t" >&5 echo "${ECHO_T}$ac_cv_type_bits64_t" >&6 if test $ac_cv_type_bits64_t = yes; then *************** *** 11497,11508 **** else ! cat >>confdefs.h <&5 echo $ECHO_N "checking for bits64_t... $ECHO_C" >&6 if test "${ac_cv_type_bits64_t+set}" = set; then --- 19327,19338 ---- else ! cat >>confdefs.h <<_ACEOF #define bits64_t double ! _ACEOF fi elif test -n "$ac_cv_type_long_long" && test "$ac_cv_sizeof_long_long" = 8; then ! echo "$as_me:$LINENO: checking for bits64_t" >&5 echo $ECHO_N "checking for bits64_t... $ECHO_C" >&6 if test "${ac_cv_type_bits64_t+set}" = set; then *************** *** 11510,11515 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 11512 "configure" ! #include "confdefs.h" $ac_includes_default int --- 19340,19349 ---- 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 *************** *** 11525,11548 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:11527: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:11530: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:11533: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:11536: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_bits64_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_bits64_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:11546: result: $ac_cv_type_bits64_t" >&5 echo "${ECHO_T}$ac_cv_type_bits64_t" >&6 if test $ac_cv_type_bits64_t = yes; then --- 19359,19383 ---- _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_bits64_t=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_bits64_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_bits64_t" >&5 echo "${ECHO_T}$ac_cv_type_bits64_t" >&6 if test $ac_cv_type_bits64_t = yes; then *************** *** 11550,11561 **** else ! cat >>confdefs.h <&5 echo $ECHO_N "checking for bits64_t... $ECHO_C" >&6 if test "${ac_cv_type_bits64_t+set}" = set; then --- 19385,19396 ---- else ! cat >>confdefs.h <<_ACEOF #define bits64_t long long ! _ACEOF fi elif test "$ac_cv_sizeof_long" = 8; then ! echo "$as_me:$LINENO: checking for bits64_t" >&5 echo $ECHO_N "checking for bits64_t... $ECHO_C" >&6 if test "${ac_cv_type_bits64_t+set}" = set; then *************** *** 11563,11568 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 11565 "configure" ! #include "confdefs.h" $ac_includes_default int --- 19398,19407 ---- 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 *************** *** 11578,11601 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:11580: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:11583: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:11586: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:11589: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_bits64_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_bits64_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:11599: result: $ac_cv_type_bits64_t" >&5 echo "${ECHO_T}$ac_cv_type_bits64_t" >&6 if test $ac_cv_type_bits64_t = yes; then --- 19417,19441 ---- _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_bits64_t=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_bits64_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_bits64_t" >&5 echo "${ECHO_T}$ac_cv_type_bits64_t" >&6 if test $ac_cv_type_bits64_t = yes; then *************** *** 11603,11614 **** else ! cat >>confdefs.h <&5 echo $ECHO_N "checking for bits64_t... $ECHO_C" >&6 if test "${ac_cv_type_bits64_t+set}" = set; then --- 19443,19454 ---- else ! cat >>confdefs.h <<_ACEOF #define bits64_t long ! _ACEOF fi else ! echo "$as_me:$LINENO: checking for bits64_t" >&5 echo $ECHO_N "checking for bits64_t... $ECHO_C" >&6 if test "${ac_cv_type_bits64_t+set}" = set; then *************** *** 11616,11621 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 11618 "configure" ! #include "confdefs.h" $ac_includes_default int --- 19456,19465 ---- 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 *************** *** 11631,11654 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:11633: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:11636: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:11639: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:11642: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_bits64_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_bits64_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:11652: result: $ac_cv_type_bits64_t" >&5 echo "${ECHO_T}$ac_cv_type_bits64_t" >&6 if test $ac_cv_type_bits64_t = yes; then --- 19475,19499 ---- _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_bits64_t=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type_bits64_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $ac_cv_type_bits64_t" >&5 echo "${ECHO_T}$ac_cv_type_bits64_t" >&6 if test $ac_cv_type_bits64_t = yes; then *************** *** 11656,11662 **** else ! cat >>confdefs.h <>confdefs.h <<_ACEOF #define bits64_t double ! _ACEOF fi *************** *** 11664,11669 **** fi if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then ! echo "$as_me:11667: 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 --- 19509,19516 ---- fi + + if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then ! 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 *************** *** 11671,11676 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 11673 "configure" ! #include "confdefs.h" $ac_includes_default int --- 19518,19527 ---- 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 *************** *** 11686,11709 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:11688: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:11691: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:11694: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:11697: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_ptrdiff_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_ptrdiff_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:11707: 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 --- 19537,19561 ---- _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_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.$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 *************** *** 11711,11722 **** else ! cat >>confdefs.h <&5 echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6 if test "${ac_cv_type_ptrdiff_t+set}" = set; then --- 19563,19574 ---- else ! cat >>confdefs.h <<_ACEOF #define ptrdiff_t int ! _ACEOF fi elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then ! 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 *************** *** 11724,11729 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 11726 "configure" ! #include "confdefs.h" $ac_includes_default int --- 19576,19585 ---- 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 *************** *** 11739,11762 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:11741: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:11744: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:11747: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:11750: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_ptrdiff_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_ptrdiff_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:11760: 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 --- 19595,19619 ---- _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_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.$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 *************** *** 11764,11775 **** else ! cat >>confdefs.h <&5 echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6 if test "${ac_cv_type_ptrdiff_t+set}" = set; then --- 19621,19632 ---- else ! cat >>confdefs.h <<_ACEOF #define ptrdiff_t long ! _ACEOF fi elif test "$ac_cv_type_long_long" = yes && test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_char_p"; then ! 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 *************** *** 11777,11782 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 11779 "configure" ! #include "confdefs.h" $ac_includes_default int --- 19634,19643 ---- 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 *************** *** 11792,11815 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:11794: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:11797: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:11800: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:11803: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_ptrdiff_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_ptrdiff_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:11813: 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 --- 19653,19677 ---- _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_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.$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 *************** *** 11817,11828 **** else ! cat >>confdefs.h <&5 echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6 if test "${ac_cv_type_ptrdiff_t+set}" = set; then --- 19679,19690 ---- else ! cat >>confdefs.h <<_ACEOF #define ptrdiff_t long long ! _ACEOF fi else ! 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 *************** *** 11830,11835 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 11832 "configure" ! #include "confdefs.h" $ac_includes_default int --- 19692,19701 ---- 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 *************** *** 11845,11868 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:11847: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:11850: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:11853: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:11856: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_ptrdiff_t=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_type_ptrdiff_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:11866: 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 --- 19711,19735 ---- _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_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.$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 *************** *** 11870,11876 **** else ! cat >>confdefs.h <>confdefs.h <<_ACEOF #define ptrdiff_t int ! _ACEOF fi *************** *** 11878,11882 **** fi ! echo "$as_me:11880: checking whether stat file-mode macros are broken" >&5 echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6 if test "${ac_cv_header_stat_broken+set}" = set; then --- 19745,19750 ---- fi ! ! echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5 echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6 if test "${ac_cv_header_stat_broken+set}" = set; then *************** *** 11884,11889 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 11886 "configure" ! #include "confdefs.h" #include #include --- 19752,19761 ---- 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 *************** *** 11915,11919 **** _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "You lose" >/dev/null 2>&1; then ac_cv_header_stat_broken=yes else --- 19787,19791 ---- _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! $EGREP "You lose" >/dev/null 2>&1; then ac_cv_header_stat_broken=yes else *************** *** 11923,11937 **** fi ! echo "$as_me:11925: result: $ac_cv_header_stat_broken" >&5 echo "${ECHO_T}$ac_cv_header_stat_broken" >&6 if test $ac_cv_header_stat_broken = yes; then ! cat >>confdefs.h <<\EOF #define STAT_MACROS_BROKEN 1 ! EOF fi ! echo "$as_me:11935: checking whether #! works in shell scripts" >&5 echo $ECHO_N "checking whether #! works in shell scripts... $ECHO_C" >&6 if test "${ac_cv_sys_interpreter+set}" = set; then --- 19795,19810 ---- fi ! echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5 echo "${ECHO_T}$ac_cv_header_stat_broken" >&6 if test $ac_cv_header_stat_broken = yes; then ! cat >>confdefs.h <<\_ACEOF #define STAT_MACROS_BROKEN 1 ! _ACEOF fi ! ! echo "$as_me:$LINENO: checking whether #! works in shell scripts" >&5 echo $ECHO_N "checking whether #! works in shell scripts... $ECHO_C" >&6 if test "${ac_cv_sys_interpreter+set}" = set; then *************** *** 11950,11966 **** rm -f conftest fi ! echo "$as_me:11952: result: $ac_cv_sys_interpreter" >&5 echo "${ECHO_T}$ac_cv_sys_interpreter" >&6 interpval=$ac_cv_sys_interpreter if test $ac_cv_sys_interpreter = yes; then ! cat >>confdefs.h <<\EOF #define HAVE_HASH_BANG_EXEC 1 ! EOF fi if test "$ac_cv_func_lstat" = "no"; then ! echo "$as_me:11964: checking for lstat" >&5 echo $ECHO_N "checking for lstat... $ECHO_C" >&6 if test "${bash_cv_func_lstat+set}" = set; then --- 19823,19839 ---- rm -f conftest fi ! echo "$as_me:$LINENO: result: $ac_cv_sys_interpreter" >&5 echo "${ECHO_T}$ac_cv_sys_interpreter" >&6 interpval=$ac_cv_sys_interpreter if test $ac_cv_sys_interpreter = yes; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_HASH_BANG_EXEC 1 ! _ACEOF fi if test "$ac_cv_func_lstat" = "no"; then ! echo "$as_me:$LINENO: checking for lstat" >&5 echo $ECHO_N "checking for lstat... $ECHO_C" >&6 if test "${bash_cv_func_lstat+set}" = set; then *************** *** 11968,11973 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 11970 "configure" ! #include "confdefs.h" #include --- 19841,19850 ---- 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 *************** *** 11983,12017 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:11985: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:11988: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:11991: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:11994: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_func_lstat=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_func_lstat=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:12004: result: $bash_cv_func_lstat" >&5 echo "${ECHO_T}$bash_cv_func_lstat" >&6 if test $bash_cv_func_lstat = yes; then ! cat >>confdefs.h <<\EOF #define HAVE_LSTAT 1 ! EOF fi fi ! echo "$as_me:12015: checking if dup2 fails to clear the close-on-exec flag" >&5 echo $ECHO_N "checking if dup2 fails to clear the close-on-exec flag... $ECHO_C" >&6 if test "${bash_cv_dup2_broken+set}" = set; then --- 19860,19979 ---- _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 bash_cv_func_lstat=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! bash_cv_func_lstat=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $bash_cv_func_lstat" >&5 echo "${ECHO_T}$bash_cv_func_lstat" >&6 if test $bash_cv_func_lstat = yes; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_LSTAT 1 ! _ACEOF ! ! fi ! ! fi ! ! ! echo "$as_me:$LINENO: checking whether the ctype macros accept non-ascii characters" >&5 ! echo $ECHO_N "checking whether the ctype macros accept non-ascii characters... $ECHO_C" >&6 ! if test "${bash_cv_func_ctype_nonascii+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test "$cross_compiling" = yes; then ! { echo "$as_me:$LINENO: WARNING: cannot check ctype macros if cross compiling -- defaulting to no" >&5 ! echo "$as_me: WARNING: cannot check ctype macros if cross compiling -- defaulting to no" >&2;} ! bash_cv_func_ctype_nonascii=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. */ ! ! #ifdef HAVE_LOCALE_H ! #include ! #endif ! #include ! #include ! ! main(c, v) ! int c; ! char *v[]; ! { ! char *deflocale; ! unsigned char x; ! int r1, r2; ! ! #ifdef HAVE_SETLOCALE ! /* We take a shot here. If that locale is not known, try the ! system default. We try this one because '\342' (226) is ! known to be a printable character in that locale. */ ! deflocale = setlocale(LC_ALL, "en_US.ISO8859-1"); ! if (deflocale == 0) ! deflocale = setlocale(LC_ALL, ""); ! #endif + x = '\342'; + r1 = isprint(x); + x -= 128; + r2 = isprint(x); + exit (r1 == 0 || r2 == 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 + bash_cv_func_ctype_nonascii=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 ) + bash_cv_func_ctype_nonascii=no + fi + rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi fi + echo "$as_me:$LINENO: result: $bash_cv_func_ctype_nonascii" >&5 + echo "${ECHO_T}$bash_cv_func_ctype_nonascii" >&6 + if test $bash_cv_func_ctype_nonascii = yes; then + cat >>confdefs.h <<\_ACEOF + #define CTYPE_NON_ASCII 1 + _ACEOF + fi ! echo "$as_me:$LINENO: checking if dup2 fails to clear the close-on-exec flag" >&5 echo $ECHO_N "checking if dup2 fails to clear the close-on-exec flag... $ECHO_C" >&6 if test "${bash_cv_dup2_broken+set}" = set; then *************** *** 12019,12029 **** else if test "$cross_compiling" = yes; then ! { echo "$as_me:12021: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&5 echo "$as_me: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&2;} bash_cv_dup2_broken=no else cat >conftest.$ac_ext <<_ACEOF ! #line 12026 "configure" ! #include "confdefs.h" #include --- 19981,19995 ---- else if test "$cross_compiling" = yes; then ! { echo "$as_me:$LINENO: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&5 echo "$as_me: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&2;} bash_cv_dup2_broken=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. */ #include *************** *** 12045,12057 **** _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:12047: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:12050: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:12052: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:12055: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_dup2_broken=yes --- 20011,20023 ---- _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 bash_cv_dup2_broken=yes *************** *** 12059,12080 **** echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_dup2_broken=no fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:12069: result: $bash_cv_dup2_broken" >&5 echo "${ECHO_T}$bash_cv_dup2_broken" >&6 if test $bash_cv_dup2_broken = yes; then ! cat >>confdefs.h <<\EOF #define DUP2_BROKEN 1 ! EOF fi ! echo "$as_me:12078: checking whether pgrps need synchronization" >&5 echo $ECHO_N "checking whether pgrps need synchronization... $ECHO_C" >&6 if test "${bash_cv_pgrp_pipe+set}" = set; then --- 20025,20049 ---- 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 ) bash_cv_dup2_broken=no fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:$LINENO: result: $bash_cv_dup2_broken" >&5 echo "${ECHO_T}$bash_cv_dup2_broken" >&6 if test $bash_cv_dup2_broken = yes; then ! cat >>confdefs.h <<\_ACEOF #define DUP2_BROKEN 1 ! _ACEOF fi ! ! echo "$as_me:$LINENO: checking whether pgrps need synchronization" >&5 echo $ECHO_N "checking whether pgrps need synchronization... $ECHO_C" >&6 if test "${bash_cv_pgrp_pipe+set}" = set; then *************** *** 12082,12092 **** else if test "$cross_compiling" = yes; then ! { echo "$as_me:12084: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&5 echo "$as_me: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&2;} bash_cv_pgrp_pipe=no else cat >conftest.$ac_ext <<_ACEOF ! #line 12089 "configure" ! #include "confdefs.h" #ifdef HAVE_UNISTD_H --- 20051,20065 ---- else if test "$cross_compiling" = yes; then ! { echo "$as_me:$LINENO: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&5 echo "$as_me: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&2;} bash_cv_pgrp_pipe=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. */ #ifdef HAVE_UNISTD_H *************** *** 12140,12152 **** _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:12142: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:12145: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:12147: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:12150: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_pgrp_pipe=no --- 20113,20125 ---- _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 bash_cv_pgrp_pipe=no *************** *** 12154,12175 **** echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_pgrp_pipe=yes fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:12164: result: $bash_cv_pgrp_pipe" >&5 echo "${ECHO_T}$bash_cv_pgrp_pipe" >&6 if test $bash_cv_pgrp_pipe = yes; then ! cat >>confdefs.h <<\EOF #define PGRP_PIPE 1 ! EOF fi ! echo "$as_me:12173: checking for type of signal functions" >&5 echo $ECHO_N "checking for type of signal functions... $ECHO_C" >&6 if test "${bash_cv_signal_vintage+set}" = set; then --- 20127,20151 ---- 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 ) bash_cv_pgrp_pipe=yes fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:$LINENO: result: $bash_cv_pgrp_pipe" >&5 echo "${ECHO_T}$bash_cv_pgrp_pipe" >&6 if test $bash_cv_pgrp_pipe = yes; then ! cat >>confdefs.h <<\_ACEOF #define PGRP_PIPE 1 ! _ACEOF fi ! ! echo "$as_me:$LINENO: checking for type of signal functions" >&5 echo $ECHO_N "checking for type of signal functions... $ECHO_C" >&6 if test "${bash_cv_signal_vintage+set}" = set; then *************** *** 12178,12183 **** cat >conftest.$ac_ext <<_ACEOF ! #line 12180 "configure" ! #include "confdefs.h" #include int --- 20154,20163 ---- 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 *************** *** 12196,12218 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:12198: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:12201: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:12204: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:12207: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_signal_vintage=posix else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF ! #line 12215 "configure" ! #include "confdefs.h" #include int --- 20176,20203 ---- _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 bash_cv_signal_vintage=posix else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! 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 *************** *** 12228,12250 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:12230: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:12233: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:12236: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:12239: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_signal_vintage=4.2bsd else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF ! #line 12247 "configure" ! #include "confdefs.h" #include --- 20213,20240 ---- _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 bash_cv_signal_vintage=4.2bsd else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! 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 *************** *** 12263,12281 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:12265: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:12268: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:12271: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:12274: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_signal_vintage=svr3 else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_signal_vintage=v7 --- 20253,20272 ---- _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 bash_cv_signal_vintage=svr3 else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! bash_cv_signal_vintage=v7 *************** *** 12291,12314 **** fi ! echo "$as_me:12293: result: $bash_cv_signal_vintage" >&5 echo "${ECHO_T}$bash_cv_signal_vintage" >&6 if test "$bash_cv_signal_vintage" = posix; then ! cat >>confdefs.h <<\EOF #define HAVE_POSIX_SIGNALS 1 ! EOF elif test "$bash_cv_signal_vintage" = "4.2bsd"; then ! cat >>confdefs.h <<\EOF #define HAVE_BSD_SIGNALS 1 ! EOF elif test "$bash_cv_signal_vintage" = svr3; then ! cat >>confdefs.h <<\EOF #define HAVE_USG_SIGHOLD 1 ! EOF fi ! echo "$as_me:12312: checking for sys_errlist and sys_nerr" >&5 echo $ECHO_N "checking for sys_errlist and sys_nerr... $ECHO_C" >&6 if test "${bash_cv_sys_errlist+set}" = set; then --- 20282,20306 ---- fi ! echo "$as_me:$LINENO: result: $bash_cv_signal_vintage" >&5 echo "${ECHO_T}$bash_cv_signal_vintage" >&6 if test "$bash_cv_signal_vintage" = posix; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_POSIX_SIGNALS 1 ! _ACEOF elif test "$bash_cv_signal_vintage" = "4.2bsd"; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_BSD_SIGNALS 1 ! _ACEOF elif test "$bash_cv_signal_vintage" = svr3; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_USG_SIGHOLD 1 ! _ACEOF fi ! ! echo "$as_me:$LINENO: checking for sys_errlist and sys_nerr" >&5 echo $ECHO_N "checking for sys_errlist and sys_nerr... $ECHO_C" >&6 if test "${bash_cv_sys_errlist+set}" = set; then *************** *** 12316,12321 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 12318 "configure" ! #include "confdefs.h" #include int --- 20308,20317 ---- 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 *************** *** 12330,12362 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:12332: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:12335: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:12338: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:12341: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_sys_errlist=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_sys_errlist=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:12351: result: $bash_cv_sys_errlist" >&5 echo "${ECHO_T}$bash_cv_sys_errlist" >&6 if test $bash_cv_sys_errlist = yes; then ! cat >>confdefs.h <<\EOF #define HAVE_SYS_ERRLIST 1 ! EOF fi ! echo "$as_me:12360: checking for sys_siglist in system C library" >&5 echo $ECHO_N "checking for sys_siglist in system C library... $ECHO_C" >&6 if test "${bash_cv_sys_siglist+set}" = set; then --- 20326,20360 ---- _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 bash_cv_sys_errlist=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! bash_cv_sys_errlist=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $bash_cv_sys_errlist" >&5 echo "${ECHO_T}$bash_cv_sys_errlist" >&6 if test $bash_cv_sys_errlist = yes; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_ERRLIST 1 ! _ACEOF fi ! ! echo "$as_me:$LINENO: checking for sys_siglist in system C library" >&5 echo $ECHO_N "checking for sys_siglist in system C library... $ECHO_C" >&6 if test "${bash_cv_sys_siglist+set}" = set; then *************** *** 12364,12374 **** else if test "$cross_compiling" = yes; then ! { echo "$as_me:12366: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&5 echo "$as_me: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&2;} bash_cv_sys_siglist=no else cat >conftest.$ac_ext <<_ACEOF ! #line 12371 "configure" ! #include "confdefs.h" #include --- 20362,20376 ---- else if test "$cross_compiling" = yes; then ! { echo "$as_me:$LINENO: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&5 echo "$as_me: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&2;} bash_cv_sys_siglist=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. */ #include *************** *** 12387,12399 **** _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:12389: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:12392: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:12394: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:12397: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_sys_siglist=yes --- 20389,20401 ---- _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 bash_cv_sys_siglist=yes *************** *** 12401,12421 **** echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_sys_siglist=no fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:12410: result: $bash_cv_sys_siglist" >&5 echo "${ECHO_T}$bash_cv_sys_siglist" >&6 if test $bash_cv_sys_siglist = yes; then ! cat >>confdefs.h <<\EOF #define HAVE_SYS_SIGLIST 1 ! EOF fi ! echo "$as_me:12419: checking for _sys_siglist in signal.h or unistd.h" >&5 echo $ECHO_N "checking for _sys_siglist in signal.h or unistd.h... $ECHO_C" >&6 if test "${bash_cv_decl_under_sys_siglist+set}" = set; then --- 20403,20425 ---- 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 ) bash_cv_sys_siglist=no fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:$LINENO: result: $bash_cv_sys_siglist" >&5 echo "${ECHO_T}$bash_cv_sys_siglist" >&6 if test $bash_cv_sys_siglist = yes; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_SIGLIST 1 ! _ACEOF fi ! echo "$as_me:$LINENO: checking for _sys_siglist in signal.h or unistd.h" >&5 echo $ECHO_N "checking for _sys_siglist in signal.h or unistd.h... $ECHO_C" >&6 if test "${bash_cv_decl_under_sys_siglist+set}" = set; then *************** *** 12423,12428 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 12425 "configure" ! #include "confdefs.h" #include --- 20427,20436 ---- 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 *************** *** 12440,12472 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:12442: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:12445: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:12448: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:12451: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_decl_under_sys_siglist=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_decl_under_sys_siglist=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:12461: result: $bash_cv_decl_under_sys_siglist" >&5 echo "${ECHO_T}$bash_cv_decl_under_sys_siglist" >&6 if test $bash_cv_decl_under_sys_siglist = yes; then ! cat >>confdefs.h <<\EOF #define UNDER_SYS_SIGLIST_DECLARED 1 ! EOF fi ! echo "$as_me:12470: checking for _sys_siglist in system C library" >&5 echo $ECHO_N "checking for _sys_siglist in system C library... $ECHO_C" >&6 if test "${bash_cv_under_sys_siglist+set}" = set; then --- 20448,20482 ---- _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 bash_cv_decl_under_sys_siglist=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! bash_cv_decl_under_sys_siglist=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $bash_cv_decl_under_sys_siglist" >&5 echo "${ECHO_T}$bash_cv_decl_under_sys_siglist" >&6 if test $bash_cv_decl_under_sys_siglist = yes; then ! cat >>confdefs.h <<\_ACEOF #define UNDER_SYS_SIGLIST_DECLARED 1 ! _ACEOF fi ! ! echo "$as_me:$LINENO: checking for _sys_siglist in system C library" >&5 echo $ECHO_N "checking for _sys_siglist in system C library... $ECHO_C" >&6 if test "${bash_cv_under_sys_siglist+set}" = set; then *************** *** 12474,12484 **** else if test "$cross_compiling" = yes; then ! { echo "$as_me:12476: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&5 echo "$as_me: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&2;} bash_cv_under_sys_siglist=no else cat >conftest.$ac_ext <<_ACEOF ! #line 12481 "configure" ! #include "confdefs.h" #include --- 20484,20498 ---- else if test "$cross_compiling" = yes; then ! { echo "$as_me:$LINENO: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&5 echo "$as_me: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&2;} bash_cv_under_sys_siglist=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. */ #include *************** *** 12497,12509 **** _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:12499: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:12502: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:12504: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:12507: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_under_sys_siglist=yes --- 20511,20523 ---- _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 bash_cv_under_sys_siglist=yes *************** *** 12511,12531 **** echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_under_sys_siglist=no fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:12520: result: $bash_cv_under_sys_siglist" >&5 echo "${ECHO_T}$bash_cv_under_sys_siglist" >&6 if test $bash_cv_under_sys_siglist = yes; then ! cat >>confdefs.h <<\EOF #define HAVE_UNDER_SYS_SIGLIST 1 ! EOF fi ! echo "$as_me:12529: checking whether signal handlers are of type void" >&5 echo $ECHO_N "checking whether signal handlers are of type void... $ECHO_C" >&6 if test "${bash_cv_void_sighandler+set}" = set; then --- 20525,20548 ---- 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 ) bash_cv_under_sys_siglist=no fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:$LINENO: result: $bash_cv_under_sys_siglist" >&5 echo "${ECHO_T}$bash_cv_under_sys_siglist" >&6 if test $bash_cv_under_sys_siglist = yes; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_UNDER_SYS_SIGLIST 1 ! _ACEOF fi ! ! echo "$as_me:$LINENO: checking whether signal handlers are of type void" >&5 echo $ECHO_N "checking whether signal handlers are of type void... $ECHO_C" >&6 if test "${bash_cv_void_sighandler+set}" = set; then *************** *** 12533,12538 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 12535 "configure" ! #include "confdefs.h" #include #include --- 20550,20559 ---- 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 *************** *** 12553,12585 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:12555: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:12558: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:12561: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:12564: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_void_sighandler=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_void_sighandler=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:12574: result: $bash_cv_void_sighandler" >&5 echo "${ECHO_T}$bash_cv_void_sighandler" >&6 if test $bash_cv_void_sighandler = yes; then ! cat >>confdefs.h <<\EOF #define VOID_SIGHANDLER 1 ! EOF fi ! echo "$as_me:12583: checking for clock_t" >&5 echo $ECHO_N "checking for clock_t... $ECHO_C" >&6 if test "${bash_cv_type_clock_t+set}" = set; then --- 20574,20609 ---- _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 bash_cv_void_sighandler=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! bash_cv_void_sighandler=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $bash_cv_void_sighandler" >&5 echo "${ECHO_T}$bash_cv_void_sighandler" >&6 if test $bash_cv_void_sighandler = yes; then ! cat >>confdefs.h <<\_ACEOF #define VOID_SIGHANDLER 1 ! _ACEOF fi ! ! ! echo "$as_me:$LINENO: checking for clock_t" >&5 echo $ECHO_N "checking for clock_t... $ECHO_C" >&6 if test "${bash_cv_type_clock_t+set}" = set; then *************** *** 12587,12592 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 12589 "configure" ! #include "confdefs.h" #include #if STDC_HEADERS --- 20611,20620 ---- 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 STDC_HEADERS *************** *** 12601,12605 **** _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "clock_t" >/dev/null 2>&1; then bash_cv_type_clock_t=yes else --- 20629,20633 ---- _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! $EGREP "clock_t" >/dev/null 2>&1; then bash_cv_type_clock_t=yes else *************** *** 12610,12624 **** fi ! echo "$as_me:12612: result: $bash_cv_type_clock_t" >&5 echo "${ECHO_T}$bash_cv_type_clock_t" >&6 if test $bash_cv_type_clock_t = no; then ! cat >>confdefs.h <&5 echo $ECHO_N "checking for sigset_t... $ECHO_C" >&6 if test "${bash_cv_type_sigset_t+set}" = set; then --- 20638,20654 ---- fi ! echo "$as_me:$LINENO: result: $bash_cv_type_clock_t" >&5 echo "${ECHO_T}$bash_cv_type_clock_t" >&6 if test $bash_cv_type_clock_t = no; then ! cat >>confdefs.h <<_ACEOF #define clock_t long ! _ACEOF fi ! ! ! echo "$as_me:$LINENO: checking for sigset_t" >&5 echo $ECHO_N "checking for sigset_t... $ECHO_C" >&6 if test "${bash_cv_type_sigset_t+set}" = set; then *************** *** 12626,12631 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 12628 "configure" ! #include "confdefs.h" #include #if STDC_HEADERS --- 20656,20665 ---- 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 STDC_HEADERS *************** *** 12640,12644 **** _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "sigset_t" >/dev/null 2>&1; then bash_cv_type_sigset_t=yes else --- 20674,20678 ---- _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! $EGREP "sigset_t" >/dev/null 2>&1; then bash_cv_type_sigset_t=yes else *************** *** 12649,12663 **** fi ! echo "$as_me:12651: result: $bash_cv_type_sigset_t" >&5 echo "${ECHO_T}$bash_cv_type_sigset_t" >&6 if test $bash_cv_type_sigset_t = no; then ! cat >>confdefs.h <&5 echo $ECHO_N "checking for quad_t... $ECHO_C" >&6 if test "${bash_cv_type_quad_t+set}" = set; then --- 20683,20699 ---- fi ! echo "$as_me:$LINENO: result: $bash_cv_type_sigset_t" >&5 echo "${ECHO_T}$bash_cv_type_sigset_t" >&6 if test $bash_cv_type_sigset_t = no; then ! cat >>confdefs.h <<_ACEOF #define sigset_t int ! _ACEOF fi ! ! ! echo "$as_me:$LINENO: checking for quad_t" >&5 echo $ECHO_N "checking for quad_t... $ECHO_C" >&6 if test "${bash_cv_type_quad_t+set}" = set; then *************** *** 12665,12670 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 12667 "configure" ! #include "confdefs.h" #include #if STDC_HEADERS --- 20701,20710 ---- 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 STDC_HEADERS *************** *** 12676,12682 **** #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "quad_t" >/dev/null 2>&1; then bash_cv_type_quad_t=yes else --- 20716,20723 ---- #endif + _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! $EGREP "quad_t" >/dev/null 2>&1; then bash_cv_type_quad_t=yes else *************** *** 12687,12706 **** fi ! echo "$as_me:12689: result: $bash_cv_type_quad_t" >&5 echo "${ECHO_T}$bash_cv_type_quad_t" >&6 if test $bash_cv_type_quad_t = yes; then ! cat >>confdefs.h <<\EOF #define HAVE_QUAD_T 1 ! EOF fi if test $bash_cv_type_quad_t = no; then ! cat >>confdefs.h <&5 echo $ECHO_N "checking for intmax_t... $ECHO_C" >&6 if test "${bash_cv_type_intmax_t+set}" = set; then --- 20728,20749 ---- fi ! echo "$as_me:$LINENO: result: $bash_cv_type_quad_t" >&5 echo "${ECHO_T}$bash_cv_type_quad_t" >&6 if test $bash_cv_type_quad_t = yes; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_QUAD_T 1 ! _ACEOF fi if test $bash_cv_type_quad_t = no; then ! cat >>confdefs.h <<_ACEOF #define quad_t long ! _ACEOF fi ! ! ! echo "$as_me:$LINENO: checking for intmax_t" >&5 echo $ECHO_N "checking for intmax_t... $ECHO_C" >&6 if test "${bash_cv_type_intmax_t+set}" = set; then *************** *** 12708,12713 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 12710 "configure" ! #include "confdefs.h" #include #if STDC_HEADERS --- 20751,20760 ---- 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 STDC_HEADERS *************** *** 12719,12725 **** #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "intmax_t" >/dev/null 2>&1; then bash_cv_type_intmax_t=yes else --- 20766,20773 ---- #endif + _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! $EGREP "intmax_t" >/dev/null 2>&1; then bash_cv_type_intmax_t=yes else *************** *** 12730,12744 **** fi ! echo "$as_me:12732: result: $bash_cv_type_intmax_t" >&5 echo "${ECHO_T}$bash_cv_type_intmax_t" >&6 if test $bash_cv_type_intmax_t = no; then ! cat >>confdefs.h <&5 echo $ECHO_N "checking for uintmax_t... $ECHO_C" >&6 if test "${bash_cv_type_uintmax_t+set}" = set; then --- 20778,20794 ---- fi ! echo "$as_me:$LINENO: result: $bash_cv_type_intmax_t" >&5 echo "${ECHO_T}$bash_cv_type_intmax_t" >&6 if test $bash_cv_type_intmax_t = no; then ! cat >>confdefs.h <<_ACEOF #define intmax_t $bash_cv_type_long_long ! _ACEOF fi ! ! ! echo "$as_me:$LINENO: checking for uintmax_t" >&5 echo $ECHO_N "checking for uintmax_t... $ECHO_C" >&6 if test "${bash_cv_type_uintmax_t+set}" = set; then *************** *** 12746,12751 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 12748 "configure" ! #include "confdefs.h" #include #if STDC_HEADERS --- 20796,20805 ---- 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 STDC_HEADERS *************** *** 12757,12763 **** #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "uintmax_t" >/dev/null 2>&1; then bash_cv_type_uintmax_t=yes else --- 20811,20818 ---- #endif + _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! $EGREP "uintmax_t" >/dev/null 2>&1; then bash_cv_type_uintmax_t=yes else *************** *** 12768,12778 **** fi ! echo "$as_me:12770: result: $bash_cv_type_uintmax_t" >&5 echo "${ECHO_T}$bash_cv_type_uintmax_t" >&6 if test $bash_cv_type_uintmax_t = no; then ! cat >>confdefs.h <&5 echo "${ECHO_T}$bash_cv_type_uintmax_t" >&6 if test $bash_cv_type_uintmax_t = no; then ! cat >>confdefs.h <<_ACEOF #define uintmax_t $bash_cv_type_unsigned_long_long ! _ACEOF fi *************** *** 12780,12784 **** if test "$ac_cv_header_sys_socket_h" = "yes"; then ! echo "$as_me:12782: checking for socklen_t" >&5 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 if test "${bash_cv_type_socklen_t+set}" = set; then --- 20835,20840 ---- if test "$ac_cv_header_sys_socket_h" = "yes"; then ! ! echo "$as_me:$LINENO: checking for socklen_t" >&5 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 if test "${bash_cv_type_socklen_t+set}" = set; then *************** *** 12786,12791 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 12788 "configure" ! #include "confdefs.h" #include #if STDC_HEADERS --- 20842,20851 ---- 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 STDC_HEADERS *************** *** 12800,12804 **** _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "socklen_t" >/dev/null 2>&1; then bash_cv_type_socklen_t=yes else --- 20860,20864 ---- _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! $EGREP "socklen_t" >/dev/null 2>&1; then bash_cv_type_socklen_t=yes else *************** *** 12809,12829 **** fi ! echo "$as_me:12811: result: $bash_cv_type_socklen_t" >&5 echo "${ECHO_T}$bash_cv_type_socklen_t" >&6 if test $bash_cv_type_socklen_t = yes; then ! cat >>confdefs.h <<\EOF #define HAVE_SOCKLEN_T 1 ! EOF fi if test $bash_cv_type_socklen_t = no; then ! cat >>confdefs.h <&5 echo $ECHO_N "checking for size and type of struct rlimit fields... $ECHO_C" >&6 if test "${bash_cv_type_rlimit+set}" = set; then --- 20869,20889 ---- fi ! echo "$as_me:$LINENO: result: $bash_cv_type_socklen_t" >&5 echo "${ECHO_T}$bash_cv_type_socklen_t" >&6 if test $bash_cv_type_socklen_t = yes; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_SOCKLEN_T 1 ! _ACEOF fi if test $bash_cv_type_socklen_t = no; then ! cat >>confdefs.h <<_ACEOF #define socklen_t int ! _ACEOF fi fi ! echo "$as_me:$LINENO: checking for size and type of struct rlimit fields" >&5 echo $ECHO_N "checking for size and type of struct rlimit fields... $ECHO_C" >&6 if test "${bash_cv_type_rlimit+set}" = set; then *************** *** 12831,12836 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 12833 "configure" ! #include "confdefs.h" #include #include --- 20891,20900 ---- 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 *************** *** 12844,12871 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:12846: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:12849: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:12852: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:12855: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_type_rlimit=rlim_t else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 if test "$cross_compiling" = yes; then ! { echo "$as_me:12863: WARNING: cannot check quad_t if cross compiling -- defaulting to long" >&5 echo "$as_me: WARNING: cannot check quad_t if cross compiling -- defaulting to long" >&2;} bash_cv_type_rlimit=long else cat >conftest.$ac_ext <<_ACEOF ! #line 12868 "configure" ! #include "confdefs.h" #include --- 20908,20940 ---- _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 bash_cv_type_rlimit=rlim_t else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! if test "$cross_compiling" = yes; then ! { echo "$as_me:$LINENO: WARNING: cannot check quad_t if cross compiling -- defaulting to long" >&5 echo "$as_me: WARNING: cannot check quad_t if cross compiling -- defaulting to long" >&2;} bash_cv_type_rlimit=long 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 *************** *** 12883,12895 **** _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:12885: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:12888: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:12890: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:12893: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_type_rlimit=quad_t --- 20952,20964 ---- _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 bash_cv_type_rlimit=quad_t *************** *** 12897,12904 **** echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_type_rlimit=long fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi --- 20966,20975 ---- 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 ) bash_cv_type_rlimit=long fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi *************** *** 12907,12925 **** fi ! echo "$as_me:12909: result: $bash_cv_type_rlimit" >&5 echo "${ECHO_T}$bash_cv_type_rlimit" >&6 if test $bash_cv_type_rlimit = quad_t; then ! cat >>confdefs.h <<\EOF #define RLIMTYPE quad_t ! EOF elif test $bash_cv_type_rlimit = rlim_t; then ! cat >>confdefs.h <<\EOF #define RLIMTYPE rlim_t ! EOF fi ! echo "$as_me:12923: checking for struct termios.c_line" >&5 echo $ECHO_N "checking for struct termios.c_line... $ECHO_C" >&6 if test "${ac_cv_member_struct_termios_c_line+set}" = set; then --- 20978,20998 ---- fi ! echo "$as_me:$LINENO: result: $bash_cv_type_rlimit" >&5 echo "${ECHO_T}$bash_cv_type_rlimit" >&6 if test $bash_cv_type_rlimit = quad_t; then ! cat >>confdefs.h <<\_ACEOF #define RLIMTYPE quad_t ! _ACEOF elif test $bash_cv_type_rlimit = rlim_t; then ! cat >>confdefs.h <<\_ACEOF #define RLIMTYPE rlim_t ! _ACEOF fi ! ! ! echo "$as_me:$LINENO: checking for struct termios.c_line" >&5 echo $ECHO_N "checking for struct termios.c_line... $ECHO_C" >&6 if test "${ac_cv_member_struct_termios_c_line+set}" = set; then *************** *** 12927,12936 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 12929 "configure" ! #include "confdefs.h" #include #include int main () --- 21000,21014 ---- 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 + int main () *************** *** 12944,12976 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:12946: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:12949: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:12952: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:12955: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_member_struct_termios_c_line=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_member_struct_termios_c_line=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:12965: result: $ac_cv_member_struct_termios_c_line" >&5 echo "${ECHO_T}$ac_cv_member_struct_termios_c_line" >&6 if test $ac_cv_member_struct_termios_c_line = yes; then ! cat >>confdefs.h <<\EOF #define TERMIOS_LDISC 1 ! EOF fi ! echo "$as_me:12974: checking for struct termio.c_line" >&5 echo $ECHO_N "checking for struct termio.c_line... $ECHO_C" >&6 if test "${ac_cv_member_struct_termio_c_line+set}" = set; then --- 21022,21098 ---- _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_member_struct_termios_c_line=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! 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 ! ! ! int ! main () ! { ! static struct termios ac_aggr; ! if (sizeof ac_aggr.c_line) ! 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_member_struct_termios_c_line=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_member_struct_termios_c_line=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_member_struct_termios_c_line" >&5 echo "${ECHO_T}$ac_cv_member_struct_termios_c_line" >&6 if test $ac_cv_member_struct_termios_c_line = yes; then ! cat >>confdefs.h <<\_ACEOF #define TERMIOS_LDISC 1 ! _ACEOF fi ! ! ! echo "$as_me:$LINENO: checking for struct termio.c_line" >&5 echo $ECHO_N "checking for struct termio.c_line... $ECHO_C" >&6 if test "${ac_cv_member_struct_termio_c_line+set}" = set; then *************** *** 12978,12987 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 12980 "configure" ! #include "confdefs.h" #include #include int main () --- 21100,21114 ---- 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 + int main () *************** *** 12995,13034 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:12997: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:13000: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:13003: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:13006: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_member_struct_termio_c_line=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_member_struct_termio_c_line=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:13016: result: $ac_cv_member_struct_termio_c_line" >&5 echo "${ECHO_T}$ac_cv_member_struct_termio_c_line" >&6 if test $ac_cv_member_struct_termio_c_line = yes; then ! cat >>confdefs.h <<\EOF #define TERMIO_LDISC 1 ! EOF fi ! echo "$as_me:13025: checking if struct dirent has a d_ino member" >&5 ! echo $ECHO_N "checking if struct dirent has a d_ino member... $ECHO_C" >&6 if test "${bash_cv_dirent_has_dino+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF ! #line 13031 "configure" ! #include "confdefs.h" #include --- 21122,21209 ---- _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_member_struct_termio_c_line=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! 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 ! ! ! int ! main () ! { ! static struct termio ac_aggr; ! if (sizeof ac_aggr.c_line) ! 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_member_struct_termio_c_line=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_member_struct_termio_c_line=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_member_struct_termio_c_line" >&5 echo "${ECHO_T}$ac_cv_member_struct_termio_c_line" >&6 if test $ac_cv_member_struct_termio_c_line = yes; then ! cat >>confdefs.h <<\_ACEOF #define TERMIO_LDISC 1 ! _ACEOF fi ! ! ! echo "$as_me:$LINENO: checking for struct dirent.d_ino" >&5 ! echo $ECHO_N "checking for struct dirent.d_ino... $ECHO_C" >&6 if test "${bash_cv_dirent_has_dino+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 *************** *** 13063,13081 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:13065: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:13068: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:13071: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:13074: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_dirent_has_dino=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_dirent_has_dino=no fi --- 21238,21257 ---- _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 bash_cv_dirent_has_dino=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! bash_cv_dirent_has_dino=no fi *************** *** 13083,13103 **** fi ! echo "$as_me:13085: result: $bash_cv_dirent_has_dino" >&5 echo "${ECHO_T}$bash_cv_dirent_has_dino" >&6 if test $bash_cv_dirent_has_dino = yes; then ! cat >>confdefs.h <<\EOF ! #define STRUCT_DIRENT_HAS_D_INO 1 ! EOF fi ! echo "$as_me:13094: checking if struct dirent has a d_fileno member" >&5 ! echo $ECHO_N "checking if struct dirent has a d_fileno member... $ECHO_C" >&6 if test "${bash_cv_dirent_has_d_fileno+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF ! #line 13100 "configure" ! #include "confdefs.h" #include --- 21259,21284 ---- fi ! echo "$as_me:$LINENO: result: $bash_cv_dirent_has_dino" >&5 echo "${ECHO_T}$bash_cv_dirent_has_dino" >&6 if test $bash_cv_dirent_has_dino = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_STRUCT_DIRENT_D_INO 1 ! _ACEOF fi ! ! echo "$as_me:$LINENO: checking for struct dirent.d_fileno" >&5 ! echo $ECHO_N "checking for struct dirent.d_fileno... $ECHO_C" >&6 if test "${bash_cv_dirent_has_d_fileno+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 *************** *** 13132,13150 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:13134: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:13137: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:13140: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:13143: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_dirent_has_d_fileno=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_dirent_has_d_fileno=no fi --- 21313,21332 ---- _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 bash_cv_dirent_has_d_fileno=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! bash_cv_dirent_has_d_fileno=no fi *************** *** 13152,13165 **** fi ! echo "$as_me:13154: result: $bash_cv_dirent_has_d_fileno" >&5 echo "${ECHO_T}$bash_cv_dirent_has_d_fileno" >&6 if test $bash_cv_dirent_has_d_fileno = yes; then ! cat >>confdefs.h <<\EOF ! #define STRUCT_DIRENT_HAS_D_FILENO 1 ! EOF fi ! echo "$as_me:13163: checking for struct winsize in sys/ioctl.h and termios.h" >&5 echo $ECHO_N "checking for struct winsize in sys/ioctl.h and termios.h... $ECHO_C" >&6 if test "${bash_cv_struct_winsize_header+set}" = set; then --- 21334,21422 ---- fi ! echo "$as_me:$LINENO: result: $bash_cv_dirent_has_d_fileno" >&5 echo "${ECHO_T}$bash_cv_dirent_has_d_fileno" >&6 if test $bash_cv_dirent_has_d_fileno = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_STRUCT_DIRENT_D_FILENO 1 ! _ACEOF ! ! fi ! ! ! echo "$as_me:$LINENO: checking for struct dirent.d_namlen" >&5 ! echo $ECHO_N "checking for struct dirent.d_namlen... $ECHO_C" >&6 ! if test "${bash_cv_dirent_has_d_namlen+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 ! #ifdef HAVE_UNISTD_H ! # include ! #endif /* HAVE_UNISTD_H */ ! #if defined(HAVE_DIRENT_H) ! # include ! #else ! # define dirent direct ! # ifdef HAVE_SYS_NDIR_H ! # include ! # endif /* SYSNDIR */ ! # ifdef HAVE_SYS_DIR_H ! # include ! # endif /* SYSDIR */ ! # ifdef HAVE_NDIR_H ! # include ! # endif ! #endif /* HAVE_DIRENT_H */ ! ! int ! main () ! { ! ! struct dirent d; int z; z = d.d_namlen; ! ! ; ! 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 ! bash_cv_dirent_has_d_namlen=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! bash_cv_dirent_has_d_namlen=no ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! fi ! ! echo "$as_me:$LINENO: result: $bash_cv_dirent_has_d_namlen" >&5 ! echo "${ECHO_T}$bash_cv_dirent_has_d_namlen" >&6 ! if test $bash_cv_dirent_has_d_namlen = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_STRUCT_DIRENT_D_NAMLEN 1 ! _ACEOF fi ! echo "$as_me:$LINENO: checking for struct winsize in sys/ioctl.h and termios.h" >&5 echo $ECHO_N "checking for struct winsize in sys/ioctl.h and termios.h... $ECHO_C" >&6 if test "${bash_cv_struct_winsize_header+set}" = set; then *************** *** 13167,13172 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 13169 "configure" ! #include "confdefs.h" #include #include --- 21424,21433 ---- 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 *************** *** 13180,13201 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:13182: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:13185: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:13188: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:13191: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_struct_winsize_header=ioctl_h else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF ! #line 13198 "configure" ! #include "confdefs.h" #include #include --- 21441,21467 ---- _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 bash_cv_struct_winsize_header=ioctl_h else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! 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 *************** *** 13209,13227 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:13211: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:13214: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:13217: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:13220: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_struct_winsize_header=termios_h else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_struct_winsize_header=other fi --- 21475,21494 ---- _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 bash_cv_struct_winsize_header=termios_h else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! bash_cv_struct_winsize_header=other fi *************** *** 13233,13255 **** if test $bash_cv_struct_winsize_header = ioctl_h; then ! echo "$as_me:13235: result: sys/ioctl.h" >&5 echo "${ECHO_T}sys/ioctl.h" >&6 ! cat >>confdefs.h <<\EOF #define STRUCT_WINSIZE_IN_SYS_IOCTL 1 ! EOF elif test $bash_cv_struct_winsize_header = termios_h; then ! echo "$as_me:13242: result: termios.h" >&5 echo "${ECHO_T}termios.h" >&6 ! cat >>confdefs.h <<\EOF #define STRUCT_WINSIZE_IN_TERMIOS 1 ! EOF else ! echo "$as_me:13249: result: not found" >&5 echo "${ECHO_T}not found" >&6 fi ! echo "$as_me:13253: checking for struct timeval in sys/time.h and time.h" >&5 echo $ECHO_N "checking for struct timeval in sys/time.h and time.h... $ECHO_C" >&6 if test "${bash_cv_struct_timeval+set}" = set; then --- 21500,21522 ---- if test $bash_cv_struct_winsize_header = ioctl_h; then ! echo "$as_me:$LINENO: result: sys/ioctl.h" >&5 echo "${ECHO_T}sys/ioctl.h" >&6 ! cat >>confdefs.h <<\_ACEOF #define STRUCT_WINSIZE_IN_SYS_IOCTL 1 ! _ACEOF elif test $bash_cv_struct_winsize_header = termios_h; then ! echo "$as_me:$LINENO: result: termios.h" >&5 echo "${ECHO_T}termios.h" >&6 ! cat >>confdefs.h <<\_ACEOF #define STRUCT_WINSIZE_IN_TERMIOS 1 ! _ACEOF else ! echo "$as_me:$LINENO: result: not found" >&5 echo "${ECHO_T}not found" >&6 fi ! echo "$as_me:$LINENO: checking for struct timeval in sys/time.h and time.h" >&5 echo $ECHO_N "checking for struct timeval in sys/time.h and time.h... $ECHO_C" >&6 if test "${bash_cv_struct_timeval+set}" = set; then *************** *** 13258,13278 **** cat >conftest.$ac_ext <<_ACEOF ! #line 13260 "configure" ! #include "confdefs.h" #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "struct timeval" >/dev/null 2>&1; then bash_cv_struct_timeval=yes else cat >conftest.$ac_ext <<_ACEOF ! #line 13270 "configure" ! #include "confdefs.h" #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "struct timeval" >/dev/null 2>&1; then bash_cv_struct_timeval=yes else --- 21525,21553 ---- 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 "struct timeval" >/dev/null 2>&1; then bash_cv_struct_timeval=yes 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 _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! $EGREP "struct timeval" >/dev/null 2>&1; then bash_cv_struct_timeval=yes else *************** *** 13284,13299 **** rm -f conftest* fi ! echo "$as_me:13288: result: $bash_cv_struct_timeval" >&5 echo "${ECHO_T}$bash_cv_struct_timeval" >&6 if test $bash_cv_struct_timeval = yes; then ! cat >>confdefs.h <<\EOF #define HAVE_TIMEVAL 1 ! EOF fi ! echo "$as_me:13297: checking for struct stat.st_blocks" >&5 echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6 if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then --- 21559,21575 ---- rm -f conftest* + fi ! echo "$as_me:$LINENO: result: $bash_cv_struct_timeval" >&5 echo "${ECHO_T}$bash_cv_struct_timeval" >&6 if test $bash_cv_struct_timeval = yes; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_TIMEVAL 1 ! _ACEOF fi ! echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6 if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then *************** *** 13301,13306 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 13303 "configure" ! #include "confdefs.h" $ac_includes_default int --- 21577,21586 ---- 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 *************** *** 13315,13348 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:13317: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:13320: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:13323: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:13326: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_member_struct_stat_st_blocks=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_blocks=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:13336: result: $ac_cv_member_struct_stat_st_blocks" >&5 echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6 if test $ac_cv_member_struct_stat_st_blocks = yes; then ! cat >>confdefs.h <&5 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 if test "${ac_cv_struct_tm+set}" = set; then --- 21595,21667 ---- _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_member_struct_stat_st_blocks=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! 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 () ! { ! static struct stat ac_aggr; ! if (sizeof ac_aggr.st_blocks) ! 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_member_struct_stat_st_blocks=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_member_struct_stat_st_blocks=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5 echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6 if test $ac_cv_member_struct_stat_st_blocks = yes; then ! cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_BLOCKS 1 ! _ACEOF ! fi ! echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 if test "${ac_cv_struct_tm+set}" = set; then *************** *** 13350,13355 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 13352 "configure" ! #include "confdefs.h" #include #include --- 21669,21678 ---- 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 *************** *** 13358,13362 **** main () { ! struct tm *tp; tp->tm_sec; ; return 0; --- 21681,21742 ---- main () { ! struct tm *tp; tp->tm_sec; ! ; ! 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_struct_tm=time.h ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_struct_tm=sys/time.h ! fi ! rm -f 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 ! if test $ac_cv_struct_tm = sys/time.h; then ! ! cat >>confdefs.h <<\_ACEOF ! #define TM_IN_SYS_TIME 1 ! _ACEOF ! ! fi ! ! echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 ! echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6 ! if test "${ac_cv_member_struct_tm_tm_zone+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 <$ac_cv_struct_tm> ! ! ! int ! main () ! { ! static struct tm ac_aggr; ! if (ac_aggr.tm_zone) ! return 0; ; return 0; *************** *** 13364,13412 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:13366: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:13369: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:13372: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:13375: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_struct_tm=sys/time.h ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! fi ! echo "$as_me:13385: result: $ac_cv_struct_tm" >&5 ! echo "${ECHO_T}$ac_cv_struct_tm" >&6 ! if test $ac_cv_struct_tm = sys/time.h; then ! ! cat >>confdefs.h <<\EOF ! #define TM_IN_SYS_TIME 1 ! EOF ! fi ! ! echo "$as_me:13395: checking for struct tm.tm_zone" >&5 ! echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6 ! if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line 13401 "configure" ! #include "confdefs.h" #include #include <$ac_cv_struct_tm> int main () { static struct tm ac_aggr; ! if (ac_aggr.tm_zone) return 0; ; --- 21744,21779 ---- _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_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! 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 <$ac_cv_struct_tm> + int main () { static struct tm ac_aggr; ! if (sizeof ac_aggr.tm_zone) return 0; ; *************** *** 13415,13444 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:13417: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:13420: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:13423: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:13426: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_member_struct_tm_tm_zone=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:13436: result: $ac_cv_member_struct_tm_tm_zone" >&5 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6 if test $ac_cv_member_struct_tm_tm_zone = yes; then ! cat >>confdefs.h <&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_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_member_struct_tm_tm_zone=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi ! rm -f 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 if test $ac_cv_member_struct_tm_tm_zone = yes; then ! cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_TM_TM_ZONE 1 ! _ACEOF ! fi *************** *** 13446,13455 **** if test "$ac_cv_member_struct_tm_tm_zone" = yes; then ! cat >>confdefs.h <<\EOF #define HAVE_TM_ZONE 1 ! EOF else ! echo "$as_me:13453: checking for tzname" >&5 echo $ECHO_N "checking for tzname... $ECHO_C" >&6 if test "${ac_cv_var_tzname+set}" = set; then --- 21817,21826 ---- if test "$ac_cv_member_struct_tm_tm_zone" = yes; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_TM_ZONE 1 ! _ACEOF else ! echo "$as_me:$LINENO: checking for tzname" >&5 echo $ECHO_N "checking for tzname... $ECHO_C" >&6 if test "${ac_cv_var_tzname+set}" = set; then *************** *** 13457,13462 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 13459 "configure" ! #include "confdefs.h" #include #ifndef tzname /* For SGI. */ --- 21828,21837 ---- 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 #ifndef tzname /* For SGI. */ *************** *** 13473,13507 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:13475: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:13478: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:13481: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:13484: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_var_tzname=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_var_tzname=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:13494: result: $ac_cv_var_tzname" >&5 echo "${ECHO_T}$ac_cv_var_tzname" >&6 if test $ac_cv_var_tzname = yes; then ! cat >>confdefs.h <<\EOF #define HAVE_TZNAME 1 ! EOF fi fi ! echo "$as_me:13505: checking for the existence of strsignal" >&5 echo $ECHO_N "checking for the existence of strsignal... $ECHO_C" >&6 if test "${bash_cv_have_strsignal+set}" = set; then --- 21848,21937 ---- _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_var_tzname=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_var_tzname=no fi rm -f 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 if test $ac_cv_var_tzname = yes; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_TZNAME 1 ! _ACEOF fi fi ! echo "$as_me:$LINENO: checking for struct timezone in sys/time.h and time.h" >&5 ! echo $ECHO_N "checking for struct timezone in sys/time.h and time.h... $ECHO_C" >&6 ! if test "${bash_cv_struct_timezone+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 ! ! _ACEOF ! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! $EGREP "struct timezone" >/dev/null 2>&1; then ! bash_cv_struct_timezone=yes ! 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 ! ! _ACEOF ! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! $EGREP "struct timezone" >/dev/null 2>&1; then ! bash_cv_struct_timezone=yes ! else ! bash_cv_struct_timezone=no ! fi ! rm -f conftest* ! ! fi ! rm -f conftest* ! ! ! fi ! ! echo "$as_me:$LINENO: result: $bash_cv_struct_timezone" >&5 ! echo "${ECHO_T}$bash_cv_struct_timezone" >&6 ! if test $bash_cv_struct_timezone = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_STRUCT_TIMEZONE 1 ! _ACEOF ! ! fi ! ! ! echo "$as_me:$LINENO: checking for the existence of strsignal" >&5 echo $ECHO_N "checking for the existence of strsignal... $ECHO_C" >&6 if test "${bash_cv_have_strsignal+set}" = set; then *************** *** 13509,13514 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 13511 "configure" ! #include "confdefs.h" #include #include --- 21939,21948 ---- 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 *************** *** 13522,13540 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:13524: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:13527: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:13530: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:13533: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_have_strsignal=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_have_strsignal=no fi --- 21956,21975 ---- _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 bash_cv_have_strsignal=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! bash_cv_have_strsignal=no fi *************** *** 13542,13555 **** fi ! echo "$as_me:13544: result: $bash_cv_have_strsignal" >&5 echo "${ECHO_T}$bash_cv_have_strsignal" >&6 if test $bash_cv_have_strsignal = yes; then ! cat >>confdefs.h <<\EOF #define HAVE_STRSIGNAL 1 ! EOF fi ! echo "$as_me:13553: checking if opendir() opens non-directories" >&5 echo $ECHO_N "checking if opendir() opens non-directories... $ECHO_C" >&6 if test "${bash_cv_opendir_not_robust+set}" = set; then --- 21977,21990 ---- fi ! echo "$as_me:$LINENO: result: $bash_cv_have_strsignal" >&5 echo "${ECHO_T}$bash_cv_have_strsignal" >&6 if test $bash_cv_have_strsignal = yes; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_STRSIGNAL 1 ! _ACEOF fi ! echo "$as_me:$LINENO: checking if opendir() opens non-directories" >&5 echo $ECHO_N "checking if opendir() opens non-directories... $ECHO_C" >&6 if test "${bash_cv_opendir_not_robust+set}" = set; then *************** *** 13557,13561 **** else if test "$cross_compiling" = yes; then ! { echo "$as_me:13559: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&5 echo "$as_me: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&2;} bash_cv_opendir_not_robust=no --- 21992,21996 ---- else if test "$cross_compiling" = yes; then ! { echo "$as_me:$LINENO: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&5 echo "$as_me: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&2;} bash_cv_opendir_not_robust=no *************** *** 13563,13568 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 13565 "configure" ! #include "confdefs.h" #include --- 21998,22007 ---- 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 *************** *** 13606,13618 **** _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:13608: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:13611: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:13613: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:13616: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_opendir_not_robust=yes --- 22045,22057 ---- _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 bash_cv_opendir_not_robust=yes *************** *** 13620,13640 **** echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_opendir_not_robust=no fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:13629: result: $bash_cv_opendir_not_robust" >&5 echo "${ECHO_T}$bash_cv_opendir_not_robust" >&6 if test $bash_cv_opendir_not_robust = yes; then ! cat >>confdefs.h <<\EOF #define OPENDIR_NOT_ROBUST 1 ! EOF fi ! echo "$as_me:13638: checking whether ulimit can substitute for getdtablesize" >&5 echo $ECHO_N "checking whether ulimit can substitute for getdtablesize... $ECHO_C" >&6 if test "${bash_cv_ulimit_maxfds+set}" = set; then --- 22059,22081 ---- 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 ) bash_cv_opendir_not_robust=no fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:$LINENO: result: $bash_cv_opendir_not_robust" >&5 echo "${ECHO_T}$bash_cv_opendir_not_robust" >&6 if test $bash_cv_opendir_not_robust = yes; then ! cat >>confdefs.h <<\_ACEOF #define OPENDIR_NOT_ROBUST 1 ! _ACEOF fi ! echo "$as_me:$LINENO: checking whether ulimit can substitute for getdtablesize" >&5 echo $ECHO_N "checking whether ulimit can substitute for getdtablesize... $ECHO_C" >&6 if test "${bash_cv_ulimit_maxfds+set}" = set; then *************** *** 13642,13646 **** else if test "$cross_compiling" = yes; then ! { echo "$as_me:13644: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&5 echo "$as_me: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&2;} bash_cv_ulimit_maxfds=no --- 22083,22087 ---- else if test "$cross_compiling" = yes; then ! { echo "$as_me:$LINENO: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&5 echo "$as_me: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&2;} bash_cv_ulimit_maxfds=no *************** *** 13648,13653 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 13650 "configure" ! #include "confdefs.h" main() --- 22089,22098 ---- 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. */ main() *************** *** 13659,13671 **** _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:13661: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:13664: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:13666: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:13669: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_ulimit_maxfds=yes --- 22104,22116 ---- _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 bash_cv_ulimit_maxfds=yes *************** *** 13673,13693 **** echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_ulimit_maxfds=no fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:13682: result: $bash_cv_ulimit_maxfds" >&5 echo "${ECHO_T}$bash_cv_ulimit_maxfds" >&6 if test $bash_cv_ulimit_maxfds = yes; then ! cat >>confdefs.h <<\EOF #define ULIMIT_MAXFDS 1 ! EOF fi ! echo "$as_me:13691: checking to see if getenv can be redefined" >&5 echo $ECHO_N "checking to see if getenv can be redefined... $ECHO_C" >&6 if test "${bash_cv_getenv_redef+set}" = set; then --- 22118,22140 ---- 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 ) bash_cv_ulimit_maxfds=no fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:$LINENO: result: $bash_cv_ulimit_maxfds" >&5 echo "${ECHO_T}$bash_cv_ulimit_maxfds" >&6 if test $bash_cv_ulimit_maxfds = yes; then ! cat >>confdefs.h <<\_ACEOF #define ULIMIT_MAXFDS 1 ! _ACEOF fi ! echo "$as_me:$LINENO: checking to see if getenv can be redefined" >&5 echo $ECHO_N "checking to see if getenv can be redefined... $ECHO_C" >&6 if test "${bash_cv_getenv_redef+set}" = set; then *************** *** 13695,13699 **** else if test "$cross_compiling" = yes; then ! { echo "$as_me:13697: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&5 echo "$as_me: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&2;} bash_cv_getenv_redef=yes --- 22142,22146 ---- else if test "$cross_compiling" = yes; then ! { echo "$as_me:$LINENO: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&5 echo "$as_me: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&2;} bash_cv_getenv_redef=yes *************** *** 13701,13706 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 13703 "configure" ! #include "confdefs.h" #ifdef HAVE_UNISTD_H --- 22148,22157 ---- 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 HAVE_UNISTD_H *************** *** 13737,13749 **** _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:13739: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:13742: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:13744: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:13747: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_getenv_redef=yes --- 22188,22200 ---- _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 bash_cv_getenv_redef=yes *************** *** 13751,13785 **** echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_getenv_redef=no fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:13760: result: $bash_cv_getenv_redef" >&5 echo "${ECHO_T}$bash_cv_getenv_redef" >&6 if test $bash_cv_getenv_redef = yes; then ! cat >>confdefs.h <<\EOF #define CAN_REDEFINE_GETENV 1 ! EOF fi if test "$ac_cv_func_getcwd" = "yes"; then ! echo "$as_me:13770: checking if getcwd() calls popen()" >&5 ! echo $ECHO_N "checking if getcwd() calls popen()... $ECHO_C" >&6 ! if test "${bash_cv_getcwd_calls_popen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ! { echo "$as_me:13776: WARNING: cannot check whether getcwd calls popen if cross compiling -- defaulting to no" >&5 ! echo "$as_me: WARNING: cannot check whether getcwd calls popen if cross compiling -- defaulting to no" >&2;} ! bash_cv_getcwd_calls_popen=no else cat >conftest.$ac_ext <<_ACEOF ! #line 13782 "configure" ! #include "confdefs.h" #include --- 22202,22242 ---- 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 ) bash_cv_getenv_redef=no fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:$LINENO: result: $bash_cv_getenv_redef" >&5 echo "${ECHO_T}$bash_cv_getenv_redef" >&6 if test $bash_cv_getenv_redef = yes; then ! cat >>confdefs.h <<\_ACEOF #define CAN_REDEFINE_GETENV 1 ! _ACEOF fi if test "$ac_cv_func_getcwd" = "yes"; then ! echo "$as_me:$LINENO: checking if getcwd() will dynamically allocate memory" >&5 ! echo $ECHO_N "checking if getcwd() will dynamically allocate memory... $ECHO_C" >&6 ! if test "${bash_cv_getcwd_malloc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ! { echo "$as_me:$LINENO: WARNING: cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no" >&5 ! echo "$as_me: WARNING: cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no" >&2;} ! bash_cv_getcwd_malloc=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. */ #include *************** *** 13788,13866 **** #endif - #ifndef __STDC__ - #ifndef const - #define const - #endif - #endif - - int popen_called; - - FILE * - popen(command, type) - const char *command; - const char *type; - { - popen_called = 1; - return (FILE *)NULL; - } - - FILE *_popen(command, type) - const char *command; - const char *type; - { - return (popen (command, type)); - } - - int - pclose(stream) - FILE *stream; - { - return 0; - } - - int - _pclose(stream) - FILE *stream; - { - return 0; - } - main() { ! char lbuf[32]; ! popen_called = 0; ! getcwd(lbuf, 32); ! exit (popen_called); } _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:13838: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:13841: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:13843: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:13846: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! bash_cv_getcwd_calls_popen=no else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! bash_cv_getcwd_calls_popen=yes fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:13859: result: $bash_cv_getcwd_calls_popen" >&5 ! echo "${ECHO_T}$bash_cv_getcwd_calls_popen" >&6 ! if test $bash_cv_getcwd_calls_popen = yes; then ! cat >>confdefs.h <<\EOF #define GETCWD_BROKEN 1 ! EOF LIBOBJS="$LIBOBJS getcwd.$ac_objext" --- 22245,22286 ---- #endif main() { ! char *xpwd; ! xpwd = getcwd(0, 0); ! exit (xpwd == 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 ! bash_cv_getcwd_malloc=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 ) ! bash_cv_getcwd_malloc=no fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:$LINENO: result: $bash_cv_getcwd_malloc" >&5 ! echo "${ECHO_T}$bash_cv_getcwd_malloc" >&6 ! if test $bash_cv_getcwd_malloc = no; then ! cat >>confdefs.h <<\_ACEOF #define GETCWD_BROKEN 1 ! _ACEOF LIBOBJS="$LIBOBJS getcwd.$ac_objext" *************** *** 13869,13873 **** fi ! echo "$as_me:13871: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5 echo $ECHO_N "checking for presence of POSIX-style sigsetjmp/siglongjmp... $ECHO_C" >&6 if test "${bash_cv_func_sigsetjmp+set}" = set; then --- 22289,22293 ---- fi ! echo "$as_me:$LINENO: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5 echo $ECHO_N "checking for presence of POSIX-style sigsetjmp/siglongjmp... $ECHO_C" >&6 if test "${bash_cv_func_sigsetjmp+set}" = set; then *************** *** 13875,13879 **** else if test "$cross_compiling" = yes; then ! { echo "$as_me:13877: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&5 echo "$as_me: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&2;} bash_cv_func_sigsetjmp=missing --- 22295,22299 ---- else if test "$cross_compiling" = yes; then ! { echo "$as_me:$LINENO: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&5 echo "$as_me: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&2;} bash_cv_func_sigsetjmp=missing *************** *** 13881,13886 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 13883 "configure" ! #include "confdefs.h" #ifdef HAVE_UNISTD_H --- 22301,22310 ---- 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 HAVE_UNISTD_H *************** *** 13923,13935 **** _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:13925: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:13928: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:13930: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:13933: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_func_sigsetjmp=present --- 22347,22359 ---- _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 bash_cv_func_sigsetjmp=present *************** *** 13937,13957 **** echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_func_sigsetjmp=missing fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:13946: result: $bash_cv_func_sigsetjmp" >&5 echo "${ECHO_T}$bash_cv_func_sigsetjmp" >&6 if test $bash_cv_func_sigsetjmp = present; then ! cat >>confdefs.h <<\EOF #define HAVE_POSIX_SIGSETJMP 1 ! EOF fi ! echo "$as_me:13955: checking whether or not strcoll and strcmp differ" >&5 echo $ECHO_N "checking whether or not strcoll and strcmp differ... $ECHO_C" >&6 if test "${bash_cv_func_strcoll_broken+set}" = set; then --- 22361,22384 ---- 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 ) bash_cv_func_sigsetjmp=missing fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:$LINENO: result: $bash_cv_func_sigsetjmp" >&5 echo "${ECHO_T}$bash_cv_func_sigsetjmp" >&6 if test $bash_cv_func_sigsetjmp = present; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_POSIX_SIGSETJMP 1 ! _ACEOF fi ! ! echo "$as_me:$LINENO: checking whether or not strcoll and strcmp differ" >&5 echo $ECHO_N "checking whether or not strcoll and strcmp differ... $ECHO_C" >&6 if test "${bash_cv_func_strcoll_broken+set}" = set; then *************** *** 13959,13963 **** else if test "$cross_compiling" = yes; then ! { echo "$as_me:13961: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&5 echo "$as_me: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&2;} bash_cv_func_strcoll_broken=no --- 22386,22390 ---- else if test "$cross_compiling" = yes; then ! { echo "$as_me:$LINENO: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&5 echo "$as_me: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&2;} bash_cv_func_strcoll_broken=no *************** *** 13965,13970 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 13967 "configure" ! #include "confdefs.h" #include --- 22392,22401 ---- 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 *************** *** 14005,14017 **** _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:14007: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:14010: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:14012: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:14015: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_func_strcoll_broken=yes --- 22436,22448 ---- _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 bash_cv_func_strcoll_broken=yes *************** *** 14019,14041 **** echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_func_strcoll_broken=no fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:14028: result: $bash_cv_func_strcoll_broken" >&5 echo "${ECHO_T}$bash_cv_func_strcoll_broken" >&6 if test $bash_cv_func_strcoll_broken = yes; then ! cat >>confdefs.h <<\EOF #define STRCOLL_BROKEN 1 ! EOF fi if test "$ac_cv_func_putenv" = "yes"; then ! echo "$as_me:14039: checking for standard-conformant putenv declaration" >&5 echo $ECHO_N "checking for standard-conformant putenv declaration... $ECHO_C" >&6 if test "${bash_cv_std_putenv+set}" = set; then --- 22450,22478 ---- 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 ) bash_cv_func_strcoll_broken=no fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:$LINENO: result: $bash_cv_func_strcoll_broken" >&5 echo "${ECHO_T}$bash_cv_func_strcoll_broken" >&6 if test $bash_cv_func_strcoll_broken = yes; then ! cat >>confdefs.h <<\_ACEOF #define STRCOLL_BROKEN 1 ! _ACEOF fi + + if test "$ac_cv_func_putenv" = "yes"; then ! ! ! echo "$as_me:$LINENO: checking for standard-conformant putenv declaration" >&5 echo $ECHO_N "checking for standard-conformant putenv declaration... $ECHO_C" >&6 if test "${bash_cv_std_putenv+set}" = set; then *************** *** 14043,14048 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 14045 "configure" ! #include "confdefs.h" #if STDC_HEADERS --- 22480,22489 ---- 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 STDC_HEADERS *************** *** 14070,14088 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:14072: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:14075: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:14078: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:14081: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_std_putenv=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_std_putenv=no --- 22511,22530 ---- _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 bash_cv_std_putenv=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! bash_cv_std_putenv=no *************** *** 14090,14111 **** rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:14092: result: $bash_cv_std_putenv" >&5 echo "${ECHO_T}$bash_cv_std_putenv" >&6 if test $bash_cv_std_putenv = yes; then ! cat >>confdefs.h <<\EOF #define HAVE_STD_PUTENV 1 ! EOF fi else ! cat >>confdefs.h <<\EOF #define HAVE_STD_PUTENV 1 ! EOF fi if test "$ac_cv_func_unsetenv" = "yes"; then ! echo "$as_me:14109: checking for standard-conformant unsetenv declaration" >&5 echo $ECHO_N "checking for standard-conformant unsetenv declaration... $ECHO_C" >&6 if test "${bash_cv_std_unsetenv+set}" = set; then --- 22532,22555 ---- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $bash_cv_std_putenv" >&5 echo "${ECHO_T}$bash_cv_std_putenv" >&6 if test $bash_cv_std_putenv = yes; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_STD_PUTENV 1 ! _ACEOF fi else ! cat >>confdefs.h <<\_ACEOF #define HAVE_STD_PUTENV 1 ! _ACEOF fi if test "$ac_cv_func_unsetenv" = "yes"; then ! ! ! echo "$as_me:$LINENO: checking for standard-conformant unsetenv declaration" >&5 echo $ECHO_N "checking for standard-conformant unsetenv declaration... $ECHO_C" >&6 if test "${bash_cv_std_unsetenv+set}" = set; then *************** *** 14113,14118 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 14115 "configure" ! #include "confdefs.h" #if STDC_HEADERS --- 22557,22566 ---- 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 STDC_HEADERS *************** *** 14140,14158 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:14142: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:14145: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:14148: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:14151: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_std_unsetenv=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_std_unsetenv=no --- 22588,22607 ---- _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 bash_cv_std_unsetenv=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! bash_cv_std_unsetenv=no *************** *** 14160,14180 **** rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:14162: result: $bash_cv_std_unsetenv" >&5 echo "${ECHO_T}$bash_cv_std_unsetenv" >&6 if test $bash_cv_std_unsetenv = yes; then ! cat >>confdefs.h <<\EOF #define HAVE_STD_UNSETENV 1 ! EOF fi else ! cat >>confdefs.h <<\EOF #define HAVE_STD_UNSETENV 1 ! EOF fi ! echo "$as_me:14178: checking for printf floating point output in hex notation" >&5 echo $ECHO_N "checking for printf floating point output in hex notation... $ECHO_C" >&6 if test "${bash_cv_printf_a_format+set}" = set; then --- 22609,22629 ---- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:$LINENO: result: $bash_cv_std_unsetenv" >&5 echo "${ECHO_T}$bash_cv_std_unsetenv" >&6 if test $bash_cv_std_unsetenv = yes; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_STD_UNSETENV 1 ! _ACEOF fi else ! cat >>confdefs.h <<\_ACEOF #define HAVE_STD_UNSETENV 1 ! _ACEOF fi ! echo "$as_me:$LINENO: checking for printf floating point output in hex notation" >&5 echo $ECHO_N "checking for printf floating point output in hex notation... $ECHO_C" >&6 if test "${bash_cv_printf_a_format+set}" = set; then *************** *** 14182,14186 **** else if test "$cross_compiling" = yes; then ! { echo "$as_me:14184: WARNING: cannot check printf if cross compiling -- defaulting to no" >&5 echo "$as_me: WARNING: cannot check printf if cross compiling -- defaulting to no" >&2;} bash_cv_printf_a_format=no --- 22631,22635 ---- else if test "$cross_compiling" = yes; then ! { echo "$as_me:$LINENO: WARNING: cannot check printf if cross compiling -- defaulting to no" >&5 echo "$as_me: WARNING: cannot check printf if cross compiling -- defaulting to no" >&2;} bash_cv_printf_a_format=no *************** *** 14188,14193 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 14190 "configure" ! #include "confdefs.h" #include --- 22637,22646 ---- 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 *************** *** 14206,14218 **** _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:14208: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:14211: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:14213: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:14216: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_printf_a_format=yes --- 22659,22671 ---- _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 bash_cv_printf_a_format=yes *************** *** 14220,14240 **** echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_printf_a_format=no fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:14229: result: $bash_cv_printf_a_format" >&5 echo "${ECHO_T}$bash_cv_printf_a_format" >&6 if test $bash_cv_printf_a_format = yes; then ! cat >>confdefs.h <<\EOF #define HAVE_PRINTF_A_FORMAT 1 ! EOF fi ! echo "$as_me:14238: checking if signal handlers must be reinstalled when invoked" >&5 echo $ECHO_N "checking if signal handlers must be reinstalled when invoked... $ECHO_C" >&6 if test "${bash_cv_must_reinstall_sighandlers+set}" = set; then --- 22673,22698 ---- 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 ) bash_cv_printf_a_format=no fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:$LINENO: result: $bash_cv_printf_a_format" >&5 echo "${ECHO_T}$bash_cv_printf_a_format" >&6 if test $bash_cv_printf_a_format = yes; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_PRINTF_A_FORMAT 1 ! _ACEOF fi ! ! ! ! echo "$as_me:$LINENO: checking if signal handlers must be reinstalled when invoked" >&5 echo $ECHO_N "checking if signal handlers must be reinstalled when invoked... $ECHO_C" >&6 if test "${bash_cv_must_reinstall_sighandlers+set}" = set; then *************** *** 14242,14246 **** else if test "$cross_compiling" = yes; then ! { echo "$as_me:14244: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&5 echo "$as_me: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&2;} bash_cv_must_reinstall_sighandlers=no --- 22700,22704 ---- else if test "$cross_compiling" = yes; then ! { echo "$as_me:$LINENO: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&5 echo "$as_me: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&2;} bash_cv_must_reinstall_sighandlers=no *************** *** 14248,14253 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 14250 "configure" ! #include "confdefs.h" #include --- 22706,22715 ---- 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 *************** *** 14296,14308 **** _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:14298: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:14301: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:14303: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:14306: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_must_reinstall_sighandlers=no --- 22758,22770 ---- _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 bash_cv_must_reinstall_sighandlers=no *************** *** 14310,14330 **** echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_must_reinstall_sighandlers=yes fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:14319: result: $bash_cv_must_reinstall_sighandlers" >&5 echo "${ECHO_T}$bash_cv_must_reinstall_sighandlers" >&6 if test $bash_cv_must_reinstall_sighandlers = yes; then ! cat >>confdefs.h <<\EOF #define MUST_REINSTALL_SIGHANDLERS 1 ! EOF fi ! echo "$as_me:14328: checking for presence of necessary job control definitions" >&5 echo $ECHO_N "checking for presence of necessary job control definitions... $ECHO_C" >&6 if test "${bash_cv_job_control_missing+set}" = set; then --- 22772,22795 ---- 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 ) bash_cv_must_reinstall_sighandlers=yes fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:$LINENO: result: $bash_cv_must_reinstall_sighandlers" >&5 echo "${ECHO_T}$bash_cv_must_reinstall_sighandlers" >&6 if test $bash_cv_must_reinstall_sighandlers = yes; then ! cat >>confdefs.h <<\_ACEOF #define MUST_REINSTALL_SIGHANDLERS 1 ! _ACEOF fi ! ! echo "$as_me:$LINENO: checking for presence of necessary job control definitions" >&5 echo $ECHO_N "checking for presence of necessary job control definitions... $ECHO_C" >&6 if test "${bash_cv_job_control_missing+set}" = set; then *************** *** 14332,14336 **** else if test "$cross_compiling" = yes; then ! { echo "$as_me:14334: WARNING: cannot check job control if cross-compiling -- defaulting to missing" >&5 echo "$as_me: WARNING: cannot check job control if cross-compiling -- defaulting to missing" >&2;} bash_cv_job_control_missing=missing --- 22797,22801 ---- else if test "$cross_compiling" = yes; then ! { echo "$as_me:$LINENO: WARNING: cannot check job control if cross-compiling -- defaulting to missing" >&5 echo "$as_me: WARNING: cannot check job control if cross-compiling -- defaulting to missing" >&2;} bash_cv_job_control_missing=missing *************** *** 14338,14343 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 14340 "configure" ! #include "confdefs.h" #include --- 22803,22812 ---- 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 *************** *** 14386,14398 **** _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:14388: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:14391: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:14393: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:14396: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_job_control_missing=present --- 22855,22867 ---- _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 bash_cv_job_control_missing=present *************** *** 14400,14420 **** echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_job_control_missing=missing fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:14409: result: $bash_cv_job_control_missing" >&5 echo "${ECHO_T}$bash_cv_job_control_missing" >&6 if test $bash_cv_job_control_missing = missing; then ! cat >>confdefs.h <<\EOF #define JOB_CONTROL_MISSING 1 ! EOF fi ! echo "$as_me:14418: checking for presence of named pipes" >&5 echo $ECHO_N "checking for presence of named pipes... $ECHO_C" >&6 if test "${bash_cv_sys_named_pipes+set}" = set; then --- 22869,22891 ---- 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 ) bash_cv_job_control_missing=missing fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:$LINENO: result: $bash_cv_job_control_missing" >&5 echo "${ECHO_T}$bash_cv_job_control_missing" >&6 if test $bash_cv_job_control_missing = missing; then ! cat >>confdefs.h <<\_ACEOF #define JOB_CONTROL_MISSING 1 ! _ACEOF fi ! echo "$as_me:$LINENO: checking for presence of named pipes" >&5 echo $ECHO_N "checking for presence of named pipes... $ECHO_C" >&6 if test "${bash_cv_sys_named_pipes+set}" = set; then *************** *** 14422,14426 **** else if test "$cross_compiling" = yes; then ! { echo "$as_me:14424: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&5 echo "$as_me: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&2;} bash_cv_sys_named_pipes=missing --- 22893,22897 ---- else if test "$cross_compiling" = yes; then ! { echo "$as_me:$LINENO: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&5 echo "$as_me: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&2;} bash_cv_sys_named_pipes=missing *************** *** 14428,14433 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 14430 "configure" ! #include "confdefs.h" #include --- 22899,22908 ---- 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 *************** *** 14470,14482 **** _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:14472: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:14475: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:14477: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:14480: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_sys_named_pipes=present --- 22945,22957 ---- _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 bash_cv_sys_named_pipes=present *************** *** 14484,14548 **** echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_sys_named_pipes=missing fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:14493: result: $bash_cv_sys_named_pipes" >&5 echo "${ECHO_T}$bash_cv_sys_named_pipes" >&6 if test $bash_cv_sys_named_pipes = missing; then ! cat >>confdefs.h <<\EOF #define NAMED_PIPES_MISSING 1 ! EOF fi - echo "$as_me:14502: checking POSIX termios" >&5 - echo $ECHO_N "checking POSIX termios... $ECHO_C" >&6 - if test "${ac_cv_sys_posix_termios+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF - #line 14508 "configure" - #include "confdefs.h" - #include - #include - #include - int - main () - { - /* SunOS 4.0.3 has termios.h but not the library calls. */ - tcgetattr(0, 0); - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:14523: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:14526: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:14529: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:14532: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sys_posix_termios=yes - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_sys_posix_termios=no - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:14542: result: $ac_cv_sys_posix_termios" >&5 - echo "${ECHO_T}$ac_cv_sys_posix_termios" >&6 ! if test $ac_cv_sys_posix_termios = yes; then ! echo "$as_me:14546: checking whether termios.h defines TIOCGWINSZ" >&5 echo $ECHO_N "checking whether termios.h defines TIOCGWINSZ... $ECHO_C" >&6 if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then --- 22959,22982 ---- 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 ) bash_cv_sys_named_pipes=missing fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:$LINENO: result: $bash_cv_sys_named_pipes" >&5 echo "${ECHO_T}$bash_cv_sys_named_pipes" >&6 if test $bash_cv_sys_named_pipes = missing; then ! cat >>confdefs.h <<\_ACEOF #define NAMED_PIPES_MISSING 1 ! _ACEOF fi ! echo "$as_me:$LINENO: checking whether termios.h defines TIOCGWINSZ" >&5 echo $ECHO_N "checking whether termios.h defines TIOCGWINSZ... $ECHO_C" >&6 if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then *************** *** 14550,14555 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 14552 "configure" ! #include "confdefs.h" #include #include --- 22984,22993 ---- 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 *************** *** 14560,14564 **** _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "yes" >/dev/null 2>&1; then ac_cv_sys_tiocgwinsz_in_termios_h=yes else --- 22998,23002 ---- _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! $EGREP "yes" >/dev/null 2>&1; then ac_cv_sys_tiocgwinsz_in_termios_h=yes else *************** *** 14568,14577 **** fi ! echo "$as_me:14570: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_termios_h" >&6 - fi if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then ! echo "$as_me:14575: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5 echo $ECHO_N "checking whether sys/ioctl.h defines TIOCGWINSZ... $ECHO_C" >&6 if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then --- 23006,23014 ---- fi ! echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_termios_h" >&6 if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then ! echo "$as_me:$LINENO: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5 echo $ECHO_N "checking whether sys/ioctl.h defines TIOCGWINSZ... $ECHO_C" >&6 if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then *************** *** 14579,14584 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 14581 "configure" ! #include "confdefs.h" #include #include --- 23016,23025 ---- 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 *************** *** 14589,14593 **** _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "yes" >/dev/null 2>&1; then ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes else --- 23030,23034 ---- _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! $EGREP "yes" >/dev/null 2>&1; then ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes else *************** *** 14597,14613 **** fi ! echo "$as_me:14599: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6 if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then ! cat >>confdefs.h <<\EOF #define GWINSZ_IN_SYS_IOCTL 1 ! EOF fi fi ! echo "$as_me:14611: checking for TIOCSTAT in sys/ioctl.h" >&5 echo $ECHO_N "checking for TIOCSTAT in sys/ioctl.h... $ECHO_C" >&6 if test "${bash_cv_tiocstat_in_ioctl+set}" = set; then --- 23038,23054 ---- fi ! echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6 if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then ! cat >>confdefs.h <<\_ACEOF #define GWINSZ_IN_SYS_IOCTL 1 ! _ACEOF fi fi ! echo "$as_me:$LINENO: checking for TIOCSTAT in sys/ioctl.h" >&5 echo $ECHO_N "checking for TIOCSTAT in sys/ioctl.h... $ECHO_C" >&6 if test "${bash_cv_tiocstat_in_ioctl+set}" = set; then *************** *** 14615,14620 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 14617 "configure" ! #include "confdefs.h" #include #include --- 23056,23065 ---- 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 *************** *** 14628,14646 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:14630: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:14633: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:14636: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:14639: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_tiocstat_in_ioctl=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_tiocstat_in_ioctl=no fi --- 23073,23092 ---- _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 bash_cv_tiocstat_in_ioctl=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! bash_cv_tiocstat_in_ioctl=no fi *************** *** 14648,14661 **** fi ! echo "$as_me:14650: result: $bash_cv_tiocstat_in_ioctl" >&5 echo "${ECHO_T}$bash_cv_tiocstat_in_ioctl" >&6 if test $bash_cv_tiocstat_in_ioctl = yes; then ! cat >>confdefs.h <<\EOF #define TIOCSTAT_IN_SYS_IOCTL 1 ! EOF fi ! echo "$as_me:14659: checking for FIONREAD in sys/ioctl.h" >&5 echo $ECHO_N "checking for FIONREAD in sys/ioctl.h... $ECHO_C" >&6 if test "${bash_cv_fionread_in_ioctl+set}" = set; then --- 23094,23107 ---- fi ! echo "$as_me:$LINENO: result: $bash_cv_tiocstat_in_ioctl" >&5 echo "${ECHO_T}$bash_cv_tiocstat_in_ioctl" >&6 if test $bash_cv_tiocstat_in_ioctl = yes; then ! cat >>confdefs.h <<\_ACEOF #define TIOCSTAT_IN_SYS_IOCTL 1 ! _ACEOF fi ! echo "$as_me:$LINENO: checking for FIONREAD in sys/ioctl.h" >&5 echo $ECHO_N "checking for FIONREAD in sys/ioctl.h... $ECHO_C" >&6 if test "${bash_cv_fionread_in_ioctl+set}" = set; then *************** *** 14663,14668 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 14665 "configure" ! #include "confdefs.h" #include #include --- 23109,23118 ---- 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 *************** *** 14676,14694 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:14678: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:14681: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:14684: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:14687: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_fionread_in_ioctl=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_fionread_in_ioctl=no fi --- 23126,23145 ---- _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 bash_cv_fionread_in_ioctl=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! bash_cv_fionread_in_ioctl=no fi *************** *** 14696,14709 **** fi ! echo "$as_me:14698: result: $bash_cv_fionread_in_ioctl" >&5 echo "${ECHO_T}$bash_cv_fionread_in_ioctl" >&6 if test $bash_cv_fionread_in_ioctl = yes; then ! cat >>confdefs.h <<\EOF #define FIONREAD_IN_SYS_IOCTL 1 ! EOF fi ! echo "$as_me:14707: checking for speed_t in sys/types.h" >&5 echo $ECHO_N "checking for speed_t in sys/types.h... $ECHO_C" >&6 if test "${bash_cv_speed_t_in_sys_types+set}" = set; then --- 23147,23161 ---- fi ! echo "$as_me:$LINENO: result: $bash_cv_fionread_in_ioctl" >&5 echo "${ECHO_T}$bash_cv_fionread_in_ioctl" >&6 if test $bash_cv_fionread_in_ioctl = yes; then ! cat >>confdefs.h <<\_ACEOF #define FIONREAD_IN_SYS_IOCTL 1 ! _ACEOF fi ! ! echo "$as_me:$LINENO: checking for speed_t in sys/types.h" >&5 echo $ECHO_N "checking for speed_t in sys/types.h... $ECHO_C" >&6 if test "${bash_cv_speed_t_in_sys_types+set}" = set; then *************** *** 14711,14716 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 14713 "configure" ! #include "confdefs.h" #include int --- 23163,23172 ---- 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 *************** *** 14723,14741 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:14725: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:14728: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:14731: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:14734: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_speed_t_in_sys_types=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_speed_t_in_sys_types=no fi --- 23179,23198 ---- _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 bash_cv_speed_t_in_sys_types=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! bash_cv_speed_t_in_sys_types=no fi *************** *** 14743,14756 **** fi ! echo "$as_me:14745: result: $bash_cv_speed_t_in_sys_types" >&5 echo "${ECHO_T}$bash_cv_speed_t_in_sys_types" >&6 if test $bash_cv_speed_t_in_sys_types = yes; then ! cat >>confdefs.h <<\EOF #define SPEED_T_IN_SYS_TYPES 1 ! EOF fi ! echo "$as_me:14754: checking whether getpw functions are declared in pwd.h" >&5 echo $ECHO_N "checking whether getpw functions are declared in pwd.h... $ECHO_C" >&6 if test "${bash_cv_getpw_declared+set}" = set; then --- 23200,23213 ---- fi ! echo "$as_me:$LINENO: result: $bash_cv_speed_t_in_sys_types" >&5 echo "${ECHO_T}$bash_cv_speed_t_in_sys_types" >&6 if test $bash_cv_speed_t_in_sys_types = yes; then ! cat >>confdefs.h <<\_ACEOF #define SPEED_T_IN_SYS_TYPES 1 ! _ACEOF fi ! echo "$as_me:$LINENO: checking whether getpw functions are declared in pwd.h" >&5 echo $ECHO_N "checking whether getpw functions are declared in pwd.h... $ECHO_C" >&6 if test "${bash_cv_getpw_declared+set}" = set; then *************** *** 14758,14763 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 14760 "configure" ! #include "confdefs.h" #include --- 23215,23224 ---- 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 *************** *** 14769,14773 **** _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "getpwuid" >/dev/null 2>&1; then bash_cv_getpw_declared=yes else --- 23230,23234 ---- _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! $EGREP "getpwuid" >/dev/null 2>&1; then bash_cv_getpw_declared=yes else *************** *** 14778,14791 **** fi ! echo "$as_me:14780: result: $bash_cv_getpw_declared" >&5 echo "${ECHO_T}$bash_cv_getpw_declared" >&6 if test $bash_cv_getpw_declared = yes; then ! cat >>confdefs.h <<\EOF #define HAVE_GETPW_DECLS 1 ! EOF fi ! echo "$as_me:14789: checking for unusable real-time signals due to large values" >&5 echo $ECHO_N "checking for unusable real-time signals due to large values... $ECHO_C" >&6 if test "${bash_cv_unusable_rtsigs+set}" = set; then --- 23239,23252 ---- fi ! echo "$as_me:$LINENO: result: $bash_cv_getpw_declared" >&5 echo "${ECHO_T}$bash_cv_getpw_declared" >&6 if test $bash_cv_getpw_declared = yes; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_GETPW_DECLS 1 ! _ACEOF fi ! echo "$as_me:$LINENO: checking for unusable real-time signals due to large values" >&5 echo $ECHO_N "checking for unusable real-time signals due to large values... $ECHO_C" >&6 if test "${bash_cv_unusable_rtsigs+set}" = set; then *************** *** 14793,14797 **** else if test "$cross_compiling" = yes; then ! { echo "$as_me:14795: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&5 echo "$as_me: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&2;} bash_cv_unusable_rtsigs=yes --- 23254,23258 ---- else if test "$cross_compiling" = yes; then ! { echo "$as_me:$LINENO: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&5 echo "$as_me: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&2;} bash_cv_unusable_rtsigs=yes *************** *** 14799,14804 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 14801 "configure" ! #include "confdefs.h" #include --- 23260,23269 ---- 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 *************** *** 14822,14834 **** _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:14824: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:14827: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:14829: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:14832: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_unusable_rtsigs=yes --- 23287,23299 ---- _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 bash_cv_unusable_rtsigs=yes *************** *** 14836,14855 **** echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_unusable_rtsigs=no fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:14845: result: $bash_cv_unusable_rtsigs" >&5 echo "${ECHO_T}$bash_cv_unusable_rtsigs" >&6 if test $bash_cv_unusable_rtsigs = yes; then ! cat >>confdefs.h <<\EOF #define UNUSABLE_RT_SIGNALS 1 ! EOF fi if test "$bash_cv_sys_siglist" = no && test "$bash_cv_under_sys_siglist" = no && test "$bash_cv_have_strsignal" = no; then SIGLIST_O=siglist.o --- 23301,23326 ---- 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 ) bash_cv_unusable_rtsigs=no fi ! rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:$LINENO: result: $bash_cv_unusable_rtsigs" >&5 echo "${ECHO_T}$bash_cv_unusable_rtsigs" >&6 if test $bash_cv_unusable_rtsigs = yes; then ! cat >>confdefs.h <<\_ACEOF #define UNUSABLE_RT_SIGNALS 1 ! _ACEOF fi + + + + if test "$bash_cv_sys_siglist" = no && test "$bash_cv_under_sys_siglist" = no && test "$bash_cv_have_strsignal" = no; then SIGLIST_O=siglist.o *************** *** 14858,14863 **** fi case "$host_os" in ! hpux*) echo "$as_me:14861: checking whether $host_os needs _KERNEL for RLIMIT defines" >&5 echo $ECHO_N "checking whether $host_os needs _KERNEL for RLIMIT defines... $ECHO_C" >&6 if test "${bash_cv_kernel_rlimit+set}" = set; then --- 23329,23336 ---- fi + + case "$host_os" in ! hpux*) echo "$as_me:$LINENO: checking whether $host_os needs _KERNEL for RLIMIT defines" >&5 echo $ECHO_N "checking whether $host_os needs _KERNEL for RLIMIT defines... $ECHO_C" >&6 if test "${bash_cv_kernel_rlimit+set}" = set; then *************** *** 14865,14870 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 14867 "configure" ! #include "confdefs.h" #include --- 23338,23347 ---- 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 *************** *** 14883,14904 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:14885: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:14888: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:14891: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:14894: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_kernel_rlimit=no else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF ! #line 14901 "configure" ! #include "confdefs.h" #include --- 23360,23386 ---- _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 bash_cv_kernel_rlimit=no else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! 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 *************** *** 14919,14937 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:14921: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:14924: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:14927: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:14930: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_kernel_rlimit=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 bash_cv_kernel_rlimit=no fi --- 23401,23420 ---- _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 bash_cv_kernel_rlimit=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! bash_cv_kernel_rlimit=no fi *************** *** 14942,14951 **** fi ! echo "$as_me:14944: result: $bash_cv_kernel_rlimit" >&5 echo "${ECHO_T}$bash_cv_kernel_rlimit" >&6 if test $bash_cv_kernel_rlimit = yes; then ! cat >>confdefs.h <<\EOF #define RLIMIT_NEEDS_KERNEL 1 ! EOF fi --- 23425,23434 ---- fi ! echo "$as_me:$LINENO: result: $bash_cv_kernel_rlimit" >&5 echo "${ECHO_T}$bash_cv_kernel_rlimit" >&6 if test $bash_cv_kernel_rlimit = yes; then ! cat >>confdefs.h <<\_ACEOF #define RLIMIT_NEEDS_KERNEL 1 ! _ACEOF fi *************** *** 14961,14965 **** _bash_needmsg=yes else ! echo "$as_me:14963: checking which library has the termcap functions" >&5 echo $ECHO_N "checking which library has the termcap functions... $ECHO_C" >&6 _bash_needmsg= --- 23444,23448 ---- _bash_needmsg=yes else ! echo "$as_me:$LINENO: checking which library has the termcap functions" >&5 echo $ECHO_N "checking which library has the termcap functions... $ECHO_C" >&6 _bash_needmsg= *************** *** 14968,14972 **** echo $ECHO_N "(cached) $ECHO_C" >&6 else ! echo "$as_me:14970: checking for tgetent in -ltermcap" >&5 echo $ECHO_N "checking for tgetent in -ltermcap... $ECHO_C" >&6 if test "${ac_cv_lib_termcap_tgetent+set}" = set; then --- 23451,23530 ---- echo $ECHO_N "(cached) $ECHO_C" >&6 else ! echo "$as_me:$LINENO: checking for tgetent" >&5 ! echo $ECHO_N "checking for tgetent... $ECHO_C" >&6 ! if test "${ac_cv_func_tgetent+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 tgetent (); 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 tgetent (); ! /* 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_tgetent) || defined (__stub___tgetent) ! choke me ! #else ! char (*f) () = tgetent; ! #endif ! #ifdef __cplusplus ! } ! #endif ! ! int ! main () ! { ! return f != tgetent; ! ; ! 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_tgetent=yes ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! ac_cv_func_tgetent=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:$LINENO: result: $ac_cv_func_tgetent" >&5 ! echo "${ECHO_T}$ac_cv_func_tgetent" >&6 ! if test $ac_cv_func_tgetent = yes; then ! bash_cv_termcap_lib=libc ! else ! echo "$as_me:$LINENO: checking for tgetent in -ltermcap" >&5 echo $ECHO_N "checking for tgetent in -ltermcap... $ECHO_C" >&6 if test "${ac_cv_lib_termcap_tgetent+set}" = set; then *************** *** 14976,14981 **** LIBS="-ltermcap $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 14978 "configure" ! #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ --- 23534,23543 ---- LIBS="-ltermcap $LIBS" 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. */ /* Override any gcc2 internal prototype to avoid an error. */ *************** *** 14995,15013 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:14997: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:15000: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:15003: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:15006: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_termcap_tgetent=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_lib_termcap_tgetent=no fi --- 23557,23576 ---- _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_lib_termcap_tgetent=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_lib_termcap_tgetent=no fi *************** *** 15015,15024 **** LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:15017: result: $ac_cv_lib_termcap_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_termcap_tgetent" >&6 if test $ac_cv_lib_termcap_tgetent = yes; then bash_cv_termcap_lib=libtermcap else ! echo "$as_me:15022: checking for tgetent in -ltinfo" >&5 echo $ECHO_N "checking for tgetent in -ltinfo... $ECHO_C" >&6 if test "${ac_cv_lib_tinfo_tgetent+set}" = set; then --- 23578,23587 ---- LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_termcap_tgetent" >&6 if test $ac_cv_lib_termcap_tgetent = yes; then bash_cv_termcap_lib=libtermcap else ! echo "$as_me:$LINENO: checking for tgetent in -ltinfo" >&5 echo $ECHO_N "checking for tgetent in -ltinfo... $ECHO_C" >&6 if test "${ac_cv_lib_tinfo_tgetent+set}" = set; then *************** *** 15028,15033 **** LIBS="-ltinfo $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 15030 "configure" ! #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ --- 23591,23600 ---- LIBS="-ltinfo $LIBS" 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. */ /* Override any gcc2 internal prototype to avoid an error. */ *************** *** 15047,15065 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:15049: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:15052: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:15055: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:15058: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_tinfo_tgetent=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_lib_tinfo_tgetent=no fi --- 23614,23633 ---- _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_lib_tinfo_tgetent=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_lib_tinfo_tgetent=no fi *************** *** 15067,15076 **** LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:15069: result: $ac_cv_lib_tinfo_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_tinfo_tgetent" >&6 if test $ac_cv_lib_tinfo_tgetent = yes; then bash_cv_termcap_lib=libtinfo else ! echo "$as_me:15074: checking for tgetent in -lcurses" >&5 echo $ECHO_N "checking for tgetent in -lcurses... $ECHO_C" >&6 if test "${ac_cv_lib_curses_tgetent+set}" = set; then --- 23635,23644 ---- LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:$LINENO: result: $ac_cv_lib_tinfo_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_tinfo_tgetent" >&6 if test $ac_cv_lib_tinfo_tgetent = yes; then bash_cv_termcap_lib=libtinfo else ! echo "$as_me:$LINENO: checking for tgetent in -lcurses" >&5 echo $ECHO_N "checking for tgetent in -lcurses... $ECHO_C" >&6 if test "${ac_cv_lib_curses_tgetent+set}" = set; then *************** *** 15080,15085 **** LIBS="-lcurses $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 15082 "configure" ! #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ --- 23648,23657 ---- LIBS="-lcurses $LIBS" 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. */ /* Override any gcc2 internal prototype to avoid an error. */ *************** *** 15099,15117 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:15101: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:15104: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:15107: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:15110: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_curses_tgetent=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_lib_curses_tgetent=no fi --- 23671,23690 ---- _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_lib_curses_tgetent=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_lib_curses_tgetent=no fi *************** *** 15119,15128 **** LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:15121: result: $ac_cv_lib_curses_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_curses_tgetent" >&6 if test $ac_cv_lib_curses_tgetent = yes; then bash_cv_termcap_lib=libcurses else ! echo "$as_me:15126: checking for tgetent in -lncurses" >&5 echo $ECHO_N "checking for tgetent in -lncurses... $ECHO_C" >&6 if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then --- 23692,23701 ---- LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:$LINENO: result: $ac_cv_lib_curses_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_curses_tgetent" >&6 if test $ac_cv_lib_curses_tgetent = yes; then bash_cv_termcap_lib=libcurses else ! echo "$as_me:$LINENO: checking for tgetent in -lncurses" >&5 echo $ECHO_N "checking for tgetent in -lncurses... $ECHO_C" >&6 if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then *************** *** 15132,15137 **** LIBS="-lncurses $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 15134 "configure" ! #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ --- 23705,23714 ---- LIBS="-lncurses $LIBS" 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. */ /* Override any gcc2 internal prototype to avoid an error. */ *************** *** 15151,15169 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:15153: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:15156: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:15159: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:15162: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_ncurses_tgetent=yes else echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ac_cv_lib_ncurses_tgetent=no fi --- 23728,23747 ---- _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_lib_ncurses_tgetent=yes else echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_lib_ncurses_tgetent=no fi *************** *** 15171,15175 **** LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:15173: result: $ac_cv_lib_ncurses_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_ncurses_tgetent" >&6 if test $ac_cv_lib_ncurses_tgetent = yes; then --- 23749,23753 ---- LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_ncurses_tgetent" >&6 if test $ac_cv_lib_ncurses_tgetent = yes; then *************** *** 15187,15195 **** fi if test "X$_bash_needmsg" = "Xyes"; then ! echo "$as_me:15190: checking which library has the termcap functions" >&5 echo $ECHO_N "checking which library has the termcap functions... $ECHO_C" >&6 fi ! echo "$as_me:15193: result: using $bash_cv_termcap_lib" >&5 echo "${ECHO_T}using $bash_cv_termcap_lib" >&6 if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then --- 23765,23775 ---- fi + fi + if test "X$_bash_needmsg" = "Xyes"; then ! echo "$as_me:$LINENO: checking which library has the termcap functions" >&5 echo $ECHO_N "checking which library has the termcap functions... $ECHO_C" >&6 fi ! echo "$as_me:$LINENO: result: using $bash_cv_termcap_lib" >&5 echo "${ECHO_T}using $bash_cv_termcap_lib" >&6 if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then *************** *** 15206,15209 **** --- 23786,23792 ---- TERMCAP_LIB=-lncurses TERMCAP_DEP= + elif test $bash_cv_termcap_lib = libc; then + TERMCAP_LIB= + TERMCAP_DEP= else TERMCAP_LIB=-lcurses *************** *** 15213,15224 **** fi ! echo "$as_me:15215: checking whether /dev/fd is available" >&5 echo $ECHO_N "checking whether /dev/fd is available... $ECHO_C" >&6 if test "${bash_cv_dev_fd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! if test -d /dev/fd && test -r /dev/fd/0; then bash_cv_dev_fd=standard ! elif test -d /proc/self/fd && test -r /proc/self/fd/0; then bash_cv_dev_fd=whacky else --- 23796,23809 ---- fi ! ! ! echo "$as_me:$LINENO: checking whether /dev/fd is available" >&5 echo $ECHO_N "checking whether /dev/fd is available... $ECHO_C" >&6 if test "${bash_cv_dev_fd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! if test -d /dev/fd && test -r /dev/fd/0 < /dev/null; then bash_cv_dev_fd=standard ! elif test -d /proc/self/fd && test -r /proc/self/fd/0 < /dev/null; then bash_cv_dev_fd=whacky else *************** *** 15228,15261 **** fi ! echo "$as_me:15230: result: $bash_cv_dev_fd" >&5 echo "${ECHO_T}$bash_cv_dev_fd" >&6 if test $bash_cv_dev_fd = "standard"; then ! cat >>confdefs.h <<\EOF #define HAVE_DEV_FD 1 ! EOF ! cat >>confdefs.h <<\EOF #define DEV_FD_PREFIX "/dev/fd/" ! EOF elif test $bash_cv_dev_fd = "whacky"; then ! cat >>confdefs.h <<\EOF #define HAVE_DEV_FD 1 ! EOF ! cat >>confdefs.h <<\EOF #define DEV_FD_PREFIX "/proc/self/fd/" ! EOF fi ! echo "$as_me:15252: checking whether /dev/stdin stdout stderr are available" >&5 echo $ECHO_N "checking whether /dev/stdin stdout stderr are available... $ECHO_C" >&6 if test "${bash_cv_dev_stdin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! if test -d /dev/fd && test -r /dev/stdin; then bash_cv_dev_stdin=present ! elif test -d /proc/self/fd && test -r /dev/stdin; then bash_cv_dev_stdin=present else --- 23813,23846 ---- fi ! echo "$as_me:$LINENO: result: $bash_cv_dev_fd" >&5 echo "${ECHO_T}$bash_cv_dev_fd" >&6 if test $bash_cv_dev_fd = "standard"; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_DEV_FD 1 ! _ACEOF ! cat >>confdefs.h <<\_ACEOF #define DEV_FD_PREFIX "/dev/fd/" ! _ACEOF elif test $bash_cv_dev_fd = "whacky"; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_DEV_FD 1 ! _ACEOF ! cat >>confdefs.h <<\_ACEOF #define DEV_FD_PREFIX "/proc/self/fd/" ! _ACEOF fi ! echo "$as_me:$LINENO: checking whether /dev/stdin stdout stderr are available" >&5 echo $ECHO_N "checking whether /dev/stdin stdout stderr are available... $ECHO_C" >&6 if test "${bash_cv_dev_stdin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! if test -d /dev/fd && test -r /dev/stdin < /dev/null; then bash_cv_dev_stdin=present ! elif test -d /proc/self/fd && test -r /dev/stdin < /dev/null; then bash_cv_dev_stdin=present else *************** *** 15265,15278 **** fi ! echo "$as_me:15267: result: $bash_cv_dev_stdin" >&5 echo "${ECHO_T}$bash_cv_dev_stdin" >&6 if test $bash_cv_dev_stdin = "present"; then ! cat >>confdefs.h <<\EOF #define HAVE_DEV_STDIN 1 ! EOF fi ! echo "$as_me:15276: checking for default mail directory" >&5 echo $ECHO_N "checking for default mail directory... $ECHO_C" >&6 if test "${bash_cv_mail_dir+set}" = set; then --- 23850,23863 ---- fi ! echo "$as_me:$LINENO: result: $bash_cv_dev_stdin" >&5 echo "${ECHO_T}$bash_cv_dev_stdin" >&6 if test $bash_cv_dev_stdin = "present"; then ! cat >>confdefs.h <<\_ACEOF #define HAVE_DEV_STDIN 1 ! _ACEOF fi ! echo "$as_me:$LINENO: checking for default mail directory" >&5 echo $ECHO_N "checking for default mail directory... $ECHO_C" >&6 if test "${bash_cv_mail_dir+set}" = set; then *************** *** 15293,15301 **** fi ! echo "$as_me:15295: result: $bash_cv_mail_dir" >&5 echo "${ECHO_T}$bash_cv_mail_dir" >&6 ! cat >>confdefs.h <&5 echo "${ECHO_T}$bash_cv_mail_dir" >&6 ! cat >>confdefs.h <<_ACEOF #define DEFAULT_MAIL_DIRECTORY "$bash_cv_mail_dir" ! _ACEOF ! ! if test "$bash_cv_job_control_missing" = missing; then *************** *** 15304,15310 **** if test "$opt_job_control" = yes; then ! cat >>confdefs.h <<\EOF #define JOB_CONTROL 1 ! EOF JOBS_O=jobs.o --- 23891,23897 ---- if test "$opt_job_control" = yes; then ! cat >>confdefs.h <<\_ACEOF #define JOB_CONTROL 1 ! _ACEOF JOBS_O=jobs.o *************** *** 15313,15334 **** fi LOCAL_DEFS=-DSHELL case "${host_os}" in ! sysv4.2*) cat >>confdefs.h <<\EOF #define SVR4_2 1 ! EOF ! cat >>confdefs.h <<\EOF #define SVR4 1 ! EOF ;; ! sysv4*) cat >>confdefs.h <<\EOF #define SVR4 1 ! EOF ;; ! sysv5*) cat >>confdefs.h <<\EOF #define SVR5 1 ! EOF ;; hpux9*) LOCAL_CFLAGS="-DHPUX9 -DHPUX" ;; --- 23900,23925 ---- fi + + + LOCAL_DEFS=-DSHELL + case "${host_os}" in ! sysv4.2*) cat >>confdefs.h <<\_ACEOF #define SVR4_2 1 ! _ACEOF ! cat >>confdefs.h <<\_ACEOF #define SVR4 1 ! _ACEOF ;; ! sysv4*) cat >>confdefs.h <<\_ACEOF #define SVR4 1 ! _ACEOF ;; ! sysv5*) cat >>confdefs.h <<\_ACEOF #define SVR5 1 ! _ACEOF ;; hpux9*) LOCAL_CFLAGS="-DHPUX9 -DHPUX" ;; *************** *** 15347,15351 **** *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; powerux*) LOCAL_LIBS="-lgen" ;; ! cygwin*) LOCAL_LIBS="-luser32" ;; opennt*|interix*) LOCAL_CFLAGS="-DNO_MAIN_ENV_ARG -DBROKEN_DIRENT_D_INO" ;; esac --- 23938,23942 ---- *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; powerux*) LOCAL_LIBS="-lgen" ;; ! cygwin*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; opennt*|interix*) LOCAL_CFLAGS="-DNO_MAIN_ENV_ARG -DBROKEN_DIRENT_D_INO" ;; esac *************** *** 15384,15392 **** if test "$ac_cv_func_dlopen" = "yes" && test -f ${srcdir}/support/shobj-conf then ! echo "$as_me:15386: checking shared object configuration for loadable builtins" >&5 echo $ECHO_N "checking shared object configuration for loadable builtins... $ECHO_C" >&6 eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c "${host_cpu}" -o "${host_os}" -v "${host_vendor}"` ! echo "$as_me:15390: result: $SHOBJ_STATUS" >&5 echo "${ECHO_T}$SHOBJ_STATUS" >&6 fi --- 23975,23989 ---- if test "$ac_cv_func_dlopen" = "yes" && test -f ${srcdir}/support/shobj-conf then ! echo "$as_me:$LINENO: checking shared object configuration for loadable builtins" >&5 echo $ECHO_N "checking shared object configuration for loadable builtins... $ECHO_C" >&6 eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c "${host_cpu}" -o "${host_os}" -v "${host_vendor}"` ! ! ! ! ! ! ! echo "$as_me:$LINENO: result: $SHOBJ_STATUS" >&5 echo "${ECHO_T}$SHOBJ_STATUS" >&6 fi *************** *** 15409,15417 **** BUILD_DIR=`pwd` #AC_SUBST(ALLOCA_SOURCE) #AC_SUBST(ALLOCA_OBJECT) ! ac_config_files="$ac_config_files Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile lib/tilde/Makefile doc/Makefile support/Makefile examples/loadables/Makefile examples/loadables/perl/Makefile" ! ac_config_commands="$ac_config_commands default" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure --- 24006,24037 ---- BUILD_DIR=`pwd` + + + + + + + + + + + + + + + + + + + + + + + #AC_SUBST(ALLOCA_SOURCE) #AC_SUBST(ALLOCA_OBJECT) ! ac_config_files="$ac_config_files Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile lib/intl/Makefile lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile lib/tilde/Makefile doc/Makefile support/Makefile po/Makefile.in examples/loadables/Makefile examples/loadables/perl/Makefile pathnames.h" ! ac_config_commands="$ac_config_commands default" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure *************** *** 15424,15428 **** # the --recheck option to rerun configure. # ! # `ac_cv_env_foo' variables (set or unset) will be overriden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. --- 24044,24048 ---- # the --recheck option to rerun configure. # ! # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. *************** *** 15459,15463 **** /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache ! if cmp -s $cache_file confcache; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" --- 24079,24083 ---- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache ! if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" *************** *** 15490,15501 **** DEFS=-DHAVE_CONFIG_H : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" ! { echo "$as_me:15495: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL ! # Generated automatically by configure. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging --- 24110,24137 ---- DEFS=-DHAVE_CONFIG_H + ac_libobjs= + ac_ltlibobjs= + for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + 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' + done + LIBOBJS=$ac_libobjs + + LTLIBOBJS=$ac_ltlibobjs + + + : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" ! { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL ! # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging *************** *** 15503,15522 **** debug=false SHELL=\${CONFIG_SHELL-$SHELL} - ac_cs_invocation="\$0 \$@" - _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # Name of the executable. ! as_me=`echo "$0" |sed 's,.*[\\/],,'` if expr a : '\(a\)' >/dev/null 2>&1; then --- 24139,24334 ---- debug=false + ac_cs_recheck=false + ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF + ## --------------------- ## + ## M4sh Initialization. ## + ## --------------------- ## + # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi + # Support unset when possible. + if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset + else + as_unset=false + fi + + + # Work around bugs in pre-3.0 UWIN ksh. + $as_unset ENV MAIL MAILPATH + PS1='$ ' + PS2='> ' + PS4='+ ' + + # NLS nuisances. + for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + 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 + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi + done + + # Required to use basename. + if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr + else + as_expr=false + fi + + if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename + else + as_basename=false + fi + + # Name of the executable. ! as_me=`$as_basename "$0" || ! $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ ! X"$0" : 'X\(//\)$' \| \ ! X"$0" : 'X\(/\)$' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X/"$0" | ! sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } ! /^X\/\(\/\/\)$/{ s//\1/; q; } ! /^X\/\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` ! ! ! # PATH needs CR, and LINENO needs CR and PATH. ! # Avoid depending upon Character Ranges. ! as_cr_letters='abcdefghijklmnopqrstuvwxyz' ! as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' ! as_cr_Letters=$as_cr_letters$as_cr_LETTERS ! as_cr_digits='0123456789' ! as_cr_alnum=$as_cr_Letters$as_cr_digits ! ! # 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 ! ! ! as_lineno_1=$LINENO ! as_lineno_2=$LINENO ! as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` ! test "x$as_lineno_1" != "x$as_lineno_2" && ! test "x$as_lineno_3" = "x$as_lineno_2" || { ! # Find who we are. Look in the path if we contain no path at all ! # relative or not. ! case $0 in ! *[\\/]* ) as_myself=$0 ;; ! *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break ! done ! ! ;; ! esac ! # We did not find ourselves, most probably we were run as `sh COMMAND' ! # in which case we are not to be found in the path. ! if test "x$as_myself" = x; then ! as_myself=$0 ! fi ! if test ! -f "$as_myself"; then ! { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 ! echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} ! { (exit 1); exit 1; }; } ! fi ! case $CONFIG_SHELL in ! '') ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for as_base in sh bash ksh sh5; do ! case $as_dir in ! /*) ! if ("$as_dir/$as_base" -c ' ! as_lineno_1=$LINENO ! as_lineno_2=$LINENO ! as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` ! test "x$as_lineno_1" != "x$as_lineno_2" && ! test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then ! $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } ! $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } ! CONFIG_SHELL=$as_dir/$as_base ! export CONFIG_SHELL ! exec "$CONFIG_SHELL" "$0" ${1+"$@"} ! fi;; ! esac ! done ! done ! ;; ! esac ! ! # Create $as_me.lineno as a copy of $as_myself, but with $LINENO ! # uniformly replaced by the line number. The first 'sed' inserts a ! # line-number line before each line; the second 'sed' does the real ! # work. The second script uses 'N' to pair each line-number line ! # with the numbered line, and appends trailing '-' during ! # substitution so that $LINENO is not a special case at line end. ! # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the ! # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) ! sed '=' <$as_myself | ! sed ' ! N ! s,$,-, ! : loop ! s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, ! t loop ! s,-$,, ! s,^['$as_cr_digits']*\n,, ! ' >$as_me.lineno && ! chmod +x $as_me.lineno || ! { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 ! echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} ! { (exit 1); exit 1; }; } ! ! # Don't try to exec as it changes $[0], causing all sort of problems ! # (the dirname of $[0] is not the place where we might find the ! # original and so on. Autoconf is especially sensible to this). ! . ./$as_me.lineno ! # Exit status is that of the last command. ! exit ! } ! ! ! case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in ! *c*,-n*) ECHO_N= ECHO_C=' ! ' ECHO_T=' ' ;; ! *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; ! *) ECHO_N= ECHO_C='\c' ECHO_T= ;; ! esac if expr a : '\(a\)' >/dev/null 2>&1; then *************** *** 15544,15565 **** rm -f conf$$ conf$$.exe conf$$.file ! as_executable_p="test -f" ! ! # Support unset when possible. ! if (FOO=FOO; unset FOO) >/dev/null 2>&1; then ! as_unset=unset else ! as_unset=false fi ! # NLS nuisances. ! $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } ! $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } ! $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } ! $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } ! $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } ! $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } ! $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } ! $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } # IFS --- 24356,24373 ---- rm -f conf$$ conf$$.exe conf$$.file ! if mkdir -p . 2>/dev/null; then ! as_mkdir_p=: else ! 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" ! ! # Sed expression to map a string onto a valid variable name. ! as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" ! # IFS *************** *** 15570,15577 **** # CDPATH. ! $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } exec 6>&1 _ACEOF --- 24378,24409 ---- # CDPATH. ! $as_unset CDPATH exec 6>&1 + # Open the log real soon, to keep \$[0] and so on meaningful, and to + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. Logging --version etc. is OK. + exec 5>>config.log + { + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX + ## Running $as_me. ## + _ASBOX + } >&5 + cat >&5 <<_CSEOF + + This file was extended by bash $as_me 3.0-release, which was + generated by GNU Autoconf 2.57. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + + _CSEOF + echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 + echo >&5 _ACEOF *************** *** 15593,15597 **** fi ! cat >>$CONFIG_STATUS <<\EOF ac_cs_usage="\ --- 24425,24429 ---- fi ! cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ *************** *** 15603,15606 **** --- 24435,24439 ---- -h, --help print this help, then exit -V, --version print version number, then exit + -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions *************** *** 15620,15629 **** Report bugs to ." ! EOF ! cat >>$CONFIG_STATUS <." ! _ACEOF ! cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ ! bash config.status 3.0-release ! configured by $0, generated by GNU Autoconf 2.57, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" *************** *** 15634,15640 **** srcdir=$srcdir INSTALL="$INSTALL" ! EOF ! cat >>$CONFIG_STATUS <<\EOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. --- 24467,24473 ---- srcdir=$srcdir INSTALL="$INSTALL" ! _ACEOF ! cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. *************** *** 15646,15673 **** ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ! shift ! set dummy "$ac_option" "$ac_optarg" ${1+"$@"} ! shift ;; - -*);; *) # This is not an option, so the user has probably given explicit # arguments. ac_need_defaults=false;; esac ! case $1 in # Handling of the options. ! EOF ! cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header ! { { echo "$as_me:15671: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 --- 24479,24506 ---- ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ! ac_shift=: ! ;; ! -*) ! ac_option=$1 ! ac_optarg=$2 ! ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. + ac_option=$1 ac_need_defaults=false;; esac ! case $ac_option in # Handling of the options. ! _ACEOF ! cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ! ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header ! { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 *************** *** 15679,15692 **** debug=: ;; --file | --fil | --fi | --f ) ! shift ! CONFIG_FILES="$CONFIG_FILES $1" ac_need_defaults=false;; --header | --heade | --head | --hea ) ! shift ! CONFIG_HEADERS="$CONFIG_HEADERS $1" ac_need_defaults=false;; # This is an error. ! -*) { { echo "$as_me:15690: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 --- 24512,24528 ---- debug=: ;; --file | --fil | --fi | --f ) ! $ac_shift ! CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) ! $ac_shift ! CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; # This is an error. ! -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 *************** *** 15700,15722 **** done ! exec 5>>config.log ! cat >&5 << _ACEOF ! ## ----------------------- ## ! ## Running config.status. ## ! ## ----------------------- ## - This file was extended by $as_me (bash 2.05b) 2.52, executed with - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - > $ac_cs_invocation - on `(hostname || uname -n) 2>/dev/null | sed 1q` _ACEOF - EOF ! cat >>$CONFIG_STATUS <<\EOF for ac_config_target in $ac_config_targets do --- 24536,24573 ---- done ! ac_configure_extra_args= ! if $ac_cs_silent; then ! exec 6>/dev/null ! ac_configure_extra_args="$ac_configure_extra_args --silent" ! fi ! ! _ACEOF ! cat >>$CONFIG_STATUS <<_ACEOF ! if \$ac_cs_recheck; then ! echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 ! exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion ! fi ! ! _ACEOF ! ! cat >>$CONFIG_STATUS <<_ACEOF ! # ! # INIT-COMMANDS section. ! # ! ! # Capture the value of obsolete ALL_LINGUAS because we need it to compute ! # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, 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%}" _ACEOF ! ! ! cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do *************** *** 15727,15730 **** --- 24578,24582 ---- "lib/readline/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/readline/Makefile" ;; "lib/glob/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/glob/Makefile" ;; + "lib/intl/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/intl/Makefile" ;; "lib/malloc/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/malloc/Makefile" ;; "lib/sh/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/sh/Makefile" ;; *************** *** 15733,15741 **** "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "support/Makefile" ) CONFIG_FILES="$CONFIG_FILES support/Makefile" ;; "examples/loadables/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile" ;; "examples/loadables/perl/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/loadables/perl/Makefile" ;; "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; ! *) { { echo "$as_me:15739: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; --- 24585,24596 ---- "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "support/Makefile" ) CONFIG_FILES="$CONFIG_FILES support/Makefile" ;; + "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "examples/loadables/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile" ;; "examples/loadables/perl/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/loadables/perl/Makefile" ;; + "pathnames.h" ) CONFIG_FILES="$CONFIG_FILES pathnames.h" ;; + "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; ! *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; *************** *** 15753,15756 **** --- 24608,24614 ---- fi + # Have a temporary directory for convenience. Make it in the build tree + # simply because there is no reason to put it here, and in addition, + # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || *************** *** 15761,15781 **** # Create a (secure) tmp directory for tmp files. ! : ${TMPDIR=/tmp} { ! tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { ! tmp=$TMPDIR/cs$$-$RANDOM (umask 077 && mkdir $tmp) } || { ! echo "$me: cannot create a temporary directory in $TMPDIR" >&2 { (exit 1); exit 1; } } ! EOF ! cat >>$CONFIG_STATUS </dev/null` && test -n "$tmp" && test -d "$tmp" } || { ! tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { ! echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } ! _ACEOF ! cat >>$CONFIG_STATUS <<_ACEOF # *************** *** 15790,15793 **** --- 24648,24657 ---- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t + s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t + s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t + s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t + s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t + s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t + s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t *************** *** 15805,15821 **** s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t - s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t - s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t - s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t - s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t - s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t - s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t - s,@DEFS@,$DEFS,;t t s,@LIBS@,$LIBS,;t t s,@build@,$build,;t t --- 24669,24679 ---- s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t + s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@build@,$build,;t t *************** *** 15827,15830 **** --- 24685,24691 ---- s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t + s,@EMACS@,$EMACS,;t t + s,@lispdir@,$lispdir,;t t + s,@DEBUGGER_START_FILE@,$DEBUGGER_START_FILE,;t t s,@TESTSCRIPT@,$TESTSCRIPT,;t t s,@PURIFY@,$PURIFY,;t t *************** *** 15847,15850 **** --- 24708,24712 ---- s,@OBJEXT@,$OBJEXT,;t t s,@CPP@,$CPP,;t t + s,@EGREP@,$EGREP,;t t s,@SIGNAMES_H@,$SIGNAMES_H,;t t s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t *************** *** 15873,15878 **** --- 24735,24765 ---- s,@SET_MAKE@,$SET_MAKE,;t t s,@MAKE_SHELL@,$MAKE_SHELL,;t t + s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t + s,@USE_NLS@,$USE_NLS,;t t + s,@MSGFMT@,$MSGFMT,;t t + s,@GMSGFMT@,$GMSGFMT,;t t + s,@XGETTEXT@,$XGETTEXT,;t t + s,@MSGMERGE@,$MSGMERGE,;t t s,@ALLOCA@,$ALLOCA,;t t + s,@GLIBC21@,$GLIBC21,;t t + s,@LIBICONV@,$LIBICONV,;t t + s,@LTLIBICONV@,$LTLIBICONV,;t t + s,@INTLBISON@,$INTLBISON,;t t + s,@BUILD_INCLUDED_LIBINTL@,$BUILD_INCLUDED_LIBINTL,;t t + s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t + s,@CATOBJEXT@,$CATOBJEXT,;t t + s,@DATADIRNAME@,$DATADIRNAME,;t t + s,@INSTOBJEXT@,$INSTOBJEXT,;t t + s,@GENCAT@,$GENCAT,;t t + s,@INTLOBJS@,$INTLOBJS,;t t + s,@INTL_LIBTOOL_SUFFIX_PREFIX@,$INTL_LIBTOOL_SUFFIX_PREFIX,;t t + s,@INTLLIBS@,$INTLLIBS,;t t + s,@LIBINTL@,$LIBINTL,;t t + s,@LTLIBINTL@,$LTLIBINTL,;t t + s,@POSUB@,$POSUB,;t t s,@LIBOBJS@,$LIBOBJS,;t t + s,@INTL_DEP@,$INTL_DEP,;t t + s,@INTL_INC@,$INTL_INC,;t t + s,@LIBINTL_H@,$LIBINTL_H,;t t s,@SIGLIST_O@,$SIGLIST_O,;t t s,@TERMCAP_LIB@,$TERMCAP_LIB,;t t *************** *** 15898,15906 **** s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t s,@LOCAL_DEFS@,$LOCAL_DEFS,;t t CEOF ! EOF ! cat >>$CONFIG_STATUS <<\EOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. --- 24785,24794 ---- s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t s,@LOCAL_DEFS@,$LOCAL_DEFS,;t t + s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF ! _ACEOF ! cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. *************** *** 15941,15946 **** fi # test -n "$CONFIG_FILES" ! EOF ! cat >>$CONFIG_STATUS <<\EOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". --- 24829,24834 ---- fi # test -n "$CONFIG_FILES" ! _ACEOF ! cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". *************** *** 15956,15960 **** # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ! ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ --- 24844,24849 ---- # 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\(//\)$' \| \ *************** *** 15967,16016 **** /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` ! if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then ! { case "$ac_dir" in ! [\\/]* | ?:[\\/]* ) as_incr_dir=;; ! *) as_incr_dir=.;; ! esac ! as_dummy="$ac_dir" ! for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do ! case $as_mkdir_dir in ! # Skip DOS drivespec ! ?:) as_incr_dir=$as_mkdir_dir ;; ! *) ! as_incr_dir=$as_incr_dir/$as_mkdir_dir ! test -d "$as_incr_dir" || mkdir "$as_incr_dir" ! ;; ! esac ! done; } ! ! ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`" ! # A "../" for each directory in $ac_dir_suffix. ! ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'` else ! ac_dir_suffix= ac_dots= ! fi ! ! case $srcdir in ! .) ac_srcdir=. ! if test -z "$ac_dots"; then ! ac_top_srcdir=. ! else ! ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'` ! fi ;; ! [\\/]* | ?:[\\/]* ) ! ac_srcdir=$srcdir$ac_dir_suffix; ! ac_top_srcdir=$srcdir ;; *) # Relative path. ! ac_srcdir=$ac_dots$srcdir$ac_dir_suffix ! ac_top_srcdir=$ac_dots$srcdir ;; ! esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; ! *) ac_INSTALL=$ac_dots$INSTALL ;; esac if test x"$ac_file" != x-; then ! { echo "$as_me:16014: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" --- 24856,24924 ---- /^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 ! ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` ! # A "../" for each directory in $ac_dir_suffix. ! ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` ! else ! ac_dir_suffix= ac_top_builddir= ! fi ! ! case $srcdir in ! .) # No --srcdir option. We are building in place. ! ac_srcdir=. ! if test -z "$ac_top_builddir"; then ! ac_top_srcdir=. ! else ! ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` ! fi ;; ! [\\/]* | ?:[\\/]* ) # Absolute path. ! ac_srcdir=$srcdir$ac_dir_suffix; ! ac_top_srcdir=$srcdir ;; *) # Relative path. ! 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` ! case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; ! *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then ! { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" *************** *** 16018,16024 **** # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: ! # /* config.h. Generated automatically by config.status. */ ! configure_input="Generated automatically from `echo $ac_file_in | ! sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the --- 24926,24937 ---- # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: ! # /* config.h. Generated by config.status. */ ! if test x"$ac_file" = x-; then ! configure_input= ! else ! configure_input="$ac_file. " ! fi ! configure_input=$configure_input"Generated from `echo $ac_file_in | ! sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the *************** *** 16030,16034 **** [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) ! test -f "$f" || { { echo "$as_me:16032: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } --- 24943,24947 ---- [\\/$]*) # 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; }; } *************** *** 16043,16047 **** else # /dev/null tree ! { { echo "$as_me:16045: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } --- 24956,24960 ---- 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; }; } *************** *** 16049,16063 **** esac done` || { (exit 1); exit 1; } ! EOF ! cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out --- 24962,24982 ---- esac done` || { (exit 1); exit 1; } ! _ACEOF ! cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub ! _ACEOF ! cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t + s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t + s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t + s,@builddir@,$ac_builddir,;t t + s,@abs_builddir@,$ac_abs_builddir,;t t + s,@top_builddir@,$ac_top_builddir,;t t + s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out *************** *** 16071,16076 **** done ! EOF ! cat >>$CONFIG_STATUS <<\EOF # --- 24990,24995 ---- done ! _ACEOF ! cat >>$CONFIG_STATUS <<\_ACEOF # *************** *** 16104,16108 **** esac ! test x"$ac_file" != x- && { echo "$as_me:16106: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} --- 25023,25027 ---- esac ! test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} *************** *** 16115,16119 **** [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) ! test -f "$f" || { { echo "$as_me:16117: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } --- 25034,25038 ---- [\\/$]*) # 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; }; } *************** *** 16128,16132 **** else # /dev/null tree ! { { echo "$as_me:16130: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } --- 25047,25051 ---- 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; }; } *************** *** 16137,16141 **** sed 's/[ ]*$//' $ac_file_inputs >$tmp/in ! EOF # Transform confdefs.h into two sed scripts, `conftest.defines' and --- 25056,25060 ---- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in ! _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and *************** *** 16153,16166 **** # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. ! cat >confdef2sed.sed <<\EOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear ! s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end ! EOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to --- 25072,25085 ---- # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. ! cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear ! 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 : end ! _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to *************** *** 16173,16184 **** # 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 <<\EOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, ! EOF # 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 egrep "^[ ]*#[ ]*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 --- 25092,25103 ---- # 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]*,/* & */, ! _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 there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS *************** *** 16204,16208 **** done rm -f conftest.defines ! echo ' fi # egrep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS --- 25123,25127 ---- done rm -f conftest.defines ! echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS *************** *** 16232,16252 **** rm -f conftest.undefs ! cat >>$CONFIG_STATUS <<\EOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: ! # /* config.h. Generated automatically by config.status. */ if test x"$ac_file" = x-; then ! echo "/* Generated automatically by configure. */" >$tmp/config.h else ! echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then ! if cmp -s $ac_file $tmp/config.h 2>/dev/null; then ! { echo "$as_me:16247: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ! ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ --- 25151,25172 ---- rm -f conftest.undefs ! cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: ! # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then ! echo "/* Generated by configure. */" >$tmp/config.h else ! echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then ! if diff $ac_file $tmp/config.h >/dev/null 2>&1; then ! { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ! ac_dir=`(dirname "$ac_file") 2>/dev/null || ! $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ *************** *** 16259,16280 **** /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` ! if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then ! { case "$ac_dir" in ! [\\/]* | ?:[\\/]* ) as_incr_dir=;; ! *) as_incr_dir=.;; ! esac ! as_dummy="$ac_dir" ! for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do ! case $as_mkdir_dir in ! # Skip DOS drivespec ! ?:) as_incr_dir=$as_mkdir_dir ;; ! *) ! as_incr_dir=$as_incr_dir/$as_mkdir_dir ! test -d "$as_incr_dir" || mkdir "$as_incr_dir" ! ;; ! esac ! done; } - fi rm -f $ac_file mv $tmp/config.h $ac_file --- 25179,25207 ---- /^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; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file *************** *** 16285,16290 **** fi done ! EOF ! cat >>$CONFIG_STATUS <<\EOF # --- 25212,25217 ---- fi done ! _ACEOF ! cat >>$CONFIG_STATUS <<\_ACEOF # *************** *** 16294,16299 **** --- 25221,25373 ---- ac_dest=`echo "$ac_file" | sed 's,:.*,,'` 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 || + echo X"$ac_dest" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + ac_builddir=. + + if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` + else + ac_dir_suffix= ac_top_builddir= + fi + + case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + 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` + + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 + echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in + default-1 ) + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + POMAKEFILEDEPS="POTFILES.in" + # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$OBSOLETE_ALL_LINGUAS"; then + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" + fi + ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` + # Hide the ALL_LINGUAS assigment from automake. + eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" + else + # The set of available languages was given in configure.in. + eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' + fi + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + GMOFILES= + UPDATEPOFILES= + DUMMYPOFILES= + 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" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@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" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done ;; default ) # Makefile uses this timestamp file to record whether config.h is up to date. *************** *** 16302,16314 **** esac done ! EOF ! cat >>$CONFIG_STATUS <<\EOF { (exit 0); exit 0; } ! EOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. --- 25376,25389 ---- esac done ! _ACEOF ! cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } ! _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. *************** *** 16321,16326 **** if test "$no_create" != yes; then ac_cs_success=: exec 5>/dev/null ! $SHELL $CONFIG_STATUS || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which --- 25396,25404 ---- if test "$no_create" != yes; then ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null ! $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which diff -aNrc2 bash-2.05b-patched/configure.in bash-3.0/configure.in *** bash-2.05b-patched/configure.in Tue Jul 16 09:31:25 2002 --- bash-3.0/configure.in Wed Jul 21 16:06:54 2004 *************** *** 1,4 **** dnl ! dnl Configure script for bash-2.05 dnl dnl report bugs to chet@po.cwru.edu --- 1,4 ---- dnl ! dnl Configure script for bash-3.0 dnl dnl report bugs to chet@po.cwru.edu *************** *** 6,10 **** dnl Process this file with autoconf to produce a configure script. ! # Copyright (C) 1987-2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify --- 6,10 ---- dnl Process this file with autoconf to produce a configure script. ! # Copyright (C) 1987-2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify *************** *** 23,29 **** # 02111-1307, USA. ! AC_REVISION([for Bash 2.05b, version 2.144, from autoconf version] AC_ACVERSION)dnl ! AC_INIT(bash, 2.05b, bug-bash@gnu.org) dnl make sure we are using a recent autoconf version --- 23,32 ---- # 02111-1307, USA. ! AC_REVISION([for Bash 3.0, version 3.166, from autoconf version] AC_ACVERSION)dnl ! define(bashvers, 3.0) ! define(relstatus, release) ! ! AC_INIT(bash, bashvers-relstatus, bug-bash@gnu.org) dnl make sure we are using a recent autoconf version *************** *** 36,41 **** dnl checks for version info ! BASHVERS=2.05b ! RELSTATUS=release dnl defaults for debug settings --- 39,44 ---- dnl checks for version info ! BASHVERS=bashvers ! RELSTATUS=relstatus dnl defaults for debug settings *************** *** 71,74 **** --- 74,78 ---- m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF + *-freebsd*-gnu) opt_bash_malloc=no ;; # there's some undetermined problem here #*-freebsd*) opt_bash_malloc=no ;; # they claim it's better; I disagree *-openbsd*) opt_bash_malloc=no ;; # they claim it needs eight-bit alignment *************** *** 93,96 **** --- 97,106 ---- esac + dnl + dnl macros for the bash debugger + dnl + AM_PATH_LISPDIR + AC_ARG_VAR(DEBUGGER_START_FILE, [location of bash debugger initialization file]) + dnl arguments to configure dnl packages *************** *** 139,142 **** --- 149,156 ---- fi + if test -z "${DEBUGGER_START_FILE}"; then + DEBUGGER_START_FILE=${ac_default_prefix}/lib/bashdb/bashdb-main.inc + fi + dnl optional shell features in config.h.in opt_minimal_config=no *************** *** 161,168 **** --- 175,185 ---- opt_xpg_echo=no opt_cond_command=yes + opt_cond_regexp=yes opt_arith_for_command=yes opt_net_redirs=yes opt_progcomp=yes opt_separate_help=no + opt_multibyte=yes + opt_debugger=yes dnl options that affect how bash is compiled and linked *************** *** 183,186 **** --- 200,204 ---- opt_extended_glob=no opt_cond_command=no opt_arith_for_command=no opt_net_redirs=no opt_progcomp=no opt_separate_help=no + opt_multibyte=yes opt_cond_regexp=no fi *************** *** 192,195 **** --- 210,215 ---- AC_ARG_ENABLE(command-timing, AC_HELP_STRING([--enable-command-timing], [enable the time reserved word and command timing]), opt_command_timing=$enableval) AC_ARG_ENABLE(cond-command, AC_HELP_STRING([--enable-cond-command], [enable the conditional command]), opt_cond_command=$enableval) + AC_ARG_ENABLE(cond-regexp, AC_HELP_STRING([--enable-cond-regexp], [enable extgended regular expression matching in conditional commands]), opt_cond_regexp=$enableval) + AC_ARG_ENABLE(debugger, AC_HELP_STRING([--enable-debugger], [enable support for bash debugger]), opt_debugger=$enableval) AC_ARG_ENABLE(directory-stack, AC_HELP_STRING([--enable-directory-stack], [enable builtins pushd/popd/dirs]), opt_dirstack=$enableval) AC_ARG_ENABLE(disabled-builtins, AC_HELP_STRING([--enable-disabled-builtins], [allow disabled builtins to still be invoked]), opt_disabled_builtins=$enableval) *************** *** 199,202 **** --- 219,223 ---- AC_ARG_ENABLE(history, AC_HELP_STRING([--enable-history], [turn on command history]), opt_history=$enableval) AC_ARG_ENABLE(job-control, AC_HELP_STRING([--enable-job-control], [enable job control features]), opt_job_control=$enableval) + AC_ARG_ENABLE(multibyte, AC_HELP_STRING([--enable-multibyte], [enable multibyte characters if OS supports them]), opt_multibyte=$enableval) AC_ARG_ENABLE(net-redirections, AC_HELP_STRING([--enable-net-redirections], [enable /dev/tcp/host/port redirection]), opt_net_redirs=$enableval) AC_ARG_ENABLE(process-substitution, AC_HELP_STRING([--enable-process-substitution], [enable process substitution]), opt_process_subst=$enableval) *************** *** 266,269 **** --- 287,293 ---- AC_DEFINE(COND_COMMAND) fi + if test $opt_cond_regexp = yes ; then + AC_DEFINE(COND_REGEXP) + fi if test $opt_arith_for_command = yes; then AC_DEFINE(ARITH_FOR_COMMAND) *************** *** 275,278 **** --- 299,308 ---- AC_DEFINE(PROGRAMMABLE_COMPLETION) fi + if test $opt_multibyte = no; then + AC_DEFINE(NO_MULTIBYTE_SUPPORT) + fi + if test $opt_debugger = yes; then + AC_DEFINE(DEBUGGER) + fi if test $opt_memscramble = yes; then *************** *** 404,408 **** fi ! test -z "$CPPFLAGS_FOR_BUILD" && CPPFLAGS_FOR_BUILD="$CPPFLAGS" test -z "$CFLAGS_FOR_BUILD" && CFLAGS_FOR_BUILD="-g" --- 434,445 ---- fi ! if test "X$cross_compiling" = "Xno"; then ! CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-"$CPPFLAGS"} ! LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(LDFLAGS)'} ! else ! CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-""} ! LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-""} ! fi ! test -z "$CFLAGS_FOR_BUILD" && CFLAGS_FOR_BUILD="-g" *************** *** 431,435 **** case "$ac_cv_rl_version" in ! 4.[[3-9]]*|5*|6*|7*|8*|9*) ;; *) opt_with_installed_readline=no AC_MSG_WARN(installed readline library is too old to be linked with bash) --- 468,472 ---- case "$ac_cv_rl_version" in ! 5*|6*|7*|8*|9*) ;; *) opt_with_installed_readline=no AC_MSG_WARN(installed readline library is too old to be linked with bash) *************** *** 443,449 **** READLINE_LIB=-lreadline if test "$opt_with_installed_readline" != "no" ; then ! case "$RL_INCLUDEDIR" in ! /usr/include) ;; ! *) RL_INCLUDE='-I${RL_INCLUDEDIR}' esac READLINE_DEP= --- 480,490 ---- READLINE_LIB=-lreadline if test "$opt_with_installed_readline" != "no" ; then ! case "$opt_with_installed_readline" in ! yes) RL_INCLUDE= ;; ! *) case "$RL_INCLUDEDIR" in ! /usr/include) ;; ! *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;; ! esac ! ;; esac READLINE_DEP= *************** *** 467,473 **** HIST_LIBDIR=$RL_LIBDIR HISTORY_DEP= ! case "$RL_INCLUDEDIR" in ! /usr/include) ;; ! *) RL_INCLUDE='-I${RL_INCLUDEDIR}' esac else --- 508,518 ---- HIST_LIBDIR=$RL_LIBDIR HISTORY_DEP= ! case "$opt_with_installed_readline" in ! yes) RL_INCLUDE= ;; ! *) case "$RL_INCLUDEDIR" in ! /usr/include) ;; ! *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;; ! esac ! ;; esac else *************** *** 518,521 **** --- 563,569 ---- AC_C_CHAR_UNSIGNED + dnl initialize GNU gettext + AM_GNU_GETTEXT([no-libtool], [need-ngettext], [lib/intl]) + dnl header files AC_HEADER_DIRENT *************** *** 526,533 **** AC_CHECK_HEADERS(unistd.h stdlib.h stdarg.h varargs.h limits.h string.h \ memory.h locale.h termcap.h termio.h termios.h dlfcn.h \ ! stddef.h stdint.h netdb.h grp.h strings.h) AC_CHECK_HEADERS(sys/ptem.h sys/pte.h sys/stream.h sys/select.h sys/file.h \ ! sys/resource.h sys/param.h sys/socket.h \ ! sys/time.h sys/times.h sys/wait.h) AC_CHECK_HEADERS(netinet/in.h arpa/inet.h) --- 574,581 ---- AC_CHECK_HEADERS(unistd.h stdlib.h stdarg.h varargs.h limits.h string.h \ memory.h locale.h termcap.h termio.h termios.h dlfcn.h \ ! stddef.h stdint.h netdb.h grp.h strings.h regex.h) AC_CHECK_HEADERS(sys/ptem.h sys/pte.h sys/stream.h sys/select.h sys/file.h \ ! sys/resource.h sys/param.h sys/socket.h sys/stat.h \ ! sys/time.h sys/times.h sys/types.h sys/wait.h) AC_CHECK_HEADERS(netinet/in.h arpa/inet.h) *************** *** 589,595 **** ulimit tzset siginterrupt memmove ttyname times \ getaddrinfo gethostbyname getservbyname getservent inet_aton \ ! vsnprintf snprintf vasprintf asprintf fnmatch) AC_CHECK_FUNCS(isascii isblank isgraph isprint isspace isxdigit) ! AC_REPLACE_FUNCS(getcwd strcasecmp strerror strftime strpbrk memset) AC_REPLACE_FUNCS(strtod strtol strtoul strtoll strtoull strtoimax strtoumax) --- 637,643 ---- ulimit tzset siginterrupt memmove ttyname times \ getaddrinfo gethostbyname getservbyname getservent inet_aton \ ! vsnprintf snprintf vasprintf asprintf fnmatch regcomp regexec) AC_CHECK_FUNCS(isascii isblank isgraph isprint isspace isxdigit) ! AC_REPLACE_FUNCS(getcwd strcasecmp strerror strftime strpbrk memset strstr) AC_REPLACE_FUNCS(strtod strtol strtoul strtoll strtoull strtoimax strtoumax) *************** *** 599,603 **** AC_CHECK_DECLS([strcpy]) AC_CHECK_DECLS([strsignal]) ! AC_CHECK_DECLS([strtold]) BASH_CHECK_DECL(strtoimax) --- 647,668 ---- AC_CHECK_DECLS([strcpy]) AC_CHECK_DECLS([strsignal]) ! ! dnl Extra test to detect the horribly broken HP/UX 11.00 strtold(3) ! AC_CHECK_DECLS([strtold], [ ! AC_MSG_CHECKING([for broken strtold]) ! AC_CACHE_VAL(bash_cv_strtold_broken, ! [AC_TRY_COMPILE( ! [#include ], ! [int main() { long double r; char *foo, bar; r = strtold(foo, &bar);}], ! bash_cv_strtold_broken=no, bash_cv_strtold_broken=yes, ! [AC_MSG_WARN(cannot check for broken strtold if cross-compiling, defaulting to no)]) ! ] ! ) ! AC_MSG_RESULT($bash_cv_strtold_broken) ! if test "$bash_cv_strtold_broken" = "yes" ; then ! AC_DEFINE(STRTOLD_BROKEN) ! fi ! ]) ! BASH_CHECK_DECL(strtoimax) *************** *** 610,625 **** AC_FUNC_MKTIME ! dnl checks for locale functions ! AC_CHECK_HEADERS(libintl.h) ! AC_CHECK_FUNCS(gettext textdomain bindtextdomain) ! ! dnl check for GNU libintl if gettext/textdomain/bindtextdomain ! dnl are not found in libc ! if test "$ac_cv_func_bindtextdomain" = "no"; then ! AC_CHECK_LIB(intl,bindtextdomain) ! if test "$ac_cv_lib_intl" = "yes"; then ! AC_CHECK_FUNCS(gettext textdomain bindtextdomain) ! fi ! fi BASH_CHECK_MULTIBYTE --- 675,703 ---- AC_FUNC_MKTIME ! dnl ! dnl Checks for lib/intl and related code (uses some of the output from ! dnl AM_GNU_GETTEXT) ! dnl ! ! AC_CHECK_HEADERS([argz.h errno.h fcntl.h malloc.h stdio_ext.h]) ! ! dnl AC_FUNC_MALLOC ! AC_FUNC_MMAP ! AC_CHECK_FUNCS([__argz_count __argz_next __argz_stringify dcgettext mempcpy \ ! munmap stpcpy strcspn strdup]) ! ! INTL_DEP= INTL_INC= LIBINTL_H= ! if test "x$USE_INCLUDED_LIBINTL" = "xyes"; then ! INTL_DEP='${INTL_LIBDIR}/libintl.a' ! INTL_INC='-I${INTL_LIBSRC} -I${INTL_BUILDDIR}' ! LIBINTL_H='${INTL_BUILDDIR}/libintl.h' ! fi ! AC_SUBST(INTL_DEP) ! AC_SUBST(INTL_INC) ! AC_SUBST(LIBINTL_H) ! ! dnl ! dnl End of checks needed by files in lib/intl ! dnl BASH_CHECK_MULTIBYTE *************** *** 703,706 **** --- 781,785 ---- dnl behavior of system calls and library functions + BASH_FUNC_CTYPE_NONASCII BASH_FUNC_DUP2_CLOEXEC_CHECK BASH_SYS_PGRP_SYNC *************** *** 729,732 **** --- 808,812 ---- BASH_STRUCT_DIRENT_D_INO BASH_STRUCT_DIRENT_D_FILENO + BASH_STRUCT_DIRENT_D_NAMLEN BASH_STRUCT_WINSIZE BASH_STRUCT_TIMEVAL *************** *** 734,737 **** --- 814,818 ---- AC_STRUCT_TM AC_STRUCT_TIMEZONE + BASH_STRUCT_TIMEZONE dnl presence and behavior of C library functions *************** *** 760,775 **** fi - dnl I have removed this check. The existing libc FNM_EXTMATCH implementation - dnl (glibc-2.2.4) disagrees with bash on the matching of incorrectly-formed - dnl patterns (bash treats them as strings or characters to be matched without - dnl any special meaning) and has one outright bug: a[X-]b should match - dnl both a-b and aXb. - dnl - dnl Once Ulrich and I get together on this, the check can return - dnl - dnl chet 10/31/2001 - dnl - dnl BASH_FUNC_FNMATCH_EXTMATCH - BASH_FUNC_PRINTF_A_FORMAT --- 841,844 ---- *************** *** 852,856 **** *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; powerux*) LOCAL_LIBS="-lgen" ;; ! cygwin*) LOCAL_LIBS="-luser32" ;; opennt*|interix*) LOCAL_CFLAGS="-DNO_MAIN_ENV_ARG -DBROKEN_DIRENT_D_INO" ;; esac --- 921,925 ---- *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; powerux*) LOCAL_LIBS="-lgen" ;; ! cygwin*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; opennt*|interix*) LOCAL_CFLAGS="-DNO_MAIN_ENV_ARG -DBROKEN_DIRENT_D_INO" ;; esac *************** *** 947,953 **** AC_OUTPUT([Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile \ lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile \ ! lib/tilde/Makefile doc/Makefile support/Makefile \ ! examples/loadables/Makefile examples/loadables/perl/Makefile], [ # Makefile uses this timestamp file to record whether config.h is up to date. --- 1016,1024 ---- AC_OUTPUT([Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile \ + lib/intl/Makefile \ lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile \ ! lib/tilde/Makefile doc/Makefile support/Makefile po/Makefile.in \ ! examples/loadables/Makefile examples/loadables/perl/Makefile \ ! pathnames.h], [ # Makefile uses this timestamp file to record whether config.h is up to date. diff -aNrc2 bash-2.05b-patched/copy_cmd.c bash-3.0/copy_cmd.c *** bash-2.05b-patched/copy_cmd.c Tue Mar 12 14:41:03 2002 --- bash-3.0/copy_cmd.c Tue Oct 7 11:43:44 2003 *************** *** 51,55 **** #endif static SIMPLE_COM *copy_simple_command __P((SIMPLE_COM *)); - static FUNCTION_DEF *copy_function_def __P((FUNCTION_DEF *)); WORD_DESC * --- 51,54 ---- *************** *** 167,170 **** --- 166,170 ---- new_for = (FOR_COM *)xmalloc (sizeof (FOR_COM)); new_for->flags = com->flags; + new_for->line = com->line; new_for->name = copy_word (com->name); new_for->map_list = copy_word_list (com->map_list); *************** *** 222,225 **** --- 222,226 ---- new_case = (CASE_COM *)xmalloc (sizeof (CASE_COM)); new_case->flags = com->flags; + new_case->line = com->line; new_case->word = copy_word (com->word); new_case->clauses = copy_case_clauses (com->clauses); *************** *** 303,307 **** } ! static FUNCTION_DEF * copy_function_def (com) FUNCTION_DEF *com; --- 304,320 ---- } ! FUNCTION_DEF * ! copy_function_def_contents (old, new_def) ! FUNCTION_DEF *old, *new_def; ! { ! new_def->name = copy_word (old->name); ! new_def->command = old->command ? copy_command (old->command) : old->command; ! new_def->flags = old->flags; ! new_def->line = old->line; ! new_def->source_file = old->source_file ? savestring (old->source_file) : old->source_file; ! return (new_def); ! } ! ! FUNCTION_DEF * copy_function_def (com) FUNCTION_DEF *com; *************** *** 310,317 **** new_def = (FUNCTION_DEF *)xmalloc (sizeof (FUNCTION_DEF)); ! new_def->name = copy_word (com->name); ! new_def->command = copy_command (com->command); ! new_def->flags = com->flags; ! new_def->line = com->line; return (new_def); } --- 323,327 ---- new_def = (FUNCTION_DEF *)xmalloc (sizeof (FUNCTION_DEF)); ! new_def = copy_function_def_contents (com, new_def); return (new_def); } diff -aNrc2 bash-2.05b-patched/dispose_cmd.c bash-3.0/dispose_cmd.c *** bash-2.05b-patched/dispose_cmd.c Tue Mar 12 14:41:36 2002 --- bash-3.0/dispose_cmd.c Sat Feb 15 15:48:36 2003 *************** *** 187,193 **** c = command->value.Function_def; ! dispose_word (c->name); ! dispose_command (c->command); ! free (c); break; } --- 187,191 ---- c = command->value.Function_def; ! dispose_function_def (c); break; } *************** *** 218,221 **** --- 216,236 ---- } #endif /* COND_COMMAND */ + + void + dispose_function_def_contents (c) + FUNCTION_DEF *c; + { + dispose_word (c->name); + dispose_command (c->command); + FREE (c->source_file); + } + + void + dispose_function_def (c) + FUNCTION_DEF *c; + { + dispose_function_def_contents (c); + free (c); + } /* How to free a WORD_DESC. */ diff -aNrc2 bash-2.05b-patched/dispose_cmd.h bash-3.0/dispose_cmd.h *** bash-2.05b-patched/dispose_cmd.h Thu Aug 5 07:03:52 1999 --- bash-3.0/dispose_cmd.h Sat Feb 15 15:48:54 2003 *************** *** 34,36 **** --- 34,39 ---- #endif + extern void dispose_function_def_contents __P((FUNCTION_DEF *)); + extern void dispose_function_def __P((FUNCTION_DEF *)); + #endif /* !_DISPOSE_CMD_H_ */ diff -aNrc2 bash-2.05b-patched/doc/FAQ bash-3.0/doc/FAQ *** bash-2.05b-patched/doc/FAQ Wed Jul 17 10:10:11 2002 --- bash-3.0/doc/FAQ Wed Jul 21 17:31:46 2004 *************** *** 1,3 **** ! This is the Bash FAQ, version 3.20, for Bash version 2.05b. This document contains a set of frequently-asked questions concerning --- 1,3 ---- ! This is the Bash FAQ, version 3.27, for Bash version 3.0. This document contains a set of frequently-asked questions concerning *************** *** 32,42 **** A8) I just changed my login shell to bash, and now I can't FTP into my machine. Why not? ! A9) What's the `POSIX 1003.2 standard'? A10) What is the bash `posix mode'? Section B: The latest version ! B1) What's new in version 2.05b? ! B2) Are there any user-visible incompatibilities between bash-2.05b and bash-1.14.7? --- 32,42 ---- A8) I just changed my login shell to bash, and now I can't FTP into my machine. Why not? ! A9) What's the `POSIX Shell and Utilities standard'? A10) What is the bash `posix mode'? Section B: The latest version ! B1) What's new in version 3.0? ! B2) Are there any user-visible incompatibilities between bash-3.0 and bash-1.14.7? *************** *** 76,79 **** --- 76,82 ---- with every letter except `z'? E10) Why does `cd //' leave $PWD as `//'? + E11) If I resize my xterm while another program is running, why doesn't bash + notice the change? + E12) Why don't negative offsets in substring expansion work like I expect? Section F: Things to watch out for on certain Unix versions *************** *** 138,143 **** A2) What's the latest version? ! The latest version is 2.05b, first made available on Wednesday, 17 ! July, 2002. A3) Where can I get it? --- 141,145 ---- A2) What's the latest version? ! The latest version is 3.0, first made available on 27 July, 2004. A3) Where can I get it? *************** *** 146,165 **** master GNU archive site, ftp.gnu.org, and its mirrors. The latest version is also available for FTP from ftp.cwru.edu. ! The following URLs tell how to get version 2.05b: ! ftp://ftp.gnu.org/pub/gnu/bash/bash-2.05b.tar.gz ! ftp://ftp.cwru.edu/pub/bash/bash-2.05b.tar.gz Formatted versions of the documentation are available with the URLs: ! ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-2.05b.tar.gz ! ftp://ftp.cwru.edu/pub/bash/bash-doc-2.05b.tar.gz A4) On what machines will bash run? ! Bash has been ported to nearly every version of UNIX. All you should have to do to build it on a machine for which a port exists is to type `configure' and then `make'. The build process ! will attempt to discover the version of UNIX you have and tailor itself accordingly, using a script created by GNU autoconf. --- 148,167 ---- master GNU archive site, ftp.gnu.org, and its mirrors. The latest version is also available for FTP from ftp.cwru.edu. ! The following URLs tell how to get version 3.0: ! ftp://ftp.gnu.org/pub/gnu/bash/bash-3.0.tar.gz ! ftp://ftp.cwru.edu/pub/bash/bash-3.0.tar.gz Formatted versions of the documentation are available with the URLs: ! ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.0.tar.gz ! ftp://ftp.cwru.edu/pub/bash/bash-doc-3.0.tar.gz A4) On what machines will bash run? ! Bash has been ported to nearly every version of Unix. All you should have to do to build it on a machine for which a port exists is to type `configure' and then `make'. The build process ! will attempt to discover the version of Unix you have and tailor itself accordingly, using a script created by GNU autoconf. *************** *** 191,201 **** part of their current release. ! Bash-2.05b should require no local Cygnus changes to build and run under ! CYGWIN. ! ! The Cygnus port works only on Intel machines. There is a port of bash ! (I don't know which version) to the alpha/NT environment available from ! ! ftp://ftp.gnustep.org//pub/win32/bash-alpha-nt-1.01.tar.gz DJ Delorie has a port of bash-2.x which runs under MS-DOS, as part --- 193,198 ---- part of their current release. ! Bash-2.05b and later versions should require no local Cygnus changes to ! build and run under CYGWIN. DJ Delorie has a port of bash-2.x which runs under MS-DOS, as part *************** *** 213,229 **** ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh204s.zip source ! Mark has begun to work with bash-2.05, but I don't know the status. ! ! Ports of bash-1.12 and bash-2.0 are available for OS/2 from ! ! ftp://hobbes.nmsu.edu/pub/os2/util/shell/bash_112.zip ! ftp://hobbes.nmsu.edu/pub/os2/util/shell/bash-2.0(253).zip ! ! I haven't looked at either, but the second appears to be a binary-only ! distribution. Beware. ! I have received word that Bash (I'm not sure which version, but I ! believe that it's at least bash-2.02.1) is the standard shell on ! BeOS. A6) How can I build bash with gcc? --- 210,217 ---- ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh204s.zip source ! Mark began to work with bash-2.05, but I don't know the current status. ! Bash-3.0 compiles and runs with no modifications under Microsoft's Services ! for Unix (SFU), once known as Interix. A6) How can I build bash with gcc? *************** *** 272,276 **** Next, add a line similar to the above to ~/.profile: ! [ -f /usr/gnu/bin/bash ] && exec /usr/gnu/bin/bash --login This will cause login shells to replace themselves with bash running as --- 260,265 ---- Next, add a line similar to the above to ~/.profile: ! [ -f /usr/gnu/bin/bash ] && [ -x /usr/gnu/bin/bash ] && \ ! exec /usr/gnu/bin/bash --login This will cause login shells to replace themselves with bash running as *************** *** 326,330 **** such as `uucp' and `news' from using FTP. ! A9) What's the `POSIX 1003.2 standard'? POSIX is a name originally coined by Richard Stallman for a --- 315,319 ---- such as `uucp' and `news' from using FTP. ! A9) What's the `POSIX Shell and Utilities standard'? POSIX is a name originally coined by Richard Stallman for a *************** *** 336,359 **** assigned to a working group in the 1003 series. ! The POSIX Shell and Utilities standard has been developed by IEEE ! Working Group 1003.2 (POSIX.2). It concentrates on the command interpreter interface and utility programs commonly executed from ! the command line or by other programs. An initial version of the ! standard has been approved and published by the IEEE, and work is ! currently underway to update it. ! ! Bash is concerned with the aspects of the shell's behavior ! defined by POSIX.2. The shell command language has of course ! been standardized, including the basic flow control and program ! execution constructs, I/O redirection and pipelining, argument ! handling, variable expansion, and quoting. The `special' builtins, which must be implemented as part of the shell to provide the desired functionality, are specified as being part of the shell; examples of these are `eval' and ! `export'. Other utilities appear in the sections of POSIX.2 not devoted to the shell which are commonly (and in some cases must be) implemented as builtin commands, such as `read' and `test'. ! POSIX.2 also specifies aspects of the shell's interactive behavior as part of the UPE, including job control and command line editing. Only vi-style line editing commands have been --- 325,357 ---- assigned to a working group in the 1003 series. ! The POSIX Shell and Utilities standard was originally developed by ! IEEE Working Group 1003.2 (POSIX.2). Today it has been merged with ! the original 1003.1 Working Group and is maintained by the Austin ! Group (a joint working group of the IEEE, The Open Group and ! ISO/IEC SC22/WG15). Today the Shell and Utilities are a volume ! within the set of documents that make up IEEE Std 1003.1-2001, and ! thus now the former POSIX.2 (from 1992) is now part of the current ! POSIX.1 standard (POSIX 1003.1-2001). ! ! The Shell and Utilities volume concentrates on the command interpreter interface and utility programs commonly executed from ! the command line or by other programs. The standard is freely ! available on the web at http://www.UNIX-systems.org/version3/ . ! Work continues at the Austin Group on maintenance issues; see ! http://www.opengroup.org/austin/ to join the discussions. ! ! Bash is concerned with the aspects of the shell's behavior defined ! by the POSIX Shell and Utilities volume. The shell command ! language has of course been standardized, including the basic flow ! control and program execution constructs, I/O redirection and ! pipelining, argument handling, variable expansion, and quoting. The `special' builtins, which must be implemented as part of the shell to provide the desired functionality, are specified as being part of the shell; examples of these are `eval' and ! `export'. Other utilities appear in the sections of POSIX not devoted to the shell which are commonly (and in some cases must be) implemented as builtin commands, such as `read' and `test'. ! POSIX also specifies aspects of the shell's interactive behavior as part of the UPE, including job control and command line editing. Only vi-style line editing commands have been *************** *** 361,377 **** objections. ! The Open Group has made an older version of its Single Unix ! Specification (version 2), which is very similar to POSIX.2, ! available on the web at ! ! http://www.opengroup.org/onlinepubs/007908799/ ! ! The Single Unix Specification, version 3, is available on the web at ! http://www.opengroup.org/onlinepubs/007904975/ A10) What is the bash `posix mode'? ! Although bash is an implementation of the POSIX.2 shell specification, there are areas where the bash default behavior differs from that spec. The bash `posix mode' changes the bash --- 359,371 ---- objections. ! The latest version of the POSIX Shell and Utilities standard is ! available (now updated to the 2004 Edition) as part of the Single ! UNIX Specification Version 3 at ! http://www.UNIX-systems.org/version3/ A10) What is the bash `posix mode'? ! Although bash is an implementation of the POSIX shell specification, there are areas where the bash default behavior differs from that spec. The bash `posix mode' changes the bash *************** *** 388,403 **** Section B: The latest version ! B1) What's new in version 2.05b? ! The raison d'etre for bash-2.05b is to make a second intermediate ! release containing the first of the new features to be available ! in bash-3.0 and get feedback on those features before proceeding. ! The major new feature is multibyte character support in both Bash ! and Readline. ! Bash-2.05b contains the following new features (see the manual page for ! complete descriptions and the CHANGES and NEWS files in the bash-2.05b distribution): o support for multibyte characters has been added to both bash and readline --- 382,427 ---- Section B: The latest version ! B1) What's new in version 3.0? ! Bash-3.0 is the third major release of bash. The features introduced ! in the intermediate releases following bash-2.05 have been completed. ! Support for the bash debugger (a separate project) has been integrated. ! Bash-3.0 contains the following new features (see the manual page for ! complete descriptions and the CHANGES and NEWS files in the bash-3.0 distribution): + o Features to support the bash debugger have been implemented, and there + is a new `extdebug' option to turn the non-default options on + + o HISTCONTROL is now a colon-separated list of options and has been + extended with a new `erasedups' option that will result in only one + copy of a command being kept in the history list + + o Brace expansion has been extended with a new {x..y} form, producing + sequences of digits or characters + + o Timestamps are now kept with history entries, with an option to save + and restore them from the history file; there is a new HISTTIMEFORMAT + variable describing how to display the timestamps when listing history + entries + + o The `[[' command can now perform extended regular expression (egrep-like) + matching, with matched subexpressions placed in the BASH_REMATCH array + variable + + o A new `pipefail' option causes a pipeline to return a failure status if + any command in it fails + + o The `jobs', `kill', and `wait' builtins now accept job control notation + in their arguments even if job control is not enabled + + o The `gettext' package and libintl have been integrated, and the shell + messages may be translated into other languages + + A short feature history dating from Bash-2.0: + + Bash-2.05b introduced the following new features: + o support for multibyte characters has been added to both bash and readline *************** *** 428,434 **** POSIX-2001 requires - - A short feature history dating from Bash-2.0: - Bash-2.05a introduced the following new features: --- 452,455 ---- *************** *** 608,615 **** test suite greatly expanded ! B2) Are there any user-visible incompatibilities between bash-2.05b and bash-1.14.7? ! There are a few incompatibilities between version 1.14.7 and version 2.05b. They are detailed in the file COMPAT in the bash distribution. That file is not meant to be all-encompassing; send mail to bash-maintainers@gnu.org --- 629,636 ---- test suite greatly expanded ! B2) Are there any user-visible incompatibilities between bash-3.0 and bash-1.14.7? ! There are a few incompatibilities between version 1.14.7 and version 3.0. They are detailed in the file COMPAT in the bash distribution. That file is not meant to be all-encompassing; send mail to bash-maintainers@gnu.org *************** *** 697,700 **** --- 718,724 ---- redirection to /dev/fd/N, /dev/stdin, /dev/stdout, /dev/stderr, /dev/tcp/host/port, /dev/udp/host/port + debugger support, including `caller' builtin and new variables + RETURN trap + Things sh has that bash does not: *************** *** 769,772 **** --- 793,800 ---- arrays of unlimited size TMOUT is default timeout for `read' and `select' + debugger support, including the `caller' builtin + RETURN trap + Timestamps in history entries + {x..y} brace expansion Things ksh88 has or uses that bash does not: *************** *** 777,783 **** typeset +f to list all function names without definitions text of command history kept in a file, not memory ! builtins: alias -x, cd old new, fc -e -, newgrp, print, read -p/-s/var?prompt, set -A/-o gmacs/ ! -o bgnice/-o markdirs/-o nolog/-o trackall/-o viraw/-s, typeset -H/-L/-R/-Z/-A/-ft/-fu/-fx/-l/-u/-t, whence using environment to pass attributes of exported variables --- 805,811 ---- typeset +f to list all function names without definitions text of command history kept in a file, not memory ! builtins: alias -x, cd old new, newgrp, print, read -p/-s/var?prompt, set -A/-o gmacs/ ! -o bgnice/-o markdirs/-o trackall/-o viraw/-s, typeset -H/-L/-R/-Z/-A/-ft/-fu/-fx/-l/-u/-t, whence using environment to pass attributes of exported variables *************** *** 796,800 **** C3) Which new features in ksh-93 are not in bash, and which are? ! New things in ksh-93 not in bash-2.05b: associative arrays floating point arithmetic and variables --- 824,828 ---- C3) Which new features in ksh-93 are not in bash, and which are? ! New things in ksh-93 not in bash-3.0: associative arrays floating point arithmetic and variables *************** *** 815,827 **** `.' can execute shell functions exit statuses between 0 and 255 - set -o pipefail `+=' variable assignment operator FPATH and PATH mixing getopts -a -I invocation option - DEBUG trap now executed before each simple command, instead of after printf %H, %P, %T, %Z modifiers, output base for %d ! New things in ksh-93 present in bash-2.05b: [n]<&word- and [n]>&word- redirections (combination dup and close) for (( expr1; expr2; expr3 )) ; do list; done - arithmetic for command --- 843,855 ---- `.' can execute shell functions exit statuses between 0 and 255 `+=' variable assignment operator FPATH and PATH mixing getopts -a -I invocation option printf %H, %P, %T, %Z modifiers, output base for %d + lexical scoping for local variables in `ksh' functions + no scoping for local variables in `POSIX' functions ! New things in ksh-93 present in bash-3.0: [n]<&word- and [n]>&word- redirections (combination dup and close) for (( expr1; expr2; expr3 )) ; do list; done - arithmetic for command *************** *** 848,851 **** --- 876,880 ---- command name completion ENV processed only for interactive shells + set -o pipefail Section D: Why does bash do some things differently than other Unix shells? *************** *** 1236,1242 **** done ! The latest drafts of the updated POSIX standard have changed this: the ! word list is no longer required. Bash versions 2.05a and later accept ! the new syntax. E8) Why does the arithmetic evaluation code complain about `08'? --- 1265,1271 ---- done ! The latest updated POSIX standard has changed this: the word list ! is no longer required. Bash versions 2.05a and later accept the ! new syntax. E8) Why does the arithmetic evaluation code complain about `08'? *************** *** 1306,1309 **** --- 1335,1381 ---- //hostname/path to access `path' on server `hostname'. + E11) If I resize my xterm while another program is running, why doesn't bash + notice the change? + + This is another issue that deals with job control. + + The kernel maintains a notion of a current terminal process group. Members + of this process group (processes whose process group ID is equal to the + current terminal process group ID) receive terminal-generated signals like + SIGWINCH. (For more details, see the JOB CONTROL section of the bash + man page.) + + If a terminal is resized, the kernel sends SIGWINCH to each member of + the terminal's current process group (the `foreground' process group). + + When bash is running with job control enabled, each pipeline (which may be + a single command) is run in its own process group, different from bash's + process group. This foreground process group receives the SIGWINCH; bash + does not. Bash has no way of knowing that the terminal has been resized. + + There is a `checkwinsize' option, settable with the `shopt' builtin, that + will cause bash to check the window size and adjust its idea of the + terminal's dimensions each time a process stops or exits and returns control + of the terminal to bash. Enable it with `shopt -s checkwinsize'. + + E12) Why don't negative offsets in substring expansion work like I expect? + + When substring expansion of the form ${param:offset[:length} is used, + an `offset' that evaluates to a number less than zero counts back from + the end of the expanded value of $param. + + When a negative `offset' begins with a minus sign, however, unexpected things + can happen. Consider + + a=12345678 + echo ${a:-4} + + intending to print the last four characters of $a. The problem is that + ${param:-word} already has a well-defined meaning: expand to word if the + expanded value of param is unset or null, and $param otherwise. + + To use negative offsets that begin with a minus sign, separate the + minus sign and the colon with a space. + Section F: Things to watch out for on certain Unix versions *************** *** 1411,1415 **** loops and subshells require `command < file'. ! The file CWRU/sh-redir-hack in the bash-2.05a distribution is an (unofficial) patch to parse.y that will modify the grammar to support this construct. It will not apply with `patch'; you must --- 1483,1487 ---- loops and subshells require `command < file'. ! The file CWRU/sh-redir-hack in the bash distribution is an (unofficial) patch to parse.y that will modify the grammar to support this construct. It will not apply with `patch'; you must *************** *** 1672,1680 **** or on the web. H3) What's coming in future versions? These are features I hope to include in a future version of bash. ! a better bash debugger (a minimally-tested version is included with bash-2.05b) associative arrays co-processes, but with a new-style syntax that looks like function declaration --- 1744,1758 ---- or on the web. + The GNU Bash Reference Manual has been published as a printed book by + Network Theory Ltd (Paperback, ISBN: 0-9541617-7-7, Feb 2003). It covers + bash-2.0 and is available from most online bookstores (see + http://www.network-theory.co.uk/bash/manual/ for details). The publisher + will donate $1 to the Free Software Foundation for each copy sold. + H3) What's coming in future versions? These are features I hope to include in a future version of bash. ! Rocky Bernstein's bash debugger (support is included with bash-3.0) associative arrays co-processes, but with a new-style syntax that looks like function declaration *************** *** 1686,1690 **** breaking some of the shell functionality into embeddable libraries a module system like zsh's, using dynamic loading like builtins - better internationalization using GNU `gettext' date-stamped command history a bash programmer's guide with a chapter on creating loadable builtins --- 1764,1767 ---- *************** *** 1699,1706 **** H5) When will the next release appear? ! The next version will appear sometime in 2002. Never make predictions. ! ! This document is Copyright 1995-2002 by Chester Ramey. Permission is hereby granted, without written agreement and --- 1776,1782 ---- H5) When will the next release appear? ! The next version will appear sometime in 2005. Never make predictions. ! This document is Copyright 1995-2004 by Chester Ramey. Permission is hereby granted, without written agreement and diff -aNrc2 bash-2.05b-patched/doc/Makefile.in bash-3.0/doc/Makefile.in *** bash-2.05b-patched/doc/Makefile.in Thu May 16 15:17:07 2002 --- bash-3.0/doc/Makefile.in Tue Jul 27 08:57:48 2004 *************** *** 1,5 **** # This Makefile is for the Bash/documentation directory -*- text -*-. # ! # Copyright (C) 1996 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify --- 1,5 ---- # This Makefile is for the Bash/documentation directory -*- text -*-. # ! # Copyright (C) 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify *************** *** 17,20 **** --- 17,28 ---- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + PACKAGE = @PACKAGE_NAME@ + VERSION = @PACKAGE_VERSION@ + + PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + # SHELL = @MAKE_SHELL@ *************** *** 48,51 **** --- 56,61 ---- BUILD_DIR = @BUILD_DIR@ + SUPPORT_SRCDIR = $(topdir)/support + # bad style RL_LIBDIR = $(topdir)/lib/readline *************** *** 56,68 **** MAKEINFO = makeinfo ! TEXI2DVI = ${topdir}/support/texi2dvi ! TEXI2HTML = ${topdir}/support/texi2html MAN2HTML = ${BUILD_DIR}/support/man2html HTMLPOST = ${srcdir}/htmlpost.sh QUIETPS = #set this to -q to shut up dvips PAPERSIZE = letter # change to a4 for A4-size paper ! PSDPI = 300 # could be 600 if you like DVIPS = dvips -D ${PSDPI} $(QUIETPS) -t ${PAPERSIZE} -o $@ # tricky TEXINPUTDIR = $(RL_LIBDIR)/doc # These tools might not be available; they're not required --- 66,81 ---- MAKEINFO = makeinfo ! TEXI2DVI = ${SUPPORT_SRCDIR}/texi2dvi ! TEXI2HTML = ${SUPPORT_SRCDIR}/texi2html MAN2HTML = ${BUILD_DIR}/support/man2html HTMLPOST = ${srcdir}/htmlpost.sh + INFOPOST = ${srcdir}/infopost.sh QUIETPS = #set this to -q to shut up dvips PAPERSIZE = letter # change to a4 for A4-size paper ! PSDPI = 600 # could be 300 if you like DVIPS = dvips -D ${PSDPI} $(QUIETPS) -t ${PAPERSIZE} -o $@ # tricky + TEXINPUTDIR = $(RL_LIBDIR)/doc + SET_TEXINPUTS = TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS # These tools might not be available; they're not required *************** *** 70,74 **** PSPDF = gs -sPAPERSIZE=${PAPERSIZE} -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@ ! MKDIRS = ${topdir}/support/mkdirs # This should be a program that converts troff to an ascii-readable format --- 83,87 ---- PSPDF = gs -sPAPERSIZE=${PAPERSIZE} -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@ ! MKDIRS = ${SUPPORT_SRCDIR}/mkdirs # This should be a program that converts troff to an ascii-readable format *************** *** 78,83 **** GROFF = groff ! HSUSER = $(RL_LIBDIR)/doc/hsuser.texinfo ! RLUSER = $(RL_LIBDIR)/doc/rluser.texinfo .SUFFIXES: .0 .1 .3 .ms .ps .txt .dvi .html .pdf --- 91,98 ---- GROFF = groff ! HSUSER = $(RL_LIBDIR)/doc/hsuser.texi ! RLUSER = $(RL_LIBDIR)/doc/rluser.texi ! ! BASHREF_FILES = $(srcdir)/bashref.texi $(srcdir)/version.texi .SUFFIXES: .0 .1 .3 .ms .ps .txt .dvi .html .pdf *************** *** 123,130 **** -${DVIPDF} $< all: ps info dvi text html nodvi: ps info text html ! PSFILES = bash.ps bashbug.ps article.ps builtins.ps rbash.ps DVIFILES = bashref.dvi bashref.ps INFOFILES = bashref.info --- 138,149 ---- -${DVIPDF} $< + .dvi.ps: + ${RM} $@ + -${DVIPS} $< + all: ps info dvi text html nodvi: ps info text html ! PSFILES = bash.ps bashbug.ps article.ps builtins.ps rbash.ps DVIFILES = bashref.dvi bashref.ps INFOFILES = bashref.info *************** *** 140,172 **** pdf: ${PDFFILES} ! bashref.dvi: $(srcdir)/bashref.texi $(HSUSER) $(RLUSER) ! TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/bashref.texi ! ! bashref.ps: bashref.dvi ! $(RM) $@ ! $(DVIPS) bashref.dvi ! bashref.info: $(srcdir)/bashref.texi $(HSUSER) $(RLUSER) $(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi ! bashref.html: bashref.texi $(HSUSER) $(RLUSER) $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/bashref.texi ! new-bashref.dvi: $(srcdir)/new-bashref.texi $(HSUSER) $(RLUSER) ! TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/new-bashref.texi ! ! new-bashref.ps: new-bashref.dvi ! $(RM) $@ ! $(DVIPS) new-bashref.dvi ! ! new-bashref.info: $(srcdir)/new-bashref.texi $(HSUSER) $(RLUSER) ! $(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/new-bashref.texi ! ! #bash.dvi: bash.texinfo $(HSUSER) $(RLUSER) ! # TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) bash.texinfo ! # ! #bashman.ps: bash.dvi ! # $(RM) $@ ! # $(DVIPS) bash.dvi bash.txt: bash.1 --- 159,173 ---- pdf: ${PDFFILES} ! bashref.dvi: $(BASHREF_FILES) $(HSUSER) $(RLUSER) ! ${SET_TEXINPUTS} $(TEXI2DVI) $(srcdir)/bashref.texi ! bashref.info: $(BASHREF_FILES) $(HSUSER) $(RLUSER) $(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi ! bashref.html: $(BASHREF_FILES) $(HSUSER) $(RLUSER) $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/bashref.texi ! bash.info: bashref.info ! ${SHELL} ${INFOPOST} < $(srcdir)/bashref.info > $@ ; \ bash.txt: bash.1 *************** *** 182,185 **** --- 183,188 ---- article.ps: article.ms + bashref.ps: bashref.dvi + article.pdf: article.ps bashref.pdf: bashref.dvi *************** *** 212,227 **** installdirs: ! -test -d $(man1dir) || $(SHELL) ${MKDIRS} $(DESTDIR)$(man1dir) ! -test -d $(infodir) || $(SHELL) ${MKDIRS} $(DESTDIR)$(infodir) -if test -n "$(htmldir)" ; then \ ! test -d $(htmldir) || $(SHELL) ${MKDIRS} $(DESTDIR)$(htmldir) ; \ fi ! install: info installdirs -$(INSTALL_DATA) $(srcdir)/bash.1 $(DESTDIR)$(man1dir)/bash${man1ext} -$(INSTALL_DATA) $(srcdir)/bashbug.1 $(DESTDIR)$(man1dir)/bashbug${man1ext} # uncomment the next line to install the builtins man page # -$(INSTALL_DATA) $(srcdir)/builtins.1 $(DESTDIR)$(man1dir)/bash_builtins${man1ext} ! -$(INSTALL_DATA) $(srcdir)/bashref.info $(DESTDIR)$(infodir)/bash.info # run install-info if it is present to update the info directory if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ --- 215,230 ---- installdirs: ! -$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(man1dir) ! -$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(infodir) -if test -n "$(htmldir)" ; then \ ! $(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(htmldir) ; \ fi ! install: info installdirs bash.info -$(INSTALL_DATA) $(srcdir)/bash.1 $(DESTDIR)$(man1dir)/bash${man1ext} -$(INSTALL_DATA) $(srcdir)/bashbug.1 $(DESTDIR)$(man1dir)/bashbug${man1ext} # uncomment the next line to install the builtins man page # -$(INSTALL_DATA) $(srcdir)/builtins.1 $(DESTDIR)$(man1dir)/bash_builtins${man1ext} ! -$(INSTALL_DATA) $(srcdir)/bash.info $(DESTDIR)$(infodir)/bash.info # run install-info if it is present to update the info directory if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ *************** *** 286,288 **** $(RM) RBASH ! xdist: inst posix rbash --- 289,291 ---- $(RM) RBASH ! xdist: pdf inst posix rbash diff -aNrc2 bash-2.05b-patched/doc/bash.1 bash-3.0/doc/bash.1 *** bash-2.05b-patched/doc/bash.1 Mon Jul 15 15:21:03 2002 --- bash-3.0/doc/bash.1 Mon Jul 12 11:27:08 2004 *************** *** 5,16 **** .\" Information Network Services .\" Case Western Reserve University ! .\" chet@ins.CWRU.Edu .\" ! .\" Last Change: Mon Jul 15 15:20:56 EDT 2002 .\" .\" bash_builtins, strip all but Built-Ins section .if \n(zZ=1 .ig zZ .if \n(zY=1 .ig zY ! .TH BASH 1 "2002 July 15" "GNU Bash-2.05b" .\" .\" There's some problem with having a `@' --- 5,16 ---- .\" Information Network Services .\" Case Western Reserve University ! .\" chet@po.CWRU.Edu .\" ! .\" Last Change: Sat Jun 26 14:26:44 EDT 2004 .\" .\" bash_builtins, strip all but Built-Ins section .if \n(zZ=1 .ig zZ .if \n(zY=1 .ig zY ! .TH BASH 1 "2004 June 26" "GNU Bash-3.0" .\" .\" There's some problem with having a `@' *************** *** 52,57 **** [file] .SH COPYRIGHT ! .if n Bash is Copyright (C) 1989-2002 by the Free Software Foundation, Inc. ! .if t Bash is Copyright \(co 1989-2002 by the Free Software Foundation, Inc. .SH DESCRIPTION .B Bash --- 52,57 ---- [file] .SH COPYRIGHT ! .if n Bash is Copyright (C) 1989-2004 by the Free Software Foundation, Inc. ! .if t Bash is Copyright \(co 1989-2004 by the Free Software Foundation, Inc. .SH DESCRIPTION .B Bash *************** *** 153,156 **** --- 153,167 ---- .PD 0 .TP + .B \-\-debugger + Arrange for the debugger profile to be executed before the shell + starts. Turns on extended debugging mode (see the description of the + .B extdebug + option to the + .B shopt + builtin below) and shell function tracing (see the description of the + \fB\-o functrace\fP option to the + .B set + builtin below). + .TP .B \-\-dump\-po\-strings Equivalent to \fB\-D\fP, but the output is in the GNU \fIgettext\fP *************** *** 259,263 **** .B \-c option ! whose standard input and output are both connected to terminals (as determined by .IR isatty (3)), --- 270,274 ---- .B \-c option ! whose standard input and error are both connected to terminals (as determined by .IR isatty (3)), *************** *** 477,481 **** .if t ! case do done elif else esac fi for function if in select then until while { } time [[ ]] .if t .RE - .RE .SH "SHELL GRAMMAR" .SS Simple Commands --- 488,491 ---- *************** *** 511,520 **** below). .PP If the reserved word .B ! ! precedes a pipeline, the exit status of that ! pipeline is the logical NOT of the exit status of the last command. ! Otherwise, the status of the pipeline is the exit status of the last ! command. The shell waits for all commands in the pipeline to terminate before returning a value. --- 521,533 ---- below). .PP + The return status of a pipeline is the exit status of the last + command, unless the \fBpipefail\fP option is enabled. + If \fBpipefail\fP is enabled, the pipeline's return status is the + value of the last (rightmost) command to exit with a non-zero status, + or zero if all commands exit successfully. If the reserved word .B ! ! precedes a pipeline, the exit status of that pipeline is the logical ! negation of the exit status as described above. The shell waits for all commands in the pipeline to terminate before returning a value. *************** *** 611,615 **** .TP (\fIlist\fP) ! \fIlist\fP is executed in a subshell. Variable assignments and builtin commands that affect the shell's environment do not remain in effect after the command completes. The return status is the exit status of --- 624,632 ---- .TP (\fIlist\fP) ! \fIlist\fP is executed in a subshell environment (see ! .SM ! \fBCOMMAND EXECUTION ENVIRONMENT\fP ! below). ! Variable assignments and builtin commands that affect the shell's environment do not remain in effect after the command completes. The return status is the exit status of *************** *** 622,626 **** The return status is the exit status of \fIlist\fP. ! Note that unlike the metacharacters \fB(\fP and \fB\)\fP, \fB{\fP and \fB}\fP are \fIreserved words\fP and must occur where a reserved word is permitted to be recognized. Since they do not cause a word --- 639,643 ---- The return status is the exit status of \fIlist\fP. ! Note that unlike the metacharacters \fB(\fP and \fB)\fP, \fB{\fP and \fB}\fP are \fIreserved words\fP and must occur where a reserved word is permitted to be recognized. Since they do not cause a word *************** *** 646,649 **** --- 663,668 ---- variable expansion, arithmetic expansion, command substitution, process substitution, and quote removal are performed. + Conditional operators such as \fB\-f\fP must be unquoted to be recognized + as primaries. .if t .sp 0.5 .if n .sp 1 *************** *** 657,660 **** --- 676,699 ---- .if t .sp 0.5 .if n .sp 1 + An additional binary operator, \fB=~\fP, is available, with the same + precedence as \fB==\fP and \fB!=\fP. + When it is used, the string to the right of the operator is considered + an extended regular expression and matched accordingly (as in \fIregex\fP(3)). + The return value is 0 if the string matches + the pattern, and 1 otherwise. + If the regular expression is syntactically incorrect, the conditional + expression's return value is 2. + If the shell option + .B nocaseglob + is enabled, the match is performed without regard to the case + of alphabetic characters. + Substrings matched by parenthesized subexpressions within the regular + expression are saved in the array variable \fBBASH_REMATCH\fP. + The element of \fBBASH_REMATCH\fP with index 0 is the portion of the string + matching the entire regular expression. + The element of \fBBASH_REMATCH\fP with index \fIn\fP is the portion of the + string matching the \fIn\fPth parenthesized subexpression. + .if t .sp 0.5 + .if n .sp 1 Expressions may be combined using the following operators, listed in decreasing order of precedence: *************** *** 799,811 **** of the last \fBdo\fP \fIlist\fP command executed, or zero if none was executed. ! .TP ! [ \fBfunction\fP ] \fIname\fP () { \fIlist\fP; } ! This defines a function named \fIname\fP. The \fIbody\fP of the ! function is the ! .I list ! of commands between { and }. This list ! is executed whenever \fIname\fP is specified as the ! name of a simple command. The exit status of a function is ! the exit status of the last command executed in the body. (See .SM .B FUNCTIONS --- 838,867 ---- of the last \fBdo\fP \fIlist\fP command executed, or zero if none was executed. ! .SS Shell Function Definitions ! .PP ! A shell function is an object that is called like a simple command and ! executes a compound command with a new set of positional parameters. ! Shell functions are declared as follows: ! .TP ! [ \fBfunction\fP ] \fIname\fP () \fIcompound\-command\fP [\fIredirection\fP] ! This defines a function named \fIname\fP. ! The reserved word \fBfunction\fP is optional. ! If the \fBfunction\fP reserved word is supplied, the parentheses are optional. ! The \fIbody\fP of the function is the compound command ! .I compound\-command ! (see \fBCompound Commands\fP above). ! That command is usually a \fIlist\fP of commands between { and }, but ! may be any command listed under \fBCompound Commands\fP above. ! \fIcompound\-command\fP is executed whenever \fIname\fP is specified as the ! name of a simple command. ! Any redirections (see ! .SM ! .B REDIRECTION ! below) specified when a function is defined are performed ! when the function is executed. ! The exit status of a function definition is zero unless a syntax error ! occurs or a readonly function with the same name already exists. ! When executed, the exit status of a function is the exit status of the ! last command executed in the body. (See .SM .B FUNCTIONS *************** *** 881,884 **** --- 937,942 ---- A double quote may be quoted within double quotes by preceding it with a backslash. + When command history is being used, the double quote may not be used to + quote the history expansion character. .PP The special parameters *************** *** 959,963 **** a number, or one of the special characters listed below under .BR "Special Parameters" . ! For the shell's purposes, a .I variable is a parameter denoted by a --- 1017,1021 ---- a number, or one of the special characters listed below under .BR "Special Parameters" . ! A .I variable is a parameter denoted by a *************** *** 1002,1006 **** attribute set, then .I value ! is subject to arithmetic expansion even if the $((...)) expansion is not used (see .B "Arithmetic Expansion" --- 1060,1064 ---- attribute set, then .I value ! is evaluated as an arithmetic expression even if the $((...)) expansion is not used (see .B "Arithmetic Expansion" *************** *** 1011,1014 **** --- 1069,1073 ---- Pathname expansion is not performed. Assignment statements may also appear as arguments to the + .BR alias , .BR declare , .BR typeset , *************** *** 1139,1142 **** --- 1198,1249 ---- .BR bash . .TP + .B BASH_ARGC + An array variable whose values are the number of parameters in each + frame of the current bash execution call stack. The number of + parameters to the current subroutine (shell function or script executed + with \fB.\fP or \fBsource\fP) is at the top of the stack. When a + subroutine is executed, the number of parameters passed is pushed onto + \fBBASH_ARGC\fP. + .TP + .B BASH_ARGV + An array variable containing all of the parameters in the current bash + execution call stack. The final parameter of the last subroutine call + is at the top of the stack; the first parameter of the initial call is + at the bottom. When a subroutine is executed, the parameters supplied + are pushed onto \fBBASH_ARGV\fP. + .TP + .B BASH_COMMAND + The command currently being executed or about to be executed, unless the + shell is executing a command as the result of a trap, + in which case it is the command executing at the time of the trap. + .TP + .B BASH_EXECUTION_STRING + The command argument to the \fB\-c\fP invocation option. + .TP + .B BASH_LINENO + An array variable whose members are the line numbers in source files + corresponding to each member of @var{FUNCNAME}. + \fB${BASH_LINENO[\fP\fI$i\fP\fB]}\fP is the line number in the source + file where \fB${FUNCNAME[\fP\fI$i + 1\fP\fB]}\fP was called. + The corresponding source file name is \fB${BASH_SOURCE[\fP\fI$i + 1\fP\fB]}\fB. + Use \fBLINENO\fP to obtain the current line number. + .TP + .B BASH_REMATCH + An array variable whose members are assigned by the \fB=~\fP binary + operator to the \fB[[\fP conditional command. + The element with index 0 is the portion of the string + matching the entire regular expression. + The element with index \fIn\fP is the portion of the + string matching the \fIn\fPth parenthesized subexpression. + This variable is read-only. + .TP + .B BASH_SOURCE + An array variable whose members are the source filenames corresponding + to the elements in the \fBFUNCNAME\fP array variable. + .TP + .B BASH_SUBSHELL + Incremented by one each time a subshell or subshell environment is spawned. + The initial value is 0. + .TP .B BASH_VERSINFO A readonly array variable whose members hold version information for *************** *** 1196,1199 **** --- 1303,1315 ---- below). .TP + .B COMP_WORDBREAKS + The set of characters that the Readline library treats as word + separators when performing word completion. + If + .SM + .B COMP_WORDBREAKS + is unset, it loses its special properties, even if it is + subsequently reset. + .TP .B COMP_WORDS An array variable (see \fBArrays\fP below) consisting of the individual *************** *** 1228,1232 **** .TP .B FUNCNAME ! The name of any currently-executing shell function. This variable exists only when a shell function is executing. Assignments to --- 1344,1352 ---- .TP .B FUNCNAME ! An array variable containing the names of all shell functions ! currently in the execution call stack. ! The element with index 0 is the name of any currently-executing ! shell function. ! The bottom-most element is "main". This variable exists only when a shell function is executing. Assignments to *************** *** 1440,1443 **** --- 1560,1571 ---- facility (see \fBProgrammable Completion\fP below). .TP + .B EMACS + If \fBbash\fP finds this variable in the environment when the shell starts + with value + .if t \f(CWt\fP, + .if n "t", + it assumes that the shell is running in an emacs shell buffer and disables + line editing. + .TP .B FCEDIT The default editor for the *************** *** 1469,1489 **** .TP .B HISTCONTROL ! If set to a value of .IR ignorespace , lines which begin with a .B space ! character are not entered on the history list. ! If set to a value of ! .IR ignoredups , ! lines matching the last history line are not entered. A value of .I ignoreboth ! combines the two options. ! If unset, or if set to any other value than those above, ! all lines read ! by the parser are saved on the history list, subject to the value ! of ! .BR HISTIGNORE . ! This variable's function is superseded by .BR HISTIGNORE . The second and subsequent lines of a multi-line compound command are --- 1597,1621 ---- .TP .B HISTCONTROL ! A colon-separated list of values controlling how commands are saved on ! the history list. ! If the list of values includes .IR ignorespace , lines which begin with a .B space ! character are not saved in the history list. ! A value of ! .I ignoredups ! causes lines matching the previous history entry to not be saved. A value of .I ignoreboth ! is shorthand for \fIignorespace\fP and \fIignoredups\fP. ! A value of ! .IR erasedups ! causes all previous lines matching the current line to be removed from ! the history list before that line is saved. ! Any value not in the above list is ignored. ! If \fBHISTCONTROL\fP is unset, or does not include a valid value, ! all lines read by the shell parser are saved on the history list, ! subject to the value of .BR HISTIGNORE . The second and subsequent lines of a multi-line compound command are *************** *** 1526,1529 **** --- 1658,1668 ---- below). The default value is 500. .TP + .B HISTTIMEFORMAT + If this variable is set and not null, its value is used as a format string + for \fIstrftime\fP(3) to print the time stamp associated with each history + entry displayed by the \fBhistory\fP builtin. + If this variable is set, time stamps are written to the history file so + they may be preserved across shell sessions. + .TP .B HOME The home directory of the current user; the default argument for the *************** *** 1674,1683 **** .SM .B COMMAND EXECUTION ! below). The default path is system-dependent, and is set by the administrator who installs .BR bash . A common value is ! .if t \f(CW/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin:.\fP. ! .if n ``/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin:.''. .TP .B POSIXLY_CORRECT --- 1813,1827 ---- .SM .B COMMAND EXECUTION ! below). ! A zero-length (null) directory name in the value of \fBPATH\fP indicates the ! current directory. ! A null directory name may appear as two adjacent colons, or as an initial ! or trailing colon. ! The default path is system-dependent, and is set by the administrator who installs .BR bash . A common value is ! .if t \f(CW/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin\fP. ! .if n ``/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin''. .TP .B POSIXLY_CORRECT *************** *** 1727,1730 **** --- 1871,1880 ---- levels of indirection. The default is ``\fB+ \fP''. .TP + .B SHELL + The full pathname to the shell is kept in this environment variable. + If it is not set when the shell starts, + .B bash + assigns to it the full pathname of the current user's login shell. + .TP .B TIMEFORMAT The value of this parameter is used as a format string specifying *************** *** 1959,1964 **** the form of an optional .IR preamble , ! followed by a series of comma-separated strings ! between a pair of braces, followed by an optional .IR postscript . The preamble is prefixed to each string contained --- 2109,2115 ---- the form of an optional .IR preamble , ! followed by either a series of comma-separated strings or ! a sequence expression between a pair of braces, followed by ! an optional .IR postscript . The preamble is prefixed to each string contained *************** *** 1970,1973 **** --- 2121,2132 ---- For example, a\fB{\fPd,c,b\fB}\fPe expands into `ade ace abe'. .PP + A sequence expression takes the form \fB{\fP\fIx\fP\fB..\fP\fIy\fP\fB}\fP, + where \fIx\fP and \fIy\fP are either integers or single characters. + When integers are supplied, the expression expands to each number between + \fIx\fP and \fIy\fP, inclusive. + When characters are supplied, the expression expands to each character + lexicographically between \fIx\fP and \fIy\fP, inclusive. Note that + both \fIx\fP and \fIy\fP must be of the same type. + .PP Brace expansion is performed before any other expansions, and any characters special to other expansions are preserved *************** *** 1978,1982 **** .PP A correctly-formed brace expansion must contain unquoted opening ! and closing braces, and at least one unquoted comma. Any incorrectly formed brace expansion is left unchanged. A \fB{\fP or \fB,\fP may be quoted with a backslash to prevent its --- 2137,2142 ---- .PP A correctly-formed brace expansion must contain unquoted opening ! and closing braces, and at least one unquoted comma or a valid ! sequence expression. Any incorrectly formed brace expansion is left unchanged. A \fB{\fP or \fB,\fP may be quoted with a backslash to prevent its *************** *** 2116,2121 **** than the value of \fIparameter\fP itself. This is known as \fIindirect expansion\fP. ! The exception to this is the expansion of ${!\fIprefix\fP*} ! described below. .PP In each of the cases below, \fIword\fP is subject to tilde expansion, --- 2276,2283 ---- than the value of \fIparameter\fP itself. This is known as \fIindirect expansion\fP. ! The exceptions to this are the expansions of ${!\fIprefix\fP*} and ! ${\fB!\fP\fIname\fP[\fI@\fP]} described below. ! The exclamation point must immediately follow the left brace in order to ! introduce indirection. .PP In each of the cases below, \fIword\fP is subject to tilde expansion, *************** *** 2195,2198 **** --- 2357,2364 ---- .TP ${\fB!\fP\fIprefix\fP\fB*\fP} + .PD 0 + .TP + ${\fB!\fP\fIprefix\fP\fB@\fP} + .PD Expands to the names of variables whose names begin with \fIprefix\fP, separated by the first character of the *************** *** 2201,2204 **** --- 2367,2382 ---- special variable. .TP + ${\fB!\fP\fIname\fP[\fI@\fP]} + .PD 0 + .TP + ${\fB!\fP\fIname\fP[\fI*\fP]} + .PD + If \fIname\fP is an array variable, expands to the list of array indices + (keys) assigned in \fIname\fP. + If \fIname\fP is not an array, expands to 0 if \fIname\fP is set and null + otherwise. + When \fI@\fP is used and the expansion appears within double quotes, each + key expands to a separate word. + .TP ${\fB#\fP\fIparameter\fP} The length in characters of the value of \fIparameter\fP is substituted. *************** *** 2368,2372 **** All tokens in the expression undergo parameter expansion, string expansion, command substitution, and quote removal. ! Arithmetic substitutions may be nested. .PP The evaluation is performed according to the rules listed below under --- 2546,2550 ---- All tokens in the expression undergo parameter expansion, string expansion, command substitution, and quote removal. ! Arithmetic expansions may be nested. .PP The evaluation is performed according to the rules listed below under *************** *** 2491,2494 **** --- 2669,2676 ---- option is set, and no matches are found, the word is removed. + If the + .B failglob + shell option is set, and no matches are found, an error message + is printed and the command is not executed. If the shell option .B nocaseglob *************** *** 2515,2518 **** --- 2697,2701 ---- .BR nocaseglob , .BR nullglob , + .BR failglob , and .B dotglob *************** *** 2535,2545 **** and .B ``..'' ! are always ignored, even when .SM .B GLOBIGNORE ! is set. However, setting .SM .B GLOBIGNORE ! has the effect of enabling the .B dotglob shell option, so all other file names beginning with a --- 2718,2728 ---- and .B ``..'' ! are always ignored when .SM .B GLOBIGNORE ! is set and not null. However, setting .SM .B GLOBIGNORE ! to a non-null value has the effect of enabling the .B dotglob shell option, so all other file names beginning with a *************** *** 2564,2568 **** Any character that appears in a pattern, other than the special pattern characters described below, matches itself. The NUL character may not ! occur in a pattern. The special pattern characters must be quoted if they are to be matched literally. .PP --- 2747,2753 ---- Any character that appears in a pattern, other than the special pattern characters described below, matches itself. The NUL character may not ! occur in a pattern. A backslash escapes the following character; the ! escaping backslash is discarded when matching. ! The special pattern characters must be quoted if they are to be matched literally. .PP *************** *** 3010,3023 **** .B SHELL BUILTIN COMMANDS below). ! The first word of each command, if unquoted, is checked to see if it has an alias. If so, that word is replaced by the text of the alias. ! The alias name and the replacement text may contain any valid ! shell input, including the ! .I metacharacters ! listed above, with the exception that the alias name may not ! contain \fI=\fP. The first word of the replacement text is tested for aliases, but a word that is identical to an alias being expanded ! is not expanded a second time. This means that one may alias .B ls to --- 3195,3210 ---- .B SHELL BUILTIN COMMANDS below). ! The first word of each simple command, if unquoted, is checked to see if it has an alias. If so, that word is replaced by the text of the alias. ! The characters \fB/\fP, \fB$\fP, \fB`\fP, and \fB=\fP and ! any of the shell \fImetacharacters\fP or quoting characters ! listed above may not appear in an alias name. ! The replacement text may contain any valid shell input, ! including shell metacharacters. ! The first word of the replacement text is tested for aliases, but a word that is identical to an alias being expanded ! is not expanded a second time. ! This means that one may alias .B ls to *************** *** 3093,3099 **** The special parameter .B # ! is updated to reflect the change. Positional parameter 0 is unchanged. ! The .SM .B FUNCNAME --- 3280,3286 ---- The special parameter .B # ! is updated to reflect the change. Special parameter 0 is unchanged. ! The first element of the .SM .B FUNCNAME *************** *** 3114,3118 **** .SM .B declare ! builtin below). .PP Variables local to the function may be declared with the --- 3301,3308 ---- .SM .B declare ! builtin below) or the ! \fB\-o functrace\fP shell option has been enabled with ! the \fBset\fP builtin ! (in which case all functions inherit the \fBDEBUG\fP trap). .PP Variables local to the function may be declared with the *************** *** 3125,3129 **** is executed in a function, the function completes and execution resumes with the next command after the function ! call. When a function completes, the values of the positional parameters and the special parameter .B # --- 3315,3322 ---- is executed in a function, the function completes and execution resumes with the next command after the function ! call. ! Any command associated with the \fBRETURN\fP trap is executed ! before execution resumes. ! When a function completes, the values of the positional parameters and the special parameter .B # *************** *** 3143,3147 **** or .B typeset ! will list the function names only. Functions may be exported so that subshells automatically have them defined with the --- 3336,3342 ---- or .B typeset ! will list the function names only ! (and optionally the source file and line number, if the \fBextdebug\fP ! shell option is enabled). Functions may be exported so that subshells automatically have them defined with the *************** *** 3150,3153 **** --- 3345,3352 ---- .B export builtin. + Note that shell functions and variables with the same name may result + in multiple identically-named entries in the environment passed to the + shell's children. + Care should be taken in cases where this may cause a problem. .PP Functions may be recursive. No limit is imposed on the number *************** *** 3155,3164 **** .SH "ARITHMETIC EVALUATION" The shell allows arithmetic expressions to be evaluated, under ! certain circumstances (see the \fBlet\fP builtin command and ! \fBArithmetic Expansion\fP). Evaluation is done in fixed-width integers with no check for overflow, though division by 0 is trapped and flagged as an error. ! The operators and their precedence and associativity are the same ! as in the C language. The following list of operators is grouped into levels of equal-precedence operators. --- 3354,3363 ---- .SH "ARITHMETIC EVALUATION" The shell allows arithmetic expressions to be evaluated, under ! certain circumstances (see the \fBlet\fP and \fBdeclare\fP builtin ! commands and \fBArithmetic Expansion\fP). Evaluation is done in fixed-width integers with no check for overflow, though division by 0 is trapped and flagged as an error. ! The operators and their precedence, associativity, and values ! are the same as in the C language. The following list of operators is grouped into levels of equal-precedence operators. *************** *** 3213,3217 **** .TP .B \fIexpr\fP?\fIexpr\fP:\fIexpr\fP ! conditional evaluation .TP .B = *= /= %= += \-= <<= >>= &= ^= |= --- 3412,3416 ---- .TP .B \fIexpr\fP?\fIexpr\fP:\fIexpr\fP ! conditional operator .TP .B = *= /= %= += \-= <<= >>= &= ^= |= *************** *** 3226,3231 **** Within an expression, shell variables may also be referenced by name without using the parameter expansion syntax. The value of a variable is evaluated as an arithmetic expression ! when it is referenced. A shell variable need not have its integer attribute turned on to be used in an expression. --- 3425,3434 ---- Within an expression, shell variables may also be referenced by name without using the parameter expansion syntax. + A shell variable that is null or unset evaluates to 0 when referenced + by name without using the parameter expansion syntax. The value of a variable is evaluated as an arithmetic expression ! when it is referenced, or when a variable which has been given the ! \fIinteger\fP attribute using \fBdeclare -i\fP is assigned a value. ! A null value evaluates to 0. A shell variable need not have its integer attribute turned on to be used in an expression. *************** *** 3349,3355 **** True if the length of \fIstring\fP is zero. .TP - .B \-n \fIstring\fP - .TP \fIstring\fP True if the length of .I string --- 3552,3560 ---- True if the length of \fIstring\fP is zero. .TP \fIstring\fP + .PD 0 + .TP + .B \-n \fIstring\fP + .PD True if the length of .I string *************** *** 3538,3551 **** the file creation mode mask .IP \(bu ! shell variables marked for export, along with variables exported for ! the command, passed in the environment .IP \(bu ! traps caught by the shell are reset to the values the inherited ! from the shell's parent, and traps ignored by the shell are ignored .PP A command invoked in this separate environment cannot affect the shell's execution environment. .PP ! Command substitution and asynchronous commands are invoked in a subshell environment that is a duplicate of the shell environment, except that traps caught by the shell are reset to the values --- 3743,3757 ---- the file creation mode mask .IP \(bu ! shell variables and functions marked for export, along with variables ! exported for the command, passed in the environment .IP \(bu ! traps caught by the shell are reset to the values inherited from the ! shell's parent, and traps ignored by the shell are ignored .PP A command invoked in this separate environment cannot affect the shell's execution environment. .PP ! Command substitution, commands grouped with parentheses, ! and asynchronous commands are invoked in a subshell environment that is a duplicate of the shell environment, except that traps caught by the shell are reset to the values *************** *** 3661,3665 **** .BR SIGTSTP . .PP ! Synchronous jobs started by \fBbash\fP have signal handlers set to the values inherited by the shell from its parent. When job control is not in effect, asynchronous commands --- 3867,3871 ---- .BR SIGTSTP . .PP ! Non-builtin commands run by \fBbash\fP have signal handlers set to the values inherited by the shell from its parent. When job control is not in effect, asynchronous commands *************** *** 3670,3674 **** .SM .B SIGQUIT ! as well. Commands run as a result of command substitution ignore the keyboard-generated job control signals --- 3876,3880 ---- .SM .B SIGQUIT ! in addition to these inherited handlers. Commands run as a result of command substitution ignore the keyboard-generated job control signals *************** *** 3718,3724 **** to all jobs when an interactive login shell exits. .PP ! When \fBbash\fP receives a signal for which a trap has been set while ! waiting for a command to complete, the trap will not be executed until ! the command completes. When \fBbash\fP is waiting for an asynchronous command via the \fBwait\fP builtin, the reception of a signal for which a trap has been set will --- 3924,3930 ---- to all jobs when an interactive login shell exits. .PP ! If \Bbash\fP is waiting for a command to complete and receives a signal ! for which a trap has been set, the trap will not be executed until ! the command completes. When \fBbash\fP is waiting for an asynchronous command via the \fBwait\fP builtin, the reception of a signal for which a trap has been set will *************** *** 3958,3968 **** .TP .B \eV ! the release of \fBbash\fP, version + patchelvel (e.g., 2.00.0) .TP .B \ew ! the current working directory .TP .B \eW ! the basename of the current working directory .TP .B \e! --- 4164,4175 ---- .TP .B \eV ! the release of \fBbash\fP, version + patch level (e.g., 2.00.0) .TP .B \ew ! the current working directory, with \fB$HOME\fP abbreviated with a tilde .TP .B \eW ! the basename of the current working directory, with \fB$HOME\fP ! abbreviated with a tilde .TP .B \e! *************** *** 4421,4424 **** --- 4628,4641 ---- matches to be listed immediately instead of ringing the bell. .TP + .B show\-all\-if\-unmodified (Off) + This alters the default behavior of the completion functions in + a fashion similar to \fBshow\-all\-if\-ambiguous\fP. + If set to + .BR on , + words which have more than one possible completion without any + possible partial completion (the possible completions don't share + a common prefix) cause the matches to be listed immediately instead + of ringing the bell. + .TP .B visible\-stats (Off) If set to \fBOn\fP, a character denoting a file's type as reported *************** *** 4796,4799 **** --- 5013,5021 ---- The killed text is saved on the kill-ring. .TP + .B unix\-filename\-rubout + Kill the word behind point, using white space and the slash character + as the word boundaries. + The killed text is saved on the kill-ring. + .TP .B delete\-horizontal\-space (M\-\e) Delete all spaces and tabs around point. *************** *** 5185,5195 **** compspec was defined, directory name completion is attempted. .PP By default, if a compspec is found, whatever it generates is returned to the completion code as the full set of possible completions. The default \fBbash\fP completions are not attempted, and the readline default of filename completion is disabled. ! If the \fB-o default\fP option was supplied to \fBcomplete\fP when the ! compspec was defined, readline's default completion will be performed if the compspec generates no matches. .PP When a compspec indicates that directory name completion is desired, --- 5407,5425 ---- compspec was defined, directory name completion is attempted. .PP + If the \fB\-o plusdirs\fP option was supplied to \fBcomplete\fP when the + compspec was defined, directory name completion is attempted and any + matches are added to the results of the other actions. + .PP By default, if a compspec is found, whatever it generates is returned to the completion code as the full set of possible completions. The default \fBbash\fP completions are not attempted, and the readline default of filename completion is disabled. ! If the \fB\-o bashdefault\fP option was supplied to \fBcomplete\fP when ! the compspec was defined, the \fBbash\fP default completions are attempted if the compspec generates no matches. + If the \fB\-o default\fP option was supplied to \fBcomplete\fP when the + compspec was defined, readline's default completion will be performed + if the compspec (and, if attempted, the default \fBbash\fP completions) + generate no matches. .PP When a compspec indicates that directory name completion is desired, *************** *** 5343,5346 **** --- 5573,5582 ---- the history expansion character. .PP + Several characters inhibit history expansion if found immediately + following the history expansion character, even if it is unquoted: + space, tab, newline, carriage return, and \fB=\fP. + If the \fBextglob\fP shell option is enabled, \fB(\fP will also + inhibit expansion. + .PP Several shell options settable with the .B shopt *************** *** 5394,5398 **** Start a history substitution, except when followed by a .BR blank , ! newline, = or (. .TP .B !\fIn\fR --- 5630,5636 ---- Start a history substitution, except when followed by a .BR blank , ! newline, carriage return, = ! or ( (when the \fBextglob\fP shell option is enabled using ! the \fBshopt\fP builtin). .TP .B !\fIn\fR *************** *** 5554,5557 **** --- 5792,5799 ---- in place of /, and the final delimiter is optional if it is the last character of the event line. + An \fBa\fP may be used as a synonym for \fBg\fP. + .TP + .B G + Apply the following `\fBs\fP' modifier once to each word in the event line. .PD .SH "SHELL BUILTIN COMMANDS" *************** *** 5797,5803 **** --- 6039,6063 ---- .SM .BR $OLDPWD . + If a non-empty directory name from \fBCDPATH\fP is used, or if + \fB\-\fP is the first argument, and the directory change is + successful, the absolute pathname of the new working directory is + written to the standard output. The return value is true if the directory was successfully changed; false otherwise. .TP + \fBcaller\fP [\fIexpr\fP] + Returns the context of any active subroutine call (a shell function or + a script executed with the \fB.\fP or \fBsource\fP builtins. + Without \fIexpr\fP, \fBcaller\fP displays the line number and source + filename of the current subroutine call. + If a non-negative integer is supplied as \fIexpr\fP, \fBcaller\fP + displays the line number, subroutine name, and source file corresponding + to that position in the current execution call stack. This extra + information may be used, for example, to print a stack trace. The + current frame is frame 0. + The return value is 0 unless the shell is not executing a subroutine + call or \fIexpr\fP does not correspond to a valid position in the + call stack. + .TP \fBcommand\fP [\fB\-pVv\fP] \fIcommand\fP [\fIarg\fP ...] Run *************** *** 5896,5899 **** --- 6156,6163 ---- .RS .TP 8 + .B bashdefault + Perform the rest of the default \fBbash\fP completions if the compspec + generates no matches. + .TP 8 .B default Use readline's default filename completion if the compspec generates *************** *** 6063,6070 **** is executed. .TP ! \fBdeclare\fP [\fB\-afFirtx\fP] [\fB\-p\fP] [\fIname\fP[=\fIvalue\fP]] .PD 0 .TP ! \fBtypeset\fP [\fB\-afFirtx\fP] [\fB\-p\fP] [\fIname\fP[=\fIvalue\fP]] .PD Declare variables and/or give them attributes. --- 6327,6334 ---- is executed. .TP ! \fBdeclare\fP [\fB\-afFirtx\fP] [\fB\-p\fP] [\fIname\fP[=\fIvalue\fP] ...] .PD 0 .TP ! \fBtypeset\fP [\fB\-afFirtx\fP] [\fB\-p\fP] [\fIname\fP[=\fIvalue\fP] ...] .PD Declare variables and/or give them attributes. *************** *** 6081,6085 **** option inhibits the display of function definitions; only the function name and attributes are printed. ! The .B \-F option implies --- 6345,6351 ---- option inhibits the display of function definitions; only the function name and attributes are printed. ! If the \fBextdebug\fP shell option is enabled using \fBshopt\fP, ! the source file name and line number where the function is defined ! are displayed as well. The .B \-F option implies *************** *** 6124,6128 **** \fIname\fP local, as with the .B local ! command. The return value is 0 unless an invalid option is encountered, an attempt is made to define a function using .if n ``\-f foo=bar'', --- 6390,6397 ---- \fIname\fP local, as with the .B local ! command. ! If a variable name is followed by =\fIvalue\fP, the value of ! the variable is set to \fIvalue\fP. ! The return value is 0 unless an invalid option is encountered, an attempt is made to define a function using .if n ``\-f foo=bar'', *************** *** 6398,6403 **** The .B \-n ! option causes the export property to be removed from the ! named variables. .B export returns an exit status of 0 unless an invalid option is --- 6667,6674 ---- The .B \-n ! option causes the export property to be removed from each ! \fIname\fP. ! If a variable name is followed by =\fIword\fP, the value of ! the variable is set to \fIword\fP. .B export returns an exit status of 0 unless an invalid option is *************** *** 6473,6477 **** of \fIpat\fP is replaced by \fIrep\fP. A useful alias to use with this is ! .if n ``r=fc -s'', .if t \f(CWr='fc \-s'\fP, so that typing --- 6744,6748 ---- of \fIpat\fP is replaced by \fIrep\fP. A useful alias to use with this is ! .if n ``r="fc -s"'', .if t \f(CWr='fc \-s'\fP, so that typing *************** *** 6689,6693 **** lists only the last .I n ! lines. If \fIfilename\fP is supplied, it is used as the name of the history file; if not, the value of .SM --- 6960,6970 ---- lists only the last .I n ! lines. ! If the shell variable \fBHISTTIMEFORMAT\fP is set and not null, ! it is used as a format string for \fIstrftime\fP(3) to display ! the time stamp associated with each displayed history entry. ! No intervening blank is printed between the formatted time stamp ! and the history line. ! If \fIfilename\fP is supplied, it is used as the name of the history file; if not, the value of .SM *************** *** 6736,6739 **** --- 7013,7018 ---- .PD .PP + If the \fBHISTTIMEFORMAT\fP is set, the time stamp information + associated with each history entry is written to the history file. The return value is 0 unless an invalid option is encountered, an error occurs while reading or writing the history file, an invalid *************** *** 6810,6825 **** .IR jobspec . .I sigspec ! is either a signal name such as .SM .B SIGKILL ! or a signal number; ! .I signum ! is a signal number. If ! .I sigspec ! is a signal name, the name may be ! given with or without the .SM .B SIG ! prefix. If .I sigspec --- 7089,7101 ---- .IR jobspec . .I sigspec ! is either a case-insensitive signal name such as .SM .B SIGKILL ! (with or without the .SM .B SIG ! prefix) or a signal number; ! .I signum ! is a signal number. If .I sigspec *************** *** 6940,6944 **** In addition to the standard \fIprintf\fP(1) formats, \fB%b\fP causes \fBprintf\fP to expand backslash escape sequences in the corresponding ! \fIargument\fP, and \fB%q\fP causes \fBprintf\fP to output the corresponding \fIargument\fP in a format that can be reused as shell input. .sp 1 --- 7216,7223 ---- In addition to the standard \fIprintf\fP(1) formats, \fB%b\fP causes \fBprintf\fP to expand backslash escape sequences in the corresponding ! \fIargument\fP (except that \fB\ec\fP terminates output, backslashes in ! \fB\e'\fP, \fB\e"\fP, and \fB\e?\fP are not removed, and octal escapes ! beginning with \fB\e0\fP may contain up to four digits), ! and \fB%q\fP causes \fBprintf\fP to output the corresponding \fIargument\fP in a format that can be reused as shell input. .sp 1 *************** *** 7102,7106 **** .RE .TP ! \fBreadonly\fP [\fB\-apf\fP] [\fIname\fP ...] .PD The given --- 7381,7385 ---- .RE .TP ! \fBreadonly\fP [\fB\-apf\fP] [\fIname\fP[=\fIword\fP] ...] .PD The given *************** *** 7125,7128 **** --- 7404,7409 ---- option causes output to be displayed in a format that may be reused as input. + If a variable name is followed by =\fIword\fP, the value of + the variable is set to \fIword\fP. The return status is 0 unless an invalid option is encountered, one of the *************** *** 7150,7153 **** --- 7431,7436 ---- function and not during execution of a script by \fB.\fP\^, the return status is false. + Any command associated with the \fBRETURN\fP trap is executed + before execution resumes after the function or script. .TP \fBset\fP [\fB\-\-abefhkmnptuvxBCHP\fP] [\fB\-o\fP \fIoption\fP] [\fIarg\fP ...] *************** *** 7167,7172 **** .TP 8 .B \-a ! Automatically mark variables and functions which are modified or created ! for export to the environment of subsequent commands. .TP 8 .B \-b --- 7450,7455 ---- .TP 8 .B \-a ! Automatically mark variables and functions which are modified or ! created for export to the environment of subsequent commands. .TP 8 .B \-b *************** *** 7179,7189 **** .SM .B SHELL GRAMMAR ! above) exits with a non-zero status. The shell does not exit if the ! command that fails is part of an ! .I until ! or ! .I while ! loop, ! part of an .I if statement, part of a --- 7462,7473 ---- .SM .B SHELL GRAMMAR ! above) exits with a non-zero status. ! The shell does not exit if the ! command that fails is part of the command list immediately following a ! .B while ! or ! .B until ! keyword, ! part of the test in an .I if statement, part of a *************** *** 7242,7245 **** --- 7526,7537 ---- option. .TP 8 + .B errtrace + Same as + .BR \-E . + .TP 8 + .B functrace + Same as + .BR \-T . + .TP 8 .B errexit Same as *************** *** 7307,7315 **** .BR \-P . .TP 8 .B posix Change the behavior of .B bash where the default operation differs ! from the POSIX 1003.2 standard to match the standard (\fIposix mode\fP). .TP 8 .B privileged --- 7599,7613 ---- .BR \-P . .TP 8 + .B pipefail + If set, the return value of a pipeline is the value of the last + (rightmost) command to exit with a non-zero status, or zero if all + commands in the pipeline exit successfully. + This option is disabled by default. + .TP 8 .B posix Change the behavior of .B bash where the default operation differs ! from the POSIX 1003.2 standard to match the standard (\fI`posix mode\fP). .TP 8 .B privileged *************** *** 7377,7384 **** .B \-x After expanding each \fIsimple command\fP, ! display the expanded value of .SM .BR PS4 , ! followed by the command and its expanded arguments. .TP 8 .B \-B --- 7675,7684 ---- .B \-x After expanding each \fIsimple command\fP, ! \fBfor\fP command, \fBcase\fP command, \fBselect\fP command, or ! arithmetic \fBfor\fP command, display the expanded value of .SM .BR PS4 , ! followed by the command and its expanded arguments ! or associated word list. .TP 8 .B \-B *************** *** 7401,7404 **** --- 7701,7709 ---- .BR > . .TP 8 + .B \-E + If set, any trap on \fBERR\fP is inherited by shell functions, command + substitutions, and commands executed in a subshell environment. + The \fBERR\fP trap is normally not inherited in such cases. + .TP 8 .B \-H Enable *************** *** 7417,7420 **** --- 7722,7730 ---- which change the current directory. .TP 8 + .B \-T + If set, any trap on \fBDEBUG\fP is inherited by shell functions, command + substitutions, and commands executed in a subshell environment. + The \fBDEBUG\fP trap is normally not inherited in such cases. + .TP 8 .B \-\- If no arguments follow this option, then the positional parameters are *************** *** 7577,7584 **** --- 7887,7937 ---- This option is enabled by default for interactive shells. .TP 8 + .B extdebug + If set, behavior intended for use by debuggers is enabled: + .RS + .TP + .B 1. + The \fB\-F\fP option to the \fBdeclare\fP builtin displays the source + file name and line number corresponding to each function name supplied + as an argument. + .TP + .B 2. + If the command run by the \fBDEBUG\fP trap returns a non-zero value, the + next command is skipped and not executed. + .TP + .B 3. + If the command run by the \fBDEBUG\fP trap returns a value of 2, and the + shell is executing in a subroutine (a shell function or a shell script + executed by the \fB.\fP or \fBsource\fP builtins), a call to + \fBreturn\fP is simulated. + .RE + .TP 8 .B extglob If set, the extended pattern matching features described above under \fBPathname Expansion\fP are enabled. .TP 8 + .B extquote + If set, \fB$\fP'\fIstring\fP' and \fB$\fP"\fIstring\fP" quoting is + performed within \fB${\fP\fIparameter\fP\fB}\fP expansions + enclosed in double quotes. This option is enabled by default. + .TP 8 + .B failglob + If set, patterns which fail to match filenames during pathname expansion + result in an expansion error. + .TP 8 + .B force_fignore + If set, the suffixes specified by the \fBFIGNORE\fP shell variable + cause words to be ignored when performing word completion even if + the ignored words are the only possible completions. + See + .SM + \fBSHELL VARIABLES\fP + above for a description of \fBFIGNORE\fP. + This option is enabled by default. + .TP 8 + .B gnu_errfmt + If set, shell error messages are written in the standard GNU error + message format. + .TP 8 .B histappend If set, the history list is appended to the file named by the value *************** *** 7676,7681 **** .TP 8 .B promptvars ! If set, prompt strings undergo variable and parameter expansion after ! being expanded as described in .SM .B PROMPTING --- 8029,8035 ---- .TP 8 .B promptvars ! If set, prompt strings undergo ! parameter expansion, command substitution, arithmetic ! expansion, and quote removal after being expanded as described in .SM .B PROMPTING *************** *** 7819,7823 **** for processes run from the shell. The return status is 0. .TP ! \fBtrap\fP [\fB\-lp\fP] [\fIarg\fP] [\fIsigspec\fP ...] The command .I arg --- 8173,8177 ---- for processes run from the shell. The return status is 0. .TP ! \fBtrap\fP [\fB\-lp\fP] [[\fIarg\fP] \fIsigspec\fP ...] The command .I arg *************** *** 7827,7834 **** If .I arg ! is absent or .BR \- , ! all specified signals are ! reset to their original values (the values they had upon entrance to the shell). If --- 8181,8188 ---- If .I arg ! is absent (and there is a single \fIsigspec\fP) or .BR \- , ! each specified signal is ! reset to its original disposition (the value it had upon entrance to the shell). If *************** *** 7848,7856 **** is given, .B trap ! prints the list of commands associated with each signal number. Each .I sigspec is either a signal name defined in <\fIsignal.h\fP>, or a signal number. If a .I sigspec --- 8202,8215 ---- is given, .B trap ! prints the list of commands associated with each signal. ! The ! .B \-l ! option causes the shell to print a list of signal names and ! their corresponding numbers. Each .I sigspec is either a signal name defined in <\fIsignal.h\fP>, or a signal number. + Signal names are case insensitive and the SIG prefix is optional. If a .I sigspec *************** *** 7868,7875 **** the command .I arg ! is executed after every \fIsimple command\fP (see .SM .B SHELL GRAMMAR above). If a .I sigspec --- 8227,8238 ---- the command .I arg ! is executed before every \fIsimple command\fP, \fIfor\fP command, ! \fIcase\fP command, \fIselect\fP command, every arithmetic \fIfor\fP ! command, and before the first command executes in a shell function (see .SM .B SHELL GRAMMAR above). + Refer to the description of the \fBextglob\fP option to the + \fBshopt\fP builtin for details of its effect on the \fBDEBUG\fP trap. If a .I sigspec *************** *** 7879,7892 **** the command .I arg ! is executed whenever a simple command has a non\-zero exit status. The .SM ! .BR ERR ! trap is not executed if the failed command is part of an ! .I until ! or ! .I while ! loop, ! part of an .I if statement, part of a --- 8242,8257 ---- the command .I arg ! is executed whenever a simple command has a non\-zero exit status, ! subject to the following conditions. The .SM ! .B ERR ! trap is not executed if the failed ! command is part of the command list immediately following a ! .B while ! or ! .B until ! keyword, ! part of the test in an .I if statement, part of a *************** *** 7897,7904 **** being inverted via .BR ! . ! The ! .B \-l ! option causes the shell to print a list of signal names and ! their corresponding numbers. Signals ignored upon entry to the shell cannot be trapped or reset. Trapped signals are reset to their original values in a child --- 8262,8275 ---- being inverted via .BR ! . ! These are the same conditions obeyed by the \fBerrexit\fP option. ! If a ! .I sigspec ! is ! .SM ! .BR RETURN , ! the command ! .I arg ! is executed each time a shell function or a script executed with the ! \fB.\fP or \fBsource\fP builtins finishes executing. Signals ignored upon entry to the shell cannot be trapped or reset. Trapped signals are reset to their original values in a child *************** *** 8143,8147 **** subsequently reset. The exit status is true unless a .I name ! does not exist or is readonly. .TP \fBwait\fP [\fIn\fP] --- 8514,8518 ---- subsequently reset. The exit status is true unless a .I name ! is readonly. .TP \fBwait\fP [\fIn\fP] *************** *** 8234,8241 **** These restrictions are enforced after any startup files are read. .PP ! When a command that is found to be a shell script is executed (see .SM .B "COMMAND EXECUTION" above), .B rbash turns off any restrictions in the shell spawned to execute the --- 8605,8615 ---- These restrictions are enforced after any startup files are read. .PP ! .ie \n(zY=1 When a command that is found to be a shell script is executed, ! .el \{ When a command that is found to be a shell script is executed ! (see .SM .B "COMMAND EXECUTION" above), + \} .B rbash turns off any restrictions in the shell spawned to execute the *************** *** 8288,8292 **** Chet Ramey, Case Western Reserve University .br ! chet@ins.CWRU.Edu .SH BUG REPORTS If you find a bug in --- 8662,8666 ---- Chet Ramey, Case Western Reserve University .br ! chet@po.CWRU.Edu .SH BUG REPORTS If you find a bug in *************** *** 8295,8300 **** make sure that it really is a bug, and that it appears in the latest version of ! .B bash ! that you have. .PP Once you have determined that a bug actually exists, use the --- 8669,8675 ---- make sure that it really is a bug, and that it appears in the latest version of ! .BR bash . ! The latest version is always available from ! \fIftp://ftp.gnu.org/pub/bash/\fP. .PP Once you have determined that a bug actually exists, use the *************** *** 8328,8332 **** Comments and bug reports concerning this manual page should be directed to ! .IR chet@ins.CWRU.Edu . .SH BUGS .PP --- 8703,8707 ---- Comments and bug reports concerning this manual page should be directed to ! .IR chet@po.CWRU.Edu . .SH BUGS .PP *************** *** 8356,8360 **** Commands inside of \fB$(\fP...\fB)\fP command substitution are not parsed until substitution is attempted. This will delay error ! reporting until some time after the command is entered. .PP Array variables may not (yet) be exported. --- 8731,8737 ---- Commands inside of \fB$(\fP...\fB)\fP command substitution are not parsed until substitution is attempted. This will delay error ! reporting until some time after the command is entered. For example, ! unmatched parentheses, even inside shell comments, will result in ! error messages while the construct is being read. .PP Array variables may not (yet) be exported. diff -aNrc2 bash-2.05b-patched/doc/bashref.info bash-3.0/doc/bashref.info *** bash-2.05b-patched/doc/bashref.info Mon Jul 15 15:21:27 2002 --- bash-3.0/doc/bashref.info Tue Jul 27 09:10:59 2004 *************** *** 1,33 **** ! This is bashref.info, produced by makeinfo version 4.1 from ! /usr/homes/chet/src/bash/src/doc/bashref.texi. ! INFO-DIR-SECTION Utilities START-INFO-DIR-ENTRY * Bash: (bash). The GNU Bourne-Again SHell. END-INFO-DIR-ENTRY - This text is a brief description of the features that are present in - the Bash shell. - - This is Edition 2.5b, last updated 15 July 2002, - of `The GNU Bash Reference Manual', - for `Bash', Version 2.05b. - - Copyright (C) 1991-2002 Free Software Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of - this manual provided the copyright notice and this permission notice - are preserved on all copies. - - Permission is granted to copy and distribute modified versions of this - manual under the conditions for verbatim copying, provided that the entire - resulting derived work is distributed under the terms of a permission - notice identical to this one. - - Permission is granted to copy and distribute translations of this manual - into another language, under the above conditions for modified versions, - except that this permission notice may be stated in a translation approved - by the Free Software Foundation. -  File: bashref.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir) --- 1,34 ---- ! This is bashref.info, produced by makeinfo version 4.7 from ! /Users/chet/src/bash/src/doc/bashref.texi. ! This text is a brief description of the features that are present in ! the Bash shell (version 3.0, 27 July 2004). ! ! This is Edition 3.0, last updated 27 July 2004, of `The GNU Bash ! Reference Manual', for `Bash', Version 3.0. ! ! Copyright (C) 1988-2004 Free Software Foundation, Inc. ! ! Permission is granted to make and distribute verbatim copies of this ! manual provided the copyright notice and this permission notice are ! preserved on all copies. ! ! Permission is granted to copy, distribute and/or modify this ! document under the terms of the GNU Free Documentation License, ! Version 1.1 or any later version published by the Free Software ! Foundation; with no Invariant Sections, with the Front-Cover texts ! being "A GNU Manual," and with the Back-Cover Texts as in (a) ! below. A copy of the license is included in the section entitled ! "GNU Free Documentation License." ! ! (a) The FSF's Back-Cover Text is: "You have freedom to copy and ! modify this GNU Manual, like GNU software. Copies published by ! the Free Software Foundation raise funds for GNU development." ! ! INFO-DIR-SECTION Basics START-INFO-DIR-ENTRY * Bash: (bash). The GNU Bourne-Again SHell. END-INFO-DIR-ENTRY  File: bashref.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir) *************** *** 36,46 **** ************* ! This text is a brief description of the features that are present in ! the Bash shell. ! ! This is Edition 2.5b, last updated 15 July 2002, of `The GNU Bash ! Reference Manual', for `Bash', Version 2.05b. ! Copyright (C) 1991-2002 Free Software Foundation, Inc. Bash contains features that appear in other popular shells, and some --- 37,45 ---- ************* ! This text is a brief description of the features that are present in ! the Bash shell (version 3.0, 27 July 2004).. ! This is Edition 3.0, last updated 27 July 2004, of `The GNU Bash ! Reference Manual', for `Bash', Version 3.0. Bash contains features that appear in other popular shells, and some *************** *** 87,90 **** --- 86,91 ---- versions of /bin/sh. + * Copying This Manual:: Copying this manual. + * Builtin Index:: Index of Bash builtin commands. *************** *** 102,107 **** File: bashref.info, Node: Introduction, Next: Definitions, Prev: Top, Up: Top ! Introduction ! ************ * Menu: --- 103,108 ---- File: bashref.info, Node: Introduction, Next: Definitions, Prev: Top, Up: Top ! 1 Introduction ! ************** * Menu: *************** *** 114,125 **** File: bashref.info, Node: What is Bash?, Next: What is a shell?, Up: Introduction ! What is Bash? ! ============= ! Bash is the shell, or command language interpreter, for the GNU operating system. The name is an acronym for the `Bourne-Again SHell', a pun on Stephen Bourne, the author of the direct ancestor of the ! current Unix shell `/bin/sh', which appeared in the Seventh Edition ! Bell Labs Research version of Unix. Bash is largely compatible with `sh' and incorporates useful --- 115,126 ---- File: bashref.info, Node: What is Bash?, Next: What is a shell?, Up: Introduction ! 1.1 What is Bash? ! ================= ! Bash is the shell, or command language interpreter, for the GNU operating system. The name is an acronym for the `Bourne-Again SHell', a pun on Stephen Bourne, the author of the direct ancestor of the ! current Unix shell `sh', which appeared in the Seventh Edition Bell ! Labs Research version of Unix. Bash is largely compatible with `sh' and incorporates useful *************** *** 133,151 **** Bash is quite portable. It currently runs on nearly every version of Unix and a few other operating systems - independently-supported ports ! exist for MS-DOS, OS/2, Windows 95/98, and Windows NT.  File: bashref.info, Node: What is a shell?, Prev: What is Bash?, Up: Introduction ! What is a shell? ! ================ ! At its base, a shell is simply a macro processor that executes ! commands. A Unix shell is both a command interpreter, which provides ! the user interface to the rich set of GNU utilities, and a programming ! language, allowing these utilitites to be combined. Files containing commands can be created, and become commands themselves. These new commands have the same status as system commands in directories such as ! `/bin', allowing users or groups to establish custom environments. A shell allows execution of GNU commands, both synchronously and --- 134,161 ---- Bash is quite portable. It currently runs on nearly every version of Unix and a few other operating systems - independently-supported ports ! exist for MS-DOS, OS/2, and Windows platforms.  File: bashref.info, Node: What is a shell?, Prev: What is Bash?, Up: Introduction ! 1.2 What is a shell? ! ==================== ! At its base, a shell is simply a macro processor that executes ! commands. The term macro processor means functionality where text and ! symbols are expanded to create larger expressions. ! ! A Unix shell is both a command interpreter and a programming ! language. As a command interpreter, the shell provides the user ! interface to the rich set of GNU utilities. The programming language ! features allow these utilitites to be combined. Files containing commands can be created, and become commands themselves. These new commands have the same status as system commands in directories such as ! `/bin', allowing users or groups to establish custom environments to ! automate their common tasks. ! ! Shells may be used interactively or non-interactively. In ! interactive mode, they accept input typed from the keyboard. When ! executing non-interactively, shells execute commands read from a file. A shell allows execution of GNU commands, both synchronously and *************** *** 155,161 **** commands. The "redirection" constructs permit fine-grained control of the input and output of those commands. Moreover, the shell allows ! control over the contents of commands' environments. Shells may be ! used interactively or non-interactively: they accept input typed from ! the keyboard or from a file. Shells also provide a small set of built-in commands ("builtins") --- 165,169 ---- commands. The "redirection" constructs permit fine-grained control of the input and output of those commands. Moreover, the shell allows ! control over the contents of commands' environments. Shells also provide a small set of built-in commands ("builtins") *************** *** 176,189 **** Shells offer features geared specifically for interactive use rather than to augment the programming language. These interactive features ! include job control, command line editing, history and aliases. Each ! of these features is described in this manual.  File: bashref.info, Node: Definitions, Next: Basic Shell Features, Prev: Introduction, Up: Top ! Definitions ! *********** ! These definitions are used throughout the remainder of this manual. `POSIX' --- 184,197 ---- Shells offer features geared specifically for interactive use rather than to augment the programming language. These interactive features ! include job control, command line editing, command history and aliases. ! Each of these features is described in this manual.  File: bashref.info, Node: Definitions, Next: Basic Shell Features, Prev: Introduction, Up: Top ! 2 Definitions ! ************* ! These definitions are used throughout the remainder of this manual. `POSIX' *************** *** 271,282 **** File: bashref.info, Node: Basic Shell Features, Next: Shell Builtin Commands, Prev: Definitions, Up: Top ! Basic Shell Features ! ******************** ! Bash is an acronym for `Bourne-Again SHell'. The Bourne shell is ! the traditional Unix shell originally written by Stephen Bourne. All ! of the Bourne shell builtin commands are available in Bash, and the ! rules for evaluation and quoting are taken from the POSIX 1003.2 ! specification for the `standard' Unix shell. This chapter briefly summarizes the shell's `building blocks': --- 279,290 ---- File: bashref.info, Node: Basic Shell Features, Next: Shell Builtin Commands, Prev: Definitions, Up: Top ! 3 Basic Shell Features ! ********************** ! Bash is an acronym for `Bourne-Again SHell'. The Bourne shell is the ! traditional Unix shell originally written by Stephen Bourne. All of ! the Bourne shell builtin commands are available in Bash, The rules for ! evaluation and quoting are taken from the POSIX specification for the ! `standard' Unix shell. This chapter briefly summarizes the shell's `building blocks': *************** *** 290,295 **** * Shell Commands:: The types of commands you can use. * Shell Functions:: Grouping commands by name. ! * Shell Parameters:: Special shell variables. ! * Shell Expansions:: How Bash expands variables and the various expansions available. * Redirections:: A way to control where input and output go. --- 298,303 ---- * Shell Commands:: The types of commands you can use. * Shell Functions:: Grouping commands by name. ! * Shell Parameters:: How the shell stores values. ! * Shell Expansions:: How Bash expands parameters and the various expansions available. * Redirections:: A way to control where input and output go. *************** *** 300,305 **** File: bashref.info, Node: Shell Syntax, Next: Shell Commands, Up: Basic Shell Features ! Shell Syntax ! ============ * Menu: --- 308,313 ---- File: bashref.info, Node: Shell Syntax, Next: Shell Commands, Up: Basic Shell Features ! 3.1 Shell Syntax ! ================ * Menu: *************** *** 328,335 **** File: bashref.info, Node: Shell Operation, Next: Quoting, Up: Shell Syntax ! Shell Operation ! --------------- ! The following is a brief description of the shell's operation when it reads and executes a command. Basically, the shell does the following: --- 336,343 ---- File: bashref.info, Node: Shell Operation, Next: Quoting, Up: Shell Syntax ! 3.1.1 Shell Operation ! --------------------- ! The following is a brief description of the shell's operation when it reads and executes a command. Basically, the shell does the following: *************** *** 363,368 **** File: bashref.info, Node: Quoting, Next: Comments, Prev: Shell Operation, Up: Shell Syntax ! Quoting ! ------- * Menu: --- 371,376 ---- File: bashref.info, Node: Quoting, Next: Comments, Prev: Shell Operation, Up: Shell Syntax ! 3.1.2 Quoting ! ------------- * Menu: *************** *** 388,403 **** HISTORY EXPANSION character, usually `!', must be quoted to prevent history expansion. *Note Bash History Facilities::, for more details ! concerning history expansion. There are three quoting mechanisms: the ! ESCAPE CHARACTER, single quotes, and double quotes.  File: bashref.info, Node: Escape Character, Next: Single Quotes, Up: Quoting ! Escape Character ! ................ ! A non-quoted backslash `\' is the Bash escape character. It ! preserves the literal value of the next character that follows, with ! the exception of `newline'. If a `\newline' pair appears, and the backslash itself is not quoted, the `\newline' is treated as a line continuation (that is, it is removed from the input stream and --- 396,413 ---- HISTORY EXPANSION character, usually `!', must be quoted to prevent history expansion. *Note Bash History Facilities::, for more details ! concerning history expansion. ! ! There are three quoting mechanisms: the ESCAPE CHARACTER, single ! quotes, and double quotes.  File: bashref.info, Node: Escape Character, Next: Single Quotes, Up: Quoting ! 3.1.2.1 Escape Character ! ........................ ! A non-quoted backslash `\' is the Bash escape character. It preserves ! the literal value of the next character that follows, with the ! exception of `newline'. If a `\newline' pair appears, and the backslash itself is not quoted, the `\newline' is treated as a line continuation (that is, it is removed from the input stream and *************** *** 407,415 **** File: bashref.info, Node: Single Quotes, Next: Double Quotes, Prev: Escape Character, Up: Quoting ! Single Quotes ! ............. ! Enclosing characters in single quotes (`'') preserves the literal ! value of each character within the quotes. A single quote may not occur between single quotes, even when preceded by a backslash. --- 417,425 ---- File: bashref.info, Node: Single Quotes, Next: Double Quotes, Prev: Escape Character, Up: Quoting ! 3.1.2.2 Single Quotes ! ..................... ! Enclosing characters in single quotes (`'') preserves the literal value ! of each character within the quotes. A single quote may not occur between single quotes, even when preceded by a backslash. *************** *** 417,426 **** File: bashref.info, Node: Double Quotes, Next: ANSI-C Quoting, Prev: Single Quotes, Up: Quoting ! Double Quotes ! ............. ! Enclosing characters in double quotes (`"') preserves the literal ! value of all characters within the quotes, with the exception of `$', ! ``', and `\'. The characters `$' and ``' retain their special meaning within double quotes (*note Shell Expansions::). The backslash retains its special meaning only when followed by one of the following --- 427,436 ---- File: bashref.info, Node: Double Quotes, Next: ANSI-C Quoting, Prev: Single Quotes, Up: Quoting ! 3.1.2.3 Double Quotes ! ..................... ! Enclosing characters in double quotes (`"') preserves the literal value ! of all characters within the quotes, with the exception of `$', ``', ! and `\'. The characters `$' and ``' retain their special meaning within double quotes (*note Shell Expansions::). The backslash retains its special meaning only when followed by one of the following *************** *** 429,433 **** Backslashes preceding characters without a special meaning are left unmodified. A double quote may be quoted within double quotes by ! preceding it with a backslash. The special parameters `*' and `@' have special meaning when in --- 439,444 ---- Backslashes preceding characters without a special meaning are left unmodified. A double quote may be quoted within double quotes by ! preceding it with a backslash. When command history is being used, the ! double quote may not be used to quote the history expansion character. The special parameters `*' and `@' have special meaning when in *************** *** 437,447 **** File: bashref.info, Node: ANSI-C Quoting, Next: Locale Translation, Prev: Double Quotes, Up: Quoting ! ANSI-C Quoting ! .............. ! Words of the form `$'STRING'' are treated specially. The word ! expands to STRING, with backslash-escaped characters replaced as ! specified by the ANSI C standard. Backslash escape sequences, if ! present, are decoded as follows: `\a' --- 448,458 ---- File: bashref.info, Node: ANSI-C Quoting, Next: Locale Translation, Prev: Double Quotes, Up: Quoting ! 3.1.2.4 ANSI-C Quoting ! ...................... ! Words of the form `$'STRING'' are treated specially. The word expands ! to STRING, with backslash-escaped characters replaced as specified by ! the ANSI C standard. Backslash escape sequences, if present, are ! decoded as follows: `\a' *************** *** 492,500 **** File: bashref.info, Node: Locale Translation, Prev: ANSI-C Quoting, Up: Quoting ! Locale-Specific Translation ! ........................... ! A double-quoted string preceded by a dollar sign (`$') will cause ! the string to be translated according to the current locale. If the current locale is `C' or `POSIX', the dollar sign is ignored. If the string is translated and replaced, the replacement is double-quoted. --- 503,511 ---- File: bashref.info, Node: Locale Translation, Prev: ANSI-C Quoting, Up: Quoting ! 3.1.2.5 Locale-Specific Translation ! ................................... ! A double-quoted string preceded by a dollar sign (`$') will cause the ! string to be translated according to the current locale. If the current locale is `C' or `POSIX', the dollar sign is ignored. If the string is translated and replaced, the replacement is double-quoted. *************** *** 511,518 **** File: bashref.info, Node: Comments, Prev: Quoting, Up: Shell Syntax ! Comments ! -------- ! In a non-interactive shell, or an interactive shell in which the `interactive_comments' option to the `shopt' builtin is enabled (*note Bash Builtins::), a word beginning with `#' causes that word and all --- 522,529 ---- File: bashref.info, Node: Comments, Prev: Quoting, Up: Shell Syntax ! 3.1.3 Comments ! -------------- ! In a non-interactive shell, or an interactive shell in which the `interactive_comments' option to the `shopt' builtin is enabled (*note Bash Builtins::), a word beginning with `#' causes that word and all *************** *** 526,533 **** File: bashref.info, Node: Shell Commands, Next: Shell Functions, Prev: Shell Syntax, Up: Basic Shell Features ! Shell Commands ! ============== ! A simple shell command such as `echo a b c' consists of the command itself followed by arguments, separated by spaces. --- 537,544 ---- File: bashref.info, Node: Shell Commands, Next: Shell Functions, Prev: Shell Syntax, Up: Basic Shell Features ! 3.2 Shell Commands ! ================== ! A simple shell command such as `echo a b c' consists of the command itself followed by arguments, separated by spaces. *************** *** 543,559 **** commands. * Lists:: How to execute commands sequentially. ! * Looping Constructs:: Shell commands for iterative action. ! * Conditional Constructs:: Shell commands for conditional execution. ! * Command Grouping:: Ways to group commands.  File: bashref.info, Node: Simple Commands, Next: Pipelines, Up: Shell Commands ! Simple Commands ! --------------- ! A simple command is the kind of command encountered most often. ! It's just a sequence of words separated by `blank's, terminated by one ! of the shell's control operators (*note Definitions::). The first word generally specifies a command to be executed, with the rest of the words being that command's arguments. --- 554,568 ---- commands. * Lists:: How to execute commands sequentially. ! * Compound Commands:: Shell commands for control flow.  File: bashref.info, Node: Simple Commands, Next: Pipelines, Up: Shell Commands ! 3.2.1 Simple Commands ! --------------------- ! A simple command is the kind of command encountered most often. It's ! just a sequence of words separated by `blank's, terminated by one of ! the shell's control operators (*note Definitions::). The first word generally specifies a command to be executed, with the rest of the words being that command's arguments. *************** *** 566,573 **** File: bashref.info, Node: Pipelines, Next: Lists, Prev: Simple Commands, Up: Shell Commands ! Pipelines ! --------- ! A `pipeline' is a sequence of simple commands separated by `|'. The format for a pipeline is --- 575,582 ---- File: bashref.info, Node: Pipelines, Next: Lists, Prev: Simple Commands, Up: Shell Commands ! 3.2.2 Pipelines ! --------------- ! A `pipeline' is a sequence of simple commands separated by `|'. The format for a pipeline is *************** *** 594,610 **** Each command in a pipeline is executed in its own subshell (*note Command Execution Environment::). The exit status of a pipeline is the ! exit status of the last command in the pipeline. If the reserved word ! `!' precedes the pipeline, the exit status is the logical negation of ! the exit status of the last command.  ! File: bashref.info, Node: Lists, Next: Looping Constructs, Prev: Pipelines, Up: Shell Commands ! Lists of Commands ! ----------------- ! A `list' is a sequence of one or more pipelines separated by one of ! the operators `;', `&', `&&', or `||', and optionally terminated by one ! of `;', `&', or a `newline'. Of these list operators, `&&' and `||' have equal precedence, --- 603,624 ---- Each command in a pipeline is executed in its own subshell (*note Command Execution Environment::). The exit status of a pipeline is the ! exit status of the last command in the pipeline, unless the `pipefail' ! option is enabled (*note The Set Builtin::). If `pipefail' is enabled, ! the pipeline's return status is the value of the last (rightmost) ! command to exit with a non-zero status, or zero if all commands exit ! successfully. If the reserved word `!' precedes the pipeline, the exit ! status is the logical negation of the exit status as described above. ! The shell waits for all commands in the pipeline to terminate before ! returning a value.  ! File: bashref.info, Node: Lists, Next: Compound Commands, Prev: Pipelines, Up: Shell Commands ! 3.2.3 Lists of Commands ! ----------------------- ! A `list' is a sequence of one or more pipelines separated by one of the ! operators `;', `&', `&&', or `||', and optionally terminated by one of ! `;', `&', or a `newline'. Of these list operators, `&&' and `||' have equal precedence, *************** *** 643,652 ****  ! File: bashref.info, Node: Looping Constructs, Next: Conditional Constructs, Prev: Lists, Up: Shell Commands ! Looping Constructs ! ------------------ ! Bash supports the following looping constructs. Note that wherever a `;' appears in the description of a command's --- 657,688 ----  ! File: bashref.info, Node: Compound Commands, Prev: Lists, Up: Shell Commands ! 3.2.4 Compound Commands ! ----------------------- ! ! * Menu: ! ! * Looping Constructs:: Shell commands for iterative action. ! * Conditional Constructs:: Shell commands for conditional execution. ! * Command Grouping:: Ways to group commands. ! Compound commands are the shell programming constructs. Each ! construct begins with a reserved word or control operator and is ! terminated by a corresponding reserved word or operator. Any ! redirections (*note Redirections::) associated with a compound command ! apply to all commands within that compound command unless explicitly ! overridden. ! ! Bash provides looping constructs, conditional commands, and ! mechanisms to group commands and execute them as a unit. ! !  ! File: bashref.info, Node: Looping Constructs, Next: Conditional Constructs, Up: Compound Commands ! ! 3.2.4.1 Looping Constructs ! .......................... ! ! Bash supports the following looping constructs. Note that wherever a `;' appears in the description of a command's *************** *** 696,707 **** expressions is invalid. The `break' and `continue' builtins (*note Bourne Shell Builtins::) may be used to control loop execution.  ! File: bashref.info, Node: Conditional Constructs, Next: Command Grouping, Prev: Looping Constructs, Up: Shell Commands ! Conditional Constructs ! ---------------------- `if' --- 732,744 ---- expressions is invalid. + The `break' and `continue' builtins (*note Bourne Shell Builtins::) may be used to control loop execution.  ! File: bashref.info, Node: Conditional Constructs, Next: Command Grouping, Prev: Looping Constructs, Up: Compound Commands ! 3.2.4.2 Conditional Constructs ! .............................. `if' *************** *** 801,805 **** return status is 1. This is exactly equivalent to let "EXPRESSION" - *Note Bash Builtins::, for a full description of the `let' builtin. --- 838,841 ---- *************** *** 814,818 **** parameter and variable expansion, arithmetic expansion, command substitution, process substitution, and quote removal are ! performed. When the `==' and `!=' operators are used, the string to the right --- 850,855 ---- parameter and variable expansion, arithmetic expansion, command substitution, process substitution, and quote removal are ! performed. Conditional operators such as `-f' must be unquoted to ! be recognized as primaries. When the `==' and `!=' operators are used, the string to the right *************** *** 823,826 **** --- 860,879 ---- quoted to force it to be matched as a string. + An additional binary operator, `=~', is available, with the same + precedence as `==' and `!='. When it is used, the string to the + right of the operator is considered an extended regular expression + and matched accordingly (as in regex3)). The return value is 0 if + the string matches the pattern, and 1 otherwise. If the regular + expression is syntactically incorrect, the conditional + expression's return value is 2. If the shell option `nocaseglob' + (see the description of `shopt' in *Note Bash Builtins::) is + enabled, the match is performed without regard to the case of + alphabetic characters. Substrings matched by parenthesized + subexpressions within the regular expression are saved in the + array variable `BASH_REMATCH'. The element of `BASH_REMATCH' with + index 0 is the portion of the string matching the entire regular + expression. The element of `BASH_REMATCH' with index N is the + portion of the string matching the Nth parenthesized subexpression. + Expressions may be combined using the following operators, listed in decreasing order of precedence: *************** *** 838,854 **** `EXPRESSION1 || EXPRESSION2' True if either EXPRESSION1 or EXPRESSION2 is true. - The `&&' and `||' operators do not evaluate EXPRESSION2 if the value of EXPRESSION1 is sufficient to determine the return value of the entire conditional expression.  ! File: bashref.info, Node: Command Grouping, Prev: Conditional Constructs, Up: Shell Commands ! Grouping Commands ! ----------------- ! Bash provides two ways to group a list of commands to be executed as ! a unit. When commands are grouped, redirections may be applied to the entire command list. For example, the output of all the commands in the list may be redirected to a single stream. --- 891,907 ---- `EXPRESSION1 || EXPRESSION2' True if either EXPRESSION1 or EXPRESSION2 is true. The `&&' and `||' operators do not evaluate EXPRESSION2 if the value of EXPRESSION1 is sufficient to determine the return value of the entire conditional expression. +  ! File: bashref.info, Node: Command Grouping, Prev: Conditional Constructs, Up: Compound Commands ! 3.2.4.3 Grouping Commands ! ......................... ! Bash provides two ways to group a list of commands to be executed as a ! unit. When commands are grouped, redirections may be applied to the entire command list. For example, the output of all the commands in the list may be redirected to a single stream. *************** *** 858,864 **** Placing a list of commands between parentheses causes a subshell ! to be created, and each of the commands in LIST to be executed in ! that subshell. Since the LIST is executed in a subshell, variable ! assignments do not remain in effect after the subshell completes. `{}' --- 911,918 ---- Placing a list of commands between parentheses causes a subshell ! environment to be created (*note Command Execution Environment::), ! and each of the commands in LIST to be executed in that subshell. ! Since the LIST is executed in a subshell, variable assignments do ! not remain in effect after the subshell completes. `{}' *************** *** 882,926 **** File: bashref.info, Node: Shell Functions, Next: Shell Parameters, Prev: Shell Commands, Up: Basic Shell Features ! Shell Functions ! =============== ! Shell functions are a way to group commands for later execution ! using a single name for the group. They are executed just like a ! "regular" command. When the name of a shell function is used as a ! simple command name, the list of commands associated with that function ! name is executed. Shell functions are executed in the current shell ! context; no new process is created to interpret them. ! Functions are declared using this syntax: ! [ `function' ] NAME () { COMMAND-LIST; } This defines a shell function named NAME. The reserved word `function' is optional. If the `function' reserved word is supplied, ! the parentheses are optional. The BODY of the function is the ! COMMAND-LIST between { and }. This list is executed whenever NAME is ! specified as the name of a command. The exit status of a function is ! the exit status of the last command executed in the body. ! ! Note that for historical reasons, the curly braces that surround the ! body of the function must be separated from the body by `blank's or ! newlines. This is because the braces are reserved words and are only ! recognized as such when they are separated by whitespace. Also, the ! COMMAND-LIST must be terminated with a semicolon or a newline. When a function is executed, the arguments to the function become the positional parameters during its execution (*note Positional Parameters::). The special parameter `#' that expands to the number of ! positional parameters is updated to reflect the change. Positional ! parameter `0' is unchanged. The `FUNCNAME' variable is set to the name ! of the function while the function is executing. If the builtin command `return' is executed in a function, the function completes and execution resumes with the next command after ! the function call. When a function completes, the values of the ! positional parameters and the special parameter `#' are restored to the ! values they had prior to the function's execution. If a numeric ! argument is given to `return', that is the function's return status; ! otherwise the function's return status is the exit status of the last ! command executed before the `return'. Variables local to the function may be declared with the `local' --- 936,997 ---- File: bashref.info, Node: Shell Functions, Next: Shell Parameters, Prev: Shell Commands, Up: Basic Shell Features ! 3.3 Shell Functions ! =================== ! Shell functions are a way to group commands for later execution using a ! single name for the group. They are executed just like a "regular" ! command. When the name of a shell function is used as a simple command ! name, the list of commands associated with that function name is ! executed. Shell functions are executed in the current shell context; ! no new process is created to interpret them. ! Functions are declared using this syntax: ! [ `function' ] NAME () COMPOUND-COMMAND [ REDIRECTIONS ] This defines a shell function named NAME. The reserved word `function' is optional. If the `function' reserved word is supplied, ! the parentheses are optional. The BODY of the function is the compound ! command COMPOUND-COMMAND (*note Compound Commands::). That command is ! usually a LIST enclosed between { and }, but may be any compound ! command listed above. COMPOUND-COMMAND is executed whenever NAME is ! specified as the name of a command. Any redirections (*note ! Redirections::) associated with the shell function are performed when ! the function is executed. ! ! The exit status of a function definition is zero unless a syntax ! error occurs or a readonly function with the same name already exists. ! When executed, the exit status of a function is the exit status of the ! last command executed in the body. ! ! Note that for historical reasons, in the most common usage the curly ! braces that surround the body of the function must be separated from ! the body by `blank's or newlines. This is because the braces are ! reserved words and are only recognized as such when they are separated ! by whitespace. Also, when using the braces, the LIST must be ! terminated by a semicolon, a `&', or a newline. When a function is executed, the arguments to the function become the positional parameters during its execution (*note Positional Parameters::). The special parameter `#' that expands to the number of ! positional parameters is updated to reflect the change. Special ! parameter `0' is unchanged. The first element of the `FUNCNAME' ! variable is set to the name of the function while the function is ! executing. All other aspects of the shell execution environment are ! identical between a function and its caller with the exception that the ! `DEBUG' trap below) is not inherited unless the function has been given ! the `trace' attribute using the `declare' builtin or the `-o functrace' ! option has been enabled with the `set' builtin, (in which case all ! functions inherit the `DEBUG' trap). *Note Bourne Shell Builtins::, ! for the description of the `trap' builtin. If the builtin command `return' is executed in a function, the function completes and execution resumes with the next command after ! the function call. Any command associated with the `RETURN' trap is ! executed before execution resumes. When a function completes, the ! values of the positional parameters and the special parameter `#' are ! restored to the values they had prior to the function's execution. If ! a numeric argument is given to `return', that is the function's return ! status; otherwise the function's return status is the exit status of ! the last command executed before the `return'. Variables local to the function may be declared with the `local' *************** *** 928,931 **** --- 999,1013 ---- commands it invokes. + Function names and definitions may be listed with the `-f' option to + the `declare' or `typeset' builtin commands (*note Bash Builtins::). + The `-F' option to `declare' or `typeset' will list the function names + only (and optionally the source file and line number, if the `extdebug' + shell option is enabled). Functions may be exported so that subshells + automatically have them defined with the `-f' option to the `export' + builtin (*note Bourne Shell Builtins::). Note that shell functions and + variables with the same name may result in multiple identically-named + entries in the environment passed to the shell's children. Care should + be taken in cases where this may cause a problem. + Functions may be recursive. No limit is placed on the number of recursive calls. *************** *** 934,951 **** File: bashref.info, Node: Shell Parameters, Next: Shell Expansions, Prev: Shell Functions, Up: Basic Shell Features ! Shell Parameters ! ================ * Menu: * Positional Parameters:: The shell's command-line arguments. ! * Special Parameters:: Parameters with special meanings. A PARAMETER is an entity that stores values. It can be a `name', a ! number, or one of the special characters listed below. For the shell's ! purposes, a VARIABLE is a parameter denoted by a `name'. A variable ! has a VALUE and zero or more ATTRIBUTES. Attributes are assigned using ! the `declare' builtin command (see the description of the `declare' ! builtin in *Note Bash Builtins::). A parameter is set if it has been assigned a value. The null string --- 1016,1032 ---- File: bashref.info, Node: Shell Parameters, Next: Shell Expansions, Prev: Shell Functions, Up: Basic Shell Features ! 3.4 Shell Parameters ! ==================== * Menu: * Positional Parameters:: The shell's command-line arguments. ! * Special Parameters:: Parameters denoted by special characters. A PARAMETER is an entity that stores values. It can be a `name', a ! number, or one of the special characters listed below. A VARIABLE is a ! parameter denoted by a `name'. A variable has a VALUE and zero or more ! ATTRIBUTES. Attributes are assigned using the `declare' builtin command ! (see the description of the `declare' builtin in *Note Bash Builtins::). A parameter is set if it has been assigned a value. The null string *************** *** 955,977 **** A variable may be assigned to by a statement of the form NAME=[VALUE] ! ! If VALUE is not given, the variable is assigned the null string. All VALUEs undergo tilde expansion, parameter and variable expansion, command substitution, arithmetic expansion, and quote removal (detailed below). If the variable has its `integer' attribute set, then VALUE is ! subject to arithmetic expansion even if the `$((...))' expansion is not ! used (*note Arithmetic Expansion::). Word splitting is not performed, ! with the exception of `"$@"' as explained below. Filename expansion is ! not performed. Assignment statements may also appear as arguments to ! the `declare', `typeset', `export', `readonly', and `local' builtin ! commands.  File: bashref.info, Node: Positional Parameters, Next: Special Parameters, Up: Shell Parameters ! Positional Parameters ! --------------------- ! A POSITIONAL PARAMETER is a parameter denoted by one or more digits, other than the single digit `0'. Positional parameters are assigned from the shell's arguments when it is invoked, and may be reassigned --- 1036,1057 ---- A variable may be assigned to by a statement of the form NAME=[VALUE] ! If VALUE is not given, the variable is assigned the null string. All VALUEs undergo tilde expansion, parameter and variable expansion, command substitution, arithmetic expansion, and quote removal (detailed below). If the variable has its `integer' attribute set, then VALUE is ! evaluated as an arithmetic expression even if the `$((...))' expansion ! is not used (*note Arithmetic Expansion::). Word splitting is not ! performed, with the exception of `"$@"' as explained below. Filename ! expansion is not performed. Assignment statements may also appear as ! arguments to the `alias', `declare', `typeset', `export', `readonly', ! and `local' builtin commands.  File: bashref.info, Node: Positional Parameters, Next: Special Parameters, Up: Shell Parameters ! 3.4.1 Positional Parameters ! --------------------------- ! A POSITIONAL PARAMETER is a parameter denoted by one or more digits, other than the single digit `0'. Positional parameters are assigned from the shell's arguments when it is invoked, and may be reassigned *************** *** 989,996 **** File: bashref.info, Node: Special Parameters, Prev: Positional Parameters, Up: Shell Parameters ! Special Parameters ! ------------------ ! The shell treats several parameters specially. These parameters may only be referenced; assignment to them is not allowed. --- 1069,1076 ---- File: bashref.info, Node: Special Parameters, Prev: Positional Parameters, Up: Shell Parameters ! 3.4.2 Special Parameters ! ------------------------ ! The shell treats several parameters specially. These parameters may only be referenced; assignment to them is not allowed. *************** *** 1053,1061 **** File: bashref.info, Node: Shell Expansions, Next: Redirections, Prev: Shell Parameters, Up: Basic Shell Features ! Shell Expansions ! ================ ! Expansion is performed on the command line after it has been split ! into `token's. There are seven kinds of expansion performed: * brace expansion --- 1133,1141 ---- File: bashref.info, Node: Shell Expansions, Next: Redirections, Prev: Shell Parameters, Up: Basic Shell Features ! 3.5 Shell Expansions ! ==================== ! Expansion is performed on the command line after it has been split into ! `token's. There are seven kinds of expansion performed: * brace expansion *************** *** 1108,1122 **** File: bashref.info, Node: Brace Expansion, Next: Tilde Expansion, Up: Shell Expansions ! Brace Expansion ! --------------- ! Brace expansion is a mechanism by which arbitrary strings may be generated. This mechanism is similar to FILENAME EXPANSION (*note Filename Expansion::), but the file names generated need not exist. Patterns to be brace expanded take the form of an optional PREAMBLE, ! followed by a series of comma-separated strings between a pair of ! braces, followed by an optional POSTSCRIPT. The preamble is prefixed ! to each string contained within the braces, and the postscript is then ! appended to each resulting string, expanding left to right. Brace expansions may be nested. The results of each expanded string --- 1188,1203 ---- File: bashref.info, Node: Brace Expansion, Next: Tilde Expansion, Up: Shell Expansions ! 3.5.1 Brace Expansion ! --------------------- ! Brace expansion is a mechanism by which arbitrary strings may be generated. This mechanism is similar to FILENAME EXPANSION (*note Filename Expansion::), but the file names generated need not exist. Patterns to be brace expanded take the form of an optional PREAMBLE, ! followed by either a series of comma-separated strings or a sequnce ! expression between a pair of braces, followed by an optional POSTSCRIPT. ! The preamble is prefixed to each string contained within the braces, and ! the postscript is then appended to each resulting string, expanding left ! to right. Brace expansions may be nested. The results of each expanded string *************** *** 1125,1128 **** --- 1206,1216 ---- ade ace abe + A sequence expression takes the form `{X..Y}', where X and Y are + either integers or single characters. When integers are supplied, the + expression expands to each number between X and Y, inclusive. When + characters are supplied, the expression expands to each character + lexicographically between X and Y, inclusive. Note that both X and Y + must be of the same type. + Brace expansion is performed before any other expansions, and any characters special to other expansions are preserved in the result. It *************** *** 1133,1138 **** A correctly-formed brace expansion must contain unquoted opening and ! closing braces, and at least one unquoted comma. Any incorrectly ! formed brace expansion is left unchanged. This construct is typically used as shorthand when the common prefix --- 1221,1231 ---- A correctly-formed brace expansion must contain unquoted opening and ! closing braces, and at least one unquoted comma or a valid sequence ! expression. Any incorrectly formed brace expansion is left unchanged. ! ! A { or `,' may be quoted with a backslash to prevent its being ! considered part of a brace expression. To avoid conflicts with ! parameter expansion, the string `${' is not considered eligible for ! brace expansion. This construct is typically used as shorthand when the common prefix *************** *** 1145,1152 **** File: bashref.info, Node: Tilde Expansion, Next: Shell Parameter Expansion, Prev: Brace Expansion, Up: Shell Expansions ! Tilde Expansion ! --------------- ! If a word begins with an unquoted tilde character (`~'), all of the characters up to the first unquoted slash (or all characters, if there is no unquoted slash) are considered a TILDE-PREFIX. If none of the --- 1238,1245 ---- File: bashref.info, Node: Tilde Expansion, Next: Shell Parameter Expansion, Prev: Brace Expansion, Up: Shell Expansions ! 3.5.2 Tilde Expansion ! --------------------- ! If a word begins with an unquoted tilde character (`~'), all of the characters up to the first unquoted slash (or all characters, if there is no unquoted slash) are considered a TILDE-PREFIX. If none of the *************** *** 1206,1220 **** The string that would be displayed by `dirs -N'  File: bashref.info, Node: Shell Parameter Expansion, Next: Command Substitution, Prev: Tilde Expansion, Up: Shell Expansions ! Shell Parameter Expansion ! ------------------------- ! The `$' character introduces parameter expansion, command ! substitution, or arithmetic expansion. The parameter name or symbol to ! be expanded may be enclosed in braces, which are optional but serve to ! protect the variable to be expanded from characters immediately ! following it which could be interpreted as part of the name. When braces are used, the matching ending brace is the first `}' not --- 1299,1314 ---- The string that would be displayed by `dirs -N' +  File: bashref.info, Node: Shell Parameter Expansion, Next: Command Substitution, Prev: Tilde Expansion, Up: Shell Expansions ! 3.5.3 Shell Parameter Expansion ! ------------------------------- ! The `$' character introduces parameter expansion, command substitution, ! or arithmetic expansion. The parameter name or symbol to be expanded ! may be enclosed in braces, which are optional but serve to protect the ! variable to be expanded from characters immediately following it which ! could be interpreted as part of the name. When braces are used, the matching ending brace is the first `}' not *************** *** 1234,1239 **** this variable is then expanded and that value is used in the rest of the substitution, rather than the value of PARAMETER itself. This is ! known as `indirect expansion'. The exception to this is the expansion ! of ${!PREFIX*} described below. In each of the cases below, WORD is subject to tilde expansion, --- 1328,1335 ---- this variable is then expanded and that value is used in the rest of the substitution, rather than the value of PARAMETER itself. This is ! known as `indirect expansion'. The exceptions to this are the ! expansions of ${!PREFIX*} and ${!NAME[@]} described below. The ! exclamation point must immediately follow the left brace in order to ! introduce indirection. In each of the cases below, WORD is subject to tilde expansion, *************** *** 1253,1258 **** If PARAMETER is unset or null, the expansion of WORD is assigned to PARAMETER. The value of PARAMETER is then substituted. ! Positional parameters and special parameters may not be assigned ! to in this way. `${PARAMETER:?WORD}' --- 1349,1354 ---- If PARAMETER is unset or null, the expansion of WORD is assigned to PARAMETER. The value of PARAMETER is then substituted. ! Positional parameters and special parameters may not be assigned to ! in this way. `${PARAMETER:?WORD}' *************** *** 1285,1291 **** --- 1381,1396 ---- `${!PREFIX*}' + `${!PREFIX@}' Expands to the names of variables whose names begin with PREFIX, separated by the first character of the `IFS' special variable. + `${!NAME[@]}' + `${!NAME[*]}' + If NAME is an array variable, expands to the list of array indices + (keys) assigned in NAME. If NAME is not an array, expands to 0 if + NAME is set and null otherwise. When `@' is used and the + expansion appears within double quotes, each key expands to a + separate word. + `${#PARAMETER}' The length in characters of the expanded value of PARAMETER is *************** *** 1341,1356 **** list.  File: bashref.info, Node: Command Substitution, Next: Arithmetic Expansion, Prev: Shell Parameter Expansion, Up: Shell Expansions ! Command Substitution ! -------------------- ! Command substitution allows the output of a command to replace the command itself. Command substitution occurs when a command is enclosed as follows: $(COMMAND) ! ! or `COMMAND` --- 1446,1461 ---- list. +  File: bashref.info, Node: Command Substitution, Next: Arithmetic Expansion, Prev: Shell Parameter Expansion, Up: Shell Expansions ! 3.5.4 Command Substitution ! -------------------------- ! Command substitution allows the output of a command to replace the command itself. Command substitution occurs when a command is enclosed as follows: $(COMMAND) ! or `COMMAND` *************** *** 1376,1385 **** File: bashref.info, Node: Arithmetic Expansion, Next: Process Substitution, Prev: Command Substitution, Up: Shell Expansions ! Arithmetic Expansion ! -------------------- ! Arithmetic expansion allows the evaluation of an arithmetic ! expression and the substitution of the result. The format for ! arithmetic expansion is: $(( EXPRESSION )) --- 1481,1490 ---- File: bashref.info, Node: Arithmetic Expansion, Next: Process Substitution, Prev: Command Substitution, Up: Shell Expansions ! 3.5.5 Arithmetic Expansion ! -------------------------- ! Arithmetic expansion allows the evaluation of an arithmetic expression ! and the substitution of the result. The format for arithmetic ! expansion is: $(( EXPRESSION )) *************** *** 1388,1393 **** double quote inside the parentheses is not treated specially. All tokens in the expression undergo parameter expansion, command ! substitution, and quote removal. Arithmetic substitutions may be ! nested. The evaluation is performed according to the rules listed below --- 1493,1497 ---- double quote inside the parentheses is not treated specially. All tokens in the expression undergo parameter expansion, command ! substitution, and quote removal. Arithmetic expansions may be nested. The evaluation is performed according to the rules listed below *************** *** 1399,1416 **** File: bashref.info, Node: Process Substitution, Next: Word Splitting, Prev: Arithmetic Expansion, Up: Shell Expansions ! Process Substitution ! -------------------- ! Process substitution is supported on systems that support named ! pipes (FIFOs) or the `/dev/fd' method of naming open files. It takes ! the form of <(LIST) ! ! or >(LIST) ! ! The process LIST is run with its input or output connected to a FIFO or ! some file in `/dev/fd'. The name of this file is passed as an argument ! to the current command as the result of the expansion. If the `>(LIST)' form is used, writing to the file will provide input for LIST. If the `<(LIST)' form is used, the file passed as an argument --- 1503,1518 ---- File: bashref.info, Node: Process Substitution, Next: Word Splitting, Prev: Arithmetic Expansion, Up: Shell Expansions ! 3.5.6 Process Substitution ! -------------------------- ! Process substitution is supported on systems that support named pipes ! (FIFOs) or the `/dev/fd' method of naming open files. It takes the ! form of <(LIST) ! or >(LIST) ! The process LIST is run with its input or output connected to a FIFO ! or some file in `/dev/fd'. The name of this file is passed as an ! argument to the current command as the result of the expansion. If the `>(LIST)' form is used, writing to the file will provide input for LIST. If the `<(LIST)' form is used, the file passed as an argument *************** *** 1426,1433 **** File: bashref.info, Node: Word Splitting, Next: Filename Expansion, Prev: Process Substitution, Up: Shell Expansions ! Word Splitting ! -------------- ! The shell scans the results of parameter expansion, command substitution, and arithmetic expansion that did not occur within double quotes for word splitting. --- 1528,1535 ---- File: bashref.info, Node: Word Splitting, Next: Filename Expansion, Prev: Process Substitution, Up: Shell Expansions ! 3.5.7 Word Splitting ! -------------------- ! The shell scans the results of parameter expansion, command substitution, and arithmetic expansion that did not occur within double quotes for word splitting. *************** *** 1456,1461 **** File: bashref.info, Node: Filename Expansion, Next: Quote Removal, Prev: Word Splitting, Up: Shell Expansions ! Filename Expansion ! ------------------ * Menu: --- 1558,1563 ---- File: bashref.info, Node: Filename Expansion, Next: Quote Removal, Prev: Word Splitting, Up: Shell Expansions ! 3.5.8 Filename Expansion ! ------------------------ * Menu: *************** *** 1470,1475 **** the shell option `nullglob' is disabled, the word is left unchanged. If the `nullglob' option is set, and no matches are found, the word is ! removed. If the shell option `nocaseglob' is enabled, the match is ! performed without regard to the case of alphabetic characters. When a pattern is used for filename generation, the character `.' at --- 1572,1579 ---- the shell option `nullglob' is disabled, the word is left unchanged. If the `nullglob' option is set, and no matches are found, the word is ! removed. If the `failglob' shell option is set, and no matches are ! found, an error message is printed and the command is not executed. If ! the shell option `nocaseglob' is enabled, the match is performed ! without regard to the case of alphabetic characters. When a pattern is used for filename generation, the character `.' at *************** *** 1480,1484 **** See the description of `shopt' in *Note Bash Builtins::, for a ! description of the `nocaseglob', `nullglob', and `dotglob' options. The `GLOBIGNORE' shell variable may be used to restrict the set of --- 1584,1589 ---- See the description of `shopt' in *Note Bash Builtins::, for a ! description of the `nocaseglob', `nullglob', `failglob', and `dotglob' ! options. The `GLOBIGNORE' shell variable may be used to restrict the set of *************** *** 1486,1506 **** filename that also matches one of the patterns in `GLOBIGNORE' is removed from the list of matches. The filenames `.' and `..' are ! always ignored, even when `GLOBIGNORE' is set. However, setting ! `GLOBIGNORE' has the effect of enabling the `dotglob' shell option, so ! all other filenames beginning with a `.' will match. To get the old ! behavior of ignoring filenames beginning with a `.', make `.*' one of ! the patterns in `GLOBIGNORE'. The `dotglob' option is disabled when ! `GLOBIGNORE' is unset.  File: bashref.info, Node: Pattern Matching, Up: Filename Expansion ! Pattern Matching ! ................ ! Any character that appears in a pattern, other than the special ! pattern characters described below, matches itself. The NUL character ! may not occur in a pattern. The special pattern characters must be ! quoted if they are to be matched literally. The special pattern characters have the following meanings: --- 1591,1612 ---- filename that also matches one of the patterns in `GLOBIGNORE' is removed from the list of matches. The filenames `.' and `..' are ! always ignored when `GLOBIGNORE' is set and not null. However, setting ! `GLOBIGNORE' to a non-null value has the effect of enabling the ! `dotglob' shell option, so all other filenames beginning with a `.' ! will match. To get the old behavior of ignoring filenames beginning ! with a `.', make `.*' one of the patterns in `GLOBIGNORE'. The ! `dotglob' option is disabled when `GLOBIGNORE' is unset.  File: bashref.info, Node: Pattern Matching, Up: Filename Expansion ! 3.5.8.1 Pattern Matching ! ........................ ! Any character that appears in a pattern, other than the special pattern ! characters described below, matches itself. The NUL character may not ! occur in a pattern. A backslash escapes the following character; the ! escaping backslash is discarded when matching. The special pattern ! characters must be quoted if they are to be matched literally. The special pattern characters have the following meanings: *************** *** 1538,1542 **** alnum alpha ascii blank cntrl digit graph lower print punct space upper word xdigit - A character class matches any character belonging to that class. The `word' character class matches letters, digits, and the --- 1644,1647 ---- *************** *** 1575,1582 **** File: bashref.info, Node: Quote Removal, Prev: Filename Expansion, Up: Shell Expansions ! Quote Removal ! ------------- ! After the preceding expansions, all unquoted occurrences of the characters `\', `'', and `"' that did not result from one of the above expansions are removed. --- 1680,1687 ---- File: bashref.info, Node: Quote Removal, Prev: Filename Expansion, Up: Shell Expansions ! 3.5.9 Quote Removal ! ------------------- ! After the preceding expansions, all unquoted occurrences of the characters `\', `'', and `"' that did not result from one of the above expansions are removed. *************** *** 1585,1592 **** File: bashref.info, Node: Redirections, Next: Executing Commands, Prev: Shell Expansions, Up: Basic Shell Features ! Redirections ! ============ ! Before a command is executed, its input and output may be REDIRECTED using a special notation interpreted by the shell. Redirection may also be used to open and close files for the current shell execution --- 1690,1697 ---- File: bashref.info, Node: Redirections, Next: Executing Commands, Prev: Shell Expansions, Up: Basic Shell Features ! 3.6 Redirections ! ================ ! Before a command is executed, its input and output may be REDIRECTED using a special notation interpreted by the shell. Redirection may also be used to open and close files for the current shell execution *************** *** 1610,1621 **** the command ls > DIRLIST 2>&1 ! ! directs both standard output (file descriptor 1) and standard error (file descriptor 2) to the file DIRLIST, while the command ls 2>&1 > DIRLIST ! ! directs only the standard output to file DIRLIST, because the standard ! error was duplicated as standard output before the standard output was ! redirected to DIRLIST. Bash handles several filenames specially when they are used in --- 1715,1724 ---- the command ls > DIRLIST 2>&1 ! directs both standard output (file descriptor 1) and standard error (file descriptor 2) to the file DIRLIST, while the command ls 2>&1 > DIRLIST ! directs only the standard output to file DIRLIST, because the ! standard error was duplicated as standard output before the standard ! output was redirected to DIRLIST. Bash handles several filenames specially when they are used in *************** *** 1644,1653 **** connection to the corresponding socket. A failure to open or create a file causes the redirection to fail. ! Redirecting Input ! ----------------- ! Redirection of input causes the file whose name results from the expansion of WORD to be opened for reading on file descriptor `n', or the standard input (file descriptor 0) if `n' is not specified. --- 1747,1757 ---- connection to the corresponding socket. + A failure to open or create a file causes the redirection to fail. ! 3.6.1 Redirecting Input ! ----------------------- ! Redirection of input causes the file whose name results from the expansion of WORD to be opened for reading on file descriptor `n', or the standard input (file descriptor 0) if `n' is not specified. *************** *** 1656,1663 **** [N]>WORD ! Redirecting Standard Output and Standard Error ! ---------------------------------------------- ! Bash allows both the standard output (file descriptor 1) and the standard error output (file descriptor 2) to be redirected to the file whose name is the expansion of WORD with this construct. --- 1790,1797 ---- [N]>>WORD ! 3.6.4 Redirecting Standard Output and Standard Error ! ---------------------------------------------------- ! Bash allows both the standard output (file descriptor 1) and the standard error output (file descriptor 2) to be redirected to the file whose name is the expansion of WORD with this construct. *************** *** 1696,1711 **** error: &>WORD ! ! and >&WORD ! ! Of the two forms, the first is preferred. This is semantically equivalent to >WORD 2>&1 ! Here Documents ! -------------- ! This type of redirection instructs the shell to read input from the current source until a line containing only WORD (with no trailing blanks) is seen. All of the lines read up to that point are then used --- 1800,1813 ---- error: &>WORD ! and >&WORD ! Of the two forms, the first is preferred. This is semantically equivalent to >WORD 2>&1 ! 3.6.5 Here Documents ! -------------------- ! This type of redirection instructs the shell to read input from the current source until a line containing only WORD (with no trailing blanks) is seen. All of the lines read up to that point are then used *************** *** 1731,1738 **** indented in a natural fashion. ! Here Strings ! ------------ ! A variant of here documents, the format is: <<< WORD --- 1833,1840 ---- indented in a natural fashion. ! 3.6.6 Here Strings ! ------------------ ! A variant of here documents, the format is: <<< WORD *************** *** 1740,1752 **** input. ! Duplicating File Descriptors ! ---------------------------- ! The redirection operator [N]<&WORD ! ! is used to duplicate input file descriptors. If WORD expands to one or ! more digits, the file descriptor denoted by N is made to be a copy of ! that file descriptor. If the digits in WORD do not specify a file descriptor open for input, a redirection error occurs. If WORD evaluates to `-', file descriptor N is closed. If N is not specified, --- 1842,1853 ---- input. ! 3.6.7 Duplicating File Descriptors ! ---------------------------------- ! The redirection operator [N]<&WORD ! is used to duplicate input file descriptors. If WORD expands to one ! or more digits, the file descriptor denoted by N is made to be a copy ! of that file descriptor. If the digits in WORD do not specify a file descriptor open for input, a redirection error occurs. If WORD evaluates to `-', file descriptor N is closed. If N is not specified, *************** *** 1755,1760 **** The operator [N]>&WORD ! ! is used similarly to duplicate output file descriptors. If N is not specified, the standard output (file descriptor 1) is used. If the digits in WORD do not specify a file descriptor open for output, a --- 1856,1860 ---- The operator [N]>&WORD ! is used similarly to duplicate output file descriptors. If N is not specified, the standard output (file descriptor 1) is used. If the digits in WORD do not specify a file descriptor open for output, a *************** *** 1763,1789 **** error are redirected as described previously. ! Moving File Descriptors ! ----------------------- ! The redirection operator [N]<&DIGIT- ! ! moves the file descriptor DIGIT to file descriptor N, or the standard ! input (file descriptor 0) if N is not specified. DIGIT is closed after ! being duplicated to N. Similarly, the redirection operator [N]>&DIGIT- ! moves the file descriptor DIGIT to file descriptor N, or the standard ! output (file descriptor 1) if N is not specified. ! ! Opening File Descriptors for Reading and Writing ! ------------------------------------------------ ! The redirection operator [N]<>WORD ! ! causes the file whose name is the expansion of WORD to be opened for both reading and writing on file descriptor N, or on file descriptor 0 if N is not specified. If the file does not exist, it is created. --- 1863,1886 ---- error are redirected as described previously. ! 3.6.8 Moving File Descriptors ! ----------------------------- ! The redirection operator [N]<&DIGIT- ! moves the file descriptor DIGIT to file descriptor N, or the ! standard input (file descriptor 0) if N is not specified. DIGIT is ! closed after being duplicated to N. Similarly, the redirection operator [N]>&DIGIT- + moves the file descriptor DIGIT to file descriptor N, or the + standard output (file descriptor 1) if N is not specified. ! 3.6.9 Opening File Descriptors for Reading and Writing ! ------------------------------------------------------ ! The redirection operator [N]<>WORD ! causes the file whose name is the expansion of WORD to be opened for both reading and writing on file descriptor N, or on file descriptor 0 if N is not specified. If the file does not exist, it is created. *************** *** 1792,1797 **** File: bashref.info, Node: Executing Commands, Next: Shell Scripts, Prev: Redirections, Up: Basic Shell Features ! Executing Commands ! ================== * Menu: --- 1889,1894 ---- File: bashref.info, Node: Executing Commands, Next: Shell Scripts, Prev: Redirections, Up: Basic Shell Features ! 3.7 Executing Commands ! ====================== * Menu: *************** *** 1817,1824 **** File: bashref.info, Node: Simple Command Expansion, Next: Command Search and Execution, Up: Executing Commands ! Simple Command Expansion ! ------------------------ ! When a simple command is executed, the shell performs the following expansions, assignments, and redirections, from left to right. --- 1914,1921 ---- File: bashref.info, Node: Simple Command Expansion, Next: Command Search and Execution, Up: Executing Commands ! 3.7.1 Simple Command Expansion ! ------------------------------ ! When a simple command is executed, the shell performs the following expansions, assignments, and redirections, from left to right. *************** *** 1860,1867 **** File: bashref.info, Node: Command Search and Execution, Next: Command Execution Environment, Prev: Simple Command Expansion, Up: Executing Commands ! Command Search and Execution ! ---------------------------- ! After a command has been split into words, if it results in a simple command and an optional list of arguments, the following actions are taken. --- 1957,1964 ---- File: bashref.info, Node: Command Search and Execution, Next: Command Execution Environment, Prev: Simple Command Expansion, Up: Executing Commands ! 3.7.2 Command Search and Execution ! ---------------------------------- ! After a command has been split into words, if it results in a simple command and an optional list of arguments, the following actions are taken. *************** *** 1903,1911 **** File: bashref.info, Node: Command Execution Environment, Next: Environment, Prev: Command Search and Execution, Up: Executing Commands ! Command Execution Environment ! ----------------------------- ! The shell has an EXECUTION ENVIRONMENT, which consists of the ! following: * open files inherited by the shell at invocation, as modified by --- 2000,2007 ---- File: bashref.info, Node: Command Execution Environment, Next: Environment, Prev: Command Search and Execution, Up: Executing Commands ! 3.7.3 Command Execution Environment ! ----------------------------------- ! The shell has an EXECUTION ENVIRONMENT, which consists of the following: * open files inherited by the shell at invocation, as modified by *************** *** 1949,1954 **** * the file creation mode mask ! * shell variables marked for export, along with variables exported ! for the command, passed in the environment (*note Environment::) * traps caught by the shell are reset to the values inherited from --- 2045,2051 ---- * the file creation mode mask ! * shell variables and functions marked for export, along with ! variables exported for the command, passed in the environment ! (*note Environment::) * traps caught by the shell are reset to the values inherited from *************** *** 1959,1969 **** shell's execution environment. ! Command substitution and asynchronous commands are invoked in a ! subshell environment that is a duplicate of the shell environment, ! except that traps caught by the shell are reset to the values that the ! shell inherited from its parent at invocation. Builtin commands that ! are invoked as part of a pipeline are also executed in a subshell ! environment. Changes made to the subshell environment cannot affect ! the shell's execution environment. If a command is followed by a `&' and job control is not active, the --- 2056,2066 ---- shell's execution environment. ! Command substitution, commands grouped with parentheses, and ! asynchronous commands are invoked in a subshell environment that is a ! duplicate of the shell environment, except that traps caught by the ! shell are reset to the values that the shell inherited from its parent ! at invocation. Builtin commands that are invoked as part of a pipeline ! are also executed in a subshell environment. Changes made to the ! subshell environment cannot affect the shell's execution environment. If a command is followed by a `&' and job control is not active, the *************** *** 1975,1982 **** File: bashref.info, Node: Environment, Next: Exit Status, Prev: Command Execution Environment, Up: Executing Commands ! Environment ! ----------- ! When a program is invoked it is given an array of strings called the ENVIRONMENT. This is a list of name-value pairs, of the form `name=value'. --- 2072,2079 ---- File: bashref.info, Node: Environment, Next: Exit Status, Prev: Command Execution Environment, Up: Executing Commands ! 3.7.4 Environment ! ----------------- ! When a program is invoked it is given an array of strings called the ENVIRONMENT. This is a list of name-value pairs, of the form `name=value'. *************** *** 2011,2019 **** File: bashref.info, Node: Exit Status, Next: Signals, Prev: Environment, Up: Executing Commands ! Exit Status ! ----------- ! For the shell's purposes, a command which exits with a zero exit ! status has succeeded. A non-zero exit status indicates failure. This seemingly counter-intuitive scheme is used so there is one well-defined way to indicate success and a variety of ways to indicate various --- 2108,2116 ---- File: bashref.info, Node: Exit Status, Next: Signals, Prev: Environment, Up: Executing Commands ! 3.7.5 Exit Status ! ----------------- ! For the shell's purposes, a command which exits with a zero exit status ! has succeeded. A non-zero exit status indicates failure. This seemingly counter-intuitive scheme is used so there is one well-defined way to indicate success and a variety of ways to indicate various *************** *** 2040,2047 **** File: bashref.info, Node: Signals, Prev: Exit Status, Up: Executing Commands ! Signals ! ------- ! When Bash is interactive, in the absence of any traps, it ignores `SIGTERM' (so that `kill 0' does not kill an interactive shell), and `SIGINT' is caught and handled (so that the `wait' builtin is --- 2137,2144 ---- File: bashref.info, Node: Signals, Prev: Exit Status, Up: Executing Commands ! 3.7.6 Signals ! ------------- ! When Bash is interactive, in the absence of any traps, it ignores `SIGTERM' (so that `kill 0' does not kill an interactive shell), and `SIGINT' is caught and handled (so that the `wait' builtin is *************** *** 2051,2060 **** and `SIGTSTP'. ! Commands started by Bash have signal handlers set to the values ! inherited by the shell from its parent. When job control is not in ! effect, asynchronous commands ignore `SIGINT' and `SIGQUIT' as well. ! Commands run as a result of command substitution ignore the ! keyboard-generated job control signals `SIGTTIN', `SIGTTOU', and ! `SIGTSTP'. The shell exits by default upon receipt of a `SIGHUP'. Before --- 2148,2157 ---- and `SIGTSTP'. ! Non-builtin commands started by Bash have signal handlers set to the ! values inherited by the shell from its parent. When job control is not ! in effect, asynchronous commands ignore `SIGINT' and `SIGQUIT' in ! addition to these inherited handlers. Commands run as a result of ! command substitution ignore the keyboard-generated job control signals ! `SIGTTIN', `SIGTTOU', and `SIGTSTP'. The shell exits by default upon receipt of a `SIGHUP'. Before *************** *** 2070,2089 **** login shell exits. ! When Bash receives a signal for which a trap has been set while ! waiting for a command to complete, the trap will not be executed until ! the command completes. When Bash is waiting for an asynchronous ! command via the `wait' builtin, the reception of a signal for which a ! trap has been set will cause the `wait' builtin to return immediately ! with an exit status greater than 128, immediately after which the trap ! is executed.  File: bashref.info, Node: Shell Scripts, Prev: Executing Commands, Up: Basic Shell Features ! Shell Scripts ! ============= ! A shell script is a text file containing shell commands. When such ! a file is used as the first non-option argument when invoking Bash, and neither the `-c' nor `-s' option is supplied (*note Invoking Bash::), Bash reads and executes commands from the file, then exits. This mode --- 2167,2186 ---- login shell exits. ! If Bash is waiting for a command to complete and receives a signal ! for which a trap has been set, the trap will not be executed until the ! command completes. When Bash is waiting for an asynchronous command ! via the `wait' builtin, the reception of a signal for which a trap has ! been set will cause the `wait' builtin to return immediately with an ! exit status greater than 128, immediately after which the trap is ! executed.  File: bashref.info, Node: Shell Scripts, Prev: Executing Commands, Up: Basic Shell Features ! 3.8 Shell Scripts ! ================= ! A shell script is a text file containing shell commands. When such a ! file is used as the first non-option argument when invoking Bash, and neither the `-c' nor `-s' option is supplied (*note Invoking Bash::), Bash reads and executes commands from the file, then exits. This mode *************** *** 2103,2108 **** it. In other words, executing filename ARGUMENTS ! ! is equivalent to executing bash filename ARGUMENTS --- 2200,2204 ---- it. In other words, executing filename ARGUMENTS ! is equivalent to executing bash filename ARGUMENTS *************** *** 2134,2139 **** File: bashref.info, Node: Shell Builtin Commands, Next: Shell Variables, Prev: Basic Shell Features, Up: Top ! Shell Builtin Commands ! ********************** * Menu: --- 2230,2235 ---- File: bashref.info, Node: Shell Builtin Commands, Next: Shell Variables, Prev: Basic Shell Features, Up: Top ! 4 Shell Builtin Commands ! ************************ * Menu: *************** *** 2167,2177 **** Many of the builtins have been extended by POSIX or Bash.  File: bashref.info, Node: Bourne Shell Builtins, Next: Bash Builtins, Up: Shell Builtin Commands ! Bourne Shell Builtins ! ===================== ! The following shell builtin commands are inherited from the Bourne Shell. These commands are implemented as specified by the POSIX 1003.2 standard. --- 2263,2276 ---- Many of the builtins have been extended by POSIX or Bash. + Unless otherwise noted, each builtin command documented as accepting + options preceded by `-' accepts `--' to signify the end of the options. +  File: bashref.info, Node: Bourne Shell Builtins, Next: Bash Builtins, Up: Shell Builtin Commands ! 4.1 Bourne Shell Builtins ! ========================= ! The following shell builtin commands are inherited from the Bourne Shell. These commands are implemented as specified by the POSIX 1003.2 standard. *************** *** 2207,2215 **** is not given, the value of the `HOME' shell variable is used. If the shell variable `CDPATH' exists, it is used as a search path. ! If DIRECTORY begins with a slash, `CDPATH' is not used. The `-P' ! option means to not follow symbolic links; symbolic links are ! followed by default or with the `-L' option. If DIRECTORY is `-', ! it is equivalent to `$OLDPWD'. The return status is zero if the ! directory is successfully changed, non-zero otherwise. `continue' --- 2306,2322 ---- is not given, the value of the `HOME' shell variable is used. If the shell variable `CDPATH' exists, it is used as a search path. ! If DIRECTORY begins with a slash, `CDPATH' is not used. ! ! The `-P' option means to not follow symbolic links; symbolic links ! are followed by default or with the `-L' option. If DIRECTORY is ! `-', it is equivalent to `$OLDPWD'. ! ! If a non-empty directory name from `CDPATH' is used, or if `-' is ! the first argument, and the directory change is successful, the ! absolute pathname of the new working directory is written to the ! standard output. ! ! The return status is zero if the directory is successfully changed, ! non-zero otherwise. `continue' *************** *** 2254,2261 **** are supplied, or if the `-p' option is given, a list of exported names is displayed. The `-p' option displays output in a form ! that may be reused as input. The return status is zero unless an ! invalid option is supplied, one of the names is not a valid shell ! variable name, or `-f' is supplied with a name that is not a shell ! function. `getopts' --- 2361,2370 ---- are supplied, or if the `-p' option is given, a list of exported names is displayed. The `-p' option displays output in a form ! that may be reused as input. If a variable name is followed by ! =VALUE, the value of the variable is set to VALUE. ! ! The return status is zero unless an invalid option is supplied, ! one of the names is not a valid shell variable name, or `-f' is ! supplied with a name that is not a shell function. `getopts' *************** *** 2329,2333 **** `readonly' ! readonly [-apf] [NAME] ... Mark each NAME as readonly. The values of these names may not be changed by subsequent assignment. If the `-f' option is supplied, --- 2438,2442 ---- `readonly' ! readonly [-apf] [NAME[=VALUE]] ... Mark each NAME as readonly. The values of these names may not be changed by subsequent assignment. If the `-f' option is supplied, *************** *** 2336,2343 **** or if the `-p' option is supplied, a list of all readonly names is printed. The `-p' option causes output to be displayed in a ! format that may be reused as input. The return status is zero ! unless an invalid option is supplied, one of the NAME arguments is ! not a valid shell variable or function name, or the `-f' option is ! supplied with a name that is not a shell function. `return' --- 2445,2454 ---- or if the `-p' option is supplied, a list of all readonly names is printed. The `-p' option causes output to be displayed in a ! format that may be reused as input. If a variable name is ! followed by =VALUE, the value of the variable is set to VALUE. ! The return status is zero unless an invalid option is supplied, ! one of the NAME arguments is not a valid shell variable or ! function name, or the `-f' option is supplied with a name that is ! not a shell function. `return' *************** *** 2349,2355 **** `source') builtin, returning either N or the exit status of the last command executed within the script as the exit status of the ! script. The return status is non-zero if `return' is used outside ! a function and not during the execution of a script by `.' or ! `source'. `shift' --- 2460,2467 ---- `source') builtin, returning either N or the exit status of the last command executed within the script as the exit status of the ! script. Any command associated with the `RETURN' trap is executed ! before execution resumes after the function or script. The return ! status is non-zero if `return' is used outside a function and not ! during the execution of a script by `.' or `source'. `shift' *************** *** 2437,2459 **** trap [-lp] [ARG] [SIGSPEC ...] The commands in ARG are to be read and executed when the shell ! receives signal SIGSPEC. If ARG is absent or equal to `-', all ! specified signals are reset to the values they had when the shell ! was started. If ARG is the null string, then the signal specified ! by each SIGSPEC is ignored by the shell and commands it invokes. ! If ARG is not present and `-p' has been supplied, the shell ! displays the trap commands associated with each SIGSPEC. If no ! arguments are supplied, or only `-p' is given, `trap' prints the ! list of commands associated with each signal number in a form that ! may be reused as shell input. Each SIGSPEC is either a signal ! name such as `SIGINT' (with or without the `SIG' prefix) or a ! signal number. If a SIGSPEC is `0' or `EXIT', ARG is executed ! when the shell exits. If a SIGSPEC is `DEBUG', the command ARG is ! executed after every simple command. If a SIGSPEC is `ERR', the ! command ARG is executed whenever a simple command has a non-zero ! exit status. The `ERR' trap is not executed if the failed command ! is part of an `until' or `while' loop, part of an `if' statement, ! part of a `&&' or `||' list, or if the command's return status is ! being inverted using `!'. The `-l' option causes the shell to ! print a list of signal names and their corresponding numbers. Signals ignored upon entry to the shell cannot be trapped or reset. --- 2549,2582 ---- trap [-lp] [ARG] [SIGSPEC ...] The commands in ARG are to be read and executed when the shell ! receives signal SIGSPEC. If ARG is absent (and there is a single ! SIGSPEC) or equal to `-', each specified signal's disposition is ! reset to the value it had when the shell was started. If ARG is ! the null string, then the signal specified by each SIGSPEC is ! ignored by the shell and commands it invokes. If ARG is not ! present and `-p' has been supplied, the shell displays the trap ! commands associated with each SIGSPEC. If no arguments are ! supplied, or only `-p' is given, `trap' prints the list of commands ! associated with each signal number in a form that may be reused as ! shell input. The `-l' option causes the shell to print a list of ! signal names and their corresponding numbers. Each SIGSPEC is ! either a signal name or a signal number. Signal names are case ! insensitive and the `SIG' prefix is optional. If a SIGSPEC is `0' ! or `EXIT', ARG is executed when the shell exits. If a SIGSPEC is ! `DEBUG', the command ARG is executed before every simple command, ! `for' command, `case' command, `select' command, every arithmetic ! `for' command, and before the first command executes in a shell ! function. Refer to the description of the `extglob' option to the ! `shopt' builtin (*note Bash Builtins::) for details of its effect ! on the `DEBUG' trap. If a SIGSPEC is `ERR', the command ARG is ! executed whenever a simple command has a non-zero exit status, ! subject to the following conditions. The `ERR' trap is not ! executed if the failed command is part of the command list ! immediately following an `until' or `while' keyword, part of the ! test in an `if' statement, part of a `&&' or `||' list, or if the ! command's return status is being inverted using `!'. These are ! the same conditions obeyed by the `errexit' option. If a SIGSPEC ! is `RETURN', the command ARG is executed each time a shell ! function or a script executed with the `.' or `source' builtins ! finishes executing. Signals ignored upon entry to the shell cannot be trapped or reset. *************** *** 2488,2500 **** functions, and the function definition is removed. Readonly variables and functions may not be unset. The return status is ! zero unless a NAME does not exist or is readonly.  File: bashref.info, Node: Bash Builtins, Next: The Set Builtin, Prev: Bourne Shell Builtins, Up: Shell Builtin Commands ! Bash Builtin Commands ! ===================== ! This section describes builtin commands which are unique to or have been extended in Bash. Some of these commands are specified in the POSIX 1003.2 standard. --- 2611,2623 ---- functions, and the function definition is removed. Readonly variables and functions may not be unset. The return status is ! zero unless a NAME is readonly.  File: bashref.info, Node: Bash Builtins, Next: The Set Builtin, Prev: Bourne Shell Builtins, Up: Shell Builtin Commands ! 4.2 Bash Builtin Commands ! ========================= ! This section describes builtin commands which are unique to or have been extended in Bash. Some of these commands are specified in the POSIX 1003.2 standard. *************** *** 2577,2580 **** --- 2700,2704 ---- Cause SHELL-COMMAND to be executed whenever KEYSEQ is entered. + The return status is zero unless an invalid option is supplied or an error occurs. *************** *** 2588,2591 **** --- 2712,2732 ---- SHELL-BUILTIN is not a shell builtin command. + `caller' + caller [EXPR] + Returns the context of any active subroutine call (a shell + function or a script executed with the `.' or `source' builtins). + + Without EXPR, `caller' displays the line number and source + filename of the current subroutine call. If a non-negative + integer is supplied as EXPR, `caller' displays the line number, + subroutine name, and source file corresponding to that position in + the current execution call stack. This extra information may be + used, for example, to print a stack trace. The current frame is + frame 0. + + The return value is 0 unless the shell is not executing a + subroutine call or EXPR does not correspond to a valid position in + the call stack. + `command' command [-pVv] COMMAND [ARGUMENTS ...] *************** *** 2608,2612 **** `declare' ! declare [-afFirtx] [-p] [NAME[=VALUE]] Declare variables and give them attributes. If no NAMEs are --- 2749,2753 ---- `declare' ! declare [-afFirtx] [-p] [NAME[=VALUE] ...] Declare variables and give them attributes. If no NAMEs are *************** *** 2616,2622 **** NAME. When `-p' is used, additional options are ignored. The `-F' option inhibits the display of function definitions; only the ! function name and attributes are printed. `-F' implies `-f'. The ! following options can be used to restrict output to variables with ! the specified attributes or to give variables attributes: `-a' --- 2757,2766 ---- NAME. When `-p' is used, additional options are ignored. The `-F' option inhibits the display of function definitions; only the ! function name and attributes are printed. If the `extdebug' shell ! option is enabled using `shopt' (*note Bash Builtins::), the ! source file name and line number where the function is defined are ! displayed as well. `-F' implies `-f'. The following options can ! be used to restrict output to variables with the specified ! attributes or to give variables attributes: `-a' *************** *** 2646,2650 **** Using `+' instead of `-' turns off the attribute instead. When used in a function, `declare' makes each NAME local, as with the ! `local' command. The return status is zero unless an invalid option is encountered, --- 2790,2795 ---- Using `+' instead of `-' turns off the attribute instead. When used in a function, `declare' makes each NAME local, as with the ! `local' command. If a variable name is followed by =VALUE, the ! value of the variable is set to VALUE. The return status is zero unless an invalid option is encountered, *************** *** 2756,2760 **** `local' ! local [OPTION] NAME[=VALUE] For each argument, a local variable named NAME is created, and assigned VALUE. The OPTION can be any of the options accepted by --- 2901,2905 ---- `local' ! local [OPTION] NAME[=VALUE] ... For each argument, a local variable named NAME is created, and assigned VALUE. The OPTION can be any of the options accepted by *************** *** 2779,2785 **** successive ARGUMENT. In addition to the standard `printf(1)' formats, `%b' causes `printf' to expand backslash escape sequences ! in the corresponding ARGUMENT, and `%q' causes `printf' to output ! the corresponding ARGUMENT in a format that can be reused as shell ! input. The FORMAT is reused as necessary to consume all of the ARGUMENTS. --- 2924,2932 ---- successive ARGUMENT. In addition to the standard `printf(1)' formats, `%b' causes `printf' to expand backslash escape sequences ! in the corresponding ARGUMENT, (except that `\c' terminates ! output, backslashes in `\'', `\"', and `\?' are not removed, and ! octal escapes beginning with `\0' may contain up to four digits), ! and `%q' causes `printf' to output the corresponding ARGUMENT in a ! format that can be reused as shell input. The FORMAT is reused as necessary to consume all of the ARGUMENTS. *************** *** 2849,2852 **** --- 2996,3000 ---- Read input from file descriptor FD. + `shopt' shopt [-pqsu] [-o] [OPTNAME ...] *************** *** 2928,2935 **** --- 3076,3120 ---- interactive shells. + `extdebug' + If set, behavior intended for use by debuggers is enabled: + + 1. The `-F' option to the `declare' builtin (*note Bash + Builtins::) displays the source file name and line + number corresponding to each function name supplied as + an argument. + + 2. If the command run by the `DEBUG' trap returns a + non-zero value, the next command is skipped and not + executed. + + 3. If the command run by the `DEBUG' trap returns a value + of 2, and the shell is executing in a subroutine (a + shell function or a shell script executed by the `.' or + `source' builtins), a call to `return' is simulated. + `extglob' If set, the extended pattern matching features described above (*note Pattern Matching::) are enabled. + `extquote' + If set, `$'STRING'' and `$"STRING"' quoting is performed + within `${PARAMETER}' expansions enclosed in double quotes. + This option is enabled by default. + + `failglob' + If set, patterns which fail to match filenames during + pathname expansion result in an expansion error. + + `force_fignore' + If set, the suffixes specified by the `FIGNORE' shell variable + cause words to be ignored when performing word completion + even if the ignored words are the only possible completions. + *Note Bash Variables::, for a description of `FIGNORE'. This + option is enabled by default. + + `gnu_errfmt' + If set, shell error messages are written in the standard GNU + error message format. + `histappend' If set, the history list is appended to the file named by the *************** *** 2995,3000 **** `promptvars' ! If set, prompt strings undergo variable and parameter ! expansion after being expanded (*note Printing a Prompt::). This option is enabled by default. --- 3180,3186 ---- `promptvars' ! If set, prompt strings undergo parameter expansion, command ! substitution, arithmetic expansion, and quote removal after ! being expanded as described below (*note Printing a Prompt::). This option is enabled by default. *************** *** 3020,3023 **** --- 3206,3210 ---- by default. + The return status when listing options is zero if all OPTNAMES are enabled, non-zero otherwise. When setting or unsetting options, *************** *** 3061,3065 **** `typeset' ! typeset [-afFrxi] [-p] [NAME[=VALUE]] The `typeset' command is supplied for compatibility with the Korn shell; however, it has been deprecated in favor of the `declare' --- 3248,3252 ---- `typeset' ! typeset [-afFrxi] [-p] [NAME[=VALUE] ...] The `typeset' command is supplied for compatibility with the Korn shell; however, it has been deprecated in favor of the `declare' *************** *** 3113,3116 **** --- 3300,3304 ---- The maximum amount of virtual memory available to the process. + If LIMIT is given, it is the new value of the specified resource; the special LIMIT values `hard', `soft', and `unlimited' stand for *************** *** 3133,3143 **** all aliases are removed. Aliases are described in *Note Aliases::.  File: bashref.info, Node: The Set Builtin, Next: Special Builtins, Prev: Bash Builtins, Up: Shell Builtin Commands ! The Set Builtin ! =============== ! This builtin is so complicated that it deserves its own section. `set' --- 3321,3332 ---- all aliases are removed. Aliases are described in *Note Aliases::. +  File: bashref.info, Node: The Set Builtin, Next: Special Builtins, Prev: Bash Builtins, Up: Shell Builtin Commands ! 4.3 The Set Builtin ! =================== ! This builtin is so complicated that it deserves its own section. `set' *************** *** 3163,3170 **** Exit immediately if a simple command (*note Simple Commands::) exits with a non-zero status, unless the command ! that fails is part of an `until' or `while' loop, part of an ! `if' statement, part of a `&&' or `||' list, or if the ! command's return status is being inverted using `!'. A trap ! on `ERR', if set, is executed before the shell exits. `-f' --- 3352,3360 ---- Exit immediately if a simple command (*note Simple Commands::) exits with a non-zero status, unless the command ! that fails is part of the command list immediately following ! a `while' or `until' keyword, part of the test in an `if' ! statement, part of a `&&' or `||' list, or if the command's ! return status is being inverted using `!'. A trap on `ERR', ! if set, is executed before the shell exits. `-f' *************** *** 3204,3207 **** --- 3394,3403 ---- Same as `-e'. + `errtrace' + Same as `-E'. + + `functrace' + Same as `-T'. + `hashall' Same as `-h'. *************** *** 3248,3251 **** --- 3444,3453 ---- Same as `-P'. + `pipefail' + If set, the return value of a pipeline is the value of + the last (rightmost) command to exit with a non-zero + status, or zero if all commands in the pipeline exit + successfully. This option is disabled by default. + `posix' Change the behavior of Bash where the default operation *************** *** 3291,3296 **** `-x' ! Print a trace of simple commands and their arguments after ! they are expanded and before they are executed. `-B' --- 3493,3503 ---- `-x' ! Print a trace of simple commands, \fBfor\fP commands, ! \fBcase\fP commands, \fBselect\fP commands, and arithmetic ! \fBfor\fP commands and their arguments or associated word ! lists after they are expanded and before they are executed. ! The value of the `PS4' variable is expanded and the resultant ! value is printed before the command and its expanded ! arguments. `-B' *************** *** 3302,3305 **** --- 3509,3518 ---- overwriting existing files. + `-E' + If set, any trap on `ERR' is inherited by shell functions, + command substitutions, and commands executed in a subshell + environment. The `ERR' trap is normally not inherited in + such cases. + `-H' Enable `!' style history substitution (*note History *************** *** 3327,3330 **** --- 3540,3549 ---- /usr/local + `-T' + If set, any trap on `DEBUG' is inherited by shell functions, + command substitutions, and commands executed in a subshell + environment. The `DEBUG' trap is normally not inherited in + such cases. + `--' If no arguments follow this option, then the positional *************** *** 3353,3360 **** File: bashref.info, Node: Special Builtins, Prev: The Set Builtin, Up: Shell Builtin Commands ! Special Builtins ! ================ ! For historical reasons, the POSIX 1003.2 standard has classified several builtin commands as _special_. When Bash is executing in POSIX mode, the special builtins differ from other builtin commands in three --- 3572,3579 ---- File: bashref.info, Node: Special Builtins, Prev: The Set Builtin, Up: Shell Builtin Commands ! 4.4 Special Builtins ! ==================== ! For historical reasons, the POSIX 1003.2 standard has classified several builtin commands as _special_. When Bash is executing in POSIX mode, the special builtins differ from other builtin commands in three *************** *** 3381,3386 **** File: bashref.info, Node: Shell Variables, Next: Bash Features, Prev: Shell Builtin Commands, Up: Top ! Shell Variables ! *************** * Menu: --- 3600,3605 ---- File: bashref.info, Node: Shell Variables, Next: Bash Features, Prev: Shell Builtin Commands, Up: Top ! 5 Shell Variables ! ***************** * Menu: *************** *** 3396,3404 **** File: bashref.info, Node: Bourne Shell Variables, Next: Bash Variables, Up: Shell Variables ! Bourne Shell Variables ! ====================== ! Bash uses certain shell variables in the same way as the Bourne ! shell. In some cases, Bash assigns a default value to the variable. `CDPATH' --- 3615,3623 ---- File: bashref.info, Node: Bourne Shell Variables, Next: Bash Variables, Up: Shell Variables ! 5.1 Bourne Shell Variables ! ========================== ! Bash uses certain shell variables in the same way as the Bourne shell. ! In some cases, Bash assigns a default value to the variable. `CDPATH' *************** *** 3437,3441 **** `PATH' A colon-separated list of directories in which the shell looks for ! commands. `PS1' --- 3656,3662 ---- `PATH' A colon-separated list of directories in which the shell looks for ! commands. A zero-length (null) directory name in the value of ! `PATH' indicates the current directory. A null directory name may ! appear as two adjacent colons, or as an initial or trailing colon. `PS1' *************** *** 3447,3457 **** The secondary prompt string. The default value is `> '.  File: bashref.info, Node: Bash Variables, Prev: Bourne Shell Variables, Up: Shell Variables ! Bash Variables ! ============== ! These variables are set or used by Bash, but other shells do not normally treat them specially. --- 3668,3679 ---- The secondary prompt string. The default value is `> '. +  File: bashref.info, Node: Bash Variables, Prev: Bourne Shell Variables, Up: Shell Variables ! 5.2 Bash Variables ! ================== ! These variables are set or used by Bash, but other shells do not normally treat them specially. *************** *** 3463,3466 **** --- 3685,3708 ---- The full pathname used to execute the current instance of Bash. + `BASH_ARGC' + An array variable whose values are the number of parameters in each + frame of the current bash execution call stack. The number of + parameters to the current subroutine (shell function or script + executed with `.' or `source') is at the top of the stack. When a + subroutine is executed, the number of parameters passed is pushed + onto `BASH_ARGC'. + + `BASH_ARGV' + An array variable containing all of the parameters in the current + bash execution call stack. The final parameter of the last + subroutine call is at the top of the stack; the first parameter of + the initial call is at the bottom. When a subroutine is executed, + the parameters supplied are pushed onto `BASH_ARGV'. + + `BASH_COMMAND' + The command currently being executed or about to be executed, + unless the shell is executing a command as the result of a trap, + in which case it is the command executing at the time of the trap. + `BASH_ENV' If this variable is set when Bash is invoked to execute a shell *************** *** 3469,3474 **** Files::. ! `BASH_VERSION' ! The version number of the current instance of Bash. `BASH_VERSINFO' --- 3711,3740 ---- Files::. ! `BASH_EXECUTION_STRING' ! The command argument to the `-c' invocation option. ! ! `BASH_LINENO' ! An array variable whose members are the line numbers in source ! files corresponding to each member of FUNCNAME. ! `${BASH_LINENO[$i]}' is the line number in the source file where ! `${FUNCNAME[$i + 1]}' was called. The corresponding source file ! name is `${BASH_SOURCE[$i + 1]}'. Use `LINENO' to obtain the ! current line number. ! ! `BASH_REMATCH' ! An array variable whose members are assigned by the `=~' binary ! operator to the `[[' conditional command (*note Conditional ! Constructs::). The element with index 0 is the portion of the ! string matching the entire regular expression. The element with ! index N is the portion of the string matching the Nth ! parenthesized subexpression. This variable is read-only. ! ! `BASH_SOURCE' ! An array variable whose members are the source filenames ! corresponding to the elements in the `FUNCNAME' array variable. ! ! `BASH_SUBSHELL' ! Incremented by one each time a subshell or subshell environment is ! spawned. The initial value is 0. `BASH_VERSINFO' *************** *** 3495,3498 **** --- 3761,3768 ---- The value of `MACHTYPE'. + + `BASH_VERSION' + The version number of the current instance of Bash. + `COLUMNS' Used by the `select' builtin command to determine the terminal *************** *** 3519,3522 **** --- 3789,3798 ---- completion facilities (*note Programmable Completion::). + `COMP_WORDBREAKS' + The set of characters that the Readline library treats as word + separators when performing word completion. If `COMP_WORDBREAKS' + is unset, it loses its special properties, even if it is + subsequently reset. + `COMP_WORDS' An array variable consisting of the individual words in the *************** *** 3540,3543 **** --- 3816,3824 ---- special properties, even if it is subsequently reset. + `EMACS' + If Bash finds this variable in the environment when the shell + starts with value `t', it assumes that the shell is running in an + emacs shell buffer and disables line editing. + `EUID' The numeric effective user id of the current user. This variable *************** *** 3555,3563 **** `FUNCNAME' ! The name of any currently-executing shell function. This variable ! exists only when a shell function is executing. Assignments to ! `FUNCNAME' have no effect and return an error status. If ! `FUNCNAME' is unset, it loses its special properties, even if it ! is subsequently reset. `GLOBIGNORE' --- 3836,3846 ---- `FUNCNAME' ! An array variable containing the names of all shell functions ! currently in the execution call stack. The element with index 0 ! is the name of any currently-executing shell function. The ! bottom-most element is "main". This variable exists only when a ! shell function is executing. Assignments to `FUNCNAME' have no ! effect and return an error status. If `FUNCNAME' is unset, it ! loses its special properties, even if it is subsequently reset. `GLOBIGNORE' *************** *** 3594,3605 **** `HISTCONTROL' ! A value of `ignorespace' means to not enter lines which begin with ! a space or tab into the history list. A value of `ignoredups' ! means to not enter lines which match the last entered line. A ! value of `ignoreboth' combines the two options. Unset, or set to ! any other value than those above, means to save all lines on the ! history list. The second and subsequent lines of a multi-line ! compound command are not tested, and are added to the history ! regardless of the value of `HISTCONTROL'. `HISTFILE' --- 3877,3894 ---- `HISTCONTROL' ! A colon-separated list of values controlling how commands are ! saved on the history list. If the list of values includes ! `ignorespace', lines which begin with a space character are not ! saved in the history list. A value of `ignoredups' causes lines ! which match the previous history entry to not be saved. A value ! of `ignoreboth' is shorthand for `ignorespace' and `ignoredups'. ! A value of `erasedups' causes all previous lines matching the ! current line to be removed from the history list before that line ! is saved. Any value not in the above list is ignored. If ! `HISTCONTROL' is unset, or does not include a valid value, all ! lines read by the shell parser are saved on the history list, ! subject to the value of `HISTIGNORE'. The second and subsequent ! lines of a multi-line compound command are not tested, and are ! added to the history regardless of the value of `HISTCONTROL'. `HISTFILE' *************** *** 3637,3640 **** --- 3926,3936 ---- The default value is 500. + `HISTTIMEFORMAT' + If this variable is set and not null, its value is used as a + format string for STRFTIME to print the time stamp associated with + each history entry displayed by the `history' builtin. If this + variable is set, time stamps are written to the history file so + they may be preserved across shell sessions. + `HOSTFILE' Contains the name of a file in the same format as `/etc/hosts' that *************** *** 3739,3743 **** POSIX mode, as if the command `set -o posix' - had been executed. --- 4035,4038 ---- *************** *** 3778,3781 **** --- 4073,4081 ---- plus the number of seconds since the assignment. + `SHELL' + The full pathname to the shell is kept in this environment + variable. If it is not set when the shell starts, Bash assigns to + it the full pathname of the current user's login shell. + `SHELLOPTS' A colon-separated list of enabled shell options. Each word in the *************** *** 3846,3856 **** readonly.  File: bashref.info, Node: Bash Features, Next: Job Control, Prev: Shell Variables, Up: Top ! Bash Features ! ************* ! This section describes features unique to Bash. * Menu: --- 4146,4157 ---- readonly. +  File: bashref.info, Node: Bash Features, Next: Job Control, Prev: Shell Variables, Up: Top ! 6 Bash Features ! *************** ! This section describes features unique to Bash. * Menu: *************** *** 3874,3879 **** File: bashref.info, Node: Invoking Bash, Next: Bash Startup Files, Up: Bash Features ! Invoking Bash ! ============= bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o OPTION] [-O SHOPT_OPTION] [ARGUMENT ...] --- 4175,4180 ---- File: bashref.info, Node: Invoking Bash, Next: Bash Startup Files, Up: Bash Features ! 6.1 Invoking Bash ! ================= bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o OPTION] [-O SHOPT_OPTION] [ARGUMENT ...] *************** *** 3886,3889 **** --- 4187,4197 ---- the single-character options to be recognized. + `--debugger' + Arrange for the debugger profile to be executed before the shell + starts. Turns on extended debugging mode (see *Note Bash + Builtins:: for a description of the `extdebug' option to the + `shopt' builtin) and shell function tracing (see *Note The Set + Builtin:: for a description of the `-o functrace' option). + `--dump-po-strings' A list of all double-quoted strings preceded by `$' is printed on *************** *** 3936,3939 **** --- 4244,4248 ---- output and exit successfully. + There are several single-character options that may be supplied at invocation which are not available with the `set' builtin. *************** *** 3987,3990 **** --- 4296,4300 ---- and arguments. + A _login_ shell is one whose first character of argument zero is `-', or one invoked with the `--login' option. *************** *** 4008,4018 **** File: bashref.info, Node: Bash Startup Files, Next: Interactive Shells, Prev: Invoking Bash, Up: Bash Features ! Bash Startup Files ! ================== ! This section describs how Bash executes its startup files. If any ! of the files exist but cannot be read, Bash reports an error. Tildes ! are expanded in file names as described above under Tilde Expansion ! (*note Tilde Expansion::). Interactive shells are described in *Note Interactive Shells::. --- 4318,4328 ---- File: bashref.info, Node: Bash Startup Files, Next: Interactive Shells, Prev: Invoking Bash, Up: Bash Features ! 6.2 Bash Startup Files ! ====================== ! This section describs how Bash executes its startup files. If any of ! the files exist but cannot be read, Bash reports an error. Tildes are ! expanded in file names as described above under Tilde Expansion (*note ! Tilde Expansion::). Interactive shells are described in *Note Interactive Shells::. *************** *** 4021,4025 **** ........................................................ ! When Bash is invoked as an interactive login shell, or as a non-interactive shell with the `--login' option, it first reads and executes commands from the file `/etc/profile', if that file exists. --- 4331,4335 ---- ........................................................ ! When Bash is invoked as an interactive login shell, or as a non-interactive shell with the `--login' option, it first reads and executes commands from the file `/etc/profile', if that file exists. *************** *** 4036,4040 **** ......................................... ! When an interactive shell that is not a login shell is started, Bash reads and executes commands from `~/.bashrc', if that file exists. This may be inhibited by using the `--norc' option. The `--rcfile --- 4346,4350 ---- ......................................... ! When an interactive shell that is not a login shell is started, Bash reads and executes commands from `~/.bashrc', if that file exists. This may be inhibited by using the `--norc' option. The `--rcfile *************** *** 4044,4054 **** So, typically, your `~/.bash_profile' contains the line `if [ -f ~/.bashrc ]; then . ~/.bashrc; fi' ! ! after (or before) any login-specific initializations. Invoked non-interactively ......................... ! When Bash is started non-interactively, to run a shell script, for example, it looks for the variable `BASH_ENV' in the environment, expands its value if it appears there, and uses the expanded value as --- 4354,4363 ---- So, typically, your `~/.bash_profile' contains the line `if [ -f ~/.bashrc ]; then . ~/.bashrc; fi' ! after (or before) any login-specific initializations. Invoked non-interactively ......................... ! When Bash is started non-interactively, to run a shell script, for example, it looks for the variable `BASH_ENV' in the environment, expands its value if it appears there, and uses the expanded value as *************** *** 4056,4062 **** following command were executed: `if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi' ! ! but the value of the `PATH' variable is not used to search for the file ! name. As noted above, if a non-interactive shell is invoked with the --- 4365,4370 ---- following command were executed: `if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi' ! but the value of the `PATH' variable is not used to search for the ! file name. As noted above, if a non-interactive shell is invoked with the *************** *** 4067,4071 **** ...................... ! If Bash is invoked with the name `sh', it tries to mimic the startup behavior of historical versions of `sh' as closely as possible, while conforming to the POSIX standard as well. --- 4375,4379 ---- ...................... ! If Bash is invoked with the name `sh', it tries to mimic the startup behavior of historical versions of `sh' as closely as possible, while conforming to the POSIX standard as well. *************** *** 4089,4102 **** ..................... ! When Bash is started in POSIX mode, as with the `--posix' command ! line option, it follows the POSIX standard for startup files. In this ! mode, interactive shells expand the `ENV' variable and commands are ! read and executed from the file whose name is the expanded value. No ! other startup files are read. Invoked by remote shell daemon .............................. ! Bash attempts to determine when it is being run by the remote shell daemon, usually `rshd'. If Bash determines it is being run by rshd, it reads and executes commands from `~/.bashrc', if that file exists and --- 4397,4410 ---- ..................... ! When Bash is started in POSIX mode, as with the `--posix' command line ! option, it follows the POSIX standard for startup files. In this mode, ! interactive shells expand the `ENV' variable and commands are read and ! executed from the file whose name is the expanded value. No other ! startup files are read. Invoked by remote shell daemon .............................. ! Bash attempts to determine when it is being run by the remote shell daemon, usually `rshd'. If Bash determines it is being run by rshd, it reads and executes commands from `~/.bashrc', if that file exists and *************** *** 4110,4126 **** ................................................ ! If Bash is started with the effective user (group) id not equal to ! the real user (group) id, and the `-p' option is not supplied, no ! startup files are read, shell functions are not inherited from the ! environment, the `SHELLOPTS' variable, if it appears in the ! environment, is ignored, and the effective user id is set to the real ! user id. If the `-p' option is supplied at invocation, the startup ! behavior is the same, but the effective user id is not reset.  File: bashref.info, Node: Interactive Shells, Next: Bash Conditional Expressions, Prev: Bash Startup Files, Up: Bash Features ! Interactive Shells ! ================== * Menu: --- 4418,4434 ---- ................................................ ! If Bash is started with the effective user (group) id not equal to the ! real user (group) id, and the `-p' option is not supplied, no startup ! files are read, shell functions are not inherited from the environment, ! the `SHELLOPTS' variable, if it appears in the environment, is ignored, ! and the effective user id is set to the real user id. If the `-p' ! option is supplied at invocation, the startup behavior is the same, but ! the effective user id is not reset.  File: bashref.info, Node: Interactive Shells, Next: Bash Conditional Expressions, Prev: Bash Startup Files, Up: Bash Features ! 6.3 Interactive Shells ! ====================== * Menu: *************** *** 4133,4143 **** File: bashref.info, Node: What is an Interactive Shell?, Next: Is this Shell Interactive?, Up: Interactive Shells ! What is an Interactive Shell? ! ----------------------------- ! An interactive shell is one started without non-option arguments, unless `-s' is specified, without specifiying the `-c' option, and ! whose input and output are both connected to terminals (as determined ! by `isatty(3)'), or one started with the `-i' option. An interactive shell generally reads from and writes to a user's --- 4441,4451 ---- File: bashref.info, Node: What is an Interactive Shell?, Next: Is this Shell Interactive?, Up: Interactive Shells ! 6.3.1 What is an Interactive Shell? ! ----------------------------------- ! An interactive shell is one started without non-option arguments, unless `-s' is specified, without specifiying the `-c' option, and ! whose input and error output are both connected to terminals (as ! determined by `isatty(3)'), or one started with the `-i' option. An interactive shell generally reads from and writes to a user's *************** *** 4150,4157 **** File: bashref.info, Node: Is this Shell Interactive?, Next: Interactive Shell Behavior, Prev: What is an Interactive Shell?, Up: Interactive Shells ! Is this Shell Interactive? ! -------------------------- ! To determine within a startup script whether or not Bash is running interactively, test the value of the `-' special parameter. It contains `i' when the shell is interactive. For example: --- 4458,4465 ---- File: bashref.info, Node: Is this Shell Interactive?, Next: Interactive Shell Behavior, Prev: What is an Interactive Shell?, Up: Interactive Shells ! 6.3.2 Is this Shell Interactive? ! -------------------------------- ! To determine within a startup script whether or not Bash is running interactively, test the value of the `-' special parameter. It contains `i' when the shell is interactive. For example: *************** *** 4174,4181 **** File: bashref.info, Node: Interactive Shell Behavior, Prev: Is this Shell Interactive?, Up: Interactive Shells ! Interactive Shell Behavior ! -------------------------- ! When the shell is running interactively, it changes its behavior in several ways. --- 4482,4489 ---- File: bashref.info, Node: Interactive Shell Behavior, Prev: Is this Shell Interactive?, Up: Interactive Shells ! 6.3.3 Interactive Shell Behavior ! -------------------------------- ! When the shell is running interactively, it changes its behavior in several ways. *************** *** 4256,4264 **** File: bashref.info, Node: Bash Conditional Expressions, Next: Shell Arithmetic, Prev: Interactive Shells, Up: Bash Features ! Bash Conditional Expressions ! ============================ ! Conditional expressions are used by the `[[' compound command and ! the `test' and `[' builtin commands. Expressions may be unary or binary. Unary expressions are often --- 4564,4572 ---- File: bashref.info, Node: Bash Conditional Expressions, Next: Shell Arithmetic, Prev: Interactive Shells, Up: Bash Features ! 6.4 Bash Conditional Expressions ! ================================ ! Conditional expressions are used by the `[[' compound command and the ! `test' and `[' builtin commands. Expressions may be unary or binary. Unary expressions are often *************** *** 4378,4396 **** positive or negative integers.  File: bashref.info, Node: Shell Arithmetic, Next: Aliases, Prev: Bash Conditional Expressions, Up: Bash Features ! Shell Arithmetic ! ================ ! The shell allows arithmetic expressions to be evaluated, as one of ! the shell expansions or by the `let' builtin. Evaluation is done in fixed-width integers with no check for overflow, though division by 0 is trapped and flagged as an error. The ! operators and their precedence and associativity are the same as in the ! C language. The following list of operators is grouped into levels of ! equal-precedence operators. The levels are listed in order of ! decreasing precedence. `ID++ ID--' --- 4686,4706 ---- positive or negative integers. +  File: bashref.info, Node: Shell Arithmetic, Next: Aliases, Prev: Bash Conditional Expressions, Up: Bash Features ! 6.5 Shell Arithmetic ! ==================== ! The shell allows arithmetic expressions to be evaluated, as one of the ! shell expansions or by the `let' and the `-i' option to the `declare' ! builtins. Evaluation is done in fixed-width integers with no check for overflow, though division by 0 is trapped and flagged as an error. The ! operators and their precedence, associativity, and values are the same ! as in the C language. The following list of operators is grouped into ! levels of equal-precedence operators. The levels are listed in order ! of decreasing precedence. `ID++ ID--' *************** *** 4440,4444 **** `expr ? expr : expr' ! conditional evaluation `= *= /= %= += -= <<= >>= &= ^= |=' --- 4750,4754 ---- `expr ? expr : expr' ! conditional operator `= *= /= %= += -= <<= >>= &= ^= |=' *************** *** 4451,4457 **** performed before the expression is evaluated. Within an expression, shell variables may also be referenced by name without using the ! parameter expansion syntax. The value of a variable is evaluated as an ! arithmetic expression when it is referenced. A shell variable need not ! have its integer attribute turned on to be used in an expression. Constants with a leading 0 are interpreted as octal numbers. A --- 4761,4771 ---- performed before the expression is evaluated. Within an expression, shell variables may also be referenced by name without using the ! parameter expansion syntax. A shell variable that is null or unset ! evaluates to 0 when referenced by name without using the parameter ! expansion syntax. The value of a variable is evaluated as an ! arithmetic expression when it is referenced, or when a variable which ! has been given the INTEGER attribute using `declare -i' is assigned a ! value. A null value evaluates to 0. A shell variable need not have ! its integer attribute turned on to be used in an expression. Constants with a leading 0 are interpreted as octal numbers. A *************** *** 4472,4480 **** File: bashref.info, Node: Aliases, Next: Arrays, Prev: Shell Arithmetic, Up: Bash Features ! Aliases ! ======= ! ALIASES allow a string to be substituted for a word when it is used ! as the first word of a simple command. The shell maintains a list of aliases that may be set and unset with the `alias' and `unalias' builtin commands. --- 4786,4794 ---- File: bashref.info, Node: Aliases, Next: Arrays, Prev: Shell Arithmetic, Up: Bash Features ! 6.6 Aliases ! =========== ! ALIASES allow a string to be substituted for a word when it is used as ! the first word of a simple command. The shell maintains a list of aliases that may be set and unset with the `alias' and `unalias' builtin commands. *************** *** 4482,4494 **** The first word of each simple command, if unquoted, is checked to see if it has an alias. If so, that word is replaced by the text of the ! alias. The alias name and the replacement text may contain any valid ! shell input, including shell metacharacters, with the exception that ! the alias name may not contain `='. The first word of the replacement ! text is tested for aliases, but a word that is identical to an alias ! being expanded is not expanded a second time. This means that one may ! alias `ls' to `"ls -F"', for instance, and Bash does not try to ! recursively expand the replacement text. If the last character of the ! alias value is a space or tab character, then the next command word ! following the alias is also checked for alias expansion. Aliases are created and listed with the `alias' command, and removed --- 4796,4809 ---- The first word of each simple command, if unquoted, is checked to see if it has an alias. If so, that word is replaced by the text of the ! alias. The characters `/', `$', ``', `=' and any of the shell ! metacharacters or quoting characters listed above may not appear in an ! alias name. The replacement text may contain any valid shell input, ! including shell metacharacters. The first word of the replacement text ! is tested for aliases, but a word that is identical to an alias being ! expanded is not expanded a second time. This means that one may alias ! `ls' to `"ls -F"', for instance, and Bash does not try to recursively ! expand the replacement text. If the last character of the alias value ! is a space or tab character, then the next command word following the ! alias is also checked for alias expansion. Aliases are created and listed with the `alias' command, and removed *************** *** 4523,4530 **** File: bashref.info, Node: Arrays, Next: The Directory Stack, Prev: Aliases, Up: Bash Features ! Arrays ! ====== ! Bash provides one-dimensional array variables. Any variable may be used as an array; the `declare' builtin will explicitly declare an array. There is no maximum limit on the size of an array, nor any --- 4838,4845 ---- File: bashref.info, Node: Arrays, Next: The Directory Stack, Prev: Aliases, Up: Bash Features ! 6.7 Arrays ! ========== ! Bash provides one-dimensional array variables. Any variable may be used as an array; the `declare' builtin will explicitly declare an array. There is no maximum limit on the size of an array, nor any *************** *** 4540,4548 **** array, use declare -a NAME ! ! The syntax declare -a NAME[SUBSCRIPT] ! ! is also accepted; the SUBSCRIPT is ignored. Attributes may be specified for an array variable using the `declare' and `readonly' builtins. Each attribute applies to all members of an array. --- 4855,4861 ---- array, use declare -a NAME ! The syntax declare -a NAME[SUBSCRIPT] ! is also accepted; the SUBSCRIPT is ignored. Attributes may be specified for an array variable using the `declare' and `readonly' builtins. Each attribute applies to all members of an array. *************** *** 4550,4555 **** Arrays are assigned to using compound assignments of the form name=(value1 ... valueN) ! ! where each VALUE is of the form `[[SUBSCRIPT]=]'STRING. If the optional subscript is supplied, that index is assigned to; otherwise the index of the element assigned is the last index assigned to by the --- 4863,4867 ---- Arrays are assigned to using compound assignments of the form name=(value1 ... valueN) ! where each VALUE is of the form `[[SUBSCRIPT]=]'STRING. If the optional subscript is supplied, that index is assigned to; otherwise the index of the element assigned is the last index assigned to by the *************** *** 4588,4593 **** File: bashref.info, Node: The Directory Stack, Next: Printing a Prompt, Prev: Arrays, Up: Bash Features ! The Directory Stack ! =================== * Menu: --- 4900,4905 ---- File: bashref.info, Node: The Directory Stack, Next: Printing a Prompt, Prev: Arrays, Up: Bash Features ! 6.8 The Directory Stack ! ======================= * Menu: *************** *** 4608,4613 **** File: bashref.info, Node: Directory Stack Builtins, Up: The Directory Stack ! Directory Stack Builtins ! ------------------------ `dirs' --- 4920,4925 ---- File: bashref.info, Node: Directory Stack Builtins, Up: The Directory Stack ! 6.8.1 Directory Stack Builtins ! ------------------------------ `dirs' *************** *** 4689,4700 **** and then executes the equivalent of ``cd' DIR'. `cd's to DIR.  File: bashref.info, Node: Printing a Prompt, Next: The Restricted Shell, Prev: The Directory Stack, Up: Bash Features ! Controlling the Prompt ! ====================== ! The value of the variable `PROMPT_COMMAND' is examined just before ! Bash prints each primary prompt. If `PROMPT_COMMAND' is set and has a non-null value, then the value is executed just as if it had been typed on the command line. --- 5001,5013 ---- and then executes the equivalent of ``cd' DIR'. `cd's to DIR. +  File: bashref.info, Node: Printing a Prompt, Next: The Restricted Shell, Prev: The Directory Stack, Up: Bash Features ! 6.9 Controlling the Prompt ! ========================== ! The value of the variable `PROMPT_COMMAND' is examined just before Bash ! prints each primary prompt. If `PROMPT_COMMAND' is set and has a non-null value, then the value is executed just as if it had been typed on the command line. *************** *** 4761,4768 **** `\w' ! The current working directory. `\W' ! The basename of `$PWD'. `\!' --- 5074,5082 ---- `\w' ! The current working directory, with `$HOME' abbreviated with a ! tilde. `\W' ! The basename of `$PWD', with `$HOME' abbreviated with a tilde. `\!' *************** *** 4801,4809 **** File: bashref.info, Node: The Restricted Shell, Next: Bash POSIX Mode, Prev: Printing a Prompt, Up: Bash Features ! The Restricted Shell ! ==================== ! If Bash is started with the name `rbash', or the `--restricted' or ! `-r' option is supplied at invocation, the shell becomes restricted. A restricted shell is used to set up an environment more controlled than the standard shell. A restricted shell behaves identically to `bash' --- 5115,5123 ---- File: bashref.info, Node: The Restricted Shell, Next: Bash POSIX Mode, Prev: Printing a Prompt, Up: Bash Features ! 6.10 The Restricted Shell ! ========================= ! If Bash is started with the name `rbash', or the `--restricted' or `-r' ! option is supplied at invocation, the shell becomes restricted. A restricted shell is used to set up an environment more controlled than the standard shell. A restricted shell behaves identically to `bash' *************** *** 4853,4863 **** File: bashref.info, Node: Bash POSIX Mode, Prev: The Restricted Shell, Up: Bash Features ! Bash POSIX Mode ! =============== ! Starting Bash with the `--posix' command-line option or executing ! `set -o posix' while Bash is running will cause Bash to conform more ! closely to the POSIX 1003.2 standard by changing the behavior to match ! that specified by POSIX in areas where the Bash default differs. When invoked as `sh', Bash enters POSIX mode after reading the --- 5167,5177 ---- File: bashref.info, Node: Bash POSIX Mode, Prev: The Restricted Shell, Up: Bash Features ! 6.11 Bash POSIX Mode ! ==================== ! Starting Bash with the `--posix' command-line option or executing `set ! -o posix' while Bash is running will cause Bash to conform more closely ! to the POSIX 1003.2 standard by changing the behavior to match that ! specified by POSIX in areas where the Bash default differs. When invoked as `sh', Bash enters POSIX mode after reading the *************** *** 4884,4901 **** setting of the `promptvars' option. ! 6. Interactive comments are enabled by default. (Bash has them on by ! default anyway.) ! ! 7. The POSIX 1003.2 startup files are executed (`$ENV') rather than the normal Bash files. ! 8. Tilde expansion is only performed on assignments preceding a command name, rather than on all assignment statements on the line. ! 9. The default history file is `~/.sh_history' (this is the default value of `$HISTFILE'). ! 10. The output of `kill -l' prints all the signal names on a single ! line, separated by spaces. 11. Non-interactive shells exit if FILENAME in `.' FILENAME is not --- 5198,5215 ---- setting of the `promptvars' option. ! 6. The POSIX 1003.2 startup files are executed (`$ENV') rather than the normal Bash files. ! 7. Tilde expansion is only performed on assignments preceding a command name, rather than on all assignment statements on the line. ! 8. The default history file is `~/.sh_history' (this is the default value of `$HISTFILE'). ! 9. The output of `kill -l' prints all the signal names on a single ! line, separated by spaces, without the `SIG' prefix. ! ! 10. The `kill' builtin does not accept signal names with a `SIG' ! prefix. 11. Non-interactive shells exit if FILENAME in `.' FILENAME is not *************** *** 4958,4978 **** 26. The `trap' builtin displays signal names without the leading `SIG'. ! 27. The `.' and `source' builtins do not search the current directory for the filename argument if it is not found by searching `PATH'. ! 28. Subshells spawned to execute command substitutions inherit the value of the `-e' option from the parent shell. When not in POSIX mode, Bash clears the `-e' option in such subshells. ! 29. Alias expansion is always enabled, even in non-interactive shells. ! 30. When the `set' builtin is invoked without options, it does not display shell function names and definitions. ! 31. When the `set' builtin is invoked without options, it displays variable values without quotes, unless they contain shell metacharacters, even if the result contains nonprinting characters. ! 32. When the `cd' builtin is invoked in LOGICAL mode, and the pathname constructed from `$PWD' and the directory name supplied as an argument does not refer to an existing directory, `cd' will fail --- 5272,5302 ---- 26. The `trap' builtin displays signal names without the leading `SIG'. ! 27. The `trap' builtin doesn't check the first argument for a possible ! signal specification and revert the signal handling to the original ! disposition if it is. If users want to reset the handler for a ! given signal to the original disposition, they should use `-' as ! the first argument. ! ! 28. The `.' and `source' builtins do not search the current directory for the filename argument if it is not found by searching `PATH'. ! 29. Subshells spawned to execute command substitutions inherit the value of the `-e' option from the parent shell. When not in POSIX mode, Bash clears the `-e' option in such subshells. ! 30. Alias expansion is always enabled, even in non-interactive shells. ! 31. When the `alias' builtin displays alias definitions, it does not ! display them with a leading `alias ' unless the `-p' option is ! supplied. ! ! 32. When the `set' builtin is invoked without options, it does not display shell function names and definitions. ! 33. When the `set' builtin is invoked without options, it displays variable values without quotes, unless they contain shell metacharacters, even if the result contains nonprinting characters. ! 34. When the `cd' builtin is invoked in LOGICAL mode, and the pathname constructed from `$PWD' and the directory name supplied as an argument does not refer to an existing directory, `cd' will fail *************** *** 4998,5006 **** File: bashref.info, Node: Job Control, Next: Using History Interactively, Prev: Bash Features, Up: Top ! Job Control ! *********** ! This chapter discusses what job control is, how it works, and how ! Bash allows you to access its facilities. * Menu: --- 5322,5330 ---- File: bashref.info, Node: Job Control, Next: Using History Interactively, Prev: Bash Features, Up: Top ! 7 Job Control ! ************* ! This chapter discusses what job control is, how it works, and how Bash ! allows you to access its facilities. * Menu: *************** *** 5015,5022 **** File: bashref.info, Node: Job Control Basics, Next: Job Control Builtins, Up: Job Control ! Job Control Basics ! ================== ! Job control refers to the ability to selectively stop (suspend) the execution of processes and continue (resume) their execution at a later point. A user typically employs this facility via an interactive --- 5339,5346 ---- File: bashref.info, Node: Job Control Basics, Next: Job Control Builtins, Up: Job Control ! 7.1 Job Control Basics ! ====================== ! Job control refers to the ability to selectively stop (suspend) the execution of processes and continue (resume) their execution at a later point. A user typically employs this facility via an interactive *************** *** 5027,5035 **** When Bash starts a job asynchronously, it prints a line that looks like: [1] 25647 ! ! indicating that this job is job number 1 and that the process ID of the ! last process in the pipeline associated with this job is 25647. All of ! the processes in a single pipeline are members of the same job. Bash ! uses the JOB abstraction as the basis for job control. To facilitate the implementation of the user interface to job --- 5351,5358 ---- When Bash starts a job asynchronously, it prints a line that looks like: [1] 25647 ! indicating that this job is job number 1 and that the process ID of ! the last process in the pipeline associated with this job is 25647. ! All of the processes in a single pipeline are members of the same job. ! Bash uses the JOB abstraction as the basis for job control. To facilitate the implementation of the user interface to job *************** *** 5089,5093 **** on `SIGCHLD' is executed for each child process that exits. ! If an attempt to exit Bash is while jobs are stopped, the shell prints a message warning that there are stopped jobs. The `jobs' command may then be used to inspect their status. If a second attempt --- 5412,5416 ---- on `SIGCHLD' is executed for each child process that exits. ! If an attempt to exit Bash is made while jobs are stopped, the shell prints a message warning that there are stopped jobs. The `jobs' command may then be used to inspect their status. If a second attempt *************** *** 5098,5103 **** File: bashref.info, Node: Job Control Builtins, Next: Job Control Variables, Prev: Job Control Basics, Up: Job Control ! Job Control Builtins ! ==================== `bg' --- 5421,5426 ---- File: bashref.info, Node: Job Control Builtins, Next: Job Control Variables, Prev: Job Control Basics, Up: Job Control ! 7.2 Job Control Builtins ! ======================== `bg' *************** *** 5156,5169 **** Send a signal specified by SIGSPEC or SIGNUM to the process named by job specification JOBSPEC or process ID PID. SIGSPEC is either ! a signal name such as `SIGINT' (with or without the `SIG' prefix) ! or a signal number; SIGNUM is a signal number. If SIGSPEC and ! SIGNUM are not present, `SIGTERM' is used. The `-l' option lists ! the signal names. If any arguments are supplied when `-l' is ! given, the names of the signals corresponding to the arguments are ! listed, and the return status is zero. EXIT_STATUS is a number ! specifying a signal number or the exit status of a process ! terminated by a signal. The return status is zero if at least one ! signal was successfully sent, or non-zero if an error occurs or an ! invalid option is encountered. `wait' --- 5479,5492 ---- Send a signal specified by SIGSPEC or SIGNUM to the process named by job specification JOBSPEC or process ID PID. SIGSPEC is either ! a case-insensitive signal name such as `SIGINT' (with or without ! the `SIG' prefix) or a signal number; SIGNUM is a signal number. ! If SIGSPEC and SIGNUM are not present, `SIGTERM' is used. The ! `-l' option lists the signal names. If any arguments are supplied ! when `-l' is given, the names of the signals corresponding to the ! arguments are listed, and the return status is zero. EXIT_STATUS ! is a number specifying a signal number or the exit status of a ! process terminated by a signal. The return status is zero if at ! least one signal was successfully sent, or non-zero if an error ! occurs or an invalid option is encountered. `wait' *************** *** 5194,5197 **** --- 5517,5521 ---- login shell. + When job control is not active, the `kill' and `wait' builtins do not accept JOBSPEC arguments. They must be supplied process IDs. *************** *** 5200,5205 **** File: bashref.info, Node: Job Control Variables, Prev: Job Control Builtins, Up: Job Control ! Job Control Variables ! ===================== `auto_resume' --- 5524,5529 ---- File: bashref.info, Node: Job Control Variables, Prev: Job Control Builtins, Up: Job Control ! 7.3 Job Control Variables ! ========================= `auto_resume' *************** *** 5220,5230 **** analogous to the `%' job ID.  File: bashref.info, Node: Command Line Editing, Next: Installing Bash, Prev: Using History Interactively, Up: Top ! Command Line Editing ! ******************** ! This chapter describes the basic features of the GNU command line editing interface. Command line editing is provided by the Readline library, which is used by several different programs, including Bash. --- 5544,5555 ---- analogous to the `%' job ID. +  File: bashref.info, Node: Command Line Editing, Next: Installing Bash, Prev: Using History Interactively, Up: Top ! 8 Command Line Editing ! ********************** ! This chapter describes the basic features of the GNU command line editing interface. Command line editing is provided by the Readline library, which is used by several different programs, including Bash. *************** *** 5248,5255 **** File: bashref.info, Node: Introduction and Notation, Next: Readline Interaction, Up: Command Line Editing ! Introduction to Line Editing ! ============================ ! The following paragraphs describe the notation used to represent keystrokes. --- 5573,5580 ---- File: bashref.info, Node: Introduction and Notation, Next: Readline Interaction, Up: Command Line Editing ! 8.1 Introduction to Line Editing ! ================================ ! The following paragraphs describe the notation used to represent keystrokes. *************** *** 5284,5291 **** File: bashref.info, Node: Readline Interaction, Next: Readline Init File, Prev: Introduction and Notation, Up: Command Line Editing ! Readline Interaction ! ==================== ! Often during an interactive session you type in a long line of text, only to notice that the first word on the line is misspelled. The Readline library gives you a set of commands for manipulating the text --- 5609,5616 ---- File: bashref.info, Node: Readline Interaction, Next: Readline Init File, Prev: Introduction and Notation, Up: Command Line Editing ! 8.2 Readline Interaction ! ======================== ! Often during an interactive session you type in a long line of text, only to notice that the first word on the line is misspelled. The Readline library gives you a set of commands for manipulating the text *************** *** 5309,5319 **** File: bashref.info, Node: Readline Bare Essentials, Next: Readline Movement Commands, Up: Readline Interaction ! Readline Bare Essentials ! ------------------------ ! In order to enter characters into the line, simply type them. The ! typed character appears where the cursor was, and then the cursor moves ! one space to the right. If you mistype a character, you can use your ! erase character to back up and delete the mistyped character. Sometimes you may mistype a character, and not notice the error --- 5634,5644 ---- File: bashref.info, Node: Readline Bare Essentials, Next: Readline Movement Commands, Up: Readline Interaction ! 8.2.1 Readline Bare Essentials ! ------------------------------ ! In order to enter characters into the line, simply type them. The typed ! character appears where the cursor was, and then the cursor moves one ! space to the right. If you mistype a character, you can use your erase ! character to back up and delete the mistyped character. Sometimes you may mistype a character, and not notice the error *************** *** 5357,5364 **** File: bashref.info, Node: Readline Movement Commands, Next: Readline Killing Commands, Prev: Readline Bare Essentials, Up: Readline Interaction ! Readline Movement Commands ! -------------------------- ! The above table describes the most basic keystrokes that you need in order to do editing of the input line. For your convenience, many other commands have been added in addition to `C-b', `C-f', `C-d', and --- 5682,5689 ---- File: bashref.info, Node: Readline Movement Commands, Next: Readline Killing Commands, Prev: Readline Bare Essentials, Up: Readline Interaction ! 8.2.2 Readline Movement Commands ! -------------------------------- ! The above table describes the most basic keystrokes that you need in order to do editing of the input line. For your convenience, many other commands have been added in addition to `C-b', `C-f', `C-d', and *************** *** 5388,5396 **** File: bashref.info, Node: Readline Killing Commands, Next: Readline Arguments, Prev: Readline Movement Commands, Up: Readline Interaction ! Readline Killing Commands ! ------------------------- ! "Killing" text means to delete the text from the line, but to save ! it away for later use, usually by "yanking" (re-inserting) it back into the line. (`Cut' and `paste' are more recent jargon for `kill' and `yank'.) --- 5713,5721 ---- File: bashref.info, Node: Readline Killing Commands, Next: Readline Arguments, Prev: Readline Movement Commands, Up: Readline Interaction ! 8.2.3 Readline Killing Commands ! ------------------------------- ! "Killing" text means to delete the text from the line, but to save it ! away for later use, usually by "yanking" (re-inserting) it back into the line. (`Cut' and `paste' are more recent jargon for `kill' and `yank'.) *************** *** 5404,5408 **** that when you yank it back, you get it all. The kill ring is not line specific; the text that you killed on a previously typed line is ! available to be yanked back later, when you are typing another line. Here is the list of commands for killing text. --- 5729,5733 ---- that when you yank it back, you get it all. The kill ring is not line specific; the text that you killed on a previously typed line is ! available to be yanked back later, when you are typing another line. Here is the list of commands for killing text. *************** *** 5426,5429 **** --- 5751,5755 ---- different than `M-' because the word boundaries differ. + Here is how to "yank" the text back into the line. Yanking means to copy the most-recently-killed text from the kill buffer. *************** *** 5440,5447 **** File: bashref.info, Node: Readline Arguments, Next: Searching, Prev: Readline Killing Commands, Up: Readline Interaction ! Readline Arguments ! ------------------ ! You can pass numeric arguments to Readline commands. Sometimes the argument acts as a repeat count, other times it is the sign of the argument that is significant. If you pass a negative argument to a --- 5766,5773 ---- File: bashref.info, Node: Readline Arguments, Next: Searching, Prev: Readline Killing Commands, Up: Readline Interaction ! 8.2.4 Readline Arguments ! ------------------------ ! You can pass numeric arguments to Readline commands. Sometimes the argument acts as a repeat count, other times it is the sign of the argument that is significant. If you pass a negative argument to a *************** *** 5461,5468 **** File: bashref.info, Node: Searching, Prev: Readline Arguments, Up: Readline Interaction ! Searching for Commands in the History ! ------------------------------------- ! Readline provides commands for searching through the command history (*note Bash History Facilities::) for lines containing a specified string. There are two search modes: "incremental" and --- 5787,5794 ---- File: bashref.info, Node: Searching, Prev: Readline Arguments, Up: Readline Interaction ! 8.2.5 Searching for Commands in the History ! ------------------------------------------- ! Readline provides commands for searching through the command history (*note Bash History Facilities::) for lines containing a specified string. There are two search modes: "incremental" and *************** *** 5503,5510 **** File: bashref.info, Node: Readline Init File, Next: Bindable Readline Commands, Prev: Readline Interaction, Up: Command Line Editing ! Readline Init File ! ================== ! Although the Readline library comes with a set of Emacs-like keybindings installed by default, it is possible to use a different set of keybindings. Any user can customize programs that use Readline by --- 5829,5836 ---- File: bashref.info, Node: Readline Init File, Next: Bindable Readline Commands, Prev: Readline Interaction, Up: Command Line Editing ! 8.3 Readline Init File ! ====================== ! Although the Readline library comes with a set of Emacs-like keybindings installed by default, it is possible to use a different set of keybindings. Any user can customize programs that use Readline by *************** *** 5531,5538 **** File: bashref.info, Node: Readline Init File Syntax, Next: Conditional Init Constructs, Up: Readline Init File ! Readline Init File Syntax ! ------------------------- ! There are only a few basic constructs allowed in the Readline init file. Blank lines are ignored. Lines beginning with a `#' are comments. Lines beginning with a `$' indicate conditional constructs --- 5857,5864 ---- File: bashref.info, Node: Readline Init File Syntax, Next: Conditional Init Constructs, Up: Readline Init File ! 8.3.1 Readline Init File Syntax ! ------------------------------- ! There are only a few basic constructs allowed in the Readline init file. Blank lines are ignored. Lines beginning with a `#' are comments. Lines beginning with a `$' indicate conditional constructs *************** *** 5580,5589 **** `completion-query-items' The number of possible completions that determines when the ! user is asked whether he wants to see the list of ! possibilities. If the number of possible completions is ! greater than this value, Readline will ask the user whether ! or not he wishes to view them; otherwise, they are simply ! listed. This variable must be set to an integer value ! greater than or equal to 0. The default limit is `100'. `convert-meta' --- 5906,5915 ---- `completion-query-items' The number of possible completions that determines when the ! user is asked whether the list of possibilities should be ! displayed. If the number of possible completions is greater ! than this value, Readline will ask the user whether or not he ! wishes to view them; otherwise, they are simply listed. This ! variable must be set to an integer value greater than or ! equal to 0. The default limit is `100'. `convert-meta' *************** *** 5614,5618 **** If set to `on', the history code attempts to place point at ! the same location on each history line retrived with `previous-history' or `next-history'. --- 5940,5944 ---- If set to `on', the history code attempts to place point at ! the same location on each history line retrieved with `previous-history' or `next-history'. *************** *** 5689,5692 **** --- 6015,6027 ---- of ringing the bell. The default value is `off'. + `show-all-if-unmodified' + This alters the default behavior of the completion functions + in a fashion similar to SHOW-ALL-IF-AMBIGUOUS. If set to + `on', words which have more than one possible completion + without any possible partial completion (the possible + completions don't share a common prefix) cause the matches to + be listed immediately instead of ringing the bell. The + default value is `off'. + `visible-stats' If set to `on', a character denoting a file's type is *************** *** 5694,5697 **** --- 6029,6033 ---- The default is `off'. + Key Bindings The syntax for controlling key bindings in the init file is *************** *** 5748,5751 **** --- 6084,6088 ---- Key 1'. + The following GNU Emacs style escape sequences are available when specifying key sequences: *************** *** 5813,5823 **** "\C-x\\": "\\"  File: bashref.info, Node: Conditional Init Constructs, Next: Sample Init File, Prev: Readline Init File Syntax, Up: Readline Init File ! Conditional Init Constructs ! --------------------------- ! Readline implements a facility similar in spirit to the conditional compilation features of the C preprocessor which allows key bindings and variable settings to be performed as the result of tests. There --- 6150,6161 ---- "\C-x\\": "\\" +  File: bashref.info, Node: Conditional Init Constructs, Next: Sample Init File, Prev: Readline Init File Syntax, Up: Readline Init File ! 8.3.2 Conditional Init Constructs ! --------------------------------- ! Readline implements a facility similar in spirit to the conditional compilation features of the C preprocessor which allows key bindings and variable settings to be performed as the result of tests. There *************** *** 5876,5884 **** File: bashref.info, Node: Sample Init File, Prev: Conditional Init Constructs, Up: Readline Init File ! Sample Init File ! ---------------- ! Here is an example of an INPUTRC file. This illustrates key ! binding, variable assignment, and conditional syntax. --- 6214,6222 ---- File: bashref.info, Node: Sample Init File, Prev: Conditional Init Constructs, Up: Readline Init File ! 8.3.3 Sample Init File ! ---------------------- ! Here is an example of an INPUTRC file. This illustrates key binding, ! variable assignment, and conditional syntax. *************** *** 5893,5906 **** # assignments from /etc/Inputrc $include /etc/Inputrc ! # # Set various bindings for emacs mode. ! set editing-mode emacs ! $if mode=emacs ! Meta-Control-h: backward-kill-word Text after the function name is ignored ! # # Arrow keys in keypad mode --- 6231,6244 ---- # assignments from /etc/Inputrc $include /etc/Inputrc ! # # Set various bindings for emacs mode. ! set editing-mode emacs ! $if mode=emacs ! Meta-Control-h: backward-kill-word Text after the function name is ignored ! # # Arrow keys in keypad mode *************** *** 5931,5942 **** #"\M-\C-[A": previous-history #"\M-\C-[B": next-history ! C-q: quoted-insert ! $endif ! # An old-style binding. This happens to be the default. TAB: complete ! # Macros that are convenient for shell interaction $if Bash --- 6269,6280 ---- #"\M-\C-[A": previous-history #"\M-\C-[B": next-history ! C-q: quoted-insert ! $endif ! # An old-style binding. This happens to be the default. TAB: complete ! # Macros that are convenient for shell interaction $if Bash *************** *** 5957,5979 **** "\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y=" $endif ! # use a visible bell if one is available set bell-style visible ! # don't strip characters to 7 bits when reading set input-meta on ! # allow iso-latin1 characters to be inserted rather # than converted to prefix-meta sequences set convert-meta off ! # display characters with the eighth bit set directly # rather than as meta-prefixed characters set output-meta on ! # if there are more than 150 possible completions for # a word, ask the user if he wants to see all of them set completion-query-items 150 ! # For FTP $if Ftp --- 6295,6317 ---- "\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y=" $endif ! # use a visible bell if one is available set bell-style visible ! # don't strip characters to 7 bits when reading set input-meta on ! # allow iso-latin1 characters to be inserted rather # than converted to prefix-meta sequences set convert-meta off ! # display characters with the eighth bit set directly # rather than as meta-prefixed characters set output-meta on ! # if there are more than 150 possible completions for # a word, ask the user if he wants to see all of them set completion-query-items 150 ! # For FTP $if Ftp *************** *** 5986,5991 **** File: bashref.info, Node: Bindable Readline Commands, Next: Readline vi Mode, Prev: Readline Init File, Up: Command Line Editing ! Bindable Readline Commands ! ========================== * Menu: --- 6324,6329 ---- File: bashref.info, Node: Bindable Readline Commands, Next: Readline vi Mode, Prev: Readline Init File, Up: Command Line Editing ! 8.4 Bindable Readline Commands ! ============================== * Menu: *************** *** 6014,6019 **** File: bashref.info, Node: Commands For Moving, Next: Commands For History, Up: Bindable Readline Commands ! Commands For Moving ! ------------------- `beginning-of-line (C-a)' --- 6352,6357 ---- File: bashref.info, Node: Commands For Moving, Next: Commands For History, Up: Bindable Readline Commands ! 8.4.1 Commands For Moving ! ------------------------- `beginning-of-line (C-a)' *************** *** 6044,6052 **** Refresh the current line. By default, this is unbound.  File: bashref.info, Node: Commands For History, Next: Commands For Text, Prev: Commands For Moving, Up: Bindable Readline Commands ! Commands For Manipulating The History ! ------------------------------------- `accept-line (Newline or Return)' --- 6382,6391 ---- Refresh the current line. By default, this is unbound. +  File: bashref.info, Node: Commands For History, Next: Commands For Text, Prev: Commands For Moving, Up: Bindable Readline Commands ! 8.4.2 Commands For Manipulating The History ! ------------------------------------------- `accept-line (Newline or Return)' *************** *** 6114,6122 **** in turn.  File: bashref.info, Node: Commands For Text, Next: Commands For Killing, Prev: Commands For History, Up: Bindable Readline Commands ! Commands For Changing Text ! -------------------------- `delete-char (C-d)' --- 6453,6462 ---- in turn. +  File: bashref.info, Node: Commands For Text, Next: Commands For Killing, Prev: Commands For History, Up: Bindable Readline Commands ! 8.4.3 Commands For Changing Text ! -------------------------------- `delete-char (C-d)' *************** *** 6178,6186 **** By default, this command is unbound.  File: bashref.info, Node: Commands For Killing, Next: Numeric Arguments, Prev: Commands For Text, Up: Bindable Readline Commands ! Killing And Yanking ! ------------------- `kill-line (C-k)' --- 6518,6527 ---- By default, this command is unbound. +  File: bashref.info, Node: Commands For Killing, Next: Numeric Arguments, Prev: Commands For Text, Up: Bindable Readline Commands ! 8.4.4 Killing And Yanking ! ------------------------- `kill-line (C-k)' *************** *** 6210,6213 **** --- 6551,6559 ---- The killed text is saved on the kill-ring. + `unix-filename-rubout ()' + Kill the word behind point, using white space and the slash + character as the word boundaries. The killed text is saved on the + kill-ring. + `delete-horizontal-space ()' Delete all spaces and tabs around point. By default, this is *************** *** 6242,6247 **** File: bashref.info, Node: Numeric Arguments, Next: Commands For Completion, Prev: Commands For Killing, Up: Bindable Readline Commands ! Specifying Numeric Arguments ! ---------------------------- `digit-argument (M-0, M-1, ... M--)' --- 6588,6593 ---- File: bashref.info, Node: Numeric Arguments, Next: Commands For Completion, Prev: Commands For Killing, Up: Bindable Readline Commands ! 8.4.5 Specifying Numeric Arguments ! ---------------------------------- `digit-argument (M-0, M-1, ... M--)' *************** *** 6265,6270 **** File: bashref.info, Node: Commands For Completion, Next: Keyboard Macros, Prev: Numeric Arguments, Up: Bindable Readline Commands ! Letting Readline Type For You ! ----------------------------- `complete ()' --- 6611,6616 ---- File: bashref.info, Node: Commands For Completion, Next: Keyboard Macros, Prev: Numeric Arguments, Up: Bindable Readline Commands ! 8.4.6 Letting Readline Type For You ! ----------------------------------- `complete ()' *************** *** 6353,6361 **** shell (*note Brace Expansion::).  File: bashref.info, Node: Keyboard Macros, Next: Miscellaneous Commands, Prev: Commands For Completion, Up: Bindable Readline Commands ! Keyboard Macros ! --------------- `start-kbd-macro (C-x ()' --- 6699,6708 ---- shell (*note Brace Expansion::). +  File: bashref.info, Node: Keyboard Macros, Next: Miscellaneous Commands, Prev: Commands For Completion, Up: Bindable Readline Commands ! 8.4.7 Keyboard Macros ! --------------------- `start-kbd-macro (C-x ()' *************** *** 6370,6378 **** characters in the macro appear as if typed at the keyboard.  File: bashref.info, Node: Miscellaneous Commands, Prev: Keyboard Macros, Up: Bindable Readline Commands ! Some Miscellaneous Commands ! --------------------------- `re-read-init-file (C-x C-r)' --- 6717,6726 ---- characters in the macro appear as if typed at the keyboard. +  File: bashref.info, Node: Miscellaneous Commands, Prev: Keyboard Macros, Up: Bindable Readline Commands ! 8.4.8 Some Miscellaneous Commands ! --------------------------------- `re-read-init-file (C-x C-r)' *************** *** 6501,6514 **** `edit-and-execute-command (C-xC-e)' Invoke an editor on the current command line, and execute the ! result as shell commands. Bash attempts to invoke `$FCEDIT', `$EDITOR', and `emacs' as the editor, in that order.  File: bashref.info, Node: Readline vi Mode, Next: Programmable Completion, Prev: Bindable Readline Commands, Up: Command Line Editing ! Readline vi Mode ! ================ ! While the Readline library does not have a full set of `vi' editing functions, it does contain enough to allow simple editing of the line. The Readline `vi' mode behaves as specified in the POSIX 1003.2 --- 6849,6863 ---- `edit-and-execute-command (C-xC-e)' Invoke an editor on the current command line, and execute the ! result as shell commands. Bash attempts to invoke `$VISUAL', `$EDITOR', and `emacs' as the editor, in that order. +  File: bashref.info, Node: Readline vi Mode, Next: Programmable Completion, Prev: Bindable Readline Commands, Up: Command Line Editing ! 8.5 Readline vi Mode ! ==================== ! While the Readline library does not have a full set of `vi' editing functions, it does contain enough to allow simple editing of the line. The Readline `vi' mode behaves as specified in the POSIX 1003.2 *************** *** 6528,6535 **** File: bashref.info, Node: Programmable Completion, Next: Programmable Completion Builtins, Prev: Readline vi Mode, Up: Command Line Editing ! Programmable Completion ! ======================= ! When word completion is attempted for an argument to a command for which a completion specification (a COMPSPEC) has been defined using the `complete' builtin (*note Programmable Completion Builtins::), the --- 6877,6884 ---- File: bashref.info, Node: Programmable Completion, Next: Programmable Completion Builtins, Prev: Readline vi Mode, Up: Command Line Editing ! 8.6 Programmable Completion ! =========================== ! When word completion is attempted for an argument to a command for which a completion specification (a COMPSPEC) has been defined using the `complete' builtin (*note Programmable Completion Builtins::), the *************** *** 6612,6621 **** was defined, directory name completion is attempted. By default, if a compspec is found, whatever it generates is returned to the completion code as the full set of possible completions. The default Bash completions are not attempted, and the Readline default ! of filename completion is disabled. If the `-o default' option was ! supplied to `complete' when the compspec was defined, Readline's ! default completion will be performed if the compspec generates no matches. --- 6961,6977 ---- was defined, directory name completion is attempted. + If the `-o plusdirs' option was supplied to `complete' when the + compspec was defined, directory name completion is attempted and any + matches are added to the results of the other actions. + By default, if a compspec is found, whatever it generates is returned to the completion code as the full set of possible completions. The default Bash completions are not attempted, and the Readline default ! of filename completion is disabled. If the `-o bashdefault' option was ! supplied to `complete' when the compspec was defined, the default Bash ! completions are attempted if the compspec generates no matches. If the ! `-o default' option was supplied to `complete' when the compspec was ! defined, Readline's default completion will be performed if the ! compspec (and, if attempted, the default Bash completions) generate no matches. *************** *** 6629,6636 **** File: bashref.info, Node: Programmable Completion Builtins, Prev: Programmable Completion, Up: Command Line Editing ! Programmable Completion Builtins ! ================================ ! Two builtin commands are available to manipulate the programmable completion facilities. --- 6985,6992 ---- File: bashref.info, Node: Programmable Completion Builtins, Prev: Programmable Completion, Up: Command Line Editing ! 8.7 Programmable Completion Builtins ! ==================================== ! Two builtin commands are available to manipulate the programmable completion facilities. *************** *** 6680,6683 **** --- 7036,7043 ---- COMP-OPTION may be one of: + `bashdefault' + Perform the rest of the default Bash completions if the + compspec generates no matches. + `default' Use Readline's default filename completion if the *************** *** 6690,6694 **** `filenames' Tell Readline that the compspec generates filenames, so ! it can perform any filename\-specific processing (like adding a slash to directory names or suppressing trailing spaces). This option is intended to be used --- 7050,7054 ---- `filenames' Tell Readline that the compspec generates filenames, so ! it can perform any filename-specific processing (like adding a slash to directory names or suppressing trailing spaces). This option is intended to be used *************** *** 6825,6835 **** adding a completion specification.  File: bashref.info, Node: Using History Interactively, Next: Command Line Editing, Prev: Job Control, Up: Top ! Using History Interactively ! *************************** ! This chapter describes how to use the GNU History Library interactively, from a user's standpoint. It should be considered a user's guide. For information on using the GNU History Library in --- 7185,7196 ---- adding a completion specification. +  File: bashref.info, Node: Using History Interactively, Next: Command Line Editing, Prev: Job Control, Up: Top ! 9 Using History Interactively ! ***************************** ! This chapter describes how to use the GNU History Library interactively, from a user's standpoint. It should be considered a user's guide. For information on using the GNU History Library in *************** *** 6847,6862 **** File: bashref.info, Node: Bash History Facilities, Next: Bash History Builtins, Up: Using History Interactively ! Bash History Facilities ! ======================= ! When the `-o history' option to the `set' builtin is enabled (*note ! The Set Builtin::), the shell provides access to the "command history", ! the list of commands previously typed. The value of the `HISTSIZE' ! shell variable is used as the number of commands to save in a history ! list. The text of the last `$HISTSIZE' commands (default 500) is saved. ! The shell stores each command in the history list prior to parameter ! and variable expansion but after history expansion is performed, ! subject to the values of the shell variables `HISTIGNORE' and ! `HISTCONTROL'. When the shell starts up, the history is initialized from the file --- 7208,7222 ---- File: bashref.info, Node: Bash History Facilities, Next: Bash History Builtins, Up: Using History Interactively ! 9.1 Bash History Facilities ! =========================== ! When the `-o history' option to the `set' builtin is enabled (*note The ! Set Builtin::), the shell provides access to the "command history", the ! list of commands previously typed. The value of the `HISTSIZE' shell ! variable is used as the number of commands to save in a history list. ! The text of the last `$HISTSIZE' commands (default 500) is saved. The ! shell stores each command in the history list prior to parameter and ! variable expansion but after history expansion is performed, subject to ! the values of the shell variables `HISTIGNORE' and `HISTCONTROL'. When the shell starts up, the history is initialized from the file *************** *** 6874,6877 **** --- 7234,7240 ---- performed. + If the `HISTTIMEFORMAT' is set, the time stamp information + associated with each history entry is written to the history file. + The builtin command `fc' may be used to list or edit and re-execute a portion of the history list. The `history' builtin may be used to *************** *** 6894,6901 **** File: bashref.info, Node: Bash History Builtins, Next: History Interaction, Prev: Bash History Facilities, Up: Using History Interactively ! Bash History Builtins ! ===================== ! Bash provides two builtin commands which manipulate the history list and history file. --- 7257,7264 ---- File: bashref.info, Node: Bash History Builtins, Next: History Interaction, Prev: Bash History Facilities, Up: Using History Interactively ! 9.2 Bash History Builtins ! ========================= ! Bash provides two builtin commands which manipulate the history list and history file. *************** *** 6938,6943 **** With no options, display the history list with line numbers. Lines prefixed with a `*' have been modified. An argument of N ! lists only the last N lines. Options, if supplied, have the ! following meanings: `-c' --- 7301,7311 ---- With no options, display the history list with line numbers. Lines prefixed with a `*' have been modified. An argument of N ! lists only the last N lines. If the shell variable ! `HISTTIMEFORMAT' is set and not null, it is used as a format ! string for STRFTIME to display the time stamp associated with each ! displayed history entry. No intervening blank is printed between ! the formatted time stamp and the history line. ! ! Options, if supplied, have the following meanings: `-c' *************** *** 6975,6991 **** entry. When any of the `-w', `-r', `-a', or `-n' options is used, if FILENAME is given, then it is used as the history file. If not, then the value of the `HISTFILE' variable is used.  File: bashref.info, Node: History Interaction, Prev: Bash History Builtins, Up: Using History Interactively ! History Expansion ! ================= ! The History library provides a history expansion feature that is ! similar to the history expansion provided by `csh'. This section ! describes the syntax used to manipulate the history information. History expansions introduce words from the history list into the --- 7343,7361 ---- entry. + When any of the `-w', `-r', `-a', or `-n' options is used, if FILENAME is given, then it is used as the history file. If not, then the value of the `HISTFILE' variable is used. +  File: bashref.info, Node: History Interaction, Prev: Bash History Builtins, Up: Using History Interactively ! 9.3 History Expansion ! ===================== ! The History library provides a history expansion feature that is similar ! to the history expansion provided by `csh'. This section describes the ! syntax used to manipulate the history information. History expansions introduce words from the history list into the *************** *** 7033,7045 **** File: bashref.info, Node: Event Designators, Next: Word Designators, Up: History Interaction ! Event Designators ! ----------------- ! An event designator is a reference to a command line entry in the ! history list. `!' Start a history substitution, except when followed by a space, tab, ! the end of the line, `=' or `('. `!N' --- 7403,7416 ---- File: bashref.info, Node: Event Designators, Next: Word Designators, Up: History Interaction ! 9.3.1 Event Designators ! ----------------------- ! An event designator is a reference to a command line entry in the ! history list. `!' Start a history substitution, except when followed by a space, tab, ! the end of the line, `=' or `(' (when the `extglob' shell option ! is enabled using the `shopt' builtin). `!N' *************** *** 7067,7077 **** The entire command line typed so far.  File: bashref.info, Node: Word Designators, Next: Modifiers, Prev: Event Designators, Up: History Interaction ! Word Designators ! ---------------- ! Word designators are used to select desired words from the event. A `:' separates the event specification from the word designator. It may be omitted if the word designator begins with a `^', `$', `*', `-', or --- 7438,7449 ---- The entire command line typed so far. +  File: bashref.info, Node: Word Designators, Next: Modifiers, Prev: Event Designators, Up: History Interaction ! 9.3.2 Word Designators ! ---------------------- ! Word designators are used to select desired words from the event. A `:' separates the event specification from the word designator. It may be omitted if the word designator begins with a `^', `$', `*', `-', or *************** *** 7125,7128 **** --- 7497,7501 ---- Abbreviates `X-$' like `X*', but omits the last word. + If a word designator is supplied without an event specification, the previous command is used as the event. *************** *** 7131,7138 **** File: bashref.info, Node: Modifiers, Prev: Word Designators, Up: History Interaction ! Modifiers ! --------- ! After the optional word designator, you can add a sequence of one or more of the following modifiers, each preceded by a `:'. --- 7504,7511 ---- File: bashref.info, Node: Modifiers, Prev: Word Designators, Up: History Interaction ! 9.3.3 Modifiers ! --------------- ! After the optional word designator, you can add a sequence of one or more of the following modifiers, each preceded by a `:'. *************** *** 7172,7189 **** `g' Cause changes to be applied over the entire event line. Used in conjunction with `s', as in `gs/OLD/NEW/', or with `&'.  File: bashref.info, Node: Installing Bash, Next: Reporting Bugs, Prev: Command Line Editing, Up: Top ! Installing Bash ! *************** ! This chapter provides basic instructions for installing Bash on the various supported platforms. The distribution supports the GNU operating systems, nearly every version of Unix, and several non-Unix systems such as BeOS and Interix. Other independent ports exist for ! MS-DOS, OS/2, Windows 95/98, and Windows NT. * Menu: --- 7545,7567 ---- `g' + `a' Cause changes to be applied over the entire event line. Used in conjunction with `s', as in `gs/OLD/NEW/', or with `&'. + `G' + Apply the following `s' modifier once to each word in the event. + +  File: bashref.info, Node: Installing Bash, Next: Reporting Bugs, Prev: Command Line Editing, Up: Top ! 10 Installing Bash ! ****************** ! This chapter provides basic instructions for installing Bash on the various supported platforms. The distribution supports the GNU operating systems, nearly every version of Unix, and several non-Unix systems such as BeOS and Interix. Other independent ports exist for ! MS-DOS, OS/2, and Windows platforms. * Menu: *************** *** 7213,7220 **** File: bashref.info, Node: Basic Installation, Next: Compilers and Options, Up: Installing Bash ! Basic Installation ! ================== ! These are installation instructions for Bash. The simplest way to compile Bash is: --- 7591,7598 ---- File: bashref.info, Node: Basic Installation, Next: Compilers and Options, Up: Installing Bash ! 10.1 Basic Installation ! ======================= ! These are installation instructions for Bash. The simplest way to compile Bash is: *************** *** 7276,7283 **** File: bashref.info, Node: Compilers and Options, Next: Compiling For Multiple Architectures, Prev: Basic Installation, Up: Installing Bash ! Compilers and Options ! ===================== ! Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using --- 7654,7661 ---- File: bashref.info, Node: Compilers and Options, Next: Compiling For Multiple Architectures, Prev: Basic Installation, Up: Installing Bash ! 10.2 Compilers and Options ! ========================== ! Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using *************** *** 7296,7303 **** File: bashref.info, Node: Compiling For Multiple Architectures, Next: Installation Names, Prev: Compilers and Options, Up: Installing Bash ! Compiling For Multiple Architectures ! ==================================== ! You can compile Bash for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports --- 7674,7681 ---- File: bashref.info, Node: Compiling For Multiple Architectures, Next: Installation Names, Prev: Compilers and Options, Up: Installing Bash ! 10.3 Compiling For Multiple Architectures ! ========================================= ! You can compile Bash for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports *************** *** 7330,7337 **** File: bashref.info, Node: Installation Names, Next: Specifying the System Type, Prev: Compiling For Multiple Architectures, Up: Installing Bash ! Installation Names ! ================== ! By default, `make install' will install into `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH', or --- 7708,7715 ---- File: bashref.info, Node: Installation Names, Next: Specifying the System Type, Prev: Compiling For Multiple Architectures, Up: Installing Bash ! 10.4 Installation Names ! ======================= ! By default, `make install' will install into `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH', or *************** *** 7348,7355 **** File: bashref.info, Node: Specifying the System Type, Next: Sharing Defaults, Prev: Installation Names, Up: Installing Bash ! Specifying the System Type ! ========================== ! There may be some features `configure' can not figure out automatically, but need to determine by the type of host Bash will run on. Usually `configure' can figure that out, but if it prints a --- 7726,7733 ---- File: bashref.info, Node: Specifying the System Type, Next: Sharing Defaults, Prev: Installation Names, Up: Installing Bash ! 10.5 Specifying the System Type ! =============================== ! There may be some features `configure' can not figure out automatically, but need to determine by the type of host Bash will run on. Usually `configure' can figure that out, but if it prints a *************** *** 7365,7375 **** File: bashref.info, Node: Sharing Defaults, Next: Operation Controls, Prev: Specifying the System Type, Up: Installing Bash ! Sharing Defaults ! ================ ! If you want to set default values for `configure' scripts to share, ! you can create a site shell script called `config.site' that gives ! default values for variables like `CC', `cache_file', and `prefix'. ! `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. --- 7743,7753 ---- File: bashref.info, Node: Sharing Defaults, Next: Operation Controls, Prev: Specifying the System Type, Up: Installing Bash ! 10.6 Sharing Defaults ! ===================== ! If you want to set default values for `configure' scripts to share, you ! can create a site shell script called `config.site' that gives default ! values for variables like `CC', `cache_file', and `prefix'. `configure' ! looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. *************** *** 7380,7388 **** File: bashref.info, Node: Operation Controls, Next: Optional Features, Prev: Sharing Defaults, Up: Installing Bash ! Operation Controls ! ================== ! `configure' recognizes the following options to control how it ! operates. `--cache-file=FILE' --- 7758,7765 ---- File: bashref.info, Node: Operation Controls, Next: Optional Features, Prev: Sharing Defaults, Up: Installing Bash ! 10.7 Operation Controls ! ======================= ! `configure' recognizes the following options to control how it operates. `--cache-file=FILE' *************** *** 7413,7424 **** File: bashref.info, Node: Optional Features, Prev: Operation Controls, Up: Installing Bash ! Optional Features ! ================= ! The Bash `configure' has a number of `--enable-FEATURE' options, ! where FEATURE indicates an optional part of Bash. There are also ! several `--with-PACKAGE' options, where PACKAGE is something like ! `bash-malloc' or `purify'. To turn off the default use of a package, ! use `--without-PACKAGE'. To configure Bash without a feature that is enabled by default, use `--disable-FEATURE'. --- 7790,7801 ---- File: bashref.info, Node: Optional Features, Prev: Operation Controls, Up: Installing Bash ! 10.8 Optional Features ! ====================== ! The Bash `configure' has a number of `--enable-FEATURE' options, where ! FEATURE indicates an optional part of Bash. There are also several ! `--with-PACKAGE' options, where PACKAGE is something like `bash-malloc' ! or `purify'. To turn off the default use of a package, use ! `--without-PACKAGE'. To configure Bash without a feature that is enabled by default, use `--disable-FEATURE'. *************** *** 7522,7526 **** `--enable-cond-command' ! Include support for the `[[' conditional command (*note Conditional Constructs::). --- 7899,7908 ---- `--enable-cond-command' ! Include support for the `[[' conditional command. (*note ! Conditional Constructs::). ! ! `--enable-cond-regexp' ! Include support for matching POSIX regular expressions using the ! `=~' binary operator in the `[[' conditional command. (*note Conditional Constructs::). *************** *** 7555,7558 **** --- 7937,7944 ---- the operating system supports them. + `--enable-multibyte' + This enables support for multibyte characters if the operating + system provides the necessary support. + `--enable-net-redirections' This enables the special handling of filenames of the form *************** *** 7599,7602 **** --- 7985,7989 ---- description of the escape sequences that `echo' recognizes. + The file `config-top.h' contains C Preprocessor `#define' statements for options which are not settable from `configure'. Some of these are *************** *** 7608,7617 **** File: bashref.info, Node: Reporting Bugs, Next: Major Differences From The Bourne Shell, Prev: Installing Bash, Up: Top ! Reporting Bugs ! ************** ! Please report all bugs you find in Bash. But first, you should make sure that it really is a bug, and that it appears in the latest version ! of Bash that you have. Once you have determined that a bug actually exists, use the --- 7995,8005 ---- File: bashref.info, Node: Reporting Bugs, Next: Major Differences From The Bourne Shell, Prev: Installing Bash, Up: Top ! Appendix A Reporting Bugs ! ************************* ! Please report all bugs you find in Bash. But first, you should make sure that it really is a bug, and that it appears in the latest version ! of Bash. The latest version of Bash is always available for FTP from ! `ftp://ftp.gnu.org/pub/bash/'. Once you have determined that a bug actually exists, use the *************** *** 7639,7648 ****  ! File: bashref.info, Node: Major Differences From The Bourne Shell, Next: Builtin Index, Prev: Reporting Bugs, Up: Top ! Major Differences From The Bourne Shell ! *************************************** ! Bash implements essentially the same grammar, parameter and variable expansion, redirection, and quoting as the Bourne Shell. Bash uses the POSIX 1003.2 standard as the specification of how these features are to --- 8027,8036 ----  ! File: bashref.info, Node: Major Differences From The Bourne Shell, Next: Copying This Manual, Prev: Reporting Bugs, Up: Top ! Appendix B Major Differences From The Bourne Shell ! ************************************************** ! Bash implements essentially the same grammar, parameter and variable expansion, redirection, and quoting as the Bourne Shell. Bash uses the POSIX 1003.2 standard as the specification of how these features are to *************** *** 7667,7671 **** * Bash has command history (*note Bash History Facilities::) and the ! `history' and `fc' builtins to manipulate it. * Bash implements `csh'-like history expansion (*note History --- 8055,8061 ---- * Bash has command history (*note Bash History Facilities::) and the ! `history' and `fc' builtins to manipulate it. The Bash history ! list maintains timestamp information and uses the value of the ! `HISTTIMEFORMAT' variable to display it. * Bash implements `csh'-like history expansion (*note History *************** *** 7863,7875 **** builtin (*note The Set Builtin::). * The `test' builtin (*note Bourne Shell Builtins::) is slightly different, as it implements the POSIX algorithm, which specifies the behavior based on the number of arguments. * The `trap' builtin (*note Bourne Shell Builtins::) allows a `DEBUG' pseudo-signal specification, similar to `EXIT'. Commands ! specified with a `DEBUG' trap are executed after every simple ! command. The `DEBUG' trap is not inherited by shell functions ! unless the function has been given the `trace' attribute. The `trap' builtin (*note Bourne Shell Builtins::) allows an `ERR' --- 8253,8279 ---- builtin (*note The Set Builtin::). + * The `-x' (`xtrace') option displays commands other than simple + commands when performing an execution trace (*note The Set + Builtin::). + * The `test' builtin (*note Bourne Shell Builtins::) is slightly different, as it implements the POSIX algorithm, which specifies the behavior based on the number of arguments. + * Bash includes the `caller' builtin, which displays the context of + any active subroutine call (a shell function or a script executed + with the `.' or `source' builtins). This supports the bash + debugger. + * The `trap' builtin (*note Bourne Shell Builtins::) allows a `DEBUG' pseudo-signal specification, similar to `EXIT'. Commands ! specified with a `DEBUG' trap are executed before every simple ! command, `for' command, `case' command, `select' command, every ! arithmetic `for' command, and before the first command executes in ! a shell function. The `DEBUG' trap is not inherited by shell ! functions unless the function has been given the `trace' attribute ! or the `functrace' option has been enabled using the `shopt' ! builtin. The `extdebug' shell option has additional effects on the ! `DEBUG' trap. The `trap' builtin (*note Bourne Shell Builtins::) allows an `ERR' *************** *** 7877,7880 **** --- 8281,8292 ---- Commands specified with an `ERR' trap are executed after a simple command fails, with a few exceptions. The `ERR' trap is not + inherited by shell functions unless the `-o errtrace' option to + the `set' builtin is enabled. + + The `trap' builtin (*note Bourne Shell Builtins::) allows a + `RETURN' pseudo-signal specification, similar to `EXIT' and + `DEBUG'. Commands specified with an `RETURN' trap are executed + before execution resumes after a shell function or a shell script + executed with `.' or `source' returns. The `RETURN' trap is not inherited by shell functions. *************** *** 7914,7922 **** More features unique to Bash may be found in *Note Bash Features::. ! Implementation Differences From The SVR4.2 Shell ! ================================================ ! Since Bash is a completely new implementation, it does not suffer ! from many of the limitations of the SVR4.2 shell. For instance: * Bash does not fork a subshell when redirecting into or out of a --- 8326,8334 ---- More features unique to Bash may be found in *Note Bash Features::. ! B.1 Implementation Differences From The SVR4.2 Shell ! ==================================================== ! Since Bash is a completely new implementation, it does not suffer from ! many of the limitations of the SVR4.2 shell. For instance: * Bash does not fork a subshell when redirecting into or out of a *************** *** 7959,8024 ****  ! File: bashref.info, Node: Builtin Index, Next: Reserved Word Index, Prev: Major Differences From The Bourne Shell, Up: Top Index of Shell Builtin Commands ******************************* * Menu: * .: Bourne Shell Builtins. * :: Bourne Shell Builtins. * [: Bourne Shell Builtins. ! * alias: Bash Builtins. * bg: Job Control Builtins. ! * bind: Bash Builtins. * break: Bourne Shell Builtins. ! * builtin: Bash Builtins. * cd: Bourne Shell Builtins. ! * command: Bash Builtins. * compgen: Programmable Completion Builtins. * complete: Programmable Completion Builtins. * continue: Bourne Shell Builtins. ! * declare: Bash Builtins. * dirs: Directory Stack Builtins. * disown: Job Control Builtins. ! * echo: Bash Builtins. ! * enable: Bash Builtins. * eval: Bourne Shell Builtins. * exec: Bourne Shell Builtins. * exit: Bourne Shell Builtins. * export: Bourne Shell Builtins. * fc: Bash History Builtins. * fg: Job Control Builtins. * getopts: Bourne Shell Builtins. * hash: Bourne Shell Builtins. ! * help: Bash Builtins. * history: Bash History Builtins. * jobs: Job Control Builtins. * kill: Job Control Builtins. ! * let: Bash Builtins. ! * local: Bash Builtins. ! * logout: Bash Builtins. * popd: Directory Stack Builtins. ! * printf: Bash Builtins. * pushd: Directory Stack Builtins. * pwd: Bourne Shell Builtins. ! * read: Bash Builtins. * readonly: Bourne Shell Builtins. * return: Bourne Shell Builtins. ! * set: The Set Builtin. * shift: Bourne Shell Builtins. ! * shopt: Bash Builtins. ! * source: Bash Builtins. * suspend: Job Control Builtins. * test: Bourne Shell Builtins. * times: Bourne Shell Builtins. * trap: Bourne Shell Builtins. ! * type: Bash Builtins. ! * typeset: Bash Builtins. ! * ulimit: Bash Builtins. * umask: Bourne Shell Builtins. ! * unalias: Bash Builtins. * unset: Bourne Shell Builtins. * wait: Job Control Builtins.  --- 8371,8915 ----  ! File: bashref.info, Node: Copying This Manual, Next: Builtin Index, Prev: Major Differences From The Bourne Shell, Up: Top ! ! Appendix C Copying This Manual ! ****************************** ! ! * Menu: ! ! * GNU Free Documentation License:: License for copying this manual. ! !  ! File: bashref.info, Node: GNU Free Documentation License, Up: Copying This Manual ! ! C.1 GNU Free Documentation License ! ================================== ! ! Version 1.2, November 2002 ! ! Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. ! 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA ! ! Everyone is permitted to copy and distribute verbatim copies ! of this license document, but changing it is not allowed. ! ! 0. PREAMBLE ! ! The purpose of this License is to make a manual, textbook, or other ! functional and useful document "free" in the sense of freedom: to ! assure everyone the effective freedom to copy and redistribute it, ! with or without modifying it, either commercially or ! noncommercially. Secondarily, this License preserves for the ! author and publisher a way to get credit for their work, while not ! being considered responsible for modifications made by others. ! ! This License is a kind of "copyleft", which means that derivative ! works of the document must themselves be free in the same sense. ! It complements the GNU General Public License, which is a copyleft ! license designed for free software. ! ! We have designed this License in order to use it for manuals for ! free software, because free software needs free documentation: a ! free program should come with manuals providing the same freedoms ! that the software does. But this License is not limited to ! software manuals; it can be used for any textual work, regardless ! of subject matter or whether it is published as a printed book. ! We recommend this License principally for works whose purpose is ! instruction or reference. ! ! 1. APPLICABILITY AND DEFINITIONS ! ! This License applies to any manual or other work, in any medium, ! that contains a notice placed by the copyright holder saying it ! can be distributed under the terms of this License. Such a notice ! grants a world-wide, royalty-free license, unlimited in duration, ! to use that work under the conditions stated herein. The ! "Document", below, refers to any such manual or work. Any member ! of the public is a licensee, and is addressed as "you". You ! accept the license if you copy, modify or distribute the work in a ! way requiring permission under copyright law. ! ! A "Modified Version" of the Document means any work containing the ! Document or a portion of it, either copied verbatim, or with ! modifications and/or translated into another language. ! ! A "Secondary Section" is a named appendix or a front-matter section ! of the Document that deals exclusively with the relationship of the ! publishers or authors of the Document to the Document's overall ! subject (or to related matters) and contains nothing that could ! fall directly within that overall subject. (Thus, if the Document ! is in part a textbook of mathematics, a Secondary Section may not ! explain any mathematics.) The relationship could be a matter of ! historical connection with the subject or with related matters, or ! of legal, commercial, philosophical, ethical or political position ! regarding them. ! ! The "Invariant Sections" are certain Secondary Sections whose ! titles are designated, as being those of Invariant Sections, in ! the notice that says that the Document is released under this ! License. If a section does not fit the above definition of ! Secondary then it is not allowed to be designated as Invariant. ! The Document may contain zero Invariant Sections. If the Document ! does not identify any Invariant Sections then there are none. ! ! The "Cover Texts" are certain short passages of text that are ! listed, as Front-Cover Texts or Back-Cover Texts, in the notice ! that says that the Document is released under this License. A ! Front-Cover Text may be at most 5 words, and a Back-Cover Text may ! be at most 25 words. ! ! A "Transparent" copy of the Document means a machine-readable copy, ! represented in a format whose specification is available to the ! general public, that is suitable for revising the document ! straightforwardly with generic text editors or (for images ! composed of pixels) generic paint programs or (for drawings) some ! widely available drawing editor, and that is suitable for input to ! text formatters or for automatic translation to a variety of ! formats suitable for input to text formatters. A copy made in an ! otherwise Transparent file format whose markup, or absence of ! markup, has been arranged to thwart or discourage subsequent ! modification by readers is not Transparent. An image format is ! not Transparent if used for any substantial amount of text. A ! copy that is not "Transparent" is called "Opaque". ! ! Examples of suitable formats for Transparent copies include plain ! ASCII without markup, Texinfo input format, LaTeX input format, ! SGML or XML using a publicly available DTD, and ! standard-conforming simple HTML, PostScript or PDF designed for ! human modification. Examples of transparent image formats include ! PNG, XCF and JPG. Opaque formats include proprietary formats that ! can be read and edited only by proprietary word processors, SGML or ! XML for which the DTD and/or processing tools are not generally ! available, and the machine-generated HTML, PostScript or PDF ! produced by some word processors for output purposes only. ! ! The "Title Page" means, for a printed book, the title page itself, ! plus such following pages as are needed to hold, legibly, the ! material this License requires to appear in the title page. For ! works in formats which do not have any title page as such, "Title ! Page" means the text near the most prominent appearance of the ! work's title, preceding the beginning of the body of the text. ! ! A section "Entitled XYZ" means a named subunit of the Document ! whose title either is precisely XYZ or contains XYZ in parentheses ! following text that translates XYZ in another language. (Here XYZ ! stands for a specific section name mentioned below, such as ! "Acknowledgements", "Dedications", "Endorsements", or "History".) ! To "Preserve the Title" of such a section when you modify the ! Document means that it remains a section "Entitled XYZ" according ! to this definition. ! ! The Document may include Warranty Disclaimers next to the notice ! which states that this License applies to the Document. These ! Warranty Disclaimers are considered to be included by reference in ! this License, but only as regards disclaiming warranties: any other ! implication that these Warranty Disclaimers may have is void and ! has no effect on the meaning of this License. ! ! 2. VERBATIM COPYING ! ! You may copy and distribute the Document in any medium, either ! commercially or noncommercially, provided that this License, the ! copyright notices, and the license notice saying this License ! applies to the Document are reproduced in all copies, and that you ! add no other conditions whatsoever to those of this License. You ! may not use technical measures to obstruct or control the reading ! or further copying of the copies you make or distribute. However, ! you may accept compensation in exchange for copies. If you ! distribute a large enough number of copies you must also follow ! the conditions in section 3. ! ! You may also lend copies, under the same conditions stated above, ! and you may publicly display copies. ! ! 3. COPYING IN QUANTITY ! ! If you publish printed copies (or copies in media that commonly ! have printed covers) of the Document, numbering more than 100, and ! the Document's license notice requires Cover Texts, you must ! enclose the copies in covers that carry, clearly and legibly, all ! these Cover Texts: Front-Cover Texts on the front cover, and ! Back-Cover Texts on the back cover. Both covers must also clearly ! and legibly identify you as the publisher of these copies. The ! front cover must present the full title with all words of the ! title equally prominent and visible. You may add other material ! on the covers in addition. Copying with changes limited to the ! covers, as long as they preserve the title of the Document and ! satisfy these conditions, can be treated as verbatim copying in ! other respects. ! ! If the required texts for either cover are too voluminous to fit ! legibly, you should put the first ones listed (as many as fit ! reasonably) on the actual cover, and continue the rest onto ! adjacent pages. ! ! If you publish or distribute Opaque copies of the Document ! numbering more than 100, you must either include a ! machine-readable Transparent copy along with each Opaque copy, or ! state in or with each Opaque copy a computer-network location from ! which the general network-using public has access to download ! using public-standard network protocols a complete Transparent ! copy of the Document, free of added material. If you use the ! latter option, you must take reasonably prudent steps, when you ! begin distribution of Opaque copies in quantity, to ensure that ! this Transparent copy will remain thus accessible at the stated ! location until at least one year after the last time you ! distribute an Opaque copy (directly or through your agents or ! retailers) of that edition to the public. ! ! It is requested, but not required, that you contact the authors of ! the Document well before redistributing any large number of ! copies, to give them a chance to provide you with an updated ! version of the Document. ! ! 4. MODIFICATIONS ! ! You may copy and distribute a Modified Version of the Document ! under the conditions of sections 2 and 3 above, provided that you ! release the Modified Version under precisely this License, with ! the Modified Version filling the role of the Document, thus ! licensing distribution and modification of the Modified Version to ! whoever possesses a copy of it. In addition, you must do these ! things in the Modified Version: ! ! A. Use in the Title Page (and on the covers, if any) a title ! distinct from that of the Document, and from those of ! previous versions (which should, if there were any, be listed ! in the History section of the Document). You may use the ! same title as a previous version if the original publisher of ! that version gives permission. ! ! B. List on the Title Page, as authors, one or more persons or ! entities responsible for authorship of the modifications in ! the Modified Version, together with at least five of the ! principal authors of the Document (all of its principal ! authors, if it has fewer than five), unless they release you ! from this requirement. ! ! C. State on the Title page the name of the publisher of the ! Modified Version, as the publisher. ! ! D. Preserve all the copyright notices of the Document. ! ! E. Add an appropriate copyright notice for your modifications ! adjacent to the other copyright notices. ! ! F. Include, immediately after the copyright notices, a license ! notice giving the public permission to use the Modified ! Version under the terms of this License, in the form shown in ! the Addendum below. ! ! G. Preserve in that license notice the full lists of Invariant ! Sections and required Cover Texts given in the Document's ! license notice. ! ! H. Include an unaltered copy of this License. ! ! I. Preserve the section Entitled "History", Preserve its Title, ! and add to it an item stating at least the title, year, new ! authors, and publisher of the Modified Version as given on ! the Title Page. If there is no section Entitled "History" in ! the Document, create one stating the title, year, authors, ! and publisher of the Document as given on its Title Page, ! then add an item describing the Modified Version as stated in ! the previous sentence. ! ! J. Preserve the network location, if any, given in the Document ! for public access to a Transparent copy of the Document, and ! likewise the network locations given in the Document for ! previous versions it was based on. These may be placed in ! the "History" section. You may omit a network location for a ! work that was published at least four years before the ! Document itself, or if the original publisher of the version ! it refers to gives permission. ! ! K. For any section Entitled "Acknowledgements" or "Dedications", ! Preserve the Title of the section, and preserve in the ! section all the substance and tone of each of the contributor ! acknowledgements and/or dedications given therein. ! ! L. Preserve all the Invariant Sections of the Document, ! unaltered in their text and in their titles. Section numbers ! or the equivalent are not considered part of the section ! titles. ! ! M. Delete any section Entitled "Endorsements". Such a section ! may not be included in the Modified Version. ! ! N. Do not retitle any existing section to be Entitled ! "Endorsements" or to conflict in title with any Invariant ! Section. ! ! O. Preserve any Warranty Disclaimers. ! ! If the Modified Version includes new front-matter sections or ! appendices that qualify as Secondary Sections and contain no ! material copied from the Document, you may at your option ! designate some or all of these sections as invariant. To do this, ! add their titles to the list of Invariant Sections in the Modified ! Version's license notice. These titles must be distinct from any ! other section titles. ! ! You may add a section Entitled "Endorsements", provided it contains ! nothing but endorsements of your Modified Version by various ! parties--for example, statements of peer review or that the text ! has been approved by an organization as the authoritative ! definition of a standard. ! ! You may add a passage of up to five words as a Front-Cover Text, ! and a passage of up to 25 words as a Back-Cover Text, to the end ! of the list of Cover Texts in the Modified Version. Only one ! passage of Front-Cover Text and one of Back-Cover Text may be ! added by (or through arrangements made by) any one entity. If the ! Document already includes a cover text for the same cover, ! previously added by you or by arrangement made by the same entity ! you are acting on behalf of, you may not add another; but you may ! replace the old one, on explicit permission from the previous ! publisher that added the old one. ! ! The author(s) and publisher(s) of the Document do not by this ! License give permission to use their names for publicity for or to ! assert or imply endorsement of any Modified Version. ! ! 5. COMBINING DOCUMENTS ! ! You may combine the Document with other documents released under ! this License, under the terms defined in section 4 above for ! modified versions, provided that you include in the combination ! all of the Invariant Sections of all of the original documents, ! unmodified, and list them all as Invariant Sections of your ! combined work in its license notice, and that you preserve all ! their Warranty Disclaimers. ! ! The combined work need only contain one copy of this License, and ! multiple identical Invariant Sections may be replaced with a single ! copy. If there are multiple Invariant Sections with the same name ! but different contents, make the title of each such section unique ! by adding at the end of it, in parentheses, the name of the ! original author or publisher of that section if known, or else a ! unique number. Make the same adjustment to the section titles in ! the list of Invariant Sections in the license notice of the ! combined work. ! ! In the combination, you must combine any sections Entitled ! "History" in the various original documents, forming one section ! Entitled "History"; likewise combine any sections Entitled ! "Acknowledgements", and any sections Entitled "Dedications". You ! must delete all sections Entitled "Endorsements." ! ! 6. COLLECTIONS OF DOCUMENTS ! ! You may make a collection consisting of the Document and other ! documents released under this License, and replace the individual ! copies of this License in the various documents with a single copy ! that is included in the collection, provided that you follow the ! rules of this License for verbatim copying of each of the ! documents in all other respects. ! ! You may extract a single document from such a collection, and ! distribute it individually under this License, provided you insert ! a copy of this License into the extracted document, and follow ! this License in all other respects regarding verbatim copying of ! that document. ! ! 7. AGGREGATION WITH INDEPENDENT WORKS ! ! A compilation of the Document or its derivatives with other ! separate and independent documents or works, in or on a volume of ! a storage or distribution medium, is called an "aggregate" if the ! copyright resulting from the compilation is not used to limit the ! legal rights of the compilation's users beyond what the individual ! works permit. When the Document is included an aggregate, this ! License does not apply to the other works in the aggregate which ! are not themselves derivative works of the Document. ! ! If the Cover Text requirement of section 3 is applicable to these ! copies of the Document, then if the Document is less than one half ! of the entire aggregate, the Document's Cover Texts may be placed ! on covers that bracket the Document within the aggregate, or the ! electronic equivalent of covers if the Document is in electronic ! form. Otherwise they must appear on printed covers that bracket ! the whole aggregate. ! ! 8. TRANSLATION ! ! Translation is considered a kind of modification, so you may ! distribute translations of the Document under the terms of section ! 4. Replacing Invariant Sections with translations requires special ! permission from their copyright holders, but you may include ! translations of some or all Invariant Sections in addition to the ! original versions of these Invariant Sections. You may include a ! translation of this License, and all the license notices in the ! Document, and any Warranty Disclaimers, provided that you also ! include the original English version of this License and the ! original versions of those notices and disclaimers. In case of a ! disagreement between the translation and the original version of ! this License or a notice or disclaimer, the original version will ! prevail. ! ! If a section in the Document is Entitled "Acknowledgements", ! "Dedications", or "History", the requirement (section 4) to ! Preserve its Title (section 1) will typically require changing the ! actual title. ! ! 9. TERMINATION ! ! You may not copy, modify, sublicense, or distribute the Document ! except as expressly provided for under this License. Any other ! attempt to copy, modify, sublicense or distribute the Document is ! void, and will automatically terminate your rights under this ! License. However, parties who have received copies, or rights, ! from you under this License will not have their licenses ! terminated so long as such parties remain in full compliance. ! ! 10. FUTURE REVISIONS OF THIS LICENSE ! ! The Free Software Foundation may publish new, revised versions of ! the GNU Free Documentation License from time to time. Such new ! versions will be similar in spirit to the present version, but may ! differ in detail to address new problems or concerns. See ! `http://www.gnu.org/copyleft/'. ! ! Each version of the License is given a distinguishing version ! number. If the Document specifies that a particular numbered ! version of this License "or any later version" applies to it, you ! have the option of following the terms and conditions either of ! that specified version or of any later version that has been ! published (not as a draft) by the Free Software Foundation. If ! the Document does not specify a version number of this License, ! you may choose any version ever published (not as a draft) by the ! Free Software Foundation. ! ! C.1.1 ADDENDUM: How to use this License for your documents ! ---------------------------------------------------------- ! ! To use this License in a document you have written, include a copy of ! the License in the document and put the following copyright and license ! notices just after the title page: ! ! Copyright (C) YEAR YOUR NAME. ! Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.2 ! or any later version published by the Free Software Foundation; ! with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. ! A copy of the license is included in the section entitled ``GNU ! Free Documentation License''. ! ! If you have Invariant Sections, Front-Cover Texts and Back-Cover ! Texts, replace the "with...Texts." line with this: ! ! with the Invariant Sections being LIST THEIR TITLES, with ! the Front-Cover Texts being LIST, and with the Back-Cover Texts ! being LIST. ! ! If you have Invariant Sections without Cover Texts, or some other ! combination of the three, merge those two alternatives to suit the ! situation. ! ! If your document contains nontrivial examples of program code, we ! recommend releasing these examples in parallel under your choice of ! free software license, such as the GNU General Public License, to ! permit their use in free software. ! !  ! File: bashref.info, Node: Builtin Index, Next: Reserved Word Index, Prev: Copying This Manual, Up: Top Index of Shell Builtin Commands ******************************* + [index] * Menu: * .: Bourne Shell Builtins. + (line 16) * :: Bourne Shell Builtins. + (line 11) * [: Bourne Shell Builtins. ! (line 212) ! * alias: Bash Builtins. (line 11) * bg: Job Control Builtins. ! (line 7) ! * bind: Bash Builtins. (line 21) * break: Bourne Shell Builtins. ! (line 29) ! * builtin: Bash Builtins. (line 92) ! * caller: Bash Builtins. (line 100) * cd: Bourne Shell Builtins. ! (line 36) ! * command: Bash Builtins. (line 117) * compgen: Programmable Completion Builtins. + (line 10) * complete: Programmable Completion Builtins. + (line 28) * continue: Bourne Shell Builtins. ! (line 55) ! * declare: Bash Builtins. (line 136) * dirs: Directory Stack Builtins. + (line 7) * disown: Job Control Builtins. ! (line 83) ! * echo: Bash Builtins. (line 191) ! * enable: Bash Builtins. (line 244) * eval: Bourne Shell Builtins. + (line 63) * exec: Bourne Shell Builtins. + (line 70) * exit: Bourne Shell Builtins. + (line 82) * export: Bourne Shell Builtins. + (line 88) * fc: Bash History Builtins. + (line 10) * fg: Job Control Builtins. + (line 16) * getopts: Bourne Shell Builtins. + (line 103) * hash: Bourne Shell Builtins. ! (line 145) ! * help: Bash Builtins. (line 272) * history: Bash History Builtins. + (line 39) * jobs: Job Control Builtins. + (line 25) * kill: Job Control Builtins. ! (line 57) ! * let: Bash Builtins. (line 281) ! * local: Bash Builtins. (line 288) ! * logout: Bash Builtins. (line 298) * popd: Directory Stack Builtins. ! (line 37) ! * printf: Bash Builtins. (line 302) * pushd: Directory Stack Builtins. + (line 58) * pwd: Bourne Shell Builtins. ! (line 163) ! * read: Bash Builtins. (line 324) * readonly: Bourne Shell Builtins. + (line 172) * return: Bourne Shell Builtins. ! (line 187) ! * set: The Set Builtin. (line 9) * shift: Bourne Shell Builtins. ! (line 200) ! * shopt: Bash Builtins. (line 385) ! * source: Bash Builtins. (line 600) * suspend: Job Control Builtins. + (line 94) * test: Bourne Shell Builtins. + (line 212) * times: Bourne Shell Builtins. + (line 276) * trap: Bourne Shell Builtins. ! (line 281) ! * type: Bash Builtins. (line 604) ! * typeset: Bash Builtins. (line 635) ! * ulimit: Bash Builtins. (line 641) * umask: Bourne Shell Builtins. ! (line 322) ! * unalias: Bash Builtins. (line 703) * unset: Bourne Shell Builtins. + (line 339) * wait: Job Control Builtins. + (line 73)  *************** *** 8028,8054 **** ***************************** * Menu: ! * !: Pipelines. * [[: Conditional Constructs. * ]]: Conditional Constructs. * case: Conditional Constructs. ! * do: Looping Constructs. ! * done: Looping Constructs. * elif: Conditional Constructs. * else: Conditional Constructs. * esac: Conditional Constructs. * fi: Conditional Constructs. ! * for: Looping Constructs. ! * function: Shell Functions. * if: Conditional Constructs. * in: Conditional Constructs. * select: Conditional Constructs. * then: Conditional Constructs. ! * time: Pipelines. ! * until: Looping Constructs. ! * while: Looping Constructs. ! * {: Command Grouping. ! * }: Command Grouping.  --- 8919,8957 ---- ***************************** + [index] * Menu: ! * !: Pipelines. (line 8) * [[: Conditional Constructs. + (line 105) * ]]: Conditional Constructs. + (line 105) * case: Conditional Constructs. ! (line 28) ! * do: Looping Constructs. (line 12) ! * done: Looping Constructs. (line 12) * elif: Conditional Constructs. + (line 7) * else: Conditional Constructs. + (line 7) * esac: Conditional Constructs. + (line 28) * fi: Conditional Constructs. ! (line 7) ! * for: Looping Constructs. (line 29) ! * function: Shell Functions. (line 13) * if: Conditional Constructs. + (line 7) * in: Conditional Constructs. + (line 28) * select: Conditional Constructs. + (line 64) * then: Conditional Constructs. ! (line 7) ! * time: Pipelines. (line 8) ! * until: Looping Constructs. (line 12) ! * while: Looping Constructs. (line 20) ! * {: Command Grouping. (line 21) ! * }: Command Grouping. (line 21)  *************** *** 8058,8164 **** **************************** * Menu: ! * !: Special Parameters. ! * #: Special Parameters. ! * $: Special Parameters. ! * *: Special Parameters. ! * -: Special Parameters. ! * 0: Special Parameters. ! * ?: Special Parameters. ! * @: Special Parameters. ! * _: Special Parameters. * auto_resume: Job Control Variables. ! * BASH: Bash Variables. ! * BASH_ENV: Bash Variables. ! * BASH_VERSINFO: Bash Variables. ! * BASH_VERSION: Bash Variables. * bell-style: Readline Init File Syntax. * CDPATH: Bourne Shell Variables. ! * COLUMNS: Bash Variables. * comment-begin: Readline Init File Syntax. ! * COMP_CWORD: Bash Variables. ! * COMP_LINE: Bash Variables. ! * COMP_POINT: Bash Variables. ! * COMP_WORDS: Bash Variables. * completion-query-items: Readline Init File Syntax. ! * COMPREPLY: Bash Variables. * convert-meta: Readline Init File Syntax. ! * DIRSTACK: Bash Variables. * disable-completion: Readline Init File Syntax. * editing-mode: Readline Init File Syntax. * enable-keypad: Readline Init File Syntax. ! * EUID: Bash Variables. * expand-tilde: Readline Init File Syntax. ! * FCEDIT: Bash Variables. ! * FIGNORE: Bash Variables. ! * FUNCNAME: Bash Variables. ! * GLOBIGNORE: Bash Variables. ! * GROUPS: Bash Variables. ! * histchars: Bash Variables. ! * HISTCMD: Bash Variables. ! * HISTCONTROL: Bash Variables. ! * HISTFILE: Bash Variables. ! * HISTFILESIZE: Bash Variables. ! * HISTIGNORE: Bash Variables. * history-preserve-point: Readline Init File Syntax. ! * HISTSIZE: Bash Variables. * HOME: Bourne Shell Variables. * horizontal-scroll-mode: Readline Init File Syntax. ! * HOSTFILE: Bash Variables. ! * HOSTNAME: Bash Variables. ! * HOSTTYPE: Bash Variables. * IFS: Bourne Shell Variables. ! * IGNOREEOF: Bash Variables. * input-meta: Readline Init File Syntax. ! * INPUTRC: Bash Variables. * isearch-terminators: Readline Init File Syntax. * keymap: Readline Init File Syntax. ! * LANG: Bash Variables. ! * LC_ALL: Bash Variables. ! * LC_COLLATE: Bash Variables. ! * LC_CTYPE: Bash Variables. ! * LC_MESSAGES <1>: Locale Translation. ! * LC_MESSAGES: Bash Variables. ! * LC_NUMERIC: Bash Variables. ! * LINENO: Bash Variables. ! * LINES: Bash Variables. ! * MACHTYPE: Bash Variables. * MAIL: Bourne Shell Variables. ! * MAILCHECK: Bash Variables. * MAILPATH: Bourne Shell Variables. * mark-modified-lines: Readline Init File Syntax. * mark-symlinked-directories: Readline Init File Syntax. * match-hidden-files: Readline Init File Syntax. * meta-flag: Readline Init File Syntax. ! * OLDPWD: Bash Variables. * OPTARG: Bourne Shell Variables. ! * OPTERR: Bash Variables. * OPTIND: Bourne Shell Variables. ! * OSTYPE: Bash Variables. * output-meta: Readline Init File Syntax. * page-completions: Readline Init File Syntax. * PATH: Bourne Shell Variables. ! * PIPESTATUS: Bash Variables. ! * POSIXLY_CORRECT: Bash Variables. ! * PPID: Bash Variables. ! * PROMPT_COMMAND: Bash Variables. * PS1: Bourne Shell Variables. * PS2: Bourne Shell Variables. ! * PS3: Bash Variables. ! * PS4: Bash Variables. ! * PWD: Bash Variables. ! * RANDOM: Bash Variables. ! * REPLY: Bash Variables. ! * SECONDS: Bash Variables. ! * SHELLOPTS: Bash Variables. ! * SHLVL: Bash Variables. * show-all-if-ambiguous: Readline Init File Syntax. ! * TEXTDOMAIN: Locale Translation. ! * TEXTDOMAINDIR: Locale Translation. ! * TIMEFORMAT: Bash Variables. ! * TMOUT: Bash Variables. ! * UID: Bash Variables. * visible-stats: Readline Init File Syntax.  --- 8961,9114 ---- **************************** + [index] * Menu: ! * !: Special Parameters. (line 42) ! * #: Special Parameters. (line 26) ! * $: Special Parameters. (line 38) ! * *: Special Parameters. (line 9) ! * -: Special Parameters. (line 33) ! * 0: Special Parameters. (line 46) ! * ?: Special Parameters. (line 29) ! * @: Special Parameters. (line 19) ! * _: Special Parameters. (line 55) * auto_resume: Job Control Variables. ! (line 6) ! * BASH: Bash Variables. (line 13) ! * BASH_ARGC: Bash Variables. (line 16) ! * BASH_ARGV: Bash Variables. (line 24) ! * BASH_COMMAND: Bash Variables. (line 31) ! * BASH_ENV: Bash Variables. (line 36) ! * BASH_EXECUTION_STRING: Bash Variables. (line 42) ! * BASH_LINENO: Bash Variables. (line 45) ! * BASH_REMATCH: Bash Variables. (line 53) ! * BASH_SOURCE: Bash Variables. (line 61) ! * BASH_SUBSHELL: Bash Variables. (line 65) ! * BASH_VERSINFO: Bash Variables. (line 69) ! * BASH_VERSION: Bash Variables. (line 93) * bell-style: Readline Init File Syntax. + (line 34) * CDPATH: Bourne Shell Variables. ! (line 9) ! * COLUMNS: Bash Variables. (line 96) * comment-begin: Readline Init File Syntax. ! (line 41) ! * COMP_CWORD: Bash Variables. (line 101) ! * COMP_LINE: Bash Variables. (line 107) ! * COMP_POINT: Bash Variables. (line 112) ! * COMP_WORDBREAKS: Bash Variables. (line 120) ! * COMP_WORDS: Bash Variables. (line 126) * completion-query-items: Readline Init File Syntax. ! (line 51) ! * COMPREPLY: Bash Variables. (line 132) * convert-meta: Readline Init File Syntax. ! (line 60) ! * DIRSTACK: Bash Variables. (line 137) * disable-completion: Readline Init File Syntax. + (line 66) * editing-mode: Readline Init File Syntax. + (line 71) + * EMACS: Bash Variables. (line 147) * enable-keypad: Readline Init File Syntax. ! (line 77) ! * EUID: Bash Variables. (line 152) * expand-tilde: Readline Init File Syntax. ! (line 82) ! * FCEDIT: Bash Variables. (line 156) ! * FIGNORE: Bash Variables. (line 160) ! * FUNCNAME: Bash Variables. (line 166) ! * GLOBIGNORE: Bash Variables. (line 175) ! * GROUPS: Bash Variables. (line 181) ! * histchars: Bash Variables. (line 187) ! * HISTCMD: Bash Variables. (line 202) ! * HISTCONTROL: Bash Variables. (line 207) ! * HISTFILE: Bash Variables. (line 223) ! * HISTFILESIZE: Bash Variables. (line 227) ! * HISTIGNORE: Bash Variables. (line 234) * history-preserve-point: Readline Init File Syntax. ! (line 85) ! * HISTSIZE: Bash Variables. (line 253) ! * HISTTIMEFORMAT: Bash Variables. (line 257) * HOME: Bourne Shell Variables. + (line 13) * horizontal-scroll-mode: Readline Init File Syntax. ! (line 90) ! * HOSTFILE: Bash Variables. (line 264) ! * HOSTNAME: Bash Variables. (line 275) ! * HOSTTYPE: Bash Variables. (line 278) * IFS: Bourne Shell Variables. ! (line 18) ! * IGNOREEOF: Bash Variables. (line 281) * input-meta: Readline Init File Syntax. ! (line 97) ! * INPUTRC: Bash Variables. (line 291) * isearch-terminators: Readline Init File Syntax. + (line 104) * keymap: Readline Init File Syntax. ! (line 111) ! * LANG: Bash Variables. (line 295) ! * LC_ALL: Bash Variables. (line 299) ! * LC_COLLATE: Bash Variables. (line 303) ! * LC_CTYPE: Bash Variables. (line 310) ! * LC_MESSAGES <1>: Locale Translation. (line 11) ! * LC_MESSAGES: Bash Variables. (line 315) ! * LC_NUMERIC: Bash Variables. (line 319) ! * LINENO: Bash Variables. (line 323) ! * LINES: Bash Variables. (line 327) ! * MACHTYPE: Bash Variables. (line 332) * MAIL: Bourne Shell Variables. ! (line 22) ! * MAILCHECK: Bash Variables. (line 336) * MAILPATH: Bourne Shell Variables. + (line 27) * mark-modified-lines: Readline Init File Syntax. + (line 124) * mark-symlinked-directories: Readline Init File Syntax. + (line 129) * match-hidden-files: Readline Init File Syntax. + (line 134) * meta-flag: Readline Init File Syntax. ! (line 97) ! * OLDPWD: Bash Variables. (line 344) * OPTARG: Bourne Shell Variables. ! (line 34) ! * OPTERR: Bash Variables. (line 347) * OPTIND: Bourne Shell Variables. ! (line 38) ! * OSTYPE: Bash Variables. (line 351) * output-meta: Readline Init File Syntax. + (line 141) * page-completions: Readline Init File Syntax. + (line 146) * PATH: Bourne Shell Variables. ! (line 42) ! * PIPESTATUS: Bash Variables. (line 354) ! * POSIXLY_CORRECT: Bash Variables. (line 359) ! * PPID: Bash Variables. (line 368) ! * PROMPT_COMMAND: Bash Variables. (line 372) * PS1: Bourne Shell Variables. + (line 48) * PS2: Bourne Shell Variables. ! (line 53) ! * PS3: Bash Variables. (line 376) ! * PS4: Bash Variables. (line 381) ! * PWD: Bash Variables. (line 387) ! * RANDOM: Bash Variables. (line 390) ! * REPLY: Bash Variables. (line 395) ! * SECONDS: Bash Variables. (line 398) ! * SHELL: Bash Variables. (line 404) ! * SHELLOPTS: Bash Variables. (line 409) ! * SHLVL: Bash Variables. (line 418) * show-all-if-ambiguous: Readline Init File Syntax. ! (line 156) ! * show-all-if-unmodified: Readline Init File Syntax. ! (line 162) ! * TEXTDOMAIN: Locale Translation. (line 11) ! * TEXTDOMAINDIR: Locale Translation. (line 11) ! * TIMEFORMAT: Bash Variables. (line 423) ! * TMOUT: Bash Variables. (line 461) ! * UID: Bash Variables. (line 473) * visible-stats: Readline Init File Syntax. + (line 171)  *************** *** 8168,8243 **** ************** * Menu: * abort (C-g): Miscellaneous Commands. ! * accept-line (Newline or Return): Commands For History. ! * backward-char (C-b): Commands For Moving. ! * backward-delete-char (Rubout): Commands For Text. ! * backward-kill-line (C-x Rubout): Commands For Killing. ! * backward-kill-word (M-): Commands For Killing. ! * backward-word (M-b): Commands For Moving. ! * beginning-of-history (M-<): Commands For History. ! * beginning-of-line (C-a): Commands For Moving. ! * call-last-kbd-macro (C-x e): Keyboard Macros. ! * capitalize-word (M-c): Commands For Text. * character-search (C-]): Miscellaneous Commands. * character-search-backward (M-C-]): Miscellaneous Commands. ! * clear-screen (C-l): Commands For Moving. * complete (): Commands For Completion. ! * copy-backward-word (): Commands For Killing. ! * copy-forward-word (): Commands For Killing. ! * copy-region-as-kill (): Commands For Killing. ! * delete-char (C-d): Commands For Text. * delete-char-or-list (): Commands For Completion. ! * delete-horizontal-space (): Commands For Killing. ! * digit-argument (M-0, M-1, ... M--): Numeric Arguments. * do-uppercase-version (M-a, M-b, M-X, ...): Miscellaneous Commands. ! * downcase-word (M-l): Commands For Text. * dump-functions (): Miscellaneous Commands. * dump-macros (): Miscellaneous Commands. * dump-variables (): Miscellaneous Commands. ! * end-kbd-macro (C-x )): Keyboard Macros. ! * end-of-history (M->): Commands For History. ! * end-of-line (C-e): Commands For Moving. * exchange-point-and-mark (C-x C-x): Miscellaneous Commands. ! * forward-backward-delete-char (): Commands For Text. ! * forward-char (C-f): Commands For Moving. ! * forward-search-history (C-s): Commands For History. ! * forward-word (M-f): Commands For Moving. ! * history-search-backward (): Commands For History. ! * history-search-forward (): Commands For History. * insert-comment (M-#): Miscellaneous Commands. * insert-completions (M-*): Commands For Completion. ! * kill-line (C-k): Commands For Killing. ! * kill-region (): Commands For Killing. ! * kill-whole-line (): Commands For Killing. ! * kill-word (M-d): Commands For Killing. * menu-complete (): Commands For Completion. ! * next-history (C-n): Commands For History. * non-incremental-forward-search-history (M-n): Commands For History. * non-incremental-reverse-search-history (M-p): Commands For History. ! * overwrite-mode (): Commands For Text. * possible-completions (M-?): Commands For Completion. * prefix-meta (): Miscellaneous Commands. ! * previous-history (C-p): Commands For History. ! * quoted-insert (C-q or C-v): Commands For Text. * re-read-init-file (C-x C-r): Miscellaneous Commands. ! * redraw-current-line (): Commands For Moving. ! * reverse-search-history (C-r): Commands For History. * revert-line (M-r): Miscellaneous Commands. ! * self-insert (a, b, A, 1, !, ...): Commands For Text. * set-mark (C-@): Miscellaneous Commands. ! * start-kbd-macro (C-x (): Keyboard Macros. ! * transpose-chars (C-t): Commands For Text. ! * transpose-words (M-t): Commands For Text. * undo (C-_ or C-x C-u): Miscellaneous Commands. ! * universal-argument (): Numeric Arguments. ! * unix-line-discard (C-u): Commands For Killing. ! * unix-word-rubout (C-w): Commands For Killing. ! * upcase-word (M-u): Commands For Text. ! * yank (C-y): Commands For Killing. ! * yank-last-arg (M-. or M-_): Commands For History. ! * yank-nth-arg (M-C-y): Commands For History. ! * yank-pop (M-y): Commands For Killing.  --- 9118,9216 ---- ************** + [index] * Menu: * abort (C-g): Miscellaneous Commands. ! (line 10) ! * accept-line (Newline or Return): Commands For History. (line 6) ! * backward-char (C-b): Commands For Moving. (line 15) ! * backward-delete-char (Rubout): Commands For Text. (line 11) ! * backward-kill-line (C-x Rubout): Commands For Killing. (line 9) ! * backward-kill-word (M-): Commands For Killing. (line 24) ! * backward-word (M-b): Commands For Moving. (line 22) ! * beginning-of-history (M-<): Commands For History. (line 20) ! * beginning-of-line (C-a): Commands For Moving. (line 6) ! * call-last-kbd-macro (C-x e): Keyboard Macros. (line 13) ! * capitalize-word (M-c): Commands For Text. (line 46) * character-search (C-]): Miscellaneous Commands. + (line 41) * character-search-backward (M-C-]): Miscellaneous Commands. ! (line 46) ! * clear-screen (C-l): Commands For Moving. (line 26) * complete (): Commands For Completion. ! (line 6) ! * copy-backward-word (): Commands For Killing. (line 49) ! * copy-forward-word (): Commands For Killing. (line 54) ! * copy-region-as-kill (): Commands For Killing. (line 45) ! * delete-char (C-d): Commands For Text. (line 6) * delete-char-or-list (): Commands For Completion. ! (line 34) ! * delete-horizontal-space (): Commands For Killing. (line 37) ! * digit-argument (M-0, M-1, ... M--): Numeric Arguments. (line 6) * do-uppercase-version (M-a, M-b, M-X, ...): Miscellaneous Commands. ! (line 14) ! * downcase-word (M-l): Commands For Text. (line 42) * dump-functions (): Miscellaneous Commands. + (line 64) * dump-macros (): Miscellaneous Commands. + (line 76) * dump-variables (): Miscellaneous Commands. ! (line 70) ! * end-kbd-macro (C-x )): Keyboard Macros. (line 9) ! * end-of-history (M->): Commands For History. (line 23) ! * end-of-line (C-e): Commands For Moving. (line 9) * exchange-point-and-mark (C-x C-x): Miscellaneous Commands. ! (line 36) ! * forward-backward-delete-char (): Commands For Text. (line 15) ! * forward-char (C-f): Commands For Moving. (line 12) ! * forward-search-history (C-s): Commands For History. (line 31) ! * forward-word (M-f): Commands For Moving. (line 18) ! * history-search-backward (): Commands For History. (line 51) ! * history-search-forward (): Commands For History. (line 46) * insert-comment (M-#): Miscellaneous Commands. + (line 51) * insert-completions (M-*): Commands For Completion. ! (line 18) ! * kill-line (C-k): Commands For Killing. (line 6) ! * kill-region (): Commands For Killing. (line 41) ! * kill-whole-line (): Commands For Killing. (line 15) ! * kill-word (M-d): Commands For Killing. (line 19) * menu-complete (): Commands For Completion. ! (line 22) ! * next-history (C-n): Commands For History. (line 17) * non-incremental-forward-search-history (M-n): Commands For History. + (line 41) * non-incremental-reverse-search-history (M-p): Commands For History. ! (line 36) ! * overwrite-mode (): Commands For Text. (line 50) * possible-completions (M-?): Commands For Completion. + (line 15) * prefix-meta (): Miscellaneous Commands. ! (line 18) ! * previous-history (C-p): Commands For History. (line 13) ! * quoted-insert (C-q or C-v): Commands For Text. (line 20) * re-read-init-file (C-x C-r): Miscellaneous Commands. ! (line 6) ! * redraw-current-line (): Commands For Moving. (line 30) ! * reverse-search-history (C-r): Commands For History. (line 27) * revert-line (M-r): Miscellaneous Commands. ! (line 25) ! * self-insert (a, b, A, 1, !, ...): Commands For Text. (line 24) * set-mark (C-@): Miscellaneous Commands. ! (line 32) ! * start-kbd-macro (C-x (): Keyboard Macros. (line 6) ! * transpose-chars (C-t): Commands For Text. (line 27) ! * transpose-words (M-t): Commands For Text. (line 33) * undo (C-_ or C-x C-u): Miscellaneous Commands. ! (line 22) ! * universal-argument (): Numeric Arguments. (line 10) ! * unix-filename-rubout (): Commands For Killing. (line 32) ! * unix-line-discard (C-u): Commands For Killing. (line 12) ! * unix-word-rubout (C-w): Commands For Killing. (line 28) ! * upcase-word (M-u): Commands For Text. (line 38) ! * yank (C-y): Commands For Killing. (line 59) ! * yank-last-arg (M-. or M-_): Commands For History. (line 63) ! * yank-nth-arg (M-C-y): Commands For History. (line 56) ! * yank-pop (M-y): Commands For Killing. (line 62)  *************** *** 8247,8493 **** ************* * Menu: ! * alias expansion: Aliases. ! * arithmetic evaluation: Shell Arithmetic. * arithmetic expansion: Arithmetic Expansion. ! * arithmetic, shell: Shell Arithmetic. ! * arrays: Arrays. ! * background: Job Control Basics. ! * Bash configuration: Basic Installation. ! * Bash installation: Basic Installation. * Bourne shell: Basic Shell Features. ! * brace expansion: Brace Expansion. ! * builtin: Definitions. * command editing: Readline Bare Essentials. * command execution: Command Search and Execution. * command expansion: Simple Command Expansion. * command history: Bash History Facilities. * command search: Command Search and Execution. * command substitution: Command Substitution. ! * command timing: Pipelines. * commands, conditional: Conditional Constructs. ! * commands, grouping: Command Grouping. ! * commands, lists: Lists. ! * commands, looping: Looping Constructs. ! * commands, pipelines: Pipelines. ! * commands, shell: Shell Commands. ! * commands, simple: Simple Commands. ! * comments, shell: Comments. * completion builtins: Programmable Completion Builtins. ! * configuration: Basic Installation. ! * control operator: Definitions. ! * directory stack: The Directory Stack. * editing command lines: Readline Bare Essentials. ! * environment: Environment. ! * evaluation, arithmetic: Shell Arithmetic. ! * event designators: Event Designators. * execution environment: Command Execution Environment. ! * exit status <1>: Exit Status. ! * exit status: Definitions. ! * expansion: Shell Expansions. * expansion, arithmetic: Arithmetic Expansion. ! * expansion, brace: Brace Expansion. ! * expansion, filename: Filename Expansion. * expansion, parameter: Shell Parameter Expansion. ! * expansion, pathname: Filename Expansion. ! * expansion, tilde: Tilde Expansion. ! * expressions, arithmetic: Shell Arithmetic. * expressions, conditional: Bash Conditional Expressions. ! * field: Definitions. ! * filename: Definitions. ! * filename expansion: Filename Expansion. ! * foreground: Job Control Basics. ! * functions, shell: Shell Functions. * history builtins: Bash History Builtins. ! * history events: Event Designators. ! * history expansion: History Interaction. * history list: Bash History Facilities. * History, how to use: Programmable Completion Builtins. ! * identifier: Definitions. ! * initialization file, readline: Readline Init File. ! * installation: Basic Installation. * interaction, readline: Readline Interaction. ! * interactive shell <1>: Invoking Bash. ! * interactive shell: Interactive Shells. ! * internationalization: Locale Translation. ! * job: Definitions. ! * job control <1>: Job Control Basics. ! * job control: Definitions. * kill ring: Readline Killing Commands. * killing text: Readline Killing Commands. ! * localization: Locale Translation. ! * login shell: Invoking Bash. ! * matching, pattern: Pattern Matching. ! * metacharacter: Definitions. ! * name: Definitions. ! * native languages: Locale Translation. * notation, readline: Readline Bare Essentials. ! * operator, shell: Definitions. * parameter expansion: Shell Parameter Expansion. ! * parameters: Shell Parameters. * parameters, positional: Positional Parameters. ! * parameters, special: Special Parameters. ! * pathname expansion: Filename Expansion. ! * pattern matching: Pattern Matching. ! * pipeline: Pipelines. ! * POSIX: Definitions. ! * POSIX Mode: Bash POSIX Mode. ! * process group: Definitions. ! * process group ID: Definitions. * process substitution: Process Substitution. * programmable completion: Programmable Completion. ! * prompting: Printing a Prompt. ! * quoting: Quoting. ! * quoting, ANSI: ANSI-C Quoting. * Readline, how to use: Job Control Variables. ! * redirection: Redirections. ! * reserved word: Definitions. * restricted shell: The Restricted Shell. ! * return status: Definitions. ! * shell arithmetic: Shell Arithmetic. ! * shell function: Shell Functions. ! * shell script: Shell Scripts. ! * shell variable: Shell Parameters. ! * shell, interactive: Interactive Shells. ! * signal: Definitions. ! * signal handling: Signals. ! * special builtin <1>: Special Builtins. ! * special builtin: Definitions. ! * startup files: Bash Startup Files. ! * suspending jobs: Job Control Basics. ! * tilde expansion: Tilde Expansion. ! * token: Definitions. ! * translation, native languages: Locale Translation. ! * variable, shell: Shell Parameters. * variables, readline: Readline Init File Syntax. ! * word: Definitions. ! * word splitting: Word Splitting. * yanking text: Readline Killing Commands.  Tag Table: ! Node: Top1160 ! Node: Introduction3285 ! Node: What is Bash?3510 ! Node: What is a shell?4611 ! Node: Definitions6845 ! Node: Basic Shell Features9585 ! Node: Shell Syntax10809 ! Node: Shell Operation11833 ! Node: Quoting13118 ! Node: Escape Character14377 ! Node: Single Quotes14849 ! Node: Double Quotes15184 ! Node: ANSI-C Quoting16085 ! Node: Locale Translation17028 ! Node: Comments17911 ! Node: Shell Commands18516 ! Node: Simple Commands19397 ! Node: Pipelines20018 ! Node: Lists21554 ! Node: Looping Constructs23177 ! Node: Conditional Constructs25621 ! Node: Command Grouping31547 ! Node: Shell Functions32924 ! Node: Shell Parameters35460 ! Node: Positional Parameters37034 ! Node: Special Parameters37925 ! Node: Shell Expansions40583 ! Node: Brace Expansion42503 ! Node: Tilde Expansion44172 ! Node: Shell Parameter Expansion46503 ! Node: Command Substitution53303 ! Node: Arithmetic Expansion54625 ! Node: Process Substitution55469 ! Node: Word Splitting56506 ! Node: Filename Expansion57958 ! Node: Pattern Matching59916 ! Node: Quote Removal63140 ! Node: Redirections63426 ! Node: Executing Commands70900 ! Node: Simple Command Expansion71567 ! Node: Command Search and Execution73488 ! Node: Command Execution Environment75485 ! Node: Environment78192 ! Node: Exit Status79843 ! Node: Signals81038 ! Node: Shell Scripts82949 ! Node: Shell Builtin Commands85460 ! Node: Bourne Shell Builtins86890 ! Node: Bash Builtins102594 ! Node: The Set Builtin127866 ! Node: Special Builtins134847 ! Node: Shell Variables135819 ! Node: Bourne Shell Variables136255 ! Node: Bash Variables138034 ! Node: Bash Features154053 ! Node: Invoking Bash154935 ! Node: Bash Startup Files160399 ! Node: Interactive Shells165269 ! Node: What is an Interactive Shell?165671 ! Node: Is this Shell Interactive?166306 ! Node: Interactive Shell Behavior167112 ! Node: Bash Conditional Expressions170379 ! Node: Shell Arithmetic173798 ! Node: Aliases176236 ! Node: Arrays178739 ! Node: The Directory Stack181759 ! Node: Directory Stack Builtins182465 ! Node: Printing a Prompt185343 ! Node: The Restricted Shell187969 ! Node: Bash POSIX Mode189794 ! Node: Job Control195965 ! Node: Job Control Basics196431 ! Node: Job Control Builtins200711 ! Node: Job Control Variables205006 ! Node: Command Line Editing206155 ! Node: Introduction and Notation207153 ! Node: Readline Interaction208770 ! Node: Readline Bare Essentials209956 ! Node: Readline Movement Commands211736 ! Node: Readline Killing Commands212692 ! Node: Readline Arguments214600 ! Node: Searching215635 ! Node: Readline Init File217812 ! Node: Readline Init File Syntax218866 ! Node: Conditional Init Constructs230030 ! Node: Sample Init File232554 ! Node: Bindable Readline Commands235737 ! Node: Commands For Moving236936 ! Node: Commands For History237784 ! Node: Commands For Text240672 ! Node: Commands For Killing243332 ! Node: Numeric Arguments245282 ! Node: Commands For Completion246409 ! Node: Keyboard Macros249989 ! Node: Miscellaneous Commands250547 ! Node: Readline vi Mode255845 ! Node: Programmable Completion256754 ! Node: Programmable Completion Builtins262149 ! Node: Using History Interactively269370 ! Node: Bash History Facilities270049 ! Node: Bash History Builtins272609 ! Node: History Interaction276175 ! Node: Event Designators278726 ! Node: Word Designators279653 ! Node: Modifiers281282 ! Node: Installing Bash282599 ! Node: Basic Installation283741 ! Node: Compilers and Options286426 ! Node: Compiling For Multiple Architectures287160 ! Node: Installation Names288817 ! Node: Specifying the System Type289628 ! Node: Sharing Defaults290337 ! Node: Operation Controls291002 ! Node: Optional Features291953 ! Node: Reporting Bugs299895 ! Node: Major Differences From The Bourne Shell300992 ! Node: Builtin Index315476 ! Node: Reserved Word Index319067 ! Node: Variable Index320543 ! Node: Function Index326841 ! Node: Concept Index331391  End Tag Table --- 9220,9503 ---- ************* + [index] * Menu: ! * alias expansion: Aliases. (line 6) ! * arithmetic evaluation: Shell Arithmetic. (line 6) * arithmetic expansion: Arithmetic Expansion. ! (line 6) ! * arithmetic, shell: Shell Arithmetic. (line 6) ! * arrays: Arrays. (line 6) ! * background: Job Control Basics. (line 6) ! * Bash configuration: Basic Installation. (line 6) ! * Bash installation: Basic Installation. (line 6) * Bourne shell: Basic Shell Features. ! (line 6) ! * brace expansion: Brace Expansion. (line 6) ! * builtin: Definitions. (line 16) * command editing: Readline Bare Essentials. + (line 6) * command execution: Command Search and Execution. + (line 6) * command expansion: Simple Command Expansion. + (line 6) * command history: Bash History Facilities. + (line 6) * command search: Command Search and Execution. + (line 6) * command substitution: Command Substitution. ! (line 6) ! * command timing: Pipelines. (line 8) ! * commands, compound: Compound Commands. (line 6) * commands, conditional: Conditional Constructs. ! (line 6) ! * commands, grouping: Command Grouping. (line 6) ! * commands, lists: Lists. (line 6) ! * commands, looping: Looping Constructs. (line 6) ! * commands, pipelines: Pipelines. (line 6) ! * commands, shell: Shell Commands. (line 6) ! * commands, simple: Simple Commands. (line 6) ! * comments, shell: Comments. (line 6) * completion builtins: Programmable Completion Builtins. ! (line 6) ! * configuration: Basic Installation. (line 6) ! * control operator: Definitions. (line 20) ! * directory stack: The Directory Stack. (line 6) * editing command lines: Readline Bare Essentials. ! (line 6) ! * environment: Environment. (line 6) ! * evaluation, arithmetic: Shell Arithmetic. (line 6) ! * event designators: Event Designators. (line 6) * execution environment: Command Execution Environment. ! (line 6) ! * exit status <1>: Exit Status. (line 6) ! * exit status: Definitions. (line 24) ! * expansion: Shell Expansions. (line 6) * expansion, arithmetic: Arithmetic Expansion. ! (line 6) ! * expansion, brace: Brace Expansion. (line 6) ! * expansion, filename: Filename Expansion. (line 9) * expansion, parameter: Shell Parameter Expansion. ! (line 6) ! * expansion, pathname: Filename Expansion. (line 9) ! * expansion, tilde: Tilde Expansion. (line 6) ! * expressions, arithmetic: Shell Arithmetic. (line 6) * expressions, conditional: Bash Conditional Expressions. ! (line 6) ! * FDL, GNU Free Documentation License: GNU Free Documentation License. ! (line 6) ! * field: Definitions. (line 28) ! * filename: Definitions. (line 33) ! * filename expansion: Filename Expansion. (line 9) ! * foreground: Job Control Basics. (line 6) ! * functions, shell: Shell Functions. (line 6) * history builtins: Bash History Builtins. ! (line 6) ! * history events: Event Designators. (line 7) ! * history expansion: History Interaction. (line 6) * history list: Bash History Facilities. + (line 6) * History, how to use: Programmable Completion Builtins. ! (line 203) ! * identifier: Definitions. (line 49) ! * initialization file, readline: Readline Init File. (line 6) ! * installation: Basic Installation. (line 6) * interaction, readline: Readline Interaction. ! (line 6) ! * interactive shell <1>: Interactive Shells. (line 6) ! * interactive shell: Invoking Bash. (line 128) ! * internationalization: Locale Translation. (line 6) ! * job: Definitions. (line 36) ! * job control <1>: Definitions. (line 40) ! * job control: Job Control Basics. (line 6) * kill ring: Readline Killing Commands. + (line 19) * killing text: Readline Killing Commands. ! (line 6) ! * localization: Locale Translation. (line 6) ! * login shell: Invoking Bash. (line 125) ! * matching, pattern: Pattern Matching. (line 6) ! * metacharacter: Definitions. (line 44) ! * name: Definitions. (line 49) ! * native languages: Locale Translation. (line 6) * notation, readline: Readline Bare Essentials. ! (line 6) ! * operator, shell: Definitions. (line 55) * parameter expansion: Shell Parameter Expansion. ! (line 6) ! * parameters: Shell Parameters. (line 6) * parameters, positional: Positional Parameters. ! (line 6) ! * parameters, special: Special Parameters. (line 6) ! * pathname expansion: Filename Expansion. (line 9) ! * pattern matching: Pattern Matching. (line 6) ! * pipeline: Pipelines. (line 6) ! * POSIX: Definitions. (line 9) ! * POSIX Mode: Bash POSIX Mode. (line 6) ! * process group: Definitions. (line 59) ! * process group ID: Definitions. (line 63) * process substitution: Process Substitution. + (line 6) * programmable completion: Programmable Completion. ! (line 6) ! * prompting: Printing a Prompt. (line 6) ! * quoting: Quoting. (line 6) ! * quoting, ANSI: ANSI-C Quoting. (line 6) * Readline, how to use: Job Control Variables. ! (line 24) ! * redirection: Redirections. (line 6) ! * reserved word: Definitions. (line 67) * restricted shell: The Restricted Shell. ! (line 6) ! * return status: Definitions. (line 72) ! * shell arithmetic: Shell Arithmetic. (line 6) ! * shell function: Shell Functions. (line 6) ! * shell script: Shell Scripts. (line 6) ! * shell variable: Shell Parameters. (line 6) ! * shell, interactive: Interactive Shells. (line 6) ! * signal: Definitions. (line 75) ! * signal handling: Signals. (line 6) ! * special builtin <1>: Definitions. (line 79) ! * special builtin: Special Builtins. (line 6) ! * startup files: Bash Startup Files. (line 6) ! * suspending jobs: Job Control Basics. (line 6) ! * tilde expansion: Tilde Expansion. (line 6) ! * token: Definitions. (line 83) ! * translation, native languages: Locale Translation. (line 6) ! * variable, shell: Shell Parameters. (line 6) * variables, readline: Readline Init File Syntax. ! (line 33) ! * word: Definitions. (line 87) ! * word splitting: Word Splitting. (line 6) * yanking text: Readline Killing Commands. + (line 6)  Tag Table: ! Node: Top1349 ! Node: Introduction3485 ! Node: What is Bash?3714 ! Node: What is a shell?4807 ! Node: Definitions7348 ! Node: Basic Shell Features10089 ! Node: Shell Syntax11308 ! Node: Shell Operation12340 ! Node: Quoting13634 ! Node: Escape Character14908 ! Node: Single Quotes15393 ! Node: Double Quotes15741 ! Node: ANSI-C Quoting16767 ! Node: Locale Translation17723 ! Node: Comments18619 ! Node: Shell Commands19233 ! Node: Simple Commands19999 ! Node: Pipelines20630 ! Node: Lists22505 ! Node: Compound Commands24136 ! Node: Looping Constructs24920 ! Node: Conditional Constructs27367 ! Node: Command Grouping34434 ! Node: Shell Functions35883 ! Node: Shell Parameters40151 ! Node: Positional Parameters41732 ! Node: Special Parameters42632 ! Node: Shell Expansions45299 ! Node: Brace Expansion47224 ! Node: Tilde Expansion49549 ! Node: Shell Parameter Expansion51890 ! Node: Command Substitution59153 ! Node: Arithmetic Expansion60486 ! Node: Process Substitution61336 ! Node: Word Splitting62386 ! Node: Filename Expansion63847 ! Node: Pattern Matching65983 ! Node: Quote Removal69316 ! Node: Redirections69611 ! Node: Executing Commands77190 ! Node: Simple Command Expansion77865 ! Node: Command Search and Execution79795 ! Node: Command Execution Environment81801 ! Node: Environment84572 ! Node: Exit Status86232 ! Node: Signals87436 ! Node: Shell Scripts89400 ! Node: Shell Builtin Commands91918 ! Node: Bourne Shell Builtins93497 ! Node: Bash Builtins110450 ! Node: The Set Builtin138577 ! Node: Special Builtins146800 ! Node: Shell Variables147777 ! Node: Bourne Shell Variables148217 ! Node: Bash Variables150198 ! Node: Bash Features169913 ! Node: Invoking Bash170796 ! Node: Bash Startup Files176615 ! Node: Interactive Shells181473 ! Node: What is an Interactive Shell?181883 ! Node: Is this Shell Interactive?182533 ! Node: Interactive Shell Behavior183348 ! Node: Bash Conditional Expressions186624 ! Node: Shell Arithmetic190049 ! Node: Aliases192794 ! Node: Arrays195362 ! Node: The Directory Stack198393 ! Node: Directory Stack Builtins199107 ! Node: Printing a Prompt201998 ! Node: The Restricted Shell204712 ! Node: Bash POSIX Mode206544 ! Node: Job Control213197 ! Node: Job Control Basics213664 ! Node: Job Control Builtins217954 ! Node: Job Control Variables222274 ! Node: Command Line Editing223432 ! Node: Introduction and Notation224431 ! Node: Readline Interaction226053 ! Node: Readline Bare Essentials227244 ! Node: Readline Movement Commands229033 ! Node: Readline Killing Commands229998 ! Node: Readline Arguments231918 ! Node: Searching232962 ! Node: Readline Init File235148 ! Node: Readline Init File Syntax236207 ! Node: Conditional Init Constructs247860 ! Node: Sample Init File250393 ! Node: Bindable Readline Commands253510 ! Node: Commands For Moving254717 ! Node: Commands For History255578 ! Node: Commands For Text258479 ! Node: Commands For Killing261152 ! Node: Numeric Arguments263294 ! Node: Commands For Completion264433 ! Node: Keyboard Macros268026 ! Node: Miscellaneous Commands268597 ! Node: Readline vi Mode273908 ! Node: Programmable Completion274822 ! Node: Programmable Completion Builtins280634 ! Node: Using History Interactively288004 ! Node: Bash History Facilities288684 ! Node: Bash History Builtins291379 ! Node: History Interaction295236 ! Node: Event Designators297792 ! Node: Word Designators298807 ! Node: Modifiers300446 ! Node: Installing Bash301852 ! Node: Basic Installation302989 ! Node: Compilers and Options305681 ! Node: Compiling For Multiple Architectures306422 ! Node: Installation Names308086 ! Node: Specifying the System Type308904 ! Node: Sharing Defaults309620 ! Node: Operation Controls310293 ! Node: Optional Features311251 ! Node: Reporting Bugs319530 ! Node: Major Differences From The Bourne Shell320724 ! Node: Copying This Manual336496 ! Node: GNU Free Documentation License336772 ! Node: Builtin Index359178 ! Node: Reserved Word Index365727 ! Node: Variable Index368163 ! Node: Function Index378882 ! Node: Concept Index385602  End Tag Table diff -aNrc2 bash-2.05b-patched/doc/bashref.texi bash-3.0/doc/bashref.texi *** bash-2.05b-patched/doc/bashref.texi Mon Jul 15 15:21:24 2002 --- bash-3.0/doc/bashref.texi Sat Jun 26 14:26:07 2004 *************** *** 5,35 **** @c %**end of header - @ignore - Last Change: Mon Jul 15 15:21:16 EDT 2002 - @end ignore - - @set EDITION 2.5b - @set VERSION 2.05b - @set UPDATED 15 July 2002 - @set UPDATE-MONTH July 2002 - - @iftex - @finalout - @end iftex - @setchapternewpage odd - @defcodeindex bt - @defcodeindex rw - @set BashFeatures ! @ifinfo ! @dircategory Utilities ! @direntry ! * Bash: (bash). The GNU Bourne-Again SHell. ! @end direntry ! @format This text is a brief description of the features that are present in ! the Bash shell. This is Edition @value{EDITION}, last updated @value{UPDATED}, --- 5,15 ---- @c %**end of header @setchapternewpage odd ! @include version.texi ! @copying This text is a brief description of the features that are present in ! the Bash shell (version @value{VERSION}, @value{UPDATED}). This is Edition @value{EDITION}, last updated @value{UPDATED}, *************** *** 37,41 **** for @code{Bash}, Version @value{VERSION}. ! Copyright (C) 1991-2002 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of --- 17,21 ---- for @code{Bash}, Version @value{VERSION}. ! Copyright @copyright{} 1988-2004 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of *************** *** 43,64 **** are preserved on all copies. ! @ignore ! Permission is granted to process this file through TeX and print the ! results, provided the printed document carries copying permission ! notice identical to this one except for the removal of this paragraph ! (this paragraph not being relevant to the printed manual). ! ! @end ignore ! Permission is granted to copy and distribute modified versions of this ! manual under the conditions for verbatim copying, provided that the entire ! resulting derived work is distributed under the terms of a permission ! notice identical to this one. ! ! Permission is granted to copy and distribute translations of this manual ! into another language, under the above conditions for modified versions, ! except that this permission notice may be stated in a translation approved ! by the Free Software Foundation. ! @end format ! @end ifinfo @titlepage --- 23,50 ---- are preserved on all copies. ! @quotation ! Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.1 or ! any later version published by the Free Software Foundation; with no ! Invariant Sections, with the Front-Cover texts being ``A GNU Manual,'' ! and with the Back-Cover Texts as in (a) below. A copy of the license is ! included in the section entitled ``GNU Free Documentation License.'' ! ! (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify ! this GNU Manual, like GNU software. Copies published by the Free ! Software Foundation raise funds for GNU development.'' ! @end quotation ! @end copying ! ! @defcodeindex bt ! @defcodeindex rw ! @set BashFeatures ! ! @dircategory Basics ! @direntry ! * Bash: (bash). The GNU Bourne-Again SHell. ! @end direntry ! ! @finalout @titlepage *************** *** 66,99 **** @subtitle Reference Documentation for Bash @subtitle Edition @value{EDITION}, for @code{Bash} Version @value{VERSION}. ! @subtitle @value{UPDATE-MONTH} @author Chet Ramey, Case Western Reserve University @author Brian Fox, Free Software Foundation @page @vskip 0pt plus 1filll ! Copyright @copyright{} 1991-2002 Free Software Foundation, Inc. ! Permission is granted to make and distribute verbatim copies of ! this manual provided the copyright notice and this permission notice ! are preserved on all copies. - Permission is granted to copy and distribute modified versions of this - manual under the conditions for verbatim copying, provided that the entire - resulting derived work is distributed under the terms of a permission - notice identical to this one. - - Permission is granted to copy and distribute translations of this manual - into another language, under the above conditions for modified versions, - except that this permission notice may be stated in a translation approved - by the Free Software Foundation. @end titlepage ! @ifinfo @node Top, Introduction, (dir), (dir) @top Bash Features - @end ifinfo - @ifinfo This text is a brief description of the features that are present in ! the Bash shell. This is Edition @value{EDITION}, last updated @value{UPDATED}, --- 52,79 ---- @subtitle Reference Documentation for Bash @subtitle Edition @value{EDITION}, for @code{Bash} Version @value{VERSION}. ! @subtitle @value{UPDATED-MONTH} @author Chet Ramey, Case Western Reserve University @author Brian Fox, Free Software Foundation + @page @vskip 0pt plus 1filll ! @insertcopying ! @sp 1 ! Published by the Free Software Foundation @* ! 59 Temple Place, Suite 330, @* ! Boston, MA 02111-1307 @* ! USA @* @end titlepage ! @contents ! ! @ifnottex @node Top, Introduction, (dir), (dir) @top Bash Features This text is a brief description of the features that are present in ! the Bash shell (version @value{VERSION}, @value{UPDATED}).. This is Edition @value{EDITION}, last updated @value{UPDATED}, *************** *** 101,106 **** for @code{Bash}, Version @value{VERSION}. - Copyright (C) 1991-2002 Free Software Foundation, Inc. - Bash contains features that appear in other popular shells, and some features that only appear in Bash. Some of the shells that Bash has --- 81,84 ---- *************** *** 146,149 **** --- 124,129 ---- versions of /bin/sh. + * Copying This Manual:: Copying this manual. + * Builtin Index:: Index of Bash builtin commands. *************** *** 158,162 **** this manual. @end menu ! @end ifinfo @node Introduction --- 138,142 ---- this manual. @end menu ! @end ifnottex @node Introduction *************** *** 175,179 **** The name is an acronym for the @samp{Bourne-Again SHell}, a pun on Stephen Bourne, the author of the direct ancestor of ! the current Unix shell @code{/bin/sh}, which appeared in the Seventh Edition Bell Labs Research version of Unix. --- 155,159 ---- The name is an acronym for the @samp{Bourne-Again SHell}, a pun on Stephen Bourne, the author of the direct ancestor of ! the current Unix shell @code{sh}, which appeared in the Seventh Edition Bell Labs Research version of Unix. *************** *** 191,195 **** on nearly every version of Unix and a few other operating systems @minus{} independently-supported ports exist for @sc{ms-dos}, @sc{os/2}, ! Windows @sc{95/98}, and Windows @sc{nt}. @node What is a shell? --- 171,175 ---- on nearly every version of Unix and a few other operating systems @minus{} independently-supported ports exist for @sc{ms-dos}, @sc{os/2}, ! and Windows platforms. @node What is a shell? *************** *** 197,207 **** At its base, a shell is simply a macro processor that executes ! commands. A Unix shell is both a command interpreter, which ! provides the user interface to the rich set of @sc{gnu} utilities, ! and a programming language, allowing these utilitites to be ! combined. Files containing commands can be created, and become commands themselves. These new commands have the same status as system commands in directories such as @file{/bin}, allowing users ! or groups to establish custom environments. A shell allows execution of @sc{gnu} commands, both synchronously and --- 177,197 ---- At its base, a shell is simply a macro processor that executes ! commands. The term macro processor means functionality where text ! and symbols are expanded to create larger expressions. ! ! A Unix shell is both a command interpreter and a programming ! language. As a command interpreter, the shell provides the user ! interface to the rich set of @sc{gnu} utilities. The programming ! language features allow these utilitites to be combined. ! Files containing commands can be created, and become commands themselves. These new commands have the same status as system commands in directories such as @file{/bin}, allowing users ! or groups to establish custom environments to automate their common ! tasks. ! ! Shells may be used interactively or non-interactively. In ! interactive mode, they accept input typed from the keyboard. ! When executing non-interactively, shells execute commands read ! from a file. A shell allows execution of @sc{gnu} commands, both synchronously and *************** *** 214,219 **** Moreover, the shell allows control over the contents of commands' environments. - Shells may be used interactively or non-interactively: they accept - input typed from the keyboard or from a file. Shells also provide a small set of built-in --- 204,207 ---- *************** *** 237,241 **** interactive use rather than to augment the programming language. These interactive features include job control, command line ! editing, history and aliases. Each of these features is described in this manual. --- 225,229 ---- interactive use rather than to augment the programming language. These interactive features include job control, command line ! editing, command history and aliases. Each of these features is described in this manual. *************** *** 359,364 **** the traditional Unix shell originally written by Stephen Bourne. All of the Bourne shell builtin commands are available in Bash, ! and the rules for evaluation and quoting are taken from the @sc{posix} ! 1003.2 specification for the `standard' Unix shell. This chapter briefly summarizes the shell's `building blocks': --- 347,352 ---- the traditional Unix shell originally written by Stephen Bourne. All of the Bourne shell builtin commands are available in Bash, ! The rules for evaluation and quoting are taken from the @sc{posix} ! specification for the `standard' Unix shell. This chapter briefly summarizes the shell's `building blocks': *************** *** 372,377 **** * Shell Commands:: The types of commands you can use. * Shell Functions:: Grouping commands by name. ! * Shell Parameters:: Special shell variables. ! * Shell Expansions:: How Bash expands variables and the various expansions available. * Redirections:: A way to control where input and output go. --- 360,365 ---- * Shell Commands:: The types of commands you can use. * Shell Functions:: Grouping commands by name. ! * Shell Parameters:: How the shell stores values. ! * Shell Expansions:: How Bash expands parameters and the various expansions available. * Redirections:: A way to control where input and output go. *************** *** 474,477 **** --- 462,466 ---- to prevent history expansion. @xref{Bash History Facilities}, for more details concerning history expansion. + There are three quoting mechanisms: the @var{escape character}, single quotes, and double quotes. *************** *** 509,512 **** --- 498,503 ---- A double quote may be quoted within double quotes by preceding it with a backslash. + When command history is being used, the double quote may not be used to + quote the history expansion character. The special parameters @samp{*} and @samp{@@} have special meaning *************** *** 615,621 **** commands. * Lists:: How to execute commands sequentially. ! * Looping Constructs:: Shell commands for iterative action. ! * Conditional Constructs:: Shell commands for conditional execution. ! * Command Grouping:: Ways to group commands. @end menu --- 606,610 ---- commands. * Lists:: How to execute commands sequentially. ! * Compound Commands:: Shell commands for control flow. @end menu *************** *** 675,680 **** (@pxref{Command Execution Environment}). The exit status of a pipeline is the exit status of the last command in the ! pipeline. If the reserved word @samp{!} precedes the pipeline, the ! exit status is the logical negation of the exit status of the last command. @node Lists --- 664,677 ---- (@pxref{Command Execution Environment}). The exit status of a pipeline is the exit status of the last command in the ! pipeline, unless the @code{pipefail} option is enabled ! (@pxref{The Set Builtin}). ! If @code{pipefail} is enabled, the pipeline's return status is the ! value of the last (rightmost) command to exit with a non-zero status, ! or zero if all commands exit successfully. ! If the reserved word @samp{!} precedes the pipeline, the ! exit status is the logical negation of the exit status as described ! above. ! The shell waits for all commands in the pipeline to terminate before ! returning a value. @node Lists *************** *** 731,736 **** executed in the list. @node Looping Constructs ! @subsection Looping Constructs @cindex commands, looping --- 728,752 ---- executed in the list. + @node Compound Commands + @subsection Compound Commands + @cindex commands, compound + + @menu + * Looping Constructs:: Shell commands for iterative action. + * Conditional Constructs:: Shell commands for conditional execution. + * Command Grouping:: Ways to group commands. + @end menu + + Compound commands are the shell programming constructs. + Each construct begins with a reserved word or control operator and is + terminated by a corresponding reserved word or operator. + Any redirections (@pxref{Redirections}) associated with a compound command + apply to all commands within that compound command unless explicitly overridden. + + Bash provides looping constructs, conditional commands, and mechanisms + to group commands and execute them as a unit. + @node Looping Constructs ! @subsubsection Looping Constructs @cindex commands, looping *************** *** 804,808 **** @node Conditional Constructs ! @subsection Conditional Constructs @cindex commands, conditional --- 820,824 ---- @node Conditional Constructs ! @subsubsection Conditional Constructs @cindex commands, conditional *************** *** 951,954 **** --- 967,972 ---- variable expansion, arithmetic expansion, command substitution, process substitution, and quote removal are performed. + Conditional operators such as @samp{-f} must be unquoted to be recognized + as primaries. When the @samp{==} and @samp{!=} operators are used, the string to the *************** *** 960,963 **** --- 978,1000 ---- string. + An additional binary operator, @samp{=~}, is available, with the same + precedence as @samp{==} and @samp{!=}. + When it is used, the string to the right of the operator is considered + an extended regular expression and matched accordingly (as in @i{regex}3)). + The return value is 0 if the string matches + the pattern, and 1 otherwise. + If the regular expression is syntactically incorrect, the conditional + expression's return value is 2. + If the shell option @code{nocaseglob} + (see the description of @code{shopt} in @ref{Bash Builtins}) + is enabled, the match is performed without regard to the case + of alphabetic characters. + Substrings matched by parenthesized subexpressions within the regular + expression are saved in the array variable @code{BASH_REMATCH}. + The element of @code{BASH_REMATCH} with index 0 is the portion of the string + matching the entire regular expression. + The element of @code{BASH_REMATCH} with index @var{n} is the portion of the + string matching the @var{n}th parenthesized subexpression. + Expressions may be combined using the following operators, listed in decreasing order of precedence: *************** *** 985,989 **** @node Command Grouping ! @subsection Grouping Commands @cindex commands, grouping --- 1022,1026 ---- @node Command Grouping ! @subsubsection Grouping Commands @cindex commands, grouping *************** *** 1000,1006 **** Placing a list of commands between parentheses causes a subshell ! to be created, and each of the commands in @var{list} to be executed ! in that subshell. Since the @var{list} is executed in a subshell, ! variable assignments do not remain in effect after the subshell completes. @item @{@} --- 1037,1044 ---- Placing a list of commands between parentheses causes a subshell ! environment to be created (@pxref{Command Execution Environment}), and each ! of the commands in @var{list} to be executed in that subshell. Since the ! @var{list} is executed in a subshell, variable assignments do not remain in ! effect after the subshell completes. @item @{@} *************** *** 1042,1046 **** @rwindex function @example ! [ @code{function} ] @var{name} () @{ @var{command-list}; @} @end example --- 1080,1084 ---- @rwindex function @example ! [ @code{function} ] @var{name} () @var{compound-command} [ @var{redirections} ] @end example *************** *** 1049,1064 **** If the @code{function} reserved word is supplied, the parentheses are optional. ! The @var{body} of the function is the @var{command-list} between @{ and @}. ! This list is executed whenever @var{name} is specified as the ! name of a command. The exit status of a function is ! the exit status of the last command executed in the body. ! Note that for historical reasons, the curly braces that surround ! the body of the function must be separated from the body by @code{blank}s or newlines. This is because the braces are reserved words and are only recognized as such when they are separated by whitespace. ! Also, the @var{command-list} must be terminated with a semicolon ! or a newline. When a function is executed, the arguments to the --- 1087,1111 ---- If the @code{function} reserved word is supplied, the parentheses are optional. ! The @var{body} of the function is the compound command ! @var{compound-command} (@pxref{Compound Commands}). ! That command is usually a @var{list} enclosed between @{ and @}, but ! may be any compound command listed above. ! @var{compound-command} is executed whenever @var{name} is specified as the ! name of a command. ! Any redirections (@pxref{Redirections}) associated with the shell function ! are performed when the function is executed. ! ! The exit status of a function definition is zero unless a syntax error ! occurs or a readonly function with the same name already exists. ! When executed, the exit status of a function is the exit status of the ! last command executed in the body. ! Note that for historical reasons, in the most common usage the curly braces ! that surround the body of the function must be separated from the body by @code{blank}s or newlines. This is because the braces are reserved words and are only recognized as such when they are separated by whitespace. ! Also, when using the braces, the @var{list} must be terminated by a semicolon, ! a @samp{&}, or a newline. When a function is executed, the arguments to the *************** *** 1067,1078 **** The special parameter @samp{#} that expands to the number of positional parameters is updated to reflect the change. ! Positional parameter @code{0} is unchanged. ! The @env{FUNCNAME} variable is set to the name of the function ! while the function is executing. If the builtin command @code{return} is executed in a function, the function completes and execution resumes with the next command after the function ! call. When a function completes, the values of the positional parameters and the special parameter @samp{#} are restored to the values they had prior to the function's --- 1114,1138 ---- The special parameter @samp{#} that expands to the number of positional parameters is updated to reflect the change. ! Special parameter @code{0} is unchanged. ! The first element of the @env{FUNCNAME} variable is set to the ! name of the function while the function is executing. ! All other aspects of the shell execution ! environment are identical between a function and its caller ! with the exception that the @env{DEBUG} trap ! below) is not inherited unless the function has been given the ! @code{trace} attribute using the @code{declare} builtin or ! the @code{-o functrace} option has been enabled with ! the @code{set} builtin, ! (in which case all functions inherit the @code{DEBUG} trap). ! @xref{Bourne Shell Builtins}, for the description of the ! @code{trap} builtin. If the builtin command @code{return} is executed in a function, the function completes and execution resumes with the next command after the function ! call. ! Any command associated with the @code{RETURN} trap is executed ! before execution resumes. ! When a function completes, the values of the positional parameters and the special parameter @samp{#} are restored to the values they had prior to the function's *************** *** 1086,1089 **** --- 1146,1165 ---- the function and the commands it invokes. + Function names and definitions may be listed with the + @option{-f} option to the @code{declare} or @code{typeset} + builtin commands (@pxref{Bash Builtins}). + The @option{-F} option to @code{declare} or @code{typeset} + will list the function names only + (and optionally the source file and line number, if the @code{extdebug} + shell option is enabled). + Functions may be exported so that subshells + automatically have them defined with the + @option{-f} option to the @code{export} builtin + (@pxref{Bourne Shell Builtins}). + Note that shell functions and variables with the same name may result + in multiple identically-named entries in the environment passed to the + shell's children. + Care should be taken in cases where this may cause a problem. + Functions may be recursive. No limit is placed on the number of recursive calls. *************** *** 1097,1101 **** @menu * Positional Parameters:: The shell's command-line arguments. ! * Special Parameters:: Parameters with special meanings. @end menu --- 1173,1177 ---- @menu * Positional Parameters:: The shell's command-line arguments. ! * Special Parameters:: Parameters denoted by special characters. @end menu *************** *** 1103,1108 **** It can be a @code{name}, a number, or one of the special characters listed below. ! For the shell's purposes, a @var{variable} is a parameter denoted by a ! @code{name}. A variable has a @var{value} and zero or more @var{attributes}. Attributes are assigned using the @code{declare} builtin command --- 1179,1183 ---- It can be a @code{name}, a number, or one of the special characters listed below. ! A @var{variable} is a parameter denoted by a @code{name}. A variable has a @var{value} and zero or more @var{attributes}. Attributes are assigned using the @code{declare} builtin command *************** *** 1124,1128 **** removal (detailed below). If the variable has its @code{integer} attribute set, then @var{value} ! is subject to arithmetic expansion even if the @code{$((@dots{}))} expansion is not used (@pxref{Arithmetic Expansion}). Word splitting is not performed, with the exception --- 1199,1203 ---- removal (detailed below). If the variable has its @code{integer} attribute set, then @var{value} ! is evaluated as an arithmetic expression even if the @code{$((@dots{}))} expansion is not used (@pxref{Arithmetic Expansion}). Word splitting is not performed, with the exception *************** *** 1130,1133 **** --- 1205,1209 ---- Filename expansion is not performed. Assignment statements may also appear as arguments to the + @code{alias}, @code{declare}, @code{typeset}, @code{export}, @code{readonly}, and @code{local} builtin commands. *************** *** 1288,1292 **** but the file names generated need not exist. Patterns to be brace expanded take the form of an optional @var{preamble}, ! followed by a series of comma-separated strings between a pair of braces, followed by an optional @var{postscript}. The preamble is prefixed to each string contained within the braces, and --- 1364,1369 ---- but the file names generated need not exist. Patterns to be brace expanded take the form of an optional @var{preamble}, ! followed by either a series of comma-separated strings or a sequnce expression ! between a pair of braces, followed by an optional @var{postscript}. The preamble is prefixed to each string contained within the braces, and *************** *** 1303,1306 **** --- 1380,1391 ---- @end example + A sequence expression takes the form @code{@{@var{x}..@var{y}@}}, + where @var{x} and @var{y} are either integers or single characters. + When integers are supplied, the expression expands to each number between + @var{x} and @var{y}, inclusive. + When characters are supplied, the expression expands to each character + lexicographically between @var{x} and @var{y}, inclusive. Note that + both @var{x} and @var{y} must be of the same type. + Brace expansion is performed before any other expansions, and any characters special to other expansions are preserved *************** *** 1312,1318 **** A correctly-formed brace expansion must contain unquoted opening ! and closing braces, and at least one unquoted comma. Any incorrectly formed brace expansion is left unchanged. This construct is typically used as shorthand when the common prefix of the strings to be generated is longer than in the --- 1397,1409 ---- A correctly-formed brace expansion must contain unquoted opening ! and closing braces, and at least one unquoted comma or a valid ! sequence expression. Any incorrectly formed brace expansion is left unchanged. + A @{ or @samp{,} may be quoted with a backslash to prevent its + being considered part of a brace expression. + To avoid conflicts with parameter expansion, the string @samp{$@{} + is not considered eligible for brace expansion. + This construct is typically used as shorthand when the common prefix of the strings to be generated is longer than in the *************** *** 1429,1434 **** than the value of @var{parameter} itself. This is known as @code{indirect expansion}. ! The exception to this is the expansion of $@{!@var{prefix*@}} described below. In each of the cases below, @var{word} is subject to tilde expansion, --- 1520,1528 ---- than the value of @var{parameter} itself. This is known as @code{indirect expansion}. ! The exceptions to this are the expansions of $@{!@var{prefix*}@} ! and $@{!@var{name}[@@]@} described below. + The exclamation point must immediately follow the left brace in order to + introduce indirection. In each of the cases below, @var{word} is subject to tilde expansion, *************** *** 1452,1458 **** is unset or null, the expansion of @var{word} is assigned to @var{parameter}. ! The value of @var{parameter} ! is then substituted. Positional parameters and special parameters may ! not be assigned to in this way. @item $@{@var{parameter}:?@var{word}@} --- 1546,1552 ---- is unset or null, the expansion of @var{word} is assigned to @var{parameter}. ! The value of @var{parameter} is then substituted. ! Positional parameters and special parameters may not be assigned to ! in this way. @item $@{@var{parameter}:?@var{word}@} *************** *** 1491,1497 **** --- 1585,1601 ---- @item $@{!@var{prefix}*@} + @itemx $@{!@var{prefix}@@@} Expands to the names of variables whose names begin with @var{prefix}, separated by the first character of the @env{IFS} special variable. + @item $@{!@var{name}[@@]@} + @itemx $@{!@var{name}[*]@} + If @var{name} is an array variable, expands to the list of array indices + (keys) assigned in @var{name}. + If @var{name} is not an array, expands to 0 if @var{name} is set and null + otherwise. + When @samp{@@} is used and the expansion appears within double quotes, each + key expands to a separate word. + @item $@{#@var{parameter}@} The length in characters of the expanded value of @var{parameter} is *************** *** 1616,1620 **** All tokens in the expression undergo parameter expansion, command substitution, and quote removal. ! Arithmetic substitutions may be nested. The evaluation is performed according to the rules listed below --- 1720,1724 ---- All tokens in the expression undergo parameter expansion, command substitution, and quote removal. ! Arithmetic expansions may be nested. The evaluation is performed according to the rules listed below *************** *** 1709,1712 **** --- 1813,1818 ---- If the @code{nullglob} option is set, and no matches are found, the word is removed. + If the @code{failglob} shell option is set, and no matches are found, + an error message is printed and the command is not executed. If the shell option @code{nocaseglob} is enabled, the match is performed without regard to the case of alphabetic characters. *************** *** 1721,1725 **** See the description of @code{shopt} in @ref{Bash Builtins}, for a description of the @code{nocaseglob}, @code{nullglob}, ! and @code{dotglob} options. The @env{GLOBIGNORE} --- 1827,1831 ---- See the description of @code{shopt} in @ref{Bash Builtins}, for a description of the @code{nocaseglob}, @code{nullglob}, ! @code{failglob}, and @code{dotglob} options. The @env{GLOBIGNORE} *************** *** 1729,1734 **** @env{GLOBIGNORE} is removed from the list of matches. The filenames @file{.} and @file{..} ! are always ignored, even when @env{GLOBIGNORE} ! is set. However, setting @env{GLOBIGNORE} has the effect of enabling the @code{dotglob} shell option, so all other filenames beginning with a --- 1835,1841 ---- @env{GLOBIGNORE} is removed from the list of matches. The filenames @file{.} and @file{..} ! are always ignored when @env{GLOBIGNORE} ! is set and not null. ! However, setting @env{GLOBIGNORE} to a non-null value has the effect of enabling the @code{dotglob} shell option, so all other filenames beginning with a *************** *** 1745,1751 **** Any character that appears in a pattern, other than the special pattern ! characters described below, matches itself. The @sc{nul} character may not ! occur in a pattern. The special pattern characters must be quoted if ! they are to be matched literally. The special pattern characters have the following meanings: --- 1852,1861 ---- Any character that appears in a pattern, other than the special pattern ! characters described below, matches itself. ! The @sc{nul} character may not occur in a pattern. ! A backslash escapes the following character; the ! escaping backslash is discarded when matching. ! The special pattern characters must be quoted if they are to be matched ! literally. The special pattern characters have the following meanings: *************** *** 2258,2263 **** @item ! shell variables marked for export, along with variables exported for ! the command, passed in the environment (@pxref{Environment}) @item --- 2368,2373 ---- @item ! shell variables and functions marked for export, along with variables ! exported for the command, passed in the environment (@pxref{Environment}) @item *************** *** 2270,2274 **** shell's execution environment. ! Command substitution and asynchronous commands are invoked in a subshell environment that is a duplicate of the shell environment, except that traps caught by the shell are reset to the values --- 2380,2385 ---- shell's execution environment. ! Command substitution, commands grouped with parentheses, ! and asynchronous commands are invoked in a subshell environment that is a duplicate of the shell environment, except that traps caught by the shell are reset to the values *************** *** 2363,2370 **** ignores @code{SIGTTIN}, @code{SIGTTOU}, and @code{SIGTSTP}. ! Commands started by Bash have signal handlers set to the values inherited by the shell from its parent. When job control is not in effect, asynchronous commands ! ignore @code{SIGINT} and @code{SIGQUIT} as well. Commands run as a result of command substitution ignore the keyboard-generated job control signals --- 2474,2482 ---- ignores @code{SIGTTIN}, @code{SIGTTOU}, and @code{SIGTSTP}. ! Non-builtin commands started by Bash have signal handlers set to the values inherited by the shell from its parent. When job control is not in effect, asynchronous commands ! ignore @code{SIGINT} and @code{SIGQUIT} in addition to these inherited ! handlers. Commands run as a result of command substitution ignore the keyboard-generated job control signals *************** *** 2386,2392 **** an interactive login shell exits. ! When Bash receives a signal for which a trap has been set while waiting ! for a command to complete, the trap will not be executed until the ! command completes. When Bash is waiting for an asynchronous command via the @code{wait} builtin, the reception of a signal for --- 2498,2504 ---- an interactive login shell exits. ! If Bash is waiting for a command to complete and receives a signal ! for which a trap has been set, the trap will not be executed until ! the command completes. When Bash is waiting for an asynchronous command via the @code{wait} builtin, the reception of a signal for *************** *** 2489,2492 **** --- 2601,2608 ---- Many of the builtins have been extended by @sc{posix} or Bash. + Unless otherwise noted, each builtin command documented as accepting + options preceded by @samp{-} accepts @samp{--} + to signify the end of the options. + @node Bourne Shell Builtins @section Bourne Shell Builtins *************** *** 2537,2548 **** cd [-L|-P] [@var{directory}] @end example ! Change the current working directory to @var{directory}. If @var{directory} ! is not given, the value of the @env{HOME} shell variable is used. If the ! shell variable @env{CDPATH} exists, it is used as a search path. If ! @var{directory} begins with a slash, @env{CDPATH} is not used. ! The @option{-P} option means ! to not follow symbolic links; symbolic links are followed by default ! or with the @option{-L} option. If @var{directory} is @samp{-}, it is equivalent to @env{$OLDPWD}. The return status is zero if the directory is successfully changed, non-zero otherwise. --- 2653,2671 ---- cd [-L|-P] [@var{directory}] @end example ! Change the current working directory to @var{directory}. ! If @var{directory} is not given, the value of the @env{HOME} shell ! variable is used. ! If the shell variable @env{CDPATH} exists, it is used as a search path. ! If @var{directory} begins with a slash, @env{CDPATH} is not used. ! ! The @option{-P} option means to not follow symbolic links; symbolic ! links are followed by default or with the @option{-L} option. If @var{directory} is @samp{-}, it is equivalent to @env{$OLDPWD}. + + If a non-empty directory name from @env{CDPATH} is used, or if + @samp{-} is the first argument, and the directory change is + successful, the absolute pathname of the new working directory is + written to the standard output. + The return status is zero if the directory is successfully changed, non-zero otherwise. *************** *** 2610,2613 **** --- 2733,2739 ---- list of exported names is displayed. The @option{-p} option displays output in a form that may be reused as input. + If a variable name is followed by =@var{value}, the value of + the variable is set to @var{value}. + The return status is zero unless an invalid option is supplied, one of the names is not a valid shell variable name, or @option{-f} is supplied *************** *** 2710,2714 **** @btindex readonly @example ! readonly [-apf] [@var{name}] @dots{} @end example Mark each @var{name} as readonly. --- 2836,2840 ---- @btindex readonly @example ! readonly [-apf] [@var{name}[=@var{value}]] @dots{} @end example Mark each @var{name} as readonly. *************** *** 2721,2724 **** --- 2847,2852 ---- The @option{-p} option causes output to be displayed in a format that may be reused as input. + If a variable name is followed by =@var{value}, the value of + the variable is set to @var{value}. The return status is zero unless an invalid option is supplied, one of the @var{name} arguments is not a valid shell variable or function name, *************** *** 2737,2740 **** --- 2865,2870 ---- the exit status of the last command executed within the script as the exit status of the script. + Any command associated with the @code{RETURN} trap is executed + before execution resumes after the function or script. The return status is non-zero if @code{return} is used outside a function and not during the execution of a script by @code{.} or @code{source}. *************** *** 2844,2850 **** @end example The commands in @var{arg} are to be read and executed when the ! shell receives signal @var{sigspec}. If @var{arg} is absent or ! equal to @samp{-}, all specified signals are reset to the values ! they had when the shell was started. If @var{arg} is the null string, then the signal specified by each @var{sigspec} is ignored by the shell and commands it invokes. --- 2974,2981 ---- @end example The commands in @var{arg} are to be read and executed when the ! shell receives signal @var{sigspec}. If @var{arg} is absent (and ! there is a single @var{sigspec}) or ! equal to @samp{-}, each specified signal's disposition is reset ! to the value it had when the shell was started. If @var{arg} is the null string, then the signal specified by each @var{sigspec} is ignored by the shell and commands it invokes. *************** *** 2855,2872 **** associated with each signal number in a form that may be reused as shell input. ! Each @var{sigspec} is either a signal name such as @code{SIGINT} (with ! or without the @code{SIG} prefix) or a signal number. If a @var{sigspec} is @code{0} or @code{EXIT}, @var{arg} is executed when the shell exits. If a @var{sigspec} is @code{DEBUG}, the command @var{arg} is executed ! after every simple command. If a @var{sigspec} is @code{ERR}, the command @var{arg} ! is executed whenever a simple command has a non-zero exit status. ! The @code{ERR} trap is not executed if the failed command is part of an ! @code{until} or @code{while} loop, part of an @code{if} statement, part of a @code{&&} or @code{||} list, or if the command's return status is being inverted using @code{!}. ! The @option{-l} option causes the shell to print a list of signal names ! and their corresponding numbers. Signals ignored upon entry to the shell cannot be trapped or reset. --- 2986,3014 ---- associated with each signal number in a form that may be reused as shell input. ! The @option{-l} option causes the shell to print a list of signal names ! and their corresponding numbers. ! Each @var{sigspec} is either a signal name or a signal number. ! Signal names are case insensitive and the @code{SIG} prefix is optional. If a @var{sigspec} is @code{0} or @code{EXIT}, @var{arg} is executed when the shell exits. If a @var{sigspec} is @code{DEBUG}, the command @var{arg} is executed ! before every simple command, @code{for} command, @code{case} command, ! @code{select} command, every arithmetic @code{for} command, and before ! the first command executes in a shell function. ! Refer to the description of the @code{extglob} option to the ! @code{shopt} builtin (@pxref{Bash Builtins}) for details of its ! effect on the @code{DEBUG} trap. If a @var{sigspec} is @code{ERR}, the command @var{arg} ! is executed whenever a simple command has a non-zero exit status, ! subject to the following conditions. ! The @code{ERR} trap is not executed if the failed command is part of the ! command list immediately following an @code{until} or @code{while} keyword, ! part of the test in an @code{if} statement, part of a @code{&&} or @code{||} list, or if the command's return status is being inverted using @code{!}. ! These are the same conditions obeyed by the @code{errexit} option. ! If a @var{sigspec} is @code{RETURN}, the command @var{arg} is executed ! each time a shell function or a script executed with the @code{.} or ! @code{source} builtins finishes executing. Signals ignored upon entry to the shell cannot be trapped or reset. *************** *** 2909,2914 **** functions, and the function definition is removed. Readonly variables and functions may not be unset. ! The return status is zero unless a @var{name} does not exist or is ! readonly. @end table --- 3051,3055 ---- functions, and the function definition is removed. Readonly variables and functions may not be unset. ! The return status is zero unless a @var{name} is readonly. @end table *************** *** 3032,3035 **** --- 3173,3196 ---- builtin command. + @item caller + @btindex caller + @example + caller [@var{expr}] + @end example + Returns the context of any active subroutine call (a shell function or + a script executed with the @code{.} or @code{source} builtins). + + Without @var{expr}, @code{caller} displays the line number and source + filename of the current subroutine call. + If a non-negative integer is supplied as @var{expr}, @code{caller} + displays the line number, subroutine name, and source file corresponding + to that position in the current execution call stack. This extra + information may be used, for example, to print a stack trace. The + current frame is frame 0. + + The return value is 0 unless the shell is not executing a subroutine + call or @var{expr} does not correspond to a valid position in the + call stack. + @item command @btindex command *************** *** 3060,3064 **** @btindex declare @example ! declare [-afFirtx] [-p] [@var{name}[=@var{value}]] @end example --- 3221,3225 ---- @btindex declare @example ! declare [-afFirtx] [-p] [@var{name}[=@var{value}] @dots{}] @end example *************** *** 3067,3076 **** The @option{-p} option will display the attributes and values of each ! @var{name}. When @option{-p} is used, additional options are ignored. The @option{-F} option inhibits the display of function definitions; ! only the function name and attributes are printed. @option{-F} implies ! @option{-f}. The following options can be used to restrict output ! to variables with the specified attributes or to give variables ! attributes: @table @code --- 3228,3241 ---- The @option{-p} option will display the attributes and values of each ! @var{name}. ! When @option{-p} is used, additional options are ignored. The @option{-F} option inhibits the display of function definitions; ! only the function name and attributes are printed. ! If the @code{extdebug} shell option is enabled using @code{shopt} ! (@pxref{Bash Builtins}), the source file name and line number where ! the function is defined are displayed as well. ! @option{-F} implies @option{-f}. ! The following options can be used to restrict output to variables with ! the specified attributes or to give variables attributes: @table @code *************** *** 3102,3106 **** Using @samp{+} instead of @samp{-} turns off the attribute instead. When used in a function, @code{declare} makes each @var{name} local, ! as with the @code{local} command. The return status is zero unless an invalid option is encountered, --- 3267,3272 ---- Using @samp{+} instead of @samp{-} turns off the attribute instead. When used in a function, @code{declare} makes each @var{name} local, ! as with the @code{local} command. If a variable name is followed by ! =@var{value}, the value of the variable is set to @var{value}. The return status is zero unless an invalid option is encountered, *************** *** 3222,3226 **** @btindex local @example ! local [@var{option}] @var{name}[=@var{value}] @end example For each argument, a local variable named @var{name} is created, --- 3388,3392 ---- @btindex local @example ! local [@var{option}] @var{name}[=@var{value}] @dots{} @end example For each argument, a local variable named @var{name} is created, *************** *** 3255,3259 **** In addition to the standard @code{printf(1)} formats, @samp{%b} causes @code{printf} to expand backslash escape sequences in the corresponding ! @var{argument}, and @samp{%q} causes @code{printf} to output the corresponding @var{argument} in a format that can be reused as shell input. --- 3421,3429 ---- In addition to the standard @code{printf(1)} formats, @samp{%b} causes @code{printf} to expand backslash escape sequences in the corresponding ! @var{argument}, ! (except that @samp{\c} terminates output, backslashes in ! @samp{\'}, @samp{\"}, and @samp{\?} are not removed, and octal escapes ! beginning with @samp{\0} may contain up to four digits), ! and @samp{%q} causes @code{printf} to output the corresponding @var{argument} in a format that can be reused as shell input. *************** *** 3423,3430 **** --- 3593,3640 ---- This option is enabled by default for interactive shells. + @item extdebug + If set, behavior intended for use by debuggers is enabled: + + @enumerate + @item + The @option{-F} option to the @code{declare} builtin (@pxref{Bash Builtins}) + displays the source file name and line number corresponding to each function + name supplied as an argument. + + @item + If the command run by the @code{DEBUG} trap returns a non-zero value, the + next command is skipped and not executed. + + @item + If the command run by the @code{DEBUG} trap returns a value of 2, and the + shell is executing in a subroutine (a shell function or a shell script + executed by the @code{.} or @code{source} builtins), a call to + @code{return} is simulated. + @end enumerate + @item extglob If set, the extended pattern matching features described above (@pxref{Pattern Matching}) are enabled. + @item extquote + If set, @code{$'@var{string}'} and @code{$"@var{string}"} quoting is + performed within @code{$@{@var{parameter}@}} expansions + enclosed in double quotes. This option is enabled by default. + + @item failglob + If set, patterns which fail to match filenames during pathname expansion + result in an expansion error. + + @item force_fignore + If set, the suffixes specified by the @env{FIGNORE} shell variable + cause words to be ignored when performing word completion even if + the ignored words are the only possible completions. + @xref{Bash Variables}, for a description of @env{FIGNORE}. + This option is enabled by default. + + @item gnu_errfmt + If set, shell error messages are written in the standard @sc{gnu} error + message format. + @item histappend If set, the history list is appended to the file named by the value *************** *** 3493,3498 **** @item promptvars ! If set, prompt strings undergo variable and parameter expansion after ! being expanded (@pxref{Printing a Prompt}). This option is enabled by default. --- 3703,3710 ---- @item promptvars ! If set, prompt strings undergo ! parameter expansion, command substitution, arithmetic ! expansion, and quote removal after being expanded ! as described below (@pxref{Printing a Prompt}). This option is enabled by default. *************** *** 3573,3577 **** @btindex typeset @example ! typeset [-afFrxi] [-p] [@var{name}[=@var{value}]] @end example The @code{typeset} command is supplied for compatibility with the Korn --- 3785,3789 ---- @btindex typeset @example ! typeset [-afFrxi] [-p] [@var{name}[=@var{value}] @dots{}] @end example The @code{typeset} command is supplied for compatibility with the Korn *************** *** 3690,3695 **** @item -e Exit immediately if a simple command (@pxref{Simple Commands}) exits ! with a non-zero status, unless the command that fails is part of an ! @code{until} or @code{while} loop, part of an @code{if} statement, part of a @code{&&} or @code{||} list, or if the command's return status is being inverted using @code{!}. --- 3902,3908 ---- @item -e Exit immediately if a simple command (@pxref{Simple Commands}) exits ! with a non-zero status, unless the command that fails is part of the ! command list immediately following a @code{while} or @code{until} ! keyword, part of the test in an @code{if} statement, part of a @code{&&} or @code{||} list, or if the command's return status is being inverted using @code{!}. *************** *** 3733,3736 **** --- 3946,3955 ---- Same as @code{-e}. + @item errtrace + Same as @code{-E}. + + @item functrace + Same as @code{-T}. + @item hashall Same as @code{-h}. *************** *** 3776,3779 **** --- 3995,4004 ---- Same as @code{-P}. + @item pipefail + If set, the return value of a pipeline is the value of the last + (rightmost) command to exit with a non-zero status, or zero if all + commands in the pipeline exit successfully. + This option is disabled by default. + @item posix Change the behavior of Bash where the default operation differs *************** *** 3822,3827 **** @item -x ! Print a trace of simple commands and their arguments after they are ! expanded and before they are executed. @item -B --- 4047,4056 ---- @item -x ! Print a trace of simple commands, \fBfor\fP commands, \fBcase\fP ! commands, \fBselect\fP commands, and arithmetic \fBfor\fP commands ! and their arguments or associated word lists after they are ! expanded and before they are executed. The value of the @env{PS4} ! variable is expanded and the resultant value is printed before ! the command and its expanded arguments. @item -B *************** *** 3833,3836 **** --- 4062,4070 ---- from overwriting existing files. + @item -E + If set, any trap on @code{ERR} is inherited by shell functions, command + substitutions, and commands executed in a subshell environment. + The @code{ERR} trap is normally not inherited in such cases. + @item -H Enable @samp{!} style history substitution (@pxref{History Interaction}). *************** *** 3862,3865 **** --- 4096,4104 ---- @end example + @item -T + If set, any trap on @code{DEBUG} is inherited by shell functions, command + substitutions, and commands executed in a subshell environment. + The @code{DEBUG} trap is normally not inherited in such cases. + @item -- If no arguments follow this option, then the positional parameters are *************** *** 3973,3976 **** --- 4212,4220 ---- A colon-separated list of directories in which the shell looks for commands. + A zero-length (null) directory name in the value of @code{PATH} indicates the + current directory. + A null directory name may appear as two adjacent colons, or as an initial + or trailing colon. + @item PS1 *************** *** 3999,4002 **** --- 4243,4266 ---- The full pathname used to execute the current instance of Bash. + @item BASH_ARGC + An array variable whose values are the number of parameters in each + frame of the current bash execution call stack. The number of + parameters to the current subroutine (shell function or script executed + with @code{.} or @code{source}) is at the top of the stack. When a + subroutine is executed, the number of parameters passed is pushed onto + @code{BASH_ARGC}. + + @item BASH_ARGV + An array variable containing all of the parameters in the current bash + execution call stack. The final parameter of the last subroutine call + is at the top of the stack; the first parameter of the initial call is + at the bottom. When a subroutine is executed, the parameters supplied + are pushed onto @code{BASH_ARGV}. + + @item BASH_COMMAND + The command currently being executed or about to be executed, unless the + shell is executing a command as the result of a trap, + in which case it is the command executing at the time of the trap. + @item BASH_ENV If this variable is set when Bash is invoked to execute a shell *************** *** 4004,4009 **** to read before executing the script. @xref{Bash Startup Files}. ! @item BASH_VERSION ! The version number of the current instance of Bash. @item BASH_VERSINFO --- 4268,4299 ---- to read before executing the script. @xref{Bash Startup Files}. ! @item BASH_EXECUTION_STRING ! The command argument to the @option{-c} invocation option. ! ! @item BASH_LINENO ! An array variable whose members are the line numbers in source files ! corresponding to each member of @var{FUNCNAME}. ! @code{$@{BASH_LINENO[$i]@}} is the line number in the source file where ! @code{$@{FUNCNAME[$i + 1]@}} was called. ! The corresponding source file name is @code{$@{BASH_SOURCE[$i + 1]@}}. ! Use @code{LINENO} to obtain the current line number. ! ! @item BASH_REMATCH ! An array variable whose members are assigned by the @samp{=~} binary ! operator to the @code{[[} conditional command ! (@pxref{Conditional Constructs}). ! The element with index 0 is the portion of the string ! matching the entire regular expression. ! The element with index @var{n} is the portion of the ! string matching the @var{n}th parenthesized subexpression. ! This variable is read-only. ! ! @item BASH_SOURCE ! An array variable whose members are the source filenames corresponding ! to the elements in the @code{FUNCNAME} array variable. ! ! @item BASH_SUBSHELL ! Incremented by one each time a subshell or subshell environment is spawned. ! The initial value is 0. @item BASH_VERSINFO *************** *** 4034,4037 **** --- 4324,4330 ---- @end table + @item BASH_VERSION + The version number of the current instance of Bash. + @item COLUMNS Used by the @code{select} builtin command to determine the terminal width *************** *** 4060,4063 **** --- 4353,4362 ---- programmable completion facilities (@pxref{Programmable Completion}). + @item COMP_WORDBREAKS + The set of characters that the Readline library treats as word + separators when performing word completion. + If @code{COMP_WORDBREAKS} is unset, it loses its special properties, + even if it is subsequently reset. + @item COMP_WORDS An array variable consisting of the individual *************** *** 4082,4085 **** --- 4381,4389 ---- it is subsequently reset. + @item EMACS + If Bash finds this variable in the environment when the shell + starts with value @samp{t}, it assumes that the shell is running in an + emacs shell buffer and disables line editing. + @item EUID The numeric effective user id of the current user. This variable *************** *** 4099,4103 **** @item FUNCNAME ! The name of any currently-executing shell function. This variable exists only when a shell function is executing. Assignments to @env{FUNCNAME} have no effect and return an error status. --- 4403,4411 ---- @item FUNCNAME ! An array variable containing the names of all shell functions ! currently in the execution call stack. ! The element with index 0 is the name of any currently-executing ! shell function. ! The bottom-most element is "main". This variable exists only when a shell function is executing. Assignments to @env{FUNCNAME} have no effect and return an error status. *************** *** 4139,4149 **** @item HISTCONTROL ! A value of @samp{ignorespace} means to not enter lines which ! begin with a space or tab into the history list. ! A value of @samp{ignoredups} means to not enter lines which match the last ! entered line. ! A value of @samp{ignoreboth} combines the two options. ! Unset, or set to any other value than those above, means to save ! all lines on the history list. The second and subsequent lines of a multi-line compound command are not tested, and are added to the history regardless of the value of --- 4447,4465 ---- @item HISTCONTROL ! A colon-separated list of values controlling how commands are saved on ! the history list. ! If the list of values includes @samp{ignorespace}, lines which begin ! with a space character are not saved in the history list. ! A value of @samp{ignoredups} causes lines which match the previous ! history entry to not be saved. ! A value of @samp{ignoreboth} is shorthand for ! @samp{ignorespace} and @samp{ignoredups}. ! A value of @samp{erasedups} causes all previous lines matching the ! current line to be removed from the history list before that line ! is saved. ! Any value not in the above list is ignored. ! If @env{HISTCONTROL} is unset, or does not include a valid value, ! all lines read by the shell parser are saved on the history list, ! subject to the value of @env{HISTIGNORE}. The second and subsequent lines of a multi-line compound command are not tested, and are added to the history regardless of the value of *************** *** 4186,4189 **** --- 4502,4512 ---- The default value is 500. + @item HISTTIMEFORMAT + If this variable is set and not null, its value is used as a format string + for @var{strftime} to print the time stamp associated with each history + entry displayed by the @code{history} builtin. + If this variable is set, time stamps are written to the history file so + they may be preserved across shell sessions. + @item HOSTFILE Contains the name of a file in the same format as @file{/etc/hosts} that *************** *** 4331,4334 **** --- 4654,4662 ---- since the assignment. + @item SHELL + The full pathname to the shell is kept in this environment variable. + If it is not set when the shell starts, + Bash assigns to it the full pathname of the current user's login shell. + @item SHELLOPTS A colon-separated list of enabled shell options. Each word in *************** *** 4446,4449 **** --- 4774,4785 ---- @table @code + @item --debugger + Arrange for the debugger profile to be executed before the shell + starts. Turns on extended debugging mode (see @ref{Bash Builtins} + for a description of the @code{extdebug} option to the @code{shopt} + builtin) and shell function tracing + (see @ref{The Set Builtin} for a description of the @code{-o functrace} + option). + @item --dump-po-strings A list of all double-quoted strings preceded by @samp{$} *************** *** 4711,4715 **** is one started without non-option arguments, unless @option{-s} is specified, without specifiying the @option{-c} option, and ! whose input and output are both connected to terminals (as determined by @code{isatty(3)}), or one started with the @option{-i} option. --- 5047,5051 ---- is one started without non-option arguments, unless @option{-s} is specified, without specifiying the @option{-c} option, and ! whose input and error output are both connected to terminals (as determined by @code{isatty(3)}), or one started with the @option{-i} option. *************** *** 4989,4998 **** The shell allows arithmetic expressions to be evaluated, as one of ! the shell expansions or by the @code{let} builtin. Evaluation is done in fixed-width integers with no check for overflow, though division by 0 is trapped and flagged as an error. ! The operators and their precedence and associativity are the same ! as in the C language. The following list of operators is grouped into levels of equal-precedence operators. --- 5325,5335 ---- The shell allows arithmetic expressions to be evaluated, as one of ! the shell expansions or by the @code{let} and the @option{-i} option ! to the @code{declare} builtins. Evaluation is done in fixed-width integers with no check for overflow, though division by 0 is trapped and flagged as an error. ! The operators and their precedence, associativity, and values ! are the same as in the C language. The following list of operators is grouped into levels of equal-precedence operators. *************** *** 5047,5051 **** @item expr ? expr : expr ! conditional evaluation @item = *= /= %= += -= <<= >>= &= ^= |= --- 5384,5388 ---- @item expr ? expr : expr ! conditional operator @item = *= /= %= += -= <<= >>= &= ^= |= *************** *** 5060,5065 **** Within an expression, shell variables may also be referenced by name without using the parameter expansion syntax. The value of a variable is evaluated as an arithmetic expression ! when it is referenced. A shell variable need not have its integer attribute turned on to be used in an expression. --- 5397,5406 ---- Within an expression, shell variables may also be referenced by name without using the parameter expansion syntax. + A shell variable that is null or unset evaluates to 0 when referenced + by name without using the parameter expansion syntax. The value of a variable is evaluated as an arithmetic expression ! when it is referenced, or when a variable which has been given the ! @var{integer} attribute using @samp{declare -i} is assigned a value. ! A null value evaluates to 0. A shell variable need not have its integer attribute turned on to be used in an expression. *************** *** 5093,5103 **** if it has an alias. If so, that word is replaced by the text of the alias. ! The alias name and the replacement text may contain any valid ! shell input, including shell metacharacters, with the exception ! that the alias name may not contain @samp{=}. The first word of the replacement text is tested for aliases, but a word that is identical to an alias being expanded ! is not expanded a second time. This means that one may alias ! @code{ls} to @code{"ls -F"}, for instance, and Bash does not try to recursively expand the replacement text. If the last character of the alias value is a --- 5434,5446 ---- if it has an alias. If so, that word is replaced by the text of the alias. ! The characters @samp{/}, @samp{$}, @samp{`}, @samp{=} and any of the ! shell metacharacters or quoting characters listed above may not appear ! in an alias name. ! The replacement text may contain any valid ! shell input, including shell metacharacters. The first word of the replacement text is tested for aliases, but a word that is identical to an alias being expanded ! is not expanded a second time. ! This means that one may alias @code{ls} to @code{"ls -F"}, for instance, and Bash does not try to recursively expand the replacement text. If the last character of the alias value is a *************** *** 5385,5391 **** The release of Bash, version + patchlevel (e.g., 2.00.0) @item \w ! The current working directory. @item \W ! The basename of @env{$PWD}. @item \! The history number of this command. --- 5728,5734 ---- The release of Bash, version + patchlevel (e.g., 2.00.0) @item \w ! The current working directory, with @env{$HOME} abbreviated with a tilde. @item \W ! The basename of @env{$PWD}, with @env{$HOME} abbreviated with a tilde. @item \! The history number of this command. *************** *** 5510,5517 **** @item - Interactive comments are enabled by default. (Bash has them on by - default anyway.) - - @item The @sc{posix} 1003.2 startup files are executed (@env{$ENV}) rather than the normal Bash files. --- 5853,5856 ---- *************** *** 5527,5531 **** @item The output of @samp{kill -l} prints all the signal names on a single line, ! separated by spaces. @item --- 5866,5874 ---- @item The output of @samp{kill -l} prints all the signal names on a single line, ! separated by spaces, without the @samp{SIG} prefix. ! ! @item ! The @code{kill} builtin does not accept signal names with a @samp{SIG} ! prefix. @item *************** *** 5609,5612 **** --- 5952,5962 ---- @item + The @code{trap} builtin doesn't check the first argument for a possible + signal specification and revert the signal handling to the original + disposition if it is. If users want to reset the handler for a given + signal to the original disposition, they should use @samp{-} as the + first argument. + + @item The @code{.} and @code{source} builtins do not search the current directory for the filename argument if it is not found by searching @env{PATH}. *************** *** 5621,5624 **** --- 5971,5979 ---- @item + When the @code{alias} builtin displays alias definitions, it does not + display them with a leading @samp{alias } unless the @option{-p} option + is supplied. + + @item When the @code{set} builtin is invoked without options, it does not display shell function names and definitions. *************** *** 5763,5767 **** that exits. ! If an attempt to exit Bash is while jobs are stopped, the shell prints a message warning that there are stopped jobs. The @code{jobs} command may then be used to inspect their status. --- 6118,6122 ---- that exits. ! If an attempt to exit Bash is made while jobs are stopped, the shell prints a message warning that there are stopped jobs. The @code{jobs} command may then be used to inspect their status. *************** *** 5845,5850 **** Send a signal specified by @var{sigspec} or @var{signum} to the process named by job specification @var{jobspec} or process @sc{id} @var{pid}. ! @var{sigspec} is either a signal name such as @code{SIGINT} (with or without ! the @code{SIG} prefix) or a signal number; @var{signum} is a signal number. If @var{sigspec} and @var{signum} are not present, @code{SIGTERM} is used. The @option{-l} option lists the signal names. --- 6200,6206 ---- Send a signal specified by @var{sigspec} or @var{signum} to the process named by job specification @var{jobspec} or process @sc{id} @var{pid}. ! @var{sigspec} is either a case-insensitive signal name such as ! @code{SIGINT} (with or without the @code{SIG} prefix) ! or a signal number; @var{signum} is a signal number. If @var{sigspec} and @var{signum} are not present, @code{SIGTERM} is used. The @option{-l} option lists the signal names. *************** *** 5930,5936 **** @set history-appendix @cindex Readline, how to use ! @include rluser.texinfo @cindex History, how to use ! @include hsuser.texinfo @clear readline-appendix @clear history-appendix --- 6286,6292 ---- @set history-appendix @cindex Readline, how to use ! @include rluser.texi @cindex History, how to use ! @include hsuser.texi @clear readline-appendix @clear history-appendix *************** *** 5944,5948 **** non-Unix systems such as BeOS and Interix. Other independent ports exist for ! @sc{ms-dos}, @sc{os/2}, Windows @sc{95/98}, and Windows @sc{nt}. @menu --- 6300,6304 ---- non-Unix systems such as BeOS and Interix. Other independent ports exist for ! @sc{ms-dos}, @sc{os/2}, and Windows platforms. @menu *************** *** 6305,6309 **** @item --enable-cond-command ! Include support for the @code{[[} conditional command (@pxref{Conditional Constructs}). --- 6661,6670 ---- @item --enable-cond-command ! Include support for the @code{[[} conditional command. ! (@pxref{Conditional Constructs}). ! ! @item --enable-cond-regexp ! Include support for matching POSIX regular expressions using the ! @samp{=~} binary operator in the @code{[[} conditional command. (@pxref{Conditional Constructs}). *************** *** 6339,6342 **** --- 6700,6707 ---- if the operating system supports them. + @item --enable-multibyte + This enables support for multibyte characters if the operating + system provides the necessary support. + @item --enable-net-redirections This enables the special handling of filenames of the form *************** *** 6401,6405 **** But first, you should make sure that it really is a bug, and that it appears in the latest ! version of Bash that you have. Once you have determined that a bug actually exists, use the --- 6766,6772 ---- But first, you should make sure that it really is a bug, and that it appears in the latest ! version of Bash. ! The latest version of Bash is always available for FTP from ! @uref{ftp://ftp.gnu.org/pub/bash/}. Once you have determined that a bug actually exists, use the *************** *** 6467,6470 **** --- 6834,6839 ---- Bash has command history (@pxref{Bash History Facilities}) and the @code{history} and @code{fc} builtins to manipulate it. + The Bash history list maintains timestamp information and uses the + value of the @code{HISTTIMEFORMAT} variable to display it. @item *************** *** 6716,6719 **** --- 7085,7093 ---- @item + The @samp{-x} (@code{xtrace}) option displays commands other than + simple commands when performing an execution trace + (@pxref{The Set Builtin}). + + @item The @code{test} builtin (@pxref{Bourne Shell Builtins}) is slightly different, as it implements the @sc{posix} algorithm, *************** *** 6721,6730 **** @item The @code{trap} builtin (@pxref{Bourne Shell Builtins}) allows a @code{DEBUG} pseudo-signal specification, similar to @code{EXIT}. ! Commands specified with a @code{DEBUG} trap are executed after every ! simple command. The @code{DEBUG} trap is not inherited by shell functions unless the ! function has been given the @code{trace} attribute. The @code{trap} builtin (@pxref{Bourne Shell Builtins}) allows an --- 7095,7115 ---- @item + Bash includes the @code{caller} builtin, which displays the context of + any active subroutine call (a shell function or a script executed with + the @code{.} or @code{source} builtins). This supports the bash + debugger. + + @item The @code{trap} builtin (@pxref{Bourne Shell Builtins}) allows a @code{DEBUG} pseudo-signal specification, similar to @code{EXIT}. ! Commands specified with a @code{DEBUG} trap are executed before every ! simple command, @code{for} command, @code{case} command, ! @code{select} command, every arithmetic @code{for} command, and before ! the first command executes in a shell function. The @code{DEBUG} trap is not inherited by shell functions unless the ! function has been given the @code{trace} attribute or the ! @code{functrace} option has been enabled using the @code{shopt} builtin. ! The @code{extdebug} shell option has additional effects on the ! @code{DEBUG} trap. The @code{trap} builtin (@pxref{Bourne Shell Builtins}) allows an *************** *** 6732,6736 **** Commands specified with an @code{ERR} trap are executed after a simple command fails, with a few exceptions. ! The @code{ERR} trap is not inherited by shell functions. @item --- 7117,7130 ---- Commands specified with an @code{ERR} trap are executed after a simple command fails, with a few exceptions. ! The @code{ERR} trap is not inherited by shell functions unless the ! @code{-o errtrace} option to the @code{set} builtin is enabled. ! ! The @code{trap} builtin (@pxref{Bourne Shell Builtins}) allows a ! @code{RETURN} pseudo-signal specification, similar to ! @code{EXIT} and @code{DEBUG}. ! Commands specified with an @code{RETURN} trap are executed before ! execution resumes after a shell function or a shell script executed with ! @code{.} or @code{source} returns. ! The @code{RETURN} trap is not inherited by shell functions. @item *************** *** 6842,6845 **** --- 7236,7248 ---- @end itemize + @node Copying This Manual + @appendix Copying This Manual + + @menu + * GNU Free Documentation License:: License for copying this manual. + @end menu + + @include fdl.texi + @node Builtin Index @unnumbered Index of Shell Builtin Commands *************** *** 6862,6865 **** @printindex cp - @contents @bye --- 7265,7267 ---- diff -aNrc2 bash-2.05b-patched/doc/builtins.1 bash-3.0/doc/builtins.1 *** bash-2.05b-patched/doc/builtins.1 Tue Nov 27 15:20:01 2001 --- bash-3.0/doc/builtins.1 Mon May 24 10:19:55 2004 *************** *** 1,5 **** .\" This is a hack to force bash builtins into the whatis database .\" and to get the list of builtins to come up with the man command. ! .TH BASH_BUILTINS 1 "2001 November 27" "GNU Bash-2.05a" .SH NAME bash, :, ., [, alias, bg, bind, break, builtin, cd, command, compgen, complete, --- 1,5 ---- .\" This is a hack to force bash builtins into the whatis database .\" and to get the list of builtins to come up with the man command. ! .TH BASH_BUILTINS 1 "2004 Apr 20" "GNU Bash-3.0" .SH NAME bash, :, ., [, alias, bg, bind, break, builtin, cd, command, compgen, complete, diff -aNrc2 bash-2.05b-patched/doc/fdl.texi bash-3.0/doc/fdl.texi *** bash-2.05b-patched/doc/fdl.texi Wed Dec 31 19:00:00 1969 --- bash-3.0/doc/fdl.texi Tue Feb 18 08:47:52 2003 *************** *** 0 **** --- 1,452 ---- + + @node GNU Free Documentation License + @appendixsec GNU Free Documentation License + + @cindex FDL, GNU Free Documentation License + @center Version 1.2, November 2002 + + @display + Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + @end display + + @enumerate 0 + @item + PREAMBLE + + The purpose of this License is to make a manual, textbook, or other + functional and useful document @dfn{free} in the sense of freedom: to + assure everyone the effective freedom to copy and redistribute it, + with or without modifying it, either commercially or noncommercially. + Secondarily, this License preserves for the author and publisher a way + to get credit for their work, while not being considered responsible + for modifications made by others. + + This License is a kind of ``copyleft'', which means that derivative + works of the document must themselves be free in the same sense. It + complements the GNU General Public License, which is a copyleft + license designed for free software. + + We have designed this License in order to use it for manuals for free + software, because free software needs free documentation: a free + program should come with manuals providing the same freedoms that the + software does. But this License is not limited to software manuals; + it can be used for any textual work, regardless of subject matter or + whether it is published as a printed book. We recommend this License + principally for works whose purpose is instruction or reference. + + @item + APPLICABILITY AND DEFINITIONS + + This License applies to any manual or other work, in any medium, that + contains a notice placed by the copyright holder saying it can be + distributed under the terms of this License. Such a notice grants a + world-wide, royalty-free license, unlimited in duration, to use that + work under the conditions stated herein. The ``Document'', below, + refers to any such manual or work. Any member of the public is a + licensee, and is addressed as ``you''. You accept the license if you + copy, modify or distribute the work in a way requiring permission + under copyright law. + + A ``Modified Version'' of the Document means any work containing the + Document or a portion of it, either copied verbatim, or with + modifications and/or translated into another language. + + A ``Secondary Section'' is a named appendix or a front-matter section + of the Document that deals exclusively with the relationship of the + publishers or authors of the Document to the Document's overall + subject (or to related matters) and contains nothing that could fall + directly within that overall subject. (Thus, if the Document is in + part a textbook of mathematics, a Secondary Section may not explain + any mathematics.) The relationship could be a matter of historical + connection with the subject or with related matters, or of legal, + commercial, philosophical, ethical or political position regarding + them. + + The ``Invariant Sections'' are certain Secondary Sections whose titles + are designated, as being those of Invariant Sections, in the notice + that says that the Document is released under this License. If a + section does not fit the above definition of Secondary then it is not + allowed to be designated as Invariant. The Document may contain zero + Invariant Sections. If the Document does not identify any Invariant + Sections then there are none. + + The ``Cover Texts'' are certain short passages of text that are listed, + as Front-Cover Texts or Back-Cover Texts, in the notice that says that + the Document is released under this License. A Front-Cover Text may + be at most 5 words, and a Back-Cover Text may be at most 25 words. + + A ``Transparent'' copy of the Document means a machine-readable copy, + represented in a format whose specification is available to the + general public, that is suitable for revising the document + straightforwardly with generic text editors or (for images composed of + pixels) generic paint programs or (for drawings) some widely available + drawing editor, and that is suitable for input to text formatters or + for automatic translation to a variety of formats suitable for input + to text formatters. A copy made in an otherwise Transparent file + format whose markup, or absence of markup, has been arranged to thwart + or discourage subsequent modification by readers is not Transparent. + An image format is not Transparent if used for any substantial amount + of text. A copy that is not ``Transparent'' is called ``Opaque''. + + Examples of suitable formats for Transparent copies include plain + @sc{ascii} without markup, Texinfo input format, La@TeX{} input + format, @acronym{SGML} or @acronym{XML} using a publicly available + @acronym{DTD}, and standard-conforming simple @acronym{HTML}, + PostScript or @acronym{PDF} designed for human modification. Examples + of transparent image formats include @acronym{PNG}, @acronym{XCF} and + @acronym{JPG}. Opaque formats include proprietary formats that can be + read and edited only by proprietary word processors, @acronym{SGML} or + @acronym{XML} for which the @acronym{DTD} and/or processing tools are + not generally available, and the machine-generated @acronym{HTML}, + PostScript or @acronym{PDF} produced by some word processors for + output purposes only. + + The ``Title Page'' means, for a printed book, the title page itself, + plus such following pages as are needed to hold, legibly, the material + this License requires to appear in the title page. For works in + formats which do not have any title page as such, ``Title Page'' means + the text near the most prominent appearance of the work's title, + preceding the beginning of the body of the text. + + A section ``Entitled XYZ'' means a named subunit of the Document whose + title either is precisely XYZ or contains XYZ in parentheses following + text that translates XYZ in another language. (Here XYZ stands for a + specific section name mentioned below, such as ``Acknowledgements'', + ``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title'' + of such a section when you modify the Document means that it remains a + section ``Entitled XYZ'' according to this definition. + + The Document may include Warranty Disclaimers next to the notice which + states that this License applies to the Document. These Warranty + Disclaimers are considered to be included by reference in this + License, but only as regards disclaiming warranties: any other + implication that these Warranty Disclaimers may have is void and has + no effect on the meaning of this License. + + @item + VERBATIM COPYING + + You may copy and distribute the Document in any medium, either + commercially or noncommercially, provided that this License, the + copyright notices, and the license notice saying this License applies + to the Document are reproduced in all copies, and that you add no other + conditions whatsoever to those of this License. You may not use + technical measures to obstruct or control the reading or further + copying of the copies you make or distribute. However, you may accept + compensation in exchange for copies. If you distribute a large enough + number of copies you must also follow the conditions in section 3. + + You may also lend copies, under the same conditions stated above, and + you may publicly display copies. + + @item + COPYING IN QUANTITY + + If you publish printed copies (or copies in media that commonly have + printed covers) of the Document, numbering more than 100, and the + Document's license notice requires Cover Texts, you must enclose the + copies in covers that carry, clearly and legibly, all these Cover + Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on + the back cover. Both covers must also clearly and legibly identify + you as the publisher of these copies. The front cover must present + the full title with all words of the title equally prominent and + visible. You may add other material on the covers in addition. + Copying with changes limited to the covers, as long as they preserve + the title of the Document and satisfy these conditions, can be treated + as verbatim copying in other respects. + + If the required texts for either cover are too voluminous to fit + legibly, you should put the first ones listed (as many as fit + reasonably) on the actual cover, and continue the rest onto adjacent + pages. + + If you publish or distribute Opaque copies of the Document numbering + more than 100, you must either include a machine-readable Transparent + copy along with each Opaque copy, or state in or with each Opaque copy + a computer-network location from which the general network-using + public has access to download using public-standard network protocols + a complete Transparent copy of the Document, free of added material. + If you use the latter option, you must take reasonably prudent steps, + when you begin distribution of Opaque copies in quantity, to ensure + that this Transparent copy will remain thus accessible at the stated + location until at least one year after the last time you distribute an + Opaque copy (directly or through your agents or retailers) of that + edition to the public. + + It is requested, but not required, that you contact the authors of the + Document well before redistributing any large number of copies, to give + them a chance to provide you with an updated version of the Document. + + @item + MODIFICATIONS + + You may copy and distribute a Modified Version of the Document under + the conditions of sections 2 and 3 above, provided that you release + the Modified Version under precisely this License, with the Modified + Version filling the role of the Document, thus licensing distribution + and modification of the Modified Version to whoever possesses a copy + of it. In addition, you must do these things in the Modified Version: + + @enumerate A + @item + Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. + + @item + List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has fewer than five), + unless they release you from this requirement. + + @item + State on the Title page the name of the publisher of the + Modified Version, as the publisher. + + @item + Preserve all the copyright notices of the Document. + + @item + Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. + + @item + Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. + + @item + Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. + + @item + Include an unaltered copy of this License. + + @item + Preserve the section Entitled ``History'', Preserve its Title, and add + to it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section Entitled ``History'' in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. + + @item + Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the ``History'' section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. + + @item + For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve + the Title of the section, and preserve in the section all the + substance and tone of each of the contributor acknowledgements and/or + dedications given therein. + + @item + Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. + + @item + Delete any section Entitled ``Endorsements''. Such a section + may not be included in the Modified Version. + + @item + Do not retitle any existing section to be Entitled ``Endorsements'' or + to conflict in title with any Invariant Section. + + @item + Preserve any Warranty Disclaimers. + @end enumerate + + If the Modified Version includes new front-matter sections or + appendices that qualify as Secondary Sections and contain no material + copied from the Document, you may at your option designate some or all + of these sections as invariant. To do this, add their titles to the + list of Invariant Sections in the Modified Version's license notice. + These titles must be distinct from any other section titles. + + You may add a section Entitled ``Endorsements'', provided it contains + nothing but endorsements of your Modified Version by various + parties---for example, statements of peer review or that the text has + been approved by an organization as the authoritative definition of a + standard. + + You may add a passage of up to five words as a Front-Cover Text, and a + passage of up to 25 words as a Back-Cover Text, to the end of the list + of Cover Texts in the Modified Version. Only one passage of + Front-Cover Text and one of Back-Cover Text may be added by (or + through arrangements made by) any one entity. If the Document already + includes a cover text for the same cover, previously added by you or + by arrangement made by the same entity you are acting on behalf of, + you may not add another; but you may replace the old one, on explicit + permission from the previous publisher that added the old one. + + The author(s) and publisher(s) of the Document do not by this License + give permission to use their names for publicity for or to assert or + imply endorsement of any Modified Version. + + @item + COMBINING DOCUMENTS + + You may combine the Document with other documents released under this + License, under the terms defined in section 4 above for modified + versions, provided that you include in the combination all of the + Invariant Sections of all of the original documents, unmodified, and + list them all as Invariant Sections of your combined work in its + license notice, and that you preserve all their Warranty Disclaimers. + + The combined work need only contain one copy of this License, and + multiple identical Invariant Sections may be replaced with a single + copy. If there are multiple Invariant Sections with the same name but + different contents, make the title of each such section unique by + adding at the end of it, in parentheses, the name of the original + author or publisher of that section if known, or else a unique number. + Make the same adjustment to the section titles in the list of + Invariant Sections in the license notice of the combined work. + + In the combination, you must combine any sections Entitled ``History'' + in the various original documents, forming one section Entitled + ``History''; likewise combine any sections Entitled ``Acknowledgements'', + and any sections Entitled ``Dedications''. You must delete all + sections Entitled ``Endorsements.'' + + @item + COLLECTIONS OF DOCUMENTS + + You may make a collection consisting of the Document and other documents + released under this License, and replace the individual copies of this + License in the various documents with a single copy that is included in + the collection, provided that you follow the rules of this License for + verbatim copying of each of the documents in all other respects. + + You may extract a single document from such a collection, and distribute + it individually under this License, provided you insert a copy of this + License into the extracted document, and follow this License in all + other respects regarding verbatim copying of that document. + + @item + AGGREGATION WITH INDEPENDENT WORKS + + A compilation of the Document or its derivatives with other separate + and independent documents or works, in or on a volume of a storage or + distribution medium, is called an ``aggregate'' if the copyright + resulting from the compilation is not used to limit the legal rights + of the compilation's users beyond what the individual works permit. + When the Document is included an aggregate, this License does not + apply to the other works in the aggregate which are not themselves + derivative works of the Document. + + If the Cover Text requirement of section 3 is applicable to these + copies of the Document, then if the Document is less than one half of + the entire aggregate, the Document's Cover Texts may be placed on + covers that bracket the Document within the aggregate, or the + electronic equivalent of covers if the Document is in electronic form. + Otherwise they must appear on printed covers that bracket the whole + aggregate. + + @item + TRANSLATION + + Translation is considered a kind of modification, so you may + distribute translations of the Document under the terms of section 4. + Replacing Invariant Sections with translations requires special + permission from their copyright holders, but you may include + translations of some or all Invariant Sections in addition to the + original versions of these Invariant Sections. You may include a + translation of this License, and all the license notices in the + Document, and any Warranty Disclaimers, provided that you also include + the original English version of this License and the original versions + of those notices and disclaimers. In case of a disagreement between + the translation and the original version of this License or a notice + or disclaimer, the original version will prevail. + + If a section in the Document is Entitled ``Acknowledgements'', + ``Dedications'', or ``History'', the requirement (section 4) to Preserve + its Title (section 1) will typically require changing the actual + title. + + @item + TERMINATION + + You may not copy, modify, sublicense, or distribute the Document except + as expressly provided for under this License. Any other attempt to + copy, modify, sublicense or distribute the Document is void, and will + automatically terminate your rights under this License. However, + parties who have received copies, or rights, from you under this + License will not have their licenses terminated so long as such + parties remain in full compliance. + + @item + FUTURE REVISIONS OF THIS LICENSE + + The Free Software Foundation may publish new, revised versions + of the GNU Free Documentation License from time to time. Such new + versions will be similar in spirit to the present version, but may + differ in detail to address new problems or concerns. See + @uref{http://www.gnu.org/copyleft/}. + + Each version of the License is given a distinguishing version number. + If the Document specifies that a particular numbered version of this + License ``or any later version'' applies to it, you have the option of + following the terms and conditions either of that specified version or + of any later version that has been published (not as a draft) by the + Free Software Foundation. If the Document does not specify a version + number of this License, you may choose any version ever published (not + as a draft) by the Free Software Foundation. + @end enumerate + + @page + @appendixsubsec ADDENDUM: How to use this License for your documents + + To use this License in a document you have written, include a copy of + the License in the document and put the following copyright and + license notices just after the title page: + + @smallexample + @group + Copyright (C) @var{year} @var{your name}. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled ``GNU + Free Documentation License''. + @end group + @end smallexample + + If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, + replace the ``with...Texts.'' line with this: + + @smallexample + @group + with the Invariant Sections being @var{list their titles}, with + the Front-Cover Texts being @var{list}, and with the Back-Cover Texts + being @var{list}. + @end group + @end smallexample + + If you have Invariant Sections without Cover Texts, or some other + combination of the three, merge those two alternatives to suit the + situation. + + If your document contains nontrivial examples of program code, we + recommend releasing these examples in parallel under your choice of + free software license, such as the GNU General Public License, + to permit their use in free software. + + @c Local Variables: + @c ispell-local-pdict: "ispell-dict" + @c End: + diff -aNrc2 bash-2.05b-patched/doc/fdl.txt bash-3.0/doc/fdl.txt *** bash-2.05b-patched/doc/fdl.txt Wed Dec 31 19:00:00 1969 --- bash-3.0/doc/fdl.txt Tue Feb 18 08:47:44 2003 *************** *** 0 **** --- 1,397 ---- + GNU Free Documentation License + Version 1.2, November 2002 + + + Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + 0. PREAMBLE + + The purpose of this License is to make a manual, textbook, or other + functional and useful document "free" in the sense of freedom: to + assure everyone the effective freedom to copy and redistribute it, + with or without modifying it, either commercially or noncommercially. + Secondarily, this License preserves for the author and publisher a way + to get credit for their work, while not being considered responsible + for modifications made by others. + + This License is a kind of "copyleft", which means that derivative + works of the document must themselves be free in the same sense. It + complements the GNU General Public License, which is a copyleft + license designed for free software. + + We have designed this License in order to use it for manuals for free + software, because free software needs free documentation: a free + program should come with manuals providing the same freedoms that the + software does. But this License is not limited to software manuals; + it can be used for any textual work, regardless of subject matter or + whether it is published as a printed book. We recommend this License + principally for works whose purpose is instruction or reference. + + + 1. APPLICABILITY AND DEFINITIONS + + This License applies to any manual or other work, in any medium, that + contains a notice placed by the copyright holder saying it can be + distributed under the terms of this License. Such a notice grants a + world-wide, royalty-free license, unlimited in duration, to use that + work under the conditions stated herein. The "Document", below, + refers to any such manual or work. Any member of the public is a + licensee, and is addressed as "you". You accept the license if you + copy, modify or distribute the work in a way requiring permission + under copyright law. + + A "Modified Version" of the Document means any work containing the + Document or a portion of it, either copied verbatim, or with + modifications and/or translated into another language. + + A "Secondary Section" is a named appendix or a front-matter section of + the Document that deals exclusively with the relationship of the + publishers or authors of the Document to the Document's overall subject + (or to related matters) and contains nothing that could fall directly + within that overall subject. (Thus, if the Document is in part a + textbook of mathematics, a Secondary Section may not explain any + mathematics.) The relationship could be a matter of historical + connection with the subject or with related matters, or of legal, + commercial, philosophical, ethical or political position regarding + them. + + The "Invariant Sections" are certain Secondary Sections whose titles + are designated, as being those of Invariant Sections, in the notice + that says that the Document is released under this License. If a + section does not fit the above definition of Secondary then it is not + allowed to be designated as Invariant. The Document may contain zero + Invariant Sections. If the Document does not identify any Invariant + Sections then there are none. + + The "Cover Texts" are certain short passages of text that are listed, + as Front-Cover Texts or Back-Cover Texts, in the notice that says that + the Document is released under this License. A Front-Cover Text may + be at most 5 words, and a Back-Cover Text may be at most 25 words. + + A "Transparent" copy of the Document means a machine-readable copy, + represented in a format whose specification is available to the + general public, that is suitable for revising the document + straightforwardly with generic text editors or (for images composed of + pixels) generic paint programs or (for drawings) some widely available + drawing editor, and that is suitable for input to text formatters or + for automatic translation to a variety of formats suitable for input + to text formatters. A copy made in an otherwise Transparent file + format whose markup, or absence of markup, has been arranged to thwart + or discourage subsequent modification by readers is not Transparent. + An image format is not Transparent if used for any substantial amount + of text. A copy that is not "Transparent" is called "Opaque". + + Examples of suitable formats for Transparent copies include plain + ASCII without markup, Texinfo input format, LaTeX input format, SGML + or XML using a publicly available DTD, and standard-conforming simple + HTML, PostScript or PDF designed for human modification. Examples of + transparent image formats include PNG, XCF and JPG. Opaque formats + include proprietary formats that can be read and edited only by + proprietary word processors, SGML or XML for which the DTD and/or + processing tools are not generally available, and the + machine-generated HTML, PostScript or PDF produced by some word + processors for output purposes only. + + The "Title Page" means, for a printed book, the title page itself, + plus such following pages as are needed to hold, legibly, the material + this License requires to appear in the title page. For works in + formats which do not have any title page as such, "Title Page" means + the text near the most prominent appearance of the work's title, + preceding the beginning of the body of the text. + + A section "Entitled XYZ" means a named subunit of the Document whose + title either is precisely XYZ or contains XYZ in parentheses following + text that translates XYZ in another language. (Here XYZ stands for a + specific section name mentioned below, such as "Acknowledgements", + "Dedications", "Endorsements", or "History".) To "Preserve the Title" + of such a section when you modify the Document means that it remains a + section "Entitled XYZ" according to this definition. + + The Document may include Warranty Disclaimers next to the notice which + states that this License applies to the Document. These Warranty + Disclaimers are considered to be included by reference in this + License, but only as regards disclaiming warranties: any other + implication that these Warranty Disclaimers may have is void and has + no effect on the meaning of this License. + + + 2. VERBATIM COPYING + + You may copy and distribute the Document in any medium, either + commercially or noncommercially, provided that this License, the + copyright notices, and the license notice saying this License applies + to the Document are reproduced in all copies, and that you add no other + conditions whatsoever to those of this License. You may not use + technical measures to obstruct or control the reading or further + copying of the copies you make or distribute. However, you may accept + compensation in exchange for copies. If you distribute a large enough + number of copies you must also follow the conditions in section 3. + + You may also lend copies, under the same conditions stated above, and + you may publicly display copies. + + + 3. COPYING IN QUANTITY + + If you publish printed copies (or copies in media that commonly have + printed covers) of the Document, numbering more than 100, and the + Document's license notice requires Cover Texts, you must enclose the + copies in covers that carry, clearly and legibly, all these Cover + Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on + the back cover. Both covers must also clearly and legibly identify + you as the publisher of these copies. The front cover must present + the full title with all words of the title equally prominent and + visible. You may add other material on the covers in addition. + Copying with changes limited to the covers, as long as they preserve + the title of the Document and satisfy these conditions, can be treated + as verbatim copying in other respects. + + If the required texts for either cover are too voluminous to fit + legibly, you should put the first ones listed (as many as fit + reasonably) on the actual cover, and continue the rest onto adjacent + pages. + + If you publish or distribute Opaque copies of the Document numbering + more than 100, you must either include a machine-readable Transparent + copy along with each Opaque copy, or state in or with each Opaque copy + a computer-network location from which the general network-using + public has access to download using public-standard network protocols + a complete Transparent copy of the Document, free of added material. + If you use the latter option, you must take reasonably prudent steps, + when you begin distribution of Opaque copies in quantity, to ensure + that this Transparent copy will remain thus accessible at the stated + location until at least one year after the last time you distribute an + Opaque copy (directly or through your agents or retailers) of that + edition to the public. + + It is requested, but not required, that you contact the authors of the + Document well before redistributing any large number of copies, to give + them a chance to provide you with an updated version of the Document. + + + 4. MODIFICATIONS + + You may copy and distribute a Modified Version of the Document under + the conditions of sections 2 and 3 above, provided that you release + the Modified Version under precisely this License, with the Modified + Version filling the role of the Document, thus licensing distribution + and modification of the Modified Version to whoever possesses a copy + of it. In addition, you must do these things in the Modified Version: + + A. Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. + B. List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has fewer than five), + unless they release you from this requirement. + C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. + D. Preserve all the copyright notices of the Document. + E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. + F. Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. + G. Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. + H. Include an unaltered copy of this License. + I. Preserve the section Entitled "History", Preserve its Title, and add + to it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section Entitled "History" in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. + J. Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the "History" section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. + K. For any section Entitled "Acknowledgements" or "Dedications", + Preserve the Title of the section, and preserve in the section all + the substance and tone of each of the contributor acknowledgements + and/or dedications given therein. + L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. + M. Delete any section Entitled "Endorsements". Such a section + may not be included in the Modified Version. + N. Do not retitle any existing section to be Entitled "Endorsements" + or to conflict in title with any Invariant Section. + O. Preserve any Warranty Disclaimers. + + If the Modified Version includes new front-matter sections or + appendices that qualify as Secondary Sections and contain no material + copied from the Document, you may at your option designate some or all + of these sections as invariant. To do this, add their titles to the + list of Invariant Sections in the Modified Version's license notice. + These titles must be distinct from any other section titles. + + You may add a section Entitled "Endorsements", provided it contains + nothing but endorsements of your Modified Version by various + parties--for example, statements of peer review or that the text has + been approved by an organization as the authoritative definition of a + standard. + + You may add a passage of up to five words as a Front-Cover Text, and a + passage of up to 25 words as a Back-Cover Text, to the end of the list + of Cover Texts in the Modified Version. Only one passage of + Front-Cover Text and one of Back-Cover Text may be added by (or + through arrangements made by) any one entity. If the Document already + includes a cover text for the same cover, previously added by you or + by arrangement made by the same entity you are acting on behalf of, + you may not add another; but you may replace the old one, on explicit + permission from the previous publisher that added the old one. + + The author(s) and publisher(s) of the Document do not by this License + give permission to use their names for publicity for or to assert or + imply endorsement of any Modified Version. + + + 5. COMBINING DOCUMENTS + + You may combine the Document with other documents released under this + License, under the terms defined in section 4 above for modified + versions, provided that you include in the combination all of the + Invariant Sections of all of the original documents, unmodified, and + list them all as Invariant Sections of your combined work in its + license notice, and that you preserve all their Warranty Disclaimers. + + The combined work need only contain one copy of this License, and + multiple identical Invariant Sections may be replaced with a single + copy. If there are multiple Invariant Sections with the same name but + different contents, make the title of each such section unique by + adding at the end of it, in parentheses, the name of the original + author or publisher of that section if known, or else a unique number. + Make the same adjustment to the section titles in the list of + Invariant Sections in the license notice of the combined work. + + In the combination, you must combine any sections Entitled "History" + in the various original documents, forming one section Entitled + "History"; likewise combine any sections Entitled "Acknowledgements", + and any sections Entitled "Dedications". You must delete all sections + Entitled "Endorsements". + + + 6. COLLECTIONS OF DOCUMENTS + + You may make a collection consisting of the Document and other documents + released under this License, and replace the individual copies of this + License in the various documents with a single copy that is included in + the collection, provided that you follow the rules of this License for + verbatim copying of each of the documents in all other respects. + + You may extract a single document from such a collection, and distribute + it individually under this License, provided you insert a copy of this + License into the extracted document, and follow this License in all + other respects regarding verbatim copying of that document. + + + 7. AGGREGATION WITH INDEPENDENT WORKS + + A compilation of the Document or its derivatives with other separate + and independent documents or works, in or on a volume of a storage or + distribution medium, is called an "aggregate" if the copyright + resulting from the compilation is not used to limit the legal rights + of the compilation's users beyond what the individual works permit. + When the Document is included an aggregate, this License does not + apply to the other works in the aggregate which are not themselves + derivative works of the Document. + + If the Cover Text requirement of section 3 is applicable to these + copies of the Document, then if the Document is less than one half of + the entire aggregate, the Document's Cover Texts may be placed on + covers that bracket the Document within the aggregate, or the + electronic equivalent of covers if the Document is in electronic form. + Otherwise they must appear on printed covers that bracket the whole + aggregate. + + + 8. TRANSLATION + + Translation is considered a kind of modification, so you may + distribute translations of the Document under the terms of section 4. + Replacing Invariant Sections with translations requires special + permission from their copyright holders, but you may include + translations of some or all Invariant Sections in addition to the + original versions of these Invariant Sections. You may include a + translation of this License, and all the license notices in the + Document, and any Warranty Disclaimers, provided that you also include + the original English version of this License and the original versions + of those notices and disclaimers. In case of a disagreement between + the translation and the original version of this License or a notice + or disclaimer, the original version will prevail. + + If a section in the Document is Entitled "Acknowledgements", + "Dedications", or "History", the requirement (section 4) to Preserve + its Title (section 1) will typically require changing the actual + title. + + + 9. TERMINATION + + You may not copy, modify, sublicense, or distribute the Document except + as expressly provided for under this License. Any other attempt to + copy, modify, sublicense or distribute the Document is void, and will + automatically terminate your rights under this License. However, + parties who have received copies, or rights, from you under this + License will not have their licenses terminated so long as such + parties remain in full compliance. + + + 10. FUTURE REVISIONS OF THIS LICENSE + + The Free Software Foundation may publish new, revised versions + of the GNU Free Documentation License from time to time. Such new + versions will be similar in spirit to the present version, but may + differ in detail to address new problems or concerns. See + http://www.gnu.org/copyleft/. + + Each version of the License is given a distinguishing version number. + If the Document specifies that a particular numbered version of this + License "or any later version" applies to it, you have the option of + following the terms and conditions either of that specified version or + of any later version that has been published (not as a draft) by the + Free Software Foundation. If the Document does not specify a version + number of this License, you may choose any version ever published (not + as a draft) by the Free Software Foundation. + + + ADDENDUM: How to use this License for your documents + + To use this License in a document you have written, include a copy of + the License in the document and put the following copyright and + license notices just after the title page: + + Copyright (c) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled "GNU + Free Documentation License". + + If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, + replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + + If you have Invariant Sections without Cover Texts, or some other + combination of the three, merge those two alternatives to suit the + situation. + + If your document contains nontrivial examples of program code, we + recommend releasing these examples in parallel under your choice of + free software license, such as the GNU General Public License, + to permit their use in free software. diff -aNrc2 bash-2.05b-patched/doc/infopost.sh bash-3.0/doc/infopost.sh *** bash-2.05b-patched/doc/infopost.sh Wed Dec 31 19:00:00 1969 --- bash-3.0/doc/infopost.sh Thu May 29 12:03:36 2003 *************** *** 0 **** --- 1,8 ---- + #! /bin/sh + # + # Some of these should really be done by options to makeinfo or by + # using @setfilename, but this way we can have both bashref.info and + # bash.info (for installing) + # + + sed -e 's|bashref.info|bash.info|g' diff -aNrc2 bash-2.05b-patched/doc/rbash.1 bash-3.0/doc/rbash.1 *** bash-2.05b-patched/doc/rbash.1 Mon Nov 29 16:30:03 1999 --- bash-3.0/doc/rbash.1 Mon May 24 10:19:39 2004 *************** *** 1,3 **** ! .TH RBASH 1 "1999 Nov 29" GNU .SH NAME rbash \- restricted bash, see \fBbash\fR(1) --- 1,3 ---- ! .TH RBASH 1 "2004 Apr 20" "GNU Bash-3.0" .SH NAME rbash \- restricted bash, see \fBbash\fR(1) diff -aNrc2 bash-2.05b-patched/doc/texinfo.tex bash-3.0/doc/texinfo.tex *** bash-2.05b-patched/doc/texinfo.tex Thu Nov 2 09:50:52 2000 --- bash-3.0/doc/texinfo.tex Tue Feb 4 19:48:35 2003 *************** *** 4,11 **** \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % ! \def\texinfoversion{1999-09-25.10} % ! % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 ! % Free Software Foundation, Inc. % % This texinfo.tex file is free software; you can redistribute it and/or --- 4,11 ---- \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % ! \def\texinfoversion{2003-02-03.16} % ! % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, ! % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. % % This texinfo.tex file is free software; you can redistribute it and/or *************** *** 30,43 **** % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: ! % ftp://ftp.gnu.org/gnu/texinfo.tex ! % (and all GNU mirrors, see http://www.gnu.org/order/ftp.html) ! % ftp://texinfo.org/tex/texinfo.tex ! % ftp://us.ctan.org/macros/texinfo/texinfo.tex ! % (and all CTAN mirrors, finger ctan@us.ctan.org for a list). ! % /home/gd/gnu/doc/texinfo.tex on the GNU machines. % The texinfo.tex in any given Texinfo distribution could well be out % of date, so if that's what you're using, please check. ! % Texinfo has a small home page at http://texinfo.org/. ! % % Send bug reports to bug-texinfo@gnu.org. Please include including a % complete document in each bug report with which we can reproduce the --- 30,44 ---- % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: ! % ftp://ftp.gnu.org/gnu/texinfo/texinfo.tex ! % (and all GNU mirrors, see http://www.gnu.org/order/ftp.html) ! % ftp://tug.org/tex/texinfo.tex ! % (and all CTAN mirrors, see http://www.ctan.org), ! % and /home/gd/gnu/doc/texinfo.tex on the GNU machines. ! % ! % The GNU Texinfo home page is http://www.gnu.org/software/texinfo. ! % % The texinfo.tex in any given Texinfo 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 *************** *** 51,61 **** % tex foo.texi % tex foo.texi ! % dvips foo.dvi -o # or whatever, to process the dvi file; this makes foo.ps. ! % The extra runs of TeX get the cross-reference information correct. % Sometimes one run after texindex suffices, and sometimes you need more % than two; texi2dvi does it as many times as necessary. ! % ! % It is possible to adapt texinfo.tex for other languages. You can get ! % the existing language-specific files from ftp://ftp.gnu.org/gnu/texinfo/. \message{Loading texinfo [version \texinfoversion]:} --- 52,63 ---- % 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. \message{Loading texinfo [version \texinfoversion]:} *************** *** 67,70 **** --- 69,79 ---- \catcode`+=\active \catcode`\_=\active} + \message{Basics,} + \chardef\other=12 + + % We never want plain's outer \+ definition in Texinfo. + % For @tex, we can use \tabalign. + \let\+ = \relax + % Save some parts of plain tex whose names we will redefine. \let\ptexb=\b *************** *** 77,93 **** \let\ptexequiv=\equiv \let\ptexexclam=\! \let\ptexi=\i \let\ptexlbrace=\{ \let\ptexrbrace=\} \let\ptexstar=\* \let\ptext=\t - % We never want plain's outer \+ definition in Texinfo. - % For @tex, we can use \tabalign. - \let\+ = \relax - - \message{Basics,} - \chardef\other=12 - % If this character appears in an error message or help string, it % starts a new line in the output. --- 86,99 ---- \let\ptexequiv=\equiv \let\ptexexclam=\! + \let\ptexgtr=> + \let\ptexhat=^ \let\ptexi=\i \let\ptexlbrace=\{ + \let\ptexless=< + \let\ptexplus=+ \let\ptexrbrace=\} \let\ptexstar=\* \let\ptext=\t % If this character appears in an error message or help string, it % starts a new line in the output. *************** *** 136,143 **** --- 142,167 ---- \ifx\putwordDeftypefun\undefined\gdef\putwordDeftypefun{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\equalChar = `\= + \chardef\exclamChar= `\! + \chardef\questChar = `\? + \chardef\semiChar = `\; + \chardef\spaceChar = `\ % + \chardef\underChar = `\_ + % Ignore a token. % \def\gobble#1{} + % True if #1 is the empty string, i.e., called like `\ifempty{}'. + % + \def\ifempty#1{\ifemptyx #1\emptymarkA\emptymarkB}% + \def\ifemptyx#1#2\emptymarkB{\ifx #1\emptymarkA}% + + % Hyphenation fixes. \hyphenation{ap-pen-dix} \hyphenation{mini-buf-fer mini-buf-fers} *************** *** 146,173 **** % Margin to add to right of even pages, to left of odd pages. ! \newdimen \bindingoffset ! \newdimen \normaloffset \newdimen\pagewidth \newdimen\pageheight % Sometimes it is convenient to have everything in the transcript file % and nothing on the terminal. We don't just call \tracingall here, ! % since that produces some useless output on the terminal. % \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% ! \ifx\eTeXversion\undefined ! \def\loggingall{\tracingcommands2 \tracingstats2 ! \tracingpages1 \tracingoutput1 \tracinglostchars1 ! \tracingmacros2 \tracingparagraphs1 \tracingrestores1 ! \showboxbreadth\maxdimen\showboxdepth\maxdimen ! }% ! \else ! \def\loggingall{\tracingcommands3 \tracingstats2 ! \tracingpages1 \tracingoutput1 \tracinglostchars1 ! \tracingmacros2 \tracingparagraphs1 \tracingrestores1 ! \tracingscantokens1 \tracingassigns1 \tracingifs1 ! \tracinggroups1 \tracingnesting2 ! \showboxbreadth\maxdimen\showboxdepth\maxdimen }% ! \fi % For @cropmarks command. --- 170,213 ---- % Margin to add to right of even pages, to left of odd pages. ! \newdimen\bindingoffset ! \newdimen\normaloffset \newdimen\pagewidth \newdimen\pageheight % Sometimes it is convenient to have everything in the transcript file % and nothing on the terminal. We don't just call \tracingall here, ! % since that produces some useless output on the terminal. 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 ! \errorcontextlines\maxdimen }% ! ! % 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. *************** *** 215,218 **** --- 255,261 ---- % 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 \pdfmkdest{\the\pageno} \fi + % \ifcropmarks \vbox to \outervsize\bgroup \hsize = \outerhsize *************** *** 244,249 **** \fi % - \ifpdfmakepagedest \pdfmkdest{\the\pageno} \fi - % \ifcropmarks \egroup % end of \vbox\bgroup --- 287,290 ---- *************** *** 263,267 **** \fi }% end of \shipout\vbox ! }% end of group with \turnoffactive \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi --- 304,308 ---- \fi }% end of \shipout\vbox ! }% end of group with \normalturnoffactive \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi *************** *** 423,437 **** - % Single-spacing is done by various environments (specifically, in - % \nonfillstart and \quotations). - \newskip\singlespaceskip \singlespaceskip = 12.5pt - \def\singlespace{% - % Why was this kern here? It messes up equalizing space above and below - % environments. --karl, 6may93 - %{\advance \baselineskip by -\singlespaceskip - %\kern \baselineskip}% - \setleading \singlespaceskip - } - %% Simple single-character @ commands --- 464,467 ---- *************** *** 453,466 **** \let\}=\myrbrace \begingroup ! % Definitions to produce actual \{ & \} command in an index. ! \catcode`\{ = 12 \catcode`\} = 12 \catcode`\[ = 1 \catcode`\] = 2 ! \catcode`\@ = 0 \catcode`\\ = 12 ! @gdef@lbracecmd[\{]% ! @gdef@rbracecmd[\}]% ! @endgroup % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent ! % Others are defined by plain TeX: @` @' @" @^ @~ @= @v @H. \let\, = \c \let\dotaccent = \. --- 483,499 ---- \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 % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent ! % Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. \let\, = \c \let\dotaccent = \. *************** *** 471,475 **** % Other special characters: @questiondown @exclamdown ! % Plain TeX defines: @AA @AE @O @OE @L (and lowercase versions) @ss. \def\questiondown{?`} \def\exclamdown{!`} --- 504,508 ---- % Other special characters: @questiondown @exclamdown ! % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. \def\questiondown{?`} \def\exclamdown{!`} *************** *** 526,529 **** --- 559,572 ---- % 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} + % \def\group{\begingroup \ifnum\catcode13=\active \else *************** *** 539,546 **** \def\Egroup{% \egroup % End the \vtop. \endgroup % End the \group. }% % ! \vtop\bgroup % We have to put a strut on the last line in case the @group is in % the midst of an example, rather than completely enclosing it. --- 582,601 ---- \def\Egroup{% \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 + \copy\groupbox \endgroup % End the \group. }% % ! \setbox\groupbox = \vtop\bgroup % We have to put a strut on the last line in case the @group is in % the midst of an example, rather than completely enclosing it. *************** *** 688,713 **** \leftline{\hskip\leftskip{\rm#1}}}} ! % @inmargin{TEXT} puts TEXT in the margin next to the current paragraph. ! ! \def\inmargin#1{% ! \strut\vadjust{\nobreak\kern-\strutdepth ! \vtop to \strutdepth{\baselineskip\strutdepth\vss ! \llap{\rightskip=\inmarginspacing \vbox{\noindent #1}}\null}}} \newskip\inmarginspacing \inmarginspacing=1cm \def\strutdepth{\dp\strutbox} ! ! %\hbox{{\rm#1}}\hfil\break}} % @include file insert text of that file as input. % Allow normal characters that we make active in the argument (a file name). \def\include{\begingroup ! \catcode`\\=12 ! \catcode`~=12 ! \catcode`^=12 ! \catcode`_=12 ! \catcode`|=12 ! \catcode`<=12 ! \catcode`>=12 ! \catcode`+=12 \parsearg\includezzz} % Restore active chars for included file. --- 743,806 ---- \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. % Allow normal characters that we make active in the argument (a file name). \def\include{\begingroup ! \catcode`\\=\other ! \catcode`~=\other ! \catcode`^=\other ! \catcode`_=\other ! \catcode`|=\other ! \catcode`<=\other ! \catcode`>=\other ! \catcode`+=\other \parsearg\includezzz} % Restore active chars for included file. *************** *** 715,718 **** --- 808,812 ---- % Read the included file in a group so nested @include's work. \def\thisfile{#1}% + \let\value=\expandablevalue \input\thisfile \endgroup} *************** *** 720,729 **** \def\thisfile{} ! % @center line outputs that line, centered ! ! \def\center{\parsearg\centerzzz} ! \def\centerzzz #1{{\advance\hsize by -\leftskip ! \advance\hsize by -\rightskip ! \centerline{#1}}} % @sp n outputs n lines of vertical space --- 814,828 ---- \def\thisfile{} ! % @center line ! % outputs that line, centered. ! % ! \def\center{\parsearg\docenter} ! \def\docenter#1{{% ! \ifhmode \hfil\break \fi ! \advance\hsize by -\leftskip ! \advance\hsize by -\rightskip ! \line{\hfil \ignorespaces#1\unskip \hfil}% ! \ifhmode \break \fi ! }} % @sp n outputs n lines of vertical space *************** *** 785,800 **** \def\asis#1{#1} ! % @math means output in math mode. ! % We don't use $'s directly in the definition of \math because control ! % sequences like \math are expanded when the toc file is written. Then, ! % we read the toc file back, the $'s will be normal characters (as they ! % should be, according to the definition of Texinfo). So we must use a ! % control sequence to switch into and out of math mode. % ! % This isn't quite enough for @math to work properly in indices, but it ! % seems unlikely it will ever be needed there. % ! \let\implicitmath = $ ! \def\math#1{\implicitmath #1\implicitmath} % @bullet and @minus need the same treatment as @math, just above. --- 884,937 ---- \def\asis#1{#1} ! % @math outputs its argument in math mode. ! % We don't use $'s directly in the definition of \math because we need ! % to set catcodes according to plain TeX first, to allow for subscripts, ! % superscripts, special math chars, etc. ! % ! \let\implicitmath = $%$ font-lock fix ! % ! % One complication: _ usually means subscripts, but it could also mean ! % an actual _ character, as in @math{@var{some_variable} + 1}. So make ! % _ within @math be active (mathcode "8000), 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 ! \mathcode`\_="8000 \mathunderscore ! \let\\ = \mathbackslash ! \mathactive ! \implicitmath\finishmath} ! \def\finishmath#1{#1\implicitmath\Etex} ! ! % 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 set 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. *************** *** 879,896 **** \def\imagewidth{#2}% \def\imageheight{#3}% \ifnum\pdftexversion < 14 ! \pdfimage \else ! \pdfximage \fi \ifx\empty\imagewidth\else width \imagewidth \fi \ifx\empty\imageheight\else height \imageheight \fi ! {#1.pdf}% \ifnum\pdftexversion < 14 \else \pdfrefximage \pdflastximage \fi} ! \def\pdfmkdest#1{\pdfdest name{#1@} xyz} ! \def\pdfmkpgn#1{#1@} ! \let\linkcolor = \Cyan \def\endlink{\Black\pdfendlink} % Adding outlines to PDF; macros for calculating structure of outlines --- 1016,1039 ---- \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{{\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 *************** *** 903,941 **** \def\pdfmakeoutlines{{% \openin 1 \jobname.toc ! \ifeof 1\else\bgroup \closein 1 ! \indexnofonts ! \def\tt{} ! % thanh's hack / proper braces in bookmarks \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace % \def\chapentry ##1##2##3{} - \def\unnumbchapentry ##1##2{} \def\secentry ##1##2##3##4{\advancenumber{chap##2}} - \def\unnumbsecentry ##1##2{} \def\subsecentry ##1##2##3##4##5{\advancenumber{sec##2.##3}} - \def\unnumbsubsecentry ##1##2{} \def\subsubsecentry ##1##2##3##4##5##6{\advancenumber{subsec##2.##3.##4}} ! \def\unnumbsubsubsecentry ##1##2{} \input \jobname.toc \def\chapentry ##1##2##3{% \pdfoutline goto name{\pdfmkpgn{##3}}count-\expnumber{chap##2}{##1}} - \def\unnumbchapentry ##1##2{% - \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} \def\secentry ##1##2##3##4{% \pdfoutline goto name{\pdfmkpgn{##4}}count-\expnumber{sec##2.##3}{##1}} - \def\unnumbsecentry ##1##2{% - \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} \def\subsecentry ##1##2##3##4##5{% \pdfoutline goto name{\pdfmkpgn{##5}}count-\expnumber{subsec##2.##3.##4}{##1}} - \def\unnumbsubsecentry ##1##2{% - \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} \def\subsubsecentry ##1##2##3##4##5##6{% \pdfoutline goto name{\pdfmkpgn{##6}}{##1}} ! \def\unnumbsubsubsecentry ##1##2{% ! \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} \input \jobname.toc ! \egroup\fi }} \def\makelinks #1,{% --- 1046,1086 ---- \def\pdfmakeoutlines{{% \openin 1 \jobname.toc ! \ifeof 1\else\begingroup \closein 1 ! % Thanh's hack / proper braces in bookmarks \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace % \def\chapentry ##1##2##3{} \def\secentry ##1##2##3##4{\advancenumber{chap##2}} \def\subsecentry ##1##2##3##4##5{\advancenumber{sec##2.##3}} \def\subsubsecentry ##1##2##3##4##5##6{\advancenumber{subsec##2.##3.##4}} ! \let\appendixentry = \chapentry ! \let\unnumbchapentry = \chapentry ! \let\unnumbsecentry = \secentry ! \let\unnumbsubsecentry = \subsecentry ! \let\unnumbsubsubsecentry = \subsubsecentry \input \jobname.toc \def\chapentry ##1##2##3{% \pdfoutline goto name{\pdfmkpgn{##3}}count-\expnumber{chap##2}{##1}} \def\secentry ##1##2##3##4{% \pdfoutline goto name{\pdfmkpgn{##4}}count-\expnumber{sec##2.##3}{##1}} \def\subsecentry ##1##2##3##4##5{% \pdfoutline goto name{\pdfmkpgn{##5}}count-\expnumber{subsec##2.##3.##4}{##1}} \def\subsubsecentry ##1##2##3##4##5##6{% \pdfoutline goto name{\pdfmkpgn{##6}}{##1}} ! \let\appendixentry = \chapentry ! \let\unnumbchapentry = \chapentry ! \let\unnumbsecentry = \secentry ! \let\unnumbsubsecentry = \subsecentry ! \let\unnumbsubsubsecentry = \subsubsecentry ! % ! % Make special characters normal for writing to the pdf file. ! % ! \indexnofonts ! \let\tt=\relax ! \turnoffactive \input \jobname.toc ! \endgroup\fi }} \def\makelinks #1,{% *************** *** 987,990 **** --- 1132,1136 ---- \begingroup \normalturnoffactive\def\@{@}% + \let\value=\expandablevalue \leavevmode\Red \startlink attr{/Border [0 0 0]}% *************** *** 1014,1020 **** {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} \def\pdflink#1{% ! \startlink attr{/Border [0 0 0]} goto name{\mkpgn{#1}} \linkcolor #1\endlink} - \def\mkpgn#1{#1@} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \fi % \ifx\pdfoutput --- 1160,1165 ---- {\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} \fi % \ifx\pdfoutput *************** *** 1033,1039 **** \def\ttsl{\tenttsl} ! % Use Computer Modern fonts at \magstephalf (11pt). ! \newcount\mainmagstep ! \mainmagstep=\magstephalf % Set the font macro #1 to the font named #2, adding on the --- 1178,1201 ---- \def\ttsl{\tenttsl} ! % 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 *************** *** 1065,1079 **** \def\scbshape{csc} \ifx\bigger\relax ! \let\mainmagstep=\magstep1 ! \setfont\textrm\rmshape{12}{1000} ! \setfont\texttt\ttshape{12}{1000} \else ! \setfont\textrm\rmshape{10}{\mainmagstep} ! \setfont\texttt\ttshape{10}{\mainmagstep} \fi ! % Instead of cmb10, you many want to use cmbx10. % cmbx10 is a prettier font on its own, but cmb10 ! % looks better when embedded in a line with cmr10. \setfont\textbf\bfshape{10}{\mainmagstep} \setfont\textit\itshape{10}{\mainmagstep} --- 1227,1245 ---- \def\scbshape{csc} + \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 ! % Instead of cmb10, you may want to use cmbx10. % cmbx10 is a prettier font on its own, but cmb10 ! % looks better when embedded in a line with cmr10 ! % (in Bob's opinion). \setfont\textbf\bfshape{10}{\mainmagstep} \setfont\textit\itshape{10}{\mainmagstep} *************** *** 1102,1105 **** --- 1268,1283 ---- \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: \setfont\titlerm\rmbshape{12}{\magstep3} *************** *** 1114,1117 **** --- 1292,1296 ---- \font\titlesy=cmsy10 scaled \magstep4 \def\authorrm{\secrm} + \def\authortt{\sectt} % Chapter (and unnumbered) fonts (17.28pt). *************** *** 1139,1156 **** \font\secsy=cmsy10 scaled \magstep2 - % \setfont\ssecrm\bxshape{10}{\magstep1} % This size an font looked bad. - % \setfont\ssecit\itshape{10}{\magstep1} % The letters were too crowded. - % \setfont\ssecsl\slshape{10}{\magstep1} - % \setfont\ssectt\ttshape{10}{\magstep1} - % \setfont\ssecsf\sfshape{10}{\magstep1} - - %\setfont\ssecrm\bfshape{10}{1315} % Note the use of cmb rather than cmbx. - %\setfont\ssecit\itshape{10}{1315} % Also, the size is a little larger than - %\setfont\ssecsl\slshape{10}{1315} % being scaled magstep1. - %\setfont\ssectt\ttshape{10}{1315} - %\setfont\ssecsf\sfshape{10}{1315} - - %\let\ssecbf=\ssecrm - % Subsection fonts (13.15pt). \setfont\ssecrm\rmbshape{12}{\magstephalf} --- 1318,1321 ---- *************** *** 1169,1183 **** % In order for the font changes to affect most math symbols and letters, % we have to define the \textfont of the standard families. Since ! % texinfo doesn't allow for producing subscripts and superscripts, we ! % don't bother to reset \scriptfont and \scriptscriptfont (which would ! % also require loading a lot more fonts). % \def\resetmathfonts{% ! \textfont0 = \tenrm \textfont1 = \teni \textfont2 = \tensy ! \textfont\itfam = \tenit \textfont\slfam = \tensl \textfont\bffam = \tenbf ! \textfont\ttfam = \tentt \textfont\sffam = \tensf } - % The font-changing commands redefine the meanings of \tenSTYLE, instead % of just \STYLE. We do this so that font changes will continue to work --- 1334,1347 ---- % 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 so that font changes will continue to work *************** *** 1190,1194 **** \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl ! \resetmathfonts} \def\titlefonts{% \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl --- 1354,1358 ---- \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl ! \resetmathfonts \setleading{\textleading}} \def\titlefonts{% \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl *************** *** 1219,1223 **** \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy \let\tenttsl=\smallttsl ! \resetmathfonts \setleading{11pt}} % Set up the default fonts, so we can use them for creating boxes. --- 1383,1412 ---- \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy \let\tenttsl=\smallttsl ! \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 ! \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 \smallerfonts (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 we used A4 paper on this side of the Atlantic. ! % ! % --karl, 24jan03. ! % Set up the default fonts, so we can use them for creating boxes. *************** *** 1236,1239 **** --- 1425,1429 ---- \setfont\shortcontbf\bxshape{12}{1000} \setfont\shortcontsl\slshape{12}{1000} + \setfont\shortconttt\ttshape{12}{1000} %% Add scribe-like font environments, plus @l for inline lisp (usually sans *************** *** 1243,1248 **** % unless the following character is such as not to need one. \def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi} ! \def\smartslanted#1{{\sl #1}\futurelet\next\smartitalicx} ! \def\smartitalic#1{{\it #1}\futurelet\next\smartitalicx} \let\i=\smartitalic --- 1433,1438 ---- % unless the following character is such as not to need one. \def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi} ! \def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx} ! \def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx} \let\i=\smartitalic *************** *** 1262,1265 **** --- 1452,1466 ---- \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}% *************** *** 1333,1341 **** \def\realdash{-} \def\codedash{-\discretionary{}{}{}} ! \def\codeunder{\ifusingtt{\normalunderscore\discretionary{}{}{}}{\_}} \def\codex #1{\tclose{#1}\endgroup} - %\let\exp=\tclose %Was temporary - % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. --- 1534,1550 ---- \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. *************** *** 1353,1356 **** --- 1562,1568 ---- \else\ifx\arg\wordcode \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% + \else + \errhelp = \EMsimple + \errmessage{Unknown @kbdinputstyle `\arg'}% \fi\fi\fi } *************** *** 1359,1365 **** \def\wordcode{code} ! % Default is kbdinputdistinct. (Too much of a hassle to call the macro, ! % the catcodes are wrong for parsearg to work.) ! \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl} \def\xkey{\key} --- 1571,1576 ---- \def\wordcode{code} ! % Default is `distinct.' ! \kbdinputstyle distinct \def\xkey{\key} *************** *** 1475,1479 **** \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}% % ! \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}% % % Leave some space at the very top of the page. --- 1686,1691 ---- \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}% % ! \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines ! \let\tt=\authortt}% % % Leave some space at the very top of the page. *************** *** 1522,1525 **** --- 1734,1741 ---- \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 *************** *** 1535,1542 **** \global\let\shortcontents = \relax \fi - % - \ifpdf \pdfmakepagedesttrue \fi - % - \HEADINGSon } --- 1751,1754 ---- *************** *** 1671,1675 **** % Subroutines used in generating headings ! % Produces Day Month Year style of output. \def\today{% \number\day\space --- 1883,1890 ---- % 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 *************** *** 1680,1683 **** --- 1895,1899 ---- \fi \space\number\year} + \fi % @settitle line... specifies the title of the document, for headings. *************** *** 1752,1759 **** \nobreak \vskip-\parskip % ! % Stop a page break at the \parskip glue coming up. Unfortunately % we can't prevent a possible page break at the following ! % \baselineskip glue. ! \nobreak \endgroup \itemxneedsnegativevskipfalse --- 1968,1983 ---- \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 *************** *** 1861,1869 **** \let\item=\itemizeitem} - % Set sfcode to normal for the chars that usually have another value. - % These are `.?!:;,' - \def\frenchspacing{\sfcode46=1000 \sfcode63=1000 \sfcode33=1000 - \sfcode58=1000 \sfcode59=1000 \sfcode44=1000 } - % \splitoff TOKENS\endmark defines \first to be the first token in % TOKENS, and \rest to be the remainder. --- 2085,2088 ---- *************** *** 2087,2092 **** \else \global\advance\colcount by 1 ! \setbox0=\hbox{#1\unskip }% 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 --- 2306,2311 ---- \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 *************** *** 2103,2112 **** } - % This used to have \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{&} - % @multitable ... @end multitable definitions: % --- 2322,2325 ---- *************** *** 2114,2118 **** \def\dotable#1{\bgroup \vskip\parskip ! \let\item\crcr \tolerance=9500 \hbadness=9500 --- 2327,2337 ---- \def\dotable#1{\bgroup \vskip\parskip ! \let\item=\crcrwithfootnotes ! % 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. ! \let\tab=&% ! \let\startfootins=\startsavedfootnote \tolerance=9500 \hbadness=9500 *************** *** 2122,2126 **** \overfullrule=0pt \global\colcount=0 ! \def\Emultitable{\global\setpercentfalse\cr\egroup\egroup}% % % To parse everything between @multitable and @item: --- 2341,2349 ---- \overfullrule=0pt \global\colcount=0 ! \def\Emultitable{% ! \global\setpercentfalse ! \crcrwithfootnotes\crcr ! \egroup\egroup ! }% % % To parse everything between @multitable and @item: *************** *** 2211,2214 **** --- 2434,2456 ---- \fi} + % In case 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. Otherwise, the insertion is lost, it never migrates to the + % main vertical list. --kasal, 22jan03. + % + \newbox\savedfootnotes + % + % \dotable \let's \startfootins to this, so that \dofootnote will call + % it instead of starting the insertion right away. + \def\startsavedfootnote{% + \global\setbox\savedfootnotes = \vbox\bgroup + \unvbox\savedfootnotes + } + \def\crcrwithfootnotes{% + \crcr + \ifvoid\savedfootnotes \else + \noalign{\insert\footins{\box\savedfootnotes}}% + \fi + } \message{conditionals,} *************** *** 2246,2307 **** % incorrectly. % \def\ignoremorecommands{% \let\defcodeindex = \relax ! \let\defcv = \relax ! \let\deffn = \relax ! \let\deffnx = \relax \let\defindex = \relax ! \let\defivar = \relax ! \let\defmac = \relax ! \let\defmethod = \relax ! \let\defop = \relax ! \let\defopt = \relax ! \let\defspec = \relax ! \let\deftp = \relax ! \let\deftypefn = \relax ! \let\deftypefun = \relax ! \let\deftypeivar = \relax ! \let\deftypeop = \relax ! \let\deftypevar = \relax ! \let\deftypevr = \relax ! \let\defun = \relax ! \let\defvar = \relax ! \let\defvr = \relax ! \let\ref = \relax ! \let\xref = \relax ! \let\printindex = \relax ! \let\pxref = \relax ! \let\settitle = \relax ! \let\setchapternewpage = \relax ! \let\setchapterstyle = \relax ! \let\everyheading = \relax \let\evenheading = \relax - \let\oddheading = \relax \let\everyfooting = \relax ! \let\evenfooting = \relax ! \let\oddfooting = \relax \let\headings = \relax \let\include = \relax \let\lowersections = \relax ! \let\down = \relax \let\raisesections = \relax ! \let\up = \relax \let\set = \relax ! \let\clear = \relax ! \let\item = \relax } ! % Ignore @ignore ... @end ignore. % ! \def\ignore{\doignore{ignore}} ! ! % Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text. ! % ! \def\ifinfo{\doignore{ifinfo}} \def\ifhtml{\doignore{ifhtml}} \def\ifnottex{\doignore{ifnottex}} ! \def\html{\doignore{html}} \def\menu{\doignore{menu}} ! \def\direntry{\doignore{direntry}} % @dircategory CATEGORY -- specify a category of the dir file --- 2488,2602 ---- % incorrectly. % + % We use \empty instead of \relax for the @def... commands, so that \end + % doesn't throw an error. For instance: + % @ignore + % @deffn ... + % @end deffn + % @end ignore + % + % The @end deffn is going to get expanded, because we're trying to allow + % nested conditionals. But we don't want to expand the actual @deffn, + % since it might be syntactically correct and intended to be ignored. + % Since \end checks for \relax, using \empty does not cause an error. + % \def\ignoremorecommands{% \let\defcodeindex = \relax ! \let\defcv = \empty ! \let\defcvx = \empty ! \let\Edefcv = \empty ! \let\deffn = \empty ! \let\deffnx = \empty ! \let\Edeffn = \empty \let\defindex = \relax ! \let\defivar = \empty ! \let\defivarx = \empty ! \let\Edefivar = \empty ! \let\defmac = \empty ! \let\defmacx = \empty ! \let\Edefmac = \empty ! \let\defmethod = \empty ! \let\defmethodx = \empty ! \let\Edefmethod = \empty ! \let\defop = \empty ! \let\defopx = \empty ! \let\Edefop = \empty ! \let\defopt = \empty ! \let\defoptx = \empty ! \let\Edefopt = \empty ! \let\defspec = \empty ! \let\defspecx = \empty ! \let\Edefspec = \empty ! \let\deftp = \empty ! \let\deftpx = \empty ! \let\Edeftp = \empty ! \let\deftypefn = \empty ! \let\deftypefnx = \empty ! \let\Edeftypefn = \empty ! \let\deftypefun = \empty ! \let\deftypefunx = \empty ! \let\Edeftypefun = \empty ! \let\deftypeivar = \empty ! \let\deftypeivarx = \empty ! \let\Edeftypeivar = \empty ! \let\deftypemethod = \empty ! \let\deftypemethodx = \empty ! \let\Edeftypemethod = \empty ! \let\deftypeop = \empty ! \let\deftypeopx = \empty ! \let\Edeftypeop = \empty ! \let\deftypevar = \empty ! \let\deftypevarx = \empty ! \let\Edeftypevar = \empty ! \let\deftypevr = \empty ! \let\deftypevrx = \empty ! \let\Edeftypevr = \empty ! \let\defun = \empty ! \let\defunx = \empty ! \let\Edefun = \empty ! \let\defvar = \empty ! \let\defvarx = \empty ! \let\Edefvar = \empty ! \let\defvr = \empty ! \let\defvrx = \empty ! \let\Edefvr = \empty ! \let\clear = \relax ! \let\down = \relax ! \let\evenfooting = \relax \let\evenheading = \relax \let\everyfooting = \relax ! \let\everyheading = \relax \let\headings = \relax \let\include = \relax + \let\item = \relax \let\lowersections = \relax ! \let\oddfooting = \relax ! \let\oddheading = \relax ! \let\printindex = \relax ! \let\pxref = \relax \let\raisesections = \relax ! \let\ref = \relax \let\set = \relax ! \let\setchapternewpage = \relax ! \let\setchapterstyle = \relax ! \let\settitle = \relax ! \let\up = \relax ! \let\verbatiminclude = \relax ! \let\xref = \relax } ! % Ignore @ignore, @ifhtml, @ifinfo, and the like. % ! \def\direntry{\doignore{direntry}} ! \def\documentdescriptionword{documentdescription} ! \def\documentdescription{\doignore{documentdescription}} ! \def\html{\doignore{html}} \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}} % @dircategory CATEGORY -- specify a category of the dir file *************** *** 2321,2325 **** % % Make sure that spaces turn into tokens that match what \doignoretext wants. ! \catcode32 = 10 % % Ignore braces, too, so mismatched braces don't cause trouble. --- 2616,2620 ---- % % Make sure that spaces turn into tokens that match what \doignoretext wants. ! \catcode\spaceChar = 10 % % Ignore braces, too, so mismatched braces don't cause trouble. *************** *** 2330,2341 **** \catcode`\@ = 12 % ! % Make the letter c a comment character so that the rest of the line ! % will be ignored. This way, the document can have (for example) ! % @c @end ifinfo ! % and the @end ifinfo will be properly ignored. ! % (We've just changed @ to catcode 12.) ! \catcode`\c = 14 % ! % And now expand that command. \doignoretext } --- 2625,2643 ---- \catcode`\@ = 12 % ! \def\ignoreword{#1}% ! \ifx\ignoreword\documentdescriptionword ! % The c kludge breaks documentdescription, since ! % `documentdescription' contains a `c'. Means not everything will ! % be ignored inside @documentdescription, but oh well... ! \else ! % Make the letter c a comment character so that the rest of the line ! % will be ignored. This way, the document can have (for example) ! % @c @end ifinfo ! % and the @end ifinfo will be properly ignored. ! % (We've just changed @ to catcode 12.) ! \catcode`\c = 14 ! \fi % ! % And now expand the command defined above. \doignoretext } *************** *** 2356,2360 **** \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.} \immediate\write16{ Then upgrade your TeX installation if you can.} ! \immediate\write16{ (See ftp://ftp.gnu.org/pub/gnu/TeX.README.)} \immediate\write16{If you are stuck with version 3.0, run the} \immediate\write16{ script ``tex3patch'' from the Texinfo distribution} --- 2658,2662 ---- \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.} \immediate\write16{ Then upgrade your TeX installation if you can.} ! \immediate\write16{ (See ftp://ftp.gnu.org/non-gnu/TeX.README.)} \immediate\write16{If you are stuck with version 3.0, run the} \immediate\write16{ script ``tex3patch'' from the Texinfo distribution} *************** *** 2378,2383 **** % command, so that nested ignore constructs work. Thus, we put the % text into a \vbox and then do nothing with the result. To minimize ! % the change of memory overflow, we follow the approach outlined on ! % page 401 of the TeXbook: make the current font be a dummy font. % \setbox0 = \vbox\bgroup --- 2680,2685 ---- % command, so that nested ignore constructs work. Thus, we put the % text into a \vbox and then do nothing with the result. To minimize ! % the chance of memory overflow, we follow the approach outlined on ! % page 401 of the TeXbook. % \setbox0 = \vbox\bgroup *************** *** 2400,2405 **** % Set the current font to be \nullfont, a TeX primitive, and define % all the font commands to also use \nullfont. We don't use ! % dummy.tfm, as suggested in the TeXbook, because not all sites ! % might have that installed. Therefore, math mode will still % produce output, but that should be an extremely small amount of % stuff compared to the main input. --- 2702,2707 ---- % Set the current font to be \nullfont, a TeX primitive, and define % all the font commands to also use \nullfont. We don't use ! % dummy.tfm, as suggested in the TeXbook, because some sites ! % might not have that installed. Therefore, math mode will still % produce output, but that should be an extremely small amount of % stuff compared to the main input. *************** *** 2409,2416 **** \let\tenbf=\nullfont \let\tentt=\nullfont \let\smallcaps=\nullfont \let\tensf=\nullfont ! % Similarly for index fonts (mostly for their use in smallexample). \let\smallrm=\nullfont \let\smallit=\nullfont \let\smallsl=\nullfont \let\smallbf=\nullfont \let\smalltt=\nullfont \let\smallsc=\nullfont \let\smallsf=\nullfont % % Don't complain when characters are missing from the fonts. --- 2711,2722 ---- \let\tenbf=\nullfont \let\tentt=\nullfont \let\smallcaps=\nullfont \let\tensf=\nullfont ! % Similarly for index fonts. \let\smallrm=\nullfont \let\smallit=\nullfont \let\smallsl=\nullfont \let\smallbf=\nullfont \let\smalltt=\nullfont \let\smallsc=\nullfont \let\smallsf=\nullfont + % Similarly for smallexample fonts. + \let\smallerrm=\nullfont \let\smallerit=\nullfont \let\smallersl=\nullfont + \let\smallerbf=\nullfont \let\smallertt=\nullfont \let\smallersc=\nullfont + \let\smallersf=\nullfont % % Don't complain when characters are missing from the fonts. *************** *** 2426,2430 **** \pretolerance = 10000 % ! % Do not execute instructions in @tex \def\tex{\doignore{tex}}% % Do not execute macro definitions. --- 2732,2736 ---- \pretolerance = 10000 % ! % Do not execute instructions in @tex. \def\tex{\doignore{tex}}% % Do not execute macro definitions. *************** *** 2471,2475 **** % such active characters to their normal equivalents. \gdef\value{\begingroup ! \catcode`\-=12 \catcode`\_=12 \indexbreaks \let_\normalunderscore \valuexxx} --- 2777,2781 ---- % such active characters to their normal equivalents. \gdef\value{\begingroup ! \catcode`\-=\other \catcode`\_=\other \indexbreaks \let_\normalunderscore \valuexxx} *************** *** 2480,2492 **** % properly in indexes (we \let\value to this in \indexdummies). Ones % whose names contain - or _ still won't work, but we can't do anything ! % about that. The command has to be fully expandable, since the result ! % winds up in the index file. This means that if the variable's value ! % contains other Texinfo commands, it's almost certain it will fail ! % (although perhaps we could fix that with sufficient work to do a ! % one-level expansion on the result, instead of complete). % \def\expandablevalue#1{% \expandafter\ifx\csname SET#1\endcsname\relax {[No value for ``#1'']}% \else \csname SET#1\endcsname --- 2786,2800 ---- % properly in indexes (we \let\value to this in \indexdummies). Ones % whose names contain - or _ still won't work, but we can't do anything ! % about that. The command has to be fully expandable (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 *************** *** 2497,2507 **** % with @set. % ! \def\ifset{\parsearg\ifsetxxx} ! \def\ifsetxxx #1{% \expandafter\ifx\csname SET#1\endcsname\relax ! \expandafter\ifsetfail \else ! \expandafter\ifsetsucceed \fi } \def\ifsetsucceed{\conditionalsucceed{ifset}} --- 2805,2816 ---- % with @set. % ! \def\ifset{\parsearg\doifset} ! \def\doifset#1{% \expandafter\ifx\csname SET#1\endcsname\relax ! \let\next=\ifsetfail \else ! \let\next=\ifsetsucceed \fi + \next } \def\ifsetsucceed{\conditionalsucceed{ifset}} *************** *** 2512,2522 **** % defined with @set, or has been undefined with @clear. % ! \def\ifclear{\parsearg\ifclearxxx} ! \def\ifclearxxx #1{% \expandafter\ifx\csname SET#1\endcsname\relax ! \expandafter\ifclearsucceed \else ! \expandafter\ifclearfail \fi } \def\ifclearsucceed{\conditionalsucceed{ifclear}} --- 2821,2832 ---- % defined with @set, or has been undefined with @clear. % ! \def\ifclear{\parsearg\doifclear} ! \def\doifclear#1{% \expandafter\ifx\csname SET#1\endcsname\relax ! \let\next=\ifclearsucceed \else ! \let\next=\ifclearfail \fi + \next } \def\ifclearsucceed{\conditionalsucceed{ifclear}} *************** *** 2524,2560 **** \defineunmatchedend{ifclear} ! % @iftex, @ifnothtml, @ifnotinfo always succeed; we read the text ! % following, through the first @end iftex (etc.). Make `@end iftex' ! % (etc.) valid only after an @iftex. % \def\iftex{\conditionalsucceed{iftex}} \def\ifnothtml{\conditionalsucceed{ifnothtml}} \def\ifnotinfo{\conditionalsucceed{ifnotinfo}} \defineunmatchedend{iftex} \defineunmatchedend{ifnothtml} \defineunmatchedend{ifnotinfo} ! % We can't just want to start a group at @iftex (for example) and end it ! % at @end iftex, since then @set commands inside the conditional have no ! % effect (they'd get reverted at the end of the group). So we must ! % define \Eiftex to redefine itself to be its previous value. (We can't ! % just define it to fail again with an ``unmatched end'' error, since ! % the @ifset might be nested.) ! % ! \def\conditionalsucceed#1{% ! \edef\temp{% ! % Remember the current value of \E#1. ! \let\nece{prevE#1} = \nece{E#1}% ! % ! % At the `@end #1', redefine \E#1 to be its previous value. ! \def\nece{E#1}{\let\nece{E#1} = \nece{prevE#1}}% ! }% ! \temp ! } ! ! % We need to expand lots of \csname's, but we don't want to expand the ! % control sequences after we've constructed them. % ! \def\nece#1{\expandafter\noexpand\csname#1\endcsname} % @defininfoenclose. --- 2834,2857 ---- \defineunmatchedend{ifclear} ! % @iftex, @ifnothtml, @ifnotinfo, @ifnotplaintext always succeed; we ! % read the text following, through the first @end iftex (etc.). Make ! % `@end iftex' (etc.) valid only after an @iftex. % \def\iftex{\conditionalsucceed{iftex}} \def\ifnothtml{\conditionalsucceed{ifnothtml}} \def\ifnotinfo{\conditionalsucceed{ifnotinfo}} + \def\ifnotplaintext{\conditionalsucceed{ifnotplaintext}} \defineunmatchedend{iftex} \defineunmatchedend{ifnothtml} \defineunmatchedend{ifnotinfo} + \defineunmatchedend{ifnotplaintext} ! % True conditional. Since \set globally defines its variables, we can ! % just start and end a group (to keep the @end definition undefined at ! % the outer level). % ! \def\conditionalsucceed#1{\begingroup ! \expandafter\def\csname E#1\endcsname{\endgroup}% ! } % @defininfoenclose. *************** *** 2588,2596 **** % @defindex foo == \newindex{foo} ! \def\defindex{\parsearg\newindex} % Define @defcodeindex, like @defindex except put all entries in @code. ! \def\newcodeindex#1{% \iflinks --- 2885,2895 ---- % @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 *************** *** 2599,2627 **** \fi \expandafter\xdef\csname#1index\endcsname{% ! \noexpand\docodeindex{#1}} } - \def\defcodeindex{\parsearg\newcodeindex} % @synindex foo bar makes index foo feed into index bar. % Do this instead of @defindex foo if you don't want it as a separate index. ! % The \closeout helps reduce unnecessary open files; the limit on the ! % Acorn RISC OS is a mere 16 files. ! \def\synindex#1 #2 {% ! \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname ! \expandafter\closeout\csname#1indfile\endcsname ! \expandafter\let\csname#1indfile\endcsname=\synindexfoo ! \expandafter\xdef\csname#1index\endcsname{% define \xxxindex ! \noexpand\doindex{#2}}% ! } ! % @syncodeindex foo bar similar, but put all entries made for index foo % inside @code. ! \def\syncodeindex#1 #2 {% ! \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname ! \expandafter\closeout\csname#1indfile\endcsname ! \expandafter\let\csname#1indfile\endcsname=\synindexfoo ! \expandafter\xdef\csname#1index\endcsname{% define \xxxindex ! \noexpand\docodeindex{#2}}% } --- 2898,2930 ---- \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}}% } *************** *** 2643,2811 **** \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} \def\indexdummies{% ! \def\ { }% ! % Take care of the plain tex accent commands. ! \def\"{\realbackslash "}% ! \def\`{\realbackslash `}% ! \def\'{\realbackslash '}% ! \def\^{\realbackslash ^}% ! \def\~{\realbackslash ~}% ! \def\={\realbackslash =}% ! \def\b{\realbackslash b}% ! \def\c{\realbackslash c}% ! \def\d{\realbackslash d}% ! \def\u{\realbackslash u}% ! \def\v{\realbackslash v}% ! \def\H{\realbackslash H}% ! % Take care of the plain tex special European modified letters. ! \def\oe{\realbackslash oe}% ! \def\ae{\realbackslash ae}% ! \def\aa{\realbackslash aa}% ! \def\OE{\realbackslash OE}% ! \def\AE{\realbackslash AE}% ! \def\AA{\realbackslash AA}% ! \def\o{\realbackslash o}% ! \def\O{\realbackslash O}% ! \def\l{\realbackslash l}% ! \def\L{\realbackslash L}% ! \def\ss{\realbackslash ss}% ! % Take care of texinfo commands likely to appear in an index entry. ! % (Must be a way to avoid doing expansion at all, and thus not have to ! % laboriously list every single command here.) ! \def\@{@}% will be @@ when we switch to @ as escape char. ! % 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 ! \def\_{{\realbackslash _}}% ! \def\w{\realbackslash w }% ! \def\bf{\realbackslash bf }% ! %\def\rm{\realbackslash rm }% ! \def\sl{\realbackslash sl }% ! \def\sf{\realbackslash sf}% ! \def\tt{\realbackslash tt}% ! \def\gtr{\realbackslash gtr}% ! \def\less{\realbackslash less}% ! \def\hat{\realbackslash hat}% ! \def\TeX{\realbackslash TeX}% ! \def\dots{\realbackslash dots }% ! \def\result{\realbackslash result}% ! \def\equiv{\realbackslash equiv}% ! \def\expansion{\realbackslash expansion}% ! \def\print{\realbackslash print}% ! \def\error{\realbackslash error}% ! \def\point{\realbackslash point}% ! \def\copyright{\realbackslash copyright}% ! \def\tclose##1{\realbackslash tclose {##1}}% ! \def\code##1{\realbackslash code {##1}}% ! \def\uref##1{\realbackslash uref {##1}}% ! \def\url##1{\realbackslash url {##1}}% ! \def\env##1{\realbackslash env {##1}}% ! \def\command##1{\realbackslash command {##1}}% ! \def\option##1{\realbackslash option {##1}}% ! \def\dotless##1{\realbackslash dotless {##1}}% ! \def\samp##1{\realbackslash samp {##1}}% ! \def\,##1{\realbackslash ,{##1}}% ! \def\t##1{\realbackslash t {##1}}% ! \def\r##1{\realbackslash r {##1}}% ! \def\i##1{\realbackslash i {##1}}% ! \def\b##1{\realbackslash b {##1}}% ! \def\sc##1{\realbackslash sc {##1}}% ! \def\cite##1{\realbackslash cite {##1}}% ! \def\key##1{\realbackslash key {##1}}% ! \def\file##1{\realbackslash file {##1}}% ! \def\var##1{\realbackslash var {##1}}% ! \def\kbd##1{\realbackslash kbd {##1}}% ! \def\dfn##1{\realbackslash dfn {##1}}% ! \def\emph##1{\realbackslash emph {##1}}% ! \def\acronym##1{\realbackslash acronym {##1}}% ! % ! % Handle some cases of @value -- where the variable name does not ! % contain - or _, and the value does not contain any ! % (non-fully-expandable) commands. ! \let\value = \expandablevalue ! % ! \unsepspaces ! % Turn off macro expansion ! \turnoffmacros } % If an index command is used in an @example environment, any spaces % therein should become regular spaces in the raw index file, not the ! % expansion of \tie (\\leavevmode \penalty \@M \ ). {\obeyspaces \gdef\unsepspaces{\obeyspaces\let =\space}} ! % \indexnofonts no-ops all font-change commands. ! % This is used when outputting the strings to sort the index by. ! \def\indexdummyfont#1{#1} \def\indexdummytex{TeX} \def\indexdummydots{...} ! \def\indexnofonts{% ! % Just ignore accents. ! \let\,=\indexdummyfont ! \let\"=\indexdummyfont ! \let\`=\indexdummyfont ! \let\'=\indexdummyfont ! \let\^=\indexdummyfont ! \let\~=\indexdummyfont ! \let\==\indexdummyfont ! \let\b=\indexdummyfont ! \let\c=\indexdummyfont ! \let\d=\indexdummyfont ! \let\u=\indexdummyfont ! \let\v=\indexdummyfont ! \let\H=\indexdummyfont ! \let\dotless=\indexdummyfont ! % Take care of the plain tex special European modified letters. ! \def\oe{oe}% ! \def\ae{ae}% ! \def\aa{aa}% ! \def\OE{OE}% ! \def\AE{AE}% ! \def\AA{AA}% ! \def\o{o}% ! \def\O{O}% ! \def\l{l}% ! \def\L{L}% ! \def\ss{ss}% ! \let\w=\indexdummyfont ! \let\t=\indexdummyfont ! \let\r=\indexdummyfont ! \let\i=\indexdummyfont ! \let\b=\indexdummyfont ! \let\emph=\indexdummyfont ! \let\strong=\indexdummyfont ! \let\cite=\indexdummyfont ! \let\sc=\indexdummyfont ! %Don't no-op \tt, since it isn't a user-level command ! % and is used in the definitions of the active chars like <, >, |... ! %\let\tt=\indexdummyfont ! \let\tclose=\indexdummyfont ! \let\code=\indexdummyfont ! \let\url=\indexdummyfont ! \let\uref=\indexdummyfont ! \let\env=\indexdummyfont ! \let\acronym=\indexdummyfont ! \let\command=\indexdummyfont ! \let\option=\indexdummyfont ! \let\file=\indexdummyfont ! \let\samp=\indexdummyfont ! \let\kbd=\indexdummyfont ! \let\key=\indexdummyfont ! \let\var=\indexdummyfont ! \let\TeX=\indexdummytex ! \let\dots=\indexdummydots ! \def\@{@}% ! } ! ! % To define \realbackslash, we must make \ not be an escape. ! % We must first make another character (@) an escape ! % so we do not become unable to do a definition. ! ! {\catcode`\@=0 \catcode`\\=\other ! @gdef@realbackslash{\}} \let\indexbackslash=0 %overridden during \printindex. --- 2946,3197 ---- \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}% ! }% ! % ! % 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}% ! }% ! % ! % Do the redefinitions. ! \commondummies ! } ! ! % Called from \indexdummies and \atdummies. \definedummyword and ! % \definedummyletter must be defined first. ! % ! \def\commondummies{% ! % ! \normalturnoffactive ! % ! % Control letters and accents. ! \definedummyletter{_}% ! \definedummyletter{,}% ! \definedummyletter{"}% ! \definedummyletter{`}% ! \definedummyletter{'}% ! \definedummyletter{^}% ! \definedummyletter{~}% ! \definedummyletter{=}% ! \definedummyword{u}% ! \definedummyword{v}% ! \definedummyword{H}% ! \definedummyword{dotaccent}% ! \definedummyword{ringaccent}% ! \definedummyword{tieaccent}% ! \definedummyword{ubaraccent}% ! \definedummyword{udotaccent}% ! \definedummyword{dotless}% ! % ! % Other 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}% ! % ! % 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}% ! % ! % Texinfo font commands. ! \definedummyword{b}% ! \definedummyword{i}% ! \definedummyword{r}% ! \definedummyword{sc}% ! \definedummyword{t}% ! % ! \definedummyword{TeX}% ! \definedummyword{acronym}% ! \definedummyword{cite}% ! \definedummyword{code}% ! \definedummyword{command}% ! \definedummyword{dfn}% ! \definedummyword{dots}% ! \definedummyword{emph}% ! \definedummyword{env}% ! \definedummyword{file}% ! \definedummyword{kbd}% ! \definedummyword{key}% ! \definedummyword{math}% ! \definedummyword{option}% ! \definedummyword{samp}% ! \definedummyword{strong}% ! \definedummyword{uref}% ! \definedummyword{url}% ! \definedummyword{var}% ! \definedummyword{w}% ! % ! % Assorted special characters. ! \definedummyword{bullet}% ! \definedummyword{copyright}% ! \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 the variable name does not ! % contain - or _, and the value does not contain any ! % (non-fully-expandable) commands. ! \let\value = \expandablevalue ! % ! % Normal spaces, not active ones. ! \unsepspaces ! % ! % No macro expansion. ! \turnoffmacros } % If an index command is used in an @example environment, any spaces % therein should become regular spaces in the raw index file, not the ! % expansion of \tie (\leavevmode \penalty \@M \ ). {\obeyspaces \gdef\unsepspaces{\obeyspaces\let =\space}} ! ! % \indexnofonts 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\indexdummytex{TeX} \def\indexdummydots{...} ! % \def\indexnofonts{% ! \def\ { }% ! \def\@{@}% ! % how to handle braces? ! \def\_{\normalunderscore}% ! % ! \let\,=\asis ! \let\"=\asis ! \let\`=\asis ! \let\'=\asis ! \let\^=\asis ! \let\~=\asis ! \let\==\asis ! \let\u=\asis ! \let\v=\asis ! \let\H=\asis ! \let\dotaccent=\asis ! \let\ringaccent=\asis ! \let\tieaccent=\asis ! \let\ubaraccent=\asis ! \let\udotaccent=\asis ! \let\dotless=\asis ! % ! % Other 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{?}% ! % ! % 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 ! % ! % Texinfo font commands. ! \let\b=\asis ! \let\i=\asis ! \let\r=\asis ! \let\sc=\asis ! \let\t=\asis ! % ! \let\TeX=\indexdummytex ! \let\acronym=\asis ! \let\cite=\asis ! \let\code=\asis ! \let\command=\asis ! \let\dfn=\asis ! \let\dots=\indexdummydots ! \let\emph=\asis ! \let\env=\asis ! \let\file=\asis ! \let\kbd=\asis ! \let\key=\asis ! \let\math=\asis ! \let\option=\asis ! \let\samp=\asis ! \let\strong=\asis ! \let\uref=\asis ! \let\url=\asis ! \let\var=\asis ! \let\w=\asis ! } \let\indexbackslash=0 %overridden during \printindex. *************** *** 2839,2868 **** % so it will be output as is; and it will print as backslash. % ! \def\thirdarg{#3}% ! % ! % If third arg is present, precede it with space in sort key. ! \ifx\thirdarg\emptymacro ! \let\subentry = \empty ! \else ! \def\subentry{ #3}% ! \fi ! % ! % First process the index entry with all font commands turned ! % off to get the string to sort by. ! {\indexnofonts \xdef\indexsorttmp{#2\subentry}}% ! % ! % Now the real index entry with the fonts. \toks0 = {#2}% % ! % If third (subentry) arg is present, add it to the index ! % string. And include a space. \ifx\thirdarg\emptymacro \else \toks0 = \expandafter{\the\toks0 \space #3}% \fi % ! % 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, texindex reduces to ! % two when writing the .??s sorted result. \edef\temp{% \write\csname#1indfile\endcsname{% --- 3225,3251 ---- % so it will be output as is; and it will print as backslash. % ! % The main index entry text. \toks0 = {#2}% % ! % If third arg is present, precede it with space in sort key. ! \def\thirdarg{#3}% \ifx\thirdarg\emptymacro \else + % If the third (subentry) arg is present, add it to the index + % line to write. \toks0 = \expandafter{\the\toks0 \space #3}% \fi % ! % 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\csname#1indfile\endcsname{% *************** *** 2890,2899 **** \ifvmode \skip0 = \lastskip ! \ifdim\lastskip = 0pt \else \nobreak\vskip-\lastskip \fi \fi % \temp % do the write % - % \ifvmode \ifdim\skip0 = 0pt \else \nobreak\vskip\skip0 \fi \fi \fi --- 3273,3281 ---- \ifvmode \skip0 = \lastskip ! \ifdim\lastskip = 0pt \else \nobreak\vskip-\skip0 \fi \fi % \temp % do the write % \ifvmode \ifdim\skip0 = 0pt \else \nobreak\vskip\skip0 \fi \fi \fi *************** *** 3086,3094 **** \newskip\secondaryindent \secondaryindent=0.5cm ! ! \def\secondary #1#2{ ! {\parfillskip=0in \parskip=0in ! \hangindent =1in \hangafter=1 ! \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill #2\par }} --- 3468,3483 ---- \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 }} *************** *** 3150,3154 **** % Double the \vsize as well. (We don't need a separate register here, % since nobody clobbers \vsize.) - \advance\vsize by -\ht\partialpage \vsize = 2\vsize } --- 3539,3542 ---- *************** *** 3164,3167 **** --- 3552,3556 ---- \dimen@ = \vsize \divide\dimen@ by 2 + \advance\dimen@ by -\ht\partialpage % % box0 will be the left-hand column, box2 the right. *************** *** 3171,3177 **** \penalty\outputpenalty } \def\pagesofar{% - % Re-output the contents of the output page -- any previous material, - % followed by the two boxes we just split, in box0 and box2. \unvbox\partialpage % --- 3560,3567 ---- \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 % *************** *** 3180,3183 **** --- 3570,3575 ---- \hbox to\pagewidth{\box0\hfil\box2}% } + % + % All done with double columns. \def\enddoublecolumns{% \output = {% *************** *** 3204,3209 **** \pagegoal = \vsize } \def\balancecolumns{% - % Called at the end of the double column material. \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. \dimen@ = \ht0 --- 3596,3602 ---- \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 *************** *** 3360,3399 **** \def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz \def\chapterzzz #1{% ! \secno=0 \subsecno=0 \subsubsecno=0 ! \global\advance \chapno by 1 \message{\putwordChapter\space \the\chapno}% ! \chapmacro {#1}{\the\chapno}% ! \gdef\thissection{#1}% ! \gdef\thischaptername{#1}% ! % We don't substitute the actual chapter name into \thischapter ! % because we don't want its macros evaluated now. ! \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% ! \toks0 = {#1}% ! \edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}% ! {\the\chapno}}}% ! \temp ! \donoderef ! \global\let\section = \numberedsec ! \global\let\subsection = \numberedsubsec ! \global\let\subsubsection = \numberedsubsubsec ! } \outer\def\appendix{\parsearg\appendixyyy} \def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz \def\appendixzzz #1{% ! \secno=0 \subsecno=0 \subsubsecno=0 ! \global\advance \appendixno by 1 ! \message{\putwordAppendix\space \appendixletter}% ! \chapmacro {#1}{\putwordAppendix{} \appendixletter}% ! \gdef\thissection{#1}% ! \gdef\thischaptername{#1}% ! \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% ! \toks0 = {#1}% ! \edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}% ! {\putwordAppendix{} \appendixletter}}}% ! \temp ! \appendixnoderef ! \global\let\section = \appendixsec ! \global\let\subsection = \appendixsubsec ! \global\let\subsubsection = \appendixsubsubsec } --- 3753,3791 ---- \def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz \def\chapterzzz #1{% ! \secno=0 \subsecno=0 \subsubsecno=0 ! \global\advance \chapno by 1 \message{\putwordChapter\space \the\chapno}% ! \chapmacro {#1}{\the\chapno}% ! \gdef\thissection{#1}% ! \gdef\thischaptername{#1}% ! % We don't substitute the actual chapter name into \thischapter ! % because we don't want its macros evaluated now. ! \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% ! \writetocentry{chap}{#1}{{\the\chapno}} ! \donoderef ! \global\let\section = \numberedsec ! \global\let\subsection = \numberedsubsec ! \global\let\subsubsection = \numberedsubsubsec ! } ! ! % we use \chapno to avoid indenting back ! \def\appendixbox#1{% ! \setbox0 = \hbox{\putwordAppendix{} \the\chapno}% ! \hbox to \wd0{#1\hss}} \outer\def\appendix{\parsearg\appendixyyy} \def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz \def\appendixzzz #1{% ! \secno=0 \subsecno=0 \subsubsecno=0 ! \global\advance \appendixno by 1 ! \message{\putwordAppendix\space \appendixletter}% ! \chapmacro {#1}{\appendixbox{\putwordAppendix{} \appendixletter}}% ! \gdef\thissection{#1}% ! \gdef\thischaptername{#1}% ! \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% ! \writetocentry{appendix}{#1}{{\appendixletter}} ! \appendixnoderef ! \global\let\section = \appendixsec ! \global\let\subsection = \appendixsubsec ! \global\let\subsubsection = \appendixsubsubsec } *************** *** 3408,3435 **** \def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz \def\unnumberedzzz #1{% ! \secno=0 \subsecno=0 \subsubsecno=0 ! % ! % This used to be simply \message{#1}, but TeX fully expands the ! % argument to \message. Therefore, if #1 contained @-commands, TeX ! % expanded them. For example, in `@unnumbered The @cite{Book}', TeX ! % expanded @cite (which turns out to cause errors because \cite is meant ! % to be executed, not expanded). ! % ! % Anyway, we don't want the fully-expanded definition of @cite to appear ! % as a result of the \message, we just want `@cite' itself. We use ! % \the 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)}% ! % ! \unnumbchapmacro {#1}% ! \gdef\thischapter{#1}\gdef\thissection{#1}% ! \toks0 = {#1}% ! \edef\temp{\noexpand\writetocentry{\realbackslash unnumbchapentry{\the\toks0}}}% ! \temp ! \unnumbnoderef ! \global\let\section = \unnumberedsec ! \global\let\subsection = \unnumberedsubsec ! \global\let\subsubsection = \unnumberedsubsubsec } --- 3800,3825 ---- \def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz \def\unnumberedzzz #1{% ! \secno=0 \subsecno=0 \subsubsecno=0 ! % ! % This used to be simply \message{#1}, but TeX fully expands the ! % argument to \message. Therefore, if #1 contained @-commands, TeX ! % expanded them. For example, in `@unnumbered The @cite{Book}', TeX ! % expanded @cite (which turns out to cause errors because \cite is meant ! % to be executed, not expanded). ! % ! % Anyway, we don't want the fully-expanded definition of @cite to appear ! % as a result of the \message, we just want `@cite' itself. We use ! % \the 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)}% ! % ! \unnumbchapmacro {#1}% ! \gdef\thischapter{#1}\gdef\thissection{#1}% ! \writetocentry{unnumbchap}{#1}{{\the\chapno}} ! \unnumbnoderef ! \global\let\section = \unnumberedsec ! \global\let\subsection = \unnumberedsubsec ! \global\let\subsubsection = \unnumberedsubsubsec } *************** *** 3438,3449 **** \def\secyyy #1{\numhead1{#1}} % normally calls seczzz \def\seczzz #1{% ! \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % ! \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% ! \toks0 = {#1}% ! \edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}% ! {\the\chapno}{\the\secno}}}% ! \temp ! \donoderef ! \nobreak } --- 3828,3836 ---- \def\secyyy #1{\numhead1{#1}} % normally calls seczzz \def\seczzz #1{% ! \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % ! \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% ! \writetocentry{sec}{#1}{{\the\chapno}{\the\secno}} ! \donoderef ! \nobreak } *************** *** 3452,3463 **** \def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz \def\appendixsectionzzz #1{% ! \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % ! \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}% ! \toks0 = {#1}% ! \edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}% ! {\appendixletter}{\the\secno}}}% ! \temp ! \appendixnoderef ! \nobreak } --- 3839,3847 ---- \def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz \def\appendixsectionzzz #1{% ! \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % ! \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}% ! \writetocentry{sec}{#1}{{\appendixletter}{\the\secno}} ! \appendixnoderef ! \nobreak } *************** *** 3465,3474 **** \def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz \def\unnumberedseczzz #1{% ! \plainsecheading {#1}\gdef\thissection{#1}% ! \toks0 = {#1}% ! \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsecentry{\the\toks0}}}% ! \temp ! \unnumbnoderef ! \nobreak } --- 3849,3856 ---- \def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz \def\unnumberedseczzz #1{% ! \plainsecheading {#1}\gdef\thissection{#1}% ! \writetocentry{unnumbsec}{#1}{{\the\chapno}{\the\secno}} ! \unnumbnoderef ! \nobreak } *************** *** 3477,3488 **** \def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz \def\numberedsubseczzz #1{% ! \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % ! \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% ! \toks0 = {#1}% ! \edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}% ! {\the\chapno}{\the\secno}{\the\subsecno}}}% ! \temp ! \donoderef ! \nobreak } --- 3859,3867 ---- \def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz \def\numberedsubseczzz #1{% ! \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % ! \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% ! \writetocentry{subsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}} ! \donoderef ! \nobreak } *************** *** 3490,3501 **** \def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz \def\appendixsubseczzz #1{% ! \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % ! \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}% ! \toks0 = {#1}% ! \edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}% ! {\appendixletter}{\the\secno}{\the\subsecno}}}% ! \temp ! \appendixnoderef ! \nobreak } --- 3869,3877 ---- \def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz \def\appendixsubseczzz #1{% ! \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % ! \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}% ! \writetocentry{subsec}{#1}{{\appendixletter}{\the\secno}{\the\subsecno}} ! \appendixnoderef ! \nobreak } *************** *** 3503,3513 **** \def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz \def\unnumberedsubseczzz #1{% ! \plainsubsecheading {#1}\gdef\thissection{#1}% ! \toks0 = {#1}% ! \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsecentry% ! {\the\toks0}}}% ! \temp ! \unnumbnoderef ! \nobreak } --- 3879,3886 ---- \def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz \def\unnumberedsubseczzz #1{% ! \plainsubsecheading {#1}\gdef\thissection{#1}% ! \writetocentry{unnumbsubsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}} ! \unnumbnoderef ! \nobreak } *************** *** 3516,3528 **** \def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz \def\numberedsubsubseczzz #1{% ! \gdef\thissection{#1}\global\advance \subsubsecno by 1 % ! \subsubsecheading {#1} ! {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}% ! \toks0 = {#1}% ! \edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}% ! {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}% ! \temp ! \donoderef ! \nobreak } --- 3889,3898 ---- \def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz \def\numberedsubsubseczzz #1{% ! \gdef\thissection{#1}\global\advance \subsubsecno by 1 % ! \subsubsecheading {#1} ! {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}% ! \writetocentry{subsubsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}} ! \donoderef ! \nobreak } *************** *** 3530,3542 **** \def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz \def\appendixsubsubseczzz #1{% ! \gdef\thissection{#1}\global\advance \subsubsecno by 1 % ! \subsubsecheading {#1} ! {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}% ! \toks0 = {#1}% ! \edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}% ! {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}% ! \temp ! \appendixnoderef ! \nobreak } --- 3900,3909 ---- \def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz \def\appendixsubsubseczzz #1{% ! \gdef\thissection{#1}\global\advance \subsubsecno by 1 % ! \subsubsecheading {#1} ! {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}% ! \writetocentry{subsubsec}{#1}{{\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}} ! \appendixnoderef ! \nobreak } *************** *** 3544,3554 **** \def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz \def\unnumberedsubsubseczzz #1{% ! \plainsubsubsecheading {#1}\gdef\thissection{#1}% ! \toks0 = {#1}% ! \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsubsecentry% ! {\the\toks0}}}% ! \temp ! \unnumbnoderef ! \nobreak } --- 3911,3918 ---- \def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz \def\unnumberedsubsubseczzz #1{% ! \plainsubsubsecheading {#1}\gdef\thissection{#1}% ! \writetocentry{unnumbsubsubsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}} ! \unnumbnoderef ! \nobreak } *************** *** 3591,3604 **** \def\majorheading{\parsearg\majorheadingzzz} \def\majorheadingzzz #1{% ! {\advance\chapheadingskip by 10pt \chapbreak }% ! {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 ! \parindent=0pt\raggedright ! \rm #1\hfill}}\bigskip \par\penalty 200} \def\chapheading{\parsearg\chapheadingzzz} \def\chapheadingzzz #1{\chapbreak % ! {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 ! \parindent=0pt\raggedright ! \rm #1\hfill}}\bigskip \par\penalty 200} % @heading, @subheading, @subsubheading. --- 3955,3968 ---- \def\majorheading{\parsearg\majorheadingzzz} \def\majorheadingzzz #1{% ! {\advance\chapheadingskip by 10pt \chapbreak }% ! {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 ! \parindent=0pt\raggedright ! \rm #1\hfill}}\bigskip \par\penalty 200} \def\chapheading{\parsearg\chapheadingzzz} \def\chapheadingzzz #1{\chapbreak % ! {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 ! \parindent=0pt\raggedright ! \rm #1\hfill}}\bigskip \par\penalty 200} % @heading, @subheading, @subsubheading. *************** *** 3746,3750 **** \unhbox0 #3}% }% ! \ifdim\parskip<10pt \nobreak\kern10pt\nobreak\kern-\parskip\fi \nobreak } --- 4110,4123 ---- \unhbox0 #3}% }% ! % Add extra space after the heading -- either a line space or a ! % paragraph space, whichever is more. (Some people like to set ! % \parskip to large values for some reason.) Don't allow stretch, though. ! \nobreak ! \ifdim\parskip>\normalbaselineskip ! \kern\parskip ! \else ! \kern\normalbaselineskip ! \fi ! \nobreak } *************** *** 3758,3771 **** % argument, which will end up as the last argument to the \...entry macro. % ! % We open the .toc file here instead of at @setfilename or any other ! % given time so that @contents can be put in the document anywhere. % \newif\iftocfileopened ! \def\writetocentry#1{% \iftocfileopened\else \immediate\openout\tocfile = \jobname.toc \global\tocfileopenedtrue \fi ! \iflinks \write\tocfile{#1{\folio}}\fi } --- 4131,4158 ---- % argument, which will end up as the last argument to the \...entry macro. % ! % Usage: \writetocentry{chap}{The Name of The Game}{{\the\chapno}} ! % 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. % \newif\iftocfileopened ! \def\writetocentry#1#2#3{% \iftocfileopened\else \immediate\openout\tocfile = \jobname.toc \global\tocfileopenedtrue \fi ! % ! \iflinks ! \toks0 = {#2}% ! \edef\temp{\write\tocfile{\realbackslash #1entry{\the\toks0}#3{\folio}}}% ! \temp ! \fi ! % ! % Tell \shipout to create a page destination if we're doing pdf, which ! % will be the target of the links in the table of contents. We can't ! % just do it 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 \pdfmakepagedesttrue \fi } *************** *** 3798,3802 **** % % Roman numerals for page numbers. ! \ifnum \pageno>0 \pageno = \lastnegativepageno \fi } --- 4185,4189 ---- % % Roman numerals for page numbers. ! \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi } *************** *** 3815,3819 **** \endgroup \lastnegativepageno = \pageno ! \pageno = \savepageno } --- 4202,4206 ---- \endgroup \lastnegativepageno = \pageno ! \global\pageno = \savepageno } *************** *** 3823,3839 **** % \let\chapentry = \shortchapentry \let\unnumbchapentry = \shortunnumberedentry % We want a true roman here for the page numbers. \secfonts ! \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl \rm \hyphenpenalty = 10000 \advance\baselineskip by 1pt % Open it up a little. \def\secentry ##1##2##3##4{} - \def\unnumbsecentry ##1##2{} \def\subsecentry ##1##2##3##4##5{} - \def\unnumbsubsecentry ##1##2{} \def\subsubsecentry ##1##2##3##4##5##6{} ! \def\unnumbsubsubsecentry ##1##2{} \openin 1 \jobname.toc \ifeof 1 \else --- 4210,4228 ---- % \let\chapentry = \shortchapentry + \let\appendixentry = \shortappendixentry \let\unnumbchapentry = \shortunnumberedentry % 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\secentry ##1##2##3##4{} \def\subsecentry ##1##2##3##4##5{} \def\subsubsecentry ##1##2##3##4##5##6{} ! \let\unnumbsecentry = \secentry ! \let\unnumbsubsecentry = \subsecentry ! \let\unnumbsubsubsecentry = \subsubsecentry \openin 1 \jobname.toc \ifeof 1 \else *************** *** 3845,3849 **** \endgroup \lastnegativepageno = \pageno ! \pageno = \savepageno } \let\shortcontents = \summarycontents --- 4234,4238 ---- \endgroup \lastnegativepageno = \pageno ! \global\pageno = \savepageno } \let\shortcontents = \summarycontents *************** *** 3858,3871 **** % The arguments in between are the chapter number, section number, ... ! % Chapter-level things, for both the long and short contents. \def\chapentry#1#2#3{\dochapentry{#2\labelspace#1}{#3}} ! ! % See comments in \dochapentry re vbox and related settings \def\shortchapentry#1#2#3{% \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#3\egroup}% } % Typeset the label for a chapter or appendix for the short contents. ! % The arg is, e.g. `Appendix A' for an appendix, or `3' for a chapter. % We could simplify the code here by writing out an \appendixentry % command in the toc file for appendices, instead of using \chapentry --- 4247,4268 ---- % The arguments in between are the chapter number, section number, ... ! % Chapters, in the main contents. \def\chapentry#1#2#3{\dochapentry{#2\labelspace#1}{#3}} ! % ! % Chapters, in the short toc. ! % See comments in \dochapentry re vbox and related settings. \def\shortchapentry#1#2#3{% \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#3\egroup}% } + % Appendices, in the main contents. + \def\appendixentry#1#2#3{% + \dochapentry{\appendixbox{\putwordAppendix{} #2}\labelspace#1}{#3}} + % + % Appendices, in the short toc. + \let\shortappendixentry = \shortchapentry + % Typeset the label for a chapter or appendix for the short contents. ! % The arg is, e.g., `Appendix A' for an appendix, or `3' for a chapter. % We could simplify the code here by writing out an \appendixentry % command in the toc file for appendices, instead of using \chapentry *************** *** 3875,3910 **** % \def\shortchaplabel#1{% ! % Compute width of word "Appendix", may change with language. ! \setbox0 = \hbox{\shortcontrm \putwordAppendix}% ! \shortappendixwidth = \wd0 ! % ! % We typeset #1 in a box of constant width, regardless of the text of ! % #1, so the chapter titles will come out aligned. ! \setbox0 = \hbox{#1}% ! \dimen0 = \ifdim\wd0 > \shortappendixwidth \shortappendixwidth \else 0pt \fi ! % ! % This space should be plenty, since a single number is .5em, and the % widest letter (M) is 1em, at least in the Computer Modern fonts. % (This space doesn't include the extra space that gets added after % the label; that gets put in by \shortchapentry above.) ! \advance\dimen0 by 1.1em ! \hbox to \dimen0{#1\hfil}% } ! \def\unnumbchapentry#1#2{\dochapentry{#1}{#2}} ! \def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno\bgroup#2\egroup}} % Sections. \def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}} ! \def\unnumbsecentry#1#2{\dosecentry{#1}{#2}} % Subsections. \def\subsecentry#1#2#3#4#5{\dosubsecentry{#2.#3.#4\labelspace#1}{#5}} ! \def\unnumbsubsecentry#1#2{\dosubsecentry{#1}{#2}} % And subsubsections. \def\subsubsecentry#1#2#3#4#5#6{% \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}} ! \def\unnumbsubsubsecentry#1#2{\dosubsubsecentry{#1}{#2}} % This parameter controls the indentation of the various levels. --- 4272,4300 ---- % \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.) ! \dimen0 = 1em ! \hbox to \dimen0{#1\hss}% } ! % Unnumbered chapters. ! \def\unnumbchapentry#1#2#3{\dochapentry{#1}{#3}} ! \def\shortunnumberedentry#1#2#3{\tocentry{#1}{\doshortpageno\bgroup#3\egroup}} % Sections. \def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}} ! \def\unnumbsecentry#1#2#3#4{\dosecentry{#1}{#4}} % Subsections. \def\subsecentry#1#2#3#4#5{\dosubsecentry{#2.#3.#4\labelspace#1}{#5}} ! \def\unnumbsubsecentry#1#2#3#4#5{\dosubsecentry{#1}{#5}} % And subsubsections. \def\subsubsecentry#1#2#3#4#5#6{% \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}} ! \def\unnumbsubsubsecentry#1#2#3#4#5#6{\dosubsubsecentry{#1}{#6}} % This parameter controls the indentation of the various levels. *************** *** 3947,3951 **** \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks % Do not use \turnoffactive in these arguments. Since the toc is ! % typeset in cmr, so characters such as _ would come out wrong; we % have to do the usual translation tricks. \entry{#1}{#2}% --- 4337,4341 ---- \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks % Do not use \turnoffactive in these arguments. Since the toc is ! % typeset in cmr, characters such as _ would come out wrong; we % have to do the usual translation tricks. \entry{#1}{#2}% *************** *** 3967,3988 **** % @foo ... @end foo. % Since these characters are used in examples, it should be an even number of % \tt widths. Each \tt character is 1en, so two makes it 1em. ! % Furthermore, these definitions must come after we define our fonts. ! \newbox\dblarrowbox \newbox\longdblarrowbox ! \newbox\pushcharbox \newbox\bullbox ! \newbox\equivbox \newbox\errorbox ! ! %{\tentt ! %\global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil} ! %\global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil} ! %\global\setbox\pushcharbox = \hbox to 1em{\hfil$\dashv$\hfil} ! %\global\setbox\equivbox = \hbox to 1em{\hfil$\ptexequiv$\hfil} ! % Adapted from the manmac format (p.420 of TeXbook) ! %\global\setbox\bullbox = \hbox to 1em{\kern.15em\vrule height .75ex width .85ex ! % depth .1ex\hfil} ! %} ! ! % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. \def\point{$\star$} \def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} --- 4357,4365 ---- % @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}} *************** *** 3991,4000 **** \def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}} % Adapted from the TeXbook's \boxit. {\tentt \global\dimen0 = 3em}% Width of the box. \dimen2 = .55pt % Thickness of rules % The text. (`r' is open on the right, `e' somewhat less so on the left.) \setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt} ! \global\setbox\errorbox=\hbox to \dimen0{\hfil \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. --- 4368,4381 ---- \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} ! % \global\setbox\errorbox=\hbox to \dimen0{\hfil \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. *************** *** 4007,4012 **** \hrule height\dimen2} \hfil} ! ! % The @error{} command. \def\error{\leavevmode\lower.7ex\copy\errorbox} --- 4388,4392 ---- \hrule height\dimen2} \hfil} ! % \def\error{\leavevmode\lower.7ex\copy\errorbox} *************** *** 4018,4029 **** \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 ! \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie \catcode `\%=14 ! \catcode 43=12 % plus ! \catcode`\"=12 ! \catcode`\==12 ! \catcode`\|=12 ! \catcode`\<=12 ! \catcode`\>=12 \escapechar=`\\ % --- 4398,4409 ---- \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 ! \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie \catcode `\%=14 ! \catcode `\+=\other ! \catcode `\"=\other ! \catcode `\==\other ! \catcode `\|=\other ! \catcode `\<=\other ! \catcode `\>=\other \escapechar=`\\ % *************** *** 4048,4054 **** \let\Etex=\endgroup} ! % Define @lisp ... @endlisp. % @lisp does a \begingroup so it can rebind things, ! % including the definition of @endlisp (which normally is erroneous). % Amount to narrow the margins by for @lisp. --- 4428,4434 ---- \let\Etex=\endgroup} ! % Define @lisp ... @end lisp. % @lisp does a \begingroup so it can rebind things, ! % including the definition of @end lisp (which normally is erroneous). % Amount to narrow the margins by for @lisp. *************** *** 4079,4087 **** % to help in doing that, since in @example-like environments \parskip % is reset to zero; thus the \afterenvbreak inserts no space -- but the ! % start of the next paragraph will insert \parskip % ! \def\aboveenvbreak{{\advance\envskipamount by \parskip ! \endgraf \ifdim\lastskip<\envskipamount ! \removelastskip \penalty-50 \vskip\envskipamount \fi}} \let\afterenvbreak = \aboveenvbreak --- 4459,4478 ---- % 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 \else \penalty-50 \fi ! \vskip\envskipamount ! \fi ! \fi ! }} \let\afterenvbreak = \aboveenvbreak *************** *** 4111,4115 **** \newskip\lskip\newskip\rskip ! \long\def\cartouche{% \begingroup \lskip=\leftskip \rskip=\rightskip --- 4502,4507 ---- \newskip\lskip\newskip\rskip ! \def\cartouche{% ! \par % can't be in the midst of a paragraph. \begingroup \lskip=\leftskip \rskip=\rightskip *************** *** 4158,4162 **** \hfuzz = 12pt % Don't be fussy \sepspaces % Make spaces be word-separators rather than space tokens. - \singlespace \let\par = \lisppar % don't ignore blank lines \obeylines % each line of input is a line of output --- 4550,4553 ---- *************** *** 4197,4221 **** \def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp} ! % @small... is usually equivalent to the non-small (@smallbook ! % redefines). We must call \example (or whatever) last in the ! % definition, since it reads the return following the @example (or ! % whatever) command. ! % ! % This actually allows (for example) @end display inside an ! % @smalldisplay. Too bad, but makeinfo will catch the error anyway. ! % ! \def\smalldisplay{\begingroup\def\Esmalldisplay{\nonfillfinish\endgroup}\display} ! \def\smallexample{\begingroup\def\Esmallexample{\nonfillfinish\endgroup}\lisp} ! \def\smallformat{\begingroup\def\Esmallformat{\nonfillfinish\endgroup}\format} ! \def\smalllisp{\begingroup\def\Esmalllisp{\nonfillfinish\endgroup}\lisp} ! ! % Real @smallexample and @smalllisp (when @smallbook): use smaller fonts. % Originally contributed by Pavel@xerox. ! \def\smalllispx{\begingroup \def\Esmalllisp{\nonfillfinish\endgroup}% \def\Esmallexample{\nonfillfinish\endgroup}% ! \smallfonts \lisp } % @display: same as @lisp except keep current font. --- 4588,4601 ---- \def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp} ! % @smallexample and @smalllisp: use smaller fonts. % Originally contributed by Pavel@xerox. ! \def\smalllisp{\begingroup \def\Esmalllisp{\nonfillfinish\endgroup}% \def\Esmallexample{\nonfillfinish\endgroup}% ! \smallexamplefonts \lisp } + \let\smallexample = \smalllisp + % @display: same as @lisp except keep current font. *************** *** 4226,4235 **** \gobble } - - % @smalldisplay (when @smallbook): @display plus smaller fonts. % ! \def\smalldisplayx{\begingroup \def\Esmalldisplay{\nonfillfinish\endgroup}% ! \smallfonts \rm \display } --- 4606,4615 ---- \gobble } % ! % @smalldisplay: @display plus smaller fonts. ! % ! \def\smalldisplay{\begingroup \def\Esmalldisplay{\nonfillfinish\endgroup}% ! \smallexamplefonts \rm \display } *************** *** 4243,4252 **** \gobble } - - % @smallformat (when @smallbook): @format plus smaller fonts. % ! \def\smallformatx{\begingroup \def\Esmallformat{\nonfillfinish\endgroup}% ! \smallfonts \rm \format } --- 4623,4632 ---- \gobble } % ! % @smallformat: @format plus smaller fonts. ! % ! \def\smallformat{\begingroup \def\Esmallformat{\nonfillfinish\endgroup}% ! \smallexamplefonts \rm \format } *************** *** 4266,4269 **** --- 4646,4650 ---- } + % @quotation does normal linebreaking (hence we can't use \nonfillstart) % and narrows the margins. *************** *** 4272,4276 **** \begingroup\inENV %This group ends at the end of the @quotation body {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip - \singlespace \parindent=0pt % We have retained a nonzero parskip for the environment, since we're --- 4653,4656 ---- *************** *** 4288,4308 **** \message{defuns,} % @defun etc. % Allow user to change definition object font (\df) internally ! \def\setdeffont #1 {\csname DEF#1\endcsname} \newskip\defbodyindent \defbodyindent=.4in \newskip\defargsindent \defargsindent=50pt - \newskip\deftypemargin \deftypemargin=12pt \newskip\deflastargmargin \deflastargmargin=18pt \newcount\parencount ! % define \functionparens, which makes ( and ) and & do special things. ! % \functionparens affects the group it is contained in. \def\activeparens{% ! \catcode`\(=\active \catcode`\)=\active \catcode`\&=\active ! \catcode`\[=\active \catcode`\]=\active} % Make control sequences which act like normal parenthesis chars. --- 4668,4922 ---- + % 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=12}\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{% + % 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`\{=12\catcode`\}=12 + \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] + %% Include LaTeX hack for completeness -- never know + %% \begingroup + %% \catcode`|=0 \catcode`[=1 + %% \catcode`]=2\catcode`\{=12\catcode`\}=12\catcode`\ =\active + %% \catcode`\\=12|gdef|doverbatim#1@end verbatim[ + %% #1|endgroup|def|Everbatim[]|end[verbatim]] + %% |endgroup + % + \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. + \gdef\doverbatim#1^^M#2@end verbatim{#2\end{verbatim}}% + \endgroup + % + \def\verbatim{% + \def\Everbatim{\nonfillfinish\endgroup}% + \begingroup + \nonfillstart + \advance\leftskip by -\defbodyindent + \begingroup\setupverbatim\doverbatim + } + + % @verbatiminclude FILE - insert text of file in verbatim environment. + % + % Allow normal characters that we make active in the argument (a file name). + \def\verbatiminclude{% + \begingroup + \catcode`\\=\other + \catcode`~=\other + \catcode`^=\other + \catcode`_=\other + \catcode`|=\other + \catcode`<=\other + \catcode`>=\other + \catcode`+=\other + \parsearg\doverbatiminclude + } + \def\setupverbatiminclude{% + \begingroup + \nonfillstart + \advance\leftskip by -\defbodyindent + \begingroup\setupverbatim + } + % + \def\doverbatiminclude#1{% + % Restore active chars for included file. + \endgroup + \begingroup + \let\value=\expandablevalue + \def\thisfile{#1}% + \expandafter\expandafter\setupverbatiminclude\input\thisfile + \endgroup + \nonfillfinish + \endgroup + } + + % @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. % Allow user to change definition object font (\df) internally ! \def\setdeffont#1 {\csname DEF#1\endcsname} \newskip\defbodyindent \defbodyindent=.4in \newskip\defargsindent \defargsindent=50pt \newskip\deflastargmargin \deflastargmargin=18pt \newcount\parencount ! ! % 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. *************** *** 4351,4436 **** % Active &'s sneak into the index arguments, so make sure it's defined. { ! \catcode`& = 13 \global\let& = \ampnr } ! % First, defname, which formats the header line itself. ! % #1 should be the function name. ! % #2 should be the type of definition, such as "Function". ! ! \def\defname #1#2{% ! % Get the values of \leftskip and \rightskip as they were ! % outside the @def... ! \dimen2=\leftskip ! \advance\dimen2 by -\defbodyindent ! \noindent ! \setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}% ! \dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line ! \dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations ! \parshape 2 0in \dimen0 \defargsindent \dimen1 ! % Now output arg 2 ("Function" or some such) ! % ending at \deftypemargin from the right margin, ! % but stuck inside a box of width 0 so it does not interfere with linebreaking ! {% Adjust \hsize to exclude the ambient margins, ! % so that \rightline will obey them. ! \advance \hsize by -\dimen2 ! \rlap{\rightline{{\rm #2}\hskip -1.25pc }}}% ! % Make all lines underfull and no complaints: ! \tolerance=10000 \hbadness=10000 ! \advance\leftskip by -\defbodyindent ! \exdentamount=\defbodyindent ! {\df #1}\enskip % Generate function name ! } ! ! % Actually process the body of a definition ! % #1 should be the terminating control sequence, such as \Edefun. ! % #2 should be the "another name" control sequence, such as \defunx. ! % #3 should be the control sequence that actually processes the header, ! % such as \defunheader. ! ! \def\defparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody ! \medbreak % ! % Define the end token that this defining construct specifies ! % so that it will exit this group. ! \def#1{\endgraf\endgroup\medbreak}% ! \def#2{\begingroup\obeylines\activeparens\spacesplit#3}% ! \parindent=0in ! \advance\leftskip by \defbodyindent ! \exdentamount=\defbodyindent ! \begingroup % ! \catcode 61=\active % 61 is `=' ! \obeylines\activeparens\spacesplit#3} % #1 is the \E... control sequence to end the definition (which we define). ! % #2 is the \...x control sequence for consecutive fns (which we define). ! % #3 is the control sequence to call to resume processing. % #4, delimited by the space, is the class name. % ! \def\defmethparsebody#1#2#3#4 {\begingroup\inENV % ! \medbreak % ! % Define the end token that this defining construct specifies ! % so that it will exit this group. ! \def#1{\endgraf\endgroup\medbreak}% ! \def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}% ! \parindent=0in ! \advance\leftskip by \defbodyindent ! \exdentamount=\defbodyindent ! \begingroup\obeylines\activeparens\spacesplit{#3{#4}}} % Used for @deftypemethod and @deftypeivar. ! % #1 is the \E... control sequence to end the definition (which we define). ! % #2 is the \...x control sequence for consecutive fns (which we define). ! % #3 is the control sequence to call to resume processing. % #4, delimited by a space, is the class name. % #5 is the method's return type. % ! \def\deftypemethparsebody#1#2#3#4 #5 {\begingroup\inENV ! \medbreak ! \def#1{\endgraf\endgroup\medbreak}% ! \def#2##1 ##2 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}{##2}}}% ! \parindent=0in ! \advance\leftskip by \defbodyindent ! \exdentamount=\defbodyindent ! \begingroup\obeylines\activeparens\spacesplit{#3{#4}{#5}}} % Used for @deftypeop. The change from \deftypemethparsebody is an --- 4965,5086 ---- % Active &'s sneak into the index arguments, so make sure it's defined. { ! \catcode`& = \active \global\let& = \ampnr } ! % \defname, which formats the name of the @def (not the args). ! % #1 is the function name. ! % #2 is the type of definition, such as "Function". ! % ! \def\defname#1#2{% ! % How we'll output 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. ! \ifempty{#2}% ! \def\defnametype{}% ! \else ! \def\defnametype{[\rm #2]}% ! \fi ! % ! % Get the values of \leftskip and \rightskip as they were outside the @def... ! \dimen2=\leftskip ! \advance\dimen2 by -\defbodyindent ! % ! % Figure out values for the paragraph shape. ! \setbox0=\hbox{\hskip \deflastargmargin{\defnametype}}% ! \dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line ! \dimen1=\hsize \advance \dimen1 by -\defargsindent % size for continuations ! \parshape 2 0in \dimen0 \defargsindent \dimen1 ! % ! % Output arg 2 ("Function" or some such) but stuck inside a box of ! % width 0 so it does not interfere with linebreaking. ! \noindent ! % ! {% Adjust \hsize to exclude the ambient margins, ! % so that \rightline will obey them. ! \advance \hsize by -\dimen2 ! \dimen3 = 0pt % was -1.25pc ! \rlap{\rightline{\defnametype\kern\dimen3}}% ! }% ! % ! % Allow all lines to be underfull without complaint: ! \tolerance=10000 \hbadness=10000 ! \advance\leftskip by -\defbodyindent ! \exdentamount=\defbodyindent ! {\df #1}\enskip % output function name ! % \defunargs will be called next to output the arguments, if any. ! } + % Common pieces to start any @def... % #1 is the \E... control sequence to end the definition (which we define). ! % #2 is the \...x control sequence (which our caller defines). ! % #3 is the control sequence to process the header, such as \defunheader. ! % ! \def\parsebodycommon#1#2#3{% ! \begingroup\inENV ! % 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 want to allow a ! % break after all. 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 \penalty0 \fi ! \medbreak ! % ! % Define the \E... end token that this defining construct specifies ! % so that it will exit this group. ! \def#1{\endgraf\endgroup\medbreak}% ! % ! \parindent=0in ! \advance\leftskip by \defbodyindent ! \exdentamount=\defbodyindent ! } ! ! % Common part of the \...x definitions. ! % ! \def\defxbodycommon{% ! % As with \parsebodycommon above, allow line break if we have multiple ! % x headers in a row. It's not a great place, though. ! \ifnum\lastpenalty=10000 \penalty1000 \fi ! % ! \begingroup\obeylines ! } ! ! % Process body of @defun, @deffn, @defmac, etc. ! % ! \def\defparsebody#1#2#3{% ! \parsebodycommon{#1}{#2}{#3}% ! \def#2{\defxbodycommon \activeparens \spacesplit#3}% ! \catcode\equalChar=\active ! \begingroup\obeylines\activeparens ! \spacesplit#3% ! } ! ! % #1, #2, #3 are the common arguments (see \parsebodycommon above). % #4, delimited by the space, is the class name. % ! \def\defmethparsebody#1#2#3#4 {% ! \parsebodycommon{#1}{#2}{#3}% ! \def#2##1 {\defxbodycommon \activeparens \spacesplit{#3{##1}}}% ! \begingroup\obeylines\activeparens ! % The \empty here prevents misinterpretation of a construct such as ! % @deffn {whatever} {Enharmonic comma} ! % See comments at \deftpparsebody, although in our case we don't have ! % to remove the \empty afterwards, since it is empty. ! \spacesplit{#3{#4}}\empty ! } % Used for @deftypemethod and @deftypeivar. ! % #1, #2, #3 are the common arguments (see \defparsebody). % #4, delimited by a space, is the class name. % #5 is the method's return type. % ! \def\deftypemethparsebody#1#2#3#4 #5 {% ! \parsebodycommon{#1}{#2}{#3}% ! \def#2##1 ##2 {\defxbodycommon \activeparens \spacesplit{#3{##1}{##2}}}% ! \begingroup\obeylines\activeparens ! \spacesplit{#3{#4}{#5}}% ! } % Used for @deftypeop. The change from \deftypemethparsebody is an *************** *** 4441,4502 **** % the \E... definition to assign the category name to. % ! \def\deftypeopparsebody#1#2#3#4#5 #6 {\begingroup\inENV ! \medbreak ! \def#1{\endgraf\endgroup\medbreak}% ! \def#2##1 ##2 ##3 {% ! \def#4{##1}% ! \begingroup\obeylines\activeparens\spacesplit{#3{##2}{##3}}}% ! \parindent=0in ! \advance\leftskip by \defbodyindent ! \exdentamount=\defbodyindent ! \begingroup\obeylines\activeparens\spacesplit{#3{#5}{#6}}} ! \def\defopparsebody #1#2#3#4#5 {\begingroup\inENV % ! \medbreak % ! % Define the end token that this defining construct specifies ! % so that it will exit this group. ! \def#1{\endgraf\endgroup\medbreak}% ! \def#2##1 ##2 {\def#4{##1}% ! \begingroup\obeylines\activeparens\spacesplit{#3{##2}}}% ! \parindent=0in ! \advance\leftskip by \defbodyindent ! \exdentamount=\defbodyindent ! \begingroup\obeylines\activeparens\spacesplit{#3{#5}}} % These parsing functions are similar to the preceding ones % except that they do not make parens into active characters. % These are used for "variables" since they have no arguments. - - \def\defvarparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody - \medbreak % - % Define the end token that this defining construct specifies - % so that it will exit this group. - \def#1{\endgraf\endgroup\medbreak}% - \def#2{\begingroup\obeylines\spacesplit#3}% - \parindent=0in - \advance\leftskip by \defbodyindent - \exdentamount=\defbodyindent - \begingroup % - \catcode 61=\active % - \obeylines\spacesplit#3} - - % This is used for \def{tp,vr}parsebody. It could probably be used for - % some of the others, too, with some judicious conditionals. % ! \def\parsebodycommon#1#2#3{% ! \begingroup\inENV % ! \medbreak % ! % Define the end token that this defining construct specifies ! % so that it will exit this group. ! \def#1{\endgraf\endgroup\medbreak}% ! \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}% ! \parindent=0in ! \advance\leftskip by \defbodyindent ! \exdentamount=\defbodyindent \begingroup\obeylines } \def\defvrparsebody#1#2#3#4 {% \parsebodycommon{#1}{#2}{#3}% \spacesplit{#3{#4}}% } --- 5091,5136 ---- % the \E... definition to assign the category name to. % ! \def\deftypeopparsebody#1#2#3#4#5 #6 {% ! \parsebodycommon{#1}{#2}{#3}% ! \def#2##1 ##2 ##3 {\def#4{##1}% ! \defxbodycommon \activeparens \spacesplit{#3{##2}{##3}}}% ! \begingroup\obeylines\activeparens ! \spacesplit{#3{#5}{#6}}% ! } ! % For @defop. ! \def\defopparsebody #1#2#3#4#5 {% ! \parsebodycommon{#1}{#2}{#3}% ! \def#2##1 ##2 {\def#4{##1}% ! \defxbodycommon \activeparens \spacesplit{#3{##2}}}% ! \begingroup\obeylines\activeparens ! \spacesplit{#3{#5}}% ! } % These parsing functions are similar to the preceding ones % except that they do not make parens into active characters. % These are used for "variables" since they have no arguments. % ! \def\defvarparsebody #1#2#3{% ! \parsebodycommon{#1}{#2}{#3}% ! \def#2{\defxbodycommon \spacesplit#3}% ! \catcode\equalChar=\active ! \begingroup\obeylines ! \spacesplit#3% ! } ! ! % @defopvar. ! \def\defopvarparsebody #1#2#3#4#5 {% ! \parsebodycommon{#1}{#2}{#3}% ! \def#2##1 ##2 {\def#4{##1}% ! \defxbodycommon \spacesplit{#3{##2}}}% \begingroup\obeylines + \spacesplit{#3{#5}}% } \def\defvrparsebody#1#2#3#4 {% \parsebodycommon{#1}{#2}{#3}% + \def#2##1 {\defxbodycommon \spacesplit{#3{##1}}}% + \begingroup\obeylines \spacesplit{#3{#4}}% } *************** *** 4513,4516 **** --- 5147,5152 ---- \def\deftpparsebody #1#2#3#4 {% \parsebodycommon{#1}{#2}{#3}% + \def#2##1 {\defxbodycommon \spacesplit{#3{##1}}}% + \begingroup\obeylines \spacesplit{\parsetpheaderline{#3{#4}}}\empty } *************** *** 4529,4545 **** }% ! \def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV % ! \medbreak % ! % Define the end token that this defining construct specifies ! % so that it will exit this group. ! \def#1{\endgraf\endgroup\medbreak}% ! \def#2##1 ##2 {\def#4{##1}% ! \begingroup\obeylines\spacesplit{#3{##2}}}% ! \parindent=0in ! \advance\leftskip by \defbodyindent ! \exdentamount=\defbodyindent ! \begingroup\obeylines\spacesplit{#3{#5}}} ! ! % Split up #2 at the first space token. % call #1 with two arguments: % the first is all of #2 before the space token, --- 5165,5169 ---- }% ! % Split up #2 (the rest of the input line) at the first space token. % call #1 with two arguments: % the first is all of #2 before the space token, *************** *** 4547,4564 **** % If #2 contains no space token, all of it is passed as the first arg % and the second is passed as empty. ! ! {\obeylines ! \gdef\spacesplit#1#2^^M{\endgroup\spacesplitfoo{#1}#2 \relax\spacesplitfoo}% ! \long\gdef\spacesplitfoo#1#2 #3#4\spacesplitfoo{% ! \ifx\relax #3% ! #1{#2}{}\else #1{#2}{#3#4}\fi}} ! ! % So much for the things common to all kinds of definitions. % Define @defun. ! % First, define the processing that is wanted for arguments of \defun ! % Use this to expand the args and terminate the paragraph they make up \def\defunargs#1{\functionparens \sl % Expand, preventing hyphenation at `-' chars. --- 5171,5199 ---- % If #2 contains no space token, all of it is passed as the first arg % and the second is passed as empty. ! % ! {\obeylines % ! \gdef\spacesplit#1#2^^M{\endgroup\spacesplitx{#1}#2 \relax\spacesplitx}% ! \long\gdef\spacesplitx#1#2 #3#4\spacesplitx{% ! \ifx\relax #3% ! #1{#2}{}% ! \else % ! #1{#2}{#3#4}% ! \fi}% ! } % Define @defun. ! % This is called to end the arguments processing for all the @def... commands. ! % ! \def\defargscommonending{% ! \interlinepenalty = 10000 ! \advance\rightskip by 0pt plus 1fil ! \endgraf ! \nobreak\vskip -\parskip ! \penalty 10002 % signal to \parsebodycommon. ! } + % This expands the args and terminates the paragraph they comprise. + % \def\defunargs#1{\functionparens \sl % Expand, preventing hyphenation at `-' chars. *************** *** 4569,4575 **** {\tensl\hyphenchar\font=45}% \ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi% ! \interlinepenalty=10000 ! \advance\rightskip by 0pt plus 1fil ! \endgraf\nobreak\vskip -\parskip\nobreak } --- 5204,5208 ---- {\tensl\hyphenchar\font=45}% \ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi% ! \defargscommonending } *************** *** 4580,4586 **** \boldbraxnoamp \tclose{#1}% avoid \code because of side effects on active chars ! \interlinepenalty=10000 ! \advance\rightskip by 0pt plus 1fil ! \endgraf\nobreak\vskip -\parskip\nobreak } --- 5213,5217 ---- \boldbraxnoamp \tclose{#1}% avoid \code because of side effects on active chars ! \defargscommonending } *************** *** 4593,4597 **** \def\deffnheader #1#2#3{\doind {fn}{\code{#2}}% \begingroup\defname {#2}{#1}\defunargs{#3}\endgroup % ! \catcode 61=\other % Turn off change made in \defparsebody } --- 5224,5228 ---- \def\deffnheader #1#2#3{\doind {fn}{\code{#2}}% \begingroup\defname {#2}{#1}\defunargs{#3}\endgroup % ! \catcode\equalChar=\other % Turn off change made in \defparsebody } *************** *** 4603,4607 **** \begingroup\defname {#1}{\putwordDeffunc}% \defunargs {#2}\endgroup % ! \catcode 61=\other % Turn off change made in \defparsebody } --- 5234,5238 ---- \begingroup\defname {#1}{\putwordDeffunc}% \defunargs {#2}\endgroup % ! \catcode\equalChar=\other % Turn off change made in \defparsebody } *************** *** 4615,4621 **** \def\deftypefunheaderx #1#2 #3\relax{% \doind {fn}{\code{#2}}% Make entry in function index ! \begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypefun}% \deftypefunargs {#3}\endgroup % ! \catcode 61=\other % Turn off change made in \defparsebody } --- 5246,5252 ---- \def\deftypefunheaderx #1#2 #3\relax{% \doind {fn}{\code{#2}}% Make entry in function index ! \begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypefun}% \deftypefunargs {#3}\endgroup % ! \catcode\equalChar=\other % Turn off change made in \defparsebody } *************** *** 4624,4630 **** \def\deftypefn{\defmethparsebody\Edeftypefn\deftypefnx\deftypefnheader} ! % \defheaderxcond#1\relax$$$ % puts #1 in @code, followed by a space, but does nothing if #1 is null. ! \def\defheaderxcond#1#2$$${\ifx#1\relax\else\code{#1#2} \fi} % #1 is the classification. #2 is the data type. #3 is the name and args. --- 5255,5261 ---- \def\deftypefn{\defmethparsebody\Edeftypefn\deftypefnx\deftypefnheader} ! % \defheaderxcond#1\relax$.$ % puts #1 in @code, followed by a space, but does nothing if #1 is null. ! \def\defheaderxcond#1#2$.${\ifx#1\relax\else\code{#1#2} \fi} % #1 is the classification. #2 is the data type. #3 is the name and args. *************** *** 4636,4642 **** \normalparens % notably, turn off `&' magic, which prevents % at least some C++ text from working ! \defname {\defheaderxcond#2\relax$$$#3}{#1}% \deftypefunargs {#4}\endgroup % ! \catcode 61=\other % Turn off change made in \defparsebody } --- 5267,5273 ---- \normalparens % notably, turn off `&' magic, which prevents % at least some C++ text from working ! \defname {\defheaderxcond#2\relax$.$#3}{#1}% \deftypefunargs {#4}\endgroup % ! \catcode\equalChar=\other % Turn off change made in \defparsebody } *************** *** 4648,4652 **** \begingroup\defname {#1}{\putwordDefmac}% \defunargs {#2}\endgroup % ! \catcode 61=\other % Turn off change made in \defparsebody } --- 5279,5283 ---- \begingroup\defname {#1}{\putwordDefmac}% \defunargs {#2}\endgroup % ! \catcode\equalChar=\other % Turn off change made in \defparsebody } *************** *** 4658,4662 **** \begingroup\defname {#1}{\putwordDefspec}% \defunargs {#2}\endgroup % ! \catcode 61=\other % Turn off change made in \defparsebody } --- 5289,5293 ---- \begingroup\defname {#1}{\putwordDefspec}% \defunargs {#2}\endgroup % ! \catcode\equalChar=\other % Turn off change made in \defparsebody } *************** *** 4667,4673 **** % \def\defopheader#1#2#3{% ! \dosubind {fn}{\code{#2}}{\putwordon\ #1}% Make entry in function index ! \begingroup\defname {#2}{\defoptype\ \putwordon\ #1}% ! \defunargs {#3}\endgroup % } --- 5298,5306 ---- % \def\defopheader#1#2#3{% ! \dosubind{fn}{\code{#2}}{\putwordon\ \code{#1}}% function index entry ! \begingroup ! \defname{#2}{\defoptype\ \putwordon\ #1}% ! \defunargs{#3}% ! \endgroup } *************** *** 4682,4686 **** \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index \begingroup ! \defname{\defheaderxcond#2\relax$$$#3} {\deftypeopcategory\ \putwordon\ \code{#1}}% \deftypefunargs{#4}% --- 5315,5319 ---- \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index \begingroup ! \defname{\defheaderxcond#2\relax$.$#3} {\deftypeopcategory\ \putwordon\ \code{#1}}% \deftypefunargs{#4}% *************** *** 4697,4701 **** \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index \begingroup ! \defname{\defheaderxcond#2\relax$$$#3}{\putwordMethodon\ \code{#1}}% \deftypefunargs{#4}% \endgroup --- 5330,5334 ---- \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index \begingroup ! \defname{\defheaderxcond#2\relax$.$#3}{\putwordMethodon\ \code{#1}}% \deftypefunargs{#4}% \endgroup *************** *** 4711,4715 **** \dosubind{vr}{\code{#3}}{\putwordof\ \code{#1}}% entry in variable index \begingroup ! \defname{#3}{\putwordInstanceVariableof\ \code{#1}}% \defvarargs{#3}% \endgroup --- 5344,5349 ---- \dosubind{vr}{\code{#3}}{\putwordof\ \code{#1}}% entry in variable index \begingroup ! \defname{\defheaderxcond#2\relax$.$#3} ! {\putwordInstanceVariableof\ \code{#1}}% \defvarargs{#3}% \endgroup *************** *** 4735,4741 **** \def\defcvarheader #1#2#3{% ! \dosubind {vr}{\code{#2}}{\putwordof\ #1}% Make entry in var index ! \begingroup\defname {#2}{\defcvtype\ \putwordof\ #1}% ! \defvarargs {#3}\endgroup % } --- 5369,5377 ---- \def\defcvarheader #1#2#3{% ! \dosubind{vr}{\code{#2}}{\putwordof\ \code{#1}}% variable index entry ! \begingroup ! \defname{#2}{\defcvtype\ \putwordof\ #1}% ! \defvarargs{#3}% ! \endgroup } *************** *** 4745,4749 **** % \def\defivarheader#1#2#3{% ! \dosubind {vr}{\code{#2}}{\putwordof\ #1}% entry in var index \begingroup \defname{#2}{\putwordInstanceVariableof\ #1}% --- 5381,5385 ---- % \def\defivarheader#1#2#3{% ! \dosubind{vr}{\code{#2}}{\putwordof\ \code{#1}}% entry in var index \begingroup \defname{#2}{\putwordInstanceVariableof\ #1}% *************** *** 4757,4762 **** % This must expand the args and terminate the paragraph they make up \def\defvarargs #1{\normalparens #1% ! \interlinepenalty=10000 ! \endgraf\nobreak\vskip -\parskip\nobreak} % @defvr Counter foo-count --- 5393,5398 ---- % This must expand the args and terminate the paragraph they make up \def\defvarargs #1{\normalparens #1% ! \defargscommonending ! } % @defvr Counter foo-count *************** *** 4793,4799 **** \def\deftypevarheader #1#2{% \dovarind#2 \relax% Make entry in variables index ! \begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypevar}% ! \interlinepenalty=10000 ! \endgraf\nobreak\vskip -\parskip\nobreak \endgroup} \def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}} --- 5429,5434 ---- \def\deftypevarheader #1#2{% \dovarind#2 \relax% Make entry in variables index ! \begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypevar}% ! \defargscommonending \endgroup} \def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}} *************** *** 4804,4810 **** \def\deftypevrheader #1#2#3{\dovarind#3 \relax% ! \begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1} ! \interlinepenalty=10000 ! \endgraf\nobreak\vskip -\parskip\nobreak \endgroup} --- 5439,5444 ---- \def\deftypevrheader #1#2#3{\dovarind#3 \relax% ! \begingroup\defname {\defheaderxcond#2\relax$.$#3}{#1} ! \defargscommonending \endgroup} *************** *** 4855,4859 **** \begingroup \newlinechar`\^^M % Undo catcode changes of \startcontents and \doprintindex ! \catcode`\@=0 \catcode`\\=12 \escapechar=`\@ % Append \endinput to make sure that TeX does not see the ending newline. \toks0={#1\endinput}% --- 5489,5493 ---- \begingroup \newlinechar`\^^M % Undo catcode changes of \startcontents and \doprintindex ! \catcode`\@=0 \catcode`\\=\other \escapechar=`\@ % Append \endinput to make sure that TeX does not see the ending newline. \toks0={#1\endinput}% *************** *** 4869,4873 **** \begingroup \newlinechar`\^^M % Undo catcode changes of \startcontents and \doprintindex ! \catcode`\@=0 \catcode`\\=12 \escapechar=`\@ \let\xeatspaces\eatspaces\scantokens{#1\endinput}\endgroup} \fi --- 5503,5507 ---- \begingroup \newlinechar`\^^M % Undo catcode changes of \startcontents and \doprintindex ! \catcode`\@=0 \catcode`\\=\other \escapechar=`\@ \let\xeatspaces\eatspaces\scantokens{#1\endinput}\endgroup} \fi *************** *** 4899,4903 **** % Trim a single trailing ^^M off a string. ! {\catcode`\^^M=12\catcode`\Q=3% \gdef\eatcr #1{\eatcra #1Q^^MQ}% \gdef\eatcra#1^^MQ{\eatcrb#1Q}% --- 5533,5537 ---- % 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}% *************** *** 4914,4940 **** \def\macrobodyctxt{% ! \catcode`\~=12 ! \catcode`\^=12 ! \catcode`\_=12 ! \catcode`\|=12 ! \catcode`\<=12 ! \catcode`\>=12 ! \catcode`\+=12 ! \catcode`\{=12 ! \catcode`\}=12 ! \catcode`\@=12 ! \catcode`\^^M=12 \usembodybackslash} \def\macroargctxt{% ! \catcode`\~=12 ! \catcode`\^=12 ! \catcode`\_=12 ! \catcode`\|=12 ! \catcode`\<=12 ! \catcode`\>=12 ! \catcode`\+=12 ! \catcode`\@=12 ! \catcode`\\=12} % \mbodybackslash is the definition of \ in @macro bodies. --- 5548,5574 ---- \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. *************** *** 4964,4968 **** \else \expandafter\ifx\csname \the\macname\endcsname \relax ! \else \errmessage{The name \the\macname\space is reserved}\fi \global\cslet{macsave.\the\macname}{\the\macname}% \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% --- 5598,5602 ---- \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% *************** *** 4977,5000 **** \fi} ! \def\unmacro{\parsearg\unmacroxxx} ! \def\unmacroxxx#1{% \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 ! \edef\tempa{\expandafter\noexpand\csname#1\endcsname}% ! \def\do##1{% ! \def\tempb{##1}% ! \ifx\tempa\tempb ! % remove this ! \else ! \toks0 = \expandafter{\newmacrolist\do}% ! \edef\newmacrolist{\the\toks0\expandafter\noexpand\tempa}% ! \fi}% ! \def\newmacrolist{}% ! % Execute macro list to define \newmacrolist ! \macrolist ! \global\let\macrolist\newmacrolist \endgroup \else --- 5611,5624 ---- \fi} ! \def\unmacro{\parsearg\dounmacro} ! \def\dounmacro#1{% \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 *************** *** 5003,5006 **** --- 5627,5641 ---- } + % 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 *************** *** 5185,5197 **** \gdef\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} ! % \setref{NAME}{SNT} defines a cross-reference point NAME, namely ! % NAME-title, NAME-pg, and NAME-SNT. Called from \foonoderef. We have ! % to set \indexdummies so commands such as @code in a section title ! % aren't expanded. It would be nicer not to expand the titles in the ! % first place, but there's so many layers that that is hard to do. % \def\setref#1#2{{% ! \indexdummies \pdfmkdest{#1}% \dosetq{#1-title}{Ytitle}% \dosetq{#1-pg}{Ypagenumber}% --- 5820,5840 ---- \gdef\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} ! % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an ! % anchor), namely NAME-title (the corresponding @chapter/etc. name), ! % NAME-pg (the page number), and NAME-snt (section number and type). ! % Called from \foonoderef. ! % ! % We have to set \indexdummies so commands such as @code in a section ! % title aren't expanded. It would be nicer not to expand the titles in ! % the first place, but there's so many layers that that is hard to do. % + % Likewise, use \turnoffactive so that punctuation chars such as underscore + % and backslash work in node names. + % \def\setref#1#2{{% ! \atdummies \pdfmkdest{#1}% + % + \turnoffactive \dosetq{#1-title}{Ytitle}% \dosetq{#1-pg}{Ypagenumber}% *************** *** 5245,5255 **** \leavevmode \getfilename{#4}% ! \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{#1@}% ! \fi \linkcolor \fi --- 5888,5900 ---- \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{#1}% ! \fi ! }% \linkcolor \fi *************** *** 5263,5267 **** % printing. So we \turnoffactive for the \refx-snt, back on for the % printing, back off for the \refx-pg. ! {\normalturnoffactive % Only output a following space if the -snt ref is nonempty; for % @unnumbered and @anchor, it won't be. --- 5908,5912 ---- % 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. *************** *** 5272,5327 **** [\printednodename],\space % page 3 ! \turnoffactive \putwordpage\tie\refx{#1-pg}{}% \fi \endlink \endgroup} ! % \dosetq is the interface for calls from other macros ! ! % Use \normalturnoffactive so that punctuation chars such as underscore ! % and backslash work in node names. (\turnoffactive doesn't do \.) \def\dosetq#1#2{% {\let\folio=0% - \normalturnoffactive \edef\next{\write\auxfile{\internalsetq{#1}{#2}}}% ! \iflinks ! \next ! \fi }% } ! % \internalsetq {foo}{page} expands into ! % CHARACTERS 'xrdef {foo}{...expansion of \Ypage...} ! % When the aux file is read, ' is the escape character ! ! \def\internalsetq #1#2{'xrdef {#1}{\csname #2\endcsname}} ! ! % Things to be expanded by \internalsetq \def\Ypagenumber{\folio} - \def\Ytitle{\thissection} - \def\Ynothing{} - \def\Ysectionnumberandtype{% ! \ifnum\secno=0 \putwordChapter\xreftie\the\chapno % ! \else \ifnum \subsecno=0 \putwordSection\xreftie\the\chapno.\the\secno % ! \else \ifnum \subsubsecno=0 % ! \putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno % ! \else % ! \putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno % ! \fi \fi \fi } \def\Yappendixletterandtype{% ! \ifnum\secno=0 \putwordAppendix\xreftie'char\the\appendixno{}% ! \else \ifnum \subsecno=0 \putwordSection\xreftie'char\the\appendixno.\the\secno % ! \else \ifnum \subsubsecno=0 % ! \putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno % ! \else % ! \putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno % ! \fi \fi \fi } ! ! \gdef\xreftie{'tie} % Use TeX 3.0's \inputlineno to get the line number, for better error --- 5917,5967 ---- [\printednodename],\space % page 3 ! \turnoffactive \otherbackslash \putwordpage\tie\refx{#1-pg}{}% \fi \endlink \endgroup} ! % \dosetq is called from \setref to do the actual \write (\iflinks). ! % \def\dosetq#1#2{% {\let\folio=0% \edef\next{\write\auxfile{\internalsetq{#1}{#2}}}% ! \iflinks \next \fi }% } ! % \internalsetq{foo}{page} expands into ! % CHARACTERS @xrdef{foo}{...expansion of \page...} ! \def\internalsetq#1#2{@xrdef{#1}{\csname #2\endcsname}} + % Things to be expanded by \internalsetq. + % \def\Ypagenumber{\folio} \def\Ytitle{\thissection} \def\Ynothing{} \def\Ysectionnumberandtype{% ! \ifnum\secno=0 ! \putwordChapter@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\Yappendixletterandtype{% ! \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 ! } % Use TeX 3.0's \inputlineno to get the line number, for better error *************** *** 5329,5333 **** % \ifx\inputlineno\thisisundefined ! \let\linenumber = \empty % Non-3.0. \else \def\linenumber{\the\inputlineno:\space} --- 5969,5973 ---- % \ifx\inputlineno\thisisundefined ! \let\linenumber = \empty % Pre-3.0. \else \def\linenumber{\the\inputlineno:\space} *************** *** 5336,5342 **** % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. % If its value is nonempty, SUFFIX is output afterward. ! \def\refx#1#2{% ! \expandafter\ifx\csname X#1\endcsname\relax % If not defined, say something at least. \angleleft un\-de\-fined\angleright --- 5976,5988 ---- % 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 X#1\endcsname ! }% ! \ifx\thisrefX\relax % If not defined, say something at least. \angleleft un\-de\-fined\angleright *************** *** 5353,5357 **** \else % It's defined, so just use it. ! \csname X#1\endcsname \fi #2% Output the suffix in any case. --- 5999,6003 ---- \else % It's defined, so just use it. ! \thisrefX \fi #2% Output the suffix in any case. *************** *** 5360,5369 **** % This is the macro invoked by entries in the aux file. % ! \def\xrdef#1{\begingroup ! % Reenable \ as an escape while reading the second argument. ! \catcode`\\ = 0 ! \afterassignment\endgroup ! \expandafter\gdef\csname X#1\endcsname ! } % Read the last existing aux file, if any. No error if none exists. --- 6006,6010 ---- % This is the macro invoked by entries in the aux file. % ! \def\xrdef#1{\expandafter\gdef\csname X#1\endcsname} % Read the last existing aux file, if any. No error if none exists. *************** *** 5396,5402 **** \catcode`\^^^=\other \catcode`\^^_=\other ! \catcode`\@=\other ! \catcode`\^=\other ! % It was suggested to define this as 7, which would allow ^^e4 etc. % in xref tags, i.e., node names. But since ^^e4 notation isn't % supported in the main text, it doesn't seem desirable. Furthermore, --- 6037,6041 ---- \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, *************** *** 5411,5414 **** --- 6050,6056 ---- % and then to call \auxhat in \setq. % + \catcode`\^=\other + % + % Special characters. Should be turned off anyway, but... \catcode`\~=\other \catcode`\[=\other *************** *** 5422,5426 **** --- 6064,6070 ---- \catcode`\#=\other \catcode`\&=\other + \catcode`\%=\other \catcode`+=\other % avoid \+ for paranoia even though we've turned it off + % % Make the characters 128-255 be printing characters {% *************** *** 5432,5446 **** }% }% ! % The aux file uses ' as the escape (for now). % Turn off \ as an escape so we do not lose on % entries which were dumped with control sequences in their names. ! % For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^ % Reference to such entries still does not work the way one would wish, % but at least they do not bomb out when the aux file is read in. \catcode`\{=1 \catcode`\}=2 ! \catcode`\%=\other ! \catcode`\'=0 ! \catcode`\\=\other % \openin 1 \jobname.aux --- 6076,6091 ---- }% }% ! % % Turn off \ as an escape so we do not lose on % entries which were dumped with control sequences in their names. ! % For example, @xrdef{$\leq $-fun}{page ...} made by @defun ^^ % Reference to such entries still does not work the way one would wish, % but at least they do not bomb out when the aux file is read in. + \catcode`\\=\other + % + % @ is our escape character in .aux files. \catcode`\{=1 \catcode`\}=2 ! \catcode`\@=0 % \openin 1 \jobname.aux *************** *** 5487,5491 **** \unskip \thisfootno\@sf ! \footnotezzz }% --- 6132,6136 ---- \unskip \thisfootno\@sf ! \dofootnote }% *************** *** 5497,5504 **** % the footnote is read. --karl, 16nov96. % ! \long\gdef\footnotezzz{\insert\footins\bgroup % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. % So reset some parameters. \interlinepenalty\interfootnotelinepenalty \splittopskip\ht\strutbox % top baseline for broken footnotes --- 6142,6156 ---- % the footnote is read. --karl, 16nov96. % ! % The start of the footnote looks usually like this: ! \gdef\startfootins{\insert\footins\bgroup} ! % ! % ... but this macro is redefined inside @multitable. ! % ! \gdef\dofootnote{% ! \startfootins % 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 *************** *** 5513,5518 **** \smallfonts \rm % ! % Hang the footnote text off the number. ! \hang \textindent{\thisfootno}% % --- 6165,6177 ---- \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}% % *************** *** 5523,5552 **** \futurelet\next\fo@t } - \def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t - \else\let\next\f@t\fi \next} - \def\f@@t{\bgroup\aftergroup\@foot\let\next} - \def\f@t#1{#1\@foot} - \def\@foot{\strut\par\egroup} - }%end \catcode `\@=11 - % Set the baselineskip to #1, and the lineskip and strut size - % correspondingly. There is no deep meaning behind these magic numbers - % used as factors; they just match (closely enough) what Knuth defined. - % - \def\lineskipfactor{.08333} - \def\strutheightpercent{.70833} - \def\strutdepthpercent {.29167} - % - \def\setleading#1{% - \normalbaselineskip = #1\relax - \normallineskip = \lineskipfactor\normalbaselineskip - \normalbaselines - \setbox\strutbox =\hbox{% - \vrule width0pt height\strutheightpercent\baselineskip - depth \strutdepthpercent \baselineskip - }% - } - % @| inserts a changebar to the left of the current line. It should % surround any changed text. This approach does *not* work if the --- 6182,6187 ---- *************** *** 5593,5598 **** \ifeof 1 \else \closein 1 ! % Do not bother showing banner with post-v2.7 epsf.tex (available in ! % doc/epsf.tex until it shows up on ctan). \def\epsfannounce{\toks0 = }% \input epsf.tex --- 6228,6233 ---- \ifeof 1 \else \closein 1 ! % Do not bother showing banner with epsf.tex v2.7k (available in ! % doc/epsf.tex and on ctan). \def\epsfannounce{\toks0 = }% \input epsf.tex *************** *** 5613,5617 **** \fi \else ! \imagexxx #1,,,\finish \fi } --- 6248,6252 ---- \fi \else ! \imagexxx #1,,,,,\finish \fi } *************** *** 5620,5650 **** % #1 is (mandatory) image filename; we tack on .eps extension. % #2 is (optional) width, #3 is (optional) height. ! % #4 is just the usual extra ignored arg for parsing this stuff. ! \def\imagexxx#1,#2,#3,#4\finish{% \ifpdf ! \centerline{\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 ! \begingroup ! \catcode`\^^M = 5 % in case we're inside an example ! % If the image is by itself, center it. ! \ifvmode ! \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 ! \centerline{\epsfbox{#1.eps}}% ! \bigbreak ! \else ! % In the middle of a paragraph, no extra space. ! \epsfbox{#1.eps}% ! \fi ! \endgroup \fi ! } --- 6255,6289 ---- % #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} *************** *** 5715,5722 **** % Parameters in order: 1) textheight; 2) textwidth; 3) voffset; ! % 4) hoffset; 5) binding offset; 6) topskip. Then whoever calls us can ! % set \parskip and call \setleading for \baselineskip. % ! \def\internalpagesizes#1#2#3#4#5#6{% \voffset = #3\relax \topskip = #6\relax --- 6354,6364 ---- % 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 *************** *** 5737,5740 **** --- 6379,6389 ---- \bindingoffset = #5\relax % + \ifpdf + \pdfpageheight #7\relax + \pdfpagewidth #8\relax + \fi + % + \setleading{\textleading} + % \parindent = \defaultparindent \setemergencystretch *************** *** 5744,5751 **** \def\letterpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt ! \setleading{13.2pt}% % % If page is nothing but text, make it come out even. ! \internalpagesizes{46\baselineskip}{6in}{\voffset}{.25in}{\bindingoffset}{36pt}% }} --- 6393,6403 ---- \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}% }} *************** *** 5753,5759 **** \def\smallbook{{\globaldefs = 1 \parskip = 2pt plus 1pt ! \setleading{12pt}% % ! \internalpagesizes{7.5in}{5.in}{\voffset}{.25in}{\bindingoffset}{16pt}% % \lispnarrowing = 0.3in --- 6405,6414 ---- \def\smallbook{{\globaldefs = 1 \parskip = 2pt plus 1pt ! \textleading = 12pt % ! \internalpagesizes{7.5in}{5in}% ! {\voffset}{.25in}% ! {\bindingoffset}{16pt}% ! {9.25in}{7in}% % \lispnarrowing = 0.3in *************** *** 5761,5802 **** \hfuzz = 1pt \contentsrightmargin = 0pt - \deftypemargin = 0pt \defbodyindent = .5cm - % - \let\smalldisplay = \smalldisplayx - \let\smallexample = \smalllispx - \let\smallformat = \smallformatx - \let\smalllisp = \smalllispx }} % Use @afourpaper to print on European A4 paper. \def\afourpaper{{\globaldefs = 1 - \setleading{12pt}% \parskip = 3pt plus 2pt minus 1pt % ! \internalpagesizes{53\baselineskip}{160mm}{\voffset}{4mm}{\bindingoffset}{44pt}% % \tolerance = 700 \hfuzz = 1pt }} ! % A specific text layout, 24x15cm overall, intended for A4 paper. Top margin ! % 29mm, hence bottom margin 28mm, nominal side margin 3cm. \def\afourlatex{{\globaldefs = 1 - \setleading{13.6pt}% - % \afourpaper ! \internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}% % \globaldefs = 0 }} ! % Use @afourwide to print on European A4 paper in wide format. ! \def\afourwide{% \afourpaper ! \internalpagesizes{9.5in}{6.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}% ! % \globaldefs = 0 ! } % @pagesizes TEXTHEIGHT[,TEXTWIDTH] --- 6416,6489 ---- \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] *************** *** 5811,5817 **** % \parskip = 3pt plus 2pt minus 1pt ! \setleading{13.2pt}% % ! \internalpagesizes{#1}{\hsize}{\voffset}{\normaloffset}{\bindingoffset}{44pt}% }} --- 6498,6513 ---- % \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}% }} *************** *** 5841,5845 **** \def\normalgreater{>} \def\normalplus{+} ! \def\normaldollar{$} % This macro is used to make a character print one way in ttfont --- 6537,6541 ---- \def\normalgreater{>} \def\normalplus{+} ! \def\normaldollar{$}%$ font-lock fix % This macro is used to make a character print one way in ttfont *************** *** 5877,5881 **** \def_{\ifusingtt\normalunderscore\_} % Subroutine for the previous macro. ! \def\_{\leavevmode \kern.06em \vbox{\hrule width.3em height.1ex}} \catcode`\|=\active --- 6573,6577 ---- \def_{\ifusingtt\normalunderscore\_} % Subroutine for the previous macro. ! \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } \catcode`\|=\active *************** *** 5890,5896 **** \def+{{\tt \char 43}} \catcode`\$=\active ! \def${\ifusingit{{\sl\$}}\normaldollar} ! %\catcode 27=\active ! %\def^^[{$\diamondsuit$} % Set up an active definition for =, but don't enable it most of the time. --- 6586,6590 ---- \def+{{\tt \char 43}} \catcode`\$=\active ! \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix % Set up an active definition for =, but don't enable it most of the time. *************** *** 5909,5950 **** \catcode`\@=0 ! % \rawbackslashxx output one backslash character in current font \global\chardef\rawbackslashxx=`\\ - %{\catcode`\\=\other - %@gdef@rawbackslashxx{\}} ! % \rawbackslash redefines \ as input to do \rawbackslashxx. {\catcode`\\=\active ! @gdef@rawbackslash{@let\=@rawbackslashxx }} % \normalbackslash outputs one backslash in fixed width font. \def\normalbackslash{{\tt\rawbackslashxx}} - % \catcode 17=0 % Define control-q \catcode`\\=\active % Used sometimes to turn off (effectively) the active characters % even after parsing them. ! @def@turnoffactive{@let"=@normaldoublequote ! @let\=@realbackslash ! @let~=@normaltilde ! @let^=@normalcaret ! @let_=@normalunderscore ! @let|=@normalverticalbar ! @let<=@normalless ! @let>=@normalgreater ! @let+=@normalplus ! @let$=@normaldollar} ! ! @def@normalturnoffactive{@let"=@normaldoublequote ! @let\=@normalbackslash ! @let~=@normaltilde ! @let^=@normalcaret ! @let_=@normalunderscore ! @let|=@normalverticalbar ! @let<=@normalless ! @let>=@normalgreater ! @let+=@normalplus ! @let$=@normaldollar} % Make _ and + \other characters, temporarily. --- 6603,6646 ---- \catcode`\@=0 ! % \rawbackslashxx outputs one backslash character in current font, ! % as in \char`\\. \global\chardef\rawbackslashxx=`\\ ! % \rawbackslash defines an active \ to do \rawbackslashxx. ! % \otherbackslash defines an active \ to be a literal `\' character with ! % catcode other. {\catcode`\\=\active ! @gdef@rawbackslash{@let\=@rawbackslashxx} ! @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\rawbackslashxx}} \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 ! } ! ! % 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. diff -aNrc2 bash-2.05b-patched/doc/version.texi bash-3.0/doc/version.texi *** bash-2.05b-patched/doc/version.texi Wed Dec 31 19:00:00 1969 --- bash-3.0/doc/version.texi Tue Jul 27 09:10:54 2004 *************** *** 0 **** --- 1,10 ---- + @ignore + Copyright (C) 1988-2004 Free Software Foundation, Inc. + @end ignore + + @set EDITION 3.0 + @set VERSION 3.0 + @set UPDATED 27 July 2004 + @set UPDATED-MONTH July 2004 + + @set LASTCHANGE Tue Jul 27 09:12:07 EDT 2004 diff -aNrc2 bash-2.05b-patched/error.c bash-3.0/error.c *** bash-2.05b-patched/error.c Fri Jun 21 17:56:41 2002 --- bash-3.0/error.c Thu Dec 18 23:44:01 2003 *************** *** 1,4 **** /* error.c -- Functions for handling errors. */ ! /* Copyright (C) 1993 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,4 ---- /* error.c -- Functions for handling errors. */ ! /* Copyright (C) 1993-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 41,49 **** #include "bashansi.h" #include "flags.h" - #include "error.h" - #include "command.h" - #include "general.h" - #include "externs.h" #include "input.h" --- 41,48 ---- #include "bashansi.h" + #include "bashintl.h" + + #include "shell.h" #include "flags.h" #include "input.h" *************** *** 62,65 **** --- 61,68 ---- #endif /* JOB_CONTROL */ + #if defined (ARRAY_VARS) + extern char *bash_badsub_errmsg; + #endif + static void error_prolog __P((int)); *************** *** 72,89 **** char *the_current_maintainer = MAINTAINER; static void error_prolog (print_lineno) int print_lineno; { int line; ! fprintf (stderr, "%s: ", get_name_for_error ()); ! if (print_lineno && interactive_shell == 0) ! { ! line = executing_line_number (); ! if (line > 0) ! fprintf (stderr, "line %d: ", line); ! } } --- 75,94 ---- char *the_current_maintainer = MAINTAINER; + int gnu_error_format = 0; + static void error_prolog (print_lineno) int print_lineno; { + char *ename; int line; ! ename = get_name_for_error (); ! line = (print_lineno && interactive_shell == 0) ? executing_line_number () : -1; ! if (line > 0) ! fprintf (stderr, "%s:%s%d: ", ename, gnu_error_format ? "" : " line ", line); ! else ! fprintf (stderr, "%s: ", ename); } *************** *** 93,100 **** { char *name; name = (char *)NULL; if (interactive_shell == 0) ! name = dollar_vars[0]; if (name == 0 && shell_name && *shell_name) name = base_pathname (shell_name); --- 98,118 ---- { char *name; + #if defined (ARRAY_VARS) + SHELL_VAR *bash_source_v; + ARRAY *bash_source_a; + #endif name = (char *)NULL; if (interactive_shell == 0) ! { ! #if defined (ARRAY_VARS) ! bash_source_v = find_variable ("BASH_SOURCE"); ! if (bash_source_v && array_p (bash_source_v) && ! (bash_source_a = array_cell (bash_source_v))) ! name = array_reference (bash_source_a, 0); ! if (name == 0) ! #endif ! name = dollar_vars[0]; ! } if (name == 0 && shell_name && *shell_name) name = base_pathname (shell_name); *************** *** 145,149 **** { h = last_history_line (); ! fprintf (stderr, "last command: %s\n", h ? h : "(null)"); } #endif --- 163,167 ---- { h = last_history_line (); ! fprintf (stderr, _("last command: %s\n"), h ? h : "(null)"); } #endif *************** *** 153,157 **** #endif ! fprintf (stderr, "Stopping myself..."); fflush (stderr); --- 171,175 ---- #endif ! fprintf (stderr, _("Aborting...")); fflush (stderr); *************** *** 183,187 **** va_end (args); if (exit_immediately_on_error) ! sh_exit (1); } --- 201,205 ---- va_end (args); if (exit_immediately_on_error) ! exit_shell (1); } *************** *** 240,244 **** va_list args; ! fprintf (stderr, "%s: warning: ", get_name_for_error ()); SH_VA_START (args, format); --- 258,262 ---- va_list args; ! fprintf (stderr, _("%s: warning: "), get_name_for_error ()); SH_VA_START (args, format); *************** *** 300,308 **** fprintf (stderr, "%s: ", ename); else if (interactive_shell) ! fprintf (stderr, "%s: %s: line %d: ", ename, iname, lineno); else if (STREQ (ename, iname)) ! fprintf (stderr, "%s: line %d: ", ename, lineno); else ! fprintf (stderr, "%s: %s: line %d: ", ename, iname, lineno); SH_VA_START (args, format); --- 318,326 ---- fprintf (stderr, "%s: ", ename); else if (interactive_shell) ! fprintf (stderr, "%s: %s:%s%d: ", ename, iname, gnu_error_format ? "" : " line ", lineno); else if (STREQ (ename, iname)) ! fprintf (stderr, "%s:%s%d: ", ename, gnu_error_format ? "" : " line ", lineno); else ! fprintf (stderr, "%s: %s:%s%d: ", ename, iname, gnu_error_format ? "" : " line ", lineno); SH_VA_START (args, format); *************** *** 314,318 **** if (exit_immediately_on_error) ! sh_exit (2); } --- 332,336 ---- if (exit_immediately_on_error) ! exit_shell (2); } *************** *** 385,392 **** static char *cmd_error_table[] = { ! "unknown command error", /* CMDERR_DEFAULT */ ! "bad command type", /* CMDERR_BADTYPE */ ! "bad connector", /* CMDERR_BADCONN */ ! "bad jump", /* CMDERR_BADJUMP */ 0 }; --- 403,410 ---- static char *cmd_error_table[] = { ! N_("unknown command error"), /* CMDERR_DEFAULT */ ! N_("bad command type"), /* CMDERR_BADTYPE */ ! N_("bad connector"), /* CMDERR_BADCONN */ ! N_("bad jump"), /* CMDERR_BADJUMP */ 0 }; *************** *** 400,404 **** code = CMDERR_DEFAULT; ! programming_error ("%s: %s: %d", func, cmd_error_table[code], e); } --- 418,422 ---- code = CMDERR_DEFAULT; ! programming_error ("%s: %s: %d", func, _(cmd_error_table[code]), e); } *************** *** 410,414 **** code = CMDERR_DEFAULT; ! return (cmd_error_table[code]); } --- 428,432 ---- code = CMDERR_DEFAULT; ! return (_(cmd_error_table[code])); } *************** *** 418,422 **** const char *s; { ! report_error ("%s: bad array subscript", s); } #endif --- 436,440 ---- const char *s; { ! report_error ("%s: %s", s, _(bash_badsub_errmsg)); } #endif *************** *** 426,430 **** const char *s; { ! report_error ("%s: unbound variable", s); } --- 444,448 ---- const char *s; { ! report_error (_("%s: unbound variable"), s); } *************** *** 433,436 **** const char *s; { ! report_error ("%s: readonly variable", s); } --- 451,454 ---- const char *s; { ! report_error (_("%s: readonly variable"), s); } diff -aNrc2 bash-2.05b-patched/eval.c bash-3.0/eval.c *** bash-2.05b-patched/eval.c Tue Mar 12 09:53:36 2002 --- bash-3.0/eval.c Thu Dec 18 23:44:15 2003 *************** *** 31,34 **** --- 31,36 ---- #include + #include "bashintl.h" + #include "shell.h" #include "flags.h" *************** *** 89,92 **** --- 91,95 ---- /* Some kind of throw to top_level has occured. */ case FORCE_EOF: + case ERREXIT: case EXITPROG: current_command = (COMMAND *)NULL; *************** *** 170,174 **** int i; { ! printf ("\007timed out waiting for input: auto-logout\n"); jump_to_top_level (EXITPROG); SIGRETURN (0); --- 173,178 ---- int i; { ! printf (_("\007timed out waiting for input: auto-logout\n")); ! bash_logout (); /* run ~/.bash_logout if this is a login shell */ jump_to_top_level (EXITPROG); SIGRETURN (0); diff -aNrc2 bash-2.05b-patched/examples/complete/bashcc-1.0.1.tar.gz bash-3.0/examples/complete/bashcc-1.0.1.tar.gz *** bash-2.05b-patched/examples/complete/bashcc-1.0.1.tar.gz Wed Dec 31 19:00:00 1969 --- bash-3.0/examples/complete/bashcc-1.0.1.tar.gz Wed Jul 24 12:39:59 2002 *************** *** 0 **** --- 1,9 ---- + ‹û‹<=bashcc-1.0.1.tarí[ëSÛJ–Ïgý=Â3Ø ~^Ug!„Ìe7)›$•Æ%¤6Ö¢‡¯$ã¸æoßß9ÝzÙlîrs·f¬ØVwŸ÷«O7WV<¶íz»Ñj´›Oþ˜§ÕÚîìîîà³ÕÞÝiÑgk÷9ÿNŸ'­Ýön»µó¼óË“V»ý¼½ûDìüAô”žiœX‘O¢8¾wÞèÚsäíÏ è§>WEýÓÈnÄ–?ñäãáhµ[­çÛÛßÓ»ÓÞ)èßÛÛçODëñHøþóo®ÿ QRº±!ÇMÜ0°<=$FÓÀ¦71F«}×[‘#¾›ŒEk·Ùi7;­V§fZŽHÆRyÒŠŽ¬XŠÃiÖBOPÄIJo¬k 2Œ££aÿ¨ûÏfƒ0ióÚ¶áŽÄù¹¨D…gˆËË}B4ô;cä*Œ™ˆy8D<–ž'&0%L‚R$ÑTŠ™57 Ÿ†ÆÛãÃþÑáàxØ?==+"ô'ÇŸºæ‹Ê×ò¬§Í»—&c~?hw7«ãZEÏ¿˜]TÄfNRúRLc9šzÂò\"£0vèûB.žp"#K‹×0xª°Ýî¦M3’0ôð $Û›éXX ‹cPTi”~‹zä§ãþçÇýéI_Ô˼¸ …~‹z<£DÔ­Ûð*ÆŠ[WÎò“òüI6=„T#Qw, -Ÿ’É 8±À,iüÙÎðoø¬ˆÿpÀÇÅñ@üßíì´âÿ/ÛxµŽÿ?áI‘¢î†x…ïy¸çx•*³è“Þ¸Qœˆ™¾u#E<$Gc†} ”\ıiÉ û‡Óë±HBLL(hÌÆV8€`a­ºÁ5LJ†(é4Z;$^GÒJe4’¿MÝH: Š¥z^׬|}u8øuøñ¸?8y÷æô¼uy×X|×¾¼3ÓQI1¼&!1‹ùAÚãP˜ÇýþiO|¬+„0ïQâË…eQÒ³ó¤— ÕÌ@i, + &ž%)E.i}$“idðSwäÈ 0ýÖŠ\¢‰³ÉáëÞÉ»áÇÓWÝ&âoÓr|7Pk^KÛ#éZ#\ŸÅ^ZÉÂy}ÒO“3rõÙðìô¿†oNÞw+épÓN†Ix#‘¼ŠI;ŸZʬêõÛ“ÁY·R}QœVcfðâôýÙÇÃþ`šp’€ÂE<Åù‹eBy”1ôV2á¯b¢·š‰Þ½E&zßeÂ_ÉDï^&z+˜(ê¯P›ÆÐ ‡y®ÖŒ¯â…6J¹£Þë®ÙœÆQÓJ ææ•4󩕧¢ó²‰øÖ ¦žÇ&z‹E¬2î7ž^ÅI”B$Ù]Ñû›¨´E·+žV:OA9O¾’×.‚Ç÷'çs‰“£e'ÉQÇœiW’C;I!£Â@¡WŸŠq'éxÆ0”ÒEwÚ{?ütÚ=8ç¯Gôý˜…Юž¿&ÒÚEñÃb1Ø?~ÿös·**UÂq-Qÿ$ÌJÁ˜MQ¯‹ + ~ÕD K°«©h@lÖ7k¸ŠD¥Ø®€a‰V£‡ðý‹Z~·û2gJþ H Ó·S|û¶r õÄ|D‘h;ZBµÉÕ䲄¨°ÀÍʆíÅ4]—˜µ‡¨bÐÃ*Ú[A€/+™O$L sþú×½§w…Q ,_b{°W=ûüþX‡‰Eúi¡¨ß¸¾•EV2«Z¹’Åî9L)&S¢îáôà`«´@:J9=(qúñ¬|¼JI$¥¨èµë‚À,ê!íPЛz‰» + ü¤ãþh—ï=šËûÿ*.Hrµ¾q=¶H‘jŽ› ÊCQÞÄiñS—_XŠ˜‰•ŒiEÜ(küViè12À‚Ùkó¸ßQVºˆôbÉ£”ŸeŠ2¡9ZO_7xòùS’ù’ ©y-m®¬¤¯4ÿ1~Ü[ÈWïÒÒƒ*MDLÅ£¯>®(–Ÿja*÷K…‰î\$….Áæ÷ + FØìµ]ªiQ#J…A=(ƒ-D àâRI·=€ØOcÈæ÷Š<øžzl5b¿„ØOòÎÔDÚ.ÔaÞš¥PÉÜmî9ÝÚIÊJ6ÕS7( ¥5Ùz?Œ$8Æß@ó3Ž;u7éù9˜p~ˆ§Ø–tÝú£ŸRÿ'FL™<>êÿìî|ÿüg—Î|JýŸÎn«³îÿüŒgã/¼ä-þ†`Õ¼¥# dó©oÅ7¢Õé†ê¯çÎÁ³1²»ØÛN¨Rõ6êH[œÏ›Áåž0 •°,G¾|:îS¡zCYÐœ«¢¤ðæ³¹˜UÚ­<ñ­‚,Az÷=Hí’’’\£‰$8Ì;ê·Þº‹o"¦2ýåBK"“‹0OÛ›:R•­‘o :[ÿaæ[{†™7Ò7)$•Q¡m@™E5^ƒVSEK¥´ß)Kþß?Ʀ㸡Þ=žÝßÿmw:;­Åþïn{{íÿ?ã©?ÞcP¿'JFdNìjñ¶Ô3®BÚ®ã†~AÍø¨*¢=Ávh¼¶úÏ©7Ζ @d<&¡gc7¦N+Õ©Š\D1*ÎøàPo¦G• !x‰þ‰¥†#c÷šú­(w¯²ƒ>üàn®:Šä†9dˆê/égùd4mP£® ’z<é[ÞG£’²ÄÈr#CzÖUA8|Šˆ²»î¡7\왢‘eË-.Åæ.}'˜î(qí©gl«²¦5È¡€~YGïŠki!@ÊXmÔÆÖ­£Ø¸4ÃWû47@µiû¤Y‰E8Ê»ý,††¡ä­mÅñ;:²U@-*÷\<ú. + ÇÈMæbFFRh¦Ž1gÂMÄ,Œ°a!Ø2šû¥$ ïPœ¢¶ŽàÝC  ^ÀtÅ ‹X@Ü•êtÓí‘‘YŠr§ñ¨¦xònpvøöíáÙÉé»=è‹ÏKïÃàŒ¬ + Z°‹Ê2`Kð Ö¡”€QÏc•$”ˆË­ÞÆ"äh$••ç)3@'#Öµ™§1f,M±H + ¶Éap ‹‚ @j+ÃÆB«¦X•ÃVF‹®¶„3¥_´m§£ñ› œÑqG<…1°¾IŸ>˜íÜÆø`œôÁˆËl°õ¼—wk¹Û/&«»,¯-de9‚n¯@%€°PXäÐðóBÆ5ElGîæzžò K\%”› £?âcè…#œp\pŸ„Ñ\™[ iOÃ$Œ‰Ë|˜ŒË'øây@Ï[dÄòTå±Yp Ø1!Æ|qZ‰I($ln¥Ð*YÒ)5&î ùc_ n‹4.̆*ñÍ4 i–•$ Æ¢‚'ä.·ØÇ9ÂÌvìfêh±3Ò¤ÇnOofð]/20Ó„,À¢"…`*–™;2+xY £‘°À¹H\ðE¦Œ¬ŽÅ2…³RØ a¼¨EÉЕffVÀ(Ü¥¢K'²!ƒ6å žÉˆëJR@Qã‘œ@wüÑ–±Ú«›YßÀdbÞZqâAœÍGí6"+¸ÎsGA©rÉF8YP§IëCžizCÙæ4ž"$Í,^ä„:ªÇVµ'aŽì¹72ü  Û;”• >MZ¾hŽÎ4Ñ*ëe×2Ì4õÈ™ Î”骱8wsßšsó ê×9p¨¿!VÂCb|Äúapø÷cð× ¡Œ…Ãja§ÎjÚ‰îÁ@f¤š¹riDÈáæimnÊ*$«\Ìÿªq£êjƒ1\n†Y726ÍØ 3µƒQˆ°6#=A¡1Çù£ÂåUZñ#>>7y_2Ft²M’æ3惂ä-a/Rp"uzÞÞÞÖ)B©ZœŸs)m7:Ô̪†”AŠÂ3åTHxž{M'Õ…ê@Á¤Z儶3–¾4¶•ºeJ­Pýdò$üàƳ«=n‚%Œ|ê«-²P¤D@è‚…¢Â°ž¨ãè8¶ìq¶^Ù.lÀ•Ìr>M'5Ò;ÑíѶ••KðGKG½#L˪"BµúiL¹ËL|K…-DfÒS·Óȃy²4(À€9§û4ú¤B^›ä72xeªk’ÅGWÎ4kl‘švè“ÎÉê!„ÀÕZ•WºñViZJ‰Ì¤0:7Âa³µ­EÞ™³«¼Ÿï(d:ÑêBàŸL™Ò»:±ËÒYZ^qZæÉLËMqBP`š~ÈrH´¾{2±+±r f†Rqä\EônïE_ê0OåkJ‘V¿YcRÓ\X4ŸÓ¯nVp­Œâ2=•Ë®K¤>ž7- { °©ÐTšZÙù½§_Azø)Œ<§aO&¦vW+A}3)¹dä^0xƒÙ[ªÂ[ô·|Qfy+•Fçf–Úô¹¦â/3TB¥ÔD™be»ŽóèÄ•`¬Ûäi¤²F]fÙRiͤæ¶I&[³B·k|Ô†6Õ<ףʽAXÝc/`š­ò7‰æ¡)DpanÍÈ%ÓúX;ªR:䳊{NŽØáR%@Ó6U]Î'2dÇ(H'–5ùÁÀÅn Ósù…ü^U!gR3ÝäØ0¦í˜¢JãòËÄ É/ uEºûRU —@gN‹%óIU`^!-l³Ö e"Üô)Õ” q†mé/IÇY$Éãñ‚Á¦‚PÕVê>hœLG£G.ÞœöEï´,è:W¿—î¨ÎB¤IzÎÙSÚ¹fÚeSÎs ö ¤rëÆnbøØ”Ê+á‰*¦ÆI2Ùk6g³Y#Šã@&0º6Œ7Pwò5-µ+*ƒ_q‚(-²Q™>ö,š6¤3mþÓˤ™UlI8iŒß»K¦ÍúH¶Ô oê¾4Š©Äê>5ÍÇÕ ß±;}'~=œö?ƒív£%ªª¿ÓVýÚ + ”ˆ}É„«Û~Øǧ×ùöt²%üD9™Ó’›§–ŤG'Ãq¹·„ãÃÉ„P¼q¿Ð*ŠC¾¡*ãPÍ ›ñË¢„õÉf¡côÈ&|„ý¡ŠâÕ£“¼•7Ϊw–¶SÒ*8å´"5‡Â‰KqÓw£BßBÄ~' ÷æˆ@ÞÜ ›’2NTŒ7>y†X$}ÞÃ÷õQïíg©&€CC>–RAËåO0Ï¥:yÜ>ÉŸÝ'ýW}JýÿÒ±Çãáxèüï—ÎÒÿÿüò|}þ÷Sžòù_ÉVœu¿w‡ÔH× iÓ­Tùœj“¶›âÝçÀßëHNÄæ‡kÞZ³±ù›DQ鈻M}êUSÇ\•P>sK/ên,‘»¾+ð;ž%ÿ÷ÿøÿîúüï§<Ëþïßãÿ½%ÿÏÚ£†¿ÿ÷~—ÿûeÿ÷—ýß_ûÿÿåYò}ò˜8ðÿN{wñü»õ|wíÿ?ãÑþ?‘‘§*½²ìý•o¢+Úûµçh`'ûåF)ývÌHßXQ9ìÿýãyë’®äPÿzŸ‡8„Ð…ãr@Q£ÕJdoqö·}‡¾Ðßøy[}tj ˜©YIHñ‰ÝË—!ÊÌÝO"hxE+ñÁ+m;ÅšêÁ/Õ»ÞUÕ/ '{¼é¬½.FZûôù,mÐzúõ왨1¡¤´Š/W1ó¥hÕèZiµBÓÏ+‰ô‡¨‹öeQkäçÏž1äÎ%‰-]Cøúº¾±ÄS÷é¢që„n’2Jr"¦Æî(ÙW¯HZ*xvÅÁp_ßrŽm b«fƒ5Eªâ£¸$“ea®"XÇlÚ›t™ÝLÕdv/LüøïÐ ª¦0·rx5 ^˜¤câH_'~EtÁ{M}Aÿ§v•Ìò¢F”¢MIJÕäi°ïøšô ò“–$Iêj:ÉsûRMRú"sÐ’51Û`“г]HU“T´Í¨ô&ª³gµf*TÅ€PÒ· ¬™õN_HïfLöõÒo5w€Ž¿º®Éª´÷3Í¥¬¦h `SŸx€Ô<_/î.Î/./Ÿ5yžâ‡f‰mþ£Þ¼ÌÊ0'„u¹‚Ð,I§1e¢×ÏúY?ëgý¬Ÿõ³~ÖÏúù3ŸÿË©nÁP \ No newline at end of file diff -aNrc2 bash-2.05b-patched/examples/functions/coproc.bash bash-3.0/examples/functions/coproc.bash *** bash-2.05b-patched/examples/functions/coproc.bash Mon Sep 24 14:24:10 2001 --- bash-3.0/examples/functions/coproc.bash Thu Aug 1 14:19:55 2002 *************** *** 64,68 **** local old_trap=$(trap -p SIGPIPE) trap 'coprocess close -SIGPIPE' SIGPIPE ! if [ $# -eq 1 -a "$1" = "--stdin" ] ; then cat >&61 else --- 64,68 ---- local old_trap=$(trap -p SIGPIPE) trap 'coprocess close -SIGPIPE' SIGPIPE ! if [ $# -eq 1 ] && [ "$1" = "--stdin" ] ; then cat >&61 else *************** *** 107,109 **** return $? } - --- 107,108 ---- diff -aNrc2 bash-2.05b-patched/examples/functions/csh-compat bash-3.0/examples/functions/csh-compat *** bash-2.05b-patched/examples/functions/csh-compat Thu Jul 18 17:17:10 1996 --- bash-3.0/examples/functions/csh-compat Sat Nov 30 17:11:48 2002 *************** *** 34,46 **** declare -f $1 else ! echo $2 | egrep -s '(\!|#)' 2>/dev/null ! if [ $? -eq 0 ] ! then comm=$(echo $2 | sed 's/\\!\*/\"$\@\"/g s/\\!:\([1-9]\)/\"$\1\"/g s/#/\\#/g') ! else ! comm="$2 \"\$@\"" ! fi eval function $1 \(\) "{" command "$comm" "; }" fi --- 34,47 ---- declare -f $1 else ! case $2 in ! *[#\!]*) comm=$(echo $2 | sed 's/\\!\*/\"$\@\"/g s/\\!:\([1-9]\)/\"$\1\"/g s/#/\\#/g') ! ;; ! *) ! comm="$2 \"\$@\"" ;; ! esac ! eval function $1 \(\) "{" command "$comm" "; }" fi diff -aNrc2 bash-2.05b-patched/examples/functions/exitstat bash-3.0/examples/functions/exitstat *** bash-2.05b-patched/examples/functions/exitstat Fri May 19 15:12:35 1995 --- bash-3.0/examples/functions/exitstat Thu Aug 1 14:20:24 2002 *************** *** 9,13 **** local signal="" ! if [ ${status} -ne 0 -a ${status} != 128 ]; then # If process exited by a signal, determine name of signal. if [ ${status} -gt 128 ]; then --- 9,13 ---- local signal="" ! if [ ${status} -ne 0 ] && [ ${status} != 128 ]; then # If process exited by a signal, determine name of signal. if [ ${status} -gt 128 ]; then diff -aNrc2 bash-2.05b-patched/examples/functions/getoptx.bash bash-3.0/examples/functions/getoptx.bash *** bash-2.05b-patched/examples/functions/getoptx.bash Fri Feb 6 15:46:36 1998 --- bash-3.0/examples/functions/getoptx.bash Thu Aug 1 14:20:45 2002 *************** *** 135,139 **** [ $OPTIND -lt $# ] || return 1 shift $OPTIND ! if [ "$1" != "-" -a "$1" != "${1#-}" ] then OPTIND=$[OPTIND+1]; if [ "$1" != "--" ] then --- 135,139 ---- [ $OPTIND -lt $# ] || return 1 shift $OPTIND ! if [ "$1" != "-" ] && [ "$1" != "${1#-}" ] then OPTIND=$[OPTIND+1]; if [ "$1" != "--" ] then *************** *** 299,302 **** #************************************** #*** (end of getopt2) *** - --- 299,301 ---- diff -aNrc2 bash-2.05b-patched/examples/functions/kshenv bash-3.0/examples/functions/kshenv *** bash-2.05b-patched/examples/functions/kshenv Fri Feb 23 11:53:29 2001 --- bash-3.0/examples/functions/kshenv Thu Aug 1 14:21:08 2002 *************** *** 208,212 **** esac # test for too few or too many arguments ! if [ x"$1" = x -o $# -gt 2 ]; then print -u2 'substring: bad argument count' return 1 --- 208,212 ---- esac # test for too few or too many arguments ! if [ x"$1" = x ] || [ $# -gt 2 ]; then print -u2 'substring: bad argument count' return 1 diff -aNrc2 bash-2.05b-patched/examples/functions/manpage bash-3.0/examples/functions/manpage *** bash-2.05b-patched/examples/functions/manpage Thu Apr 4 10:23:10 2002 --- bash-3.0/examples/functions/manpage Sat Nov 30 17:24:47 2002 *************** *** 71,75 **** function apropos () { ! whatis_internal "$1" "fgrep" } --- 71,75 ---- function apropos () { ! whatis_internal "$1" "grep -F" } *************** *** 103,107 **** a=$(basename "$2") else ! g=fgrep a="$2" fi --- 103,107 ---- a=$(basename "$2") else ! g="grep -F" a="$2" fi diff -aNrc2 bash-2.05b-patched/examples/functions/recurse bash-3.0/examples/functions/recurse *** bash-2.05b-patched/examples/functions/recurse Tue Nov 21 11:24:05 2000 --- bash-3.0/examples/functions/recurse Thu Aug 1 14:21:52 2002 *************** *** 45,57 **** if cd "$1" ; then for file in $2; do ! if [ -f "$file" -o -d "$file" ]; then eval "$3" fi done for file in .* * ; do ! if [ "$file" = "." -o "$file" = ".." ] ; then continue fi ! if [ -d "$file" -a ! -L "$file" ]; then recurse "$file" "$2" "$3" "$path" fi --- 45,57 ---- if cd "$1" ; then for file in $2; do ! if [ -f "$file" ] || [ -d "$file" ]; then eval "$3" fi done for file in .* * ; do ! if [ "$file" = "." ] || [ "$file" = ".." ] ; then continue fi ! if [ -d "$file" ] && [ ! -L "$file" ]; then recurse "$file" "$2" "$3" "$path" fi *************** *** 62,64 **** recurse "$1" "$2" 'echo "$path$file"' - --- 62,63 ---- diff -aNrc2 bash-2.05b-patched/examples/functions/substr bash-3.0/examples/functions/substr *** bash-2.05b-patched/examples/functions/substr Wed Feb 27 20:58:40 1991 --- bash-3.0/examples/functions/substr Thu Aug 1 14:22:14 2002 *************** *** 31,35 **** esac ! if [ "$#" -eq 0 -o "$#" -gt 2 ] ; then echo "substr: bad argument count" return 2 --- 31,35 ---- esac ! if [ "$#" -eq 0 ] || [ "$#" -gt 2 ] ; then echo "substr: bad argument count" return 2 diff -aNrc2 bash-2.05b-patched/examples/functions/substr2 bash-3.0/examples/functions/substr2 *** bash-2.05b-patched/examples/functions/substr2 Wed Feb 27 20:58:42 1991 --- bash-3.0/examples/functions/substr2 Thu Aug 1 14:22:39 2002 *************** *** 33,37 **** fi ! if [ "$#" -eq 0 -o "$#" -gt 2 ] ; then echo "substr: bad argument count" return 2 --- 33,37 ---- fi ! if [ "$#" -eq 0 ] || [ "$#" -gt 2 ] ; then echo "substr: bad argument count" return 2 diff -aNrc2 bash-2.05b-patched/examples/functions/xalias.bash bash-3.0/examples/functions/xalias.bash *** bash-2.05b-patched/examples/functions/xalias.bash Thu Mar 14 15:39:06 1996 --- bash-3.0/examples/functions/xalias.bash Sat Nov 30 17:16:18 2002 *************** *** 8,20 **** declare -f $1 else ! echo $2 | egrep -q '(\!|#)' ! if [ $? -eq 0 ] ! then comm=$(echo $2 | sed 's/\\!\*/\"$\@\"/g s/\\!:\([1-9]\)/\"$\1\"/g s/#/\\#/g') ! else ! comm="$2 \"\$@\"" ! fi eval function $1 \(\) "{" command "$comm" "; }" fi --- 8,21 ---- declare -f $1 else ! case $2 in ! *[#\!]*) comm=$(echo $2 | sed 's/\\!\*/\"$\@\"/g s/\\!:\([1-9]\)/\"$\1\"/g s/#/\\#/g') ! ;; ! *) ! comm="$2 \"\$@\"" ;; ! esac ! eval function $1 \(\) "{" command "$comm" "; }" fi diff -aNrc2 bash-2.05b-patched/examples/functions/xfind.bash bash-3.0/examples/functions/xfind.bash *** bash-2.05b-patched/examples/functions/xfind.bash Fri Apr 30 09:59:19 1999 --- bash-3.0/examples/functions/xfind.bash Thu Aug 1 14:23:25 2002 *************** *** 40,44 **** for x in * ; do ! if [ -d "$x" -a ! -L "$x" ] ; then $FUNCNAME "$x" "$2" "$action" fi --- 40,44 ---- for x in * ; do ! if [ -d "$x" ] && [ ! -L "$x" ] ; then $FUNCNAME "$x" "$2" "$action" fi diff -aNrc2 bash-2.05b-patched/examples/loadables/Makefile.in bash-3.0/examples/loadables/Makefile.in *** bash-2.05b-patched/examples/loadables/Makefile.in Wed Mar 13 14:36:59 2002 --- bash-3.0/examples/loadables/Makefile.in Tue Aug 6 16:37:01 2002 *************** *** 73,77 **** ALLPROG = print truefalse sleep pushd finfo logname basename dirname \ tty pathchk tee head mkdir rmdir printenv id whoami \ ! uname sync push ln unlink cut realpath getconf OTHERPROG = necho hello cat --- 73,77 ---- ALLPROG = print truefalse sleep pushd finfo logname basename dirname \ tty pathchk tee head mkdir rmdir printenv id whoami \ ! uname sync push ln unlink cut realpath getconf strftime OTHERPROG = necho hello cat *************** *** 173,176 **** --- 173,179 ---- $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ realpath.o $(SHOBJ_LIBS) + strftime: strftime.o + $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ strftime.o $(SHOBJ_LIBS) + # pushd is a special case. We use the same source that the builtin version # uses, with special compilation options. *************** *** 222,223 **** --- 225,227 ---- mkdir.o: mkdir.c realpath.o: realpath.c + strftime.o: strftime.c diff -aNrc2 bash-2.05b-patched/examples/loadables/finfo.c bash-3.0/examples/loadables/finfo.c *** bash-2.05b-patched/examples/loadables/finfo.c Wed Mar 13 14:41:05 2002 --- bash-3.0/examples/loadables/finfo.c Wed Dec 31 14:40:18 2003 *************** *** 248,255 **** struct group *gr; char *owner; - printf("Device (major/minor): %d (%d/%d)\n", (int) (st->st_dev & 0xFF), - (int) major (st->st_dev), - (int) minor (st->st_dev)); printf("Inode: %d\n", (int) st->st_ino); printf("Mode: (%o) ", (int) st->st_mode); --- 248,262 ---- struct group *gr; char *owner; + int ma, mi, d; + + ma = major (st->st_rdev); + mi = minor (st->st_rdev); + #if defined (makedev) + d = makedev (ma, mi); + #else + d = st->st_rdev & 0xFF; + #endif + printf("Device (major/minor): %d (%d/%d)\n", d, ma, mi); printf("Inode: %d\n", (int) st->st_ino); printf("Mode: (%o) ", (int) st->st_mode); diff -aNrc2 bash-2.05b-patched/examples/loadables/getconf.c bash-3.0/examples/loadables/getconf.c *** bash-2.05b-patched/examples/loadables/getconf.c Wed Mar 13 14:38:10 2002 --- bash-3.0/examples/loadables/getconf.c Fri Sep 20 15:49:27 2002 *************** *** 79,83 **** { const char *name; ! enum { SYSCONF, CONFSTR, PATHCONF, CONSTANT, G_UNDEF } type; long value; }; --- 79,83 ---- { const char *name; ! enum { SYSCONF, CONFSTR, PATHCONF, CONSTANT, LLCONST, G_UNDEF } type; long value; }; *************** *** 95,98 **** --- 95,103 ---- #endif + /* Hack to `encode' values wider than long into a conf_variable */ + #define VAL_LLONG_MIN -1000 + #define VAL_LLONG_MAX -1001 + #define VAL_ULLONG_MAX -1002 + static const struct conf_variable conf_table[] = { *************** *** 170,173 **** --- 175,180 ---- { "POSIX_V6_ILP32_OFF32_LDFLAGS", CONFSTR, _CS_POSIX_V6_ILP32_OFF32_LDFLAGS }, { "POSIX_V6_ILP32_OFF32_LIBS", CONFSTR, _CS_POSIX_V6_ILP32_OFF32_LIBS }, + #endif + #if defined (_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS) { "POSIX_V6_ILP32_OFF32_LINTFLAGS", CONFSTR, _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS }, #endif *************** *** 179,182 **** --- 186,191 ---- { "POSIX_V6_ILP32_OFFBIG_LDFLAGS", CONFSTR, _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS }, { "POSIX_V6_ILP32_OFFBIG_LIBS", CONFSTR, _CS_POSIX_V6_ILP32_OFFBIG_LIBS }, + #endif + #if defined (_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS) { "POSIX_V6_ILP32_OFFBIG_LINTFLAGS", CONFSTR, _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS }, #endif *************** *** 188,191 **** --- 197,202 ---- { "POSIX_V6_LP64_OFF64_LDFLAGS", CONFSTR, _CS_POSIX_V6_LP64_OFF64_LDFLAGS }, { "POSIX_V6_LP64_OFF64_LIBS", CONFSTR, _CS_POSIX_V6_LP64_OFF64_LIBS }, + #endif + #if defined (CS_POSIX_V6_LP64_OFF64_LINTFLAGS) { "POSIX_V6_LP64_OFF64_LINTFLAGS", CONFSTR, _CS_POSIX_V6_LP64_OFF64_LINTFLAGS }, #endif *************** *** 197,203 **** --- 208,220 ---- { "POSIX_V6_LPBIG_OFFBIG_LDFLAGS", CONFSTR, _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS }, { "POSIX_V6_LPBIG_OFFBIG_LIBS", CONFSTR, _CS_POSIX_V6_LPBIG_OFFBIG_LIBS }, + #endif + #if defined (_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS) { "POSIX_V6_LPBIG_OFFBIG_LINTFLAGS", CONFSTR, _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS }, #endif + #if defined (_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS) + { "POSIX_6_WIDTH_RESTRICTED_ENVS", CONFSTR, _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS }, + #endif + /* POSIX.2 Utility Limit Minimum Values */ #ifdef _POSIX2_BC_BASE_MAX *************** *** 221,224 **** --- 238,246 ---- { "POSIX2_BC_STRING_MAX", G_UNDEF, -1 }, #endif + #ifdef _POSIX2_CHARCLASS_NAME_MAX + { "POSIX2_CHARCLASS_NAME_MAX", CONSTANT, _POSIX2_CHARCLASS_NAME_MAX }, + #else + { "POSIX2_CHARCLASS_NAME_MAX", G_UNDEF, -1 }, + #endif #ifdef _POSIX2_COLL_WEIGHTS_MAX { "POSIX2_COLL_WEIGHTS_MAX", CONSTANT, _POSIX2_COLL_WEIGHTS_MAX }, *************** *** 252,256 **** --- 274,354 ---- #endif + #ifdef _POSIX2_BC_BASE_MAX + { "_POSIX2_BC_BASE_MAX", CONSTANT, _POSIX2_BC_BASE_MAX }, + #else + { "_POSIX2_BC_BASE_MAX", G_UNDEF, -1 }, + #endif + #ifdef _POSIX2_BC_DIM_MAX + { "_POSIX2_BC_DIM_MAX", CONSTANT, _POSIX2_BC_DIM_MAX }, + #else + { "_POSIX2_BC_DIM_MAX", G_UNDEF, -1 }, + #endif + #ifdef _POSIX2_BC_SCALE_MAX + { "_POSIX2_BC_SCALE_MAX", CONSTANT, _POSIX2_BC_SCALE_MAX }, + #else + { "_POSIX2_BC_SCALE_MAX", G_UNDEF, -1 }, + #endif + #ifdef _POSIX2_BC_STRING_MAX + { "_POSIX2_BC_STRING_MAX", CONSTANT, _POSIX2_BC_STRING_MAX }, + #else + { "_POSIX2_BC_STRING_MAX", G_UNDEF, -1 }, + #endif + #ifdef _POSIX2_CHARCLASS_NAME_MAX + { "_POSIX2_CHARCLASS_NAME_MAX", CONSTANT, _POSIX2_CHARCLASS_NAME_MAX }, + #else + { "_POSIX2_CHARCLASS_NAME_MAX", G_UNDEF, -1 }, + #endif + #ifdef _POSIX2_COLL_WEIGHTS_MAX + { "_POSIX2_COLL_WEIGHTS_MAX", CONSTANT, _POSIX2_COLL_WEIGHTS_MAX }, + #else + { "_POSIX2_COLL_WEIGHTS_MAX", G_UNDEF, -1 }, + #endif + #if defined (_POSIX2_EQUIV_CLASS_MAX) + { "POSIX2_EQUIV_CLASS_MAX", CONSTANT, _POSIX2_EQUIV_CLASS_MAX }, + #endif + #ifdef _POSIX2_EXPR_NEST_MAX + { "_POSIX2_EXPR_NEST_MAX", CONSTANT, _POSIX2_EXPR_NEST_MAX }, + #else + { "_POSIX2_EXPR_NEST_MAX", G_UNDEF, -1 }, + #endif + #ifdef _POSIX2_LINE_MAX + { "_POSIX2_LINE_MAX", CONSTANT, _POSIX2_LINE_MAX }, + #else + { "_POSIX2_LINE_MAX", G_UNDEF, -1 }, + #endif + #ifdef _POSIX2_RE_DUP_MAX + { "_POSIX2_RE_DUP_MAX", CONSTANT, _POSIX2_RE_DUP_MAX }, + #else + { "_POSIX2_RE_DUP_MAX", G_UNDEF, -1 }, + #endif + + /* X/OPEN Maxmimum Values */ + #ifdef _XOPEN_IOV_MAX + { "_XOPEN_IOV_MAX", CONSTANT, _XOPEN_IOV_MAX }, + #else + { "_XOPEN_IOV_MAX", G_UNDEF, -1 }, + #endif + #ifdef _XOPEN_NAME_MAX + { "_XOPEN_NAME_MAX", CONSTANT, _XOPEN_NAME_MAX }, + #else + { "_XOPEN_NAME_MAX", G_UNDEF, -1 }, + #endif + #ifdef _XOPEN_PATH_MAX + { "_XOPEN_PATH_MAX", CONSTANT, _XOPEN_PATH_MAX }, + #else + { "_XOPEN_PATH_MAX", G_UNDEF, -1 }, + #endif + /* POSIX.1 Minimum Values */ + #ifdef _POSIX_AIO_LISTIO_MAX + { "_POSIX_AIO_LISTIO_MAX", CONSTANT, _POSIX_AIO_LISTIO_MAX }, + #else + { "_POSIX_AIO_LISTIO_MAX", G_UNDEF, -1 }, + #endif + #ifdef _POSIX_AIO_MAX + { "_POSIX_AIO_MAX", CONSTANT, _POSIX_AIO_MAX }, + #else + { "_POSIX_AIO_MAX", G_UNDEF, -1 }, + #endif #ifdef _POSIX_ARG_MAX { "_POSIX_ARG_MAX", CONSTANT, _POSIX_ARG_MAX }, *************** *** 261,265 **** { "_POSIX_CHILD_MAX", CONSTANT, _POSIX_CHILD_MAX }, #else ! { "_POSIX_CHILD_MAX", G_UNDEF, -1 }, #endif #ifdef _POSIX_LINK_MAX --- 359,373 ---- { "_POSIX_CHILD_MAX", CONSTANT, _POSIX_CHILD_MAX }, #else ! { "_POSIX_CHILD_MAX", G_UNDEF, -1 }, ! #endif ! #ifdef _POSIX_DELAYTIMER_MAX ! { "_POSIX_DELAYTIMER_MAX", CONSTANT, _POSIX_DELAYTIMER_MAX }, ! #else ! { "_POSIX_DELAYTIMER_MAX", G_UNDEF, -1 }, ! #endif ! #ifdef _POSIX_HOST_NAME_MAX ! { "_POSIX_HOST_NAME_MAX", CONSTANT, _POSIX_HOST_NAME_MAX }, ! #else ! { "_POSIX_HOST_NAME_MAX", G_UNDEF, -1 }, #endif #ifdef _POSIX_LINK_MAX *************** *** 268,271 **** --- 376,384 ---- { "_POSIX_LINK_MAX", G_UNDEF, -1 }, #endif + #ifdef _POSIX_LOGIN_NAME_MAX + { "_POSIX_LOGIN_NAME_MAX", CONSTANT, _POSIX_LOGIN_NAME_MAX }, + #else + { "_POSIX_LOGIN_NAME_MAX", G_UNDEF, -1 }, + #endif #ifdef _POSIX_MAX_CANON { "_POSIX_MAX_CANON", CONSTANT, _POSIX_MAX_CANON }, *************** *** 278,281 **** --- 391,404 ---- { "_POSIX_MAX_INPUT", G_UNDEF, -1 }, #endif + #ifdef _POSIX_MQ_OPEN_MAX + { "_POSIX_MQ_OPEN_MAX", CONSTANT, _POSIX_MQ_OPEN_MAX }, + #else + { "_POSIX_MQ_OPEN_MAX", G_UNDEF, -1 }, + #endif + #ifdef _POSIX_MQ_PRIO_MAX + { "_POSIX_MQ_PRIO_MAX", CONSTANT, _POSIX_MQ_PRIO_MAX }, + #else + { "_POSIX_MQ_PRIO_MAX", G_UNDEF, -1 }, + #endif #ifdef _POSIX_NAME_MAX { "_POSIX_NAME_MAX", CONSTANT, _POSIX_NAME_MAX }, *************** *** 303,306 **** --- 426,454 ---- { "_POSIX_PIPE_BUF", G_UNDEF, -1 }, #endif + #ifdef _POSIX_RE_DUP_MAX + { "_POSIX_RE_DUP_MAX", CONSTANT, _POSIX_RE_DUP_MAX }, + #else + { "_POSIX_RE_DUP_MAX", G_UNDEF, -1 }, + #endif + #ifdef _POSIX_RTSIG_MAX + { "_POSIX_RTSIG_MAX", CONSTANT, _POSIX_RTSIG_MAX }, + #else + { "_POSIX_RTSIG_MAX", G_UNDEF, -1 }, + #endif + #ifdef _POSIX_SEM_NSEMS_MAX + { "_POSIX_SEM_NSEMS_MAX", CONSTANT, _POSIX_SEM_NSEMS_MAX }, + #else + { "_POSIX_SEM_NSEMS_MAX", G_UNDEF, -1 }, + #endif + #ifdef _POSIX_SEM_VALUE_MAX + { "_POSIX_SEM_VALUE_MAX", CONSTANT, _POSIX_SEM_VALUE_MAX }, + #else + { "_POSIX_SEM_VALUE_MAX", G_UNDEF, -1 }, + #endif + #ifdef _POSIX_SIGQUEUE_MAX + { "_POSIX_SIGQUEUE_MAX", CONSTANT, _POSIX_SIGQUEUE_MAX }, + #else + { "_POSIX_SIGQUEUE_MAX", G_UNDEF, -1 }, + #endif #ifdef _POSIX_SSIZE_MAX { "_POSIX_SSIZE_MAX", CONSTANT, _POSIX_SSIZE_MAX }, *************** *** 308,311 **** --- 456,464 ---- { "_POSIX_SSIZE_MAX", G_UNDEF, -1 }, #endif + #ifdef _POSIX_SS_REPL_MAX + { "_POSIX_SS_REPL_MAX", CONSTANT, _POSIX_SS_REPL_MAX }, + #else + { "_POSIX_SS_REPL_MAX", G_UNDEF, -1 }, + #endif #ifdef _POSIX_STREAM_MAX { "_POSIX_STREAM_MAX", CONSTANT, _POSIX_STREAM_MAX }, *************** *** 313,320 **** { "_POSIX_STREAM_MAX", G_UNDEF, -1 }, #endif #ifdef _POSIX_TZNAME_MAX { "_POSIX_TZNAME_MAX", CONSTANT, _POSIX_TZNAME_MAX }, #else ! { "_POSIX_TZNAME_MAX", G_UNDEF, -1 }, #endif --- 466,552 ---- { "_POSIX_STREAM_MAX", G_UNDEF, -1 }, #endif + #ifdef _POSIX_SYMLINK_MAX + { "_POSIX_SYMLINK_MAX", CONSTANT, _POSIX_SYMLINK_MAX }, + #else + { "_POSIX_SYMLINK_MAX", G_UNDEF, -1 }, + #endif + #ifdef _POSIX_SYMLOOP_MAX + { "_POSIX_SYMLOOP_MAX", CONSTANT, _POSIX_SYMLOOP_MAX }, + #else + { "_POSIX_SYMLOOP_MAX", G_UNDEF, -1 }, + #endif + #ifdef _POSIX_THREAD_DESTRUCTOR_ITERATIONS + { "_POSIX_THREAD_DESTRUCTOR_ITERATIONS", CONSTANT, _POSIX_THREAD_DESTRUCTOR_ITERATIONS }, + #else + { "_POSIX_THREAD_DESTRUCTOR_ITERATIONS", G_UNDEF, -1 }, + #endif + #ifdef _POSIX_THREAD_KEYS_MAX + { "_POSIX_THREAD_KEYS_MAX", CONSTANT, _POSIX_THREAD_KEYS_MAX }, + #else + { "_POSIX_THREAD_KEYS_MAX", G_UNDEF, -1 }, + #endif + #ifdef _POSIX_THREAD_THREADS_MAX + { "_POSIX_THREAD_THREADS_MAX",CONSTANT, _POSIX_THREAD_THREADS_MAX }, + #else + { "_POSIX_THREAD_THREADS_MAX",G_UNDEF, -1 }, + #endif + #ifdef _POSIX_TIMER_MAX + { "_POSIX_TIMER_MAX", CONSTANT, _POSIX_TIMER_MAX }, + #else + { "_POSIX_TIMER_MAX", G_UNDEF, -1 }, + #endif + #ifdef _POSIX_TRACE_EVENT_NAME_MAX + { "_POSIX_TRACE_EVENT_NAME_MAX", CONSTANT, _POSIX_TRACE_EVENT_NAME_MAX }, + #else + { "_POSIX_TRACE_EVENT_NAME_MAX", G_UNDEF, -1 }, + #endif + #ifdef _POSIX_TRACE_NAME_MAX + { "_POSIX_TRACE_NAME_MAX", CONSTANT, _POSIX_TRACE_NAME_MAX }, + #else + { "_POSIX_TRACE_NAME_MAX", G_UNDEF, -1 }, + #endif + #ifdef _POSIX_TRACE_SYS_MAX + { "_POSIX_TRACE_SYS_MAX", CONSTANT, _POSIX_TRACE_SYS_MAX }, + #else + { "_POSIX_TRACE_SYS_MAX", G_UNDEF, -1 }, + #endif + #ifdef _POSIX_TRACE_USER_EVENT_MAX + { "_POSIX_TRACE_USER_EVENT_MAX", CONSTANT, _POSIX_TRACE_USER_EVENT_MAX }, + #else + { "_POSIX_TRACE_USER_EVENT_MAX", G_UNDEF, -1 }, + #endif + #ifdef _POSIX_TTY_NAME_MAX + { "_POSIX_TTY_NAME_MAX", CONSTANT, _POSIX_TTY_NAME_MAX }, + #else + { "_POSIX_TTY_NAME_MAX", G_UNDEF, -1 }, + #endif #ifdef _POSIX_TZNAME_MAX { "_POSIX_TZNAME_MAX", CONSTANT, _POSIX_TZNAME_MAX }, #else ! { "_POSIX_TZNAME_MAX", G_UNDEF, -1 }, ! #endif ! ! /* POSIX.1 Maximum Values */ ! #ifdef _POSIX_CLOCKRES_MIN ! { "_POSIX_CLOCKRES_MIN", CONSTANT, _POSIX_CLOCKRES_MIN }, ! #else ! { "_POSIX_CLOCKRES_MIN", G_UNDEF, -1 }, ! #endif ! ! /* POSIX.1-2001/XPG6 (and later) Runtime Invariants from */ ! #ifdef _SC_SS_REPL_MAX ! { "SS_REPL_MAX", SYSCONF, _SC_SS_REPL_MAX }, ! #endif ! #ifdef _SC_TRACE_EVENT_NAME_MAX ! { "TRACE_EVENT_NAME_MAX", SYSCONF, _SC_TRACE_EVENT_NAME_MAX }, ! #endif ! #ifdef _SC_TRACE_NAME_MAX ! { "TRACE_NAME_MAX", SYSCONF, _SC_TRACE_NAME_MAX }, ! #endif ! #ifdef _SC_TRACE_SYS_MAX ! { "TRACE_SYS_MAX", SYSCONF, _SC_TRACE_SYS_MAX }, ! #endif ! #ifdef _SC_TRACE_USER_EVENT_MAX ! { "TRACE_USER_EVENT_MAX", SYSCONF, _SC_TRACE_USER_EVENT_MAX }, #endif *************** *** 362,365 **** --- 594,600 ---- { "NL_TEXTMAX", CONSTANT, NL_TEXTMAX }, #endif + #ifdef _SC_RAW_SOCKET + { "RAW_SOCKET", SYSCONF, _SC_RAW_SOCKET }, + #endif #ifdef _SC_RE_DUP_MAX { "RE_DUP_MAX", SYSCONF, _SC_RE_DUP_MAX }, *************** *** 368,414 **** /* POSIX.2 Optional Facility Configuration Values */ #ifdef _SC_2_C_BIND ! { "_POSIX2_C_BIND", SYSCONF, _SC_2_C_BIND }, #else ! { "_POSIX2_C_BIND", G_UNDEF, -1 }, #endif #ifdef _SC_2_C_DEV ! { "_POSIX2_C_DEV", SYSCONF, _SC_2_C_DEV }, #else ! { "_POSIX2_C_DEV", G_UNDEF, -1 }, #endif #if defined (_SC_2_C_VERSION) ! { "_POSIX2_C_VERSION", SYSCONF, _SC_2_C_VERSION }, #else ! { "_POSIX2_C_VERSION", G_UNDEF, -1 }, #endif #if defined (_SC_2_CHAR_TERM) ! { "_POSIX2_CHAR_TERM", SYSCONF, _SC_2_CHAR_TERM }, #else ! { "_POSIX2_CHAR_TERM", G_UNDEF, -1 }, #endif #ifdef _SC_2_FORT_DEV ! { "_POSIX2_FORT_DEV", SYSCONF, _SC_2_FORT_DEV }, #else ! { "_POSIX2_FORT_DEV", G_UNDEF, -1 }, #endif #ifdef _SC_2_FORT_RUN ! { "_POSIX2_FORT_RUN", SYSCONF, _SC_2_FORT_RUN }, #else ! { "_POSIX2_FORT_RUN", G_UNDEF, -1 }, #endif #ifdef _SC_2_LOCALEDEF ! { "_POSIX2_LOCALEDEF", SYSCONF, _SC_2_LOCALEDEF }, #else ! { "_POSIX2_LOCALEDEF", G_UNDEF, -1 }, #endif #ifdef _SC_2_SW_DEV ! { "_POSIX2_SW_DEV", SYSCONF, _SC_2_SW_DEV }, #else ! { "_POSIX2_SW_DEV", G_UNDEF, -1 }, #endif #if defined (_SC2_UPE) ! { "_POSIX2_UPE", SYSCONF, _SC_2_UPE }, #else ! { "_POSIX2_UPE", G_UNDEF, -1 }, #endif #if !defined (_POSIX2_VERSION) && defined (_SC_2_VERSION) --- 603,649 ---- /* POSIX.2 Optional Facility Configuration Values */ #ifdef _SC_2_C_BIND ! { "POSIX2_C_BIND", SYSCONF, _SC_2_C_BIND }, #else ! { "POSIX2_C_BIND", G_UNDEF, -1 }, #endif #ifdef _SC_2_C_DEV ! { "POSIX2_C_DEV", SYSCONF, _SC_2_C_DEV }, #else ! { "POSIX2_C_DEV", G_UNDEF, -1 }, #endif #if defined (_SC_2_C_VERSION) ! { "POSIX2_C_VERSION", SYSCONF, _SC_2_C_VERSION }, #else ! { "POSIX2_C_VERSION", G_UNDEF, -1 }, #endif #if defined (_SC_2_CHAR_TERM) ! { "POSIX2_CHAR_TERM", SYSCONF, _SC_2_CHAR_TERM }, #else ! { "POSIX2_CHAR_TERM", G_UNDEF, -1 }, #endif #ifdef _SC_2_FORT_DEV ! { "POSIX2_FORT_DEV", SYSCONF, _SC_2_FORT_DEV }, #else ! { "POSIX2_FORT_DEV", G_UNDEF, -1 }, #endif #ifdef _SC_2_FORT_RUN ! { "POSIX2_FORT_RUN", SYSCONF, _SC_2_FORT_RUN }, #else ! { "POSIX2_FORT_RUN", G_UNDEF, -1 }, #endif #ifdef _SC_2_LOCALEDEF ! { "POSIX2_LOCALEDEF", SYSCONF, _SC_2_LOCALEDEF }, #else ! { "POSIX2_LOCALEDEF", G_UNDEF, -1 }, #endif #ifdef _SC_2_SW_DEV ! { "POSIX2_SW_DEV", SYSCONF, _SC_2_SW_DEV }, #else ! { "POSIX2_SW_DEV", G_UNDEF, -1 }, #endif #if defined (_SC2_UPE) ! { "POSIX2_UPE", SYSCONF, _SC_2_UPE }, #else ! { "POSIX2_UPE", G_UNDEF, -1 }, #endif #if !defined (_POSIX2_VERSION) && defined (_SC_2_VERSION) *************** *** 419,424 **** --- 654,661 ---- #if defined (_SC_REGEX_VERSION) { "REGEX_VERSION", SYSCONF, _SC_REGEX_VERSION }, + { "_REGEX_VERSION", SYSCONF, _SC_REGEX_VERSION }, #else { "REGEX_VERSION", G_UNDEF, -1 }, + { "_REGEX_VERSION", G_UNDEF, -1 }, #endif *************** *** 426,429 **** --- 663,669 ---- { "_POSIX2_PBS", SYSCONF, _SC_2_PBS }, { "_POSIX2_PBS_ACCOUNTING", SYSCONF, _SC_2_PBS_ACCOUNTING }, + # if defined (_SC_2_PBS_CHECKPOINT) + { "_POSIX2_PBS_CHECKPOINT", SYSCONF, _SC_2_PBS_CHECKPOINT }, + # endif { "_POSIX2_PBS_LOCATE", SYSCONF, _SC_2_PBS_LOCATE }, { "_POSIX2_PBS_MESSAGE", SYSCONF, _SC_2_PBS_MESSAGE }, *************** *** 518,521 **** --- 758,764 ---- { "_POSIX_FSYNC", SYSCONF, _SC_FSYNC }, #endif + #if defined (_SC_IPV6) + { "_POSIX_IPV6", SYSCONF, _SC_IPV6 }, + #endif #if defined (_SC_JOB_CONTROL) { "_POSIX_JOB_CONTROL", SYSCONF, _SC_JOB_CONTROL }, *************** *** 557,560 **** --- 800,806 ---- { "_POSIX_READER_WRITER_LOCKS", SYSCONF, _SC_READER_WRITER_LOCKS }, #endif + #if defined (_SC_RAW_SOCKETS) + { "_POSIX_RAW_SOCKETS", SYSCONF, _SC_RAW_SOCKETS }, + #endif #if defined (_SC_REALTIME_SIGNALS) { "_POSIX_REALTIME_SIGNALS", SYSCONF, _SC_REALTIME_SIGNALS }, *************** *** 588,591 **** --- 834,840 ---- { "_POSIX_SPORADIC_SERVER", SYSCONF, _SC_SPORADIC_SERVER }, #endif + #if defined (_SC_SYMLOOP_MAX) + { "_POSIX_SYMLOOP_MAX", SYSCONF, _SC_SYMLOOP_MAX }, + #endif #if defined (_SC_SYNCHRONIZED_IO) { "_POSIX_SYNCHRONIZED_IO", SYSCONF, _SC_SYNCHRONIZED_IO }, *************** *** 702,708 **** { "AIO_PRIO_DELTA_MAX", SYSCONF, _SC_AIO_PRIO_DELTA_MAX }, #endif - #if defined (_SC_DELAYTIMER_MAX) - { "DELAYTIMER_MAX", SYSCONF, _SC_DELAYTIMER_MAX }, - #endif #if defined (_SC_MQ_OPEN_MAX) { "MQ_OPEN_MAX", SYSCONF, _SC_MQ_OPEN_MAX }, --- 951,954 ---- *************** *** 759,762 **** --- 1005,1011 ---- { "_XOPEN_SHM", SYSCONF, _SC_XOPEN_SHM }, #endif + #if defined (_SC_XOPEN_STREAMS) + { "_XOPEN_STREAMS", SYSCONF, _SC_XOPEN_STREAMS }, + #endif #if defined (_SC_XOPEN_UNIX) { "_XOPEN_UNIX", SYSCONF, _SC_XOPEN_UNIX }, *************** *** 843,846 **** --- 1092,1099 ---- { "INT_MAX", CONSTANT, INT_MAX }, { "INT_MIN", CONSTANT, INT_MIN }, + #ifdef LLONG_MAX + { "LLONG_MAX", LLCONST, VAL_LLONG_MAX }, + { "LLONG_MIN", LLCONST, VAL_LLONG_MIN }, + #endif { "LONG_BIT", CONSTANT, LONG_BIT }, { "LONG_MAX", CONSTANT, LONG_MAX }, *************** *** 857,860 **** --- 1110,1116 ---- { "UCHAR_MAX", CONSTANT, UCHAR_MAX }, { "UINT_MAX", CONSTANT, UINT_MAX }, + #ifdef ULLONG_MAX + { "ULLONG_MAX", LLCONST, VAL_ULLONG_MAX }, + #endif { "ULONG_MAX", CONSTANT, ULONG_MAX }, { "USHRT_MAX", CONSTANT, USHRT_MAX }, *************** *** 941,944 **** --- 1197,1218 ---- break; + #ifdef LLONG_MAX + case LLCONST: + switch (cp->value) { + default: + case VAL_LLONG_MIN: + printf ("%lld\n", LLONG_MIN); + break; + case VAL_LLONG_MAX: + printf ("%lld\n", LLONG_MAX); + break; + # if (ULLONG_MAX != LLONG_MAX) + case VAL_ULLONG_MAX: + printf ("%llu\n", ULLONG_MAX); + break; + # endif + } + break; + #endif case CONSTANT: switch (cp->value) { diff -aNrc2 bash-2.05b-patched/examples/loadables/strftime.c bash-3.0/examples/loadables/strftime.c *** bash-2.05b-patched/examples/loadables/strftime.c Wed Dec 31 19:00:00 1969 --- bash-3.0/examples/loadables/strftime.c Tue Aug 6 16:38:52 2002 *************** *** 0 **** --- 1,105 ---- + /* strftime - loadable builtin interface to strftime(3) */ + + /* See Makefile for compilation details. */ + + #include + + #if defined (HAVE_UNISTD_H) + # include + #endif + + #include "bashtypes.h" + #include "posixtime.h" + + #include + + #include "builtins.h" + #include "shell.h" + #include "common.h" + + int + strftime_builtin (list) + WORD_LIST *list; + { + char *format, *tbuf; + size_t tbsize, tsize; + time_t secs; + struct tm *t; + int n; + intmax_t i; + + if (list == 0) + { + builtin_usage (); + return (EX_USAGE); + } + + if (no_options (list)) + return (EX_USAGE); + + format = list->word->word; + if (format == 0 || *format == 0) + { + printf ("\n"); + return (EXECUTION_SUCCESS); + } + + list = list->next; + + if (list && list->word->word) + { + n = legal_number (list->word->word, &i); + if (n == 0 || i < 0 || i != (time_t)i) + { + sh_invalidnum (list->word->word); + return (EXECUTION_FAILURE); + } + else + secs = i; + } + else + secs = NOW; + + t = localtime (&secs); + + tbsize = strlen (format) * 4; + tbuf = 0; + + /* Now try to figure out how big the buffer should really be. strftime(3) + will return the number of bytes placed in the buffer unless it's greater + than MAXSIZE, in which case it returns 0. */ + for (n = 1; n < 4; n++) + { + tbuf = xrealloc (tbuf, tbsize * n); + tsize = strftime (tbuf, tbsize * n, format, t); + if (tsize) + break; + } + + printf ("%s\n", tbuf); + free (tbuf); + + return (EXECUTION_SUCCESS); + } + + /* An array of strings forming the `long' documentation for a builtin xxx, + which is printed by `help xxx'. It must end with a NULL. */ + char *strftime_doc[] = { + "Converts date and time format to a string and displays it on the", + "standard output. If the optional second argument is supplied, it", + "is used as the number of seconds since the epoch to use in the", + "conversion, otherwise the current time is used.", + (char *)NULL + }; + + /* The standard structure describing a builtin command. bash keeps an array + of these structures. The flags must include BUILTIN_ENABLED so the + builtin can be used. */ + struct builtin strftime_struct = { + "strftime", /* builtin name */ + strftime_builtin, /* function implementing the builtin */ + BUILTIN_ENABLED, /* initial flags for builtin */ + strftime_doc, /* array of long documentation strings. */ + "strftime format [seconds]", /* usage synopsis; becomes short_doc */ + 0 /* reserved for internal use */ + }; diff -aNrc2 bash-2.05b-patched/examples/misc/aliasconv.bash bash-3.0/examples/misc/aliasconv.bash *** bash-2.05b-patched/examples/misc/aliasconv.bash Mon Nov 23 15:05:16 1998 --- bash-3.0/examples/misc/aliasconv.bash Sat Nov 30 17:20:24 2002 *************** *** 15,28 **** mkalias () { ! if [ "x$2" = "x" ]; then ! echo alias ${1}="''" ! elif echo "$2" | egrep -s '(\!|#)' >/dev/null 2>&1; then comm=$(echo $2 | sed 's/\!\*/"$\@"/g s/\!:\([1-9]\)/"$\1"/g s/#/\#/g') echo $1 \(\) "{" command "$comm" "; }" ! else ! echo alias ${1}=\'$(echo "${2}" | sed "s:':'\\\\'':")\' ! fi } EOF --- 15,28 ---- mkalias () { ! case $2 in ! '') echo alias ${1}="''" ;; ! *[#\!]*) comm=$(echo $2 | sed 's/\!\*/"$\@"/g s/\!:\([1-9]\)/"$\1"/g s/#/\#/g') echo $1 \(\) "{" command "$comm" "; }" ! ;; ! *) echo alias ${1}=\'$(echo "${2}" | sed "s:':'\\\\'':")\' ;; ! esac } EOF diff -aNrc2 bash-2.05b-patched/examples/misc/aliasconv.sh bash-3.0/examples/misc/aliasconv.sh *** bash-2.05b-patched/examples/misc/aliasconv.sh Mon Nov 23 15:05:24 1998 --- bash-3.0/examples/misc/aliasconv.sh Sat Nov 30 17:20:23 2002 *************** *** 15,28 **** mkalias () { ! if [ "x$2" = "x" ]; then ! echo alias ${1}="''" ! elif echo "$2" | egrep -s '(\!|#)' >/dev/null 2>&1; then comm=`echo $2 | sed 's/\\!\*/"$\@"/g s/\\!:\([1-9]\)/"$\1"/g s/#/\#/g'` echo $1 \(\) "{" command "$comm" "; }" ! else ! echo alias ${1}=\'`echo "${2}" | sed "s:':'\\\\\\\\'':"`\' ! fi } EOF --- 15,28 ---- mkalias () { ! case $2 in ! '') echo alias ${1}="''" ;; ! *[#\!]*) comm=`echo $2 | sed 's/\\!\*/"$\@"/g s/\\!:\([1-9]\)/"$\1"/g s/#/\#/g'` echo $1 \(\) "{" command "$comm" "; }" ! ;; ! *) echo alias ${1}=\'`echo "${2}" | sed "s:':'\\\\\\\\'':"`\' ;; ! esac } EOF diff -aNrc2 bash-2.05b-patched/examples/misc/cshtobash bash-3.0/examples/misc/cshtobash *** bash-2.05b-patched/examples/misc/cshtobash Fri Jul 19 14:46:50 1996 --- bash-3.0/examples/misc/cshtobash Sat Nov 30 17:23:41 2002 *************** *** 37,50 **** mkalias () { ! if [ -z "$2" ]; then ! echo alias ${1}="''" ! elif echo "$2" | egrep -s '(\!|#)' >/dev/null 2>&1; then comm=$(echo $2 | sed 's/\!\*/"$\@"/g s/\!:\([1-9]\)/"$\1"/g s/#/\#/g') echo $1 \(\) "{" command "$comm" "; }" ! else ! echo alias ${1}=\'$(echo "${2}" | sed "s:':'\\\\'':")\' ! fi } EOF --- 37,50 ---- mkalias () { ! case $2 in ! '') echo alias ${1}="''" ;; ! *[#\!]*) comm=$(echo $2 | sed 's/\!\*/"$\@"/g s/\!:\([1-9]\)/"$\1"/g s/#/\#/g') echo $1 \(\) "{" command "$comm" "; }" ! ;; ! *) echo alias ${1}=\'$(echo "${2}" | sed "s:':'\\\\'':")\' ;; ! esac } EOF diff -aNrc2 bash-2.05b-patched/examples/obashdb/README bash-3.0/examples/obashdb/README *** bash-2.05b-patched/examples/obashdb/README Mon Jul 31 16:31:23 1995 --- bash-3.0/examples/obashdb/README Wed Jul 24 08:30:31 2002 *************** *** 5,8 **** The original `kshdb' is available for anonymous FTP with the URL ! ftp://ftp.uu.net/published/oreilly/nutshell/ksh/ksh.tar.Z --- 5,12 ---- The original `kshdb' is available for anonymous FTP with the URL ! http://examples.oreilly.com/korn/ksh.tar.Z ! ! A revised edition is available at: ! ! http://examples.oreilly.com/korn2/korn2_examples.tar.gz diff -aNrc2 bash-2.05b-patched/examples/obashdb/bashdb.fns bash-3.0/examples/obashdb/bashdb.fns *** bash-2.05b-patched/examples/obashdb/bashdb.fns Wed Jan 22 12:43:48 1997 --- bash-3.0/examples/obashdb/bashdb.fns Sat Nov 30 17:25:55 2002 *************** *** 89,93 **** return 1 fi ! echo "${_curline}" | egrep "(${_linebp%\|})" >/dev/null 2>&1 return $? } --- 89,93 ---- return 1 fi ! echo "${_curline}" | grep -E "(${_linebp%\|})" >/dev/null 2>&1 return $? } *************** *** 102,106 **** fi l=${_lines[$_curline-$_firstline+1]} ! echo "${l}" | egrep "*(${_stringbp%\|})*" >/dev/null 2>&1 return $? } --- 102,106 ---- fi l=${_lines[$_curline-$_firstline+1]} ! echo "${l}" | grep -E "\\*(${_stringbp%\|})\\*" >/dev/null 2>&1 return $? } diff -aNrc2 bash-2.05b-patched/examples/scripts/bcsh.sh bash-3.0/examples/scripts/bcsh.sh *** bash-2.05b-patched/examples/scripts/bcsh.sh Thu Apr 4 10:25:40 2002 --- bash-3.0/examples/scripts/bcsh.sh Thu Aug 1 14:32:15 2002 *************** *** 390,394 **** trap ':' 2 trap exit 3 ! trap "tail -$savehist $histfile>/tmp/hist$$;uniq /tmp/hist$$ > $histfile;\ rm -f /tmp/*$$;exit 0" 15 --- 390,394 ---- trap ':' 2 trap exit 3 ! trap "tail -n $savehist $histfile>/tmp/hist$$;uniq /tmp/hist$$ > $histfile;\ rm -f /tmp/*$$;exit 0" 15 *************** *** 518,522 **** cmd="${cmd};$line" ! while test "$line" != "done" -a "$line" != "end" do echo $n "$PS2$c" --- 518,522 ---- cmd="${cmd};$line" ! while test "$line" != "done" && test "$line" != "end" do echo $n "$PS2$c" *************** *** 532,536 **** ;; if[\ \ ]*) ! while test "$line" != "fi" -a "$line" != "endif" do echo $n "$PS2$c" --- 532,536 ---- ;; if[\ \ ]*) ! while test "$line" != "fi" && test "$line" != "endif" do echo $n "$PS2$c" *************** *** 660,664 **** wanted="`expr \"$i\" : '-\([0-9][0-9]*\).*'`" rest="`expr \"$i\" : '-[0-9][0-9]*\(.*\)'`" ! i="`tail -$wanted $histfile | sed -e "1q"`" ;; esac --- 660,664 ---- wanted="`expr \"$i\" : '-\([0-9][0-9]*\).*'`" rest="`expr \"$i\" : '-[0-9][0-9]*\(.*\)'`" ! i="`tail -n $wanted $histfile | sed -e "1q"`" ;; esac *************** *** 918,922 **** ;; exec[\ \ ]*) ! tail -$savehist $histfile>/tmp/hist$$ uniq /tmp/hist$$ > $histfile rm -f /tmp/*$$ --- 918,922 ---- ;; exec[\ \ ]*) ! tail -n $savehist $histfile>/tmp/hist$$ uniq /tmp/hist$$ > $histfile rm -f /tmp/*$$ *************** *** 925,929 **** ;; login[\ \ ]*|newgrp[\ \ ]*) ! tail -$savehist $histfile>/tmp/hist$$ uniq /tmp/hist$$ > $histfile rm -f /tmp/*$$ --- 925,929 ---- ;; login[\ \ ]*|newgrp[\ \ ]*) ! tail -n $savehist $histfile>/tmp/hist$$ uniq /tmp/hist$$ > $histfile rm -f /tmp/*$$ *************** *** 937,941 **** $SHELL $logoutfile fi ! tail -$savehist $histfile > /tmp/hist$$ uniq /tmp/hist$$ > $histfile rm -f /tmp/*$$ --- 937,941 ---- $SHELL $logoutfile fi ! tail -n $savehist $histfile > /tmp/hist$$ uniq /tmp/hist$$ > $histfile rm -f /tmp/*$$ *************** *** 943,956 **** ;; h|history) ! grep -n . $histfile | tail -$history | sed -e 's@:@ @' | $PAGER continue ;; h[\ \ ]\|*|h[\ \ ]\>*|h\|*|h\>*) ! cmd="`echo \"$cmd\" | sed -e \"s@h@grep -n . $histfile | tail -$history | sed -e 's@:@ @'@\"`" getcmd=no continue ;; history[\ \ ]*\|*|history[\ \ ]*\>*) ! cmd="`echo \"$cmd\" | sed -e \"s@history@grep -n . $histfile | tail -$history | sed -e 's@:@ @'@\"`" getcmd=no continue --- 943,956 ---- ;; h|history) ! grep -n . $histfile | tail -n $history | sed -e 's@:@ @' | $PAGER continue ;; h[\ \ ]\|*|h[\ \ ]\>*|h\|*|h\>*) ! cmd="`echo \"$cmd\" | sed -e \"s@h@grep -n . $histfile | tail -n $history | sed -e 's@:@ @'@\"`" getcmd=no continue ;; history[\ \ ]*\|*|history[\ \ ]*\>*) ! cmd="`echo \"$cmd\" | sed -e \"s@history@grep -n . $histfile | tail -n $history | sed -e 's@:@ @'@\"`" getcmd=no continue diff -aNrc2 bash-2.05b-patched/examples/scripts/fixfiles.bash bash-3.0/examples/scripts/fixfiles.bash *** bash-2.05b-patched/examples/scripts/fixfiles.bash Thu Sep 4 14:44:06 1997 --- bash-3.0/examples/scripts/fixfiles.bash Thu Aug 1 14:32:36 2002 *************** *** 63,67 **** for file in * ; do set -f ! if [ "$file" != "." -a "$file" != ".." ] ; then if [ -L "$file" ] ; then echo "skipping symlink" $file in `pwd` --- 63,67 ---- for file in * ; do set -f ! if [ "$file" != "." ] && [ "$file" != ".." ] ; then if [ -L "$file" ] ; then echo "skipping symlink" $file in `pwd` diff -aNrc2 bash-2.05b-patched/examples/scripts/line-input.bash bash-3.0/examples/scripts/line-input.bash *** bash-2.05b-patched/examples/scripts/line-input.bash Fri Apr 30 09:32:44 1999 --- bash-3.0/examples/scripts/line-input.bash Thu Aug 1 14:33:33 2002 *************** *** 126,134 **** ;;  ) ! while [ "${line% }" != "$line" -a ${#line} != 0 ] ; do echo -n " " line="${line%?}" done ! while [ "${line% }" = "$line" -a ${#line} != 0 ] ; do echo -n " " line="${line%?}" --- 126,134 ---- ;;  ) ! while [ "${line% }" != "$line" ] && [ ${#line} != 0 ] ; do echo -n " " line="${line%?}" done ! while [ "${line% }" = "$line" ] && [ ${#line} != 0 ] ; do echo -n " " line="${line%?}" *************** *** 152,156 **** # long, then beep... ! if [ "$2" != 0 -a $(( ${#line} >= $2 )) = 1 ] ; then echo -n  else # Otherwise add --- 152,156 ---- # long, then beep... ! if [ "$2" != 0 ] && [ $(( ${#line} >= $2 )) = 1 ] ; then echo -n  else # Otherwise add *************** *** 183,185 **** echo "<$LINE>" - --- 183,184 ---- diff -aNrc2 bash-2.05b-patched/examples/scripts.noah/number.bash bash-3.0/examples/scripts.noah/number.bash *** bash-2.05b-patched/examples/scripts.noah/number.bash Thu May 25 11:32:02 1995 --- bash-3.0/examples/scripts.noah/number.bash Thu Aug 1 14:24:05 2002 *************** *** 109,113 **** 0 ) : ;; * ) ! if test ".${val2}" != '.' -a ".${d1}" != '.0' ; then val2="${val2}-" fi --- 109,113 ---- 0 ) : ;; * ) ! if test ".${val2}" != '.' && test ".${d1}" != '.0' ; then val2="${val2}-" fi diff -aNrc2 bash-2.05b-patched/examples/scripts.noah/string.bash bash-3.0/examples/scripts.noah/string.bash *** bash-2.05b-patched/examples/scripts.noah/string.bash Thu May 25 14:36:15 1995 --- bash-3.0/examples/scripts.noah/string.bash Thu Aug 1 14:24:46 2002 *************** *** 96,104 **** function strncmp () { ! if [ -z "${3}" -o "${3}" -le "0" ]; then return 0 fi ! if [ ${3} -ge ${#1} -a ${3} -ge ${#2} ]; then strcmp "$1" "$2" return $? --- 96,104 ---- function strncmp () { ! if [ -z "${3}" ] || [ "${3}" -le "0" ]; then return 0 fi ! if [ ${3} -ge ${#1} ] && [ ${3} -ge ${#2} ]; then strcmp "$1" "$2" return $? diff -aNrc2 bash-2.05b-patched/examples/scripts.v2/cdhist.bash bash-3.0/examples/scripts.v2/cdhist.bash *** bash-2.05b-patched/examples/scripts.v2/cdhist.bash Wed Oct 16 15:54:20 1996 --- bash-3.0/examples/scripts.v2/cdhist.bash Thu Aug 1 14:25:48 2002 *************** *** 40,44 **** fi ! if [ "$CDHISTFILE" -a -r "$CDHISTFILE" ] # if directory history exists then typeset CDHIST --- 40,44 ---- fi ! if [ "$CDHISTFILE" ] && [ -r "$CDHISTFILE" ] # if directory history exists then typeset CDHIST *************** *** 50,54 **** fi ! if [ "${CDHIST[0]}" != "$PWD" -a "$PWD" != "" ] then _cdins # insert $PWD into cd history --- 50,54 ---- fi ! if [ "${CDHIST[0]}" != "$PWD" ] && [ -n "$PWD" ] then _cdins # insert $PWD into cd history diff -aNrc2 bash-2.05b-patched/examples/scripts.v2/fman bash-3.0/examples/scripts.v2/fman *** bash-2.05b-patched/examples/scripts.v2/fman Wed May 10 16:08:18 1995 --- bash-3.0/examples/scripts.v2/fman Thu Aug 1 14:26:16 2002 *************** *** 57,61 **** done [ -z "$indexes" ] && return ! # Make egrep give filename [ NIndex -lt 2 ] && indexes="$indexes /dev/null" # set positional parameters to --- 57,61 ---- done [ -z "$indexes" ] && return ! # Make grep give filename [ NIndex -lt 2 ] && indexes="$indexes /dev/null" # set positional parameters to *************** *** 63,67 **** # e.g. # /usr/man/index:FP_OFF Routines DOS ! set -- `egrep "^$page[ ]" $indexes` while [ $# -gt 2 ]; do FileNames[i]=${1%%index*}cat$3/$2.$3 --- 63,67 ---- # e.g. # /usr/man/index:FP_OFF Routines DOS ! set -- `grep "^$page[ ]" $indexes` while [ $# -gt 2 ]; do FileNames[i]=${1%%index*}cat$3/$2.$3 diff -aNrc2 bash-2.05b-patched/examples/scripts.v2/frcp bash-3.0/examples/scripts.v2/frcp *** bash-2.05b-patched/examples/scripts.v2/frcp Tue May 9 12:41:31 1995 --- bash-3.0/examples/scripts.v2/frcp Thu Aug 1 14:26:53 2002 *************** *** 111,115 **** *) if [ $# -gt 2 ] || # if more than two args given, last must be a dir # If dest in on local machine, check whether it is a directory ! [ $DestMach = $LocalMach -a -d $DestPath ] || # If dest ends with . or .., it is a directory lastisdot "$DestPath" --- 111,115 ---- *) if [ $# -gt 2 ] || # if more than two args given, last must be a dir # If dest in on local machine, check whether it is a directory ! [ $DestMach = $LocalMach ] && [ -d "$DestPath" ] || # If dest ends with . or .., it is a directory lastisdot "$DestPath" diff -aNrc2 bash-2.05b-patched/examples/scripts.v2/repeat bash-3.0/examples/scripts.v2/repeat *** bash-2.05b-patched/examples/scripts.v2/repeat Mon Jun 29 10:45:15 1998 --- bash-3.0/examples/scripts.v2/repeat Thu Aug 1 14:28:20 2002 *************** *** 104,108 **** shift ! [ -z "$end" -o $count -le "$end" ] && increment=1 || increment=-1 istrue $verbose && echo "start=$count end=$end" 1>&2 --- 104,108 ---- shift ! [ -z "$end" ] && [ $count -le "$end" ] && increment=1 || increment=-1 istrue $verbose && echo "start=$count end=$end" 1>&2 diff -aNrc2 bash-2.05b-patched/examples/scripts.v2/vtree bash-3.0/examples/scripts.v2/vtree *** bash-2.05b-patched/examples/scripts.v2/vtree Wed May 10 17:36:03 1995 --- bash-3.0/examples/scripts.v2/vtree Thu Aug 1 14:29:07 2002 *************** *** 39,43 **** ;; *) ! if [ ! -x $i -o ! -d $i ]; then # arg must be a dir and executable echo "$i: directory not accessible." exit --- 39,43 ---- ;; *) ! if [ ! -x $i ] || [ ! -d $i ]; then # arg must be a dir and executable echo "$i: directory not accessible." exit diff -aNrc2 bash-2.05b-patched/execute_cmd.c bash-3.0/execute_cmd.c *** bash-2.05b-patched/execute_cmd.c Mon Mar 18 13:24:22 2002 --- bash-3.0/execute_cmd.c Sun Jul 4 14:12:58 2004 *************** *** 1,5 **** /* execute_command.c -- Execute a COMMAND structure. */ ! /* Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,5 ---- /* execute_command.c -- Execute a COMMAND structure. */ ! /* Copyright (C) 1987-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 27,31 **** #include "chartypes.h" #include "bashtypes.h" ! #ifndef _MINIX # include #endif --- 27,31 ---- #include "chartypes.h" #include "bashtypes.h" ! #if !defined (_MINIX) && defined (HAVE_SYS_FILE_H) # include #endif *************** *** 58,61 **** --- 58,62 ---- #include "bashansi.h" + #include "bashintl.h" #include "memalloc.h" *************** *** 98,105 **** extern int breaking, continuing, loop_level; extern int expand_aliases; ! extern int parse_and_execute_level, running_trap, trap_line_number; extern int command_string_index, line_number; extern int dot_found_in_search; extern int already_making_children; extern char *the_printed_command, *shell_name; extern pid_t last_command_subst_pid; --- 99,107 ---- extern int breaking, continuing, loop_level; extern int expand_aliases; ! extern int parse_and_execute_level, running_trap; extern int command_string_index, line_number; extern int dot_found_in_search; extern int already_making_children; + extern int tempenv_assign_error; extern char *the_printed_command, *shell_name; extern pid_t last_command_subst_pid; *************** *** 197,200 **** --- 199,207 ---- char *this_command_name; + /* The printed representation of the currently-executing command (same as + the_printed_command), except when a trap is being executed. Useful for + a debugger to know where exactly the program is currently executing. */ + char *the_printed_command_except_trap; + static COMMAND *currently_executing_command; *************** *** 203,206 **** --- 210,218 ---- static int special_builtin_failed; + /* XXX - set to 1 if we're running the DEBUG trap and we want to show the line + number containing the function name. Used by executing_line_number to + report the correct line number. Kind of a hack. */ + static int showing_function_line; + /* For catching RETURN in a function. */ int return_catch_flag; *************** *** 211,214 **** --- 223,230 ---- int last_command_exit_value; + /* Whether or not the last command (corresponding to last_command_exit_value) + was terminated by a signal, and, if so, which one. */ + int last_command_exit_signal; + /* The list of redirections to perform which will undo the redirections that I made in the shell. */ *************** *** 224,227 **** --- 240,246 ---- int subshell_environment; + /* Count of nested subshells, like SHLVL. Available via $BASH_SUBSHELL */ + int subshell_level = 0; + /* Currently-executing shell function. */ SHELL_VAR *this_shell_function; *************** *** 283,301 **** executing_line_number () { ! if (executing && (variable_context == 0 || interactive_shell == 0) && currently_executing_command) { ! if (currently_executing_command->type == cm_simple) ! return currently_executing_command->value.Simple->line; ! else if (currently_executing_command->type == cm_cond) return currently_executing_command->value.Cond->line; else if (currently_executing_command->type == cm_arith) return currently_executing_command->value.Arith->line; else if (currently_executing_command->type == cm_arith_for) return currently_executing_command->value.ArithFor->line; ! else return line_number; } - else if (running_trap) - return trap_line_number; else return line_number; --- 302,324 ---- executing_line_number () { ! if (executing && showing_function_line == 0 && ! (variable_context == 0 || interactive_shell == 0) && ! currently_executing_command) { ! #if defined (COND_COMMAND) ! if (currently_executing_command->type == cm_cond) return currently_executing_command->value.Cond->line; + #endif + #if defined (DPAREN_ARITHMETIC) else if (currently_executing_command->type == cm_arith) return currently_executing_command->value.Arith->line; + #endif + #if defined (ARITH_FOR_COMMAND) else if (currently_executing_command->type == cm_arith_for) return currently_executing_command->value.ArithFor->line; ! #endif ! return line_number; } else return line_number; *************** *** 375,379 **** REDIRECT *list; { ! do_redirections (list, 1, 0, 0); dispose_redirects (list); } --- 398,402 ---- REDIRECT *list; { ! do_redirections (list, RX_ACTIVE); dispose_redirects (list); } *************** *** 385,389 **** REDIRECT *list; { ! do_redirections (list, 1, 0, 0); } #endif --- 408,412 ---- REDIRECT *list; { ! do_redirections (list, RX_ACTIVE); } #endif *************** *** 442,446 **** } else if (fd < 0) ! internal_error ("cannot redirect standard input from /dev/null: %s", strerror (errno)); } --- 465,469 ---- } else if (fd < 0) ! internal_error (_("cannot redirect standard input from /dev/null: %s"), strerror (errno)); } *************** *** 470,473 **** --- 493,497 ---- REDIRECT *my_undo_list, *exec_undo_list; volatile pid_t last_pid; + volatile int save_line_number; if (command == 0 || breaking || continuing || read_but_dont_execute) *************** *** 476,480 **** --- 500,506 ---- run_pending_traps (); + #if 0 if (running_trap == 0) + #endif currently_executing_command = command; *************** *** 562,566 **** --- 588,594 ---- { exec_result = time_command (command, asynchronous, pipe_in, pipe_out, fds_to_close); + #if 0 if (running_trap == 0) + #endif currently_executing_command = (COMMAND *)NULL; } *************** *** 574,578 **** /* Handle WHILE FOR CASE etc. with redirections. (Also '&' input redirection.) */ ! if (do_redirections (command->redirects, 1, 1, 0) != 0) { cleanup_redirects (redirection_undo_list); --- 602,606 ---- /* Handle WHILE FOR CASE etc. with redirections. (Also '&' input redirection.) */ ! if (do_redirections (command->redirects, RX_ACTIVE|RX_UNDOABLE) != 0) { cleanup_redirects (redirection_undo_list); *************** *** 617,621 **** case cm_simple: { ! /* We can't rely on this variable retaining its value across a call to execute_simple_command if a longjmp occurs as the result of a `return' builtin. This is true for sure with gcc. */ --- 645,650 ---- case cm_simple: { ! save_line_number = line_number; ! /* We can't rely on variables retaining their values across a call to execute_simple_command if a longjmp occurs as the result of a `return' builtin. This is true for sure with gcc. */ *************** *** 627,633 **** --- 656,665 ---- if (command->flags & CMD_STDIN_REDIR) command->value.Simple->flags |= CMD_STDIN_REDIR; + + line_number = command->value.Simple->line; exec_result = execute_simple_command (command->value.Simple, pipe_in, pipe_out, asynchronous, fds_to_close); + line_number = save_line_number; /* The temporary environment should be used for only the simple *************** *** 663,672 **** /* When executing a shell function that executes other commands, this causes the last simple command in ! the function to be waited for twice. */ exec_result = wait_for (last_made_pid); #if defined (RECYCLES_PIDS) /* LynxOS, for one, recycles pids very quickly -- so quickly that a new process may have the same pid as the last one ! created. This has been reported to fix the problem. */ if (exec_result == 0) last_made_pid = NO_PID; --- 695,707 ---- /* When executing a shell function that executes other commands, this causes the last simple command in ! the function to be waited for twice. This also causes ! subshells forked to execute builtin commands (e.g., in ! pipelines) to be waited for twice. */ exec_result = wait_for (last_made_pid); #if defined (RECYCLES_PIDS) /* LynxOS, for one, recycles pids very quickly -- so quickly that a new process may have the same pid as the last one ! created. This has been reported to fix the problem on that ! OS, and a similar problem on Cygwin. */ if (exec_result == 0) last_made_pid = NO_PID; *************** *** 687,691 **** last_command_exit_value = exec_result; run_pending_traps (); ! jump_to_top_level (EXITPROG); } --- 722,726 ---- last_command_exit_value = exec_result; run_pending_traps (); ! jump_to_top_level (ERREXIT); } *************** *** 799,803 **** --- 834,840 ---- if (ignore_return) command->value.Cond->flags |= CMD_IGNORE_RETURN; + save_line_number = line_number; exec_result = execute_cond_command (command->value.Cond); + line_number = save_line_number; break; #endif *************** *** 814,818 **** if (my_undo_list) { ! do_redirections (my_undo_list, 1, 0, 0); dispose_redirects (my_undo_list); } --- 851,855 ---- if (my_undo_list) { ! do_redirections (my_undo_list, RX_ACTIVE); dispose_redirects (my_undo_list); } *************** *** 832,836 **** --- 869,875 ---- last_command_exit_value = exec_result; run_pending_traps (); + #if 0 if (running_trap == 0) + #endif currently_executing_command = (COMMAND *)NULL; return (last_command_exit_value); *************** *** 996,1000 **** else { ! internal_error ("bad format character in time format: %c", *s); free (str); return; --- 1035,1039 ---- else { ! internal_error (_("TIMEFORMAT: `%c': invalid format character"), *s); free (str); return; *************** *** 1028,1032 **** struct timeval real, user, sys; struct timeval before, after; ! struct timezone dtz; struct rusage selfb, selfa, kidsb, kidsa; /* a = after, b = before */ #else --- 1067,1073 ---- struct timeval real, user, sys; struct timeval before, after; ! # if defined (HAVE_STRUCT_TIMEZONE) ! struct timezone dtz; /* posix doesn't define this */ ! # endif struct rusage selfb, selfa, kidsb, kidsa; /* a = after, b = before */ #else *************** *** 1038,1042 **** --- 1079,1087 ---- #if defined (HAVE_GETRUSAGE) && defined (HAVE_GETTIMEOFDAY) + # if defined (HAVE_STRUCT_TIMEZONE) gettimeofday (&before, &dtz); + # else + gettimeofday (&before, (void *)NULL); + # endif /* !HAVE_STRUCT_TIMEZONE */ getrusage (RUSAGE_SELF, &selfb); getrusage (RUSAGE_CHILDREN, &kidsb); *************** *** 1058,1062 **** --- 1103,1111 ---- #if defined (HAVE_GETRUSAGE) && defined (HAVE_GETTIMEOFDAY) + # if defined (HAVE_STRUCT_TIMEZONE) gettimeofday (&after, &dtz); + # else + gettimeofday (&after, (void *)NULL); + # endif /* !HAVE_STRUCT_TIMEZONE */ getrusage (RUSAGE_SELF, &selfa); getrusage (RUSAGE_CHILDREN, &kidsa); *************** *** 1126,1129 **** --- 1175,1179 ---- USE_VAR(asynchronous); + subshell_level++; should_redir_stdin = (asynchronous && (command->flags & CMD_STDIN_REDIR) && pipe_in == NO_PIPE && *************** *** 1216,1220 **** if (command->redirects) { ! if (do_redirections (command->redirects, 1, 0, 0) != 0) exit (invert ? EXECUTION_SUCCESS : EXECUTION_FAILURE); --- 1266,1270 ---- if (command->redirects) { ! if (do_redirections (command->redirects, RX_ACTIVE) != 0) exit (invert ? EXECUTION_SUCCESS : EXECUTION_FAILURE); *************** *** 1271,1274 **** --- 1321,1325 ---- } + subshell_level--; return (return_code); /* NOTREACHED */ *************** *** 1523,1531 **** SHELL_VAR *v; char *identifier; ! int retval; #if 0 SHELL_VAR *old_value = (SHELL_VAR *)NULL; /* Remember the old value of x. */ #endif if (check_identifier (for_command->name, 1) == 0) { --- 1574,1583 ---- SHELL_VAR *v; char *identifier; ! int retval, save_line_number; #if 0 SHELL_VAR *old_value = (SHELL_VAR *)NULL; /* Remember the old value of x. */ #endif + save_line_number = line_number; if (check_identifier (for_command->name, 1) == 0) { *************** *** 1533,1537 **** { last_command_exit_value = EX_USAGE; ! jump_to_top_level (EXITPROG); } return (EXECUTION_FAILURE); --- 1585,1589 ---- { last_command_exit_value = EX_USAGE; ! jump_to_top_level (ERREXIT); } return (EXECUTION_FAILURE); *************** *** 1561,1568 **** --- 1613,1646 ---- { QUIT; + + line_number = for_command->line; + + /* Remember what this command looks like, for debugger. */ + command_string_index = 0; + print_for_command_head (for_command); + + if (echo_command_at_execute) + xtrace_print_for_command_head (for_command); + + /* Save this command unless it's a trap command. */ + if (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0)) + { + FREE (the_printed_command_except_trap); + the_printed_command_except_trap = savestring (the_printed_command); + } + + retval = run_debug_trap (); + #if defined (DEBUGGER) + /* In debugging mode, if the DEBUG trap returns a non-zero status, we + skip the command. */ + if (debugging_mode && retval != EXECUTION_SUCCESS) + continue; + #endif + this_command_name = (char *)NULL; v = bind_variable (identifier, list->word->word); if (readonly_p (v) || noassign_p (v)) { + line_number = save_line_number; if (readonly_p (v) && interactive_shell == 0 && posixly_correct) { *************** *** 1572,1576 **** else { ! run_unwind_frame ("for"); loop_level--; return (EXECUTION_FAILURE); --- 1650,1655 ---- else { ! dispose_words (releaser); ! discard_unwind_frame ("for"); loop_level--; return (EXECUTION_FAILURE); *************** *** 1596,1599 **** --- 1675,1679 ---- loop_level--; + line_number = save_line_number; #if 0 *************** *** 1641,1644 **** --- 1721,1725 ---- WORD_LIST *new; intmax_t expresult; + int r; new = expand_words_no_vars (l); *************** *** 1648,1654 **** xtrace_print_arith_cmd (new); this_command_name = "(("; /* )) for expression error messages */ ! if (signal_is_trapped (DEBUG_TRAP) && signal_is_ignored (DEBUG_TRAP) == 0) ! run_debug_trap (); expresult = evalexp (new->word->word, okp); dispose_words (new); } --- 1729,1753 ---- xtrace_print_arith_cmd (new); this_command_name = "(("; /* )) for expression error messages */ ! ! command_string_index = 0; ! print_arith_command (new); ! FREE (the_printed_command_except_trap); ! the_printed_command_except_trap = savestring (the_printed_command); ! ! r = run_debug_trap (); ! /* In debugging mode, if the DEBUG trap returns a non-zero status, we ! skip the command. */ ! #if defined (DEBUGGER) ! if (debugging_mode == 0 || r == EXECUTION_SUCCESS) ! expresult = evalexp (new->word->word, okp); ! else ! { ! expresult = 0; ! if (okp) ! *okp = 1; ! } ! #else expresult = evalexp (new->word->word, okp); + #endif dispose_words (new); } *************** *** 1671,1674 **** --- 1770,1774 ---- body_status = EXECUTION_SUCCESS; loop_level++; + save_lineno = line_number; if (arith_for_command->flags & CMD_IGNORE_RETURN) *************** *** 1680,1696 **** line_number before executing each expression -- for $LINENO and the DEBUG trap. */ ! arith_lineno = arith_for_command->line; if (variable_context && interactive_shell) ! line_number = arith_lineno -= function_line_number; /* Evaluate the initialization expression. */ expresult = eval_arith_for_expr (arith_for_command->init, &expok); if (expok == 0) ! return (EXECUTION_FAILURE); while (1) { /* Evaluate the test expression. */ - save_lineno = line_number; line_number = arith_lineno; expresult = eval_arith_for_expr (arith_for_command->test, &expok); --- 1780,1798 ---- line_number before executing each expression -- for $LINENO and the DEBUG trap. */ ! line_number = arith_lineno = arith_for_command->line; if (variable_context && interactive_shell) ! line_number -= function_line_number; /* Evaluate the initialization expression. */ expresult = eval_arith_for_expr (arith_for_command->init, &expok); if (expok == 0) ! { ! line_number = save_lineno; ! return (EXECUTION_FAILURE); ! } while (1) { /* Evaluate the test expression. */ line_number = arith_lineno; expresult = eval_arith_for_expr (arith_for_command->test, &expok); *************** *** 1726,1730 **** /* Evaluate the step expression. */ - save_lineno = line_number; line_number = arith_lineno; expresult = eval_arith_for_expr (arith_for_command->step, &expok); --- 1828,1831 ---- *************** *** 1739,1742 **** --- 1840,1845 ---- loop_level--; + line_number = save_lineno; + return (body_status); } *************** *** 1923,1931 **** SHELL_VAR *v; char *identifier, *ps3_prompt, *selection; ! int retval, list_len, show_menu; if (check_identifier (select_command->name, 1) == 0) return (EXECUTION_FAILURE); loop_level++; identifier = select_command->name->word; --- 2026,2054 ---- SHELL_VAR *v; char *identifier, *ps3_prompt, *selection; ! int retval, list_len, show_menu, save_line_number; if (check_identifier (select_command->name, 1) == 0) return (EXECUTION_FAILURE); + save_line_number = line_number; + line_number = select_command->line; + + command_string_index = 0; + print_select_command_head (select_command); + + if (echo_command_at_execute) + xtrace_print_select_command_head (select_command); + + FREE (the_printed_command_except_trap); + the_printed_command_except_trap = savestring (the_printed_command); + + retval = run_debug_trap (); + #if defined (DEBUGGER) + /* In debugging mode, if the DEBUG trap returns a non-zero status, we + skip the command. */ + if (debugging_mode && retval != EXECUTION_SUCCESS) + return (EXECUTION_SUCCESS); + #endif + loop_level++; identifier = select_command->name->word; *************** *** 1939,1942 **** --- 2062,2066 ---- if (list) dispose_words (list); + line_number = save_line_number; return (EXECUTION_SUCCESS); } *************** *** 1953,1956 **** --- 2077,2081 ---- while (1) { + line_number = select_command->line; ps3_prompt = get_string_value ("PS3"); if (ps3_prompt == 0) *************** *** 1978,1982 **** else { ! run_unwind_frame ("select"); return (EXECUTION_FAILURE); } --- 2103,2110 ---- else { ! dispose_words (releaser); ! discard_unwind_frame ("select"); ! loop_level--; ! line_number = save_line_number; return (EXECUTION_FAILURE); } *************** *** 2010,2015 **** loop_level--; ! run_unwind_frame ("select"); return (retval); } --- 2138,2145 ---- loop_level--; + line_number = save_line_number; ! dispose_words (releaser); ! discard_unwind_frame ("select"); return (retval); } *************** *** 2028,2032 **** PATTERN_LIST *clauses; char *word, *pattern; ! int retval, match, ignore_return; /* Posix.2 specifies that the WORD is tilde expanded. */ --- 2158,2188 ---- PATTERN_LIST *clauses; char *word, *pattern; ! int retval, match, ignore_return, save_line_number; ! ! save_line_number = line_number; ! line_number = case_command->line; ! ! command_string_index = 0; ! print_case_command_head (case_command); ! ! if (echo_command_at_execute) ! xtrace_print_case_command_head (case_command); ! ! if (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0)) ! { ! FREE (the_printed_command_except_trap); ! the_printed_command_except_trap = savestring (the_printed_command); ! } ! ! retval = run_debug_trap(); ! #if defined (DEBUGGER) ! /* In debugging mode, if the DEBUG trap returns a non-zero status, we ! skip the command. */ ! if (debugging_mode && retval != EXECUTION_SUCCESS) ! { ! line_number = save_line_number; ! return (EXECUTION_SUCCESS); ! } ! #endif /* Posix.2 specifies that the WORD is tilde expanded. */ *************** *** 2097,2100 **** --- 2253,2257 ---- free (word); discard_unwind_frame ("case"); + line_number = save_line_number; return (retval); } *************** *** 2192,2199 **** IF_COM *if_command; { ! int return_value; if_command->test->flags |= CMD_IGNORE_RETURN; return_value = execute_command (if_command->test); if (return_value == EXECUTION_SUCCESS) --- 2349,2358 ---- IF_COM *if_command; { ! int return_value, save_line_number; + save_line_number = line_number; if_command->test->flags |= CMD_IGNORE_RETURN; return_value = execute_command (if_command->test); + line_number = save_line_number; if (return_value == EXECUTION_SUCCESS) *************** *** 2222,2226 **** ARITH_COM *arith_command; { ! int expok; intmax_t expresult; WORD_LIST *new; --- 2381,2385 ---- ARITH_COM *arith_command; { ! int expok, save_line_number, retval; intmax_t expresult; WORD_LIST *new; *************** *** 2228,2243 **** expresult = 0; this_command_name = "(("; /* )) */ /* If we're in a function, update the line number information. */ if (variable_context && interactive_shell) ! line_number = arith_command->line - function_line_number; /* Run the debug trap before each arithmetic command, but do it after we update the line number information and before we expand the various words in the expression. */ ! if (signal_is_trapped (DEBUG_TRAP) && signal_is_ignored (DEBUG_TRAP) == 0) ! run_debug_trap (); ! new = expand_words (arith_command->exp); /* If we're tracing, make a new word list with `((' at the front and `))' --- 2387,2417 ---- expresult = 0; + save_line_number = line_number; this_command_name = "(("; /* )) */ + line_number = arith_command->line; /* If we're in a function, update the line number information. */ if (variable_context && interactive_shell) ! line_number -= function_line_number; ! ! command_string_index = 0; ! print_arith_command (arith_command->exp); ! FREE (the_printed_command_except_trap); ! the_printed_command_except_trap = savestring (the_printed_command); /* Run the debug trap before each arithmetic command, but do it after we update the line number information and before we expand the various words in the expression. */ ! retval = run_debug_trap (); ! #if defined (DEBUGGER) ! /* In debugging mode, if the DEBUG trap returns a non-zero status, we ! skip the command. */ ! if (debugging_mode && retval != EXECUTION_SUCCESS) ! { ! line_number = save_line_number; ! return (EXECUTION_SUCCESS); ! } ! #endif ! new = expand_words_no_vars (arith_command->exp); /* If we're tracing, make a new word list with `((' at the front and `))' *************** *** 2246,2251 **** xtrace_print_arith_cmd (new); ! expresult = evalexp (new->word->word, &expok); ! dispose_words (new); if (expok == 0) --- 2420,2434 ---- xtrace_print_arith_cmd (new); ! if (new) ! { ! expresult = evalexp (new->word->word, &expok); ! line_number = save_line_number; ! dispose_words (new); ! } ! else ! { ! expresult = 0; ! expok = 1; ! } if (expok == 0) *************** *** 2264,2268 **** COND_COM *cond; { ! int result, invert, patmatch; char *arg1, *arg2; --- 2447,2451 ---- COND_COM *cond; { ! int result, invert, patmatch, rmatch, mflags; char *arg1, *arg2; *************** *** 2299,2302 **** --- 2482,2489 ---- (cond->op->word[0] == '!' || cond->op->word[0] == '=') || (cond->op->word[0] == '=' && cond->op->word[1] == '\0')); + #if defined (COND_REGEXP) + rmatch = (cond->op->word[0] == '=' && cond->op->word[1] == '~' && + cond->op->word[2] == '\0'); + #endif arg1 = cond_expand_word (cond->left->op, 0); *************** *** 2310,2314 **** xtrace_print_cond_term (cond->type, invert, cond->op, arg1, arg2); ! result = binary_test (cond->op->word, arg1, arg2, TEST_PATMATCH|TEST_ARITHEXP) ? EXECUTION_SUCCESS : EXECUTION_FAILURE; --- 2497,2513 ---- xtrace_print_cond_term (cond->type, invert, cond->op, arg1, arg2); ! #if defined (COND_REGEXP) ! if (rmatch) ! { ! mflags = SHMAT_PWARN; ! #if defined (ARRAY_VARS) ! mflags |= SHMAT_SUBEXP; ! #endif ! ! result = sh_regmatch (arg1, arg2, mflags); ! } ! else ! #endif /* COND_REGEXP */ ! result = binary_test (cond->op->word, arg1, arg2, TEST_PATMATCH|TEST_ARITHEXP) ? EXECUTION_SUCCESS : EXECUTION_FAILURE; *************** *** 2335,2357 **** COND_COM *cond_command; { ! int result; ! result = EXECUTION_SUCCESS; this_command_name = "[["; /* If we're in a function, update the line number information. */ if (variable_context && interactive_shell) ! line_number = cond_command->line - function_line_number; /* Run the debug trap before each conditional command, but do it after we update the line number information. */ ! if (signal_is_trapped (DEBUG_TRAP) && signal_is_ignored (DEBUG_TRAP) == 0) ! run_debug_trap (); #if 0 debug_print_cond_command (cond_command); #endif ! last_command_exit_value = result = execute_cond_node (cond_command); ! return (result); } #endif /* COND_COMMAND */ --- 2534,2573 ---- COND_COM *cond_command; { ! int retval, save_line_number; ! retval = EXECUTION_SUCCESS; ! save_line_number = line_number; this_command_name = "[["; + line_number = cond_command->line; /* If we're in a function, update the line number information. */ if (variable_context && interactive_shell) ! line_number -= function_line_number; ! ! command_string_index = 0; ! print_cond_command (cond_command); ! FREE (the_printed_command_except_trap); ! the_printed_command_except_trap = savestring (the_printed_command); /* Run the debug trap before each conditional command, but do it after we update the line number information. */ ! retval = run_debug_trap (); ! #if defined (DEBUGGER) ! /* In debugging mode, if the DEBUG trap returns a non-zero status, we ! skip the command. */ ! if (debugging_mode && retval != EXECUTION_SUCCESS) ! { ! line_number = save_line_number; ! return (EXECUTION_SUCCESS); ! } ! #endif #if 0 debug_print_cond_command (cond_command); #endif ! ! last_command_exit_value = retval = execute_cond_node (cond_command); ! line_number = save_line_number; ! return (retval); } #endif /* COND_COMMAND */ *************** *** 2378,2381 **** --- 2594,2599 ---- pid_t old_last_command_subst_pid; { + int r; + if (pipe_in != NO_PIPE || pipe_out != NO_PIPE || async) { *************** *** 2391,2395 **** subshell_environment = SUBSHELL_ASYNC; ! if (do_redirections (redirects, 1, 0, 0) == 0) exit (EXECUTION_SUCCESS); else --- 2609,2613 ---- subshell_environment = SUBSHELL_ASYNC; ! if (do_redirections (redirects, RX_ACTIVE) == 0) exit (EXECUTION_SUCCESS); else *************** *** 2414,2418 **** substitution. Otherwise, return EXECUTION_SUCCESS. */ ! if (do_redirections (redirects, 0, 0, 0) != 0) return (EXECUTION_FAILURE); else if (old_last_command_subst_pid != last_command_subst_pid) --- 2632,2640 ---- substitution. Otherwise, return EXECUTION_SUCCESS. */ ! r = do_redirections (redirects, RX_ACTIVE|RX_UNDOABLE); ! cleanup_redirects (redirection_undo_list); ! redirection_undo_list = (REDIRECT *)NULL; ! ! if (r != 0) return (EXECUTION_FAILURE); else if (old_last_command_subst_pid != last_command_subst_pid) *************** *** 2472,2481 **** /* If we're in a function, update the line number information. */ if (variable_context && interactive_shell) ! line_number = simple_command->line - function_line_number; ! ! /* Run the debug trap before each simple command, but do it after we ! update the line number information. */ ! if (signal_is_trapped (DEBUG_TRAP) && signal_is_ignored (DEBUG_TRAP) == 0) ! run_debug_trap (); /* Remember what this command line looks like at invocation. */ --- 2694,2698 ---- /* If we're in a function, update the line number information. */ if (variable_context && interactive_shell) ! line_number -= function_line_number; /* Remember what this command line looks like at invocation. */ *************** *** 2483,2486 **** --- 2700,2719 ---- print_simple_command (simple_command); + if (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0)) + { + FREE (the_printed_command_except_trap); + the_printed_command_except_trap = savestring (the_printed_command); + } + + /* Run the debug trap before each simple command, but do it after we + update the line number information. */ + result = run_debug_trap (); + #if defined (DEBUGGER) + /* In debugging mode, if the DEBUG trap returns a non-zero status, we + skip the command. */ + if (debugging_mode && result != EXECUTION_SUCCESS) + return (EXECUTION_SUCCESS); + #endif + first_word_quoted = simple_command->words ? (simple_command->words->word->flags & W_QUOTED): 0; *************** *** 2507,2512 **** --- 2740,2747 ---- if (dofork) { + #if 0 /* XXX memory leak if expand_words() error causes a jump_to_top_level */ command_line = savestring (the_printed_command); + #endif /* Do this now, because execute_disk_command will do it anyway in the *************** *** 2514,2518 **** --- 2749,2757 ---- maybe_make_export_env (); + #if 0 if (make_child (command_line, async) == 0) + #else + if (make_child (savestring (the_printed_command), async) == 0) + #endif { already_forked = 1; *************** *** 2563,2566 **** --- 2802,2806 ---- if (words == 0) { + this_command_name = 0; result = execute_null_command (simple_command->redirects, pipe_in, pipe_out, *************** *** 2582,2586 **** if (echo_command_at_execute) ! xtrace_print_word_list (words); builtin = (sh_builtin_func_t *)NULL; --- 2822,2826 ---- if (echo_command_at_execute) ! xtrace_print_word_list (words, 1); builtin = (sh_builtin_func_t *)NULL; *************** *** 2604,2607 **** --- 2844,2855 ---- } + /* In POSIX mode, assignment errors in the temporary environment cause a + non-interactive shell to exit. */ + if (builtin_is_special && interactive_shell == 0 && tempenv_assign_error) + { + last_command_exit_value = EXECUTION_FAILURE; + jump_to_top_level (ERREXIT); + } + add_unwind_protect (dispose_words, words); QUIT; *************** *** 2691,2698 **** --- 2939,2948 ---- } + subshell_level++; execute_subshell_builtin_or_function (words, simple_command->redirects, builtin, func, pipe_in, pipe_out, async, fds_to_close, simple_command->flags); + subshell_level--; } else *************** *** 2739,2743 **** bind_lastarg (lastarg); FREE (command_line); ! run_unwind_frame ("simple-command"); return (result); } --- 2989,2995 ---- bind_lastarg (lastarg); FREE (command_line); ! dispose_words (words); ! discard_unwind_frame ("simple-command"); ! this_command_name = (char *)NULL; /* points to freed memory now */ return (result); } *************** *** 2851,2859 **** { int return_val, result; ! COMMAND *tc, *fc; ! char *debug_trap, *error_trap; USE_VAR(fc); tc = (COMMAND *)copy_command (function_cell (var)); if (tc && (flags & CMD_IGNORE_RETURN)) --- 3103,3124 ---- { int return_val, result; ! COMMAND *tc, *fc, *save_current; ! char *debug_trap, *error_trap, *return_trap; ! #if defined (ARRAY_VARS) ! SHELL_VAR *funcname_v, *bash_source_v, *bash_lineno_v; ! ARRAY *funcname_a, *bash_source_a, *bash_lineno_a; ! #endif ! FUNCTION_DEF *shell_fn; ! char *sfile, *t; ! static int funcnest = 0; USE_VAR(fc); + #if defined (ARRAY_VARS) + GET_ARRAY_FROM_VAR ("FUNCNAME", funcname_v, funcname_a); + GET_ARRAY_FROM_VAR ("BASH_SOURCE", bash_source_v, bash_source_a); + GET_ARRAY_FROM_VAR ("BASH_LINENO", bash_lineno_v, bash_lineno_a); + #endif + tc = (COMMAND *)copy_command (function_cell (var)); if (tc && (flags & CMD_IGNORE_RETURN)) *************** *** 2882,2891 **** debug_trap = TRAP_STRING(DEBUG_TRAP); error_trap = TRAP_STRING(ERROR_TRAP); ! /* The order of the unwind protects for debug_trap and error_trap is ! important here! unwind-protect commands are run in reverse order ! of registration. If this causes problems, take out the xfree ! unwind-protect calls and live with the small memory leak. */ ! if (debug_trap && (trace_p (var) == 0)) { if (subshell == 0) --- 3147,3160 ---- debug_trap = TRAP_STRING(DEBUG_TRAP); error_trap = TRAP_STRING(ERROR_TRAP); + return_trap = TRAP_STRING(RETURN_TRAP); ! /* The order of the unwind protects for debug_trap, error_trap and ! return_trap is important here! unwind-protect commands are run ! in reverse order of registration. If this causes problems, take ! out the xfree unwind-protect calls and live with the small memory leak. */ ! ! /* function_trace_mode != 0 means that all functions inherit the DEBUG trap. ! if the function has the trace attribute set, it inherits the DEBUG trap */ ! if (debug_trap && ((trace_p (var) == 0) && function_trace_mode == 0)) { if (subshell == 0) *************** *** 2898,2902 **** } ! if (error_trap) { if (subshell == 0) --- 3167,3172 ---- } ! /* error_trace_mode != 0 means that functions inherit the ERR trap. */ ! if (error_trap && error_trace_mode == 0) { if (subshell == 0) *************** *** 2909,2912 **** --- 3179,3206 ---- } + if (return_trap && ((trace_p (var) == 0) && function_trace_mode == 0)) + { + if (subshell == 0) + { + return_trap = savestring (return_trap); + add_unwind_protect (xfree, return_trap); + add_unwind_protect (set_return_trap, return_trap); + } + restore_default_signal (RETURN_TRAP); + } + + funcnest++; + #if defined (ARRAY_VARS) + /* This is quite similar to the code in shell.c and elsewhere. */ + shell_fn = find_function_def (this_shell_function->name); + sfile = shell_fn ? shell_fn->source_file : ""; + array_push (funcname_a, this_shell_function->name); + + array_push (bash_source_a, sfile); + t = itos (executing_line_number ()); + array_push (bash_lineno_a, t); + free (t); + #endif + /* The temporary environment for a function is supposed to apply to all commands executed within the function body. */ *************** *** 2914,2920 **** remember_args (words->next, 1); /* Number of the line on which the function body starts. */ ! if (interactive_shell) ! line_number = function_line_number = tc->line; if (subshell) --- 3208,3217 ---- remember_args (words->next, 1); + /* Update BASH_ARGV and BASH_ARGC */ + if (debugging_mode) + push_args (words->next); + /* Number of the line on which the function body starts. */ ! line_number = function_line_number = tc->line; if (subshell) *************** *** 2937,2945 **** result = return_catch_value; else ! result = execute_command_internal (fc, 0, NO_PIPE, NO_PIPE, fds_to_close); if (subshell == 0) run_unwind_frame ("function_calling"); if (variable_context == 0 || this_shell_function == 0) make_funcname_visible (0); --- 3234,3277 ---- result = return_catch_value; else ! { ! /* Run the debug trap here so we can trap at the start of a function's ! execution rather than the execution of the body's first command. */ ! showing_function_line = 1; ! save_current = currently_executing_command; ! result = run_debug_trap (); ! #if defined (DEBUGGER) ! /* In debugging mode, if the DEBUG trap returns a non-zero status, we ! skip the command. */ ! if (debugging_mode == 0 || result == EXECUTION_SUCCESS) ! { ! showing_function_line = 0; ! currently_executing_command = save_current; ! result = execute_command_internal (fc, 0, NO_PIPE, NO_PIPE, fds_to_close); ! ! /* Run the RETURN trap in the function's context */ ! save_current = currently_executing_command; ! run_return_trap (); ! currently_executing_command = save_current; ! } ! #else ! result = execute_command_internal (fc, 0, NO_PIPE, NO_PIPE, fds_to_close); ! #endif ! showing_function_line = 0; ! } ! ! /* Restore BASH_ARGC and BASH_ARGV */ ! if (debugging_mode) ! pop_args (); if (subshell == 0) run_unwind_frame ("function_calling"); + funcnest--; + #if defined (ARRAY_VARS) + array_pop (bash_source_a); + array_pop (funcname_a); + array_pop (bash_lineno_a); + #endif + if (variable_context == 0 || this_shell_function == 0) make_funcname_visible (0); *************** *** 3024,3028 **** do_piping (pipe_in, pipe_out); ! if (do_redirections (redirects, 1, 0, 0) != 0) exit (EXECUTION_FAILURE); --- 3356,3360 ---- do_piping (pipe_in, pipe_out); ! if (do_redirections (redirects, RX_ACTIVE) != 0) exit (EXECUTION_FAILURE); *************** *** 3071,3075 **** sh_builtin_func_t *saved_this_shell_builtin; ! if (do_redirections (redirects, 1, 1, 0) != 0) { cleanup_redirects (redirection_undo_list); --- 3403,3407 ---- sh_builtin_func_t *saved_this_shell_builtin; ! if (do_redirections (redirects, RX_ACTIVE|RX_UNDOABLE) != 0) { cleanup_redirects (redirection_undo_list); *************** *** 3105,3108 **** --- 3437,3444 ---- result = execute_function (var, words, flags, fds_to_close, 0, 0); + /* We do this before undoing the effects of any redirections. */ + if (ferror (stdout)) + clearerr (stdout); + /* If we are executing the `command' builtin, but this_shell_builtin is set to `exec_builtin', we know that we have something like *************** *** 3168,3172 **** in the parent. This is probably why the Bourne style shells don't handle it, since that would require them to go through ! this gnarly hair, for no good reason. */ static void execute_disk_command (words, redirects, command_line, pipe_in, pipe_out, --- 3504,3510 ---- in the parent. This is probably why the Bourne style shells don't handle it, since that would require them to go through ! this gnarly hair, for no good reason. ! ! NOTE: callers expect this to fork or exit(). */ static void execute_disk_command (words, redirects, command_line, pipe_in, pipe_out, *************** *** 3187,3196 **** #if defined (RESTRICTED_SHELL) if (restricted && xstrchr (pathname, '/')) { ! internal_error ("%s: restricted: cannot specify `/' in command names", pathname); last_command_exit_value = EXECUTION_FAILURE; ! return; } #endif /* RESTRICTED_SHELL */ --- 3525,3541 ---- #if defined (RESTRICTED_SHELL) + command = (char *)NULL; if (restricted && xstrchr (pathname, '/')) { ! internal_error (_("%s: restricted: cannot specify `/' in command names"), pathname); last_command_exit_value = EXECUTION_FAILURE; ! ! /* If we're not going to fork below, we must already be in a child ! process or a context in which it's safe to call exit(2). */ ! if (nofork && pipe_in == NO_PIPE && pipe_out == NO_PIPE) ! exit (last_command_exit_value); ! else ! goto parent_return; } #endif /* RESTRICTED_SHELL */ *************** *** 3256,3260 **** subshell_environment = SUBSHELL_FORK; ! if (redirects && (do_redirections (redirects, 1, 0, 0) != 0)) { #if defined (PROCESS_SUBSTITUTION) --- 3601,3605 ---- subshell_environment = SUBSHELL_FORK; ! if (redirects && (do_redirections (redirects, RX_ACTIVE) != 0)) { #if defined (PROCESS_SUBSTITUTION) *************** *** 3271,3275 **** if (command == 0) { ! internal_error ("%s: command not found", pathname); exit (EX_NOTFOUND); /* Posix.2 says the exit status is 127 */ } --- 3616,3620 ---- if (command == 0) { ! internal_error (_("%s: command not found"), pathname); exit (EX_NOTFOUND); /* Posix.2 says the exit status is 127 */ } *************** *** 3283,3286 **** --- 3628,3632 ---- else { + parent_return: /* Make sure that the pipes are closed in the parent. */ close_pipes (pipe_in, pipe_out); *************** *** 3437,3441 **** reading the current shell script. */ if (interactive_shell == 0) ! unset_bash_input (1); } --- 3783,3787 ---- reading the current shell script. */ if (interactive_shell == 0) ! unset_bash_input (0); } *************** *** 3482,3486 **** { if ((stat (command, &finfo) == 0) && (S_ISDIR (finfo.st_mode))) ! internal_error ("%s: is a directory", command); else if (executable_file (command) == 0) { --- 3828,3832 ---- { if ((stat (command, &finfo) == 0) && (S_ISDIR (finfo.st_mode))) ! internal_error (_("%s: is a directory"), command); else if (executable_file (command) == 0) { *************** *** 3500,3504 **** interp = getinterp (sample, sample_len, (int *)NULL); errno = i; ! sys_error ("%s: %s: bad interpreter", command, interp ? interp : ""); FREE (interp); return (EX_NOEXEC); --- 3846,3850 ---- interp = getinterp (sample, sample_len, (int *)NULL); errno = i; ! sys_error (_("%s: %s: bad interpreter"), command, interp ? interp : ""); FREE (interp); return (EX_NOEXEC); *************** *** 3537,3541 **** if (check_binary_file (sample, sample_len)) { ! internal_error ("%s: cannot execute binary file", command); return (EX_BINARY_FILE); } --- 3883,3887 ---- if (check_binary_file (sample, sample_len)) { ! internal_error (_("%s: cannot execute binary file"), command); return (EX_BINARY_FILE); } *************** *** 3601,3605 **** { last_command_exit_value = EX_USAGE; ! jump_to_top_level (EXITPROG); } return (EXECUTION_FAILURE); --- 3947,3951 ---- { last_command_exit_value = EX_USAGE; ! jump_to_top_level (ERREXIT); } return (EXECUTION_FAILURE); *************** *** 3610,3614 **** { if (readonly_p (var)) ! internal_error ("%s: readonly function", var->name); return (EXECUTION_FAILURE); } --- 3956,3960 ---- { if (readonly_p (var)) ! internal_error (_("%s: readonly function"), var->name); return (EXECUTION_FAILURE); } *************** *** 3645,3648 **** --- 3991,4001 ---- } + static void + dup_error (oldd, newd) + int oldd, newd; + { + sys_error (_("cannot duplicate fd %d to fd %d"), oldd, newd); + } + /* Redirect input and output to be from and to the specified pipes. NO_PIPE and REDIRECT_BOTH are handled correctly. */ *************** *** 3654,3658 **** { if (dup2 (pipe_in, 0) < 0) ! sys_error ("cannot duplicate fd %d to fd 0", pipe_in); if (pipe_in > 0) close (pipe_in); --- 4007,4011 ---- { if (dup2 (pipe_in, 0) < 0) ! dup_error (pipe_in, 0); if (pipe_in > 0) close (pipe_in); *************** *** 3663,3667 **** { if (dup2 (pipe_out, 1) < 0) ! sys_error ("cannot duplicate fd %d to fd 1", pipe_out); if (pipe_out == 0 || pipe_out > 1) close (pipe_out); --- 4016,4020 ---- { if (dup2 (pipe_out, 1) < 0) ! dup_error (pipe_out, 1); if (pipe_out == 0 || pipe_out > 1) close (pipe_out); *************** *** 3670,3674 **** { if (dup2 (1, 2) < 0) ! sys_error ("cannot duplicate fd 1 to fd 2"); } } --- 4023,4027 ---- { if (dup2 (1, 2) < 0) ! dup_error (1, 2); } } diff -aNrc2 bash-2.05b-patched/expr.c bash-3.0/expr.c *** bash-2.05b-patched/expr.c Tue Jun 4 10:50:53 2002 --- bash-3.0/expr.c Wed Mar 17 08:32:33 2004 *************** *** 1,5 **** /* expr.c -- arithmetic expression evaluation. */ ! /* Copyright (C) 1990-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,5 ---- /* expr.c -- arithmetic expression evaluation. */ ! /* Copyright (C) 1990-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 43,46 **** --- 43,47 ---- "expr ? expr : expr" "=", "*=", "/=", "%=", "+=", "-=", "<<=", ">>=", "&=", "^=", "|=" + , [comma] (Note that most of these operators have special meaning to bash, and an *************** *** 79,82 **** --- 80,84 ---- #include "chartypes.h" + #include "bashintl.h" #include "shell.h" *************** *** 156,159 **** --- 158,162 ---- static void popexp __P((void)); static void expr_unwind __P((void)); + static void expr_bind_variable __P((char *, char *)); static intmax_t subexpr __P((char *)); *************** *** 201,204 **** --- 204,211 ---- extern int unbound_vars_is_error; + #if defined (ARRAY_VARS) + extern char *bash_badsub_errmsg; + #endif + #define SAVETOK(X) \ do { \ *************** *** 231,235 **** if (expr_depth >= MAX_EXPR_RECURSION_LEVEL) ! evalerror ("expression recursion level exceeded"); if (expr_depth >= expr_stack_size) --- 238,242 ---- if (expr_depth >= MAX_EXPR_RECURSION_LEVEL) ! evalerror (_("expression recursion level exceeded")); if (expr_depth >= expr_stack_size) *************** *** 255,259 **** if (expr_depth == 0) ! evalerror ("recursion stack underflow"); context = expr_stack[--expr_depth]; --- 262,266 ---- if (expr_depth == 0) ! evalerror (_("recursion stack underflow")); context = expr_stack[--expr_depth]; *************** *** 281,284 **** --- 288,299 ---- } + static void + expr_bind_variable (lhs, rhs) + char *lhs, *rhs; + { + (void)bind_int_variable (lhs, rhs); + stupidly_hack_special_variables (lhs); + } + /* Evaluate EXPR, and return the arithmetic result. If VALIDP is non-null, a zero is stored into the location to which it points *************** *** 300,307 **** { intmax_t val; val = 0; ! if (setjmp (evalbuf)) { FREE (tokstr); --- 315,328 ---- { intmax_t val; + int c; + procenv_t oevalbuf; val = 0; ! FASTCOPY (evalbuf, oevalbuf, sizeof (evalbuf)); ! ! c = setjmp (evalbuf); ! ! if (c) { FREE (tokstr); *************** *** 321,324 **** --- 342,347 ---- *validp = 1; + FASTCOPY (oevalbuf, evalbuf, sizeof (evalbuf)); + return (val); } *************** *** 350,354 **** if (curtok != 0) ! evalerror ("syntax error in expression"); FREE (tokstr); --- 373,377 ---- if (curtok != 0) ! evalerror (_("syntax error in expression")); FREE (tokstr); *************** *** 390,394 **** if (lasttok != STR) ! evalerror ("attempted assignment to non-variable"); if (special) --- 413,417 ---- if (lasttok != STR) ! evalerror (_("attempted assignment to non-variable")); if (special) *************** *** 411,420 **** case DIV: if (value == 0) ! evalerror ("division by 0"); lvalue /= value; break; case MOD: if (value == 0) ! evalerror ("division by 0"); lvalue %= value; break; --- 434,443 ---- case DIV: if (value == 0) ! evalerror (_("division by 0")); lvalue /= value; break; case MOD: if (value == 0) ! evalerror (_("division by 0")); lvalue %= value; break; *************** *** 442,446 **** default: free (lhs); ! evalerror ("bug: bad expassign token"); break; } --- 465,469 ---- default: free (lhs); ! evalerror (_("bug: bad expassign token")); break; } *************** *** 450,454 **** rhs = itos (value); if (noeval == 0) ! (void)bind_int_variable (lhs, rhs); free (rhs); free (lhs); --- 473,477 ---- rhs = itos (value); if (noeval == 0) ! expr_bind_variable (lhs, rhs); free (rhs); free (lhs); *************** *** 472,476 **** readtok (); if (curtok == 0 || curtok == COL) ! evalerror ("expression expected"); if (cval == 0) { --- 495,499 ---- readtok (); if (curtok == 0 || curtok == COL) ! evalerror (_("expression expected")); if (cval == 0) { *************** *** 484,491 **** noeval--; if (curtok != COL) ! evalerror ("`:' expected for conditional expression"); readtok (); if (curtok == 0) ! evalerror ("expression expected"); set_noeval = 0; if (cval) --- 507,514 ---- noeval--; if (curtok != COL) ! evalerror (_("`:' expected for conditional expression")); readtok (); if (curtok == 0) ! evalerror (_("expression expected")); set_noeval = 0; if (cval) *************** *** 726,730 **** if (((op == DIV) || (op == MOD)) && (val2 == 0)) ! evalerror ("division by 0"); if (op == MUL) --- 749,753 ---- if (((op == DIV) || (op == MOD)) && (val2 == 0)) ! evalerror (_("division by 0")); if (op == MUL) *************** *** 744,748 **** val1 = exp1 (); ! if (curtok == POWER) { readtok (); --- 767,771 ---- val1 = exp1 (); ! while (curtok == POWER) { readtok (); *************** *** 751,755 **** return (1); if (val2 < 0) ! evalerror ("exponent less than 0"); for (c = 1; val2--; c *= val1) ; --- 774,778 ---- return (1); if (val2 < 0) ! evalerror (_("exponent less than 0")); for (c = 1; val2--; c *= val1) ; *************** *** 786,789 **** --- 809,813 ---- char *vincdec; int stok; + EXPR_CONTEXT ec; /* XXX - might need additional logic here to decide whether or not *************** *** 795,804 **** if (curtok != STR) /* readtok() catches this */ ! evalerror ("identifier expected after pre-increment or pre-decrement"); v2 = tokval + ((stok == PREINC) ? 1 : -1); vincdec = itos (v2); if (noeval == 0) ! (void)bind_int_variable (tokstr, vincdec); free (vincdec); val = v2; --- 819,828 ---- if (curtok != STR) /* readtok() catches this */ ! evalerror (_("identifier expected after pre-increment or pre-decrement")); v2 = tokval + ((stok == PREINC) ? 1 : -1); vincdec = itos (v2); if (noeval == 0) ! expr_bind_variable (tokstr, vincdec); free (vincdec); val = v2; *************** *** 822,827 **** val = EXP_HIGHEST (); ! if (curtok != RPAR) ! evalerror ("missing `)'"); /* Skip over closing paren. */ --- 846,851 ---- val = EXP_HIGHEST (); ! if (curtok != RPAR) /* ( */ ! evalerror (_("missing `)'")); /* Skip over closing paren. */ *************** *** 831,845 **** { val = tokval; ! if (curtok == STR && (*tp == '+' || *tp == '-') && tp[1] == *tp && ! (tp[2] == '\0' || (ISALNUM ((unsigned char)tp[2]) == 0))) { /* post-increment or post-decrement */ ! v2 = val + ((*tp == '+') ? 1 : -1); ! vincdec = itos (v2); ! if (noeval == 0) ! (void)bind_int_variable (tokstr, vincdec); ! free (vincdec); ! tp += 2; ! curtok = NUM; /* make sure x++=7 is flagged as an error */ } --- 855,888 ---- { val = tokval; ! if (curtok == STR) { + SAVETOK (&ec); + tokstr = (char *)NULL; /* keep it from being freed */ + noeval = 1; + readtok (); + stok = curtok; + /* post-increment or post-decrement */ ! if (stok == POSTINC || stok == POSTDEC) ! { ! /* restore certain portions of EC */ ! tokstr = ec.tokstr; ! noeval = ec.noeval; ! lasttok = STR; /* ec.curtok */ ! ! v2 = val + ((stok == POSTINC) ? 1 : -1); ! vincdec = itos (v2); ! if (noeval == 0) ! expr_bind_variable (tokstr, vincdec); ! free (vincdec); ! curtok = NUM; /* make sure x++=7 is flagged as an error */ ! } ! else ! { ! if (stok == STR) /* free new tokstr before old one is restored */ ! FREE (tokstr); ! RESTORETOK (&ec); ! } ! } *************** *** 847,851 **** } else ! evalerror ("syntax error: operand expected"); return (val); --- 890,894 ---- } else ! evalerror (_("syntax error: operand expected")); return (val); *************** *** 914,918 **** readtok () { ! register char *cp; register unsigned char c, c1; register int e; --- 957,961 ---- readtok () { ! register char *cp, *xp; register unsigned char c, c1; register int e; *************** *** 960,964 **** } else ! evalerror ("bad array subscript"); } #endif /* ARRAY_VARS */ --- 1003,1007 ---- } else ! evalerror (bash_badsub_errmsg); } #endif /* ARRAY_VARS */ *************** *** 973,976 **** --- 1016,1020 ---- tp = savecp = cp; noeval = 1; + curtok = STR; readtok (); peektok = curtok; *************** *** 1042,1049 **** else if ((c == '*') && (c1 == '*')) c = POWER; ! else if ((c == '-') && (c1 == '-') && legal_variable_starter ((unsigned char)*cp)) ! c = PREDEC; ! else if ((c == '+') && (c1 == '+') && legal_variable_starter ((unsigned char)*cp)) ! c = PREINC; else if (c1 == EQ && member (c, "*/%+-&^|")) { --- 1086,1103 ---- else if ((c == '*') && (c1 == '*')) c = POWER; ! else if ((c == '-' || c == '+') && c1 == c && curtok == STR) ! c = (c == '-') ? POSTDEC : POSTINC; ! else if ((c == '-' || c == '+') && c1 == c) ! { ! /* Quickly scan forward to see if this is followed by optional ! whitespace and an identifier. */ ! xp = cp; ! while (xp && *xp && cr_whitespace (*xp)) ! xp++; ! if (legal_variable_starter ((unsigned char)*xp)) ! c = (c == '-') ? PREDEC : PREINC; ! else ! cp--; /* not preinc or predec, so unget the character */ ! } else if (c1 == EQ && member (c, "*/%+-&^|")) { *************** *** 1122,1130 **** { if (foundbase) ! evalerror ("bad number"); /* Illegal base specifications raise an evaluation error. */ if (val < 2 || val > 64) ! evalerror ("illegal arithmetic base"); base = val; --- 1176,1184 ---- { if (foundbase) ! evalerror (_("invalid number")); /* Illegal base specifications raise an evaluation error. */ if (val < 2 || val > 64) ! evalerror (_("invalid arithmetic base")); base = val; *************** *** 1146,1150 **** if (c >= base) ! evalerror ("value too great for base"); val = (val * base) + c; --- 1200,1204 ---- if (c >= base) ! evalerror (_("value too great for base")); val = (val * base) + c; diff -aNrc2 bash-2.05b-patched/externs.h bash-3.0/externs.h *** bash-2.05b-patched/externs.h Wed Mar 27 14:52:29 2002 --- bash-3.0/externs.h Mon Apr 12 23:30:08 2004 *************** *** 32,41 **** /* Functions from print_cmd.c. */ extern char *make_command_string __P((COMMAND *)); extern void print_command __P((COMMAND *)); extern void print_simple_command __P((SIMPLE_COM *)); - extern char *named_function_string __P((char *, COMMAND *, int)); extern void print_word_list __P((WORD_LIST *, char *)); extern char *indirection_level_string __P((void)); ! extern void xtrace_print_word_list __P((WORD_LIST *)); #if defined (DPAREN_ARITHMETIC) extern void xtrace_print_arith_cmd __P((WORD_LIST *)); --- 32,63 ---- /* Functions from print_cmd.c. */ extern char *make_command_string __P((COMMAND *)); + extern char *named_function_string __P((char *, COMMAND *, int)); + extern void print_command __P((COMMAND *)); extern void print_simple_command __P((SIMPLE_COM *)); extern void print_word_list __P((WORD_LIST *, char *)); + + /* debugger support */ + extern void print_for_command_head __P((FOR_COM *)); + #if defined (SELECT_COMMAND) + extern void print_select_command_head __P((SELECT_COM *)); + #endif + extern void print_case_command_head __P((CASE_COM *)); + #if defined (DPAREN_ARITHMETIC) + extern void print_arith_command __P((WORD_LIST *)); + #endif + #if defined (COND_COMMAND) + extern void print_cond_command __P((COND_COM *)); + #endif + + /* set -x support */ extern char *indirection_level_string __P((void)); ! extern void xtrace_print_assignment __P((char *, char *, int, int)); ! extern void xtrace_print_word_list __P((WORD_LIST *, int)); ! extern void xtrace_print_for_command_head __P((FOR_COM *)); ! #if defined (SELECT_COMMAND) ! extern void xtrace_print_select_command_head __P((SELECT_COM *)); ! #endif ! extern void xtrace_print_case_command_head __P((CASE_COM *)); #if defined (DPAREN_ARITHMETIC) extern void xtrace_print_arith_cmd __P((WORD_LIST *)); *************** *** 73,77 **** extern int return_EOF __P((void)); extern void reset_parser __P((void)); ! extern WORD_LIST *parse_string_to_word_list __P((char *, const char *)); extern char *decode_prompt_string __P((char *)); --- 95,101 ---- extern int return_EOF __P((void)); extern void reset_parser __P((void)); ! extern WORD_LIST *parse_string_to_word_list __P((char *, int, const char *)); ! ! extern void free_pushed_string_input __P((void)); extern char *decode_prompt_string __P((char *)); *************** *** 114,117 **** --- 138,145 ---- extern void xbcopy __P((char *, char *, int)); + /* Functions from version.c. */ + extern char *shell_version_string __P((void)); + extern void show_shell_version __P((int)); + /* Functions from the bash library, lib/sh/libsh.a. These should really go into a separate include file. */ *************** *** 197,200 **** --- 225,235 ---- extern int sh_setlinebuf __P((FILE *)); #endif + + /* declarations for functions defined in lib/sh/shmatch.c */ + extern int sh_regmatch __P((const char *, const char *, int)); + + /* defines for flags argument to sh_regmatch. */ + #define SHMAT_SUBEXP 0x001 /* save subexpressions in SH_REMATCH */ + #define SHMAT_PWARN 0x002 /* print a warning message on invalid regexp */ /* declarations for functions defined in lib/sh/shquote.c */ diff -aNrc2 bash-2.05b-patched/findcmd.c bash-3.0/findcmd.c *** bash-2.05b-patched/findcmd.c Tue Mar 19 10:19:05 2002 --- bash-3.0/findcmd.c Fri Sep 12 14:50:45 2003 *************** *** 25,29 **** #include "chartypes.h" #include "bashtypes.h" ! #ifndef _MINIX # include #endif --- 25,29 ---- #include "chartypes.h" #include "bashtypes.h" ! #if !defined (_MINIX) && defined (HAVE_SYS_FILE_H) # include #endif *************** *** 101,108 **** support Unix file system semantics. This may produce wrong answers for non-AFS files when ruid != euid. I hate AFS. */ ! if (access (name, X_OK) == 0) ! return (FS_EXISTS | FS_EXECABLE); ! else ! return (FS_EXISTS); #else /* !AFS */ --- 101,105 ---- support Unix file system semantics. This may produce wrong answers for non-AFS files when ruid != euid. I hate AFS. */ ! return ((access (name, X_OK) == 0) ? (FS_EXISTS|FS_EXECABLE) : FS_EXISTS); #else /* !AFS */ *************** *** 121,142 **** o_mode_bits (finfo.st_mode)); ! if (X_BIT (bits)) ! return (FS_EXISTS | FS_EXECABLE); } /* If we are the owner of the file, the owner execute bit applies. */ ! if (current_user.euid == finfo.st_uid && X_BIT (u_mode_bits (finfo.st_mode))) ! return (FS_EXISTS | FS_EXECABLE); /* If we are in the owning group, the group permissions apply. */ ! if (group_member (finfo.st_gid) && X_BIT (g_mode_bits (finfo.st_mode))) ! return (FS_EXISTS | FS_EXECABLE); ! ! /* If `others' have execute permission to the file, then so do we, ! since we are also `others'. */ ! if (X_BIT (o_mode_bits (finfo.st_mode))) ! return (FS_EXISTS | FS_EXECABLE); ! return (FS_EXISTS); #endif /* !AFS */ } --- 118,135 ---- o_mode_bits (finfo.st_mode)); ! return ((X_BIT (bits)) ? (FS_EXISTS | FS_EXECABLE) : FS_EXISTS); } /* If we are the owner of the file, the owner execute bit applies. */ ! if (current_user.euid == finfo.st_uid) ! return ((X_BIT (u_mode_bits (finfo.st_mode))) ? (FS_EXISTS | FS_EXECABLE) : FS_EXISTS); /* If we are in the owning group, the group permissions apply. */ ! else if (group_member (finfo.st_gid)) ! return ((X_BIT (g_mode_bits (finfo.st_mode))) ? (FS_EXISTS | FS_EXECABLE) : FS_EXISTS); ! /* Else we check whether `others' have permission to execute the file */ ! else ! return ((X_BIT (o_mode_bits (finfo.st_mode))) ? (FS_EXISTS | FS_EXECABLE) : FS_EXISTS); #endif /* !AFS */ } diff -aNrc2 bash-2.05b-patched/flags.c bash-3.0/flags.c *** bash-2.05b-patched/flags.c Mon Apr 8 13:28:47 2002 --- bash-3.0/flags.c Fri Jul 16 21:19:42 2004 *************** *** 41,44 **** --- 41,46 ---- #endif + extern int shell_initialized; + /* -c, -s invocation options -- not really flags, but they show up in $- */ extern int want_pending_command, read_from_stdin; *************** *** 152,155 **** --- 154,168 ---- #endif + /* Non-zero means that shell functions inherit the DEBUG trap. */ + int function_trace_mode = 0; + + /* Non-zero means that shell functions inherit the ERR trap. */ + int error_trace_mode = 0; + + /* Non-zero means that the rightmost non-zero exit status in a pipeline + is the exit status of the entire pipeline. If each processes exits + with a 0 status, the status of the pipeline is 0. */ + int pipefail_opt = 0; + /* **************************************************************** */ /* */ *************** *** 181,185 **** { 'v', &echo_input_at_read }, { 'x', &echo_command_at_execute }, - { 'C', &noclobber }, /* New flags that control non-standard things. */ --- 194,197 ---- *************** *** 187,202 **** { 'l', &lexical_scoping }, #endif - { 'I', &no_invisible_vars }, - - { 'P', &no_symbolic_links }, - #if defined (BRACE_EXPANSION) { 'B', &brace_expansion }, #endif ! #if defined (BANG_HISTORY) { 'H', &history_expansion }, #endif /* BANG_HISTORY */ ! {0, (int *)NULL} }; --- 199,213 ---- { 'l', &lexical_scoping }, #endif #if defined (BRACE_EXPANSION) { 'B', &brace_expansion }, #endif ! { 'C', &noclobber }, ! { 'E', &error_trace_mode }, #if defined (BANG_HISTORY) { 'H', &history_expansion }, #endif /* BANG_HISTORY */ ! { 'I', &no_invisible_vars }, ! { 'P', &no_symbolic_links }, ! { 'T', &function_trace_mode }, {0, (int *)NULL} }; *************** *** 272,276 **** #if defined (RESTRICTED_SHELL) case 'r': ! if (on_or_off == FLAG_ON) maybe_make_restricted (shell_name); break; --- 283,287 ---- #if defined (RESTRICTED_SHELL) case 'r': ! if (on_or_off == FLAG_ON && shell_initialized) maybe_make_restricted (shell_name); break; *************** *** 311,315 **** noclobber = unbound_vars_is_error = echo_input_at_read = 0; echo_command_at_execute = jobs_m_flag = forced_interactive = 0; ! no_symbolic_links = no_invisible_vars = privileged_mode = 0; hashing_enabled = interactive_comments = 1; --- 322,326 ---- noclobber = unbound_vars_is_error = echo_input_at_read = 0; echo_command_at_execute = jobs_m_flag = forced_interactive = 0; ! no_symbolic_links = no_invisible_vars = privileged_mode = pipefail_opt = 0; hashing_enabled = interactive_comments = 1; diff -aNrc2 bash-2.05b-patched/flags.h bash-3.0/flags.h *** bash-2.05b-patched/flags.h Mon Apr 8 13:28:51 2002 --- bash-3.0/flags.h Fri Sep 12 17:27:26 2003 *************** *** 47,51 **** echo_command_at_execute, no_invisible_vars, noclobber, hashing_enabled, forced_interactive, privileged_mode, ! asynchronous_notification, interactive_comments, no_symbolic_links; #if 0 --- 47,52 ---- echo_command_at_execute, no_invisible_vars, noclobber, hashing_enabled, forced_interactive, privileged_mode, ! asynchronous_notification, interactive_comments, no_symbolic_links, ! function_trace_mode, error_trace_mode, pipefail_opt; #if 0 diff -aNrc2 bash-2.05b-patched/general.c bash-3.0/general.c *** bash-2.05b-patched/general.c Wed Jun 12 16:57:55 2002 --- bash-3.0/general.c Wed Apr 14 23:20:13 2004 *************** *** 1,5 **** /* general.c -- Stuff that is used by all files. */ ! /* Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,5 ---- /* general.c -- Stuff that is used by all files. */ ! /* Copyright (C) 1987-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 37,40 **** --- 37,42 ---- #include + #include "bashintl.h" + #include "shell.h" #include *************** *** 56,60 **** /* A standard error message to use when getcwd() returns NULL. */ ! char *bash_getcwd_errstr = "getcwd: cannot access parent directories"; /* Do whatever is necessary to initialize `Posix mode'. */ --- 58,62 ---- /* A standard error message to use when getcwd() returns NULL. */ ! char *bash_getcwd_errstr = N_("getcwd: cannot access parent directories"); /* Do whatever is necessary to initialize `Posix mode'. */ *************** *** 225,234 **** if ((word->flags & (W_HASDOLLAR|W_QUOTED)) || all_digits (word->word)) { ! internal_error ("`%s': not a valid identifier", word->word); return (0); } else if (check_word && legal_identifier (word->word) == 0) { ! internal_error ("`%s': not a valid identifier", word->word); return (0); } --- 227,236 ---- if ((word->flags & (W_HASDOLLAR|W_QUOTED)) || all_digits (word->word)) { ! internal_error (_("`%s': not a valid identifier"), word->word); return (0); } else if (check_word && legal_identifier (word->word) == 0) { ! internal_error (_("`%s': not a valid identifier"), word->word); return (0); } *************** *** 237,245 **** } /* Returns non-zero if STRING is an assignment statement. The returned value is the index of the `=' sign. */ int ! assignment (string) const char *string; { register unsigned char c; --- 239,264 ---- } + /* Return 1 if STRING comprises a valid alias name. The shell accepts + essentially all characters except those which must be quoted to the + parser (which disqualifies them from alias expansion anyway) and `/'. */ + int + legal_alias_name (string, flags) + char *string; + int flags; + { + register char *s; + + for (s = string; *s; s++) + if (shellbreak (*s) || shellxquote (*s) || shellexp (*s) || (*s == '/')) + return 0; + return 1; + } + /* Returns non-zero if STRING is an assignment statement. The returned value is the index of the `=' sign. */ int ! assignment (string, flags) const char *string; + int flags; { register unsigned char c; *************** *** 248,252 **** --- 267,275 ---- c = string[indx = 0]; + #if defined (ARRAY_VARS) + if ((legal_variable_starter (c) == 0) && (flags && c != '[')) /* ] */ + #else if (legal_variable_starter (c) == 0) + #endif return (0); *************** *** 456,459 **** --- 479,505 ---- /* **************************************************************** */ /* */ + /* Functions to inspect pathnames */ + /* */ + /* **************************************************************** */ + + int + file_isdir (fn) + char *fn; + { + struct stat sb; + + return ((stat (fn, &sb) == 0) && S_ISDIR (sb.st_mode)); + } + + int + file_iswdir (fn) + char *fn; + { + return (file_isdir (fn) && test_eaccess (fn, W_OK) == 0); + } + + + /* **************************************************************** */ + /* */ /* Functions to manipulate pathnames */ /* */ *************** *** 471,475 **** --- 517,530 ---- if (dot_path == 0 || ABSPATH(string)) + #ifdef __CYGWIN__ + { + char pathbuf[PATH_MAX + 1]; + + cygwin_conv_to_full_posix_path (string, pathbuf); + result = savestring (pathbuf); + } + #else result = savestring (string); + #endif else result = sh_makepath (dot_path, string, 0); diff -aNrc2 bash-2.05b-patched/general.h bash-3.0/general.h *** bash-2.05b-patched/general.h Wed Jun 12 16:56:40 2002 --- bash-3.0/general.h Wed Apr 14 19:44:58 2004 *************** *** 1,5 **** /* general.h -- defines that everybody likes to use. */ ! /* Copyright (C) 1993-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,5 ---- /* general.h -- defines that everybody likes to use. */ ! /* Copyright (C) 1993-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 278,282 **** extern int legal_identifier __P((char *)); extern int check_identifier __P((WORD_DESC *, int)); ! extern int assignment __P((const char *)); extern int sh_unset_nodelay_mode __P((int)); --- 278,283 ---- extern int legal_identifier __P((char *)); extern int check_identifier __P((WORD_DESC *, int)); ! extern int legal_alias_name __P((char *, int)); ! extern int assignment __P((const char *, int)); extern int sh_unset_nodelay_mode __P((int)); *************** *** 289,292 **** --- 290,296 ---- extern int same_file __P((char *, char *, struct stat *, struct stat *)); #endif + + extern int file_isdir __P((char *)); + extern int file_iswdir __P((char *)); extern char *make_absolute __P((char *, char *)); diff -aNrc2 bash-2.05b-patched/include/gettext.h bash-3.0/include/gettext.h *** bash-2.05b-patched/include/gettext.h Wed Dec 31 19:00:00 1969 --- bash-3.0/include/gettext.h Tue Dec 9 12:42:39 2003 *************** *** 0 **** --- 1,69 ---- + /* Convenience header for conditional use of GNU . + Copyright (C) 1995-1998, 2000-2002 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 _LIBGETTEXT_H + #define _LIBGETTEXT_H 1 + + /* NLS can be disabled through the configure --disable-nls option. */ + #if ENABLE_NLS + + /* Get declarations of GNU message catalog functions. */ + # include + + #else + + /* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which + chokes if dcgettext is defined as a macro. So include it now, to make + later inclusions of a NOP. We don't include + as well because people using "gettext.h" will not include , + and also including would fail on SunOS 4, whereas + is OK. */ + #if defined(__sun) + # include + #endif + + /* Disabled NLS. + The casts to 'const char *' serve the purpose of producing warnings + for invalid uses of the value returned from these functions. + On pre-ANSI systems without 'const', the config.h file is supposed to + contain "#define const". */ + # define gettext(Msgid) ((const char *) (Msgid)) + # define dgettext(Domainname, Msgid) ((const char *) (Msgid)) + # define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid)) + # define ngettext(Msgid1, Msgid2, N) \ + ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) + # define dngettext(Domainname, Msgid1, Msgid2, N) \ + ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) + # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ + ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) + # define textdomain(Domainname) ((const char *) (Domainname)) + # define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname)) + # define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset)) + + #endif + + /* A pseudo function call that serves as a marker for the automated + extraction of messages, but does not call gettext(). The run-time + translation is done at a different place in the code. + The argument, String, should be a literal string. Concatenated strings + and other string expressions won't work. + The macro's expansion is not parenthesized, so that it is suitable as + initializer for static 'char[]' or 'const char[]' variables. */ + #define gettext_noop(String) String + + #endif /* _LIBGETTEXT_H */ diff -aNrc2 bash-2.05b-patched/include/posixdir.h bash-3.0/include/posixdir.h *** bash-2.05b-patched/include/posixdir.h Tue Jan 8 10:47:15 2002 --- bash-3.0/include/posixdir.h Mon Mar 22 16:00:44 2004 *************** *** 26,30 **** #if defined (HAVE_DIRENT_H) # include ! # define D_NAMLEN(d) (strlen ((d)->d_name)) #else # if defined (HAVE_SYS_NDIR_H) --- 26,34 ---- #if defined (HAVE_DIRENT_H) # include ! # if defined (HAVE_STRUCT_DIRENT_D_NAMLEN) ! # define D_NAMLEN(d) ((d)->d_namlen) ! # else ! # define D_NAMLEN(d) (strlen ((d)->d_name)) ! # endif /* !HAVE_STRUCT_DIRENT_D_NAMLEN */ #else # if defined (HAVE_SYS_NDIR_H) *************** *** 43,51 **** #endif /* !HAVE_DIRENT_H */ ! #if defined (STRUCT_DIRENT_HAS_D_INO) && !defined (STRUCT_DIRENT_HAS_D_FILENO) # define d_fileno d_ino #endif ! #if defined (_POSIX_SOURCE) && (!defined (STRUCT_DIRENT_HAS_D_INO) || defined (BROKEN_DIRENT_D_INO)) /* Posix does not require that the d_ino field be present, and some systems do not provide it. */ --- 47,55 ---- #endif /* !HAVE_DIRENT_H */ ! #if defined (HAVE_STRUCT_DIRENT_D_INO) && !defined (HAVE_STRUCT_DIRENT_D_FILENO) # define d_fileno d_ino #endif ! #if defined (_POSIX_SOURCE) && (!defined (HAVE_STRUCT_DIRENT_D_INO) || defined (BROKEN_DIRENT_D_INO)) /* Posix does not require that the d_ino field be present, and some systems do not provide it. */ diff -aNrc2 bash-2.05b-patched/include/shmbutil.h bash-3.0/include/shmbutil.h *** bash-2.05b-patched/include/shmbutil.h Mon May 6 13:58:39 2002 --- bash-3.0/include/shmbutil.h Mon Apr 19 09:59:42 2004 *************** *** 1,5 **** /* shmbutil.h -- utility functions for multibyte characters. */ ! /* Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,5 ---- /* shmbutil.h -- utility functions for multibyte characters. */ ! /* Copyright (C) 2002-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 24,74 **** #include "stdc.h" ! /************************************************/ ! /* check multibyte capability for I18N code */ ! /************************************************/ ! ! /* For platforms which support the ISO C amendement 1 functionality we ! support user defined character classes. */ ! /* Solaris 2.5 has a bug: must be included before . */ ! #if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H) ! # include ! # include ! # if defined (HAVE_MBSRTOWCS) /* system is supposed to support XPG5 */ ! # define HANDLE_MULTIBYTE 1 ! # endif ! #endif /* HAVE_WCTYPE_H && HAVE_WCHAR_H */ ! ! /* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ ! #if HANDLE_MULTIBYTE && !defined (HAVE_MBSTATE_T) ! # define wcsrtombs(dest, src, len, ps) (wcsrtombs) (dest, src, len, 0) ! # define mbsrtowcs(dest, src, len, ps) (mbsrtowcs) (dest, src, len, 0) ! # define wcrtomb(s, wc, ps) (wcrtomb) (s, wc, 0) ! # define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) ! # define mbrlen(s, n, ps) (mbrlen) (s, n, 0) ! # define mbstate_t int ! #endif /* HANDLE_MULTIBYTE && !HAVE_MBSTATE_T */ ! ! /* Make sure MB_LEN_MAX is at least 16 on systems that claim to be able to ! handle multibyte chars (some systems define MB_LEN_MAX as 1) */ ! #ifdef HANDLE_MULTIBYTE ! # include ! # if defined(MB_LEN_MAX) && (MB_LEN_MAX < 16) ! # undef MB_LEN_MAX ! # endif ! # if !defined (MB_LEN_MAX) ! # define MB_LEN_MAX 16 ! # endif ! #endif /* HANDLE_MULTIBYTE */ ! ! /************************************************/ ! /* end of multibyte capability checks for I18N */ ! /************************************************/ #if defined (HANDLE_MULTIBYTE) extern size_t xmbsrtowcs __P((wchar_t *, const char **, size_t, mbstate_t *)); extern char *xstrchr __P((const char *, int)); #else /* !HANDLE_MULTIBYTE */ --- 24,42 ---- #include "stdc.h" ! /* Include config.h for HANDLE_MULTIBYTE */ ! #include #if defined (HANDLE_MULTIBYTE) extern size_t xmbsrtowcs __P((wchar_t *, const char **, size_t, mbstate_t *)); + extern size_t xdupmbstowcs __P((wchar_t **, char ***, const char *)); extern char *xstrchr __P((const char *, int)); + #ifndef MB_INVALIDCH + #define MB_INVALIDCH(x) ((x) == (size_t)-1 || (x) == (size_t)-2) + #define MB_NULLWCH(x) ((x) == 0) + #endif + #else /* !HANDLE_MULTIBYTE */ *************** *** 82,85 **** --- 50,58 ---- #define xstrchr(s, c) strchr(s, c) + #ifndef MB_INVALIDCH + #define MB_INVALIDCH(x) (0) + #define MB_NULLWCH(x) (0) + #endif + #endif /* !HANDLE_MULTIBYTE */ *************** *** 121,124 **** --- 94,99 ---- (_i)++; \ } \ + else if (mblength == 0) \ + (_i)++; \ else \ (_i) += mblength; \ *************** *** 161,164 **** --- 136,222 ---- #endif /* !HANDLE_MULTIBYTE */ + /* Back up one (possibly multi-byte) character in string _STR of length + _STRSIZE, starting at index _I. STATE must have already been declared. */ + #if defined (HANDLE_MULTIBYTE) + # define BACKUP_CHAR(_str, _strsize, _i) \ + do \ + { \ + if (MB_CUR_MAX > 1) \ + { \ + mbstate_t state_bak; \ + size_t mblength; \ + int _x, _p; /* _x == temp index into string, _p == prev index */ \ + \ + _x = _p = 0; \ + while (_x < (_i)) \ + { \ + state_bak = state; \ + mblength = mbrlen ((_str) + (_x), (_strsize) - (_x), &state); \ + \ + if (mblength == (size_t)-2 || mblength == (size_t)-1) \ + { \ + state = state_bak; \ + _x++; \ + } \ + else if (mblength == 0) \ + _x++; \ + else \ + { \ + _p = _x; /* _p == start of prev mbchar */ \ + _x += mblength; \ + } \ + } \ + (_i) = _p; \ + } \ + else \ + (_i)--; \ + } \ + while (0) + #else + # define BACKUP_CHAR(_str, _strsize, _i) (_i)-- + #endif /* !HANDLE_MULTIBYTE */ + + /* Back up one (possibly multibyte) character in the string _BASE of length + _STRSIZE starting at _STR (_BASE <= _STR <= (_BASE + _STRSIZE) ). + SPECIAL: DO NOT assume that _STR will be decremented by 1 after this call. */ + #if defined (HANDLE_MULTIBYTE) + # define BACKUP_CHAR_P(_base, _strsize, _str) \ + do \ + { \ + if (MB_CUR_MAX > 1) \ + { \ + mbstate_t state_bak; \ + size_t mblength; \ + char *_x, _p; /* _x == temp pointer into string, _p == prev pointer */ \ + \ + _x = _p = _base; \ + while (_x < (_str)) \ + { \ + state_bak = state; \ + mblength = mbrlen (_x, (_strsize) - _x, &state); \ + \ + if (mblength == (size_t)-2 || mblength == (size_t)-1) \ + { \ + state = state_bak; \ + _x++; \ + } \ + else if (mblength == 0) \ + _x++; \ + else \ + { \ + _p = _x; /* _p == start of prev mbchar */ \ + _x += mblength; \ + } \ + } \ + (_str) = _p; \ + } \ + else \ + (_str)--; \ + } \ + while (0) + #else + # define BACKUP_CHAR_P(_base, _strsize, _str) (_str)-- + #endif /* !HANDLE_MULTIBYTE */ + /* Copy a single character from the string _SRC to the string _DST. _SRCEND is a pointer to the end of _SRC. */ *************** *** 345,347 **** --- 403,432 ---- #endif + /* Watch out when using this -- it's just straight textual subsitution */ + #if defined (HANDLE_MULTIBYTE) + # define SADD_MBQCHAR_BODY(_dst, _src, _si, _srcsize) \ + \ + int i; \ + mbstate_t state_bak; \ + size_t mblength; \ + \ + state_bak = state; \ + mblength = mbrlen ((_src) + (_si), (_srcsize) - (_si), &state); \ + if (mblength == (size_t)-1 || mblength == (size_t)-2) \ + { \ + state = state_bak; \ + mblength = 1; \ + } \ + if (mblength < 1) \ + mblength = 1; \ + \ + (_dst) = (char *)xmalloc (mblength + 2); \ + (_dst)[0] = CTLESC; \ + for (i = 0; i < mblength; i++) \ + (_dst)[i+1] = (_src)[(_si)++]; \ + (_dst)[mblength+1] = '\0'; \ + \ + goto add_string + + #endif /* HANDLE_MULTIBYTE */ #endif /* _SH_MBUTIL_H_ */ diff -aNrc2 bash-2.05b-patched/include/stdc.h bash-3.0/include/stdc.h *** bash-2.05b-patched/include/stdc.h Thu Mar 7 17:06:41 2002 --- bash-3.0/include/stdc.h Fri May 30 15:07:44 2003 *************** *** 67,71 **** #ifndef __attribute__ ! # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ # define __attribute__(x) # endif --- 67,71 ---- #ifndef __attribute__ ! # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) # define __attribute__(x) # endif diff -aNrc2 bash-2.05b-patched/input.c bash-3.0/input.c *** bash-2.05b-patched/input.c Mon Sep 10 13:26:48 2001 --- bash-3.0/input.c Fri Dec 19 00:09:03 2003 *************** *** 22,26 **** #include "bashtypes.h" ! #ifndef _MINIX # include #endif --- 22,26 ---- #include "bashtypes.h" ! #if !defined (_MINIX) && defined (HAVE_SYS_FILE_H) # include #endif *************** *** 35,38 **** --- 35,40 ---- #include "bashansi.h" + #include "bashintl.h" + #include "command.h" #include "general.h" *************** *** 227,231 **** { if (fcntl (fd, F_GETFD, 0) == 0) ! sys_error ("cannot allocate new file descriptor for bash input from fd %d", fd); return -1; } --- 229,233 ---- { if (fcntl (fd, F_GETFD, 0) == 0) ! sys_error (_("cannot allocate new file descriptor for bash input from fd %d"), fd); return -1; } *************** *** 235,239 **** /* What's this? A stray buffer without an associated open file descriptor? Free up the buffer and report the error. */ ! internal_error ("check_bash_input: buffer already exists for new fd %d", nfd); free_buffered_stream (buffers[nfd]); } --- 237,241 ---- /* What's this? A stray buffer without an associated open file descriptor? Free up the buffer and report the error. */ ! internal_error (_("save_bash_input: buffer already exists for new fd %d"), nfd); free_buffered_stream (buffers[nfd]); } *************** *** 277,282 **** int fd; { ! if (fd > 0 && fd_is_bash_input (fd)) ! return ((save_bash_input (fd, -1) == -1) ? -1 : 0); return 0; } --- 279,289 ---- int fd; { ! if (fd_is_bash_input (fd)) ! { ! if (fd > 0) ! return ((save_bash_input (fd, -1) == -1) ? -1 : 0); ! else if (fd == 0) ! return ((sync_buffered_stream (fd) == -1) ? -1 : 0); ! } return 0; } diff -aNrc2 bash-2.05b-patched/jobs.c bash-3.0/jobs.c *** bash-2.05b-patched/jobs.c Thu May 9 11:56:20 2002 --- bash-3.0/jobs.c Fri Apr 23 16:28:25 2004 *************** *** 4,8 **** control. */ ! /* Copyright (C) 1989, 1992 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 4,8 ---- control. */ ! /* Copyright (C) 1989-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 40,44 **** #endif /* !_POSIX_VERSION && HAVE_SYS_RESOURCE_H && HAVE_WAIT3 && !RLIMTYPE */ ! #include #include "filecntl.h" #include --- 40,47 ---- #endif /* !_POSIX_VERSION && HAVE_SYS_RESOURCE_H && HAVE_WAIT3 && !RLIMTYPE */ ! #if defined (HAVE_SYS_FILE_H) ! # include ! #endif ! #include "filecntl.h" #include *************** *** 73,76 **** --- 76,80 ---- #include "bashansi.h" + #include "bashintl.h" #include "shell.h" #include "jobs.h" *************** *** 128,131 **** --- 132,137 ---- #if !defined (WCONTINUED) # define WCONTINUED 0 + #endif + #if !defined (WIFCONTINUED) # define WIFCONTINUED(s) (0) #endif *************** *** 143,147 **** extern int subshell_environment, line_number; extern int posixly_correct, shell_level; ! extern int interrupt_immediately, last_command_exit_value; extern int loop_level, breaking; extern int sourcelevel; --- 149,154 ---- extern int subshell_environment, line_number; extern int posixly_correct, shell_level; ! extern int interrupt_immediately; ! extern int last_command_exit_value, last_command_exit_signal; extern int loop_level, breaking; extern int sourcelevel; *************** *** 224,227 **** --- 231,235 ---- static char *current_working_directory __P((void)); static char *job_working_directory __P((void)); + static char *j_strsignal __P((int)); static char *printable_job_status __P((int, PROCESS *, int)); *************** *** 236,240 **** --- 244,250 ---- static int print_job __P((JOB *, int, int, int)); static int process_exit_status __P((WAIT)); + static int process_exit_signal __P((WAIT)); static int job_exit_status __P((int)); + static int job_exit_signal __P((int)); static int set_job_status_and_cleanup __P((int)); *************** *** 467,470 **** --- 477,481 ---- /* Scan from the last slot backward, looking for the next free one. */ + /* XXX - revisit this interactive assumption */ if (interactive) { *************** *** 681,685 **** if (warn_stopped && subshell_environment == 0 && STOPPED (job_index)) ! internal_warning ("deleting stopped job %d with process group %ld", job_index+1, (long)jobs[job_index]->pgrp); temp = jobs[job_index]; --- 692,696 ---- if (warn_stopped && subshell_environment == 0 && STOPPED (job_index)) ! internal_warning (_("deleting stopped job %d with process group %ld"), job_index+1, (long)jobs[job_index]->pgrp); temp = jobs[job_index]; *************** *** 989,993 **** printf ("[%d] %ld\n", job + 1, (long)pid); else ! programming_error ("describe_pid: %ld: no such pid", (long)pid); UNBLOCK_CHILD (oset); --- 1000,1004 ---- printf ("[%d] %ld\n", job + 1, (long)pid); else ! programming_error (_("describe_pid: %ld: no such pid"), (long)pid); UNBLOCK_CHILD (oset); *************** *** 995,998 **** --- 1006,1024 ---- static char * + j_strsignal (s) + int s; + { + char *x; + + x = strsignal (s); + if (x == 0) + { + x = retcode_name_buffer; + sprintf (x, "Signal %d", s); + } + return x; + } + + static char * printable_job_status (j, p, format) int j; *************** *** 1020,1026 **** { if (WIFSTOPPED (p->status)) ! temp = strsignal (WSTOPSIG (p->status)); else if (WIFSIGNALED (p->status)) ! temp = strsignal (WTERMSIG (p->status)); else if (WIFEXITED (p->status)) { --- 1046,1052 ---- { if (WIFSTOPPED (p->status)) ! temp = j_strsignal (WSTOPSIG (p->status)); else if (WIFSIGNALED (p->status)) ! temp = j_strsignal (WTERMSIG (p->status)); else if (WIFEXITED (p->status)) { *************** *** 1334,1353 **** if (setpgid (mypid, pipeline_pgrp) < 0) sys_error ("child setpgid (%ld to %ld)", (long)mypid, (long)pipeline_pgrp); ! #if defined (PGRP_PIPE) ! if (pipeline_pgrp == mypid) ! { ! #endif ! /* By convention (and assumption above), if ! pipeline_pgrp == shell_pgrp, we are making a child for ! command substitution. ! In this case, we don't want to give the terminal to the ! shell's process group (we could be in the middle of a ! pipeline, for example). */ ! if (async_p == 0 && pipeline_pgrp != shell_pgrp) ! give_terminal_to (pipeline_pgrp, 0); #if defined (PGRP_PIPE) ! pipe_read (pgrp_pipe); ! } #endif } --- 1360,1376 ---- if (setpgid (mypid, pipeline_pgrp) < 0) sys_error ("child setpgid (%ld to %ld)", (long)mypid, (long)pipeline_pgrp); ! ! /* By convention (and assumption above), if ! pipeline_pgrp == shell_pgrp, we are making a child for ! command substitution. ! In this case, we don't want to give the terminal to the ! shell's process group (we could be in the middle of a ! pipeline, for example). */ ! if (async_p == 0 && pipeline_pgrp != shell_pgrp) ! give_terminal_to (pipeline_pgrp, 0); #if defined (PGRP_PIPE) ! if (pipeline_pgrp == mypid) ! pipe_read (pgrp_pipe); #endif } *************** *** 1608,1612 **** if (child == 0) { ! internal_error ("wait: pid %ld is not a child of this shell", (long)pid); return (127); } --- 1631,1635 ---- if (child == 0) { ! internal_error (_("wait: pid %ld is not a child of this shell"), (long)pid); return (127); } *************** *** 1726,1729 **** --- 1749,1759 ---- static int + process_exit_signal (status) + WAIT status; + { + return (WIFSIGNALED (status) ? WTERMSIG (status) : 0); + } + + static int process_exit_status (status) WAIT status; *************** *** 1744,1747 **** --- 1774,1787 ---- { register PROCESS *p; + int fail; + + if (pipefail_opt) + { + fail = 0; + for (p = jobs[job]->pipe; p->next != jobs[job]->pipe; p = p->next) + if (p->status != EXECUTION_SUCCESS) fail = p->status; + return fail; + } + for (p = jobs[job]->pipe; p->next != jobs[job]->pipe; p = p->next) ; *************** *** 1759,1762 **** --- 1799,1809 ---- } + static int + job_exit_signal (job) + int job; + { + return (process_exit_signal (raw_job_exit_status (job))); + } + #define FIND_CHILD(pid, child) \ do \ *************** *** 1767,1771 **** give_terminal_to (shell_pgrp, 0); \ UNBLOCK_CHILD (oset); \ ! internal_error ("wait_for: No record of process %ld", (long)pid); \ restore_sigint_handler (); \ return (termination_state = 127); \ --- 1814,1818 ---- give_terminal_to (shell_pgrp, 0); \ UNBLOCK_CHILD (oset); \ ! internal_error (_("wait_for: No record of process %ld"), (long)pid); \ restore_sigint_handler (); \ return (termination_state = 127); \ *************** *** 1886,1894 **** /* The exit state of the command is either the termination state of the child, or the termination state of the job. If a job, the status ! of the last child in the pipeline is the significant one. */ ! if (job != NO_JOB) ! termination_state = job_exit_status (job); ! else ! termination_state = process_exit_status (child->status); if (job == NO_JOB || IS_JOBCONTROL (job)) --- 1933,1942 ---- /* The exit state of the command is either the termination state of the child, or the termination state of the job. If a job, the status ! of the last child in the pipeline is the significant one. If the command ! or job was terminated by a signal, note that value also. */ ! termination_state = (job != NO_JOB) ? job_exit_status (job) ! : process_exit_status (child->status); ! last_command_exit_signal = (job != NO_JOB) ? job_exit_signal (job) ! : process_exit_signal (child->status); if (job == NO_JOB || IS_JOBCONTROL (job)) *************** *** 1950,1954 **** /* If the current job was stopped or killed by a signal, and the user has requested it, get a possibly new window size */ ! if (check_window_size && job == current_job) get_new_window_size (0); } --- 1998,2002 ---- /* If the current job was stopped or killed by a signal, and the user has requested it, get a possibly new window size */ ! if (check_window_size && (job == current_job || IS_FOREGROUND (job))) get_new_window_size (0); } *************** *** 2013,2017 **** BLOCK_CHILD(set, oset); if (JOBSTATE (job) == JSTOPPED) ! internal_warning ("wait_for_job: job %d is stopped", job+1); pid = find_last_pid (job, 0); --- 2061,2065 ---- BLOCK_CHILD(set, oset); if (JOBSTATE (job) == JSTOPPED) ! internal_warning (_("wait_for_job: job %d is stopped"), job+1); pid = find_last_pid (job, 0); *************** *** 2235,2239 **** if (DEADJOB (job)) { ! internal_error ("%s: job has terminated", this_command_name); UNBLOCK_CHILD (oset); return (-1); --- 2283,2287 ---- if (DEADJOB (job)) { ! internal_error (_("%s: job has terminated"), this_command_name); UNBLOCK_CHILD (oset); return (-1); *************** *** 2244,2248 **** if (foreground == 0 && already_running) { ! internal_error ("%s: bg background job?", this_command_name); UNBLOCK_CHILD (oset); return (-1); --- 2292,2296 ---- if (foreground == 0 && already_running) { ! internal_error (_("%s: job %d already in background"), this_command_name, job + 1); UNBLOCK_CHILD (oset); return (-1); *************** *** 2734,2737 **** --- 2782,2786 ---- begin_unwind_frame ("SIGCHLD trap"); unwind_protect_int (last_command_exit_value); + unwind_protect_int (last_command_exit_signal); unwind_protect_var (last_made_pid); unwind_protect_int (interrupt_immediately); *************** *** 2743,2748 **** in reverse order of adding. We don't want maybe_set_sigchld_trap () to reference freed memory. */ ! add_unwind_protect ((Function *)xfree, trap_command); ! add_unwind_protect ((Function *)maybe_set_sigchld_trap, trap_command); subst_assign_varlist = (WORD_LIST *)NULL; --- 2792,2797 ---- in reverse order of adding. We don't want maybe_set_sigchld_trap () to reference freed memory. */ ! add_unwind_protect (xfree, trap_command); ! add_unwind_protect (maybe_set_sigchld_trap, trap_command); subst_assign_varlist = (WORD_LIST *)NULL; *************** *** 2754,2758 **** { interrupt_immediately = 1; ! parse_and_execute (savestring (trap_command), "trap", SEVAL_NOHIST); } --- 2803,2807 ---- { interrupt_immediately = 1; ! parse_and_execute (savestring (trap_command), "trap", SEVAL_NOHIST|SEVAL_RESETLINE); } *************** *** 2801,2804 **** --- 2850,2854 ---- continue; + #if 0 /* If job control is disabled, don't print the status messages. Mark dead jobs as notified so that they get cleaned up. If *************** *** 2806,2809 **** --- 2856,2868 ---- don't print anything. */ if ((job_control == 0 && interactive_shell) || startup_state == 2) + #else + /* If job control is disabled, don't print the status messages. + Mark dead jobs as notified so that they get cleaned up. If + startup_state == 2 and subshell_environment has the + SUBSHELL_COMSUB bit turned on, we were started to run a command + substitution, so don't print anything. */ + if ((job_control == 0 && interactive_shell) || + (startup_state == 2 && (subshell_environment & SUBSHELL_COMSUB))) + #endif { /* POSIX.2 compatibility: if the shell is not interactive, *************** *** 2829,2833 **** signal_is_trapped (termsig) == 0) { ! fprintf (stderr, "%s: line %d: ", get_name_for_error (), line_number); pretty_print_job (job, JLIST_NONINTERACTIVE, stderr); } --- 2888,2893 ---- signal_is_trapped (termsig) == 0) { ! /* Don't print `0' for a line number. */ ! fprintf (stderr, "%s: line %d: ", get_name_for_error (), (line_number == 0) ? 1 : line_number); pretty_print_job (job, JLIST_NONINTERACTIVE, stderr); } *************** *** 2840,2844 **** #endif { ! fprintf (stderr, "%s", strsignal (termsig)); if (WIFCORED (s)) --- 2900,2904 ---- #endif { ! fprintf (stderr, "%s", j_strsignal (termsig)); if (WIFCORED (s)) *************** *** 2976,2980 **** } if (job_control == 0) ! internal_error ("no job control in this shell"); } --- 3036,3040 ---- } if (job_control == 0) ! internal_error (_("no job control in this shell")); } *************** *** 3375,3378 **** --- 3435,3444 ---- old = job_control; job_control = arg; + + /* If we're turning on job control, reset pipeline_pgrp so make_child will + put new child processes into the right pgrp */ + if (job_control != old && job_control) + pipeline_pgrp = 0; + return (old); } diff -aNrc2 bash-2.05b-patched/jobs.h bash-3.0/jobs.h *** bash-2.05b-patched/jobs.h Thu Jan 17 12:35:11 2002 --- bash-3.0/jobs.h Wed Mar 17 08:34:15 2004 *************** *** 1,5 **** /* jobs.h -- structures and stuff used by the jobs.c file. */ ! /* Copyright (C) 1993 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,5 ---- /* jobs.h -- structures and stuff used by the jobs.c file. */ ! /* Copyright (C) 1993-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 96,99 **** --- 96,100 ---- #define NO_JOB -1 /* An impossible job array index. */ #define DUP_JOB -2 /* A possible return value for get_job_spec (). */ + #define BAD_JOBSPEC -3 /* Bad syntax for job spec. */ /* A value which cannot be a process ID. */ diff -aNrc2 bash-2.05b-patched/lib/glob/glob.c bash-3.0/lib/glob/glob.c *** bash-2.05b-patched/lib/glob/glob.c Thu Apr 11 09:22:28 2002 --- bash-3.0/lib/glob/glob.c Wed Mar 17 17:36:25 2004 *************** *** 63,66 **** --- 63,70 ---- #endif /* !NULL */ + #if !defined (FREE) + # define FREE(x) if (x) free (x) + #endif + extern void throw_to_top_level __P((void)); extern int test_eaccess __P((char *, int)); *************** *** 119,123 **** { #if HANDLE_MULTIBYTE - mbstate_t ps; size_t n; wchar_t *wpattern; --- 123,126 ---- *************** *** 128,140 **** /* Convert strings to wide chars, and call the multibyte version. */ ! memset (&ps, '\0', sizeof (ps)); ! n = xmbsrtowcs (NULL, (const char **)&pattern, 0, &ps); if (n == (size_t)-1) /* Oops. Invalid multibyte sequence. Try it as single-byte sequence. */ return (internal_glob_pattern_p (pattern)); ! wpattern = (wchar_t *)xmalloc ((n + 1) * sizeof (wchar_t)); ! (void) xmbsrtowcs (wpattern, (const char **)&pattern, n + 1, &ps); r = internal_glob_wpattern_p (wpattern); free (wpattern); return r; #else --- 131,142 ---- /* Convert strings to wide chars, and call the multibyte version. */ ! n = xdupmbstowcs (&wpattern, NULL, pattern); if (n == (size_t)-1) /* Oops. Invalid multibyte sequence. Try it as single-byte sequence. */ return (internal_glob_pattern_p (pattern)); ! r = internal_glob_wpattern_p (wpattern); free (wpattern); + return r; #else *************** *** 175,205 **** char *pat, *dname; { ! char *pat_bak, *dn_bak; wchar_t *pat_wc, *dn_wc; - mbstate_t pat_ps, dn_ps; size_t pat_n, dn_n, n; ! n = strlen(pat); ! pat_bak = (char *) alloca (n + 1); ! memcpy (pat_bak, pat, n + 1); ! ! n = strlen(dname); ! dn_bak = (char *) alloca (n + 1); ! memcpy (dn_bak, dname, n + 1); ! ! memset(&pat_ps, '\0', sizeof(mbstate_t)); ! memset(&dn_ps, '\0', sizeof(mbstate_t)); ! ! pat_n = xmbsrtowcs (NULL, (const char **)&pat_bak, 0, &pat_ps); ! dn_n = xmbsrtowcs (NULL, (const char **)&dn_bak, 0, &dn_ps); if (pat_n != (size_t)-1 && dn_n !=(size_t)-1) { - pat_wc = (wchar_t *) alloca ((pat_n + 1) * sizeof(wchar_t)); - dn_wc = (wchar_t *) alloca ((dn_n + 1) * sizeof(wchar_t)); - - (void) xmbsrtowcs (pat_wc, (const char **)&pat_bak, pat_n + 1, &pat_ps); - (void) xmbsrtowcs (dn_wc, (const char **)&dn_bak, dn_n + 1, &dn_ps); - /* If a leading dot need not be explicitly matched, and the pattern doesn't start with a `.', don't match `.' or `..' */ --- 177,190 ---- char *pat, *dname; { ! int ret; wchar_t *pat_wc, *dn_wc; size_t pat_n, dn_n, n; ! pat_n = xdupmbstowcs (&pat_wc, NULL, pat); ! dn_n = xdupmbstowcs (&dn_wc, NULL, dname); + ret = 0; if (pat_n != (size_t)-1 && dn_n !=(size_t)-1) { /* If a leading dot need not be explicitly matched, and the pattern doesn't start with a `.', don't match `.' or `..' */ *************** *** 208,212 **** (dn_wc[0] == L'.' && (dn_wc[1] == L'\0' || (dn_wc[1] == L'.' && dn_wc[2] == L'\0')))) ! return 1; /* If a leading dot must be explicity matched, check to see if the --- 193,197 ---- (dn_wc[0] == L'.' && (dn_wc[1] == L'\0' || (dn_wc[1] == L'.' && dn_wc[2] == L'\0')))) ! ret = 1; /* If a leading dot must be explicity matched, check to see if the *************** *** 215,222 **** pat_wc[0] != L'.' && (pat_wc[0] != L'\\' || pat_wc[1] != L'.')) ! return 1; } ! return 0; } #endif /* HANDLE_MULTIBYTE */ --- 200,210 ---- pat_wc[0] != L'.' && (pat_wc[0] != L'\\' || pat_wc[1] != L'.')) ! ret = 1; } ! FREE (pat_wc); ! FREE (dn_wc); ! ! return ret; } #endif /* HANDLE_MULTIBYTE */ *************** *** 236,240 **** pathname[j++] = pathname[i++]; ! if (!pathname[i - 1]) break; } --- 224,228 ---- pathname[j++] = pathname[i++]; ! if (pathname[i - 1] == 0) break; } *************** *** 251,270 **** size_t len, n; wchar_t *wpathname; - char *pathname_bak; int i, j; len = strlen (pathname); - pathname_bak = (char *) alloca (len + 1); - memcpy (pathname_bak, pathname , len + 1); - /* Convert the strings into wide characters. */ ! memset (&ps, '\0', sizeof (ps)); ! n = xmbsrtowcs (NULL, (const char **)&pathname_bak, 0, &ps); if (n == (size_t) -1) /* Something wrong. */ return; ! ! wpathname = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t)); ! (void) xmbsrtowcs (wpathname, (const char **)&pathname_bak, n + 1, &ps); for (i = j = 0; wpathname && wpathname[i]; ) --- 239,252 ---- size_t len, n; wchar_t *wpathname; int i, j; + wchar_t *orig_wpathname; len = strlen (pathname); /* Convert the strings into wide characters. */ ! n = xdupmbstowcs (&wpathname, NULL, pathname); if (n == (size_t) -1) /* Something wrong. */ return; ! orig_wpathname = wpathname; for (i = j = 0; wpathname && wpathname[i]; ) *************** *** 275,279 **** wpathname[j++] = wpathname[i++]; ! if (!wpathname[i - 1]) break; } --- 257,261 ---- wpathname[j++] = wpathname[i++]; ! if (wpathname[i - 1] == L'\0') break; } *************** *** 284,287 **** --- 266,272 ---- n = wcsrtombs(pathname, (const wchar_t **)&wpathname, len, &ps); pathname[len] = '\0'; + + /* Can't just free wpathname here; wcsrtombs changes it in many cases. */ + free (orig_wpathname); } *************** *** 374,377 **** --- 359,365 ---- nextlink = (struct globval *)alloca (sizeof (struct globval)); + if (nextlink == NULL) + return ((char **) NULL); + nextlink->next = (struct globval *)0; nextname = (char *) malloc (1); *************** *** 419,426 **** free (nextname); nextlink = (struct globval *)alloca (sizeof (struct globval)); ! nextlink->next = (struct globval *)0; ! lastlink = nextlink; ! nextlink->name = npat; ! count = 1; } else --- 407,419 ---- free (nextname); nextlink = (struct globval *)alloca (sizeof (struct globval)); ! if (nextlink) ! { ! nextlink->next = (struct globval *)0; ! lastlink = nextlink; ! nextlink->name = npat; ! count = 1; ! } ! else ! lose = 1; } else *************** *** 481,484 **** --- 474,482 ---- continue; + #if 0 + if (dp->d_name == 0 || *dp->d_name == 0) + continue; + #endif + #if HANDLE_MULTIBYTE if (MB_CUR_MAX > 1 && mbskipname (pat, dp->d_name)) *************** *** 491,502 **** if (strmatch (pat, dp->d_name, mflags) != FNM_NOMATCH) { - nextlink = (struct globval *) alloca (sizeof (struct globval)); - nextlink->next = lastlink; nextname = (char *) malloc (D_NAMLEN (dp) + 1); ! if (nextname == NULL) { lose = 1; break; } lastlink = nextlink; nextlink->name = nextname; --- 489,500 ---- if (strmatch (pat, dp->d_name, mflags) != FNM_NOMATCH) { nextname = (char *) malloc (D_NAMLEN (dp) + 1); ! nextlink = (struct globval *) alloca (sizeof (struct globval)); ! if (nextlink == 0 || nextname == 0) { lose = 1; break; } + nextlink->next = lastlink; lastlink = nextlink; nextlink->name = nextname; *************** *** 632,635 **** --- 630,634 ---- char *directory_name, *filename; unsigned int directory_len; + int free_dirname; /* flag */ result = (char **) malloc (sizeof (char *)); *************** *** 640,643 **** --- 639,644 ---- result[0] = NULL; + directory_name = NULL; + /* Find the filename. */ filename = strrchr (pathname, '/'); *************** *** 647,659 **** directory_name = ""; directory_len = 0; } else { directory_len = (filename - pathname) + 1; ! directory_name = (char *) alloca (directory_len + 1); bcopy (pathname, directory_name, directory_len); directory_name[directory_len] = '\0'; ++filename; } --- 648,665 ---- directory_name = ""; directory_len = 0; + free_dirname = 0; } else { directory_len = (filename - pathname) + 1; ! directory_name = (char *) malloc (directory_len + 1); ! ! if (directory_name == 0) /* allocation failed? */ ! return (NULL); bcopy (pathname, directory_name, directory_len); directory_name[directory_len] = '\0'; ++filename; + free_dirname = 1; } *************** *** 670,673 **** --- 676,685 ---- directories = glob_filename (directory_name, flags & ~GX_MARKDIRS); + if (free_dirname) + { + free (directory_name); + directory_name = NULL; + } + if (directories == NULL) goto memory_error; *************** *** 747,750 **** --- 759,764 ---- goto memory_error; bcopy (directory_name, result[0], directory_len + 1); + if (free_dirname) + free (directory_name); result[1] = NULL; return (result); *************** *** 771,777 **** if (temp_results == NULL || temp_results == (char **)&glob_error_return) ! return (temp_results); ! return (glob_dir_to_array (directory_name, temp_results, flags)); } --- 785,798 ---- if (temp_results == NULL || temp_results == (char **)&glob_error_return) ! { ! if (free_dirname) ! free (directory_name); ! return (temp_results); ! } ! result = glob_dir_to_array (directory_name, temp_results, flags); ! if (free_dirname) ! free (directory_name); ! return (result); } *************** *** 786,789 **** --- 807,813 ---- free ((char *) result); } + + if (free_dirname && directory_name) + free (directory_name); QUIT; diff -aNrc2 bash-2.05b-patched/lib/glob/sm_loop.c bash-3.0/lib/glob/sm_loop.c *** bash-2.05b-patched/lib/glob/sm_loop.c Wed Apr 3 09:35:09 2002 --- bash-3.0/lib/glob/sm_loop.c Fri Jan 30 21:19:34 2004 *************** *** 1,3 **** ! /* Copyright (C) 1991-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,3 ---- ! /* Copyright (C) 1991-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 17,21 **** Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ ! static int FCT __P((CHAR *, CHAR *, int)); static int GMATCH __P((CHAR *, CHAR *, CHAR *, CHAR *, int)); static CHAR *PARSE_COLLSYM __P((CHAR *, INT *)); --- 17,22 ---- Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ ! int FCT __P((CHAR *, CHAR *, int)); ! static int GMATCH __P((CHAR *, CHAR *, CHAR *, CHAR *, int)); static CHAR *PARSE_COLLSYM __P((CHAR *, INT *)); *************** *** 24,28 **** static CHAR *PATSCAN __P((CHAR *, CHAR *, INT)); ! static int FCT (pattern, string, flags) CHAR *pattern; --- 25,29 ---- static CHAR *PATSCAN __P((CHAR *, CHAR *, INT)); ! int FCT (pattern, string, flags) CHAR *pattern; *************** *** 135,138 **** --- 136,152 ---- /* A slash does not match a wildcard under FNM_PATHNAME. */ return FNM_NOMATCH; + #ifdef EXTENDED_GLOB + else if ((flags & FNM_EXTMATCH) && c == L('?') && *p == L('(')) /* ) */ + { + CHAR *newn; + for (newn = n; newn < se; ++newn) + { + if (EXTMATCH (c, newn, se, p, pe, flags) == 0) + return (0); + } + /* We didn't match. If we have a `?(...)', that's failure. */ + return FNM_NOMATCH; + } + #endif else if (c == L('?')) { diff -aNrc2 bash-2.05b-patched/lib/glob/smatch.c bash-3.0/lib/glob/smatch.c *** bash-2.05b-patched/lib/glob/smatch.c Wed Apr 3 08:39:52 2002 --- bash-3.0/lib/glob/smatch.c Fri Jan 30 21:32:08 2004 *************** *** 363,369 **** #if HANDLE_MULTIBYTE int ret; - mbstate_t ps; size_t n; - char *pattern_bak; wchar_t *wpattern, *wstring; --- 363,367 ---- *************** *** 371,404 **** return (internal_strmatch (pattern, string, flags)); ! pattern_bak = (char *)xmalloc (strlen (pattern) + 1); ! strcpy (pattern_bak, pattern); ! ! memset (&ps, '\0', sizeof (mbstate_t)); ! n = xmbsrtowcs (NULL, (const char **)&pattern, 0, &ps); if (n == (size_t)-1 || n == (size_t)-2) ! { ! free (pattern_bak); ! return (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags)); ! } ! wpattern = (wchar_t *)xmalloc ((n + 1) * sizeof (wchar_t)); ! (void) xmbsrtowcs (wpattern, (const char **)&pattern, n + 1, &ps); ! ! memset (&ps, '\0', sizeof (mbstate_t)); ! n = xmbsrtowcs (NULL, (const char **)&string, 0, &ps); if (n == (size_t)-1 || n == (size_t)-2) { free (wpattern); ! ret = internal_strmatch (pattern_bak, string, flags); ! free (pattern_bak); ! return ret; } - wstring = (wchar_t *)xmalloc ((n + 1) * sizeof (wchar_t)); - (void) xmbsrtowcs (wstring, (const char **)&string, n + 1, &ps); - ret = internal_wstrmatch (wpattern, wstring, flags); - free (pattern_bak); free (wpattern); free (wstring); --- 369,385 ---- return (internal_strmatch (pattern, string, flags)); ! n = xdupmbstowcs (&wpattern, NULL, pattern); if (n == (size_t)-1 || n == (size_t)-2) ! return (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags)); ! n = xdupmbstowcs (&wstring, NULL, string); if (n == (size_t)-1 || n == (size_t)-2) { free (wpattern); ! return (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags)); } ret = internal_wstrmatch (wpattern, wstring, flags); free (wpattern); free (wstring); diff -aNrc2 bash-2.05b-patched/lib/glob/strmatch.c bash-3.0/lib/glob/strmatch.c *** bash-2.05b-patched/lib/glob/strmatch.c Wed Jan 9 11:04:25 2002 --- bash-3.0/lib/glob/strmatch.c Fri Jan 30 23:22:04 2004 *************** *** 25,35 **** #include "strmatch.h" - /* Structured this way so that if HAVE_LIBC_FNM_EXTMATCH is defined, the - matching portion of the library (smatch.c) is not linked into the shell. */ - - #ifndef HAVE_LIBC_FNM_EXTMATCH extern int xstrmatch __P((char *, char *, int)); ! #else ! # define xstrmatch fnmatch #endif --- 25,31 ---- #include "strmatch.h" extern int xstrmatch __P((char *, char *, int)); ! #if defined (HAVE_MULTIBYTE) ! extern int internal_wstrmatch __P((wchar_t *, wchar_t *, int)); #endif *************** *** 45,48 **** --- 41,58 ---- return (xstrmatch (pattern, string, flags)); } + + #if defined (HANDLE_MULTIBYTE) + int + wcsmatch (wpattern, wstring, flags) + wchar_t *wpattern; + wchar_t *wstring; + int flags; + { + if (wstring == 0 || wpattern == 0) + return (FNM_NOMATCH); + + return (internal_wstrmatch (wpattern, wstring, flags)); + } + #endif #ifdef TEST diff -aNrc2 bash-2.05b-patched/lib/glob/strmatch.h bash-3.0/lib/glob/strmatch.h *** bash-2.05b-patched/lib/glob/strmatch.h Tue Sep 11 15:12:57 2001 --- bash-3.0/lib/glob/strmatch.h Fri Jan 30 21:16:16 2004 *************** *** 1,3 **** ! /* Copyright (C) 1991 Free Software Foundation, Inc. This file is part of the GNU C Library. --- 1,3 ---- ! /* Copyright (C) 1991-2004 Free Software Foundation, Inc. This file is part of the GNU C Library. *************** *** 20,28 **** #define _STRMATCH_H 1 ! #ifdef HAVE_LIBC_FNM_EXTMATCH ! ! #include ! ! #else /* !HAVE_LIBC_FNM_EXTMATCH */ #include "stdc.h" --- 20,24 ---- #define _STRMATCH_H 1 ! #include #include "stdc.h" *************** *** 60,64 **** extern int strmatch __P((char *, char *, int)); ! #endif /* !HAVE_LIBC_FNM_EXTMATCH */ #endif /* _STRMATCH_H */ --- 56,62 ---- extern int strmatch __P((char *, char *, int)); ! #if HANDLE_MULTIBYTE ! extern int wcsmatch __P((wchar_t *, wchar_t *, int)); ! #endif #endif /* _STRMATCH_H */ diff -aNrc2 bash-2.05b-patched/lib/glob/xmbsrtowcs.c bash-3.0/lib/glob/xmbsrtowcs.c *** bash-2.05b-patched/lib/glob/xmbsrtowcs.c Wed Jan 2 10:50:43 2002 --- bash-3.0/lib/glob/xmbsrtowcs.c Fri Jan 30 21:08:39 2004 *************** *** 55,79 **** } ! n = strlen(*src) + 1; if (dest == NULL) { wchar_t *wsbuf; ! char *mbsbuf, *mbsbuf_top; mbstate_t psbuf; wsbuf = (wchar_t *) malloc ((n + 1) * sizeof(wchar_t)); ! mbsbuf_top = mbsbuf = (char *) malloc (n + 1); ! memcpy(mbsbuf, *src, n + 1); psbuf = *ps; ! wclength = mbsrtowcs (wsbuf, (const char **)&mbsbuf, n, &psbuf); free (wsbuf); - free (mbsbuf_top); return wclength; } ! for(wclength = 0; wclength < len; wclength++, dest++) { if(mbsinit(ps)) --- 55,77 ---- } ! n = strlen(*src); if (dest == NULL) { wchar_t *wsbuf; ! const char *mbs; mbstate_t psbuf; wsbuf = (wchar_t *) malloc ((n + 1) * sizeof(wchar_t)); ! mbs = *src; psbuf = *ps; ! wclength = mbsrtowcs (wsbuf, &mbs, n, &psbuf); free (wsbuf); return wclength; } ! for (wclength = 0; wclength < len; wclength++, dest++) { if(mbsinit(ps)) *************** *** 114,116 **** --- 112,245 ---- return (wclength); } + + /* Convert a multibyte string to a wide character string. Memory for the + new wide character string is obtained with malloc. + + The return value is the length of the wide character string. Returns a + pointer to the wide character string in DESTP. If INDICESP is not NULL, + INDICESP stores the pointer to the pointer array. Each pointer is to + the first byte of each multibyte character. Memory for the pointer array + is obtained with malloc, too. + If conversion is failed, the return value is (size_t)-1 and the values + of DESTP and INDICESP are NULL. */ + + #define WSBUF_INC 32 + + size_t + xdupmbstowcs (destp, indicesp, src) + wchar_t **destp; /* Store the pointer to the wide character string */ + char ***indicesp; /* Store the pointer to the pointer array. */ + const char *src; /* Multibyte character string */ + { + const char *p; /* Conversion start position of src */ + wchar_t wc; /* Created wide character by conversion */ + wchar_t *wsbuf; /* Buffer for wide characters. */ + char **indices; /* Buffer for indices. */ + size_t wsbuf_size; /* Size of WSBUF */ + size_t wcnum; /* Number of wide characters in WSBUF */ + mbstate_t state; /* Conversion State */ + + /* In case SRC or DESP is NULL, conversion doesn't take place. */ + if (src == NULL || destp == NULL) + { + *destp = NULL; + return (size_t)-1; + } + + memset (&state, '\0', sizeof(mbstate_t)); + wsbuf_size = WSBUF_INC; + + wsbuf = (wchar_t *) malloc (wsbuf_size * sizeof(wchar_t)); + if (wsbuf == NULL) + { + *destp = NULL; + return (size_t)-1; + } + + indices = (char **) malloc (wsbuf_size * sizeof(char *)); + if (indices == NULL) + { + free (wsbuf); + *destp = NULL; + return (size_t)-1; + } + + p = src; + wcnum = 0; + do { + size_t mblength; /* Byte length of one multibyte character. */ + + if(mbsinit (&state)) + { + if (*p == '\0') + { + wc = L'\0'; + mblength = 1; + } + else if (*p == '\\') + { + wc = L'\\'; + mblength = 1; + } + else + mblength = mbrtowc(&wc, p, MB_LEN_MAX, &state); + } + else + mblength = mbrtowc(&wc, p, MB_LEN_MAX, &state); + + /* Conversion failed. */ + if (MB_INVALIDCH (mblength)) + { + free (wsbuf); + free (indices); + *destp = NULL; + return (size_t)-1; + } + + ++wcnum; + + /* Resize buffers when they are not large enough. */ + if (wsbuf_size < wcnum) + { + wchar_t *wstmp; + char **idxtmp; + + wsbuf_size += WSBUF_INC; + + wstmp = (wchar_t *) realloc (wsbuf, wsbuf_size * sizeof (wchar_t)); + if (wstmp == NULL) + { + free (wsbuf); + free (indices); + *destp = NULL; + return (size_t)-1; + } + wsbuf = wstmp; + + idxtmp = (char **) realloc (indices, wsbuf_size * sizeof (char **)); + if (idxtmp == NULL) + { + free (wsbuf); + free (indices); + *destp = NULL; + return (size_t)-1; + } + indices = idxtmp; + } + + wsbuf[wcnum - 1] = wc; + indices[wcnum - 1] = (char *)p; + p += mblength; + } while (MB_NULLWCH (wc) == 0); + + /* Return the length of the wide character string, not including `\0'. */ + *destp = wsbuf; + if (indicesp != NULL) + *indicesp = indices; + else + free (indices); + + return (wcnum - 1); + } + #endif /* HANDLE_MULTIBYTE */ diff -aNrc2 bash-2.05b-patched/lib/intl/ChangeLog bash-3.0/lib/intl/ChangeLog *** bash-2.05b-patched/lib/intl/ChangeLog Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/ChangeLog Tue Dec 9 12:39:10 2003 *************** *** 0 **** --- 1,4 ---- + 2003-05-22 GNU + + * Version 0.12.1 released. + diff -aNrc2 bash-2.05b-patched/lib/intl/Makefile.in bash-3.0/lib/intl/Makefile.in *** bash-2.05b-patched/lib/intl/Makefile.in Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/Makefile.in Tue Dec 9 16:01:24 2003 *************** *** 0 **** --- 1,463 ---- + # Makefile for directory with message catalog handling library of GNU gettext + # 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 + # 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. + + PACKAGE = @PACKAGE_NAME@ + VERSION = @PACKAGE_VERSION@ + + SHELL = /bin/sh + + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ + top_builddir = @BUILD_DIR@ + VPATH = $(srcdir) + + prefix = @prefix@ + exec_prefix = @exec_prefix@ + transform = @program_transform_name@ + libdir = @libdir@ + includedir = @includedir@ + datadir = @datadir@ + localedir = $(datadir)/locale + gettextsrcdir = $(datadir)/gettext/intl + aliaspath = $(localedir) + subdir = intl + + INSTALL = @INSTALL@ + INSTALL_DATA = @INSTALL_DATA@ + MKINSTALLDIRS = @MKINSTALLDIRS@ + mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) + + l = @INTL_LIBTOOL_SUFFIX_PREFIX@ + + AR = ar + CC = @CC@ + LIBTOOL = @LIBTOOL@ + RANLIB = @RANLIB@ + YACC = @INTLBISON@ -y -d + YFLAGS = --name-prefix=__gettext + + DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \ + -DLIBDIR=\"$(prefix)/libdata\" -DIN_LIBINTL \ + -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \ + -Dset_relocation_prefix=libintl_set_relocation_prefix \ + -Drelocate=libintl_relocate \ + -DDEPENDS_ON_LIBICONV=1 @DEFS@ + CPPFLAGS = @CPPFLAGS@ + CFLAGS = @CFLAGS@ + LDFLAGS = @LDFLAGS@ + LIBS = @LIBS@ + + COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) + + HEADERS = \ + gmo.h \ + gettextP.h \ + hash-string.h \ + loadinfo.h \ + plural-exp.h \ + eval-plural.h \ + localcharset.h \ + relocatable.h \ + os2compat.h \ + libgnuintl.h.in + SOURCES = \ + bindtextdom.c \ + dcgettext.c \ + dgettext.c \ + gettext.c \ + finddomain.c \ + loadmsgcat.c \ + localealias.c \ + textdomain.c \ + l10nflist.c \ + explodename.c \ + dcigettext.c \ + dcngettext.c \ + dngettext.c \ + ngettext.c \ + plural.y \ + plural-exp.c \ + localcharset.c \ + relocatable.c \ + localename.c \ + log.c \ + osdep.c \ + os2compat.c \ + intl-compat.c + OBJECTS = \ + bindtextdom.$lo \ + dcgettext.$lo \ + dgettext.$lo \ + gettext.$lo \ + finddomain.$lo \ + loadmsgcat.$lo \ + localealias.$lo \ + textdomain.$lo \ + l10nflist.$lo \ + explodename.$lo \ + dcigettext.$lo \ + dcngettext.$lo \ + dngettext.$lo \ + ngettext.$lo \ + plural.$lo \ + plural-exp.$lo \ + localcharset.$lo \ + relocatable.$lo \ + localename.$lo \ + log.$lo \ + osdep.$lo \ + intl-compat.$lo + DISTFILES.common = Makefile.in \ + config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES) + 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 + 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 + + all: all-@USE_INCLUDED_LIBINTL@ + all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed + all-no: all-no-@BUILD_INCLUDED_LIBINTL@ + all-no-yes: libgnuintl.$la + all-no-no: + + libintl.a libgnuintl.a: $(OBJECTS) + rm -f $@ + $(AR) cru $@ $(OBJECTS) + $(RANLIB) $@ + + libintl.la libgnuintl.la: $(OBJECTS) + $(LIBTOOL) --mode=link \ + $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \ + $(OBJECTS) @LTLIBICONV@ $(LIBS) \ + -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \ + -rpath $(libdir) \ + -no-undefined + + # Libtool's library version information for libintl. + # Before making a gettext release, the gettext maintainer must change this + # 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_REVISION=0 + LTV_AGE=3 + + .SUFFIXES: + .SUFFIXES: .c .y .o .lo .sin .sed + + .c.o: + $(COMPILE) $< + + .y.c: + $(YACC) $(YFLAGS) --output $@ $< + rm -f $*.h + + bindtextdom.lo: $(srcdir)/bindtextdom.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/bindtextdom.c + dcgettext.lo: $(srcdir)/dcgettext.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcgettext.c + dgettext.lo: $(srcdir)/dgettext.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dgettext.c + gettext.lo: $(srcdir)/gettext.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/gettext.c + finddomain.lo: $(srcdir)/finddomain.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/finddomain.c + loadmsgcat.lo: $(srcdir)/loadmsgcat.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/loadmsgcat.c + localealias.lo: $(srcdir)/localealias.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localealias.c + textdomain.lo: $(srcdir)/textdomain.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/textdomain.c + l10nflist.lo: $(srcdir)/l10nflist.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/l10nflist.c + explodename.lo: $(srcdir)/explodename.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/explodename.c + dcigettext.lo: $(srcdir)/dcigettext.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcigettext.c + dcngettext.lo: $(srcdir)/dcngettext.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcngettext.c + dngettext.lo: $(srcdir)/dngettext.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dngettext.c + ngettext.lo: $(srcdir)/ngettext.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/ngettext.c + plural.lo: $(srcdir)/plural.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural.c + plural-exp.lo: $(srcdir)/plural-exp.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural-exp.c + localcharset.lo: $(srcdir)/localcharset.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localcharset.c + relocatable.lo: $(srcdir)/relocatable.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/relocatable.c + localename.lo: $(srcdir)/localename.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localename.c + log.lo: $(srcdir)/log.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/log.c + osdep.lo: $(srcdir)/osdep.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/osdep.c + intl-compat.lo: $(srcdir)/intl-compat.c + $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/intl-compat.c + + ref-add.sed: $(srcdir)/ref-add.sin + sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin > t-ref-add.sed + mv t-ref-add.sed ref-add.sed + ref-del.sed: $(srcdir)/ref-del.sin + sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin > t-ref-del.sed + mv t-ref-del.sed ref-del.sed + + INCLUDES = -I. -I$(srcdir) -I${top_builddir} -I${top_srcdir} + + libgnuintl.h: $(srcdir)/libgnuintl.h.in + cp $(srcdir)/libgnuintl.h.in libgnuintl.h + + libintl.h: libgnuintl.h + cp libgnuintl.h libintl.h + + charset.alias: $(srcdir)/config.charset + $(SHELL) $(srcdir)/config.charset '@host@' > t-$@ + mv t-$@ $@ + + check: all + + # We must not install the libintl.h/libintl.a files if we are on a + # system which has the GNU gettext() function in its C library or in a + # separate library. + # If you want to use the one which comes with this version of the + # package, you have to use `configure --with-included-gettext'. + install: install-exec install-data + install-exec: all + if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \ + && test '@USE_INCLUDED_LIBINTL@' = yes; then \ + $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \ + $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \ + $(LIBTOOL) --mode=install \ + $(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 \ + rm -f $(DESTDIR)$(libdir)/libintl.la; \ + fi; \ + fi; \ + else \ + : ; \ + fi + if test "$(PACKAGE)" = "gettext-tools" \ + && test '@USE_INCLUDED_LIBINTL@' = no; then \ + $(mkinstalldirs) $(DESTDIR)$(libdir); \ + $(LIBTOOL) --mode=install \ + $(INSTALL_DATA) libgnuintl.$la $(DESTDIR)$(libdir)/libgnuintl.$la; \ + rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \ + $(INSTALL_DATA) $(DESTDIR)$(libdir)/libgnuintl.so $(DESTDIR)$(libdir)/preloadable_libintl.so; \ + $(LIBTOOL) --mode=uninstall \ + rm -f $(DESTDIR)$(libdir)/libgnuintl.$la; \ + else \ + : ; \ + fi + if test '@USE_INCLUDED_LIBINTL@' = yes; then \ + $(mkinstalldirs) $(DESTDIR)$(localedir); \ + test -f $(DESTDIR)$(localedir)/locale.alias \ + && orig=$(DESTDIR)$(localedir)/locale.alias \ + || orig=$(srcdir)/locale.alias; \ + temp=$(DESTDIR)$(localedir)/t-locale.alias; \ + dest=$(DESTDIR)$(localedir)/locale.alias; \ + sed -f ref-add.sed $$orig > $$temp; \ + $(INSTALL_DATA) $$temp $$dest; \ + rm -f $$temp; \ + else \ + : ; \ + fi + install-data: all + if test "$(PACKAGE)" = "gettext-tools"; then \ + $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ + $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \ + $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \ + dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \ + for file in $$dists; do \ + $(INSTALL_DATA) $(srcdir)/$$file \ + $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \ + dists="$(DISTFILES.generated)"; \ + for file in $$dists; do \ + if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ + $(INSTALL_DATA) $$dir/$$file \ + $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + dists="$(DISTFILES.obsolete)"; \ + for file in $$dists; do \ + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi + + install-strip: install + + installdirs: + if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \ + && test '@USE_INCLUDED_LIBINTL@' = yes; then \ + $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \ + else \ + : ; \ + fi + if test "$(PACKAGE)" = "gettext-tools" \ + && test '@USE_INCLUDED_LIBINTL@' = no; then \ + $(mkinstalldirs) $(DESTDIR)$(libdir); \ + else \ + : ; \ + fi + if test '@USE_INCLUDED_LIBINTL@' = yes; then \ + test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \ + $(mkinstalldirs) $(DESTDIR)$(localedir); \ + else \ + : ; \ + fi + if test "$(PACKAGE)" = "gettext-tools"; then \ + $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ + else \ + : ; \ + fi + + # Define this as empty until I found a useful application. + installcheck: + + uninstall: + if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \ + && test '@USE_INCLUDED_LIBINTL@' = yes; then \ + rm -f $(DESTDIR)$(includedir)/libintl.h; \ + $(LIBTOOL) --mode=uninstall \ + rm -f $(DESTDIR)$(libdir)/libintl.$la; \ + else \ + : ; \ + fi + if test "$(PACKAGE)" = "gettext-tools" \ + && test '@USE_INCLUDED_LIBINTL@' = no; then \ + rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \ + else \ + : ; \ + fi + if test '@USE_INCLUDED_LIBINTL@' = yes; then \ + if test -f $(DESTDIR)$(prefix)/libdata/charset.alias; then \ + temp=$(DESTDIR)$(prefix)/libdata/t-charset.alias; \ + dest=$(DESTDIR)$(prefix)/libdata/charset.alias; \ + sed -f ref-del.sed $$dest > $$temp; \ + if grep '^# Packages using this file: $$' $$temp > /dev/null; then \ + rm -f $$dest; \ + else \ + $(INSTALL_DATA) $$temp $$dest; \ + fi; \ + rm -f $$temp; \ + fi; \ + if test -f $(DESTDIR)$(localedir)/locale.alias; then \ + temp=$(DESTDIR)$(localedir)/t-locale.alias; \ + dest=$(DESTDIR)$(localedir)/locale.alias; \ + sed -f ref-del.sed $$dest > $$temp; \ + if grep '^# Packages using this file: $$' $$temp > /dev/null; then \ + rm -f $$dest; \ + else \ + $(INSTALL_DATA) $$temp $$dest; \ + fi; \ + rm -f $$temp; \ + fi; \ + else \ + : ; \ + fi + if test "$(PACKAGE)" = "gettext-tools"; then \ + for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \ + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi + + info dvi ps pdf html: + + $(OBJECTS): ${top_builddir}/config.h libgnuintl.h + bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: $(srcdir)/gettextP.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h + dcigettext.$lo loadmsgcat.$lo: $(srcdir)/hash-string.h + explodename.$lo l10nflist.$lo: $(srcdir)/loadinfo.h + dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: $(srcdir)/plural-exp.h + dcigettext.$lo: $(srcdir)/eval-plural.h + localcharset.$lo: $(srcdir)/localcharset.h + localealias.$lo localcharset.$lo relocatable.$lo: $(srcdir)/relocatable.h + + tags: TAGS + + TAGS: $(HEADERS) $(SOURCES) + here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES) + + ctags: CTAGS + + CTAGS: $(HEADERS) $(SOURCES) + here=`pwd`; cd $(srcdir) && ctags -o $$here/CTAGS $(HEADERS) $(SOURCES) + + id: ID + + ID: $(HEADERS) $(SOURCES) + here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES) + + + mostlyclean: + rm -f *.a *.la *.o *.obj *.lo core core.* + rm -f libgnuintl.h libintl.h charset.alias ref-add.sed ref-del.sed + rm -f -r .libs _libs + + clean: mostlyclean + + distclean: clean + rm -f Makefile ID TAGS + if test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; then \ + rm -f ChangeLog.inst $(DISTFILES.normal); \ + else \ + : ; \ + fi + + maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + + + # GNU gettext needs not contain the file `VERSION' but contains some + # other files which should not be distributed in other packages. + distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) + dist distdir: Makefile + if test "$(PACKAGE)" = "gettext-tools"; then \ + : ; \ + else \ + if test "$(PACKAGE)" = "gettext-runtime"; then \ + additional="$(DISTFILES.gettext)"; \ + else \ + additional="$(DISTFILES.normal)"; \ + fi; \ + $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \ + for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \ + if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ + cp -p $$dir/$$file $(distdir); \ + done; \ + fi + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status + # This would be more efficient, but doesn't work any more with autoconf-2.57, + # when AC_CONFIG_FILES([intl/Makefile:somedir/Makefile.in]) is used. + # cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + + # Tell versions [3.59,3.63) of GNU make not to export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff -aNrc2 bash-2.05b-patched/lib/intl/VERSION bash-3.0/lib/intl/VERSION *** bash-2.05b-patched/lib/intl/VERSION Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/VERSION Tue Dec 9 12:39:10 2003 *************** *** 0 **** --- 1 ---- + GNU gettext library from gettext-0.12.1 diff -aNrc2 bash-2.05b-patched/lib/intl/bindtextdom.c bash-3.0/lib/intl/bindtextdom.c *** bash-2.05b-patched/lib/intl/bindtextdom.c Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/bindtextdom.c Tue Dec 9 12:39:10 2003 *************** *** 0 **** --- 1,374 ---- + /* Implementation of the bindtextdomain(3) function + Copyright (C) 1995-1998, 2000, 2001, 2002 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 + + #include + #include + #include + + #ifdef _LIBC + # include + #else + # include "libgnuintl.h" + #endif + #include "gettextP.h" + + #ifdef _LIBC + /* We have to handle multi-threaded applications. */ + # include + #else + /* Provide dummy implementation if this is outside glibc. */ + # define __libc_rwlock_define(CLASS, NAME) + # define __libc_rwlock_wrlock(NAME) + # define __libc_rwlock_unlock(NAME) + #endif + + /* The internal variables in the standalone libintl.a must have different + names than the internal variables in GNU libc, otherwise programs + using libintl.a cannot be linked statically. */ + #if !defined _LIBC + # define _nl_default_dirname libintl_nl_default_dirname + # define _nl_domain_bindings libintl_nl_domain_bindings + #endif + + /* Some compilers, like SunOS4 cc, don't have offsetof in . */ + #ifndef offsetof + # define offsetof(type,ident) ((size_t)&(((type*)0)->ident)) + #endif + + /* @@ end of prolog @@ */ + + /* Contains the default location of the message catalogs. */ + extern const char _nl_default_dirname[]; + #ifdef _LIBC + extern const char _nl_default_dirname_internal[] attribute_hidden; + #else + # define INTUSE(name) name + #endif + + /* List with bindings of specific domains. */ + extern struct binding *_nl_domain_bindings; + + /* Lock variable to protect the global data in the gettext implementation. */ + __libc_rwlock_define (extern, _nl_state_lock attribute_hidden) + + + /* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ + #ifdef _LIBC + # define BINDTEXTDOMAIN __bindtextdomain + # define BIND_TEXTDOMAIN_CODESET __bind_textdomain_codeset + # ifndef strdup + # define strdup(str) __strdup (str) + # endif + #else + # define BINDTEXTDOMAIN libintl_bindtextdomain + # 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 + modified, only the current value is returned. + If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither + modified nor returned. */ + static void + set_binding_values (domainname, dirnamep, codesetp) + const char *domainname; + const char **dirnamep; + const char **codesetp; + { + struct binding *binding; + int modified; + + /* Some sanity checks. */ + if (domainname == NULL || domainname[0] == '\0') + { + if (dirnamep) + *dirnamep = NULL; + if (codesetp) + *codesetp = NULL; + return; + } + + __libc_rwlock_wrlock (_nl_state_lock); + + modified = 0; + + for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next) + { + int compare = strcmp (domainname, binding->domainname); + if (compare == 0) + /* We found it! */ + break; + if (compare < 0) + { + /* It is not in the list. */ + binding = NULL; + break; + } + } + + if (binding != NULL) + { + if (dirnamep) + { + const char *dirname = *dirnamep; + + if (dirname == NULL) + /* The current binding has be to returned. */ + *dirnamep = binding->dirname; + else + { + /* The domain is already bound. If the new value and the old + one are equal we simply do nothing. Otherwise replace the + old binding. */ + char *result = binding->dirname; + if (strcmp (dirname, result) != 0) + { + if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0) + result = (char *) INTUSE(_nl_default_dirname); + else + { + #if defined _LIBC || defined HAVE_STRDUP + result = strdup (dirname); + #else + size_t len = strlen (dirname) + 1; + result = (char *) malloc (len); + if (__builtin_expect (result != NULL, 1)) + memcpy (result, dirname, len); + #endif + } + + if (__builtin_expect (result != NULL, 1)) + { + if (binding->dirname != INTUSE(_nl_default_dirname)) + free (binding->dirname); + + binding->dirname = result; + modified = 1; + } + } + *dirnamep = result; + } + } + + if (codesetp) + { + const char *codeset = *codesetp; + + if (codeset == NULL) + /* The current binding has be to returned. */ + *codesetp = binding->codeset; + else + { + /* The domain is already bound. If the new value and the old + one are equal we simply do nothing. Otherwise replace the + old binding. */ + char *result = binding->codeset; + if (result == NULL || strcmp (codeset, result) != 0) + { + #if defined _LIBC || defined HAVE_STRDUP + result = strdup (codeset); + #else + size_t len = strlen (codeset) + 1; + result = (char *) malloc (len); + if (__builtin_expect (result != NULL, 1)) + memcpy (result, codeset, len); + #endif + + if (__builtin_expect (result != NULL, 1)) + { + if (binding->codeset != NULL) + free (binding->codeset); + + binding->codeset = result; + binding->codeset_cntr++; + modified = 1; + } + } + *codesetp = result; + } + } + } + else if ((dirnamep == NULL || *dirnamep == NULL) + && (codesetp == NULL || *codesetp == NULL)) + { + /* Simply return the default values. */ + if (dirnamep) + *dirnamep = INTUSE(_nl_default_dirname); + if (codesetp) + *codesetp = NULL; + } + else + { + /* We have to create a new binding. */ + size_t len = strlen (domainname) + 1; + struct binding *new_binding = + (struct binding *) malloc (offsetof (struct binding, domainname) + len); + + if (__builtin_expect (new_binding == NULL, 0)) + goto failed; + + memcpy (new_binding->domainname, domainname, len); + + if (dirnamep) + { + const char *dirname = *dirnamep; + + if (dirname == NULL) + /* The default value. */ + dirname = INTUSE(_nl_default_dirname); + else + { + if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0) + dirname = INTUSE(_nl_default_dirname); + else + { + char *result; + #if defined _LIBC || defined HAVE_STRDUP + result = strdup (dirname); + if (__builtin_expect (result == NULL, 0)) + goto failed_dirname; + #else + size_t len = strlen (dirname) + 1; + result = (char *) malloc (len); + if (__builtin_expect (result == NULL, 0)) + goto failed_dirname; + memcpy (result, dirname, len); + #endif + dirname = result; + } + } + *dirnamep = dirname; + new_binding->dirname = (char *) dirname; + } + else + /* The default value. */ + new_binding->dirname = (char *) INTUSE(_nl_default_dirname); + + new_binding->codeset_cntr = 0; + + if (codesetp) + { + const char *codeset = *codesetp; + + if (codeset != NULL) + { + char *result; + + #if defined _LIBC || defined HAVE_STRDUP + result = strdup (codeset); + if (__builtin_expect (result == NULL, 0)) + goto failed_codeset; + #else + size_t len = strlen (codeset) + 1; + result = (char *) malloc (len); + if (__builtin_expect (result == NULL, 0)) + goto failed_codeset; + memcpy (result, codeset, len); + #endif + codeset = result; + new_binding->codeset_cntr++; + } + *codesetp = codeset; + new_binding->codeset = (char *) codeset; + } + else + new_binding->codeset = NULL; + + /* Now enqueue it. */ + if (_nl_domain_bindings == NULL + || strcmp (domainname, _nl_domain_bindings->domainname) < 0) + { + new_binding->next = _nl_domain_bindings; + _nl_domain_bindings = new_binding; + } + else + { + binding = _nl_domain_bindings; + while (binding->next != NULL + && strcmp (domainname, binding->next->domainname) > 0) + binding = binding->next; + + new_binding->next = binding->next; + binding->next = new_binding; + } + + modified = 1; + + /* Here we deal with memory allocation failures. */ + if (0) + { + failed_codeset: + if (new_binding->dirname != INTUSE(_nl_default_dirname)) + free (new_binding->dirname); + failed_dirname: + free (new_binding); + failed: + if (dirnamep) + *dirnamep = NULL; + if (codesetp) + *codesetp = NULL; + } + } + + /* If we modified any binding, we flush the caches. */ + if (modified) + ++_nl_msg_cat_cntr; + + __libc_rwlock_unlock (_nl_state_lock); + } + + /* Specify that the DOMAINNAME message catalog will be found + in DIRNAME rather than in the system locale data base. */ + char * + BINDTEXTDOMAIN (domainname, dirname) + const char *domainname; + const char *dirname; + { + set_binding_values (domainname, &dirname, NULL); + return (char *) dirname; + } + + /* Specify the character encoding in which the messages from the + DOMAINNAME message catalog will be returned. */ + char * + BIND_TEXTDOMAIN_CODESET (domainname, codeset) + const char *domainname; + const char *codeset; + { + set_binding_values (domainname, NULL, &codeset); + return (char *) codeset; + } + + #ifdef _LIBC + /* Aliases for function names in GNU C Library. */ + weak_alias (__bindtextdomain, bindtextdomain); + weak_alias (__bind_textdomain_codeset, bind_textdomain_codeset); + #endif diff -aNrc2 bash-2.05b-patched/lib/intl/config.charset bash-3.0/lib/intl/config.charset *** bash-2.05b-patched/lib/intl/config.charset Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/config.charset Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,467 ---- + #! /bin/sh + # Output a system dependent table of character encoding aliases. + # + # 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 + # 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. + # + # The table consists of lines of the form + # ALIAS CANONICAL + # + # ALIAS is the (system dependent) result of "nl_langinfo (CODESET)". + # ALIAS is compared in a case sensitive way. + # + # CANONICAL is the GNU canonical name for this character encoding. + # It must be an encoding supported by libiconv. Support by GNU libc is + # also desirable. CANONICAL is case insensitive. Usually an upper case + # MIME charset name is preferred. + # The current list of GNU canonical charset names is as follows. + # + # name 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 + # + # Note: Names which are not marked as being a MIME name should not be used in + # Internet protocols for information interchange (mail, news, etc.). + # + # Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications + # must understand both names and treat them as equivalent. + # + # The first argument passed to this file is the canonical host specification, + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM + # or + # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM + + host="$1" + os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'` + echo "# This file contains a table of character encoding aliases," + echo "# suitable for operating system '${os}'." + echo "# It was automatically generated from config.charset." + # List of references, updated during installation: + echo "# Packages using this file: " + case "$os" in + linux* | *-gnu*) + # With glibc-2.1 or newer, we don't need any canonicalization, + # because glibc has iconv and both glibc and libiconv support all + # GNU canonical names directly. Therefore, the Makefile does not + # need to install the alias file at all. + # The following applies only to glibc-2.0.x and older libcs. + echo "ISO_646.IRV:1983 ASCII" + ;; + aix*) + echo "ISO8859-1 ISO-8859-1" + echo "ISO8859-2 ISO-8859-2" + echo "ISO8859-5 ISO-8859-5" + echo "ISO8859-6 ISO-8859-6" + echo "ISO8859-7 ISO-8859-7" + echo "ISO8859-8 ISO-8859-8" + echo "ISO8859-9 ISO-8859-9" + echo "ISO8859-15 ISO-8859-15" + echo "IBM-850 CP850" + echo "IBM-856 CP856" + echo "IBM-921 ISO-8859-13" + echo "IBM-922 CP922" + echo "IBM-932 CP932" + echo "IBM-943 CP943" + echo "IBM-1046 CP1046" + echo "IBM-1124 CP1124" + echo "IBM-1129 CP1129" + echo "IBM-1252 CP1252" + echo "IBM-eucCN GB2312" + echo "IBM-eucJP EUC-JP" + echo "IBM-eucKR EUC-KR" + echo "IBM-eucTW EUC-TW" + echo "big5 BIG5" + echo "GBK GBK" + echo "TIS-620 TIS-620" + echo "UTF-8 UTF-8" + ;; + hpux*) + echo "iso88591 ISO-8859-1" + echo "iso88592 ISO-8859-2" + echo "iso88595 ISO-8859-5" + echo "iso88596 ISO-8859-6" + echo "iso88597 ISO-8859-7" + echo "iso88598 ISO-8859-8" + echo "iso88599 ISO-8859-9" + echo "iso885915 ISO-8859-15" + echo "roman8 HP-ROMAN8" + echo "arabic8 HP-ARABIC8" + echo "greek8 HP-GREEK8" + echo "hebrew8 HP-HEBREW8" + echo "turkish8 HP-TURKISH8" + echo "kana8 HP-KANA8" + echo "tis620 TIS-620" + echo "big5 BIG5" + echo "eucJP EUC-JP" + echo "eucKR EUC-KR" + echo "eucTW EUC-TW" + echo "hp15CN GB2312" + #echo "ccdc ?" # what is this? + echo "SJIS SHIFT_JIS" + echo "utf8 UTF-8" + ;; + irix*) + echo "ISO8859-1 ISO-8859-1" + echo "ISO8859-2 ISO-8859-2" + echo "ISO8859-5 ISO-8859-5" + echo "ISO8859-7 ISO-8859-7" + echo "ISO8859-9 ISO-8859-9" + echo "eucCN GB2312" + echo "eucJP EUC-JP" + echo "eucKR EUC-KR" + echo "eucTW EUC-TW" + ;; + osf*) + echo "ISO8859-1 ISO-8859-1" + echo "ISO8859-2 ISO-8859-2" + echo "ISO8859-4 ISO-8859-4" + echo "ISO8859-5 ISO-8859-5" + echo "ISO8859-7 ISO-8859-7" + echo "ISO8859-8 ISO-8859-8" + echo "ISO8859-9 ISO-8859-9" + echo "ISO8859-15 ISO-8859-15" + echo "cp850 CP850" + echo "big5 BIG5" + echo "dechanyu DEC-HANYU" + echo "dechanzi GB2312" + echo "deckanji DEC-KANJI" + echo "deckorean EUC-KR" + echo "eucJP EUC-JP" + echo "eucKR EUC-KR" + echo "eucTW EUC-TW" + echo "GBK GBK" + echo "KSC5601 CP949" + echo "sdeckanji EUC-JP" + echo "SJIS SHIFT_JIS" + echo "TACTIS TIS-620" + echo "UTF-8 UTF-8" + ;; + solaris*) + echo "646 ASCII" + echo "ISO8859-1 ISO-8859-1" + echo "ISO8859-2 ISO-8859-2" + echo "ISO8859-3 ISO-8859-3" + echo "ISO8859-4 ISO-8859-4" + echo "ISO8859-5 ISO-8859-5" + echo "ISO8859-6 ISO-8859-6" + echo "ISO8859-7 ISO-8859-7" + echo "ISO8859-8 ISO-8859-8" + echo "ISO8859-9 ISO-8859-9" + echo "ISO8859-15 ISO-8859-15" + echo "koi8-r KOI8-R" + echo "ansi-1251 CP1251" + echo "BIG5 BIG5" + echo "Big5-HKSCS BIG5-HKSCS" + echo "gb2312 GB2312" + echo "GBK GBK" + echo "GB18030 GB18030" + echo "cns11643 EUC-TW" + echo "5601 EUC-KR" + echo "ko_KR.johap92 JOHAB" + echo "eucJP EUC-JP" + echo "PCK SHIFT_JIS" + echo "TIS620.2533 TIS-620" + #echo "sun_eu_greek ?" # what is this? + echo "UTF-8 UTF-8" + ;; + freebsd* | os2*) + # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore + # localcharset.c falls back to using the full locale name + # from the environment variables. + # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just + # reuse FreeBSD's locale data for OS/2. + echo "C ASCII" + echo "US-ASCII ASCII" + for l in la_LN lt_LN; do + echo "$l.ASCII ASCII" + done + for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ + fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \ + lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do + echo "$l.ISO_8859-1 ISO-8859-1" + echo "$l.DIS_8859-15 ISO-8859-15" + done + for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do + echo "$l.ISO_8859-2 ISO-8859-2" + done + for l in la_LN lt_LT; do + echo "$l.ISO_8859-4 ISO-8859-4" + done + for l in ru_RU ru_SU; do + echo "$l.KOI8-R KOI8-R" + echo "$l.ISO_8859-5 ISO-8859-5" + echo "$l.CP866 CP866" + done + echo "uk_UA.KOI8-U KOI8-U" + echo "zh_TW.BIG5 BIG5" + echo "zh_TW.Big5 BIG5" + echo "zh_CN.EUC GB2312" + echo "ja_JP.EUC EUC-JP" + echo "ja_JP.SJIS SHIFT_JIS" + echo "ja_JP.Shift_JIS SHIFT_JIS" + echo "ko_KR.EUC EUC-KR" + ;; + netbsd*) + echo "646 ASCII" + echo "ISO8859-1 ISO-8859-1" + echo "ISO8859-2 ISO-8859-2" + echo "ISO8859-4 ISO-8859-4" + echo "ISO8859-5 ISO-8859-5" + echo "ISO8859-15 ISO-8859-15" + echo "eucCN GB2312" + echo "eucJP EUC-JP" + echo "eucKR EUC-KR" + echo "eucTW EUC-TW" + echo "BIG5 BIG5" + echo "SJIS SHIFT_JIS" + ;; + beos*) + # BeOS has a single locale, and it has UTF-8 encoding. + echo "* UTF-8" + ;; + msdosdjgpp*) + # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore + # localcharset.c falls back to using the full locale name + # from the environment variables. + echo "#" + echo "# The encodings given here may not all be correct." + echo "# If you find that the encoding given for your language and" + echo "# country is not the one your DOS machine actually uses, just" + echo "# correct it in this file, and send a mail to" + echo "# Juan Manuel Guerrero " + echo "# and Bruno Haible ." + echo "#" + echo "C ASCII" + # ISO-8859-1 languages + echo "ca CP850" + echo "ca_ES CP850" + echo "da CP865" # not CP850 ?? + echo "da_DK CP865" # not CP850 ?? + echo "de CP850" + echo "de_AT CP850" + echo "de_CH CP850" + echo "de_DE CP850" + echo "en CP850" + echo "en_AU CP850" # not CP437 ?? + echo "en_CA CP850" + echo "en_GB CP850" + echo "en_NZ CP437" + echo "en_US CP437" + echo "en_ZA CP850" # not CP437 ?? + echo "es CP850" + echo "es_AR CP850" + echo "es_BO CP850" + echo "es_CL CP850" + echo "es_CO CP850" + echo "es_CR CP850" + echo "es_CU CP850" + echo "es_DO CP850" + echo "es_EC CP850" + echo "es_ES CP850" + echo "es_GT CP850" + echo "es_HN CP850" + echo "es_MX CP850" + echo "es_NI CP850" + echo "es_PA CP850" + echo "es_PY CP850" + echo "es_PE CP850" + echo "es_SV CP850" + echo "es_UY CP850" + echo "es_VE CP850" + echo "et CP850" + echo "et_EE CP850" + echo "eu CP850" + echo "eu_ES CP850" + echo "fi CP850" + echo "fi_FI CP850" + echo "fr CP850" + echo "fr_BE CP850" + echo "fr_CA CP850" + echo "fr_CH CP850" + echo "fr_FR CP850" + echo "ga CP850" + echo "ga_IE CP850" + echo "gd CP850" + echo "gd_GB CP850" + echo "gl CP850" + echo "gl_ES CP850" + echo "id CP850" # not CP437 ?? + echo "id_ID CP850" # not CP437 ?? + echo "is CP861" # not CP850 ?? + echo "is_IS CP861" # not CP850 ?? + echo "it CP850" + echo "it_CH CP850" + echo "it_IT CP850" + echo "lt CP775" + echo "lt_LT CP775" + echo "lv CP775" + echo "lv_LV CP775" + echo "nb CP865" # not CP850 ?? + echo "nb_NO CP865" # not CP850 ?? + echo "nl CP850" + echo "nl_BE CP850" + echo "nl_NL CP850" + echo "nn CP865" # not CP850 ?? + echo "nn_NO CP865" # not CP850 ?? + echo "no CP865" # not CP850 ?? + echo "no_NO CP865" # not CP850 ?? + echo "pt CP850" + echo "pt_BR CP850" + echo "pt_PT CP850" + echo "sv CP850" + echo "sv_SE CP850" + # ISO-8859-2 languages + echo "cs CP852" + echo "cs_CZ CP852" + echo "hr CP852" + echo "hr_HR CP852" + echo "hu CP852" + echo "hu_HU CP852" + echo "pl CP852" + echo "pl_PL CP852" + echo "ro CP852" + echo "ro_RO CP852" + echo "sk CP852" + echo "sk_SK CP852" + echo "sl CP852" + echo "sl_SI CP852" + echo "sq CP852" + echo "sq_AL CP852" + echo "sr CP852" # CP852 or CP866 or CP855 ?? + echo "sr_YU CP852" # CP852 or CP866 or CP855 ?? + # ISO-8859-3 languages + echo "mt CP850" + echo "mt_MT CP850" + # ISO-8859-5 languages + echo "be CP866" + echo "be_BE CP866" + echo "bg CP866" # not CP855 ?? + echo "bg_BG CP866" # not CP855 ?? + echo "mk CP866" # not CP855 ?? + echo "mk_MK CP866" # not CP855 ?? + echo "ru CP866" + echo "ru_RU CP866" + echo "uk CP1125" + echo "uk_UA CP1125" + # ISO-8859-6 languages + echo "ar CP864" + echo "ar_AE CP864" + echo "ar_DZ CP864" + echo "ar_EG CP864" + echo "ar_IQ CP864" + echo "ar_IR CP864" + echo "ar_JO CP864" + echo "ar_KW CP864" + echo "ar_MA CP864" + echo "ar_OM CP864" + echo "ar_QA CP864" + echo "ar_SA CP864" + echo "ar_SY CP864" + # ISO-8859-7 languages + echo "el CP869" + echo "el_GR CP869" + # ISO-8859-8 languages + echo "he CP862" + echo "he_IL CP862" + # ISO-8859-9 languages + echo "tr CP857" + echo "tr_TR CP857" + # Japanese + echo "ja CP932" + echo "ja_JP CP932" + # Chinese + echo "zh_CN GBK" + echo "zh_TW CP950" # not CP938 ?? + # Korean + echo "kr CP949" # not CP934 ?? + echo "kr_KR CP949" # not CP934 ?? + # Thai + echo "th CP874" + echo "th_TH CP874" + # Other + echo "eo CP850" + echo "eo_EO CP850" + ;; + esac diff -aNrc2 bash-2.05b-patched/lib/intl/dcgettext.c bash-3.0/lib/intl/dcgettext.c *** bash-2.05b-patched/lib/intl/dcgettext.c Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/dcgettext.c Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,59 ---- + /* Implementation of the dcgettext(3) function. + Copyright (C) 1995-1999, 2000, 2001, 2002 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 + + #include "gettextP.h" + #ifdef _LIBC + # include + #else + # include "libgnuintl.h" + #endif + + /* @@ end of prolog @@ */ + + /* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ + #ifdef _LIBC + # define DCGETTEXT __dcgettext + # define DCIGETTEXT __dcigettext + #else + # define DCGETTEXT libintl_dcgettext + # define DCIGETTEXT libintl_dcigettext + #endif + + /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY + locale. */ + char * + DCGETTEXT (domainname, msgid, category) + const char *domainname; + const char *msgid; + int category; + { + return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category); + } + + #ifdef _LIBC + /* Alias for function name in GNU C Library. */ + INTDEF(__dcgettext) + weak_alias (__dcgettext, dcgettext); + #endif diff -aNrc2 bash-2.05b-patched/lib/intl/dcigettext.c bash-3.0/lib/intl/dcigettext.c *** bash-2.05b-patched/lib/intl/dcigettext.c Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/dcigettext.c Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,1238 ---- + /* Implementation of the internal dcigettext function. + 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 + 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 mempcpy(). + 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 + + #include + + #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 + #ifndef errno + extern int errno; + #endif + #ifndef __set_errno + # define __set_errno(val) errno = (val) + #endif + + #include + #include + #include + + #if defined HAVE_UNISTD_H || defined _LIBC + # include + #endif + + #include + + #ifdef _LIBC + /* Guess whether integer division by zero raises signal SIGFPE. + Set to 1 only if you know for sure. In case of doubt, set to 0. */ + # if defined __alpha__ || defined __arm__ || defined __i386__ \ + || defined __m68k__ || defined __s390__ + # define INTDIV0_RAISES_SIGFPE 1 + # else + # define INTDIV0_RAISES_SIGFPE 0 + # endif + #endif + #if !INTDIV0_RAISES_SIGFPE + # include + #endif + + #if defined HAVE_SYS_PARAM_H || defined _LIBC + # include + #endif + + #include "gettextP.h" + #include "plural-exp.h" + #ifdef _LIBC + # include + #else + # include "libgnuintl.h" + #endif + #include "hash-string.h" + + /* Thread safetyness. */ + #ifdef _LIBC + # include + #else + /* Provide dummy implementation if this is outside glibc. */ + # define __libc_lock_define_initialized(CLASS, NAME) + # define __libc_lock_lock(NAME) + # define __libc_lock_unlock(NAME) + # define __libc_rwlock_define_initialized(CLASS, NAME) + # define __libc_rwlock_rdlock(NAME) + # define __libc_rwlock_unlock(NAME) + #endif + + /* Alignment of types. */ + #if defined __GNUC__ && __GNUC__ >= 2 + # define alignof(TYPE) __alignof__ (TYPE) + #else + # define alignof(TYPE) \ + ((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2) + #endif + + /* The internal variables in the standalone libintl.a must have different + names than the internal variables in GNU libc, otherwise programs + using libintl.a cannot be linked statically. */ + #if !defined _LIBC + # define _nl_default_default_domain libintl_nl_default_default_domain + # define _nl_current_default_domain libintl_nl_current_default_domain + # define _nl_default_dirname libintl_nl_default_dirname + # define _nl_domain_bindings libintl_nl_domain_bindings + #endif + + /* Some compilers, like SunOS4 cc, don't have offsetof in . */ + #ifndef offsetof + # define offsetof(type,ident) ((size_t)&(((type*)0)->ident)) + #endif + + /* @@ end of prolog @@ */ + + #ifdef _LIBC + /* Rename the non ANSI C functions. This is required by the standard + because some ANSI C functions will require linking with this object + file and the name space must not be polluted. */ + # define getcwd __getcwd + # ifndef stpcpy + # define stpcpy __stpcpy + # endif + # define tfind __tfind + #else + # if !defined HAVE_GETCWD + char *getwd (); + # define getcwd(buf, max) getwd (buf) + # else + char *getcwd (); + # endif + # ifndef HAVE_STPCPY + static char *stpcpy PARAMS ((char *dest, const char *src)); + # endif + # ifndef HAVE_MEMPCPY + static void *mempcpy PARAMS ((void *dest, const void *src, size_t n)); + # endif + #endif + + /* Amount to increase buffer size by in each try. */ + #define PATH_INCR 32 + + /* The following is from pathmax.h. */ + /* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define + PATH_MAX but might cause redefinition warnings when sys/param.h is + later included (as on MORE/BSD 4.3). */ + #if defined _POSIX_VERSION || (defined HAVE_LIMITS_H && !defined __GNUC__) + # include + #endif + + #ifndef _POSIX_PATH_MAX + # define _POSIX_PATH_MAX 255 + #endif + + #if !defined PATH_MAX && defined _PC_PATH_MAX + # define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX)) + #endif + + /* Don't include sys/param.h if it already has been. */ + #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN + # include + #endif + + #if !defined PATH_MAX && defined MAXPATHLEN + # define PATH_MAX MAXPATHLEN + #endif + + #ifndef PATH_MAX + # define PATH_MAX _POSIX_PATH_MAX + #endif + + /* Pathname support. + ISSLASH(C) tests whether C is a directory separator character. + IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not, + it may be concatenated to a directory pathname. + IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. + */ + #if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ + /* Win32, OS/2, DOS */ + # define ISSLASH(C) ((C) == '/' || (C) == '\\') + # define HAS_DEVICE(P) \ + ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ + && (P)[1] == ':') + # define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P)) + # define IS_PATH_WITH_DIR(P) \ + (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P)) + #else + /* Unix */ + # define ISSLASH(C) ((C) == '/') + # define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0]) + # define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL) + #endif + + /* This is the type used for the search tree where known translations + are stored. */ + struct known_translation_t + { + /* Domain in which to search. */ + char *domainname; + + /* The category. */ + int category; + + /* State of the catalog counter at the point the string was found. */ + int counter; + + /* Catalog where the string was found. */ + struct loaded_l10nfile *domain; + + /* And finally the translation. */ + const char *translation; + size_t translation_length; + + /* Pointer to the string in question. */ + char msgid[ZERO]; + }; + + /* Root of the search tree with known translations. We can use this + only if the system provides the `tsearch' function family. */ + #if defined HAVE_TSEARCH || defined _LIBC + # include + + static void *root; + + # ifdef _LIBC + # define tsearch __tsearch + # 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; + { + const struct known_translation_t *s1; + const struct known_translation_t *s2; + int result; + + s1 = (const struct known_translation_t *) p1; + s2 = (const struct known_translation_t *) p2; + + result = strcmp (s1->msgid, s2->msgid); + if (result == 0) + { + result = strcmp (s1->domainname, s2->domainname); + if (result == 0) + /* We compare the category last (though this is the cheapest + operation) since it is hopefully always the same (namely + LC_MESSAGES). */ + result = s1->category - s2->category; + } + + return result; + } + #endif + + #ifndef INTVARDEF + # define INTVARDEF(name) + #endif + #ifndef INTUSE + # define INTUSE(name) name + #endif + + /* Name of the default domain used for gettext(3) prior any call to + textdomain(3). The default value for this is "messages". */ + const char _nl_default_default_domain[] attribute_hidden = "messages"; + + /* Value used as the default domain for gettext(3). */ + const char *_nl_current_default_domain attribute_hidden + = _nl_default_default_domain; + + /* Contains the default location of the message catalogs. */ + #if defined __EMX__ + extern const char _nl_default_dirname[]; + #else + const char _nl_default_dirname[] = LOCALEDIR; + INTVARDEF (_nl_default_dirname) + #endif + + /* List with bindings of specific domains created by bindtextdomain() + calls. */ + 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)) + internal_function; + static const char *guess_category_value PARAMS ((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; + #endif + + + /* For those loosing systems which don't have `alloca' we have to add + some additional code emulating it. */ + #ifdef HAVE_ALLOCA + /* Nothing has to be done. */ + # define freea(p) /* nothing */ + # define ADD_BLOCK(list, address) /* nothing */ + # define FREE_BLOCKS(list) /* nothing */ + #else + struct block_list + { + void *address; + struct block_list *next; + }; + # define ADD_BLOCK(list, addr) \ + do { \ + struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \ + /* If we cannot get a free block we cannot add the new element to \ + the list. */ \ + if (newp != NULL) { \ + newp->address = (addr); \ + newp->next = (list); \ + (list) = newp; \ + } \ + } while (0) + # define FREE_BLOCKS(list) \ + do { \ + while (list != NULL) { \ + struct block_list *old = list; \ + list = list->next; \ + free (old->address); \ + free (old); \ + } \ + } while (0) + # undef alloca + # define alloca(size) (malloc (size)) + # define freea(p) free (p) + #endif /* have alloca */ + + + #ifdef _LIBC + /* List of blocks allocated for translations. */ + typedef struct transmem_list + { + struct transmem_list *next; + char data[ZERO]; + } transmem_block_t; + static struct transmem_list *transmem_list; + #else + typedef unsigned char transmem_block_t; + #endif + + + /* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ + #ifdef _LIBC + # define DCIGETTEXT __dcigettext + #else + # define DCIGETTEXT libintl_dcigettext + #endif + + /* Lock variable to protect the global data in the gettext implementation. */ + #ifdef _LIBC + __libc_rwlock_define_initialized (, _nl_state_lock attribute_hidden) + #endif + + /* Checking whether the binaries runs SUID must be done and glibc provides + easier methods therefore we make a difference here. */ + #ifdef _LIBC + # define ENABLE_SECURE __libc_enable_secure + # define DETERMINE_SECURE + #else + # ifndef HAVE_GETUID + # define getuid() 0 + # endif + # ifndef HAVE_GETGID + # define getgid() 0 + # endif + # ifndef HAVE_GETEUID + # define geteuid() getuid() + # endif + # ifndef HAVE_GETEGID + # define getegid() getgid() + # endif + static int enable_secure; + # define ENABLE_SECURE (enable_secure == 1) + # define DETERMINE_SECURE \ + if (enable_secure == 0) \ + { \ + if (getuid () != geteuid () || getgid () != getegid ()) \ + enable_secure = 1; \ + else \ + enable_secure = -1; \ + } + #endif + + /* Get the function to evaluate the plural expression. */ + #include "eval-plural.h" + + /* Look up MSGID in the DOMAINNAME message catalog for the current + CATEGORY locale and, if PLURAL is nonzero, search over string + depending on the plural form determined by N. */ + char * + DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category) + const char *domainname; + const char *msgid1; + const char *msgid2; + int plural; + unsigned long int n; + int category; + { + #ifndef HAVE_ALLOCA + struct block_list *block_list = NULL; + #endif + struct loaded_l10nfile *domain; + struct binding *binding; + const char *categoryname; + const char *categoryvalue; + char *dirname, *xdomainname; + char *single_locale; + char *retval; + size_t retlen; + int saved_errno; + #if defined HAVE_TSEARCH || defined _LIBC + struct known_translation_t *search; + struct known_translation_t **foundp = NULL; + size_t msgid_len; + #endif + size_t domainname_len; + + /* If no real MSGID is given return NULL. */ + if (msgid1 == NULL) + return NULL; + + #ifdef _LIBC + if (category < 0 || category >= __LC_LAST || category == LC_ALL) + /* Bogus. */ + return (plural == 0 + ? (char *) msgid1 + /* Use the Germanic plural rule. */ + : n == 1 ? (char *) msgid1 : (char *) msgid2); + #endif + + __libc_rwlock_rdlock (_nl_state_lock); + + /* If DOMAINNAME is NULL, we are interested in the default domain. If + CATEGORY is not LC_MESSAGES this might not make much sense but the + definition left this undefined. */ + if (domainname == NULL) + domainname = _nl_current_default_domain; + + /* OS/2 specific: backward compatibility with older libintl versions */ + #ifdef LC_MESSAGES_COMPAT + if (category == LC_MESSAGES_COMPAT) + category = LC_MESSAGES; + #endif + + #if defined HAVE_TSEARCH || defined _LIBC + msgid_len = strlen (msgid1) + 1; + + /* Try to find the translation among those which we found at + some time. */ + search = (struct known_translation_t *) + alloca (offsetof (struct known_translation_t, msgid) + msgid_len); + memcpy (search->msgid, msgid1, msgid_len); + search->domainname = (char *) domainname; + search->category = category; + + foundp = (struct known_translation_t **) tfind (search, &root, transcmp); + freea (search); + if (foundp != NULL && (*foundp)->counter == _nl_msg_cat_cntr) + { + /* Now deal with plural. */ + if (plural) + retval = plural_lookup ((*foundp)->domain, n, (*foundp)->translation, + (*foundp)->translation_length); + else + retval = (char *) (*foundp)->translation; + + __libc_rwlock_unlock (_nl_state_lock); + return retval; + } + #endif + + /* Preserve the `errno' value. */ + saved_errno = errno; + + /* See whether this is a SUID binary or not. */ + DETERMINE_SECURE; + + /* First find matching binding. */ + for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next) + { + int compare = strcmp (domainname, binding->domainname); + if (compare == 0) + /* We found it! */ + break; + if (compare < 0) + { + /* It is not in the list. */ + binding = NULL; + break; + } + } + + if (binding == NULL) + dirname = (char *) INTUSE(_nl_default_dirname); + else if (IS_ABSOLUTE_PATH (binding->dirname)) + dirname = binding->dirname; + else + { + /* We have a relative path. Make it absolute now. */ + size_t dirname_len = strlen (binding->dirname) + 1; + size_t path_max; + char *ret; + + path_max = (unsigned int) PATH_MAX; + path_max += 2; /* The getcwd docs say to do this. */ + + for (;;) + { + dirname = (char *) alloca (path_max + dirname_len); + ADD_BLOCK (block_list, dirname); + + __set_errno (0); + ret = getcwd (dirname, path_max); + if (ret != NULL || errno != ERANGE) + break; + + path_max += path_max / 2; + path_max += PATH_INCR; + } + + if (ret == NULL) + /* We cannot get the current working directory. Don't signal an + error but simply return the default string. */ + goto return_untranslated; + + stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname); + } + + /* Now determine the symbolic name of CATEGORY and its value. */ + categoryname = category_to_name (category); + categoryvalue = guess_category_value (category, categoryname); + + domainname_len = strlen (domainname); + xdomainname = (char *) alloca (strlen (categoryname) + + domainname_len + 5); + ADD_BLOCK (block_list, xdomainname); + + stpcpy (mempcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"), + domainname, domainname_len), + ".mo"); + + /* Creating working area. */ + single_locale = (char *) alloca (strlen (categoryvalue) + 1); + ADD_BLOCK (block_list, single_locale); + + + /* Search for the given string. This is a loop because we perhaps + got an ordered list of languages to consider for the translation. */ + while (1) + { + /* Make CATEGORYVALUE point to the next element of the list. */ + while (categoryvalue[0] != '\0' && categoryvalue[0] == ':') + ++categoryvalue; + if (categoryvalue[0] == '\0') + { + /* The whole contents of CATEGORYVALUE has been searched but + no valid entry has been found. We solve this situation + by implicitly appending a "C" entry, i.e. no translation + will take place. */ + single_locale[0] = 'C'; + single_locale[1] = '\0'; + } + else + { + char *cp = single_locale; + while (categoryvalue[0] != '\0' && categoryvalue[0] != ':') + *cp++ = *categoryvalue++; + *cp = '\0'; + + /* When this is a SUID binary we must not allow accessing files + outside the dedicated directories. */ + if (ENABLE_SECURE && IS_PATH_WITH_DIR (single_locale)) + /* Ingore this entry. */ + continue; + } + + /* If the current locale value is C (or POSIX) we don't load a + domain. Return the MSGID. */ + if (strcmp (single_locale, "C") == 0 + || strcmp (single_locale, "POSIX") == 0) + break; + + /* Find structure describing the message catalog matching the + DOMAINNAME and CATEGORY. */ + domain = _nl_find_domain (dirname, single_locale, xdomainname, binding); + + if (domain != NULL) + { + retval = _nl_find_msg (domain, binding, msgid1, &retlen); + + if (retval == NULL) + { + int cnt; + + for (cnt = 0; domain->successor[cnt] != NULL; ++cnt) + { + retval = _nl_find_msg (domain->successor[cnt], binding, + msgid1, &retlen); + + if (retval != NULL) + { + domain = domain->successor[cnt]; + break; + } + } + } + + if (retval != NULL) + { + /* Found the translation of MSGID1 in domain DOMAIN: + starting at RETVAL, RETLEN bytes. */ + FREE_BLOCKS (block_list); + #if defined HAVE_TSEARCH || defined _LIBC + if (foundp == NULL) + { + /* Create a new entry and add it to the search tree. */ + struct known_translation_t *newp; + + newp = (struct known_translation_t *) + malloc (offsetof (struct known_translation_t, msgid) + + msgid_len + domainname_len + 1); + if (newp != NULL) + { + newp->domainname = + mempcpy (newp->msgid, msgid1, msgid_len); + memcpy (newp->domainname, domainname, domainname_len + 1); + newp->category = category; + newp->counter = _nl_msg_cat_cntr; + newp->domain = domain; + newp->translation = retval; + newp->translation_length = retlen; + + /* Insert the entry in the search tree. */ + foundp = (struct known_translation_t **) + tsearch (newp, &root, transcmp); + if (foundp == NULL + || __builtin_expect (*foundp != newp, 0)) + /* The insert failed. */ + free (newp); + } + } + else + { + /* We can update the existing entry. */ + (*foundp)->counter = _nl_msg_cat_cntr; + (*foundp)->domain = domain; + (*foundp)->translation = retval; + (*foundp)->translation_length = retlen; + } + #endif + __set_errno (saved_errno); + + /* Now deal with plural. */ + if (plural) + retval = plural_lookup (domain, n, retval, retlen); + + __libc_rwlock_unlock (_nl_state_lock); + return retval; + } + } + } + + return_untranslated: + /* Return the untranslated MSGID. */ + FREE_BLOCKS (block_list); + __libc_rwlock_unlock (_nl_state_lock); + #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)); + const char *logfilename = getenv ("GETTEXT_LOG_UNTRANSLATED"); + + if (logfilename != NULL && logfilename[0] != '\0') + _nl_log_untranslated (logfilename, domainname, msgid1, msgid2, plural); + } + #endif + __set_errno (saved_errno); + return (plural == 0 + ? (char *) msgid1 + /* Use the Germanic plural rule. */ + : n == 1 ? (char *) msgid1 : (char *) msgid2); + } + + + 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; + { + struct loaded_domain *domain; + nls_uint32 nstrings; + size_t act; + char *result; + size_t resultlen; + + if (domain_file->decided == 0) + _nl_load_domain (domain_file, domainbinding); + + if (domain_file->data == NULL) + return NULL; + + domain = (struct loaded_domain *) domain_file->data; + + nstrings = domain->nstrings; + + /* Locate the MSGID and its translation. */ + if (domain->hash_tab != NULL) + { + /* Use the hashing table. */ + nls_uint32 len = strlen (msgid); + nls_uint32 hash_val = hash_string (msgid); + nls_uint32 idx = hash_val % domain->hash_size; + nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2)); + + while (1) + { + nls_uint32 nstr = + W (domain->must_swap_hash_tab, domain->hash_tab[idx]); + + if (nstr == 0) + /* Hash table entry is empty. */ + return NULL; + + nstr--; + + /* Compare msgid with the original string at index nstr. + We compare the lengths with >=, not ==, because plural entries + are represented by strings with an embedded NUL. */ + if (nstr < nstrings + ? W (domain->must_swap, domain->orig_tab[nstr].length) >= len + && (strcmp (msgid, + domain->data + W (domain->must_swap, + domain->orig_tab[nstr].offset)) + == 0) + : domain->orig_sysdep_tab[nstr - nstrings].length > len + && (strcmp (msgid, + domain->orig_sysdep_tab[nstr - nstrings].pointer) + == 0)) + { + act = nstr; + goto found; + } + + if (idx >= domain->hash_size - incr) + idx -= domain->hash_size - incr; + else + idx += incr; + } + /* NOTREACHED */ + } + else + { + /* Try the default method: binary search in the sorted array of + messages. */ + size_t top, bottom; + + bottom = 0; + top = nstrings; + while (bottom < top) + { + int cmp_val; + + act = (bottom + top) / 2; + cmp_val = strcmp (msgid, (domain->data + + W (domain->must_swap, + domain->orig_tab[act].offset))); + if (cmp_val < 0) + top = act; + else if (cmp_val > 0) + bottom = act + 1; + else + goto found; + } + /* No translation was found. */ + return NULL; + } + + found: + /* The translation was found at index ACT. If we have to convert the + string to use a different character set, this is the time. */ + if (act < nstrings) + { + result = (char *) + (domain->data + W (domain->must_swap, domain->trans_tab[act].offset)); + resultlen = W (domain->must_swap, domain->trans_tab[act].length) + 1; + } + else + { + result = (char *) domain->trans_sysdep_tab[act - nstrings].pointer; + resultlen = domain->trans_sysdep_tab[act - nstrings].length; + } + + #if defined _LIBC || HAVE_ICONV + if (domain->codeset_cntr + != (domainbinding != NULL ? domainbinding->codeset_cntr : 0)) + { + /* The domain's codeset has changed through bind_textdomain_codeset() + since the message catalog was initialized or last accessed. We + have to reinitialize the converter. */ + _nl_free_domain_conv (domain); + _nl_init_domain_conv (domain_file, domain, domainbinding); + } + + if ( + # ifdef _LIBC + domain->conv != (__gconv_t) -1 + # else + # if HAVE_ICONV + domain->conv != (iconv_t) -1 + # endif + # endif + ) + { + /* We are supposed to do a conversion. First allocate an + appropriate table with the same structure as the table + of translations in the file, where we can put the pointers + to the converted strings in. + There is a slight complication with plural entries. They + are represented by consecutive NUL terminated strings. We + handle this case by converting RESULTLEN bytes, including + NULs. */ + + if (domain->conv_tab == NULL + && ((domain->conv_tab = + (char **) calloc (nstrings + domain->n_sysdep_strings, + sizeof (char *))) + == NULL)) + /* Mark that we didn't succeed allocating a table. */ + domain->conv_tab = (char **) -1; + + if (__builtin_expect (domain->conv_tab == (char **) -1, 0)) + /* Nothing we can do, no more memory. */ + goto converted; + + if (domain->conv_tab[act] == NULL) + { + /* We haven't used this string so far, so it is not + translated yet. Do this now. */ + /* We use a bit more efficient memory handling. + We allocate always larger blocks which get used over + time. This is faster than many small allocations. */ + __libc_lock_define_initialized (static, lock) + # define INITIAL_BLOCK_SIZE 4080 + static unsigned char *freemem; + static size_t freemem_size; + + const unsigned char *inbuf; + unsigned char *outbuf; + int malloc_count; + # ifndef _LIBC + transmem_block_t *transmem_list = NULL; + # endif + + __libc_lock_lock (lock); + + inbuf = (const unsigned char *) result; + outbuf = freemem + sizeof (size_t); + + malloc_count = 0; + while (1) + { + transmem_block_t *newmem; + # ifdef _LIBC + size_t non_reversible; + int res; + + if (freemem_size < sizeof (size_t)) + goto resize_freemem; + + res = __gconv (domain->conv, + &inbuf, inbuf + resultlen, + &outbuf, + outbuf + freemem_size - sizeof (size_t), + &non_reversible); + + if (res == __GCONV_OK || res == __GCONV_EMPTY_INPUT) + break; + + if (res != __GCONV_FULL_OUTPUT) + { + __libc_lock_unlock (lock); + goto converted; + } + + inbuf = result; + # else + # if HAVE_ICONV + const char *inptr = (const char *) inbuf; + size_t inleft = resultlen; + char *outptr = (char *) outbuf; + size_t outleft; + + if (freemem_size < sizeof (size_t)) + goto resize_freemem; + + outleft = freemem_size - sizeof (size_t); + if (iconv (domain->conv, + (ICONV_CONST char **) &inptr, &inleft, + &outptr, &outleft) + != (size_t) (-1)) + { + outbuf = (unsigned char *) outptr; + break; + } + if (errno != E2BIG) + { + __libc_lock_unlock (lock); + goto converted; + } + # endif + # endif + + resize_freemem: + /* We must allocate a new buffer or resize the old one. */ + if (malloc_count > 0) + { + ++malloc_count; + freemem_size = malloc_count * INITIAL_BLOCK_SIZE; + newmem = (transmem_block_t *) realloc (transmem_list, + freemem_size); + # ifdef _LIBC + if (newmem != NULL) + transmem_list = transmem_list->next; + else + { + struct transmem_list *old = transmem_list; + + transmem_list = transmem_list->next; + free (old); + } + # endif + } + else + { + malloc_count = 1; + freemem_size = INITIAL_BLOCK_SIZE; + newmem = (transmem_block_t *) malloc (freemem_size); + } + if (__builtin_expect (newmem == NULL, 0)) + { + freemem = NULL; + freemem_size = 0; + __libc_lock_unlock (lock); + goto converted; + } + + # ifdef _LIBC + /* Add the block to the list of blocks we have to free + at some point. */ + newmem->next = transmem_list; + transmem_list = newmem; + + freemem = newmem->data; + freemem_size -= offsetof (struct transmem_list, data); + # else + transmem_list = newmem; + freemem = newmem; + # endif + + outbuf = freemem + sizeof (size_t); + } + + /* We have now in our buffer a converted string. Put this + into the table of conversions. */ + *(size_t *) freemem = outbuf - freemem - sizeof (size_t); + domain->conv_tab[act] = (char *) freemem; + /* Shrink freemem, but keep it aligned. */ + freemem_size -= outbuf - freemem; + freemem = outbuf; + freemem += freemem_size & (alignof (size_t) - 1); + freemem_size = freemem_size & ~ (alignof (size_t) - 1); + + __libc_lock_unlock (lock); + } + + /* Now domain->conv_tab[act] contains the translation of all + the plural variants. */ + result = domain->conv_tab[act] + sizeof (size_t); + resultlen = *(size_t *) domain->conv_tab[act]; + } + + converted: + /* The result string is converted. */ + + #endif /* _LIBC || HAVE_ICONV */ + + *lengthp = resultlen; + return result; + } + + + /* 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; + { + struct loaded_domain *domaindata = (struct loaded_domain *) domain->data; + unsigned long int index; + const char *p; + + index = plural_eval (domaindata->plural, n); + if (index >= domaindata->nplurals) + /* This should never happen. It means the plural expression and the + given maximum value do not match. */ + index = 0; + + /* Skip INDEX strings at TRANSLATION. */ + p = translation; + while (index-- > 0) + { + #ifdef _LIBC + p = __rawmemchr (p, '\0'); + #else + p = strchr (p, '\0'); + #endif + /* And skip over the NUL byte. */ + p++; + + if (p >= translation + translation_len) + /* This should never happen. It means the plural expression + evaluated to a value larger than the number of variants + available for MSGID1. */ + return (char *) translation; + } + return (char *) p; + } + + #ifndef _LIBC + /* Return string representation of locale CATEGORY. */ + static const char * + internal_function + category_to_name (category) + int category; + { + const char *retval; + + switch (category) + { + #ifdef LC_COLLATE + case LC_COLLATE: + retval = "LC_COLLATE"; + break; + #endif + #ifdef LC_CTYPE + case LC_CTYPE: + retval = "LC_CTYPE"; + break; + #endif + #ifdef LC_MONETARY + case LC_MONETARY: + retval = "LC_MONETARY"; + break; + #endif + #ifdef LC_NUMERIC + case LC_NUMERIC: + retval = "LC_NUMERIC"; + break; + #endif + #ifdef LC_TIME + case LC_TIME: + retval = "LC_TIME"; + break; + #endif + #ifdef LC_MESSAGES + case LC_MESSAGES: + retval = "LC_MESSAGES"; + break; + #endif + #ifdef LC_RESPONSE + case LC_RESPONSE: + retval = "LC_RESPONSE"; + break; + #endif + #ifdef LC_ALL + case LC_ALL: + /* This might not make sense but is perhaps better than any other + value. */ + retval = "LC_ALL"; + break; + #endif + default: + /* If you have a better idea for a default value let me know. */ + retval = "LC_XXX"; + } + + return retval; + } + #endif + + /* Guess value of current locale from value of the environment variables. */ + static const char * + internal_function + guess_category_value (category, categoryname) + int category; + const char *categoryname; + { + const char *language; + const char *retval; + + /* The highest priority value is the `LANGUAGE' environment + variable. But we don't use the value if the currently selected + locale is the C locale. This is a GNU extension. */ + language = getenv ("LANGUAGE"); + if (language != NULL && language[0] == '\0') + language = NULL; + + /* We have to proceed with the POSIX methods of looking to `LC_ALL', + `LC_xxx', and `LANG'. On some systems this can be done by the + `setlocale' function itself. */ + #ifdef _LIBC + retval = __current_locale_name (category); + #else + retval = _nl_locale_name (category, categoryname); + #endif + + /* Ignore LANGUAGE if the locale is set to "C" because + 1. "C" locale usually uses the ASCII encoding, and most international + messages use non-ASCII characters. These characters get displayed + as question marks (if using glibc's iconv()) or as invalid 8-bit + characters (because other iconv()s refuse to convert most non-ASCII + characters to ASCII). In any case, the output is ugly. + 2. The precise output of some programs in the "C" locale is specified + by POSIX and should not depend on environment variables like + "LANGUAGE". We allow such programs to use gettext(). */ + return language != NULL && strcmp (retval, "C") != 0 ? language : retval; + } + + /* @@ begin of epilog @@ */ + + /* We don't want libintl.a to depend on any other library. So we + avoid the non-standard function stpcpy. In GNU C Library this + function is available, though. Also allow the symbol HAVE_STPCPY + to be defined. */ + #if !_LIBC && !HAVE_STPCPY + static char * + stpcpy (dest, src) + char *dest; + const char *src; + { + while ((*dest++ = *src++) != '\0') + /* Do nothing. */ ; + return dest - 1; + } + #endif + + #if !_LIBC && !HAVE_MEMPCPY + static void * + mempcpy (dest, src, n) + void *dest; + const void *src; + size_t n; + { + return (void *) ((char *) memcpy (dest, src, n) + n); + } + #endif + + + #ifdef _LIBC + /* If we want to free all resources we have to do some work at + program's end. */ + libc_freeres_fn (free_mem) + { + void *old; + + while (_nl_domain_bindings != NULL) + { + struct binding *oldp = _nl_domain_bindings; + _nl_domain_bindings = _nl_domain_bindings->next; + if (oldp->dirname != INTUSE(_nl_default_dirname)) + /* Yes, this is a pointer comparison. */ + free (oldp->dirname); + free (oldp->codeset); + free (oldp); + } + + if (_nl_current_default_domain != _nl_default_default_domain) + /* Yes, again a pointer comparison. */ + free ((char *) _nl_current_default_domain); + + /* Remove the search tree with the known translations. */ + __tdestroy (root, free); + root = NULL; + + while (transmem_list != NULL) + { + old = transmem_list; + transmem_list = transmem_list->next; + free (old); + } + } + #endif diff -aNrc2 bash-2.05b-patched/lib/intl/dcngettext.c bash-3.0/lib/intl/dcngettext.c *** bash-2.05b-patched/lib/intl/dcngettext.c Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/dcngettext.c Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,60 ---- + /* Implementation of the dcngettext(3) function. + Copyright (C) 1995-1999, 2000, 2001, 2002 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 + + #include "gettextP.h" + #ifdef _LIBC + # include + #else + # include "libgnuintl.h" + #endif + + /* @@ end of prolog @@ */ + + /* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ + #ifdef _LIBC + # define DCNGETTEXT __dcngettext + # define DCIGETTEXT __dcigettext + #else + # define DCNGETTEXT libintl_dcngettext + # define DCIGETTEXT libintl_dcigettext + #endif + + /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY + locale. */ + char * + DCNGETTEXT (domainname, msgid1, msgid2, n, category) + const char *domainname; + const char *msgid1; + const char *msgid2; + unsigned long int n; + int category; + { + return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category); + } + + #ifdef _LIBC + /* Alias for function name in GNU C Library. */ + weak_alias (__dcngettext, dcngettext); + #endif diff -aNrc2 bash-2.05b-patched/lib/intl/dgettext.c bash-3.0/lib/intl/dgettext.c *** bash-2.05b-patched/lib/intl/dgettext.c Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/dgettext.c Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,59 ---- + /* Implementation of the dgettext(3) function. + Copyright (C) 1995-1997, 2000, 2001, 2002 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 + + #include + + #include "gettextP.h" + #ifdef _LIBC + # include + #else + # include "libgnuintl.h" + #endif + + /* @@ end of prolog @@ */ + + /* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ + #ifdef _LIBC + # define DGETTEXT __dgettext + # define DCGETTEXT INTUSE(__dcgettext) + #else + # define DGETTEXT libintl_dgettext + # define DCGETTEXT libintl_dcgettext + #endif + + /* Look up MSGID in the DOMAINNAME message catalog of the current + LC_MESSAGES locale. */ + char * + DGETTEXT (domainname, msgid) + const char *domainname; + const char *msgid; + { + return DCGETTEXT (domainname, msgid, LC_MESSAGES); + } + + #ifdef _LIBC + /* Alias for function name in GNU C Library. */ + weak_alias (__dgettext, dgettext); + #endif diff -aNrc2 bash-2.05b-patched/lib/intl/dngettext.c bash-3.0/lib/intl/dngettext.c *** bash-2.05b-patched/lib/intl/dngettext.c Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/dngettext.c Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,61 ---- + /* Implementation of the dngettext(3) function. + Copyright (C) 1995-1997, 2000, 2001, 2002 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 + + #include + + #include "gettextP.h" + #ifdef _LIBC + # include + #else + # include "libgnuintl.h" + #endif + + /* @@ end of prolog @@ */ + + /* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ + #ifdef _LIBC + # define DNGETTEXT __dngettext + # define DCNGETTEXT __dcngettext + #else + # define DNGETTEXT libintl_dngettext + # define DCNGETTEXT libintl_dcngettext + #endif + + /* Look up MSGID in the DOMAINNAME message catalog of the current + LC_MESSAGES locale and skip message according to the plural form. */ + char * + DNGETTEXT (domainname, msgid1, msgid2, n) + const char *domainname; + const char *msgid1; + const char *msgid2; + unsigned long int n; + { + return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES); + } + + #ifdef _LIBC + /* Alias for function name in GNU C Library. */ + weak_alias (__dngettext, dngettext); + #endif diff -aNrc2 bash-2.05b-patched/lib/intl/eval-plural.h bash-3.0/lib/intl/eval-plural.h *** bash-2.05b-patched/lib/intl/eval-plural.h Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/eval-plural.h Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,114 ---- + /* Plural expression evaluation. + Copyright (C) 2000-2002 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 STATIC + #define STATIC static + #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; + { + switch (pexp->nargs) + { + case 0: + switch (pexp->operation) + { + case var: + return n; + case num: + return pexp->val.num; + default: + break; + } + /* NOTREACHED */ + break; + case 1: + { + /* pexp->operation must be lnot. */ + unsigned long int arg = plural_eval (pexp->val.args[0], n); + return ! arg; + } + case 2: + { + unsigned long int leftarg = plural_eval (pexp->val.args[0], n); + if (pexp->operation == lor) + return leftarg || plural_eval (pexp->val.args[1], n); + else if (pexp->operation == land) + return leftarg && plural_eval (pexp->val.args[1], n); + else + { + unsigned long int rightarg = plural_eval (pexp->val.args[1], n); + + switch (pexp->operation) + { + case mult: + return leftarg * rightarg; + case divide: + #if !INTDIV0_RAISES_SIGFPE + if (rightarg == 0) + raise (SIGFPE); + #endif + return leftarg / rightarg; + case module: + #if !INTDIV0_RAISES_SIGFPE + if (rightarg == 0) + raise (SIGFPE); + #endif + return leftarg % rightarg; + case plus: + return leftarg + rightarg; + case minus: + return leftarg - rightarg; + case less_than: + return leftarg < rightarg; + case greater_than: + return leftarg > rightarg; + case less_or_equal: + return leftarg <= rightarg; + case greater_or_equal: + return leftarg >= rightarg; + case equal: + return leftarg == rightarg; + case not_equal: + return leftarg != rightarg; + default: + break; + } + } + /* NOTREACHED */ + break; + } + case 3: + { + /* pexp->operation must be qmop. */ + unsigned long int boolarg = plural_eval (pexp->val.args[0], n); + return plural_eval (pexp->val.args[boolarg ? 1 : 2], n); + } + } + /* NOTREACHED */ + return 0; + } diff -aNrc2 bash-2.05b-patched/lib/intl/explodename.c bash-3.0/lib/intl/explodename.c *** bash-2.05b-patched/lib/intl/explodename.c Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/explodename.c Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,192 ---- + /* Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc. + Contributed by Ulrich Drepper , 1995. + + 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 + + #include + #include + #include + + #include "loadinfo.h" + + /* On some strange systems still no definition of NULL is found. Sigh! */ + #ifndef NULL + # if defined __STDC__ && __STDC__ + # define NULL ((void *) 0) + # else + # define NULL 0 + # endif + #endif + + /* @@ end of prolog @@ */ + + char * + _nl_find_language (name) + const char *name; + { + while (name[0] != '\0' && name[0] != '_' && name[0] != '@' + && name[0] != '+' && name[0] != ',') + ++name; + + return (char *) name; + } + + + int + _nl_explode_name (name, language, modifier, territory, codeset, + normalized_codeset, special, sponsor, revision) + char *name; + const char **language; + const char **modifier; + const char **territory; + const char **codeset; + const char **normalized_codeset; + const char **special; + const char **sponsor; + const char **revision; + { + enum { undecided, xpg, cen } syntax; + char *cp; + int mask; + + *modifier = NULL; + *territory = NULL; + *codeset = NULL; + *normalized_codeset = NULL; + *special = NULL; + *sponsor = NULL; + *revision = NULL; + + /* Now we determine the single parts of the locale name. First + look for the language. Termination symbols are `_' and `@' if + we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */ + mask = 0; + syntax = undecided; + *language = cp = name; + cp = _nl_find_language (*language); + + if (*language == cp) + /* This does not make sense: language has to be specified. Use + this entry as it is without exploding. Perhaps it is an alias. */ + cp = strchr (*language, '\0'); + else if (cp[0] == '_') + { + /* Next is the territory. */ + cp[0] = '\0'; + *territory = ++cp; + + while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@' + && cp[0] != '+' && cp[0] != ',' && cp[0] != '_') + ++cp; + + mask |= TERRITORY; + + if (cp[0] == '.') + { + /* Next is the codeset. */ + syntax = xpg; + cp[0] = '\0'; + *codeset = ++cp; + + while (cp[0] != '\0' && cp[0] != '@') + ++cp; + + mask |= XPG_CODESET; + + if (*codeset != cp && (*codeset)[0] != '\0') + { + *normalized_codeset = _nl_normalize_codeset (*codeset, + cp - *codeset); + if (strcmp (*codeset, *normalized_codeset) == 0) + free ((char *) *normalized_codeset); + else + mask |= XPG_NORM_CODESET; + } + } + } + + if (cp[0] == '@' || (syntax != xpg && cp[0] == '+')) + { + /* Next is the modifier. */ + syntax = cp[0] == '@' ? xpg : cen; + cp[0] = '\0'; + *modifier = ++cp; + + while (syntax == cen && cp[0] != '\0' && cp[0] != '+' + && cp[0] != ',' && cp[0] != '_') + ++cp; + + mask |= XPG_MODIFIER | CEN_AUDIENCE; + } + + if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_')) + { + syntax = cen; + + if (cp[0] == '+') + { + /* Next is special application (CEN syntax). */ + cp[0] = '\0'; + *special = ++cp; + + while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_') + ++cp; + + mask |= CEN_SPECIAL; + } + + if (cp[0] == ',') + { + /* Next is sponsor (CEN syntax). */ + cp[0] = '\0'; + *sponsor = ++cp; + + while (cp[0] != '\0' && cp[0] != '_') + ++cp; + + mask |= CEN_SPONSOR; + } + + if (cp[0] == '_') + { + /* Next is revision (CEN syntax). */ + cp[0] = '\0'; + *revision = ++cp; + + mask |= CEN_REVISION; + } + } + + /* For CEN syntax values it might be important to have the + separator character in the file name, not for XPG syntax. */ + if (syntax == xpg) + { + if (*territory != NULL && (*territory)[0] == '\0') + mask &= ~TERRITORY; + + if (*codeset != NULL && (*codeset)[0] == '\0') + mask &= ~XPG_CODESET; + + if (*modifier != NULL && (*modifier)[0] == '\0') + mask &= ~XPG_MODIFIER; + } + + return mask; + } diff -aNrc2 bash-2.05b-patched/lib/intl/finddomain.c bash-3.0/lib/intl/finddomain.c *** bash-2.05b-patched/lib/intl/finddomain.c Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/finddomain.c Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,195 ---- + /* Handle list of needed message catalogs + Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. + Written by Ulrich Drepper , 1995. + + 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 + + #include + #include + #include + #include + + #if defined HAVE_UNISTD_H || defined _LIBC + # include + #endif + + #include "gettextP.h" + #ifdef _LIBC + # include + #else + # include "libgnuintl.h" + #endif + + /* @@ end of prolog @@ */ + /* List of already loaded domains. */ + static struct loaded_l10nfile *_nl_loaded_domains; + + + /* Return a data structure describing the message catalog described by + the DOMAINNAME and CATEGORY parameters with respect to the currently + established bindings. */ + struct loaded_l10nfile * + internal_function + _nl_find_domain (dirname, locale, domainname, domainbinding) + const char *dirname; + char *locale; + const char *domainname; + struct binding *domainbinding; + { + struct loaded_l10nfile *retval; + const char *language; + const char *modifier; + const char *territory; + const char *codeset; + const char *normalized_codeset; + const char *special; + const char *sponsor; + const char *revision; + const char *alias_value; + int mask; + + /* LOCALE can consist of up to four recognized parts for the XPG syntax: + + language[_territory[.codeset]][@modifier] + + and six parts for the CEN syntax: + + language[_territory][+audience][+special][,[sponsor][_revision]] + + Beside the first part all of them are allowed to be missing. If + the full specified locale is not found, the less specific one are + looked for. The various parts will be stripped off according to + the following order: + (1) revision + (2) sponsor + (3) special + (4) codeset + (5) normalized codeset + (6) territory + (7) audience/modifier + */ + + /* If we have already tested for this locale entry there has to + be one data set in the list of loaded domains. */ + retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname, + strlen (dirname) + 1, 0, locale, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, domainname, 0); + if (retval != NULL) + { + /* We know something about this locale. */ + int cnt; + + if (retval->decided == 0) + _nl_load_domain (retval, domainbinding); + + if (retval->data != NULL) + return retval; + + for (cnt = 0; retval->successor[cnt] != NULL; ++cnt) + { + if (retval->successor[cnt]->decided == 0) + _nl_load_domain (retval->successor[cnt], domainbinding); + + if (retval->successor[cnt]->data != NULL) + break; + } + return cnt >= 0 ? retval : NULL; + /* NOTREACHED */ + } + + /* See whether the locale value is an alias. If yes its value + *overwrites* the alias name. No test for the original value is + done. */ + alias_value = _nl_expand_alias (locale); + if (alias_value != NULL) + { + #if defined _LIBC || defined HAVE_STRDUP + locale = strdup (alias_value); + if (locale == NULL) + return NULL; + #else + size_t len = strlen (alias_value) + 1; + locale = (char *) malloc (len); + if (locale == NULL) + return NULL; + + memcpy (locale, alias_value, len); + #endif + } + + /* Now we determine the single parts of the locale name. First + look for the language. Termination symbols are `_' and `@' if + we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */ + mask = _nl_explode_name (locale, &language, &modifier, &territory, + &codeset, &normalized_codeset, &special, + &sponsor, &revision); + + /* Create all possible locale entries which might be interested in + generalization. */ + retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname, + strlen (dirname) + 1, mask, language, territory, + codeset, normalized_codeset, modifier, special, + sponsor, revision, domainname, 1); + if (retval == NULL) + /* This means we are out of core. */ + return NULL; + + if (retval->decided == 0) + _nl_load_domain (retval, domainbinding); + if (retval->data == NULL) + { + int cnt; + for (cnt = 0; retval->successor[cnt] != NULL; ++cnt) + { + if (retval->successor[cnt]->decided == 0) + _nl_load_domain (retval->successor[cnt], domainbinding); + if (retval->successor[cnt]->data != NULL) + break; + } + } + + /* The room for an alias was dynamically allocated. Free it now. */ + if (alias_value != NULL) + free (locale); + + /* The space for normalized_codeset is dynamically allocated. Free it. */ + if (mask & XPG_NORM_CODESET) + free ((void *) normalized_codeset); + + return retval; + } + + + #ifdef _LIBC + libc_freeres_fn (free_mem) + { + struct loaded_l10nfile *runp = _nl_loaded_domains; + + while (runp != NULL) + { + struct loaded_l10nfile *here = runp; + if (runp->data != NULL) + _nl_unload_domain ((struct loaded_domain *) runp->data); + runp = runp->next; + free ((char *) here->filename); + free (here); + } + } + #endif diff -aNrc2 bash-2.05b-patched/lib/intl/gettext.c bash-3.0/lib/intl/gettext.c *** bash-2.05b-patched/lib/intl/gettext.c Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/gettext.c Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,64 ---- + /* Implementation of gettext(3) function. + Copyright (C) 1995, 1997, 2000, 2001, 2002 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 + + #ifdef _LIBC + # define __need_NULL + # include + #else + # include /* Just for NULL. */ + #endif + + #include "gettextP.h" + #ifdef _LIBC + # include + #else + # include "libgnuintl.h" + #endif + + /* @@ end of prolog @@ */ + + /* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ + #ifdef _LIBC + # define GETTEXT __gettext + # define DCGETTEXT INTUSE(__dcgettext) + #else + # define GETTEXT libintl_gettext + # define DCGETTEXT libintl_dcgettext + #endif + + /* Look up MSGID in the current default message catalog for the current + LC_MESSAGES locale. If not found, returns MSGID itself (the default + text). */ + char * + GETTEXT (msgid) + const char *msgid; + { + return DCGETTEXT (NULL, msgid, LC_MESSAGES); + } + + #ifdef _LIBC + /* Alias for function name in GNU C Library. */ + weak_alias (__gettext, gettext); + #endif diff -aNrc2 bash-2.05b-patched/lib/intl/gettextP.h bash-3.0/lib/intl/gettextP.h *** bash-2.05b-patched/lib/intl/gettextP.h Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/gettextP.h Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,224 ---- + /* Header describing internals of libintl library. + Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc. + Written by Ulrich Drepper , 1995. + + 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 _GETTEXTP_H + #define _GETTEXTP_H + + #include /* Get size_t. */ + + #ifdef _LIBC + # include "../iconv/gconv_int.h" + #else + # if HAVE_ICONV + # include + # endif + #endif + + #include "loadinfo.h" + + #include "gmo.h" /* Get nls_uint32. */ + + /* @@ 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 + + #ifndef attribute_hidden + # define attribute_hidden + #endif + + /* Tell the compiler when a conditional or integer expression is + almost always true or almost always false. */ + #ifndef HAVE_BUILTIN_EXPECT + # define __builtin_expect(expr, val) (expr) + #endif + + #ifndef W + # define W(flag, data) ((flag) ? SWAP (data) : (data)) + #endif + + + #ifdef _LIBC + # include + # define SWAP(i) bswap_32 (i) + #else + static inline nls_uint32 + SWAP (i) + nls_uint32 i; + { + return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24); + } + #endif + + + /* In-memory representation of system dependent string. */ + struct sysdep_string_desc + { + /* Length of addressed string, including the trailing NUL. */ + size_t length; + /* Pointer to addressed string. */ + const char *pointer; + }; + + /* The representation of an opened message catalog. */ + struct loaded_domain + { + /* Pointer to memory containing the .mo file. */ + const char *data; + /* 1 if the memory is mmap()ed, 0 if the memory is malloc()ed. */ + int use_mmap; + /* Size of mmap()ed memory. */ + size_t mmap_size; + /* 1 if the .mo file uses a different endianness than this machine. */ + int must_swap; + /* Pointer to additional malloc()ed memory. */ + void *malloced; + + /* Number of static strings pairs. */ + nls_uint32 nstrings; + /* Pointer to descriptors of original strings in the file. */ + const struct string_desc *orig_tab; + /* Pointer to descriptors of translated strings in the file. */ + const struct string_desc *trans_tab; + + /* Number of system dependent strings pairs. */ + nls_uint32 n_sysdep_strings; + /* Pointer to descriptors of original sysdep strings. */ + const struct sysdep_string_desc *orig_sysdep_tab; + /* Pointer to descriptors of translated sysdep strings. */ + const struct sysdep_string_desc *trans_sysdep_tab; + + /* Size of hash table. */ + nls_uint32 hash_size; + /* Pointer to hash table. */ + const nls_uint32 *hash_tab; + /* 1 if the hash table uses a different endianness than this machine. */ + int must_swap_hash_tab; + + int codeset_cntr; + #ifdef _LIBC + __gconv_t conv; + #else + # if HAVE_ICONV + iconv_t conv; + # endif + #endif + char **conv_tab; + + struct expression *plural; + unsigned long int nplurals; + }; + + /* We want to allocate a string at the end of the struct. But ISO C + doesn't allow zero sized arrays. */ + #ifdef __GNUC__ + # define ZERO 0 + #else + # define ZERO 1 + #endif + + /* A set of settings bound to a message domain. Used to store settings + from bindtextdomain() and bind_textdomain_codeset(). */ + struct binding + { + struct binding *next; + char *dirname; + int codeset_cntr; /* Incremented each time codeset changes. */ + char *codeset; + char domainname[ZERO]; + }; + + /* A counter which is incremented each time some previous translations + become invalid. + This variable is part of the external ABI of the GNU libintl. */ + extern int _nl_msg_cat_cntr; + + #ifndef _LIBC + const char *_nl_locale_name PARAMS ((int category, const char *categoryname)); + #endif + + struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname, + char *__locale, + const char *__domainname, + struct binding *__domainbinding)) + internal_function; + void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain, + struct binding *__domainbinding)) + internal_function; + void _nl_unload_domain PARAMS ((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)) + internal_function; + void _nl_free_domain_conv PARAMS ((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)) + 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)); + #else + /* Declare the exported libintl_* functions, in a way that allows us to + call them under their real name. */ + # 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)); + #endif + + /* @@ begin of epilog @@ */ + + #endif /* gettextP.h */ diff -aNrc2 bash-2.05b-patched/lib/intl/gmo.h bash-3.0/lib/intl/gmo.h *** bash-2.05b-patched/lib/intl/gmo.h Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/gmo.h Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,148 ---- + /* Description of GNU message catalog format: general file layout. + Copyright (C) 1995, 1997, 2000-2002 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 _GETTEXT_H + #define _GETTEXT_H 1 + + #include + + /* @@ end of prolog @@ */ + + /* The magic number of the GNU message catalog format. */ + #define _MAGIC 0x950412de + #define _MAGIC_SWAPPED 0xde120495 + + /* Revision number of the currently used .mo (binary) file format. */ + #define MO_REVISION_NUMBER 0 + + /* The following contortions are an attempt to use the C preprocessor + to determine an unsigned integral type that is 32 bits wide. An + alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but + as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work + when cross-compiling. */ + + #if __STDC__ + # define UINT_MAX_32_BITS 4294967295U + #else + # define UINT_MAX_32_BITS 0xFFFFFFFF + #endif + + /* If UINT_MAX isn't defined, assume it's a 32-bit type. + This should be valid for all systems GNU cares about because + that doesn't include 16-bit systems, and only modern systems + (that certainly have ) have 64+-bit integral types. */ + + #ifndef UINT_MAX + # define UINT_MAX UINT_MAX_32_BITS + #endif + + #if UINT_MAX == UINT_MAX_32_BITS + typedef unsigned nls_uint32; + #else + # if USHRT_MAX == UINT_MAX_32_BITS + typedef unsigned short nls_uint32; + # else + # if ULONG_MAX == UINT_MAX_32_BITS + typedef unsigned long nls_uint32; + # else + /* The following line is intended to throw an error. Using #error is + not portable enough. */ + "Cannot determine unsigned 32-bit data type." + # endif + # endif + #endif + + + /* Header for binary .mo file format. */ + struct mo_file_header + { + /* The magic number. */ + nls_uint32 magic; + /* The revision number of the file format. */ + nls_uint32 revision; + + /* The following are only used in .mo files with major revision 0. */ + + /* The number of strings pairs. */ + nls_uint32 nstrings; + /* Offset of table with start offsets of original strings. */ + nls_uint32 orig_tab_offset; + /* Offset of table with start offsets of translated strings. */ + nls_uint32 trans_tab_offset; + /* Size of hash table. */ + nls_uint32 hash_tab_size; + /* Offset of first hash table entry. */ + nls_uint32 hash_tab_offset; + + /* The following are only used in .mo files with minor revision >= 1. */ + + /* The number of system dependent segments. */ + nls_uint32 n_sysdep_segments; + /* Offset of table describing system dependent segments. */ + nls_uint32 sysdep_segments_offset; + /* The number of system dependent strings pairs. */ + nls_uint32 n_sysdep_strings; + /* Offset of table with start offsets of original sysdep strings. */ + nls_uint32 orig_sysdep_tab_offset; + /* Offset of table with start offsets of translated sysdep strings. */ + nls_uint32 trans_sysdep_tab_offset; + }; + + /* Descriptor for static string contained in the binary .mo file. */ + struct string_desc + { + /* Length of addressed string, not including the trailing NUL. */ + nls_uint32 length; + /* Offset of string in file. */ + nls_uint32 offset; + }; + + /* The following are only used in .mo files with minor revision >= 1. */ + + /* Descriptor for system dependent string segment. */ + struct sysdep_segment + { + /* Length of addressed string, including the trailing NUL. */ + nls_uint32 length; + /* Offset of string in file. */ + nls_uint32 offset; + }; + + /* Descriptor for system dependent string. */ + struct sysdep_string + { + /* Offset of static string segments in file. */ + nls_uint32 offset; + /* Alternating sequence of static and system dependent segments. + The last segment is a static segment, including the trailing NUL. */ + struct segment_pair + { + /* Size of static segment. */ + nls_uint32 segsize; + /* Reference to system dependent string segment, or ~0 at the end. */ + nls_uint32 sysdepref; + } segments[1]; + }; + + /* Marker for the end of the segments[] array. This has the value 0xFFFFFFFF, + regardless whether 'int' is 16 bit, 32 bit, or 64 bit. */ + #define SEGMENTS_END ((nls_uint32) ~0) + + /* @@ begin of epilog @@ */ + + #endif /* gettext.h */ diff -aNrc2 bash-2.05b-patched/lib/intl/hash-string.h bash-3.0/lib/intl/hash-string.h *** bash-2.05b-patched/lib/intl/hash-string.h Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/hash-string.h Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,59 ---- + /* Description of GNU message catalog format: string hashing function. + Copyright (C) 1995, 1997, 1998, 2000, 2001 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. */ + + /* @@ 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 + + + /* Defines the so called `hashpjw' function by P.J. Weinberger + [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, + 1986, 1987 Bell Telephone Laboratories, Inc.] */ + static unsigned long int hash_string PARAMS ((const char *__str_param)); + + static inline unsigned long int + hash_string (str_param) + const char *str_param; + { + unsigned long int hval, g; + const char *str = str_param; + + /* Compute the hash value for the given string. */ + hval = 0; + while (*str != '\0') + { + hval <<= 4; + hval += (unsigned long int) *str++; + g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4)); + if (g != 0) + { + hval ^= g >> (HASHWORDBITS - 8); + hval ^= g; + } + } + return hval; + } diff -aNrc2 bash-2.05b-patched/lib/intl/intl-compat.c bash-3.0/lib/intl/intl-compat.c *** bash-2.05b-patched/lib/intl/intl-compat.c Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/intl-compat.c Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,151 ---- + /* intl-compat.c - Stub functions to call gettext functions from GNU gettext + Library. + Copyright (C) 1995, 2000-2003 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 + + #include "gettextP.h" + + /* @@ end of prolog @@ */ + + /* This file redirects the gettext functions (without prefix) to those + defined in the included GNU libintl library (with "libintl_" prefix). + It is compiled into libintl in order to make the AM_GNU_GETTEXT test + of gettext <= 0.11.2 work with the libintl library >= 0.11.3 which + has the redirections primarily in the include file. + It is also compiled into libgnuintl so that libgnuintl.so can be used + as LD_PRELOADable library on glibc systems, to provide the extra + features that the functions in the libc don't have (namely, logging). */ + + + #undef gettext + #undef dgettext + #undef dcgettext + #undef ngettext + #undef dngettext + #undef dcngettext + #undef textdomain + #undef bindtextdomain + #undef bind_textdomain_codeset + + + /* 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 + + + DLL_EXPORTED + char * + gettext (msgid) + const char *msgid; + { + return libintl_gettext (msgid); + } + + + DLL_EXPORTED + char * + dgettext (domainname, msgid) + const char *domainname; + const char *msgid; + { + return libintl_dgettext (domainname, msgid); + } + + + DLL_EXPORTED + char * + dcgettext (domainname, msgid, category) + const char *domainname; + const char *msgid; + int category; + { + return libintl_dcgettext (domainname, msgid, category); + } + + + DLL_EXPORTED + char * + ngettext (msgid1, msgid2, n) + const char *msgid1; + const char *msgid2; + unsigned long int n; + { + return libintl_ngettext (msgid1, msgid2, n); + } + + + DLL_EXPORTED + char * + dngettext (domainname, msgid1, msgid2, n) + const char *domainname; + const char *msgid1; + const char *msgid2; + unsigned long int n; + { + return libintl_dngettext (domainname, msgid1, msgid2, n); + } + + + DLL_EXPORTED + char * + dcngettext (domainname, msgid1, msgid2, n, category) + const char *domainname; + const char *msgid1; + const char *msgid2; + unsigned long int n; + int category; + { + return libintl_dcngettext (domainname, msgid1, msgid2, n, category); + } + + + DLL_EXPORTED + char * + textdomain (domainname) + const char *domainname; + { + return libintl_textdomain (domainname); + } + + + DLL_EXPORTED + char * + bindtextdomain (domainname, dirname) + const char *domainname; + const char *dirname; + { + return libintl_bindtextdomain (domainname, dirname); + } + + + DLL_EXPORTED + char * + bind_textdomain_codeset (domainname, codeset) + const char *domainname; + const char *codeset; + { + return libintl_bind_textdomain_codeset (domainname, codeset); + } diff -aNrc2 bash-2.05b-patched/lib/intl/l10nflist.c bash-3.0/lib/intl/l10nflist.c *** bash-2.05b-patched/lib/intl/l10nflist.c Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/l10nflist.c Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,453 ---- + /* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc. + Contributed by Ulrich Drepper , 1995. + + 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 stpcpy(). + 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 + + #include + + #if defined _LIBC || defined HAVE_ARGZ_H + # include + #endif + #include + #include + #include + + #include "loadinfo.h" + + /* On some strange systems still no definition of NULL is found. Sigh! */ + #ifndef NULL + # if defined __STDC__ && __STDC__ + # define NULL ((void *) 0) + # else + # define NULL 0 + # endif + #endif + + /* @@ end of prolog @@ */ + + #ifdef _LIBC + /* Rename the non ANSI C functions. This is required by the standard + because some ANSI C functions will require linking with this object + file and the name space must not be polluted. */ + # ifndef stpcpy + # define stpcpy(dest, src) __stpcpy(dest, src) + # endif + #else + # ifndef HAVE_STPCPY + static char *stpcpy PARAMS ((char *dest, const char *src)); + # endif + #endif + + /* Pathname support. + ISSLASH(C) tests whether C is a directory separator character. + IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not, + it may be concatenated to a directory pathname. + */ + #if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ + /* Win32, OS/2, DOS */ + # define ISSLASH(C) ((C) == '/' || (C) == '\\') + # define HAS_DEVICE(P) \ + ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ + && (P)[1] == ':') + # define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P)) + #else + /* Unix */ + # define ISSLASH(C) ((C) == '/') + # define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0]) + #endif + + /* Define function which are usually not available. */ + + #if !defined _LIBC && !defined HAVE___ARGZ_COUNT + /* Returns the number of strings in ARGZ. */ + static size_t argz_count__ PARAMS ((const char *argz, size_t len)); + + static size_t + argz_count__ (argz, len) + const char *argz; + size_t len; + { + size_t count = 0; + while (len > 0) + { + size_t part_len = strlen (argz); + argz += part_len + 1; + len -= part_len + 1; + count++; + } + return count; + } + # undef __argz_count + # define __argz_count(argz, len) argz_count__ (argz, len) + #else + # ifdef _LIBC + # define __argz_count(argz, len) INTUSE(__argz_count) (argz, len) + # endif + #endif /* !_LIBC && !HAVE___ARGZ_COUNT */ + + #if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY + /* Make '\0' separated arg vector ARGZ printable by converting all the '\0's + except the last into the character SEP. */ + static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep)); + + static void + argz_stringify__ (argz, len, sep) + char *argz; + size_t len; + int sep; + { + while (len > 0) + { + size_t part_len = strlen (argz); + argz += part_len; + len -= part_len + 1; + if (len > 0) + *argz++ = sep; + } + } + # undef __argz_stringify + # define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep) + #else + # ifdef _LIBC + # define __argz_stringify(argz, len, sep) \ + INTUSE(__argz_stringify) (argz, len, sep) + # endif + #endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */ + + #if !defined _LIBC && !defined HAVE___ARGZ_NEXT + static char *argz_next__ PARAMS ((char *argz, size_t argz_len, + const char *entry)); + + static char * + argz_next__ (argz, argz_len, entry) + char *argz; + size_t argz_len; + const char *entry; + { + if (entry) + { + if (entry < argz + argz_len) + entry = strchr (entry, '\0') + 1; + + return entry >= argz + argz_len ? NULL : (char *) entry; + } + else + if (argz_len > 0) + return argz; + else + return 0; + } + # undef __argz_next + # define __argz_next(argz, len, entry) argz_next__ (argz, len, entry) + #endif /* !_LIBC && !HAVE___ARGZ_NEXT */ + + + /* Return number of bits set in X. */ + static int pop PARAMS ((int x)); + + static inline int + pop (x) + int x; + { + /* We assume that no more than 16 bits are used. */ + x = ((x & ~0x5555) >> 1) + (x & 0x5555); + x = ((x & ~0x3333) >> 2) + (x & 0x3333); + x = ((x >> 4) + x) & 0x0f0f; + x = ((x >> 8) + x) & 0xff; + + return x; + } + + + struct loaded_l10nfile * + _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language, + territory, codeset, normalized_codeset, modifier, special, + sponsor, revision, filename, 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; + { + char *abs_filename; + struct loaded_l10nfile **lastp; + struct loaded_l10nfile *retval; + char *cp; + size_t dirlist_count; + size_t entries; + int cnt; + + /* If LANGUAGE contains an absolute directory specification, we ignore + DIRLIST. */ + if (IS_ABSOLUTE_PATH (language)) + dirlist_len = 0; + + /* Allocate room for the full file name. */ + abs_filename = (char *) malloc (dirlist_len + + strlen (language) + + ((mask & TERRITORY) != 0 + ? strlen (territory) + 1 : 0) + + ((mask & XPG_CODESET) != 0 + ? strlen (codeset) + 1 : 0) + + ((mask & XPG_NORM_CODESET) != 0 + ? strlen (normalized_codeset) + 1 : 0) + + (((mask & XPG_MODIFIER) != 0 + || (mask & CEN_AUDIENCE) != 0) + ? strlen (modifier) + 1 : 0) + + ((mask & CEN_SPECIAL) != 0 + ? strlen (special) + 1 : 0) + + (((mask & CEN_SPONSOR) != 0 + || (mask & CEN_REVISION) != 0) + ? (1 + ((mask & CEN_SPONSOR) != 0 + ? strlen (sponsor) : 0) + + ((mask & CEN_REVISION) != 0 + ? strlen (revision) + 1 : 0)) : 0) + + 1 + strlen (filename) + 1); + + if (abs_filename == NULL) + return NULL; + + /* Construct file name. */ + cp = abs_filename; + if (dirlist_len > 0) + { + memcpy (cp, dirlist, dirlist_len); + __argz_stringify (cp, dirlist_len, PATH_SEPARATOR); + cp += dirlist_len; + cp[-1] = '/'; + } + + cp = stpcpy (cp, language); + + if ((mask & TERRITORY) != 0) + { + *cp++ = '_'; + cp = stpcpy (cp, territory); + } + if ((mask & XPG_CODESET) != 0) + { + *cp++ = '.'; + cp = stpcpy (cp, codeset); + } + if ((mask & XPG_NORM_CODESET) != 0) + { + *cp++ = '.'; + cp = stpcpy (cp, normalized_codeset); + } + if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0) + { + /* This component can be part of both syntaces but has different + leading characters. For CEN we use `+', else `@'. */ + *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@'; + cp = stpcpy (cp, modifier); + } + if ((mask & CEN_SPECIAL) != 0) + { + *cp++ = '+'; + cp = stpcpy (cp, special); + } + if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0) + { + *cp++ = ','; + if ((mask & CEN_SPONSOR) != 0) + cp = stpcpy (cp, sponsor); + if ((mask & CEN_REVISION) != 0) + { + *cp++ = '_'; + cp = stpcpy (cp, revision); + } + } + + *cp++ = '/'; + stpcpy (cp, filename); + + /* Look in list of already loaded domains whether it is already + available. */ + lastp = l10nfile_list; + for (retval = *l10nfile_list; retval != NULL; retval = retval->next) + if (retval->filename != NULL) + { + int compare = strcmp (retval->filename, abs_filename); + if (compare == 0) + /* We found it! */ + break; + if (compare < 0) + { + /* It's not in the list. */ + retval = NULL; + break; + } + + lastp = &retval->next; + } + + if (retval != NULL || do_allocate == 0) + { + free (abs_filename); + return retval; + } + + dirlist_count = (dirlist_len > 0 ? __argz_count (dirlist, dirlist_len) : 1); + + /* Allocate a new loaded_l10nfile. */ + retval = + (struct loaded_l10nfile *) + malloc (sizeof (*retval) + + (((dirlist_count << pop (mask)) + (dirlist_count > 1 ? 1 : 0)) + * sizeof (struct loaded_l10nfile *))); + if (retval == NULL) + return NULL; + + retval->filename = abs_filename; + + /* We set retval->data to NULL here; it is filled in later. + Setting retval->decided to 1 here means that retval does not + correspond to a real file (dirlist_count > 1) or is not worth + looking up (if an unnormalized codeset was specified). */ + retval->decided = (dirlist_count > 1 + || ((mask & XPG_CODESET) != 0 + && (mask & XPG_NORM_CODESET) != 0)); + retval->data = NULL; + + retval->next = *lastp; + *lastp = retval; + + entries = 0; + /* Recurse to fill the inheritance list of RETVAL. + If the DIRLIST is a real list (i.e. DIRLIST_COUNT > 1), the RETVAL + entry does not correspond to a real file; retval->filename contains + colons. In this case we loop across all elements of DIRLIST and + across all bit patterns dominated by MASK. + If the DIRLIST is a single directory or entirely redundant (i.e. + DIRLIST_COUNT == 1), we loop across all bit patterns dominated by + MASK, excluding MASK itself. + In either case, we loop down from MASK to 0. This has the effect + that the extra bits in the locale name are dropped in this order: + first the modifier, then the territory, then the codeset, then the + normalized_codeset. */ + for (cnt = dirlist_count > 1 ? mask : mask - 1; cnt >= 0; --cnt) + if ((cnt & ~mask) == 0 + && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0) + && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0)) + { + if (dirlist_count > 1) + { + /* Iterate over all elements of the DIRLIST. */ + char *dir = NULL; + + while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir)) + != NULL) + retval->successor[entries++] + = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, + cnt, language, territory, codeset, + normalized_codeset, modifier, special, + sponsor, revision, filename, 1); + } + else + retval->successor[entries++] + = _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, + cnt, language, territory, codeset, + normalized_codeset, modifier, special, + sponsor, revision, filename, 1); + } + retval->successor[entries] = NULL; + + return retval; + } + + /* Normalize codeset name. There is no standard for the codeset + names. Normalization allows the user to use any of the common + names. The return value is dynamically allocated and has to be + freed by the caller. */ + const char * + _nl_normalize_codeset (codeset, name_len) + const char *codeset; + size_t name_len; + { + int len = 0; + int only_digit = 1; + char *retval; + char *wp; + size_t cnt; + + for (cnt = 0; cnt < name_len; ++cnt) + if (isalnum ((unsigned char) codeset[cnt])) + { + ++len; + + if (isalpha ((unsigned char) codeset[cnt])) + only_digit = 0; + } + + retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1); + + if (retval != NULL) + { + if (only_digit) + wp = stpcpy (retval, "iso"); + else + wp = retval; + + for (cnt = 0; cnt < name_len; ++cnt) + if (isalpha ((unsigned char) codeset[cnt])) + *wp++ = tolower ((unsigned char) codeset[cnt]); + else if (isdigit ((unsigned char) codeset[cnt])) + *wp++ = codeset[cnt]; + + *wp = '\0'; + } + + return (const char *) retval; + } + + + /* @@ begin of epilog @@ */ + + /* We don't want libintl.a to depend on any other library. So we + avoid the non-standard function stpcpy. In GNU C Library this + function is available, though. Also allow the symbol HAVE_STPCPY + to be defined. */ + #if !_LIBC && !HAVE_STPCPY + static char * + stpcpy (dest, src) + char *dest; + const char *src; + { + while ((*dest++ = *src++) != '\0') + /* Do nothing. */ ; + return dest - 1; + } + #endif diff -aNrc2 bash-2.05b-patched/lib/intl/libgnuintl.h.in bash-3.0/lib/intl/libgnuintl.h.in *** bash-2.05b-patched/lib/intl/libgnuintl.h.in Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/libgnuintl.h.in Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,309 ---- + /* Message catalogs for internationalization. + 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 + 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 _LIBINTL_H + #define _LIBINTL_H 1 + + #include + + /* The LC_MESSAGES locale category is the category used by the functions + gettext() and dgettext(). It is specified in POSIX, but not in ANSI C. + On systems that don't define it, use an arbitrary value instead. + On Solaris, defines __LOCALE_H (or _LOCALE_H in Solaris 2.5) + then includes (i.e. this file!) and then only defines + LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES + in this case. */ + #if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun)) + # define LC_MESSAGES 1729 + #endif + + /* We define an additional symbol to signal that we use the GNU + implementation of gettext. */ + #define __USE_GNU_GETTEXT 1 + + /* Provide information about the supported file formats. Returns the + maximum minor revision number supported for a given major revision. */ + #define __GNU_GETTEXT_SUPPORTED_REVISION(major) \ + ((major) == 0 ? 1 : -1) + + /* Resolve a platform specific conflict on DJGPP. GNU gettext takes + precedence over _conio_gettext. */ + #ifdef __DJGPP__ + # 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 + + + /* We redirect the functions to those prefixed with "libintl_". This is + necessary, because some systems define gettext/textdomain/... in the C + library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer). + If we used the unprefixed names, there would be cases where the + definition in the C library would override the one in the libintl.so + shared library. Recall that on ELF systems, the symbols are looked + up in the following order: + 1. in the executable, + 2. in the shared libraries specified on the link command line, in order, + 3. in the dependencies of the shared libraries specified on the link + command line, + 4. in the dlopen()ed shared libraries, in the order in which they were + dlopen()ed. + The definition in the C library would override the one in libintl.so if + either + * -lc is given on the link command line and -lintl isn't, or + * -lc is given on the link command line before -lintl, or + * libintl.so is a dependency of a dlopen()ed shared library but not + linked to the executable at link time. + Since Solaris gettext() behaves differently than GNU gettext(), this + would be unacceptable. + + The redirection happens by default through macros in C, so that &gettext + is independent of the compilation unit, but through inline functions in + C++, in order not to interfere with the name mangling of class fields or + class methods called 'gettext'. */ + + /* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS. + 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) + # define _INTL_REDIRECT_ASM + # else + # ifdef __cplusplus + # define _INTL_REDIRECT_INLINE + # else + # define _INTL_REDIRECT_MACROS + # endif + # endif + #endif + /* Auxiliary macros. */ + #ifdef _INTL_REDIRECT_ASM + # define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname)) + # define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring + # define _INTL_STRINGIFY(prefix) #prefix + #else + # define _INTL_ASM(cname) + #endif + + /* Look up MSGID in the current default message catalog for the current + LC_MESSAGES locale. If not found, returns MSGID itself (the default + text). */ + #ifdef _INTL_REDIRECT_INLINE + extern char *libintl_gettext (const char *__msgid); + static inline char *gettext (const char *__msgid) + { + return libintl_gettext (__msgid); + } + #else + #ifdef _INTL_REDIRECT_MACROS + # define gettext libintl_gettext + #endif + extern char *gettext _INTL_PARAMS ((const char *__msgid)) + _INTL_ASM (libintl_gettext); + #endif + + /* Look up MSGID in the DOMAINNAME message catalog for the current + LC_MESSAGES locale. */ + #ifdef _INTL_REDIRECT_INLINE + extern char *libintl_dgettext (const char *__domainname, const char *__msgid); + static inline char *dgettext (const char *__domainname, const char *__msgid) + { + return libintl_dgettext (__domainname, __msgid); + } + #else + #ifdef _INTL_REDIRECT_MACROS + # define dgettext libintl_dgettext + #endif + extern char *dgettext _INTL_PARAMS ((const char *__domainname, + const char *__msgid)) + _INTL_ASM (libintl_dgettext); + #endif + + /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY + locale. */ + #ifdef _INTL_REDIRECT_INLINE + extern char *libintl_dcgettext (const char *__domainname, const char *__msgid, + int __category); + static inline char *dcgettext (const char *__domainname, const char *__msgid, + int __category) + { + return libintl_dcgettext (__domainname, __msgid, __category); + } + #else + #ifdef _INTL_REDIRECT_MACROS + # define dcgettext libintl_dcgettext + #endif + extern char *dcgettext _INTL_PARAMS ((const char *__domainname, + const char *__msgid, + int __category)) + _INTL_ASM (libintl_dcgettext); + #endif + + + /* Similar to `gettext' but select the plural form corresponding to the + number N. */ + #ifdef _INTL_REDIRECT_INLINE + extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2, + unsigned long int __n); + static inline char *ngettext (const char *__msgid1, const char *__msgid2, + unsigned long int __n) + { + return libintl_ngettext (__msgid1, __msgid2, __n); + } + #else + #ifdef _INTL_REDIRECT_MACROS + # define ngettext libintl_ngettext + #endif + extern char *ngettext _INTL_PARAMS ((const char *__msgid1, + const char *__msgid2, + unsigned long int __n)) + _INTL_ASM (libintl_ngettext); + #endif + + /* Similar to `dgettext' but select the plural form corresponding to the + number N. */ + #ifdef _INTL_REDIRECT_INLINE + extern char *libintl_dngettext (const char *__domainname, const char *__msgid1, + const char *__msgid2, unsigned long int __n); + static inline char *dngettext (const char *__domainname, const char *__msgid1, + const char *__msgid2, unsigned long int __n) + { + return libintl_dngettext (__domainname, __msgid1, __msgid2, __n); + } + #else + #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)) + _INTL_ASM (libintl_dngettext); + #endif + + /* Similar to `dcgettext' but select the plural form corresponding to the + number N. */ + #ifdef _INTL_REDIRECT_INLINE + extern char *libintl_dcngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category); + static inline char *dcngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category) + { + return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category); + } + #else + #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)) + _INTL_ASM (libintl_dcngettext); + #endif + + + /* Set the current default message catalog to DOMAINNAME. + If DOMAINNAME is null, return the current default. + If DOMAINNAME is "", reset to the default of "messages". */ + #ifdef _INTL_REDIRECT_INLINE + extern char *libintl_textdomain (const char *__domainname); + static inline char *textdomain (const char *__domainname) + { + return libintl_textdomain (__domainname); + } + #else + #ifdef _INTL_REDIRECT_MACROS + # define textdomain libintl_textdomain + #endif + extern char *textdomain _INTL_PARAMS ((const char *__domainname)) + _INTL_ASM (libintl_textdomain); + #endif + + /* Specify that the DOMAINNAME message catalog will be found + in DIRNAME rather than in the system locale data base. */ + #ifdef _INTL_REDIRECT_INLINE + extern char *libintl_bindtextdomain (const char *__domainname, + const char *__dirname); + static inline char *bindtextdomain (const char *__domainname, + const char *__dirname) + { + return libintl_bindtextdomain (__domainname, __dirname); + } + #else + #ifdef _INTL_REDIRECT_MACROS + # define bindtextdomain libintl_bindtextdomain + #endif + extern char *bindtextdomain _INTL_PARAMS ((const char *__domainname, + const char *__dirname)) + _INTL_ASM (libintl_bindtextdomain); + #endif + + /* Specify the character encoding in which the messages from the + DOMAINNAME message catalog will be returned. */ + #ifdef _INTL_REDIRECT_INLINE + extern char *libintl_bind_textdomain_codeset (const char *__domainname, + const char *__codeset); + static inline char *bind_textdomain_codeset (const char *__domainname, + const char *__codeset) + { + return libintl_bind_textdomain_codeset (__domainname, __codeset); + } + #else + #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)) + _INTL_ASM (libintl_bind_textdomain_codeset); + #endif + + + /* Support for relocatable packages. */ + + /* Sets the original and the current installation prefix of the package. + Relocation simply replaces a pathname starting with the original prefix + by the corresponding pathname with the current prefix instead. Both + prefixes should be directory names without trailing slash (i.e. use "" + 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)); + + + #ifdef __cplusplus + } + #endif + + #endif /* libintl.h */ diff -aNrc2 bash-2.05b-patched/lib/intl/loadinfo.h bash-3.0/lib/intl/loadinfo.h *** bash-2.05b-patched/lib/intl/loadinfo.h Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/loadinfo.h Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,156 ---- + /* Copyright (C) 1996-1999, 2000-2002 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1996. + + 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 _LOADINFO_H + #define _LOADINFO_H 1 + + /* Declarations of locale dependent catalog lookup functions. + Implemented in + + localealias.c Possibly replace a locale name by another. + explodename.c Split a locale name into its various fields. + l10nflist.c Generate a list of filenames of possible message catalogs. + finddomain.c Find and open the relevant message catalogs. + + The main function _nl_find_domain() in finddomain.c is declared + 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 + + /* Tell the compiler when a conditional or integer expression is + almost always true or almost always false. */ + #ifndef HAVE_BUILTIN_EXPECT + # define __builtin_expect(expr, val) (expr) + #endif + + /* Separator in PATH like lists of pathnames. */ + #if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ + /* Win32, OS/2, DOS */ + # define PATH_SEPARATOR ';' + #else + /* Unix */ + # define PATH_SEPARATOR ':' + #endif + + /* Encoding of locale name parts. */ + #define CEN_REVISION 1 + #define CEN_SPONSOR 2 + #define CEN_SPECIAL 4 + #define XPG_NORM_CODESET 8 + #define XPG_CODESET 16 + #define TERRITORY 32 + #define CEN_AUDIENCE 64 + #define XPG_MODIFIER 128 + + #define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE) + #define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER) + + + struct loaded_l10nfile + { + const char *filename; + int decided; + + const void *data; + + struct loaded_l10nfile *next; + struct loaded_l10nfile *successor[1]; + }; + + + /* Normalize codeset name. There is no standard for the codeset + names. Normalization allows the user to use any of the common + names. The return value is dynamically allocated and has to be + freed by the caller. */ + extern const char *_nl_normalize_codeset PARAMS ((const char *codeset, + size_t name_len)); + + /* Lookup a locale dependent file. + *L10NFILE_LIST denotes a pool of lookup results of locale dependent + files of the same kind, sorted in decreasing order of ->filename. + DIRLIST and DIRLIST_LEN are an argz list of directories in which to + look, containing at least one directory (i.e. DIRLIST_LEN > 0). + MASK, LANGUAGE, TERRITORY, CODESET, NORMALIZED_CODESET, MODIFIER, + SPECIAL, SPONSOR, REVISION are the pieces of the locale name, as + produced by _nl_explode_name(). FILENAME is the filename suffix. + The return value is the lookup result, either found in *L10NFILE_LIST, + or - if DO_ALLOCATE is nonzero - freshly allocated, or possibly NULL. + If the return value is non-NULL, it is added to *L10NFILE_LIST, and + its ->next field denotes the chaining inside *L10NFILE_LIST, and + 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)); + + /* 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)); + + /* Split a locale name NAME into its pieces: language, modifier, + territory, codeset, special, sponsor, revision. + NAME gets destructively modified: NUL bytes are inserted here and + there. *LANGUAGE gets assigned NAME. Each of *MODIFIER, *TERRITORY, + *CODESET, *SPECIAL, *SPONSOR, *REVISION gets assigned either a + pointer into the old NAME string, or NULL. *NORMALIZED_CODESET + gets assigned the expanded *CODESET, if it is different from *CODESET; + this one is dynamically allocated and has to be freed by the caller. + The return value is a bitmask, where each bit corresponds to one + filled-in value: + XPG_MODIFIER, CEN_AUDIENCE for *MODIFIER, + TERRITORY for *TERRITORY, + XPG_CODESET for *CODESET, + XPG_NORM_CODESET for *NORMALIZED_CODESET, + CEN_SPECIAL for *SPECIAL, + 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)); + + /* 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)); + + #endif /* loadinfo.h */ diff -aNrc2 bash-2.05b-patched/lib/intl/loadmsgcat.c bash-3.0/lib/intl/loadmsgcat.c *** bash-2.05b-patched/lib/intl/loadmsgcat.c Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/loadmsgcat.c Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,1322 ---- + /* Load needed message catalogs. + 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 + 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 mempcpy(). + 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 + + #include + #include + #include + #include + #include + + #ifdef __GNUC__ + # undef alloca + # 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 + #include + + #if defined HAVE_UNISTD_H || defined _LIBC + # include + #endif + + #ifdef _LIBC + # include + # include + #endif + + #if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || (defined _LIBC && defined _POSIX_MAPPED_FILES) + # include + # undef HAVE_MMAP + # define HAVE_MMAP 1 + #else + # undef HAVE_MMAP + #endif + + #if defined HAVE_STDINT_H_WITH_UINTMAX || defined _LIBC + # include + #endif + #if defined HAVE_INTTYPES_H || defined _LIBC + # include + #endif + + #include "gmo.h" + #include "gettextP.h" + #include "hash-string.h" + #include "plural-exp.h" + + #ifdef _LIBC + # include "../locale/localeinfo.h" + #endif + + /* Provide fallback values for macros that ought to be defined in . + Note that our fallback values need not be literal strings, because we don't + use them with preprocessor string concatenation. */ + #if !defined PRId8 || PRI_MACROS_BROKEN + # undef PRId8 + # define PRId8 "d" + #endif + #if !defined PRIi8 || PRI_MACROS_BROKEN + # undef PRIi8 + # define PRIi8 "i" + #endif + #if !defined PRIo8 || PRI_MACROS_BROKEN + # undef PRIo8 + # define PRIo8 "o" + #endif + #if !defined PRIu8 || PRI_MACROS_BROKEN + # undef PRIu8 + # define PRIu8 "u" + #endif + #if !defined PRIx8 || PRI_MACROS_BROKEN + # undef PRIx8 + # define PRIx8 "x" + #endif + #if !defined PRIX8 || PRI_MACROS_BROKEN + # undef PRIX8 + # define PRIX8 "X" + #endif + #if !defined PRId16 || PRI_MACROS_BROKEN + # undef PRId16 + # define PRId16 "d" + #endif + #if !defined PRIi16 || PRI_MACROS_BROKEN + # undef PRIi16 + # define PRIi16 "i" + #endif + #if !defined PRIo16 || PRI_MACROS_BROKEN + # undef PRIo16 + # define PRIo16 "o" + #endif + #if !defined PRIu16 || PRI_MACROS_BROKEN + # undef PRIu16 + # define PRIu16 "u" + #endif + #if !defined PRIx16 || PRI_MACROS_BROKEN + # undef PRIx16 + # define PRIx16 "x" + #endif + #if !defined PRIX16 || PRI_MACROS_BROKEN + # undef PRIX16 + # define PRIX16 "X" + #endif + #if !defined PRId32 || PRI_MACROS_BROKEN + # undef PRId32 + # define PRId32 "d" + #endif + #if !defined PRIi32 || PRI_MACROS_BROKEN + # undef PRIi32 + # define PRIi32 "i" + #endif + #if !defined PRIo32 || PRI_MACROS_BROKEN + # undef PRIo32 + # define PRIo32 "o" + #endif + #if !defined PRIu32 || PRI_MACROS_BROKEN + # undef PRIu32 + # define PRIu32 "u" + #endif + #if !defined PRIx32 || PRI_MACROS_BROKEN + # undef PRIx32 + # define PRIx32 "x" + #endif + #if !defined PRIX32 || PRI_MACROS_BROKEN + # undef PRIX32 + # define PRIX32 "X" + #endif + #if !defined PRId64 || PRI_MACROS_BROKEN + # undef PRId64 + # define PRId64 (sizeof (long) == 8 ? "ld" : "lld") + #endif + #if !defined PRIi64 || PRI_MACROS_BROKEN + # undef PRIi64 + # define PRIi64 (sizeof (long) == 8 ? "li" : "lli") + #endif + #if !defined PRIo64 || PRI_MACROS_BROKEN + # undef PRIo64 + # define PRIo64 (sizeof (long) == 8 ? "lo" : "llo") + #endif + #if !defined PRIu64 || PRI_MACROS_BROKEN + # undef PRIu64 + # define PRIu64 (sizeof (long) == 8 ? "lu" : "llu") + #endif + #if !defined PRIx64 || PRI_MACROS_BROKEN + # undef PRIx64 + # define PRIx64 (sizeof (long) == 8 ? "lx" : "llx") + #endif + #if !defined PRIX64 || PRI_MACROS_BROKEN + # undef PRIX64 + # define PRIX64 (sizeof (long) == 8 ? "lX" : "llX") + #endif + #if !defined PRIdLEAST8 || PRI_MACROS_BROKEN + # undef PRIdLEAST8 + # define PRIdLEAST8 "d" + #endif + #if !defined PRIiLEAST8 || PRI_MACROS_BROKEN + # undef PRIiLEAST8 + # define PRIiLEAST8 "i" + #endif + #if !defined PRIoLEAST8 || PRI_MACROS_BROKEN + # undef PRIoLEAST8 + # define PRIoLEAST8 "o" + #endif + #if !defined PRIuLEAST8 || PRI_MACROS_BROKEN + # undef PRIuLEAST8 + # define PRIuLEAST8 "u" + #endif + #if !defined PRIxLEAST8 || PRI_MACROS_BROKEN + # undef PRIxLEAST8 + # define PRIxLEAST8 "x" + #endif + #if !defined PRIXLEAST8 || PRI_MACROS_BROKEN + # undef PRIXLEAST8 + # define PRIXLEAST8 "X" + #endif + #if !defined PRIdLEAST16 || PRI_MACROS_BROKEN + # undef PRIdLEAST16 + # define PRIdLEAST16 "d" + #endif + #if !defined PRIiLEAST16 || PRI_MACROS_BROKEN + # undef PRIiLEAST16 + # define PRIiLEAST16 "i" + #endif + #if !defined PRIoLEAST16 || PRI_MACROS_BROKEN + # undef PRIoLEAST16 + # define PRIoLEAST16 "o" + #endif + #if !defined PRIuLEAST16 || PRI_MACROS_BROKEN + # undef PRIuLEAST16 + # define PRIuLEAST16 "u" + #endif + #if !defined PRIxLEAST16 || PRI_MACROS_BROKEN + # undef PRIxLEAST16 + # define PRIxLEAST16 "x" + #endif + #if !defined PRIXLEAST16 || PRI_MACROS_BROKEN + # undef PRIXLEAST16 + # define PRIXLEAST16 "X" + #endif + #if !defined PRIdLEAST32 || PRI_MACROS_BROKEN + # undef PRIdLEAST32 + # define PRIdLEAST32 "d" + #endif + #if !defined PRIiLEAST32 || PRI_MACROS_BROKEN + # undef PRIiLEAST32 + # define PRIiLEAST32 "i" + #endif + #if !defined PRIoLEAST32 || PRI_MACROS_BROKEN + # undef PRIoLEAST32 + # define PRIoLEAST32 "o" + #endif + #if !defined PRIuLEAST32 || PRI_MACROS_BROKEN + # undef PRIuLEAST32 + # define PRIuLEAST32 "u" + #endif + #if !defined PRIxLEAST32 || PRI_MACROS_BROKEN + # undef PRIxLEAST32 + # define PRIxLEAST32 "x" + #endif + #if !defined PRIXLEAST32 || PRI_MACROS_BROKEN + # undef PRIXLEAST32 + # define PRIXLEAST32 "X" + #endif + #if !defined PRIdLEAST64 || PRI_MACROS_BROKEN + # undef PRIdLEAST64 + # define PRIdLEAST64 PRId64 + #endif + #if !defined PRIiLEAST64 || PRI_MACROS_BROKEN + # undef PRIiLEAST64 + # define PRIiLEAST64 PRIi64 + #endif + #if !defined PRIoLEAST64 || PRI_MACROS_BROKEN + # undef PRIoLEAST64 + # define PRIoLEAST64 PRIo64 + #endif + #if !defined PRIuLEAST64 || PRI_MACROS_BROKEN + # undef PRIuLEAST64 + # define PRIuLEAST64 PRIu64 + #endif + #if !defined PRIxLEAST64 || PRI_MACROS_BROKEN + # undef PRIxLEAST64 + # define PRIxLEAST64 PRIx64 + #endif + #if !defined PRIXLEAST64 || PRI_MACROS_BROKEN + # undef PRIXLEAST64 + # define PRIXLEAST64 PRIX64 + #endif + #if !defined PRIdFAST8 || PRI_MACROS_BROKEN + # undef PRIdFAST8 + # define PRIdFAST8 "d" + #endif + #if !defined PRIiFAST8 || PRI_MACROS_BROKEN + # undef PRIiFAST8 + # define PRIiFAST8 "i" + #endif + #if !defined PRIoFAST8 || PRI_MACROS_BROKEN + # undef PRIoFAST8 + # define PRIoFAST8 "o" + #endif + #if !defined PRIuFAST8 || PRI_MACROS_BROKEN + # undef PRIuFAST8 + # define PRIuFAST8 "u" + #endif + #if !defined PRIxFAST8 || PRI_MACROS_BROKEN + # undef PRIxFAST8 + # define PRIxFAST8 "x" + #endif + #if !defined PRIXFAST8 || PRI_MACROS_BROKEN + # undef PRIXFAST8 + # define PRIXFAST8 "X" + #endif + #if !defined PRIdFAST16 || PRI_MACROS_BROKEN + # undef PRIdFAST16 + # define PRIdFAST16 "d" + #endif + #if !defined PRIiFAST16 || PRI_MACROS_BROKEN + # undef PRIiFAST16 + # define PRIiFAST16 "i" + #endif + #if !defined PRIoFAST16 || PRI_MACROS_BROKEN + # undef PRIoFAST16 + # define PRIoFAST16 "o" + #endif + #if !defined PRIuFAST16 || PRI_MACROS_BROKEN + # undef PRIuFAST16 + # define PRIuFAST16 "u" + #endif + #if !defined PRIxFAST16 || PRI_MACROS_BROKEN + # undef PRIxFAST16 + # define PRIxFAST16 "x" + #endif + #if !defined PRIXFAST16 || PRI_MACROS_BROKEN + # undef PRIXFAST16 + # define PRIXFAST16 "X" + #endif + #if !defined PRIdFAST32 || PRI_MACROS_BROKEN + # undef PRIdFAST32 + # define PRIdFAST32 "d" + #endif + #if !defined PRIiFAST32 || PRI_MACROS_BROKEN + # undef PRIiFAST32 + # define PRIiFAST32 "i" + #endif + #if !defined PRIoFAST32 || PRI_MACROS_BROKEN + # undef PRIoFAST32 + # define PRIoFAST32 "o" + #endif + #if !defined PRIuFAST32 || PRI_MACROS_BROKEN + # undef PRIuFAST32 + # define PRIuFAST32 "u" + #endif + #if !defined PRIxFAST32 || PRI_MACROS_BROKEN + # undef PRIxFAST32 + # define PRIxFAST32 "x" + #endif + #if !defined PRIXFAST32 || PRI_MACROS_BROKEN + # undef PRIXFAST32 + # define PRIXFAST32 "X" + #endif + #if !defined PRIdFAST64 || PRI_MACROS_BROKEN + # undef PRIdFAST64 + # define PRIdFAST64 PRId64 + #endif + #if !defined PRIiFAST64 || PRI_MACROS_BROKEN + # undef PRIiFAST64 + # define PRIiFAST64 PRIi64 + #endif + #if !defined PRIoFAST64 || PRI_MACROS_BROKEN + # undef PRIoFAST64 + # define PRIoFAST64 PRIo64 + #endif + #if !defined PRIuFAST64 || PRI_MACROS_BROKEN + # undef PRIuFAST64 + # define PRIuFAST64 PRIu64 + #endif + #if !defined PRIxFAST64 || PRI_MACROS_BROKEN + # undef PRIxFAST64 + # define PRIxFAST64 PRIx64 + #endif + #if !defined PRIXFAST64 || PRI_MACROS_BROKEN + # undef PRIXFAST64 + # define PRIXFAST64 PRIX64 + #endif + #if !defined PRIdMAX || PRI_MACROS_BROKEN + # undef PRIdMAX + # define PRIdMAX (sizeof (uintmax_t) == sizeof (long) ? "ld" : "lld") + #endif + #if !defined PRIiMAX || PRI_MACROS_BROKEN + # undef PRIiMAX + # define PRIiMAX (sizeof (uintmax_t) == sizeof (long) ? "li" : "lli") + #endif + #if !defined PRIoMAX || PRI_MACROS_BROKEN + # undef PRIoMAX + # define PRIoMAX (sizeof (uintmax_t) == sizeof (long) ? "lo" : "llo") + #endif + #if !defined PRIuMAX || PRI_MACROS_BROKEN + # undef PRIuMAX + # define PRIuMAX (sizeof (uintmax_t) == sizeof (long) ? "lu" : "llu") + #endif + #if !defined PRIxMAX || PRI_MACROS_BROKEN + # undef PRIxMAX + # define PRIxMAX (sizeof (uintmax_t) == sizeof (long) ? "lx" : "llx") + #endif + #if !defined PRIXMAX || PRI_MACROS_BROKEN + # undef PRIXMAX + # define PRIXMAX (sizeof (uintmax_t) == sizeof (long) ? "lX" : "llX") + #endif + #if !defined PRIdPTR || PRI_MACROS_BROKEN + # undef PRIdPTR + # define PRIdPTR \ + (sizeof (void *) == sizeof (long) ? "ld" : \ + sizeof (void *) == sizeof (int) ? "d" : \ + "lld") + #endif + #if !defined PRIiPTR || PRI_MACROS_BROKEN + # undef PRIiPTR + # define PRIiPTR \ + (sizeof (void *) == sizeof (long) ? "li" : \ + sizeof (void *) == sizeof (int) ? "i" : \ + "lli") + #endif + #if !defined PRIoPTR || PRI_MACROS_BROKEN + # undef PRIoPTR + # define PRIoPTR \ + (sizeof (void *) == sizeof (long) ? "lo" : \ + sizeof (void *) == sizeof (int) ? "o" : \ + "llo") + #endif + #if !defined PRIuPTR || PRI_MACROS_BROKEN + # undef PRIuPTR + # define PRIuPTR \ + (sizeof (void *) == sizeof (long) ? "lu" : \ + sizeof (void *) == sizeof (int) ? "u" : \ + "llu") + #endif + #if !defined PRIxPTR || PRI_MACROS_BROKEN + # undef PRIxPTR + # define PRIxPTR \ + (sizeof (void *) == sizeof (long) ? "lx" : \ + sizeof (void *) == sizeof (int) ? "x" : \ + "llx") + #endif + #if !defined PRIXPTR || PRI_MACROS_BROKEN + # undef PRIXPTR + # define PRIXPTR \ + (sizeof (void *) == sizeof (long) ? "lX" : \ + sizeof (void *) == sizeof (int) ? "X" : \ + "llX") + #endif + + /* @@ end of prolog @@ */ + + #ifdef _LIBC + /* Rename the non ISO C functions. This is required by the standard + because some ISO C functions will require linking with this object + file and the name space must not be polluted. */ + # define open __open + # define close __close + # define read __read + # define mmap __mmap + # define munmap __munmap + #endif + + /* For those losing systems which don't have `alloca' we have to add + some additional code emulating it. */ + #ifdef HAVE_ALLOCA + # define freea(p) /* nothing */ + #else + # define alloca(n) malloc (n) + # define freea(p) free (p) + #endif + + /* For systems that distinguish between text and binary I/O. + O_BINARY is usually declared in . */ + #if !defined O_BINARY && defined _O_BINARY + /* For MSC-compatible compilers. */ + # define O_BINARY _O_BINARY + # define O_TEXT _O_TEXT + #endif + #ifdef __BEOS__ + /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */ + # undef O_BINARY + # undef O_TEXT + #endif + /* On reasonable systems, binary I/O is the default. */ + #ifndef O_BINARY + # define O_BINARY 0 + #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. */ + int _nl_msg_cat_cntr; + + + /* Expand a system dependent string segment. Return NULL if unsupported. */ + static const char * + get_sysdep_segment_value (name) + const char *name; + { + /* Test for an ISO C 99 section 7.8.1 format string directive. + Syntax: + P R I { d | i | o | u | x | X } + { { | LEAST | FAST } { 8 | 16 | 32 | 64 } | MAX | PTR } */ + /* We don't use a table of 14 times 6 'const char *' strings here, because + data relocations cost startup time. */ + if (name[0] == 'P' && name[1] == 'R' && name[2] == 'I') + { + if (name[3] == 'd' || name[3] == 'i' || name[3] == 'o' || name[3] == 'u' + || name[3] == 'x' || name[3] == 'X') + { + if (name[4] == '8' && name[5] == '\0') + { + if (name[3] == 'd') + return PRId8; + if (name[3] == 'i') + return PRIi8; + if (name[3] == 'o') + return PRIo8; + if (name[3] == 'u') + return PRIu8; + if (name[3] == 'x') + return PRIx8; + if (name[3] == 'X') + return PRIX8; + abort (); + } + if (name[4] == '1' && name[5] == '6' && name[6] == '\0') + { + if (name[3] == 'd') + return PRId16; + if (name[3] == 'i') + return PRIi16; + if (name[3] == 'o') + return PRIo16; + if (name[3] == 'u') + return PRIu16; + if (name[3] == 'x') + return PRIx16; + if (name[3] == 'X') + return PRIX16; + abort (); + } + if (name[4] == '3' && name[5] == '2' && name[6] == '\0') + { + if (name[3] == 'd') + return PRId32; + if (name[3] == 'i') + return PRIi32; + if (name[3] == 'o') + return PRIo32; + if (name[3] == 'u') + return PRIu32; + if (name[3] == 'x') + return PRIx32; + if (name[3] == 'X') + return PRIX32; + abort (); + } + if (name[4] == '6' && name[5] == '4' && name[6] == '\0') + { + if (name[3] == 'd') + return PRId64; + if (name[3] == 'i') + return PRIi64; + if (name[3] == 'o') + return PRIo64; + if (name[3] == 'u') + return PRIu64; + if (name[3] == 'x') + return PRIx64; + if (name[3] == 'X') + return PRIX64; + abort (); + } + if (name[4] == 'L' && name[5] == 'E' && name[6] == 'A' + && name[7] == 'S' && name[8] == 'T') + { + if (name[9] == '8' && name[10] == '\0') + { + if (name[3] == 'd') + return PRIdLEAST8; + if (name[3] == 'i') + return PRIiLEAST8; + if (name[3] == 'o') + return PRIoLEAST8; + if (name[3] == 'u') + return PRIuLEAST8; + if (name[3] == 'x') + return PRIxLEAST8; + if (name[3] == 'X') + return PRIXLEAST8; + abort (); + } + if (name[9] == '1' && name[10] == '6' && name[11] == '\0') + { + if (name[3] == 'd') + return PRIdLEAST16; + if (name[3] == 'i') + return PRIiLEAST16; + if (name[3] == 'o') + return PRIoLEAST16; + if (name[3] == 'u') + return PRIuLEAST16; + if (name[3] == 'x') + return PRIxLEAST16; + if (name[3] == 'X') + return PRIXLEAST16; + abort (); + } + if (name[9] == '3' && name[10] == '2' && name[11] == '\0') + { + if (name[3] == 'd') + return PRIdLEAST32; + if (name[3] == 'i') + return PRIiLEAST32; + if (name[3] == 'o') + return PRIoLEAST32; + if (name[3] == 'u') + return PRIuLEAST32; + if (name[3] == 'x') + return PRIxLEAST32; + if (name[3] == 'X') + return PRIXLEAST32; + abort (); + } + if (name[9] == '6' && name[10] == '4' && name[11] == '\0') + { + if (name[3] == 'd') + return PRIdLEAST64; + if (name[3] == 'i') + return PRIiLEAST64; + if (name[3] == 'o') + return PRIoLEAST64; + if (name[3] == 'u') + return PRIuLEAST64; + if (name[3] == 'x') + return PRIxLEAST64; + if (name[3] == 'X') + return PRIXLEAST64; + abort (); + } + } + if (name[4] == 'F' && name[5] == 'A' && name[6] == 'S' + && name[7] == 'T') + { + if (name[8] == '8' && name[9] == '\0') + { + if (name[3] == 'd') + return PRIdFAST8; + if (name[3] == 'i') + return PRIiFAST8; + if (name[3] == 'o') + return PRIoFAST8; + if (name[3] == 'u') + return PRIuFAST8; + if (name[3] == 'x') + return PRIxFAST8; + if (name[3] == 'X') + return PRIXFAST8; + abort (); + } + if (name[8] == '1' && name[9] == '6' && name[10] == '\0') + { + if (name[3] == 'd') + return PRIdFAST16; + if (name[3] == 'i') + return PRIiFAST16; + if (name[3] == 'o') + return PRIoFAST16; + if (name[3] == 'u') + return PRIuFAST16; + if (name[3] == 'x') + return PRIxFAST16; + if (name[3] == 'X') + return PRIXFAST16; + abort (); + } + if (name[8] == '3' && name[9] == '2' && name[10] == '\0') + { + if (name[3] == 'd') + return PRIdFAST32; + if (name[3] == 'i') + return PRIiFAST32; + if (name[3] == 'o') + return PRIoFAST32; + if (name[3] == 'u') + return PRIuFAST32; + if (name[3] == 'x') + return PRIxFAST32; + if (name[3] == 'X') + return PRIXFAST32; + abort (); + } + if (name[8] == '6' && name[9] == '4' && name[10] == '\0') + { + if (name[3] == 'd') + return PRIdFAST64; + if (name[3] == 'i') + return PRIiFAST64; + if (name[3] == 'o') + return PRIoFAST64; + if (name[3] == 'u') + return PRIuFAST64; + if (name[3] == 'x') + return PRIxFAST64; + if (name[3] == 'X') + return PRIXFAST64; + abort (); + } + } + if (name[4] == 'M' && name[5] == 'A' && name[6] == 'X' + && name[7] == '\0') + { + if (name[3] == 'd') + return PRIdMAX; + if (name[3] == 'i') + return PRIiMAX; + if (name[3] == 'o') + return PRIoMAX; + if (name[3] == 'u') + return PRIuMAX; + if (name[3] == 'x') + return PRIxMAX; + if (name[3] == 'X') + return PRIXMAX; + abort (); + } + if (name[4] == 'P' && name[5] == 'T' && name[6] == 'R' + && name[7] == '\0') + { + if (name[3] == 'd') + return PRIdPTR; + if (name[3] == 'i') + return PRIiPTR; + if (name[3] == 'o') + return PRIoPTR; + if (name[3] == 'u') + return PRIuPTR; + if (name[3] == 'x') + return PRIxPTR; + if (name[3] == 'X') + return PRIXPTR; + abort (); + } + } + } + /* Other system dependent strings are not valid. */ + return NULL; + } + + /* Initialize the codeset dependent parts of an opened message catalog. + 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; + { + /* Find out about the character set the file is encoded with. + This can be found (in textual form) in the entry "". If this + entry does not exist or if this does not contain the `charset=' + information, we will assume the charset matches the one the + current locale and we don't have to perform any conversion. */ + char *nullentry; + size_t nullentrylen; + + /* Preinitialize fields, to avoid recursion during _nl_find_msg. */ + domain->codeset_cntr = + (domainbinding != NULL ? domainbinding->codeset_cntr : 0); + #ifdef _LIBC + domain->conv = (__gconv_t) -1; + #else + # if HAVE_ICONV + domain->conv = (iconv_t) -1; + # endif + #endif + domain->conv_tab = NULL; + + /* Get the header entry. */ + nullentry = _nl_find_msg (domain_file, domainbinding, "", &nullentrylen); + + if (nullentry != NULL) + { + #if defined _LIBC || HAVE_ICONV + const char *charsetstr; + + charsetstr = strstr (nullentry, "charset="); + if (charsetstr != NULL) + { + size_t len; + char *charset; + const char *outcharset; + + charsetstr += strlen ("charset="); + len = strcspn (charsetstr, " \t\n"); + + charset = (char *) alloca (len + 1); + # if defined _LIBC || HAVE_MEMPCPY + *((char *) mempcpy (charset, charsetstr, len)) = '\0'; + # else + memcpy (charset, charsetstr, len); + charset[len] = '\0'; + # endif + + /* The output charset should normally be determined by the + locale. But sometimes the locale is not used or not correctly + set up, so we provide a possibility for the user to override + this. Moreover, the value specified through + bind_textdomain_codeset overrides both. */ + if (domainbinding != NULL && domainbinding->codeset != NULL) + outcharset = domainbinding->codeset; + else + { + outcharset = getenv ("OUTPUT_CHARSET"); + if (outcharset == NULL || outcharset[0] == '\0') + { + # ifdef _LIBC + outcharset = _NL_CURRENT (LC_CTYPE, CODESET); + # else + # if HAVE_ICONV + extern const char *locale_charset PARAMS ((void)); + outcharset = locale_charset (); + # endif + # endif + } + } + + # ifdef _LIBC + /* We always want to use transliteration. */ + outcharset = norm_add_slashes (outcharset, "TRANSLIT"); + charset = norm_add_slashes (charset, NULL); + if (__gconv_open (outcharset, charset, &domain->conv, + GCONV_AVOID_NOCONV) + != __GCONV_OK) + domain->conv = (__gconv_t) -1; + # else + # if HAVE_ICONV + /* When using GNU libc >= 2.2 or GNU libiconv >= 1.5, + we want to use transliteration. */ + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \ + || _LIBICONV_VERSION >= 0x0105 + if (strchr (outcharset, '/') == NULL) + { + char *tmp; + + len = strlen (outcharset); + tmp = (char *) alloca (len + 10 + 1); + memcpy (tmp, outcharset, len); + memcpy (tmp + len, "//TRANSLIT", 10 + 1); + outcharset = tmp; + + domain->conv = iconv_open (outcharset, charset); + + freea (outcharset); + } + else + # endif + domain->conv = iconv_open (outcharset, charset); + # endif + # endif + + freea (charset); + } + #endif /* _LIBC || HAVE_ICONV */ + } + + return nullentry; + } + + /* Frees the codeset dependent parts of an opened message catalog. */ + void + internal_function + _nl_free_domain_conv (domain) + struct loaded_domain *domain; + { + if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1) + free (domain->conv_tab); + + #ifdef _LIBC + if (domain->conv != (__gconv_t) -1) + __gconv_close (domain->conv); + #else + # if HAVE_ICONV + if (domain->conv != (iconv_t) -1) + iconv_close (domain->conv); + # endif + #endif + } + + /* Load the message catalogs specified by FILENAME. If it is no valid + message catalog do nothing. */ + void + internal_function + _nl_load_domain (domain_file, domainbinding) + struct loaded_l10nfile *domain_file; + struct binding *domainbinding; + { + int fd; + size_t size; + #ifdef _LIBC + struct stat64 st; + #else + struct stat st; + #endif + struct mo_file_header *data = (struct mo_file_header *) -1; + int use_mmap = 0; + struct loaded_domain *domain; + int revision; + const char *nullentry; + + domain_file->decided = 1; + domain_file->data = NULL; + + /* Note that it would be useless to store domainbinding in domain_file + because domainbinding might be == NULL now but != NULL later (after + a call to bind_textdomain_codeset). */ + + /* If the record does not represent a valid locale the FILENAME + might be NULL. This can happen when according to the given + specification the locale file name is different for XPG and CEN + syntax. */ + if (domain_file->filename == NULL) + return; + + /* Try to open the addressed file. */ + fd = open (domain_file->filename, O_RDONLY | O_BINARY); + if (fd == -1) + return; + + /* We must know about the size of the file. */ + if ( + #ifdef _LIBC + __builtin_expect (fstat64 (fd, &st) != 0, 0) + #else + __builtin_expect (fstat (fd, &st) != 0, 0) + #endif + || __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0) + || __builtin_expect (size < sizeof (struct mo_file_header), 0)) + { + /* Something went wrong. */ + close (fd); + return; + } + + #ifdef HAVE_MMAP + /* Now we are ready to load the file. If mmap() is available we try + this first. If not available or it failed we try to load it. */ + data = (struct mo_file_header *) mmap (NULL, size, PROT_READ, + MAP_PRIVATE, fd, 0); + + if (__builtin_expect (data != (struct mo_file_header *) -1, 1)) + { + /* mmap() call was successful. */ + close (fd); + use_mmap = 1; + } + #endif + + /* If the data is not yet available (i.e. mmap'ed) we try to load + it manually. */ + if (data == (struct mo_file_header *) -1) + { + size_t to_read; + char *read_ptr; + + data = (struct mo_file_header *) malloc (size); + if (data == NULL) + return; + + to_read = size; + read_ptr = (char *) data; + do + { + long int nb = (long int) read (fd, read_ptr, to_read); + if (nb <= 0) + { + #ifdef EINTR + if (nb == -1 && errno == EINTR) + continue; + #endif + close (fd); + return; + } + read_ptr += nb; + to_read -= nb; + } + while (to_read > 0); + + close (fd); + } + + /* Using the magic number we can test whether it really is a message + catalog file. */ + if (__builtin_expect (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED, + 0)) + { + /* The magic number is wrong: not a message catalog file. */ + #ifdef HAVE_MMAP + if (use_mmap) + munmap ((caddr_t) data, size); + else + #endif + free (data); + return; + } + + domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain)); + if (domain == NULL) + return; + domain_file->data = domain; + + domain->data = (char *) data; + domain->use_mmap = use_mmap; + domain->mmap_size = size; + domain->must_swap = data->magic != _MAGIC; + domain->malloced = NULL; + + /* Fill in the information about the available tables. */ + revision = W (domain->must_swap, data->revision); + /* We support only the major revision 0. */ + switch (revision >> 16) + { + case 0: + 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)); + domain->trans_tab = (const struct string_desc *) + ((char *) data + W (domain->must_swap, data->trans_tab_offset)); + domain->hash_size = W (domain->must_swap, data->hash_tab_size); + domain->hash_tab = + (domain->hash_size > 2 + ? (const nls_uint32 *) + ((char *) data + W (domain->must_swap, data->hash_tab_offset)) + : NULL); + domain->must_swap_hash_tab = domain->must_swap; + + /* Now dispatch on the minor revision. */ + switch (revision & 0xffff) + { + case 0: + domain->n_sysdep_strings = 0; + domain->orig_sysdep_tab = NULL; + domain->trans_sysdep_tab = NULL; + break; + case 1: + default: + { + nls_uint32 n_sysdep_strings; + + if (domain->hash_tab == NULL) + /* This is invalid. These minor revisions need a hash table. */ + goto invalid; + + n_sysdep_strings = + W (domain->must_swap, data->n_sysdep_strings); + if (n_sysdep_strings > 0) + { + nls_uint32 n_sysdep_segments; + const struct sysdep_segment *sysdep_segments; + const char **sysdep_segment_values; + const nls_uint32 *orig_sysdep_tab; + const nls_uint32 *trans_sysdep_tab; + 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; + + /* Get the values of the system dependent segments. */ + n_sysdep_segments = + W (domain->must_swap, data->n_sysdep_segments); + sysdep_segments = (const struct sysdep_segment *) + ((char *) data + + W (domain->must_swap, data->sysdep_segments_offset)); + sysdep_segment_values = + alloca (n_sysdep_segments * sizeof (const char *)); + for (i = 0; i < n_sysdep_segments; i++) + { + const char *name = + (char *) data + + W (domain->must_swap, sysdep_segments[i].offset); + nls_uint32 namelen = + W (domain->must_swap, sysdep_segments[i].length); + + if (!(namelen > 0 && name[namelen - 1] == '\0')) + { + freea (sysdep_segment_values); + goto invalid; + } + + sysdep_segment_values[i] = get_sysdep_segment_value (name); + } + + orig_sysdep_tab = (const nls_uint32 *) + ((char *) data + + W (domain->must_swap, data->orig_sysdep_tab_offset)); + trans_sysdep_tab = (const nls_uint32 *) + ((char *) data + + 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++) + { + 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; + + if (sysdepref >= n_sysdep_segments) + { + /* Invalid. */ + freea (sysdep_segment_values); + goto invalid; + } + + need += strlen (sysdep_segment_values[sysdepref]); + } + + memneed += need; + } + + /* 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; + + /* 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). */ + + if (W (domain->must_swap, p->sysdepref) == SEGMENTS_END) + { + /* Only one static segment. */ + inmem_orig_sysdep_tab[i].length = + W (domain->must_swap, p->segsize); + inmem_orig_sysdep_tab[i].pointer = static_segments; + } + else + { + inmem_orig_sysdep_tab[i].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_orig_sysdep_tab[i].length = + mem - inmem_orig_sysdep_tab[i].pointer; + } + } + + /* 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 (;;) + { + 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; + } + } + + freea (sysdep_segment_values); + + 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; + } + } + break; + } + break; + default: + /* This is an invalid revision. */ + invalid: + /* This is an invalid .mo file. */ + if (domain->malloced) + free (domain->malloced); + #ifdef HAVE_MMAP + if (use_mmap) + munmap ((caddr_t) data, size); + else + #endif + free (data); + free (domain); + domain_file->data = NULL; + return; + } + + /* Now initialize the character set converter from the character set + the file is encoded with (found in the header entry) to the domain's + specified character set or the locale's character set. */ + nullentry = _nl_init_domain_conv (domain_file, domain, domainbinding); + + /* Also look for a plural specification. */ + EXTRACT_PLURAL_EXPRESSION (nullentry, &domain->plural, &domain->nplurals); + } + + + #ifdef _LIBC + void + internal_function + _nl_unload_domain (domain) + struct loaded_domain *domain; + { + if (domain->plural != &__gettext_germanic_plural) + __gettext_free_exp (domain->plural); + + _nl_free_domain_conv (domain); + + if (domain->malloced) + free (domain->malloced); + + # ifdef _POSIX_MAPPED_FILES + if (domain->use_mmap) + munmap ((caddr_t) domain->data, domain->mmap_size); + else + # endif /* _POSIX_MAPPED_FILES */ + free ((void *) domain->data); + + free (domain); + } + #endif diff -aNrc2 bash-2.05b-patched/lib/intl/localcharset.c bash-3.0/lib/intl/localcharset.c *** bash-2.05b-patched/lib/intl/localcharset.c Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/localcharset.c Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,398 ---- + /* Determine a canonical name for the current locale's character encoding. + + 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 + 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. */ + + /* Written by Bruno Haible . */ + + #ifdef HAVE_CONFIG_H + # include + #endif + + /* Specification. */ + #include "localcharset.h" + + #if HAVE_STDDEF_H + # include + #endif + + #include + #if HAVE_STRING_H + # include + #else + # include + #endif + #if HAVE_STDLIB_H + # include + #endif + + #if defined _WIN32 || defined __WIN32__ + # undef WIN32 /* avoid warning on mingw32 */ + # define WIN32 + #endif + + #if defined __EMX__ + /* Assume EMX program runs on OS/2, even if compiled under DOS. */ + # define OS2 + #endif + + #if !defined WIN32 + # if HAVE_LANGINFO_CODESET + # include + # else + # if HAVE_SETLOCALE + # include + # endif + # endif + #elif defined WIN32 + # define WIN32_LEAN_AND_MEAN + # include + #endif + #if defined OS2 + # define INCL_DOS + # include + #endif + + #if ENABLE_RELOCATABLE + # include "relocatable.h" + #else + # define relocate(pathname) (pathname) + #endif + + #if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ + /* Win32, OS/2, DOS */ + # define ISSLASH(C) ((C) == '/' || (C) == '\\') + #endif + + #ifndef DIRECTORY_SEPARATOR + # define DIRECTORY_SEPARATOR '/' + #endif + + #ifndef ISSLASH + # define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR) + #endif + + #ifdef HAVE_GETC_UNLOCKED + # undef getc + # define getc getc_unlocked + #endif + + /* The following static variable is declared 'volatile' to avoid a + possible multithread problem in the function get_charset_aliases. If we + are running in a threaded environment, and if two threads initialize + 'charset_aliases' simultaneously, both will produce the same value, + and everything will be ok if the two assignments to 'charset_aliases' + are atomic. But I don't know what will happen if the two assignments mix. */ + #if __STDC__ != 1 + # define volatile /* empty */ + #endif + /* Pointer to the contents of the charset.alias file, if it has already been + read, else NULL. Its format is: + ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */ + static const char * volatile charset_aliases; + + /* Return a pointer to the contents of the charset.alias file. */ + static const char * + get_charset_aliases () + { + const char *cp; + + cp = charset_aliases; + if (cp == NULL) + { + #if !(defined VMS || defined WIN32) + FILE *fp; + const char *dir = relocate (LIBDIR); + const char *base = "charset.alias"; + char *file_name; + + /* Concatenate dir and base into freshly allocated file_name. */ + { + size_t dir_len = strlen (dir); + size_t base_len = strlen (base); + int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1])); + file_name = (char *) malloc (dir_len + add_slash + base_len + 1); + if (file_name != NULL) + { + memcpy (file_name, dir, dir_len); + if (add_slash) + file_name[dir_len] = DIRECTORY_SEPARATOR; + memcpy (file_name + dir_len + add_slash, base, base_len + 1); + } + } + + if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL) + /* Out of memory or file not found, treat it as empty. */ + cp = ""; + else + { + /* Parse the file's contents. */ + int c; + char buf1[50+1]; + char buf2[50+1]; + char *res_ptr = NULL; + size_t res_size = 0; + size_t l1, l2; + + for (;;) + { + c = getc (fp); + if (c == EOF) + break; + if (c == '\n' || c == ' ' || c == '\t') + continue; + if (c == '#') + { + /* Skip comment, to end of line. */ + do + c = getc (fp); + while (!(c == EOF || c == '\n')); + if (c == EOF) + break; + continue; + } + ungetc (c, fp); + if (fscanf (fp, "%50s %50s", buf1, buf2) < 2) + break; + l1 = strlen (buf1); + l2 = strlen (buf2); + if (res_size == 0) + { + res_size = l1 + 1 + l2 + 1; + res_ptr = (char *) malloc (res_size + 1); + } + else + { + res_size += l1 + 1 + l2 + 1; + res_ptr = (char *) realloc (res_ptr, res_size + 1); + } + if (res_ptr == NULL) + { + /* Out of memory. */ + res_size = 0; + break; + } + strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1); + strcpy (res_ptr + res_size - (l2 + 1), buf2); + } + fclose (fp); + if (res_size == 0) + cp = ""; + else + { + *(res_ptr + res_size) = '\0'; + cp = res_ptr; + } + } + + if (file_name != NULL) + free (file_name); + + #else + + # if defined VMS + /* To avoid the troubles of an extra file charset.alias_vms in the + sources of many GNU packages, simply inline the aliases here. */ + /* The list of encodings is taken from the OpenVMS 7.3-1 documentation + "Compaq C Run-Time Library Reference Manual for OpenVMS systems" + section 10.7 "Handling Different Character Sets". */ + cp = "ISO8859-1" "\0" "ISO-8859-1" "\0" + "ISO8859-2" "\0" "ISO-8859-2" "\0" + "ISO8859-5" "\0" "ISO-8859-5" "\0" + "ISO8859-7" "\0" "ISO-8859-7" "\0" + "ISO8859-8" "\0" "ISO-8859-8" "\0" + "ISO8859-9" "\0" "ISO-8859-9" "\0" + /* Japanese */ + "eucJP" "\0" "EUC-JP" "\0" + "SJIS" "\0" "SHIFT_JIS" "\0" + "DECKANJI" "\0" "DEC-KANJI" "\0" + "SDECKANJI" "\0" "EUC-JP" "\0" + /* Chinese */ + "eucTW" "\0" "EUC-TW" "\0" + "DECHANYU" "\0" "DEC-HANYU" "\0" + "DECHANZI" "\0" "GB2312" "\0" + /* Korean */ + "DECKOREAN" "\0" "EUC-KR" "\0"; + # endif + + # if defined WIN32 + /* To avoid the troubles of installing a separate file in the same + directory as the DLL and of retrieving the DLL's directory at + runtime, simply inline the aliases here. */ + + cp = "CP936" "\0" "GBK" "\0" + "CP1361" "\0" "JOHAB" "\0" + "CP20127" "\0" "ASCII" "\0" + "CP20866" "\0" "KOI8-R" "\0" + "CP21866" "\0" "KOI8-RU" "\0" + "CP28591" "\0" "ISO-8859-1" "\0" + "CP28592" "\0" "ISO-8859-2" "\0" + "CP28593" "\0" "ISO-8859-3" "\0" + "CP28594" "\0" "ISO-8859-4" "\0" + "CP28595" "\0" "ISO-8859-5" "\0" + "CP28596" "\0" "ISO-8859-6" "\0" + "CP28597" "\0" "ISO-8859-7" "\0" + "CP28598" "\0" "ISO-8859-8" "\0" + "CP28599" "\0" "ISO-8859-9" "\0" + "CP28605" "\0" "ISO-8859-15" "\0"; + # endif + #endif + + charset_aliases = cp; + } + + return cp; + } + + /* Determine the current locale's character encoding, and canonicalize it + into one of the canonical names listed in config.charset. + The result must not be freed; it is statically allocated. + If the canonical name cannot be determined, the result is a non-canonical + name. */ + + #ifdef STATIC + STATIC + #endif + const char * + locale_charset () + { + const char *codeset; + const char *aliases; + + #if !(defined WIN32 || defined OS2) + + # if HAVE_LANGINFO_CODESET + + /* Most systems support nl_langinfo (CODESET) nowadays. */ + codeset = nl_langinfo (CODESET); + + # else + + /* On old systems which lack it, use setlocale or getenv. */ + const char *locale = NULL; + + /* But most old systems don't have a complete set of locales. Some + (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't + use setlocale here; it would return "C" when it doesn't support the + locale name the user has set. */ + # if HAVE_SETLOCALE && 0 + locale = setlocale (LC_CTYPE, NULL); + # endif + if (locale == NULL || locale[0] == '\0') + { + locale = getenv ("LC_ALL"); + if (locale == NULL || locale[0] == '\0') + { + locale = getenv ("LC_CTYPE"); + if (locale == NULL || locale[0] == '\0') + locale = getenv ("LANG"); + } + } + + /* On some old systems, one used to set locale = "iso8859_1". On others, + you set it to "language_COUNTRY.charset". In any case, we resolve it + through the charset.alias file. */ + codeset = locale; + + # endif + + #elif defined WIN32 + + static char buf[2 + 10 + 1]; + + /* Woe32 has a function returning the locale's codepage as a number. */ + sprintf (buf, "CP%u", GetACP ()); + codeset = buf; + + #elif defined OS2 + + const char *locale; + static char buf[2 + 10 + 1]; + ULONG cp[3]; + ULONG cplen; + + /* Allow user to override the codeset, as set in the operating system, + with standard language environment variables. */ + locale = getenv ("LC_ALL"); + if (locale == NULL || locale[0] == '\0') + { + locale = getenv ("LC_CTYPE"); + if (locale == NULL || locale[0] == '\0') + locale = getenv ("LANG"); + } + if (locale != NULL && locale[0] != '\0') + { + /* If the locale name contains an encoding after the dot, return it. */ + const char *dot = strchr (locale, '.'); + + if (dot != NULL) + { + const char *modifier; + + dot++; + /* Look for the possible @... trailer and remove it, if any. */ + modifier = strchr (dot, '@'); + if (modifier == NULL) + return dot; + if (modifier - dot < sizeof (buf)) + { + memcpy (buf, dot, modifier - dot); + buf [modifier - dot] = '\0'; + return buf; + } + } + + /* Resolve through the charset.alias file. */ + codeset = locale; + } + else + { + /* OS/2 has a function returning the locale's codepage as a number. */ + if (DosQueryCp (sizeof (cp), cp, &cplen)) + codeset = ""; + else + { + sprintf (buf, "CP%u", cp[0]); + codeset = buf; + } + } + + #endif + + if (codeset == NULL) + /* The canonical name cannot be determined. */ + codeset = ""; + + /* Resolve alias. */ + for (aliases = get_charset_aliases (); + *aliases != '\0'; + aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) + if (strcmp (codeset, aliases) == 0 + || (aliases[0] == '*' && aliases[1] == '\0')) + { + codeset = aliases + strlen (aliases) + 1; + break; + } + + /* Don't return an empty string. GNU libc and GNU libiconv interpret + the empty string as denoting "the locale's character encoding", + thus GNU libiconv would call this function a second time. */ + if (codeset[0] == '\0') + codeset = "ASCII"; + + return codeset; + } diff -aNrc2 bash-2.05b-patched/lib/intl/localcharset.h bash-3.0/lib/intl/localcharset.h *** bash-2.05b-patched/lib/intl/localcharset.h Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/localcharset.h Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,42 ---- + /* Determine a canonical name for the current locale's character encoding. + Copyright (C) 2000-2003 Free Software Foundation, Inc. + This file is part of the GNU CHARSET Library. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU 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 _LOCALCHARSET_H + #define _LOCALCHARSET_H + + + #ifdef __cplusplus + extern "C" { + #endif + + + /* Determine the current locale's character encoding, and canonicalize it + into one of the canonical names listed in config.charset. + The result must not be freed; it is statically allocated. + If the canonical name cannot be determined, the result is a non-canonical + name. */ + extern const char * locale_charset (void); + + + #ifdef __cplusplus + } + #endif + + + #endif /* _LOCALCHARSET_H */ diff -aNrc2 bash-2.05b-patched/lib/intl/locale.alias bash-3.0/lib/intl/locale.alias *** bash-2.05b-patched/lib/intl/locale.alias Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/locale.alias Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,78 ---- + # Locale name alias data base. + # Copyright (C) 1996,1997,1998,1999,2000,2001 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. + + # The format of this file is the same as for the corresponding file of + # the X Window System, which normally can be found in + # /usr/lib/X11/locale/locale.alias + # A single line contains two fields: an alias and a substitution value. + # All entries are case independent. + + # Note: This file is far from being complete. If you have a value for + # your own site which you think might be useful for others too, share + # it with the rest of us. Send it using the `glibcbug' script to + # bugs@gnu.org. + + # Packages using this file: + + bokmal no_NO.ISO-8859-1 + bokmål no_NO.ISO-8859-1 + catalan ca_ES.ISO-8859-1 + croatian hr_HR.ISO-8859-2 + czech cs_CZ.ISO-8859-2 + danish da_DK.ISO-8859-1 + dansk da_DK.ISO-8859-1 + deutsch de_DE.ISO-8859-1 + dutch nl_NL.ISO-8859-1 + eesti et_EE.ISO-8859-1 + estonian et_EE.ISO-8859-1 + finnish fi_FI.ISO-8859-1 + français fr_FR.ISO-8859-1 + french fr_FR.ISO-8859-1 + galego gl_ES.ISO-8859-1 + galician gl_ES.ISO-8859-1 + german de_DE.ISO-8859-1 + greek el_GR.ISO-8859-7 + hebrew he_IL.ISO-8859-8 + hrvatski hr_HR.ISO-8859-2 + hungarian hu_HU.ISO-8859-2 + icelandic is_IS.ISO-8859-1 + italian it_IT.ISO-8859-1 + japanese ja_JP.eucJP + japanese.euc ja_JP.eucJP + ja_JP ja_JP.eucJP + ja_JP.ujis ja_JP.eucJP + japanese.sjis ja_JP.SJIS + korean ko_KR.eucKR + 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 + nynorsk nn_NO.ISO-8859-1 + polish pl_PL.ISO-8859-2 + portuguese pt_PT.ISO-8859-1 + romanian ro_RO.ISO-8859-2 + russian ru_RU.ISO-8859-5 + slovak sk_SK.ISO-8859-2 + slovene sl_SI.ISO-8859-2 + slovenian sl_SI.ISO-8859-2 + spanish es_ES.ISO-8859-1 + swedish sv_SE.ISO-8859-1 + thai th_TH.TIS-620 + turkish tr_TR.ISO-8859-9 diff -aNrc2 bash-2.05b-patched/lib/intl/localealias.c bash-3.0/lib/intl/localealias.c *** bash-2.05b-patched/lib/intl/localealias.c Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/localealias.c Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,419 ---- + /* Handle aliases for locale names. + Copyright (C) 1995-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 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 mempcpy(). + 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 + + #include + #include + #if defined _LIBC || defined HAVE___FSETLOCKING + # include + #endif + #include + + #ifdef __GNUC__ + # undef alloca + # 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 + #include + + #include "gettextP.h" + + #if ENABLE_RELOCATABLE + # include "relocatable.h" + #else + # define relocate(pathname) (pathname) + #endif + + /* @@ end of prolog @@ */ + + #ifdef _LIBC + /* Rename the non ANSI C functions. This is required by the standard + because some ANSI C functions will require linking with this object + file and the name space must not be polluted. */ + # define strcasecmp __strcasecmp + + # ifndef mempcpy + # define mempcpy __mempcpy + # endif + # define HAVE_MEMPCPY 1 + # define HAVE___FSETLOCKING 1 + + /* We need locking here since we can be called from different places. */ + # include + + __libc_lock_define_initialized (static, lock); + #endif + + #ifndef internal_function + # define internal_function + #endif + + /* Some optimizations for glibc. */ + #ifdef _LIBC + # define FEOF(fp) feof_unlocked (fp) + # define FGETS(buf, n, fp) fgets_unlocked (buf, n, fp) + #else + # define FEOF(fp) feof (fp) + # define FGETS(buf, n, fp) fgets (buf, n, fp) + #endif + + /* For those losing systems which don't have `alloca' we have to add + some additional code emulating it. */ + #ifdef HAVE_ALLOCA + # define freea(p) /* nothing */ + #else + # define alloca(n) malloc (n) + # define freea(p) free (p) + #endif + + #if defined _LIBC_REENTRANT || defined HAVE_FGETS_UNLOCKED + # undef fgets + # define fgets(buf, len, s) fgets_unlocked (buf, len, s) + #endif + #if defined _LIBC_REENTRANT || defined HAVE_FEOF_UNLOCKED + # undef feof + # define feof(s) feof_unlocked (s) + #endif + + + struct alias_map + { + const char *alias; + const char *value; + }; + + + #ifndef _LIBC + # define libc_freeres_ptr(decl) decl + #endif + + libc_freeres_ptr (static char *string_space); + static size_t string_space_act; + static size_t string_space_max; + libc_freeres_ptr (static struct alias_map *map); + static size_t nmap; + static size_t maxmap; + + + /* Prototypes for local functions. */ + static size_t read_alias_file PARAMS ((const char *fname, int fname_len)) + internal_function; + static int extend_alias_table PARAMS ((void)); + static int alias_compare PARAMS ((const struct alias_map *map1, + const struct alias_map *map2)); + + + const char * + _nl_expand_alias (name) + const char *name; + { + static const char *locale_alias_path; + struct alias_map *retval; + const char *result = NULL; + size_t added; + + #ifdef _LIBC + __libc_lock_lock (lock); + #endif + + if (locale_alias_path == NULL) + locale_alias_path = LOCALE_ALIAS_PATH; + + do + { + struct alias_map item; + + item.alias = name; + + if (nmap > 0) + retval = (struct alias_map *) bsearch (&item, map, nmap, + sizeof (struct alias_map), + (int (*) PARAMS ((const void *, + const void *)) + ) alias_compare); + else + retval = NULL; + + /* We really found an alias. Return the value. */ + if (retval != NULL) + { + result = retval->value; + break; + } + + /* Perhaps we can find another alias file. */ + added = 0; + while (added == 0 && locale_alias_path[0] != '\0') + { + const char *start; + + while (locale_alias_path[0] == PATH_SEPARATOR) + ++locale_alias_path; + start = locale_alias_path; + + while (locale_alias_path[0] != '\0' + && locale_alias_path[0] != PATH_SEPARATOR) + ++locale_alias_path; + + if (start < locale_alias_path) + added = read_alias_file (start, locale_alias_path - start); + } + } + while (added != 0); + + #ifdef _LIBC + __libc_lock_unlock (lock); + #endif + + return result; + } + + + static size_t + internal_function + read_alias_file (fname, fname_len) + const char *fname; + int fname_len; + { + FILE *fp; + char *full_fname; + size_t added; + static const char aliasfile[] = "/locale.alias"; + + full_fname = (char *) alloca (fname_len + sizeof aliasfile); + #ifdef HAVE_MEMPCPY + mempcpy (mempcpy (full_fname, fname, fname_len), + aliasfile, sizeof aliasfile); + #else + memcpy (full_fname, fname, fname_len); + memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile); + #endif + + fp = fopen (relocate (full_fname), "r"); + freea (full_fname); + if (fp == NULL) + return 0; + + #ifdef HAVE___FSETLOCKING + /* No threads present. */ + __fsetlocking (fp, FSETLOCKING_BYCALLER); + #endif + + added = 0; + while (!FEOF (fp)) + { + /* It is a reasonable approach to use a fix buffer here because + a) we are only interested in the first two fields + b) these fields must be usable as file names and so must not + be that long + We avoid a multi-kilobyte buffer here since this would use up + stack space which we might not have if the program ran out of + memory. */ + char buf[400]; + char *alias; + char *value; + char *cp; + + if (FGETS (buf, sizeof buf, fp) == NULL) + /* EOF reached. */ + break; + + cp = buf; + /* Ignore leading white space. */ + while (isspace ((unsigned char) cp[0])) + ++cp; + + /* A leading '#' signals a comment line. */ + if (cp[0] != '\0' && cp[0] != '#') + { + alias = cp++; + while (cp[0] != '\0' && !isspace ((unsigned char) cp[0])) + ++cp; + /* Terminate alias name. */ + if (cp[0] != '\0') + *cp++ = '\0'; + + /* Now look for the beginning of the value. */ + while (isspace ((unsigned char) cp[0])) + ++cp; + + if (cp[0] != '\0') + { + size_t alias_len; + size_t value_len; + + value = cp++; + while (cp[0] != '\0' && !isspace ((unsigned char) cp[0])) + ++cp; + /* Terminate value. */ + if (cp[0] == '\n') + { + /* This has to be done to make the following test + for the end of line possible. We are looking for + the terminating '\n' which do not overwrite here. */ + *cp++ = '\0'; + *cp = '\n'; + } + else if (cp[0] != '\0') + *cp++ = '\0'; + + if (nmap >= maxmap) + if (__builtin_expect (extend_alias_table (), 0)) + return added; + + alias_len = strlen (alias) + 1; + value_len = strlen (value) + 1; + + if (string_space_act + alias_len + value_len > string_space_max) + { + /* Increase size of memory pool. */ + size_t new_size = (string_space_max + + (alias_len + value_len > 1024 + ? alias_len + value_len : 1024)); + char *new_pool = (char *) realloc (string_space, new_size); + if (new_pool == NULL) + return added; + + if (__builtin_expect (string_space != new_pool, 0)) + { + size_t i; + + for (i = 0; i < nmap; i++) + { + map[i].alias += new_pool - string_space; + map[i].value += new_pool - string_space; + } + } + + string_space = new_pool; + string_space_max = new_size; + } + + map[nmap].alias = memcpy (&string_space[string_space_act], + alias, alias_len); + string_space_act += alias_len; + + map[nmap].value = memcpy (&string_space[string_space_act], + value, value_len); + string_space_act += value_len; + + ++nmap; + ++added; + } + } + + /* Possibly not the whole line fits into the buffer. Ignore + the rest of the line. */ + while (strchr (buf, '\n') == NULL) + if (FGETS (buf, sizeof buf, fp) == NULL) + /* Make sure the inner loop will be left. The outer loop + will exit at the `feof' test. */ + break; + } + + /* Should we test for ferror()? I think we have to silently ignore + errors. --drepper */ + fclose (fp); + + if (added > 0) + qsort (map, nmap, sizeof (struct alias_map), + (int (*) PARAMS ((const void *, const void *))) alias_compare); + + return added; + } + + + static int + extend_alias_table () + { + size_t new_size; + struct alias_map *new_map; + + new_size = maxmap == 0 ? 100 : 2 * maxmap; + new_map = (struct alias_map *) realloc (map, (new_size + * sizeof (struct alias_map))); + if (new_map == NULL) + /* Simply don't extend: we don't have any more core. */ + return -1; + + map = new_map; + maxmap = new_size; + return 0; + } + + + static int + alias_compare (map1, map2) + const struct alias_map *map1; + const struct alias_map *map2; + { + #if defined _LIBC || defined HAVE_STRCASECMP + return strcasecmp (map1->alias, map2->alias); + #else + const unsigned char *p1 = (const unsigned char *) map1->alias; + const unsigned char *p2 = (const unsigned char *) map2->alias; + unsigned char c1, c2; + + if (p1 == p2) + return 0; + + do + { + /* I know this seems to be odd but the tolower() function in + some systems libc cannot handle nonalpha characters. */ + c1 = isupper (*p1) ? tolower (*p1) : *p1; + c2 = isupper (*p2) ? tolower (*p2) : *p2; + if (c1 == '\0') + break; + ++p1; + ++p2; + } + while (c1 == c2); + + return c1 - c2; + #endif + } diff -aNrc2 bash-2.05b-patched/lib/intl/localename.c bash-3.0/lib/intl/localename.c *** bash-2.05b-patched/lib/intl/localename.c Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/localename.c Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,772 ---- + /* Determine the current selected locale. + Copyright (C) 1995-1999, 2000-2002 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. */ + + /* Written by Ulrich Drepper , 1995. */ + /* Win32 code written by Tor Lillqvist . */ + + #ifdef HAVE_CONFIG_H + # include + #endif + + #include + #include + + #if defined _WIN32 || defined __WIN32__ + # undef WIN32 /* avoid warning on mingw32 */ + # define WIN32 + #endif + + #ifdef WIN32 + # define WIN32_LEAN_AND_MEAN + # include + /* Mingw headers don't have latest language and sublanguage codes. */ + # ifndef LANG_AFRIKAANS + # define LANG_AFRIKAANS 0x36 + # endif + # ifndef LANG_ALBANIAN + # define LANG_ALBANIAN 0x1c + # endif + # ifndef LANG_ARABIC + # define LANG_ARABIC 0x01 + # endif + # ifndef LANG_ARMENIAN + # define LANG_ARMENIAN 0x2b + # endif + # ifndef LANG_ASSAMESE + # define LANG_ASSAMESE 0x4d + # endif + # ifndef LANG_AZERI + # define LANG_AZERI 0x2c + # endif + # ifndef LANG_BASQUE + # define LANG_BASQUE 0x2d + # endif + # ifndef LANG_BELARUSIAN + # define LANG_BELARUSIAN 0x23 + # endif + # ifndef LANG_BENGALI + # define LANG_BENGALI 0x45 + # endif + # ifndef LANG_CATALAN + # define LANG_CATALAN 0x03 + # endif + # ifndef LANG_DIVEHI + # define LANG_DIVEHI 0x65 + # endif + # ifndef LANG_ESTONIAN + # define LANG_ESTONIAN 0x25 + # endif + # ifndef LANG_FAEROESE + # define LANG_FAEROESE 0x38 + # endif + # ifndef LANG_FARSI + # define LANG_FARSI 0x29 + # endif + # ifndef LANG_GALICIAN + # define LANG_GALICIAN 0x56 + # endif + # ifndef LANG_GEORGIAN + # define LANG_GEORGIAN 0x37 + # endif + # ifndef LANG_GUJARATI + # define LANG_GUJARATI 0x47 + # endif + # ifndef LANG_HEBREW + # define LANG_HEBREW 0x0d + # endif + # ifndef LANG_HINDI + # define LANG_HINDI 0x39 + # endif + # ifndef LANG_INDONESIAN + # define LANG_INDONESIAN 0x21 + # endif + # ifndef LANG_KANNADA + # define LANG_KANNADA 0x4b + # endif + # ifndef LANG_KASHMIRI + # define LANG_KASHMIRI 0x60 + # endif + # ifndef LANG_KAZAK + # define LANG_KAZAK 0x3f + # endif + # ifndef LANG_KONKANI + # define LANG_KONKANI 0x57 + # endif + # ifndef LANG_KYRGYZ + # define LANG_KYRGYZ 0x40 + # endif + # ifndef LANG_LATVIAN + # define LANG_LATVIAN 0x26 + # endif + # ifndef LANG_LITHUANIAN + # define LANG_LITHUANIAN 0x27 + # endif + # ifndef LANG_MACEDONIAN + # define LANG_MACEDONIAN 0x2f + # endif + # ifndef LANG_MALAY + # define LANG_MALAY 0x3e + # endif + # ifndef LANG_MALAYALAM + # define LANG_MALAYALAM 0x4c + # endif + # ifndef LANG_MANIPURI + # define LANG_MANIPURI 0x58 + # endif + # ifndef LANG_MARATHI + # define LANG_MARATHI 0x4e + # endif + # ifndef LANG_MONGOLIAN + # define LANG_MONGOLIAN 0x50 + # endif + # ifndef LANG_NEPALI + # define LANG_NEPALI 0x61 + # endif + # ifndef LANG_ORIYA + # define LANG_ORIYA 0x48 + # endif + # ifndef LANG_PUNJABI + # define LANG_PUNJABI 0x46 + # endif + # ifndef LANG_SANSKRIT + # define LANG_SANSKRIT 0x4f + # endif + # ifndef LANG_SERBIAN + # define LANG_SERBIAN 0x1a + # endif + # ifndef LANG_SINDHI + # define LANG_SINDHI 0x59 + # endif + # ifndef LANG_SLOVAK + # define LANG_SLOVAK 0x1b + # endif + # ifndef LANG_SORBIAN + # define LANG_SORBIAN 0x2e + # endif + # ifndef LANG_SWAHILI + # define LANG_SWAHILI 0x41 + # endif + # ifndef LANG_SYRIAC + # define LANG_SYRIAC 0x5a + # endif + # ifndef LANG_TAMIL + # define LANG_TAMIL 0x49 + # endif + # ifndef LANG_TATAR + # define LANG_TATAR 0x44 + # endif + # ifndef LANG_TELUGU + # define LANG_TELUGU 0x4a + # endif + # ifndef LANG_THAI + # define LANG_THAI 0x1e + # endif + # ifndef LANG_UKRAINIAN + # define LANG_UKRAINIAN 0x22 + # endif + # ifndef LANG_URDU + # define LANG_URDU 0x20 + # endif + # ifndef LANG_UZBEK + # define LANG_UZBEK 0x43 + # endif + # ifndef LANG_VIETNAMESE + # define LANG_VIETNAMESE 0x2a + # endif + # ifndef SUBLANG_ARABIC_SAUDI_ARABIA + # define SUBLANG_ARABIC_SAUDI_ARABIA 0x01 + # endif + # ifndef SUBLANG_ARABIC_IRAQ + # define SUBLANG_ARABIC_IRAQ 0x02 + # endif + # ifndef SUBLANG_ARABIC_EGYPT + # define SUBLANG_ARABIC_EGYPT 0x03 + # endif + # ifndef SUBLANG_ARABIC_LIBYA + # define SUBLANG_ARABIC_LIBYA 0x04 + # endif + # ifndef SUBLANG_ARABIC_ALGERIA + # define SUBLANG_ARABIC_ALGERIA 0x05 + # endif + # ifndef SUBLANG_ARABIC_MOROCCO + # define SUBLANG_ARABIC_MOROCCO 0x06 + # endif + # ifndef SUBLANG_ARABIC_TUNISIA + # define SUBLANG_ARABIC_TUNISIA 0x07 + # endif + # ifndef SUBLANG_ARABIC_OMAN + # define SUBLANG_ARABIC_OMAN 0x08 + # endif + # ifndef SUBLANG_ARABIC_YEMEN + # define SUBLANG_ARABIC_YEMEN 0x09 + # endif + # ifndef SUBLANG_ARABIC_SYRIA + # define SUBLANG_ARABIC_SYRIA 0x0a + # endif + # ifndef SUBLANG_ARABIC_JORDAN + # define SUBLANG_ARABIC_JORDAN 0x0b + # endif + # ifndef SUBLANG_ARABIC_LEBANON + # define SUBLANG_ARABIC_LEBANON 0x0c + # endif + # ifndef SUBLANG_ARABIC_KUWAIT + # define SUBLANG_ARABIC_KUWAIT 0x0d + # endif + # ifndef SUBLANG_ARABIC_UAE + # define SUBLANG_ARABIC_UAE 0x0e + # endif + # ifndef SUBLANG_ARABIC_BAHRAIN + # define SUBLANG_ARABIC_BAHRAIN 0x0f + # endif + # ifndef SUBLANG_ARABIC_QATAR + # define SUBLANG_ARABIC_QATAR 0x10 + # endif + # ifndef SUBLANG_AZERI_LATIN + # define SUBLANG_AZERI_LATIN 0x01 + # endif + # ifndef SUBLANG_AZERI_CYRILLIC + # define SUBLANG_AZERI_CYRILLIC 0x02 + # endif + # ifndef SUBLANG_CHINESE_MACAU + # define SUBLANG_CHINESE_MACAU 0x05 + # endif + # ifndef SUBLANG_ENGLISH_SOUTH_AFRICA + # define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07 + # endif + # ifndef SUBLANG_ENGLISH_JAMAICA + # define SUBLANG_ENGLISH_JAMAICA 0x08 + # endif + # ifndef SUBLANG_ENGLISH_CARIBBEAN + # define SUBLANG_ENGLISH_CARIBBEAN 0x09 + # endif + # ifndef SUBLANG_ENGLISH_BELIZE + # define SUBLANG_ENGLISH_BELIZE 0x0a + # endif + # ifndef SUBLANG_ENGLISH_TRINIDAD + # define SUBLANG_ENGLISH_TRINIDAD 0x0b + # endif + # ifndef SUBLANG_ENGLISH_ZIMBABWE + # define SUBLANG_ENGLISH_ZIMBABWE 0x0c + # endif + # ifndef SUBLANG_ENGLISH_PHILIPPINES + # define SUBLANG_ENGLISH_PHILIPPINES 0x0d + # endif + # ifndef SUBLANG_FRENCH_LUXEMBOURG + # define SUBLANG_FRENCH_LUXEMBOURG 0x05 + # endif + # ifndef SUBLANG_FRENCH_MONACO + # define SUBLANG_FRENCH_MONACO 0x06 + # endif + # ifndef SUBLANG_GERMAN_LUXEMBOURG + # define SUBLANG_GERMAN_LUXEMBOURG 0x04 + # endif + # ifndef SUBLANG_GERMAN_LIECHTENSTEIN + # define SUBLANG_GERMAN_LIECHTENSTEIN 0x05 + # endif + # ifndef SUBLANG_KASHMIRI_INDIA + # define SUBLANG_KASHMIRI_INDIA 0x02 + # endif + # ifndef SUBLANG_MALAY_MALAYSIA + # define SUBLANG_MALAY_MALAYSIA 0x01 + # endif + # ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM + # define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02 + # endif + # ifndef SUBLANG_NEPALI_INDIA + # define SUBLANG_NEPALI_INDIA 0x02 + # endif + # ifndef SUBLANG_SERBIAN_LATIN + # define SUBLANG_SERBIAN_LATIN 0x02 + # endif + # ifndef SUBLANG_SERBIAN_CYRILLIC + # define SUBLANG_SERBIAN_CYRILLIC 0x03 + # endif + # ifndef SUBLANG_SPANISH_GUATEMALA + # define SUBLANG_SPANISH_GUATEMALA 0x04 + # endif + # ifndef SUBLANG_SPANISH_COSTA_RICA + # define SUBLANG_SPANISH_COSTA_RICA 0x05 + # endif + # ifndef SUBLANG_SPANISH_PANAMA + # define SUBLANG_SPANISH_PANAMA 0x06 + # endif + # ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC + # define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07 + # endif + # ifndef SUBLANG_SPANISH_VENEZUELA + # define SUBLANG_SPANISH_VENEZUELA 0x08 + # endif + # ifndef SUBLANG_SPANISH_COLOMBIA + # define SUBLANG_SPANISH_COLOMBIA 0x09 + # endif + # ifndef SUBLANG_SPANISH_PERU + # define SUBLANG_SPANISH_PERU 0x0a + # endif + # ifndef SUBLANG_SPANISH_ARGENTINA + # define SUBLANG_SPANISH_ARGENTINA 0x0b + # endif + # ifndef SUBLANG_SPANISH_ECUADOR + # define SUBLANG_SPANISH_ECUADOR 0x0c + # endif + # ifndef SUBLANG_SPANISH_CHILE + # define SUBLANG_SPANISH_CHILE 0x0d + # endif + # ifndef SUBLANG_SPANISH_URUGUAY + # define SUBLANG_SPANISH_URUGUAY 0x0e + # endif + # ifndef SUBLANG_SPANISH_PARAGUAY + # define SUBLANG_SPANISH_PARAGUAY 0x0f + # endif + # ifndef SUBLANG_SPANISH_BOLIVIA + # define SUBLANG_SPANISH_BOLIVIA 0x10 + # endif + # ifndef SUBLANG_SPANISH_EL_SALVADOR + # define SUBLANG_SPANISH_EL_SALVADOR 0x11 + # endif + # ifndef SUBLANG_SPANISH_HONDURAS + # define SUBLANG_SPANISH_HONDURAS 0x12 + # endif + # ifndef SUBLANG_SPANISH_NICARAGUA + # define SUBLANG_SPANISH_NICARAGUA 0x13 + # endif + # ifndef SUBLANG_SPANISH_PUERTO_RICO + # define SUBLANG_SPANISH_PUERTO_RICO 0x14 + # endif + # ifndef SUBLANG_SWEDISH_FINLAND + # define SUBLANG_SWEDISH_FINLAND 0x02 + # endif + # ifndef SUBLANG_URDU_PAKISTAN + # define SUBLANG_URDU_PAKISTAN 0x01 + # endif + # ifndef SUBLANG_URDU_INDIA + # define SUBLANG_URDU_INDIA 0x02 + # endif + # ifndef SUBLANG_UZBEK_LATIN + # define SUBLANG_UZBEK_LATIN 0x01 + # endif + # ifndef SUBLANG_UZBEK_CYRILLIC + # define SUBLANG_UZBEK_CYRILLIC 0x02 + # endif + #endif + + /* XPG3 defines the result of 'setlocale (category, NULL)' as: + "Directs 'setlocale()' to query 'category' and return the current + setting of 'local'." + However it does not specify the exact format. Neither do SUSV2 and + ISO C 99. So we can use this feature only on selected systems (e.g. + those using GNU C Library). */ + #if defined _LIBC || (defined __GNU_LIBRARY__ && __GNU_LIBRARY__ >= 2) + # define HAVE_LOCALE_NULL + #endif + + /* Determine the current locale's name, and canonicalize it into XPG syntax + language[_territory[.codeset]][@modifier] + The codeset part in the result is not reliable; the locale_charset() + should be used for codeset information instead. + The result must not be freed; it is statically allocated. */ + + const char * + _nl_locale_name (category, categoryname) + int category; + const char *categoryname; + { + const char *retval; + + #ifndef WIN32 + + /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'. + On some systems this can be done by the 'setlocale' function itself. */ + # if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL + retval = setlocale (category, NULL); + # else + /* Setting of LC_ALL overwrites all other. */ + retval = getenv ("LC_ALL"); + if (retval == NULL || retval[0] == '\0') + { + /* Next comes the name of the desired category. */ + retval = getenv (categoryname); + if (retval == NULL || retval[0] == '\0') + { + /* Last possibility is the LANG environment variable. */ + retval = getenv ("LANG"); + if (retval == NULL || retval[0] == '\0') + /* We use C as the default domain. POSIX says this is + implementation defined. */ + retval = "C"; + } + } + # endif + + return retval; + + #else /* WIN32 */ + + /* Return an XPG style locale name language[_territory][@modifier]. + Don't even bother determining the codeset; it's not useful in this + context, because message catalogs are not specific to a single + codeset. */ + + LCID lcid; + LANGID langid; + int primary, sub; + + /* Let the user override the system settings through environment + variables, as on POSIX systems. */ + retval = getenv ("LC_ALL"); + if (retval != NULL && retval[0] != '\0') + return retval; + retval = getenv (categoryname); + if (retval != NULL && retval[0] != '\0') + return retval; + retval = getenv ("LANG"); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* Use native Win32 API locale ID. */ + lcid = GetThreadLocale (); + + /* Strip off the sorting rules, keep only the language part. */ + langid = LANGIDFROMLCID (lcid); + + /* Split into language and territory part. */ + primary = PRIMARYLANGID (langid); + sub = SUBLANGID (langid); + + /* Dispatch on language. + See also http://www.unicode.org/unicode/onlinedat/languages.html . + For details about languages, see http://www.ethnologue.com/ . */ + switch (primary) + { + case LANG_AFRIKAANS: return "af_ZA"; + case LANG_ALBANIAN: return "sq_AL"; + case 0x5e: /* AMHARIC */ return "am_ET"; + case LANG_ARABIC: + switch (sub) + { + case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA"; + case SUBLANG_ARABIC_IRAQ: return "ar_IQ"; + case SUBLANG_ARABIC_EGYPT: return "ar_EG"; + case SUBLANG_ARABIC_LIBYA: return "ar_LY"; + case SUBLANG_ARABIC_ALGERIA: return "ar_DZ"; + case SUBLANG_ARABIC_MOROCCO: return "ar_MA"; + case SUBLANG_ARABIC_TUNISIA: return "ar_TN"; + case SUBLANG_ARABIC_OMAN: return "ar_OM"; + case SUBLANG_ARABIC_YEMEN: return "ar_YE"; + case SUBLANG_ARABIC_SYRIA: return "ar_SY"; + case SUBLANG_ARABIC_JORDAN: return "ar_JO"; + case SUBLANG_ARABIC_LEBANON: return "ar_LB"; + case SUBLANG_ARABIC_KUWAIT: return "ar_KW"; + case SUBLANG_ARABIC_UAE: return "ar_AE"; + case SUBLANG_ARABIC_BAHRAIN: return "ar_BH"; + case SUBLANG_ARABIC_QATAR: return "ar_QA"; + } + return "ar"; + case LANG_ARMENIAN: return "hy_AM"; + case LANG_ASSAMESE: return "as_IN"; + case LANG_AZERI: + switch (sub) + { + /* FIXME: Adjust this when Azerbaijani locales appear on Unix. */ + case SUBLANG_AZERI_LATIN: return "az_AZ@latin"; + case SUBLANG_AZERI_CYRILLIC: return "az_AZ@cyrillic"; + } + return "az"; + 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_BULGARIAN: return "bg_BG"; + case 0x55: /* BURMESE */ return "my_MM"; + case 0x53: /* CAMBODIAN */ return "km_KH"; + case LANG_CATALAN: return "ca_ES"; + case 0x5c: /* CHEROKEE */ return "chr_US"; + case LANG_CHINESE: + switch (sub) + { + case SUBLANG_CHINESE_TRADITIONAL: return "zh_TW"; + case SUBLANG_CHINESE_SIMPLIFIED: return "zh_CN"; + case SUBLANG_CHINESE_HONGKONG: return "zh_HK"; + case SUBLANG_CHINESE_SINGAPORE: return "zh_SG"; + case SUBLANG_CHINESE_MACAU: return "zh_MO"; + } + return "zh"; + case LANG_CROATIAN: /* LANG_CROATIAN == LANG_SERBIAN + * What used to be called Serbo-Croatian + * should really now be two separate + * languages because of political reasons. + * (Says tml, who knows nothing about Serbian + * or Croatian.) + * (I can feel those flames coming already.) + */ + switch (sub) + { + case SUBLANG_DEFAULT: return "hr_HR"; + case SUBLANG_SERBIAN_LATIN: return "sr_YU"; + case SUBLANG_SERBIAN_CYRILLIC: return "sr_YU@cyrillic"; + } + return "hr"; + case LANG_CZECH: return "cs_CZ"; + case LANG_DANISH: return "da_DK"; + case LANG_DIVEHI: return "div_MV"; + case LANG_DUTCH: + switch (sub) + { + case SUBLANG_DUTCH: return "nl_NL"; + case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE"; + } + return "nl"; + case 0x66: /* EDO */ return "bin_NG"; + case LANG_ENGLISH: + switch (sub) + { + /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought + * English was the language spoken in England. + * Oh well. + */ + case SUBLANG_ENGLISH_US: return "en_US"; + case SUBLANG_ENGLISH_UK: return "en_GB"; + case SUBLANG_ENGLISH_AUS: return "en_AU"; + case SUBLANG_ENGLISH_CAN: return "en_CA"; + case SUBLANG_ENGLISH_NZ: return "en_NZ"; + case SUBLANG_ENGLISH_EIRE: return "en_IE"; + case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA"; + case SUBLANG_ENGLISH_JAMAICA: return "en_JM"; + case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */ + case SUBLANG_ENGLISH_BELIZE: return "en_BZ"; + case SUBLANG_ENGLISH_TRINIDAD: return "en_TT"; + case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW"; + case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH"; + } + return "en"; + case LANG_ESTONIAN: return "et_EE"; + case LANG_FAEROESE: return "fo_FO"; + case LANG_FARSI: return "fa_IR"; + case LANG_FINNISH: return "fi_FI"; + case LANG_FRENCH: + switch (sub) + { + case SUBLANG_FRENCH: return "fr_FR"; + case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE"; + case SUBLANG_FRENCH_CANADIAN: return "fr_CA"; + case SUBLANG_FRENCH_SWISS: return "fr_CH"; + case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU"; + case SUBLANG_FRENCH_MONACO: return "fr_MC"; + } + return "fr"; + case 0x62: /* FRISIAN */ return "fy_NL"; + case 0x67: /* FULFULDE */ return "ful_NG"; + case 0x3c: /* GAELIC */ + switch (sub) + { + case 0x01: /* SCOTTISH */ return "gd_GB"; + case 0x02: /* IRISH */ return "ga_IE"; + } + return "C"; + case LANG_GALICIAN: return "gl_ES"; + case LANG_GEORGIAN: return "ka_GE"; + case LANG_GERMAN: + switch (sub) + { + case SUBLANG_GERMAN: return "de_DE"; + case SUBLANG_GERMAN_SWISS: return "de_CH"; + case SUBLANG_GERMAN_AUSTRIAN: return "de_AT"; + case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU"; + case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI"; + } + return "de"; + case LANG_GREEK: return "el_GR"; + case 0x74: /* GUARANI */ return "gn_PY"; + case LANG_GUJARATI: return "gu_IN"; + case 0x68: /* HAUSA */ return "ha_NG"; + case 0x75: /* 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_ICELANDIC: return "is_IS"; + case 0x70: /* IGBO */ return "ibo_NG"; + case LANG_INDONESIAN: return "id_ID"; + case 0x5d: /* INUKTITUT */ return "iu_CA"; + case LANG_ITALIAN: + switch (sub) + { + case SUBLANG_ITALIAN: return "it_IT"; + case SUBLANG_ITALIAN_SWISS: return "it_CH"; + } + return "it"; + case LANG_JAPANESE: return "ja_JP"; + case LANG_KANNADA: return "kn_IN"; + case 0x71: /* KANURI */ return "kau_NG"; + case LANG_KASHMIRI: + switch (sub) + { + case SUBLANG_DEFAULT: return "ks_PK"; + case SUBLANG_KASHMIRI_INDIA: return "ks_IN"; + } + return "ks"; + case LANG_KAZAK: return "kk_KZ"; + case LANG_KONKANI: + /* FIXME: Adjust this when such locales appear on Unix. */ + 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_LATVIAN: return "lv_LV"; + case LANG_LITHUANIAN: return "lt_LT"; + case LANG_MACEDONIAN: return "mk_MK"; + case LANG_MALAY: + switch (sub) + { + case SUBLANG_MALAY_MALAYSIA: return "ms_MY"; + case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN"; + } + return "ms"; + case LANG_MALAYALAM: return "ml_IN"; + case 0x3a: /* MALTESE */ return "mt_MT"; + case LANG_MANIPURI: + /* FIXME: Adjust this when such locales appear on Unix. */ + return "mni_IN"; + case LANG_MARATHI: return "mr_IN"; + case LANG_MONGOLIAN: + return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN". */ + case LANG_NEPALI: + switch (sub) + { + case SUBLANG_DEFAULT: return "ne_NP"; + case SUBLANG_NEPALI_INDIA: return "ne_IN"; + } + return "ne"; + case LANG_NORWEGIAN: + switch (sub) + { + case SUBLANG_NORWEGIAN_BOKMAL: return "no_NO"; + case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO"; + } + return "no"; + case LANG_ORIYA: return "or_IN"; + case 0x72: /* OROMO */ return "om_ET"; + case 0x79: /* PAPIAMENTU */ return "pap_AN"; + case 0x63: /* PASHTO */ + return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF". */ + case LANG_POLISH: return "pl_PL"; + case LANG_PORTUGUESE: + switch (sub) + { + case SUBLANG_PORTUGUESE: return "pt_PT"; + /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT. + Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */ + 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_RUSSIAN: + return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA". */ + case 0x3b: /* SAMI */ return "se_NO"; + case LANG_SANSKRIT: return "sa_IN"; + case LANG_SINDHI: return "sd"; + case 0x5b: /* SINHALESE */ return "si_LK"; + case LANG_SLOVAK: return "sk_SK"; + case LANG_SLOVENIAN: return "sl_SI"; + case 0x77: /* SOMALI */ return "so_SO"; + case LANG_SORBIAN: + /* FIXME: Adjust this when such locales appear on Unix. */ + return "wen_DE"; + case LANG_SPANISH: + switch (sub) + { + case SUBLANG_SPANISH: return "es_ES"; + case SUBLANG_SPANISH_MEXICAN: return "es_MX"; + case SUBLANG_SPANISH_MODERN: + return "es_ES@modern"; /* not seen on Unix */ + case SUBLANG_SPANISH_GUATEMALA: return "es_GT"; + case SUBLANG_SPANISH_COSTA_RICA: return "es_CR"; + case SUBLANG_SPANISH_PANAMA: return "es_PA"; + case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO"; + case SUBLANG_SPANISH_VENEZUELA: return "es_VE"; + case SUBLANG_SPANISH_COLOMBIA: return "es_CO"; + case SUBLANG_SPANISH_PERU: return "es_PE"; + case SUBLANG_SPANISH_ARGENTINA: return "es_AR"; + case SUBLANG_SPANISH_ECUADOR: return "es_EC"; + case SUBLANG_SPANISH_CHILE: return "es_CL"; + case SUBLANG_SPANISH_URUGUAY: return "es_UY"; + case SUBLANG_SPANISH_PARAGUAY: return "es_PY"; + case SUBLANG_SPANISH_BOLIVIA: return "es_BO"; + case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV"; + case SUBLANG_SPANISH_HONDURAS: return "es_HN"; + case SUBLANG_SPANISH_NICARAGUA: return "es_NI"; + case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR"; + } + return "es"; + case 0x30: /* SUTU */ return "bnt_TZ"; + case LANG_SWAHILI: return "sw_KE"; + case LANG_SWEDISH: + switch (sub) + { + case SUBLANG_DEFAULT: return "sv_SE"; + case SUBLANG_SWEDISH_FINLAND: return "sv_FI"; + } + 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_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_TURKISH: return "tr_TR"; + case 0x42: /* TURKMEN */ return "tk_TM"; + case LANG_UKRAINIAN: return "uk_UA"; + case LANG_URDU: + switch (sub) + { + case SUBLANG_URDU_PAKISTAN: return "ur_PK"; + case SUBLANG_URDU_INDIA: return "ur_IN"; + } + return "ur"; + 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_CYRILLIC: return "uz_UZ@cyrillic"; + } + return "uz"; + case 0x33: /* VENDA */ return "ven_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"; + default: return "C"; + } + + #endif + } diff -aNrc2 bash-2.05b-patched/lib/intl/log.c bash-3.0/lib/intl/log.c *** bash-2.05b-patched/lib/intl/log.c Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/log.c Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,104 ---- + /* Log file output. + 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. */ + + /* Written by Bruno Haible . */ + + #ifdef HAVE_CONFIG_H + # include + #endif + + #include + #include + #include + + /* Print an ASCII string with quotes and escape sequences where needed. */ + static void + print_escaped (stream, str) + FILE *stream; + const char *str; + { + putc ('"', stream); + for (; *str != '\0'; str++) + if (*str == '\n') + { + fputs ("\\n\"", stream); + if (str[1] == '\0') + return; + fputs ("\n\"", stream); + } + else + { + if (*str == '"' || *str == '\\') + putc ('\\', stream); + putc (*str, stream); + } + putc ('"', stream); + } + + /* 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; + { + static char *last_logfilename = NULL; + static FILE *last_logfile = NULL; + FILE *logfile; + + /* Can we reuse the last opened logfile? */ + if (last_logfilename == NULL || strcmp (logfilename, last_logfilename) != 0) + { + /* Close the last used logfile. */ + if (last_logfilename != NULL) + { + if (last_logfile != NULL) + { + fclose (last_logfile); + last_logfile = NULL; + } + free (last_logfilename); + last_logfilename = NULL; + } + /* Open the logfile. */ + last_logfilename = (char *) malloc (strlen (logfilename) + 1); + if (last_logfilename == NULL) + return; + strcpy (last_logfilename, logfilename); + last_logfile = fopen (logfilename, "a"); + if (last_logfile == NULL) + return; + } + logfile = last_logfile; + + fprintf (logfile, "domain "); + print_escaped (logfile, domainname); + fprintf (logfile, "\nmsgid "); + print_escaped (logfile, msgid1); + if (plural) + { + fprintf (logfile, "\nmsgid_plural "); + print_escaped (logfile, msgid2); + fprintf (logfile, "\nmsgstr[0] \"\"\n"); + } + else + fprintf (logfile, "\nmsgstr \"\"\n"); + putc ('\n', logfile); + } diff -aNrc2 bash-2.05b-patched/lib/intl/ngettext.c bash-3.0/lib/intl/ngettext.c *** bash-2.05b-patched/lib/intl/ngettext.c Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/ngettext.c Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,68 ---- + /* Implementation of ngettext(3) function. + Copyright (C) 1995, 1997, 2000, 2001, 2002 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 + + #ifdef _LIBC + # define __need_NULL + # include + #else + # include /* Just for NULL. */ + #endif + + #include "gettextP.h" + #ifdef _LIBC + # include + #else + # include "libgnuintl.h" + #endif + + #include + + /* @@ end of prolog @@ */ + + /* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ + #ifdef _LIBC + # define NGETTEXT __ngettext + # define DCNGETTEXT __dcngettext + #else + # define NGETTEXT libintl_ngettext + # define DCNGETTEXT libintl_dcngettext + #endif + + /* Look up MSGID in the current default message catalog for the current + LC_MESSAGES locale. If not found, returns MSGID itself (the default + text). */ + char * + NGETTEXT (msgid1, msgid2, n) + const char *msgid1; + const char *msgid2; + unsigned long int n; + { + return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES); + } + + #ifdef _LIBC + /* Alias for function name in GNU C Library. */ + weak_alias (__ngettext, ngettext); + #endif diff -aNrc2 bash-2.05b-patched/lib/intl/os2compat.c bash-3.0/lib/intl/os2compat.c *** bash-2.05b-patched/lib/intl/os2compat.c Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/os2compat.c Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,98 ---- + /* OS/2 compatibility functions. + Copyright (C) 2001-2002 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. */ + + #define OS2_AWARE + #ifdef HAVE_CONFIG_H + #include + #endif + + #include + #include + #include + + /* A version of getenv() that works from DLLs */ + extern unsigned long DosScanEnv (const unsigned char *pszName, unsigned char **ppszValue); + + char * + _nl_getenv (const char *name) + { + unsigned char *value; + if (DosScanEnv (name, &value)) + return NULL; + else + return value; + } + + /* A fixed size buffer. */ + char libintl_nl_default_dirname[MAXPATHLEN+1]; + + char *_nlos2_libdir = NULL; + char *_nlos2_localealiaspath = NULL; + char *_nlos2_localedir = NULL; + + static __attribute__((constructor)) void + nlos2_initialize () + { + char *root = getenv ("UNIXROOT"); + char *gnulocaledir = getenv ("GNULOCALEDIR"); + + _nlos2_libdir = gnulocaledir; + if (!_nlos2_libdir) + { + if (root) + { + size_t sl = strlen (root); + _nlos2_libdir = (char *) malloc (sl + strlen (LIBDIR) + 1); + memcpy (_nlos2_libdir, root, sl); + memcpy (_nlos2_libdir + sl, LIBDIR, strlen (LIBDIR) + 1); + } + else + _nlos2_libdir = LIBDIR; + } + + _nlos2_localealiaspath = gnulocaledir; + if (!_nlos2_localealiaspath) + { + if (root) + { + size_t sl = strlen (root); + _nlos2_localealiaspath = (char *) malloc (sl + strlen (LOCALE_ALIAS_PATH) + 1); + memcpy (_nlos2_localealiaspath, root, sl); + memcpy (_nlos2_localealiaspath + sl, LOCALE_ALIAS_PATH, strlen (LOCALE_ALIAS_PATH) + 1); + } + else + _nlos2_localealiaspath = LOCALE_ALIAS_PATH; + } + + _nlos2_localedir = gnulocaledir; + if (!_nlos2_localedir) + { + if (root) + { + size_t sl = strlen (root); + _nlos2_localedir = (char *) malloc (sl + strlen (LOCALEDIR) + 1); + memcpy (_nlos2_localedir, root, sl); + memcpy (_nlos2_localedir + sl, LOCALEDIR, strlen (LOCALEDIR) + 1); + } + else + _nlos2_localedir = LOCALEDIR; + } + + if (strlen (_nlos2_localedir) <= MAXPATHLEN) + strcpy (libintl_nl_default_dirname, _nlos2_localedir); + } diff -aNrc2 bash-2.05b-patched/lib/intl/os2compat.h bash-3.0/lib/intl/os2compat.h *** bash-2.05b-patched/lib/intl/os2compat.h Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/os2compat.h Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,46 ---- + /* OS/2 compatibility defines. + This file is intended to be included from config.h + Copyright (C) 2001-2002 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. */ + + /* When included from os2compat.h we need all the original definitions */ + #ifndef OS2_AWARE + + #undef LIBDIR + #define LIBDIR _nlos2_libdir + extern char *_nlos2_libdir; + + #undef LOCALEDIR + #define LOCALEDIR _nlos2_localedir + extern char *_nlos2_localedir; + + #undef LOCALE_ALIAS_PATH + #define LOCALE_ALIAS_PATH _nlos2_localealiaspath + extern char *_nlos2_localealiaspath; + + #endif + + #undef HAVE_STRCASECMP + #define HAVE_STRCASECMP 1 + #define strcasecmp stricmp + #define strncasecmp strnicmp + + /* We have our own getenv() which works even if library is compiled as DLL */ + #define getenv _nl_getenv + + /* Older versions of gettext used -1 as the value of LC_MESSAGES */ + #define LC_MESSAGES_COMPAT (-1) diff -aNrc2 bash-2.05b-patched/lib/intl/osdep.c bash-3.0/lib/intl/osdep.c *** bash-2.05b-patched/lib/intl/osdep.c Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/osdep.c Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,24 ---- + /* OS dependent parts of libintl. + Copyright (C) 2001-2002 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. */ + + #if defined __EMX__ + # include "os2compat.c" + #else + /* Avoid AIX compiler warning. */ + typedef int dummy; + #endif diff -aNrc2 bash-2.05b-patched/lib/intl/plural-exp.c bash-3.0/lib/intl/plural-exp.c *** bash-2.05b-patched/lib/intl/plural-exp.c Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/plural-exp.c Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,156 ---- + /* Expression parsing for plural form selection. + Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Written by Ulrich Drepper , 2000. + + 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 + + #include + #include + #include + + #include "plural-exp.h" + + #if (defined __GNUC__ && !defined __APPLE_CC__) \ + || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) + + /* These structs are the constant expression for the germanic plural + form determination. It represents the expression "n != 1". */ + static const struct expression plvar = + { + .nargs = 0, + .operation = var, + }; + static const struct expression plone = + { + .nargs = 0, + .operation = num, + .val = + { + .num = 1 + } + }; + struct expression GERMANIC_PLURAL = + { + .nargs = 2, + .operation = not_equal, + .val = + { + .args = + { + [0] = (struct expression *) &plvar, + [1] = (struct expression *) &plone + } + } + }; + + # define INIT_GERMANIC_PLURAL() + + #else + + /* For compilers without support for ISO C 99 struct/union initializers: + Initialization at run-time. */ + + static struct expression plvar; + static struct expression plone; + struct expression GERMANIC_PLURAL; + + static void + init_germanic_plural () + { + if (plone.val.num == 0) + { + plvar.nargs = 0; + plvar.operation = var; + + plone.nargs = 0; + plone.operation = num; + plone.val.num = 1; + + GERMANIC_PLURAL.nargs = 2; + GERMANIC_PLURAL.operation = not_equal; + GERMANIC_PLURAL.val.args[0] = &plvar; + GERMANIC_PLURAL.val.args[1] = &plone; + } + } + + # define INIT_GERMANIC_PLURAL() init_germanic_plural () + + #endif + + void + internal_function + EXTRACT_PLURAL_EXPRESSION (nullentry, pluralp, npluralsp) + const char *nullentry; + struct expression **pluralp; + unsigned long int *npluralsp; + { + if (nullentry != NULL) + { + const char *plural; + const char *nplurals; + + plural = strstr (nullentry, "plural="); + nplurals = strstr (nullentry, "nplurals="); + if (plural == NULL || nplurals == NULL) + goto no_plural; + else + { + char *endp; + unsigned long int n; + struct parse_args args; + + /* First get the number. */ + nplurals += 9; + while (*nplurals != '\0' && isspace ((unsigned char) *nplurals)) + ++nplurals; + if (!(*nplurals >= '0' && *nplurals <= '9')) + goto no_plural; + #if defined HAVE_STRTOUL || defined _LIBC + n = strtoul (nplurals, &endp, 10); + #else + for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++) + n = n * 10 + (*endp - '0'); + #endif + if (nplurals == endp) + goto no_plural; + *npluralsp = n; + + /* Due to the restrictions bison imposes onto the interface of the + scanner function we have to put the input string and the result + passed up from the parser into the same structure which address + is passed down to the parser. */ + plural += 7; + args.cp = plural; + if (PLURAL_PARSE (&args) != 0) + goto no_plural; + *pluralp = args.res; + } + } + else + { + /* By default we are using the Germanic form: singular form only + for `one', the plural form otherwise. Yes, this is also what + English is using since English is a Germanic language. */ + no_plural: + INIT_GERMANIC_PLURAL (); + *pluralp = &GERMANIC_PLURAL; + *npluralsp = 2; + } + } diff -aNrc2 bash-2.05b-patched/lib/intl/plural-exp.h bash-3.0/lib/intl/plural-exp.h *** bash-2.05b-patched/lib/intl/plural-exp.h Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/plural-exp.h Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,126 ---- + /* Expression parsing and evaluation for plural form selection. + Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. + Written by Ulrich Drepper , 2000. + + 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 _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 + + #ifndef attribute_hidden + # define attribute_hidden + #endif + + + /* This is the representation of the expressions to determine the + plural form. */ + struct expression + { + int nargs; /* Number of arguments. */ + enum operator + { + /* Without arguments: */ + var, /* The variable "n". */ + num, /* Decimal number. */ + /* Unary operators: */ + lnot, /* Logical NOT. */ + /* Binary operators: */ + mult, /* Multiplication. */ + divide, /* Division. */ + module, /* Modulo operation. */ + plus, /* Addition. */ + minus, /* Subtraction. */ + less_than, /* Comparison. */ + greater_than, /* Comparison. */ + less_or_equal, /* Comparison. */ + greater_or_equal, /* Comparison. */ + equal, /* Comparison for equality. */ + not_equal, /* Comparison for inequality. */ + land, /* Logical AND. */ + lor, /* Logical OR. */ + /* Ternary operators: */ + qmop /* Question mark operator. */ + } operation; + union + { + unsigned long int num; /* Number value for `num'. */ + struct expression *args[3]; /* Up to three arguments. */ + } val; + }; + + /* This is the data structure to pass information to the parser and get + the result in a thread-safe way. */ + struct parse_args + { + const char *cp; + struct expression *res; + }; + + + /* Names for the libintl functions are a problem. This source code is used + 1. in the GNU C Library library, + 2. in the GNU libintl library, + 3. in the GNU gettext tools. + The function names in each situation must be different, to allow for + binary incompatible changes in 'struct expression'. Furthermore, + 1. in the GNU C Library library, the names have a __ prefix, + 2.+3. in the GNU libintl library and in the GNU gettext tools, the names + must follow ANSI C and not start with __. + So we have to distinguish the three cases. */ + #ifdef _LIBC + # define FREE_EXPRESSION __gettext_free_exp + # define PLURAL_PARSE __gettextparse + # define GERMANIC_PLURAL __gettext_germanic_plural + # define EXTRACT_PLURAL_EXPRESSION __gettext_extract_plural + #elif defined (IN_LIBINTL) + # define FREE_EXPRESSION libintl_gettext_free_exp + # define PLURAL_PARSE libintl_gettextparse + # define GERMANIC_PLURAL libintl_gettext_germanic_plural + # define EXTRACT_PLURAL_EXPRESSION libintl_gettext_extract_plural + #else + # define FREE_EXPRESSION free_plural_expression + # define PLURAL_PARSE parse_plural_expression + # define GERMANIC_PLURAL germanic_plural + # define EXTRACT_PLURAL_EXPRESSION extract_plural_expression + #endif + + extern void FREE_EXPRESSION PARAMS ((struct expression *exp)) + internal_function; + extern int PLURAL_PARSE PARAMS ((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)) + internal_function; + + #if !defined (_LIBC) && !defined (IN_LIBINTL) + extern unsigned long int plural_eval PARAMS ((struct expression *pexp, + unsigned long int n)); + #endif + + #endif /* _PLURAL_EXP_H */ diff -aNrc2 bash-2.05b-patched/lib/intl/plural.c bash-3.0/lib/intl/plural.c *** bash-2.05b-patched/lib/intl/plural.c Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/plural.c Tue Dec 9 12:39:13 2003 *************** *** 0 **** --- 1,1518 ---- + /* A Bison parser, made from plural.y + by GNU bison 1.35. */ + + #define YYBISON 1 /* Identify Bison output. */ + + #define yyparse __gettextparse + #define yylex __gettextlex + #define yyerror __gettexterror + #define yylval __gettextlval + #define yychar __gettextchar + #define yydebug __gettextdebug + #define yynerrs __gettextnerrs + # define EQUOP2 257 + # define CMPOP2 258 + # define ADDOP2 259 + # define MULOP2 260 + # define NUMBER 261 + + #line 1 "plural.y" + + /* Expression parsing for plural form selection. + Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Written by Ulrich Drepper , 2000. + + 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. */ + + /* The bison generated parser uses alloca. AIX 3 forces us to put this + declaration at the beginning of the file. The declaration in bison's + skeleton file comes too late. This must come before + because may include arbitrary system headers. */ + #if defined _AIX && !defined __GNUC__ + #pragma alloca + #endif + + #ifdef HAVE_CONFIG_H + # include + #endif + + #include + #include + #include "plural-exp.h" + + /* The main function generated by the parser is called __gettextparse, + but we want it to be called PLURAL_PARSE. */ + #ifndef _LIBC + # define __gettextparse PLURAL_PARSE + #endif + + #define YYLEX_PARAM &((struct parse_args *) arg)->cp + #define YYPARSE_PARAM arg + + #line 49 "plural.y" + #ifndef YYSTYPE + typedef union { + unsigned long int num; + enum operator op; + struct expression *exp; + } yystype; + # define YYSTYPE yystype + # define YYSTYPE_IS_TRIVIAL 1 + #endif + #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)); + + /* Allocation of expressions. */ + + static struct expression * + new_exp (nargs, op, args) + int nargs; + enum operator op; + struct expression * const *args; + { + int i; + struct expression *newp; + + /* If any of the argument could not be malloc'ed, just return NULL. */ + for (i = nargs - 1; i >= 0; i--) + if (args[i] == NULL) + goto fail; + + /* Allocate a new expression. */ + newp = (struct expression *) malloc (sizeof (*newp)); + if (newp != NULL) + { + newp->nargs = nargs; + newp->operation = op; + for (i = nargs - 1; i >= 0; i--) + newp->val.args[i] = args[i]; + return newp; + } + + fail: + for (i = nargs - 1; i >= 0; i--) + FREE_EXPRESSION (args[i]); + + return NULL; + } + + static inline struct expression * + new_exp_0 (op) + enum operator op; + { + return new_exp (0, op, NULL); + } + + static inline struct expression * + new_exp_1 (op, right) + enum operator op; + struct expression *right; + { + struct expression *args[1]; + + args[0] = right; + return new_exp (1, op, args); + } + + static struct expression * + new_exp_2 (op, left, right) + enum operator op; + struct expression *left; + struct expression *right; + { + struct expression *args[2]; + + args[0] = left; + args[1] = right; + return new_exp (2, op, args); + } + + static inline struct expression * + new_exp_3 (op, bexp, tbranch, fbranch) + enum operator op; + struct expression *bexp; + struct expression *tbranch; + struct expression *fbranch; + { + struct expression *args[3]; + + args[0] = bexp; + args[1] = tbranch; + args[2] = fbranch; + return new_exp (3, op, args); + } + + #ifndef YYDEBUG + # define YYDEBUG 0 + #endif + + + + #define YYFINAL 27 + #define YYFLAG -32768 + #define YYNTBASE 16 + + /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ + #define YYTRANSLATE(x) ((unsigned)(x) <= 261 ? yytranslate[x] : 18) + + /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ + static const char yytranslate[] = + { + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 10, 2, 2, 2, 2, 5, 2, + 14, 15, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 12, 2, + 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 13, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 6, 7, 8, + 9, 11 + }; + + #if YYDEBUG + static const short yyprhs[] = + { + 0, 0, 2, 8, 12, 16, 20, 24, 28, 32, + 35, 37, 39 + }; + static const short yyrhs[] = + { + 17, 0, 17, 3, 17, 12, 17, 0, 17, 4, + 17, 0, 17, 5, 17, 0, 17, 6, 17, 0, + 17, 7, 17, 0, 17, 8, 17, 0, 17, 9, + 17, 0, 10, 17, 0, 13, 0, 11, 0, 14, + 17, 15, 0 + }; + + #endif + + #if YYDEBUG + /* 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 + }; + #endif + + + #if (YYDEBUG) || defined YYERROR_VERBOSE + + /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */ + static const char *const yytname[] = + { + "$", "error", "$undefined.", "'?'", "'|'", "'&'", "EQUOP2", "CMPOP2", + "ADDOP2", "MULOP2", "'!'", "NUMBER", "':'", "'n'", "'('", "')'", + "start", "exp", 0 + }; + #endif + + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ + static const short yyr1[] = + { + 0, 16, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17 + }; + + /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ + static const short yyr2[] = + { + 0, 1, 5, 3, 3, 3, 3, 3, 3, 2, + 1, 1, 3 + }; + + /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE + doesn't specify something else to do. Zero means the default is an + error. */ + static const short yydefact[] = + { + 0, 0, 11, 10, 0, 1, 9, 0, 0, 0, + 0, 0, 0, 0, 0, 12, 0, 3, 4, 5, + 6, 7, 8, 0, 2, 0, 0, 0 + }; + + static const short yydefgoto[] = + { + 25, 5 + }; + + static const short yypact[] = + { + -9, -9,-32768,-32768, -9, 34,-32768, 11, -9, -9, + -9, -9, -9, -9, -9,-32768, 24, 39, 43, 16, + 26, -3,-32768, -9, 34, 21, 53,-32768 + }; + + static const short yypgoto[] = + { + -32768, -1 + }; + + + #define YYLAST 53 + + + static const short yytable[] = + { + 6, 1, 2, 7, 3, 4, 14, 16, 17, 18, + 19, 20, 21, 22, 8, 9, 10, 11, 12, 13, + 14, 26, 24, 12, 13, 14, 15, 8, 9, 10, + 11, 12, 13, 14, 13, 14, 23, 8, 9, 10, + 11, 12, 13, 14, 10, 11, 12, 13, 14, 11, + 12, 13, 14, 27 + }; + + static const short yycheck[] = + { + 1, 10, 11, 4, 13, 14, 9, 8, 9, 10, + 11, 12, 13, 14, 3, 4, 5, 6, 7, 8, + 9, 0, 23, 7, 8, 9, 15, 3, 4, 5, + 6, 7, 8, 9, 8, 9, 12, 3, 4, 5, + 6, 7, 8, 9, 5, 6, 7, 8, 9, 6, + 7, 8, 9, 0 + }; + #define YYPURE 1 + + /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ + #line 3 "/usr/local/share/bison/bison.simple" + + /* Skeleton output parser for bison, + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software + Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + /* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + + /* This is the parser code that is written into each bison parser when + the %semantic_parser declaration is not specified in the grammar. + It was written by Richard Stallman by simplifying the hairy parser + used when %semantic_parser is specified. */ + + /* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + + #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) + + /* The parser invokes alloca or malloc; define the necessary symbols. */ + + # if YYSTACK_USE_ALLOCA + # define YYSTACK_ALLOC alloca + # else + # ifndef YYSTACK_USE_ALLOCA + # if defined (alloca) || defined (_ALLOCA_H) + # define YYSTACK_ALLOC alloca + # else + # ifdef __GNUC__ + # define YYSTACK_ALLOC __builtin_alloca + # endif + # endif + # endif + # endif + + # ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ + # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) + # else + # if defined (__STDC__) || defined (__cplusplus) + # include /* INFRINGES ON USER NAME SPACE */ + # define YYSIZE_T size_t + # endif + # define YYSTACK_ALLOC malloc + # define YYSTACK_FREE free + # endif + #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ + + + #if (! defined (yyoverflow) \ + && (! defined (__cplusplus) \ + || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + + /* A type that is properly aligned for any stack member. */ + union yyalloc + { + short yyss; + YYSTYPE yyvs; + # if YYLSP_NEEDED + YYLTYPE yyls; + # endif + }; + + /* The size of the maximum gap between one aligned stack and the next. */ + # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) + + /* The size of an array large to enough to hold all stacks, each with + N elements. */ + # if YYLSP_NEEDED + # define YYSTACK_BYTES(N) \ + ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + + 2 * YYSTACK_GAP_MAX) + # else + # define YYSTACK_BYTES(N) \ + ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAX) + # endif + + /* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ + # ifndef YYCOPY + # if 1 < __GNUC__ + # define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) + # else + # define YYCOPY(To, From, Count) \ + do \ + { \ + register YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (0) + # endif + # endif + + /* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ + # define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) + + #endif + + + #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) + # define YYSIZE_T __SIZE_TYPE__ + #endif + #if ! defined (YYSIZE_T) && defined (size_t) + # define YYSIZE_T size_t + #endif + #if ! defined (YYSIZE_T) + # if defined (__STDC__) || defined (__cplusplus) + # include /* INFRINGES ON USER NAME SPACE */ + # define YYSIZE_T size_t + # endif + #endif + #if ! defined (YYSIZE_T) + # define YYSIZE_T unsigned int + #endif + + #define yyerrok (yyerrstatus = 0) + #define yyclearin (yychar = YYEMPTY) + #define YYEMPTY -2 + #define YYEOF 0 + #define YYACCEPT goto yyacceptlab + #define YYABORT goto yyabortlab + #define YYERROR goto yyerrlab1 + /* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ + #define YYFAIL goto yyerrlab + #define YYRECOVERING() (!!yyerrstatus) + #define YYBACKUP(Token, Value) \ + do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yychar1 = YYTRANSLATE (yychar); \ + YYPOPSTACK; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror ("syntax error: cannot back up"); \ + YYERROR; \ + } \ + while (0) + + #define YYTERROR 1 + #define YYERRCODE 256 + + + /* YYLLOC_DEFAULT -- Compute the default location (before the actions + are run). + + When YYLLOC_DEFAULT is run, CURRENT is set the location of the + first token. By default, to implement support for ranges, extend + its range to the last symbol. */ + + #ifndef YYLLOC_DEFAULT + # define YYLLOC_DEFAULT(Current, Rhs, N) \ + Current.last_line = Rhs[N].last_line; \ + Current.last_column = Rhs[N].last_column; + #endif + + + /* YYLEX -- calling `yylex' with the right arguments. */ + + #if YYPURE + # if YYLSP_NEEDED + # ifdef YYLEX_PARAM + # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) + # else + # define YYLEX yylex (&yylval, &yylloc) + # endif + # else /* !YYLSP_NEEDED */ + # ifdef YYLEX_PARAM + # define YYLEX yylex (&yylval, YYLEX_PARAM) + # else + # define YYLEX yylex (&yylval) + # endif + # endif /* !YYLSP_NEEDED */ + #else /* !YYPURE */ + # define YYLEX yylex () + #endif /* !YYPURE */ + + + /* Enable debugging if requested. */ + #if YYDEBUG + + # ifndef YYFPRINTF + # include /* INFRINGES ON USER NAME SPACE */ + # define YYFPRINTF fprintf + # endif + + # define YYDPRINTF(Args) \ + do { \ + if (yydebug) \ + YYFPRINTF Args; \ + } while (0) + /* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ + int yydebug; + #else /* !YYDEBUG */ + # define YYDPRINTF(Args) + #endif /* !YYDEBUG */ + + /* YYINITDEPTH -- initial size of the parser's stacks. */ + #ifndef YYINITDEPTH + # define YYINITDEPTH 200 + #endif + + /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + + #if YYMAXDEPTH == 0 + # undef YYMAXDEPTH + #endif + + #ifndef YYMAXDEPTH + # define YYMAXDEPTH 10000 + #endif + + #ifdef YYERROR_VERBOSE + + # ifndef yystrlen + # if defined (__GLIBC__) && defined (_STRING_H) + # define yystrlen strlen + # else + /* Return the length of YYSTR. */ + static YYSIZE_T + # if defined (__STDC__) || defined (__cplusplus) + yystrlen (const char *yystr) + # else + yystrlen (yystr) + const char *yystr; + # endif + { + register const char *yys = yystr; + + while (*yys++ != '\0') + continue; + + return yys - yystr - 1; + } + # endif + # endif + + # ifndef yystpcpy + # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) + # define yystpcpy stpcpy + # else + /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ + static char * + # if defined (__STDC__) || defined (__cplusplus) + yystpcpy (char *yydest, const char *yysrc) + # else + yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; + # endif + { + register char *yyd = yydest; + register const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; + } + # endif + # endif + #endif + + #line 315 "/usr/local/share/bison/bison.simple" + + + /* The user can define YYPARSE_PARAM as the name of an argument to be passed + into yyparse. The argument should have type void *. + It should actually point to an object. + Grammar actions can access the variable by casting it + to the proper pointer type. */ + + #ifdef YYPARSE_PARAM + # if defined (__STDC__) || defined (__cplusplus) + # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM + # define YYPARSE_PARAM_DECL + # else + # define YYPARSE_PARAM_ARG YYPARSE_PARAM + # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; + # endif + #else /* !YYPARSE_PARAM */ + # define YYPARSE_PARAM_ARG + # define YYPARSE_PARAM_DECL + #endif /* !YYPARSE_PARAM */ + + /* Prevent warning if -Wstrict-prototypes. */ + #ifdef __GNUC__ + # ifdef YYPARSE_PARAM + int yyparse (void *); + # else + int yyparse (void); + # endif + #endif + + /* YY_DECL_VARIABLES -- depending whether we use a pure parser, + variables are global, or local to YYPARSE. */ + + #define YY_DECL_NON_LSP_VARIABLES \ + /* The lookahead symbol. */ \ + int yychar; \ + \ + /* The semantic value of the lookahead symbol. */ \ + YYSTYPE yylval; \ + \ + /* Number of parse errors so far. */ \ + int yynerrs; + + #if YYLSP_NEEDED + # define YY_DECL_VARIABLES \ + YY_DECL_NON_LSP_VARIABLES \ + \ + /* Location data for the lookahead symbol. */ \ + YYLTYPE yylloc; + #else + # define YY_DECL_VARIABLES \ + YY_DECL_NON_LSP_VARIABLES + #endif + + + /* If nonreentrant, generate the variables here. */ + + #if !YYPURE + YY_DECL_VARIABLES + #endif /* !YYPURE */ + + int + yyparse (YYPARSE_PARAM_ARG) + YYPARSE_PARAM_DECL + { + /* If reentrant, generate the variables here. */ + #if YYPURE + YY_DECL_VARIABLES + #endif /* !YYPURE */ + + register int yystate; + register int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Lookahead token as an internal (translated) token number. */ + int yychar1 = 0; + + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + short yyssa[YYINITDEPTH]; + short *yyss = yyssa; + register short *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + register YYSTYPE *yyvsp; + + #if YYLSP_NEEDED + /* The location stack. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp; + #endif + + #if YYLSP_NEEDED + # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) + #else + # define YYPOPSTACK (yyvsp--, yyssp--) + #endif + + YYSIZE_T yystacksize = YYINITDEPTH; + + + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + #if YYLSP_NEEDED + YYLTYPE yyloc; + #endif + + /* When reducing, the number of symbols on the RHS of the reduced + rule. */ + int yylen; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + + yyssp = yyss; + yyvsp = yyvs; + #if YYLSP_NEEDED + yylsp = yyls; + #endif + goto yysetstate; + + /*------------------------------------------------------------. + | yynewstate -- Push a new state, which is found in yystate. | + `------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. so pushing a state here evens the stacks. + */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyssp >= yyss + yystacksize - 1) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + + #ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + short *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. */ + # if YYLSP_NEEDED + YYLTYPE *yyls1 = yyls; + /* This used to be a conditional around just the two extra args, + but that might be undefined if yyoverflow is a macro. */ + yyoverflow ("parser stack overflow", + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yyls1, yysize * sizeof (*yylsp), + &yystacksize); + yyls = yyls1; + # else + yyoverflow ("parser stack overflow", + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + # endif + yyss = yyss1; + yyvs = yyvs1; + } + #else /* no yyoverflow */ + # ifndef YYSTACK_RELOCATE + goto yyoverflowlab; + # else + /* Extend the stack our own way. */ + if (yystacksize >= YYMAXDEPTH) + goto yyoverflowlab; + yystacksize *= 2; + if (yystacksize > YYMAXDEPTH) + yystacksize = YYMAXDEPTH; + + { + short *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyoverflowlab; + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + # if YYLSP_NEEDED + YYSTACK_RELOCATE (yyls); + # endif + # undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } + # endif + #endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + #if YYLSP_NEEDED + yylsp = yyls + yysize - 1; + #endif + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyssp >= yyss + yystacksize - 1) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + goto yybackup; + + + /*-----------. + | yybackup. | + `-----------*/ + yybackup: + + /* Do appropriate processing given the current state. */ + /* Read a lookahead token if we need one and don't already have one. */ + /* yyresume: */ + + /* First try to decide what to do without reference to lookahead token. */ + + yyn = yypact[yystate]; + if (yyn == YYFLAG) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* yychar is either YYEMPTY or YYEOF + or a valid token in external form. */ + + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + /* Convert token to internal form (in yychar1) for indexing tables with */ + + if (yychar <= 0) /* This means end of input. */ + { + yychar1 = 0; + yychar = YYEOF; /* Don't call YYLEX any more */ + + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yychar1 = YYTRANSLATE (yychar); + + #if YYDEBUG + /* We have to keep this `#if YYDEBUG', since we use variables + which are defined only if `YYDEBUG' is set. */ + if (yydebug) + { + YYFPRINTF (stderr, "Next token is %d (%s", + yychar, yytname[yychar1]); + /* Give the individual parser a way to print the precise + meaning of a token, for further debugging info. */ + # ifdef YYPRINT + YYPRINT (stderr, yychar, yylval); + # endif + YYFPRINTF (stderr, ")\n"); + } + #endif + } + + yyn += yychar1; + if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) + goto yydefault; + + yyn = yytable[yyn]; + + /* yyn is what to do for this token type in this state. + Negative => reduce, -yyn is rule number. + Positive => shift, yyn is new state. + New state is final state => don't bother to shift, + just return success. + 0, or most negative number => error. */ + + if (yyn < 0) + { + if (yyn == YYFLAG) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + else if (yyn == 0) + goto yyerrlab; + + if (yyn == YYFINAL) + YYACCEPT; + + /* Shift the lookahead token. */ + YYDPRINTF ((stderr, "Shifting token %d (%s), ", + yychar, yytname[yychar1])); + + /* Discard the token being shifted unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + + *++yyvsp = yylval; + #if YYLSP_NEEDED + *++yylsp = yylloc; + #endif + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + yystate = yyn; + goto yynewstate; + + + /*-----------------------------------------------------------. + | yydefault -- do the default action for the current state. | + `-----------------------------------------------------------*/ + yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + + /*-----------------------------. + | yyreduce -- Do a reduction. | + `-----------------------------*/ + yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to the semantic value of + the lookahead token. This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + #if YYLSP_NEEDED + /* Similarly for the default location. Let the user run additional + commands if for instance locations are ranges. */ + yyloc = yylsp[1-yylen]; + YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); + #endif + + #if YYDEBUG + /* We have to keep this `#if YYDEBUG', since we use variables which + are defined only if `YYDEBUG' is set. */ + if (yydebug) + { + int yyi; + + YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", + yyn, yyrline[yyn]); + + /* Print the symbols being reduced, and their result. */ + for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++) + YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); + YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); + } + #endif + + switch (yyn) { + + case 1: + #line 175 "plural.y" + { + if (yyvsp[0].exp == NULL) + YYABORT; + ((struct parse_args *) arg)->res = yyvsp[0].exp; + } + break; + case 2: + #line 183 "plural.y" + { + yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp); + } + break; + case 3: + #line 187 "plural.y" + { + yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp); + } + break; + case 4: + #line 191 "plural.y" + { + yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp); + } + break; + case 5: + #line 195 "plural.y" + { + yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp); + } + break; + case 6: + #line 199 "plural.y" + { + yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp); + } + break; + case 7: + #line 203 "plural.y" + { + yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp); + } + break; + case 8: + #line 207 "plural.y" + { + yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp); + } + break; + case 9: + #line 211 "plural.y" + { + yyval.exp = new_exp_1 (lnot, yyvsp[0].exp); + } + break; + case 10: + #line 215 "plural.y" + { + yyval.exp = new_exp_0 (var); + } + break; + case 11: + #line 219 "plural.y" + { + if ((yyval.exp = new_exp_0 (num)) != NULL) + yyval.exp->val.num = yyvsp[0].num; + } + break; + case 12: + #line 224 "plural.y" + { + yyval.exp = yyvsp[-1].exp; + } + break; + } + + #line 705 "/usr/local/share/bison/bison.simple" + + + yyvsp -= yylen; + yyssp -= yylen; + #if YYLSP_NEEDED + yylsp -= yylen; + #endif + + #if YYDEBUG + if (yydebug) + { + short *yyssp1 = yyss - 1; + YYFPRINTF (stderr, "state stack now"); + while (yyssp1 != yyssp) + YYFPRINTF (stderr, " %d", *++yyssp1); + YYFPRINTF (stderr, "\n"); + } + #endif + + *++yyvsp = yyval; + #if YYLSP_NEEDED + *++yylsp = yyloc; + #endif + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTBASE] + *yyssp; + if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTBASE]; + + goto yynewstate; + + + /*------------------------------------. + | yyerrlab -- here on detecting error | + `------------------------------------*/ + yyerrlab: + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; + + #ifdef YYERROR_VERBOSE + yyn = yypact[yystate]; + + if (yyn > YYFLAG && yyn < YYLAST) + { + YYSIZE_T yysize = 0; + char *yymsg; + int yyx, yycount; + + yycount = 0; + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + for (yyx = yyn < 0 ? -yyn : 0; + yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) + if (yycheck[yyx + yyn] == yyx) + yysize += yystrlen (yytname[yyx]) + 15, yycount++; + yysize += yystrlen ("parse error, unexpected ") + 1; + yysize += yystrlen (yytname[YYTRANSLATE (yychar)]); + yymsg = (char *) YYSTACK_ALLOC (yysize); + if (yymsg != 0) + { + char *yyp = yystpcpy (yymsg, "parse error, unexpected "); + yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]); + + if (yycount < 5) + { + yycount = 0; + for (yyx = yyn < 0 ? -yyn : 0; + yyx < (int) (sizeof (yytname) / sizeof (char *)); + yyx++) + if (yycheck[yyx + yyn] == yyx) + { + const char *yyq = ! yycount ? ", expecting " : " or "; + yyp = yystpcpy (yyp, yyq); + yyp = yystpcpy (yyp, yytname[yyx]); + yycount++; + } + } + yyerror (yymsg); + YYSTACK_FREE (yymsg); + } + else + yyerror ("parse error; also virtual memory exhausted"); + } + else + #endif /* defined (YYERROR_VERBOSE) */ + yyerror ("parse error"); + } + goto yyerrlab1; + + + /*--------------------------------------------------. + | yyerrlab1 -- error raised explicitly by an action | + `--------------------------------------------------*/ + yyerrlab1: + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + /* return failure if at end of input */ + if (yychar == YYEOF) + YYABORT; + YYDPRINTF ((stderr, "Discarding token %d (%s).\n", + yychar, yytname[yychar1])); + yychar = YYEMPTY; + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + + yyerrstatus = 3; /* Each real token shifted decrements this */ + + goto yyerrhandle; + + + /*-------------------------------------------------------------------. + | yyerrdefault -- current state does not do anything special for the | + | error token. | + `-------------------------------------------------------------------*/ + yyerrdefault: + #if 0 + /* This is wrong; only states that explicitly want error tokens + should shift them. */ + + /* If its default is to accept any token, ok. Otherwise pop it. */ + yyn = yydefact[yystate]; + if (yyn) + goto yydefault; + #endif + + + /*---------------------------------------------------------------. + | yyerrpop -- pop the current state because it cannot handle the | + | error token | + `---------------------------------------------------------------*/ + yyerrpop: + if (yyssp == yyss) + YYABORT; + yyvsp--; + yystate = *--yyssp; + #if YYLSP_NEEDED + yylsp--; + #endif + + #if YYDEBUG + if (yydebug) + { + short *yyssp1 = yyss - 1; + YYFPRINTF (stderr, "Error: state stack now"); + while (yyssp1 != yyssp) + YYFPRINTF (stderr, " %d", *++yyssp1); + YYFPRINTF (stderr, "\n"); + } + #endif + + /*--------------. + | yyerrhandle. | + `--------------*/ + yyerrhandle: + yyn = yypact[yystate]; + if (yyn == YYFLAG) + goto yyerrdefault; + + yyn += YYTERROR; + if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) + goto yyerrdefault; + + yyn = yytable[yyn]; + if (yyn < 0) + { + if (yyn == YYFLAG) + goto yyerrpop; + yyn = -yyn; + goto yyreduce; + } + else if (yyn == 0) + goto yyerrpop; + + if (yyn == YYFINAL) + YYACCEPT; + + YYDPRINTF ((stderr, "Shifting error token, ")); + + *++yyvsp = yylval; + #if YYLSP_NEEDED + *++yylsp = yylloc; + #endif + + yystate = yyn; + goto yynewstate; + + + /*-------------------------------------. + | yyacceptlab -- YYACCEPT comes here. | + `-------------------------------------*/ + yyacceptlab: + yyresult = 0; + goto yyreturn; + + /*-----------------------------------. + | yyabortlab -- YYABORT comes here. | + `-----------------------------------*/ + yyabortlab: + yyresult = 1; + goto yyreturn; + + /*---------------------------------------------. + | yyoverflowab -- parser overflow comes here. | + `---------------------------------------------*/ + yyoverflowlab: + yyerror ("parser stack overflow"); + yyresult = 2; + /* Fall through. */ + + yyreturn: + #ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); + #endif + return yyresult; + } + #line 229 "plural.y" + + + void + internal_function + FREE_EXPRESSION (exp) + struct expression *exp; + { + if (exp == NULL) + return; + + /* Handle the recursive case. */ + switch (exp->nargs) + { + case 3: + FREE_EXPRESSION (exp->val.args[2]); + /* FALLTHROUGH */ + case 2: + FREE_EXPRESSION (exp->val.args[1]); + /* FALLTHROUGH */ + case 1: + FREE_EXPRESSION (exp->val.args[0]); + /* FALLTHROUGH */ + default: + break; + } + + free (exp); + } + + + static int + yylex (lval, pexp) + YYSTYPE *lval; + const char **pexp; + { + const char *exp = *pexp; + int result; + + while (1) + { + if (exp[0] == '\0') + { + *pexp = exp; + return YYEOF; + } + + if (exp[0] != ' ' && exp[0] != '\t') + break; + + ++exp; + } + + result = *exp++; + switch (result) + { + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + { + unsigned long int n = result - '0'; + while (exp[0] >= '0' && exp[0] <= '9') + { + n *= 10; + n += exp[0] - '0'; + ++exp; + } + lval->num = n; + result = NUMBER; + } + break; + + case '=': + if (exp[0] == '=') + { + ++exp; + lval->op = equal; + result = EQUOP2; + } + else + result = YYERRCODE; + break; + + case '!': + if (exp[0] == '=') + { + ++exp; + lval->op = not_equal; + result = EQUOP2; + } + break; + + case '&': + case '|': + if (exp[0] == result) + ++exp; + else + result = YYERRCODE; + break; + + case '<': + if (exp[0] == '=') + { + ++exp; + lval->op = less_or_equal; + } + else + lval->op = less_than; + result = CMPOP2; + break; + + case '>': + if (exp[0] == '=') + { + ++exp; + lval->op = greater_or_equal; + } + else + lval->op = greater_than; + result = CMPOP2; + break; + + case '*': + lval->op = mult; + result = MULOP2; + break; + + case '/': + lval->op = divide; + result = MULOP2; + break; + + case '%': + lval->op = module; + result = MULOP2; + break; + + case '+': + lval->op = plus; + result = ADDOP2; + break; + + case '-': + lval->op = minus; + result = ADDOP2; + break; + + case 'n': + case '?': + case ':': + case '(': + case ')': + /* Nothing, just return the character. */ + break; + + case ';': + case '\n': + case '\0': + /* Be safe and let the user call this function again. */ + --exp; + result = YYEOF; + break; + + default: + result = YYERRCODE; + #if YYDEBUG != 0 + --exp; + #endif + break; + } + + *pexp = exp; + + return result; + } + + + static void + yyerror (str) + const char *str; + { + /* Do nothing. We don't print error messages here. */ + } diff -aNrc2 bash-2.05b-patched/lib/intl/plural.y bash-3.0/lib/intl/plural.y *** bash-2.05b-patched/lib/intl/plural.y Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/plural.y Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,409 ---- + %{ + /* Expression parsing for plural form selection. + Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Written by Ulrich Drepper , 2000. + + 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. */ + + /* The bison generated parser uses alloca. AIX 3 forces us to put this + declaration at the beginning of the file. The declaration in bison's + skeleton file comes too late. This must come before + because may include arbitrary system headers. */ + #if defined _AIX && !defined __GNUC__ + #pragma alloca + #endif + + #ifdef HAVE_CONFIG_H + # include + #endif + + #include + #include + #include "plural-exp.h" + + /* The main function generated by the parser is called __gettextparse, + but we want it to be called PLURAL_PARSE. */ + #ifndef _LIBC + # define __gettextparse PLURAL_PARSE + #endif + + #define YYLEX_PARAM &((struct parse_args *) arg)->cp + #define YYPARSE_PARAM arg + %} + %pure_parser + %expect 7 + + %union { + unsigned long int num; + enum operator op; + struct expression *exp; + } + + %{ + /* 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)); + + /* Allocation of expressions. */ + + static struct expression * + new_exp (nargs, op, args) + int nargs; + enum operator op; + struct expression * const *args; + { + int i; + struct expression *newp; + + /* If any of the argument could not be malloc'ed, just return NULL. */ + for (i = nargs - 1; i >= 0; i--) + if (args[i] == NULL) + goto fail; + + /* Allocate a new expression. */ + newp = (struct expression *) malloc (sizeof (*newp)); + if (newp != NULL) + { + newp->nargs = nargs; + newp->operation = op; + for (i = nargs - 1; i >= 0; i--) + newp->val.args[i] = args[i]; + return newp; + } + + fail: + for (i = nargs - 1; i >= 0; i--) + FREE_EXPRESSION (args[i]); + + return NULL; + } + + static inline struct expression * + new_exp_0 (op) + enum operator op; + { + return new_exp (0, op, NULL); + } + + static inline struct expression * + new_exp_1 (op, right) + enum operator op; + struct expression *right; + { + struct expression *args[1]; + + args[0] = right; + return new_exp (1, op, args); + } + + static struct expression * + new_exp_2 (op, left, right) + enum operator op; + struct expression *left; + struct expression *right; + { + struct expression *args[2]; + + args[0] = left; + args[1] = right; + return new_exp (2, op, args); + } + + static inline struct expression * + new_exp_3 (op, bexp, tbranch, fbranch) + enum operator op; + struct expression *bexp; + struct expression *tbranch; + struct expression *fbranch; + { + struct expression *args[3]; + + args[0] = bexp; + args[1] = tbranch; + args[2] = fbranch; + return new_exp (3, op, args); + } + + %} + + /* This declares that all operators have the same associativity and the + precedence order as in C. See [Harbison, Steele: C, A Reference Manual]. + There is no unary minus and no bitwise operators. + Operators with the same syntactic behaviour have been merged into a single + token, to save space in the array generated by bison. */ + %right '?' /* ? */ + %left '|' /* || */ + %left '&' /* && */ + %left EQUOP2 /* == != */ + %left CMPOP2 /* < > <= >= */ + %left ADDOP2 /* + - */ + %left MULOP2 /* * / % */ + %right '!' /* ! */ + + %token EQUOP2 CMPOP2 ADDOP2 MULOP2 + %token NUMBER + %type exp + + %% + + start: exp + { + if ($1 == NULL) + YYABORT; + ((struct parse_args *) arg)->res = $1; + } + ; + + exp: exp '?' exp ':' exp + { + $$ = new_exp_3 (qmop, $1, $3, $5); + } + | exp '|' exp + { + $$ = new_exp_2 (lor, $1, $3); + } + | exp '&' exp + { + $$ = new_exp_2 (land, $1, $3); + } + | exp EQUOP2 exp + { + $$ = new_exp_2 ($2, $1, $3); + } + | exp CMPOP2 exp + { + $$ = new_exp_2 ($2, $1, $3); + } + | exp ADDOP2 exp + { + $$ = new_exp_2 ($2, $1, $3); + } + | exp MULOP2 exp + { + $$ = new_exp_2 ($2, $1, $3); + } + | '!' exp + { + $$ = new_exp_1 (lnot, $2); + } + | 'n' + { + $$ = new_exp_0 (var); + } + | NUMBER + { + if (($$ = new_exp_0 (num)) != NULL) + $$->val.num = $1; + } + | '(' exp ')' + { + $$ = $2; + } + ; + + %% + + void + internal_function + FREE_EXPRESSION (exp) + struct expression *exp; + { + if (exp == NULL) + return; + + /* Handle the recursive case. */ + switch (exp->nargs) + { + case 3: + FREE_EXPRESSION (exp->val.args[2]); + /* FALLTHROUGH */ + case 2: + FREE_EXPRESSION (exp->val.args[1]); + /* FALLTHROUGH */ + case 1: + FREE_EXPRESSION (exp->val.args[0]); + /* FALLTHROUGH */ + default: + break; + } + + free (exp); + } + + + static int + yylex (lval, pexp) + YYSTYPE *lval; + const char **pexp; + { + const char *exp = *pexp; + int result; + + while (1) + { + if (exp[0] == '\0') + { + *pexp = exp; + return YYEOF; + } + + if (exp[0] != ' ' && exp[0] != '\t') + break; + + ++exp; + } + + result = *exp++; + switch (result) + { + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + { + unsigned long int n = result - '0'; + while (exp[0] >= '0' && exp[0] <= '9') + { + n *= 10; + n += exp[0] - '0'; + ++exp; + } + lval->num = n; + result = NUMBER; + } + break; + + case '=': + if (exp[0] == '=') + { + ++exp; + lval->op = equal; + result = EQUOP2; + } + else + result = YYERRCODE; + break; + + case '!': + if (exp[0] == '=') + { + ++exp; + lval->op = not_equal; + result = EQUOP2; + } + break; + + case '&': + case '|': + if (exp[0] == result) + ++exp; + else + result = YYERRCODE; + break; + + case '<': + if (exp[0] == '=') + { + ++exp; + lval->op = less_or_equal; + } + else + lval->op = less_than; + result = CMPOP2; + break; + + case '>': + if (exp[0] == '=') + { + ++exp; + lval->op = greater_or_equal; + } + else + lval->op = greater_than; + result = CMPOP2; + break; + + case '*': + lval->op = mult; + result = MULOP2; + break; + + case '/': + lval->op = divide; + result = MULOP2; + break; + + case '%': + lval->op = module; + result = MULOP2; + break; + + case '+': + lval->op = plus; + result = ADDOP2; + break; + + case '-': + lval->op = minus; + result = ADDOP2; + break; + + case 'n': + case '?': + case ':': + case '(': + case ')': + /* Nothing, just return the character. */ + break; + + case ';': + case '\n': + case '\0': + /* Be safe and let the user call this function again. */ + --exp; + result = YYEOF; + break; + + default: + result = YYERRCODE; + #if YYDEBUG != 0 + --exp; + #endif + break; + } + + *pexp = exp; + + return result; + } + + + static void + yyerror (str) + const char *str; + { + /* Do nothing. We don't print error messages here. */ + } diff -aNrc2 bash-2.05b-patched/lib/intl/ref-add.sin bash-3.0/lib/intl/ref-add.sin *** bash-2.05b-patched/lib/intl/ref-add.sin Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/ref-add.sin Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,31 ---- + # Add this package to a list of references stored in a text file. + # + # Copyright (C) 2000 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. + # + # Written by Bruno Haible . + # + /^# Packages using this file: / { + s/# Packages using this file:// + ta + :a + s/ @PACKAGE@ / @PACKAGE@ / + tb + s/ $/ @PACKAGE@ / + :b + s/^/# Packages using this file:/ + } diff -aNrc2 bash-2.05b-patched/lib/intl/ref-del.sin bash-3.0/lib/intl/ref-del.sin *** bash-2.05b-patched/lib/intl/ref-del.sin Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/ref-del.sin Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,26 ---- + # Remove this package from a list of references stored in a text file. + # + # Copyright (C) 2000 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. + # + # Written by Bruno Haible . + # + /^# Packages using this file: / { + s/# Packages using this file:// + s/ @PACKAGE@ / / + s/^/# Packages using this file:/ + } diff -aNrc2 bash-2.05b-patched/lib/intl/relocatable.c bash-3.0/lib/intl/relocatable.c *** bash-2.05b-patched/lib/intl/relocatable.c Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/relocatable.c Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,439 ---- + /* Provide relocatable packages. + 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. */ + + + /* Tell glibc's to provide a prototype for getline(). + 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 "config.h" + #endif + + /* Specification. */ + #include "relocatable.h" + + #if ENABLE_RELOCATABLE + + #include + #include + #include + #include + + #ifdef NO_XMALLOC + # define xmalloc malloc + #else + # include "xmalloc.h" + #endif + + #if DEPENDS_ON_LIBCHARSET + # include + #endif + #if DEPENDS_ON_LIBICONV && HAVE_ICONV + # include + #endif + #if DEPENDS_ON_LIBINTL && ENABLE_NLS + # include + #endif + + /* Faked cheap 'bool'. */ + #undef bool + #undef false + #undef true + #define bool int + #define false 0 + #define true 1 + + /* Pathname support. + ISSLASH(C) tests whether C is a directory separator character. + IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. + */ + #if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ + /* Win32, OS/2, DOS */ + # define ISSLASH(C) ((C) == '/' || (C) == '\\') + # define HAS_DEVICE(P) \ + ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ + && (P)[1] == ':') + # define IS_PATH_WITH_DIR(P) \ + (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P)) + # define FILESYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0) + #else + /* Unix */ + # define ISSLASH(C) ((C) == '/') + # define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL) + # define FILESYSTEM_PREFIX_LEN(P) 0 + #endif + + /* Original installation prefix. */ + static char *orig_prefix; + static size_t orig_prefix_len; + /* Current installation prefix. */ + static char *curr_prefix; + static size_t curr_prefix_len; + /* These prefixes do not end in a slash. Anything that will be concatenated + to them must start with a slash. */ + + /* Sets the original and the current installation prefix of this module. + Relocation simply replaces a pathname starting with the original prefix + by the corresponding pathname with the current prefix instead. Both + prefixes should be directory names without trailing slash (i.e. use "" + instead of "/"). */ + static void + set_this_relocation_prefix (const char *orig_prefix_arg, + const char *curr_prefix_arg) + { + if (orig_prefix_arg != NULL && curr_prefix_arg != NULL + /* Optimization: if orig_prefix and curr_prefix are equal, the + relocation is a nop. */ + && strcmp (orig_prefix_arg, curr_prefix_arg) != 0) + { + /* Duplicate the argument strings. */ + char *memory; + + orig_prefix_len = strlen (orig_prefix_arg); + curr_prefix_len = strlen (curr_prefix_arg); + memory = (char *) xmalloc (orig_prefix_len + 1 + curr_prefix_len + 1); + #ifdef NO_XMALLOC + if (memory != NULL) + #endif + { + memcpy (memory, orig_prefix_arg, orig_prefix_len + 1); + orig_prefix = memory; + memory += orig_prefix_len + 1; + memcpy (memory, curr_prefix_arg, curr_prefix_len + 1); + curr_prefix = memory; + return; + } + } + orig_prefix = NULL; + curr_prefix = NULL; + /* Don't worry about wasted memory here - this function is usually only + called once. */ + } + + /* Sets the original and the current installation prefix of the package. + Relocation simply replaces a pathname starting with the original prefix + by the corresponding pathname with the current prefix instead. Both + prefixes should be directory names without trailing slash (i.e. use "" + instead of "/"). */ + void + set_relocation_prefix (const char *orig_prefix_arg, const char *curr_prefix_arg) + { + set_this_relocation_prefix (orig_prefix_arg, curr_prefix_arg); + + /* Now notify all dependent libraries. */ + #if DEPENDS_ON_LIBCHARSET + libcharset_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg); + #endif + #if DEPENDS_ON_LIBICONV && HAVE_ICONV && _LIBICONV_VERSION >= 0x0109 + libiconv_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg); + #endif + #if DEPENDS_ON_LIBINTL && ENABLE_NLS && defined libintl_set_relocation_prefix + libintl_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg); + #endif + } + + /* Convenience function: + Computes the current installation prefix, based on the original + installation prefix, the original installation directory of a particular + file, and the current pathname of this file. Returns NULL upon failure. */ + #ifdef IN_LIBRARY + #define compute_curr_prefix local_compute_curr_prefix + static + #endif + const char * + compute_curr_prefix (const char *orig_installprefix, + const char *orig_installdir, + const char *curr_pathname) + { + const char *curr_installdir; + const char *rel_installdir; + + if (curr_pathname == NULL) + return NULL; + + /* Determine the relative installation directory, relative to the prefix. + This is simply the difference between orig_installprefix and + orig_installdir. */ + if (strncmp (orig_installprefix, orig_installdir, strlen (orig_installprefix)) + != 0) + /* Shouldn't happen - nothing should be installed outside $(prefix). */ + return NULL; + rel_installdir = orig_installdir + strlen (orig_installprefix); + + /* Determine the current installation directory. */ + { + const char *p_base = curr_pathname + FILESYSTEM_PREFIX_LEN (curr_pathname); + const char *p = curr_pathname + strlen (curr_pathname); + char *q; + + while (p > p_base) + { + p--; + if (ISSLASH (*p)) + break; + } + + q = (char *) xmalloc (p - curr_pathname + 1); + #ifdef NO_XMALLOC + if (q == NULL) + return NULL; + #endif + memcpy (q, curr_pathname, p - curr_pathname); + q[p - curr_pathname] = '\0'; + curr_installdir = q; + } + + /* Compute the current installation prefix by removing the trailing + rel_installdir from it. */ + { + const char *rp = rel_installdir + strlen (rel_installdir); + const char *cp = curr_installdir + strlen (curr_installdir); + const char *cp_base = + curr_installdir + FILESYSTEM_PREFIX_LEN (curr_installdir); + + while (rp > rel_installdir && cp > cp_base) + { + bool same = false; + const char *rpi = rp; + const char *cpi = cp; + + while (rpi > rel_installdir && cpi > cp_base) + { + rpi--; + cpi--; + if (ISSLASH (*rpi) || ISSLASH (*cpi)) + { + if (ISSLASH (*rpi) && ISSLASH (*cpi)) + same = true; + break; + } + #if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ + /* Win32, OS/2, DOS - case insignificant filesystem */ + if ((*rpi >= 'a' && *rpi <= 'z' ? *rpi - 'a' + 'A' : *rpi) + != (*cpi >= 'a' && *cpi <= 'z' ? *cpi - 'a' + 'A' : *cpi)) + break; + #else + if (*rpi != *cpi) + break; + #endif + } + if (!same) + break; + /* The last pathname component was the same. opi and cpi now point + to the slash before it. */ + rp = rpi; + cp = cpi; + } + + if (rp > rel_installdir) + /* Unexpected: The curr_installdir does not end with rel_installdir. */ + return NULL; + + { + size_t curr_prefix_len = cp - curr_installdir; + char *curr_prefix; + + curr_prefix = (char *) xmalloc (curr_prefix_len + 1); + #ifdef NO_XMALLOC + if (curr_prefix == NULL) + return NULL; + #endif + memcpy (curr_prefix, curr_installdir, curr_prefix_len); + curr_prefix[curr_prefix_len] = '\0'; + + return curr_prefix; + } + } + } + + #if defined PIC && defined INSTALLDIR + + /* Full pathname of shared library, or NULL. */ + static char *shared_library_fullname; + + #if defined _WIN32 || defined __WIN32__ + + /* Determine the full pathname of the shared library when it is loaded. */ + + BOOL WINAPI + DllMain (HINSTANCE module_handle, DWORD event, LPVOID reserved) + { + (void) reserved; + + if (event == DLL_PROCESS_ATTACH) + { + /* The DLL is being loaded into an application's address range. */ + static char location[MAX_PATH]; + + if (!GetModuleFileName (module_handle, location, sizeof (location))) + /* Shouldn't happen. */ + return FALSE; + + if (!IS_PATH_WITH_DIR (location)) + /* Shouldn't happen. */ + return FALSE; + + shared_library_fullname = strdup (location); + } + + return TRUE; + } + + #else /* Unix */ + + static void + find_shared_library_fullname () + { + #ifdef __linux__ + FILE *fp; + + /* Open the current process' maps file. It describes one VMA per line. */ + fp = fopen ("/proc/self/maps", "r"); + if (fp) + { + unsigned long address = (unsigned long) &find_shared_library_fullname; + for (;;) + { + unsigned long start, end; + int c; + + if (fscanf (fp, "%lx-%lx", &start, &end) != 2) + break; + if (address >= start && address <= end - 1) + { + /* Found it. Now see if this line contains a filename. */ + while (c = getc (fp), c != EOF && c != '\n' && c != '/') + continue; + if (c == '/') + { + size_t size; + int len; + + ungetc (c, fp); + shared_library_fullname = NULL; size = 0; + len = getline (&shared_library_fullname, &size, fp); + if (len >= 0) + { + /* Success: filled shared_library_fullname. */ + if (len > 0 && shared_library_fullname[len - 1] == '\n') + shared_library_fullname[len - 1] = '\0'; + } + } + break; + } + while (c = getc (fp), c != EOF && c != '\n') + continue; + } + fclose (fp); + } + #endif + } + + #endif /* WIN32 / Unix */ + + /* Return the full pathname of the current shared library. + Return NULL if unknown. + Guaranteed to work only on Linux and Woe32. */ + static char * + get_shared_library_fullname () + { + #if !(defined _WIN32 || defined __WIN32__) + static bool tried_find_shared_library_fullname; + if (!tried_find_shared_library_fullname) + { + find_shared_library_fullname (); + tried_find_shared_library_fullname = true; + } + #endif + return shared_library_fullname; + } + + #endif /* PIC */ + + /* Returns the pathname, relocated according to the current installation + directory. */ + const char * + relocate (const char *pathname) + { + #if defined PIC && defined INSTALLDIR + static int initialized; + + /* Initialization code for a shared library. */ + if (!initialized) + { + /* At this point, orig_prefix and curr_prefix likely have already been + set through the main program's set_program_name_and_installdir + function. This is sufficient in the case that the library has + initially been installed in the same orig_prefix. But we can do + better, to also cover the cases that 1. it has been installed + in a different prefix before being moved to orig_prefix and (later) + to curr_prefix, 2. unlike the program, it has not moved away from + orig_prefix. */ + const char *orig_installprefix = INSTALLPREFIX; + const char *orig_installdir = INSTALLDIR; + const char *curr_prefix_better; + + curr_prefix_better = + compute_curr_prefix (orig_installprefix, orig_installdir, + get_shared_library_fullname ()); + if (curr_prefix_better == NULL) + curr_prefix_better = curr_prefix; + + set_relocation_prefix (orig_installprefix, curr_prefix_better); + + initialized = 1; + } + #endif + + /* Note: It is not necessary to perform case insensitive comparison here, + even for DOS-like filesystems, because the pathname argument was + typically created from the same Makefile variable as orig_prefix came + from. */ + if (orig_prefix != NULL && curr_prefix != NULL + && strncmp (pathname, orig_prefix, orig_prefix_len) == 0) + { + if (pathname[orig_prefix_len] == '\0') + /* pathname equals orig_prefix. */ + return curr_prefix; + if (ISSLASH (pathname[orig_prefix_len])) + { + /* pathname starts with orig_prefix. */ + const char *pathname_tail = &pathname[orig_prefix_len]; + char *result = + (char *) xmalloc (curr_prefix_len + strlen (pathname_tail) + 1); + + #ifdef NO_XMALLOC + if (result != NULL) + #endif + { + memcpy (result, curr_prefix, curr_prefix_len); + strcpy (result + curr_prefix_len, pathname_tail); + return result; + } + } + } + /* Nothing to relocate. */ + return pathname; + } + + #endif diff -aNrc2 bash-2.05b-patched/lib/intl/relocatable.h bash-3.0/lib/intl/relocatable.h *** bash-2.05b-patched/lib/intl/relocatable.h Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/relocatable.h Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,67 ---- + /* Provide relocatable packages. + 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. */ + + #ifndef _RELOCATABLE_H + #define _RELOCATABLE_H + + /* This can be enabled through the configure --enable-relocatable option. */ + #if ENABLE_RELOCATABLE + + /* When building a DLL, we must export some functions. Note that because + this is a private .h file, we don't need to use __declspec(dllimport) + in any case. */ + #if defined _MSC_VER && BUILDING_DLL + # define RELOCATABLE_DLL_EXPORTED __declspec(dllexport) + #else + # define RELOCATABLE_DLL_EXPORTED + #endif + + /* Sets the original and the current installation prefix of the package. + Relocation simply replaces a pathname starting with the original prefix + by the corresponding pathname with the current prefix instead. Both + prefixes should be directory names without trailing slash (i.e. use "" + instead of "/"). */ + extern RELOCATABLE_DLL_EXPORTED void + set_relocation_prefix (const char *orig_prefix, + const char *curr_prefix); + + /* Returns the pathname, relocated according to the current installation + directory. */ + extern const char * relocate (const char *pathname); + + /* Memory management: relocate() leaks memory, because it has to construct + a fresh pathname. If this is a problem because your program calls + relocate() frequently, think about caching the result. */ + + /* Convenience function: + Computes the current installation prefix, based on the original + installation prefix, the original installation directory of a particular + file, and the current pathname of this file. Returns NULL upon failure. */ + extern const char * compute_curr_prefix (const char *orig_installprefix, + const char *orig_installdir, + const char *curr_pathname); + + #else + + /* By default, we use the hardwired pathnames. */ + #define relocate(pathname) (pathname) + + #endif + + #endif /* _RELOCATABLE_H */ diff -aNrc2 bash-2.05b-patched/lib/intl/textdomain.c bash-3.0/lib/intl/textdomain.c *** bash-2.05b-patched/lib/intl/textdomain.c Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/intl/textdomain.c Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,142 ---- + /* Implementation of the textdomain(3) function. + Copyright (C) 1995-1998, 2000, 2001, 2002 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 + + #include + #include + + #ifdef _LIBC + # include + #else + # include "libgnuintl.h" + #endif + #include "gettextP.h" + + #ifdef _LIBC + /* We have to handle multi-threaded applications. */ + # include + #else + /* Provide dummy implementation if this is outside glibc. */ + # define __libc_rwlock_define(CLASS, NAME) + # define __libc_rwlock_wrlock(NAME) + # define __libc_rwlock_unlock(NAME) + #endif + + /* The internal variables in the standalone libintl.a must have different + names than the internal variables in GNU libc, otherwise programs + using libintl.a cannot be linked statically. */ + #if !defined _LIBC + # define _nl_default_default_domain libintl_nl_default_default_domain + # define _nl_current_default_domain libintl_nl_current_default_domain + #endif + + /* @@ end of prolog @@ */ + + /* Name of the default text domain. */ + extern const char _nl_default_default_domain[] attribute_hidden; + + /* Default text domain in which entries for gettext(3) are to be found. */ + extern const char *_nl_current_default_domain attribute_hidden; + + + /* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ + #ifdef _LIBC + # define TEXTDOMAIN __textdomain + # ifndef strdup + # define strdup(str) __strdup (str) + # endif + #else + # define TEXTDOMAIN libintl_textdomain + #endif + + /* Lock variable to protect the global data in the gettext implementation. */ + __libc_rwlock_define (extern, _nl_state_lock attribute_hidden) + + /* Set the current default message catalog to DOMAINNAME. + If DOMAINNAME is null, return the current default. + If DOMAINNAME is "", reset to the default of "messages". */ + char * + TEXTDOMAIN (domainname) + const char *domainname; + { + char *new_domain; + char *old_domain; + + /* A NULL pointer requests the current setting. */ + if (domainname == NULL) + return (char *) _nl_current_default_domain; + + __libc_rwlock_wrlock (_nl_state_lock); + + old_domain = (char *) _nl_current_default_domain; + + /* If domain name is the null string set to default domain "messages". */ + if (domainname[0] == '\0' + || strcmp (domainname, _nl_default_default_domain) == 0) + { + _nl_current_default_domain = _nl_default_default_domain; + new_domain = (char *) _nl_current_default_domain; + } + else if (strcmp (domainname, old_domain) == 0) + /* This can happen and people will use it to signal that some + environment variable changed. */ + new_domain = old_domain; + else + { + /* If the following malloc fails `_nl_current_default_domain' + will be NULL. This value will be returned and so signals we + are out of core. */ + #if defined _LIBC || defined HAVE_STRDUP + new_domain = strdup (domainname); + #else + size_t len = strlen (domainname) + 1; + new_domain = (char *) malloc (len); + if (new_domain != NULL) + memcpy (new_domain, domainname, len); + #endif + + if (new_domain != NULL) + _nl_current_default_domain = new_domain; + } + + /* We use this possibility to signal a change of the loaded catalogs + since this is most likely the case and there is no other easy we + to do it. Do it only when the call was successful. */ + if (new_domain != NULL) + { + ++_nl_msg_cat_cntr; + + if (old_domain != new_domain && old_domain != _nl_default_default_domain) + free (old_domain); + } + + __libc_rwlock_unlock (_nl_state_lock); + + return new_domain; + } + + #ifdef _LIBC + /* Alias for function name in GNU C Library. */ + weak_alias (__textdomain, textdomain); + #endif diff -aNrc2 bash-2.05b-patched/lib/malloc/Makefile.in bash-3.0/lib/malloc/Makefile.in *** bash-2.05b-patched/lib/malloc/Makefile.in Sat Feb 16 13:05:39 2002 --- bash-3.0/lib/malloc/Makefile.in Wed Jan 21 14:33:07 2004 *************** *** 47,53 **** LOCAL_DEFS = @LOCAL_DEFS@ BASHINCDIR = ${topdir}/include ! INCLUDES = -I. -I../.. -I$(topdir) -I$(BASHINCDIR) -I$(topdir)/lib CCFLAGS = ${PROFILE_FLAGS} ${INCLUDES} $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) \ --- 47,60 ---- LOCAL_DEFS = @LOCAL_DEFS@ + LIBBUILD = ${BUILD_DIR}/lib + BASHINCDIR = ${topdir}/include ! INTL_LIBSRC = ${topdir}/lib/intl ! INTL_BUILDDIR = ${LIBBUILD}/intl ! INTL_INC = @INTL_INC@ ! LIBINTL_H = @LIBINTL_H@ ! ! INCLUDES = -I. -I../.. -I$(topdir) -I$(BASHINCDIR) -I$(topdir)/lib $(INTL_INC) CCFLAGS = ${PROFILE_FLAGS} ${INCLUDES} $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) \ *************** *** 116,119 **** --- 123,132 ---- table.o: ${srcdir}/imalloc.h ${srcdir}/table.h watch.o: ${srcdir}/imalloc.h ${srcdir}/watch.h + + malloc.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h + stats.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h + trace.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h + table.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h + watch.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h # Rules for deficient makes, like SunOS and Solaris diff -aNrc2 bash-2.05b-patched/lib/malloc/getpagesize.h bash-3.0/lib/malloc/getpagesize.h *** bash-2.05b-patched/lib/malloc/getpagesize.h Thu Aug 5 07:57:46 1999 --- bash-3.0/lib/malloc/getpagesize.h Sat Nov 29 16:00:44 2003 *************** *** 1,4 **** /* Emulation of getpagesize() for systems that need it. ! Copyright (C) 1991 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify --- 1,4 ---- /* Emulation of getpagesize() for systems that need it. ! Copyright (C) 1991-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify diff -aNrc2 bash-2.05b-patched/lib/malloc/imalloc.h bash-3.0/lib/malloc/imalloc.h *** bash-2.05b-patched/lib/malloc/imalloc.h Tue Jun 25 16:02:14 2002 --- bash-3.0/lib/malloc/imalloc.h Fri Dec 19 19:14:53 2003 *************** *** 1,5 **** /* imalloc.h -- internal malloc definitions shared by source files. */ ! /* Copyright (C) 2001 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,5 ---- /* imalloc.h -- internal malloc definitions shared by source files. */ ! /* Copyright (C) 2001-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 159,162 **** --- 159,168 ---- memcpy ((dest), (src), (nbytes)) \ } while(0) + + #if defined (SHELL) + # include "bashintl.h" + #else + # define _(x) x + #endif #endif /* _IMALLOC_H */ diff -aNrc2 bash-2.05b-patched/lib/malloc/malloc.c bash-3.0/lib/malloc/malloc.c *** bash-2.05b-patched/lib/malloc/malloc.c Fri Jun 21 15:16:49 2002 --- bash-3.0/lib/malloc/malloc.c Fri Dec 19 19:19:02 2003 *************** *** 1,5 **** /* malloc.c - dynamic memory allocation for bash. */ ! /* Copyright (C) 1985, 1987, 1997 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify --- 1,5 ---- /* malloc.c - dynamic memory allocation for bash. */ ! /* Copyright (C) 1985-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify *************** *** 237,241 **** 1048576UL, 2097152UL, 4194304UL, 8388608UL, 16777216UL, 33554432UL, 67108864UL, 134217728UL, 268435456UL, 536870912UL, 1073741824UL, ! 2147483648UL, 4294967296UL-1 }; --- 237,241 ---- 1048576UL, 2097152UL, 4194304UL, 8388608UL, 16777216UL, 33554432UL, 67108864UL, 134217728UL, 268435456UL, 536870912UL, 1073741824UL, ! 2147483648UL, 4294967295UL }; *************** *** 292,297 **** static void botch (s, file, line) { ! fprintf (stderr, "malloc: failed assertion: %s\n", s); (void)fflush (stderr); abort (); --- 292,300 ---- static void botch (s, file, line) + const char *s; + const char *file; + int line; { ! fprintf (stderr, _("malloc: failed assertion: %s\n"), s); (void)fflush (stderr); abort (); *************** *** 309,313 **** int line; { ! fprintf (stderr, "\r\nmalloc: %s:%d: assertion botched\r\n", file ? file : "unknown", line); #ifdef MALLOC_REGISTER --- 312,316 ---- int line; { ! fprintf (stderr, _("\r\nmalloc: %s:%d: assertion botched\r\n"), file ? file : "unknown", line); #ifdef MALLOC_REGISTER *************** *** 735,739 **** and bomb out on the NEXT allocate of this size block */ if (p->mh_alloc != ISFREE || p->mh_index != nunits) ! xbotch ((PTR_T)(p+1), 0, "malloc: block on free list clobbered", file, line); /* Fill in the info, and set up the magic numbers for range checking. */ --- 738,742 ---- and bomb out on the NEXT allocate of this size block */ if (p->mh_alloc != ISFREE || p->mh_index != nunits) ! xbotch ((PTR_T)(p+1), 0, _("malloc: block on free list clobbered"), file, line); /* Fill in the info, and set up the magic numbers for range checking. */ *************** *** 812,819 **** if (p->mh_alloc == ISFREE) xbotch (mem, ERR_DUPFREE, ! "free: called with already freed block argument", file, line); else xbotch (mem, ERR_UNALLOC, ! "free: called with unallocated block argument", file, line); } --- 815,822 ---- if (p->mh_alloc == ISFREE) xbotch (mem, ERR_DUPFREE, ! _("free: called with already freed block argument"), file, line); else xbotch (mem, ERR_UNALLOC, ! _("free: called with unallocated block argument"), file, line); } *************** *** 834,838 **** if (IN_BUCKET(nbytes, nunits) == 0) xbotch (mem, ERR_UNDERFLOW, ! "free: underflow detected; mh_nbytes out of range", file, line); ap += p->mh_nbytes; --- 837,841 ---- if (IN_BUCKET(nbytes, nunits) == 0) xbotch (mem, ERR_UNDERFLOW, ! _("free: underflow detected; mh_nbytes out of range"), file, line); ap += p->mh_nbytes; *************** *** 840,844 **** *z++ = *ap++, *z++ = *ap++, *z++ = *ap++, *z++ = *ap++; if (mg.i != p->mh_nbytes) ! xbotch (mem, ERR_ASSERT_FAILED, "free: start and end chunk sizes differ", file, line); #if 1 --- 843,847 ---- *z++ = *ap++, *z++ = *ap++, *z++ = *ap++, *z++ = *ap++; if (mg.i != p->mh_nbytes) ! xbotch (mem, ERR_ASSERT_FAILED, _("free: start and end chunk sizes differ"), file, line); #if 1 *************** *** 880,883 **** --- 883,887 ---- free_return: + ; /* Empty statement in case this is the end of the function */ #ifdef MALLOC_STATS *************** *** 936,940 **** if (p->mh_alloc != ISALLOC) xbotch (mem, ERR_UNALLOC, ! "realloc: called with unallocated block argument", file, line); ASSERT (p->mh_magic2 == MAGIC2); --- 940,944 ---- if (p->mh_alloc != ISALLOC) xbotch (mem, ERR_UNALLOC, ! _("realloc: called with unallocated block argument"), file, line); ASSERT (p->mh_magic2 == MAGIC2); *************** *** 951,955 **** if (IN_BUCKET(nbytes, nunits) == 0) xbotch (mem, ERR_UNDERFLOW, ! "realloc: underflow detected; mh_nbytes out of range", file, line); m = (char *)mem + (tocopy = p->mh_nbytes); --- 955,959 ---- if (IN_BUCKET(nbytes, nunits) == 0) xbotch (mem, ERR_UNDERFLOW, ! _("realloc: underflow detected; mh_nbytes out of range"), file, line); m = (char *)mem + (tocopy = p->mh_nbytes); *************** *** 957,961 **** *z++ = *m++, *z++ = *m++, *z++ = *m++, *z++ = *m++; if (mg.i != p->mh_nbytes) ! xbotch (mem, ERR_ASSERT_FAILED, "realloc: start and end chunk sizes differ", file, line); #ifdef MALLOC_WATCH --- 961,965 ---- *z++ = *m++, *z++ = *m++, *z++ = *m++, *z++ = *m++; if (mg.i != p->mh_nbytes) ! xbotch (mem, ERR_ASSERT_FAILED, _("realloc: start and end chunk sizes differ"), file, line); #ifdef MALLOC_WATCH diff -aNrc2 bash-2.05b-patched/lib/malloc/mstats.h bash-3.0/lib/malloc/mstats.h *** bash-2.05b-patched/lib/malloc/mstats.h Mon Apr 8 14:16:45 2002 --- bash-3.0/lib/malloc/mstats.h Sat Nov 29 16:01:30 2003 *************** *** 1,5 **** /* mstats.h - definitions for malloc statistics */ ! /* Copyright (C) 2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify --- 1,5 ---- /* mstats.h - definitions for malloc statistics */ ! /* Copyright (C) 2001-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify diff -aNrc2 bash-2.05b-patched/lib/malloc/shmalloc.h bash-3.0/lib/malloc/shmalloc.h *** bash-2.05b-patched/lib/malloc/shmalloc.h Mon Apr 8 14:21:42 2002 --- bash-3.0/lib/malloc/shmalloc.h Sat Nov 29 16:01:37 2003 *************** *** 1,5 **** /* Functions (currently) for use by the shell to do malloc debugging and tracking. */ ! /* Copyright (C) 2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify --- 1,5 ---- /* Functions (currently) for use by the shell to do malloc debugging and tracking. */ ! /* Copyright (C) 2001-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify *************** *** 54,57 **** --- 54,58 ---- extern int malloc_set_trace __P((int)); extern void malloc_set_tracefp (); /* full prototype requires stdio.h */ + extern void malloc_set_tracefn __P((char *, char *)); /* table.c */ diff -aNrc2 bash-2.05b-patched/lib/malloc/stats.c bash-3.0/lib/malloc/stats.c *** bash-2.05b-patched/lib/malloc/stats.c Mon Apr 8 14:16:49 2002 --- bash-3.0/lib/malloc/stats.c Sat Nov 29 16:01:44 2003 *************** *** 1,5 **** /* stats.c - malloc statistics */ ! /* Copyright (C) 2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify --- 1,5 ---- /* stats.c - malloc statistics */ ! /* Copyright (C) 2001-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify *************** *** 36,39 **** --- 36,41 ---- extern struct _malstats _mstats; + extern FILE *_imalloc_fopen __P((char *, char *, char *, char *, size_t)); + struct bucket_stats malloc_bucket_stats (size) *************** *** 130,135 **** } ! #define TRACEROOT "/var/tmp/maltrace/trace." ! static char mallbuf[1024]; void --- 132,136 ---- } ! #define TRACEROOT "/var/tmp/maltrace/stats." void *************** *** 137,141 **** --- 138,166 ---- char *s, *fn; { + FILE *fp; char defname[sizeof (TRACEROOT) + 64]; + static char mallbuf[1024]; + + fp = _imalloc_fopen (s, fn, TRACEROOT, defname, sizeof (defname)); + if (fp) + { + setvbuf (fp, mallbuf, _IOFBF, sizeof (mallbuf)); + _print_malloc_stats (s, fp); + fflush(fp); + fclose(fp); + } + } + + #endif /* MALLOC_STATS */ + + #if defined (MALLOC_STATS) || defined (MALLOC_TRACE) + FILE * + _imalloc_fopen (s, fn, def, defbuf, defsiz) + char *s; + char *fn; + char *def; + char *defbuf; + size_t defsiz; + { char fname[1024]; long l; *************** *** 145,150 **** if (fn == 0) { ! sprintf (defname, "%s%ld", TRACEROOT, l); ! fp = fopen(defname, "w"); } else --- 170,175 ---- if (fn == 0) { ! sprintf (defbuf, "%s%ld", def, l); ! fp = fopen(defbuf, "w"); } else *************** *** 172,184 **** fp = fopen (fname, "w"); } - - if (fp) - { - setvbuf (fp, mallbuf, _IOFBF, sizeof (mallbuf)); - _print_malloc_stats (s, fp); - fflush(fp); - fclose(fp); - } - } ! #endif /* MALLOC_STATS */ --- 197,202 ---- fp = fopen (fname, "w"); } ! return fp; ! } ! #endif /* MALLOC_STATS || MALLOC_TRACE */ diff -aNrc2 bash-2.05b-patched/lib/malloc/stub.c bash-3.0/lib/malloc/stub.c *** bash-2.05b-patched/lib/malloc/stub.c Tue Apr 16 17:03:10 2002 --- bash-3.0/lib/malloc/stub.c Sat Nov 29 16:01:53 2003 *************** *** 1,3 **** ! /* Copyright (C) 1993-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,3 ---- ! /* Copyright (C) 1993-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. diff -aNrc2 bash-2.05b-patched/lib/malloc/table.c bash-3.0/lib/malloc/table.c *** bash-2.05b-patched/lib/malloc/table.c Mon Apr 8 13:30:24 2002 --- bash-3.0/lib/malloc/table.c Fri Dec 19 19:21:15 2003 *************** *** 1,5 **** /* table.c - bookkeeping functions for allocated memory */ ! /* Copyright (C) 2001 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,5 ---- /* table.c - bookkeeping functions for allocated memory */ ! /* Copyright (C) 2001-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 173,177 **** { /* oops. table is full. punt. */ ! fprintf (stderr, "register_alloc: alloc table is full with FIND_ALLOC?\n"); return; } --- 173,177 ---- { /* oops. table is full. punt. */ ! fprintf (stderr, _("register_alloc: alloc table is full with FIND_ALLOC?\n")); return; } *************** *** 180,184 **** { /* oops. bad bookkeeping. ignore for now */ ! fprintf (stderr, "register_alloc: %p already in table as allocated?\n", mem); } --- 180,184 ---- { /* oops. bad bookkeeping. ignore for now */ ! fprintf (stderr, _("register_alloc: %p already in table as allocated?\n"), mem); } *************** *** 216,220 **** { /* oops. bad bookkeeping. ignore for now */ ! fprintf (stderr, "register_free: %p already in table as free?\n", mem); } --- 216,220 ---- { /* oops. bad bookkeeping. ignore for now */ ! fprintf (stderr, _("register_free: %p already in table as free?\n"), mem); } diff -aNrc2 bash-2.05b-patched/lib/malloc/table.h bash-3.0/lib/malloc/table.h *** bash-2.05b-patched/lib/malloc/table.h Tue Mar 12 11:08:00 2002 --- bash-3.0/lib/malloc/table.h Sat Nov 29 16:02:13 2003 *************** *** 1,5 **** /* table.h - definitions for tables for keeping track of allocated memory */ ! /* Copyright (C) 2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify --- 1,5 ---- /* table.h - definitions for tables for keeping track of allocated memory */ ! /* Copyright (C) 2001-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify diff -aNrc2 bash-2.05b-patched/lib/malloc/trace.c bash-3.0/lib/malloc/trace.c *** bash-2.05b-patched/lib/malloc/trace.c Thu Dec 6 08:38:16 2001 --- bash-3.0/lib/malloc/trace.c Sat Nov 29 16:02:26 2003 *************** *** 1,5 **** /* trace.c - tracing functions for malloc */ ! /* Copyright (C) 2001 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,5 ---- /* trace.c - tracing functions for malloc */ ! /* Copyright (C) 2001-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 30,33 **** --- 30,35 ---- static int _mtrace_verbose = 0; + extern FILE *_imalloc_fopen __P((char *, char *, char *, char *, size_t)); + #ifdef MALLOC_TRACE *************** *** 100,103 **** --- 102,122 ---- #ifdef MALLOC_TRACE _malloc_trace_buckets[n] = 1; + #endif + } + + #define TRACEROOT "/var/tmp/maltrace/trace." + + void + malloc_set_tracefn (s, fn) + char *s; + char *fn; + { + #ifdef MALLOC_TRACE + FILE *fp; + char defname[sizeof (TRACEROOT) + 64]; + + fp = _imalloc_fopen (s, fn, TRACEROOT, defname, sizeof (defname)); + if (fp) + malloc_set_tracefp (fp); #endif } diff -aNrc2 bash-2.05b-patched/lib/malloc/watch.c bash-3.0/lib/malloc/watch.c *** bash-2.05b-patched/lib/malloc/watch.c Fri May 24 11:32:53 2002 --- bash-3.0/lib/malloc/watch.c Fri Dec 19 19:22:30 2003 *************** *** 1,5 **** /* watch.c - watchpoint functions for malloc */ ! /* Copyright (C) 2001 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,5 ---- /* watch.c - watchpoint functions for malloc */ ! /* Copyright (C) 2001-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 44,58 **** if (type == W_ALLOC) ! tag = "allocated"; else if (type == W_FREE) ! tag = "freed"; else if (type == W_REALLOC) ! tag = "requesting resize"; else if (type == W_RESIZED) ! tag = "just resized"; else ! tag = "bug: unknown operation"; ! fprintf (stderr, "malloc: watch alert: %p %s ", addr, tag); if (data != (unsigned long)-1) fprintf (stderr, "(size %lu) ", data); --- 44,58 ---- if (type == W_ALLOC) ! tag = _("allocated"); else if (type == W_FREE) ! tag = _("freed"); else if (type == W_REALLOC) ! tag = _("requesting resize"); else if (type == W_RESIZED) ! tag = _("just resized"); else ! tag = _("bug: unknown operation"); ! fprintf (stderr, _("malloc: watch alert: %p %s "), addr, tag); if (data != (unsigned long)-1) fprintf (stderr, "(size %lu) ", data); diff -aNrc2 bash-2.05b-patched/lib/malloc/watch.h bash-3.0/lib/malloc/watch.h *** bash-2.05b-patched/lib/malloc/watch.h Thu Dec 13 12:12:06 2001 --- bash-3.0/lib/malloc/watch.h Sat Nov 29 16:02:40 2003 *************** *** 1,5 **** /* watch.h - definitions for tables for keeping track of allocated memory */ ! /* Copyright (C) 2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify --- 1,5 ---- /* watch.h - definitions for tables for keeping track of allocated memory */ ! /* Copyright (C) 2001-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify diff -aNrc2 bash-2.05b-patched/lib/malloc/xmalloc.c bash-3.0/lib/malloc/xmalloc.c *** bash-2.05b-patched/lib/malloc/xmalloc.c Thu Sep 27 12:43:41 2001 --- bash-3.0/lib/malloc/xmalloc.c Sat Nov 29 16:02:52 2003 *************** *** 1,5 **** /* xmalloc.c -- safe versions of malloc and realloc */ ! /* Copyright (C) 1991 Free Software Foundation, Inc. This file is part of GNU Readline, a library for reading lines --- 1,5 ---- /* xmalloc.c -- safe versions of malloc and realloc */ ! /* Copyright (C) 1991-2003 Free Software Foundation, Inc. This file is part of GNU Readline, a library for reading lines diff -aNrc2 bash-2.05b-patched/lib/readline/Makefile.in bash-3.0/lib/readline/Makefile.in *** bash-2.05b-patched/lib/readline/Makefile.in Thu Jan 24 10:14:21 2002 --- bash-3.0/lib/readline/Makefile.in Wed Dec 10 12:01:39 2003 *************** *** 21,24 **** --- 21,32 ---- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + PACKAGE = @PACKAGE_NAME@ + VERSION = @PACKAGE_VERSION@ + + PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + srcdir = @srcdir@ VPATH = .:@srcdir@ *************** *** 346,350 **** signals.o: signals.c terminal.o: terminal.c ! text.o: terminal.c tilde.o: tilde.c undo.o: undo.c --- 354,358 ---- signals.o: signals.c terminal.o: terminal.c ! text.o: text.c tilde.o: tilde.c undo.o: undo.c diff -aNrc2 bash-2.05b-patched/lib/readline/bind.c bash-3.0/lib/readline/bind.c *** bash-2.05b-patched/lib/readline/bind.c Thu Sep 5 10:52:30 2002 --- bash-3.0/lib/readline/bind.c Wed Mar 3 22:39:32 2004 *************** *** 20,25 **** --- 20,30 ---- have a copy of the license, write to the Free Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + #define READLINE_LIBRARY + #if defined (__TANDEM) + # include + #endif + #if defined (HAVE_CONFIG_H) # include *************** *** 149,152 **** --- 154,185 ---- } + /* Bind key sequence KEYSEQ to DEFAULT_FUNC if KEYSEQ is unbound. Right + now, this is always used to attempt to bind the arrow keys, hence the + check for rl_vi_movement_mode. */ + int + rl_bind_key_if_unbound_in_map (key, default_func, kmap) + int key; + rl_command_func_t *default_func; + Keymap kmap; + { + char keyseq[2]; + + keyseq[0] = (unsigned char)key; + keyseq[1] = '\0'; + return (rl_bind_keyseq_if_unbound_in_map (keyseq, default_func, kmap)); + } + + int + rl_bind_key_if_unbound (key, default_func) + int key; + rl_command_func_t *default_func; + { + char keyseq[2]; + + keyseq[0] = (unsigned char)key; + keyseq[1] = '\0'; + return (rl_bind_keyseq_if_unbound_in_map (keyseq, default_func, _rl_keymap)); + } + /* Make KEY do nothing in the currently selected keymap. Returns non-zero in case of error. */ *************** *** 201,207 **** --- 234,261 ---- /* Bind the key sequence represented by the string KEYSEQ to + FUNCTION, starting in the current keymap. This makes new + keymaps as necessary. */ + int + rl_bind_keyseq (keyseq, function) + const char *keyseq; + rl_command_func_t *function; + { + return (rl_generic_bind (ISFUNC, keyseq, (char *)function, _rl_keymap)); + } + + /* Bind the key sequence represented by the string KEYSEQ to FUNCTION. This makes new keymaps as necessary. The initial place to do bindings is in MAP. */ int + rl_bind_keyseq_in_map (keyseq, function, map) + const char *keyseq; + rl_command_func_t *function; + Keymap map; + { + return (rl_generic_bind (ISFUNC, keyseq, (char *)function, map)); + } + + /* Backwards compatibility; equivalent to rl_bind_keyseq_in_map() */ + int rl_set_key (keyseq, function, map) const char *keyseq; *************** *** 212,215 **** --- 266,303 ---- } + /* Bind key sequence KEYSEQ to DEFAULT_FUNC if KEYSEQ is unbound. Right + now, this is always used to attempt to bind the arrow keys, hence the + check for rl_vi_movement_mode. */ + int + rl_bind_keyseq_if_unbound_in_map (keyseq, default_func, kmap) + const char *keyseq; + rl_command_func_t *default_func; + Keymap kmap; + { + rl_command_func_t *func; + + if (keyseq) + { + func = rl_function_of_keyseq (keyseq, kmap, (int *)NULL); + #if defined (VI_MODE) + if (!func || func == rl_do_lowercase_version || func == rl_vi_movement_mode) + #else + if (!func || func == rl_do_lowercase_version) + #endif + return (rl_bind_keyseq_in_map (keyseq, default_func, kmap)); + else + return 1; + } + return 0; + } + + int + rl_bind_keyseq_if_unbound (keyseq, default_func) + const char *keyseq; + rl_command_func_t *default_func; + { + return (rl_bind_keyseq_if_unbound_in_map (keyseq, default_func, _rl_keymap)); + } + /* Bind the key sequence represented by the string KEYSEQ to the string of characters MACRO. This makes new keymaps as *************** *** 913,919 **** --- 1001,1013 ---- } + #if 0 /* Check the previous (n - 1) levels of the stack to make sure that we haven't previously turned off parsing. */ for (i = 0; i < if_stack_depth - 1; i++) + #else + /* Check the previous (n) levels of the stack to make sure that + we haven't previously turned off parsing. */ + for (i = 0; i < if_stack_depth; i++) + #endif if (if_stack[i] == 1) return 0; *************** *** 1162,1166 **** /* If this is a new-style key-binding, then do the binding with ! rl_set_key (). Otherwise, let the older code deal with it. */ if (*string == '"') { --- 1256,1260 ---- /* If this is a new-style key-binding, then do the binding with ! rl_bind_keyseq (). Otherwise, let the older code deal with it. */ if (*string == '"') { *************** *** 1201,1205 **** } else ! rl_set_key (seq, rl_named_function (funname), _rl_keymap); free (seq); --- 1295,1299 ---- } else ! rl_bind_keyseq (seq, rl_named_function (funname)); free (seq); *************** *** 1282,1285 **** --- 1376,1380 ---- { "print-completions-horizontally", &_rl_print_completions_horizontally, 0 }, { "show-all-if-ambiguous", &_rl_complete_show_all, 0 }, + { "show-all-if-unmodified", &_rl_complete_show_unmodified, 0 }, #if defined (VISIBLE_STATS) { "visible-stats", &rl_visible_stats, 0 }, *************** *** 1651,1655 **** state of keybindings and functions known to Readline. The info is always printed to rl_outstream, and in such a way that it can ! be read back in (i.e., passed to rl_parse_and_bind (). */ /* Print the names of functions known to Readline. */ --- 1746,1750 ---- state of keybindings and functions known to Readline. The info is always printed to rl_outstream, and in such a way that it can ! be read back in (i.e., passed to rl_parse_and_bind ()). */ /* Print the names of functions known to Readline. */ *************** *** 2111,2136 **** rl_on_new_line (); return (0); - } - - /* Bind key sequence KEYSEQ to DEFAULT_FUNC if KEYSEQ is unbound. Right - now, this is always used to attempt to bind the arrow keys, hence the - check for rl_vi_movement_mode. */ - void - _rl_bind_if_unbound (keyseq, default_func) - const char *keyseq; - rl_command_func_t *default_func; - { - rl_command_func_t *func; - - if (keyseq) - { - func = rl_function_of_keyseq (keyseq, _rl_keymap, (int *)NULL); - #if defined (VI_MODE) - if (!func || func == rl_do_lowercase_version || func == rl_vi_movement_mode) - #else - if (!func || func == rl_do_lowercase_version) - #endif - rl_set_key (keyseq, default_func, _rl_keymap); - } } --- 2206,2209 ---- diff -aNrc2 bash-2.05b-patched/lib/readline/callback.c bash-3.0/lib/readline/callback.c *** bash-2.05b-patched/lib/readline/callback.c Mon Sep 10 10:05:28 2001 --- bash-3.0/lib/readline/callback.c Fri Jan 31 13:14:31 2003 *************** *** 132,136 **** _rl_callback_newline (); } ! if (rl_pending_input) eof = readline_internal_char (); else --- 132,136 ---- _rl_callback_newline (); } ! if (rl_pending_input || _rl_pushed_input_available ()) eof = readline_internal_char (); else diff -aNrc2 bash-2.05b-patched/lib/readline/chardefs.h bash-3.0/lib/readline/chardefs.h *** bash-2.05b-patched/lib/readline/chardefs.h Thu Feb 14 11:38:18 2002 --- bash-3.0/lib/readline/chardefs.h Sat Feb 1 17:43:47 2003 *************** *** 78,82 **** #endif ! #define NON_NEGATIVE(c) ((unsigned char)(c) == (c)) /* Some systems define these; we want our definitions. */ --- 78,86 ---- #endif ! #if defined (CTYPE_NON_ASCII) ! # define NON_NEGATIVE(c) 1 ! #else ! # define NON_NEGATIVE(c) ((unsigned char)(c) == (c)) ! #endif /* Some systems define these; we want our definitions. */ diff -aNrc2 bash-2.05b-patched/lib/readline/complete.c bash-3.0/lib/readline/complete.c *** bash-2.05b-patched/lib/readline/complete.c Tue May 7 15:39:32 2002 --- bash-3.0/lib/readline/complete.c Thu Jul 1 13:57:58 2004 *************** *** 1,5 **** /* complete.c -- filename completion for readline. */ ! /* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for --- 1,5 ---- /* complete.c -- filename completion for readline. */ ! /* Copyright (C) 1987-2004 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for *************** *** 29,33 **** #include #if defined (HAVE_SYS_FILE_H) ! #include #endif --- 29,33 ---- #include #if defined (HAVE_SYS_FILE_H) ! # include #endif *************** *** 100,103 **** --- 100,105 ---- #endif + static int path_isdir PARAMS((const char *)); + static char *rl_quote_filename PARAMS((char *, int, char *)); *************** *** 106,109 **** --- 108,113 ---- static int _rl_internal_pager PARAMS((int)); static char *printable_part PARAMS((char *)); + static int fnwidth PARAMS((const char *)); + static int fnprint PARAMS((const char *)); static int print_filename PARAMS((char *, char *)); *************** *** 131,134 **** --- 135,142 ---- int _rl_complete_show_all = 0; + /* If non-zero, non-unique completions show the list of matches, unless it + is not possible to do partial completion and modify the line. */ + int _rl_complete_show_unmodified = 0; + /* If non-zero, completed directory names have a slash appended. */ int _rl_complete_mark_directories = 1; *************** *** 215,219 **** rl_complete_internal. The default list is the contents of rl_basic_word_break_characters. */ ! const char *rl_completer_word_break_characters = (const char *)NULL; /* List of characters which can be used to quote a substring of the line. --- 223,232 ---- rl_complete_internal. The default list is the contents of rl_basic_word_break_characters. */ ! /*const*/ char *rl_completer_word_break_characters = (/*const*/ char *)NULL; ! ! /* Hook function to allow an application to set the completion word ! break characters before readline breaks up the line. Allows ! position-dependent word break characters. */ ! rl_cpvfunc_t *rl_completion_word_break_hook = (rl_cpvfunc_t *)NULL; /* List of characters which can be used to quote a substring of the line. *************** *** 283,286 **** --- 296,312 ---- int rl_completion_append_character = ' '; + /* If non-zero, the completion functions don't append any closing quote. + This is set to 0 by rl_complete_internal and may be changed by an + application-specific completion function. */ + int rl_completion_suppress_quote = 0; + + /* Set to any quote character readline thinks it finds before any application + completion function is called. */ + int rl_completion_quote_character; + + /* Set to a non-zero value if readline found quoting anywhere in the word to + be completed; set before any application completion function is called. */ + int rl_completion_found_quote; + /* If non-zero, a slash will be appended to completed filenames that are symbolic links to directory names, subject to the value of the *************** *** 321,324 **** --- 347,352 ---- else if (_rl_complete_show_all) return (rl_complete_internal ('!')); + else if (_rl_complete_show_unmodified) + return (rl_complete_internal ('@')); else return (rl_complete_internal (TAB)); *************** *** 353,356 **** --- 381,386 ---- else if (_rl_complete_show_all) return '!'; + else if (_rl_complete_show_unmodified) + return '@'; else return TAB; *************** *** 373,377 **** rl_filename_quoting_desired = 1; rl_completion_type = what_to_do; ! rl_completion_suppress_append = 0; /* The completion entry function may optionally change this. */ --- 403,407 ---- rl_filename_quoting_desired = 1; rl_completion_type = what_to_do; ! rl_completion_suppress_append = rl_completion_suppress_quote = 0; /* The completion entry function may optionally change this. */ *************** *** 424,427 **** --- 454,466 ---- } + static int + path_isdir (filename) + const char *filename; + { + struct stat finfo; + + return (stat (filename, &finfo) == 0 && S_ISDIR (finfo.st_mode)); + } + #if defined (VISIBLE_STATS) /* Return the character which best describes FILENAME. *************** *** 521,571 **** } /* Output TO_PRINT to rl_outstream. If VISIBLE_STATS is defined and we are using it, check for and output a single character for `special' filenames. Return the number of characters we output. */ - #define PUTX(c) \ - do { \ - if (CTRL_CHAR (c)) \ - { \ - putc ('^', rl_outstream); \ - putc (UNCTRL (c), rl_outstream); \ - printed_len += 2; \ - } \ - else if (c == RUBOUT) \ - { \ - putc ('^', rl_outstream); \ - putc ('?', rl_outstream); \ - printed_len += 2; \ - } \ - else \ - { \ - putc (c, rl_outstream); \ - printed_len++; \ - } \ - } while (0) - static int print_filename (to_print, full_pathname) char *to_print, *full_pathname; { ! int printed_len = 0; ! #if !defined (VISIBLE_STATS) ! char *s; ! ! for (s = to_print; *s; s++) ! { ! PUTX (*s); ! } ! #else char *s, c, *new_full_pathname; - int extension_char, slen, tlen; ! for (s = to_print; *s; s++) ! { ! PUTX (*s); ! } ! if (rl_filename_completion_desired && rl_visible_stats) { /* If to_print != full_pathname, to_print is the basename of the --- 560,697 ---- } + /* Compute width of STRING when displayed on screen by print_filename */ + static int + fnwidth (string) + const char *string; + { + int width, pos; + #if defined (HANDLE_MULTIBYTE) + mbstate_t ps; + int left, w; + size_t clen; + wchar_t wc; + + left = strlen (string) + 1; + memset (&ps, 0, sizeof (mbstate_t)); + #endif + + width = pos = 0; + while (string[pos]) + { + if (CTRL_CHAR (*string) || *string == RUBOUT) + { + width += 2; + pos++; + } + else + { + #if defined (HANDLE_MULTIBYTE) + clen = mbrtowc (&wc, string + pos, left - pos, &ps); + if (MB_INVALIDCH (clen)) + { + width++; + pos++; + memset (&ps, 0, sizeof (mbstate_t)); + } + else if (MB_NULLWCH (clen)) + break; + else + { + pos += clen; + w = wcwidth (wc); + width += (w >= 0) ? w : 1; + } + #else + width++; + pos++; + #endif + } + } + + return width; + } + + static int + fnprint (to_print) + const char *to_print; + { + int printed_len; + const char *s; + #if defined (HANDLE_MULTIBYTE) + mbstate_t ps; + const char *end; + size_t tlen; + + end = to_print + strlen (to_print) + 1; + memset (&ps, 0, sizeof (mbstate_t)); + #endif + + printed_len = 0; + s = to_print; + while (*s) + { + if (CTRL_CHAR (*s)) + { + putc ('^', rl_outstream); + putc (UNCTRL (*s), rl_outstream); + printed_len += 2; + s++; + #if defined (HANDLE_MULTIBYTE) + memset (&ps, 0, sizeof (mbstate_t)); + #endif + } + else if (*s == RUBOUT) + { + putc ('^', rl_outstream); + putc ('?', rl_outstream); + printed_len += 2; + s++; + #if defined (HANDLE_MULTIBYTE) + memset (&ps, 0, sizeof (mbstate_t)); + #endif + } + else + { + #if defined (HANDLE_MULTIBYTE) + tlen = mbrlen (s, end - s, &ps); + if (MB_INVALIDCH (tlen)) + { + tlen = 1; + memset (&ps, 0, sizeof (mbstate_t)); + } + else if (MB_NULLWCH (tlen)) + break; + fwrite (s, 1, tlen, rl_outstream); + s += tlen; + #else + putc (*s, rl_outstream); + s++; + #endif + printed_len++; + } + } + + return printed_len; + } + /* Output TO_PRINT to rl_outstream. If VISIBLE_STATS is defined and we are using it, check for and output a single character for `special' filenames. Return the number of characters we output. */ static int print_filename (to_print, full_pathname) char *to_print, *full_pathname; { ! int printed_len, extension_char, slen, tlen; char *s, c, *new_full_pathname; ! extension_char = 0; ! printed_len = fnprint (to_print); ! #if defined (VISIBLE_STATS) ! if (rl_filename_completion_desired && (rl_visible_stats || _rl_complete_mark_directories)) ! #else ! if (rl_filename_completion_desired && _rl_complete_mark_directories) ! #endif { /* If to_print != full_pathname, to_print is the basename of the *************** *** 594,598 **** strcpy (new_full_pathname + slen + 1, to_print); ! extension_char = stat_char (new_full_pathname); free (new_full_pathname); --- 720,730 ---- strcpy (new_full_pathname + slen + 1, to_print); ! #if defined (VISIBLE_STATS) ! if (rl_visible_stats) ! extension_char = stat_char (new_full_pathname); ! else ! #endif ! if (path_isdir (new_full_pathname)) ! extension_char = '/'; free (new_full_pathname); *************** *** 602,606 **** { s = tilde_expand (full_pathname); ! extension_char = stat_char (s); } --- 734,744 ---- { s = tilde_expand (full_pathname); ! #if defined (VISIBLE_STATS) ! if (rl_visible_stats) ! extension_char = stat_char (s); ! else ! #endif ! if (path_isdir (s)) ! extension_char = '/'; } *************** *** 612,616 **** } } ! #endif /* VISIBLE_STATS */ return printed_len; } --- 750,754 ---- } } ! return printed_len; } *************** *** 652,656 **** { int scan, end, found_quote, delimiter, pass_next, isbrk; ! char quote_char; end = rl_point; --- 790,794 ---- { int scan, end, found_quote, delimiter, pass_next, isbrk; ! char quote_char, *brkchars; end = rl_point; *************** *** 658,661 **** --- 796,805 ---- quote_char = '\0'; + brkchars = 0; + if (rl_completion_word_break_hook) + brkchars = (*rl_completion_word_break_hook) (); + if (brkchars == 0) + brkchars = rl_completer_word_break_characters; + if (rl_completer_quote_characters) { *************** *** 664,668 **** --- 808,819 ---- of an unclosed quoted substring. */ /* FOUND_QUOTE is set so we know what kind of quotes we found. */ + #if defined (HANDLE_MULTIBYTE) + for (scan = pass_next = 0; scan < end; + scan = ((MB_CUR_MAX == 1 || rl_byte_oriented) + ? (scan + 1) + : _rl_find_next_mbchar (rl_line_buffer, scan, 1, MB_FIND_ANY))) + #else for (scan = pass_next = 0; scan < end; scan++) + #endif { if (pass_next) *************** *** 722,726 **** scan = rl_line_buffer[rl_point]; ! if (strchr (rl_completer_word_break_characters, scan) == 0) continue; --- 873,877 ---- scan = rl_line_buffer[rl_point]; ! if (strchr (brkchars, scan) == 0) continue; *************** *** 750,756 **** isbrk = (found_quote == 0 || (*rl_char_is_quoted_p) (rl_line_buffer, rl_point) == 0) && ! strchr (rl_completer_word_break_characters, scan) != 0; else ! isbrk = strchr (rl_completer_word_break_characters, scan) != 0; if (isbrk) --- 901,907 ---- isbrk = (found_quote == 0 || (*rl_char_is_quoted_p) (rl_line_buffer, rl_point) == 0) && ! strchr (brkchars, scan) != 0; else ! isbrk = strchr (brkchars, scan) != 0; if (isbrk) *************** *** 787,790 **** --- 938,944 ---- char **matches, *temp; + rl_completion_found_quote = found_quote; + rl_completion_quote_character = quote_char; + /* If the user wants to TRY to complete, but then wants to give up and use the default completion function, they set the *************** *** 890,893 **** --- 1044,1048 ---- register int i, c1, c2, si; int low; /* Count of max-matched characters. */ + char *dtext; /* dequoted TEXT, if needed */ #if defined (HANDLE_MULTIBYTE) int v; *************** *** 981,984 **** --- 1136,1159 ---- if (_rl_completion_case_fold) { + /* We're making an assumption here: + IF we're completing filenames AND + the application has defined a filename dequoting function AND + we found a quote character AND + the application has requested filename quoting + THEN + we assume that TEXT was dequoted before checking against + the file system and needs to be dequoted here before we + check against the list of matches + FI */ + dtext = (char *)NULL; + if (rl_filename_completion_desired && + rl_filename_dequoting_function && + rl_completion_found_quote && + rl_filename_quoting_desired) + { + dtext = (*rl_filename_dequoting_function) (text, rl_completion_quote_character); + text = dtext; + } + /* sort the list to get consistent answers. */ qsort (match_list+1, matches, sizeof(char *), (QSFUNC *)_rl_qsort_string_compare); *************** *** 1000,1003 **** --- 1175,1180 ---- /* otherwise, just use the text the user typed. */ strncpy (match_list[0], text, low); + + FREE (dtext); } else *************** *** 1204,1208 **** { temp = printable_part (matches[i]); ! len = strlen (temp); if (len > max) --- 1381,1385 ---- { temp = printable_part (matches[i]); ! len = fnwidth (temp); if (len > max) *************** *** 1339,1343 **** temp_string_index = 0; ! if (quote_char && rl_point && rl_line_buffer[rl_point - 1] != quote_char) temp_string[temp_string_index++] = quote_char; --- 1516,1521 ---- temp_string_index = 0; ! if (quote_char && rl_point && rl_completion_suppress_quote == 0 && ! rl_line_buffer[rl_point - 1] != quote_char) temp_string[temp_string_index++] = quote_char; *************** *** 1450,1454 **** `*' means insert all of the possible completions. `!' means to do standard completion, and list all possible completions if ! there is more than one. */ int rl_complete_internal (what_to_do) --- 1628,1634 ---- `*' means insert all of the possible completions. `!' means to do standard completion, and list all possible completions if ! there is more than one. ! `@' means to do standard completion, and list all possible completions if ! there is more than one and partial completion is not possible. */ int rl_complete_internal (what_to_do) *************** *** 1469,1473 **** ? rl_completion_entry_function : rl_filename_completion_function; - /* We now look backwards for the start of a filename/variable word. */ end = rl_point; --- 1649,1652 ---- *************** *** 1517,1520 **** --- 1696,1700 ---- case TAB: case '!': + case '@': /* Insert the first match with proper quoting. */ if (*matches[0]) *************** *** 1534,1537 **** --- 1714,1723 ---- { display_matches (matches); + break; + } + else if (what_to_do == '@') + { + if (nontrivial_lcd == 0) + display_matches (matches); break; } diff -aNrc2 bash-2.05b-patched/lib/readline/display.c bash-3.0/lib/readline/display.c *** bash-2.05b-patched/lib/readline/display.c Wed May 7 15:19:27 2003 --- bash-3.0/lib/readline/display.c Thu May 27 22:57:51 2004 *************** *** 1,5 **** /* display.c -- readline redisplay facility. */ ! /* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for --- 1,5 ---- /* display.c -- readline redisplay facility. */ ! /* Copyright (C) 1987-2004 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for *************** *** 179,182 **** --- 179,184 ---- static int prompt_last_screen_line; + static int prompt_physical_chars; + /* Expand the prompt string S and return the number of visible characters in *LP, if LP is not null. This is currently more-or-less *************** *** 184,188 **** index of the last invisible character in the returned string. NIFLP, if non-zero, is a place to store the number of invisible characters in ! the first prompt line. */ /* Current implementation: --- 186,191 ---- index of the last invisible character in the returned string. NIFLP, if non-zero, is a place to store the number of invisible characters in ! the first prompt line. The previous are used as byte counts -- indexes ! into a character buffer. */ /* Current implementation: *************** *** 194,210 **** static char * ! expand_prompt (pmt, lp, lip, niflp) char *pmt; ! int *lp, *lip, *niflp; { char *r, *ret, *p; ! int l, rl, last, ignoring, ninvis, invfl; /* Short-circuit if we can. */ ! if (strchr (pmt, RL_PROMPT_START_IGNORE) == 0) { r = savestring (pmt); if (lp) *lp = strlen (r); return r; } --- 197,219 ---- static char * ! expand_prompt (pmt, lp, lip, niflp, vlp) char *pmt; ! int *lp, *lip, *niflp, *vlp; { char *r, *ret, *p; ! int l, rl, last, ignoring, ninvis, invfl, ind, pind, physchars; /* Short-circuit if we can. */ ! if ((MB_CUR_MAX <= 1 || rl_byte_oriented) && strchr (pmt, RL_PROMPT_START_IGNORE) == 0) { r = savestring (pmt); if (lp) *lp = strlen (r); + if (lip) + *lip = 0; + if (niflp) + *niflp = 0; + if (vlp) + *vlp = lp ? *lp : strlen (r); return r; } *************** *** 215,219 **** invfl = 0; /* invisible chars in first line of prompt */ ! for (rl = ignoring = last = ninvis = 0, p = pmt; p && *p; p++) { /* This code strips the invisible character string markers --- 224,228 ---- invfl = 0; /* invisible chars in first line of prompt */ ! for (rl = ignoring = last = ninvis = physchars = 0, p = pmt; p && *p; p++) { /* This code strips the invisible character string markers *************** *** 232,242 **** else { ! *r++ = *p; ! if (!ignoring) ! rl++; else ! ninvis++; ! if (rl == _rl_screenwidth) invfl = ninvis; } } --- 241,273 ---- else { ! #if defined (HANDLE_MULTIBYTE) ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! { ! pind = p - pmt; ! ind = _rl_find_next_mbchar (pmt, pind, 1, MB_FIND_NONZERO); ! l = ind - pind; ! while (l--) ! *r++ = *p++; ! if (!ignoring) ! rl += ind - pind; ! else ! ninvis += ind - pind; ! p--; /* compensate for later increment */ ! } else ! #endif ! { ! *r++ = *p; ! if (!ignoring) ! rl++; /* visible length byte counter */ ! else ! ninvis++; /* invisible chars byte counter */ ! } ! ! if (rl >= _rl_screenwidth) invfl = ninvis; + + if (ignoring == 0) + physchars++; } } *************** *** 252,255 **** --- 283,288 ---- if (niflp) *niflp = invfl; + if (vlp) + *vlp = physchars; return ret; } *************** *** 263,267 **** char *ret; ! ret = expand_prompt (pmt, (int *)NULL, (int *)NULL, (int *)NULL); return ret; } --- 296,300 ---- char *ret; ! ret = expand_prompt (pmt, (int *)NULL, (int *)NULL, (int *)NULL, (int *)NULL); return ret; } *************** *** 307,311 **** local_prompt = expand_prompt (prompt, &prompt_visible_length, &prompt_last_invisible, ! &prompt_invis_chars_first_line); local_prompt_prefix = (char *)0; return (prompt_visible_length); --- 340,345 ---- local_prompt = expand_prompt (prompt, &prompt_visible_length, &prompt_last_invisible, ! &prompt_invis_chars_first_line, ! &prompt_physical_chars); local_prompt_prefix = (char *)0; return (prompt_visible_length); *************** *** 317,321 **** local_prompt = expand_prompt (p, &prompt_visible_length, &prompt_last_invisible, ! &prompt_invis_chars_first_line); c = *t; *t = '\0'; /* The portion of the prompt string up to and including the --- 351,356 ---- local_prompt = expand_prompt (p, &prompt_visible_length, &prompt_last_invisible, ! (int *)NULL, ! (int *)NULL); c = *t; *t = '\0'; /* The portion of the prompt string up to and including the *************** *** 323,327 **** local_prompt_prefix = expand_prompt (prompt, &prompt_prefix_length, (int *)NULL, ! &prompt_invis_chars_first_line); *t = c; return (prompt_prefix_length); --- 358,363 ---- local_prompt_prefix = expand_prompt (prompt, &prompt_prefix_length, (int *)NULL, ! &prompt_invis_chars_first_line, ! &prompt_physical_chars); *t = c; return (prompt_prefix_length); *************** *** 382,386 **** register char *line; int c_pos, inv_botlin, lb_botlin, lb_linenum; ! int newlines, lpos, temp; char *prompt_this_line; #if defined (HANDLE_MULTIBYTE) --- 418,422 ---- register char *line; int c_pos, inv_botlin, lb_botlin, lb_linenum; ! int newlines, lpos, temp, modmark; char *prompt_this_line; #if defined (HANDLE_MULTIBYTE) *************** *** 412,419 **** --- 448,457 ---- /* Mark the line as modified or not. We only do this for history lines. */ + modmark = 0; if (_rl_mark_modified_lines && current_history () && rl_undo_list) { line[out++] = '*'; line[out] = '\0'; + modmark = 1; } *************** *** 469,473 **** } ! pmtlen = strlen (prompt_this_line); temp = pmtlen + out + 2; if (temp >= line_size) --- 507,511 ---- } ! prompt_physical_chars = pmtlen = strlen (prompt_this_line); temp = pmtlen + out + 2; if (temp >= line_size) *************** *** 528,532 **** --- 566,575 ---- /* inv_lbreaks[i] is where line i starts in the buffer. */ inv_lbreaks[newlines = 0] = 0; + #if 0 lpos = out - wrap_offset; + #else + lpos = prompt_physical_chars + modmark; + #endif + #if defined (HANDLE_MULTIBYTE) memset (_rl_wrapped_line, 0, vis_lbsize); *************** *** 547,559 **** saying how many invisible characters there are per line, but that's probably too much work for the benefit gained. How many people have ! prompts that exceed two physical lines? */ temp = ((newlines + 1) * _rl_screenwidth) + ! #if 0 ! ((newlines == 0) ? prompt_invis_chars_first_line : 0) + ! #else ! ((newlines == 0 && local_prompt_prefix == 0) ? prompt_invis_chars_first_line : 0) + ! #endif ! ((newlines == 1) ? wrap_offset : 0); ! inv_lbreaks[++newlines] = temp; lpos -= _rl_screenwidth; --- 590,600 ---- saying how many invisible characters there are per line, but that's probably too much work for the benefit gained. How many people have ! prompts that exceed two physical lines? ! Additional logic fix from Edward Catmur */ temp = ((newlines + 1) * _rl_screenwidth) + ! ((local_prompt_prefix == 0) ? ((newlines == 0) ? prompt_invis_chars_first_line ! : ((newlines == 1) ? wrap_offset : 0)) ! : ((newlines == 0) ? wrap_offset :0)); ! inv_lbreaks[++newlines] = temp; lpos -= _rl_screenwidth; *************** *** 587,591 **** if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { ! if (wc_bytes == (size_t)-1 || wc_bytes == (size_t)-2) { /* Byte sequence is invalid or shortened. Assume that the --- 628,632 ---- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { ! if (MB_INVALIDCH (wc_bytes)) { /* Byte sequence is invalid or shortened. Assume that the *************** *** 596,605 **** memset (&ps, 0, sizeof (mbstate_t)); } ! else if (wc_bytes == (size_t)0) break; /* Found '\0' */ else { temp = wcwidth (wc); ! wc_width = (temp < 0) ? 1 : temp; } } --- 637,646 ---- memset (&ps, 0, sizeof (mbstate_t)); } ! else if (MB_NULLWCH (wc_bytes)) break; /* Found '\0' */ else { temp = wcwidth (wc); ! wc_width = (temp >= 0) ? temp : 1; } } *************** *** 868,872 **** _rl_output_some_chars (local_prompt, nleft); if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! _rl_last_c_pos = _rl_col_width(local_prompt, 0, nleft); else _rl_last_c_pos = nleft; --- 909,913 ---- _rl_output_some_chars (local_prompt, nleft); if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! _rl_last_c_pos = _rl_col_width (local_prompt, 0, nleft); else _rl_last_c_pos = nleft; *************** *** 1070,1079 **** memset (&ps, 0, sizeof (mbstate_t)); ret = mbrtowc (&wc, new, MB_CUR_MAX, &ps); ! if (ret == (size_t)-1 || ret == (size_t)-2) { tempwidth = 1; ret = 1; } ! else if (ret == 0) tempwidth = 0; else --- 1111,1120 ---- memset (&ps, 0, sizeof (mbstate_t)); ret = mbrtowc (&wc, new, MB_CUR_MAX, &ps); ! if (MB_INVALIDCH (ret)) { tempwidth = 1; ret = 1; } ! else if (MB_NULLWCH (ret)) tempwidth = 0; else *************** *** 1092,1096 **** if (ret != 0 && bytes != 0) { ! if (ret == (size_t)-1 || ret == (size_t)-2) memmove (old+bytes, old+1, strlen (old+1)); else --- 1133,1137 ---- if (ret != 0 && bytes != 0) { ! if (MB_INVALIDCH (ret)) memmove (old+bytes, old+1, strlen (old+1)); else *************** *** 1127,1142 **** if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { ! memset (&ps_new, 0, sizeof(mbstate_t)); ! memset (&ps_old, 0, sizeof(mbstate_t)); ! new_offset = old_offset = 0; ! for (ofd = old, nfd = new; ! (ofd - old < omax) && *ofd && ! _rl_compare_chars(old, old_offset, &ps_old, new, new_offset, &ps_new); ) ! { ! old_offset = _rl_find_next_mbchar (old, old_offset, 1, MB_FIND_ANY); ! new_offset = _rl_find_next_mbchar (new, new_offset, 1, MB_FIND_ANY); ! ofd = old + old_offset; ! nfd = new + new_offset; } } --- 1168,1202 ---- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { ! /* See if the old line is a subset of the new line, so that the ! only change is adding characters. */ ! temp = (omax < nmax) ? omax : nmax; ! if (memcmp (old, new, temp) == 0) ! { ! ofd = old + temp; ! nfd = new + temp; ! } ! else ! { ! memset (&ps_new, 0, sizeof(mbstate_t)); ! memset (&ps_old, 0, sizeof(mbstate_t)); ! if (omax == nmax && STREQN (new, old, omax)) ! { ! ofd = old + omax; ! nfd = new + nmax; ! } ! else ! { ! new_offset = old_offset = 0; ! for (ofd = old, nfd = new; ! (ofd - old < omax) && *ofd && ! _rl_compare_chars(old, old_offset, &ps_old, new, new_offset, &ps_new); ) ! { ! old_offset = _rl_find_next_mbchar (old, old_offset, 1, MB_FIND_ANY); ! new_offset = _rl_find_next_mbchar (new, new_offset, 1, MB_FIND_ANY); ! ofd = old + old_offset; ! nfd = new + new_offset; ! } ! } } } *************** *** 1170,1175 **** --- 1230,1238 ---- memset (&ps_new, 0, sizeof (mbstate_t)); + #if 0 + /* On advice from jir@yamato.ibm.com */ _rl_adjust_point (old, ols - old, &ps_old); _rl_adjust_point (new, nls - new, &ps_new); + #endif if (_rl_compare_chars (old, ols - old, &ps_old, new, nls - new, &ps_new) == 0) *************** *** 1325,1329 **** _rl_last_c_pos += col_lendiff; } ! else if (*ols == 0) { /* At the end of a line the characters do not have to --- 1388,1392 ---- _rl_last_c_pos += col_lendiff; } ! else if (*ols == 0 && lendiff > 0) { /* At the end of a line the characters do not have to *************** *** 1348,1352 **** { _rl_output_some_chars (nfd + lendiff, temp - lendiff); ! #if 0 _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-col_lendiff); #else --- 1411,1419 ---- { _rl_output_some_chars (nfd + lendiff, temp - lendiff); ! #if 1 ! /* XXX -- this bears closer inspection. Fixes a redisplay bug ! reported against bash-3.0-alpha by Andreas Schwab involving ! multibyte characters and prompt strings with invisible ! characters, but was previously disabled. */ _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-col_lendiff); #else *************** *** 1427,1436 **** /* Tell the update routines that we have moved onto a new line with the prompt already displayed. Code originally from the version of readline ! distributed with CLISP. */ int rl_on_new_line_with_prompt () { int prompt_size, i, l, real_screenwidth, newlines; ! char *prompt_last_line; /* Initialize visible_line and invisible_line to ensure that they can hold --- 1494,1504 ---- /* Tell the update routines that we have moved onto a new line with the prompt already displayed. Code originally from the version of readline ! distributed with CLISP. rl_expand_prompt must have already been called ! (explicitly or implicitly). This still doesn't work exactly right. */ int rl_on_new_line_with_prompt () { int prompt_size, i, l, real_screenwidth, newlines; ! char *prompt_last_line, *lprompt; /* Initialize visible_line and invisible_line to ensure that they can hold *************** *** 1441,1446 **** /* Make sure the line structures hold the already-displayed prompt for redisplay. */ ! strcpy (visible_line, rl_prompt); ! strcpy (invisible_line, rl_prompt); /* If the prompt contains newlines, take the last tail. */ --- 1509,1515 ---- /* Make sure the line structures hold the already-displayed prompt for redisplay. */ ! lprompt = local_prompt ? local_prompt : rl_prompt; ! strcpy (visible_line, lprompt); ! strcpy (invisible_line, lprompt); /* If the prompt contains newlines, take the last tail. */ *************** *** 1477,1480 **** --- 1546,1551 ---- visible_wrap_offset = 0; + rl_display_prompt = rl_prompt; /* XXX - make sure it's set */ + return 0; } *************** *** 1768,1775 **** --- 1839,1850 ---- } + /* These are getting numerous enough that it's time to create a struct. */ + static char *saved_local_prompt; static char *saved_local_prefix; static int saved_last_invisible; static int saved_visible_length; + static int saved_invis_chars_first_line; + static int saved_physical_chars; void *************** *** 1780,1786 **** --- 1855,1864 ---- saved_last_invisible = prompt_last_invisible; saved_visible_length = prompt_visible_length; + saved_invis_chars_first_line = prompt_invis_chars_first_line; + saved_physical_chars = prompt_physical_chars; local_prompt = local_prompt_prefix = (char *)0; prompt_last_invisible = prompt_visible_length = 0; + prompt_invis_chars_first_line = prompt_physical_chars = 0; } *************** *** 1795,1798 **** --- 1873,1878 ---- prompt_last_invisible = saved_last_invisible; prompt_visible_length = saved_visible_length; + prompt_invis_chars_first_line = saved_invis_chars_first_line; + prompt_physical_chars = saved_physical_chars; } *************** *** 1827,1830 **** --- 1907,1911 ---- prompt_visible_length = saved_visible_length + 1; } + return pmt; } *************** *** 2003,2007 **** { char *oldp, *oldl, *oldlprefix; ! int oldlen, oldlast, oldplen, oldninvis; /* Geez, I should make this a struct. */ --- 2084,2088 ---- { char *oldp, *oldl, *oldlprefix; ! int oldlen, oldlast, oldplen, oldninvis, oldphyschars; /* Geez, I should make this a struct. */ *************** *** 2013,2021 **** oldlast = prompt_last_invisible; oldninvis = prompt_invis_chars_first_line; rl_display_prompt = t; local_prompt = expand_prompt (t, &prompt_visible_length, &prompt_last_invisible, ! &prompt_invis_chars_first_line); local_prompt_prefix = (char *)NULL; rl_forced_update_display (); --- 2094,2104 ---- oldlast = prompt_last_invisible; oldninvis = prompt_invis_chars_first_line; + oldphyschars = prompt_physical_chars; rl_display_prompt = t; local_prompt = expand_prompt (t, &prompt_visible_length, &prompt_last_invisible, ! &prompt_invis_chars_first_line, ! &prompt_physical_chars); local_prompt_prefix = (char *)NULL; rl_forced_update_display (); *************** *** 2028,2031 **** --- 2111,2115 ---- prompt_last_invisible = oldlast; prompt_invis_chars_first_line = oldninvis; + prompt_physical_chars = oldphyschars; } *************** *** 2137,2141 **** { tmp = mbrlen (str + point, max, &ps); ! if ((size_t)tmp == (size_t)-1 || (size_t)tmp == (size_t)-2) { /* In this case, the bytes are invalid or too short to compose a --- 2221,2225 ---- { tmp = mbrlen (str + point, max, &ps); ! if (MB_INVALIDCH ((size_t)tmp)) { /* In this case, the bytes are invalid or too short to compose a *************** *** 2149,2154 **** memset (&ps, 0, sizeof (mbstate_t)); } ! else if (tmp == 0) ! break; /* Found '\0' */ else { --- 2233,2238 ---- memset (&ps, 0, sizeof (mbstate_t)); } ! else if (MB_NULLWCH (tmp)) ! break; /* Found '\0' */ else { *************** *** 2166,2170 **** { tmp = mbrtowc (&wc, str + point, max, &ps); ! if ((size_t)tmp == (size_t)-1 || (size_t)tmp == (size_t)-2) { /* In this case, the bytes are invalid or too short to compose a --- 2250,2254 ---- { tmp = mbrtowc (&wc, str + point, max, &ps); ! if (MB_INVALIDCH ((size_t)tmp)) { /* In this case, the bytes are invalid or too short to compose a *************** *** 2181,2186 **** memset (&ps, 0, sizeof (mbstate_t)); } ! else if (tmp == 0) ! break; /* Found '\0' */ else { --- 2265,2270 ---- memset (&ps, 0, sizeof (mbstate_t)); } ! else if (MB_NULLWCH (tmp)) ! break; /* Found '\0' */ else { diff -aNrc2 bash-2.05b-patched/lib/readline/doc/Makefile bash-3.0/lib/readline/doc/Makefile *** bash-2.05b-patched/lib/readline/doc/Makefile Tue Apr 16 17:08:28 2002 --- bash-3.0/lib/readline/doc/Makefile Thu Feb 20 17:37:49 2003 *************** *** 50,58 **** DVIPS = dvips -D ${PSDPI} $(QUIETPS) -o $@ # tricky ! RLSRC = $(srcdir)/rlman.texinfo $(srcdir)/rluser.texinfo \ ! $(srcdir)/rltech.texinfo $(srcdir)/manvers.texinfo \ ! $(srcdir)/rluserman.texinfo ! HISTSRC = $(srcdir)/hist.texinfo $(srcdir)/hsuser.texinfo \ ! $(srcdir)/hstech.texinfo $(srcdir)/manvers.texinfo # This should be a program that converts troff to an ascii-readable format --- 50,58 ---- DVIPS = dvips -D ${PSDPI} $(QUIETPS) -o $@ # tricky ! RLSRC = $(srcdir)/rlman.texi $(srcdir)/rluser.texi \ ! $(srcdir)/rltech.texi $(srcdir)/version.texi \ ! $(srcdir)/rluserman.texi ! HISTSRC = $(srcdir)/history.texi $(srcdir)/hsuser.texi \ ! $(srcdir)/hstech.texi $(srcdir)/version.texi # This should be a program that converts troff to an ascii-readable format *************** *** 67,71 **** HTMLOBJ = readline.html history.html rluserman.html ! INTERMEDIATE_OBJ = rlman.dvi hist.dvi rluserman.dvi CREATED_DOCS = $(DVIOBJ) $(INFOOBJ) $(PSOBJ) $(HTMLOBJ) --- 67,71 ---- HTMLOBJ = readline.html history.html rluserman.html ! INTERMEDIATE_OBJ = rlman.dvi CREATED_DOCS = $(DVIOBJ) $(INFOOBJ) $(PSOBJ) $(HTMLOBJ) *************** *** 77,98 **** readline.dvi: $(RLSRC) ! TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rlman.texinfo mv rlman.dvi readline.dvi readline.info: $(RLSRC) ! $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rlman.texinfo rluserman.dvi: $(RLSRC) ! TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rluserman.texinfo rluserman.info: $(RLSRC) ! $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rluserman.texinfo history.dvi: ${HISTSRC} ! TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/hist.texinfo ! mv hist.dvi history.dvi history.info: ${HISTSRC} ! $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/hist.texinfo readline.ps: readline.dvi --- 77,97 ---- readline.dvi: $(RLSRC) ! TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rlman.texi mv rlman.dvi readline.dvi readline.info: $(RLSRC) ! $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rlman.texi rluserman.dvi: $(RLSRC) ! TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rluserman.texi rluserman.info: $(RLSRC) ! $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rluserman.texi history.dvi: ${HISTSRC} ! TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/history.texi history.info: ${HISTSRC} ! $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/history.texi readline.ps: readline.dvi *************** *** 109,123 **** readline.html: ${RLSRC} ! $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rlman.texinfo sed -e 's:rlman.html:readline.html:' rlman.html > readline.html $(RM) rlman.html rluserman.html: ${RLSRC} ! $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rluserman.texinfo history.html: ${HISTSRC} ! $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/hist.texinfo ! sed -e 's:hist.html:history.html:' hist.html > history.html ! $(RM) hist.html info: $(INFOOBJ) --- 108,120 ---- readline.html: ${RLSRC} ! $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rlman.texi sed -e 's:rlman.html:readline.html:' rlman.html > readline.html $(RM) rlman.html rluserman.html: ${RLSRC} ! $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rluserman.texi history.html: ${HISTSRC} ! $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/history.texi info: $(INFOOBJ) diff -aNrc2 bash-2.05b-patched/lib/readline/doc/fdl.texi bash-3.0/lib/readline/doc/fdl.texi *** bash-2.05b-patched/lib/readline/doc/fdl.texi Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/readline/doc/fdl.texi Tue Feb 18 08:47:52 2003 *************** *** 0 **** --- 1,452 ---- + + @node GNU Free Documentation License + @appendixsec GNU Free Documentation License + + @cindex FDL, GNU Free Documentation License + @center Version 1.2, November 2002 + + @display + Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + @end display + + @enumerate 0 + @item + PREAMBLE + + The purpose of this License is to make a manual, textbook, or other + functional and useful document @dfn{free} in the sense of freedom: to + assure everyone the effective freedom to copy and redistribute it, + with or without modifying it, either commercially or noncommercially. + Secondarily, this License preserves for the author and publisher a way + to get credit for their work, while not being considered responsible + for modifications made by others. + + This License is a kind of ``copyleft'', which means that derivative + works of the document must themselves be free in the same sense. It + complements the GNU General Public License, which is a copyleft + license designed for free software. + + We have designed this License in order to use it for manuals for free + software, because free software needs free documentation: a free + program should come with manuals providing the same freedoms that the + software does. But this License is not limited to software manuals; + it can be used for any textual work, regardless of subject matter or + whether it is published as a printed book. We recommend this License + principally for works whose purpose is instruction or reference. + + @item + APPLICABILITY AND DEFINITIONS + + This License applies to any manual or other work, in any medium, that + contains a notice placed by the copyright holder saying it can be + distributed under the terms of this License. Such a notice grants a + world-wide, royalty-free license, unlimited in duration, to use that + work under the conditions stated herein. The ``Document'', below, + refers to any such manual or work. Any member of the public is a + licensee, and is addressed as ``you''. You accept the license if you + copy, modify or distribute the work in a way requiring permission + under copyright law. + + A ``Modified Version'' of the Document means any work containing the + Document or a portion of it, either copied verbatim, or with + modifications and/or translated into another language. + + A ``Secondary Section'' is a named appendix or a front-matter section + of the Document that deals exclusively with the relationship of the + publishers or authors of the Document to the Document's overall + subject (or to related matters) and contains nothing that could fall + directly within that overall subject. (Thus, if the Document is in + part a textbook of mathematics, a Secondary Section may not explain + any mathematics.) The relationship could be a matter of historical + connection with the subject or with related matters, or of legal, + commercial, philosophical, ethical or political position regarding + them. + + The ``Invariant Sections'' are certain Secondary Sections whose titles + are designated, as being those of Invariant Sections, in the notice + that says that the Document is released under this License. If a + section does not fit the above definition of Secondary then it is not + allowed to be designated as Invariant. The Document may contain zero + Invariant Sections. If the Document does not identify any Invariant + Sections then there are none. + + The ``Cover Texts'' are certain short passages of text that are listed, + as Front-Cover Texts or Back-Cover Texts, in the notice that says that + the Document is released under this License. A Front-Cover Text may + be at most 5 words, and a Back-Cover Text may be at most 25 words. + + A ``Transparent'' copy of the Document means a machine-readable copy, + represented in a format whose specification is available to the + general public, that is suitable for revising the document + straightforwardly with generic text editors or (for images composed of + pixels) generic paint programs or (for drawings) some widely available + drawing editor, and that is suitable for input to text formatters or + for automatic translation to a variety of formats suitable for input + to text formatters. A copy made in an otherwise Transparent file + format whose markup, or absence of markup, has been arranged to thwart + or discourage subsequent modification by readers is not Transparent. + An image format is not Transparent if used for any substantial amount + of text. A copy that is not ``Transparent'' is called ``Opaque''. + + Examples of suitable formats for Transparent copies include plain + @sc{ascii} without markup, Texinfo input format, La@TeX{} input + format, @acronym{SGML} or @acronym{XML} using a publicly available + @acronym{DTD}, and standard-conforming simple @acronym{HTML}, + PostScript or @acronym{PDF} designed for human modification. Examples + of transparent image formats include @acronym{PNG}, @acronym{XCF} and + @acronym{JPG}. Opaque formats include proprietary formats that can be + read and edited only by proprietary word processors, @acronym{SGML} or + @acronym{XML} for which the @acronym{DTD} and/or processing tools are + not generally available, and the machine-generated @acronym{HTML}, + PostScript or @acronym{PDF} produced by some word processors for + output purposes only. + + The ``Title Page'' means, for a printed book, the title page itself, + plus such following pages as are needed to hold, legibly, the material + this License requires to appear in the title page. For works in + formats which do not have any title page as such, ``Title Page'' means + the text near the most prominent appearance of the work's title, + preceding the beginning of the body of the text. + + A section ``Entitled XYZ'' means a named subunit of the Document whose + title either is precisely XYZ or contains XYZ in parentheses following + text that translates XYZ in another language. (Here XYZ stands for a + specific section name mentioned below, such as ``Acknowledgements'', + ``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title'' + of such a section when you modify the Document means that it remains a + section ``Entitled XYZ'' according to this definition. + + The Document may include Warranty Disclaimers next to the notice which + states that this License applies to the Document. These Warranty + Disclaimers are considered to be included by reference in this + License, but only as regards disclaiming warranties: any other + implication that these Warranty Disclaimers may have is void and has + no effect on the meaning of this License. + + @item + VERBATIM COPYING + + You may copy and distribute the Document in any medium, either + commercially or noncommercially, provided that this License, the + copyright notices, and the license notice saying this License applies + to the Document are reproduced in all copies, and that you add no other + conditions whatsoever to those of this License. You may not use + technical measures to obstruct or control the reading or further + copying of the copies you make or distribute. However, you may accept + compensation in exchange for copies. If you distribute a large enough + number of copies you must also follow the conditions in section 3. + + You may also lend copies, under the same conditions stated above, and + you may publicly display copies. + + @item + COPYING IN QUANTITY + + If you publish printed copies (or copies in media that commonly have + printed covers) of the Document, numbering more than 100, and the + Document's license notice requires Cover Texts, you must enclose the + copies in covers that carry, clearly and legibly, all these Cover + Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on + the back cover. Both covers must also clearly and legibly identify + you as the publisher of these copies. The front cover must present + the full title with all words of the title equally prominent and + visible. You may add other material on the covers in addition. + Copying with changes limited to the covers, as long as they preserve + the title of the Document and satisfy these conditions, can be treated + as verbatim copying in other respects. + + If the required texts for either cover are too voluminous to fit + legibly, you should put the first ones listed (as many as fit + reasonably) on the actual cover, and continue the rest onto adjacent + pages. + + If you publish or distribute Opaque copies of the Document numbering + more than 100, you must either include a machine-readable Transparent + copy along with each Opaque copy, or state in or with each Opaque copy + a computer-network location from which the general network-using + public has access to download using public-standard network protocols + a complete Transparent copy of the Document, free of added material. + If you use the latter option, you must take reasonably prudent steps, + when you begin distribution of Opaque copies in quantity, to ensure + that this Transparent copy will remain thus accessible at the stated + location until at least one year after the last time you distribute an + Opaque copy (directly or through your agents or retailers) of that + edition to the public. + + It is requested, but not required, that you contact the authors of the + Document well before redistributing any large number of copies, to give + them a chance to provide you with an updated version of the Document. + + @item + MODIFICATIONS + + You may copy and distribute a Modified Version of the Document under + the conditions of sections 2 and 3 above, provided that you release + the Modified Version under precisely this License, with the Modified + Version filling the role of the Document, thus licensing distribution + and modification of the Modified Version to whoever possesses a copy + of it. In addition, you must do these things in the Modified Version: + + @enumerate A + @item + Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. + + @item + List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has fewer than five), + unless they release you from this requirement. + + @item + State on the Title page the name of the publisher of the + Modified Version, as the publisher. + + @item + Preserve all the copyright notices of the Document. + + @item + Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. + + @item + Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. + + @item + Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. + + @item + Include an unaltered copy of this License. + + @item + Preserve the section Entitled ``History'', Preserve its Title, and add + to it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section Entitled ``History'' in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. + + @item + Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the ``History'' section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. + + @item + For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve + the Title of the section, and preserve in the section all the + substance and tone of each of the contributor acknowledgements and/or + dedications given therein. + + @item + Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. + + @item + Delete any section Entitled ``Endorsements''. Such a section + may not be included in the Modified Version. + + @item + Do not retitle any existing section to be Entitled ``Endorsements'' or + to conflict in title with any Invariant Section. + + @item + Preserve any Warranty Disclaimers. + @end enumerate + + If the Modified Version includes new front-matter sections or + appendices that qualify as Secondary Sections and contain no material + copied from the Document, you may at your option designate some or all + of these sections as invariant. To do this, add their titles to the + list of Invariant Sections in the Modified Version's license notice. + These titles must be distinct from any other section titles. + + You may add a section Entitled ``Endorsements'', provided it contains + nothing but endorsements of your Modified Version by various + parties---for example, statements of peer review or that the text has + been approved by an organization as the authoritative definition of a + standard. + + You may add a passage of up to five words as a Front-Cover Text, and a + passage of up to 25 words as a Back-Cover Text, to the end of the list + of Cover Texts in the Modified Version. Only one passage of + Front-Cover Text and one of Back-Cover Text may be added by (or + through arrangements made by) any one entity. If the Document already + includes a cover text for the same cover, previously added by you or + by arrangement made by the same entity you are acting on behalf of, + you may not add another; but you may replace the old one, on explicit + permission from the previous publisher that added the old one. + + The author(s) and publisher(s) of the Document do not by this License + give permission to use their names for publicity for or to assert or + imply endorsement of any Modified Version. + + @item + COMBINING DOCUMENTS + + You may combine the Document with other documents released under this + License, under the terms defined in section 4 above for modified + versions, provided that you include in the combination all of the + Invariant Sections of all of the original documents, unmodified, and + list them all as Invariant Sections of your combined work in its + license notice, and that you preserve all their Warranty Disclaimers. + + The combined work need only contain one copy of this License, and + multiple identical Invariant Sections may be replaced with a single + copy. If there are multiple Invariant Sections with the same name but + different contents, make the title of each such section unique by + adding at the end of it, in parentheses, the name of the original + author or publisher of that section if known, or else a unique number. + Make the same adjustment to the section titles in the list of + Invariant Sections in the license notice of the combined work. + + In the combination, you must combine any sections Entitled ``History'' + in the various original documents, forming one section Entitled + ``History''; likewise combine any sections Entitled ``Acknowledgements'', + and any sections Entitled ``Dedications''. You must delete all + sections Entitled ``Endorsements.'' + + @item + COLLECTIONS OF DOCUMENTS + + You may make a collection consisting of the Document and other documents + released under this License, and replace the individual copies of this + License in the various documents with a single copy that is included in + the collection, provided that you follow the rules of this License for + verbatim copying of each of the documents in all other respects. + + You may extract a single document from such a collection, and distribute + it individually under this License, provided you insert a copy of this + License into the extracted document, and follow this License in all + other respects regarding verbatim copying of that document. + + @item + AGGREGATION WITH INDEPENDENT WORKS + + A compilation of the Document or its derivatives with other separate + and independent documents or works, in or on a volume of a storage or + distribution medium, is called an ``aggregate'' if the copyright + resulting from the compilation is not used to limit the legal rights + of the compilation's users beyond what the individual works permit. + When the Document is included an aggregate, this License does not + apply to the other works in the aggregate which are not themselves + derivative works of the Document. + + If the Cover Text requirement of section 3 is applicable to these + copies of the Document, then if the Document is less than one half of + the entire aggregate, the Document's Cover Texts may be placed on + covers that bracket the Document within the aggregate, or the + electronic equivalent of covers if the Document is in electronic form. + Otherwise they must appear on printed covers that bracket the whole + aggregate. + + @item + TRANSLATION + + Translation is considered a kind of modification, so you may + distribute translations of the Document under the terms of section 4. + Replacing Invariant Sections with translations requires special + permission from their copyright holders, but you may include + translations of some or all Invariant Sections in addition to the + original versions of these Invariant Sections. You may include a + translation of this License, and all the license notices in the + Document, and any Warranty Disclaimers, provided that you also include + the original English version of this License and the original versions + of those notices and disclaimers. In case of a disagreement between + the translation and the original version of this License or a notice + or disclaimer, the original version will prevail. + + If a section in the Document is Entitled ``Acknowledgements'', + ``Dedications'', or ``History'', the requirement (section 4) to Preserve + its Title (section 1) will typically require changing the actual + title. + + @item + TERMINATION + + You may not copy, modify, sublicense, or distribute the Document except + as expressly provided for under this License. Any other attempt to + copy, modify, sublicense or distribute the Document is void, and will + automatically terminate your rights under this License. However, + parties who have received copies, or rights, from you under this + License will not have their licenses terminated so long as such + parties remain in full compliance. + + @item + FUTURE REVISIONS OF THIS LICENSE + + The Free Software Foundation may publish new, revised versions + of the GNU Free Documentation License from time to time. Such new + versions will be similar in spirit to the present version, but may + differ in detail to address new problems or concerns. See + @uref{http://www.gnu.org/copyleft/}. + + Each version of the License is given a distinguishing version number. + If the Document specifies that a particular numbered version of this + License ``or any later version'' applies to it, you have the option of + following the terms and conditions either of that specified version or + of any later version that has been published (not as a draft) by the + Free Software Foundation. If the Document does not specify a version + number of this License, you may choose any version ever published (not + as a draft) by the Free Software Foundation. + @end enumerate + + @page + @appendixsubsec ADDENDUM: How to use this License for your documents + + To use this License in a document you have written, include a copy of + the License in the document and put the following copyright and + license notices just after the title page: + + @smallexample + @group + Copyright (C) @var{year} @var{your name}. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled ``GNU + Free Documentation License''. + @end group + @end smallexample + + If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, + replace the ``with...Texts.'' line with this: + + @smallexample + @group + with the Invariant Sections being @var{list their titles}, with + the Front-Cover Texts being @var{list}, and with the Back-Cover Texts + being @var{list}. + @end group + @end smallexample + + If you have Invariant Sections without Cover Texts, or some other + combination of the three, merge those two alternatives to suit the + situation. + + If your document contains nontrivial examples of program code, we + recommend releasing these examples in parallel under your choice of + free software license, such as the GNU General Public License, + to permit their use in free software. + + @c Local Variables: + @c ispell-local-pdict: "ispell-dict" + @c End: + diff -aNrc2 bash-2.05b-patched/lib/readline/doc/hist.texinfo bash-3.0/lib/readline/doc/hist.texinfo *** bash-2.05b-patched/lib/readline/doc/hist.texinfo Tue Apr 16 17:11:02 2002 --- bash-3.0/lib/readline/doc/hist.texinfo Wed Dec 31 19:00:00 1969 *************** *** 1,110 **** - \input texinfo @c -*-texinfo-*- - @c %**start of header (This is for running Texinfo on a region.) - @setfilename history.info - @settitle GNU History Library - @c %**end of header (This is for running Texinfo on a region.) - - @setchapternewpage odd - - @include manvers.texinfo - - @ifinfo - @dircategory Libraries - @direntry - * History: (history). The GNU history library API - @end direntry - - This document describes the GNU History library, a programming tool that - provides a consistent user interface for recalling lines of previously - typed input. - - Copyright (C) 1988-2002 Free Software Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of - this manual provided the copyright notice and this permission notice - pare preserved on all copies. - - @ignore - Permission is granted to process this file through TeX and print the - results, provided the printed document carries copying permission - notice identical to this one except for the removal of this paragraph - (this paragraph not being relevant to the printed manual). - @end ignore - - Permission is granted to copy and distribute modified versions of this - manual under the conditions for verbatim copying, provided that the entire - resulting derived work is distributed under the terms of a permission - notice identical to this one. - - Permission is granted to copy and distribute translations of this manual - into another language, under the above conditions for modified versions, - except that this permission notice may be stated in a translation approved - by the Free Software Foundation. - @end ifinfo - - @titlepage - @title GNU History Library - @subtitle Edition @value{EDITION}, for @code{History Library} Version @value{VERSION}. - @subtitle @value{UPDATE-MONTH} - @author Brian Fox, Free Software Foundation - @author Chet Ramey, Case Western Reserve University - - @page - This document describes the GNU History library, a programming tool that - provides a consistent user interface for recalling lines of previously - typed input. - - Published by the Free Software Foundation @* - 59 Temple Place, Suite 330, @* - Boston, MA 02111 USA - - Permission is granted to make and distribute verbatim copies of - this manual provided the copyright notice and this permission notice - are preserved on all copies. - - Permission is granted to copy and distribute modified versions of this - manual under the conditions for verbatim copying, provided that the entire - resulting derived work is distributed under the terms of a permission - notice identical to this one. - - Permission is granted to copy and distribute translations of this manual - into another language, under the above conditions for modified versions, - except that this permission notice may be stated in a translation approved - by the Free Software Foundation. - - @vskip 0pt plus 1filll - Copyright @copyright{} 1988-2002 Free Software Foundation, Inc. - @end titlepage - - @ifinfo - @node Top - @top GNU History Library - - This document describes the GNU History library, a programming tool that - provides a consistent user interface for recalling lines of previously - typed input. - - @menu - * Using History Interactively:: GNU History User's Manual. - * Programming with GNU History:: GNU History Programmer's Manual. - * Concept Index:: Index of concepts described in this manual. - * Function and Variable Index:: Index of externally visible functions - and variables. - @end menu - @end ifinfo - - @syncodeindex fn vr - - @include hsuser.texinfo - @include hstech.texinfo - - @node Concept Index - @appendix Concept Index - @printindex cp - - @node Function and Variable Index - @appendix Function and Variable Index - @printindex vr - - @contents - @bye --- 0 ---- diff -aNrc2 bash-2.05b-patched/lib/readline/doc/history.texi bash-3.0/lib/readline/doc/history.texi *** bash-2.05b-patched/lib/readline/doc/history.texi Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/readline/doc/history.texi Tue Jul 27 09:28:59 2004 *************** *** 0 **** --- 1,104 ---- + \input texinfo @c -*-texinfo-*- + @c %**start of header (This is for running Texinfo on a region.) + @setfilename history.info + @settitle GNU History Library + @c %**end of header (This is for running Texinfo on a region.) + + @setchapternewpage odd + + @include version.texi + + @copying + This document describes the GNU History library + (version @value{VERSION}, @value{UPDATED}), + a programming tool that provides a consistent user interface for + recalling lines of previously typed input. + + Copyright @copyright{} 1988-2004 Free Software Foundation, Inc. + + Permission is granted to make and distribute verbatim copies of + this manual provided the copyright notice and this permission notice + are preserved on all copies. + + @quotation + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 or + any later version published by the Free Software Foundation; with no + Invariant Sections, with the Front-Cover texts being ``A GNU Manual,'' + and with the Back-Cover Texts as in (a) below. A copy of the license is + included in the section entitled ``GNU Free Documentation License.'' + + (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify + this GNU Manual, like GNU software. Copies published by the Free + Software Foundation raise funds for GNU development.'' + @end quotation + @end copying + + @dircategory Libraries + @direntry + * History: (history). The GNU history library API. + @end direntry + + @titlepage + @title GNU History Library + @subtitle Edition @value{EDITION}, for @code{History Library} Version @value{VERSION}. + @subtitle @value{UPDATED-MONTH} + @author Chet Ramey, Case Western Reserve University + @author Brian Fox, Free Software Foundation + + @page + + @vskip 0pt plus 1filll + @insertcopying + + @sp 1 + Published by the Free Software Foundation @* + 59 Temple Place, Suite 330, @* + Boston, MA 02111-1307 @* + USA @* + + @end titlepage + + @contents + + @ifnottex + @node Top + @top GNU History Library + + This document describes the GNU History library, a programming tool that + provides a consistent user interface for recalling lines of previously + typed input. + + @menu + * Using History Interactively:: GNU History User's Manual. + * Programming with GNU History:: GNU History Programmer's Manual. + * Copying This Manual:: Copying This Manual. + * Concept Index:: Index of concepts described in this manual. + * Function and Variable Index:: Index of externally visible functions + and variables. + @end menu + @end ifnottex + + @syncodeindex fn vr + + @include hsuser.texi + @include hstech.texi + + @node Copying This Manual + @appendix Copying This Manual + + @menu + * GNU Free Documentation License:: License for copying this manual. + @end menu + + @include fdl.texi + + @node Concept Index + @appendix Concept Index + @printindex cp + + @node Function and Variable Index + @appendix Function and Variable Index + @printindex vr + + @bye diff -aNrc2 bash-2.05b-patched/lib/readline/doc/hstech.texi bash-3.0/lib/readline/doc/hstech.texi *** bash-2.05b-patched/lib/readline/doc/hstech.texi Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/readline/doc/hstech.texi Thu Jul 31 08:49:05 2003 *************** *** 0 **** --- 1,573 ---- + @ignore + This file documents the user interface to the GNU History library. + + Copyright (C) 1988-2002 Free Software Foundation, Inc. + Authored by Brian Fox and Chet Ramey. + + Permission is granted to make and distribute verbatim copies of this manual + provided the copyright notice and this permission notice are preserved on + all copies. + + Permission is granted to process this file through Tex and print the + results, provided the printed document carries copying permission notice + identical to this one except for the removal of this paragraph (this + paragraph not being relevant to the printed manual). + + Permission is granted to copy and distribute modified versions of this + manual under the conditions for verbatim copying, provided also that the + GNU Copyright statement is available to the distributee, and provided that + the entire resulting derived work is distributed under the terms of a + permission notice identical to this one. + + Permission is granted to copy and distribute translations of this manual + into another language, under the above conditions for modified versions. + @end ignore + + @node Programming with GNU History + @chapter Programming with GNU History + + This chapter describes how to interface programs that you write + with the @sc{gnu} History Library. + It should be considered a technical guide. + For information on the interactive use of @sc{gnu} History, @pxref{Using + History Interactively}. + + @menu + * Introduction to History:: What is the GNU History library for? + * History Storage:: How information is stored. + * History Functions:: Functions that you can use. + * History Variables:: Variables that control behaviour. + * History Programming Example:: Example of using the GNU History Library. + @end menu + + @node Introduction to History + @section Introduction to History + + Many programs read input from the user a line at a time. The @sc{gnu} + History library is able to keep track of those lines, associate arbitrary + data with each line, and utilize information from previous lines in + composing new ones. + + The programmer using the History library has available functions + for remembering lines on a history list, associating arbitrary data + with a line, removing lines from the list, searching through the list + for a line containing an arbitrary text string, and referencing any line + in the list directly. In addition, a history @dfn{expansion} function + is available which provides for a consistent user interface across + different programs. + + The user using programs written with the History library has the + benefit of a consistent user interface with a set of well-known + commands for manipulating the text of previous lines and using that text + in new commands. The basic history manipulation commands are similar to + the history substitution provided by @code{csh}. + + If the programmer desires, he can use the Readline library, which + includes some history manipulation by default, and has the added + advantage of command line editing. + + Before declaring any functions using any functionality the History + library provides in other code, an application writer should include + the file @code{} in any file that uses the + History library's features. It supplies extern declarations for all + of the library's public functions and variables, and declares all of + the public data structures. + + @node History Storage + @section History Storage + + The history list is an array of history entries. A history entry is + declared as follows: + + @example + typedef void *histdata_t; + + typedef struct _hist_entry @{ + char *line; + char *timestamp; + histdata_t data; + @} HIST_ENTRY; + @end example + + The history list itself might therefore be declared as + + @example + HIST_ENTRY **the_history_list; + @end example + + The state of the History library is encapsulated into a single structure: + + @example + /* + * A structure used to pass around the current state of the history. + */ + typedef struct _hist_state @{ + HIST_ENTRY **entries; /* Pointer to the entries themselves. */ + int offset; /* The location pointer within this array. */ + int length; /* Number of elements within this array. */ + int size; /* Number of slots allocated to this array. */ + int flags; + @} HISTORY_STATE; + @end example + + If the flags member includes @code{HS_STIFLED}, the history has been + stifled. + + @node History Functions + @section History Functions + + This section describes the calling sequence for the various functions + exported by the @sc{gnu} History library. + + @menu + * Initializing History and State Management:: Functions to call when you + want to use history in a + program. + * History List Management:: Functions used to manage the list + of history entries. + * Information About the History List:: Functions returning information about + the history list. + * Moving Around the History List:: Functions used to change the position + in the history list. + * Searching the History List:: Functions to search the history list + for entries containing a string. + * Managing the History File:: Functions that read and write a file + containing the history list. + * History Expansion:: Functions to perform csh-like history + expansion. + @end menu + + @node Initializing History and State Management + @subsection Initializing History and State Management + + This section describes functions used to initialize and manage + the state of the History library when you want to use the history + functions in your program. + + @deftypefun void using_history (void) + Begin a session in which the history functions might be used. This + initializes the interactive variables. + @end deftypefun + + @deftypefun {HISTORY_STATE *} history_get_history_state (void) + Return a structure describing the current state of the input history. + @end deftypefun + + @deftypefun void history_set_history_state (HISTORY_STATE *state) + Set the state of the history list according to @var{state}. + @end deftypefun + + @node History List Management + @subsection History List Management + + These functions manage individual entries on the history list, or set + parameters managing the list itself. + + @deftypefun void add_history (const char *string) + Place @var{string} at the end of the history list. The associated data + field (if any) is set to @code{NULL}. + @end deftypefun + + @deftypefun void add_history_time (const char *string) + Change the time stamp associated with the most recent history entry to + @var{string}. + @end deftypefun + + @deftypefun {HIST_ENTRY *} remove_history (int which) + Remove history entry at offset @var{which} from the history. The + removed element is returned so you can free the line, data, + and containing structure. + @end deftypefun + + @deftypefun {histdata_t} free_history_entry (HIST_ENTRY *histent) + Free the history entry @var{histent} and any history library private + data associated with it. Returns the application-specific data + so the caller can dispose of it. + @end deftypefun + + @deftypefun {HIST_ENTRY *} replace_history_entry (int which, const char *line, histdata_t data) + Make the history entry at offset @var{which} have @var{line} and @var{data}. + This returns the old entry so the caller can dispose of any + application-specific data. In the case + of an invalid @var{which}, a @code{NULL} pointer is returned. + @end deftypefun + + @deftypefun void clear_history (void) + Clear the history list by deleting all the entries. + @end deftypefun + + @deftypefun void stifle_history (int max) + Stifle the history list, remembering only the last @var{max} entries. + @end deftypefun + + @deftypefun int unstifle_history (void) + Stop stifling the history. This returns the previously-set + maximum number of history entries (as set by @code{stifle_history()}). + The value is positive if the history was + stifled, negative if it wasn't. + @end deftypefun + + @deftypefun int history_is_stifled (void) + Returns non-zero if the history is stifled, zero if it is not. + @end deftypefun + + @node Information About the History List + @subsection Information About the History List + + These functions return information about the entire history list or + individual list entries. + + @deftypefun {HIST_ENTRY **} history_list (void) + Return a @code{NULL} terminated array of @code{HIST_ENTRY *} which is the + current input history. Element 0 of this list is the beginning of time. + If there is no history, return @code{NULL}. + @end deftypefun + + @deftypefun int where_history (void) + Returns the offset of the current history element. + @end deftypefun + + @deftypefun {HIST_ENTRY *} current_history (void) + Return the history entry at the current position, as determined by + @code{where_history()}. If there is no entry there, return a @code{NULL} + pointer. + @end deftypefun + + @deftypefun {HIST_ENTRY *} history_get (int offset) + Return the history entry at position @var{offset}, starting from + @code{history_base} (@pxref{History Variables}). + If there is no entry there, or if @var{offset} + is greater than the history length, return a @code{NULL} pointer. + @end deftypefun + + @deftypefun time_t history_get_time (HIST_ENTRY *entry) + Return the time stamp associated with the history entry @var{entry}. + @end deftypefun + + @deftypefun int history_total_bytes (void) + Return the number of bytes that the primary history entries are using. + This function returns the sum of the lengths of all the lines in the + history. + @end deftypefun + + @node Moving Around the History List + @subsection Moving Around the History List + + These functions allow the current index into the history list to be + set or changed. + + @deftypefun int history_set_pos (int pos) + Set the current history offset to @var{pos}, an absolute index + into the list. + Returns 1 on success, 0 if @var{pos} is less than zero or greater + than the number of history entries. + @end deftypefun + + @deftypefun {HIST_ENTRY *} previous_history (void) + Back up the current history offset to the previous history entry, and + return a pointer to that entry. If there is no previous entry, return + a @code{NULL} pointer. + @end deftypefun + + @deftypefun {HIST_ENTRY *} next_history (void) + Move the current history offset forward to the next history entry, and + return the a pointer to that entry. If there is no next entry, return + a @code{NULL} pointer. + @end deftypefun + + @node Searching the History List + @subsection Searching the History List + @cindex History Searching + + These functions allow searching of the history list for entries containing + a specific string. Searching may be performed both forward and backward + from the current history position. The search may be @dfn{anchored}, + meaning that the string must match at the beginning of the history entry. + @cindex anchored search + + @deftypefun int history_search (const char *string, int direction) + Search the history for @var{string}, starting at the current history offset. + If @var{direction} is less than 0, then the search is through + previous entries, otherwise through subsequent entries. + If @var{string} is found, then + the current history index is set to that history entry, and the value + returned is the offset in the line of the entry where + @var{string} was found. Otherwise, nothing is changed, and a -1 is + returned. + @end deftypefun + + @deftypefun int history_search_prefix (const char *string, int direction) + Search the history for @var{string}, starting at the current history + offset. The search is anchored: matching lines must begin with + @var{string}. If @var{direction} is less than 0, then the search is + through previous entries, otherwise through subsequent entries. + If @var{string} is found, then the + current history index is set to that entry, and the return value is 0. + Otherwise, nothing is changed, and a -1 is returned. + @end deftypefun + + @deftypefun int history_search_pos (const char *string, int direction, int pos) + Search for @var{string} in the history list, starting at @var{pos}, an + absolute index into the list. If @var{direction} is negative, the search + proceeds backward from @var{pos}, otherwise forward. Returns the absolute + index of the history element where @var{string} was found, or -1 otherwise. + @end deftypefun + + @node Managing the History File + @subsection Managing the History File + + The History library can read the history from and write it to a file. + This section documents the functions for managing a history file. + + @deftypefun int read_history (const char *filename) + Add the contents of @var{filename} to the history list, a line at a time. + If @var{filename} is @code{NULL}, then read from @file{~/.history}. + Returns 0 if successful, or @code{errno} if not. + @end deftypefun + + @deftypefun int read_history_range (const char *filename, int from, int to) + Read a range of lines from @var{filename}, adding them to the history list. + Start reading at line @var{from} and end at @var{to}. + If @var{from} is zero, start at the beginning. If @var{to} is less than + @var{from}, then read until the end of the file. If @var{filename} is + @code{NULL}, then read from @file{~/.history}. Returns 0 if successful, + or @code{errno} if not. + @end deftypefun + + @deftypefun int write_history (const char *filename) + Write the current history to @var{filename}, overwriting @var{filename} + if necessary. + If @var{filename} is @code{NULL}, then write the history list to + @file{~/.history}. + Returns 0 on success, or @code{errno} on a read or write error. + @end deftypefun + + @deftypefun int append_history (int nelements, const char *filename) + Append the last @var{nelements} of the history list to @var{filename}. + If @var{filename} is @code{NULL}, then append to @file{~/.history}. + Returns 0 on success, or @code{errno} on a read or write error. + @end deftypefun + + @deftypefun int history_truncate_file (const char *filename, int nlines) + Truncate the history file @var{filename}, leaving only the last + @var{nlines} lines. + If @var{filename} is @code{NULL}, then @file{~/.history} is truncated. + Returns 0 on success, or @code{errno} on failure. + @end deftypefun + + @node History Expansion + @subsection History Expansion + + These functions implement history expansion. + + @deftypefun int history_expand (char *string, char **output) + Expand @var{string}, placing the result into @var{output}, a pointer + to a string (@pxref{History Interaction}). Returns: + @table @code + @item 0 + If no expansions took place (or, if the only change in + the text was the removal of escape characters preceding the history expansion + character); + @item 1 + if expansions did take place; + @item -1 + if there was an error in expansion; + @item 2 + if the returned line should be displayed, but not executed, + as with the @code{:p} modifier (@pxref{Modifiers}). + @end table + + If an error ocurred in expansion, then @var{output} contains a descriptive + error message. + @end deftypefun + + @deftypefun {char *} get_history_event (const char *string, int *cindex, int qchar) + Returns the text of the history event beginning at @var{string} + + @var{*cindex}. @var{*cindex} is modified to point to after the event + specifier. At function entry, @var{cindex} points to the index into + @var{string} where the history event specification begins. @var{qchar} + is a character that is allowed to end the event specification in addition + to the ``normal'' terminating characters. + @end deftypefun + + @deftypefun {char **} history_tokenize (const char *string) + Return an array of tokens parsed out of @var{string}, much as the + shell might. The tokens are split on the characters in the + @var{history_word_delimiters} variable, + and shell quoting conventions are obeyed. + @end deftypefun + + @deftypefun {char *} history_arg_extract (int first, int last, const char *string) + Extract a string segment consisting of the @var{first} through @var{last} + arguments present in @var{string}. Arguments are split using + @code{history_tokenize}. + @end deftypefun + + @node History Variables + @section History Variables + + This section describes the externally-visible variables exported by + the @sc{gnu} History Library. + + @deftypevar int history_base + The logical offset of the first entry in the history list. + @end deftypevar + + @deftypevar int history_length + The number of entries currently stored in the history list. + @end deftypevar + + @deftypevar int history_max_entries + The maximum number of history entries. This must be changed using + @code{stifle_history()}. + @end deftypevar + + @deftypevar int history_write_timestamps + If non-zero, timestamps are written to the history file, so they can be + preserved between sessions. The default value is 0, meaning that + timestamps are not saved. + @end deftypevar + + @deftypevar char history_expansion_char + The character that introduces a history event. The default is @samp{!}. + Setting this to 0 inhibits history expansion. + @end deftypevar + + @deftypevar char history_subst_char + The character that invokes word substitution if found at the start of + a line. The default is @samp{^}. + @end deftypevar + + @deftypevar char history_comment_char + During tokenization, if this character is seen as the first character + of a word, then it and all subsequent characters up to a newline are + ignored, suppressing history expansion for the remainder of the line. + This is disabled by default. + @end deftypevar + + @deftypevar {char *} history_word_delimiters + The characters that separate tokens for @code{history_tokenize()}. + The default value is @code{" \t\n()<>;&|"}. + @end deftypevar + + @deftypevar {char *} history_search_delimiter_chars + The list of additional characters which can delimit a history search + string, in addition to space, TAB, @samp{:} and @samp{?} in the case of + a substring search. The default is empty. + @end deftypevar + + @deftypevar {char *} history_no_expand_chars + The list of characters which inhibit history expansion if found immediately + following @var{history_expansion_char}. The default is space, tab, newline, + carriage return, and @samp{=}. + @end deftypevar + + @deftypevar int history_quotes_inhibit_expansion + If non-zero, single-quoted words are not scanned for the history expansion + character. The default value is 0. + @end deftypevar + + @deftypevar {rl_linebuf_func_t *} history_inhibit_expansion_function + This should be set to the address of a function that takes two arguments: + a @code{char *} (@var{string}) + and an @code{int} index into that string (@var{i}). + It should return a non-zero value if the history expansion starting at + @var{string[i]} should not be performed; zero if the expansion should + be done. + It is intended for use by applications like Bash that use the history + expansion character for additional purposes. + By default, this variable is set to @code{NULL}. + @end deftypevar + + @node History Programming Example + @section History Programming Example + + The following program demonstrates simple use of the @sc{gnu} History Library. + + @smallexample + #include + #include + + main (argc, argv) + int argc; + char **argv; + @{ + char line[1024], *t; + int len, done = 0; + + line[0] = 0; + + using_history (); + while (!done) + @{ + printf ("history$ "); + fflush (stdout); + t = fgets (line, sizeof (line) - 1, stdin); + if (t && *t) + @{ + len = strlen (t); + if (t[len - 1] == '\n') + t[len - 1] = '\0'; + @} + + if (!t) + strcpy (line, "quit"); + + if (line[0]) + @{ + char *expansion; + int result; + + result = history_expand (line, &expansion); + if (result) + fprintf (stderr, "%s\n", expansion); + + if (result < 0 || result == 2) + @{ + free (expansion); + continue; + @} + + add_history (expansion); + strncpy (line, expansion, sizeof (line) - 1); + free (expansion); + @} + + if (strcmp (line, "quit") == 0) + done = 1; + else if (strcmp (line, "save") == 0) + write_history ("history_file"); + else if (strcmp (line, "read") == 0) + read_history ("history_file"); + else if (strcmp (line, "list") == 0) + @{ + register HIST_ENTRY **the_list; + register int i; + + the_list = history_list (); + if (the_list) + for (i = 0; the_list[i]; i++) + printf ("%d: %s\n", i + history_base, the_list[i]->line); + @} + else if (strncmp (line, "delete", 6) == 0) + @{ + int which; + if ((sscanf (line + 6, "%d", &which)) == 1) + @{ + HIST_ENTRY *entry = remove_history (which); + if (!entry) + fprintf (stderr, "No such entry %d\n", which); + else + @{ + free (entry->line); + free (entry); + @} + @} + else + @{ + fprintf (stderr, "non-numeric arg given to `delete'\n"); + @} + @} + @} + @} + @end smallexample diff -aNrc2 bash-2.05b-patched/lib/readline/doc/hstech.texinfo bash-3.0/lib/readline/doc/hstech.texinfo *** bash-2.05b-patched/lib/readline/doc/hstech.texinfo Tue Apr 16 17:11:15 2002 --- bash-3.0/lib/readline/doc/hstech.texinfo Wed Dec 31 19:00:00 1969 *************** *** 1,550 **** - @ignore - This file documents the user interface to the GNU History library. - - Copyright (C) 1988-2002 Free Software Foundation, Inc. - Authored by Brian Fox and Chet Ramey. - - Permission is granted to make and distribute verbatim copies of this manual - provided the copyright notice and this permission notice are preserved on - all copies. - - Permission is granted to process this file through Tex and print the - results, provided the printed document carries copying permission notice - identical to this one except for the removal of this paragraph (this - paragraph not being relevant to the printed manual). - - Permission is granted to copy and distribute modified versions of this - manual under the conditions for verbatim copying, provided also that the - GNU Copyright statement is available to the distributee, and provided that - the entire resulting derived work is distributed under the terms of a - permission notice identical to this one. - - Permission is granted to copy and distribute translations of this manual - into another language, under the above conditions for modified versions. - @end ignore - - @node Programming with GNU History - @chapter Programming with GNU History - - This chapter describes how to interface programs that you write - with the @sc{gnu} History Library. - It should be considered a technical guide. - For information on the interactive use of @sc{gnu} History, @pxref{Using - History Interactively}. - - @menu - * Introduction to History:: What is the GNU History library for? - * History Storage:: How information is stored. - * History Functions:: Functions that you can use. - * History Variables:: Variables that control behaviour. - * History Programming Example:: Example of using the GNU History Library. - @end menu - - @node Introduction to History - @section Introduction to History - - Many programs read input from the user a line at a time. The @sc{gnu} - History library is able to keep track of those lines, associate arbitrary - data with each line, and utilize information from previous lines in - composing new ones. - - The programmer using the History library has available functions - for remembering lines on a history list, associating arbitrary data - with a line, removing lines from the list, searching through the list - for a line containing an arbitrary text string, and referencing any line - in the list directly. In addition, a history @dfn{expansion} function - is available which provides for a consistent user interface across - different programs. - - The user using programs written with the History library has the - benefit of a consistent user interface with a set of well-known - commands for manipulating the text of previous lines and using that text - in new commands. The basic history manipulation commands are similar to - the history substitution provided by @code{csh}. - - If the programmer desires, he can use the Readline library, which - includes some history manipulation by default, and has the added - advantage of command line editing. - - Before declaring any functions using any functionality the History - library provides in other code, an application writer should include - the file @code{} in any file that uses the - History library's features. It supplies extern declarations for all - of the library's public functions and variables, and declares all of - the public data structures. - - @node History Storage - @section History Storage - - The history list is an array of history entries. A history entry is - declared as follows: - - @example - typedef void *histdata_t; - - typedef struct _hist_entry @{ - char *line; - histdata_t data; - @} HIST_ENTRY; - @end example - - The history list itself might therefore be declared as - - @example - HIST_ENTRY **the_history_list; - @end example - - The state of the History library is encapsulated into a single structure: - - @example - /* - * A structure used to pass around the current state of the history. - */ - typedef struct _hist_state @{ - HIST_ENTRY **entries; /* Pointer to the entries themselves. */ - int offset; /* The location pointer within this array. */ - int length; /* Number of elements within this array. */ - int size; /* Number of slots allocated to this array. */ - int flags; - @} HISTORY_STATE; - @end example - - If the flags member includes @code{HS_STIFLED}, the history has been - stifled. - - @node History Functions - @section History Functions - - This section describes the calling sequence for the various functions - exported by the @sc{gnu} History library. - - @menu - * Initializing History and State Management:: Functions to call when you - want to use history in a - program. - * History List Management:: Functions used to manage the list - of history entries. - * Information About the History List:: Functions returning information about - the history list. - * Moving Around the History List:: Functions used to change the position - in the history list. - * Searching the History List:: Functions to search the history list - for entries containing a string. - * Managing the History File:: Functions that read and write a file - containing the history list. - * History Expansion:: Functions to perform csh-like history - expansion. - @end menu - - @node Initializing History and State Management - @subsection Initializing History and State Management - - This section describes functions used to initialize and manage - the state of the History library when you want to use the history - functions in your program. - - @deftypefun void using_history (void) - Begin a session in which the history functions might be used. This - initializes the interactive variables. - @end deftypefun - - @deftypefun {HISTORY_STATE *} history_get_history_state (void) - Return a structure describing the current state of the input history. - @end deftypefun - - @deftypefun void history_set_history_state (HISTORY_STATE *state) - Set the state of the history list according to @var{state}. - @end deftypefun - - @node History List Management - @subsection History List Management - - These functions manage individual entries on the history list, or set - parameters managing the list itself. - - @deftypefun void add_history (const char *string) - Place @var{string} at the end of the history list. The associated data - field (if any) is set to @code{NULL}. - @end deftypefun - - @deftypefun {HIST_ENTRY *} remove_history (int which) - Remove history entry at offset @var{which} from the history. The - removed element is returned so you can free the line, data, - and containing structure. - @end deftypefun - - @deftypefun {HIST_ENTRY *} replace_history_entry (int which, const char *line, histdata_t data) - Make the history entry at offset @var{which} have @var{line} and @var{data}. - This returns the old entry so you can dispose of the data. In the case - of an invalid @var{which}, a @code{NULL} pointer is returned. - @end deftypefun - - @deftypefun void clear_history (void) - Clear the history list by deleting all the entries. - @end deftypefun - - @deftypefun void stifle_history (int max) - Stifle the history list, remembering only the last @var{max} entries. - @end deftypefun - - @deftypefun int unstifle_history (void) - Stop stifling the history. This returns the previously-set - maximum number of history entries (as set by @code{stifle_history()}). - The value is positive if the history was - stifled, negative if it wasn't. - @end deftypefun - - @deftypefun int history_is_stifled (void) - Returns non-zero if the history is stifled, zero if it is not. - @end deftypefun - - @node Information About the History List - @subsection Information About the History List - - These functions return information about the entire history list or - individual list entries. - - @deftypefun {HIST_ENTRY **} history_list (void) - Return a @code{NULL} terminated array of @code{HIST_ENTRY *} which is the - current input history. Element 0 of this list is the beginning of time. - If there is no history, return @code{NULL}. - @end deftypefun - - @deftypefun int where_history (void) - Returns the offset of the current history element. - @end deftypefun - - @deftypefun {HIST_ENTRY *} current_history (void) - Return the history entry at the current position, as determined by - @code{where_history()}. If there is no entry there, return a @code{NULL} - pointer. - @end deftypefun - - @deftypefun {HIST_ENTRY *} history_get (int offset) - Return the history entry at position @var{offset}, starting from - @code{history_base} (@pxref{History Variables}). - If there is no entry there, or if @var{offset} - is greater than the history length, return a @code{NULL} pointer. - @end deftypefun - - @deftypefun int history_total_bytes (void) - Return the number of bytes that the primary history entries are using. - This function returns the sum of the lengths of all the lines in the - history. - @end deftypefun - - @node Moving Around the History List - @subsection Moving Around the History List - - These functions allow the current index into the history list to be - set or changed. - - @deftypefun int history_set_pos (int pos) - Set the current history offset to @var{pos}, an absolute index - into the list. - Returns 1 on success, 0 if @var{pos} is less than zero or greater - than the number of history entries. - @end deftypefun - - @deftypefun {HIST_ENTRY *} previous_history (void) - Back up the current history offset to the previous history entry, and - return a pointer to that entry. If there is no previous entry, return - a @code{NULL} pointer. - @end deftypefun - - @deftypefun {HIST_ENTRY *} next_history (void) - Move the current history offset forward to the next history entry, and - return the a pointer to that entry. If there is no next entry, return - a @code{NULL} pointer. - @end deftypefun - - @node Searching the History List - @subsection Searching the History List - @cindex History Searching - - These functions allow searching of the history list for entries containing - a specific string. Searching may be performed both forward and backward - from the current history position. The search may be @dfn{anchored}, - meaning that the string must match at the beginning of the history entry. - @cindex anchored search - - @deftypefun int history_search (const char *string, int direction) - Search the history for @var{string}, starting at the current history offset. - If @var{direction} is less than 0, then the search is through - previous entries, otherwise through subsequent entries. - If @var{string} is found, then - the current history index is set to that history entry, and the value - returned is the offset in the line of the entry where - @var{string} was found. Otherwise, nothing is changed, and a -1 is - returned. - @end deftypefun - - @deftypefun int history_search_prefix (const char *string, int direction) - Search the history for @var{string}, starting at the current history - offset. The search is anchored: matching lines must begin with - @var{string}. If @var{direction} is less than 0, then the search is - through previous entries, otherwise through subsequent entries. - If @var{string} is found, then the - current history index is set to that entry, and the return value is 0. - Otherwise, nothing is changed, and a -1 is returned. - @end deftypefun - - @deftypefun int history_search_pos (const char *string, int direction, int pos) - Search for @var{string} in the history list, starting at @var{pos}, an - absolute index into the list. If @var{direction} is negative, the search - proceeds backward from @var{pos}, otherwise forward. Returns the absolute - index of the history element where @var{string} was found, or -1 otherwise. - @end deftypefun - - @node Managing the History File - @subsection Managing the History File - - The History library can read the history from and write it to a file. - This section documents the functions for managing a history file. - - @deftypefun int read_history (const char *filename) - Add the contents of @var{filename} to the history list, a line at a time. - If @var{filename} is @code{NULL}, then read from @file{~/.history}. - Returns 0 if successful, or @code{errno} if not. - @end deftypefun - - @deftypefun int read_history_range (const char *filename, int from, int to) - Read a range of lines from @var{filename}, adding them to the history list. - Start reading at line @var{from} and end at @var{to}. - If @var{from} is zero, start at the beginning. If @var{to} is less than - @var{from}, then read until the end of the file. If @var{filename} is - @code{NULL}, then read from @file{~/.history}. Returns 0 if successful, - or @code{errno} if not. - @end deftypefun - - @deftypefun int write_history (const char *filename) - Write the current history to @var{filename}, overwriting @var{filename} - if necessary. - If @var{filename} is @code{NULL}, then write the history list to - @file{~/.history}. - Returns 0 on success, or @code{errno} on a read or write error. - @end deftypefun - - @deftypefun int append_history (int nelements, const char *filename) - Append the last @var{nelements} of the history list to @var{filename}. - If @var{filename} is @code{NULL}, then append to @file{~/.history}. - Returns 0 on success, or @code{errno} on a read or write error. - @end deftypefun - - @deftypefun int history_truncate_file (const char *filename, int nlines) - Truncate the history file @var{filename}, leaving only the last - @var{nlines} lines. - If @var{filename} is @code{NULL}, then @file{~/.history} is truncated. - Returns 0 on success, or @code{errno} on failure. - @end deftypefun - - @node History Expansion - @subsection History Expansion - - These functions implement history expansion. - - @deftypefun int history_expand (char *string, char **output) - Expand @var{string}, placing the result into @var{output}, a pointer - to a string (@pxref{History Interaction}). Returns: - @table @code - @item 0 - If no expansions took place (or, if the only change in - the text was the removal of escape characters preceding the history expansion - character); - @item 1 - if expansions did take place; - @item -1 - if there was an error in expansion; - @item 2 - if the returned line should be displayed, but not executed, - as with the @code{:p} modifier (@pxref{Modifiers}). - @end table - - If an error ocurred in expansion, then @var{output} contains a descriptive - error message. - @end deftypefun - - @deftypefun {char *} get_history_event (const char *string, int *cindex, int qchar) - Returns the text of the history event beginning at @var{string} + - @var{*cindex}. @var{*cindex} is modified to point to after the event - specifier. At function entry, @var{cindex} points to the index into - @var{string} where the history event specification begins. @var{qchar} - is a character that is allowed to end the event specification in addition - to the ``normal'' terminating characters. - @end deftypefun - - @deftypefun {char **} history_tokenize (const char *string) - Return an array of tokens parsed out of @var{string}, much as the - shell might. The tokens are split on the characters in the - @var{history_word_delimiters} variable, - and shell quoting conventions are obeyed. - @end deftypefun - - @deftypefun {char *} history_arg_extract (int first, int last, const char *string) - Extract a string segment consisting of the @var{first} through @var{last} - arguments present in @var{string}. Arguments are split using - @code{history_tokenize}. - @end deftypefun - - @node History Variables - @section History Variables - - This section describes the externally-visible variables exported by - the @sc{gnu} History Library. - - @deftypevar int history_base - The logical offset of the first entry in the history list. - @end deftypevar - - @deftypevar int history_length - The number of entries currently stored in the history list. - @end deftypevar - - @deftypevar int history_max_entries - The maximum number of history entries. This must be changed using - @code{stifle_history()}. - @end deftypevar - - @deftypevar char history_expansion_char - The character that introduces a history event. The default is @samp{!}. - Setting this to 0 inhibits history expansion. - @end deftypevar - - @deftypevar char history_subst_char - The character that invokes word substitution if found at the start of - a line. The default is @samp{^}. - @end deftypevar - - @deftypevar char history_comment_char - During tokenization, if this character is seen as the first character - of a word, then it and all subsequent characters up to a newline are - ignored, suppressing history expansion for the remainder of the line. - This is disabled by default. - @end deftypevar - - @deftypevar {char *} history_word_delimiters - The characters that separate tokens for @code{history_tokenize()}. - The default value is @code{" \t\n()<>;&|"}. - @end deftypevar - - @deftypevar {char *} history_no_expand_chars - The list of characters which inhibit history expansion if found immediately - following @var{history_expansion_char}. The default is space, tab, newline, - carriage return, and @samp{=}. - @end deftypevar - - @deftypevar {char *} history_search_delimiter_chars - The list of additional characters which can delimit a history search - string, in addition to space, TAB, @samp{:} and @samp{?} in the case of - a substring search. The default is empty. - @end deftypevar - - @deftypevar int history_quotes_inhibit_expansion - If non-zero, single-quoted words are not scanned for the history expansion - character. The default value is 0. - @end deftypevar - - @deftypevar {rl_linebuf_func_t *} history_inhibit_expansion_function - This should be set to the address of a function that takes two arguments: - a @code{char *} (@var{string}) - and an @code{int} index into that string (@var{i}). - It should return a non-zero value if the history expansion starting at - @var{string[i]} should not be performed; zero if the expansion should - be done. - It is intended for use by applications like Bash that use the history - expansion character for additional purposes. - By default, this variable is set to @code{NULL}. - @end deftypevar - - @node History Programming Example - @section History Programming Example - - The following program demonstrates simple use of the @sc{gnu} History Library. - - @smallexample - #include - #include - - main (argc, argv) - int argc; - char **argv; - @{ - char line[1024], *t; - int len, done = 0; - - line[0] = 0; - - using_history (); - while (!done) - @{ - printf ("history$ "); - fflush (stdout); - t = fgets (line, sizeof (line) - 1, stdin); - if (t && *t) - @{ - len = strlen (t); - if (t[len - 1] == '\n') - t[len - 1] = '\0'; - @} - - if (!t) - strcpy (line, "quit"); - - if (line[0]) - @{ - char *expansion; - int result; - - result = history_expand (line, &expansion); - if (result) - fprintf (stderr, "%s\n", expansion); - - if (result < 0 || result == 2) - @{ - free (expansion); - continue; - @} - - add_history (expansion); - strncpy (line, expansion, sizeof (line) - 1); - free (expansion); - @} - - if (strcmp (line, "quit") == 0) - done = 1; - else if (strcmp (line, "save") == 0) - write_history ("history_file"); - else if (strcmp (line, "read") == 0) - read_history ("history_file"); - else if (strcmp (line, "list") == 0) - @{ - register HIST_ENTRY **the_list; - register int i; - - the_list = history_list (); - if (the_list) - for (i = 0; the_list[i]; i++) - printf ("%d: %s\n", i + history_base, the_list[i]->line); - @} - else if (strncmp (line, "delete", 6) == 0) - @{ - int which; - if ((sscanf (line + 6, "%d", &which)) == 1) - @{ - HIST_ENTRY *entry = remove_history (which); - if (!entry) - fprintf (stderr, "No such entry %d\n", which); - else - @{ - free (entry->line); - free (entry); - @} - @} - else - @{ - fprintf (stderr, "non-numeric arg given to `delete'\n"); - @} - @} - @} - @} - @end smallexample --- 0 ---- diff -aNrc2 bash-2.05b-patched/lib/readline/doc/hsuser.texi bash-3.0/lib/readline/doc/hsuser.texi *** bash-2.05b-patched/lib/readline/doc/hsuser.texi Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/readline/doc/hsuser.texi Tue Aug 5 08:09:41 2003 *************** *** 0 **** --- 1,457 ---- + @ignore + This file documents the user interface to the GNU History library. + + Copyright (C) 1988-2002 Free Software Foundation, Inc. + Authored by Brian Fox and Chet Ramey. + + Permission is granted to make and distribute verbatim copies of this manual + provided the copyright notice and this permission notice are preserved on + all copies. + + Permission is granted to process this file through Tex and print the + results, provided the printed document carries copying permission notice + identical to this one except for the removal of this paragraph (this + paragraph not being relevant to the printed manual). + + Permission is granted to copy and distribute modified versions of this + manual under the conditions for verbatim copying, provided also that the + GNU Copyright statement is available to the distributee, and provided that + the entire resulting derived work is distributed under the terms of a + permission notice identical to this one. + + Permission is granted to copy and distribute translations of this manual + into another language, under the above conditions for modified versions. + @end ignore + + @node Using History Interactively + @chapter Using History Interactively + + @ifclear BashFeatures + @defcodeindex bt + @end ifclear + + @ifset BashFeatures + This chapter describes how to use the @sc{gnu} History Library + interactively, from a user's standpoint. + It should be considered a user's guide. + For information on using the @sc{gnu} History Library in other programs, + see the @sc{gnu} Readline Library Manual. + @end ifset + @ifclear BashFeatures + This chapter describes how to use the @sc{gnu} History Library interactively, + from a user's standpoint. It should be considered a user's guide. For + information on using the @sc{gnu} History Library in your own programs, + @pxref{Programming with GNU History}. + @end ifclear + + @ifset BashFeatures + @menu + * Bash History Facilities:: How Bash lets you manipulate your command + history. + * Bash History Builtins:: The Bash builtin commands that manipulate + the command history. + * History Interaction:: What it feels like using History as a user. + @end menu + @end ifset + @ifclear BashFeatures + @menu + * History Interaction:: What it feels like using History as a user. + @end menu + @end ifclear + + @ifset BashFeatures + @node Bash History Facilities + @section Bash History Facilities + @cindex command history + @cindex history list + + When the @option{-o history} option to the @code{set} builtin + is enabled (@pxref{The Set Builtin}), + the shell provides access to the @dfn{command history}, + the list of commands previously typed. + The value of the @env{HISTSIZE} shell variable is used as the + number of commands to save in a history list. + The text of the last @env{$HISTSIZE} + commands (default 500) is saved. + The shell stores each command in the history list prior to + parameter and variable expansion + but after history expansion is performed, subject to the + values of the shell variables + @env{HISTIGNORE} and @env{HISTCONTROL}. + + When the shell starts up, the history is initialized from the + file named by the @env{HISTFILE} variable (default @file{~/.bash_history}). + The file named by the value of @env{HISTFILE} is truncated, if + necessary, to contain no more than the number of lines specified by + the value of the @env{HISTFILESIZE} variable. + When an interactive shell exits, the last + @env{$HISTSIZE} lines are copied from the history list to the file + named by @env{$HISTFILE}. + If the @code{histappend} shell option is set (@pxref{Bash Builtins}), + the lines are appended to the history file, + otherwise the history file is overwritten. + If @env{HISTFILE} + is unset, or if the history file is unwritable, the history is + not saved. After saving the history, the history file is truncated + to contain no more than @env{$HISTFILESIZE} + lines. If @env{HISTFILESIZE} is not set, no truncation is performed. + + If the @env{HISTTIMEFORMAT} is set, the time stamp information + associated with each history entry is written to the history file. + + The builtin command @code{fc} may be used to list or edit and re-execute + a portion of the history list. + The @code{history} builtin may be used to display or modify the history + list and manipulate the history file. + When using command-line editing, search commands + are available in each editing mode that provide access to the + history list (@pxref{Commands For History}). + + The shell allows control over which commands are saved on the history + list. The @env{HISTCONTROL} and @env{HISTIGNORE} + variables may be set to cause the shell to save only a subset of the + commands entered. + The @code{cmdhist} + shell option, if enabled, causes the shell to attempt to save each + line of a multi-line command in the same history entry, adding + semicolons where necessary to preserve syntactic correctness. + The @code{lithist} + shell option causes the shell to save the command with embedded newlines + instead of semicolons. + The @code{shopt} builtin is used to set these options. + @xref{Bash Builtins}, for a description of @code{shopt}. + + @node Bash History Builtins + @section Bash History Builtins + @cindex history builtins + + Bash provides two builtin commands which manipulate the + history list and history file. + + @table @code + + @item fc + @btindex fc + @example + @code{fc [-e @var{ename}] [-nlr] [@var{first}] [@var{last}]} + @code{fc -s [@var{pat}=@var{rep}] [@var{command}]} + @end example + + Fix Command. In the first form, a range of commands from @var{first} to + @var{last} is selected from the history list. Both @var{first} and + @var{last} may be specified as a string (to locate the most recent + command beginning with that string) or as a number (an index into the + history list, where a negative number is used as an offset from the + current command number). If @var{last} is not specified it is set to + @var{first}. If @var{first} is not specified it is set to the previous + command for editing and @minus{}16 for listing. If the @option{-l} flag is + given, the commands are listed on standard output. The @option{-n} flag + suppresses the command numbers when listing. The @option{-r} flag + reverses the order of the listing. Otherwise, the editor given by + @var{ename} is invoked on a file containing those commands. If + @var{ename} is not given, the value of the following variable expansion + is used: @code{$@{FCEDIT:-$@{EDITOR:-vi@}@}}. This says to use the + value of the @env{FCEDIT} variable if set, or the value of the + @env{EDITOR} variable if that is set, or @code{vi} if neither is set. + When editing is complete, the edited commands are echoed and executed. + + In the second form, @var{command} is re-executed after each instance + of @var{pat} in the selected command is replaced by @var{rep}. + + A useful alias to use with the @code{fc} command is @code{r='fc -s'}, so + that typing @samp{r cc} runs the last command beginning with @code{cc} + and typing @samp{r} re-executes the last command (@pxref{Aliases}). + + @item history + @btindex history + @example + history [@var{n}] + history -c + history -d @var{offset} + history [-anrw] [@var{filename}] + history -ps @var{arg} + @end example + + With no options, display the history list with line numbers. + Lines prefixed with a @samp{*} have been modified. + An argument of @var{n} lists only the last @var{n} lines. + If the shell variable @env{HISTTIMEFORMAT} is set and not null, + it is used as a format string for @var{strftime} to display + the time stamp associated with each displayed history entry. + No intervening blank is printed between the formatted time stamp + and the history line. + + Options, if supplied, have the following meanings: + + @table @code + @item -c + Clear the history list. This may be combined + with the other options to replace the history list completely. + + @item -d @var{offset} + Delete the history entry at position @var{offset}. + @var{offset} should be specified as it appears when the history is + displayed. + + @item -a + Append the new + history lines (history lines entered since the beginning of the + current Bash session) to the history file. + + @item -n + Append the history lines not already read from the history file + to the current history list. These are lines appended to the history + file since the beginning of the current Bash session. + + @item -r + Read the current history file and append its contents to + the history list. + + @item -w + Write out the current history to the history file. + + @item -p + Perform history substitution on the @var{arg}s and display the result + on the standard output, without storing the results in the history list. + + @item -s + The @var{arg}s are added to the end of + the history list as a single entry. + + @end table + + When any of the @option{-w}, @option{-r}, @option{-a}, or @option{-n} options is + used, if @var{filename} + is given, then it is used as the history file. If not, then + the value of the @env{HISTFILE} variable is used. + + @end table + @end ifset + + @node History Interaction + @section History Expansion + @cindex history expansion + + The History library provides a history expansion feature that is similar + to the history expansion provided by @code{csh}. This section + describes the syntax used to manipulate the history information. + + History expansions introduce words from the history list into + the input stream, making it easy to repeat commands, insert the + arguments to a previous command into the current input line, or + fix errors in previous commands quickly. + + History expansion takes place in two parts. The first is to determine + which line from the history list should be used during substitution. + The second is to select portions of that line for inclusion into the + current one. The line selected from the history is called the + @dfn{event}, and the portions of that line that are acted upon are + called @dfn{words}. Various @dfn{modifiers} are available to manipulate + the selected words. The line is broken into words in the same fashion + that Bash does, so that several words + surrounded by quotes are considered one word. + History expansions are introduced by the appearance of the + history expansion character, which is @samp{!} by default. + @ifset BashFeatures + Only @samp{\} and @samp{'} may be used to escape the history expansion + character. + @end ifset + + @ifset BashFeatures + Several shell options settable with the @code{shopt} + builtin (@pxref{Bash Builtins}) may be used to tailor + the behavior of history expansion. If the + @code{histverify} shell option is enabled, and Readline + is being used, history substitutions are not immediately passed to + the shell parser. + Instead, the expanded line is reloaded into the Readline + editing buffer for further modification. + If Readline is being used, and the @code{histreedit} + shell option is enabled, a failed history expansion will be + reloaded into the Readline editing buffer for correction. + The @option{-p} option to the @code{history} builtin command + may be used to see what a history expansion will do before using it. + The @option{-s} option to the @code{history} builtin may be used to + add commands to the end of the history list without actually executing + them, so that they are available for subsequent recall. + This is most useful in conjunction with Readline. + + The shell allows control of the various characters used by the + history expansion mechanism with the @code{histchars} variable. + @end ifset + + @menu + * Event Designators:: How to specify which history line to use. + * Word Designators:: Specifying which words are of interest. + * Modifiers:: Modifying the results of substitution. + @end menu + + @node Event Designators + @subsection Event Designators + @cindex event designators + + An event designator is a reference to a command line entry in the + history list. + @cindex history events + + @table @asis + + @item @code{!} + @ifset BashFeatures + Start a history substitution, except when followed by a space, tab, + the end of the line, @samp{=} or @samp{(} (when the + @code{extglob} shell option is enabled using the @code{shopt} builtin). + @end ifset + @ifclear BashFeatures + Start a history substitution, except when followed by a space, tab, + the end of the line, or @samp{=}. + @end ifclear + + @item @code{!@var{n}} + Refer to command line @var{n}. + + @item @code{!-@var{n}} + Refer to the command @var{n} lines back. + + @item @code{!!} + Refer to the previous command. This is a synonym for @samp{!-1}. + + @item @code{!@var{string}} + Refer to the most recent command starting with @var{string}. + + @item @code{!?@var{string}[?]} + Refer to the most recent command containing @var{string}. The trailing + @samp{?} may be omitted if the @var{string} is followed immediately by + a newline. + + @item @code{^@var{string1}^@var{string2}^} + Quick Substitution. Repeat the last command, replacing @var{string1} + with @var{string2}. Equivalent to + @code{!!:s/@var{string1}/@var{string2}/}. + + @item @code{!#} + The entire command line typed so far. + + @end table + + @node Word Designators + @subsection Word Designators + + Word designators are used to select desired words from the event. + A @samp{:} separates the event specification from the word designator. It + may be omitted if the word designator begins with a @samp{^}, @samp{$}, + @samp{*}, @samp{-}, or @samp{%}. Words are numbered from the beginning + of the line, with the first word being denoted by 0 (zero). Words are + inserted into the current line separated by single spaces. + + @need 0.75 + For example, + + @table @code + @item !! + designates the preceding command. When you type this, the preceding + command is repeated in toto. + + @item !!:$ + designates the last argument of the preceding command. This may be + shortened to @code{!$}. + + @item !fi:2 + designates the second argument of the most recent command starting with + the letters @code{fi}. + @end table + + @need 0.75 + Here are the word designators: + + @table @code + + @item 0 (zero) + The @code{0}th word. For many applications, this is the command word. + + @item @var{n} + The @var{n}th word. + + @item ^ + The first argument; that is, word 1. + + @item $ + The last argument. + + @item % + The word matched by the most recent @samp{?@var{string}?} search. + + @item @var{x}-@var{y} + A range of words; @samp{-@var{y}} abbreviates @samp{0-@var{y}}. + + @item * + All of the words, except the @code{0}th. This is a synonym for @samp{1-$}. + It is not an error to use @samp{*} if there is just one word in the event; + the empty string is returned in that case. + + @item @var{x}* + Abbreviates @samp{@var{x}-$} + + @item @var{x}- + Abbreviates @samp{@var{x}-$} like @samp{@var{x}*}, but omits the last word. + + @end table + + If a word designator is supplied without an event specification, the + previous command is used as the event. + + @node Modifiers + @subsection Modifiers + + After the optional word designator, you can add a sequence of one or more + of the following modifiers, each preceded by a @samp{:}. + + @table @code + + @item h + Remove a trailing pathname component, leaving only the head. + + @item t + Remove all leading pathname components, leaving the tail. + + @item r + Remove a trailing suffix of the form @samp{.@var{suffix}}, leaving + the basename. + + @item e + Remove all but the trailing suffix. + + @item p + Print the new command but do not execute it. + + @ifset BashFeatures + @item q + Quote the substituted words, escaping further substitutions. + + @item x + Quote the substituted words as with @samp{q}, + but break into words at spaces, tabs, and newlines. + @end ifset + + @item s/@var{old}/@var{new}/ + Substitute @var{new} for the first occurrence of @var{old} in the + event line. Any delimiter may be used in place of @samp{/}. + The delimiter may be quoted in @var{old} and @var{new} + with a single backslash. If @samp{&} appears in @var{new}, + it is replaced by @var{old}. A single backslash will quote + the @samp{&}. The final delimiter is optional if it is the last + character on the input line. + + @item & + Repeat the previous substitution. + + @item g + @itemx a + Cause changes to be applied over the entire event line. Used in + conjunction with @samp{s}, as in @code{gs/@var{old}/@var{new}/}, + or with @samp{&}. + + @item G + Apply the following @samp{s} modifier once to each word in the event. + + @end table diff -aNrc2 bash-2.05b-patched/lib/readline/doc/hsuser.texinfo bash-3.0/lib/readline/doc/hsuser.texinfo *** bash-2.05b-patched/lib/readline/doc/hsuser.texinfo Tue Apr 16 17:12:04 2002 --- bash-3.0/lib/readline/doc/hsuser.texinfo Wed Dec 31 19:00:00 1969 *************** *** 1,437 **** - @ignore - This file documents the user interface to the GNU History library. - - Copyright (C) 1988-2002 Free Software Foundation, Inc. - Authored by Brian Fox and Chet Ramey. - - Permission is granted to make and distribute verbatim copies of this manual - provided the copyright notice and this permission notice are preserved on - all copies. - - Permission is granted to process this file through Tex and print the - results, provided the printed document carries copying permission notice - identical to this one except for the removal of this paragraph (this - paragraph not being relevant to the printed manual). - - Permission is granted to copy and distribute modified versions of this - manual under the conditions for verbatim copying, provided also that the - GNU Copyright statement is available to the distributee, and provided that - the entire resulting derived work is distributed under the terms of a - permission notice identical to this one. - - Permission is granted to copy and distribute translations of this manual - into another language, under the above conditions for modified versions. - @end ignore - - @node Using History Interactively - @chapter Using History Interactively - - @ifclear BashFeatures - @defcodeindex bt - @end ifclear - - @ifset BashFeatures - This chapter describes how to use the @sc{gnu} History Library - interactively, from a user's standpoint. - It should be considered a user's guide. - For information on using the @sc{gnu} History Library in other programs, - see the @sc{gnu} Readline Library Manual. - @end ifset - @ifclear BashFeatures - This chapter describes how to use the @sc{gnu} History Library interactively, - from a user's standpoint. It should be considered a user's guide. For - information on using the @sc{gnu} History Library in your own programs, - @pxref{Programming with GNU History}. - @end ifclear - - @ifset BashFeatures - @menu - * Bash History Facilities:: How Bash lets you manipulate your command - history. - * Bash History Builtins:: The Bash builtin commands that manipulate - the command history. - * History Interaction:: What it feels like using History as a user. - @end menu - @end ifset - @ifclear BashFeatures - @menu - * History Interaction:: What it feels like using History as a user. - @end menu - @end ifclear - - @ifset BashFeatures - @node Bash History Facilities - @section Bash History Facilities - @cindex command history - @cindex history list - - When the @option{-o history} option to the @code{set} builtin - is enabled (@pxref{The Set Builtin}), - the shell provides access to the @dfn{command history}, - the list of commands previously typed. - The value of the @env{HISTSIZE} shell variable is used as the - number of commands to save in a history list. - The text of the last @env{$HISTSIZE} - commands (default 500) is saved. - The shell stores each command in the history list prior to - parameter and variable expansion - but after history expansion is performed, subject to the - values of the shell variables - @env{HISTIGNORE} and @env{HISTCONTROL}. - - When the shell starts up, the history is initialized from the - file named by the @env{HISTFILE} variable (default @file{~/.bash_history}). - The file named by the value of @env{HISTFILE} is truncated, if - necessary, to contain no more than the number of lines specified by - the value of the @env{HISTFILESIZE} variable. - When an interactive shell exits, the last - @env{$HISTSIZE} lines are copied from the history list to the file - named by @env{$HISTFILE}. - If the @code{histappend} shell option is set (@pxref{Bash Builtins}), - the lines are appended to the history file, - otherwise the history file is overwritten. - If @env{HISTFILE} - is unset, or if the history file is unwritable, the history is - not saved. After saving the history, the history file is truncated - to contain no more than @env{$HISTFILESIZE} - lines. If @env{HISTFILESIZE} is not set, no truncation is performed. - - The builtin command @code{fc} may be used to list or edit and re-execute - a portion of the history list. - The @code{history} builtin may be used to display or modify the history - list and manipulate the history file. - When using command-line editing, search commands - are available in each editing mode that provide access to the - history list (@pxref{Commands For History}). - - The shell allows control over which commands are saved on the history - list. The @env{HISTCONTROL} and @env{HISTIGNORE} - variables may be set to cause the shell to save only a subset of the - commands entered. - The @code{cmdhist} - shell option, if enabled, causes the shell to attempt to save each - line of a multi-line command in the same history entry, adding - semicolons where necessary to preserve syntactic correctness. - The @code{lithist} - shell option causes the shell to save the command with embedded newlines - instead of semicolons. - The @code{shopt} builtin is used to set these options. - @xref{Bash Builtins}, for a description of @code{shopt}. - - @node Bash History Builtins - @section Bash History Builtins - @cindex history builtins - - Bash provides two builtin commands which manipulate the - history list and history file. - - @table @code - - @item fc - @btindex fc - @example - @code{fc [-e @var{ename}] [-nlr] [@var{first}] [@var{last}]} - @code{fc -s [@var{pat}=@var{rep}] [@var{command}]} - @end example - - Fix Command. In the first form, a range of commands from @var{first} to - @var{last} is selected from the history list. Both @var{first} and - @var{last} may be specified as a string (to locate the most recent - command beginning with that string) or as a number (an index into the - history list, where a negative number is used as an offset from the - current command number). If @var{last} is not specified it is set to - @var{first}. If @var{first} is not specified it is set to the previous - command for editing and @minus{}16 for listing. If the @option{-l} flag is - given, the commands are listed on standard output. The @option{-n} flag - suppresses the command numbers when listing. The @option{-r} flag - reverses the order of the listing. Otherwise, the editor given by - @var{ename} is invoked on a file containing those commands. If - @var{ename} is not given, the value of the following variable expansion - is used: @code{$@{FCEDIT:-$@{EDITOR:-vi@}@}}. This says to use the - value of the @env{FCEDIT} variable if set, or the value of the - @env{EDITOR} variable if that is set, or @code{vi} if neither is set. - When editing is complete, the edited commands are echoed and executed. - - In the second form, @var{command} is re-executed after each instance - of @var{pat} in the selected command is replaced by @var{rep}. - - A useful alias to use with the @code{fc} command is @code{r='fc -s'}, so - that typing @samp{r cc} runs the last command beginning with @code{cc} - and typing @samp{r} re-executes the last command (@pxref{Aliases}). - - @item history - @btindex history - @example - history [@var{n}] - history -c - history -d @var{offset} - history [-anrw] [@var{filename}] - history -ps @var{arg} - @end example - - With no options, display the history list with line numbers. - Lines prefixed with a @samp{*} have been modified. - An argument of @var{n} lists only the last @var{n} lines. - Options, if supplied, have the following meanings: - - @table @code - @item -c - Clear the history list. This may be combined - with the other options to replace the history list completely. - - @item -d @var{offset} - Delete the history entry at position @var{offset}. - @var{offset} should be specified as it appears when the history is - displayed. - - @item -a - Append the new - history lines (history lines entered since the beginning of the - current Bash session) to the history file. - - @item -n - Append the history lines not already read from the history file - to the current history list. These are lines appended to the history - file since the beginning of the current Bash session. - - @item -r - Read the current history file and append its contents to - the history list. - - @item -w - Write out the current history to the history file. - - @item -p - Perform history substitution on the @var{arg}s and display the result - on the standard output, without storing the results in the history list. - - @item -s - The @var{arg}s are added to the end of - the history list as a single entry. - - @end table - - When any of the @option{-w}, @option{-r}, @option{-a}, or @option{-n} options is - used, if @var{filename} - is given, then it is used as the history file. If not, then - the value of the @env{HISTFILE} variable is used. - - @end table - @end ifset - - @node History Interaction - @section History Expansion - @cindex history expansion - - The History library provides a history expansion feature that is similar - to the history expansion provided by @code{csh}. This section - describes the syntax used to manipulate the history information. - - History expansions introduce words from the history list into - the input stream, making it easy to repeat commands, insert the - arguments to a previous command into the current input line, or - fix errors in previous commands quickly. - - History expansion takes place in two parts. The first is to determine - which line from the history list should be used during substitution. - The second is to select portions of that line for inclusion into the - current one. The line selected from the history is called the - @dfn{event}, and the portions of that line that are acted upon are - called @dfn{words}. Various @dfn{modifiers} are available to manipulate - the selected words. The line is broken into words in the same fashion - that Bash does, so that several words - surrounded by quotes are considered one word. - History expansions are introduced by the appearance of the - history expansion character, which is @samp{!} by default. - @ifset BashFeatures - Only @samp{\} and @samp{'} may be used to escape the history expansion - character. - @end ifset - - @ifset BashFeatures - Several shell options settable with the @code{shopt} - builtin (@pxref{Bash Builtins}) may be used to tailor - the behavior of history expansion. If the - @code{histverify} shell option is enabled, and Readline - is being used, history substitutions are not immediately passed to - the shell parser. - Instead, the expanded line is reloaded into the Readline - editing buffer for further modification. - If Readline is being used, and the @code{histreedit} - shell option is enabled, a failed history expansion will be - reloaded into the Readline editing buffer for correction. - The @option{-p} option to the @code{history} builtin command - may be used to see what a history expansion will do before using it. - The @option{-s} option to the @code{history} builtin may be used to - add commands to the end of the history list without actually executing - them, so that they are available for subsequent recall. - This is most useful in conjunction with Readline. - - The shell allows control of the various characters used by the - history expansion mechanism with the @code{histchars} variable. - @end ifset - - @menu - * Event Designators:: How to specify which history line to use. - * Word Designators:: Specifying which words are of interest. - * Modifiers:: Modifying the results of substitution. - @end menu - - @node Event Designators - @subsection Event Designators - @cindex event designators - - An event designator is a reference to a command line entry in the - history list. - @cindex history events - - @table @asis - - @item @code{!} - Start a history substitution, except when followed by a space, tab, - the end of the line, @samp{=} or @samp{(}. - - @item @code{!@var{n}} - Refer to command line @var{n}. - - @item @code{!-@var{n}} - Refer to the command @var{n} lines back. - - @item @code{!!} - Refer to the previous command. This is a synonym for @samp{!-1}. - - @item @code{!@var{string}} - Refer to the most recent command starting with @var{string}. - - @item @code{!?@var{string}[?]} - Refer to the most recent command containing @var{string}. The trailing - @samp{?} may be omitted if the @var{string} is followed immediately by - a newline. - - @item @code{^@var{string1}^@var{string2}^} - Quick Substitution. Repeat the last command, replacing @var{string1} - with @var{string2}. Equivalent to - @code{!!:s/@var{string1}/@var{string2}/}. - - @item @code{!#} - The entire command line typed so far. - - @end table - - @node Word Designators - @subsection Word Designators - - Word designators are used to select desired words from the event. - A @samp{:} separates the event specification from the word designator. It - may be omitted if the word designator begins with a @samp{^}, @samp{$}, - @samp{*}, @samp{-}, or @samp{%}. Words are numbered from the beginning - of the line, with the first word being denoted by 0 (zero). Words are - inserted into the current line separated by single spaces. - - @need 0.75 - For example, - - @table @code - @item !! - designates the preceding command. When you type this, the preceding - command is repeated in toto. - - @item !!:$ - designates the last argument of the preceding command. This may be - shortened to @code{!$}. - - @item !fi:2 - designates the second argument of the most recent command starting with - the letters @code{fi}. - @end table - - @need 0.75 - Here are the word designators: - - @table @code - - @item 0 (zero) - The @code{0}th word. For many applications, this is the command word. - - @item @var{n} - The @var{n}th word. - - @item ^ - The first argument; that is, word 1. - - @item $ - The last argument. - - @item % - The word matched by the most recent @samp{?@var{string}?} search. - - @item @var{x}-@var{y} - A range of words; @samp{-@var{y}} abbreviates @samp{0-@var{y}}. - - @item * - All of the words, except the @code{0}th. This is a synonym for @samp{1-$}. - It is not an error to use @samp{*} if there is just one word in the event; - the empty string is returned in that case. - - @item @var{x}* - Abbreviates @samp{@var{x}-$} - - @item @var{x}- - Abbreviates @samp{@var{x}-$} like @samp{@var{x}*}, but omits the last word. - - @end table - - If a word designator is supplied without an event specification, the - previous command is used as the event. - - @node Modifiers - @subsection Modifiers - - After the optional word designator, you can add a sequence of one or more - of the following modifiers, each preceded by a @samp{:}. - - @table @code - - @item h - Remove a trailing pathname component, leaving only the head. - - @item t - Remove all leading pathname components, leaving the tail. - - @item r - Remove a trailing suffix of the form @samp{.@var{suffix}}, leaving - the basename. - - @item e - Remove all but the trailing suffix. - - @item p - Print the new command but do not execute it. - - @ifset BashFeatures - @item q - Quote the substituted words, escaping further substitutions. - - @item x - Quote the substituted words as with @samp{q}, - but break into words at spaces, tabs, and newlines. - @end ifset - - @item s/@var{old}/@var{new}/ - Substitute @var{new} for the first occurrence of @var{old} in the - event line. Any delimiter may be used in place of @samp{/}. - The delimiter may be quoted in @var{old} and @var{new} - with a single backslash. If @samp{&} appears in @var{new}, - it is replaced by @var{old}. A single backslash will quote - the @samp{&}. The final delimiter is optional if it is the last - character on the input line. - - @item & - Repeat the previous substitution. - - @item g - Cause changes to be applied over the entire event line. Used in - conjunction with @samp{s}, as in @code{gs/@var{old}/@var{new}/}, - or with @samp{&}. - - @end table --- 0 ---- diff -aNrc2 bash-2.05b-patched/lib/readline/doc/manvers.texinfo bash-3.0/lib/readline/doc/manvers.texinfo *** bash-2.05b-patched/lib/readline/doc/manvers.texinfo Tue Apr 16 17:09:35 2002 --- bash-3.0/lib/readline/doc/manvers.texinfo Wed Dec 31 19:00:00 1969 *************** *** 1,10 **** - @ignore - Copyright (C) 1988-2002 Free Software Foundation, Inc. - @end ignore - - @set EDITION 4.3 - @set VERSION 4.3 - @set UPDATED 2002 March 4 - @set UPDATE-MONTH March 2002 - - @set LASTCHANGE Mon Mar 4 12:00:16 EST 2002 --- 0 ---- diff -aNrc2 bash-2.05b-patched/lib/readline/doc/rlman.texi bash-3.0/lib/readline/doc/rlman.texi *** bash-2.05b-patched/lib/readline/doc/rlman.texi Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/readline/doc/rlman.texi Tue Jul 27 09:29:11 2004 *************** *** 0 **** --- 1,101 ---- + \input texinfo @c -*-texinfo-*- + @comment %**start of header (This is for running Texinfo on a region.) + @setfilename readline.info + @settitle GNU Readline Library + @comment %**end of header (This is for running Texinfo on a region.) + @synindex vr fn + @setchapternewpage odd + + @include version.texi + + @copying + This manual describes the GNU Readline Library + (version @value{VERSION}, @value{UPDATED}), a library which aids in the + consistency of user interface across discrete programs which provide + a command line interface. + + Copyright @copyright{} 1988-2004 Free Software Foundation, Inc. + + Permission is granted to make and distribute verbatim copies of + this manual provided the copyright notice and this permission notice + are preserved on all copies. + + @quotation + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 or + any later version published by the Free Software Foundation; with no + Invariant Sections, with the Front-Cover texts being ``A GNU Manual,'' + and with the Back-Cover Texts as in (a) below. A copy of the license is + included in the section entitled ``GNU Free Documentation License.'' + + (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify + this GNU Manual, like GNU software. Copies published by the Free + Software Foundation raise funds for GNU development.'' + @end quotation + @end copying + + @dircategory Libraries + @direntry + * Readline: (readline). The GNU readline library API. + @end direntry + + @titlepage + @title GNU Readline Library + @subtitle Edition @value{EDITION}, for @code{Readline Library} Version @value{VERSION}. + @subtitle @value{UPDATED-MONTH} + @author Chet Ramey, Case Western Reserve University + @author Brian Fox, Free Software Foundation + + @page + @vskip 0pt plus 1filll + @insertcopying + + @sp 1 + Published by the Free Software Foundation @* + 59 Temple Place, Suite 330, @* + Boston, MA 02111-1307 @* + USA @* + + @end titlepage + + @contents + + @ifnottex + @node Top + @top GNU Readline Library + + This document describes the GNU Readline Library, a utility which aids + in the consistency of user interface across discrete programs which + provide a command line interface. + + @menu + * Command Line Editing:: GNU Readline User's Manual. + * Programming with GNU Readline:: GNU Readline Programmer's Manual. + * Copying This Manual:: Copying this manual. + * Concept Index:: Index of concepts described in this manual. + * Function and Variable Index:: Index of externally visible functions + and variables. + @end menu + @end ifnottex + + @include rluser.texi + @include rltech.texi + + @node Copying This Manual + @appendix Copying This Manual + + @menu + * GNU Free Documentation License:: License for copying this manual. + @end menu + + @include fdl.texi + + @node Concept Index + @unnumbered Concept Index + @printindex cp + + @node Function and Variable Index + @unnumbered Function and Variable Index + @printindex fn + + @bye diff -aNrc2 bash-2.05b-patched/lib/readline/doc/rlman.texinfo bash-3.0/lib/readline/doc/rlman.texinfo *** bash-2.05b-patched/lib/readline/doc/rlman.texinfo Tue Apr 16 17:10:04 2002 --- bash-3.0/lib/readline/doc/rlman.texinfo Wed Dec 31 19:00:00 1969 *************** *** 1,108 **** - \input texinfo @c -*-texinfo-*- - @comment %**start of header (This is for running Texinfo on a region.) - @setfilename readline.info - @settitle GNU Readline Library - @comment %**end of header (This is for running Texinfo on a region.) - @synindex vr fn - @setchapternewpage odd - - @include manvers.texinfo - - @ifinfo - @dircategory Libraries - @direntry - * Readline: (readline). The GNU readline library API - @end direntry - - This document describes the GNU Readline Library, a utility which aids - in the consistency of user interface across discrete programs that need - to provide a command line interface. - - Copyright (C) 1988-2002 Free Software Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of - this manual provided the copyright notice and this permission notice - pare preserved on all copies. - - @ignore - Permission is granted to process this file through TeX and print the - results, provided the printed document carries copying permission - notice identical to this one except for the removal of this paragraph - (this paragraph not being relevant to the printed manual). - @end ignore - - Permission is granted to copy and distribute modified versions of this - manual under the conditions for verbatim copying, provided that the entire - resulting derived work is distributed under the terms of a permission - notice identical to this one. - - Permission is granted to copy and distribute translations of this manual - into another language, under the above conditions for modified versions, - except that this permission notice may be stated in a translation approved - by the Free Software Foundation. - @end ifinfo - - @titlepage - @title GNU Readline Library - @subtitle Edition @value{EDITION}, for @code{Readline Library} Version @value{VERSION}. - @subtitle @value{UPDATE-MONTH} - @author Brian Fox, Free Software Foundation - @author Chet Ramey, Case Western Reserve University - - @page - This document describes the GNU Readline Library, a utility which aids - in the consistency of user interface across discrete programs that need - to provide a command line interface. - - Published by the Free Software Foundation @* - 59 Temple Place, Suite 330, @* - Boston, MA 02111 USA - - Permission is granted to make and distribute verbatim copies of - this manual provided the copyright notice and this permission notice - are preserved on all copies. - - Permission is granted to copy and distribute modified versions of this - manual under the conditions for verbatim copying, provided that the entire - resulting derived work is distributed under the terms of a permission - notice identical to this one. - - Permission is granted to copy and distribute translations of this manual - into another language, under the above conditions for modified versions, - except that this permission notice may be stated in a translation approved - by the Free Software Foundation. - - @vskip 0pt plus 1filll - Copyright @copyright{} 1988-2002 Free Software Foundation, Inc. - @end titlepage - - @ifinfo - @node Top - @top GNU Readline Library - - This document describes the GNU Readline Library, a utility which aids - in the consistency of user interface across discrete programs that need - to provide a command line interface. - - @menu - * Command Line Editing:: GNU Readline User's Manual. - * Programming with GNU Readline:: GNU Readline Programmer's Manual. - * Concept Index:: Index of concepts described in this manual. - * Function and Variable Index:: Index of externally visible functions - and variables. - @end menu - @end ifinfo - - @include rluser.texinfo - @include rltech.texinfo - - @node Concept Index - @unnumbered Concept Index - @printindex cp - - @node Function and Variable Index - @unnumbered Function and Variable Index - @printindex fn - - @contents - @bye --- 0 ---- diff -aNrc2 bash-2.05b-patched/lib/readline/doc/rltech.texi bash-3.0/lib/readline/doc/rltech.texi *** bash-2.05b-patched/lib/readline/doc/rltech.texi Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/readline/doc/rltech.texi Wed Jan 28 15:46:37 2004 *************** *** 0 **** --- 1,2259 ---- + @comment %**start of header (This is for running Texinfo on a region.) + @setfilename rltech.info + @comment %**end of header (This is for running Texinfo on a region.) + @setchapternewpage odd + + @ifinfo + This document describes the GNU Readline Library, a utility for aiding + in the consitency of user interface across discrete programs that need + to provide a command line interface. + + Copyright (C) 1988-2004 Free Software Foundation, Inc. + + Permission is granted to make and distribute verbatim copies of + this manual provided the copyright notice and this permission notice + pare preserved on all copies. + + @ignore + Permission is granted to process this file through TeX and print the + results, provided the printed document carries copying permission + notice identical to this one except for the removal of this paragraph + (this paragraph not being relevant to the printed manual). + @end ignore + + Permission is granted to copy and distribute modified versions of this + manual under the conditions for verbatim copying, provided that the entire + resulting derived work is distributed under the terms of a permission + notice identical to this one. + + Permission is granted to copy and distribute translations of this manual + into another language, under the above conditions for modified versions, + except that this permission notice may be stated in a translation approved + by the Foundation. + @end ifinfo + + @node Programming with GNU Readline + @chapter Programming with GNU Readline + + This chapter describes the interface between the @sc{gnu} Readline Library and + other programs. If you are a programmer, and you wish to include the + features found in @sc{gnu} Readline + such as completion, line editing, and interactive history manipulation + in your own programs, this section is for you. + + @menu + * Basic Behavior:: Using the default behavior of Readline. + * Custom Functions:: Adding your own functions to Readline. + * Readline Variables:: Variables accessible to custom + functions. + * Readline Convenience Functions:: Functions which Readline supplies to + aid in writing your own custom + functions. + * Readline Signal Handling:: How Readline behaves when it receives signals. + * Custom Completers:: Supplanting or supplementing Readline's + completion functions. + @end menu + + @node Basic Behavior + @section Basic Behavior + + Many programs provide a command line interface, such as @code{mail}, + @code{ftp}, and @code{sh}. For such programs, the default behaviour of + Readline is sufficient. This section describes how to use Readline in + the simplest way possible, perhaps to replace calls in your code to + @code{gets()} or @code{fgets()}. + + @findex readline + @cindex readline, function + + The function @code{readline()} prints a prompt @var{prompt} + and then reads and returns a single line of text from the user. + If @var{prompt} is @code{NULL} or the empty string, no prompt is displayed. + The line @code{readline} returns is allocated with @code{malloc()}; + the caller should @code{free()} the line when it has finished with it. + The declaration for @code{readline} in ANSI C is + + @example + @code{char *readline (const char *@var{prompt});} + @end example + + @noindent + So, one might say + @example + @code{char *line = readline ("Enter a line: ");} + @end example + @noindent + in order to read a line of text from the user. + The line returned has the final newline removed, so only the + text remains. + + If @code{readline} encounters an @code{EOF} while reading the line, and the + line is empty at that point, then @code{(char *)NULL} is returned. + Otherwise, the line is ended just as if a newline had been typed. + + If you want the user to be able to get at the line later, (with + @key{C-p} for example), you must call @code{add_history()} to save the + line away in a @dfn{history} list of such lines. + + @example + @code{add_history (line)}; + @end example + + @noindent + For full details on the GNU History Library, see the associated manual. + + It is preferable to avoid saving empty lines on the history list, since + users rarely have a burning need to reuse a blank line. Here is + a function which usefully replaces the standard @code{gets()} library + function, and has the advantage of no static buffer to overflow: + + @example + /* A static variable for holding the line. */ + static char *line_read = (char *)NULL; + + /* Read a string, and return a pointer to it. + Returns NULL on EOF. */ + char * + rl_gets () + @{ + /* If the buffer has already been allocated, + return the memory to the free pool. */ + if (line_read) + @{ + free (line_read); + line_read = (char *)NULL; + @} + + /* Get a line from the user. */ + line_read = readline (""); + + /* If the line has any text in it, + save it on the history. */ + if (line_read && *line_read) + add_history (line_read); + + return (line_read); + @} + @end example + + This function gives the user the default behaviour of @key{TAB} + completion: completion on file names. If you do not want Readline to + complete on filenames, you can change the binding of the @key{TAB} key + with @code{rl_bind_key()}. + + @example + @code{int rl_bind_key (int @var{key}, rl_command_func_t *@var{function});} + @end example + + @code{rl_bind_key()} takes two arguments: @var{key} is the character that + you want to bind, and @var{function} is the address of the function to + call when @var{key} is pressed. Binding @key{TAB} to @code{rl_insert()} + makes @key{TAB} insert itself. + @code{rl_bind_key()} returns non-zero if @var{key} is not a valid + ASCII character code (between 0 and 255). + + Thus, to disable the default @key{TAB} behavior, the following suffices: + @example + @code{rl_bind_key ('\t', rl_insert);} + @end example + + This code should be executed once at the start of your program; you + might write a function called @code{initialize_readline()} which + performs this and other desired initializations, such as installing + custom completers (@pxref{Custom Completers}). + + @node Custom Functions + @section Custom Functions + + Readline provides many functions for manipulating the text of + the line, but it isn't possible to anticipate the needs of all + programs. This section describes the various functions and variables + defined within the Readline library which allow a user program to add + customized functionality to Readline. + + Before declaring any functions that customize Readline's behavior, or + using any functionality Readline provides in other code, an + application writer should include the file @code{} + in any file that uses Readline's features. Since some of the definitions + in @code{readline.h} use the @code{stdio} library, the file + @code{} should be included before @code{readline.h}. + + @code{readline.h} defines a C preprocessor variable that should + be treated as an integer, @code{RL_READLINE_VERSION}, which may + be used to conditionally compile application code depending on + the installed Readline version. The value is a hexadecimal + encoding of the major and minor version numbers of the library, + of the form 0x@var{MMmm}. @var{MM} is the two-digit major + version number; @var{mm} is the two-digit minor version number. + For Readline 4.2, for example, the value of + @code{RL_READLINE_VERSION} would be @code{0x0402}. + + @menu + * Readline Typedefs:: C declarations to make code readable. + * Function Writing:: Variables and calling conventions. + @end menu + + @node Readline Typedefs + @subsection Readline Typedefs + + For readabilty, we declare a number of new object types, all pointers + to functions. + + The reason for declaring these new types is to make it easier to write + code describing pointers to C functions with appropriately prototyped + arguments and return values. + + For instance, say we want to declare a variable @var{func} as a pointer + to a function which takes two @code{int} arguments and returns an + @code{int} (this is the type of all of the Readline bindable functions). + Instead of the classic C declaration + + @code{int (*func)();} + + @noindent + or the ANSI-C style declaration + + @code{int (*func)(int, int);} + + @noindent + we may write + + @code{rl_command_func_t *func;} + + The full list of function pointer types available is + + @table @code + @item typedef int rl_command_func_t (int, int); + + @item typedef char *rl_compentry_func_t (const char *, int); + + @item typedef char **rl_completion_func_t (const char *, int, int); + + @item typedef char *rl_quote_func_t (char *, int, char *); + + @item typedef char *rl_dequote_func_t (char *, int); + + @item typedef int rl_compignore_func_t (char **); + + @item typedef void rl_compdisp_func_t (char **, int, int); + + @item typedef int rl_hook_func_t (void); + + @item typedef int rl_getc_func_t (FILE *); + + @item typedef int rl_linebuf_func_t (char *, int); + + @item typedef int rl_intfunc_t (int); + @item #define rl_ivoidfunc_t rl_hook_func_t + @item typedef int rl_icpfunc_t (char *); + @item typedef int rl_icppfunc_t (char **); + + @item typedef void rl_voidfunc_t (void); + @item typedef void rl_vintfunc_t (int); + @item typedef void rl_vcpfunc_t (char *); + @item typedef void rl_vcppfunc_t (char **); + + @end table + + @node Function Writing + @subsection Writing a New Function + + In order to write new functions for Readline, you need to know the + calling conventions for keyboard-invoked functions, and the names of the + variables that describe the current state of the line read so far. + + The calling sequence for a command @code{foo} looks like + + @example + @code{int foo (int count, int key)} + @end example + + @noindent + where @var{count} is the numeric argument (or 1 if defaulted) and + @var{key} is the key that invoked this function. + + It is completely up to the function as to what should be done with the + numeric argument. Some functions use it as a repeat count, some + as a flag, and others to choose alternate behavior (refreshing the current + line as opposed to refreshing the screen, for example). Some choose to + ignore it. In general, if a + function uses the numeric argument as a repeat count, it should be able + to do something useful with both negative and positive arguments. + At the very least, it should be aware that it can be passed a + negative argument. + + A command function should return 0 if its action completes successfully, + and a non-zero value if some error occurs. + + @node Readline Variables + @section Readline Variables + + These variables are available to function writers. + + @deftypevar {char *} rl_line_buffer + This is the line gathered so far. You are welcome to modify the + contents of the line, but see @ref{Allowing Undoing}. The + function @code{rl_extend_line_buffer} is available to increase + the memory allocated to @code{rl_line_buffer}. + @end deftypevar + + @deftypevar int rl_point + The offset of the current cursor position in @code{rl_line_buffer} + (the @emph{point}). + @end deftypevar + + @deftypevar int rl_end + The number of characters present in @code{rl_line_buffer}. When + @code{rl_point} is at the end of the line, @code{rl_point} and + @code{rl_end} are equal. + @end deftypevar + + @deftypevar int rl_mark + The @var{mark} (saved position) in the current line. If set, the mark + and point define a @emph{region}. + @end deftypevar + + @deftypevar int rl_done + Setting this to a non-zero value causes Readline to return the current + line immediately. + @end deftypevar + + @deftypevar int rl_num_chars_to_read + Setting this to a positive value before calling @code{readline()} causes + Readline to return after accepting that many characters, rather + than reading up to a character bound to @code{accept-line}. + @end deftypevar + + @deftypevar int rl_pending_input + Setting this to a value makes it the next keystroke read. This is a + way to stuff a single character into the input stream. + @end deftypevar + + @deftypevar int rl_dispatching + Set to a non-zero value if a function is being called from a key binding; + zero otherwise. Application functions can test this to discover whether + they were called directly or by Readline's dispatching mechanism. + @end deftypevar + + @deftypevar int rl_erase_empty_line + Setting this to a non-zero value causes Readline to completely erase + the current line, including any prompt, any time a newline is typed as + the only character on an otherwise-empty line. The cursor is moved to + the beginning of the newly-blank line. + @end deftypevar + + @deftypevar {char *} rl_prompt + The prompt Readline uses. This is set from the argument to + @code{readline()}, and should not be assigned to directly. + The @code{rl_set_prompt()} function (@pxref{Redisplay}) may + be used to modify the prompt string after calling @code{readline()}. + @end deftypevar + + @deftypevar int rl_already_prompted + If an application wishes to display the prompt itself, rather than have + Readline do it the first time @code{readline()} is called, it should set + this variable to a non-zero value after displaying the prompt. + The prompt must also be passed as the argument to @code{readline()} so + the redisplay functions can update the display properly. + The calling application is responsible for managing the value; Readline + never sets it. + @end deftypevar + + @deftypevar {const char *} rl_library_version + The version number of this revision of the library. + @end deftypevar + + @deftypevar int rl_readline_version + An integer encoding the current version of the library. The encoding is + of the form 0x@var{MMmm}, where @var{MM} is the two-digit major version + number, and @var{mm} is the two-digit minor version number. + For example, for Readline-4.2, @code{rl_readline_version} would have the + value 0x0402. + @end deftypevar + + @deftypevar {int} rl_gnu_readline_p + Always set to 1, denoting that this is @sc{gnu} readline rather than some + emulation. + @end deftypevar + + @deftypevar {const char *} rl_terminal_name + The terminal type, used for initialization. If not set by the application, + Readline sets this to the value of the @env{TERM} environment variable + the first time it is called. + @end deftypevar + + @deftypevar {const char *} rl_readline_name + This variable is set to a unique name by each application using Readline. + The value allows conditional parsing of the inputrc file + (@pxref{Conditional Init Constructs}). + @end deftypevar + + @deftypevar {FILE *} rl_instream + The stdio stream from which Readline reads input. + If @code{NULL}, Readline defaults to @var{stdin}. + @end deftypevar + + @deftypevar {FILE *} rl_outstream + The stdio stream to which Readline performs output. + If @code{NULL}, Readline defaults to @var{stdout}. + @end deftypevar + + @deftypevar {rl_command_func_t *} rl_last_func + The address of the last command function Readline executed. May be used to + test whether or not a function is being executed twice in succession, for + example. + @end deftypevar + + @deftypevar {rl_hook_func_t *} rl_startup_hook + If non-zero, this is the address of a function to call just + before @code{readline} prints the first prompt. + @end deftypevar + + @deftypevar {rl_hook_func_t *} rl_pre_input_hook + If non-zero, this is the address of a function to call after + the first prompt has been printed and just before @code{readline} + starts reading input characters. + @end deftypevar + + @deftypevar {rl_hook_func_t *} rl_event_hook + If non-zero, this is the address of a function to call periodically + when Readline is waiting for terminal input. + By default, this will be called at most ten times a second if there + is no keyboard input. + @end deftypevar + + @deftypevar {rl_getc_func_t *} rl_getc_function + If non-zero, Readline will call indirectly through this pointer + to get a character from the input stream. By default, it is set to + @code{rl_getc}, the default Readline character input function + (@pxref{Character Input}). + @end deftypevar + + @deftypevar {rl_voidfunc_t *} rl_redisplay_function + If non-zero, Readline will call indirectly through this pointer + to update the display with the current contents of the editing buffer. + By default, it is set to @code{rl_redisplay}, the default Readline + redisplay function (@pxref{Redisplay}). + @end deftypevar + + @deftypevar {rl_vintfunc_t *} rl_prep_term_function + If non-zero, Readline will call indirectly through this pointer + to initialize the terminal. The function takes a single argument, an + @code{int} flag that says whether or not to use eight-bit characters. + By default, this is set to @code{rl_prep_terminal} + (@pxref{Terminal Management}). + @end deftypevar + + @deftypevar {rl_voidfunc_t *} rl_deprep_term_function + If non-zero, Readline will call indirectly through this pointer + to reset the terminal. This function should undo the effects of + @code{rl_prep_term_function}. + By default, this is set to @code{rl_deprep_terminal} + (@pxref{Terminal Management}). + @end deftypevar + + @deftypevar {Keymap} rl_executing_keymap + This variable is set to the keymap (@pxref{Keymaps}) in which the + currently executing readline function was found. + @end deftypevar + + @deftypevar {Keymap} rl_binding_keymap + This variable is set to the keymap (@pxref{Keymaps}) in which the + last key binding occurred. + @end deftypevar + + @deftypevar {char *} rl_executing_macro + This variable is set to the text of any currently-executing macro. + @end deftypevar + + @deftypevar {int} rl_readline_state + A variable with bit values that encapsulate the current Readline state. + A bit is set with the @code{RL_SETSTATE} macro, and unset with the + @code{RL_UNSETSTATE} macro. Use the @code{RL_ISSTATE} macro to test + whether a particular state bit is set. Current state bits include: + + @table @code + @item RL_STATE_NONE + Readline has not yet been called, nor has it begun to intialize. + @item RL_STATE_INITIALIZING + Readline is initializing its internal data structures. + @item RL_STATE_INITIALIZED + Readline has completed its initialization. + @item RL_STATE_TERMPREPPED + Readline has modified the terminal modes to do its own input and redisplay. + @item RL_STATE_READCMD + Readline is reading a command from the keyboard. + @item RL_STATE_METANEXT + Readline is reading more input after reading the meta-prefix character. + @item RL_STATE_DISPATCHING + Readline is dispatching to a command. + @item RL_STATE_MOREINPUT + Readline is reading more input while executing an editing command. + @item RL_STATE_ISEARCH + Readline is performing an incremental history search. + @item RL_STATE_NSEARCH + Readline is performing a non-incremental history search. + @item RL_STATE_SEARCH + Readline is searching backward or forward through the history for a string. + @item RL_STATE_NUMERICARG + Readline is reading a numeric argument. + @item RL_STATE_MACROINPUT + Readline is currently getting its input from a previously-defined keyboard + macro. + @item RL_STATE_MACRODEF + Readline is currently reading characters defining a keyboard macro. + @item RL_STATE_OVERWRITE + Readline is in overwrite mode. + @item RL_STATE_COMPLETING + Readline is performing word completion. + @item RL_STATE_SIGHANDLER + Readline is currently executing the readline signal handler. + @item RL_STATE_UNDOING + Readline is performing an undo. + @item RL_STATE_DONE + Readline has read a key sequence bound to @code{accept-line} + and is about to return the line to the caller. + @end table + + @end deftypevar + + @deftypevar {int} rl_explicit_arg + Set to a non-zero value if an explicit numeric argument was specified by + the user. Only valid in a bindable command function. + @end deftypevar + + @deftypevar {int} rl_numeric_arg + Set to the value of any numeric argument explicitly specified by the user + before executing the current Readline function. Only valid in a bindable + command function. + @end deftypevar + + @deftypevar {int} rl_editing_mode + Set to a value denoting Readline's current editing mode. A value of + @var{1} means Readline is currently in emacs mode; @var{0} + means that vi mode is active. + @end deftypevar + + + @node Readline Convenience Functions + @section Readline Convenience Functions + + @menu + * Function Naming:: How to give a function you write a name. + * Keymaps:: Making keymaps. + * Binding Keys:: Changing Keymaps. + * Associating Function Names and Bindings:: Translate function names to + key sequences. + * Allowing Undoing:: How to make your functions undoable. + * Redisplay:: Functions to control line display. + * Modifying Text:: Functions to modify @code{rl_line_buffer}. + * Character Input:: Functions to read keyboard input. + * Terminal Management:: Functions to manage terminal settings. + * Utility Functions:: Generally useful functions and hooks. + * Miscellaneous Functions:: Functions that don't fall into any category. + * Alternate Interface:: Using Readline in a `callback' fashion. + * A Readline Example:: An example Readline function. + @end menu + + @node Function Naming + @subsection Naming a Function + + The user can dynamically change the bindings of keys while using + Readline. This is done by representing the function with a descriptive + name. The user is able to type the descriptive name when referring to + the function. Thus, in an init file, one might find + + @example + Meta-Rubout: backward-kill-word + @end example + + This binds the keystroke @key{Meta-Rubout} to the function + @emph{descriptively} named @code{backward-kill-word}. You, as the + programmer, should bind the functions you write to descriptive names as + well. Readline provides a function for doing that: + + @deftypefun int rl_add_defun (const char *name, rl_command_func_t *function, int key) + Add @var{name} to the list of named functions. Make @var{function} be + the function that gets called. If @var{key} is not -1, then bind it to + @var{function} using @code{rl_bind_key()}. + @end deftypefun + + Using this function alone is sufficient for most applications. + It is the recommended way to add a few functions to the default + functions that Readline has built in. + If you need to do something other than adding a function to Readline, + you may need to use the underlying functions described below. + + @node Keymaps + @subsection Selecting a Keymap + + Key bindings take place on a @dfn{keymap}. The keymap is the + association between the keys that the user types and the functions that + get run. You can make your own keymaps, copy existing keymaps, and tell + Readline which keymap to use. + + @deftypefun Keymap rl_make_bare_keymap (void) + Returns a new, empty keymap. The space for the keymap is allocated with + @code{malloc()}; the caller should free it by calling + @code{rl_discard_keymap()} when done. + @end deftypefun + + @deftypefun Keymap rl_copy_keymap (Keymap map) + Return a new keymap which is a copy of @var{map}. + @end deftypefun + + @deftypefun Keymap rl_make_keymap (void) + Return a new keymap with the printing characters bound to rl_insert, + the lowercase Meta characters bound to run their equivalents, and + the Meta digits bound to produce numeric arguments. + @end deftypefun + + @deftypefun void rl_discard_keymap (Keymap keymap) + Free the storage associated with @var{keymap}. + @end deftypefun + + Readline has several internal keymaps. These functions allow you to + change which keymap is active. + + @deftypefun Keymap rl_get_keymap (void) + Returns the currently active keymap. + @end deftypefun + + @deftypefun void rl_set_keymap (Keymap keymap) + Makes @var{keymap} the currently active keymap. + @end deftypefun + + @deftypefun Keymap rl_get_keymap_by_name (const char *name) + Return the keymap matching @var{name}. @var{name} is one which would + be supplied in a @code{set keymap} inputrc line (@pxref{Readline Init File}). + @end deftypefun + + @deftypefun {char *} rl_get_keymap_name (Keymap keymap) + Return the name matching @var{keymap}. @var{name} is one which would + be supplied in a @code{set keymap} inputrc line (@pxref{Readline Init File}). + @end deftypefun + + @node Binding Keys + @subsection Binding Keys + + Key sequences are associate with functions through the keymap. + Readline has several internal keymaps: @code{emacs_standard_keymap}, + @code{emacs_meta_keymap}, @code{emacs_ctlx_keymap}, + @code{vi_movement_keymap}, and @code{vi_insertion_keymap}. + @code{emacs_standard_keymap} is the default, and the examples in + this manual assume that. + + Since @code{readline()} installs a set of default key bindings the first + time it is called, there is always the danger that a custom binding + installed before the first call to @code{readline()} will be overridden. + An alternate mechanism is to install custom key bindings in an + initialization function assigned to the @code{rl_startup_hook} variable + (@pxref{Readline Variables}). + + These functions manage key bindings. + + @deftypefun int rl_bind_key (int key, rl_command_func_t *function) + Binds @var{key} to @var{function} in the currently active keymap. + Returns non-zero in the case of an invalid @var{key}. + @end deftypefun + + @deftypefun int rl_bind_key_in_map (int key, rl_command_func_t *function, Keymap map) + Bind @var{key} to @var{function} in @var{map}. + Returns non-zero in the case of an invalid @var{key}. + @end deftypefun + + @deftypefun int rl_bind_key_if_unbound (int key, rl_command_func_t *function) + Binds @var{key} to @var{function} if it is not already bound in the + currently active keymap. + Returns non-zero in the case of an invalid @var{key} or if @var{key} is + already bound. + @end deftypefun + + @deftypefun int rl_bind_key_if_unbound_in_map (int key, rl_command_func_t *function, Keymap map) + Binds @var{key} to @var{function} if it is not already bound in @var{map}. + Returns non-zero in the case of an invalid @var{key} or if @var{key} is + already bound. + @end deftypefun + + @deftypefun int rl_unbind_key (int key) + Bind @var{key} to the null function in the currently active keymap. + Returns non-zero in case of error. + @end deftypefun + + @deftypefun int rl_unbind_key_in_map (int key, Keymap map) + Bind @var{key} to the null function in @var{map}. + Returns non-zero in case of error. + @end deftypefun + + @deftypefun int rl_unbind_function_in_map (rl_command_func_t *function, Keymap map) + Unbind all keys that execute @var{function} in @var{map}. + @end deftypefun + + @deftypefun int rl_unbind_command_in_map (const char *command, Keymap map) + Unbind all keys that are bound to @var{command} in @var{map}. + @end deftypefun + + @deftypefun int rl_bind_keyseq (const char *keyseq, rl_command_func_t *function) + Bind the key sequence represented by the string @var{keyseq} to the function + @var{function}, beginning in the current keymap. + This makes new keymaps as necessary. + The return value is non-zero if @var{keyseq} is invalid. + @end deftypefun + + @deftypefun int rl_bind_keyseq_in_map (const char *keyseq, rl_command_func_t *function, Keymap map) + Bind the key sequence represented by the string @var{keyseq} to the function + @var{function}. This makes new keymaps as necessary. + Initial bindings are performed in @var{map}. + The return value is non-zero if @var{keyseq} is invalid. + @end deftypefun + + @deftypefun int rl_set_key (const char *keyseq, rl_command_func_t *function, Keymap map) + Equivalent to @code{rl_bind_keyseq_in_map}. + @end deftypefun + + @deftypefun int rl_bind_keyseq_if_unbound (const char *keyseq, rl_command_func_t *function) + Binds @var{keyseq} to @var{function} if it is not already bound in the + currently active keymap. + Returns non-zero in the case of an invalid @var{keyseq} or if @var{keyseq} is + already bound. + @end deftypefun + + @deftypefun int rl_bind_keyseq_if_unbound_in_map (const char *keyseq, rl_command_func_t *function, Keymap map) + Binds @var{keyseq} to @var{function} if it is not already bound in @var{map}. + Returns non-zero in the case of an invalid @var{keyseq} or if @var{keyseq} is + already bound. + @end deftypefun + + @deftypefun int rl_generic_bind (int type, const char *keyseq, char *data, Keymap map) + Bind the key sequence represented by the string @var{keyseq} to the arbitrary + pointer @var{data}. @var{type} says what kind of data is pointed to by + @var{data}; this can be a function (@code{ISFUNC}), a macro + (@code{ISMACR}), or a keymap (@code{ISKMAP}). This makes new keymaps as + necessary. The initial keymap in which to do bindings is @var{map}. + @end deftypefun + + @deftypefun int rl_parse_and_bind (char *line) + Parse @var{line} as if it had been read from the @code{inputrc} file and + perform any key bindings and variable assignments found + (@pxref{Readline Init File}). + @end deftypefun + + @deftypefun int rl_read_init_file (const char *filename) + Read keybindings and variable assignments from @var{filename} + (@pxref{Readline Init File}). + @end deftypefun + + @node Associating Function Names and Bindings + @subsection Associating Function Names and Bindings + + These functions allow you to find out what keys invoke named functions + and the functions invoked by a particular key sequence. You may also + associate a new function name with an arbitrary function. + + @deftypefun {rl_command_func_t *} rl_named_function (const char *name) + Return the function with name @var{name}. + @end deftypefun + + @deftypefun {rl_command_func_t *} rl_function_of_keyseq (const char *keyseq, Keymap map, int *type) + Return the function invoked by @var{keyseq} in keymap @var{map}. + If @var{map} is @code{NULL}, the current keymap is used. If @var{type} is + not @code{NULL}, the type of the object is returned in the @code{int} variable + it points to (one of @code{ISFUNC}, @code{ISKMAP}, or @code{ISMACR}). + @end deftypefun + + @deftypefun {char **} rl_invoking_keyseqs (rl_command_func_t *function) + Return an array of strings representing the key sequences used to + invoke @var{function} in the current keymap. + @end deftypefun + + @deftypefun {char **} rl_invoking_keyseqs_in_map (rl_command_func_t *function, Keymap map) + Return an array of strings representing the key sequences used to + invoke @var{function} in the keymap @var{map}. + @end deftypefun + + @deftypefun void rl_function_dumper (int readable) + Print the readline function names and the key sequences currently + bound to them to @code{rl_outstream}. If @var{readable} is non-zero, + the list is formatted in such a way that it can be made part of an + @code{inputrc} file and re-read. + @end deftypefun + + @deftypefun void rl_list_funmap_names (void) + Print the names of all bindable Readline functions to @code{rl_outstream}. + @end deftypefun + + @deftypefun {const char **} rl_funmap_names (void) + Return a NULL terminated array of known function names. The array is + sorted. The array itself is allocated, but not the strings inside. You + should @code{free()} the array when you are done, but not the pointers. + @end deftypefun + + @deftypefun int rl_add_funmap_entry (const char *name, rl_command_func_t *function) + Add @var{name} to the list of bindable Readline command names, and make + @var{function} the function to be called when @var{name} is invoked. + @end deftypefun + + @node Allowing Undoing + @subsection Allowing Undoing + + Supporting the undo command is a painless thing, and makes your + functions much more useful. It is certainly easy to try + something if you know you can undo it. + + If your function simply inserts text once, or deletes text once, and + uses @code{rl_insert_text()} or @code{rl_delete_text()} to do it, then + undoing is already done for you automatically. + + If you do multiple insertions or multiple deletions, or any combination + of these operations, you should group them together into one operation. + This is done with @code{rl_begin_undo_group()} and + @code{rl_end_undo_group()}. + + The types of events that can be undone are: + + @smallexample + enum undo_code @{ UNDO_DELETE, UNDO_INSERT, UNDO_BEGIN, UNDO_END @}; + @end smallexample + + Notice that @code{UNDO_DELETE} means to insert some text, and + @code{UNDO_INSERT} means to delete some text. That is, the undo code + tells what to undo, not how to undo it. @code{UNDO_BEGIN} and + @code{UNDO_END} are tags added by @code{rl_begin_undo_group()} and + @code{rl_end_undo_group()}. + + @deftypefun int rl_begin_undo_group (void) + Begins saving undo information in a group construct. The undo + information usually comes from calls to @code{rl_insert_text()} and + @code{rl_delete_text()}, but could be the result of calls to + @code{rl_add_undo()}. + @end deftypefun + + @deftypefun int rl_end_undo_group (void) + Closes the current undo group started with @code{rl_begin_undo_group + ()}. There should be one call to @code{rl_end_undo_group()} + for each call to @code{rl_begin_undo_group()}. + @end deftypefun + + @deftypefun void rl_add_undo (enum undo_code what, int start, int end, char *text) + Remember how to undo an event (according to @var{what}). The affected + text runs from @var{start} to @var{end}, and encompasses @var{text}. + @end deftypefun + + @deftypefun void rl_free_undo_list (void) + Free the existing undo list. + @end deftypefun + + @deftypefun int rl_do_undo (void) + Undo the first thing on the undo list. Returns @code{0} if there was + nothing to undo, non-zero if something was undone. + @end deftypefun + + Finally, if you neither insert nor delete text, but directly modify the + existing text (e.g., change its case), call @code{rl_modifying()} + once, just before you modify the text. You must supply the indices of + the text range that you are going to modify. + + @deftypefun int rl_modifying (int start, int end) + Tell Readline to save the text between @var{start} and @var{end} as a + single undo unit. It is assumed that you will subsequently modify + that text. + @end deftypefun + + @node Redisplay + @subsection Redisplay + + @deftypefun void rl_redisplay (void) + Change what's displayed on the screen to reflect the current contents + of @code{rl_line_buffer}. + @end deftypefun + + @deftypefun int rl_forced_update_display (void) + Force the line to be updated and redisplayed, whether or not + Readline thinks the screen display is correct. + @end deftypefun + + @deftypefun int rl_on_new_line (void) + Tell the update functions that we have moved onto a new (empty) line, + usually after ouputting a newline. + @end deftypefun + + @deftypefun int rl_on_new_line_with_prompt (void) + Tell the update functions that we have moved onto a new line, with + @var{rl_prompt} already displayed. + This could be used by applications that want to output the prompt string + themselves, but still need Readline to know the prompt string length for + redisplay. + It should be used after setting @var{rl_already_prompted}. + @end deftypefun + + @deftypefun int rl_reset_line_state (void) + Reset the display state to a clean state and redisplay the current line + starting on a new line. + @end deftypefun + + @deftypefun int rl_crlf (void) + Move the cursor to the start of the next screen line. + @end deftypefun + + @deftypefun int rl_show_char (int c) + Display character @var{c} on @code{rl_outstream}. + If Readline has not been set to display meta characters directly, this + will convert meta characters to a meta-prefixed key sequence. + This is intended for use by applications which wish to do their own + redisplay. + @end deftypefun + + @deftypefun int rl_message (const char *, @dots{}) + The arguments are a format string as would be supplied to @code{printf}, + possibly containing conversion specifications such as @samp{%d}, and + any additional arguments necessary to satisfy the conversion specifications. + The resulting string is displayed in the @dfn{echo area}. The echo area + is also used to display numeric arguments and search strings. + @end deftypefun + + @deftypefun int rl_clear_message (void) + Clear the message in the echo area. + @end deftypefun + + @deftypefun void rl_save_prompt (void) + Save the local Readline prompt display state in preparation for + displaying a new message in the message area with @code{rl_message()}. + @end deftypefun + + @deftypefun void rl_restore_prompt (void) + Restore the local Readline prompt display state saved by the most + recent call to @code{rl_save_prompt}. + @end deftypefun + + @deftypefun int rl_expand_prompt (char *prompt) + Expand any special character sequences in @var{prompt} and set up the + local Readline prompt redisplay variables. + This function is called by @code{readline()}. It may also be called to + expand the primary prompt if the @code{rl_on_new_line_with_prompt()} + function or @code{rl_already_prompted} variable is used. + It returns the number of visible characters on the last line of the + (possibly multi-line) prompt. + Applications may indicate that the prompt contains characters that take + up no physical screen space when displayed by bracketing a sequence of + such characters with the special markers @code{RL_PROMPT_START_IGNORE} + and @code{RL_PROMPT_END_IGNORE} (declared in @file{readline.h}. This may + be used to embed terminal-specific escape sequences in prompts. + @end deftypefun + + @deftypefun int rl_set_prompt (const char *prompt) + Make Readline use @var{prompt} for subsequent redisplay. This calls + @code{rl_expand_prompt()} to expand the prompt and sets @code{rl_prompt} + to the result. + @end deftypefun + + @node Modifying Text + @subsection Modifying Text + + @deftypefun int rl_insert_text (const char *text) + Insert @var{text} into the line at the current cursor position. + Returns the number of characters inserted. + @end deftypefun + + @deftypefun int rl_delete_text (int start, int end) + Delete the text between @var{start} and @var{end} in the current line. + Returns the number of characters deleted. + @end deftypefun + + @deftypefun {char *} rl_copy_text (int start, int end) + Return a copy of the text between @var{start} and @var{end} in + the current line. + @end deftypefun + + @deftypefun int rl_kill_text (int start, int end) + Copy the text between @var{start} and @var{end} in the current line + to the kill ring, appending or prepending to the last kill if the + last command was a kill command. The text is deleted. + If @var{start} is less than @var{end}, + the text is appended, otherwise prepended. If the last command was + not a kill, a new kill ring slot is used. + @end deftypefun + + @deftypefun int rl_push_macro_input (char *macro) + Cause @var{macro} to be inserted into the line, as if it had been invoked + by a key bound to a macro. Not especially useful; use + @code{rl_insert_text()} instead. + @end deftypefun + + @node Character Input + @subsection Character Input + + @deftypefun int rl_read_key (void) + Return the next character available from Readline's current input stream. + This handles input inserted into + the input stream via @var{rl_pending_input} (@pxref{Readline Variables}) + and @code{rl_stuff_char()}, macros, and characters read from the keyboard. + While waiting for input, this function will call any function assigned to + the @code{rl_event_hook} variable. + @end deftypefun + + @deftypefun int rl_getc (FILE *stream) + Return the next character available from @var{stream}, which is assumed to + be the keyboard. + @end deftypefun + + @deftypefun int rl_stuff_char (int c) + Insert @var{c} into the Readline input stream. It will be "read" + before Readline attempts to read characters from the terminal with + @code{rl_read_key()}. Up to 512 characters may be pushed back. + @code{rl_stuff_char} returns 1 if the character was successfully inserted; + 0 otherwise. + @end deftypefun + + @deftypefun int rl_execute_next (int c) + Make @var{c} be the next command to be executed when @code{rl_read_key()} + is called. This sets @var{rl_pending_input}. + @end deftypefun + + @deftypefun int rl_clear_pending_input (void) + Unset @var{rl_pending_input}, effectively negating the effect of any + previous call to @code{rl_execute_next()}. This works only if the + pending input has not already been read with @code{rl_read_key()}. + @end deftypefun + + @deftypefun int rl_set_keyboard_input_timeout (int u) + While waiting for keyboard input in @code{rl_read_key()}, Readline will + wait for @var{u} microseconds for input before calling any function + assigned to @code{rl_event_hook}. The default waiting period is + one-tenth of a second. Returns the old timeout value. + @end deftypefun + + @node Terminal Management + @subsection Terminal Management + + @deftypefun void rl_prep_terminal (int meta_flag) + Modify the terminal settings for Readline's use, so @code{readline()} + can read a single character at a time from the keyboard. + The @var{meta_flag} argument should be non-zero if Readline should + read eight-bit input. + @end deftypefun + + @deftypefun void rl_deprep_terminal (void) + Undo the effects of @code{rl_prep_terminal()}, leaving the terminal in + the state in which it was before the most recent call to + @code{rl_prep_terminal()}. + @end deftypefun + + @deftypefun void rl_tty_set_default_bindings (Keymap kmap) + Read the operating system's terminal editing characters (as would be + displayed by @code{stty}) to their Readline equivalents. + The bindings are performed in @var{kmap}. + @end deftypefun + + @deftypefun void rl_tty_unset_default_bindings (Keymap kmap) + Reset the bindings manipulated by @code{rl_tty_set_default_bindings} so + that the terminal editing characters are bound to @code{rl_insert}. + The bindings are performed in @var{kmap}. + @end deftypefun + + @deftypefun int rl_reset_terminal (const char *terminal_name) + Reinitialize Readline's idea of the terminal settings using + @var{terminal_name} as the terminal type (e.g., @code{vt100}). + If @var{terminal_name} is @code{NULL}, the value of the @code{TERM} + environment variable is used. + @end deftypefun + + @node Utility Functions + @subsection Utility Functions + + @deftypefun void rl_replace_line (const char *text, int clear_undo) + Replace the contents of @code{rl_line_buffer} with @var{text}. + The point and mark are preserved, if possible. + If @var{clear_undo} is non-zero, the undo list associated with the + current line is cleared. + @end deftypefun + + @deftypefun int rl_extend_line_buffer (int len) + Ensure that @code{rl_line_buffer} has enough space to hold @var{len} + characters, possibly reallocating it if necessary. + @end deftypefun + + @deftypefun int rl_initialize (void) + Initialize or re-initialize Readline's internal state. + It's not strictly necessary to call this; @code{readline()} calls it before + reading any input. + @end deftypefun + + @deftypefun int rl_ding (void) + Ring the terminal bell, obeying the setting of @code{bell-style}. + @end deftypefun + + @deftypefun int rl_alphabetic (int c) + Return 1 if @var{c} is an alphabetic character. + @end deftypefun + + @deftypefun void rl_display_match_list (char **matches, int len, int max) + A convenience function for displaying a list of strings in + columnar format on Readline's output stream. @code{matches} is the list + of strings, in argv format, such as a list of completion matches. + @code{len} is the number of strings in @code{matches}, and @code{max} + is the length of the longest string in @code{matches}. This function uses + the setting of @code{print-completions-horizontally} to select how the + matches are displayed (@pxref{Readline Init File Syntax}). + @end deftypefun + + The following are implemented as macros, defined in @code{chardefs.h}. + Applications should refrain from using them. + + @deftypefun int _rl_uppercase_p (int c) + Return 1 if @var{c} is an uppercase alphabetic character. + @end deftypefun + + @deftypefun int _rl_lowercase_p (int c) + Return 1 if @var{c} is a lowercase alphabetic character. + @end deftypefun + + @deftypefun int _rl_digit_p (int c) + Return 1 if @var{c} is a numeric character. + @end deftypefun + + @deftypefun int _rl_to_upper (int c) + If @var{c} is a lowercase alphabetic character, return the corresponding + uppercase character. + @end deftypefun + + @deftypefun int _rl_to_lower (int c) + If @var{c} is an uppercase alphabetic character, return the corresponding + lowercase character. + @end deftypefun + + @deftypefun int _rl_digit_value (int c) + If @var{c} is a number, return the value it represents. + @end deftypefun + + @node Miscellaneous Functions + @subsection Miscellaneous Functions + + @deftypefun int rl_macro_bind (const char *keyseq, const char *macro, Keymap map) + Bind the key sequence @var{keyseq} to invoke the macro @var{macro}. + The binding is performed in @var{map}. When @var{keyseq} is invoked, the + @var{macro} will be inserted into the line. This function is deprecated; + use @code{rl_generic_bind()} instead. + @end deftypefun + + @deftypefun void rl_macro_dumper (int readable) + Print the key sequences bound to macros and their values, using + the current keymap, to @code{rl_outstream}. + If @var{readable} is non-zero, the list is formatted in such a way + that it can be made part of an @code{inputrc} file and re-read. + @end deftypefun + + @deftypefun int rl_variable_bind (const char *variable, const char *value) + Make the Readline variable @var{variable} have @var{value}. + This behaves as if the readline command + @samp{set @var{variable} @var{value}} had been executed in an @code{inputrc} + file (@pxref{Readline Init File Syntax}). + @end deftypefun + + @deftypefun void rl_variable_dumper (int readable) + Print the readline variable names and their current values + to @code{rl_outstream}. + If @var{readable} is non-zero, the list is formatted in such a way + that it can be made part of an @code{inputrc} file and re-read. + @end deftypefun + + @deftypefun int rl_set_paren_blink_timeout (int u) + Set the time interval (in microseconds) that Readline waits when showing + a balancing character when @code{blink-matching-paren} has been enabled. + @end deftypefun + + @deftypefun {char *} rl_get_termcap (const char *cap) + Retrieve the string value of the termcap capability @var{cap}. + Readline fetches the termcap entry for the current terminal name and + uses those capabilities to move around the screen line and perform other + terminal-specific operations, like erasing a line. Readline does not + use all of a terminal's capabilities, and this function will return + values for only those capabilities Readline uses. + @end deftypefun + + @node Alternate Interface + @subsection Alternate Interface + + An alternate interface is available to plain @code{readline()}. Some + applications need to interleave keyboard I/O with file, device, or + window system I/O, typically by using a main loop to @code{select()} + on various file descriptors. To accomodate this need, readline can + also be invoked as a `callback' function from an event loop. There + are functions available to make this easy. + + @deftypefun void rl_callback_handler_install (const char *prompt, rl_vcpfunc_t *lhandler) + Set up the terminal for readline I/O and display the initial + expanded value of @var{prompt}. Save the value of @var{lhandler} to + use as a function to call when a complete line of input has been entered. + The function takes the text of the line as an argument. + @end deftypefun + + @deftypefun void rl_callback_read_char (void) + Whenever an application determines that keyboard input is available, it + should call @code{rl_callback_read_char()}, which will read the next + character from the current input source. + If that character completes the line, @code{rl_callback_read_char} will + invoke the @var{lhandler} function saved by @code{rl_callback_handler_install} + to process the line. + Before calling the @var{lhandler} function, the terminal settings are + reset to the values they had before calling + @code{rl_callback_handler_install}. + If the @var{lhandler} function returns, + the terminal settings are modified for Readline's use again. + @code{EOF} is indicated by calling @var{lhandler} with a + @code{NULL} line. + @end deftypefun + + @deftypefun void rl_callback_handler_remove (void) + Restore the terminal to its initial state and remove the line handler. + This may be called from within a callback as well as independently. + If the @var{lhandler} installed by @code{rl_callback_handler_install} + does not exit the program, either this function or the function referred + to by the value of @code{rl_deprep_term_function} should be called before + the program exits to reset the terminal settings. + @end deftypefun + + @node A Readline Example + @subsection A Readline Example + + Here is a function which changes lowercase characters to their uppercase + equivalents, and uppercase characters to lowercase. If + this function was bound to @samp{M-c}, then typing @samp{M-c} would + change the case of the character under point. Typing @samp{M-1 0 M-c} + would change the case of the following 10 characters, leaving the cursor on + the last character changed. + + @example + /* Invert the case of the COUNT following characters. */ + int + invert_case_line (count, key) + int count, key; + @{ + register int start, end, i; + + start = rl_point; + + if (rl_point >= rl_end) + return (0); + + if (count < 0) + @{ + direction = -1; + count = -count; + @} + else + direction = 1; + + /* Find the end of the range to modify. */ + end = start + (count * direction); + + /* Force it to be within range. */ + if (end > rl_end) + end = rl_end; + else if (end < 0) + end = 0; + + if (start == end) + return (0); + + if (start > end) + @{ + int temp = start; + start = end; + end = temp; + @} + + /* Tell readline that we are modifying the line, + so it will save the undo information. */ + rl_modifying (start, end); + + for (i = start; i != end; i++) + @{ + if (_rl_uppercase_p (rl_line_buffer[i])) + rl_line_buffer[i] = _rl_to_lower (rl_line_buffer[i]); + else if (_rl_lowercase_p (rl_line_buffer[i])) + rl_line_buffer[i] = _rl_to_upper (rl_line_buffer[i]); + @} + /* Move point to on top of the last character changed. */ + rl_point = (direction == 1) ? end - 1 : start; + return (0); + @} + @end example + + @node Readline Signal Handling + @section Readline Signal Handling + + Signals are asynchronous events sent to a process by the Unix kernel, + sometimes on behalf of another process. They are intended to indicate + exceptional events, like a user pressing the interrupt key on his terminal, + or a network connection being broken. There is a class of signals that can + be sent to the process currently reading input from the keyboard. Since + Readline changes the terminal attributes when it is called, it needs to + perform special processing when such a signal is received in order to + restore the terminal to a sane state, or provide application writers with + functions to do so manually. + + Readline contains an internal signal handler that is installed for a + number of signals (@code{SIGINT}, @code{SIGQUIT}, @code{SIGTERM}, + @code{SIGALRM}, @code{SIGTSTP}, @code{SIGTTIN}, and @code{SIGTTOU}). + When one of these signals is received, the signal handler + will reset the terminal attributes to those that were in effect before + @code{readline()} was called, reset the signal handling to what it was + before @code{readline()} was called, and resend the signal to the calling + application. + If and when the calling application's signal handler returns, Readline + will reinitialize the terminal and continue to accept input. + When a @code{SIGINT} is received, the Readline signal handler performs + some additional work, which will cause any partially-entered line to be + aborted (see the description of @code{rl_free_line_state()} below). + + There is an additional Readline signal handler, for @code{SIGWINCH}, which + the kernel sends to a process whenever the terminal's size changes (for + example, if a user resizes an @code{xterm}). The Readline @code{SIGWINCH} + handler updates Readline's internal screen size information, and then calls + any @code{SIGWINCH} signal handler the calling application has installed. + Readline calls the application's @code{SIGWINCH} signal handler without + resetting the terminal to its original state. If the application's signal + handler does more than update its idea of the terminal size and return (for + example, a @code{longjmp} back to a main processing loop), it @emph{must} + call @code{rl_cleanup_after_signal()} (described below), to restore the + terminal state. + + Readline provides two variables that allow application writers to + control whether or not it will catch certain signals and act on them + when they are received. It is important that applications change the + values of these variables only when calling @code{readline()}, not in + a signal handler, so Readline's internal signal state is not corrupted. + + @deftypevar int rl_catch_signals + If this variable is non-zero, Readline will install signal handlers for + @code{SIGINT}, @code{SIGQUIT}, @code{SIGTERM}, @code{SIGALRM}, + @code{SIGTSTP}, @code{SIGTTIN}, and @code{SIGTTOU}. + + The default value of @code{rl_catch_signals} is 1. + @end deftypevar + + @deftypevar int rl_catch_sigwinch + If this variable is non-zero, Readline will install a signal handler for + @code{SIGWINCH}. + + The default value of @code{rl_catch_sigwinch} is 1. + @end deftypevar + + If an application does not wish to have Readline catch any signals, or + to handle signals other than those Readline catches (@code{SIGHUP}, + for example), + Readline provides convenience functions to do the necessary terminal + and internal state cleanup upon receipt of a signal. + + @deftypefun void rl_cleanup_after_signal (void) + This function will reset the state of the terminal to what it was before + @code{readline()} was called, and remove the Readline signal handlers for + all signals, depending on the values of @code{rl_catch_signals} and + @code{rl_catch_sigwinch}. + @end deftypefun + + @deftypefun void rl_free_line_state (void) + This will free any partial state associated with the current input line + (undo information, any partial history entry, any partially-entered + keyboard macro, and any partially-entered numeric argument). This + should be called before @code{rl_cleanup_after_signal()}. The + Readline signal handler for @code{SIGINT} calls this to abort the + current input line. + @end deftypefun + + @deftypefun void rl_reset_after_signal (void) + This will reinitialize the terminal and reinstall any Readline signal + handlers, depending on the values of @code{rl_catch_signals} and + @code{rl_catch_sigwinch}. + @end deftypefun + + If an application does not wish Readline to catch @code{SIGWINCH}, it may + call @code{rl_resize_terminal()} or @code{rl_set_screen_size()} to force + Readline to update its idea of the terminal size when a @code{SIGWINCH} + is received. + + @deftypefun void rl_resize_terminal (void) + Update Readline's internal screen size by reading values from the kernel. + @end deftypefun + + @deftypefun void rl_set_screen_size (int rows, int cols) + Set Readline's idea of the terminal size to @var{rows} rows and + @var{cols} columns. + @end deftypefun + + If an application does not want to install a @code{SIGWINCH} handler, but + is still interested in the screen dimensions, Readline's idea of the screen + size may be queried. + + @deftypefun void rl_get_screen_size (int *rows, int *cols) + Return Readline's idea of the terminal's size in the + variables pointed to by the arguments. + @end deftypefun + + The following functions install and remove Readline's signal handlers. + + @deftypefun int rl_set_signals (void) + Install Readline's signal handler for @code{SIGINT}, @code{SIGQUIT}, + @code{SIGTERM}, @code{SIGALRM}, @code{SIGTSTP}, @code{SIGTTIN}, + @code{SIGTTOU}, and @code{SIGWINCH}, depending on the values of + @code{rl_catch_signals} and @code{rl_catch_sigwinch}. + @end deftypefun + + @deftypefun int rl_clear_signals (void) + Remove all of the Readline signal handlers installed by + @code{rl_set_signals()}. + @end deftypefun + + @node Custom Completers + @section Custom Completers + @cindex application-specific completion functions + + Typically, a program that reads commands from the user has a way of + disambiguating commands and data. If your program is one of these, then + it can provide completion for commands, data, or both. + The following sections describe how your program and Readline + cooperate to provide this service. + + @menu + * How Completing Works:: The logic used to do completion. + * Completion Functions:: Functions provided by Readline. + * Completion Variables:: Variables which control completion. + * A Short Completion Example:: An example of writing completer subroutines. + @end menu + + @node How Completing Works + @subsection How Completing Works + + In order to complete some text, the full list of possible completions + must be available. That is, it is not possible to accurately + expand a partial word without knowing all of the possible words + which make sense in that context. The Readline library provides + the user interface to completion, and two of the most common + completion functions: filename and username. For completing other types + of text, you must write your own completion function. This section + describes exactly what such functions must do, and provides an example. + + There are three major functions used to perform completion: + + @enumerate + @item + The user-interface function @code{rl_complete()}. This function is + called with the same arguments as other bindable Readline functions: + @var{count} and @var{invoking_key}. + It isolates the word to be completed and calls + @code{rl_completion_matches()} to generate a list of possible completions. + It then either lists the possible completions, inserts the possible + completions, or actually performs the + completion, depending on which behavior is desired. + + @item + The internal function @code{rl_completion_matches()} uses an + application-supplied @dfn{generator} function to generate the list of + possible matches, and then returns the array of these matches. + The caller should place the address of its generator function in + @code{rl_completion_entry_function}. + + @item + The generator function is called repeatedly from + @code{rl_completion_matches()}, returning a string each time. The + arguments to the generator function are @var{text} and @var{state}. + @var{text} is the partial word to be completed. @var{state} is zero the + first time the function is called, allowing the generator to perform + any necessary initialization, and a positive non-zero integer for + each subsequent call. The generator function returns + @code{(char *)NULL} to inform @code{rl_completion_matches()} that there are + no more possibilities left. Usually the generator function computes the + list of possible completions when @var{state} is zero, and returns them + one at a time on subsequent calls. Each string the generator function + returns as a match must be allocated with @code{malloc()}; Readline + frees the strings when it has finished with them. + Such a generator function is referred to as an + @dfn{application-specific completion function}. + + @end enumerate + + @deftypefun int rl_complete (int ignore, int invoking_key) + Complete the word at or before point. You have supplied the function + that does the initial simple matching selection algorithm (see + @code{rl_completion_matches()}). The default is to do filename completion. + @end deftypefun + + @deftypevar {rl_compentry_func_t *} rl_completion_entry_function + This is a pointer to the generator function for + @code{rl_completion_matches()}. + If the value of @code{rl_completion_entry_function} is + @code{NULL} then the default filename generator + function, @code{rl_filename_completion_function()}, is used. + An @dfn{application-specific completion function} is a function whose + address is assigned to @code{rl_completion_entry_function} and whose + return values are used to generate possible completions. + @end deftypevar + + @node Completion Functions + @subsection Completion Functions + + Here is the complete list of callable completion functions present in + Readline. + + @deftypefun int rl_complete_internal (int what_to_do) + Complete the word at or before point. @var{what_to_do} says what to do + with the completion. A value of @samp{?} means list the possible + completions. @samp{TAB} means do standard completion. @samp{*} means + insert all of the possible completions. @samp{!} means to display + all of the possible completions, if there is more than one, as well as + performing partial completion. @samp{@@} is similar to @samp{!}, but + possible completions are not listed if the possible completions share + a common prefix. + @end deftypefun + + @deftypefun int rl_complete (int ignore, int invoking_key) + Complete the word at or before point. You have supplied the function + that does the initial simple matching selection algorithm (see + @code{rl_completion_matches()} and @code{rl_completion_entry_function}). + The default is to do filename + completion. This calls @code{rl_complete_internal()} with an + argument depending on @var{invoking_key}. + @end deftypefun + + @deftypefun int rl_possible_completions (int count, int invoking_key) + List the possible completions. See description of @code{rl_complete + ()}. This calls @code{rl_complete_internal()} with an argument of + @samp{?}. + @end deftypefun + + @deftypefun int rl_insert_completions (int count, int invoking_key) + Insert the list of possible completions into the line, deleting the + partially-completed word. See description of @code{rl_complete()}. + This calls @code{rl_complete_internal()} with an argument of @samp{*}. + @end deftypefun + + @deftypefun int rl_completion_mode (rl_command_func_t *cfunc) + Returns the apppriate value to pass to @code{rl_complete_internal()} + depending on whether @var{cfunc} was called twice in succession and + the values of the @code{show-all-if-ambiguous} and + @code{show-all-if-unmodified} variables. + Application-specific completion functions may use this function to present + the same interface as @code{rl_complete()}. + @end deftypefun + + @deftypefun {char **} rl_completion_matches (const char *text, rl_compentry_func_t *entry_func) + Returns an array of strings which is a list of completions for + @var{text}. If there are no completions, returns @code{NULL}. + The first entry in the returned array is the substitution for @var{text}. + The remaining entries are the possible completions. The array is + terminated with a @code{NULL} pointer. + + @var{entry_func} is a function of two args, and returns a + @code{char *}. The first argument is @var{text}. The second is a + state argument; it is zero on the first call, and non-zero on subsequent + calls. @var{entry_func} returns a @code{NULL} pointer to the caller + when there are no more matches. + @end deftypefun + + @deftypefun {char *} rl_filename_completion_function (const char *text, int state) + A generator function for filename completion in the general case. + @var{text} is a partial filename. + The Bash source is a useful reference for writing application-specific + completion functions (the Bash completion functions call this and other + Readline functions). + @end deftypefun + + @deftypefun {char *} rl_username_completion_function (const char *text, int state) + A completion generator for usernames. @var{text} contains a partial + username preceded by a random character (usually @samp{~}). As with all + completion generators, @var{state} is zero on the first call and non-zero + for subsequent calls. + @end deftypefun + + @node Completion Variables + @subsection Completion Variables + + @deftypevar {rl_compentry_func_t *} rl_completion_entry_function + A pointer to the generator function for @code{rl_completion_matches()}. + @code{NULL} means to use @code{rl_filename_completion_function()}, + the default filename completer. + @end deftypevar + + @deftypevar {rl_completion_func_t *} rl_attempted_completion_function + A pointer to an alternative function to create matches. + The function is called with @var{text}, @var{start}, and @var{end}. + @var{start} and @var{end} are indices in @code{rl_line_buffer} defining + the boundaries of @var{text}, which is a character string. + If this function exists and returns @code{NULL}, or if this variable is + set to @code{NULL}, then @code{rl_complete()} will call the value of + @code{rl_completion_entry_function} to generate matches, otherwise the + array of strings returned will be used. + If this function sets the @code{rl_attempted_completion_over} + variable to a non-zero value, Readline will not perform its default + completion even if this function returns no matches. + @end deftypevar + + @deftypevar {rl_quote_func_t *} rl_filename_quoting_function + A pointer to a function that will quote a filename in an + application-specific fashion. This is called if filename completion is being + attempted and one of the characters in @code{rl_filename_quote_characters} + appears in a completed filename. The function is called with + @var{text}, @var{match_type}, and @var{quote_pointer}. The @var{text} + is the filename to be quoted. The @var{match_type} is either + @code{SINGLE_MATCH}, if there is only one completion match, or + @code{MULT_MATCH}. Some functions use this to decide whether or not to + insert a closing quote character. The @var{quote_pointer} is a pointer + to any opening quote character the user typed. Some functions choose + to reset this character. + @end deftypevar + + @deftypevar {rl_dequote_func_t *} rl_filename_dequoting_function + A pointer to a function that will remove application-specific quoting + characters from a filename before completion is attempted, so those + characters do not interfere with matching the text against names in + the filesystem. It is called with @var{text}, the text of the word + to be dequoted, and @var{quote_char}, which is the quoting character + that delimits the filename (usually @samp{'} or @samp{"}). If + @var{quote_char} is zero, the filename was not in an embedded string. + @end deftypevar + + @deftypevar {rl_linebuf_func_t *} rl_char_is_quoted_p + A pointer to a function to call that determines whether or not a specific + character in the line buffer is quoted, according to whatever quoting + mechanism the program calling Readline uses. The function is called with + two arguments: @var{text}, the text of the line, and @var{index}, the + index of the character in the line. It is used to decide whether a + character found in @code{rl_completer_word_break_characters} should be + used to break words for the completer. + @end deftypevar + + @deftypevar {rl_compignore_func_t *} rl_ignore_some_completions_function + This function, if defined, is called by the completer when real filename + completion is done, after all the matching names have been generated. + It is passed a @code{NULL} terminated array of matches. + The first element (@code{matches[0]}) is the + maximal substring common to all matches. This function can + re-arrange the list of matches as required, but each element deleted + from the array must be freed. + @end deftypevar + + @deftypevar {rl_icppfunc_t *} rl_directory_completion_hook + This function, if defined, is allowed to modify the directory portion + of filenames Readline completes. It is called with the address of a + string (the current directory name) as an argument, and may modify that string. + If the string is replaced with a new string, the old value should be freed. + Any modified directory name should have a trailing slash. + The modified value will be displayed as part of the completion, replacing + the directory portion of the pathname the user typed. + It returns an integer that should be non-zero if the function modifies + its directory argument. + It could be used to expand symbolic links or shell variables in pathnames. + @end deftypevar + + @deftypevar {rl_compdisp_func_t *} rl_completion_display_matches_hook + If non-zero, then this is the address of a function to call when + completing a word would normally display the list of possible matches. + This function is called in lieu of Readline displaying the list. + It takes three arguments: + (@code{char **}@var{matches}, @code{int} @var{num_matches}, @code{int} @var{max_length}) + where @var{matches} is the array of matching strings, + @var{num_matches} is the number of strings in that array, and + @var{max_length} is the length of the longest string in that array. + Readline provides a convenience function, @code{rl_display_match_list}, + that takes care of doing the display to Readline's output stream. That + function may be called from this hook. + @end deftypevar + + @deftypevar {const char *} rl_basic_word_break_characters + The basic list of characters that signal a break between words for the + completer routine. The default value of this variable is the characters + which break words for completion in Bash: + @code{" \t\n\"\\'`@@$><=;|&@{("}. + @end deftypevar + + @deftypevar {const char *} rl_basic_quote_characters + A list of quote characters which can cause a word break. + @end deftypevar + + @deftypevar {const char *} rl_completer_word_break_characters + The list of characters that signal a break between words for + @code{rl_complete_internal()}. The default list is the value of + @code{rl_basic_word_break_characters}. + @end deftypevar + + @deftypevar {rl_cpvfunc_t *} rl_completion_word_break_hook + If non-zero, this is the address of a function to call when Readline is + deciding where to separate words for word completion. It should return + a character string like @code{rl_completer_word_break_characters} to be + used to perform the current completion. The function may choose to set + @code{rl_completer_word_break_characters} itself. If the function + returns @code{NULL}, @code{rl_completer_word_break_characters} is used. + @end deftypevar + + @deftypevar {const char *} rl_completer_quote_characters + A list of characters which can be used to quote a substring of the line. + Completion occurs on the entire substring, and within the substring + @code{rl_completer_word_break_characters} are treated as any other character, + unless they also appear within this list. + @end deftypevar + + @deftypevar {const char *} rl_filename_quote_characters + A list of characters that cause a filename to be quoted by the completer + when they appear in a completed filename. The default is the null string. + @end deftypevar + + @deftypevar {const char *} rl_special_prefixes + The list of characters that are word break characters, but should be + left in @var{text} when it is passed to the completion function. + Programs can use this to help determine what kind of completing to do. + For instance, Bash sets this variable to "$@@" so that it can complete + shell variables and hostnames. + @end deftypevar + + @deftypevar int rl_completion_query_items + Up to this many items will be displayed in response to a + possible-completions call. After that, we ask the user if she is sure + she wants to see them all. The default value is 100. + @end deftypevar + + @deftypevar {int} rl_completion_append_character + When a single completion alternative matches at the end of the command + line, this character is appended to the inserted completion text. The + default is a space character (@samp{ }). Setting this to the null + character (@samp{\0}) prevents anything being appended automatically. + This can be changed in application-specific completion functions to + provide the ``most sensible word separator character'' according to + an application-specific command line syntax specification. + @end deftypevar + + @deftypevar int rl_completion_suppress_append + If non-zero, @var{rl_completion_append_character} is not appended to + matches at the end of the command line, as described above. + It is set to 0 before any application-specific completion function + is called, and may only be changed within such a function. + @end deftypevar + + @deftypevar int rl_completion_quote_character + When Readline is completing quoted text, as delimited by one of the + characters in @var{rl_completer_quote_characters}, it sets this variable + to the quoting character found. + This is set before any application-specific completion function is called. + @end deftypevar + + @deftypevar int rl_completion_suppress_quote + If non-zero, Readline does not append a matching quote character when + performing completion on a quoted string. + It is set to 0 before any application-specific completion function + is called, and may only be changed within such a function. + @end deftypevar + + @deftypevar int rl_completion_found_quote + When Readline is completing quoted text, it sets this variable + to a non-zero value if the word being completed contains or is delimited + by any quoting characters, including backslashes. + This is set before any application-specific completion function is called. + @end deftypevar + + @deftypevar int rl_completion_mark_symlink_dirs + If non-zero, a slash will be appended to completed filenames that are + symbolic links to directory names, subject to the value of the + user-settable @var{mark-directories} variable. + This variable exists so that application-specific completion functions + can override the user's global preference (set via the + @var{mark-symlinked-directories} Readline variable) if appropriate. + This variable is set to the user's preference before any + application-specific completion function is called, so unless that + function modifies the value, the user's preferences are honored. + @end deftypevar + + @deftypevar int rl_ignore_completion_duplicates + If non-zero, then duplicates in the matches are removed. + The default is 1. + @end deftypevar + + @deftypevar int rl_filename_completion_desired + Non-zero means that the results of the matches are to be treated as + filenames. This is @emph{always} zero when completion is attempted, + and can only be changed + within an application-specific completion function. If it is set to a + non-zero value by such a function, directory names have a slash appended + and Readline attempts to quote completed filenames if they contain any + characters in @code{rl_filename_quote_characters} and + @code{rl_filename_quoting_desired} is set to a non-zero value. + @end deftypevar + + @deftypevar int rl_filename_quoting_desired + Non-zero means that the results of the matches are to be quoted using + double quotes (or an application-specific quoting mechanism) if the + completed filename contains any characters in + @code{rl_filename_quote_chars}. This is @emph{always} non-zero + when completion is attempted, and can only be changed within an + application-specific completion function. + The quoting is effected via a call to the function pointed to + by @code{rl_filename_quoting_function}. + @end deftypevar + + @deftypevar int rl_attempted_completion_over + If an application-specific completion function assigned to + @code{rl_attempted_completion_function} sets this variable to a non-zero + value, Readline will not perform its default filename completion even + if the application's completion function returns no matches. + It should be set only by an application's completion function. + @end deftypevar + + @deftypevar int rl_completion_type + Set to a character describing the type of completion Readline is currently + attempting; see the description of @code{rl_complete_internal()} + (@pxref{Completion Functions}) for the list of characters. + This is set to the appropriate value before any application-specific + completion function is called, allowing such functions to present + the same interface as @code{rl_complete()}. + @end deftypevar + + @deftypevar int rl_inhibit_completion + If this variable is non-zero, completion is inhibited. The completion + character will be inserted as any other bound to @code{self-insert}. + @end deftypevar + + @node A Short Completion Example + @subsection A Short Completion Example + + Here is a small application demonstrating the use of the GNU Readline + library. It is called @code{fileman}, and the source code resides in + @file{examples/fileman.c}. This sample application provides + completion of command names, line editing features, and access to the + history list. + + @page + @smallexample + /* fileman.c -- A tiny application which demonstrates how to use the + GNU Readline library. This application interactively allows users + to manipulate files and their modes. */ + + #include + #include + #include + #include + #include + + #include + #include + + extern char *xmalloc (); + + /* The names of functions that actually do the manipulation. */ + int com_list __P((char *)); + int com_view __P((char *)); + int com_rename __P((char *)); + int com_stat __P((char *)); + int com_pwd __P((char *)); + int com_delete __P((char *)); + int com_help __P((char *)); + int com_cd __P((char *)); + int com_quit __P((char *)); + + /* A structure which contains information on the commands this program + can understand. */ + + typedef struct @{ + char *name; /* User printable name of the function. */ + rl_icpfunc_t *func; /* Function to call to do the job. */ + char *doc; /* Documentation for this function. */ + @} COMMAND; + + COMMAND commands[] = @{ + @{ "cd", com_cd, "Change to directory DIR" @}, + @{ "delete", com_delete, "Delete FILE" @}, + @{ "help", com_help, "Display this text" @}, + @{ "?", com_help, "Synonym for `help'" @}, + @{ "list", com_list, "List files in DIR" @}, + @{ "ls", com_list, "Synonym for `list'" @}, + @{ "pwd", com_pwd, "Print the current working directory" @}, + @{ "quit", com_quit, "Quit using Fileman" @}, + @{ "rename", com_rename, "Rename FILE to NEWNAME" @}, + @{ "stat", com_stat, "Print out statistics on FILE" @}, + @{ "view", com_view, "View the contents of FILE" @}, + @{ (char *)NULL, (rl_icpfunc_t *)NULL, (char *)NULL @} + @}; + + /* Forward declarations. */ + char *stripwhite (); + COMMAND *find_command (); + + /* The name of this program, as taken from argv[0]. */ + char *progname; + + /* When non-zero, this means the user is done using this program. */ + int done; + + char * + dupstr (s) + int s; + @{ + char *r; + + r = xmalloc (strlen (s) + 1); + strcpy (r, s); + return (r); + @} + + main (argc, argv) + int argc; + char **argv; + @{ + char *line, *s; + + progname = argv[0]; + + initialize_readline (); /* Bind our completer. */ + + /* Loop reading and executing lines until the user quits. */ + for ( ; done == 0; ) + @{ + line = readline ("FileMan: "); + + if (!line) + break; + + /* Remove leading and trailing whitespace from the line. + Then, if there is anything left, add it to the history list + and execute it. */ + s = stripwhite (line); + + if (*s) + @{ + add_history (s); + execute_line (s); + @} + + free (line); + @} + exit (0); + @} + + /* Execute a command line. */ + int + execute_line (line) + char *line; + @{ + register int i; + COMMAND *command; + char *word; + + /* Isolate the command word. */ + i = 0; + while (line[i] && whitespace (line[i])) + i++; + word = line + i; + + while (line[i] && !whitespace (line[i])) + i++; + + if (line[i]) + line[i++] = '\0'; + + command = find_command (word); + + if (!command) + @{ + fprintf (stderr, "%s: No such command for FileMan.\n", word); + return (-1); + @} + + /* Get argument to command, if any. */ + while (whitespace (line[i])) + i++; + + word = line + i; + + /* Call the function. */ + return ((*(command->func)) (word)); + @} + + /* Look up NAME as the name of a command, and return a pointer to that + command. Return a NULL pointer if NAME isn't a command name. */ + COMMAND * + find_command (name) + char *name; + @{ + register int i; + + for (i = 0; commands[i].name; i++) + if (strcmp (name, commands[i].name) == 0) + return (&commands[i]); + + return ((COMMAND *)NULL); + @} + + /* Strip whitespace from the start and end of STRING. Return a pointer + into STRING. */ + char * + stripwhite (string) + char *string; + @{ + register char *s, *t; + + for (s = string; whitespace (*s); s++) + ; + + if (*s == 0) + return (s); + + t = s + strlen (s) - 1; + while (t > s && whitespace (*t)) + t--; + *++t = '\0'; + + return s; + @} + + /* **************************************************************** */ + /* */ + /* Interface to Readline Completion */ + /* */ + /* **************************************************************** */ + + char *command_generator __P((const char *, int)); + char **fileman_completion __P((const char *, int, int)); + + /* Tell the GNU Readline library how to complete. We want to try to + complete on command names if this is the first word in the line, or + on filenames if not. */ + initialize_readline () + @{ + /* Allow conditional parsing of the ~/.inputrc file. */ + rl_readline_name = "FileMan"; + + /* Tell the completer that we want a crack first. */ + rl_attempted_completion_function = fileman_completion; + @} + + /* Attempt to complete on the contents of TEXT. START and END + bound the region of rl_line_buffer that contains the word to + complete. TEXT is the word to complete. We can use the entire + contents of rl_line_buffer in case we want to do some simple + parsing. Returnthe array of matches, or NULL if there aren't any. */ + char ** + fileman_completion (text, start, end) + const char *text; + int start, end; + @{ + char **matches; + + matches = (char **)NULL; + + /* If this word is at the start of the line, then it is a command + to complete. Otherwise it is the name of a file in the current + directory. */ + if (start == 0) + matches = rl_completion_matches (text, command_generator); + + return (matches); + @} + + /* Generator function for command completion. STATE lets us + know whether to start from scratch; without any state + (i.e. STATE == 0), then we start at the top of the list. */ + char * + command_generator (text, state) + const char *text; + int state; + @{ + static int list_index, len; + char *name; + + /* If this is a new word to complete, initialize now. This + includes saving the length of TEXT for efficiency, and + initializing the index variable to 0. */ + if (!state) + @{ + list_index = 0; + len = strlen (text); + @} + + /* Return the next name which partially matches from the + command list. */ + while (name = commands[list_index].name) + @{ + list_index++; + + if (strncmp (name, text, len) == 0) + return (dupstr(name)); + @} + + /* If no names matched, then return NULL. */ + return ((char *)NULL); + @} + + /* **************************************************************** */ + /* */ + /* FileMan Commands */ + /* */ + /* **************************************************************** */ + + /* String to pass to system (). This is for the LIST, VIEW and RENAME + commands. */ + static char syscom[1024]; + + /* List the file(s) named in arg. */ + com_list (arg) + char *arg; + @{ + if (!arg) + arg = ""; + + sprintf (syscom, "ls -FClg %s", arg); + return (system (syscom)); + @} + + com_view (arg) + char *arg; + @{ + if (!valid_argument ("view", arg)) + return 1; + + sprintf (syscom, "more %s", arg); + return (system (syscom)); + @} + + com_rename (arg) + char *arg; + @{ + too_dangerous ("rename"); + return (1); + @} + + com_stat (arg) + char *arg; + @{ + struct stat finfo; + + if (!valid_argument ("stat", arg)) + return (1); + + if (stat (arg, &finfo) == -1) + @{ + perror (arg); + return (1); + @} + + printf ("Statistics for `%s':\n", arg); + + printf ("%s has %d link%s, and is %d byte%s in length.\n", arg, + finfo.st_nlink, + (finfo.st_nlink == 1) ? "" : "s", + finfo.st_size, + (finfo.st_size == 1) ? "" : "s"); + printf ("Inode Last Change at: %s", ctime (&finfo.st_ctime)); + printf (" Last access at: %s", ctime (&finfo.st_atime)); + printf (" Last modified at: %s", ctime (&finfo.st_mtime)); + return (0); + @} + + com_delete (arg) + char *arg; + @{ + too_dangerous ("delete"); + return (1); + @} + + /* Print out help for ARG, or for all of the commands if ARG is + not present. */ + com_help (arg) + char *arg; + @{ + register int i; + int printed = 0; + + for (i = 0; commands[i].name; i++) + @{ + if (!*arg || (strcmp (arg, commands[i].name) == 0)) + @{ + printf ("%s\t\t%s.\n", commands[i].name, commands[i].doc); + printed++; + @} + @} + + if (!printed) + @{ + printf ("No commands match `%s'. Possibilties are:\n", arg); + + for (i = 0; commands[i].name; i++) + @{ + /* Print in six columns. */ + if (printed == 6) + @{ + printed = 0; + printf ("\n"); + @} + + printf ("%s\t", commands[i].name); + printed++; + @} + + if (printed) + printf ("\n"); + @} + return (0); + @} + + /* Change to the directory ARG. */ + com_cd (arg) + char *arg; + @{ + if (chdir (arg) == -1) + @{ + perror (arg); + return 1; + @} + + com_pwd (""); + return (0); + @} + + /* Print out the current working directory. */ + com_pwd (ignore) + char *ignore; + @{ + char dir[1024], *s; + + s = getcwd (dir, sizeof(dir) - 1); + if (s == 0) + @{ + printf ("Error getting pwd: %s\n", dir); + return 1; + @} + + printf ("Current directory is %s\n", dir); + return 0; + @} + + /* The user wishes to quit using this program. Just set DONE + non-zero. */ + com_quit (arg) + char *arg; + @{ + done = 1; + return (0); + @} + + /* Function which tells you that you can't do this. */ + too_dangerous (caller) + char *caller; + @{ + fprintf (stderr, + "%s: Too dangerous for me to distribute.\n" + caller); + fprintf (stderr, "Write it yourself.\n"); + @} + + /* Return non-zero if ARG is a valid argument for CALLER, + else print an error message and return zero. */ + int + valid_argument (caller, arg) + char *caller, *arg; + @{ + if (!arg || !*arg) + @{ + fprintf (stderr, "%s: Argument required.\n", caller); + return (0); + @} + + return (1); + @} + @end smallexample diff -aNrc2 bash-2.05b-patched/lib/readline/doc/rltech.texinfo bash-3.0/lib/readline/doc/rltech.texinfo *** bash-2.05b-patched/lib/readline/doc/rltech.texinfo Tue Apr 16 17:11:49 2002 --- bash-3.0/lib/readline/doc/rltech.texinfo Wed Dec 31 19:00:00 1969 *************** *** 1,2165 **** - @comment %**start of header (This is for running Texinfo on a region.) - @setfilename rltech.info - @comment %**end of header (This is for running Texinfo on a region.) - @setchapternewpage odd - - @ifinfo - This document describes the GNU Readline Library, a utility for aiding - in the consitency of user interface across discrete programs that need - to provide a command line interface. - - Copyright (C) 1988-2002 Free Software Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of - this manual provided the copyright notice and this permission notice - pare preserved on all copies. - - @ignore - Permission is granted to process this file through TeX and print the - results, provided the printed document carries copying permission - notice identical to this one except for the removal of this paragraph - (this paragraph not being relevant to the printed manual). - @end ignore - - Permission is granted to copy and distribute modified versions of this - manual under the conditions for verbatim copying, provided that the entire - resulting derived work is distributed under the terms of a permission - notice identical to this one. - - Permission is granted to copy and distribute translations of this manual - into another language, under the above conditions for modified versions, - except that this permission notice may be stated in a translation approved - by the Foundation. - @end ifinfo - - @node Programming with GNU Readline - @chapter Programming with GNU Readline - - This chapter describes the interface between the @sc{gnu} Readline Library and - other programs. If you are a programmer, and you wish to include the - features found in @sc{gnu} Readline - such as completion, line editing, and interactive history manipulation - in your own programs, this section is for you. - - @menu - * Basic Behavior:: Using the default behavior of Readline. - * Custom Functions:: Adding your own functions to Readline. - * Readline Variables:: Variables accessible to custom - functions. - * Readline Convenience Functions:: Functions which Readline supplies to - aid in writing your own custom - functions. - * Readline Signal Handling:: How Readline behaves when it receives signals. - * Custom Completers:: Supplanting or supplementing Readline's - completion functions. - @end menu - - @node Basic Behavior - @section Basic Behavior - - Many programs provide a command line interface, such as @code{mail}, - @code{ftp}, and @code{sh}. For such programs, the default behaviour of - Readline is sufficient. This section describes how to use Readline in - the simplest way possible, perhaps to replace calls in your code to - @code{gets()} or @code{fgets()}. - - @findex readline - @cindex readline, function - - The function @code{readline()} prints a prompt @var{prompt} - and then reads and returns a single line of text from the user. - If @var{prompt} is @code{NULL} or the empty string, no prompt is displayed. - The line @code{readline} returns is allocated with @code{malloc()}; - the caller should @code{free()} the line when it has finished with it. - The declaration for @code{readline} in ANSI C is - - @example - @code{char *readline (const char *@var{prompt});} - @end example - - @noindent - So, one might say - @example - @code{char *line = readline ("Enter a line: ");} - @end example - @noindent - in order to read a line of text from the user. - The line returned has the final newline removed, so only the - text remains. - - If @code{readline} encounters an @code{EOF} while reading the line, and the - line is empty at that point, then @code{(char *)NULL} is returned. - Otherwise, the line is ended just as if a newline had been typed. - - If you want the user to be able to get at the line later, (with - @key{C-p} for example), you must call @code{add_history()} to save the - line away in a @dfn{history} list of such lines. - - @example - @code{add_history (line)}; - @end example - - @noindent - For full details on the GNU History Library, see the associated manual. - - It is preferable to avoid saving empty lines on the history list, since - users rarely have a burning need to reuse a blank line. Here is - a function which usefully replaces the standard @code{gets()} library - function, and has the advantage of no static buffer to overflow: - - @example - /* A static variable for holding the line. */ - static char *line_read = (char *)NULL; - - /* Read a string, and return a pointer to it. - Returns NULL on EOF. */ - char * - rl_gets () - @{ - /* If the buffer has already been allocated, - return the memory to the free pool. */ - if (line_read) - @{ - free (line_read); - line_read = (char *)NULL; - @} - - /* Get a line from the user. */ - line_read = readline (""); - - /* If the line has any text in it, - save it on the history. */ - if (line_read && *line_read) - add_history (line_read); - - return (line_read); - @} - @end example - - This function gives the user the default behaviour of @key{TAB} - completion: completion on file names. If you do not want Readline to - complete on filenames, you can change the binding of the @key{TAB} key - with @code{rl_bind_key()}. - - @example - @code{int rl_bind_key (int @var{key}, rl_command_func_t *@var{function});} - @end example - - @code{rl_bind_key()} takes two arguments: @var{key} is the character that - you want to bind, and @var{function} is the address of the function to - call when @var{key} is pressed. Binding @key{TAB} to @code{rl_insert()} - makes @key{TAB} insert itself. - @code{rl_bind_key()} returns non-zero if @var{key} is not a valid - ASCII character code (between 0 and 255). - - Thus, to disable the default @key{TAB} behavior, the following suffices: - @example - @code{rl_bind_key ('\t', rl_insert);} - @end example - - This code should be executed once at the start of your program; you - might write a function called @code{initialize_readline()} which - performs this and other desired initializations, such as installing - custom completers (@pxref{Custom Completers}). - - @node Custom Functions - @section Custom Functions - - Readline provides many functions for manipulating the text of - the line, but it isn't possible to anticipate the needs of all - programs. This section describes the various functions and variables - defined within the Readline library which allow a user program to add - customized functionality to Readline. - - Before declaring any functions that customize Readline's behavior, or - using any functionality Readline provides in other code, an - application writer should include the file @code{} - in any file that uses Readline's features. Since some of the definitions - in @code{readline.h} use the @code{stdio} library, the file - @code{} should be included before @code{readline.h}. - - @code{readline.h} defines a C preprocessor variable that should - be treated as an integer, @code{RL_READLINE_VERSION}, which may - be used to conditionally compile application code depending on - the installed Readline version. The value is a hexadecimal - encoding of the major and minor version numbers of the library, - of the form 0x@var{MMmm}. @var{MM} is the two-digit major - version number; @var{mm} is the two-digit minor version number. - For Readline 4.2, for example, the value of - @code{RL_READLINE_VERSION} would be @code{0x0402}. - - @menu - * Readline Typedefs:: C declarations to make code readable. - * Function Writing:: Variables and calling conventions. - @end menu - - @node Readline Typedefs - @subsection Readline Typedefs - - For readabilty, we declare a number of new object types, all pointers - to functions. - - The reason for declaring these new types is to make it easier to write - code describing pointers to C functions with appropriately prototyped - arguments and return values. - - For instance, say we want to declare a variable @var{func} as a pointer - to a function which takes two @code{int} arguments and returns an - @code{int} (this is the type of all of the Readline bindable functions). - Instead of the classic C declaration - - @code{int (*func)();} - - @noindent - or the ANSI-C style declaration - - @code{int (*func)(int, int);} - - @noindent - we may write - - @code{rl_command_func_t *func;} - - The full list of function pointer types available is - - @table @code - @item typedef int rl_command_func_t (int, int); - - @item typedef char *rl_compentry_func_t (const char *, int); - - @item typedef char **rl_completion_func_t (const char *, int, int); - - @item typedef char *rl_quote_func_t (char *, int, char *); - - @item typedef char *rl_dequote_func_t (char *, int); - - @item typedef int rl_compignore_func_t (char **); - - @item typedef void rl_compdisp_func_t (char **, int, int); - - @item typedef int rl_hook_func_t (void); - - @item typedef int rl_getc_func_t (FILE *); - - @item typedef int rl_linebuf_func_t (char *, int); - - @item typedef int rl_intfunc_t (int); - @item #define rl_ivoidfunc_t rl_hook_func_t - @item typedef int rl_icpfunc_t (char *); - @item typedef int rl_icppfunc_t (char **); - - @item typedef void rl_voidfunc_t (void); - @item typedef void rl_vintfunc_t (int); - @item typedef void rl_vcpfunc_t (char *); - @item typedef void rl_vcppfunc_t (char **); - - @end table - - @node Function Writing - @subsection Writing a New Function - - In order to write new functions for Readline, you need to know the - calling conventions for keyboard-invoked functions, and the names of the - variables that describe the current state of the line read so far. - - The calling sequence for a command @code{foo} looks like - - @example - @code{int foo (int count, int key)} - @end example - - @noindent - where @var{count} is the numeric argument (or 1 if defaulted) and - @var{key} is the key that invoked this function. - - It is completely up to the function as to what should be done with the - numeric argument. Some functions use it as a repeat count, some - as a flag, and others to choose alternate behavior (refreshing the current - line as opposed to refreshing the screen, for example). Some choose to - ignore it. In general, if a - function uses the numeric argument as a repeat count, it should be able - to do something useful with both negative and positive arguments. - At the very least, it should be aware that it can be passed a - negative argument. - - A command function should return 0 if its action completes successfully, - and a non-zero value if some error occurs. - - @node Readline Variables - @section Readline Variables - - These variables are available to function writers. - - @deftypevar {char *} rl_line_buffer - This is the line gathered so far. You are welcome to modify the - contents of the line, but see @ref{Allowing Undoing}. The - function @code{rl_extend_line_buffer} is available to increase - the memory allocated to @code{rl_line_buffer}. - @end deftypevar - - @deftypevar int rl_point - The offset of the current cursor position in @code{rl_line_buffer} - (the @emph{point}). - @end deftypevar - - @deftypevar int rl_end - The number of characters present in @code{rl_line_buffer}. When - @code{rl_point} is at the end of the line, @code{rl_point} and - @code{rl_end} are equal. - @end deftypevar - - @deftypevar int rl_mark - The @var{mark} (saved position) in the current line. If set, the mark - and point define a @emph{region}. - @end deftypevar - - @deftypevar int rl_done - Setting this to a non-zero value causes Readline to return the current - line immediately. - @end deftypevar - - @deftypevar int rl_num_chars_to_read - Setting this to a positive value before calling @code{readline()} causes - Readline to return after accepting that many characters, rather - than reading up to a character bound to @code{accept-line}. - @end deftypevar - - @deftypevar int rl_pending_input - Setting this to a value makes it the next keystroke read. This is a - way to stuff a single character into the input stream. - @end deftypevar - - @deftypevar int rl_dispatching - Set to a non-zero value if a function is being called from a key binding; - zero otherwise. Application functions can test this to discover whether - they were called directly or by Readline's dispatching mechanism. - @end deftypevar - - @deftypevar int rl_erase_empty_line - Setting this to a non-zero value causes Readline to completely erase - the current line, including any prompt, any time a newline is typed as - the only character on an otherwise-empty line. The cursor is moved to - the beginning of the newly-blank line. - @end deftypevar - - @deftypevar {char *} rl_prompt - The prompt Readline uses. This is set from the argument to - @code{readline()}, and should not be assigned to directly. - The @code{rl_set_prompt()} function (@pxref{Redisplay}) may - be used to modify the prompt string after calling @code{readline()}. - @end deftypevar - - @deftypevar int rl_already_prompted - If an application wishes to display the prompt itself, rather than have - Readline do it the first time @code{readline()} is called, it should set - this variable to a non-zero value after displaying the prompt. - The prompt must also be passed as the argument to @code{readline()} so - the redisplay functions can update the display properly. - The calling application is responsible for managing the value; Readline - never sets it. - @end deftypevar - - @deftypevar {const char *} rl_library_version - The version number of this revision of the library. - @end deftypevar - - @deftypevar int rl_readline_version - An integer encoding the current version of the library. The encoding is - of the form 0x@var{MMmm}, where @var{MM} is the two-digit major version - number, and @var{mm} is the two-digit minor version number. - For example, for Readline-4.2, @code{rl_readline_version} would have the - value 0x0402. - @end deftypevar - - @deftypevar {int} rl_gnu_readline_p - Always set to 1, denoting that this is @sc{gnu} readline rather than some - emulation. - @end deftypevar - - @deftypevar {const char *} rl_terminal_name - The terminal type, used for initialization. If not set by the application, - Readline sets this to the value of the @env{TERM} environment variable - the first time it is called. - @end deftypevar - - @deftypevar {const char *} rl_readline_name - This variable is set to a unique name by each application using Readline. - The value allows conditional parsing of the inputrc file - (@pxref{Conditional Init Constructs}). - @end deftypevar - - @deftypevar {FILE *} rl_instream - The stdio stream from which Readline reads input. - If @code{NULL}, Readline defaults to @var{stdin}. - @end deftypevar - - @deftypevar {FILE *} rl_outstream - The stdio stream to which Readline performs output. - If @code{NULL}, Readline defaults to @var{stdout}. - @end deftypevar - - @deftypevar {rl_command_func_t *} rl_last_func - The address of the last command function Readline executed. May be used to - test whether or not a function is being executed twice in succession, for - example. - @end deftypevar - - @deftypevar {rl_hook_func_t *} rl_startup_hook - If non-zero, this is the address of a function to call just - before @code{readline} prints the first prompt. - @end deftypevar - - @deftypevar {rl_hook_func_t *} rl_pre_input_hook - If non-zero, this is the address of a function to call after - the first prompt has been printed and just before @code{readline} - starts reading input characters. - @end deftypevar - - @deftypevar {rl_hook_func_t *} rl_event_hook - If non-zero, this is the address of a function to call periodically - when Readline is waiting for terminal input. - By default, this will be called at most ten times a second if there - is no keyboard input. - @end deftypevar - - @deftypevar {rl_getc_func_t *} rl_getc_function - If non-zero, Readline will call indirectly through this pointer - to get a character from the input stream. By default, it is set to - @code{rl_getc}, the default Readline character input function - (@pxref{Character Input}). - @end deftypevar - - @deftypevar {rl_voidfunc_t *} rl_redisplay_function - If non-zero, Readline will call indirectly through this pointer - to update the display with the current contents of the editing buffer. - By default, it is set to @code{rl_redisplay}, the default Readline - redisplay function (@pxref{Redisplay}). - @end deftypevar - - @deftypevar {rl_vintfunc_t *} rl_prep_term_function - If non-zero, Readline will call indirectly through this pointer - to initialize the terminal. The function takes a single argument, an - @code{int} flag that says whether or not to use eight-bit characters. - By default, this is set to @code{rl_prep_terminal} - (@pxref{Terminal Management}). - @end deftypevar - - @deftypevar {rl_voidfunc_t *} rl_deprep_term_function - If non-zero, Readline will call indirectly through this pointer - to reset the terminal. This function should undo the effects of - @code{rl_prep_term_function}. - By default, this is set to @code{rl_deprep_terminal} - (@pxref{Terminal Management}). - @end deftypevar - - @deftypevar {Keymap} rl_executing_keymap - This variable is set to the keymap (@pxref{Keymaps}) in which the - currently executing readline function was found. - @end deftypevar - - @deftypevar {Keymap} rl_binding_keymap - This variable is set to the keymap (@pxref{Keymaps}) in which the - last key binding occurred. - @end deftypevar - - @deftypevar {char *} rl_executing_macro - This variable is set to the text of any currently-executing macro. - @end deftypevar - - @deftypevar {int} rl_readline_state - A variable with bit values that encapsulate the current Readline state. - A bit is set with the @code{RL_SETSTATE} macro, and unset with the - @code{RL_UNSETSTATE} macro. Use the @code{RL_ISSTATE} macro to test - whether a particular state bit is set. Current state bits include: - - @table @code - @item RL_STATE_NONE - Readline has not yet been called, nor has it begun to intialize. - @item RL_STATE_INITIALIZING - Readline is initializing its internal data structures. - @item RL_STATE_INITIALIZED - Readline has completed its initialization. - @item RL_STATE_TERMPREPPED - Readline has modified the terminal modes to do its own input and redisplay. - @item RL_STATE_READCMD - Readline is reading a command from the keyboard. - @item RL_STATE_METANEXT - Readline is reading more input after reading the meta-prefix character. - @item RL_STATE_DISPATCHING - Readline is dispatching to a command. - @item RL_STATE_MOREINPUT - Readline is reading more input while executing an editing command. - @item RL_STATE_ISEARCH - Readline is performing an incremental history search. - @item RL_STATE_NSEARCH - Readline is performing a non-incremental history search. - @item RL_STATE_SEARCH - Readline is searching backward or forward through the history for a string. - @item RL_STATE_NUMERICARG - Readline is reading a numeric argument. - @item RL_STATE_MACROINPUT - Readline is currently getting its input from a previously-defined keyboard - macro. - @item RL_STATE_MACRODEF - Readline is currently reading characters defining a keyboard macro. - @item RL_STATE_OVERWRITE - Readline is in overwrite mode. - @item RL_STATE_COMPLETING - Readline is performing word completion. - @item RL_STATE_SIGHANDLER - Readline is currently executing the readline signal handler. - @item RL_STATE_UNDOING - Readline is performing an undo. - @item RL_STATE_DONE - Readline has read a key sequence bound to @code{accept-line} - and is about to return the line to the caller. - @end table - - @end deftypevar - - @deftypevar {int} rl_explicit_arg - Set to a non-zero value if an explicit numeric argument was specified by - the user. Only valid in a bindable command function. - @end deftypevar - - @deftypevar {int} rl_numeric_arg - Set to the value of any numeric argument explicitly specified by the user - before executing the current Readline function. Only valid in a bindable - command function. - @end deftypevar - - @deftypevar {int} rl_editing_mode - Set to a value denoting Readline's current editing mode. A value of - @var{1} means Readline is currently in emacs mode; @var{0} - means that vi mode is active. - @end deftypevar - - - @node Readline Convenience Functions - @section Readline Convenience Functions - - @menu - * Function Naming:: How to give a function you write a name. - * Keymaps:: Making keymaps. - * Binding Keys:: Changing Keymaps. - * Associating Function Names and Bindings:: Translate function names to - key sequences. - * Allowing Undoing:: How to make your functions undoable. - * Redisplay:: Functions to control line display. - * Modifying Text:: Functions to modify @code{rl_line_buffer}. - * Character Input:: Functions to read keyboard input. - * Terminal Management:: Functions to manage terminal settings. - * Utility Functions:: Generally useful functions and hooks. - * Miscellaneous Functions:: Functions that don't fall into any category. - * Alternate Interface:: Using Readline in a `callback' fashion. - * A Readline Example:: An example Readline function. - @end menu - - @node Function Naming - @subsection Naming a Function - - The user can dynamically change the bindings of keys while using - Readline. This is done by representing the function with a descriptive - name. The user is able to type the descriptive name when referring to - the function. Thus, in an init file, one might find - - @example - Meta-Rubout: backward-kill-word - @end example - - This binds the keystroke @key{Meta-Rubout} to the function - @emph{descriptively} named @code{backward-kill-word}. You, as the - programmer, should bind the functions you write to descriptive names as - well. Readline provides a function for doing that: - - @deftypefun int rl_add_defun (const char *name, rl_command_func_t *function, int key) - Add @var{name} to the list of named functions. Make @var{function} be - the function that gets called. If @var{key} is not -1, then bind it to - @var{function} using @code{rl_bind_key()}. - @end deftypefun - - Using this function alone is sufficient for most applications. It is - the recommended way to add a few functions to the default functions that - Readline has built in. If you need to do something other - than adding a function to Readline, you may need to use the - underlying functions described below. - - @node Keymaps - @subsection Selecting a Keymap - - Key bindings take place on a @dfn{keymap}. The keymap is the - association between the keys that the user types and the functions that - get run. You can make your own keymaps, copy existing keymaps, and tell - Readline which keymap to use. - - @deftypefun Keymap rl_make_bare_keymap (void) - Returns a new, empty keymap. The space for the keymap is allocated with - @code{malloc()}; the caller should free it by calling - @code{rl_discard_keymap()} when done. - @end deftypefun - - @deftypefun Keymap rl_copy_keymap (Keymap map) - Return a new keymap which is a copy of @var{map}. - @end deftypefun - - @deftypefun Keymap rl_make_keymap (void) - Return a new keymap with the printing characters bound to rl_insert, - the lowercase Meta characters bound to run their equivalents, and - the Meta digits bound to produce numeric arguments. - @end deftypefun - - @deftypefun void rl_discard_keymap (Keymap keymap) - Free the storage associated with @var{keymap}. - @end deftypefun - - Readline has several internal keymaps. These functions allow you to - change which keymap is active. - - @deftypefun Keymap rl_get_keymap (void) - Returns the currently active keymap. - @end deftypefun - - @deftypefun void rl_set_keymap (Keymap keymap) - Makes @var{keymap} the currently active keymap. - @end deftypefun - - @deftypefun Keymap rl_get_keymap_by_name (const char *name) - Return the keymap matching @var{name}. @var{name} is one which would - be supplied in a @code{set keymap} inputrc line (@pxref{Readline Init File}). - @end deftypefun - - @deftypefun {char *} rl_get_keymap_name (Keymap keymap) - Return the name matching @var{keymap}. @var{name} is one which would - be supplied in a @code{set keymap} inputrc line (@pxref{Readline Init File}). - @end deftypefun - - @node Binding Keys - @subsection Binding Keys - - Key sequences are associate with functions through the keymap. - Readline has several internal keymaps: @code{emacs_standard_keymap}, - @code{emacs_meta_keymap}, @code{emacs_ctlx_keymap}, - @code{vi_movement_keymap}, and @code{vi_insertion_keymap}. - @code{emacs_standard_keymap} is the default, and the examples in - this manual assume that. - - Since @code{readline()} installs a set of default key bindings the first - time it is called, there is always the danger that a custom binding - installed before the first call to @code{readline()} will be overridden. - An alternate mechanism is to install custom key bindings in an - initialization function assigned to the @code{rl_startup_hook} variable - (@pxref{Readline Variables}). - - These functions manage key bindings. - - @deftypefun int rl_bind_key (int key, rl_command_func_t *function) - Binds @var{key} to @var{function} in the currently active keymap. - Returns non-zero in the case of an invalid @var{key}. - @end deftypefun - - @deftypefun int rl_bind_key_in_map (int key, rl_command_func_t *function, Keymap map) - Bind @var{key} to @var{function} in @var{map}. Returns non-zero in the case - of an invalid @var{key}. - @end deftypefun - - @deftypefun int rl_unbind_key (int key) - Bind @var{key} to the null function in the currently active keymap. - Returns non-zero in case of error. - @end deftypefun - - @deftypefun int rl_unbind_key_in_map (int key, Keymap map) - Bind @var{key} to the null function in @var{map}. - Returns non-zero in case of error. - @end deftypefun - - @deftypefun int rl_unbind_function_in_map (rl_command_func_t *function, Keymap map) - Unbind all keys that execute @var{function} in @var{map}. - @end deftypefun - - @deftypefun int rl_unbind_command_in_map (const char *command, Keymap map) - Unbind all keys that are bound to @var{command} in @var{map}. - @end deftypefun - - @deftypefun int rl_set_key (const char *keyseq, rl_command_func_t *function, Keymap map) - Bind the key sequence represented by the string @var{keyseq} to the function - @var{function}. This makes new keymaps as - necessary. The initial keymap in which to do bindings is @var{map}. - @end deftypefun - - @deftypefun int rl_generic_bind (int type, const char *keyseq, char *data, Keymap map) - Bind the key sequence represented by the string @var{keyseq} to the arbitrary - pointer @var{data}. @var{type} says what kind of data is pointed to by - @var{data}; this can be a function (@code{ISFUNC}), a macro - (@code{ISMACR}), or a keymap (@code{ISKMAP}). This makes new keymaps as - necessary. The initial keymap in which to do bindings is @var{map}. - @end deftypefun - - @deftypefun int rl_parse_and_bind (char *line) - Parse @var{line} as if it had been read from the @code{inputrc} file and - perform any key bindings and variable assignments found - (@pxref{Readline Init File}). - @end deftypefun - - @deftypefun int rl_read_init_file (const char *filename) - Read keybindings and variable assignments from @var{filename} - (@pxref{Readline Init File}). - @end deftypefun - - @node Associating Function Names and Bindings - @subsection Associating Function Names and Bindings - - These functions allow you to find out what keys invoke named functions - and the functions invoked by a particular key sequence. You may also - associate a new function name with an arbitrary function. - - @deftypefun {rl_command_func_t *} rl_named_function (const char *name) - Return the function with name @var{name}. - @end deftypefun - - @deftypefun {rl_command_func_t *} rl_function_of_keyseq (const char *keyseq, Keymap map, int *type) - Return the function invoked by @var{keyseq} in keymap @var{map}. - If @var{map} is @code{NULL}, the current keymap is used. If @var{type} is - not @code{NULL}, the type of the object is returned in the @code{int} variable - it points to (one of @code{ISFUNC}, @code{ISKMAP}, or @code{ISMACR}). - @end deftypefun - - @deftypefun {char **} rl_invoking_keyseqs (rl_command_func_t *function) - Return an array of strings representing the key sequences used to - invoke @var{function} in the current keymap. - @end deftypefun - - @deftypefun {char **} rl_invoking_keyseqs_in_map (rl_command_func_t *function, Keymap map) - Return an array of strings representing the key sequences used to - invoke @var{function} in the keymap @var{map}. - @end deftypefun - - @deftypefun void rl_function_dumper (int readable) - Print the readline function names and the key sequences currently - bound to them to @code{rl_outstream}. If @var{readable} is non-zero, - the list is formatted in such a way that it can be made part of an - @code{inputrc} file and re-read. - @end deftypefun - - @deftypefun void rl_list_funmap_names (void) - Print the names of all bindable Readline functions to @code{rl_outstream}. - @end deftypefun - - @deftypefun {const char **} rl_funmap_names (void) - Return a NULL terminated array of known function names. The array is - sorted. The array itself is allocated, but not the strings inside. You - should @code{free()} the array when you are done, but not the pointers. - @end deftypefun - - @deftypefun int rl_add_funmap_entry (const char *name, rl_command_func_t *function) - Add @var{name} to the list of bindable Readline command names, and make - @var{function} the function to be called when @var{name} is invoked. - @end deftypefun - - @node Allowing Undoing - @subsection Allowing Undoing - - Supporting the undo command is a painless thing, and makes your - functions much more useful. It is certainly easy to try - something if you know you can undo it. - - If your function simply inserts text once, or deletes text once, and - uses @code{rl_insert_text()} or @code{rl_delete_text()} to do it, then - undoing is already done for you automatically. - - If you do multiple insertions or multiple deletions, or any combination - of these operations, you should group them together into one operation. - This is done with @code{rl_begin_undo_group()} and - @code{rl_end_undo_group()}. - - The types of events that can be undone are: - - @smallexample - enum undo_code @{ UNDO_DELETE, UNDO_INSERT, UNDO_BEGIN, UNDO_END @}; - @end smallexample - - Notice that @code{UNDO_DELETE} means to insert some text, and - @code{UNDO_INSERT} means to delete some text. That is, the undo code - tells what to undo, not how to undo it. @code{UNDO_BEGIN} and - @code{UNDO_END} are tags added by @code{rl_begin_undo_group()} and - @code{rl_end_undo_group()}. - - @deftypefun int rl_begin_undo_group (void) - Begins saving undo information in a group construct. The undo - information usually comes from calls to @code{rl_insert_text()} and - @code{rl_delete_text()}, but could be the result of calls to - @code{rl_add_undo()}. - @end deftypefun - - @deftypefun int rl_end_undo_group (void) - Closes the current undo group started with @code{rl_begin_undo_group - ()}. There should be one call to @code{rl_end_undo_group()} - for each call to @code{rl_begin_undo_group()}. - @end deftypefun - - @deftypefun void rl_add_undo (enum undo_code what, int start, int end, char *text) - Remember how to undo an event (according to @var{what}). The affected - text runs from @var{start} to @var{end}, and encompasses @var{text}. - @end deftypefun - - @deftypefun void rl_free_undo_list (void) - Free the existing undo list. - @end deftypefun - - @deftypefun int rl_do_undo (void) - Undo the first thing on the undo list. Returns @code{0} if there was - nothing to undo, non-zero if something was undone. - @end deftypefun - - Finally, if you neither insert nor delete text, but directly modify the - existing text (e.g., change its case), call @code{rl_modifying()} - once, just before you modify the text. You must supply the indices of - the text range that you are going to modify. - - @deftypefun int rl_modifying (int start, int end) - Tell Readline to save the text between @var{start} and @var{end} as a - single undo unit. It is assumed that you will subsequently modify - that text. - @end deftypefun - - @node Redisplay - @subsection Redisplay - - @deftypefun void rl_redisplay (void) - Change what's displayed on the screen to reflect the current contents - of @code{rl_line_buffer}. - @end deftypefun - - @deftypefun int rl_forced_update_display (void) - Force the line to be updated and redisplayed, whether or not - Readline thinks the screen display is correct. - @end deftypefun - - @deftypefun int rl_on_new_line (void) - Tell the update functions that we have moved onto a new (empty) line, - usually after ouputting a newline. - @end deftypefun - - @deftypefun int rl_on_new_line_with_prompt (void) - Tell the update functions that we have moved onto a new line, with - @var{rl_prompt} already displayed. - This could be used by applications that want to output the prompt string - themselves, but still need Readline to know the prompt string length for - redisplay. - It should be used after setting @var{rl_already_prompted}. - @end deftypefun - - @deftypefun int rl_reset_line_state (void) - Reset the display state to a clean state and redisplay the current line - starting on a new line. - @end deftypefun - - @deftypefun int rl_crlf (void) - Move the cursor to the start of the next screen line. - @end deftypefun - - @deftypefun int rl_show_char (int c) - Display character @var{c} on @code{rl_outstream}. - If Readline has not been set to display meta characters directly, this - will convert meta characters to a meta-prefixed key sequence. - This is intended for use by applications which wish to do their own - redisplay. - @end deftypefun - - @deftypefun int rl_message (const char *, @dots{}) - The arguments are a format string as would be supplied to @code{printf}, - possibly containing conversion specifications such as @samp{%d}, and - any additional arguments necessary to satisfy the conversion specifications. - The resulting string is displayed in the @dfn{echo area}. The echo area - is also used to display numeric arguments and search strings. - @end deftypefun - - @deftypefun int rl_clear_message (void) - Clear the message in the echo area. - @end deftypefun - - @deftypefun void rl_save_prompt (void) - Save the local Readline prompt display state in preparation for - displaying a new message in the message area with @code{rl_message()}. - @end deftypefun - - @deftypefun void rl_restore_prompt (void) - Restore the local Readline prompt display state saved by the most - recent call to @code{rl_save_prompt}. - @end deftypefun - - @deftypefun int rl_expand_prompt (char *prompt) - Expand any special character sequences in @var{prompt} and set up the - local Readline prompt redisplay variables. - This function is called by @code{readline()}. It may also be called to - expand the primary prompt if the @code{rl_on_new_line_with_prompt()} - function or @code{rl_already_prompted} variable is used. - It returns the number of visible characters on the last line of the - (possibly multi-line) prompt. - @end deftypefun - - @deftypefun int rl_set_prompt (const char *prompt) - Make Readline use @var{prompt} for subsequent redisplay. This calls - @code{rl_expand_prompt()} to expand the prompt and sets @code{rl_prompt} - to the result. - @end deftypefun - - @node Modifying Text - @subsection Modifying Text - - @deftypefun int rl_insert_text (const char *text) - Insert @var{text} into the line at the current cursor position. - Returns the number of characters inserted. - @end deftypefun - - @deftypefun int rl_delete_text (int start, int end) - Delete the text between @var{start} and @var{end} in the current line. - Returns the number of characters deleted. - @end deftypefun - - @deftypefun {char *} rl_copy_text (int start, int end) - Return a copy of the text between @var{start} and @var{end} in - the current line. - @end deftypefun - - @deftypefun int rl_kill_text (int start, int end) - Copy the text between @var{start} and @var{end} in the current line - to the kill ring, appending or prepending to the last kill if the - last command was a kill command. The text is deleted. - If @var{start} is less than @var{end}, - the text is appended, otherwise prepended. If the last command was - not a kill, a new kill ring slot is used. - @end deftypefun - - @deftypefun int rl_push_macro_input (char *macro) - Cause @var{macro} to be inserted into the line, as if it had been invoked - by a key bound to a macro. Not especially useful; use - @code{rl_insert_text()} instead. - @end deftypefun - - @node Character Input - @subsection Character Input - - @deftypefun int rl_read_key (void) - Return the next character available from Readline's current input stream. - This handles input inserted into - the input stream via @var{rl_pending_input} (@pxref{Readline Variables}) - and @code{rl_stuff_char()}, macros, and characters read from the keyboard. - While waiting for input, this function will call any function assigned to - the @code{rl_event_hook} variable. - @end deftypefun - - @deftypefun int rl_getc (FILE *stream) - Return the next character available from @var{stream}, which is assumed to - be the keyboard. - @end deftypefun - - @deftypefun int rl_stuff_char (int c) - Insert @var{c} into the Readline input stream. It will be "read" - before Readline attempts to read characters from the terminal with - @code{rl_read_key()}. Up to 512 characters may be pushed back. - @code{rl_stuff_char} returns 1 if the character was successfully inserted; - 0 otherwise. - @end deftypefun - - @deftypefun int rl_execute_next (int c) - Make @var{c} be the next command to be executed when @code{rl_read_key()} - is called. This sets @var{rl_pending_input}. - @end deftypefun - - @deftypefun int rl_clear_pending_input (void) - Unset @var{rl_pending_input}, effectively negating the effect of any - previous call to @code{rl_execute_next()}. This works only if the - pending input has not already been read with @code{rl_read_key()}. - @end deftypefun - - @deftypefun int rl_set_keyboard_input_timeout (int u) - While waiting for keyboard input in @code{rl_read_key()}, Readline will - wait for @var{u} microseconds for input before calling any function - assigned to @code{rl_event_hook}. The default waiting period is - one-tenth of a second. Returns the old timeout value. - @end deftypefun - - @node Terminal Management - @subsection Terminal Management - - @deftypefun void rl_prep_terminal (int meta_flag) - Modify the terminal settings for Readline's use, so @code{readline()} - can read a single character at a time from the keyboard. - The @var{meta_flag} argument should be non-zero if Readline should - read eight-bit input. - @end deftypefun - - @deftypefun void rl_deprep_terminal (void) - Undo the effects of @code{rl_prep_terminal()}, leaving the terminal in - the state in which it was before the most recent call to - @code{rl_prep_terminal()}. - @end deftypefun - - @deftypefun void rl_tty_set_default_bindings (Keymap kmap) - Read the operating system's terminal editing characters (as would be displayed - by @code{stty}) to their Readline equivalents. The bindings are performed - in @var{kmap}. - @end deftypefun - - @deftypefun int rl_reset_terminal (const char *terminal_name) - Reinitialize Readline's idea of the terminal settings using - @var{terminal_name} as the terminal type (e.g., @code{vt100}). - If @var{terminal_name} is @code{NULL}, the value of the @code{TERM} - environment variable is used. - @end deftypefun - - @node Utility Functions - @subsection Utility Functions - - @deftypefun void rl_replace_line (const char *text, int clear_undo) - Replace the contents of @code{rl_line_buffer} with @var{text}. - The point and mark are preserved, if possible. - If @var{clear_undo} is non-zero, the undo list associated with the - current line is cleared. - @end deftypefun - - @deftypefun int rl_extend_line_buffer (int len) - Ensure that @code{rl_line_buffer} has enough space to hold @var{len} - characters, possibly reallocating it if necessary. - @end deftypefun - - @deftypefun int rl_initialize (void) - Initialize or re-initialize Readline's internal state. - It's not strictly necessary to call this; @code{readline()} calls it before - reading any input. - @end deftypefun - - @deftypefun int rl_ding (void) - Ring the terminal bell, obeying the setting of @code{bell-style}. - @end deftypefun - - @deftypefun int rl_alphabetic (int c) - Return 1 if @var{c} is an alphabetic character. - @end deftypefun - - @deftypefun void rl_display_match_list (char **matches, int len, int max) - A convenience function for displaying a list of strings in - columnar format on Readline's output stream. @code{matches} is the list - of strings, in argv format, such as a list of completion matches. - @code{len} is the number of strings in @code{matches}, and @code{max} - is the length of the longest string in @code{matches}. This function uses - the setting of @code{print-completions-horizontally} to select how the - matches are displayed (@pxref{Readline Init File Syntax}). - @end deftypefun - - The following are implemented as macros, defined in @code{chardefs.h}. - Applications should refrain from using them. - - @deftypefun int _rl_uppercase_p (int c) - Return 1 if @var{c} is an uppercase alphabetic character. - @end deftypefun - - @deftypefun int _rl_lowercase_p (int c) - Return 1 if @var{c} is a lowercase alphabetic character. - @end deftypefun - - @deftypefun int _rl_digit_p (int c) - Return 1 if @var{c} is a numeric character. - @end deftypefun - - @deftypefun int _rl_to_upper (int c) - If @var{c} is a lowercase alphabetic character, return the corresponding - uppercase character. - @end deftypefun - - @deftypefun int _rl_to_lower (int c) - If @var{c} is an uppercase alphabetic character, return the corresponding - lowercase character. - @end deftypefun - - @deftypefun int _rl_digit_value (int c) - If @var{c} is a number, return the value it represents. - @end deftypefun - - @node Miscellaneous Functions - @subsection Miscellaneous Functions - - @deftypefun int rl_macro_bind (const char *keyseq, const char *macro, Keymap map) - Bind the key sequence @var{keyseq} to invoke the macro @var{macro}. - The binding is performed in @var{map}. When @var{keyseq} is invoked, the - @var{macro} will be inserted into the line. This function is deprecated; - use @code{rl_generic_bind()} instead. - @end deftypefun - - @deftypefun void rl_macro_dumper (int readable) - Print the key sequences bound to macros and their values, using - the current keymap, to @code{rl_outstream}. - If @var{readable} is non-zero, the list is formatted in such a way - that it can be made part of an @code{inputrc} file and re-read. - @end deftypefun - - @deftypefun int rl_variable_bind (const char *variable, const char *value) - Make the Readline variable @var{variable} have @var{value}. - This behaves as if the readline command - @samp{set @var{variable} @var{value}} had been executed in an @code{inputrc} - file (@pxref{Readline Init File Syntax}). - @end deftypefun - - @deftypefun void rl_variable_dumper (int readable) - Print the readline variable names and their current values - to @code{rl_outstream}. - If @var{readable} is non-zero, the list is formatted in such a way - that it can be made part of an @code{inputrc} file and re-read. - @end deftypefun - - @deftypefun int rl_set_paren_blink_timeout (int u) - Set the time interval (in microseconds) that Readline waits when showing - a balancing character when @code{blink-matching-paren} has been enabled. - @end deftypefun - - @deftypefun {char *} rl_get_termcap (const char *cap) - Retrieve the string value of the termcap capability @var{cap}. - Readline fetches the termcap entry for the current terminal name and - uses those capabilities to move around the screen line and perform other - terminal-specific operations, like erasing a line. Readline does not - use all of a terminal's capabilities, and this function will return - values for only those capabilities Readline uses. - @end deftypefun - - @node Alternate Interface - @subsection Alternate Interface - - An alternate interface is available to plain @code{readline()}. Some - applications need to interleave keyboard I/O with file, device, or - window system I/O, typically by using a main loop to @code{select()} - on various file descriptors. To accomodate this need, readline can - also be invoked as a `callback' function from an event loop. There - are functions available to make this easy. - - @deftypefun void rl_callback_handler_install (const char *prompt, rl_vcpfunc_t *lhandler) - Set up the terminal for readline I/O and display the initial - expanded value of @var{prompt}. Save the value of @var{lhandler} to - use as a function to call when a complete line of input has been entered. - The function takes the text of the line as an argument. - @end deftypefun - - @deftypefun void rl_callback_read_char (void) - Whenever an application determines that keyboard input is available, it - should call @code{rl_callback_read_char()}, which will read the next - character from the current input source. - If that character completes the line, @code{rl_callback_read_char} will - invoke the @var{lhandler} function saved by @code{rl_callback_handler_install} - to process the line. - Before calling the @var{lhandler} function, the terminal settings are - reset to the values they had before calling - @code{rl_callback_handler_install}. - If the @var{lhandler} function returns, - the terminal settings are modified for Readline's use again. - @code{EOF} is indicated by calling @var{lhandler} with a - @code{NULL} line. - @end deftypefun - - @deftypefun void rl_callback_handler_remove (void) - Restore the terminal to its initial state and remove the line handler. - This may be called from within a callback as well as independently. - If the @var{lhandler} installed by @code{rl_callback_handler_install} - does not exit the program, either this function or the function referred - to by the value of @code{rl_deprep_term_function} should be called before - the program exits to reset the terminal settings. - @end deftypefun - - @node A Readline Example - @subsection A Readline Example - - Here is a function which changes lowercase characters to their uppercase - equivalents, and uppercase characters to lowercase. If - this function was bound to @samp{M-c}, then typing @samp{M-c} would - change the case of the character under point. Typing @samp{M-1 0 M-c} - would change the case of the following 10 characters, leaving the cursor on - the last character changed. - - @example - /* Invert the case of the COUNT following characters. */ - int - invert_case_line (count, key) - int count, key; - @{ - register int start, end, i; - - start = rl_point; - - if (rl_point >= rl_end) - return (0); - - if (count < 0) - @{ - direction = -1; - count = -count; - @} - else - direction = 1; - - /* Find the end of the range to modify. */ - end = start + (count * direction); - - /* Force it to be within range. */ - if (end > rl_end) - end = rl_end; - else if (end < 0) - end = 0; - - if (start == end) - return (0); - - if (start > end) - @{ - int temp = start; - start = end; - end = temp; - @} - - /* Tell readline that we are modifying the line, - so it will save the undo information. */ - rl_modifying (start, end); - - for (i = start; i != end; i++) - @{ - if (_rl_uppercase_p (rl_line_buffer[i])) - rl_line_buffer[i] = _rl_to_lower (rl_line_buffer[i]); - else if (_rl_lowercase_p (rl_line_buffer[i])) - rl_line_buffer[i] = _rl_to_upper (rl_line_buffer[i]); - @} - /* Move point to on top of the last character changed. */ - rl_point = (direction == 1) ? end - 1 : start; - return (0); - @} - @end example - - @node Readline Signal Handling - @section Readline Signal Handling - - Signals are asynchronous events sent to a process by the Unix kernel, - sometimes on behalf of another process. They are intended to indicate - exceptional events, like a user pressing the interrupt key on his terminal, - or a network connection being broken. There is a class of signals that can - be sent to the process currently reading input from the keyboard. Since - Readline changes the terminal attributes when it is called, it needs to - perform special processing when such a signal is received in order to - restore the terminal to a sane state, or provide application writers with - functions to do so manually. - - Readline contains an internal signal handler that is installed for a - number of signals (@code{SIGINT}, @code{SIGQUIT}, @code{SIGTERM}, - @code{SIGALRM}, @code{SIGTSTP}, @code{SIGTTIN}, and @code{SIGTTOU}). - When one of these signals is received, the signal handler - will reset the terminal attributes to those that were in effect before - @code{readline()} was called, reset the signal handling to what it was - before @code{readline()} was called, and resend the signal to the calling - application. - If and when the calling application's signal handler returns, Readline - will reinitialize the terminal and continue to accept input. - When a @code{SIGINT} is received, the Readline signal handler performs - some additional work, which will cause any partially-entered line to be - aborted (see the description of @code{rl_free_line_state()} below). - - There is an additional Readline signal handler, for @code{SIGWINCH}, which - the kernel sends to a process whenever the terminal's size changes (for - example, if a user resizes an @code{xterm}). The Readline @code{SIGWINCH} - handler updates Readline's internal screen size information, and then calls - any @code{SIGWINCH} signal handler the calling application has installed. - Readline calls the application's @code{SIGWINCH} signal handler without - resetting the terminal to its original state. If the application's signal - handler does more than update its idea of the terminal size and return (for - example, a @code{longjmp} back to a main processing loop), it @emph{must} - call @code{rl_cleanup_after_signal()} (described below), to restore the - terminal state. - - Readline provides two variables that allow application writers to - control whether or not it will catch certain signals and act on them - when they are received. It is important that applications change the - values of these variables only when calling @code{readline()}, not in - a signal handler, so Readline's internal signal state is not corrupted. - - @deftypevar int rl_catch_signals - If this variable is non-zero, Readline will install signal handlers for - @code{SIGINT}, @code{SIGQUIT}, @code{SIGTERM}, @code{SIGALRM}, - @code{SIGTSTP}, @code{SIGTTIN}, and @code{SIGTTOU}. - - The default value of @code{rl_catch_signals} is 1. - @end deftypevar - - @deftypevar int rl_catch_sigwinch - If this variable is non-zero, Readline will install a signal handler for - @code{SIGWINCH}. - - The default value of @code{rl_catch_sigwinch} is 1. - @end deftypevar - - If an application does not wish to have Readline catch any signals, or - to handle signals other than those Readline catches (@code{SIGHUP}, - for example), - Readline provides convenience functions to do the necessary terminal - and internal state cleanup upon receipt of a signal. - - @deftypefun void rl_cleanup_after_signal (void) - This function will reset the state of the terminal to what it was before - @code{readline()} was called, and remove the Readline signal handlers for - all signals, depending on the values of @code{rl_catch_signals} and - @code{rl_catch_sigwinch}. - @end deftypefun - - @deftypefun void rl_free_line_state (void) - This will free any partial state associated with the current input line - (undo information, any partial history entry, any partially-entered - keyboard macro, and any partially-entered numeric argument). This - should be called before @code{rl_cleanup_after_signal()}. The - Readline signal handler for @code{SIGINT} calls this to abort the - current input line. - @end deftypefun - - @deftypefun void rl_reset_after_signal (void) - This will reinitialize the terminal and reinstall any Readline signal - handlers, depending on the values of @code{rl_catch_signals} and - @code{rl_catch_sigwinch}. - @end deftypefun - - If an application does not wish Readline to catch @code{SIGWINCH}, it may - call @code{rl_resize_terminal()} or @code{rl_set_screen_size()} to force - Readline to update its idea of the terminal size when a @code{SIGWINCH} - is received. - - @deftypefun void rl_resize_terminal (void) - Update Readline's internal screen size by reading values from the kernel. - @end deftypefun - - @deftypefun void rl_set_screen_size (int rows, int cols) - Set Readline's idea of the terminal size to @var{rows} rows and - @var{cols} columns. - @end deftypefun - - If an application does not want to install a @code{SIGWINCH} handler, but - is still interested in the screen dimensions, Readline's idea of the screen - size may be queried. - - @deftypefun void rl_get_screen_size (int *rows, int *cols) - Return Readline's idea of the terminal's size in the - variables pointed to by the arguments. - @end deftypefun - - The following functions install and remove Readline's signal handlers. - - @deftypefun int rl_set_signals (void) - Install Readline's signal handler for @code{SIGINT}, @code{SIGQUIT}, - @code{SIGTERM}, @code{SIGALRM}, @code{SIGTSTP}, @code{SIGTTIN}, - @code{SIGTTOU}, and @code{SIGWINCH}, depending on the values of - @code{rl_catch_signals} and @code{rl_catch_sigwinch}. - @end deftypefun - - @deftypefun int rl_clear_signals (void) - Remove all of the Readline signal handlers installed by - @code{rl_set_signals()}. - @end deftypefun - - @node Custom Completers - @section Custom Completers - - Typically, a program that reads commands from the user has a way of - disambiguating commands and data. If your program is one of these, then - it can provide completion for commands, data, or both. - The following sections describe how your program and Readline - cooperate to provide this service. - - @menu - * How Completing Works:: The logic used to do completion. - * Completion Functions:: Functions provided by Readline. - * Completion Variables:: Variables which control completion. - * A Short Completion Example:: An example of writing completer subroutines. - @end menu - - @node How Completing Works - @subsection How Completing Works - - In order to complete some text, the full list of possible completions - must be available. That is, it is not possible to accurately - expand a partial word without knowing all of the possible words - which make sense in that context. The Readline library provides - the user interface to completion, and two of the most common - completion functions: filename and username. For completing other types - of text, you must write your own completion function. This section - describes exactly what such functions must do, and provides an example. - - There are three major functions used to perform completion: - - @enumerate - @item - The user-interface function @code{rl_complete()}. This function is - called with the same arguments as other bindable Readline functions: - @var{count} and @var{invoking_key}. - It isolates the word to be completed and calls - @code{rl_completion_matches()} to generate a list of possible completions. - It then either lists the possible completions, inserts the possible - completions, or actually performs the - completion, depending on which behavior is desired. - - @item - The internal function @code{rl_completion_matches()} uses an - application-supplied @dfn{generator} function to generate the list of - possible matches, and then returns the array of these matches. - The caller should place the address of its generator function in - @code{rl_completion_entry_function}. - - @item - The generator function is called repeatedly from - @code{rl_completion_matches()}, returning a string each time. The - arguments to the generator function are @var{text} and @var{state}. - @var{text} is the partial word to be completed. @var{state} is zero the - first time the function is called, allowing the generator to perform - any necessary initialization, and a positive non-zero integer for - each subsequent call. The generator function returns - @code{(char *)NULL} to inform @code{rl_completion_matches()} that there are - no more possibilities left. Usually the generator function computes the - list of possible completions when @var{state} is zero, and returns them - one at a time on subsequent calls. Each string the generator function - returns as a match must be allocated with @code{malloc()}; Readline - frees the strings when it has finished with them. - - @end enumerate - - @deftypefun int rl_complete (int ignore, int invoking_key) - Complete the word at or before point. You have supplied the function - that does the initial simple matching selection algorithm (see - @code{rl_completion_matches()}). The default is to do filename completion. - @end deftypefun - - @deftypevar {rl_compentry_func_t *} rl_completion_entry_function - This is a pointer to the generator function for - @code{rl_completion_matches()}. - If the value of @code{rl_completion_entry_function} is - @code{NULL} then the default filename generator - function, @code{rl_filename_completion_function()}, is used. - @end deftypevar - - @node Completion Functions - @subsection Completion Functions - - Here is the complete list of callable completion functions present in - Readline. - - @deftypefun int rl_complete_internal (int what_to_do) - Complete the word at or before point. @var{what_to_do} says what to do - with the completion. A value of @samp{?} means list the possible - completions. @samp{TAB} means do standard completion. @samp{*} means - insert all of the possible completions. @samp{!} means to display - all of the possible completions, if there is more than one, as well as - performing partial completion. - @end deftypefun - - @deftypefun int rl_complete (int ignore, int invoking_key) - Complete the word at or before point. You have supplied the function - that does the initial simple matching selection algorithm (see - @code{rl_completion_matches()} and @code{rl_completion_entry_function}). - The default is to do filename - completion. This calls @code{rl_complete_internal()} with an - argument depending on @var{invoking_key}. - @end deftypefun - - @deftypefun int rl_possible_completions (int count, int invoking_key) - List the possible completions. See description of @code{rl_complete - ()}. This calls @code{rl_complete_internal()} with an argument of - @samp{?}. - @end deftypefun - - @deftypefun int rl_insert_completions (int count, int invoking_key) - Insert the list of possible completions into the line, deleting the - partially-completed word. See description of @code{rl_complete()}. - This calls @code{rl_complete_internal()} with an argument of @samp{*}. - @end deftypefun - - @deftypefun int rl_completion_mode (rl_command_func_t *cfunc) - Returns the apppriate value to pass to @code{rl_complete_internal()} - depending on whether @var{cfunc} was called twice in succession and - the value of the @code{show-all-if-ambiguous} variable. - Application-specific completion functions may use this function to present - the same interface as @code{rl_complete()}. - @end deftypefun - - @deftypefun {char **} rl_completion_matches (const char *text, rl_compentry_func_t *entry_func) - Returns an array of strings which is a list of completions for - @var{text}. If there are no completions, returns @code{NULL}. - The first entry in the returned array is the substitution for @var{text}. - The remaining entries are the possible completions. The array is - terminated with a @code{NULL} pointer. - - @var{entry_func} is a function of two args, and returns a - @code{char *}. The first argument is @var{text}. The second is a - state argument; it is zero on the first call, and non-zero on subsequent - calls. @var{entry_func} returns a @code{NULL} pointer to the caller - when there are no more matches. - @end deftypefun - - @deftypefun {char *} rl_filename_completion_function (const char *text, int state) - A generator function for filename completion in the general case. - @var{text} is a partial filename. - The Bash source is a useful reference for writing custom - completion functions (the Bash completion functions call this and other - Readline functions). - @end deftypefun - - @deftypefun {char *} rl_username_completion_function (const char *text, int state) - A completion generator for usernames. @var{text} contains a partial - username preceded by a random character (usually @samp{~}). As with all - completion generators, @var{state} is zero on the first call and non-zero - for subsequent calls. - @end deftypefun - - @node Completion Variables - @subsection Completion Variables - - @deftypevar {rl_compentry_func_t *} rl_completion_entry_function - A pointer to the generator function for @code{rl_completion_matches()}. - @code{NULL} means to use @code{rl_filename_completion_function()}, the default - filename completer. - @end deftypevar - - @deftypevar {rl_completion_func_t *} rl_attempted_completion_function - A pointer to an alternative function to create matches. - The function is called with @var{text}, @var{start}, and @var{end}. - @var{start} and @var{end} are indices in @code{rl_line_buffer} defining - the boundaries of @var{text}, which is a character string. - If this function exists and returns @code{NULL}, or if this variable is - set to @code{NULL}, then @code{rl_complete()} will call the value of - @code{rl_completion_entry_function} to generate matches, otherwise the - array of strings returned will be used. - If this function sets the @code{rl_attempted_completion_over} - variable to a non-zero value, Readline will not perform its default - completion even if this function returns no matches. - @end deftypevar - - @deftypevar {rl_quote_func_t *} rl_filename_quoting_function - A pointer to a function that will quote a filename in an - application-specific fashion. This is called if filename completion is being - attempted and one of the characters in @code{rl_filename_quote_characters} - appears in a completed filename. The function is called with - @var{text}, @var{match_type}, and @var{quote_pointer}. The @var{text} - is the filename to be quoted. The @var{match_type} is either - @code{SINGLE_MATCH}, if there is only one completion match, or - @code{MULT_MATCH}. Some functions use this to decide whether or not to - insert a closing quote character. The @var{quote_pointer} is a pointer - to any opening quote character the user typed. Some functions choose - to reset this character. - @end deftypevar - - @deftypevar {rl_dequote_func_t *} rl_filename_dequoting_function - A pointer to a function that will remove application-specific quoting - characters from a filename before completion is attempted, so those - characters do not interfere with matching the text against names in - the filesystem. It is called with @var{text}, the text of the word - to be dequoted, and @var{quote_char}, which is the quoting character - that delimits the filename (usually @samp{'} or @samp{"}). If - @var{quote_char} is zero, the filename was not in an embedded string. - @end deftypevar - - @deftypevar {rl_linebuf_func_t *} rl_char_is_quoted_p - A pointer to a function to call that determines whether or not a specific - character in the line buffer is quoted, according to whatever quoting - mechanism the program calling Readline uses. The function is called with - two arguments: @var{text}, the text of the line, and @var{index}, the - index of the character in the line. It is used to decide whether a - character found in @code{rl_completer_word_break_characters} should be - used to break words for the completer. - @end deftypevar - - @deftypevar {rl_compignore_func_t *} rl_ignore_some_completions_function - This function, if defined, is called by the completer when real filename - completion is done, after all the matching names have been generated. - It is passed a @code{NULL} terminated array of matches. - The first element (@code{matches[0]}) is the - maximal substring common to all matches. This function can - re-arrange the list of matches as required, but each element deleted - from the array must be freed. - @end deftypevar - - @deftypevar {rl_icppfunc_t *} rl_directory_completion_hook - This function, if defined, is allowed to modify the directory portion - of filenames Readline completes. It is called with the address of a - string (the current directory name) as an argument, and may modify that string. - If the string is replaced with a new string, the old value should be freed. - Any modified directory name should have a trailing slash. - The modified value will be displayed as part of the completion, replacing - the directory portion of the pathname the user typed. - It returns an integer that should be non-zero if the function modifies - its directory argument. - It could be used to expand symbolic links or shell variables in pathnames. - @end deftypevar - - @deftypevar {rl_compdisp_func_t *} rl_completion_display_matches_hook - If non-zero, then this is the address of a function to call when - completing a word would normally display the list of possible matches. - This function is called in lieu of Readline displaying the list. - It takes three arguments: - (@code{char **}@var{matches}, @code{int} @var{num_matches}, @code{int} @var{max_length}) - where @var{matches} is the array of matching strings, - @var{num_matches} is the number of strings in that array, and - @var{max_length} is the length of the longest string in that array. - Readline provides a convenience function, @code{rl_display_match_list}, - that takes care of doing the display to Readline's output stream. That - function may be called from this hook. - @end deftypevar - - @deftypevar {const char *} rl_basic_word_break_characters - The basic list of characters that signal a break between words for the - completer routine. The default value of this variable is the characters - which break words for completion in Bash: - @code{" \t\n\"\\'`@@$><=;|&@{("}. - @end deftypevar - - @deftypevar {const char *} rl_basic_quote_characters - A list of quote characters which can cause a word break. - @end deftypevar - - @deftypevar {const char *} rl_completer_word_break_characters - The list of characters that signal a break between words for - @code{rl_complete_internal()}. The default list is the value of - @code{rl_basic_word_break_characters}. - @end deftypevar - - @deftypevar {const char *} rl_completer_quote_characters - A list of characters which can be used to quote a substring of the line. - Completion occurs on the entire substring, and within the substring - @code{rl_completer_word_break_characters} are treated as any other character, - unless they also appear within this list. - @end deftypevar - - @deftypevar {const char *} rl_filename_quote_characters - A list of characters that cause a filename to be quoted by the completer - when they appear in a completed filename. The default is the null string. - @end deftypevar - - @deftypevar {const char *} rl_special_prefixes - The list of characters that are word break characters, but should be - left in @var{text} when it is passed to the completion function. - Programs can use this to help determine what kind of completing to do. - For instance, Bash sets this variable to "$@@" so that it can complete - shell variables and hostnames. - @end deftypevar - - @deftypevar int rl_completion_query_items - Up to this many items will be displayed in response to a - possible-completions call. After that, we ask the user if she is sure - she wants to see them all. The default value is 100. - @end deftypevar - - @deftypevar {int} rl_completion_append_character - When a single completion alternative matches at the end of the command - line, this character is appended to the inserted completion text. The - default is a space character (@samp{ }). Setting this to the null - character (@samp{\0}) prevents anything being appended automatically. - This can be changed in custom completion functions to - provide the ``most sensible word separator character'' according to - an application-specific command line syntax specification. - @end deftypevar - - @deftypevar int rl_completion_suppress_append - If non-zero, @var{rl_completion_append_character} is not appended to - matches at the end of the command line, as described above. It is - set to 0 before any application-specific completion function is called. - @end deftypevar - - @deftypevar int rl_completion_mark_symlink_dirs - If non-zero, a slash will be appended to completed filenames that are - symbolic links to directory names, subject to the value of the - user-settable @var{mark-directories} variable. - This variable exists so that application completion functions can - override the user's global preference (set via the - @var{mark-symlinked-directories} Readline variable) if appropriate. - This variable is set to the user's preference before any - application completion function is called, so unless that function - modifies the value, the user's preferences are honored. - @end deftypevar - - @deftypevar int rl_ignore_completion_duplicates - If non-zero, then duplicates in the matches are removed. - The default is 1. - @end deftypevar - - @deftypevar int rl_filename_completion_desired - Non-zero means that the results of the matches are to be treated as - filenames. This is @emph{always} zero on entry, and can only be changed - within a completion entry generator function. If it is set to a non-zero - value, directory names have a slash appended and Readline attempts to - quote completed filenames if they contain any characters in - @code{rl_filename_quote_characters} and @code{rl_filename_quoting_desired} - is set to a non-zero value. - @end deftypevar - - @deftypevar int rl_filename_quoting_desired - Non-zero means that the results of the matches are to be quoted using - double quotes (or an application-specific quoting mechanism) if the - completed filename contains any characters in - @code{rl_filename_quote_chars}. This is @emph{always} non-zero - on entry, and can only be changed within a completion entry generator - function. The quoting is effected via a call to the function pointed to - by @code{rl_filename_quoting_function}. - @end deftypevar - - @deftypevar int rl_attempted_completion_over - If an application-specific completion function assigned to - @code{rl_attempted_completion_function} sets this variable to a non-zero - value, Readline will not perform its default filename completion even - if the application's completion function returns no matches. - It should be set only by an application's completion function. - @end deftypevar - - @deftypevar int rl_completion_type - Set to a character describing the type of completion Readline is currently - attempting; see the description of @code{rl_complete_internal()} - (@pxref{Completion Functions}) for the list of characters. - @end deftypevar - - @deftypevar int rl_inhibit_completion - If this variable is non-zero, completion is inhibited. The completion - character will be inserted as any other bound to @code{self-insert}. - @end deftypevar - - @node A Short Completion Example - @subsection A Short Completion Example - - Here is a small application demonstrating the use of the GNU Readline - library. It is called @code{fileman}, and the source code resides in - @file{examples/fileman.c}. This sample application provides - completion of command names, line editing features, and access to the - history list. - - @page - @smallexample - /* fileman.c -- A tiny application which demonstrates how to use the - GNU Readline library. This application interactively allows users - to manipulate files and their modes. */ - - #include - #include - #include - #include - #include - - #include - #include - - extern char *xmalloc (); - - /* The names of functions that actually do the manipulation. */ - int com_list __P((char *)); - int com_view __P((char *)); - int com_rename __P((char *)); - int com_stat __P((char *)); - int com_pwd __P((char *)); - int com_delete __P((char *)); - int com_help __P((char *)); - int com_cd __P((char *)); - int com_quit __P((char *)); - - /* A structure which contains information on the commands this program - can understand. */ - - typedef struct @{ - char *name; /* User printable name of the function. */ - rl_icpfunc_t *func; /* Function to call to do the job. */ - char *doc; /* Documentation for this function. */ - @} COMMAND; - - COMMAND commands[] = @{ - @{ "cd", com_cd, "Change to directory DIR" @}, - @{ "delete", com_delete, "Delete FILE" @}, - @{ "help", com_help, "Display this text" @}, - @{ "?", com_help, "Synonym for `help'" @}, - @{ "list", com_list, "List files in DIR" @}, - @{ "ls", com_list, "Synonym for `list'" @}, - @{ "pwd", com_pwd, "Print the current working directory" @}, - @{ "quit", com_quit, "Quit using Fileman" @}, - @{ "rename", com_rename, "Rename FILE to NEWNAME" @}, - @{ "stat", com_stat, "Print out statistics on FILE" @}, - @{ "view", com_view, "View the contents of FILE" @}, - @{ (char *)NULL, (rl_icpfunc_t *)NULL, (char *)NULL @} - @}; - - /* Forward declarations. */ - char *stripwhite (); - COMMAND *find_command (); - - /* The name of this program, as taken from argv[0]. */ - char *progname; - - /* When non-zero, this means the user is done using this program. */ - int done; - - char * - dupstr (s) - int s; - @{ - char *r; - - r = xmalloc (strlen (s) + 1); - strcpy (r, s); - return (r); - @} - - main (argc, argv) - int argc; - char **argv; - @{ - char *line, *s; - - progname = argv[0]; - - initialize_readline (); /* Bind our completer. */ - - /* Loop reading and executing lines until the user quits. */ - for ( ; done == 0; ) - @{ - line = readline ("FileMan: "); - - if (!line) - break; - - /* Remove leading and trailing whitespace from the line. - Then, if there is anything left, add it to the history list - and execute it. */ - s = stripwhite (line); - - if (*s) - @{ - add_history (s); - execute_line (s); - @} - - free (line); - @} - exit (0); - @} - - /* Execute a command line. */ - int - execute_line (line) - char *line; - @{ - register int i; - COMMAND *command; - char *word; - - /* Isolate the command word. */ - i = 0; - while (line[i] && whitespace (line[i])) - i++; - word = line + i; - - while (line[i] && !whitespace (line[i])) - i++; - - if (line[i]) - line[i++] = '\0'; - - command = find_command (word); - - if (!command) - @{ - fprintf (stderr, "%s: No such command for FileMan.\n", word); - return (-1); - @} - - /* Get argument to command, if any. */ - while (whitespace (line[i])) - i++; - - word = line + i; - - /* Call the function. */ - return ((*(command->func)) (word)); - @} - - /* Look up NAME as the name of a command, and return a pointer to that - command. Return a NULL pointer if NAME isn't a command name. */ - COMMAND * - find_command (name) - char *name; - @{ - register int i; - - for (i = 0; commands[i].name; i++) - if (strcmp (name, commands[i].name) == 0) - return (&commands[i]); - - return ((COMMAND *)NULL); - @} - - /* Strip whitespace from the start and end of STRING. Return a pointer - into STRING. */ - char * - stripwhite (string) - char *string; - @{ - register char *s, *t; - - for (s = string; whitespace (*s); s++) - ; - - if (*s == 0) - return (s); - - t = s + strlen (s) - 1; - while (t > s && whitespace (*t)) - t--; - *++t = '\0'; - - return s; - @} - - /* **************************************************************** */ - /* */ - /* Interface to Readline Completion */ - /* */ - /* **************************************************************** */ - - char *command_generator __P((const char *, int)); - char **fileman_completion __P((const char *, int, int)); - - /* Tell the GNU Readline library how to complete. We want to try to - complete on command names if this is the first word in the line, or - on filenames if not. */ - initialize_readline () - @{ - /* Allow conditional parsing of the ~/.inputrc file. */ - rl_readline_name = "FileMan"; - - /* Tell the completer that we want a crack first. */ - rl_attempted_completion_function = fileman_completion; - @} - - /* Attempt to complete on the contents of TEXT. START and END - bound the region of rl_line_buffer that contains the word to - complete. TEXT is the word to complete. We can use the entire - contents of rl_line_buffer in case we want to do some simple - parsing. Returnthe array of matches, or NULL if there aren't any. */ - char ** - fileman_completion (text, start, end) - const char *text; - int start, end; - @{ - char **matches; - - matches = (char **)NULL; - - /* If this word is at the start of the line, then it is a command - to complete. Otherwise it is the name of a file in the current - directory. */ - if (start == 0) - matches = rl_completion_matches (text, command_generator); - - return (matches); - @} - - /* Generator function for command completion. STATE lets us - know whether to start from scratch; without any state - (i.e. STATE == 0), then we start at the top of the list. */ - char * - command_generator (text, state) - const char *text; - int state; - @{ - static int list_index, len; - char *name; - - /* If this is a new word to complete, initialize now. This - includes saving the length of TEXT for efficiency, and - initializing the index variable to 0. */ - if (!state) - @{ - list_index = 0; - len = strlen (text); - @} - - /* Return the next name which partially matches from the - command list. */ - while (name = commands[list_index].name) - @{ - list_index++; - - if (strncmp (name, text, len) == 0) - return (dupstr(name)); - @} - - /* If no names matched, then return NULL. */ - return ((char *)NULL); - @} - - /* **************************************************************** */ - /* */ - /* FileMan Commands */ - /* */ - /* **************************************************************** */ - - /* String to pass to system (). This is for the LIST, VIEW and RENAME - commands. */ - static char syscom[1024]; - - /* List the file(s) named in arg. */ - com_list (arg) - char *arg; - @{ - if (!arg) - arg = ""; - - sprintf (syscom, "ls -FClg %s", arg); - return (system (syscom)); - @} - - com_view (arg) - char *arg; - @{ - if (!valid_argument ("view", arg)) - return 1; - - sprintf (syscom, "more %s", arg); - return (system (syscom)); - @} - - com_rename (arg) - char *arg; - @{ - too_dangerous ("rename"); - return (1); - @} - - com_stat (arg) - char *arg; - @{ - struct stat finfo; - - if (!valid_argument ("stat", arg)) - return (1); - - if (stat (arg, &finfo) == -1) - @{ - perror (arg); - return (1); - @} - - printf ("Statistics for `%s':\n", arg); - - printf ("%s has %d link%s, and is %d byte%s in length.\n", arg, - finfo.st_nlink, - (finfo.st_nlink == 1) ? "" : "s", - finfo.st_size, - (finfo.st_size == 1) ? "" : "s"); - printf ("Inode Last Change at: %s", ctime (&finfo.st_ctime)); - printf (" Last access at: %s", ctime (&finfo.st_atime)); - printf (" Last modified at: %s", ctime (&finfo.st_mtime)); - return (0); - @} - - com_delete (arg) - char *arg; - @{ - too_dangerous ("delete"); - return (1); - @} - - /* Print out help for ARG, or for all of the commands if ARG is - not present. */ - com_help (arg) - char *arg; - @{ - register int i; - int printed = 0; - - for (i = 0; commands[i].name; i++) - @{ - if (!*arg || (strcmp (arg, commands[i].name) == 0)) - @{ - printf ("%s\t\t%s.\n", commands[i].name, commands[i].doc); - printed++; - @} - @} - - if (!printed) - @{ - printf ("No commands match `%s'. Possibilties are:\n", arg); - - for (i = 0; commands[i].name; i++) - @{ - /* Print in six columns. */ - if (printed == 6) - @{ - printed = 0; - printf ("\n"); - @} - - printf ("%s\t", commands[i].name); - printed++; - @} - - if (printed) - printf ("\n"); - @} - return (0); - @} - - /* Change to the directory ARG. */ - com_cd (arg) - char *arg; - @{ - if (chdir (arg) == -1) - @{ - perror (arg); - return 1; - @} - - com_pwd (""); - return (0); - @} - - /* Print out the current working directory. */ - com_pwd (ignore) - char *ignore; - @{ - char dir[1024], *s; - - s = getcwd (dir, sizeof(dir) - 1); - if (s == 0) - @{ - printf ("Error getting pwd: %s\n", dir); - return 1; - @} - - printf ("Current directory is %s\n", dir); - return 0; - @} - - /* The user wishes to quit using this program. Just set DONE - non-zero. */ - com_quit (arg) - char *arg; - @{ - done = 1; - return (0); - @} - - /* Function which tells you that you can't do this. */ - too_dangerous (caller) - char *caller; - @{ - fprintf (stderr, - "%s: Too dangerous for me to distribute.\n" - caller); - fprintf (stderr, "Write it yourself.\n"); - @} - - /* Return non-zero if ARG is a valid argument for CALLER, - else print an error message and return zero. */ - int - valid_argument (caller, arg) - char *caller, *arg; - @{ - if (!arg || !*arg) - @{ - fprintf (stderr, "%s: Argument required.\n", caller); - return (0); - @} - - return (1); - @} - @end smallexample --- 0 ---- diff -aNrc2 bash-2.05b-patched/lib/readline/doc/rluser.texi bash-3.0/lib/readline/doc/rluser.texi *** bash-2.05b-patched/lib/readline/doc/rluser.texi Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/readline/doc/rluser.texi Sat Apr 24 14:46:33 2004 *************** *** 0 **** --- 1,1824 ---- + @comment %**start of header (This is for running Texinfo on a region.) + @setfilename rluser.info + @comment %**end of header (This is for running Texinfo on a region.) + @setchapternewpage odd + + @ignore + This file documents the end user interface to the GNU command line + editing features. It is to be an appendix to manuals for programs which + use these features. There is a document entitled "readline.texinfo" + which contains both end-user and programmer documentation for the + GNU Readline Library. + + Copyright (C) 1988-2004 Free Software Foundation, Inc. + + Authored by Brian Fox and Chet Ramey. + + Permission is granted to process this file through Tex and print the + results, provided the printed document carries copying permission notice + identical to this one except for the removal of this paragraph (this + paragraph not being relevant to the printed manual). + + Permission is granted to make and distribute verbatim copies of this manual + provided the copyright notice and this permission notice are preserved on + all copies. + + Permission is granted to copy and distribute modified versions of this + manual under the conditions for verbatim copying, provided also that the + GNU Copyright statement is available to the distributee, and provided that + the entire resulting derived work is distributed under the terms of a + permission notice identical to this one. + + Permission is granted to copy and distribute translations of this manual + into another language, under the above conditions for modified versions. + @end ignore + + @comment If you are including this manual as an appendix, then set the + @comment variable readline-appendix. + + @ifclear BashFeatures + @defcodeindex bt + @end ifclear + + @node Command Line Editing + @chapter Command Line Editing + + This chapter describes the basic features of the @sc{gnu} + command line editing interface. + @ifset BashFeatures + Command line editing is provided by the Readline library, which is + used by several different programs, including Bash. + @end ifset + + @menu + * Introduction and Notation:: Notation used in this text. + * Readline Interaction:: The minimum set of commands for editing a line. + * Readline Init File:: Customizing Readline from a user's view. + * Bindable Readline Commands:: A description of most of the Readline commands + available for binding + * Readline vi Mode:: A short description of how to make Readline + behave like the vi editor. + @ifset BashFeatures + * Programmable Completion:: How to specify the possible completions for + a specific command. + * Programmable Completion Builtins:: Builtin commands to specify how to + complete arguments for a particular command. + @end ifset + @end menu + + @node Introduction and Notation + @section Introduction to Line Editing + + The following paragraphs describe the notation used to represent + keystrokes. + + The text @kbd{C-k} is read as `Control-K' and describes the character + produced when the @key{k} key is pressed while the Control key + is depressed. + + The text @kbd{M-k} is read as `Meta-K' and describes the character + produced when the Meta key (if you have one) is depressed, and the @key{k} + key is pressed. + The Meta key is labeled @key{ALT} on many keyboards. + On keyboards with two keys labeled @key{ALT} (usually to either side of + the space bar), the @key{ALT} on the left side is generally set to + work as a Meta key. + The @key{ALT} key on the right may also be configured to work as a + Meta key or may be configured as some other modifier, such as a + Compose key for typing accented characters. + + If you do not have a Meta or @key{ALT} key, or another key working as + a Meta key, the identical keystroke can be generated by typing @key{ESC} + @emph{first}, and then typing @key{k}. + Either process is known as @dfn{metafying} the @key{k} key. + + The text @kbd{M-C-k} is read as `Meta-Control-k' and describes the + character produced by @dfn{metafying} @kbd{C-k}. + + In addition, several keys have their own names. Specifically, + @key{DEL}, @key{ESC}, @key{LFD}, @key{SPC}, @key{RET}, and @key{TAB} all + stand for themselves when seen in this text, or in an init file + (@pxref{Readline Init File}). + If your keyboard lacks a @key{LFD} key, typing @key{C-j} will + produce the desired character. + The @key{RET} key may be labeled @key{Return} or @key{Enter} on + some keyboards. + + @node Readline Interaction + @section Readline Interaction + @cindex interaction, readline + + Often during an interactive session you type in a long line of text, + only to notice that the first word on the line is misspelled. The + Readline library gives you a set of commands for manipulating the text + as you type it in, allowing you to just fix your typo, and not forcing + you to retype the majority of the line. Using these editing commands, + you move the cursor to the place that needs correction, and delete or + insert the text of the corrections. Then, when you are satisfied with + the line, you simply press @key{RET}. You do not have to be at the + end of the line to press @key{RET}; the entire line is accepted + regardless of the location of the cursor within the line. + + @menu + * Readline Bare Essentials:: The least you need to know about Readline. + * Readline Movement Commands:: Moving about the input line. + * Readline Killing Commands:: How to delete text, and how to get it back! + * Readline Arguments:: Giving numeric arguments to commands. + * Searching:: Searching through previous lines. + @end menu + + @node Readline Bare Essentials + @subsection Readline Bare Essentials + @cindex notation, readline + @cindex command editing + @cindex editing command lines + + In order to enter characters into the line, simply type them. The typed + character appears where the cursor was, and then the cursor moves one + space to the right. If you mistype a character, you can use your + erase character to back up and delete the mistyped character. + + Sometimes you may mistype a character, and + not notice the error until you have typed several other characters. In + that case, you can type @kbd{C-b} to move the cursor to the left, and then + correct your mistake. Afterwards, you can move the cursor to the right + with @kbd{C-f}. + + When you add text in the middle of a line, you will notice that characters + to the right of the cursor are `pushed over' to make room for the text + that you have inserted. Likewise, when you delete text behind the cursor, + characters to the right of the cursor are `pulled back' to fill in the + blank space created by the removal of the text. A list of the bare + essentials for editing the text of an input line follows. + + @table @asis + @item @kbd{C-b} + Move back one character. + @item @kbd{C-f} + Move forward one character. + @item @key{DEL} or @key{Backspace} + Delete the character to the left of the cursor. + @item @kbd{C-d} + Delete the character underneath the cursor. + @item @w{Printing characters} + Insert the character into the line at the cursor. + @item @kbd{C-_} or @kbd{C-x C-u} + Undo the last editing command. You can undo all the way back to an + empty line. + @end table + + @noindent + (Depending on your configuration, the @key{Backspace} key be set to + delete the character to the left of the cursor and the @key{DEL} key set + to delete the character underneath the cursor, like @kbd{C-d}, rather + than the character to the left of the cursor.) + + @node Readline Movement Commands + @subsection Readline Movement Commands + + + The above table describes the most basic keystrokes that you need + in order to do editing of the input line. For your convenience, many + other commands have been added in addition to @kbd{C-b}, @kbd{C-f}, + @kbd{C-d}, and @key{DEL}. Here are some commands for moving more rapidly + about the line. + + @table @kbd + @item C-a + Move to the start of the line. + @item C-e + Move to the end of the line. + @item M-f + Move forward a word, where a word is composed of letters and digits. + @item M-b + Move backward a word. + @item C-l + Clear the screen, reprinting the current line at the top. + @end table + + Notice how @kbd{C-f} moves forward a character, while @kbd{M-f} moves + forward a word. It is a loose convention that control keystrokes + operate on characters while meta keystrokes operate on words. + + @node Readline Killing Commands + @subsection Readline Killing Commands + + @cindex killing text + @cindex yanking text + + @dfn{Killing} text means to delete the text from the line, but to save + it away for later use, usually by @dfn{yanking} (re-inserting) + it back into the line. + (`Cut' and `paste' are more recent jargon for `kill' and `yank'.) + + If the description for a command says that it `kills' text, then you can + be sure that you can get the text back in a different (or the same) + place later. + + When you use a kill command, the text is saved in a @dfn{kill-ring}. + Any number of consecutive kills save all of the killed text together, so + that when you yank it back, you get it all. The kill + ring is not line specific; the text that you killed on a previously + typed line is available to be yanked back later, when you are typing + another line. + @cindex kill ring + + Here is the list of commands for killing text. + + @table @kbd + @item C-k + Kill the text from the current cursor position to the end of the line. + + @item M-d + Kill from the cursor to the end of the current word, or, if between + words, to the end of the next word. + Word boundaries are the same as those used by @kbd{M-f}. + + @item M-@key{DEL} + Kill from the cursor the start of the current word, or, if between + words, to the start of the previous word. + Word boundaries are the same as those used by @kbd{M-b}. + + @item C-w + Kill from the cursor to the previous whitespace. This is different than + @kbd{M-@key{DEL}} because the word boundaries differ. + + @end table + + Here is how to @dfn{yank} the text back into the line. Yanking + means to copy the most-recently-killed text from the kill buffer. + + @table @kbd + @item C-y + Yank the most recently killed text back into the buffer at the cursor. + + @item M-y + Rotate the kill-ring, and yank the new top. You can only do this if + the prior command is @kbd{C-y} or @kbd{M-y}. + @end table + + @node Readline Arguments + @subsection Readline Arguments + + You can pass numeric arguments to Readline commands. Sometimes the + argument acts as a repeat count, other times it is the @i{sign} of the + argument that is significant. If you pass a negative argument to a + command which normally acts in a forward direction, that command will + act in a backward direction. For example, to kill text back to the + start of the line, you might type @samp{M-- C-k}. + + The general way to pass numeric arguments to a command is to type meta + digits before the command. If the first `digit' typed is a minus + sign (@samp{-}), then the sign of the argument will be negative. Once + you have typed one meta digit to get the argument started, you can type + the remainder of the digits, and then the command. For example, to give + the @kbd{C-d} command an argument of 10, you could type @samp{M-1 0 C-d}, + which will delete the next ten characters on the input line. + + @node Searching + @subsection Searching for Commands in the History + + Readline provides commands for searching through the command history + @ifset BashFeatures + (@pxref{Bash History Facilities}) + @end ifset + for lines containing a specified string. + There are two search modes: @dfn{incremental} and @dfn{non-incremental}. + + Incremental searches begin before the user has finished typing the + search string. + As each character of the search string is typed, Readline displays + the next entry from the history matching the string typed so far. + An incremental search requires only as many characters as needed to + find the desired history entry. + To search backward in the history for a particular string, type + @kbd{C-r}. Typing @kbd{C-s} searches forward through the history. + The characters present in the value of the @code{isearch-terminators} variable + are used to terminate an incremental search. + If that variable has not been assigned a value, the @key{ESC} and + @kbd{C-J} characters will terminate an incremental search. + @kbd{C-g} will abort an incremental search and restore the original line. + When the search is terminated, the history entry containing the + search string becomes the current line. + + To find other matching entries in the history list, type @kbd{C-r} or + @kbd{C-s} as appropriate. + This will search backward or forward in the history for the next + entry matching the search string typed so far. + Any other key sequence bound to a Readline command will terminate + the search and execute that command. + For instance, a @key{RET} will terminate the search and accept + the line, thereby executing the command from the history list. + A movement command will terminate the search, make the last line found + the current line, and begin editing. + + Readline remembers the last incremental search string. If two + @kbd{C-r}s are typed without any intervening characters defining a new + search string, any remembered search string is used. + + Non-incremental searches read the entire search string before starting + to search for matching history lines. The search string may be + typed by the user or be part of the contents of the current line. + + @node Readline Init File + @section Readline Init File + @cindex initialization file, readline + + Although the Readline library comes with a set of Emacs-like + keybindings installed by default, it is possible to use a different set + of keybindings. + Any user can customize programs that use Readline by putting + commands in an @dfn{inputrc} file, conventionally in his home directory. + The name of this + @ifset BashFeatures + file is taken from the value of the shell variable @env{INPUTRC}. If + @end ifset + @ifclear BashFeatures + file is taken from the value of the environment variable @env{INPUTRC}. If + @end ifclear + that variable is unset, the default is @file{~/.inputrc}. + + When a program which uses the Readline library starts up, the + init file is read, and the key bindings are set. + + In addition, the @code{C-x C-r} command re-reads this init file, thus + incorporating any changes that you might have made to it. + + @menu + * Readline Init File Syntax:: Syntax for the commands in the inputrc file. + + * Conditional Init Constructs:: Conditional key bindings in the inputrc file. + + * Sample Init File:: An example inputrc file. + @end menu + + @node Readline Init File Syntax + @subsection Readline Init File Syntax + + There are only a few basic constructs allowed in the + Readline init file. Blank lines are ignored. + Lines beginning with a @samp{#} are comments. + Lines beginning with a @samp{$} indicate conditional + constructs (@pxref{Conditional Init Constructs}). Other lines + denote variable settings and key bindings. + + @table @asis + @item Variable Settings + You can modify the run-time behavior of Readline by + altering the values of variables in Readline + using the @code{set} command within the init file. + The syntax is simple: + + @example + set @var{variable} @var{value} + @end example + + @noindent + Here, for example, is how to + change from the default Emacs-like key binding to use + @code{vi} line editing commands: + + @example + set editing-mode vi + @end example + + Variable names and values, where appropriate, are recognized without regard + to case. + + @ifset BashFeatures + The @w{@code{bind -V}} command lists the current Readline variable names + and values. @xref{Bash Builtins}. + @end ifset + + A great deal of run-time behavior is changeable with the following + variables. + + @cindex variables, readline + @table @code + + @item bell-style + @vindex bell-style + Controls what happens when Readline wants to ring the terminal bell. + If set to @samp{none}, Readline never rings the bell. If set to + @samp{visible}, Readline uses a visible bell if one is available. + If set to @samp{audible} (the default), Readline attempts to ring + the terminal's bell. + + @item comment-begin + @vindex comment-begin + The string to insert at the beginning of the line when the + @code{insert-comment} command is executed. The default value + is @code{"#"}. + + @item completion-ignore-case + If set to @samp{on}, Readline performs filename matching and completion + in a case-insensitive fashion. + The default value is @samp{off}. + + @item completion-query-items + @vindex completion-query-items + The number of possible completions that determines when the user is + asked whether the list of possibilities should be displayed. + If the number of possible completions is greater than this value, + Readline will ask the user whether or not he wishes to view + them; otherwise, they are simply listed. + This variable must be set to an integer value greater than or equal to 0. + The default limit is @code{100}. + + @item convert-meta + @vindex convert-meta + If set to @samp{on}, Readline will convert characters with the + eighth bit set to an @sc{ascii} key sequence by stripping the eighth + bit and prefixing an @key{ESC} character, converting them to a + meta-prefixed key sequence. The default value is @samp{on}. + + @item disable-completion + @vindex disable-completion + If set to @samp{On}, Readline will inhibit word completion. + Completion characters will be inserted into the line as if they had + been mapped to @code{self-insert}. The default is @samp{off}. + + @item editing-mode + @vindex editing-mode + The @code{editing-mode} variable controls which default set of + key bindings is used. By default, Readline starts up in Emacs editing + mode, where the keystrokes are most similar to Emacs. This variable can be + set to either @samp{emacs} or @samp{vi}. + + @item enable-keypad + @vindex enable-keypad + When set to @samp{on}, Readline will try to enable the application + keypad when it is called. Some systems need this to enable the + arrow keys. The default is @samp{off}. + + @item expand-tilde + @vindex expand-tilde + If set to @samp{on}, tilde expansion is performed when Readline + attempts word completion. The default is @samp{off}. + + @vindex history-preserve-point + If set to @samp{on}, the history code attempts to place point at the + same location on each history line retrieved with @code{previous-history} + or @code{next-history}. + + @item horizontal-scroll-mode + @vindex horizontal-scroll-mode + This variable can be set to either @samp{on} or @samp{off}. Setting it + to @samp{on} means that the text of the lines being edited will scroll + horizontally on a single screen line when they are longer than the width + of the screen, instead of wrapping onto a new screen line. By default, + this variable is set to @samp{off}. + + @item input-meta + @vindex input-meta + @vindex meta-flag + If set to @samp{on}, Readline will enable eight-bit input (it + will not clear the eighth bit in the characters it reads), + regardless of what the terminal claims it can support. The + default value is @samp{off}. The name @code{meta-flag} is a + synonym for this variable. + + @item isearch-terminators + @vindex isearch-terminators + The string of characters that should terminate an incremental search without + subsequently executing the character as a command (@pxref{Searching}). + If this variable has not been given a value, the characters @key{ESC} and + @kbd{C-J} will terminate an incremental search. + + @item keymap + @vindex keymap + Sets Readline's idea of the current keymap for key binding commands. + Acceptable @code{keymap} names are + @code{emacs}, + @code{emacs-standard}, + @code{emacs-meta}, + @code{emacs-ctlx}, + @code{vi}, + @code{vi-move}, + @code{vi-command}, and + @code{vi-insert}. + @code{vi} is equivalent to @code{vi-command}; @code{emacs} is + equivalent to @code{emacs-standard}. The default value is @code{emacs}. + The value of the @code{editing-mode} variable also affects the + default keymap. + + @item mark-directories + If set to @samp{on}, completed directory names have a slash + appended. The default is @samp{on}. + + @item mark-modified-lines + @vindex mark-modified-lines + This variable, when set to @samp{on}, causes Readline to display an + asterisk (@samp{*}) at the start of history lines which have been modified. + This variable is @samp{off} by default. + + @item mark-symlinked-directories + @vindex mark-symlinked-directories + If set to @samp{on}, completed names which are symbolic links + to directories have a slash appended (subject to the value of + @code{mark-directories}). + The default is @samp{off}. + + @item match-hidden-files + @vindex match-hidden-files + This variable, when set to @samp{on}, causes Readline to match files whose + names begin with a @samp{.} (hidden files) when performing filename + completion, unless the leading @samp{.} is + supplied by the user in the filename to be completed. + This variable is @samp{on} by default. + + @item output-meta + @vindex output-meta + If set to @samp{on}, Readline will display characters with the + eighth bit set directly rather than as a meta-prefixed escape + sequence. The default is @samp{off}. + + @item page-completions + @vindex page-completions + If set to @samp{on}, Readline uses an internal @code{more}-like pager + to display a screenful of possible completions at a time. + This variable is @samp{on} by default. + + @item print-completions-horizontally + If set to @samp{on}, Readline will display completions with matches + sorted horizontally in alphabetical order, rather than down the screen. + The default is @samp{off}. + + @item show-all-if-ambiguous + @vindex show-all-if-ambiguous + This alters the default behavior of the completion functions. If + set to @samp{on}, + words which have more than one possible completion cause the + matches to be listed immediately instead of ringing the bell. + The default value is @samp{off}. + + @item show-all-if-unmodified + @vindex show-all-if-unmodified + This alters the default behavior of the completion functions in + a fashion similar to @var{show-all-if-ambiguous}. + If set to @samp{on}, + words which have more than one possible completion without any + possible partial completion (the possible completions don't share + a common prefix) cause the matches to be listed immediately instead + of ringing the bell. + The default value is @samp{off}. + + @item visible-stats + @vindex visible-stats + If set to @samp{on}, a character denoting a file's type + is appended to the filename when listing possible + completions. The default is @samp{off}. + + @end table + + @item Key Bindings + The syntax for controlling key bindings in the init file is + simple. First you need to find the name of the command that you + want to change. The following sections contain tables of the command + name, the default keybinding, if any, and a short description of what + the command does. + + Once you know the name of the command, simply place on a line + in the init file the name of the key + you wish to bind the command to, a colon, and then the name of the + command. The name of the key + can be expressed in different ways, depending on what you find most + comfortable. + + In addition to command names, readline allows keys to be bound + to a string that is inserted when the key is pressed (a @var{macro}). + + @ifset BashFeatures + The @w{@code{bind -p}} command displays Readline function names and + bindings in a format that can put directly into an initialization file. + @xref{Bash Builtins}. + @end ifset + + @table @asis + @item @w{@var{keyname}: @var{function-name} or @var{macro}} + @var{keyname} is the name of a key spelled out in English. For example: + @example + Control-u: universal-argument + Meta-Rubout: backward-kill-word + Control-o: "> output" + @end example + + In the above example, @kbd{C-u} is bound to the function + @code{universal-argument}, + @kbd{M-DEL} is bound to the function @code{backward-kill-word}, and + @kbd{C-o} is bound to run the macro + expressed on the right hand side (that is, to insert the text + @samp{> output} into the line). + + A number of symbolic character names are recognized while + processing this key binding syntax: + @var{DEL}, + @var{ESC}, + @var{ESCAPE}, + @var{LFD}, + @var{NEWLINE}, + @var{RET}, + @var{RETURN}, + @var{RUBOUT}, + @var{SPACE}, + @var{SPC}, + and + @var{TAB}. + + @item @w{"@var{keyseq}": @var{function-name} or @var{macro}} + @var{keyseq} differs from @var{keyname} above in that strings + denoting an entire key sequence can be specified, by placing + the key sequence in double quotes. Some @sc{gnu} Emacs style key + escapes can be used, as in the following example, but the + special character names are not recognized. + + @example + "\C-u": universal-argument + "\C-x\C-r": re-read-init-file + "\e[11~": "Function Key 1" + @end example + + In the above example, @kbd{C-u} is again bound to the function + @code{universal-argument} (just as it was in the first example), + @samp{@kbd{C-x} @kbd{C-r}} is bound to the function @code{re-read-init-file}, + and @samp{@key{ESC} @key{[} @key{1} @key{1} @key{~}} is bound to insert + the text @samp{Function Key 1}. + + @end table + + The following @sc{gnu} Emacs style escape sequences are available when + specifying key sequences: + + @table @code + @item @kbd{\C-} + control prefix + @item @kbd{\M-} + meta prefix + @item @kbd{\e} + an escape character + @item @kbd{\\} + backslash + @item @kbd{\"} + @key{"}, a double quotation mark + @item @kbd{\'} + @key{'}, a single quote or apostrophe + @end table + + In addition to the @sc{gnu} Emacs style escape sequences, a second + set of backslash escapes is available: + + @table @code + @item \a + alert (bell) + @item \b + backspace + @item \d + delete + @item \f + form feed + @item \n + newline + @item \r + carriage return + @item \t + horizontal tab + @item \v + vertical tab + @item \@var{nnn} + the eight-bit character whose value is the octal value @var{nnn} + (one to three digits) + @item \x@var{HH} + the eight-bit character whose value is the hexadecimal value @var{HH} + (one or two hex digits) + @end table + + When entering the text of a macro, single or double quotes must + be used to indicate a macro definition. + Unquoted text is assumed to be a function name. + In the macro body, the backslash escapes described above are expanded. + Backslash will quote any other character in the macro text, + including @samp{"} and @samp{'}. + For example, the following binding will make @samp{@kbd{C-x} \} + insert a single @samp{\} into the line: + @example + "\C-x\\": "\\" + @end example + + @end table + + @node Conditional Init Constructs + @subsection Conditional Init Constructs + + Readline implements a facility similar in spirit to the conditional + compilation features of the C preprocessor which allows key + bindings and variable settings to be performed as the result + of tests. There are four parser directives used. + + @table @code + @item $if + The @code{$if} construct allows bindings to be made based on the + editing mode, the terminal being used, or the application using + Readline. The text of the test extends to the end of the line; + no characters are required to isolate it. + + @table @code + @item mode + The @code{mode=} form of the @code{$if} directive is used to test + whether Readline is in @code{emacs} or @code{vi} mode. + This may be used in conjunction + with the @samp{set keymap} command, for instance, to set bindings in + the @code{emacs-standard} and @code{emacs-ctlx} keymaps only if + Readline is starting out in @code{emacs} mode. + + @item term + The @code{term=} form may be used to include terminal-specific + key bindings, perhaps to bind the key sequences output by the + terminal's function keys. The word on the right side of the + @samp{=} is tested against both the full name of the terminal and + the portion of the terminal name before the first @samp{-}. This + allows @code{sun} to match both @code{sun} and @code{sun-cmd}, + for instance. + + @item application + The @var{application} construct is used to include + application-specific settings. Each program using the Readline + library sets the @var{application name}, and you can test for + a particular value. + This could be used to bind key sequences to functions useful for + a specific program. For instance, the following command adds a + key sequence that quotes the current or previous word in Bash: + @example + $if Bash + # Quote the current or previous word + "\C-xq": "\eb\"\ef\"" + $endif + @end example + @end table + + @item $endif + This command, as seen in the previous example, terminates an + @code{$if} command. + + @item $else + Commands in this branch of the @code{$if} directive are executed if + the test fails. + + @item $include + This directive takes a single filename as an argument and reads commands + and bindings from that file. + For example, the following directive reads from @file{/etc/inputrc}: + @example + $include /etc/inputrc + @end example + @end table + + @node Sample Init File + @subsection Sample Init File + + Here is an example of an @var{inputrc} file. This illustrates key + binding, variable assignment, and conditional syntax. + + @example + @page + # This file controls the behaviour of line input editing for + # programs that use the GNU Readline library. Existing + # programs include FTP, Bash, and GDB. + # + # You can re-read the inputrc file with C-x C-r. + # Lines beginning with '#' are comments. + # + # First, include any systemwide bindings and variable + # assignments from /etc/Inputrc + $include /etc/Inputrc + + # + # Set various bindings for emacs mode. + + set editing-mode emacs + + $if mode=emacs + + Meta-Control-h: backward-kill-word Text after the function name is ignored + + # + # Arrow keys in keypad mode + # + #"\M-OD": backward-char + #"\M-OC": forward-char + #"\M-OA": previous-history + #"\M-OB": next-history + # + # Arrow keys in ANSI mode + # + "\M-[D": backward-char + "\M-[C": forward-char + "\M-[A": previous-history + "\M-[B": next-history + # + # Arrow keys in 8 bit keypad mode + # + #"\M-\C-OD": backward-char + #"\M-\C-OC": forward-char + #"\M-\C-OA": previous-history + #"\M-\C-OB": next-history + # + # Arrow keys in 8 bit ANSI mode + # + #"\M-\C-[D": backward-char + #"\M-\C-[C": forward-char + #"\M-\C-[A": previous-history + #"\M-\C-[B": next-history + + C-q: quoted-insert + + $endif + + # An old-style binding. This happens to be the default. + TAB: complete + + # Macros that are convenient for shell interaction + $if Bash + # edit the path + "\C-xp": "PATH=$@{PATH@}\e\C-e\C-a\ef\C-f" + # prepare to type a quoted word -- + # insert open and close double quotes + # and move to just after the open quote + "\C-x\"": "\"\"\C-b" + # insert a backslash (testing backslash escapes + # in sequences and macros) + "\C-x\\": "\\" + # Quote the current or previous word + "\C-xq": "\eb\"\ef\"" + # Add a binding to refresh the line, which is unbound + "\C-xr": redraw-current-line + # Edit variable on current line. + "\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y=" + $endif + + # use a visible bell if one is available + set bell-style visible + + # don't strip characters to 7 bits when reading + set input-meta on + + # allow iso-latin1 characters to be inserted rather + # than converted to prefix-meta sequences + set convert-meta off + + # display characters with the eighth bit set directly + # rather than as meta-prefixed characters + set output-meta on + + # if there are more than 150 possible completions for + # a word, ask the user if he wants to see all of them + set completion-query-items 150 + + # For FTP + $if Ftp + "\C-xg": "get \M-?" + "\C-xt": "put \M-?" + "\M-.": yank-last-arg + $endif + @end example + + @node Bindable Readline Commands + @section Bindable Readline Commands + + @menu + * Commands For Moving:: Moving about the line. + * Commands For History:: Getting at previous lines. + * Commands For Text:: Commands for changing text. + * Commands For Killing:: Commands for killing and yanking. + * Numeric Arguments:: Specifying numeric arguments, repeat counts. + * Commands For Completion:: Getting Readline to do the typing for you. + * Keyboard Macros:: Saving and re-executing typed characters + * Miscellaneous Commands:: Other miscellaneous commands. + @end menu + + This section describes Readline commands that may be bound to key + sequences. + @ifset BashFeatures + You can list your key bindings by executing + @w{@code{bind -P}} or, for a more terse format, suitable for an + @var{inputrc} file, @w{@code{bind -p}}. (@xref{Bash Builtins}.) + @end ifset + Command names without an accompanying key sequence are unbound by default. + + In the following descriptions, @dfn{point} refers to the current cursor + position, and @dfn{mark} refers to a cursor position saved by the + @code{set-mark} command. + The text between the point and mark is referred to as the @dfn{region}. + + @node Commands For Moving + @subsection Commands For Moving + @ftable @code + @item beginning-of-line (C-a) + Move to the start of the current line. + + @item end-of-line (C-e) + Move to the end of the line. + + @item forward-char (C-f) + Move forward a character. + + @item backward-char (C-b) + Move back a character. + + @item forward-word (M-f) + Move forward to the end of the next word. Words are composed of + letters and digits. + + @item backward-word (M-b) + Move back to the start of the current or previous word. Words are + composed of letters and digits. + + @item clear-screen (C-l) + Clear the screen and redraw the current line, + leaving the current line at the top of the screen. + + @item redraw-current-line () + Refresh the current line. By default, this is unbound. + + @end ftable + + @node Commands For History + @subsection Commands For Manipulating The History + + @ftable @code + @item accept-line (Newline or Return) + @ifset BashFeatures + Accept the line regardless of where the cursor is. + If this line is + non-empty, add it to the history list according to the setting of + the @env{HISTCONTROL} and @env{HISTIGNORE} variables. + If this line is a modified history line, then restore the history line + to its original state. + @end ifset + @ifclear BashFeatures + Accept the line regardless of where the cursor is. + If this line is + non-empty, it may be added to the history list for future recall with + @code{add_history()}. + If this line is a modified history line, the history line is restored + to its original state. + @end ifclear + + @item previous-history (C-p) + Move `back' through the history list, fetching the previous command. + + @item next-history (C-n) + Move `forward' through the history list, fetching the next command. + + @item beginning-of-history (M-<) + Move to the first line in the history. + + @item end-of-history (M->) + Move to the end of the input history, i.e., the line currently + being entered. + + @item reverse-search-history (C-r) + Search backward starting at the current line and moving `up' through + the history as necessary. This is an incremental search. + + @item forward-search-history (C-s) + Search forward starting at the current line and moving `down' through + the the history as necessary. This is an incremental search. + + @item non-incremental-reverse-search-history (M-p) + Search backward starting at the current line and moving `up' + through the history as necessary using a non-incremental search + for a string supplied by the user. + + @item non-incremental-forward-search-history (M-n) + Search forward starting at the current line and moving `down' + through the the history as necessary using a non-incremental search + for a string supplied by the user. + + @item history-search-forward () + Search forward through the history for the string of characters + between the start of the current line and the point. + This is a non-incremental search. + By default, this command is unbound. + + @item history-search-backward () + Search backward through the history for the string of characters + between the start of the current line and the point. This + is a non-incremental search. By default, this command is unbound. + + @item yank-nth-arg (M-C-y) + Insert the first argument to the previous command (usually + the second word on the previous line) at point. + With an argument @var{n}, + insert the @var{n}th word from the previous command (the words + in the previous command begin with word 0). A negative argument + inserts the @var{n}th word from the end of the previous command. + + @item yank-last-arg (M-. or M-_) + Insert last argument to the previous command (the last word of the + previous history entry). With an + argument, behave exactly like @code{yank-nth-arg}. + Successive calls to @code{yank-last-arg} move back through the history + list, inserting the last argument of each line in turn. + + @end ftable + + @node Commands For Text + @subsection Commands For Changing Text + + @ftable @code + @item delete-char (C-d) + Delete the character at point. If point is at the + beginning of the line, there are no characters in the line, and + the last character typed was not bound to @code{delete-char}, then + return @sc{eof}. + + @item backward-delete-char (Rubout) + Delete the character behind the cursor. A numeric argument means + to kill the characters instead of deleting them. + + @item forward-backward-delete-char () + Delete the character under the cursor, unless the cursor is at the + end of the line, in which case the character behind the cursor is + deleted. By default, this is not bound to a key. + + @item quoted-insert (C-q or C-v) + Add the next character typed to the line verbatim. This is + how to insert key sequences like @kbd{C-q}, for example. + + @ifclear BashFeatures + @item tab-insert (M-@key{TAB}) + Insert a tab character. + @end ifclear + + @item self-insert (a, b, A, 1, !, @dots{}) + Insert yourself. + + @item transpose-chars (C-t) + Drag the character before the cursor forward over + the character at the cursor, moving the + cursor forward as well. If the insertion point + is at the end of the line, then this + transposes the last two characters of the line. + Negative arguments have no effect. + + @item transpose-words (M-t) + Drag the word before point past the word after point, + moving point past that word as well. + If the insertion point is at the end of the line, this transposes + the last two words on the line. + + @item upcase-word (M-u) + Uppercase the current (or following) word. With a negative argument, + uppercase the previous word, but do not move the cursor. + + @item downcase-word (M-l) + Lowercase the current (or following) word. With a negative argument, + lowercase the previous word, but do not move the cursor. + + @item capitalize-word (M-c) + Capitalize the current (or following) word. With a negative argument, + capitalize the previous word, but do not move the cursor. + + @item overwrite-mode () + Toggle overwrite mode. With an explicit positive numeric argument, + switches to overwrite mode. With an explicit non-positive numeric + argument, switches to insert mode. This command affects only + @code{emacs} mode; @code{vi} mode does overwrite differently. + Each call to @code{readline()} starts in insert mode. + + In overwrite mode, characters bound to @code{self-insert} replace + the text at point rather than pushing the text to the right. + Characters bound to @code{backward-delete-char} replace the character + before point with a space. + + By default, this command is unbound. + + @end ftable + + @node Commands For Killing + @subsection Killing And Yanking + + @ftable @code + + @item kill-line (C-k) + Kill the text from point to the end of the line. + + @item backward-kill-line (C-x Rubout) + Kill backward to the beginning of the line. + + @item unix-line-discard (C-u) + Kill backward from the cursor to the beginning of the current line. + + @item kill-whole-line () + Kill all characters on the current line, no matter where point is. + By default, this is unbound. + + @item kill-word (M-d) + Kill from point to the end of the current word, or if between + words, to the end of the next word. + Word boundaries are the same as @code{forward-word}. + + @item backward-kill-word (M-@key{DEL}) + Kill the word behind point. + Word boundaries are the same as @code{backward-word}. + + @item unix-word-rubout (C-w) + Kill the word behind point, using white space as a word boundary. + The killed text is saved on the kill-ring. + + @item unix-filename-rubout () + Kill the word behind point, using white space and the slash character + as the word boundaries. + The killed text is saved on the kill-ring. + + @item delete-horizontal-space () + Delete all spaces and tabs around point. By default, this is unbound. + + @item kill-region () + Kill the text in the current region. + By default, this command is unbound. + + @item copy-region-as-kill () + Copy the text in the region to the kill buffer, so it can be yanked + right away. By default, this command is unbound. + + @item copy-backward-word () + Copy the word before point to the kill buffer. + The word boundaries are the same as @code{backward-word}. + By default, this command is unbound. + + @item copy-forward-word () + Copy the word following point to the kill buffer. + The word boundaries are the same as @code{forward-word}. + By default, this command is unbound. + + @item yank (C-y) + Yank the top of the kill ring into the buffer at point. + + @item yank-pop (M-y) + Rotate the kill-ring, and yank the new top. You can only do this if + the prior command is @code{yank} or @code{yank-pop}. + @end ftable + + @node Numeric Arguments + @subsection Specifying Numeric Arguments + @ftable @code + + @item digit-argument (@kbd{M-0}, @kbd{M-1}, @dots{} @kbd{M--}) + Add this digit to the argument already accumulating, or start a new + argument. @kbd{M--} starts a negative argument. + + @item universal-argument () + This is another way to specify an argument. + If this command is followed by one or more digits, optionally with a + leading minus sign, those digits define the argument. + If the command is followed by digits, executing @code{universal-argument} + again ends the numeric argument, but is otherwise ignored. + As a special case, if this command is immediately followed by a + character that is neither a digit or minus sign, the argument count + for the next command is multiplied by four. + The argument count is initially one, so executing this function the + first time makes the argument count four, a second time makes the + argument count sixteen, and so on. + By default, this is not bound to a key. + @end ftable + + @node Commands For Completion + @subsection Letting Readline Type For You + + @ftable @code + @item complete (@key{TAB}) + Attempt to perform completion on the text before point. + The actual completion performed is application-specific. + @ifset BashFeatures + Bash attempts completion treating the text as a variable (if the + text begins with @samp{$}), username (if the text begins with + @samp{~}), hostname (if the text begins with @samp{@@}), or + command (including aliases and functions) in turn. If none + of these produces a match, filename completion is attempted. + @end ifset + @ifclear BashFeatures + The default is filename completion. + @end ifclear + + @item possible-completions (M-?) + List the possible completions of the text before point. + + @item insert-completions (M-*) + Insert all completions of the text before point that would have + been generated by @code{possible-completions}. + + @item menu-complete () + Similar to @code{complete}, but replaces the word to be completed + with a single match from the list of possible completions. + Repeated execution of @code{menu-complete} steps through the list + of possible completions, inserting each match in turn. + At the end of the list of completions, the bell is rung + (subject to the setting of @code{bell-style}) + and the original text is restored. + An argument of @var{n} moves @var{n} positions forward in the list + of matches; a negative argument may be used to move backward + through the list. + This command is intended to be bound to @key{TAB}, but is unbound + by default. + + @item delete-char-or-list () + Deletes the character under the cursor if not at the beginning or + end of the line (like @code{delete-char}). + If at the end of the line, behaves identically to + @code{possible-completions}. + This command is unbound by default. + + @ifset BashFeatures + @item complete-filename (M-/) + Attempt filename completion on the text before point. + + @item possible-filename-completions (C-x /) + List the possible completions of the text before point, + treating it as a filename. + + @item complete-username (M-~) + Attempt completion on the text before point, treating + it as a username. + + @item possible-username-completions (C-x ~) + List the possible completions of the text before point, + treating it as a username. + + @item complete-variable (M-$) + Attempt completion on the text before point, treating + it as a shell variable. + + @item possible-variable-completions (C-x $) + List the possible completions of the text before point, + treating it as a shell variable. + + @item complete-hostname (M-@@) + Attempt completion on the text before point, treating + it as a hostname. + + @item possible-hostname-completions (C-x @@) + List the possible completions of the text before point, + treating it as a hostname. + + @item complete-command (M-!) + Attempt completion on the text before point, treating + it as a command name. Command completion attempts to + match the text against aliases, reserved words, shell + functions, shell builtins, and finally executable filenames, + in that order. + + @item possible-command-completions (C-x !) + List the possible completions of the text before point, + treating it as a command name. + + @item dynamic-complete-history (M-@key{TAB}) + Attempt completion on the text before point, comparing + the text against lines from the history list for possible + completion matches. + + @item complete-into-braces (M-@{) + Perform filename completion and insert the list of possible completions + enclosed within braces so the list is available to the shell + (@pxref{Brace Expansion}). + + @end ifset + @end ftable + + @node Keyboard Macros + @subsection Keyboard Macros + @ftable @code + + @item start-kbd-macro (C-x () + Begin saving the characters typed into the current keyboard macro. + + @item end-kbd-macro (C-x )) + Stop saving the characters typed into the current keyboard macro + and save the definition. + + @item call-last-kbd-macro (C-x e) + Re-execute the last keyboard macro defined, by making the characters + in the macro appear as if typed at the keyboard. + + @end ftable + + @node Miscellaneous Commands + @subsection Some Miscellaneous Commands + @ftable @code + + @item re-read-init-file (C-x C-r) + Read in the contents of the @var{inputrc} file, and incorporate + any bindings or variable assignments found there. + + @item abort (C-g) + Abort the current editing command and + ring the terminal's bell (subject to the setting of + @code{bell-style}). + + @item do-uppercase-version (M-a, M-b, M-@var{x}, @dots{}) + If the metafied character @var{x} is lowercase, run the command + that is bound to the corresponding uppercase character. + + @item prefix-meta (@key{ESC}) + Metafy the next character typed. This is for keyboards + without a meta key. Typing @samp{@key{ESC} f} is equivalent to typing + @kbd{M-f}. + + @item undo (C-_ or C-x C-u) + Incremental undo, separately remembered for each line. + + @item revert-line (M-r) + Undo all changes made to this line. This is like executing the @code{undo} + command enough times to get back to the beginning. + + @ifset BashFeatures + @item tilde-expand (M-&) + @end ifset + @ifclear BashFeatures + @item tilde-expand (M-~) + @end ifclear + Perform tilde expansion on the current word. + + @item set-mark (C-@@) + Set the mark to the point. If a + numeric argument is supplied, the mark is set to that position. + + @item exchange-point-and-mark (C-x C-x) + Swap the point with the mark. The current cursor position is set to + the saved position, and the old cursor position is saved as the mark. + + @item character-search (C-]) + A character is read and point is moved to the next occurrence of that + character. A negative count searches for previous occurrences. + + @item character-search-backward (M-C-]) + A character is read and point is moved to the previous occurrence + of that character. A negative count searches for subsequent + occurrences. + + @item insert-comment (M-#) + Without a numeric argument, the value of the @code{comment-begin} + variable is inserted at the beginning of the current line. + If a numeric argument is supplied, this command acts as a toggle: if + the characters at the beginning of the line do not match the value + of @code{comment-begin}, the value is inserted, otherwise + the characters in @code{comment-begin} are deleted from the beginning of + the line. + In either case, the line is accepted as if a newline had been typed. + @ifset BashFeatures + The default value of @code{comment-begin} causes this command + to make the current line a shell comment. + If a numeric argument causes the comment character to be removed, the line + will be executed by the shell. + @end ifset + + @item dump-functions () + Print all of the functions and their key bindings to the + Readline output stream. If a numeric argument is supplied, + the output is formatted in such a way that it can be made part + of an @var{inputrc} file. This command is unbound by default. + + @item dump-variables () + Print all of the settable variables and their values to the + Readline output stream. If a numeric argument is supplied, + the output is formatted in such a way that it can be made part + of an @var{inputrc} file. This command is unbound by default. + + @item dump-macros () + Print all of the Readline key sequences bound to macros and the + strings they output. If a numeric argument is supplied, + the output is formatted in such a way that it can be made part + of an @var{inputrc} file. This command is unbound by default. + + @ifset BashFeatures + @item glob-complete-word (M-g) + The word before point is treated as a pattern for pathname expansion, + with an asterisk implicitly appended. This pattern is used to + generate a list of matching file names for possible completions. + + @item glob-expand-word (C-x *) + The word before point is treated as a pattern for pathname expansion, + and the list of matching file names is inserted, replacing the word. + If a numeric argument is supplied, a @samp{*} is appended before + pathname expansion. + + @item glob-list-expansions (C-x g) + The list of expansions that would have been generated by + @code{glob-expand-word} is displayed, and the line is redrawn. + If a numeric argument is supplied, a @samp{*} is appended before + pathname expansion. + + @item display-shell-version (C-x C-v) + Display version information about the current instance of Bash. + + @item shell-expand-line (M-C-e) + Expand the line as the shell does. + This performs alias and history expansion as well as all of the shell + word expansions (@pxref{Shell Expansions}). + + @item history-expand-line (M-^) + Perform history expansion on the current line. + + @item magic-space () + Perform history expansion on the current line and insert a space + (@pxref{History Interaction}). + + @item alias-expand-line () + Perform alias expansion on the current line (@pxref{Aliases}). + + @item history-and-alias-expand-line () + Perform history and alias expansion on the current line. + + @item insert-last-argument (M-. or M-_) + A synonym for @code{yank-last-arg}. + + @item operate-and-get-next (C-o) + Accept the current line for execution and fetch the next line + relative to the current line from the history for editing. Any + argument is ignored. + + @item edit-and-execute-command (C-xC-e) + Invoke an editor on the current command line, and execute the result as shell + commands. + Bash attempts to invoke + @code{$VISUAL}, @code{$EDITOR}, and @code{emacs} + as the editor, in that order. + + @end ifset + + @ifclear BashFeatures + @item emacs-editing-mode (C-e) + When in @code{vi} command mode, this causes a switch to @code{emacs} + editing mode. + + @item vi-editing-mode (M-C-j) + When in @code{emacs} editing mode, this causes a switch to @code{vi} + editing mode. + + @end ifclear + + @end ftable + + @node Readline vi Mode + @section Readline vi Mode + + While the Readline library does not have a full set of @code{vi} + editing functions, it does contain enough to allow simple editing + of the line. The Readline @code{vi} mode behaves as specified in + the @sc{posix} 1003.2 standard. + + @ifset BashFeatures + In order to switch interactively between @code{emacs} and @code{vi} + editing modes, use the @samp{set -o emacs} and @samp{set -o vi} + commands (@pxref{The Set Builtin}). + @end ifset + @ifclear BashFeatures + In order to switch interactively between @code{emacs} and @code{vi} + editing modes, use the command @kbd{M-C-j} (bound to emacs-editing-mode + when in @code{vi} mode and to vi-editing-mode in @code{emacs} mode). + @end ifclear + The Readline default is @code{emacs} mode. + + When you enter a line in @code{vi} mode, you are already placed in + `insertion' mode, as if you had typed an @samp{i}. Pressing @key{ESC} + switches you into `command' mode, where you can edit the text of the + line with the standard @code{vi} movement keys, move to previous + history lines with @samp{k} and subsequent lines with @samp{j}, and + so forth. + + @ifset BashFeatures + @node Programmable Completion + @section Programmable Completion + @cindex programmable completion + + When word completion is attempted for an argument to a command for + which a completion specification (a @var{compspec}) has been defined + using the @code{complete} builtin (@pxref{Programmable Completion Builtins}), + the programmable completion facilities are invoked. + + First, the command name is identified. + If a compspec has been defined for that command, the + compspec is used to generate the list of possible completions for the word. + If the command word is a full pathname, a compspec for the full + pathname is searched for first. + If no compspec is found for the full pathname, an attempt is made to + find a compspec for the portion following the final slash. + + Once a compspec has been found, it is used to generate the list of + matching words. + If a compspec is not found, the default Bash completion + described above (@pxref{Commands For Completion}) is performed. + + First, the actions specified by the compspec are used. + Only matches which are prefixed by the word being completed are + returned. + When the @option{-f} or @option{-d} option is used for filename or + directory name completion, the shell variable @env{FIGNORE} is + used to filter the matches. + @xref{Bash Variables}, for a description of @env{FIGNORE}. + + Any completions specified by a filename expansion pattern to the + @option{-G} option are generated next. + The words generated by the pattern need not match the word being completed. + The @env{GLOBIGNORE} shell variable is not used to filter the matches, + but the @env{FIGNORE} shell variable is used. + + Next, the string specified as the argument to the @option{-W} option + is considered. + The string is first split using the characters in the @env{IFS} + special variable as delimiters. + Shell quoting is honored. + Each word is then expanded using + brace expansion, tilde expansion, parameter and variable expansion, + command substitution, arithmetic expansion, and pathname expansion, + as described above (@pxref{Shell Expansions}). + The results are split using the rules described above + (@pxref{Word Splitting}). + The results of the expansion are prefix-matched against the word being + completed, and the matching words become the possible completions. + + After these matches have been generated, any shell function or command + specified with the @option{-F} and @option{-C} options is invoked. + When the command or function is invoked, the @env{COMP_LINE} and + @env{COMP_POINT} variables are assigned values as described above + (@pxref{Bash Variables}). + If a shell function is being invoked, the @env{COMP_WORDS} and + @env{COMP_CWORD} variables are also set. + When the function or command is invoked, the first argument is the + name of the command whose arguments are being completed, the + second argument is the word being completed, and the third argument + is the word preceding the word being completed on the current command line. + No filtering of the generated completions against the word being completed + is performed; the function or command has complete freedom in generating + the matches. + + Any function specified with @option{-F} is invoked first. + The function may use any of the shell facilities, including the + @code{compgen} builtin described below + (@pxref{Programmable Completion Builtins}), to generate the matches. + It must put the possible completions in the @env{COMPREPLY} array + variable. + + Next, any command specified with the @option{-C} option is invoked + in an environment equivalent to command substitution. + It should print a list of completions, one per line, to + the standard output. + Backslash may be used to escape a newline, if necessary. + + After all of the possible completions are generated, any filter + specified with the @option{-X} option is applied to the list. + The filter is a pattern as used for pathname expansion; a @samp{&} + in the pattern is replaced with the text of the word being completed. + A literal @samp{&} may be escaped with a backslash; the backslash + is removed before attempting a match. + Any completion that matches the pattern will be removed from the list. + A leading @samp{!} negates the pattern; in this case any completion + not matching the pattern will be removed. + + Finally, any prefix and suffix specified with the @option{-P} and @option{-S} + options are added to each member of the completion list, and the result is + returned to the Readline completion code as the list of possible + completions. + + If the previously-applied actions do not generate any matches, and the + @option{-o dirnames} option was supplied to @code{complete} when the + compspec was defined, directory name completion is attempted. + + If the @option{-o plusdirs} option was supplied to @code{complete} when + the compspec was defined, directory name completion is attempted and any + matches are added to the results of the other actions. + + By default, if a compspec is found, whatever it generates is returned to + the completion code as the full set of possible completions. + The default Bash completions are not attempted, and the Readline default + of filename completion is disabled. + If the @option{-o bashdefault} option was supplied to @code{complete} when + the compspec was defined, the default Bash completions are attempted + if the compspec generates no matches. + If the @option{-o default} option was supplied to @code{complete} when the + compspec was defined, Readline's default completion will be performed + if the compspec (and, if attempted, the default Bash completions) + generate no matches. + + When a compspec indicates that directory name completion is desired, + the programmable completion functions force Readline to append a slash + to completed names which are symbolic links to directories, subject to + the value of the @var{mark-directories} Readline variable, regardless + of the setting of the @var{mark-symlinked-directories} Readline variable. + + @node Programmable Completion Builtins + @section Programmable Completion Builtins + @cindex completion builtins + + Two builtin commands are available to manipulate the programmable completion + facilities. + + @table @code + @item compgen + @btindex compgen + @example + @code{compgen [@var{option}] [@var{word}]} + @end example + + Generate possible completion matches for @var{word} according to + the @var{option}s, which may be any option accepted by the + @code{complete} + builtin with the exception of @option{-p} and @option{-r}, and write + the matches to the standard output. + When using the @option{-F} or @option{-C} options, the various shell variables + set by the programmable completion facilities, while available, will not + have useful values. + + The matches will be generated in the same way as if the programmable + completion code had generated them directly from a completion specification + with the same flags. + If @var{word} is specified, only those completions matching @var{word} + will be displayed. + + The return value is true unless an invalid option is supplied, or no + matches were generated. + + @item complete + @btindex complete + @example + @code{complete [-abcdefgjksuv] [-o @var{comp-option}] [-A @var{action}] [-G @var{globpat}] [-W @var{wordlist}] + [-P @var{prefix}] [-S @var{suffix}] [-X @var{filterpat}] [-F @var{function}] + [-C @var{command}] @var{name} [@var{name} @dots{}]} + @code{complete -pr [@var{name} @dots{}]} + @end example + + Specify how arguments to each @var{name} should be completed. + If the @option{-p} option is supplied, or if no options are supplied, existing + completion specifications are printed in a way that allows them to be + reused as input. + The @option{-r} option removes a completion specification for + each @var{name}, or, if no @var{name}s are supplied, all + completion specifications. + + The process of applying these completion specifications when word completion + is attempted is described above (@pxref{Programmable Completion}). + + Other options, if specified, have the following meanings. + The arguments to the @option{-G}, @option{-W}, and @option{-X} options + (and, if necessary, the @option{-P} and @option{-S} options) + should be quoted to protect them from expansion before the + @code{complete} builtin is invoked. + + + @table @code + @item -o @var{comp-option} + The @var{comp-option} controls several aspects of the compspec's behavior + beyond the simple generation of completions. + @var{comp-option} may be one of: + + @table @code + + @item bashdefault + Perform the rest of the default Bash completions if the compspec + generates no matches. + + @item default + Use Readline's default filename completion if the compspec generates + no matches. + + @item dirnames + Perform directory name completion if the compspec generates no matches. + + @item filenames + Tell Readline that the compspec generates filenames, so it can perform any + filename-specific processing (like adding a slash to directory names or + suppressing trailing spaces). This option is intended to be used with + shell functions specified with @option{-F}. + + @item nospace + Tell Readline not to append a space (the default) to words completed at + the end of the line. + @end table + + @item -A @var{action} + The @var{action} may be one of the following to generate a list of possible + completions: + + @table @code + @item alias + Alias names. May also be specified as @option{-a}. + + @item arrayvar + Array variable names. + + @item binding + Readline key binding names (@pxref{Bindable Readline Commands}). + + @item builtin + Names of shell builtin commands. May also be specified as @option{-b}. + + @item command + Command names. May also be specified as @option{-c}. + + @item directory + Directory names. May also be specified as @option{-d}. + + @item disabled + Names of disabled shell builtins. + + @item enabled + Names of enabled shell builtins. + + @item export + Names of exported shell variables. May also be specified as @option{-e}. + + @item file + File names. May also be specified as @option{-f}. + + @item function + Names of shell functions. + + @item group + Group names. May also be specified as @option{-g}. + + @item helptopic + Help topics as accepted by the @code{help} builtin (@pxref{Bash Builtins}). + + @item hostname + Hostnames, as taken from the file specified by the + @env{HOSTFILE} shell variable (@pxref{Bash Variables}). + + @item job + Job names, if job control is active. May also be specified as @option{-j}. + + @item keyword + Shell reserved words. May also be specified as @option{-k}. + + @item running + Names of running jobs, if job control is active. + + @item service + Service names. May also be specified as @option{-s}. + + @item setopt + Valid arguments for the @option{-o} option to the @code{set} builtin + (@pxref{The Set Builtin}). + + @item shopt + Shell option names as accepted by the @code{shopt} builtin + (@pxref{Bash Builtins}). + + @item signal + Signal names. + + @item stopped + Names of stopped jobs, if job control is active. + + @item user + User names. May also be specified as @option{-u}. + + @item variable + Names of all shell variables. May also be specified as @option{-v}. + @end table + + @item -G @var{globpat} + The filename expansion pattern @var{globpat} is expanded to generate + the possible completions. + + @item -W @var{wordlist} + The @var{wordlist} is split using the characters in the + @env{IFS} special variable as delimiters, and each resultant word + is expanded. + The possible completions are the members of the resultant list which + match the word being completed. + + @item -C @var{command} + @var{command} is executed in a subshell environment, and its output is + used as the possible completions. + + @item -F @var{function} + The shell function @var{function} is executed in the current shell + environment. + When it finishes, the possible completions are retrieved from the value + of the @env{COMPREPLY} array variable. + + @item -X @var{filterpat} + @var{filterpat} is a pattern as used for filename expansion. + It is applied to the list of possible completions generated by the + preceding options and arguments, and each completion matching + @var{filterpat} is removed from the list. + A leading @samp{!} in @var{filterpat} negates the pattern; in this + case, any completion not matching @var{filterpat} is removed. + + @item -P @var{prefix} + @var{prefix} is added at the beginning of each possible completion + after all other options have been applied. + + @item -S @var{suffix} + @var{suffix} is appended to each possible completion + after all other options have been applied. + @end table + + The return value is true unless an invalid option is supplied, an option + other than @option{-p} or @option{-r} is supplied without a @var{name} + argument, an attempt is made to remove a completion specification for + a @var{name} for which no specification exists, or + an error occurs adding a completion specification. + + @end table + @end ifset diff -aNrc2 bash-2.05b-patched/lib/readline/doc/rluser.texinfo bash-3.0/lib/readline/doc/rluser.texinfo *** bash-2.05b-patched/lib/readline/doc/rluser.texinfo Tue Mar 5 13:20:44 2002 --- bash-3.0/lib/readline/doc/rluser.texinfo Wed Dec 31 19:00:00 1969 *************** *** 1,1796 **** - @comment %**start of header (This is for running Texinfo on a region.) - @setfilename rluser.info - @comment %**end of header (This is for running Texinfo on a region.) - @setchapternewpage odd - - @ignore - This file documents the end user interface to the GNU command line - editing features. It is to be an appendix to manuals for programs which - use these features. There is a document entitled "readline.texinfo" - which contains both end-user and programmer documentation for the - GNU Readline Library. - - Copyright (C) 1988-2002 Free Software Foundation, Inc. - - Authored by Brian Fox and Chet Ramey. - - Permission is granted to process this file through Tex and print the - results, provided the printed document carries copying permission notice - identical to this one except for the removal of this paragraph (this - paragraph not being relevant to the printed manual). - - Permission is granted to make and distribute verbatim copies of this manual - provided the copyright notice and this permission notice are preserved on - all copies. - - Permission is granted to copy and distribute modified versions of this - manual under the conditions for verbatim copying, provided also that the - GNU Copyright statement is available to the distributee, and provided that - the entire resulting derived work is distributed under the terms of a - permission notice identical to this one. - - Permission is granted to copy and distribute translations of this manual - into another language, under the above conditions for modified versions. - @end ignore - - @comment If you are including this manual as an appendix, then set the - @comment variable readline-appendix. - - @ifclear BashFeatures - @defcodeindex bt - @end ifclear - - @node Command Line Editing - @chapter Command Line Editing - - This chapter describes the basic features of the @sc{gnu} - command line editing interface. - @ifset BashFeatures - Command line editing is provided by the Readline library, which is - used by several different programs, including Bash. - @end ifset - - @menu - * Introduction and Notation:: Notation used in this text. - * Readline Interaction:: The minimum set of commands for editing a line. - * Readline Init File:: Customizing Readline from a user's view. - * Bindable Readline Commands:: A description of most of the Readline commands - available for binding - * Readline vi Mode:: A short description of how to make Readline - behave like the vi editor. - @ifset BashFeatures - * Programmable Completion:: How to specify the possible completions for - a specific command. - * Programmable Completion Builtins:: Builtin commands to specify how to - complete arguments for a particular command. - @end ifset - @end menu - - @node Introduction and Notation - @section Introduction to Line Editing - - The following paragraphs describe the notation used to represent - keystrokes. - - The text @kbd{C-k} is read as `Control-K' and describes the character - produced when the @key{k} key is pressed while the Control key - is depressed. - - The text @kbd{M-k} is read as `Meta-K' and describes the character - produced when the Meta key (if you have one) is depressed, and the @key{k} - key is pressed. - The Meta key is labeled @key{ALT} on many keyboards. - On keyboards with two keys labeled @key{ALT} (usually to either side of - the space bar), the @key{ALT} on the left side is generally set to - work as a Meta key. - The @key{ALT} key on the right may also be configured to work as a - Meta key or may be configured as some other modifier, such as a - Compose key for typing accented characters. - - If you do not have a Meta or @key{ALT} key, or another key working as - a Meta key, the identical keystroke can be generated by typing @key{ESC} - @emph{first}, and then typing @key{k}. - Either process is known as @dfn{metafying} the @key{k} key. - - The text @kbd{M-C-k} is read as `Meta-Control-k' and describes the - character produced by @dfn{metafying} @kbd{C-k}. - - In addition, several keys have their own names. Specifically, - @key{DEL}, @key{ESC}, @key{LFD}, @key{SPC}, @key{RET}, and @key{TAB} all - stand for themselves when seen in this text, or in an init file - (@pxref{Readline Init File}). - If your keyboard lacks a @key{LFD} key, typing @key{C-j} will - produce the desired character. - The @key{RET} key may be labeled @key{Return} or @key{Enter} on - some keyboards. - - @node Readline Interaction - @section Readline Interaction - @cindex interaction, readline - - Often during an interactive session you type in a long line of text, - only to notice that the first word on the line is misspelled. The - Readline library gives you a set of commands for manipulating the text - as you type it in, allowing you to just fix your typo, and not forcing - you to retype the majority of the line. Using these editing commands, - you move the cursor to the place that needs correction, and delete or - insert the text of the corrections. Then, when you are satisfied with - the line, you simply press @key{RET}. You do not have to be at the - end of the line to press @key{RET}; the entire line is accepted - regardless of the location of the cursor within the line. - - @menu - * Readline Bare Essentials:: The least you need to know about Readline. - * Readline Movement Commands:: Moving about the input line. - * Readline Killing Commands:: How to delete text, and how to get it back! - * Readline Arguments:: Giving numeric arguments to commands. - * Searching:: Searching through previous lines. - @end menu - - @node Readline Bare Essentials - @subsection Readline Bare Essentials - @cindex notation, readline - @cindex command editing - @cindex editing command lines - - In order to enter characters into the line, simply type them. The typed - character appears where the cursor was, and then the cursor moves one - space to the right. If you mistype a character, you can use your - erase character to back up and delete the mistyped character. - - Sometimes you may mistype a character, and - not notice the error until you have typed several other characters. In - that case, you can type @kbd{C-b} to move the cursor to the left, and then - correct your mistake. Afterwards, you can move the cursor to the right - with @kbd{C-f}. - - When you add text in the middle of a line, you will notice that characters - to the right of the cursor are `pushed over' to make room for the text - that you have inserted. Likewise, when you delete text behind the cursor, - characters to the right of the cursor are `pulled back' to fill in the - blank space created by the removal of the text. A list of the bare - essentials for editing the text of an input line follows. - - @table @asis - @item @kbd{C-b} - Move back one character. - @item @kbd{C-f} - Move forward one character. - @item @key{DEL} or @key{Backspace} - Delete the character to the left of the cursor. - @item @kbd{C-d} - Delete the character underneath the cursor. - @item @w{Printing characters} - Insert the character into the line at the cursor. - @item @kbd{C-_} or @kbd{C-x C-u} - Undo the last editing command. You can undo all the way back to an - empty line. - @end table - - @noindent - (Depending on your configuration, the @key{Backspace} key be set to - delete the character to the left of the cursor and the @key{DEL} key set - to delete the character underneath the cursor, like @kbd{C-d}, rather - than the character to the left of the cursor.) - - @node Readline Movement Commands - @subsection Readline Movement Commands - - - The above table describes the most basic keystrokes that you need - in order to do editing of the input line. For your convenience, many - other commands have been added in addition to @kbd{C-b}, @kbd{C-f}, - @kbd{C-d}, and @key{DEL}. Here are some commands for moving more rapidly - about the line. - - @table @kbd - @item C-a - Move to the start of the line. - @item C-e - Move to the end of the line. - @item M-f - Move forward a word, where a word is composed of letters and digits. - @item M-b - Move backward a word. - @item C-l - Clear the screen, reprinting the current line at the top. - @end table - - Notice how @kbd{C-f} moves forward a character, while @kbd{M-f} moves - forward a word. It is a loose convention that control keystrokes - operate on characters while meta keystrokes operate on words. - - @node Readline Killing Commands - @subsection Readline Killing Commands - - @cindex killing text - @cindex yanking text - - @dfn{Killing} text means to delete the text from the line, but to save - it away for later use, usually by @dfn{yanking} (re-inserting) - it back into the line. - (`Cut' and `paste' are more recent jargon for `kill' and `yank'.) - - If the description for a command says that it `kills' text, then you can - be sure that you can get the text back in a different (or the same) - place later. - - When you use a kill command, the text is saved in a @dfn{kill-ring}. - Any number of consecutive kills save all of the killed text together, so - that when you yank it back, you get it all. The kill - ring is not line specific; the text that you killed on a previously - typed line is available to be yanked back later, when you are typing - another line. - @cindex kill ring - - Here is the list of commands for killing text. - - @table @kbd - @item C-k - Kill the text from the current cursor position to the end of the line. - - @item M-d - Kill from the cursor to the end of the current word, or, if between - words, to the end of the next word. - Word boundaries are the same as those used by @kbd{M-f}. - - @item M-@key{DEL} - Kill from the cursor the start of the current word, or, if between - words, to the start of the previous word. - Word boundaries are the same as those used by @kbd{M-b}. - - @item C-w - Kill from the cursor to the previous whitespace. This is different than - @kbd{M-@key{DEL}} because the word boundaries differ. - - @end table - - Here is how to @dfn{yank} the text back into the line. Yanking - means to copy the most-recently-killed text from the kill buffer. - - @table @kbd - @item C-y - Yank the most recently killed text back into the buffer at the cursor. - - @item M-y - Rotate the kill-ring, and yank the new top. You can only do this if - the prior command is @kbd{C-y} or @kbd{M-y}. - @end table - - @node Readline Arguments - @subsection Readline Arguments - - You can pass numeric arguments to Readline commands. Sometimes the - argument acts as a repeat count, other times it is the @i{sign} of the - argument that is significant. If you pass a negative argument to a - command which normally acts in a forward direction, that command will - act in a backward direction. For example, to kill text back to the - start of the line, you might type @samp{M-- C-k}. - - The general way to pass numeric arguments to a command is to type meta - digits before the command. If the first `digit' typed is a minus - sign (@samp{-}), then the sign of the argument will be negative. Once - you have typed one meta digit to get the argument started, you can type - the remainder of the digits, and then the command. For example, to give - the @kbd{C-d} command an argument of 10, you could type @samp{M-1 0 C-d}, - which will delete the next ten characters on the input line. - - @node Searching - @subsection Searching for Commands in the History - - Readline provides commands for searching through the command history - @ifset BashFeatures - (@pxref{Bash History Facilities}) - @end ifset - for lines containing a specified string. - There are two search modes: @dfn{incremental} and @dfn{non-incremental}. - - Incremental searches begin before the user has finished typing the - search string. - As each character of the search string is typed, Readline displays - the next entry from the history matching the string typed so far. - An incremental search requires only as many characters as needed to - find the desired history entry. - To search backward in the history for a particular string, type - @kbd{C-r}. Typing @kbd{C-s} searches forward through the history. - The characters present in the value of the @code{isearch-terminators} variable - are used to terminate an incremental search. - If that variable has not been assigned a value, the @key{ESC} and - @kbd{C-J} characters will terminate an incremental search. - @kbd{C-g} will abort an incremental search and restore the original line. - When the search is terminated, the history entry containing the - search string becomes the current line. - - To find other matching entries in the history list, type @kbd{C-r} or - @kbd{C-s} as appropriate. - This will search backward or forward in the history for the next - entry matching the search string typed so far. - Any other key sequence bound to a Readline command will terminate - the search and execute that command. - For instance, a @key{RET} will terminate the search and accept - the line, thereby executing the command from the history list. - A movement command will terminate the search, make the last line found - the current line, and begin editing. - - Readline remembers the last incremental search string. If two - @kbd{C-r}s are typed without any intervening characters defining a new - search string, any remembered search string is used. - - Non-incremental searches read the entire search string before starting - to search for matching history lines. The search string may be - typed by the user or be part of the contents of the current line. - - @node Readline Init File - @section Readline Init File - @cindex initialization file, readline - - Although the Readline library comes with a set of Emacs-like - keybindings installed by default, it is possible to use a different set - of keybindings. - Any user can customize programs that use Readline by putting - commands in an @dfn{inputrc} file, conventionally in his home directory. - The name of this - @ifset BashFeatures - file is taken from the value of the shell variable @env{INPUTRC}. If - @end ifset - @ifclear BashFeatures - file is taken from the value of the environment variable @env{INPUTRC}. If - @end ifclear - that variable is unset, the default is @file{~/.inputrc}. - - When a program which uses the Readline library starts up, the - init file is read, and the key bindings are set. - - In addition, the @code{C-x C-r} command re-reads this init file, thus - incorporating any changes that you might have made to it. - - @menu - * Readline Init File Syntax:: Syntax for the commands in the inputrc file. - - * Conditional Init Constructs:: Conditional key bindings in the inputrc file. - - * Sample Init File:: An example inputrc file. - @end menu - - @node Readline Init File Syntax - @subsection Readline Init File Syntax - - There are only a few basic constructs allowed in the - Readline init file. Blank lines are ignored. - Lines beginning with a @samp{#} are comments. - Lines beginning with a @samp{$} indicate conditional - constructs (@pxref{Conditional Init Constructs}). Other lines - denote variable settings and key bindings. - - @table @asis - @item Variable Settings - You can modify the run-time behavior of Readline by - altering the values of variables in Readline - using the @code{set} command within the init file. - The syntax is simple: - - @example - set @var{variable} @var{value} - @end example - - @noindent - Here, for example, is how to - change from the default Emacs-like key binding to use - @code{vi} line editing commands: - - @example - set editing-mode vi - @end example - - Variable names and values, where appropriate, are recognized without regard - to case. - - @ifset BashFeatures - The @w{@code{bind -V}} command lists the current Readline variable names - and values. @xref{Bash Builtins}. - @end ifset - - A great deal of run-time behavior is changeable with the following - variables. - - @cindex variables, readline - @table @code - - @item bell-style - @vindex bell-style - Controls what happens when Readline wants to ring the terminal bell. - If set to @samp{none}, Readline never rings the bell. If set to - @samp{visible}, Readline uses a visible bell if one is available. - If set to @samp{audible} (the default), Readline attempts to ring - the terminal's bell. - - @item comment-begin - @vindex comment-begin - The string to insert at the beginning of the line when the - @code{insert-comment} command is executed. The default value - is @code{"#"}. - - @item completion-ignore-case - If set to @samp{on}, Readline performs filename matching and completion - in a case-insensitive fashion. - The default value is @samp{off}. - - @item completion-query-items - @vindex completion-query-items - The number of possible completions that determines when the user is - asked whether he wants to see the list of possibilities. If the - number of possible completions is greater than this value, - Readline will ask the user whether or not he wishes to view - them; otherwise, they are simply listed. - This variable must be set to an integer value greater than or equal to 0. - The default limit is @code{100}. - - @item convert-meta - @vindex convert-meta - If set to @samp{on}, Readline will convert characters with the - eighth bit set to an @sc{ascii} key sequence by stripping the eighth - bit and prefixing an @key{ESC} character, converting them to a - meta-prefixed key sequence. The default value is @samp{on}. - - @item disable-completion - @vindex disable-completion - If set to @samp{On}, Readline will inhibit word completion. - Completion characters will be inserted into the line as if they had - been mapped to @code{self-insert}. The default is @samp{off}. - - @item editing-mode - @vindex editing-mode - The @code{editing-mode} variable controls which default set of - key bindings is used. By default, Readline starts up in Emacs editing - mode, where the keystrokes are most similar to Emacs. This variable can be - set to either @samp{emacs} or @samp{vi}. - - @item enable-keypad - @vindex enable-keypad - When set to @samp{on}, Readline will try to enable the application - keypad when it is called. Some systems need this to enable the - arrow keys. The default is @samp{off}. - - @item expand-tilde - @vindex expand-tilde - If set to @samp{on}, tilde expansion is performed when Readline - attempts word completion. The default is @samp{off}. - - @vindex history-preserve-point - If set to @samp{on}, the history code attempts to place point at the - same location on each history line retrived with @code{previous-history} - or @code{next-history}. - - @item horizontal-scroll-mode - @vindex horizontal-scroll-mode - This variable can be set to either @samp{on} or @samp{off}. Setting it - to @samp{on} means that the text of the lines being edited will scroll - horizontally on a single screen line when they are longer than the width - of the screen, instead of wrapping onto a new screen line. By default, - this variable is set to @samp{off}. - - @item input-meta - @vindex input-meta - @vindex meta-flag - If set to @samp{on}, Readline will enable eight-bit input (it - will not clear the eighth bit in the characters it reads), - regardless of what the terminal claims it can support. The - default value is @samp{off}. The name @code{meta-flag} is a - synonym for this variable. - - @item isearch-terminators - @vindex isearch-terminators - The string of characters that should terminate an incremental search without - subsequently executing the character as a command (@pxref{Searching}). - If this variable has not been given a value, the characters @key{ESC} and - @kbd{C-J} will terminate an incremental search. - - @item keymap - @vindex keymap - Sets Readline's idea of the current keymap for key binding commands. - Acceptable @code{keymap} names are - @code{emacs}, - @code{emacs-standard}, - @code{emacs-meta}, - @code{emacs-ctlx}, - @code{vi}, - @code{vi-move}, - @code{vi-command}, and - @code{vi-insert}. - @code{vi} is equivalent to @code{vi-command}; @code{emacs} is - equivalent to @code{emacs-standard}. The default value is @code{emacs}. - The value of the @code{editing-mode} variable also affects the - default keymap. - - @item mark-directories - If set to @samp{on}, completed directory names have a slash - appended. The default is @samp{on}. - - @item mark-modified-lines - @vindex mark-modified-lines - This variable, when set to @samp{on}, causes Readline to display an - asterisk (@samp{*}) at the start of history lines which have been modified. - This variable is @samp{off} by default. - - @item mark-symlinked-directories - @vindex mark-symlinked-directories - If set to @samp{on}, completed names which are symbolic links - to directories have a slash appended (subject to the value of - @code{mark-directories}). - The default is @samp{off}. - - @item match-hidden-files - @vindex match-hidden-files - This variable, when set to @samp{on}, causes Readline to match files whose - names begin with a @samp{.} (hidden files) when performing filename - completion, unless the leading @samp{.} is - supplied by the user in the filename to be completed. - This variable is @samp{on} by default. - - @item output-meta - @vindex output-meta - If set to @samp{on}, Readline will display characters with the - eighth bit set directly rather than as a meta-prefixed escape - sequence. The default is @samp{off}. - - @item page-completions - @vindex page-completions - If set to @samp{on}, Readline uses an internal @code{more}-like pager - to display a screenful of possible completions at a time. - This variable is @samp{on} by default. - - @item print-completions-horizontally - If set to @samp{on}, Readline will display completions with matches - sorted horizontally in alphabetical order, rather than down the screen. - The default is @samp{off}. - - @item show-all-if-ambiguous - @vindex show-all-if-ambiguous - This alters the default behavior of the completion functions. If - set to @samp{on}, - words which have more than one possible completion cause the - matches to be listed immediately instead of ringing the bell. - The default value is @samp{off}. - - @item visible-stats - @vindex visible-stats - If set to @samp{on}, a character denoting a file's type - is appended to the filename when listing possible - completions. The default is @samp{off}. - - @end table - - @item Key Bindings - The syntax for controlling key bindings in the init file is - simple. First you need to find the name of the command that you - want to change. The following sections contain tables of the command - name, the default keybinding, if any, and a short description of what - the command does. - - Once you know the name of the command, simply place on a line - in the init file the name of the key - you wish to bind the command to, a colon, and then the name of the - command. The name of the key - can be expressed in different ways, depending on what you find most - comfortable. - - In addition to command names, readline allows keys to be bound - to a string that is inserted when the key is pressed (a @var{macro}). - - @ifset BashFeatures - The @w{@code{bind -p}} command displays Readline function names and - bindings in a format that can put directly into an initialization file. - @xref{Bash Builtins}. - @end ifset - - @table @asis - @item @w{@var{keyname}: @var{function-name} or @var{macro}} - @var{keyname} is the name of a key spelled out in English. For example: - @example - Control-u: universal-argument - Meta-Rubout: backward-kill-word - Control-o: "> output" - @end example - - In the above example, @kbd{C-u} is bound to the function - @code{universal-argument}, - @kbd{M-DEL} is bound to the function @code{backward-kill-word}, and - @kbd{C-o} is bound to run the macro - expressed on the right hand side (that is, to insert the text - @samp{> output} into the line). - - A number of symbolic character names are recognized while - processing this key binding syntax: - @var{DEL}, - @var{ESC}, - @var{ESCAPE}, - @var{LFD}, - @var{NEWLINE}, - @var{RET}, - @var{RETURN}, - @var{RUBOUT}, - @var{SPACE}, - @var{SPC}, - and - @var{TAB}. - - @item @w{"@var{keyseq}": @var{function-name} or @var{macro}} - @var{keyseq} differs from @var{keyname} above in that strings - denoting an entire key sequence can be specified, by placing - the key sequence in double quotes. Some @sc{gnu} Emacs style key - escapes can be used, as in the following example, but the - special character names are not recognized. - - @example - "\C-u": universal-argument - "\C-x\C-r": re-read-init-file - "\e[11~": "Function Key 1" - @end example - - In the above example, @kbd{C-u} is again bound to the function - @code{universal-argument} (just as it was in the first example), - @samp{@kbd{C-x} @kbd{C-r}} is bound to the function @code{re-read-init-file}, - and @samp{@key{ESC} @key{[} @key{1} @key{1} @key{~}} is bound to insert - the text @samp{Function Key 1}. - - @end table - - The following @sc{gnu} Emacs style escape sequences are available when - specifying key sequences: - - @table @code - @item @kbd{\C-} - control prefix - @item @kbd{\M-} - meta prefix - @item @kbd{\e} - an escape character - @item @kbd{\\} - backslash - @item @kbd{\"} - @key{"}, a double quotation mark - @item @kbd{\'} - @key{'}, a single quote or apostrophe - @end table - - In addition to the @sc{gnu} Emacs style escape sequences, a second - set of backslash escapes is available: - - @table @code - @item \a - alert (bell) - @item \b - backspace - @item \d - delete - @item \f - form feed - @item \n - newline - @item \r - carriage return - @item \t - horizontal tab - @item \v - vertical tab - @item \@var{nnn} - the eight-bit character whose value is the octal value @var{nnn} - (one to three digits) - @item \x@var{HH} - the eight-bit character whose value is the hexadecimal value @var{HH} - (one or two hex digits) - @end table - - When entering the text of a macro, single or double quotes must - be used to indicate a macro definition. - Unquoted text is assumed to be a function name. - In the macro body, the backslash escapes described above are expanded. - Backslash will quote any other character in the macro text, - including @samp{"} and @samp{'}. - For example, the following binding will make @samp{@kbd{C-x} \} - insert a single @samp{\} into the line: - @example - "\C-x\\": "\\" - @end example - - @end table - - @node Conditional Init Constructs - @subsection Conditional Init Constructs - - Readline implements a facility similar in spirit to the conditional - compilation features of the C preprocessor which allows key - bindings and variable settings to be performed as the result - of tests. There are four parser directives used. - - @table @code - @item $if - The @code{$if} construct allows bindings to be made based on the - editing mode, the terminal being used, or the application using - Readline. The text of the test extends to the end of the line; - no characters are required to isolate it. - - @table @code - @item mode - The @code{mode=} form of the @code{$if} directive is used to test - whether Readline is in @code{emacs} or @code{vi} mode. - This may be used in conjunction - with the @samp{set keymap} command, for instance, to set bindings in - the @code{emacs-standard} and @code{emacs-ctlx} keymaps only if - Readline is starting out in @code{emacs} mode. - - @item term - The @code{term=} form may be used to include terminal-specific - key bindings, perhaps to bind the key sequences output by the - terminal's function keys. The word on the right side of the - @samp{=} is tested against both the full name of the terminal and - the portion of the terminal name before the first @samp{-}. This - allows @code{sun} to match both @code{sun} and @code{sun-cmd}, - for instance. - - @item application - The @var{application} construct is used to include - application-specific settings. Each program using the Readline - library sets the @var{application name}, and you can test for - a particular value. - This could be used to bind key sequences to functions useful for - a specific program. For instance, the following command adds a - key sequence that quotes the current or previous word in Bash: - @example - $if Bash - # Quote the current or previous word - "\C-xq": "\eb\"\ef\"" - $endif - @end example - @end table - - @item $endif - This command, as seen in the previous example, terminates an - @code{$if} command. - - @item $else - Commands in this branch of the @code{$if} directive are executed if - the test fails. - - @item $include - This directive takes a single filename as an argument and reads commands - and bindings from that file. - For example, the following directive reads from @file{/etc/inputrc}: - @example - $include /etc/inputrc - @end example - @end table - - @node Sample Init File - @subsection Sample Init File - - Here is an example of an @var{inputrc} file. This illustrates key - binding, variable assignment, and conditional syntax. - - @example - @page - # This file controls the behaviour of line input editing for - # programs that use the GNU Readline library. Existing - # programs include FTP, Bash, and GDB. - # - # You can re-read the inputrc file with C-x C-r. - # Lines beginning with '#' are comments. - # - # First, include any systemwide bindings and variable - # assignments from /etc/Inputrc - $include /etc/Inputrc - - # - # Set various bindings for emacs mode. - - set editing-mode emacs - - $if mode=emacs - - Meta-Control-h: backward-kill-word Text after the function name is ignored - - # - # Arrow keys in keypad mode - # - #"\M-OD": backward-char - #"\M-OC": forward-char - #"\M-OA": previous-history - #"\M-OB": next-history - # - # Arrow keys in ANSI mode - # - "\M-[D": backward-char - "\M-[C": forward-char - "\M-[A": previous-history - "\M-[B": next-history - # - # Arrow keys in 8 bit keypad mode - # - #"\M-\C-OD": backward-char - #"\M-\C-OC": forward-char - #"\M-\C-OA": previous-history - #"\M-\C-OB": next-history - # - # Arrow keys in 8 bit ANSI mode - # - #"\M-\C-[D": backward-char - #"\M-\C-[C": forward-char - #"\M-\C-[A": previous-history - #"\M-\C-[B": next-history - - C-q: quoted-insert - - $endif - - # An old-style binding. This happens to be the default. - TAB: complete - - # Macros that are convenient for shell interaction - $if Bash - # edit the path - "\C-xp": "PATH=$@{PATH@}\e\C-e\C-a\ef\C-f" - # prepare to type a quoted word -- - # insert open and close double quotes - # and move to just after the open quote - "\C-x\"": "\"\"\C-b" - # insert a backslash (testing backslash escapes - # in sequences and macros) - "\C-x\\": "\\" - # Quote the current or previous word - "\C-xq": "\eb\"\ef\"" - # Add a binding to refresh the line, which is unbound - "\C-xr": redraw-current-line - # Edit variable on current line. - "\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y=" - $endif - - # use a visible bell if one is available - set bell-style visible - - # don't strip characters to 7 bits when reading - set input-meta on - - # allow iso-latin1 characters to be inserted rather - # than converted to prefix-meta sequences - set convert-meta off - - # display characters with the eighth bit set directly - # rather than as meta-prefixed characters - set output-meta on - - # if there are more than 150 possible completions for - # a word, ask the user if he wants to see all of them - set completion-query-items 150 - - # For FTP - $if Ftp - "\C-xg": "get \M-?" - "\C-xt": "put \M-?" - "\M-.": yank-last-arg - $endif - @end example - - @node Bindable Readline Commands - @section Bindable Readline Commands - - @menu - * Commands For Moving:: Moving about the line. - * Commands For History:: Getting at previous lines. - * Commands For Text:: Commands for changing text. - * Commands For Killing:: Commands for killing and yanking. - * Numeric Arguments:: Specifying numeric arguments, repeat counts. - * Commands For Completion:: Getting Readline to do the typing for you. - * Keyboard Macros:: Saving and re-executing typed characters - * Miscellaneous Commands:: Other miscellaneous commands. - @end menu - - This section describes Readline commands that may be bound to key - sequences. - @ifset BashFeatures - You can list your key bindings by executing - @w{@code{bind -P}} or, for a more terse format, suitable for an - @var{inputrc} file, @w{@code{bind -p}}. (@xref{Bash Builtins}.) - @end ifset - Command names without an accompanying key sequence are unbound by default. - - In the following descriptions, @dfn{point} refers to the current cursor - position, and @dfn{mark} refers to a cursor position saved by the - @code{set-mark} command. - The text between the point and mark is referred to as the @dfn{region}. - - @node Commands For Moving - @subsection Commands For Moving - @ftable @code - @item beginning-of-line (C-a) - Move to the start of the current line. - - @item end-of-line (C-e) - Move to the end of the line. - - @item forward-char (C-f) - Move forward a character. - - @item backward-char (C-b) - Move back a character. - - @item forward-word (M-f) - Move forward to the end of the next word. Words are composed of - letters and digits. - - @item backward-word (M-b) - Move back to the start of the current or previous word. Words are - composed of letters and digits. - - @item clear-screen (C-l) - Clear the screen and redraw the current line, - leaving the current line at the top of the screen. - - @item redraw-current-line () - Refresh the current line. By default, this is unbound. - - @end ftable - - @node Commands For History - @subsection Commands For Manipulating The History - - @ftable @code - @item accept-line (Newline or Return) - @ifset BashFeatures - Accept the line regardless of where the cursor is. - If this line is - non-empty, add it to the history list according to the setting of - the @env{HISTCONTROL} and @env{HISTIGNORE} variables. - If this line is a modified history line, then restore the history line - to its original state. - @end ifset - @ifclear BashFeatures - Accept the line regardless of where the cursor is. - If this line is - non-empty, it may be added to the history list for future recall with - @code{add_history()}. - If this line is a modified history line, the history line is restored - to its original state. - @end ifclear - - @item previous-history (C-p) - Move `back' through the history list, fetching the previous command. - - @item next-history (C-n) - Move `forward' through the history list, fetching the next command. - - @item beginning-of-history (M-<) - Move to the first line in the history. - - @item end-of-history (M->) - Move to the end of the input history, i.e., the line currently - being entered. - - @item reverse-search-history (C-r) - Search backward starting at the current line and moving `up' through - the history as necessary. This is an incremental search. - - @item forward-search-history (C-s) - Search forward starting at the current line and moving `down' through - the the history as necessary. This is an incremental search. - - @item non-incremental-reverse-search-history (M-p) - Search backward starting at the current line and moving `up' - through the history as necessary using a non-incremental search - for a string supplied by the user. - - @item non-incremental-forward-search-history (M-n) - Search forward starting at the current line and moving `down' - through the the history as necessary using a non-incremental search - for a string supplied by the user. - - @item history-search-forward () - Search forward through the history for the string of characters - between the start of the current line and the point. - This is a non-incremental search. - By default, this command is unbound. - - @item history-search-backward () - Search backward through the history for the string of characters - between the start of the current line and the point. This - is a non-incremental search. By default, this command is unbound. - - @item yank-nth-arg (M-C-y) - Insert the first argument to the previous command (usually - the second word on the previous line) at point. - With an argument @var{n}, - insert the @var{n}th word from the previous command (the words - in the previous command begin with word 0). A negative argument - inserts the @var{n}th word from the end of the previous command. - - @item yank-last-arg (M-. or M-_) - Insert last argument to the previous command (the last word of the - previous history entry). With an - argument, behave exactly like @code{yank-nth-arg}. - Successive calls to @code{yank-last-arg} move back through the history - list, inserting the last argument of each line in turn. - - @end ftable - - @node Commands For Text - @subsection Commands For Changing Text - - @ftable @code - @item delete-char (C-d) - Delete the character at point. If point is at the - beginning of the line, there are no characters in the line, and - the last character typed was not bound to @code{delete-char}, then - return @sc{eof}. - - @item backward-delete-char (Rubout) - Delete the character behind the cursor. A numeric argument means - to kill the characters instead of deleting them. - - @item forward-backward-delete-char () - Delete the character under the cursor, unless the cursor is at the - end of the line, in which case the character behind the cursor is - deleted. By default, this is not bound to a key. - - @item quoted-insert (C-q or C-v) - Add the next character typed to the line verbatim. This is - how to insert key sequences like @kbd{C-q}, for example. - - @ifclear BashFeatures - @item tab-insert (M-@key{TAB}) - Insert a tab character. - @end ifclear - - @item self-insert (a, b, A, 1, !, @dots{}) - Insert yourself. - - @item transpose-chars (C-t) - Drag the character before the cursor forward over - the character at the cursor, moving the - cursor forward as well. If the insertion point - is at the end of the line, then this - transposes the last two characters of the line. - Negative arguments have no effect. - - @item transpose-words (M-t) - Drag the word before point past the word after point, - moving point past that word as well. - If the insertion point is at the end of the line, this transposes - the last two words on the line. - - @item upcase-word (M-u) - Uppercase the current (or following) word. With a negative argument, - uppercase the previous word, but do not move the cursor. - - @item downcase-word (M-l) - Lowercase the current (or following) word. With a negative argument, - lowercase the previous word, but do not move the cursor. - - @item capitalize-word (M-c) - Capitalize the current (or following) word. With a negative argument, - capitalize the previous word, but do not move the cursor. - - @item overwrite-mode () - Toggle overwrite mode. With an explicit positive numeric argument, - switches to overwrite mode. With an explicit non-positive numeric - argument, switches to insert mode. This command affects only - @code{emacs} mode; @code{vi} mode does overwrite differently. - Each call to @code{readline()} starts in insert mode. - - In overwrite mode, characters bound to @code{self-insert} replace - the text at point rather than pushing the text to the right. - Characters bound to @code{backward-delete-char} replace the character - before point with a space. - - By default, this command is unbound. - - @end ftable - - @node Commands For Killing - @subsection Killing And Yanking - - @ftable @code - - @item kill-line (C-k) - Kill the text from point to the end of the line. - - @item backward-kill-line (C-x Rubout) - Kill backward to the beginning of the line. - - @item unix-line-discard (C-u) - Kill backward from the cursor to the beginning of the current line. - - @item kill-whole-line () - Kill all characters on the current line, no matter where point is. - By default, this is unbound. - - @item kill-word (M-d) - Kill from point to the end of the current word, or if between - words, to the end of the next word. - Word boundaries are the same as @code{forward-word}. - - @item backward-kill-word (M-@key{DEL}) - Kill the word behind point. - Word boundaries are the same as @code{backward-word}. - - @item unix-word-rubout (C-w) - Kill the word behind point, using white space as a word boundary. - The killed text is saved on the kill-ring. - - @item delete-horizontal-space () - Delete all spaces and tabs around point. By default, this is unbound. - - @item kill-region () - Kill the text in the current region. - By default, this command is unbound. - - @item copy-region-as-kill () - Copy the text in the region to the kill buffer, so it can be yanked - right away. By default, this command is unbound. - - @item copy-backward-word () - Copy the word before point to the kill buffer. - The word boundaries are the same as @code{backward-word}. - By default, this command is unbound. - - @item copy-forward-word () - Copy the word following point to the kill buffer. - The word boundaries are the same as @code{forward-word}. - By default, this command is unbound. - - @item yank (C-y) - Yank the top of the kill ring into the buffer at point. - - @item yank-pop (M-y) - Rotate the kill-ring, and yank the new top. You can only do this if - the prior command is @code{yank} or @code{yank-pop}. - @end ftable - - @node Numeric Arguments - @subsection Specifying Numeric Arguments - @ftable @code - - @item digit-argument (@kbd{M-0}, @kbd{M-1}, @dots{} @kbd{M--}) - Add this digit to the argument already accumulating, or start a new - argument. @kbd{M--} starts a negative argument. - - @item universal-argument () - This is another way to specify an argument. - If this command is followed by one or more digits, optionally with a - leading minus sign, those digits define the argument. - If the command is followed by digits, executing @code{universal-argument} - again ends the numeric argument, but is otherwise ignored. - As a special case, if this command is immediately followed by a - character that is neither a digit or minus sign, the argument count - for the next command is multiplied by four. - The argument count is initially one, so executing this function the - first time makes the argument count four, a second time makes the - argument count sixteen, and so on. - By default, this is not bound to a key. - @end ftable - - @node Commands For Completion - @subsection Letting Readline Type For You - - @ftable @code - @item complete (@key{TAB}) - Attempt to perform completion on the text before point. - The actual completion performed is application-specific. - @ifset BashFeatures - Bash attempts completion treating the text as a variable (if the - text begins with @samp{$}), username (if the text begins with - @samp{~}), hostname (if the text begins with @samp{@@}), or - command (including aliases and functions) in turn. If none - of these produces a match, filename completion is attempted. - @end ifset - @ifclear BashFeatures - The default is filename completion. - @end ifclear - - @item possible-completions (M-?) - List the possible completions of the text before point. - - @item insert-completions (M-*) - Insert all completions of the text before point that would have - been generated by @code{possible-completions}. - - @item menu-complete () - Similar to @code{complete}, but replaces the word to be completed - with a single match from the list of possible completions. - Repeated execution of @code{menu-complete} steps through the list - of possible completions, inserting each match in turn. - At the end of the list of completions, the bell is rung - (subject to the setting of @code{bell-style}) - and the original text is restored. - An argument of @var{n} moves @var{n} positions forward in the list - of matches; a negative argument may be used to move backward - through the list. - This command is intended to be bound to @key{TAB}, but is unbound - by default. - - @item delete-char-or-list () - Deletes the character under the cursor if not at the beginning or - end of the line (like @code{delete-char}). - If at the end of the line, behaves identically to - @code{possible-completions}. - This command is unbound by default. - - @ifset BashFeatures - @item complete-filename (M-/) - Attempt filename completion on the text before point. - - @item possible-filename-completions (C-x /) - List the possible completions of the text before point, - treating it as a filename. - - @item complete-username (M-~) - Attempt completion on the text before point, treating - it as a username. - - @item possible-username-completions (C-x ~) - List the possible completions of the text before point, - treating it as a username. - - @item complete-variable (M-$) - Attempt completion on the text before point, treating - it as a shell variable. - - @item possible-variable-completions (C-x $) - List the possible completions of the text before point, - treating it as a shell variable. - - @item complete-hostname (M-@@) - Attempt completion on the text before point, treating - it as a hostname. - - @item possible-hostname-completions (C-x @@) - List the possible completions of the text before point, - treating it as a hostname. - - @item complete-command (M-!) - Attempt completion on the text before point, treating - it as a command name. Command completion attempts to - match the text against aliases, reserved words, shell - functions, shell builtins, and finally executable filenames, - in that order. - - @item possible-command-completions (C-x !) - List the possible completions of the text before point, - treating it as a command name. - - @item dynamic-complete-history (M-@key{TAB}) - Attempt completion on the text before point, comparing - the text against lines from the history list for possible - completion matches. - - @item complete-into-braces (M-@{) - Perform filename completion and insert the list of possible completions - enclosed within braces so the list is available to the shell - (@pxref{Brace Expansion}). - - @end ifset - @end ftable - - @node Keyboard Macros - @subsection Keyboard Macros - @ftable @code - - @item start-kbd-macro (C-x () - Begin saving the characters typed into the current keyboard macro. - - @item end-kbd-macro (C-x )) - Stop saving the characters typed into the current keyboard macro - and save the definition. - - @item call-last-kbd-macro (C-x e) - Re-execute the last keyboard macro defined, by making the characters - in the macro appear as if typed at the keyboard. - - @end ftable - - @node Miscellaneous Commands - @subsection Some Miscellaneous Commands - @ftable @code - - @item re-read-init-file (C-x C-r) - Read in the contents of the @var{inputrc} file, and incorporate - any bindings or variable assignments found there. - - @item abort (C-g) - Abort the current editing command and - ring the terminal's bell (subject to the setting of - @code{bell-style}). - - @item do-uppercase-version (M-a, M-b, M-@var{x}, @dots{}) - If the metafied character @var{x} is lowercase, run the command - that is bound to the corresponding uppercase character. - - @item prefix-meta (@key{ESC}) - Metafy the next character typed. This is for keyboards - without a meta key. Typing @samp{@key{ESC} f} is equivalent to typing - @kbd{M-f}. - - @item undo (C-_ or C-x C-u) - Incremental undo, separately remembered for each line. - - @item revert-line (M-r) - Undo all changes made to this line. This is like executing the @code{undo} - command enough times to get back to the beginning. - - @ifset BashFeatures - @item tilde-expand (M-&) - @end ifset - @ifclear BashFeatures - @item tilde-expand (M-~) - @end ifclear - Perform tilde expansion on the current word. - - @item set-mark (C-@@) - Set the mark to the point. If a - numeric argument is supplied, the mark is set to that position. - - @item exchange-point-and-mark (C-x C-x) - Swap the point with the mark. The current cursor position is set to - the saved position, and the old cursor position is saved as the mark. - - @item character-search (C-]) - A character is read and point is moved to the next occurrence of that - character. A negative count searches for previous occurrences. - - @item character-search-backward (M-C-]) - A character is read and point is moved to the previous occurrence - of that character. A negative count searches for subsequent - occurrences. - - @item insert-comment (M-#) - Without a numeric argument, the value of the @code{comment-begin} - variable is inserted at the beginning of the current line. - If a numeric argument is supplied, this command acts as a toggle: if - the characters at the beginning of the line do not match the value - of @code{comment-begin}, the value is inserted, otherwise - the characters in @code{comment-begin} are deleted from the beginning of - the line. - In either case, the line is accepted as if a newline had been typed. - @ifset BashFeatures - The default value of @code{comment-begin} causes this command - to make the current line a shell comment. - If a numeric argument causes the comment character to be removed, the line - will be executed by the shell. - @end ifset - - @item dump-functions () - Print all of the functions and their key bindings to the - Readline output stream. If a numeric argument is supplied, - the output is formatted in such a way that it can be made part - of an @var{inputrc} file. This command is unbound by default. - - @item dump-variables () - Print all of the settable variables and their values to the - Readline output stream. If a numeric argument is supplied, - the output is formatted in such a way that it can be made part - of an @var{inputrc} file. This command is unbound by default. - - @item dump-macros () - Print all of the Readline key sequences bound to macros and the - strings they output. If a numeric argument is supplied, - the output is formatted in such a way that it can be made part - of an @var{inputrc} file. This command is unbound by default. - - @ifset BashFeatures - @item glob-complete-word (M-g) - The word before point is treated as a pattern for pathname expansion, - with an asterisk implicitly appended. This pattern is used to - generate a list of matching file names for possible completions. - - @item glob-expand-word (C-x *) - The word before point is treated as a pattern for pathname expansion, - and the list of matching file names is inserted, replacing the word. - If a numeric argument is supplied, a @samp{*} is appended before - pathname expansion. - - @item glob-list-expansions (C-x g) - The list of expansions that would have been generated by - @code{glob-expand-word} is displayed, and the line is redrawn. - If a numeric argument is supplied, a @samp{*} is appended before - pathname expansion. - - @item display-shell-version (C-x C-v) - Display version information about the current instance of Bash. - - @item shell-expand-line (M-C-e) - Expand the line as the shell does. - This performs alias and history expansion as well as all of the shell - word expansions (@pxref{Shell Expansions}). - - @item history-expand-line (M-^) - Perform history expansion on the current line. - - @item magic-space () - Perform history expansion on the current line and insert a space - (@pxref{History Interaction}). - - @item alias-expand-line () - Perform alias expansion on the current line (@pxref{Aliases}). - - @item history-and-alias-expand-line () - Perform history and alias expansion on the current line. - - @item insert-last-argument (M-. or M-_) - A synonym for @code{yank-last-arg}. - - @item operate-and-get-next (C-o) - Accept the current line for execution and fetch the next line - relative to the current line from the history for editing. Any - argument is ignored. - - @item edit-and-execute-command (C-xC-e) - Invoke an editor on the current command line, and execute the result as shell - commands. - Bash attempts to invoke - @code{$FCEDIT}, @code{$EDITOR}, and @code{emacs} - as the editor, in that order. - - @end ifset - - @ifclear BashFeatures - @item emacs-editing-mode (C-e) - When in @code{vi} command mode, this causes a switch to @code{emacs} - editing mode. - - @item vi-editing-mode (M-C-j) - When in @code{emacs} editing mode, this causes a switch to @code{vi} - editing mode. - - @end ifclear - - @end ftable - - @node Readline vi Mode - @section Readline vi Mode - - While the Readline library does not have a full set of @code{vi} - editing functions, it does contain enough to allow simple editing - of the line. The Readline @code{vi} mode behaves as specified in - the @sc{posix} 1003.2 standard. - - @ifset BashFeatures - In order to switch interactively between @code{emacs} and @code{vi} - editing modes, use the @samp{set -o emacs} and @samp{set -o vi} - commands (@pxref{The Set Builtin}). - @end ifset - @ifclear BashFeatures - In order to switch interactively between @code{emacs} and @code{vi} - editing modes, use the command @kbd{M-C-j} (bound to emacs-editing-mode - when in @code{vi} mode and to vi-editing-mode in @code{emacs} mode). - @end ifclear - The Readline default is @code{emacs} mode. - - When you enter a line in @code{vi} mode, you are already placed in - `insertion' mode, as if you had typed an @samp{i}. Pressing @key{ESC} - switches you into `command' mode, where you can edit the text of the - line with the standard @code{vi} movement keys, move to previous - history lines with @samp{k} and subsequent lines with @samp{j}, and - so forth. - - @ifset BashFeatures - @node Programmable Completion - @section Programmable Completion - @cindex programmable completion - - When word completion is attempted for an argument to a command for - which a completion specification (a @var{compspec}) has been defined - using the @code{complete} builtin (@pxref{Programmable Completion Builtins}), - the programmable completion facilities are invoked. - - First, the command name is identified. - If a compspec has been defined for that command, the - compspec is used to generate the list of possible completions for the word. - If the command word is a full pathname, a compspec for the full - pathname is searched for first. - If no compspec is found for the full pathname, an attempt is made to - find a compspec for the portion following the final slash. - - Once a compspec has been found, it is used to generate the list of - matching words. - If a compspec is not found, the default Bash completion - described above (@pxref{Commands For Completion}) is performed. - - First, the actions specified by the compspec are used. - Only matches which are prefixed by the word being completed are - returned. - When the @option{-f} or @option{-d} option is used for filename or - directory name completion, the shell variable @env{FIGNORE} is - used to filter the matches. - @xref{Bash Variables}, for a description of @env{FIGNORE}. - - Any completions specified by a filename expansion pattern to the - @option{-G} option are generated next. - The words generated by the pattern need not match the word being completed. - The @env{GLOBIGNORE} shell variable is not used to filter the matches, - but the @env{FIGNORE} shell variable is used. - - Next, the string specified as the argument to the @option{-W} option - is considered. - The string is first split using the characters in the @env{IFS} - special variable as delimiters. - Shell quoting is honored. - Each word is then expanded using - brace expansion, tilde expansion, parameter and variable expansion, - command substitution, arithmetic expansion, and pathname expansion, - as described above (@pxref{Shell Expansions}). - The results are split using the rules described above - (@pxref{Word Splitting}). - The results of the expansion are prefix-matched against the word being - completed, and the matching words become the possible completions. - - After these matches have been generated, any shell function or command - specified with the @option{-F} and @option{-C} options is invoked. - When the command or function is invoked, the @env{COMP_LINE} and - @env{COMP_POINT} variables are assigned values as described above - (@pxref{Bash Variables}). - If a shell function is being invoked, the @env{COMP_WORDS} and - @env{COMP_CWORD} variables are also set. - When the function or command is invoked, the first argument is the - name of the command whose arguments are being completed, the - second argument is the word being completed, and the third argument - is the word preceding the word being completed on the current command line. - No filtering of the generated completions against the word being completed - is performed; the function or command has complete freedom in generating - the matches. - - Any function specified with @option{-F} is invoked first. - The function may use any of the shell facilities, including the - @code{compgen} builtin described below - (@pxref{Programmable Completion Builtins}), to generate the matches. - It must put the possible completions in the @env{COMPREPLY} array - variable. - - Next, any command specified with the @option{-C} option is invoked - in an environment equivalent to command substitution. - It should print a list of completions, one per line, to - the standard output. - Backslash may be used to escape a newline, if necessary. - - After all of the possible completions are generated, any filter - specified with the @option{-X} option is applied to the list. - The filter is a pattern as used for pathname expansion; a @samp{&} - in the pattern is replaced with the text of the word being completed. - A literal @samp{&} may be escaped with a backslash; the backslash - is removed before attempting a match. - Any completion that matches the pattern will be removed from the list. - A leading @samp{!} negates the pattern; in this case any completion - not matching the pattern will be removed. - - Finally, any prefix and suffix specified with the @option{-P} and @option{-S} - options are added to each member of the completion list, and the result is - returned to the Readline completion code as the list of possible - completions. - - If the previously-applied actions do not generate any matches, and the - @option{-o dirnames} option was supplied to @code{complete} when the - compspec was defined, directory name completion is attempted. - - By default, if a compspec is found, whatever it generates is returned to - the completion code as the full set of possible completions. - The default Bash completions are not attempted, and the Readline default - of filename completion is disabled. - If the @option{-o default} option was supplied to @code{complete} when the - compspec was defined, Readline's default completion will be performed - if the compspec generates no matches. - - When a compspec indicates that directory name completion is desired, - the programmable completion functions force Readline to append a slash - to completed names which are symbolic links to directories, subject to - the value of the @var{mark-directories} Readline variable, regardless - of the setting of the @var{mark-symlinked-directories} Readline variable. - - @node Programmable Completion Builtins - @section Programmable Completion Builtins - @cindex completion builtins - - Two builtin commands are available to manipulate the programmable completion - facilities. - - @table @code - @item compgen - @btindex compgen - @example - @code{compgen [@var{option}] [@var{word}]} - @end example - - Generate possible completion matches for @var{word} according to - the @var{option}s, which may be any option accepted by the - @code{complete} - builtin with the exception of @option{-p} and @option{-r}, and write - the matches to the standard output. - When using the @option{-F} or @option{-C} options, the various shell variables - set by the programmable completion facilities, while available, will not - have useful values. - - The matches will be generated in the same way as if the programmable - completion code had generated them directly from a completion specification - with the same flags. - If @var{word} is specified, only those completions matching @var{word} - will be displayed. - - The return value is true unless an invalid option is supplied, or no - matches were generated. - - @item complete - @btindex complete - @example - @code{complete [-abcdefgjksuv] [-o @var{comp-option}] [-A @var{action}] [-G @var{globpat}] [-W @var{wordlist}] - [-P @var{prefix}] [-S @var{suffix}] [-X @var{filterpat}] [-F @var{function}] - [-C @var{command}] @var{name} [@var{name} @dots{}]} - @code{complete -pr [@var{name} @dots{}]} - @end example - - Specify how arguments to each @var{name} should be completed. - If the @option{-p} option is supplied, or if no options are supplied, existing - completion specifications are printed in a way that allows them to be - reused as input. - The @option{-r} option removes a completion specification for - each @var{name}, or, if no @var{name}s are supplied, all - completion specifications. - - The process of applying these completion specifications when word completion - is attempted is described above (@pxref{Programmable Completion}). - - Other options, if specified, have the following meanings. - The arguments to the @option{-G}, @option{-W}, and @option{-X} options - (and, if necessary, the @option{-P} and @option{-S} options) - should be quoted to protect them from expansion before the - @code{complete} builtin is invoked. - - - @table @code - @item -o @var{comp-option} - The @var{comp-option} controls several aspects of the compspec's behavior - beyond the simple generation of completions. - @var{comp-option} may be one of: - - @table @code - - @item default - Use Readline's default filename completion if the compspec generates - no matches. - - @item dirnames - Perform directory name completion if the compspec generates no matches. - - @item filenames - Tell Readline that the compspec generates filenames, so it can perform any - filename\-specific processing (like adding a slash to directory names or - suppressing trailing spaces). This option is intended to be used with - shell functions specified with @option{-F}. - - @item nospace - Tell Readline not to append a space (the default) to words completed at - the end of the line. - @end table - - @item -A @var{action} - The @var{action} may be one of the following to generate a list of possible - completions: - - @table @code - @item alias - Alias names. May also be specified as @option{-a}. - - @item arrayvar - Array variable names. - - @item binding - Readline key binding names (@pxref{Bindable Readline Commands}). - - @item builtin - Names of shell builtin commands. May also be specified as @option{-b}. - - @item command - Command names. May also be specified as @option{-c}. - - @item directory - Directory names. May also be specified as @option{-d}. - - @item disabled - Names of disabled shell builtins. - - @item enabled - Names of enabled shell builtins. - - @item export - Names of exported shell variables. May also be specified as @option{-e}. - - @item file - File names. May also be specified as @option{-f}. - - @item function - Names of shell functions. - - @item group - Group names. May also be specified as @option{-g}. - - @item helptopic - Help topics as accepted by the @code{help} builtin (@pxref{Bash Builtins}). - - @item hostname - Hostnames, as taken from the file specified by the - @env{HOSTFILE} shell variable (@pxref{Bash Variables}). - - @item job - Job names, if job control is active. May also be specified as @option{-j}. - - @item keyword - Shell reserved words. May also be specified as @option{-k}. - - @item running - Names of running jobs, if job control is active. - - @item service - Service names. May also be specified as @option{-s}. - - @item setopt - Valid arguments for the @option{-o} option to the @code{set} builtin - (@pxref{The Set Builtin}). - - @item shopt - Shell option names as accepted by the @code{shopt} builtin - (@pxref{Bash Builtins}). - - @item signal - Signal names. - - @item stopped - Names of stopped jobs, if job control is active. - - @item user - User names. May also be specified as @option{-u}. - - @item variable - Names of all shell variables. May also be specified as @option{-v}. - @end table - - @item -G @var{globpat} - The filename expansion pattern @var{globpat} is expanded to generate - the possible completions. - - @item -W @var{wordlist} - The @var{wordlist} is split using the characters in the - @env{IFS} special variable as delimiters, and each resultant word - is expanded. - The possible completions are the members of the resultant list which - match the word being completed. - - @item -C @var{command} - @var{command} is executed in a subshell environment, and its output is - used as the possible completions. - - @item -F @var{function} - The shell function @var{function} is executed in the current shell - environment. - When it finishes, the possible completions are retrieved from the value - of the @env{COMPREPLY} array variable. - - @item -X @var{filterpat} - @var{filterpat} is a pattern as used for filename expansion. - It is applied to the list of possible completions generated by the - preceding options and arguments, and each completion matching - @var{filterpat} is removed from the list. - A leading @samp{!} in @var{filterpat} negates the pattern; in this - case, any completion not matching @var{filterpat} is removed. - - @item -P @var{prefix} - @var{prefix} is added at the beginning of each possible completion - after all other options have been applied. - - @item -S @var{suffix} - @var{suffix} is appended to each possible completion - after all other options have been applied. - @end table - - The return value is true unless an invalid option is supplied, an option - other than @option{-p} or @option{-r} is supplied without a @var{name} - argument, an attempt is made to remove a completion specification for - a @var{name} for which no specification exists, or - an error occurs adding a completion specification. - - @end table - @end ifset --- 0 ---- diff -aNrc2 bash-2.05b-patched/lib/readline/doc/rluserman.texi bash-3.0/lib/readline/doc/rluserman.texi *** bash-2.05b-patched/lib/readline/doc/rluserman.texi Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/readline/doc/rluserman.texi Tue Jul 27 09:29:18 2004 *************** *** 0 **** --- 1,88 ---- + \input texinfo @c -*-texinfo-*- + @comment %**start of header (This is for running Texinfo on a region.) + @setfilename rluserman.info + @settitle GNU Readline Library + @comment %**end of header (This is for running Texinfo on a region.) + + @setchapternewpage odd + + @include version.texi + + @copying + This manual describes the end user interface of the GNU Readline Library + (version @value{VERSION}, @value{UPDATED}), a library which aids in the + consistency of user interface across discrete programs which provide + a command line interface. + + Copyright @copyright{} 1988-2004 Free Software Foundation, Inc. + + Permission is granted to make and distribute verbatim copies of + this manual provided the copyright notice and this permission notice + are preserved on all copies. + + @quotation + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 or + any later version published by the Free Software Foundation; with no + Invariant Sections, with the Front-Cover texts being ``A GNU Manual,'' + and with the Back-Cover Texts as in (a) below. A copy of the license is + included in the section entitled ``GNU Free Documentation License.'' + + (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify + this GNU Manual, like GNU software. Copies published by the Free + Software Foundation raise funds for GNU development.'' + @end quotation + @end copying + + @dircategory Libraries + @direntry + * RLuserman: (rluserman). The GNU readline library User's Manual. + @end direntry + + @titlepage + @title GNU Readline Library User Interface + @subtitle Edition @value{EDITION}, for @code{Readline Library} Version @value{VERSION}. + @subtitle @value{UPDATED-MONTH} + @author Chet Ramey, Case Western Reserve University + @author Brian Fox, Free Software Foundation + + @page + @vskip 0pt plus 1filll + @insertcopying + + @sp 1 + Published by the Free Software Foundation @* + 59 Temple Place, Suite 330, @* + Boston, MA 02111-1307 @* + USA @* + + @end titlepage + + @contents + + @ifnottex + @node Top + @top GNU Readline Library + + This document describes the end user interface of the GNU Readline Library, + a utility which aids in the consistency of user interface across discrete + programs which provide a command line interface. + + @menu + * Command Line Editing:: GNU Readline User's Manual. + * Copying This Manual:: Copying This Manual. + @end menu + @end ifnottex + + @include rluser.texi + + @node Copying This Manual + @appendix Copying This Manual + + @menu + * GNU Free Documentation License:: License for copying this manual. + @end menu + + @include fdl.texi + + @bye diff -aNrc2 bash-2.05b-patched/lib/readline/doc/rluserman.texinfo bash-3.0/lib/readline/doc/rluserman.texinfo *** bash-2.05b-patched/lib/readline/doc/rluserman.texinfo Tue Apr 16 17:12:24 2002 --- bash-3.0/lib/readline/doc/rluserman.texinfo Wed Dec 31 19:00:00 1969 *************** *** 1,94 **** - \input texinfo @c -*-texinfo-*- - @comment %**start of header (This is for running Texinfo on a region.) - @setfilename rluserman.info - @settitle GNU Readline Library - @comment %**end of header (This is for running Texinfo on a region.) - @setchapternewpage odd - - @include manvers.texinfo - - @ifinfo - @dircategory Libraries - @direntry - * RLuserman: (rluserman). The GNU readline library User's Manual. - @end direntry - - This document describes the end user interface of the GNU Readline Library, - a utility which aids in the consistency of user interface across discrete - programs that need to provide a command line interface. - - Copyright (C) 1988-2002 Free Software Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of - this manual provided the copyright notice and this permission notice - pare preserved on all copies. - - @ignore - Permission is granted to process this file through TeX and print the - results, provided the printed document carries copying permission - notice identical to this one except for the removal of this paragraph - (this paragraph not being relevant to the printed manual). - @end ignore - - Permission is granted to copy and distribute modified versions of this - manual under the conditions for verbatim copying, provided that the entire - resulting derived work is distributed under the terms of a permission - notice identical to this one. - - Permission is granted to copy and distribute translations of this manual - into another language, under the above conditions for modified versions, - except that this permission notice may be stated in a translation approved - by the Free Software Foundation. - @end ifinfo - - @titlepage - @title GNU Readline Library User Interface - @subtitle Edition @value{EDITION}, for @code{Readline Library} Version @value{VERSION}. - @subtitle @value{UPDATE-MONTH} - @author Brian Fox, Free Software Foundation - @author Chet Ramey, Case Western Reserve University - - @page - This document describes the end user interface of the GNU Readline Library, - a utility which aids in the consistency of user interface across discrete - programs that need to provide a command line interface. - - Published by the Free Software Foundation @* - 59 Temple Place, Suite 330, @* - Boston, MA 02111 USA - - Permission is granted to make and distribute verbatim copies of - this manual provided the copyright notice and this permission notice - are preserved on all copies. - - Permission is granted to copy and distribute modified versions of this - manual under the conditions for verbatim copying, provided that the entire - resulting derived work is distributed under the terms of a permission - notice identical to this one. - - Permission is granted to copy and distribute translations of this manual - into another language, under the above conditions for modified versions, - except that this permission notice may be stated in a translation approved - by the Free Software Foundation. - - @vskip 0pt plus 1filll - Copyright @copyright{} 1988-2002 Free Software Foundation, Inc. - @end titlepage - - @ifinfo - @node Top - @top GNU Readline Library - - This document describes the end user interface of the GNU Readline Library, - a utility which aids in the consistency of user interface across discrete - programs that need to provide a command line interface. - - @menu - * Command Line Editing:: GNU Readline User's Manual. - @end menu - @end ifinfo - - @include rluser.texinfo - - @contents - @bye --- 0 ---- diff -aNrc2 bash-2.05b-patched/lib/readline/doc/version.texi bash-3.0/lib/readline/doc/version.texi *** bash-2.05b-patched/lib/readline/doc/version.texi Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/readline/doc/version.texi Tue Jul 27 09:28:29 2004 *************** *** 0 **** --- 1,10 ---- + @ignore + Copyright (C) 1988-2004 Free Software Foundation, Inc. + @end ignore + + @set EDITION 5.0 + @set VERSION 5.0 + @set UPDATED 28 January 2004 + @set UPDATED-MONTH January 2004 + + @set LASTCHANGE Wed Jan 28 15:46:54 EST 2004 diff -aNrc2 bash-2.05b-patched/lib/readline/examples/histexamp.c bash-3.0/lib/readline/examples/histexamp.c *** bash-2.05b-patched/lib/readline/examples/histexamp.c Tue Apr 16 16:52:36 2002 --- bash-3.0/lib/readline/examples/histexamp.c Tue Jul 29 10:14:01 2003 *************** *** 32,38 **** { char line[1024], *t; ! int len, done = 0; line[0] = 0; using_history (); --- 32,39 ---- { char line[1024], *t; ! int len, done; line[0] = 0; + done = 0; using_history (); *************** *** 43,112 **** t = fgets (line, sizeof (line) - 1, stdin); if (t && *t) ! { ! len = strlen (t); ! if (t[len - 1] == '\n') ! t[len - 1] = '\0'; ! } if (!t) ! strcpy (line, "quit"); if (line[0]) ! { ! char *expansion; ! int result; ! ! using_history (); ! ! result = history_expand (line, &expansion); ! if (result) ! fprintf (stderr, "%s\n", expansion); ! ! if (result < 0 || result == 2) ! { ! free (expansion); ! continue; ! } ! ! add_history (expansion); ! strncpy (line, expansion, sizeof (line) - 1); ! free (expansion); ! } if (strcmp (line, "quit") == 0) ! done = 1; else if (strcmp (line, "save") == 0) ! write_history ("history_file"); else if (strcmp (line, "read") == 0) ! read_history ("history_file"); else if (strcmp (line, "list") == 0) ! { ! register HIST_ENTRY **the_list; ! register int i; ! ! the_list = history_list (); ! if (the_list) ! for (i = 0; the_list[i]; i++) ! printf ("%d: %s\n", i + history_base, the_list[i]->line); ! } else if (strncmp (line, "delete", 6) == 0) ! { ! int which; ! if ((sscanf (line + 6, "%d", &which)) == 1) ! { ! HIST_ENTRY *entry = remove_history (which); ! if (!entry) ! fprintf (stderr, "No such entry %d\n", which); ! else ! { ! free (entry->line); ! free (entry); ! } ! } ! else ! { ! fprintf (stderr, "non-numeric arg given to `delete'\n"); ! } ! } } } --- 44,122 ---- t = fgets (line, sizeof (line) - 1, stdin); if (t && *t) ! { ! len = strlen (t); ! if (t[len - 1] == '\n') ! t[len - 1] = '\0'; ! } if (!t) ! strcpy (line, "quit"); if (line[0]) ! { ! char *expansion; ! int result; ! ! using_history (); ! ! result = history_expand (line, &expansion); ! if (result) ! fprintf (stderr, "%s\n", expansion); ! ! if (result < 0 || result == 2) ! { ! free (expansion); ! continue; ! } ! ! add_history (expansion); ! strncpy (line, expansion, sizeof (line) - 1); ! free (expansion); ! } if (strcmp (line, "quit") == 0) ! done = 1; else if (strcmp (line, "save") == 0) ! write_history ("history_file"); else if (strcmp (line, "read") == 0) ! read_history ("history_file"); else if (strcmp (line, "list") == 0) ! { ! register HIST_ENTRY **the_list; ! register int i; ! time_t tt; ! char timestr[128]; ! ! the_list = history_list (); ! if (the_list) ! for (i = 0; the_list[i]; i++) ! { ! tt = history_get_time (the_list[i]); ! if (tt) ! strftime (timestr, sizeof (timestr), "%a %R", localtime(&tt)); ! else ! strcpy (timestr, "??"); ! printf ("%d: %s: %s\n", i + history_base, timestr, the_list[i]->line); ! } ! } else if (strncmp (line, "delete", 6) == 0) ! { ! int which; ! if ((sscanf (line + 6, "%d", &which)) == 1) ! { ! HIST_ENTRY *entry = remove_history (which); ! if (!entry) ! fprintf (stderr, "No such entry %d\n", which); ! else ! { ! free (entry->line); ! free (entry); ! } ! } ! else ! { ! fprintf (stderr, "non-numeric arg given to `delete'\n"); ! } ! } } } diff -aNrc2 bash-2.05b-patched/lib/readline/funmap.c bash-3.0/lib/readline/funmap.c *** bash-2.05b-patched/lib/readline/funmap.c Tue Jan 22 12:18:14 2002 --- bash-3.0/lib/readline/funmap.c Wed Jan 28 15:41:27 2004 *************** *** 132,135 **** --- 132,136 ---- { "undo", rl_undo_command }, { "universal-argument", rl_universal_argument }, + { "unix-filename-rubout", rl_unix_filename_rubout }, { "unix-line-discard", rl_unix_line_discard }, { "unix-word-rubout", rl_unix_word_rubout }, diff -aNrc2 bash-2.05b-patched/lib/readline/histexpand.c bash-3.0/lib/readline/histexpand.c *** bash-2.05b-patched/lib/readline/histexpand.c Tue Apr 16 11:47:59 2002 --- bash-3.0/lib/readline/histexpand.c Mon Mar 22 08:27:31 2004 *************** *** 1,5 **** /* histexpand.c -- history expansion. */ ! /* Copyright (C) 1989, 1992 Free Software Foundation, Inc. This file contains the GNU History Library (the Library), a set of --- 1,5 ---- /* histexpand.c -- history expansion. */ ! /* Copyright (C) 1989-2004 Free Software Foundation, Inc. This file contains the GNU History Library (the Library), a set of *************** *** 53,56 **** --- 53,58 ---- #define HISTORY_QUOTE_CHARACTERS "\"'`" + #define slashify_in_quotes "\\`\"$" + typedef int _hist_search_func_t PARAMS((const char *, int)); *************** *** 66,69 **** --- 68,73 ---- static char *get_history_word_specifier PARAMS((char *, char *, int *)); static char *history_find_word PARAMS((char *, int)); + static int history_tokenize_word PARAMS((const char *, int)); + static char *history_substring PARAMS((const char *, int, int)); static char *quote_breaks PARAMS((char *)); *************** *** 212,217 **** /* These produce warnings because we're passing a const string to a function that takes a non-const string. */ ! _rl_adjust_point (string, i, &ps); ! if ((v = _rl_get_char_len (string + i, &ps)) > 1) { i += v - 1; --- 216,221 ---- /* These produce warnings because we're passing a const string to a function that takes a non-const string. */ ! _rl_adjust_point ((char *)string, i, &ps); ! if ((v = _rl_get_char_len ((char *)string + i, &ps)) > 1) { i += v - 1; *************** *** 518,522 **** { int i, n, starting_index; ! int substitute_globally, want_quotes, print_only; char *event, *temp, *result, *tstr, *t, c, *word_spec; int result_len; --- 522,526 ---- { int i, n, starting_index; ! int substitute_globally, subst_bywords, want_quotes, print_only; char *event, *temp, *result, *tstr, *t, c, *word_spec; int result_len; *************** *** 600,604 **** /* Perhaps there are other modifiers involved. Do what they say. */ ! want_quotes = substitute_globally = print_only = 0; starting_index = i; --- 604,608 ---- /* Perhaps there are other modifiers involved. Do what they say. */ ! want_quotes = substitute_globally = subst_bywords = print_only = 0; starting_index = i; *************** *** 607,611 **** c = string[i + 1]; ! if (c == 'g') { substitute_globally = 1; --- 611,615 ---- c = string[i + 1]; ! if (c == 'g' || c == 'a') { substitute_globally = 1; *************** *** 613,616 **** --- 617,626 ---- c = string[i + 1]; } + else if (c == 'G') + { + subst_bywords = 1; + i++; + c = string[i + 1]; + } switch (c) *************** *** 684,688 **** { char *new_event; ! int delimiter, failed, si, l_temp; if (c == 's') --- 694,698 ---- { char *new_event; ! int delimiter, failed, si, l_temp, ws, we; if (c == 's') *************** *** 761,791 **** /* Find the first occurrence of THIS in TEMP. */ ! si = 0; for (failed = 1; (si + subst_lhs_len) <= l_temp; si++) ! if (STREQN (temp+si, subst_lhs, subst_lhs_len)) ! { ! int len = subst_rhs_len - subst_lhs_len + l_temp; ! new_event = (char *)xmalloc (1 + len); ! strncpy (new_event, temp, si); ! strncpy (new_event + si, subst_rhs, subst_rhs_len); ! strncpy (new_event + si + subst_rhs_len, ! temp + si + subst_lhs_len, ! l_temp - (si + subst_lhs_len)); ! new_event[len] = '\0'; ! free (temp); ! temp = new_event; ! failed = 0; ! if (substitute_globally) ! { ! si += subst_rhs_len; ! l_temp = strlen (temp); ! substitute_globally++; ! continue; ! } ! else ! break; ! } if (substitute_globally > 1) --- 771,835 ---- /* Find the first occurrence of THIS in TEMP. */ ! /* Substitute SUBST_RHS for SUBST_LHS in TEMP. There are three ! cases to consider: ! ! 1. substitute_globally == subst_bywords == 0 ! 2. substitute_globally == 1 && subst_bywords == 0 ! 3. substitute_globally == 0 && subst_bywords == 1 ! ! In the first case, we substitute for the first occurrence only. ! In the second case, we substitute for every occurrence. ! In the third case, we tokenize into words and substitute the ! first occurrence of each word. */ ! ! si = we = 0; for (failed = 1; (si + subst_lhs_len) <= l_temp; si++) ! { ! /* First skip whitespace and find word boundaries if ! we're past the end of the word boundary we found ! the last time. */ ! if (subst_bywords && si > we) ! { ! for (; temp[si] && whitespace (temp[si]); si++) ! ; ! ws = si; ! we = history_tokenize_word (temp, si); ! } ! if (STREQN (temp+si, subst_lhs, subst_lhs_len)) ! { ! int len = subst_rhs_len - subst_lhs_len + l_temp; ! new_event = (char *)xmalloc (1 + len); ! strncpy (new_event, temp, si); ! strncpy (new_event + si, subst_rhs, subst_rhs_len); ! strncpy (new_event + si + subst_rhs_len, ! temp + si + subst_lhs_len, ! l_temp - (si + subst_lhs_len)); ! new_event[len] = '\0'; ! free (temp); ! temp = new_event; ! failed = 0; ! ! if (substitute_globally) ! { ! /* Reported to fix a bug that causes it to skip every ! other match when matching a single character. Was ! si += subst_rhs_len previously. */ ! si += subst_rhs_len - 1; ! l_temp = strlen (temp); ! substitute_globally++; ! continue; ! } ! else if (subst_bywords) ! { ! si = we; ! l_temp = strlen (temp); ! continue; ! } ! else ! break; ! } ! } if (substitute_globally > 1) *************** *** 880,884 **** { register int j; ! int i, r, l, passc, cc, modified, eindex, only_printing; char *string; --- 924,928 ---- { register int j; ! int i, r, l, passc, cc, modified, eindex, only_printing, dquote; char *string; *************** *** 943,947 **** /* `!' followed by one of the characters in history_no_expand_chars is NOT an expansion. */ ! for (i = 0; string[i]; i++) { #if defined (HANDLE_MULTIBYTE) --- 987,991 ---- /* `!' followed by one of the characters in history_no_expand_chars is NOT an expansion. */ ! for (i = dquote = 0; string[i]; i++) { #if defined (HANDLE_MULTIBYTE) *************** *** 985,991 **** break; } ! /* XXX - at some point, might want to extend this to handle ! double quotes as well. */ ! else if (history_quotes_inhibit_expansion && string[i] == '\'') { /* If this is bash, single quotes inhibit history expansion. */ --- 1029,1045 ---- break; } ! /* Shell-like quoting: allow backslashes to quote double quotes ! inside a double-quoted string. */ ! else if (dquote && string[i] == '\\' && cc == '"') ! i++; ! /* More shell-like quoting: if we're paying attention to single ! quotes and letting them quote the history expansion character, ! then we need to pay attention to double quotes, because single ! quotes are not special inside double-quoted strings. */ ! else if (history_quotes_inhibit_expansion && string[i] == '"') ! { ! dquote = 1 - dquote; ! } ! else if (dquote == 0 && history_quotes_inhibit_expansion && string[i] == '\'') { /* If this is bash, single quotes inhibit history expansion. */ *************** *** 1000,1003 **** --- 1054,1058 ---- i++; } + } *************** *** 1011,1015 **** /* Extract and perform the substitution. */ ! for (passc = i = j = 0; i < l; i++) { int tchar = string[i]; --- 1066,1070 ---- /* Extract and perform the substitution. */ ! for (passc = dquote = i = j = 0; i < l; i++) { int tchar = string[i]; *************** *** 1062,1070 **** break; case '\'': { /* If history_quotes_inhibit_expansion is set, single quotes inhibit history expansion. */ ! if (history_quotes_inhibit_expansion) { int quote, slen; --- 1117,1130 ---- break; + case '"': + dquote = 1 - dquote; + ADD_CHAR (tchar); + break; + case '\'': { /* If history_quotes_inhibit_expansion is set, single quotes inhibit history expansion. */ ! if (dquote == 0 && history_quotes_inhibit_expansion) { int quote, slen; *************** *** 1161,1165 **** --- 1221,1227 ---- if (only_printing) { + #if 0 add_history (result); + #endif return (2); } *************** *** 1224,1228 **** first = 0; else if (spec[i] == '^') ! first = 1; else if (_rl_digit_p (spec[i]) && expecting_word_spec) { --- 1286,1293 ---- first = 0; else if (spec[i] == '^') ! { ! first = 1; ! i++; ! } else if (_rl_digit_p (spec[i]) && expecting_word_spec) { *************** *** 1339,1343 **** } ! #define slashify_in_quotes "\\`\"$" /* Parse STRING into tokens and return an array of strings. If WIND is --- 1404,1504 ---- } ! static int ! history_tokenize_word (string, ind) ! const char *string; ! int ind; ! { ! register int i; ! int delimiter; ! ! i = ind; ! delimiter = 0; ! ! if (member (string[i], "()\n")) ! { ! i++; ! return i; ! } ! ! if (member (string[i], "<>;&|$")) ! { ! int peek = string[i + 1]; ! ! if (peek == string[i] && peek != '$') ! { ! if (peek == '<' && string[i + 2] == '-') ! i++; ! i += 2; ! return i; ! } ! else ! { ! if ((peek == '&' && (string[i] == '>' || string[i] == '<')) || ! (peek == '>' && string[i] == '&') || ! (peek == '(' && (string[i] == '>' || string[i] == '<')) || /* ) */ ! (peek == '(' && string[i] == '$')) /* ) */ ! { ! i += 2; ! return i; ! } ! } ! ! if (string[i] != '$') ! { ! i++; ! return i; ! } ! } ! ! /* Get word from string + i; */ ! ! if (member (string[i], HISTORY_QUOTE_CHARACTERS)) ! delimiter = string[i++]; ! ! for (; string[i]; i++) ! { ! if (string[i] == '\\' && string[i + 1] == '\n') ! { ! i++; ! continue; ! } ! ! if (string[i] == '\\' && delimiter != '\'' && ! (delimiter != '"' || member (string[i], slashify_in_quotes))) ! { ! i++; ! continue; ! } ! ! if (delimiter && string[i] == delimiter) ! { ! delimiter = 0; ! continue; ! } ! ! if (!delimiter && (member (string[i], history_word_delimiters))) ! break; ! ! if (!delimiter && member (string[i], HISTORY_QUOTE_CHARACTERS)) ! delimiter = string[i]; ! } ! ! return i; ! } ! ! static char * ! history_substring (string, start, end) ! const char *string; ! int start, end; ! { ! register int len; ! register char *result; ! ! len = end - start; ! result = (char *)xmalloc (len + 1); ! strncpy (result, string + start, len); ! result[len] = '\0'; ! return result; ! } /* Parse STRING into tokens and return an array of strings. If WIND is *************** *** 1352,1356 **** char **result; register int i, start, result_index, size; - int len, delimiter; /* If we're searching for a string that's not part of a word (e.g., " "), --- 1513,1516 ---- *************** *** 1363,1368 **** for (i = result_index = size = 0, result = (char **)NULL; string[i]; ) { - delimiter = 0; - /* Skip leading whitespace. */ for (; string[i] && whitespace (string[i]); i++) --- 1523,1526 ---- *************** *** 1372,1445 **** start = i; - - if (member (string[i], "()\n")) - { - i++; - goto got_token; - } - - if (member (string[i], "<>;&|$")) - { - int peek = string[i + 1]; ! if (peek == string[i] && peek != '$') ! { ! if (peek == '<' && string[i + 2] == '-') ! i++; ! i += 2; ! goto got_token; ! } ! else ! { ! if ((peek == '&' && (string[i] == '>' || string[i] == '<')) || ! ((peek == '>') && (string[i] == '&')) || ! ((peek == '(') && (string[i] == '$'))) ! { ! i += 2; ! goto got_token; ! } ! } ! if (string[i] != '$') ! { ! i++; ! goto got_token; ! } ! } ! ! /* Get word from string + i; */ ! if (member (string[i], HISTORY_QUOTE_CHARACTERS)) ! delimiter = string[i++]; ! ! for (; string[i]; i++) { ! if (string[i] == '\\' && string[i + 1] == '\n') ! { ! i++; ! continue; ! } ! ! if (string[i] == '\\' && delimiter != '\'' && ! (delimiter != '"' || member (string[i], slashify_in_quotes))) ! { ! i++; ! continue; ! } ! ! if (delimiter && string[i] == delimiter) ! { ! delimiter = 0; ! continue; ! } ! ! if (!delimiter && (member (string[i], history_word_delimiters))) ! break; ! ! if (!delimiter && member (string[i], HISTORY_QUOTE_CHARACTERS)) ! delimiter = string[i]; } - got_token: - /* If we are looking for the word in which the character at a particular index falls, remember it. */ --- 1530,1547 ---- start = i; ! i = history_tokenize_word (string, start); ! /* If we have a non-whitespace delimiter character (which would not be ! skipped by the loop above), use it and any adjacent delimiters to ! make a separate field. Any adjacent white space will be skipped the ! next time through the loop. */ ! if (i == start && history_word_delimiters) { ! i++; ! while (string[i] && member (string[i], history_word_delimiters)) ! i++; } /* If we are looking for the word in which the character at a particular index falls, remember it. */ *************** *** 1447,1457 **** *indp = result_index; - len = i - start; if (result_index + 2 >= size) result = (char **)xrealloc (result, ((size += 10) * sizeof (char *))); ! result[result_index] = (char *)xmalloc (1 + len); ! strncpy (result[result_index], string + start, len); ! result[result_index][len] = '\0'; ! result[++result_index] = (char *)NULL; } --- 1549,1557 ---- *indp = result_index; if (result_index + 2 >= size) result = (char **)xrealloc (result, ((size += 10) * sizeof (char *))); ! ! result[result_index++] = history_substring (string, start, i); ! result[result_index] = (char *)NULL; } diff -aNrc2 bash-2.05b-patched/lib/readline/histfile.c bash-3.0/lib/readline/histfile.c *** bash-2.05b-patched/lib/readline/histfile.c Tue Mar 26 09:00:26 2002 --- bash-3.0/lib/readline/histfile.c Wed Mar 3 22:39:33 2004 *************** *** 1,5 **** /* histfile.c - functions to manipulate the history file. */ ! /* Copyright (C) 1989, 1992 Free Software Foundation, Inc. This file contains the GNU History Library (the Library), a set of --- 1,5 ---- /* histfile.c - functions to manipulate the history file. */ ! /* Copyright (C) 1989-2003 Free Software Foundation, Inc. This file contains the GNU History Library (the Library), a set of *************** *** 24,29 **** --- 24,34 ---- don't have to know what data types are used, just what functions you can call. I think I have done that. */ + #define READLINE_LIBRARY + #if defined (__TANDEM) + # include + #endif + #if defined (HAVE_CONFIG_H) # include *************** *** 33,37 **** #include ! #ifndef _MINIX # include #endif --- 38,42 ---- #include ! #if ! defined (_MINIX) && defined (HAVE_SYS_FILE_H) # include #endif *************** *** 53,57 **** #endif ! #ifdef HAVE_MMAP # include --- 58,62 ---- #endif ! #ifdef HISTORY_USE_MMAP # include *************** *** 68,72 **** # endif ! #endif /* HAVE_MMAP */ /* If we're compiling for __EMX__ (OS/2) or __CYGWIN__ (cygwin32 environment --- 73,77 ---- # endif ! #endif /* HISTORY_USE_MMAP */ /* If we're compiling for __EMX__ (OS/2) or __CYGWIN__ (cygwin32 environment *************** *** 94,97 **** --- 99,109 ---- #include "xmalloc.h" + /* If non-zero, we write timestamps to the history file in history_do_write() */ + int history_write_timestamps = 0; + + /* Does S look like the beginning of a history timestamp entry? Placeholder + for more extensive tests. */ + #define HIST_TIMESTAMP_START(s) (*(s) == history_comment_char) + /* Return the string that should be used in the place of this filename. This only matters when you don't specify the *************** *** 152,162 **** int from, to; { ! register char *line_start, *line_end; ! char *input, *buffer, *bufend; int file, current_line, chars_read; struct stat finfo; size_t file_size; ! buffer = (char *)NULL; input = history_filename (filename); file = open (input, O_RDONLY|O_BINARY, 0666); --- 164,181 ---- int from, to; { ! register char *line_start, *line_end, *p; ! char *input, *buffer, *bufend, *last_ts; int file, current_line, chars_read; struct stat finfo; size_t file_size; + #if defined (EFBIG) + int overflow_errno = EFBIG; + #elif defined (EOVERFLOW) + int overflow_errno = EOVERFLOW; + #else + int overflow_errno = EIO; + #endif ! buffer = last_ts = (char *)NULL; input = history_filename (filename); file = open (input, O_RDONLY|O_BINARY, 0666); *************** *** 170,192 **** if (file_size != finfo.st_size || file_size + 1 < file_size) { ! #if defined (EFBIG) ! errno = EFBIG; ! #elif defined (EOVERFLOW) ! errno = EOVERFLOW; ! #endif goto error_and_exit; } ! #ifdef HAVE_MMAP /* We map read/write and private so we can change newlines to NULs without affecting the underlying object. */ buffer = (char *)mmap (0, file_size, PROT_READ|PROT_WRITE, MAP_RFLAGS, file, 0); if ((void *)buffer == MAP_FAILED) ! goto error_and_exit; chars_read = file_size; #else buffer = (char *)malloc (file_size + 1); if (buffer == 0) ! goto error_and_exit; chars_read = read (file, buffer, file_size); --- 189,213 ---- if (file_size != finfo.st_size || file_size + 1 < file_size) { ! errno = overflow_errno; goto error_and_exit; } ! #ifdef HISTORY_USE_MMAP /* We map read/write and private so we can change newlines to NULs without affecting the underlying object. */ buffer = (char *)mmap (0, file_size, PROT_READ|PROT_WRITE, MAP_RFLAGS, file, 0); if ((void *)buffer == MAP_FAILED) ! { ! errno = overflow_errno; ! goto error_and_exit; ! } chars_read = file_size; #else buffer = (char *)malloc (file_size + 1); if (buffer == 0) ! { ! errno = overflow_errno; ! goto error_and_exit; ! } chars_read = read (file, buffer, file_size); *************** *** 195,204 **** { error_and_exit: ! chars_read = errno; if (file >= 0) close (file); FREE (input); ! #ifndef HAVE_MMAP FREE (buffer); #endif --- 216,228 ---- { error_and_exit: ! if (errno != 0) ! chars_read = errno; ! else ! chars_read = EIO; if (file >= 0) close (file); FREE (input); ! #ifndef HISTORY_USE_MMAP FREE (buffer); #endif *************** *** 221,226 **** if (*line_end == '\n') { ! current_line++; ! line_start = line_end + 1; } --- 245,254 ---- if (*line_end == '\n') { ! p = line_end + 1; ! /* If we see something we think is a timestamp, continue with this ! line. We should check more extensively here... */ ! if (HIST_TIMESTAMP_START(p) == 0) ! current_line++; ! line_start = p; } *************** *** 232,236 **** if (*line_start) ! add_history (line_start); current_line++; --- 260,279 ---- if (*line_start) ! { ! if (HIST_TIMESTAMP_START(line_start) == 0) ! { ! add_history (line_start); ! if (last_ts) ! { ! add_history_time (last_ts); ! last_ts = NULL; ! } ! } ! else ! { ! last_ts = line_start; ! current_line--; ! } ! } current_line++; *************** *** 243,247 **** FREE (input); ! #ifndef HAVE_MMAP FREE (buffer); #else --- 286,290 ---- FREE (input); ! #ifndef HISTORY_USE_MMAP FREE (buffer); #else *************** *** 260,264 **** int lines; { ! char *buffer, *filename, *bp; int file, chars_read, rv; struct stat finfo; --- 303,307 ---- int lines; { ! char *buffer, *filename, *bp, *bp1; /* bp1 == bp+1 */ int file, chars_read, rv; struct stat finfo; *************** *** 323,331 **** /* Count backwards from the end of buffer until we have passed ! LINES lines. */ ! for (bp = buffer + chars_read - 1; lines && bp > buffer; bp--) { ! if (*bp == '\n') lines--; } --- 366,377 ---- /* Count backwards from the end of buffer until we have passed ! LINES lines. bp1 is set funny initially. But since bp[1] can't ! be a comment character (since it's off the end) and *bp can't be ! both a newline and the history comment character, it should be OK. */ ! for (bp1 = bp = buffer + chars_read - 1; lines && bp > buffer; bp--) { ! if (*bp == '\n' && HIST_TIMESTAMP_START(bp1) == 0) lines--; + bp1 = bp; } *************** *** 336,344 **** this line until the end of the buffer. */ for ( ; bp > buffer; bp--) ! if (*bp == '\n') ! { ! bp++; ! break; ! } /* Write only if there are more lines in the file than we want to --- 382,393 ---- this line until the end of the buffer. */ for ( ; bp > buffer; bp--) ! { ! if (*bp == '\n' && HIST_TIMESTAMP_START(bp1) == 0) ! { ! bp++; ! break; ! } ! bp1 = bp; ! } /* Write only if there are more lines in the file than we want to *************** *** 375,381 **** char *output; int file, mode, rv; size_t cursize; - #ifdef HAVE_MMAP mode = overwrite ? O_RDWR|O_CREAT|O_TRUNC|O_BINARY : O_RDWR|O_APPEND|O_BINARY; #else --- 424,430 ---- char *output; int file, mode, rv; + #ifdef HISTORY_USE_MMAP size_t cursize; mode = overwrite ? O_RDWR|O_CREAT|O_TRUNC|O_BINARY : O_RDWR|O_APPEND|O_BINARY; #else *************** *** 391,395 **** } ! #ifdef HAVE_MMAP cursize = overwrite ? 0 : lseek (file, 0, SEEK_END); #endif --- 440,444 ---- } ! #ifdef HISTORY_USE_MMAP cursize = overwrite ? 0 : lseek (file, 0, SEEK_END); #endif *************** *** 409,416 **** /* Calculate the total number of bytes to write. */ for (buffer_size = 0, i = history_length - nelements; i < history_length; i++) ! buffer_size += 1 + strlen (the_history[i]->line); /* Allocate the buffer, and fill it. */ ! #ifdef HAVE_MMAP if (ftruncate (file, buffer_size+cursize) == -1) goto mmap_error; --- 458,473 ---- /* Calculate the total number of bytes to write. */ for (buffer_size = 0, i = history_length - nelements; i < history_length; i++) ! #if 0 ! buffer_size += 2 + HISTENT_BYTES (the_history[i]); ! #else ! { ! if (history_write_timestamps && the_history[i]->timestamp && the_history[i]->timestamp[0]) ! buffer_size += strlen (the_history[i]->timestamp) + 1; ! buffer_size += strlen (the_history[i]->line) + 1; ! } ! #endif /* Allocate the buffer, and fill it. */ ! #ifdef HISTORY_USE_MMAP if (ftruncate (file, buffer_size+cursize) == -1) goto mmap_error; *************** *** 437,440 **** --- 494,503 ---- for (j = 0, i = history_length - nelements; i < history_length; i++) { + if (history_write_timestamps && the_history[i]->timestamp && the_history[i]->timestamp[0]) + { + strcpy (buffer + j, the_history[i]->timestamp); + j += strlen (the_history[i]->timestamp); + buffer[j++] = '\n'; + } strcpy (buffer + j, the_history[i]->line); j += strlen (the_history[i]->line); *************** *** 442,446 **** } ! #ifdef HAVE_MMAP if (msync (buffer, buffer_size, 0) != 0 || munmap (buffer, buffer_size) != 0) rv = errno; --- 505,509 ---- } ! #ifdef HISTORY_USE_MMAP if (msync (buffer, buffer_size, 0) != 0 || munmap (buffer, buffer_size) != 0) rv = errno; diff -aNrc2 bash-2.05b-patched/lib/readline/history.c bash-3.0/lib/readline/history.c *** bash-2.05b-patched/lib/readline/history.c Tue Mar 12 11:27:34 2002 --- bash-3.0/lib/readline/history.c Tue Jul 15 16:04:24 2003 *************** *** 1,5 **** ! /* History.c -- standalone history library */ ! /* Copyright (C) 1989, 1992 Free Software Foundation, Inc. This file contains the GNU History Library (the Library), a set of --- 1,5 ---- ! /* history.c -- standalone history library */ ! /* Copyright (C) 1989-2003 Free Software Foundation, Inc. This file contains the GNU History Library (the Library), a set of *************** *** 53,56 **** --- 53,58 ---- #define DEFAULT_HISTORY_GROW_SIZE 50 + static char *hist_inittime PARAMS((void)); + /* **************************************************************** */ /* */ *************** *** 124,128 **** /* Return the number of bytes that the primary history entries are using. ! This just adds up the lengths of the_history->lines. */ int history_total_bytes () --- 126,131 ---- /* Return the number of bytes that the primary history entries are using. ! This just adds up the lengths of the_history->lines and the associated ! timestamps. */ int history_total_bytes () *************** *** 131,135 **** for (i = result = 0; the_history && the_history[i]; i++) ! result += strlen (the_history[i]->line); return (result); --- 134,138 ---- for (i = result = 0; the_history && the_history[i]; i++) ! result += HISTENT_BYTES (the_history[i]); return (result); *************** *** 207,210 **** --- 210,247 ---- } + time_t + history_get_time (hist) + HIST_ENTRY *hist; + { + char *ts; + time_t t; + + if (hist == 0 || hist->timestamp == 0) + return 0; + ts = hist->timestamp; + if (ts[0] != history_comment_char) + return 0; + t = (time_t) atol (ts + 1); /* XXX - should use strtol() here */ + return t; + } + + static char * + hist_inittime () + { + time_t t; + char ts[64], *ret; + + t = (time_t) time ((time_t *)0); + #if defined (HAVE_VSNPRINTF) /* assume snprintf if vsnprintf exists */ + snprintf (ts, sizeof (ts) - 1, "X%lu", (unsigned long) t); + #else + sprintf (ts, "X%lu", (unsigned long) t); + #endif + ret = savestring (ts); + ret[0] = history_comment_char; + + return ret; + } + /* Place STRING at the end of the history list. The data field is set to NULL. */ *************** *** 226,233 **** /* If there is something in the slot, then remove it. */ if (the_history[0]) ! { ! free (the_history[0]->line); ! free (the_history[0]); ! } /* Copy the rest of the entries, moving down one slot. */ --- 263,267 ---- /* If there is something in the slot, then remove it. */ if (the_history[0]) ! (void) free_history_entry (the_history[0]); /* Copy the rest of the entries, moving down one slot. */ *************** *** 261,268 **** --- 295,333 ---- temp->data = (char *)NULL; + temp->timestamp = hist_inittime (); + the_history[history_length] = (HIST_ENTRY *)NULL; the_history[history_length - 1] = temp; } + /* Change the time stamp of the most recent history entry to STRING. */ + void + add_history_time (string) + const char *string; + { + HIST_ENTRY *hs; + + hs = the_history[history_length - 1]; + FREE (hs->timestamp); + hs->timestamp = savestring (string); + } + + /* Free HIST and return the data so the calling application can free it + if necessary and desired. */ + histdata_t + free_history_entry (hist) + HIST_ENTRY *hist; + { + histdata_t x; + + if (hist == 0) + return ((histdata_t) 0); + FREE (hist->line); + FREE (hist->timestamp); + x = hist->data; + free (hist); + return (x); + } + /* Make the history entry at WHICH have LINE and DATA. This returns the old entry so you can dispose of the data. In the case of an *************** *** 284,287 **** --- 349,353 ---- temp->line = savestring (line); temp->data = data; + temp->timestamp = savestring (old_value->timestamp); the_history[which] = temp; *************** *** 328,335 **** /* This loses because we cannot free the data. */ for (i = 0, j = history_length - max; i < j; i++) ! { ! free (the_history[i]->line); ! free (the_history[i]); ! } history_base = i; --- 394,398 ---- /* This loses because we cannot free the data. */ for (i = 0, j = history_length - max; i < j; i++) ! free_history_entry (the_history[i]); history_base = i; *************** *** 373,378 **** for (i = 0; i < history_length; i++) { ! free (the_history[i]->line); ! free (the_history[i]); the_history[i] = (HIST_ENTRY *)NULL; } --- 436,440 ---- for (i = 0; i < history_length; i++) { ! free_history_entry (the_history[i]); the_history[i] = (HIST_ENTRY *)NULL; } diff -aNrc2 bash-2.05b-patched/lib/readline/history.h bash-3.0/lib/readline/history.h *** bash-2.05b-patched/lib/readline/history.h Wed Aug 22 09:37:23 2001 --- bash-3.0/lib/readline/history.h Thu Jul 31 08:38:44 2003 *************** *** 1,4 **** ! /* History.h -- the names of functions that you can call in history. */ ! /* Copyright (C) 1989, 1992 Free Software Foundation, Inc. This file contains the GNU History Library (the Library), a set of --- 1,4 ---- ! /* history.h -- the names of functions that you can call in history. */ ! /* Copyright (C) 1989-2003 Free Software Foundation, Inc. This file contains the GNU History Library (the Library), a set of *************** *** 27,30 **** --- 27,32 ---- #endif + #include /* XXX - for history timestamp code */ + #if defined READLINE_LIBRARY # include "rlstdc.h" *************** *** 44,50 **** --- 46,56 ---- typedef struct _hist_entry { char *line; + char *timestamp; /* char * rather than time_t for read/write */ histdata_t data; } HIST_ENTRY; + /* Size of the history-library-managed space in history entry HS. */ + #define HISTENT_BYTES(hs) (strlen ((hs)->line) + strlen ((hs)->timestamp)) + /* A structure used to pass the current state of the history stuff around. */ typedef struct _hist_state { *************** *** 77,80 **** --- 83,90 ---- extern void add_history PARAMS((const char *)); + /* Change the timestamp associated with the most recent history entry to + STRING. */ + extern void add_history_time PARAMS((const char *)); + /* A reasonably useless function, only here for completeness. WHICH is the magic number that tells us which element to delete. The *************** *** 82,85 **** --- 92,99 ---- extern HIST_ENTRY *remove_history PARAMS((int)); + /* Free the history entry H and return any application-specific data + associated with it. */ + extern histdata_t free_history_entry PARAMS((HIST_ENTRY *)); + /* Make the history entry at WHICH have LINE and DATA. This returns the old entry so you can dispose of the data. In the case of an *************** *** 120,123 **** --- 134,141 ---- extern HIST_ENTRY *history_get PARAMS((int)); + /* Return the timestamp associated with the HIST_ENTRY * passed as an + argument */ + extern time_t history_get_time PARAMS((HIST_ENTRY *)); + /* Return the number of bytes that the primary history entries are using. This just adds up the lengths of the_history->lines. */ *************** *** 231,234 **** --- 249,254 ---- extern char *history_search_delimiter_chars; extern int history_quotes_inhibit_expansion; + + extern int history_write_timestamps; /* Backwards compatibility */ diff -aNrc2 bash-2.05b-patched/lib/readline/histsearch.c bash-3.0/lib/readline/histsearch.c *** bash-2.05b-patched/lib/readline/histsearch.c Tue Mar 12 11:28:12 2002 --- bash-3.0/lib/readline/histsearch.c Mon Sep 22 08:58:37 2003 *************** *** 78,86 **** return (-1); ! if (!history_length || ((i == history_length) && !reverse)) return (-1); ! if (reverse && (i == history_length)) ! i--; #define NEXT_LINE() do { if (reverse) i--; else i++; } while (0) --- 78,86 ---- return (-1); ! if (!history_length || ((i >= history_length) && !reverse)) return (-1); ! if (reverse && (i >= history_length)) ! i = history_length - 1; #define NEXT_LINE() do { if (reverse) i--; else i++; } while (0) diff -aNrc2 bash-2.05b-patched/lib/readline/input.c bash-3.0/lib/readline/input.c *** bash-2.05b-patched/lib/readline/input.c Thu Feb 21 09:50:45 2002 --- bash-3.0/lib/readline/input.c Mon Jul 12 15:33:44 2004 *************** *** 22,25 **** --- 22,29 ---- #define READLINE_LIBRARY + #if defined (__TANDEM) + # include + #endif + #if defined (HAVE_CONFIG_H) # include *************** *** 155,158 **** --- 159,168 ---- } + int + _rl_pushed_input_available () + { + return (push_index != pop_index); + } + /* If a character is available to be read, then read it and stuff it into IBUFFER. Otherwise, just return. Returns number of characters read *************** *** 163,167 **** int tty; register int tem, result; ! int chars_avail; char input; #if defined(HAVE_SELECT) --- 173,177 ---- int tty; register int tem, result; ! int chars_avail, k; char input; #if defined(HAVE_SELECT) *************** *** 203,206 **** --- 213,221 ---- if (chars_avail == -1 && errno == EAGAIN) return 0; + if (chars_avail == 0) /* EOF */ + { + rl_stuff_char (EOF); + return (0); + } } #endif /* O_NDELAY */ *************** *** 226,230 **** { while (chars_avail--) ! rl_stuff_char ((*rl_getc_function) (rl_instream)); } else --- 241,250 ---- { while (chars_avail--) ! { ! k = (*rl_getc_function) (rl_instream); ! rl_stuff_char (k); ! if (k == NEWLINE || k == RETURN) ! break; ! } } else diff -aNrc2 bash-2.05b-patched/lib/readline/keymaps.c bash-3.0/lib/readline/keymaps.c *** bash-2.05b-patched/lib/readline/keymaps.c Mon Oct 30 12:05:43 2000 --- bash-3.0/lib/readline/keymaps.c Mon Oct 7 13:25:51 2002 *************** *** 65,68 **** --- 65,69 ---- } + #if 0 for (i = 'A'; i < ('Z' + 1); i++) { *************** *** 70,73 **** --- 71,75 ---- keymap[i].function = rl_do_lowercase_version; } + #endif return (keymap); *************** *** 80,85 **** { register int i; ! Keymap temp = rl_make_bare_keymap (); for (i = 0; i < KEYMAP_SIZE; i++) { --- 82,88 ---- { register int i; ! Keymap temp; + temp = rl_make_bare_keymap (); for (i = 0; i < KEYMAP_SIZE; i++) { *************** *** 110,119 **** #if KEYMAP_SIZE > 128 ! /* Printing characters in some 8-bit character sets. */ ! for (i = 128; i < 160; i++) ! newmap[i].function = rl_insert; ! ! /* ISO Latin-1 printing characters should self-insert. */ ! for (i = 160; i < 256; i++) newmap[i].function = rl_insert; #endif /* KEYMAP_SIZE > 128 */ --- 113,118 ---- #if KEYMAP_SIZE > 128 ! /* Printing characters in ISO Latin-1 and some 8-bit character sets. */ ! for (i = 128; i < 256; i++) newmap[i].function = rl_insert; #endif /* KEYMAP_SIZE > 128 */ diff -aNrc2 bash-2.05b-patched/lib/readline/kill.c bash-3.0/lib/readline/kill.c *** bash-2.05b-patched/lib/readline/kill.c Thu Dec 13 14:10:39 2001 --- bash-3.0/lib/readline/kill.c Wed Jan 28 15:38:39 2004 *************** *** 340,343 **** --- 340,384 ---- rl_mark = rl_point; } + + return 0; + } + + /* This deletes one filename component in a Unix pathname. That is, it + deletes backward to directory separator (`/') or whitespace. */ + int + rl_unix_filename_rubout (count, key) + int count, key; + { + int orig_point, c; + + if (rl_point == 0) + rl_ding (); + else + { + orig_point = rl_point; + if (count <= 0) + count = 1; + + while (count--) + { + c = rl_line_buffer[rl_point - 1]; + while (rl_point && (whitespace (c) || c == '/')) + { + rl_point--; + c = rl_line_buffer[rl_point - 1]; + } + + while (rl_point && (whitespace (c) == 0) && c != '/') + { + rl_point--; + c = rl_line_buffer[rl_point - 1]; + } + } + + rl_kill_text (orig_point, rl_point); + if (rl_editing_mode == emacs_mode) + rl_mark = rl_point; + } + return 0; } diff -aNrc2 bash-2.05b-patched/lib/readline/mbutil.c bash-3.0/lib/readline/mbutil.c *** bash-2.05b-patched/lib/readline/mbutil.c Wed May 7 14:54:42 2003 --- bash-3.0/lib/readline/mbutil.c Wed Jan 14 09:44:52 2004 *************** *** 1,5 **** /* mbutil.c -- readline multibyte character utility functions */ ! /* Copyright (C) 2001 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for --- 1,5 ---- /* mbutil.c -- readline multibyte character utility functions */ ! /* Copyright (C) 2001-2004 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for *************** *** 93,102 **** started byte. So correct the point and consume count */ if (seed < point) ! count --; while (count > 0) { tmp = mbrtowc (&wc, string+point, strlen(string + point), &ps); ! if ((size_t)(tmp) == (size_t)-1 || (size_t)(tmp) == (size_t)-2) { /* invalid bytes. asume a byte represents a character */ --- 93,102 ---- started byte. So correct the point and consume count */ if (seed < point) ! count--; while (count > 0) { tmp = mbrtowc (&wc, string+point, strlen(string + point), &ps); ! if (MB_INVALIDCH ((size_t)tmp)) { /* invalid bytes. asume a byte represents a character */ *************** *** 106,112 **** memset(&ps, 0, sizeof(mbstate_t)); } ! else if (tmp == (size_t)0) ! /* found '\0' char */ ! break; else { --- 106,111 ---- memset(&ps, 0, sizeof(mbstate_t)); } ! else if (MB_NULLWCH (tmp)) ! break; /* found wide '\0' */ else { *************** *** 161,165 **** { tmp = mbrtowc (&wc, string + point, length - point, &ps); ! if ((size_t)(tmp) == (size_t)-1 || (size_t)(tmp) == (size_t)-2) { /* in this case, bytes are invalid or shorted to compose --- 160,164 ---- { tmp = mbrtowc (&wc, string + point, length - point, &ps); ! if (MB_INVALIDCH ((size_t)tmp)) { /* in this case, bytes are invalid or shorted to compose *************** *** 170,175 **** in this case effect of mbstate is undefined */ memset(&ps, 0, sizeof (mbstate_t)); } ! else if (tmp == 0) break; /* Found '\0' char. Can this happen? */ else --- 169,178 ---- in this case effect of mbstate is undefined */ memset(&ps, 0, sizeof (mbstate_t)); + + /* Since we're assuming that this byte represents a single + non-zero-width character, don't forget about it. */ + prev = point; } ! else if (MB_NULLWCH (tmp)) break; /* Found '\0' char. Can this happen? */ else *************** *** 274,278 **** { tmp = mbrlen (string + pos, length - pos, ps); ! if((size_t)(tmp) == (size_t)-1 || (size_t)(tmp) == (size_t)-2) { /* in this case, bytes are invalid or shorted to compose --- 277,281 ---- { tmp = mbrlen (string + pos, length - pos, ps); ! if (MB_INVALIDCH ((size_t)tmp)) { /* in this case, bytes are invalid or shorted to compose *************** *** 285,289 **** memset (ps, 0, sizeof (mbstate_t)); } ! else if (tmp == 0) pos++; else --- 288,292 ---- memset (ps, 0, sizeof (mbstate_t)); } ! else if (MB_NULLWCH (tmp)) pos++; else diff -aNrc2 bash-2.05b-patched/lib/readline/misc.c bash-3.0/lib/readline/misc.c *** bash-2.05b-patched/lib/readline/misc.c Tue Feb 5 13:59:32 2002 --- bash-3.0/lib/readline/misc.c Wed Jul 7 08:56:32 2004 *************** *** 1,5 **** /* misc.c -- miscellaneous bindable readline functions. */ ! /* Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for --- 1,5 ---- /* misc.c -- miscellaneous bindable readline functions. */ ! /* Copyright (C) 1987-2004 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for *************** *** 254,257 **** --- 254,259 ---- if (_rl_saved_line_for_history) { + /* Can't call with `1' because rl_undo_list might point to an undo + list from a history entry, as in rl_replace_from_history() below. */ rl_replace_line (_rl_saved_line_for_history->line, 0); rl_undo_list = (UNDO_LIST *)_rl_saved_line_for_history->data; *************** *** 275,278 **** --- 277,287 ---- _rl_saved_line_for_history->data = (char *)rl_undo_list; } + else if (STREQ (rl_line_buffer, _rl_saved_line_for_history->line) == 0) + { + free (_rl_saved_line_for_history->line); + _rl_saved_line_for_history->line = savestring (rl_line_buffer); + _rl_saved_line_for_history->data = (char *)rl_undo_list; /* XXX possible memleak */ + } + return 0; } *************** *** 299,303 **** #if defined (VI_MODE) ! if (rl_editing_mode == vi_mode) rl_point = 0; #endif /* VI_MODE */ --- 308,312 ---- #if defined (VI_MODE) ! if (rl_editing_mode == vi_mode && _rl_keymap != vi_insertion_keymap) rl_point = 0; #endif /* VI_MODE */ *************** *** 312,315 **** --- 321,326 ---- int flags; /* currently unused */ { + /* Can't call with `1' because rl_undo_list might point to an undo list + from a history entry, just like we're setting up here. */ rl_replace_line (entry->line, 0); rl_undo_list = (UNDO_LIST *)entry->data; *************** *** 436,439 **** --- 447,451 ---- _rl_history_set_point (); } + return 0; } diff -aNrc2 bash-2.05b-patched/lib/readline/nls.c bash-3.0/lib/readline/nls.c *** bash-2.05b-patched/lib/readline/nls.c Mon Oct 15 14:32:29 2001 --- bash-3.0/lib/readline/nls.c Fri Oct 18 22:05:50 2002 *************** *** 76,79 **** --- 76,96 ---- #endif /* !HAVE_SETLOCALE */ + static char *_rl_get_locale_var PARAMS((const char *)); + + static char * + _rl_get_locale_var (v) + const char *v; + { + char *lspec; + + lspec = sh_get_env_value ("LC_ALL"); + if (lspec == 0 || *lspec == 0) + lspec = sh_get_env_value (v); + if (lspec == 0 || *lspec == 0) + lspec = sh_get_env_value ("LANG"); + + return lspec; + } + /* Check for LC_ALL, LC_CTYPE, and LANG and use the first with a value to decide the defaults for 8-bit character input and output. Returns *************** *** 85,92 **** value, and go into eight-bit mode if it's not C or POSIX. */ #if defined (HAVE_SETLOCALE) ! char *t; /* Set the LC_CTYPE locale category from environment variables. */ ! t = setlocale (LC_CTYPE, ""); if (t && *t && (t[0] != 'C' || t[1]) && (STREQ (t, "POSIX") == 0)) { --- 102,120 ---- value, and go into eight-bit mode if it's not C or POSIX. */ #if defined (HAVE_SETLOCALE) ! char *lspec, *t; /* Set the LC_CTYPE locale category from environment variables. */ ! lspec = _rl_get_locale_var ("LC_CTYPE"); ! /* Since _rl_get_locale_var queries the right environment variables, ! we query the current locale settings with setlocale(), and, if ! that doesn't return anything, we set lspec to the empty string to ! force the subsequent call to setlocale() to define the `native' ! environment. */ ! if (lspec == 0 || *lspec == 0) ! lspec = setlocale (LC_CTYPE, (char *)NULL); ! if (lspec == 0) ! lspec = ""; ! t = setlocale (LC_CTYPE, lspec); ! if (t && *t && (t[0] != 'C' || t[1]) && (STREQ (t, "POSIX") == 0)) { *************** *** 106,112 **** appropriate variables and set eight-bit mode if they have the right values. */ ! lspec = sh_get_env_value ("LC_ALL"); ! if (lspec == 0) lspec = sh_get_env_value ("LC_CTYPE"); ! if (lspec == 0) lspec = sh_get_env_value ("LANG"); if (lspec == 0 || (t = normalize_codeset (lspec)) == 0) return (0); --- 134,139 ---- appropriate variables and set eight-bit mode if they have the right values. */ ! lspec = _rl_get_locale_var ("LC_CTYPE"); ! if (lspec == 0 || (t = normalize_codeset (lspec)) == 0) return (0); diff -aNrc2 bash-2.05b-patched/lib/readline/parens.c bash-3.0/lib/readline/parens.c *** bash-2.05b-patched/lib/readline/parens.c Tue Feb 5 13:14:31 2002 --- bash-3.0/lib/readline/parens.c Wed Mar 3 22:39:51 2004 *************** *** 22,25 **** --- 22,29 ---- #define READLINE_LIBRARY + #if defined (__TANDEM) + # include + #endif + #include "rlconf.h" diff -aNrc2 bash-2.05b-patched/lib/readline/posixdir.h bash-3.0/lib/readline/posixdir.h *** bash-2.05b-patched/lib/readline/posixdir.h Tue Jan 8 10:47:15 2002 --- bash-3.0/lib/readline/posixdir.h Mon Mar 22 16:00:44 2004 *************** *** 26,30 **** #if defined (HAVE_DIRENT_H) # include ! # define D_NAMLEN(d) (strlen ((d)->d_name)) #else # if defined (HAVE_SYS_NDIR_H) --- 26,34 ---- #if defined (HAVE_DIRENT_H) # include ! # if defined (HAVE_STRUCT_DIRENT_D_NAMLEN) ! # define D_NAMLEN(d) ((d)->d_namlen) ! # else ! # define D_NAMLEN(d) (strlen ((d)->d_name)) ! # endif /* !HAVE_STRUCT_DIRENT_D_NAMLEN */ #else # if defined (HAVE_SYS_NDIR_H) *************** *** 43,51 **** #endif /* !HAVE_DIRENT_H */ ! #if defined (STRUCT_DIRENT_HAS_D_INO) && !defined (STRUCT_DIRENT_HAS_D_FILENO) # define d_fileno d_ino #endif ! #if defined (_POSIX_SOURCE) && (!defined (STRUCT_DIRENT_HAS_D_INO) || defined (BROKEN_DIRENT_D_INO)) /* Posix does not require that the d_ino field be present, and some systems do not provide it. */ --- 47,55 ---- #endif /* !HAVE_DIRENT_H */ ! #if defined (HAVE_STRUCT_DIRENT_D_INO) && !defined (HAVE_STRUCT_DIRENT_D_FILENO) # define d_fileno d_ino #endif ! #if defined (_POSIX_SOURCE) && (!defined (HAVE_STRUCT_DIRENT_D_INO) || defined (BROKEN_DIRENT_D_INO)) /* Posix does not require that the d_ino field be present, and some systems do not provide it. */ diff -aNrc2 bash-2.05b-patched/lib/readline/readline.c bash-3.0/lib/readline/readline.c *** bash-2.05b-patched/lib/readline/readline.c Thu Sep 5 10:52:34 2002 --- bash-3.0/lib/readline/readline.c Thu Sep 18 11:04:18 2003 *************** *** 69,77 **** #ifndef RL_LIBRARY_VERSION ! # define RL_LIBRARY_VERSION "4.3" #endif #ifndef RL_READLINE_VERSION ! # define RL_READLINE_VERSION 0x0403 #endif --- 69,77 ---- #ifndef RL_LIBRARY_VERSION ! # define RL_LIBRARY_VERSION "5.0" #endif #ifndef RL_READLINE_VERSION ! # define RL_READLINE_VERSION 0x0500 #endif *************** *** 86,89 **** --- 86,90 ---- static void readline_default_bindings PARAMS((void)); + static void reset_default_bindings PARAMS((void)); /* **************************************************************** */ *************** *** 348,352 **** #if defined (VI_MODE) if (rl_editing_mode == vi_mode) ! rl_vi_insertion_mode (1, 0); #endif /* VI_MODE */ --- 349,353 ---- #if defined (VI_MODE) if (rl_editing_mode == vi_mode) ! rl_vi_insertion_mode (1, 'i'); #endif /* VI_MODE */ *************** *** 651,655 **** already taken care of pushing any necessary input back onto the input queue with _rl_unget_char. */ ! r = _rl_dispatch (ANYOTHERKEY, FUNCTION_TO_KEYMAP (map, key)); else if (r && map[ANYOTHERKEY].function) { --- 652,670 ---- already taken care of pushing any necessary input back onto the input queue with _rl_unget_char. */ ! { ! #if 0 ! r = _rl_dispatch (ANYOTHERKEY, FUNCTION_TO_KEYMAP (map, key)); ! #else ! /* XXX - experimental code -- might never be executed. Save ! for later. */ ! Keymap m = FUNCTION_TO_KEYMAP (map, key); ! int type = m[ANYOTHERKEY].type; ! func = m[ANYOTHERKEY].function; ! if (type == ISFUNC && func == rl_do_lowercase_version) ! r = _rl_dispatch (_rl_to_lower (key), map); ! else ! r = _rl_dispatch (ANYOTHERKEY, m); ! #endif ! } else if (r && map[ANYOTHERKEY].function) { *************** *** 840,844 **** been set yet, then do so now. */ if (rl_completer_word_break_characters == (char *)NULL) ! rl_completer_word_break_characters = rl_basic_word_break_characters; } --- 855,859 ---- been set yet, then do so now. */ if (rl_completer_word_break_characters == (char *)NULL) ! rl_completer_word_break_characters = (char *)rl_basic_word_break_characters; } *************** *** 852,855 **** --- 867,879 ---- } + /* Reset the default bindings for the terminal special characters we're + interested in back to rl_insert and read the new ones. */ + static void + reset_default_bindings () + { + rl_tty_unset_default_bindings (_rl_keymap); + rl_tty_set_default_bindings (_rl_keymap); + } + /* Bind some common arrow key sequences in MAP. */ static void *************** *** 863,885 **** #if defined (__MSDOS__) ! _rl_bind_if_unbound ("\033[0A", rl_get_previous_history); ! _rl_bind_if_unbound ("\033[0B", rl_backward_char); ! _rl_bind_if_unbound ("\033[0C", rl_forward_char); ! _rl_bind_if_unbound ("\033[0D", rl_get_next_history); ! #endif ! ! _rl_bind_if_unbound ("\033[A", rl_get_previous_history); ! _rl_bind_if_unbound ("\033[B", rl_get_next_history); ! _rl_bind_if_unbound ("\033[C", rl_forward_char); ! _rl_bind_if_unbound ("\033[D", rl_backward_char); ! _rl_bind_if_unbound ("\033[H", rl_beg_of_line); ! _rl_bind_if_unbound ("\033[F", rl_end_of_line); ! ! _rl_bind_if_unbound ("\033OA", rl_get_previous_history); ! _rl_bind_if_unbound ("\033OB", rl_get_next_history); ! _rl_bind_if_unbound ("\033OC", rl_forward_char); ! _rl_bind_if_unbound ("\033OD", rl_backward_char); ! _rl_bind_if_unbound ("\033OH", rl_beg_of_line); ! _rl_bind_if_unbound ("\033OF", rl_end_of_line); _rl_keymap = xkeymap; --- 887,909 ---- #if defined (__MSDOS__) ! rl_bind_keyseq_if_unbound ("\033[0A", rl_get_previous_history); ! rl_bind_keyseq_if_unbound ("\033[0B", rl_backward_char); ! rl_bind_keyseq_if_unbound ("\033[0C", rl_forward_char); ! rl_bind_keyseq_if_unbound ("\033[0D", rl_get_next_history); ! #endif ! ! rl_bind_keyseq_if_unbound ("\033[A", rl_get_previous_history); ! rl_bind_keyseq_if_unbound ("\033[B", rl_get_next_history); ! rl_bind_keyseq_if_unbound ("\033[C", rl_forward_char); ! rl_bind_keyseq_if_unbound ("\033[D", rl_backward_char); ! rl_bind_keyseq_if_unbound ("\033[H", rl_beg_of_line); ! rl_bind_keyseq_if_unbound ("\033[F", rl_end_of_line); ! ! rl_bind_keyseq_if_unbound ("\033OA", rl_get_previous_history); ! rl_bind_keyseq_if_unbound ("\033OB", rl_get_next_history); ! rl_bind_keyseq_if_unbound ("\033OC", rl_forward_char); ! rl_bind_keyseq_if_unbound ("\033OD", rl_backward_char); ! rl_bind_keyseq_if_unbound ("\033OH", rl_beg_of_line); ! rl_bind_keyseq_if_unbound ("\033OF", rl_end_of_line); _rl_keymap = xkeymap; diff -aNrc2 bash-2.05b-patched/lib/readline/readline.h bash-3.0/lib/readline/readline.h *** bash-2.05b-patched/lib/readline/readline.h Wed Mar 13 17:02:37 2002 --- bash-3.0/lib/readline/readline.h Tue Jul 13 10:54:27 2004 *************** *** 1,5 **** /* Readline.h -- the names of functions callable from within readline. */ ! /* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for --- 1,5 ---- /* Readline.h -- the names of functions callable from within readline. */ ! /* Copyright (C) 1987-2004 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for *************** *** 41,47 **** /* Hex-encoded Readline version number. */ ! #define RL_READLINE_VERSION 0x0403 /* Readline 4.3 */ ! #define RL_VERSION_MAJOR 4 ! #define RL_VERSION_MINOR 3 /* Readline data structures. */ --- 41,47 ---- /* Hex-encoded Readline version number. */ ! #define RL_READLINE_VERSION 0x0500 /* Readline 5.0 */ ! #define RL_VERSION_MAJOR 5 ! #define RL_VERSION_MINOR 0 /* Readline data structures. */ *************** *** 161,164 **** --- 161,165 ---- extern int rl_kill_full_line PARAMS((int, int)); extern int rl_unix_word_rubout PARAMS((int, int)); + extern int rl_unix_filename_rubout PARAMS((int, int)); extern int rl_unix_line_discard PARAMS((int, int)); extern int rl_copy_region_to_kill PARAMS((int, int)); *************** *** 259,262 **** --- 260,265 ---- extern int rl_vi_bracktype PARAMS((int)); + extern void rl_vi_start_inserting PARAMS((int, int, int)); + /* VI-mode pseudo-bindable commands, used as utility functions. */ extern int rl_vi_fWord PARAMS((int, int)); *************** *** 291,300 **** extern int rl_unbind_key PARAMS((int)); extern int rl_unbind_key_in_map PARAMS((int, Keymap)); extern int rl_unbind_function_in_map PARAMS((rl_command_func_t *, Keymap)); extern int rl_unbind_command_in_map PARAMS((const char *, Keymap)); ! extern int rl_set_key PARAMS((const char *, rl_command_func_t *, Keymap)); extern int rl_generic_bind PARAMS((int, const char *, char *, Keymap)); extern int rl_variable_bind PARAMS((const char *, const char *)); /* Backwards compatibility, use rl_generic_bind instead. */ extern int rl_macro_bind PARAMS((const char *, const char *, Keymap)); --- 294,311 ---- extern int rl_unbind_key PARAMS((int)); extern int rl_unbind_key_in_map PARAMS((int, Keymap)); + extern int rl_bind_key_if_unbound PARAMS((int, rl_command_func_t *)); + extern int rl_bind_key_if_unbound_in_map PARAMS((int, rl_command_func_t *, Keymap)); extern int rl_unbind_function_in_map PARAMS((rl_command_func_t *, Keymap)); extern int rl_unbind_command_in_map PARAMS((const char *, Keymap)); ! extern int rl_bind_keyseq PARAMS((const char *, rl_command_func_t *)); ! extern int rl_bind_keyseq_in_map PARAMS((const char *, rl_command_func_t *, Keymap)); ! extern int rl_bind_keyseq_if_unbound PARAMS((const char *, rl_command_func_t *)); ! extern int rl_bind_keyseq_if_unbound_in_map PARAMS((const char *, rl_command_func_t *, Keymap)); extern int rl_generic_bind PARAMS((int, const char *, char *, Keymap)); extern int rl_variable_bind PARAMS((const char *, const char *)); + /* Backwards compatibility, use rl_bind_keyseq_in_map instead. */ + extern int rl_set_key PARAMS((const char *, rl_command_func_t *, Keymap)); + /* Backwards compatibility, use rl_generic_bind instead. */ extern int rl_macro_bind PARAMS((const char *, const char *, Keymap)); *************** *** 359,363 **** extern int rl_crlf PARAMS((void)); ! #if (defined (__STDC__) || defined (__cplusplus)) && defined (USE_VARARGS) && defined (PREFER_STDARG) extern int rl_message (const char *, ...) __attribute__((__format__ (printf, 1, 2))); #else --- 370,374 ---- extern int rl_crlf PARAMS((void)); ! #if defined (USE_VARARGS) && defined (PREFER_STDARG) extern int rl_message (const char *, ...) __attribute__((__format__ (printf, 1, 2))); #else *************** *** 385,388 **** --- 396,400 ---- extern void rl_deprep_terminal PARAMS((void)); extern void rl_tty_set_default_bindings PARAMS((Keymap)); + extern void rl_tty_unset_default_bindings PARAMS((Keymap)); extern int rl_reset_terminal PARAMS((const char *)); *************** *** 604,608 **** rl_complete_internal. The default list is the contents of rl_basic_word_break_characters. */ ! extern const char *rl_completer_word_break_characters; /* List of characters which can be used to quote a substring of the line. --- 616,625 ---- rl_complete_internal. The default list is the contents of rl_basic_word_break_characters. */ ! extern /*const*/ char *rl_completer_word_break_characters; ! ! /* Hook function to allow an application to set the completion word ! break characters before readline breaks up the line. Allows ! position-dependent word break characters. */ ! extern rl_cpvfunc_t *rl_completion_word_break_hook; /* List of characters which can be used to quote a substring of the line. *************** *** 688,691 **** --- 705,713 ---- extern int rl_completion_type; + /* Up to this many items will be displayed in response to a + possible-completions call. After that, we ask the user if she + is sure she wants to see them all. The default value is 100. */ + extern int rl_completion_query_items; + /* Character appended to completed words when at the end of the line. The default is a space. Nothing is added if this is '\0'. */ *************** *** 696,703 **** extern int rl_completion_suppress_append; ! /* Up to this many items will be displayed in response to a ! possible-completions call. After that, we ask the user if she ! is sure she wants to see them all. The default value is 100. */ ! extern int rl_completion_query_items; /* If non-zero, a slash will be appended to completed filenames that are --- 718,733 ---- extern int rl_completion_suppress_append; ! /* Set to any quote character readline thinks it finds before any application ! completion function is called. */ ! extern int rl_completion_quote_character; ! ! /* Set to a non-zero value if readline found quoting anywhere in the word to ! be completed; set before any application completion function is called. */ ! extern int rl_completion_found_quote; ! ! /* If non-zero, the completion functions don't append any closing quote. ! This is set to 0 by rl_complete_internal and may be changed by an ! application-specific completion function. */ ! extern int rl_completion_suppress_quote; /* If non-zero, a slash will be appended to completed filenames that are *************** *** 750,753 **** --- 780,784 ---- #define RL_STATE_UNDOING 0x10000 /* doing an undo */ #define RL_STATE_INPUTPENDING 0x20000 /* rl_execute_next called */ + #define RL_STATE_TTYCSAVED 0x40000 /* tty special chars saved */ #define RL_STATE_DONE 0x80000 /* done; accepted line */ *************** *** 785,788 **** --- 816,825 ---- int catchsigs; int catchsigwinch; + + /* search state */ + + /* completion state */ + + /* options state */ /* reserved for future expansion, so the struct size doesn't change */ diff -aNrc2 bash-2.05b-patched/lib/readline/rldefs.h bash-3.0/lib/readline/rldefs.h *** bash-2.05b-patched/lib/readline/rldefs.h Tue May 7 15:40:07 2002 --- bash-3.0/lib/readline/rldefs.h Wed Aug 27 15:57:02 2003 *************** *** 78,82 **** #endif ! #if defined (HAVE_STRPBRK) # define _rl_strpbrk(a,b) strpbrk((a),(b)) #else --- 78,82 ---- #endif ! #if defined (HAVE_STRPBRK) && !defined (HAVE_MULTIBYTE) # define _rl_strpbrk(a,b) strpbrk((a),(b)) #else diff -aNrc2 bash-2.05b-patched/lib/readline/rlmbutil.h bash-3.0/lib/readline/rlmbutil.h *** bash-2.05b-patched/lib/readline/rlmbutil.h Thu Dec 20 09:54:38 2001 --- bash-3.0/lib/readline/rlmbutil.h Tue May 13 09:38:37 2003 *************** *** 36,44 **** # include # include ! # if defined (HAVE_MBSRTOWCS) /* system is supposed to support XPG5 */ # define HANDLE_MULTIBYTE 1 # endif #endif /* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ #if HANDLE_MULTIBYTE && !defined (HAVE_MBSTATE_T) --- 36,51 ---- # include # include ! # if defined (HAVE_MBSRTOWCS) && defined (HAVE_MBRTOWC) && defined (HAVE_MBRLEN) && defined (HAVE_WCWIDTH) ! /* system is supposed to support XPG5 */ # define HANDLE_MULTIBYTE 1 # endif #endif + /* If we don't want multibyte chars even on a system that supports them, let + the configuring user turn multibyte support off. */ + #if defined (NO_MULTIBYTE_SUPPORT) + # undef HANDLE_MULTIBYTE + #endif + /* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ #if HANDLE_MULTIBYTE && !defined (HAVE_MBSTATE_T) *************** *** 91,94 **** --- 98,104 ---- extern int _rl_is_mbchar_matched PARAMS((char *, int, int, char *, int)); + #define MB_INVALIDCH(x) ((x) == (size_t)-1 || (x) == (size_t)-2) + #define MB_NULLWCH(x) ((x) == 0) + #else /* !HANDLE_MULTIBYTE */ *************** *** 101,104 **** --- 111,117 ---- #define _rl_find_prev_mbchar(b, i, f) (((i) == 0) ? (i) : ((i) - 1)) #define _rl_find_next_mbchar(b, i1, i2, f) ((i1) + (i2)) + + #define MB_INVALIDCH(x) (0) + #define MB_NULLWCH(x) (0) #endif /* !HANDLE_MULTIBYTE */ diff -aNrc2 bash-2.05b-patched/lib/readline/rlprivate.h bash-3.0/lib/readline/rlprivate.h *** bash-2.05b-patched/lib/readline/rlprivate.h Wed Mar 13 16:46:20 2002 --- bash-3.0/lib/readline/rlprivate.h Sat May 8 19:38:09 2004 *************** *** 2,6 **** but not intended for use by applications. */ ! /* Copyright (C) 1999 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for --- 2,6 ---- but not intended for use by applications. */ ! /* Copyright (C) 1999-2004 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for *************** *** 104,108 **** /* bind.c */ - extern void _rl_bind_if_unbound PARAMS((const char *, rl_command_func_t *)); /* complete.c */ --- 104,107 ---- *************** *** 132,135 **** --- 131,135 ---- extern void _rl_insert_typein PARAMS((int)); extern int _rl_unget_char PARAMS((int)); + extern int _rl_pushed_input_available PARAMS((void)); /* macro.c */ *************** *** 220,223 **** --- 220,224 ---- /* complete.c */ extern int _rl_complete_show_all; + extern int _rl_complete_show_unmodified; extern int _rl_complete_mark_directories; extern int _rl_complete_mark_symlink_dirs; *************** *** 281,284 **** --- 282,288 ---- extern int _rl_doing_an_undo; extern int _rl_undo_group_level; + + /* vi_mode.c */ + extern int _rl_vi_last_command; #endif /* _RL_PRIVATE_H_ */ diff -aNrc2 bash-2.05b-patched/lib/readline/rlstdc.h bash-3.0/lib/readline/rlstdc.h *** bash-2.05b-patched/lib/readline/rlstdc.h Wed Sep 12 09:57:31 2001 --- bash-3.0/lib/readline/rlstdc.h Fri May 30 15:08:02 2003 *************** *** 38,42 **** #ifndef __attribute__ ! # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ # define __attribute__(x) # endif --- 38,42 ---- #ifndef __attribute__ ! # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) # define __attribute__(x) # endif diff -aNrc2 bash-2.05b-patched/lib/readline/rltty.c bash-3.0/lib/readline/rltty.c *** bash-2.05b-patched/lib/readline/rltty.c Mon Feb 18 12:37:29 2002 --- bash-3.0/lib/readline/rltty.c Fri Jan 31 23:35:20 2003 *************** *** 187,190 **** --- 187,192 ---- static void prepare_terminal_settings PARAMS((int, TIOTYPE, TIOTYPE *)); + static void set_special_char PARAMS((Keymap, TIOTYPE *, int, rl_command_func_t)); + static void save_tty_chars (tiop) *************** *** 401,404 **** --- 403,409 ---- static void prepare_terminal_settings PARAMS((int, TIOTYPE, TIOTYPE *)); + static void set_special_char PARAMS((Keymap, TIOTYPE *, int, rl_command_func_t)); + static void _rl_bind_tty_special_chars PARAMS((Keymap, TIOTYPE)); + #if defined (FLUSHO) # define OUTPUT_BEING_FLUSHED(tp) (tp->c_lflag & FLUSHO) *************** *** 653,657 **** --- 658,665 ---- otio = tio; + rl_tty_unset_default_bindings (_rl_keymap); save_tty_chars (&otio); + RL_SETSTATE(RL_STATE_TTYCSAVED); + _rl_bind_tty_special_chars (_rl_keymap, tio); prepare_terminal_settings (meta_flag, otio, &tio); *************** *** 777,844 **** /* **************************************************************** */ ! /* Set the system's default editing characters to their readline equivalents ! in KMAP. Should be static, now that we have rl_tty_set_default_bindings. */ ! void ! rltty_set_default_bindings (kmap) ! Keymap kmap; ! { ! TIOTYPE ttybuff; ! int tty = fileno (rl_instream); #if defined (NEW_TTY_DRIVER) ! #define SET_SPECIAL(sc, func) \ ! do \ ! { \ ! int ic; \ ! ic = sc; \ ! if (ic != -1 && kmap[(unsigned char)ic].type == ISFUNC) \ ! kmap[(unsigned char)ic].function = func; \ ! } \ ! while (0) ! if (get_tty_settings (tty, &ttybuff) == 0) { ! if (ttybuff.flags & SGTTY_SET) ! { ! SET_SPECIAL (ttybuff.sgttyb.sg_erase, rl_rubout); ! SET_SPECIAL (ttybuff.sgttyb.sg_kill, rl_unix_line_discard); ! } # if defined (TIOCGLTC) ! if (ttybuff.flags & LTCHARS_SET) ! { ! SET_SPECIAL (ttybuff.ltchars.t_werasc, rl_unix_word_rubout); ! SET_SPECIAL (ttybuff.ltchars.t_lnextc, rl_quoted_insert); ! } ! # endif /* TIOCGLTC */ } #else /* !NEW_TTY_DRIVER */ ! #define SET_SPECIAL(sc, func) \ ! do \ ! { \ ! unsigned char uc; \ ! uc = ttybuff.c_cc[sc]; \ ! if (uc != (unsigned char)_POSIX_VDISABLE && kmap[uc].type == ISFUNC) \ ! kmap[uc].function = func; \ ! } \ ! while (0) ! if (get_tty_settings (tty, &ttybuff) == 0) ! { ! SET_SPECIAL (VERASE, rl_rubout); ! SET_SPECIAL (VKILL, rl_unix_line_discard); # if defined (VLNEXT) && defined (TERMIOS_TTY_DRIVER) ! SET_SPECIAL (VLNEXT, rl_quoted_insert); # endif /* VLNEXT && TERMIOS_TTY_DRIVER */ # if defined (VWERASE) && defined (TERMIOS_TTY_DRIVER) ! SET_SPECIAL (VWERASE, rl_unix_word_rubout); # endif /* VWERASE && TERMIOS_TTY_DRIVER */ ! } #endif /* !NEW_TTY_DRIVER */ } --- 785,879 ---- /* **************************************************************** */ ! #define SET_SPECIAL(sc, func) set_special_char(kmap, &ttybuff, sc, func) #if defined (NEW_TTY_DRIVER) + static void + set_special_char (kmap, tiop, sc, func) + Keymap kmap; + TIOTYPE *tiop; + int sc; + rl_command_func_t *func; + { + if (sc != -1 && kmap[(unsigned char)sc].type == ISFUNC) + kmap[(unsigned char)sc].function = func; + } ! #define RESET_SPECIAL(c) \ ! if (c != -1 && kmap[(unsigned char)c].type == ISFUNC) ! kmap[(unsigned char)c].function = rl_insert; ! static void ! _rl_bind_tty_special_chars (kmap, ttybuff) ! Keymap kmap; ! TIOTYPE ttybuff; ! { ! if (ttybuff.flags & SGTTY_SET) { ! SET_SPECIAL (ttybuff.sgttyb.sg_erase, rl_rubout); ! SET_SPECIAL (ttybuff.sgttyb.sg_kill, rl_unix_line_discard); ! } # if defined (TIOCGLTC) ! if (ttybuff.flags & LTCHARS_SET) ! { ! SET_SPECIAL (ttybuff.ltchars.t_werasc, rl_unix_word_rubout); ! SET_SPECIAL (ttybuff.ltchars.t_lnextc, rl_quoted_insert); } + # endif /* TIOCGLTC */ + } #else /* !NEW_TTY_DRIVER */ + static void + set_special_char (kmap, tiop, sc, func) + Keymap kmap; + TIOTYPE *tiop; + int sc; + rl_command_func_t *func; + { + unsigned char uc; ! uc = tiop->c_cc[sc]; ! if (uc != (unsigned char)_POSIX_VDISABLE && kmap[uc].type == ISFUNC) ! kmap[uc].function = func; ! } ! /* used later */ ! #define RESET_SPECIAL(uc) \ ! if (uc != (unsigned char)_POSIX_VDISABLE && kmap[uc].type == ISFUNC) \ ! kmap[uc].function = rl_insert; ! ! static void ! _rl_bind_tty_special_chars (kmap, ttybuff) ! Keymap kmap; ! TIOTYPE ttybuff; ! { ! SET_SPECIAL (VERASE, rl_rubout); ! SET_SPECIAL (VKILL, rl_unix_line_discard); # if defined (VLNEXT) && defined (TERMIOS_TTY_DRIVER) ! SET_SPECIAL (VLNEXT, rl_quoted_insert); # endif /* VLNEXT && TERMIOS_TTY_DRIVER */ # if defined (VWERASE) && defined (TERMIOS_TTY_DRIVER) ! SET_SPECIAL (VWERASE, rl_unix_word_rubout); # endif /* VWERASE && TERMIOS_TTY_DRIVER */ ! } ! #endif /* !NEW_TTY_DRIVER */ + + /* Set the system's default editing characters to their readline equivalents + in KMAP. Should be static, now that we have rl_tty_set_default_bindings. */ + void + rltty_set_default_bindings (kmap) + Keymap kmap; + { + TIOTYPE ttybuff; + int tty; + static int called = 0; + + tty = fileno (rl_instream); + + if (get_tty_settings (tty, &ttybuff) == 0) + _rl_bind_tty_special_chars (kmap, ttybuff); } *************** *** 850,853 **** --- 885,912 ---- { rltty_set_default_bindings (kmap); + } + + /* Rebind all of the tty special chars that readline worries about back + to self-insert. Call this before saving the current terminal special + chars with save_tty_chars(). This only works on POSIX termios or termio + systems. */ + void + rl_tty_unset_default_bindings (kmap) + Keymap kmap; + { + /* Don't bother before we've saved the tty special chars at least once. */ + if (RL_ISSTATE(RL_STATE_TTYCSAVED) == 0) + return; + + RESET_SPECIAL (_rl_tty_chars.t_erase); + RESET_SPECIAL (_rl_tty_chars.t_kill); + + # if defined (VLNEXT) && defined (TERMIOS_TTY_DRIVER) + RESET_SPECIAL (_rl_tty_chars.t_lnext); + # endif /* VLNEXT && TERMIOS_TTY_DRIVER */ + + # if defined (VWERASE) && defined (TERMIOS_TTY_DRIVER) + RESET_SPECIAL (_rl_tty_chars.t_werase); + # endif /* VWERASE && TERMIOS_TTY_DRIVER */ } diff -aNrc2 bash-2.05b-patched/lib/readline/rltty.h bash-3.0/lib/readline/rltty.h *** bash-2.05b-patched/lib/readline/rltty.h Thu Aug 5 08:12:47 1999 --- bash-3.0/lib/readline/rltty.h Fri Jan 31 22:43:11 2003 *************** *** 62,81 **** typedef struct _rl_tty_chars { ! char t_eof; ! char t_eol; ! char t_eol2; ! char t_erase; ! char t_werase; ! char t_kill; ! char t_reprint; ! char t_intr; ! char t_quit; ! char t_susp; ! char t_dsusp; ! char t_start; ! char t_stop; ! char t_lnext; ! char t_flush; ! char t_status; } _RL_TTY_CHARS; --- 62,81 ---- typedef struct _rl_tty_chars { ! unsigned char t_eof; ! unsigned char t_eol; ! unsigned char t_eol2; ! unsigned char t_erase; ! unsigned char t_werase; ! unsigned char t_kill; ! unsigned char t_reprint; ! unsigned char t_intr; ! unsigned char t_quit; ! unsigned char t_susp; ! unsigned char t_dsusp; ! unsigned char t_start; ! unsigned char t_stop; ! unsigned char t_lnext; ! unsigned char t_flush; ! unsigned char t_status; } _RL_TTY_CHARS; diff -aNrc2 bash-2.05b-patched/lib/readline/rltypedefs.h bash-3.0/lib/readline/rltypedefs.h *** bash-2.05b-patched/lib/readline/rltypedefs.h Wed Aug 22 09:38:02 2001 --- bash-3.0/lib/readline/rltypedefs.h Wed Jan 28 13:31:26 2004 *************** *** 1,5 **** /* rltypedefs.h -- Type declarations for readline functions. */ ! /* Copyright (C) 2000 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for --- 1,5 ---- /* rltypedefs.h -- Type declarations for readline functions. */ ! /* Copyright (C) 2000-2004 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for *************** *** 80,83 **** --- 80,89 ---- typedef void rl_vcpfunc_t PARAMS((char *)); typedef void rl_vcppfunc_t PARAMS((char **)); + + typedef char *rl_cpvfunc_t PARAMS((void)); + typedef char *rl_cpifunc_t PARAMS((int)); + typedef char *rl_cpcpfunc_t PARAMS((char *)); + typedef char *rl_cpcppfunc_t PARAMS((char **)); + #endif /* _RL_FUNCTION_TYPEDEF */ diff -aNrc2 bash-2.05b-patched/lib/readline/savestring.c bash-3.0/lib/readline/savestring.c *** bash-2.05b-patched/lib/readline/savestring.c Mon Sep 10 10:07:46 2001 --- bash-3.0/lib/readline/savestring.c Tue Dec 9 16:06:01 2003 *************** *** 1,5 **** /* savestring.c */ ! /* Copyright (C) 1998 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for --- 1,5 ---- /* savestring.c */ ! /* Copyright (C) 1998,2003 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for *************** *** 20,23 **** --- 20,24 ---- have a copy of the license, write to the Free Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + #define READLINE_LIBRARY #include diff -aNrc2 bash-2.05b-patched/lib/readline/search.c bash-3.0/lib/readline/search.c *** bash-2.05b-patched/lib/readline/search.c Tue Jan 22 16:49:58 2002 --- bash-3.0/lib/readline/search.c Thu Sep 25 08:51:57 2003 *************** *** 83,88 **** HIST_ENTRY *entry; { ! rl_replace_line (entry->line, 0); rl_undo_list = (UNDO_LIST *)entry->data; if (_rl_saved_line_for_history) --- 83,93 ---- HIST_ENTRY *entry; { ! #if 0 ! rl_replace_line (entry->line, 1); rl_undo_list = (UNDO_LIST *)entry->data; + #else + _rl_replace_text (entry->line, 0, rl_end); + _rl_fix_point (1); + #endif if (_rl_saved_line_for_history) *************** *** 189,192 **** --- 194,202 ---- saved_point = rl_point; saved_mark = rl_mark; + + /* Clear the undo list, since reading the search string should create its + own undo list, and the whole list will end up being freed when we + finish reading the search string. */ + rl_undo_list = 0; /* Use the line buffer to read the search string. */ diff -aNrc2 bash-2.05b-patched/lib/readline/shell.c bash-3.0/lib/readline/shell.c *** bash-2.05b-patched/lib/readline/shell.c Wed Aug 22 09:39:58 2001 --- bash-3.0/lib/readline/shell.c Mon Sep 29 11:42:26 2003 *************** *** 127,130 **** --- 127,131 ---- sprintf (b, "LINES=%d", lines); putenv (b); + b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("COLUMNS=") + 1); sprintf (b, "COLUMNS=%d", cols); *************** *** 135,141 **** --- 136,145 ---- sprintf (b, "%d", lines); setenv ("LINES", b, 1); + free (b); + b = (char *)xmalloc (INT_STRLEN_BOUND (int) + 1); sprintf (b, "%d", cols); setenv ("COLUMNS", b, 1); + free (b); # endif /* HAVE_SETENV */ #endif /* !HAVE_PUTENV */ diff -aNrc2 bash-2.05b-patched/lib/readline/signals.c bash-3.0/lib/readline/signals.c *** bash-2.05b-patched/lib/readline/signals.c Thu Jan 24 11:23:37 2002 --- bash-3.0/lib/readline/signals.c Wed Apr 23 08:32:06 2003 *************** *** 74,77 **** --- 74,81 ---- #endif /* !HAVE_POSIX_SIGNALS */ + #ifndef SA_RESTART + # define SA_RESTART 0 + #endif + static SigHandler *rl_set_sighandler PARAMS((int, SigHandler *, sighandler_cxt *)); static void rl_maybe_set_sighandler PARAMS((int, SigHandler *, sighandler_cxt *)); *************** *** 86,89 **** --- 90,95 ---- #ifdef SIGWINCH int rl_catch_sigwinch = 1; + #else + int rl_catch_sigwinch = 0; /* for the readline state struct in readline.c */ #endif *************** *** 234,238 **** act.sa_handler = handler; ! act.sa_flags = 0; /* XXX - should we set SA_RESTART for SIGWINCH? */ sigemptyset (&act.sa_mask); sigemptyset (&ohandler->sa_mask); --- 240,244 ---- act.sa_handler = handler; ! act.sa_flags = (sig == SIGWINCH) ? SA_RESTART : 0; sigemptyset (&act.sa_mask); sigemptyset (&ohandler->sa_mask); diff -aNrc2 bash-2.05b-patched/lib/readline/terminal.c bash-3.0/lib/readline/terminal.c *** bash-2.05b-patched/lib/readline/terminal.c Mon Mar 4 12:23:09 2002 --- bash-3.0/lib/readline/terminal.c Thu Sep 18 11:03:42 2003 *************** *** 348,356 **** for (i = 0; i < NUM_TC_STRINGS; i++) - # ifdef __LCC__ *(tc_strings[i].tc_value) = tgetstr ((char *)tc_strings[i].tc_var, bp); - # else - *(tc_strings[i].tc_value) = tgetstr (tc_strings[i].tc_var, bp); - # endif #endif tcap_initialized = 1; --- 348,352 ---- *************** *** 490,500 **** _rl_keymap = map; ! _rl_bind_if_unbound (_rl_term_ku, rl_get_previous_history); ! _rl_bind_if_unbound (_rl_term_kd, rl_get_next_history); ! _rl_bind_if_unbound (_rl_term_kr, rl_forward); ! _rl_bind_if_unbound (_rl_term_kl, rl_backward); ! _rl_bind_if_unbound (_rl_term_kh, rl_beg_of_line); /* Home */ ! _rl_bind_if_unbound (_rl_term_at7, rl_end_of_line); /* End */ _rl_keymap = xkeymap; --- 486,496 ---- _rl_keymap = map; ! rl_bind_keyseq_if_unbound (_rl_term_ku, rl_get_previous_history); ! rl_bind_keyseq_if_unbound (_rl_term_kd, rl_get_next_history); ! rl_bind_keyseq_if_unbound (_rl_term_kr, rl_forward_char); ! rl_bind_keyseq_if_unbound (_rl_term_kl, rl_backward_char); ! rl_bind_keyseq_if_unbound (_rl_term_kh, rl_beg_of_line); /* Home */ ! rl_bind_keyseq_if_unbound (_rl_term_at7, rl_end_of_line); /* End */ _rl_keymap = xkeymap; diff -aNrc2 bash-2.05b-patched/lib/readline/text.c bash-3.0/lib/readline/text.c *** bash-2.05b-patched/lib/readline/text.c Thu May 30 13:46:13 2002 --- bash-3.0/lib/readline/text.c Mon May 10 08:45:19 2004 *************** *** 1,5 **** /* text.c -- text handling commands for readline. */ ! /* Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for --- 1,5 ---- /* text.c -- text handling commands for readline. */ ! /* Copyright (C) 1987-2004 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for *************** *** 171,174 **** --- 171,177 ---- #undef _RL_FIX_POINT + /* Replace the contents of the line buffer between START and END with + TEXT. The operation is undoable. To replace the entire line in an + undoable mode, use _rl_replace_text(text, 0, rl_end); */ int _rl_replace_text (text, start, end) *************** *** 802,812 **** #endif for (i = 0; i < count; i++) { - rl_begin_undo_group (); - - if (rl_point < rl_end) - rl_delete (1, c); - #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) --- 805,812 ---- #endif + rl_begin_undo_group (); + for (i = 0; i < count; i++) { #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) *************** *** 816,822 **** _rl_insert_char (1, c); ! rl_end_undo_group (); } return 0; } --- 816,825 ---- _rl_insert_char (1, c); ! if (rl_point < rl_end) ! rl_delete (1, c); } + rl_end_undo_group (); + return 0; } *************** *** 878,882 **** { _rl_vi_done_inserting (); ! _rl_vi_reset_last (); } #endif /* VI_MODE */ --- 881,886 ---- { _rl_vi_done_inserting (); ! if (_rl_vi_textmod_command (_rl_vi_last_command) == 0) /* XXX */ ! _rl_vi_reset_last (); } #endif /* VI_MODE */ *************** *** 936,942 **** /* Emacs puts point at the beginning of the sequence of spaces. */ ! opoint = rl_point; ! _rl_insert_char (l, ' '); ! rl_point = opoint; rl_end_undo_group (); --- 940,949 ---- /* Emacs puts point at the beginning of the sequence of spaces. */ ! if (rl_point < rl_end) ! { ! opoint = rl_point; ! _rl_insert_char (l, ' '); ! rl_point = opoint; ! } rl_end_undo_group (); diff -aNrc2 bash-2.05b-patched/lib/readline/util.c bash-3.0/lib/readline/util.c *** bash-2.05b-patched/lib/readline/util.c Wed Mar 13 16:45:43 2002 --- bash-3.0/lib/readline/util.c Wed Aug 27 15:51:15 2003 *************** *** 251,255 **** v = _rl_get_char_len (string1, &ps); if (v > 1) ! string += v - 1; /* -1 to account for auto-increment in loop */ } #endif --- 251,255 ---- v = _rl_get_char_len (string1, &ps); if (v > 1) ! string1 += v - 1; /* -1 to account for auto-increment in loop */ } #endif diff -aNrc2 bash-2.05b-patched/lib/readline/vi_mode.c bash-3.0/lib/readline/vi_mode.c *** bash-2.05b-patched/lib/readline/vi_mode.c Wed May 7 15:19:31 2003 --- bash-3.0/lib/readline/vi_mode.c Tue Jul 13 14:08:27 2004 *************** *** 2,6 **** Derived from code written by Jeff Sparkes (jsparkes@bnr.ca). */ ! /* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for --- 2,6 ---- Derived from code written by Jeff Sparkes (jsparkes@bnr.ca). */ ! /* Copyright (C) 1987-2004 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for *************** *** 64,67 **** --- 64,69 ---- #endif + int _rl_vi_last_command = 'i'; /* default `.' puts you in insert mode */ + /* Non-zero means enter insertion mode. */ static int _rl_vi_doing_insert; *************** *** 84,88 **** static int vi_insert_buffer_size; - static int _rl_vi_last_command = 'i'; /* default `.' puts you in insert mode */ static int _rl_vi_last_repeat = 1; static int _rl_vi_last_arg_sign = 1; --- 86,89 ---- *************** *** 136,139 **** --- 137,150 ---- } + /* A convenience function that calls _rl_vi_set_last to save the last command + information and enters insertion mode. */ + void + rl_vi_start_inserting (key, repeat, sign) + int key, repeat, sign; + { + _rl_vi_set_last (key, repeat, sign); + rl_vi_insertion_mode (1, key); + } + /* Is the command C a VI mode text modification command? */ int *************** *** 298,305 **** if (key == '*' || key == '\\') ! { ! _rl_vi_set_last (key, 1, rl_arg_sign); ! rl_vi_insertion_mode (1, key); ! } return (0); } --- 309,314 ---- if (key == '*' || key == '\\') ! rl_vi_start_inserting (key, 1, rl_arg_sign); ! return (0); } *************** *** 311,316 **** { rl_tilde_expand (0, key); ! _rl_vi_set_last (key, 1, rl_arg_sign); /* XXX */ ! rl_vi_insertion_mode (1, key); return (0); } --- 320,324 ---- { rl_tilde_expand (0, key); ! rl_vi_start_inserting (key, 1, rl_arg_sign); return (0); } *************** *** 430,434 **** /* Move to the next non-whitespace character (to the start of the next word). */ ! while (++rl_point < rl_end && whitespace (rl_line_buffer[rl_point])); if (rl_point && rl_point < rl_end) --- 438,443 ---- /* Move to the next non-whitespace character (to the start of the next word). */ ! while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point])) ! rl_point++; if (rl_point && rl_point < rl_end) *************** *** 641,645 **** else { ! if (_rl_vi_last_key_before_insert == 'i' && rl_undo_list) _rl_vi_save_insert (rl_undo_list); /* XXX - Other keys probably need to be checked. */ --- 650,654 ---- else { ! if ((_rl_vi_last_key_before_insert == 'i' || _rl_vi_last_key_before_insert == 'a') && rl_undo_list) _rl_vi_save_insert (rl_undo_list); /* XXX - Other keys probably need to be checked. */ *************** *** 705,709 **** if (wc) { ! mblen = wctomb (mb, wc); if (mblen >= 0) mb[mblen] = '\0'; --- 714,718 ---- if (wc) { ! mblen = wcrtomb (mb, wc, &ps); if (mblen >= 0) mb[mblen] = '\0'; *************** *** 726,730 **** int count, ignore; { ! char c = 0; /* Don't try this on an empty line. */ --- 735,739 ---- int count, ignore; { ! int c, p; /* Don't try this on an empty line. */ *************** *** 732,735 **** --- 741,745 ---- return (0); + c = 0; #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) *************** *** 753,758 **** if (c) { rl_begin_undo_group (); ! rl_delete (1, c); _rl_insert_char (1, c); rl_end_undo_group (); --- 763,771 ---- if (c) { + p = rl_point; rl_begin_undo_group (); ! rl_vi_delete (1, c); ! if (rl_point < p) /* Did we retreat at EOL? */ ! rl_point++; _rl_insert_char (1, c); rl_end_undo_group (); *************** *** 772,776 **** rl_point = _rl_find_next_mbchar (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO); ! rl_yank (1, key); rl_backward_char (1, key); return (0); --- 785,791 ---- rl_point = _rl_find_next_mbchar (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO); ! while (count--) ! rl_yank (1, key); ! rl_backward_char (1, key); return (0); *************** *** 820,823 **** --- 835,839 ---- save = rl_numeric_arg; rl_numeric_arg = _rl_digit_value (c); + rl_explicit_arg = 1; rl_digit_loop1 (); rl_numeric_arg *= save; *************** *** 1018,1023 **** if (_rl_uppercase_p (key) == 0) _rl_vi_doing_insert = 1; ! _rl_vi_set_last (key, count, rl_arg_sign); ! rl_vi_insertion_mode (1, key); } --- 1034,1038 ---- if (_rl_uppercase_p (key) == 0) _rl_vi_doing_insert = 1; ! rl_vi_start_inserting (key, rl_numeric_arg, rl_arg_sign); } *************** *** 1268,1272 **** /* XXX - think about reading an entire mbchar with _rl_read_mbchar and inserting it in one bunch instead of the loop below (like in ! rl_vi_char_search or _rl_vi_change_mbchar_case. Set c to mbchar[0] for test against 033 or ^C. Make sure that _rl_read_mbchar does this right. */ --- 1283,1287 ---- /* XXX - think about reading an entire mbchar with _rl_read_mbchar and inserting it in one bunch instead of the loop below (like in ! rl_vi_char_search or _rl_vi_change_mbchar_case). Set c to mbchar[0] for test against 033 or ^C. Make sure that _rl_read_mbchar does this right. */ *************** *** 1275,1279 **** int count, key; { ! int c; if (vi_redoing) --- 1290,1294 ---- int count, key; { ! int c, p; if (vi_redoing) *************** *** 1289,1297 **** return -1; while (count-- && rl_point < rl_end) { ! rl_begin_undo_group (); ! ! rl_delete (1, c); #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) --- 1304,1312 ---- return -1; + rl_begin_undo_group (); while (count-- && rl_point < rl_end) { ! p = rl_point; ! rl_vi_delete (1, c); #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) *************** *** 1304,1313 **** else #endif ! _rl_insert_char (1, c); ! if (count == 0) ! rl_backward_char (1, c); ! ! rl_end_undo_group (); } return (0); } --- 1319,1330 ---- else #endif ! { ! if (rl_point < p) /* Did we retreat at EOL? */ ! rl_point++; ! _rl_insert_char (1, c); ! } } + rl_end_undo_group (); + return (0); } *************** *** 1319,1323 **** /* If we are redoing, rl_vi_change_to will stuff the last motion char */ if (vi_redoing == 0) ! rl_stuff_char ((key == 'S') ? 'c' : ' '); /* `S' == `cc', `s' == `c ' */ return (rl_vi_change_to (count, 'c')); --- 1336,1340 ---- /* If we are redoing, rl_vi_change_to will stuff the last motion char */ if (vi_redoing == 0) ! rl_stuff_char ((key == 'S') ? 'c' : 'l'); /* `S' == `cc', `s' == `cl' */ return (rl_vi_change_to (count, 'c')); diff -aNrc2 bash-2.05b-patched/lib/sh/Makefile.in bash-3.0/lib/sh/Makefile.in *** bash-2.05b-patched/lib/sh/Makefile.in Wed Apr 10 16:40:10 2002 --- bash-3.0/lib/sh/Makefile.in Wed Jan 21 14:28:06 2004 *************** *** 19,22 **** --- 19,30 ---- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + PACKAGE = @PACKAGE_NAME@ + VERSION = @PACKAGE_VERSION@ + + PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + srcdir = @srcdir@ VPATH = .:@srcdir@ *************** *** 24,29 **** --- 32,44 ---- BUILD_DIR = @BUILD_DIR@ + LIBBUILD = ${BUILD_DIR}/lib + BASHINCDIR = ${topdir}/include + INTL_LIBSRC = ${topdir}/lib/intl + INTL_BUILDDIR = ${LIBBUILD}/intl + INTL_INC = @INTL_INC@ + LIBINTL_H = @LIBINTL_H@ + INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ *************** *** 50,54 **** LOCAL_DEFS = @LOCAL_DEFS@ ! INCLUDES = -I. -I../.. -I$(topdir) -I$(topdir)/lib -I$(BASHINCDIR) -I$(srcdir) CCFLAGS = ${PROFILE_FLAGS} ${INCLUDES} $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) \ --- 65,69 ---- LOCAL_DEFS = @LOCAL_DEFS@ ! INCLUDES = -I. -I../.. -I$(topdir) -I$(topdir)/lib -I$(BASHINCDIR) -I$(srcdir) $(INTL_INC) CCFLAGS = ${PROFILE_FLAGS} ${INCLUDES} $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) \ *************** *** 72,77 **** pathcanon.c pathphys.c tmpfile.c stringlist.c stringvec.c spell.c \ shquote.c strtrans.c strindex.c snprintf.c mailstat.c \ ! fmtulong.c fmtullong.c fmtumax.c \ ! strtoll.c strtoull.c strtoimax.c strtoumax.c memset.c \ mktime.c strftime.c xstrchr.c zcatfd.c --- 87,92 ---- pathcanon.c pathphys.c tmpfile.c stringlist.c stringvec.c spell.c \ shquote.c strtrans.c strindex.c snprintf.c mailstat.c \ ! fmtulong.c fmtullong.c fmtumax.c shmatch.c \ ! strtoll.c strtoull.c strtoimax.c strtoumax.c memset.c strstr.c \ mktime.c strftime.c xstrchr.c zcatfd.c *************** *** 82,86 **** LIBOBJS = @LIBOBJS@ OBJECTS = clktck.o clock.o getenv.o oslib.o setlinebuf.o \ ! itos.o zread.o zwrite.o shtty.o \ netconn.o netopen.o timeval.o makepath.o pathcanon.o \ pathphys.o tmpfile.o stringlist.o stringvec.o spell.o shquote.o \ --- 97,101 ---- LIBOBJS = @LIBOBJS@ OBJECTS = clktck.o clock.o getenv.o oslib.o setlinebuf.o \ ! itos.o zread.o zwrite.o shtty.o shmatch.o \ netconn.o netopen.o timeval.o makepath.o pathcanon.o \ pathphys.o tmpfile.o stringlist.o stringvec.o spell.o shquote.o \ *************** *** 114,117 **** --- 129,135 ---- # Dependencies + ${BUILD_DIR}/version.h: ${BUILD_DIR}/config.h ${BUILD_DIR}/Makefile Makefile + -( cd ${BUILD_DIR} && ${MAKE} ${MFLAGS} version.h ) + # rules for losing makes, like SunOS clktck.o: clktck.c *************** *** 232,236 **** getenv.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h getenv.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h ! getenv.o: ${topdir}/pathnames.h ${topdir}/externs.h inet_aton.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h --- 250,255 ---- getenv.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h getenv.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h ! getenv.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ! getenv.o: ${BUILD_DIR}/version.h inet_aton.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h *************** *** 244,248 **** itos.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h itos.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h ! itos.o: ${topdir}/pathnames.h ${topdir}/externs.h makepath.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h --- 263,267 ---- itos.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h itos.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h ! itos.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h makepath.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h *************** *** 253,257 **** makepath.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h makepath.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h ! makepath.o: ${topdir}/pathnames.h ${topdir}/externs.h netconn.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h --- 272,276 ---- makepath.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h makepath.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h ! makepath.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h netconn.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h *************** *** 265,269 **** netopen.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h netopen.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h ! netopen.o: ${topdir}/pathnames.h ${topdir}/externs.h oslib.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${BASHINCDIR}/maxpath.h --- 284,289 ---- netopen.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h netopen.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h ! netopen.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h ! netopen.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h oslib.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${BASHINCDIR}/maxpath.h *************** *** 274,278 **** oslib.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h oslib.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h ! oslib.o: ${topdir}/pathnames.h ${topdir}/externs.h oslib.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h oslib.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h --- 294,298 ---- oslib.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h oslib.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h ! oslib.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h oslib.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h oslib.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h *************** *** 285,289 **** pathcanon.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h pathcanon.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h ! pathcanon.o: ${topdir}/pathnames.h ${topdir}/externs.h pathcanon.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h pathcanon.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h --- 305,309 ---- pathcanon.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h pathcanon.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h ! pathcanon.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h pathcanon.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h pathcanon.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h *************** *** 296,300 **** pathphys.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h pathphys.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h ! pathphys.o: ${topdir}/pathnames.h ${topdir}/externs.h pathphys.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h pathphys.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h --- 316,320 ---- pathphys.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h pathphys.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h ! pathphys.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h pathphys.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h pathphys.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h *************** *** 330,334 **** strerror.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h strerror.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h ! strerror.o: ${topdir}/pathnames.h ${topdir}/externs.h strindex.o: ${BASHINCDIR}/stdc.h ${topdir}/bashansi.h --- 350,354 ---- strerror.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h strerror.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h ! strerror.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h strindex.o: ${BASHINCDIR}/stdc.h ${topdir}/bashansi.h *************** *** 342,346 **** stringlist.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h stringlist.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h ! stringlist.o: ${topdir}/pathnames.h ${topdir}/externs.h stringvec.o: ${topdir}/bashansi.h ${BASHINCDIR}/chartypes.h --- 362,366 ---- stringlist.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h stringlist.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h ! stringlist.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h stringvec.o: ${topdir}/bashansi.h ${BASHINCDIR}/chartypes.h *************** *** 351,355 **** stringvec.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h stringvec.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h ! stringvec.o: ${topdir}/pathnames.h ${topdir}/externs.h strpbrk.o: ${BASHINCDIR}/stdc.h --- 371,375 ---- stringvec.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h stringvec.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h ! stringvec.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h strpbrk.o: ${BASHINCDIR}/stdc.h *************** *** 386,390 **** strtrans.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h strtrans.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h ! strtrans.o: ${topdir}/pathnames.h ${topdir}/externs.h times.o: ${BASHINCDIR}/systimes.h --- 406,410 ---- strtrans.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h strtrans.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h ! strtrans.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h times.o: ${BASHINCDIR}/systimes.h *************** *** 411,414 **** --- 431,435 ---- fmtulong.o: ${BASHINCDIR}/stdc.h fmtulong.o: ${BASHINCDIR}/typemax.h + fmtulong.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h fmtullong.o: ${topdir}/bashansi.h *************** *** 417,420 **** --- 438,442 ---- fmtullong.o: ${BASHINCDIR}/stdc.h fmtullong.o: ${BASHINCDIR}/typemax.h + fmtullong.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h fmtumax.o: ${topdir}/bashansi.h *************** *** 423,426 **** --- 445,449 ---- fmtumax.o: ${BASHINCDIR}/stdc.h fmtumax.o: ${BASHINCDIR}/typemax.h + fmtumax.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h xstrchr.o: ${topdir}/bashansi.h diff -aNrc2 bash-2.05b-patched/lib/sh/fmtulong.c bash-3.0/lib/sh/fmtulong.c *** bash-2.05b-patched/lib/sh/fmtulong.c Wed Jan 2 13:00:27 2002 --- bash-3.0/lib/sh/fmtulong.c Fri Dec 19 19:09:24 2003 *************** *** 39,45 **** --- 39,50 ---- # include #endif + #ifdef HAVE_INTTYPES_H + # include + #endif #include #include + #include + #include "stdc.h" *************** *** 94,98 **** { #if 1 ! strncpy (buf, "invalid base", len - 1); buf[len] = '\0'; errno = EINVAL; --- 99,103 ---- { #if 1 ! strncpy (buf, _("invalid base"), len - 1); buf[len] = '\0'; errno = EINVAL; diff -aNrc2 bash-2.05b-patched/lib/sh/getcwd.c bash-3.0/lib/sh/getcwd.c *** bash-2.05b-patched/lib/sh/getcwd.c Tue Sep 4 09:18:33 2001 --- bash-3.0/lib/sh/getcwd.c Wed Jul 21 17:15:19 2004 *************** *** 23,26 **** --- 23,30 ---- #if !defined (HAVE_GETCWD) + #if !defined (__GNUC__) && !defined (HAVE_ALLOCA_H) && defined (_AIX) + #pragma alloca + #endif /* _AIX && RISC6000 && !__GNUC__ */ + #include #include diff -aNrc2 bash-2.05b-patched/lib/sh/getenv.c bash-3.0/lib/sh/getenv.c *** bash-2.05b-patched/lib/sh/getenv.c Tue Jun 25 09:43:05 2002 --- bash-3.0/lib/sh/getenv.c Thu Nov 6 13:29:53 2003 *************** *** 116,120 **** } ! offset = assignment (str); if (str[offset] != '=') { --- 116,120 ---- } ! offset = assignment (str, 0); if (str[offset] != '=') { *************** *** 170,174 **** var = 0; ! v = value; /* XXX - should we worry about readonly here? */ if (rewrite == 0) --- 170,174 ---- var = 0; ! v = (char *)value; /* some compilers need explicit cast */ /* XXX - should we worry about readonly here? */ if (rewrite == 0) diff -aNrc2 bash-2.05b-patched/lib/sh/mailstat.c bash-3.0/lib/sh/mailstat.c *** bash-2.05b-patched/lib/sh/mailstat.c Mon Oct 15 13:46:48 2001 --- bash-3.0/lib/sh/mailstat.c Sat Mar 22 19:20:21 2003 *************** *** 150,154 **** } ! if (atime) st_ret.st_atime = atime; if (mtime) --- 150,154 ---- } ! /* if (atime) */ /* Set atime even if cur/ is empty */ st_ret.st_atime = atime; if (mtime) diff -aNrc2 bash-2.05b-patched/lib/sh/netconn.c bash-3.0/lib/sh/netconn.c *** bash-2.05b-patched/lib/sh/netconn.c Thu Dec 6 13:12:59 2001 --- bash-3.0/lib/sh/netconn.c Sat Oct 12 14:47:38 2002 *************** *** 23,27 **** #include ! #ifndef _MINIX # include #endif --- 23,27 ---- #include ! #if ! defined(_MINIX) && defined (HAVE_SYS_FILE_H) # include #endif diff -aNrc2 bash-2.05b-patched/lib/sh/netopen.c bash-3.0/lib/sh/netopen.c *** bash-2.05b-patched/lib/sh/netopen.c Mon Feb 18 08:56:03 2002 --- bash-3.0/lib/sh/netopen.c Fri Dec 19 19:10:24 2003 *************** *** 52,55 **** --- 52,57 ---- #include + #include + #include *************** *** 154,158 **** if (_getaddr(host, &ina) == 0) { ! internal_error ("%s: host unknown", host); errno = EINVAL; return -1; --- 156,160 ---- if (_getaddr(host, &ina) == 0) { ! internal_error (_("%s: host unknown"), host); errno = EINVAL; return -1; *************** *** 161,165 **** if (_getserv(serv, typ, &p) == 0) { ! internal_error("%s: invalid service", serv); errno = EINVAL; return -1; --- 163,167 ---- if (_getserv(serv, typ, &p) == 0) { ! internal_error(_("%s: invalid service"), serv); errno = EINVAL; return -1; *************** *** 292,296 **** if (t == 0) { ! internal_error ("%s: bad network path specification", path); return -1; } --- 294,298 ---- if (t == 0) { ! internal_error (_("%s: bad network path specification"), path); return -1; } *************** *** 332,336 **** char *path; { ! internal_error ("network operations not supported"); return -1; } --- 334,338 ---- char *path; { ! internal_error (_("network operations not supported")); return -1; } diff -aNrc2 bash-2.05b-patched/lib/sh/pathcanon.c bash-3.0/lib/sh/pathcanon.c *** bash-2.05b-patched/lib/sh/pathcanon.c Wed Nov 21 12:06:14 2001 --- bash-3.0/lib/sh/pathcanon.c Tue Nov 18 12:53:43 2003 *************** *** 35,41 **** --- 35,46 ---- #include #include + #include #include "shell.h" + #if !defined (errno) + extern int errno; + #endif + #if defined (__CYGWIN__) #include *************** *** 71,77 **** char *path; { ! int l; struct stat sb; l = stat (path, &sb) == 0 && S_ISDIR (sb.st_mode); #if defined (__CYGWIN__) --- 76,83 ---- char *path; { ! int l, x; struct stat sb; + /* This should leave errno set to the correct value. */ l = stat (path, &sb) == 0 && S_ISDIR (sb.st_mode); #if defined (__CYGWIN__) diff -aNrc2 bash-2.05b-patched/lib/sh/pathphys.c bash-3.0/lib/sh/pathphys.c *** bash-2.05b-patched/lib/sh/pathphys.c Mon Oct 15 14:34:20 2001 --- bash-3.0/lib/sh/pathphys.c Tue Nov 18 13:03:15 2003 *************** *** 69,73 **** /* * Return PATH with all symlinks expanded in newly-allocated memory. ! * This always gets a full pathname. */ --- 69,73 ---- /* * Return PATH with all symlinks expanded in newly-allocated memory. ! * This always gets an absolute pathname. */ *************** *** 81,89 **** int double_slash_path, linklen, nlink; nlink = 0; q = result = (char *)xmalloc (PATH_MAX + 1); ! workpath = (char *)xmalloc (PATH_MAX + 1); ! strcpy (workpath, path); /* This always gets an absolute pathname. */ --- 81,104 ---- int double_slash_path, linklen, nlink; + linklen = strlen (path); + + #if 0 + /* First sanity check -- punt immediately if the name is too long. */ + if (linklen >= PATH_MAX) + return (savestring (path)); + #endif + nlink = 0; q = result = (char *)xmalloc (PATH_MAX + 1); ! /* Even if we get something longer than PATH_MAX, we might be able to ! shorten it, so we try. */ ! if (linklen >= PATH_MAX) ! workpath = savestring (path); ! else ! { ! workpath = (char *)xmalloc (PATH_MAX + 1); ! strcpy (workpath, path); ! } /* This always gets an absolute pathname. */ *************** *** 134,138 **** *q++ = DIRSEP; while (*p && (ISDIRSEP(*p) == 0)) ! *q++ = *p++; *q = '\0'; --- 149,165 ---- *q++ = DIRSEP; while (*p && (ISDIRSEP(*p) == 0)) ! { ! if (q - result >= PATH_MAX) ! { ! #ifdef ENAMETOOLONG ! errno = ENAMETOOLONG; ! #else ! errno = EINVAL; ! #endif ! goto error; ! } ! ! *q++ = *p++; ! } *q = '\0'; *************** *** 152,155 **** --- 179,184 ---- #ifdef ELOOP errno = ELOOP; + #else + errno = EINVAL; #endif error: *************** *** 160,163 **** --- 189,203 ---- linkbuf[linklen] = '\0'; + + /* If the new path length would overrun PATH_MAX, punt now. */ + if ((strlen (p) + linklen + 2) >= PATH_MAX) + { + #ifdef ENAMETOOLONG + errno = ENAMETOOLONG; + #else + errno = EINVAL; + #endif + goto error; + } /* Form the new pathname by copying the link value to a temporary diff -aNrc2 bash-2.05b-patched/lib/sh/shmatch.c bash-3.0/lib/sh/shmatch.c *** bash-2.05b-patched/lib/sh/shmatch.c Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/sh/shmatch.c Mon Sep 29 09:29:09 2003 *************** *** 0 **** --- 1,121 ---- + /* Copyright (C) 2003 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software; you can 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. + + Bash is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License along + with Bash; see the file COPYING. If not, write to the Free Software + Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + + /* + * shmatch.c -- shell interface to posix regular expression matching. + */ + + #ifdef HAVE_CONFIG_H + # include + #endif + + #if defined (HAVE_POSIX_REGEXP) + + #ifdef HAVE_UNISTD_H + # include + #endif + + #include "bashansi.h" + + #include + #include + + #include "shell.h" + #include "variables.h" + #include "externs.h" + + extern int glob_ignore_case; + + int + sh_regmatch (string, pattern, flags) + const char *string; + const char *pattern; + int flags; + { + regex_t regex = { 0 }; + regmatch_t *matches; + int rflags; + #if defined (ARRAY_VARS) + SHELL_VAR *rematch; + ARRAY *amatch; + int subexp_ind; + char *subexp_str; + int subexp_len; + #endif + int result; + + + #if defined (ARRAY_VARS) + rematch = (SHELL_VAR *)NULL; + #endif + + rflags = REG_EXTENDED; + if (glob_ignore_case) + rflags |= REG_ICASE; + #if !defined (ARRAY_VARS) + rflags |= REG_NOSUB; + #endif + + if (regcomp (®ex, pattern, rflags)) + return 2; /* flag for printing a warning here. */ + + #if defined (ARRAY_VARS) + matches = (regmatch_t *)malloc (sizeof (regmatch_t) * (regex.re_nsub + 1)); + #else + matches = NULL; + #endif + + if (regexec (®ex, string, regex.re_nsub + 1, matches, 0)) + result = EXECUTION_FAILURE; + else + result = EXECUTION_SUCCESS; /* match */ + + #if defined (ARRAY_VARS) + subexp_len = strlen (string) + 10; + subexp_str = malloc (subexp_len + 1); + + /* Store the parenthesized subexpressions in the array BASH_REMATCH. + Element 0 is the portion that matched the entire regexp. Element 1 + is the part that matched the first subexpression, and so on. */ + unbind_variable ("BASH_REMATCH"); + rematch = make_new_array_variable ("BASH_REMATCH"); + amatch = array_cell (rematch); + + if ((flags & SHMAT_SUBEXP) && result == EXECUTION_SUCCESS && subexp_str) + { + for (subexp_ind = 0; subexp_ind <= regex.re_nsub; subexp_ind++) + { + memset (subexp_str, 0, subexp_len); + strncpy (subexp_str, string + matches[subexp_ind].rm_so, + matches[subexp_ind].rm_eo - matches[subexp_ind].rm_so); + array_insert (amatch, subexp_ind, subexp_str); + } + } + + VSETATTR (rematch, att_readonly); + + free (subexp_str); + free (matches); + #endif /* ARRAY_VARS */ + + regfree (®ex); + + return result; + } + + #endif /* HAVE_POSIX_REGEXP */ diff -aNrc2 bash-2.05b-patched/lib/sh/shquote.c bash-3.0/lib/sh/shquote.c *** bash-2.05b-patched/lib/sh/shquote.c Thu May 2 13:38:23 2002 --- bash-3.0/lib/sh/shquote.c Tue Apr 1 13:44:06 2003 *************** *** 84,87 **** --- 84,89 ---- if (sh_syntaxtab[c] & CBSDQUOTE) *r++ = '\\'; + else if (c == CTLESC || c == CTLNUL) + *r++ = CTLESC; /* could be '\\'? */ *r++ = c; *************** *** 95,99 **** /* Remove backslashes that are quoting characters that are special between ! double quotes. Return a new string. */ char * sh_un_double_quote (string) --- 97,102 ---- /* Remove backslashes that are quoting characters that are special between ! double quotes. Return a new string. XXX - should this handle CTLESC ! and CTLNUL? */ char * sh_un_double_quote (string) *************** *** 159,162 **** --- 162,170 ---- break; #endif + case CTLESC: case CTLNUL: /* internal quoting characters */ + *r++ = CTLESC; /* could be '\\'? */ + *r++ = c; + break; + case '#': /* comment char */ if (s == string) *************** *** 189,192 **** --- 197,203 ---- if (sh_syntaxtab[c] & CBSDQUOTE) *r++ = '\\'; + /* I should probably add flags for these to sh_syntaxtab[] */ + else if (c == CTLESC || c == CTLNUL) + *r++ = CTLESC; /* could be '\\'? */ *r++ = c; diff -aNrc2 bash-2.05b-patched/lib/sh/snprintf.c bash-3.0/lib/sh/snprintf.c *** bash-2.05b-patched/lib/sh/snprintf.c Thu Apr 25 13:03:46 2002 --- bash-3.0/lib/sh/snprintf.c Tue Aug 6 11:48:04 2002 *************** *** 46,53 **** /* * Currently doesn't handle (and bash/readline doesn't use): ! * *M$ width, precision specifications ! * %N$ numbered argument conversions ! * inf, nan floating values imperfect (if isinf(), isnan() not in libc) ! * support for `F' is imperfect, since underlying printf may not handle it */ --- 46,54 ---- /* * Currently doesn't handle (and bash/readline doesn't use): ! * * *M$ width, precision specifications ! * * %N$ numbered argument conversions ! * * inf, nan floating values imperfect (if isinf(), isnan() not in libc) ! * * support for `F' is imperfect with ldfallback(), since underlying ! * printf may not handle it -- should ideally have another autoconf test */ diff -aNrc2 bash-2.05b-patched/lib/sh/strftime.c bash-3.0/lib/sh/strftime.c *** bash-2.05b-patched/lib/sh/strftime.c Thu Dec 20 14:22:52 2001 --- bash-3.0/lib/sh/strftime.c Wed Mar 3 22:13:23 2004 *************** *** 96,100 **** extern char *tzname[2]; extern int daylight; ! #if defined(SOLARIS) || defined(mips) extern long int timezone, altzone; #else --- 96,100 ---- extern char *tzname[2]; extern int daylight; ! #if defined(SOLARIS) || defined(mips) || defined (M_UNIX) extern long int timezone, altzone; #else diff -aNrc2 bash-2.05b-patched/lib/sh/strstr.c bash-3.0/lib/sh/strstr.c *** bash-2.05b-patched/lib/sh/strstr.c Wed Dec 31 19:00:00 1969 --- bash-3.0/lib/sh/strstr.c Tue Apr 8 08:57:32 2003 *************** *** 0 **** --- 1,122 ---- + /* Copyright (C) 1994, 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 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. */ + + /* + * My personal strstr() implementation that beats most other algorithms. + * Until someone tells me otherwise, I assume that this is the + * fastest implementation of strstr() in C. + * I deliberately chose not to comment it. You should have at least + * as much fun trying to understand it, as I had to write it :-). + * + * Stephen R. van den Berg, berg@pool.informatik.rwth-aachen.de */ + + #if HAVE_CONFIG_H + # include + #endif + + #if defined _LIBC || defined HAVE_STRING_H + # include + #endif + #include + + typedef unsigned chartype; + + #undef strstr + + char * + strstr (const char *phaystack, const char *pneedle) + { + register const unsigned char *haystack, *needle; + register chartype b, c; + + haystack = (const unsigned char *) phaystack; + needle = (const unsigned char *) pneedle; + + b = *needle; + if (b != '\0') + { + haystack--; /* possible ANSI violation */ + do + { + c = *++haystack; + if (c == '\0') + goto ret0; + } + while (c != b); + + c = *++needle; + if (c == '\0') + goto foundneedle; + ++needle; + goto jin; + + for (;;) + { + register chartype a; + register const unsigned char *rhaystack, *rneedle; + + do + { + a = *++haystack; + if (a == '\0') + goto ret0; + if (a == b) + break; + a = *++haystack; + if (a == '\0') + goto ret0; + shloop:; } + while (a != b); + + jin: a = *++haystack; + if (a == '\0') + goto ret0; + + if (a != c) + goto shloop; + + rhaystack = haystack-- + 1; + rneedle = needle; + a = *rneedle; + + if (*rhaystack == a) + do + { + if (a == '\0') + goto foundneedle; + ++rhaystack; + a = *++needle; + if (*rhaystack != a) + break; + if (a == '\0') + goto foundneedle; + ++rhaystack; + a = *++needle; + } + while (*rhaystack == a); + + needle = rneedle; /* took the register-poor approach */ + + if (a == '\0') + break; + } + } + foundneedle: + return (char*) haystack; + ret0: + return 0; + } diff -aNrc2 bash-2.05b-patched/lib/sh/strtrans.c bash-3.0/lib/sh/strtrans.c *** bash-2.05b-patched/lib/sh/strtrans.c Mon May 13 15:32:27 2002 --- bash-3.0/lib/sh/strtrans.c Tue Sep 30 10:38:08 2003 *************** *** 93,100 **** break; case 'x': /* Hex digit -- non-ANSI */ for (temp = 2, c = 0; ISXDIGIT ((unsigned char)*s) && temp--; s++) c = (c * 16) + HEXVALUE (*s); /* \x followed by non-hex digits is passed through unchanged */ ! if (temp == 2) { *r++ = '\\'; --- 93,117 ---- break; case 'x': /* Hex digit -- non-ANSI */ + if ((flags & 2) && *s == '{') + { + flags |= 16; /* internal flag value */ + s++; + } + /* Consume at least two hex characters */ for (temp = 2, c = 0; ISXDIGIT ((unsigned char)*s) && temp--; s++) c = (c * 16) + HEXVALUE (*s); + /* DGK says that after a `\x{' ksh93 consumes ISXDIGIT chars + until a non-xdigit or `}', so potentially more than two + chars are consumed. */ + if (flags & 16) + { + for ( ; ISXDIGIT ((unsigned char)*s); s++) + c = (c * 16) + HEXVALUE (*s); + flags &= ~16; + if (*s == '}') + s++; + } /* \x followed by non-hex digits is passed through unchanged */ ! else if (temp == 2) { *r++ = '\\'; *************** *** 105,109 **** case '\\': break; ! case '\'': if (flags & 1) *r++ = '\\'; --- 122,126 ---- case '\\': break; ! case '\'': case '"': case '?': if (flags & 1) *r++ = '\\'; diff -aNrc2 bash-2.05b-patched/lib/sh/tmpfile.c bash-3.0/lib/sh/tmpfile.c *** bash-2.05b-patched/lib/sh/tmpfile.c Tue Dec 18 09:58:01 2001 --- bash-3.0/lib/sh/tmpfile.c Thu Feb 12 11:33:36 2004 *************** *** 63,80 **** #ifdef P_tmpdir sys_tmpdir = P_tmpdir; ! if (stat (sys_tmpdir, &sb) == 0) return sys_tmpdir; #endif sys_tmpdir = "/tmp"; ! if (stat (sys_tmpdir, &sb) == 0) return sys_tmpdir; sys_tmpdir = "/var/tmp"; ! if (stat (sys_tmpdir, &sb) == 0) return sys_tmpdir; sys_tmpdir = "/usr/tmp"; ! if (stat (sys_tmpdir, &sb) == 0) return sys_tmpdir; --- 63,80 ---- #ifdef P_tmpdir sys_tmpdir = P_tmpdir; ! if (file_iswdir (sys_tmpdir)) return sys_tmpdir; #endif sys_tmpdir = "/tmp"; ! if (file_iswdir (sys_tmpdir)) return sys_tmpdir; sys_tmpdir = "/var/tmp"; ! if (file_iswdir (sys_tmpdir)) return sys_tmpdir; sys_tmpdir = "/usr/tmp"; ! if (file_iswdir (sys_tmpdir)) return sys_tmpdir; diff -aNrc2 bash-2.05b-patched/lib/termcap/termcap.c bash-3.0/lib/termcap/termcap.c *** bash-2.05b-patched/lib/termcap/termcap.c Thu Aug 5 08:26:24 1999 --- bash-3.0/lib/termcap/termcap.c Sat Oct 12 14:48:53 2002 *************** *** 22,27 **** /* Get the O_* definitions for open et al. */ ! #ifndef _MINIX ! #include #endif --- 22,27 ---- /* Get the O_* definitions for open et al. */ ! #if !defined (_MINIX) && defined (HAVE_SYS_FILE_H) ! # include #endif diff -aNrc2 bash-2.05b-patched/locale.c bash-3.0/locale.c *** bash-2.05b-patched/locale.c Thu May 16 15:31:43 2002 --- bash-3.0/locale.c Wed Mar 17 08:33:36 2004 *************** *** 1,5 **** /* locale.c - Miscellaneous internationalization functions. */ ! /* Copyright (C) 1996 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,5 ---- /* locale.c - Miscellaneous internationalization functions. */ ! /* Copyright (C) 1996-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 48,51 **** --- 48,61 ---- static char *lc_all; + /* tracks the value of LC_ALL; used to provide defaults for locale + categories */ + static char *lang; + + /* Called to reset all of the locale variables to their appropriate values + if (and only if) LC_ALL has not been assigned a value. */ + static int reset_locale_vars __P((void)); + + static void locale_setblanks __P((void)); + /* Set the value of default_locale and make the current locale the system default locale. This should be called very early in main(). */ *************** *** 58,65 **** default_locale = savestring (default_locale); #endif /* HAVE_SETLOCALE */ } ! /* Set default values for LC_CTYPE, LC_COLLATE, and LC_MESSAGES if they ! are not specified in the environment, but LANG or LC_ALL is. This should be called from main() after parsing the environment. */ void --- 68,77 ---- default_locale = savestring (default_locale); #endif /* HAVE_SETLOCALE */ + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); } ! /* Set default values for LC_CTYPE, LC_COLLATE, LC_MESSAGES and LC_NUMERIC ! if they are not specified in the environment, but LC_ALL is. This should be called from main() after parsing the environment. */ void *************** *** 67,75 **** { char *val; #if defined (HAVE_SETLOCALE) val = get_string_value ("LC_CTYPE"); if (val == 0 && lc_all && *lc_all) ! setlocale (LC_CTYPE, lc_all); # if defined (LC_COLLATE) --- 79,94 ---- { char *val; + int r; #if defined (HAVE_SETLOCALE) + + # if defined (LC_CTYPE) val = get_string_value ("LC_CTYPE"); if (val == 0 && lc_all && *lc_all) ! { ! setlocale (LC_CTYPE, lc_all); ! locale_setblanks (); ! } ! # endif # if defined (LC_COLLATE) *************** *** 98,102 **** --- 117,124 ---- FREE (default_domain); default_domain = savestring (val); + #if 0 + /* Don't want to override the shell's textdomain as the default */ textdomain (default_domain); + #endif } *************** *** 106,110 **** FREE (default_dir); default_dir = savestring (val); ! bindtextdomain (default_domain, default_dir); } } --- 128,133 ---- FREE (default_dir); default_dir = savestring (val); ! if (default_domain && *default_domain) ! bindtextdomain (default_domain, default_dir); } } *************** *** 116,124 **** --- 139,152 ---- char *var, *value; { + int r; + if (var[0] == 'T' && var[10] == 0) /* TEXTDOMAIN */ { FREE (default_domain); default_domain = value ? savestring (value) : (char *)NULL; + #if 0 + /* Don't want to override the shell's textdomain as the default */ textdomain (default_domain); + #endif return (1); } *************** *** 127,131 **** FREE (default_dir); default_dir = value ? savestring (value) : (char *)NULL; ! bindtextdomain (default_domain, default_dir); return (1); } --- 155,160 ---- FREE (default_dir); default_dir = value ? savestring (value) : (char *)NULL; ! if (default_domain && *default_domain) ! bindtextdomain (default_domain, default_dir); return (1); } *************** *** 138,143 **** if (value) lc_all = savestring (value); - else if (default_locale) - lc_all = savestring (default_locale); else { --- 167,170 ---- *************** *** 146,150 **** } #if defined (HAVE_SETLOCALE) ! return (setlocale (LC_ALL, lc_all) != 0); #else return (1); --- 173,179 ---- } #if defined (HAVE_SETLOCALE) ! r = *lc_all ? (setlocale (LC_ALL, lc_all) != 0) : reset_locale_vars (); ! locale_setblanks (); ! return r; #else return (1); *************** *** 155,160 **** else if (var[3] == 'C' && var[4] == 'T') /* LC_CTYPE */ { if (lc_all == 0 || *lc_all == '\0') ! return (setlocale (LC_CTYPE, value ? value : "") != 0); } else if (var[3] == 'C' && var[4] == 'O') /* LC_COLLATE */ --- 184,195 ---- else if (var[3] == 'C' && var[4] == 'T') /* LC_CTYPE */ { + # if defined (LC_CTYPE) if (lc_all == 0 || *lc_all == '\0') ! { ! r = (setlocale (LC_CTYPE, get_locale_var ("LC_CTYPE")) != 0); ! locale_setblanks (); ! return r; ! } ! # endif } else if (var[3] == 'C' && var[4] == 'O') /* LC_COLLATE */ *************** *** 162,166 **** # if defined (LC_COLLATE) if (lc_all == 0 || *lc_all == '\0') ! return (setlocale (LC_COLLATE, value ? value : "") != 0); # endif /* LC_COLLATE */ } --- 197,201 ---- # if defined (LC_COLLATE) if (lc_all == 0 || *lc_all == '\0') ! return (setlocale (LC_COLLATE, get_locale_var ("LC_COLLATE")) != 0); # endif /* LC_COLLATE */ } *************** *** 169,173 **** # if defined (LC_MESSAGES) if (lc_all == 0 || *lc_all == '\0') ! return (setlocale (LC_MESSAGES, value ? value : "") != 0); # endif /* LC_MESSAGES */ } --- 204,208 ---- # if defined (LC_MESSAGES) if (lc_all == 0 || *lc_all == '\0') ! return (setlocale (LC_MESSAGES, get_locale_var ("LC_MESSAGES")) != 0); # endif /* LC_MESSAGES */ } *************** *** 176,180 **** # if defined (LC_NUMERIC) if (lc_all == 0 || *lc_all == '\0') ! return (setlocale (LC_NUMERIC, value ? value : "") != 0); # endif /* LC_NUMERIC */ } --- 211,215 ---- # if defined (LC_NUMERIC) if (lc_all == 0 || *lc_all == '\0') ! return (setlocale (LC_NUMERIC, get_locale_var ("LC_NUMERIC")) != 0); # endif /* LC_NUMERIC */ } *************** *** 184,198 **** } ! /* Called when LANG is assigned a value. Sets LC_ALL category with ! setlocale(3) if that has not already been set. Doesn't change any ! shell variables. */ int set_lang (var, value) char *var, *value; { ! return ((lc_all == 0 || *lc_all == 0) ? setlocale (LC_ALL, value?value:"") != NULL : 0); } ! /* Get the value of one of the locale variables (LC_MESSAGES, LC_CTYPE) */ char * get_locale_var (var) --- 219,244 ---- } ! /* Called when LANG is assigned a value. Tracks value in `lang'. Calls ! reset_locale_vars() to reset any default values if LC_ALL is unset or ! null. */ int set_lang (var, value) char *var, *value; { ! FREE (lang); ! if (value) ! lang = savestring (value); ! else ! { ! lang = (char *)xmalloc (1); ! lang[0] = '\0'; ! } ! ! return ((lc_all == 0 || *lc_all == 0) ? reset_locale_vars () : 0); } ! /* Get the value of one of the locale variables (LC_MESSAGES, LC_CTYPE). ! The precedence is as POSIX.2 specifies: LC_ALL has precedence over ! the specific locale variables, and LANG, if set, is used as the default. */ char * get_locale_var (var) *************** *** 203,214 **** locale = lc_all; ! if (locale == 0) locale = get_string_value (var); ! if (locale == 0) ! locale = default_locale; return (locale); } /* Translate the contents of STRING, a $"..." quoted string, according to the current locale. In the `C' or `POSIX' locale, or if gettext() --- 249,296 ---- locale = lc_all; ! if (locale == 0 || *locale == 0) locale = get_string_value (var); ! if (locale == 0 || *locale == 0) ! locale = lang; ! if (locale == 0 || *locale == 0) ! locale = default_locale; /* system-dependent; not really portable */ return (locale); } + /* Called to reset all of the locale variables to their appropriate values + if (and only if) LC_ALL has not been assigned a value. DO NOT CALL THIS + IF LC_ALL HAS BEEN ASSIGNED A VALUE. */ + static int + reset_locale_vars () + { + #if defined (HAVE_SETLOCALE) + char *locale; + + locale = lang; + if (locale == 0 || *locale == '\0') + locale = default_locale; + if (setlocale (LC_ALL, locale) == 0) + return 0; + + # if defined (LC_CTYPE) + setlocale (LC_CTYPE, get_locale_var ("LC_CTYPE")); + # endif + # if defined (LC_COLLATE) + setlocale (LC_COLLATE, get_locale_var ("LC_COLLATE")); + # endif + # if defined (LC_MESSAGES) + setlocale (LC_MESSAGES, get_locale_var ("LC_MESSAGES")); + # endif + # if defined (LC_NUMERIC) + setlocale (LC_NUMERIC, get_locale_var ("LC_NUMERIC")); + # endif + + locale_setblanks (); + + #endif + return 1; + } + /* Translate the contents of STRING, a $"..." quoted string, according to the current locale. In the `C' or `POSIX' locale, or if gettext() *************** *** 221,228 **** { char *locale, *t; - #if defined (HAVE_GETTEXT) char *translated; int tlen; - #endif /* Don't try to translate null strings. */ --- 303,308 ---- *************** *** 239,246 **** just return the string. If we don't have gettext(), there's no use doing anything else. */ - #if defined (HAVE_GETTEXT) if (locale == 0 || locale[0] == '\0' || (locale[0] == 'C' && locale[1] == '\0') || STREQ (locale, "POSIX")) - #endif { t = (char *)xmalloc (len + 1); --- 319,324 ---- *************** *** 251,257 **** } - #if defined (HAVE_GETTEXT) /* Now try to translate it. */ ! translated = gettext (string); if (translated == string) /* gettext returns its argument if untranslatable */ { --- 329,338 ---- } /* Now try to translate it. */ ! if (default_domain && *default_domain) ! translated = dgettext (default_domain, string); ! else ! translated = string; ! if (translated == string) /* gettext returns its argument if untranslatable */ { *************** *** 270,274 **** } return (t); - #endif /* HAVE_GETTEXT */ } --- 351,354 ---- *************** *** 340,348 **** /* If we're just dumping translatable strings, don't do anything with the ! string itself, but if we're dumping in `po' file format, convert it into a form more palatable to gettext(3) ! and friends by quoting `"' and `\' with backslashes and converting ! into `\n""'. If we find a newline in TEMP, we first output a ! `msgid ""' line and then the translated string; otherwise we output the ! `msgid' and translated string all on one line. */ if (dump_translatable_strings) { --- 420,429 ---- /* If we're just dumping translatable strings, don't do anything with the ! string itself, but if we're dumping in `po' file format, convert it into ! a form more palatable to gettext(3) and friends by quoting `"' and `\' ! with backslashes and converting into `\n""'. If we find a ! newline in TEMP, we first output a `msgid ""' line and then the ! translated string; otherwise we output the `msgid' and translated ! string all on one line. */ if (dump_translatable_strings) { *************** *** 377,380 **** --- 458,479 ---- *lenp = 0; return (temp); + } + } + + /* Set every character in the character class to be a shell break + character for the lexical analyzer when the locale changes. */ + static void + locale_setblanks () + { + int x; + + for (x = 0; x < sh_syntabsiz; x++) + { + if (isblank (x)) + sh_syntaxtab[x] |= CSHBRK; + else if (member (x, shell_break_chars)) + sh_syntaxtab[x] |= CSHBRK; + else + sh_syntaxtab[x] &= ~CSHBRK; } } diff -aNrc2 bash-2.05b-patched/mailcheck.c bash-3.0/mailcheck.c *** bash-2.05b-patched/mailcheck.c Thu Jan 10 14:23:15 2002 --- bash-3.0/mailcheck.c Fri Dec 19 15:45:31 2003 *************** *** 32,35 **** --- 32,36 ---- #include "posixtime.h" #include "bashansi.h" + #include "bashintl.h" #include "shell.h" *************** *** 290,293 **** --- 291,295 ---- make_default_mailpath () { + #if defined (DEFAULT_MAIL_DIRECTORY) char *mp; *************** *** 298,301 **** --- 300,306 ---- strcpy (mp + sizeof (DEFAULT_MAIL_DIRECTORY), current_user.user_name); return (mp); + #else + return ((char *)NULL); + #endif } *************** *** 322,327 **** { mailpaths = make_default_mailpath (); ! add_mail_file (mailpaths, (char *)NULL); ! free (mailpaths); return; } --- 327,335 ---- { mailpaths = make_default_mailpath (); ! if (mailpaths) ! { ! add_mail_file (mailpaths, (char *)NULL); ! free (mailpaths); ! } return; } *************** *** 372,376 **** use_user_notification = mailfiles[i]->msg != (char *)NULL; ! message = mailfiles[i]->msg ? mailfiles[i]->msg : "You have mail in $_"; bind_variable ("_", current_mail_file); --- 380,384 ---- use_user_notification = mailfiles[i]->msg != (char *)NULL; ! message = mailfiles[i]->msg ? mailfiles[i]->msg : _("You have mail in $_"); bind_variable ("_", current_mail_file); *************** *** 391,395 **** the mail in the file is manipulated, check the size also. If the file has not grown, continue. */ ! if ((atime >= mtime) || !file_is_bigger) continue; --- 399,403 ---- the mail in the file is manipulated, check the size also. If the file has not grown, continue. */ ! if ((atime >= mtime) && !file_is_bigger) continue; *************** *** 397,401 **** has grown, note the fact that this is *new* mail. */ if (use_user_notification == 0 && (atime < mtime) && file_is_bigger) ! message = "You have new mail in $_"; #undef atime #undef mtime --- 405,409 ---- has grown, note the fact that this is *new* mail. */ if (use_user_notification == 0 && (atime < mtime) && file_is_bigger) ! message = _("You have new mail in $_"); #undef atime #undef mtime *************** *** 413,417 **** { update_mail_file (i); ! printf ("The mail in %s has been read\n", current_mail_file); } } --- 421,425 ---- { update_mail_file (i); ! printf (_("The mail in %s has been read\n"), current_mail_file); } } diff -aNrc2 bash-2.05b-patched/make_cmd.c bash-3.0/make_cmd.c *** bash-2.05b-patched/make_cmd.c Mon May 6 13:37:02 2002 --- bash-3.0/make_cmd.c Fri Dec 19 15:46:56 2003 *************** *** 2,6 **** parser constructs. */ ! /* Copyright (C) 1989-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- parser constructs. */ ! /* Copyright (C) 1989-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 24,28 **** #include #include "bashtypes.h" ! #ifndef _MINIX # include #endif --- 24,28 ---- #include #include "bashtypes.h" ! #if !defined (_MINIX) && defined (HAVE_SYS_FILE_H) # include #endif *************** *** 33,36 **** --- 33,38 ---- #endif + #include "bashintl.h" + #include "syntax.h" #include "command.h" *************** *** 62,66 **** #define WLCACHESIZE 60 ! static COMMAND *make_for_or_select __P((enum command_type, WORD_DESC *, WORD_LIST *, COMMAND *)); #if defined (ARITH_FOR_COMMAND) static WORD_LIST *make_arith_for_expr __P((char *)); --- 64,68 ---- #define WLCACHESIZE 60 ! static COMMAND *make_for_or_select __P((enum command_type, WORD_DESC *, WORD_LIST *, COMMAND *, int)); #if defined (ARITH_FOR_COMMAND) static WORD_LIST *make_arith_for_expr __P((char *)); *************** *** 200,208 **** static COMMAND * ! make_for_or_select (type, name, map_list, action) enum command_type type; WORD_DESC *name; WORD_LIST *map_list; COMMAND *action; { FOR_COM *temp; --- 202,211 ---- static COMMAND * ! make_for_or_select (type, name, map_list, action, lineno) enum command_type type; WORD_DESC *name; WORD_LIST *map_list; COMMAND *action; + int lineno; { FOR_COM *temp; *************** *** 211,214 **** --- 214,218 ---- temp->flags = 0; temp->name = name; + temp->line = lineno; temp->map_list = map_list; temp->action = action; *************** *** 217,236 **** COMMAND * ! make_for_command (name, map_list, action) WORD_DESC *name; WORD_LIST *map_list; COMMAND *action; { ! return (make_for_or_select (cm_for, name, map_list, action)); } COMMAND * ! make_select_command (name, map_list, action) WORD_DESC *name; WORD_LIST *map_list; COMMAND *action; { #if defined (SELECT_COMMAND) ! return (make_for_or_select (cm_select, name, map_list, action)); #else last_command_exit_value = 2; --- 221,242 ---- COMMAND * ! make_for_command (name, map_list, action, lineno) WORD_DESC *name; WORD_LIST *map_list; COMMAND *action; + int lineno; { ! return (make_for_or_select (cm_for, name, map_list, action, lineno)); } COMMAND * ! make_select_command (name, map_list, action, lineno) WORD_DESC *name; WORD_LIST *map_list; COMMAND *action; + int lineno; { #if defined (SELECT_COMMAND) ! return (make_for_or_select (cm_select, name, map_list, action, lineno)); #else last_command_exit_value = 2; *************** *** 245,256 **** { WORD_LIST *result; if (s == 0 || *s == '\0') return ((WORD_LIST *)NULL); ! result = make_word_list (make_word (s), (WORD_LIST *)NULL); return result; } #endif COMMAND * make_arith_for_command (exprs, action, lineno) --- 251,269 ---- { WORD_LIST *result; + WORD_DESC *wd; if (s == 0 || *s == '\0') return ((WORD_LIST *)NULL); ! wd = make_word (s); ! wd->flags |= W_NOGLOB|W_NOSPLIT|W_QUOTED; /* no word splitting or globbing */ ! result = make_word_list (wd, (WORD_LIST *)NULL); return result; } #endif + /* Note that this function calls dispose_words on EXPRS, since it doesn't + use the word list directly. We free it here rather than at the caller + because no other function in this file requires that the caller free + any arguments. */ COMMAND * make_arith_for_command (exprs, action, lineno) *************** *** 303,310 **** { if (nsemi < 3) ! parser_error (lineno, "syntax error: arithmetic expression required"); else ! parser_error (lineno, "syntax error: `;' unexpected"); ! parser_error (lineno, "syntax error: `((%s))'", exprs->word->word); last_command_exit_value = 2; return ((COMMAND *)NULL); --- 316,323 ---- { if (nsemi < 3) ! parser_error (lineno, _("syntax error: arithmetic expression required")); else ! parser_error (lineno, _("syntax error: `;' unexpected")); ! parser_error (lineno, _("syntax error: `((%s))'"), exprs->word->word); last_command_exit_value = 2; return ((COMMAND *)NULL); *************** *** 319,324 **** --- 332,339 ---- temp->action = action; + dispose_words (exprs); return (make_command (cm_arith_for, (SIMPLE_COM *)temp)); #else + dispose_words (exprs); last_command_exit_value = 2; return ((COMMAND *)NULL); *************** *** 338,342 **** COMMAND * ! make_case_command (word, clauses) WORD_DESC *word; PATTERN_LIST *clauses; --- 353,357 ---- COMMAND * ! make_case_command (word, clauses, lineno) WORD_DESC *word; PATTERN_LIST *clauses; *************** *** 346,349 **** --- 361,365 ---- temp = (CASE_COM *)xmalloc (sizeof (CASE_COM)); temp->flags = 0; + temp->line = lineno; temp->word = word; temp->clauses = REVERSE_LIST (clauses, PATTERN_LIST *); *************** *** 512,516 **** if (element.word) command->value.Simple->words = make_word_list (element.word, command->value.Simple->words); ! else { REDIRECT *r = element.redirect; --- 528,532 ---- if (element.word) command->value.Simple->words = make_word_list (element.word, command->value.Simple->words); ! else if (element.redirect) { REDIRECT *r = element.redirect; *************** *** 542,546 **** temp->instruction != r_reading_until) { ! internal_error ("make_here_document: bad instruction type %d", temp->instruction); return; } --- 558,562 ---- temp->instruction != r_reading_until) { ! internal_error (_("make_here_document: bad instruction type %d"), temp->instruction); return; } *************** *** 712,716 **** default: ! programming_error ("make_redirection: redirection instruction `%d' out of range", instruction); abort (); break; --- 728,732 ---- default: ! programming_error (_("make_redirection: redirection instruction `%d' out of range"), instruction); abort (); break; *************** *** 726,729 **** --- 742,750 ---- { FUNCTION_DEF *temp; + #if defined (ARRAY_VARS) + SHELL_VAR *bash_source_v; + ARRAY *bash_source_a; + char *t; + #endif temp = (FUNCTION_DEF *)xmalloc (sizeof (FUNCTION_DEF)); *************** *** 733,736 **** --- 754,768 ---- temp->flags = 0; command->line = lstart; + + /* Information used primarily for debugging. */ + temp->source_file = 0; + #if defined (ARRAY_VARS) + GET_ARRAY_FROM_VAR ("BASH_SOURCE", bash_source_v, bash_source_a); + if (bash_source_a && array_num_elements (bash_source_a) > 0) + temp->source_file = array_reference (bash_source_a, 0); + #endif + bind_function_def (name->word, temp); + + temp->source_file = 0; return (make_command (cm_function_def, (SIMPLE_COM *)temp)); } diff -aNrc2 bash-2.05b-patched/make_cmd.h bash-3.0/make_cmd.h *** bash-2.05b-patched/make_cmd.h Thu Feb 28 12:16:38 2002 --- bash-3.0/make_cmd.h Sat Feb 15 16:36:06 2003 *************** *** 37,43 **** extern COMMAND *make_command __P((enum command_type, SIMPLE_COM *)); extern COMMAND *command_connect __P((COMMAND *, COMMAND *, int)); ! extern COMMAND *make_for_command __P((WORD_DESC *, WORD_LIST *, COMMAND *)); extern COMMAND *make_group_command __P((COMMAND *)); ! extern COMMAND *make_case_command __P((WORD_DESC *, PATTERN_LIST *)); extern PATTERN_LIST *make_pattern_list __P((WORD_LIST *, COMMAND *)); extern COMMAND *make_if_command __P((COMMAND *, COMMAND *, COMMAND *)); --- 37,43 ---- extern COMMAND *make_command __P((enum command_type, SIMPLE_COM *)); extern COMMAND *command_connect __P((COMMAND *, COMMAND *, int)); ! extern COMMAND *make_for_command __P((WORD_DESC *, WORD_LIST *, COMMAND *, int)); extern COMMAND *make_group_command __P((COMMAND *)); ! extern COMMAND *make_case_command __P((WORD_DESC *, PATTERN_LIST *, int)); extern PATTERN_LIST *make_pattern_list __P((WORD_LIST *, COMMAND *)); extern COMMAND *make_if_command __P((COMMAND *, COMMAND *, COMMAND *)); *************** *** 53,57 **** extern COMMAND *make_arith_command __P((WORD_LIST *)); ! extern COMMAND *make_select_command __P((WORD_DESC *, WORD_LIST *, COMMAND *)); #if defined (COND_COMMAND) --- 53,57 ---- extern COMMAND *make_arith_command __P((WORD_LIST *)); ! extern COMMAND *make_select_command __P((WORD_DESC *, WORD_LIST *, COMMAND *, int)); #if defined (COND_COMMAND) diff -aNrc2 bash-2.05b-patched/mksyntax.c bash-3.0/mksyntax.c *** bash-2.05b-patched/mksyntax.c Thu Feb 7 09:32:28 2002 --- bash-3.0/mksyntax.c Fri Sep 12 18:36:05 2003 *************** *** 3,7 **** */ ! /* Copyright (C) 2000 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 3,7 ---- */ ! /* Copyright (C) 2000-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 79,82 **** --- 79,83 ---- char includes[] = "\ + #include \"config.h\"\n\ #include \"stdc.h\"\n\ #include \"syntax.h\"\n\n"; *************** *** 129,134 **** --- 130,140 ---- switch (i) { + #ifdef __STDC__ case '\a': xbuf[1] = 'a'; break; case '\v': xbuf[1] = 'v'; break; + #else + case '\007': xbuf[1] = 'a'; break; + case 0x0B: xbuf[1] = 'v'; break; + #endif case '\b': xbuf[1] = 'b'; break; case '\f': xbuf[1] = 'f'; break; *************** *** 271,275 **** int i; ! fprintf (fp, "const int sh_syntaxtab[%d] = {\n", SYNSIZE); for (i = 0; i < SYNSIZE; i++) --- 277,282 ---- int i; ! fprintf (fp, "int sh_syntabsiz = %d;\n", SYNSIZE); ! fprintf (fp, "int sh_syntaxtab[%d] = {\n", SYNSIZE); for (i = 0; i < SYNSIZE; i++) diff -aNrc2 bash-2.05b-patched/nojobs.c bash-3.0/nojobs.c *** bash-2.05b-patched/nojobs.c Thu Jan 17 16:22:37 2002 --- bash-3.0/nojobs.c Fri Dec 19 15:42:28 2003 *************** *** 53,56 **** --- 53,58 ---- #endif /* !STRUCT_WINSIZE_IN_SYS_IOCTL */ + #include "bashintl.h" + #include "shell.h" #include "jobs.h" *************** *** 64,70 **** #endif /* USG || _POSIX_VERSION */ ! #if !defined (HAVE_SIGINTERRUPT) # define siginterrupt(sig, code) ! #endif /* !HAVE_SIGINTERRUPT */ #if defined (HAVE_WAITPID) --- 66,72 ---- #endif /* USG || _POSIX_VERSION */ ! #if !defined (HAVE_SIGINTERRUPT) && !defined (HAVE_POSIX_SIGNALS) # define siginterrupt(sig, code) ! #endif /* !HAVE_SIGINTERRUPT && !HAVE_POSIX_SIGNALS */ #if defined (HAVE_WAITPID) *************** *** 87,91 **** extern int interactive, interactive_shell, login_shell; extern int subshell_environment; ! extern int last_command_exit_value; extern int interrupt_immediately; extern sh_builtin_func_t *this_shell_builtin; --- 89,93 ---- extern int interactive, interactive_shell, login_shell; extern int subshell_environment; ! extern int last_command_exit_value, last_command_exit_signal; extern int interrupt_immediately; extern sh_builtin_func_t *this_shell_builtin; *************** *** 121,124 **** --- 123,127 ---- #define PROC_NOTIFIED 0x02 #define PROC_ASYNC 0x04 + #define PROC_SIGNALED 0x10 /* Return values from find_status_by_pid */ *************** *** 137,143 **** --- 140,149 ---- static int find_status_by_pid __P((pid_t)); static int process_exit_status __P((WAIT)); + static int find_termsig_by_pid __P((pid_t)); + static int get_termsig __P((WAIT)); static void set_pid_status __P((pid_t, WAIT)); static void set_pid_flags __P((pid_t, int)); static void unset_pid_flags __P((pid_t, int)); + static int get_pid_flags __P((pid_t)); static void add_pid __P((pid_t, int)); static void mark_dead_jobs_as_notified __P((int)); *************** *** 146,149 **** --- 152,156 ---- static sighandler sigwinch_sighandler __P((int)); static sighandler wait_sigint_handler __P((int)); + static char *j_strsignal __P((int)); #if defined (HAVE_WAITPID) *************** *** 151,154 **** --- 158,165 ---- #endif + #if !defined (HAVE_SIGINTERRUPT) && defined (HAVE_POSIX_SIGNALS) + static int siginterrupt __P((int, int)); + #endif + static void restore_sigint_handler __P((void)); *************** *** 226,229 **** --- 237,269 ---- } + /* Return the status of PID as looked up in the PID_LIST array. A + return value of PROC_BAD indicates that PID wasn't found. */ + static int + find_termsig_by_pid (pid) + pid_t pid; + { + int i; + + i = find_index_by_pid (pid); + if (i == NO_PID) + return (0); + if (pid_list[i].flags & PROC_RUNNING) + return (0); + return (get_termsig (pid_list[i].status)); + } + + /* Set LAST_COMMAND_EXIT_SIGNAL depending on STATUS. If STATUS is -1, look + up PID in the pid array and set LAST_COMMAND_EXIT_SIGNAL appropriately + depending on its flags and exit status. */ + static int + get_termsig (status) + WAIT status; + { + if (WIFSTOPPED (status) == 0 && WIFSIGNALED (status)) + return (WTERMSIG (status)); + else + return (0); + } + /* Give PID the status value STATUS in the PID_LIST array. */ static void *************** *** 240,243 **** --- 280,285 ---- pid_list[slot].status = process_exit_status (status); pid_list[slot].flags &= ~PROC_RUNNING; + if (WIFSIGNALED (status)) + pid_list[slot].flags |= PROC_SIGNALED; /* If it's not a background process, mark it as notified so it gets cleaned up. */ *************** *** 276,279 **** --- 318,335 ---- } + /* Return the flags corresponding to PID in the PID_LIST array. */ + static int + get_pid_flags (pid) + pid_t pid; + { + int slot; + + slot = find_index_by_pid (pid); + if (slot == NO_PID) + return 0; + + return (pid_list[slot].flags); + } + static void add_pid (pid, async) *************** *** 445,449 **** reap_zombie_children () { ! #if defined (WNOHANG) pid_t pid; WAIT status; --- 501,505 ---- reap_zombie_children () { ! # if defined (WNOHANG) pid_t pid; WAIT status; *************** *** 451,457 **** while ((pid = waitpid (-1, (int *)&status, WNOHANG)) > 0) set_pid_status (pid, status); ! #endif } ! #endif /* WAITPID && WNOHANG */ /* Fork, handling errors. Returns the pid of the newly made child, or 0. --- 507,531 ---- while ((pid = waitpid (-1, (int *)&status, WNOHANG)) > 0) set_pid_status (pid, status); ! # endif /* WNOHANG */ } ! #endif /* WAITPID */ ! ! #if !defined (HAVE_SIGINTERRUPT) && defined (HAVE_POSIX_SIGNALS) ! static int ! siginterrupt (sig, flag) ! int sig, flag; ! { ! struct sigaction act; ! ! sigaction (sig, (struct sigaction *)NULL, &act); ! ! if (flag) ! act.sa_flags &= ~SA_RESTART; ! else ! act.sa_flags |= SA_RESTART; ! ! return (sigaction (sig, &act, (struct sigaction *)NULL)); ! } ! #endif /* !HAVE_SIGINTERRUPT && HAVE_POSIX_SIGNALS */ /* Fork, handling errors. Returns the pid of the newly made child, or 0. *************** *** 566,570 **** pid_t got_pid; WAIT status; ! int pstatus; pstatus = find_status_by_pid (pid); --- 640,644 ---- pid_t got_pid; WAIT status; ! int pstatus, flags; pstatus = find_status_by_pid (pid); *************** *** 572,581 **** if (pstatus == PROC_BAD) { ! internal_error ("wait: pid %ld is not a child of this shell", (long)pid); return (127); } if (pstatus != PROC_STILL_ALIVE) ! return (pstatus); siginterrupt (SIGINT, 1); --- 646,659 ---- if (pstatus == PROC_BAD) { ! internal_error (_("wait: pid %ld is not a child of this shell"), (long)pid); return (127); } if (pstatus != PROC_STILL_ALIVE) ! { ! if (pstatus > 128) ! last_command_exit_signal = find_termsig_by_pid (pid); ! return (pstatus); ! } siginterrupt (SIGINT, 1); *************** *** 689,692 **** --- 767,786 ---- } + static char * + j_strsignal (s) + int s; + { + static char retcode_name_buffer[64] = { '\0' }; + char *x; + + x = strsignal (s); + if (x == 0) + { + x = retcode_name_buffer; + sprintf (x, "Signal %d", s); + } + return x; + } + /* Wait for pid (one of our children) to terminate. This is called only by the execution code in execute_cmd.c. */ *************** *** 705,709 **** if (pstatus != PROC_STILL_ALIVE) ! return (pstatus); /* If we are running a script, ignore SIGINT while we're waiting for --- 799,807 ---- if (pstatus != PROC_STILL_ALIVE) ! { ! if (pstatus > 128) ! last_command_exit_signal = find_termsig_by_pid (pid); ! return (pstatus); ! } /* If we are running a script, ignore SIGINT while we're waiting for *************** *** 763,766 **** --- 861,865 ---- /* ``a full 8 bits of status is returned'' */ return_val = process_exit_status (status); + last_command_exit_signal = get_termsig (status); #if !defined (DONT_REPORT_SIGPIPE) *************** *** 772,776 **** #endif { ! fprintf (stderr, "%s", strsignal (WTERMSIG (status))); if (WIFCORED (status)) fprintf (stderr, " (core dumped)"); --- 871,875 ---- #endif { ! fprintf (stderr, "%s", j_strsignal (WTERMSIG (status))); if (WIFCORED (status)) fprintf (stderr, " (core dumped)"); diff -aNrc2 bash-2.05b-patched/parse.y bash-3.0/parse.y *** bash-2.05b-patched/parse.y Tue May 21 11:57:30 2002 --- bash-3.0/parse.y Tue May 4 15:09:06 2004 *************** *** 1,5 **** /* Yacc grammar for bash. */ ! /* Copyright (C) 1989-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,5 ---- /* Yacc grammar for bash. */ ! /* Copyright (C) 1989-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 41,44 **** --- 41,46 ---- #include "memalloc.h" + #include "bashintl.h" + #define NEED_STRFTIME_DECL /* used in externs.h */ *************** *** 70,73 **** --- 72,77 ---- #if defined (ALIAS) # include "alias.h" + #else + typedef void *alias_t; #endif /* ALIAS */ *************** *** 172,176 **** #if defined (DPAREN_ARITHMETIC) || defined (ARITH_FOR_COMMAND) static int parse_dparen __P((int)); ! static int parse_arith_cmd __P((char **)); #endif #if defined (COND_COMMAND) --- 176,180 ---- #if defined (DPAREN_ARITHMETIC) || defined (ARITH_FOR_COMMAND) static int parse_dparen __P((int)); ! static int parse_arith_cmd __P((char **, int)); #endif #if defined (COND_COMMAND) *************** *** 240,243 **** --- 244,252 ---- int promptvars = 1; + /* If non-zero, $'...' and $"..." are expanded when they appear within + a ${...} expansion, even when the expansion appears within double + quotes. */ + int extended_quote = 1; + /* The decoded prompt string. Used if READLINE is not defined or if editing is turned off. Analogous to current_readline_prompt. */ *************** *** 271,274 **** --- 280,297 ---- static int arith_for_lineno; + /* The line number in a script where the word in a `case WORD', `select WORD' + or `for WORD' begins. This is a nested command maximum, since the array + index is decremented after a case, select, or for command is parsed. */ + #define MAX_CASE_NEST 128 + static int word_lineno[MAX_CASE_NEST]; + static int word_top = -1; + + /* If non-zero, it is the token that we want read_token to return + regardless of what text is (or isn't) present to be read. This + is reset by read_token. If token_to_read == WORD or + ASSIGNMENT_WORD, yylval.word should be set to word_desc_to_read. */ + static int token_to_read; + static WORD_DESC *word_desc_to_read; + static REDIRECTEE redir; %} *************** *** 316,319 **** --- 339,343 ---- %type pattern_list case_clause_sequence case_clause %type timespec + %type list_terminator %start inputunit *************** *** 602,664 **** for_command: FOR WORD newline_list DO compound_list DONE ! { $$ = make_for_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $5); } | FOR WORD newline_list '{' compound_list '}' ! { $$ = make_for_command ($2, add_string_to_list ("$@", (WORD_LIST *)NULL), $5); } | FOR WORD ';' newline_list DO compound_list DONE ! { $$ = make_for_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $6); } | FOR WORD ';' newline_list '{' compound_list '}' ! { $$ = make_for_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $6); } | FOR WORD newline_list IN word_list list_terminator newline_list DO compound_list DONE ! { $$ = make_for_command ($2, REVERSE_LIST ($5, WORD_LIST *), $9); } | FOR WORD newline_list IN word_list list_terminator newline_list '{' compound_list '}' ! { $$ = make_for_command ($2, REVERSE_LIST ($5, WORD_LIST *), $9); } | FOR WORD newline_list IN list_terminator newline_list DO compound_list DONE ! { $$ = make_for_command ($2, (WORD_LIST *)NULL, $8); } | FOR WORD newline_list IN list_terminator newline_list '{' compound_list '}' ! { $$ = make_for_command ($2, (WORD_LIST *)NULL, $8); } ; arith_for_command: FOR ARITH_FOR_EXPRS list_terminator newline_list DO compound_list DONE ! { $$ = make_arith_for_command ($2, $6, arith_for_lineno); } | FOR ARITH_FOR_EXPRS list_terminator newline_list '{' compound_list '}' ! { $$ = make_arith_for_command ($2, $6, arith_for_lineno); } | FOR ARITH_FOR_EXPRS DO compound_list DONE ! { $$ = make_arith_for_command ($2, $4, arith_for_lineno); } | FOR ARITH_FOR_EXPRS '{' compound_list '}' ! { $$ = make_arith_for_command ($2, $4, arith_for_lineno); } ; select_command: SELECT WORD newline_list DO list DONE { ! $$ = make_select_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $5); } | SELECT WORD newline_list '{' list '}' { ! $$ = make_select_command ($2, add_string_to_list ("$@", (WORD_LIST *)NULL), $5); } | SELECT WORD ';' newline_list DO list DONE { ! $$ = make_select_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $6); } | SELECT WORD ';' newline_list '{' list '}' { ! $$ = make_select_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $6); } | SELECT WORD newline_list IN word_list list_terminator newline_list DO list DONE { ! $$ = make_select_command ($2, REVERSE_LIST ($5, WORD_LIST *), $9); } | SELECT WORD newline_list IN word_list list_terminator newline_list '{' list '}' { ! $$ = make_select_command ($2, REVERSE_LIST ($5, WORD_LIST *), $9); } ; case_command: CASE WORD newline_list IN newline_list ESAC ! { $$ = make_case_command ($2, (PATTERN_LIST *)NULL); } | CASE WORD newline_list IN case_clause_sequence newline_list ESAC ! { $$ = make_case_command ($2, $5); } | CASE WORD newline_list IN case_clause ESAC ! { $$ = make_case_command ($2, $5); } ; --- 626,739 ---- for_command: FOR WORD newline_list DO compound_list DONE ! { ! $$ = make_for_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $5, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! } | FOR WORD newline_list '{' compound_list '}' ! { ! $$ = make_for_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $5, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! } | FOR WORD ';' newline_list DO compound_list DONE ! { ! $$ = make_for_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $6, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! } | FOR WORD ';' newline_list '{' compound_list '}' ! { ! $$ = make_for_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $6, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! } | FOR WORD newline_list IN word_list list_terminator newline_list DO compound_list DONE ! { ! $$ = make_for_command ($2, REVERSE_LIST ($5, WORD_LIST *), $9, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! } | FOR WORD newline_list IN word_list list_terminator newline_list '{' compound_list '}' ! { ! $$ = make_for_command ($2, REVERSE_LIST ($5, WORD_LIST *), $9, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! } | FOR WORD newline_list IN list_terminator newline_list DO compound_list DONE ! { ! $$ = make_for_command ($2, (WORD_LIST *)NULL, $8, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! } | FOR WORD newline_list IN list_terminator newline_list '{' compound_list '}' ! { ! $$ = make_for_command ($2, (WORD_LIST *)NULL, $8, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! } ; arith_for_command: FOR ARITH_FOR_EXPRS list_terminator newline_list DO compound_list DONE ! { ! $$ = make_arith_for_command ($2, $6, arith_for_lineno); ! if (word_top > 0) word_top--; ! } | FOR ARITH_FOR_EXPRS list_terminator newline_list '{' compound_list '}' ! { ! $$ = make_arith_for_command ($2, $6, arith_for_lineno); ! if (word_top > 0) word_top--; ! } | FOR ARITH_FOR_EXPRS DO compound_list DONE ! { ! $$ = make_arith_for_command ($2, $4, arith_for_lineno); ! if (word_top > 0) word_top--; ! } | FOR ARITH_FOR_EXPRS '{' compound_list '}' ! { ! $$ = make_arith_for_command ($2, $4, arith_for_lineno); ! if (word_top > 0) word_top--; ! } ; select_command: SELECT WORD newline_list DO list DONE { ! $$ = make_select_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $5, word_lineno[word_top]); ! if (word_top > 0) word_top--; } | SELECT WORD newline_list '{' list '}' { ! $$ = make_select_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $5, word_lineno[word_top]); ! if (word_top > 0) word_top--; } | SELECT WORD ';' newline_list DO list DONE { ! $$ = make_select_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $6, word_lineno[word_top]); ! if (word_top > 0) word_top--; } | SELECT WORD ';' newline_list '{' list '}' { ! $$ = make_select_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $6, word_lineno[word_top]); ! if (word_top > 0) word_top--; } | SELECT WORD newline_list IN word_list list_terminator newline_list DO list DONE { ! $$ = make_select_command ($2, REVERSE_LIST ($5, WORD_LIST *), $9, word_lineno[word_top]); ! if (word_top > 0) word_top--; } | SELECT WORD newline_list IN word_list list_terminator newline_list '{' list '}' { ! $$ = make_select_command ($2, REVERSE_LIST ($5, WORD_LIST *), $9, word_lineno[word_top]); ! if (word_top > 0) word_top--; } ; case_command: CASE WORD newline_list IN newline_list ESAC ! { ! $$ = make_case_command ($2, (PATTERN_LIST *)NULL, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! } | CASE WORD newline_list IN case_clause_sequence newline_list ESAC ! { ! $$ = make_case_command ($2, $5, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! } | CASE WORD newline_list IN case_clause ESAC ! { ! $$ = make_case_command ($2, $5, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! } ; *************** *** 825,830 **** --- 900,908 ---- list_terminator:'\n' + { $$ = '\n'; } | ';' + { $$ = ';'; } | yacc_EOF + { $$ = yacc_EOF; } ; *************** *** 902,905 **** --- 980,1001 ---- $$ = $3; } + | timespec list_terminator + { + ELEMENT x; + + /* Boy, this is unclean. `time' by itself can + time a null command. We cheat and push a + newline back if the list_terminator was a newline + to avoid the double-newline problem (one to + terminate this, one to terminate the command) */ + x.word = 0; + x.redirect = 0; + $$ = make_simple_command (x, (COMMAND *)NULL); + $$->flags |= $1; + /* XXX - let's cheat and push a newline back */ + if ($2 == '\n') + token_to_read = '\n'; + } + ; *************** *** 919,933 **** /* Possible states for the parser that require it to do special things. */ ! #define PST_CASEPAT 0x001 /* in a case pattern list */ ! #define PST_ALEXPNEXT 0x002 /* expand next word for aliases */ ! #define PST_ALLOWOPNBRC 0x004 /* allow open brace for function def */ ! #define PST_NEEDCLOSBRC 0x008 /* need close brace */ ! #define PST_DBLPAREN 0x010 /* double-paren parsing */ ! #define PST_SUBSHELL 0x020 /* ( ... ) subshell */ ! #define PST_CMDSUBST 0x040 /* $( ... ) command substitution */ ! #define PST_CASESTMT 0x080 /* parsing a case statement */ ! #define PST_CONDCMD 0x100 /* parsing a [[...]] command */ ! #define PST_CONDEXPR 0x200 /* parsing the guts of [[...]] */ ! #define PST_ARITHFOR 0x400 /* parsing an arithmetic for command */ /* Initial size to allocate for tokens, and the --- 1015,1032 ---- /* Possible states for the parser that require it to do special things. */ ! #define PST_CASEPAT 0x0001 /* in a case pattern list */ ! #define PST_ALEXPNEXT 0x0002 /* expand next word for aliases */ ! #define PST_ALLOWOPNBRC 0x0004 /* allow open brace for function def */ ! #define PST_NEEDCLOSBRC 0x0008 /* need close brace */ ! #define PST_DBLPAREN 0x0010 /* double-paren parsing */ ! #define PST_SUBSHELL 0x0020 /* ( ... ) subshell */ ! #define PST_CMDSUBST 0x0040 /* $( ... ) command substitution */ ! #define PST_CASESTMT 0x0080 /* parsing a case statement */ ! #define PST_CONDCMD 0x0100 /* parsing a [[...]] command */ ! #define PST_CONDEXPR 0x0200 /* parsing the guts of [[...]] */ ! #define PST_ARITHFOR 0x0400 /* parsing an arithmetic for command */ ! #define PST_ALEXPAND 0x0800 /* OK to expand aliases - unused */ ! #define PST_CMDTOKEN 0x1000 /* command token OK - unused */ ! #define PST_COMPASSIGN 0x2000 /* parsing x=(...) compound assignment */ /* Initial size to allocate for tokens, and the *************** *** 936,939 **** --- 1035,1048 ---- #define TOKEN_DEFAULT_GROW_SIZE 512 + /* Should we call prompt_again? */ + #define SHOULD_PROMPT() \ + (interactive && (bash_input.type == st_stdin || bash_input.type == st_stream)) + + #if defined (ALIAS) + # define expanding_alias() (pushed_string_list && pushed_string_list->expander) + #else + # define expanding_alias() 0 + #endif + /* The token currently being read. */ static int current_token; *************** *** 949,959 **** static int two_tokens_ago; - /* If non-zero, it is the token that we want read_token to return - regardless of what text is (or isn't) present to be read. This - is reset by read_token. If token_to_read == WORD or - ASSIGNMENT_WORD, yylval.word should be set to word_desc_to_read. */ - static int token_to_read; - static WORD_DESC *word_desc_to_read; - /* The current parser state. */ static int parser_state; --- 1058,1061 ---- *************** *** 1400,1407 **** #if defined (ALIAS) || defined (DPAREN_ARITHMETIC) - #if !defined (ALIAS) - typedef void *alias_t; - #endif - #define END_OF_ALIAS 0 --- 1502,1505 ---- *************** *** 1463,1467 **** shell_input_line_index = 0; shell_input_line_terminator = '\0'; ! parser_state &= ~PST_ALEXPNEXT; set_line_mbstate (); --- 1561,1567 ---- shell_input_line_index = 0; shell_input_line_terminator = '\0'; ! #if 0 ! parser_state &= ~PST_ALEXPNEXT; /* XXX */ ! #endif set_line_mbstate (); *************** *** 1524,1527 **** --- 1624,1635 ---- #endif /* ALIAS || DPAREN_ARITHMETIC */ + void + free_pushed_string_input () + { + #if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + free_string_list (); + #endif + } + /* Return a line of text, taken from wherever yylex () reads input. If there is no more input, then we return NULL. If REMOVE_QUOTED_NEWLINE *************** *** 1537,1543 **** #if defined (READLINE) ! if (interactive && bash_input.type != st_string && no_line_editing) #else ! if (interactive && bash_input.type != st_string) #endif print_prompt (); --- 1645,1651 ---- #if defined (READLINE) ! if (no_line_editing && SHOULD_PROMPT ()) #else ! if (SHOULD_PROMPT ()) #endif print_prompt (); *************** *** 1588,1592 **** peekc = yy_getc (); if (peekc == '\n') ! continue; /* Make the unquoted \ pair disappear. */ else { --- 1696,1703 ---- peekc = yy_getc (); if (peekc == '\n') ! { ! line_number++; ! continue; /* Make the unquoted \ pair disappear. */ ! } else { *************** *** 1617,1621 **** { prompt_string_pointer = &ps2_prompt; ! prompt_again (); return (read_a_line (remove_quoted_newline)); } --- 1728,1733 ---- { prompt_string_pointer = &ps2_prompt; ! if (SHOULD_PROMPT()) ! prompt_again (); return (read_a_line (remove_quoted_newline)); } *************** *** 1779,1782 **** --- 1891,1900 ---- shell_input_line_terminator = 0; + /* If the shell is interatctive, but not currently printing a prompt + (interactive_shell && interactive == 0), we don't want to print + notifies or cleanup the jobs -- we want to defer it until we do + print the next prompt. */ + if (interactive_shell == 0 || SHOULD_PROMPT()) + { #if defined (JOB_CONTROL) /* This can cause a problem when reading a command as the result *************** *** 1784,1796 **** had better not cause jobs to disappear from the job table in that case, or we will have big trouble. */ ! notify_and_cleanup (); #else /* !JOB_CONTROL */ ! cleanup_dead_jobs (); #endif /* !JOB_CONTROL */ #if defined (READLINE) ! if (interactive && bash_input.type != st_string && no_line_editing) #else ! if (interactive && bash_input.type != st_string) #endif print_prompt (); --- 1902,1915 ---- had better not cause jobs to disappear from the job table in that case, or we will have big trouble. */ ! notify_and_cleanup (); #else /* !JOB_CONTROL */ ! cleanup_dead_jobs (); #endif /* !JOB_CONTROL */ + } #if defined (READLINE) ! if (no_line_editing && SHOULD_PROMPT()) #else ! if (SHOULD_PROMPT()) #endif print_prompt (); *************** *** 1912,1916 **** shell_input_line_size = 0; prompt_string_pointer = ¤t_prompt_string; ! prompt_again (); goto restart_read; } --- 2031,2036 ---- shell_input_line_size = 0; prompt_string_pointer = ¤t_prompt_string; ! if (SHOULD_PROMPT ()) ! prompt_again (); goto restart_read; } *************** *** 1938,1942 **** if MBTEST(uc == '\\' && remove_quoted_newline && shell_input_line[shell_input_line_index] == '\n') { ! prompt_again (); line_number++; goto restart_read; --- 2058,2063 ---- if MBTEST(uc == '\\' && remove_quoted_newline && shell_input_line[shell_input_line_index] == '\n') { ! if (SHOULD_PROMPT ()) ! prompt_again (); line_number++; goto restart_read; *************** *** 1951,1967 **** if (!uc && (pushed_string_list != (STRING_SAVER *)NULL)) { ! if (mustpop) ! { ! pop_string (); ! uc = shell_input_line[shell_input_line_index]; ! if (uc) ! shell_input_line_index++; ! mustpop--; ! } ! else ! { ! mustpop++; ! uc = ' '; ! } } #endif /* ALIAS || DPAREN_ARITHMETIC */ --- 2072,2079 ---- if (!uc && (pushed_string_list != (STRING_SAVER *)NULL)) { ! pop_string (); ! uc = shell_input_line[shell_input_line_index]; ! if (uc) ! shell_input_line_index++; } #endif /* ALIAS || DPAREN_ARITHMETIC */ *************** *** 2017,2028 **** char *command; { - sh_builtin_func_t *temp_last, *temp_this; char *last_lastarg; ! int temp_exit_value, temp_eof_encountered; ! temp_last = last_shell_builtin; ! temp_this = this_shell_builtin; ! temp_exit_value = last_command_exit_value; ! temp_eof_encountered = eof_encountered; last_lastarg = get_string_value ("_"); if (last_lastarg) --- 2129,2136 ---- char *command; { char *last_lastarg; ! sh_parser_state_t ps; ! save_parser_state (&ps); last_lastarg = get_string_value ("_"); if (last_lastarg) *************** *** 2031,2039 **** parse_and_execute (savestring (command), "PROMPT_COMMAND", SEVAL_NONINT|SEVAL_NOHIST); ! last_shell_builtin = temp_last; ! this_shell_builtin = temp_this; ! last_command_exit_value = temp_exit_value; ! eof_encountered = temp_eof_encountered; ! bind_variable ("_", last_lastarg); FREE (last_lastarg); --- 2139,2143 ---- parse_and_execute (savestring (command), "PROMPT_COMMAND", SEVAL_NONINT|SEVAL_NOHIST); ! restore_parser_state (&ps); bind_variable ("_", last_lastarg); FREE (last_lastarg); *************** *** 2075,2079 **** /* Avoid printing a prompt if we're not going to read anything, e.g. after resetting the parser with read_token (RESET). */ ! if (token_to_read == 0 && interactive) prompt_again (); } --- 2179,2183 ---- /* Avoid printing a prompt if we're not going to read anything, e.g. after resetting the parser with read_token (RESET). */ ! if (token_to_read == 0 && SHOULD_PROMPT ()) prompt_again (); } *************** *** 2109,2114 **** ((token) != SEMI_SEMI && reserved_word_acceptable(token))) ! #define assignment_acceptable(token) command_token_position(token) && \ ! ((parser_state & PST_CASEPAT) == 0) /* Check to see if TOKEN is a reserved word and return the token --- 2213,2218 ---- ((token) != SEMI_SEMI && reserved_word_acceptable(token))) ! #define assignment_acceptable(token) \ ! (command_token_position(token) && ((parser_state & PST_CASEPAT) == 0)) /* Check to see if TOKEN is a reserved word and return the token *************** *** 2125,2129 **** if ((parser_state & PST_CASEPAT) && (word_token_alist[i].token != ESAC)) \ break; \ ! if (word_token_alist[i].token == TIME) \ break; \ if (word_token_alist[i].token == ESAC) \ --- 2229,2233 ---- if ((parser_state & PST_CASEPAT) && (word_token_alist[i].token != ESAC)) \ break; \ ! if (word_token_alist[i].token == TIME && time_command_acceptable () == 0) \ break; \ if (word_token_alist[i].token == ESAC) \ *************** *** 2158,2161 **** --- 2262,2282 ---- Special cases that disqualify: In a pattern list in a case statement (parser_state & PST_CASEPAT). */ + + static char * + mk_alexpansion (s) + char *s; + { + int l; + char *r; + + l = strlen (s); + r = xmalloc (l + 2); + strcpy (r, s); + if (r[l -1] != ' ') + r[l++] = ' '; + r[l] = '\0'; + return r; + } + static int alias_expand_token (tokstr) *************** *** 2174,2178 **** return (NO_EXPANSION); ! expanded = ap ? savestring (ap->value) : (char *)NULL; if (expanded) { --- 2295,2304 ---- return (NO_EXPANSION); ! /* mk_alexpansion puts an extra space on the end of the alias expansion, ! so the lookahead by the parser works right. If this gets changed, ! make sure the code in shell_getc that deals with reaching the end of ! an expanded alias is changed with it. */ ! expanded = ap ? mk_alexpansion (ap->value) : (char *)NULL; ! if (expanded) { *************** *** 2318,2325 **** --- 2444,2453 ---- #endif + #if 0 #if defined (COMMAND_TIMING) if (STREQ (token, "time") && ((parser_state & PST_CASEPAT) == 0) && time_command_acceptable ()) return (TIME); #endif /* COMMAND_TIMING */ + #endif #if defined (COND_COMMAND) /* [[ */ *************** *** 2566,2569 **** --- 2694,2698 ---- #define P_FIRSTCLOSE 0x01 #define P_ALLOWESC 0x02 + #define P_DQUOTE 0x04 static char matched_pair_error; *************** *** 2577,2585 **** int pass_next_character, nestlen, ttranslen, start_lineno; char *ret, *nestret, *ttrans; ! int retind, retsize; count = 1; pass_next_character = was_dollar = 0; ret = (char *)xmalloc (retsize = 64); retind = 0; --- 2706,2717 ---- int pass_next_character, nestlen, ttranslen, start_lineno; char *ret, *nestret, *ttrans; ! int retind, retsize, rflags; count = 1; pass_next_character = was_dollar = 0; + /* RFLAGS is the set of flags we want to pass to recursive calls. */ + rflags = (qc == '"') ? P_DQUOTE : (flags & P_DQUOTE); + ret = (char *)xmalloc (retsize = 64); retind = 0; *************** *** 2592,2596 **** { free (ret); ! parser_error (start_lineno, "unexpected EOF while looking for matching `%c'", close); EOF_Reached = 1; /* XXX */ return (&matched_pair_error); --- 2724,2728 ---- { free (ret); ! parser_error (start_lineno, _("unexpected EOF while looking for matching `%c'"), close); EOF_Reached = 1; /* XXX */ return (&matched_pair_error); *************** *** 2598,2603 **** /* Possible reprompting. */ ! if (ch == '\n' && interactive && ! (bash_input.type == st_stdin || bash_input.type == st_stream)) prompt_again (); --- 2730,2734 ---- /* Possible reprompting. */ ! if (ch == '\n' && SHOULD_PROMPT ()) prompt_again (); *************** *** 2655,2661 **** push_delimiter (dstack, ch); if MBTEST(was_dollar && ch == '\'') /* $'...' inside group */ ! nestret = parse_matched_pair (ch, ch, ch, &nestlen, P_ALLOWESC); else ! nestret = parse_matched_pair (ch, ch, ch, &nestlen, 0); pop_delimiter (dstack); if (nestret == &matched_pair_error) --- 2786,2792 ---- push_delimiter (dstack, ch); if MBTEST(was_dollar && ch == '\'') /* $'...' inside group */ ! nestret = parse_matched_pair (ch, ch, ch, &nestlen, P_ALLOWESC|rflags); else ! nestret = parse_matched_pair (ch, ch, ch, &nestlen, rflags); pop_delimiter (dstack); if (nestret == &matched_pair_error) *************** *** 2664,2668 **** return &matched_pair_error; } ! if MBTEST(was_dollar && ch == '\'') { /* Translate $'...' here. */ --- 2795,2799 ---- return &matched_pair_error; } ! if MBTEST(was_dollar && ch == '\'' && (extended_quote || (rflags & P_DQUOTE) == 0)) { /* Translate $'...' here. */ *************** *** 2674,2678 **** retind -= 2; /* back up before the $' */ } ! else if MBTEST(was_dollar && ch == '"') { /* Locale expand $"..." here. */ --- 2805,2809 ---- retind -= 2; /* back up before the $' */ } ! else if MBTEST(was_dollar && ch == '"' && (extended_quote || (rflags & P_DQUOTE) == 0)) { /* Locale expand $"..." here. */ *************** *** 2703,2707 **** else if MBTEST(open == '"' && ch == '`') { ! nestret = parse_matched_pair (0, '`', '`', &nestlen, 0); if (nestret == &matched_pair_error) { --- 2834,2838 ---- else if MBTEST(open == '"' && ch == '`') { ! nestret = parse_matched_pair (0, '`', '`', &nestlen, rflags); if (nestret == &matched_pair_error) { *************** *** 2723,2731 **** count--; if (ch == '(') /* ) */ ! nestret = parse_matched_pair (0, '(', ')', &nestlen, 0); else if (ch == '{') /* } */ ! nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE); else if (ch == '[') /* ] */ ! nestret = parse_matched_pair (0, '[', ']', &nestlen, 0); if (nestret == &matched_pair_error) { --- 2854,2862 ---- count--; if (ch == '(') /* ) */ ! nestret = parse_matched_pair (0, '(', ')', &nestlen, rflags); else if (ch == '{') /* } */ ! nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|rflags); else if (ch == '[') /* ] */ ! nestret = parse_matched_pair (0, '[', ']', &nestlen, rflags); if (nestret == &matched_pair_error) { *************** *** 2767,2783 **** { arith_for_lineno = line_number; ! cmdtyp = parse_arith_cmd (&wval); if (cmdtyp == 1) { ! /* parse_arith_cmd adds quotes at the beginning and end ! of the string it returns; we need to take those out. */ ! len = strlen (wval); ! wv2 = (char *)xmalloc (len); ! strncpy (wv2, wval + 1, len - 2); ! wv2[len - 2] = '\0'; ! wd = make_word (wv2); yylval.word_list = make_word_list (wd, (WORD_LIST *)NULL); free (wval); - free (wv2); return (ARITH_FOR_EXPRS); } --- 2898,2907 ---- { arith_for_lineno = line_number; ! cmdtyp = parse_arith_cmd (&wval, 0); if (cmdtyp == 1) { ! wd = make_word (wval); yylval.word_list = make_word_list (wd, (WORD_LIST *)NULL); free (wval); return (ARITH_FOR_EXPRS); } *************** *** 2791,2799 **** { sline = line_number; ! cmdtyp = parse_arith_cmd (&wval); if (cmdtyp == 1) /* arithmetic command */ { wd = make_word (wval); wd->flags = W_QUOTED; yylval.word_list = make_word_list (wd, (WORD_LIST *)NULL); free (wval); /* make_word copies it */ --- 2915,2931 ---- { sline = line_number; ! #if 0 ! cmdtyp = parse_arith_cmd (&wval, 1); ! #else ! cmdtyp = parse_arith_cmd (&wval, 0); ! #endif if (cmdtyp == 1) /* arithmetic command */ { wd = make_word (wval); + #if 0 wd->flags = W_QUOTED; + #else + wd->flags = W_QUOTED|W_NOSPLIT|W_NOGLOB; + #endif yylval.word_list = make_word_list (wd, (WORD_LIST *)NULL); free (wval); /* make_word copies it */ *************** *** 2821,2826 **** error, for example EOF. */ static int ! parse_arith_cmd (ep) char **ep; { int exp_lineno, rval, c; --- 2953,2959 ---- error, for example EOF. */ static int ! parse_arith_cmd (ep, adddq) char **ep; + int adddq; { int exp_lineno, rval, c; *************** *** 2841,2858 **** tokstr = (char *)xmalloc (ttoklen + 4); ! /* (( ... )) -> "..." */ ! tokstr[0] = (rval == 1) ? '"' : '('; ! strncpy (tokstr + 1, ttok, ttoklen - 1); /* don't copy the final `)' */ ! if (rval == 1) { tokstr[ttoklen] = '"'; tokstr[ttoklen+1] = '\0'; } ! else { tokstr[ttoklen] = ')'; tokstr[ttoklen+1] = c; tokstr[ttoklen+2] = '\0'; } *ep = tokstr; FREE (ttok); --- 2974,2999 ---- tokstr = (char *)xmalloc (ttoklen + 4); ! /* if ADDDQ != 0 then (( ... )) -> "..." */ ! if (rval == 1 && adddq) /* arith cmd, add double quotes */ { + tokstr[0] = '"'; + strncpy (tokstr + 1, ttok, ttoklen - 1); tokstr[ttoklen] = '"'; tokstr[ttoklen+1] = '\0'; } ! else if (rval == 1) /* arith cmd, don't add double quotes */ ! { ! strncpy (tokstr, ttok, ttoklen - 1); ! tokstr[ttoklen-1] = '\0'; ! } ! else /* nested subshell */ { + tokstr[0] = '('; + strncpy (tokstr + 1, ttok, ttoklen - 1); tokstr[ttoklen] = ')'; tokstr[ttoklen+1] = c; tokstr[ttoklen+2] = '\0'; } + *ep = tokstr; FREE (ttok); *************** *** 2868,2881 **** if (EOF_Reached && cond_token != COND_ERROR) /* [[ */ ! parser_error (cond_lineno, "unexpected EOF while looking for `]]'"); else if (cond_token != COND_ERROR) { if (etext = error_token_from_token (cond_token)) { ! parser_error (cond_lineno, "syntax error in conditional expression: unexpected token `%s'", etext); free (etext); } else ! parser_error (cond_lineno, "syntax error in conditional expression"); } } --- 3009,3022 ---- if (EOF_Reached && cond_token != COND_ERROR) /* [[ */ ! parser_error (cond_lineno, _("unexpected EOF while looking for `]]'")); else if (cond_token != COND_ERROR) { if (etext = error_token_from_token (cond_token)) { ! parser_error (cond_lineno, _("syntax error in conditional expression: unexpected token `%s'"), etext); free (etext); } else ! parser_error (cond_lineno, _("syntax error in conditional expression")); } } *************** *** 2920,2924 **** while ((cond_token = read_token (READ)) == '\n') { ! if (interactive && (bash_input.type == st_stdin || bash_input.type == st_stream)) prompt_again (); } --- 3061,3065 ---- while ((cond_token = read_token (READ)) == '\n') { ! if (SHOULD_PROMPT ()) prompt_again (); } *************** *** 2955,2963 **** if (etext = error_token_from_token (cond_token)) { ! parser_error (lineno, "unexpected token `%s', expected `)'", etext); free (etext); } else ! parser_error (lineno, "expected `)'"); COND_RETURN_ERROR (); } --- 3096,3104 ---- if (etext = error_token_from_token (cond_token)) { ! parser_error (lineno, _("unexpected token `%s', expected `)'"), etext); free (etext); } else ! parser_error (lineno, _("expected `)'")); COND_RETURN_ERROR (); } *************** *** 2987,2995 **** if (etext = error_token_from_token (tok)) { ! parser_error (line_number, "unexpected argument `%s' to conditional unary operator", etext); free (etext); } else ! parser_error (line_number, "unexpected argument to conditional unary operator"); COND_RETURN_ERROR (); } --- 3128,3136 ---- if (etext = error_token_from_token (tok)) { ! parser_error (line_number, _("unexpected argument `%s' to conditional unary operator"), etext); free (etext); } else ! parser_error (line_number, _("unexpected argument to conditional unary operator")); COND_RETURN_ERROR (); } *************** *** 3006,3009 **** --- 3147,3154 ---- if (tok == WORD && test_binop (yylval.word->word)) op = yylval.word; + #if defined (COND_REGEXP) + else if (tok == WORD && STREQ (yylval.word->word,"=~")) + op = yylval.word; + #endif else if (tok == '<' || tok == '>') op = make_word_from_token (tok); /* ( */ *************** *** 3024,3032 **** if (etext = error_token_from_token (tok)) { ! parser_error (line_number, "unexpected token `%s', conditional binary operator expected", etext); free (etext); } else ! parser_error (line_number, "conditional binary operator expected"); dispose_cond_node (tleft); COND_RETURN_ERROR (); --- 3169,3177 ---- if (etext = error_token_from_token (tok)) { ! parser_error (line_number, _("unexpected token `%s', conditional binary operator expected"), etext); free (etext); } else ! parser_error (line_number, _("conditional binary operator expected")); dispose_cond_node (tleft); COND_RETURN_ERROR (); *************** *** 3044,3052 **** if (etext = error_token_from_token (tok)) { ! parser_error (line_number, "unexpected argument `%s' to conditional binary operator", etext); free (etext); } else ! parser_error (line_number, "unexpected argument to conditional binary operator"); dispose_cond_node (tleft); dispose_word (op); --- 3189,3197 ---- if (etext = error_token_from_token (tok)) { ! parser_error (line_number, _("unexpected argument `%s' to conditional binary operator"), etext); free (etext); } else ! parser_error (line_number, _("unexpected argument to conditional binary operator")); dispose_cond_node (tleft); dispose_word (op); *************** *** 3059,3070 **** { if (tok < 256) ! parser_error (line_number, "unexpected token `%c' in conditional command", tok); else if (etext = error_token_from_token (tok)) { ! parser_error (line_number, "unexpected token `%s' in conditional command", etext); free (etext); } else ! parser_error (line_number, "unexpected token %d in conditional command", tok); COND_RETURN_ERROR (); } --- 3204,3215 ---- { if (tok < 256) ! parser_error (line_number, _("unexpected token `%c' in conditional command"), tok); else if (etext = error_token_from_token (tok)) { ! parser_error (line_number, _("unexpected token `%s' in conditional command"), etext); free (etext); } else ! parser_error (line_number, _("unexpected token %d in conditional command"), tok); COND_RETURN_ERROR (); } *************** *** 3097,3101 **** c = t[i]; c1 = t[i+1]; t[i] = '='; t[i+1] = '\0'; ! r = assignment (t); t[i] = c; t[i+1] = c1; return r; --- 3242,3246 ---- c = t[i]; c1 = t[i+1]; t[i] = '='; t[i+1] = '\0'; ! r = assignment (t, (parser_state & PST_COMPASSIGN) != 0); t[i] = c; t[i+1] = c1; return r; *************** *** 3421,3426 **** next_character: ! if (character == '\n' && interactive && ! (bash_input.type == st_stdin || bash_input.type == st_stream)) prompt_again (); --- 3566,3570 ---- next_character: ! if (character == '\n' && SHOULD_PROMPT ()) prompt_again (); *************** *** 3491,3499 **** simple command, or after another assignment word. This is context-dependent, so it cannot be handled in the grammar. */ ! if (assignment (token)) { the_word->flags |= W_ASSIGNMENT; /* Don't perform word splitting on assignment statements. */ ! if (assignment_acceptable (last_read_token)) the_word->flags |= W_NOSPLIT; } --- 3635,3643 ---- simple command, or after another assignment word. This is context-dependent, so it cannot be handled in the grammar. */ ! if (assignment (token, (parser_state & PST_COMPASSIGN) != 0)) { the_word->flags |= W_ASSIGNMENT; /* Don't perform word splitting on assignment statements. */ ! if (assignment_acceptable (last_read_token) || (parser_state & PST_COMPASSIGN) != 0) the_word->flags |= W_NOSPLIT; } *************** *** 3504,3511 **** ? ASSIGNMENT_WORD : WORD; ! if (last_read_token == FUNCTION) { parser_state |= PST_ALLOWOPNBRC; function_dstart = line_number; } --- 3648,3664 ---- ? ASSIGNMENT_WORD : WORD; ! switch (last_read_token) { + case FUNCTION: parser_state |= PST_ALLOWOPNBRC; function_dstart = line_number; + break; + case CASE: + case SELECT: + case FOR: + if (word_top < MAX_CASE_NEST) + word_top++; + word_lineno[word_top] = line_number; + break; } *************** *** 3665,3669 **** char *temp_prompt; ! if (!interactive) /* XXX */ return; --- 3818,3822 ---- char *temp_prompt; ! if (interactive == 0 || expanding_alias()) /* XXX */ return; *************** *** 3858,3862 **** n = strftime (timebuf, sizeof (timebuf), "%H:%M", tm); ! timebuf[sizeof(timebuf) - 1] = '\0'; temp = savestring (timebuf); goto add_string; --- 4011,4019 ---- n = strftime (timebuf, sizeof (timebuf), "%H:%M", tm); ! if (n == 0) ! timebuf[0] = '\0'; ! else ! timebuf[sizeof(timebuf) - 1] = '\0'; ! temp = savestring (timebuf); goto add_string; *************** *** 3883,3887 **** free (timefmt); ! timebuf[sizeof(timebuf) - 1] = '\0'; if (promptvars || posixly_correct) /* Make sure that expand_prompt_string is called with a --- 4040,4048 ---- free (timefmt); ! if (n == 0) ! timebuf[0] = '\0'; ! else ! timebuf[sizeof(timebuf) - 1] = '\0'; ! if (promptvars || posixly_correct) /* Make sure that expand_prompt_string is called with a *************** *** 3918,3922 **** { /* Use the value of PWD because it is much more efficient. */ ! char t_string[PATH_MAX]; int tlen; --- 4079,4083 ---- { /* Use the value of PWD because it is much more efficient. */ ! char t_string[PATH_MAX], *t; int tlen; *************** *** 3942,3946 **** #define ROOT_PATH(x) ((x)[0] == '/' && (x)[1] == 0) #define DOUBLE_SLASH_ROOT(x) ((x)[0] == '/' && (x)[1] == '/' && (x)[2] == 0) ! if (c == 'W') { if (ROOT_PATH (t_string) == 0 && DOUBLE_SLASH_ROOT (t_string) == 0) --- 4103,4108 ---- #define ROOT_PATH(x) ((x)[0] == '/' && (x)[1] == 0) #define DOUBLE_SLASH_ROOT(x) ((x)[0] == '/' && (x)[1] == '/' && (x)[2] == 0) ! /* Abbreviate \W as ~ if $PWD == $HOME */ ! if (c == 'W' && (((t = get_string_value ("HOME")) == 0) || STREQ (t, temp) == 0)) { if (ROOT_PATH (t_string) == 0 && DOUBLE_SLASH_ROOT (t_string) == 0) *************** *** 4021,4024 **** --- 4183,4191 ---- case '[': case ']': + if (no_line_editing) + { + string++; + break; + } temp = (char *)xmalloc (3); temp[0] = '\001'; *************** *** 4240,4244 **** if (current_token != 0 && EOF_Reached == 0 && (msg = error_token_from_token (current_token))) { ! parser_error (line_number, "syntax error near unexpected token `%s'", msg); free (msg); --- 4407,4411 ---- if (current_token != 0 && EOF_Reached == 0 && (msg = error_token_from_token (current_token))) { ! parser_error (line_number, _("syntax error near unexpected token `%s'"), msg); free (msg); *************** *** 4258,4262 **** if (msg) { ! parser_error (line_number, "syntax error near `%s'", msg); free (msg); } --- 4425,4429 ---- if (msg) { ! parser_error (line_number, _("syntax error near `%s'"), msg); free (msg); } *************** *** 4268,4272 **** else { ! msg = EOF_Reached ? "syntax error: unexpected end of file" : "syntax error"; parser_error (line_number, "%s", msg); /* When the shell is interactive, this file uses EOF_Reached --- 4435,4439 ---- else { ! msg = EOF_Reached ? _("syntax error: unexpected end of file") : _("syntax error"); parser_error (line_number, "%s", msg); /* When the shell is interactive, this file uses EOF_Reached *************** *** 4330,4334 **** if (eof_encountered < eof_encountered_limit) { ! fprintf (stderr, "Use \"%s\" to leave the shell.\n", login_shell ? "logout" : "exit"); eof_encountered++; --- 4497,4501 ---- if (eof_encountered < eof_encountered_limit) { ! fprintf (stderr, _("Use \"%s\" to leave the shell.\n"), login_shell ? "logout" : "exit"); eof_encountered++; *************** *** 4367,4372 **** resultant word list. Used by compound array assignment. */ WORD_LIST * ! parse_string_to_word_list (s, whom) char *s; const char *whom; { --- 4534,4540 ---- resultant word list. Used by compound array assignment. */ WORD_LIST * ! parse_string_to_word_list (s, flags, whom) char *s; + int flags; const char *whom; { *************** *** 4400,4403 **** --- 4568,4575 ---- with_input_from_string (s, whom); wl = (WORD_LIST *)NULL; + + if (flags & 1) + parser_state |= PST_COMPASSIGN; + while ((tok = read_token (READ)) != yacc_EOF) { *************** *** 4437,4440 **** --- 4609,4615 ---- shell_input_line_terminator = orig_input_terminator; + if (flags & 1) + parser_state &= ~PST_COMPASSIGN; + if (wl == &parse_string_error) { *************** *** 4467,4479 **** wl = (WORD_LIST *)NULL; /* ( */ while ((tok = read_token (READ)) != ')') { if (tok == '\n') /* Allow newlines in compound assignments */ ! continue; if (tok != WORD && tok != ASSIGNMENT_WORD) { current_token = tok; /* for error reporting */ if (tok == yacc_EOF) /* ( */ ! parser_error (orig_line_number, "unexpected EOF while looking for matching `)'"); else yyerror ((char *)NULL); /* does the right thing */ --- 4642,4660 ---- wl = (WORD_LIST *)NULL; /* ( */ + parser_state |= PST_COMPASSIGN; + while ((tok = read_token (READ)) != ')') { if (tok == '\n') /* Allow newlines in compound assignments */ ! { ! if (SHOULD_PROMPT ()) ! prompt_again (); ! continue; ! } if (tok != WORD && tok != ASSIGNMENT_WORD) { current_token = tok; /* for error reporting */ if (tok == yacc_EOF) /* ( */ ! parser_error (orig_line_number, _("unexpected EOF while looking for matching `)'")); else yyerror ((char *)NULL); /* does the right thing */ *************** *** 4490,4493 **** --- 4671,4676 ---- token_buffer_size = orig_token_size; + parser_state &= ~PST_COMPASSIGN; + if (wl == &parse_string_error) { *************** *** 4517,4520 **** --- 4700,4802 ---- /************************************************ * * + * SAVING AND RESTORING PARTIAL PARSE STATE * + * * + ************************************************/ + + sh_parser_state_t * + save_parser_state (ps) + sh_parser_state_t *ps; + { + #if defined (ARRAY_VARS) + SHELL_VAR *v; + #endif + + if (ps == 0) + ps = xmalloc (sizeof (sh_parser_state_t)); + if (ps == 0) + return ((sh_parser_state_t *)NULL); + + ps->parser_state = parser_state; + ps->token_state = save_token_state (); + + ps->input_line_terminator = shell_input_line_terminator; + ps->eof_encountered = eof_encountered; + + ps->current_command_line_count = current_command_line_count; + + #if defined (HISTORY) + ps->remember_on_history = remember_on_history; + # if defined (BANG_HISTORY) + ps->history_expansion_inhibited = history_expansion_inhibited; + # endif + #endif + + ps->last_command_exit_value = last_command_exit_value; + #if defined (ARRAY_VARS) + v = find_variable ("PIPESTATUS"); + if (v && array_p (v) && array_cell (v)) + ps->pipestatus = array_copy (array_cell (v)); + else + ps->pipestatus = (ARRAY *)NULL; + #endif + + ps->last_shell_builtin = last_shell_builtin; + ps->this_shell_builtin = this_shell_builtin; + + ps->expand_aliases = expand_aliases; + ps->echo_input_at_read = echo_input_at_read; + + return (ps); + } + + void + restore_parser_state (ps) + sh_parser_state_t *ps; + { + #if defined (ARRAY_VARS) + SHELL_VAR *v; + #endif + + if (ps == 0) + return; + + parser_state = ps->parser_state; + if (ps->token_state) + { + restore_token_state (ps->token_state); + free (ps->token_state); + } + + shell_input_line_terminator = ps->input_line_terminator; + eof_encountered = ps->eof_encountered; + + current_command_line_count = ps->current_command_line_count; + + #if defined (HISTORY) + remember_on_history = ps->remember_on_history; + # if defined (BANG_HISTORY) + history_expansion_inhibited = ps->history_expansion_inhibited; + # endif + #endif + + last_command_exit_value = ps->last_command_exit_value; + #if defined (ARRAY_VARS) + v = find_variable ("PIPESTATUS"); + if (v && array_p (v) && array_cell (v)) + { + array_dispose (array_cell (v)); + var_setarray (v, ps->pipestatus); + } + #endif + + last_shell_builtin = ps->last_shell_builtin; + this_shell_builtin = ps->this_shell_builtin; + + expand_aliases = ps->expand_aliases; + echo_input_at_read = ps->echo_input_at_read; + } + + /************************************************ + * * * MULTIBYTE CHARACTER HANDLING * * * *************** *** 4525,4529 **** set_line_mbstate () { ! int i, previ, len; mbstate_t mbs, prevs; size_t mbclen; --- 4807,4811 ---- set_line_mbstate () { ! int i, previ, len, c; mbstate_t mbs, prevs; size_t mbclen; *************** *** 4540,4544 **** mbs = prevs; ! if (shell_input_line[i] == EOF) { int j; --- 4822,4827 ---- mbs = prevs; ! c = shell_input_line[i]; ! if (c == EOF) { int j; *************** *** 4564,4568 **** else { ! /* mbrlen doesn't return any other values */ } --- 4847,4855 ---- else { ! /* XXX - what to do if mbrlen returns 0? (null wide character) */ ! int j; ! for (j = i; j < len; j++) ! shell_input_line_property[j] = 1; ! break; } diff -aNrc2 bash-2.05b-patched/parser-built bash-3.0/parser-built *** bash-2.05b-patched/parser-built Tue May 21 11:57:35 2002 --- bash-3.0/parser-built Wed May 5 14:32:28 2004 *************** *** 1,6 **** - #ifndef BISON_Y_TAB_H - # define BISON_Y_TAB_H - - #ifndef YYSTYPE typedef union { WORD_DESC *word; /* the word that we read. */ --- 1,2 ---- *************** *** 11,60 **** ELEMENT element; PATTERN_LIST *pattern; ! } yystype; ! # define YYSTYPE yystype ! #endif ! # define IF 257 ! # define THEN 258 ! # define ELSE 259 ! # define ELIF 260 ! # define FI 261 ! # define CASE 262 ! # define ESAC 263 ! # define FOR 264 ! # define SELECT 265 ! # define WHILE 266 ! # define UNTIL 267 ! # define DO 268 ! # define DONE 269 ! # define FUNCTION 270 ! # define COND_START 271 ! # define COND_END 272 ! # define COND_ERROR 273 ! # define IN 274 ! # define BANG 275 ! # define TIME 276 ! # define TIMEOPT 277 ! # define WORD 278 ! # define ASSIGNMENT_WORD 279 ! # define NUMBER 280 ! # define ARITH_CMD 281 ! # define ARITH_FOR_EXPRS 282 ! # define COND_CMD 283 ! # define AND_AND 284 ! # define OR_OR 285 ! # define GREATER_GREATER 286 ! # define LESS_LESS 287 ! # define LESS_AND 288 ! # define LESS_LESS_LESS 289 ! # define GREATER_AND 290 ! # define SEMI_SEMI 291 ! # define LESS_LESS_MINUS 292 ! # define AND_GREATER 293 ! # define LESS_GREATER 294 ! # define GREATER_BAR 295 ! # define yacc_EOF 296 extern YYSTYPE yylval; - - #endif /* not BISON_Y_TAB_H */ --- 7,52 ---- ELEMENT element; PATTERN_LIST *pattern; ! } YYSTYPE; ! #define IF 257 ! #define THEN 258 ! #define ELSE 259 ! #define ELIF 260 ! #define FI 261 ! #define CASE 262 ! #define ESAC 263 ! #define FOR 264 ! #define SELECT 265 ! #define WHILE 266 ! #define UNTIL 267 ! #define DO 268 ! #define DONE 269 ! #define FUNCTION 270 ! #define COND_START 271 ! #define COND_END 272 ! #define COND_ERROR 273 ! #define IN 274 ! #define BANG 275 ! #define TIME 276 ! #define TIMEOPT 277 ! #define WORD 278 ! #define ASSIGNMENT_WORD 279 ! #define NUMBER 280 ! #define ARITH_CMD 281 ! #define ARITH_FOR_EXPRS 282 ! #define COND_CMD 283 ! #define AND_AND 284 ! #define OR_OR 285 ! #define GREATER_GREATER 286 ! #define LESS_LESS 287 ! #define LESS_AND 288 ! #define LESS_LESS_LESS 289 ! #define GREATER_AND 290 ! #define SEMI_SEMI 291 ! #define LESS_LESS_MINUS 292 ! #define AND_GREATER 293 ! #define LESS_GREATER 294 ! #define GREATER_BAR 295 ! #define yacc_EOF 296 extern YYSTYPE yylval; diff -aNrc2 bash-2.05b-patched/pathnames.h bash-3.0/pathnames.h *** bash-2.05b-patched/pathnames.h Thu Aug 5 07:21:53 1999 --- bash-3.0/pathnames.h Wed Dec 31 19:00:00 1969 *************** *** 1,30 **** - /* pathnames.h -- absolute filenames that bash wants for various defaults. */ - - /* Copyright (C) 1987,1991 Free Software Foundation, Inc. - - This file is part of GNU Bash, the Bourne Again SHell. - - Bash is free software; you can 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. - - Bash is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with Bash; see the file COPYING. If not, write to the Free - Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ - - #if !defined (_PATHNAMES_H_) - #define _PATHNAMES_H_ - - /* The default file for hostname completion. */ - #define DEFAULT_HOSTS_FILE "/etc/hosts" - - /* The default login shell startup file. */ - #define SYS_PROFILE "/etc/profile" - - #endif /* _PATHNAMES_H */ --- 0 ---- diff -aNrc2 bash-2.05b-patched/pathnames.h.in bash-3.0/pathnames.h.in *** bash-2.05b-patched/pathnames.h.in Wed Dec 31 19:00:00 1969 --- bash-3.0/pathnames.h.in Tue Feb 25 11:31:46 2003 *************** *** 0 **** --- 1,33 ---- + /* pathnames.h -- absolute filenames that bash wants for various defaults. */ + + /* Copyright (C) 1987,1991 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software; you can 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. + + Bash is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + You should have received a copy of the GNU General Public License + along with Bash; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + + #if !defined (_PATHNAMES_H_) + #define _PATHNAMES_H_ + + /* The default file for hostname completion. */ + #define DEFAULT_HOSTS_FILE "/etc/hosts" + + /* The default login shell startup file. */ + #define SYS_PROFILE "/etc/profile" + + /* The default location of the bash debugger initialization/startup file. */ + #define DEBUGGER_START_FILE "@DEBUGGER_START_FILE@" + + #endif /* _PATHNAMES_H */ diff -aNrc2 bash-2.05b-patched/pcomplete.c bash-3.0/pcomplete.c *** bash-2.05b-patched/pcomplete.c Wed Apr 10 10:10:03 2002 --- bash-3.0/pcomplete.c Thu Jan 8 10:36:17 2004 *************** *** 2,6 **** completion. */ ! /* Copyright (C) 1999-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- completion. */ ! /* Copyright (C) 1999-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 41,44 **** --- 41,45 ---- #include #include "bashansi.h" + #include "bashintl.h" #include "shell.h" *************** *** 372,375 **** --- 373,381 ---- vlist = (*svfunc) (); + if (vlist == 0) + { + itp->slist = (STRINGLIST *)NULL; + return; + } for (n = 0; vlist[n]; n++) ; *************** *** 629,633 **** as the list of possibilities. If the itemlist has been marked dirty or it should be regenerated every time, destroy the old STRINGLIST and make a ! new one before trying the match. */ static STRINGLIST * gen_matches_from_itemlist (itp, text) --- 635,640 ---- as the list of possibilities. If the itemlist has been marked dirty or it should be regenerated every time, destroy the old STRINGLIST and make a ! new one before trying the match. TEXT is dequoted before attempting a ! match. */ static STRINGLIST * gen_matches_from_itemlist (itp, text) *************** *** 637,640 **** --- 644,648 ---- STRINGLIST *ret, *sl; int tlen, i, n; + char *ntxt; if ((itp->flags & (LIST_DIRTY|LIST_DYNAMIC)) || *************** *** 650,660 **** ret = strlist_create (itp->slist->list_len+1); sl = itp->slist; ! tlen = STRLEN (text); for (i = n = 0; i < sl->list_len; i++) { ! if (tlen == 0 || STREQN (sl->list[i], text, tlen)) ret->list[n++] = STRDUP (sl->list[i]); } ret->list[ret->list_len = n] = (char *)NULL; return ret; } --- 658,673 ---- ret = strlist_create (itp->slist->list_len+1); sl = itp->slist; ! ! ntxt = bash_dequote_text (text); ! tlen = STRLEN (ntxt); ! for (i = n = 0; i < sl->list_len; i++) { ! if (tlen == 0 || STREQN (sl->list[i], ntxt, tlen)) ret->list[n++] = STRDUP (sl->list[i]); } ret->list[ret->list_len = n] = (char *)NULL; + + FREE (ntxt); return ret; } *************** *** 676,680 **** --- 689,701 ---- if (rl_filename_dequoting_function) { + #if 0 qc = (text[0] == '"' || text[0] == '\'') ? text[0] : 0; + #else + /* Use rl_completion_quote_character because any single or + double quotes have been removed by the time TEXT makes it + here, and we don't want to remove backslashes inside + quoted strings. */ + qc = rl_dispatching ? rl_completion_quote_character : 0; + #endif dfn = (*rl_filename_dequoting_function) ((char *)text, qc); } *************** *** 793,797 **** WORD_LIST *l, *l2; STRINGLIST *sl; ! int nw, tlen; if (cs->words == 0 || cs->words[0] == '\0') --- 814,819 ---- WORD_LIST *l, *l2; STRINGLIST *sl; ! int nw, tlen, qc; ! char *ntxt; /* dequoted TEXT to use in comparisons */ if (cs->words == 0 || cs->words[0] == '\0') *************** *** 811,823 **** nw = list_length (l2); sl = strlist_create (nw + 1); ! tlen = STRLEN (text); for (nw = 0, l = l2; l; l = l->next) { ! if (tlen == 0 || STREQN (l->word->word, text, tlen)) sl->list[nw++] = STRDUP (l->word->word); } sl->list[sl->list_len = nw] = (char *)NULL; return sl; } --- 833,848 ---- nw = list_length (l2); sl = strlist_create (nw + 1); ! ! ntxt = bash_dequote_text (text); ! tlen = STRLEN (ntxt); for (nw = 0, l = l2; l; l = l->next) { ! if (tlen == 0 || STREQN (l->word->word, ntxt, tlen)) sl->list[nw++] = STRDUP (l->word->word); } sl->list[sl->list_len = nw] = (char *)NULL; + FREE (ntxt); return sl; } *************** *** 969,973 **** if (f == 0) { ! internal_error ("completion: function `%s' not found", funcname); rl_ding (); rl_on_new_line (); --- 994,998 ---- if (f == 0) { ! internal_error (_("completion: function `%s' not found"), funcname); rl_ding (); rl_on_new_line (); *************** *** 1133,1136 **** --- 1158,1162 ---- int llen, nw, cw; WORD_LIST *lwords; + COMPSPEC *tcs; #ifdef DEBUG *************** *** 1287,1296 **** if ((ret == 0 || ret->list_len == 0) && (cs->options & COPT_DIRNAMES)) { ! COMPSPEC *dummy; ! ! dummy = compspec_create (); ! dummy->actions = CA_DIRECTORY; ! ret = gen_action_completions (dummy, word); ! compspec_dispose (dummy); } --- 1313,1329 ---- if ((ret == 0 || ret->list_len == 0) && (cs->options & COPT_DIRNAMES)) { ! tcs = compspec_create (); ! tcs->actions = CA_DIRECTORY; ! ret = gen_action_completions (tcs, word); ! compspec_dispose (tcs); ! } ! else if (cs->options & COPT_PLUSDIRS) ! { ! tcs = compspec_create (); ! tcs->actions = CA_DIRECTORY; ! tmatches = gen_action_completions (tcs, word); ! ret = strlist_append (ret, tmatches); ! strlist_dispose (tmatches); ! compspec_dispose (tcs); } *************** *** 1327,1330 **** --- 1360,1365 ---- } + cs = compspec_copy (cs); + /* Signal the caller that we found a COMPSPEC for this command, and pass back any meta-options associated with the compspec. */ *************** *** 1333,1336 **** --- 1368,1373 ---- ret = gen_compspec_completions (cs, cmd, word, start, end); + + compspec_dispose (cs); if (ret) diff -aNrc2 bash-2.05b-patched/pcomplete.h bash-3.0/pcomplete.h *** bash-2.05b-patched/pcomplete.h Mon Mar 18 12:15:05 2002 --- bash-3.0/pcomplete.h Fri Apr 25 17:37:45 2003 *************** *** 72,75 **** --- 72,77 ---- #define COPT_DIRNAMES (1<<3) #define COPT_NOSPACE (1<<4) + #define COPT_BASHDEFAULT (1<<5) + #define COPT_PLUSDIRS (1<<6) /* List of items is used by the code that implements the programmable diff -aNrc2 bash-2.05b-patched/pcomplib.c bash-3.0/pcomplib.c *** bash-2.05b-patched/pcomplib.c Mon Mar 18 12:15:15 2002 --- bash-3.0/pcomplib.c Fri Dec 19 15:59:22 2003 *************** *** 33,36 **** --- 33,38 ---- #endif + #include "bashintl.h" + #include "shell.h" #include "pcomplete.h" *************** *** 175,183 **** if (cs == NULL) ! programming_error ("progcomp_insert: %s: NULL COMPSPEC", cmd); if (prog_completes == 0) progcomp_create (); item = hash_insert (cmd, prog_completes, 0); if (item->data) --- 177,186 ---- if (cs == NULL) ! programming_error (_("progcomp_insert: %s: NULL COMPSPEC"), cmd); if (prog_completes == 0) progcomp_create (); + cs->refcount++; item = hash_insert (cmd, prog_completes, 0); if (item->data) *************** *** 186,190 **** item->key = savestring (cmd); item->data = cs; ! cs->refcount++; return 1; } --- 189,193 ---- item->key = savestring (cmd); item->data = cs; ! return 1; } diff -aNrc2 bash-2.05b-patched/po/LINGUAS bash-3.0/po/LINGUAS *** bash-2.05b-patched/po/LINGUAS Wed Dec 31 19:00:00 1969 --- bash-3.0/po/LINGUAS Wed Dec 10 11:58:17 2003 *************** *** 0 **** --- 1,2 ---- + # Set of available languages. + en@quot en@boldquot diff -aNrc2 bash-2.05b-patched/po/Makefile.in.in bash-3.0/po/Makefile.in.in *** bash-2.05b-patched/po/Makefile.in.in Wed Dec 31 19:00:00 1969 --- bash-3.0/po/Makefile.in.in Mon Dec 22 15:34:31 2003 *************** *** 0 **** --- 1,357 ---- + # Makefile for PO directory in any package using GNU gettext. + # Copyright (C) 1995-1997, 2000-2003 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 + # License but which still want to provide support for the GNU gettext + # 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. + + PACKAGE = @PACKAGE_NAME@ + VERSION = @PACKAGE_VERSION@ + + SHELL = /bin/sh + @SET_MAKE@ + + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ + VPATH = @srcdir@ + + topdir = @top_srcdir@ + BUILD_DIR = @BUILD_DIR@ + + prefix = @prefix@ + exec_prefix = @exec_prefix@ + datadir = @datadir@ + localedir = $(datadir)/locale + gettextsrcdir = $(datadir)/gettext/po + + INSTALL = @INSTALL@ + INSTALL_DATA = @INSTALL_DATA@ + MKINSTALLDIRS = @MKINSTALLDIRS@ + mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) + + GMSGFMT = @GMSGFMT@ + MSGFMT = @MSGFMT@ + XGETTEXT = @XGETTEXT@ + MSGMERGE = msgmerge + MSGMERGE_UPDATE = @MSGMERGE@ --update + MSGINIT = msginit + MSGCONV = msgconv + MSGFILTER = msgfilter + + POFILES = @POFILES@ + GMOFILES = @GMOFILES@ + UPDATEPOFILES = @UPDATEPOFILES@ + DUMMYPOFILES = @DUMMYPOFILES@ + DISTFILES.common = Makefile.in.in remove-potcdate.sin \ + $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) + DISTFILES = $(DISTFILES.common) Makevars POTFILES.in $(DOMAIN).pot stamp-po \ + $(POFILES) $(GMOFILES) \ + $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) + + POTFILES = \ + + CATALOGS = @CATALOGS@ + + # Makevars gets inserted here. (Don't remove this line!) + + .SUFFIXES: + .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update + + .po.mo: + @echo "$(MSGFMT) -c -o $@ $<"; \ + $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ + + .po.gmo: + @lang=`echo $* | sed -e 's,.*/,,'`; \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ + cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo + + .sin.sed: + sed -e '/^#/d' $< > t-$@ + mv t-$@ $@ + + + all: all-@USE_NLS@ + + all-yes: stamp-po + all-no: + + # stamp-po is a timestamp denoting the last time at which the CATALOGS have + # been loosely updated. Its purpose is that when a developer or translator + # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, + # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent + # invocations of "make" will do nothing. This timestamp would not be necessary + # if updating the $(CATALOGS) would always touch them; however, the rule for + # $(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) + @echo "touch stamp-po" + @echo timestamp > stamp-poT + @mv stamp-poT stamp-po + + # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', + # otherwise packages like GCC can not be built if only parts of the source + # have been downloaded. + + # This target rebuilds $(DOMAIN).pot; it is an expensive operation. + # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. + $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed + $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ + --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ + --files-from=$(srcdir)/POTFILES.in \ + --copyright-holder='$(COPYRIGHT_HOLDER)' \ + --msgid-bugs-address='$(MSGID_BUGS_ADDRESS)' + $(MAKE) $(MFLAGS) builtins.pot-update + test ! -f $(DOMAIN).po || { \ + if test -f $(srcdir)/$(DOMAIN).pot; then \ + sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ + sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ + if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ + rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ + else \ + rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ + mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ + fi; \ + else \ + mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ + fi; \ + } + + # This rule has no dependencies: we don't need to update $(DOMAIN).pot at + # every "make" invocation, only create it when it is missing. + # Only "make $(DOMAIN).pot-update" or "make dist" will force an update. + $(srcdir)/$(DOMAIN).pot: + $(MAKE) $(DOMAIN).pot-update + + # This target rebuilds a PO file if $(DOMAIN).pot has changed. + # 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 + + + install: install-exec install-data + install-exec: + install-data: install-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ + for file in $(DISTFILES.common) Makevars.template; do \ + $(INSTALL_DATA) $(srcdir)/$$file \ + $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + for file in Makevars; do \ + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi + install-data-no: all + install-data-yes: all + $(mkinstalldirs) $(DESTDIR)$(datadir) + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ + $(mkinstalldirs) $(DESTDIR)$$dir; \ + if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ + $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ + echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ + for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ + if test -n "$$lc"; then \ + if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ + link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ + mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ + for file in *; do \ + if test -f $$file; then \ + ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ + fi; \ + done); \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + else \ + if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ + :; \ + else \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + fi; \ + fi; \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ + ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ + cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ + fi; \ + done; \ + done + + install-strip: install + + installdirs: installdirs-exec installdirs-data + installdirs-exec: + installdirs-data: installdirs-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ + else \ + : ; \ + fi + installdirs-data-no: + installdirs-data-yes: + $(mkinstalldirs) $(DESTDIR)$(datadir) + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ + $(mkinstalldirs) $(DESTDIR)$$dir; \ + for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ + if test -n "$$lc"; then \ + if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ + link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ + mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ + for file in *; do \ + if test -f $$file; then \ + ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ + fi; \ + done); \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + else \ + if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ + :; \ + else \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + fi; \ + fi; \ + fi; \ + done; \ + done + + # Define this as empty until I found a useful application. + installcheck: + + uninstall: uninstall-exec uninstall-data + uninstall-exec: + uninstall-data: uninstall-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + for file in $(DISTFILES.common) Makevars.template; do \ + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi + uninstall-data-no: + uninstall-data-yes: + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + done; \ + done + + check: all + + info dvi ps pdf html tags TAGS ctags CTAGS ID: + + mostlyclean: + rm -f remove-potcdate.sed + rm -f stamp-poT + rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po + rm -fr *.o + + clean: mostlyclean + + distclean: clean + rm -f Makefile Makefile.in POTFILES *.mo + + maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f stamp-po $(GMOFILES) + + distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + dist distdir: + $(MAKE) update-po + @$(MAKE) dist2 + # This is a separate target because 'update-po' must be executed before. + dist2: $(DISTFILES) + dists="$(DISTFILES)"; \ + if test "$(PACKAGE)" = "gettext-tools"; then \ + dists="$$dists Makevars.template"; \ + fi; \ + if test -f $(srcdir)/ChangeLog; then \ + dists="$$dists ChangeLog"; \ + fi; \ + for i in 0 1 2 3 4 5 6 7 8 9; do \ + if test -f $(srcdir)/ChangeLog.$$i; then \ + dists="$$dists ChangeLog.$$i"; \ + fi; \ + done; \ + if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ + for file in $$dists; do \ + if test -f $$file; then \ + cp -p $$file $(distdir); \ + else \ + cp -p $(srcdir)/$$file $(distdir); \ + fi; \ + done + + update-po: Makefile + $(MAKE) $(DOMAIN).pot-update + test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) + $(MAKE) update-gmo + + # General rule for updating PO files. + + .nop.po-update: + @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ + if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ + tmpdir=`pwd`; \ + echo "$$lang:"; \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + cd $(srcdir); \ + if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ + if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ + rm -f $$tmpdir/$$lang.new.po; \ + else \ + if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ + :; \ + else \ + echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ + exit 1; \ + fi; \ + fi; \ + else \ + echo "msgmerge for $$lang.po failed!" 1>&2; \ + rm -f $$tmpdir/$$lang.new.po; \ + fi + + $(DUMMYPOFILES): + + update-gmo: Makefile $(GMOFILES) + @: + + Makefile: Makefile.in.in $(top_builddir)/config.status @POMAKEFILEDEPS@ $(srcdir)/Rules-builtins + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ + $(SHELL) ./config.status + + force: + + # Tell versions [3.59,3.63) of GNU make not to export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff -aNrc2 bash-2.05b-patched/po/Makevars bash-3.0/po/Makevars *** bash-2.05b-patched/po/Makevars Wed Dec 31 19:00:00 1969 --- bash-3.0/po/Makevars Fri Dec 19 20:29:43 2003 *************** *** 0 **** --- 1,41 ---- + # Makefile variables for PO directory in any package using GNU gettext. + + # Usually the message domain is the same as the package name. + DOMAIN = $(PACKAGE) + + # These two variables depend on the location of this directory. + subdir = po + top_builddir = $(BUILD_DIR) + + # These options get passed to xgettext. + XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ -C + + # This is the copyright holder that gets inserted into the header of the + # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding + # package. (Note that the msgstr strings, extracted from the package's + # sources, belong to the copyright holder of the package.) Translators are + # expected to transfer the copyright for their translations to this person + # or entity, or to disclaim their copyright. The empty string stands for + # the public domain; in this case the translators are expected to disclaim + # their copyright. + COPYRIGHT_HOLDER = Free Software Foundation, Inc. + + # This is the email address or URL to which the translators shall report + # bugs in the untranslated strings: + # - Strings which are not entire sentences, see the maintainer guidelines + # in the GNU gettext documentation, section 'Preparing Strings'. + # - Strings which use unclear terms or require additional context to be + # understood. + # - Strings which make invalid assumptions about notation of date, time or + # money. + # - Pluralisation problems. + # - Incorrect English spelling. + # - Incorrect formatting. + # It can be your email address, or a mailing list address where translators + # can write to without being subscribed, or the URL of a web page through + # which the translators can contact you. + MSGID_BUGS_ADDRESS = bug-bash@gnu.org + + # This is the list of locale categories, beyond LC_MESSAGES, for which the + # message catalogs shall be used. It is usually empty. + EXTRA_LOCALE_CATEGORIES = diff -aNrc2 bash-2.05b-patched/po/POTFILES.in bash-3.0/po/POTFILES.in *** bash-2.05b-patched/po/POTFILES.in Wed Dec 31 19:00:00 1969 --- bash-3.0/po/POTFILES.in Fri Dec 19 20:30:43 2003 *************** *** 0 **** --- 1,76 ---- + # List of source files containing translatable strings. + # Copyright (C) 2004 Free Software Foundation, Inc. + + arrayfunc.c + bashhist.c + bashline.c + braces.c + builtins/bind.def + builtins/break.def + builtins/caller.def + builtins/cd.def + builtins/common.c + builtins/complete.def + builtins/declare.def + builtins/enable.def + builtins/evalfile.c + builtins/exec.def + builtins/exit.def + builtins/fc.def + builtins/fg_bg.def + builtins/getopt.c + builtins/hash.def + builtins/help.def + builtins/history.def + builtins/inlib.def + builtins/jobs.def + builtins/kill.def + builtins/let.def + builtins/mkbuiltins.c + builtins/printf.def + builtins/pushd.def + builtins/read.def + builtins/return.def + builtins/set.def + builtins/setattr.def + builtins/shift.def + builtins/shopt.def + builtins/source.def + builtins/suspend.def + builtins/type.def + builtins/ulimit.def + builtins/umask.def + error.c + eval.c + execute_cmd.c + expr.c + general.c + input.c + jobs.c + lib/malloc/malloc.c + lib/malloc/stats.c + lib/malloc/table.c + lib/malloc/watch.c + lib/sh/fmtulong.c + lib/sh/netopen.c + mailcheck.c + make_cmd.c + nojobs.c + parse.y + pcomplete.c + pcomplib.c + print_cmd.c + redir.c + shell.c + sig.c + siglist.c + subst.c + test.c + trap.c + variables.c + version.c + xmalloc.c + + # Apparently gettext's defaults cannot handle files that exist outside of the + # source directory, like in the build directory + #../builtins/builtins.c diff -aNrc2 bash-2.05b-patched/po/Rules-builtins bash-3.0/po/Rules-builtins *** bash-2.05b-patched/po/Rules-builtins Wed Dec 31 19:00:00 1969 --- bash-3.0/po/Rules-builtins Tue Jun 29 10:47:17 2004 *************** *** 0 **** --- 1,19 ---- + # + # Update the strings from the builtins' long docs. Must be called when + # bash.pot exists, in the middle of the bash.pot-update recipe + # + builtins.pot-update: $(top_builddir)/builtins/builtins.c + $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_builddir)/builtins \ + $(XGETTEXT_OPTIONS) --omit-header \ + --copyright-holder='$(COPYRIGHT_HOLDER)' \ + --join-existing \ + builtins.c + + # This rule has no dependencies: we don't need to update builtins.pot at + # every "make" invocation, only create it when it is missing. + # Only "make builtins.pot-update" or "make dist" will force an update. + $(srcdir)/builtins.pot: + $(MAKE) builtins.pot-update + + xdist: + $(MAKE) update-po diff -aNrc2 bash-2.05b-patched/po/Rules-quot bash-3.0/po/Rules-quot *** bash-2.05b-patched/po/Rules-quot Wed Dec 31 19:00:00 1969 --- bash-3.0/po/Rules-quot Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,42 ---- + # Special Makefile rules for English message catalogs with quotation marks. + + DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot + + .SUFFIXES: .insert-header .po-update-en + + en@quot.po-update: en@quot.po-update-en + en@boldquot.po-update: en@boldquot.po-update-en + + .insert-header.po-update-en: + @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ + if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ + tmpdir=`pwd`; \ + echo "$$lang:"; \ + ll=`echo $$lang | sed -e 's/@.*//'`; \ + LC_ALL=C; export LC_ALL; \ + cd $(srcdir); \ + if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ + if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ + rm -f $$tmpdir/$$lang.new.po; \ + else \ + if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ + :; \ + else \ + echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ + exit 1; \ + fi; \ + fi; \ + else \ + echo "creation of $$lang.po failed!" 1>&2; \ + rm -f $$tmpdir/$$lang.new.po; \ + fi + + en@quot.insert-header: insert-header.sin + sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header + + en@boldquot.insert-header: insert-header.sin + sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header + + mostlyclean: mostlyclean-quot + mostlyclean-quot: + rm -f *.insert-header diff -aNrc2 bash-2.05b-patched/po/bash.pot bash-3.0/po/bash.pot *** bash-2.05b-patched/po/bash.pot Wed Dec 31 19:00:00 1969 --- bash-3.0/po/bash.pot Fri Apr 30 22:40:24 2004 *************** *** 0 **** --- 1,4174 ---- + # SOME DESCRIPTIVE TITLE. + # Copyright (C) YEAR Free Software Foundation, Inc. + # This file is distributed under the same license as the PACKAGE package. + # FIRST AUTHOR , YEAR. + # + #: builtins/caller.def:128 builtins/caller.def:132 builtins/pushd.def:655 + #: builtins/pushd.def:663 builtins/pushd.def:666 builtins/pushd.def:676 + #: builtins/pushd.def:680 builtins/pushd.def:684 builtins/pushd.def:687 + #: builtins/pushd.def:690 builtins/pushd.def:699 builtins/pushd.def:703 + #: builtins/pushd.def:707 builtins/pushd.def:710 builtins.c:321 builtins.c:325 + #: builtins.c:390 builtins.c:392 builtins.c:401 builtins.c:404 builtins.c:408 + #: builtins.c:445 builtins.c:487 builtins.c:491 builtins.c:498 builtins.c:509 + #: builtins.c:513 builtins.c:552 builtins.c:555 builtins.c:559 builtins.c:562 + #: builtins.c:630 builtins.c:637 builtins.c:692 builtins.c:713 builtins.c:718 + #: builtins.c:722 builtins.c:745 builtins.c:835 builtins.c:919 builtins.c:921 + #: builtins.c:943 builtins.c:946 builtins.c:948 builtins.c:950 builtins.c:952 + #: builtins.c:954 builtins.c:957 builtins.c:966 builtins.c:968 builtins.c:973 + #: builtins.c:976 builtins.c:1019 builtins.c:1024 builtins.c:1028 + #: builtins.c:1032 builtins.c:1034 builtins.c:1047 builtins.c:1062 + #: builtins.c:1226 builtins.c:1231 builtins.c:1305 builtins.c:1309 + #: builtins.c:1313 builtins.c:1316 builtins.c:1319 builtins.c:1331 + #: builtins.c:1335 builtins.c:1339 builtins.c:1342 builtins.c:1354 + #: builtins.c:1362 builtins.c:1365 + #, fuzzy + msgid "" + msgstr "" + "Project-Id-Version: PACKAGE VERSION\n" + "Report-Msgid-Bugs-To: bug-bash@gnu.org\n" + "POT-Creation-Date: 2003-12-22 15:34-0500\n" + "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" + "Last-Translator: FULL NAME \n" + "Language-Team: LANGUAGE \n" + "MIME-Version: 1.0\n" + "Content-Type: text/plain; charset=CHARSET\n" + "Content-Transfer-Encoding: 8bit\n" + + #: arrayfunc.c:45 + msgid "bad array subscript" + msgstr "" + + #: arrayfunc.c:306 + #, c-format + msgid "%s: cannot assign to non-numeric index" + msgstr "" + + #: bashhist.c:321 + #, c-format + msgid "%s: cannot create: %s" + msgstr "" + + #: bashline.c:2791 + msgid "bash_execute_unix_command: cannot find keymap for command" + msgstr "" + + #: bashline.c:2840 + #, c-format + msgid "%s: first non-whitespace character is not `\"'" + msgstr "" + + #: bashline.c:2869 + #, c-format + msgid "no closing `%c' in %s" + msgstr "" + + #: bashline.c:2903 + #, c-format + msgid "%s: missing colon separator" + msgstr "" + + #: builtins/alias.def:123 + #, c-format + msgid "`%s': invalid alias name" + msgstr "" + + #: builtins/bind.def:194 + #, c-format + msgid "`%s': invalid keymap name" + msgstr "" + + #: builtins/bind.def:233 + #, c-format + msgid "%s: cannot read: %s" + msgstr "" + + #: builtins/bind.def:248 + #, c-format + msgid "`%s': cannot unbind" + msgstr "" + + #: builtins/bind.def:283 + #, c-format + msgid "`%s': unknown function name" + msgstr "" + + #: builtins/bind.def:291 + #, c-format + msgid "%s is not bound to any keys.\n" + msgstr "" + + #: builtins/bind.def:295 + #, c-format + msgid "%s can be invoked via " + msgstr "" + + #: builtins/break.def:128 + msgid "only meaningful in a `for', `while', or `until' loop" + msgstr "" + + #: builtins/caller.def:127 builtins.c:320 + msgid "Returns the context of the current subroutine call." + msgstr "" + + #: builtins/caller.def:129 builtins.c:322 + msgid "Without EXPR, returns returns \"$line $filename\". With EXPR," + msgstr "" + + #: builtins/caller.def:130 builtins.c:323 + msgid "returns \"$line $subroutine $filename\"; this extra information" + msgstr "" + + #: builtins/caller.def:131 builtins.c:324 + msgid "can be used used to provide a stack trace." + msgstr "" + + #: builtins/caller.def:133 builtins.c:326 + msgid "The value of EXPR indicates how many call frames to go back before the" + msgstr "" + + #: builtins/caller.def:134 builtins.c:327 + msgid "current one; the top frame is frame 0." + msgstr "" + + #: builtins/cd.def:188 + msgid "HOME not set" + msgstr "" + + #: builtins/cd.def:200 + msgid "OLDPWD not set" + msgstr "" + + #: builtins/cd.def:357 + #, c-format + msgid "write error: %s" + msgstr "" + + #: builtins/common.c:133 test.c:921 + msgid "too many arguments" + msgstr "" + + #: builtins/common.c:157 shell.c:465 shell.c:737 + #, c-format + msgid "%s: option requires an argument" + msgstr "" + + #: builtins/common.c:164 + #, c-format + msgid "%s: numeric argument required" + msgstr "" + + #: builtins/common.c:171 + #, c-format + msgid "%s: not found" + msgstr "" + + #: builtins/common.c:180 shell.c:750 + #, c-format + msgid "%s: invalid option" + msgstr "" + + #: builtins/common.c:187 + #, c-format + msgid "%s: invalid option name" + msgstr "" + + #: builtins/common.c:194 general.c:229 general.c:234 + #, c-format + msgid "`%s': not a valid identifier" + msgstr "" + + #: builtins/common.c:201 + #, c-format + msgid "%s: invalid number" + msgstr "" + + #: builtins/common.c:208 + #, c-format + msgid "%s: invalid signal specification" + msgstr "" + + #: builtins/common.c:215 + #, c-format + msgid "`%s': not a pid or valid job spec" + msgstr "" + + #: builtins/common.c:222 error.c:453 + #, c-format + msgid "%s: readonly variable" + msgstr "" + + #: builtins/common.c:230 + #, c-format + msgid "%s: %s out of range" + msgstr "" + + #: builtins/common.c:230 builtins/common.c:232 + msgid "argument" + msgstr "" + + #: builtins/common.c:232 + #, c-format + msgid "%s out of range" + msgstr "" + + #: builtins/common.c:240 + #, c-format + msgid "%s: no such job" + msgstr "" + + #: builtins/common.c:248 + #, c-format + msgid "%s: no job control" + msgstr "" + + #: builtins/common.c:250 + msgid "no job control" + msgstr "" + + #: builtins/common.c:260 + #, c-format + msgid "%s: restricted" + msgstr "" + + #: builtins/common.c:262 + msgid "restricted" + msgstr "" + + #: builtins/common.c:270 + #, c-format + msgid "%s: not a shell builtin" + msgstr "" + + #: builtins/common.c:486 + #, c-format + msgid "%s: error retrieving current directory: %s: %s\n" + msgstr "" + + #: builtins/common.c:553 builtins/common.c:555 + #, c-format + msgid "%s: ambiguous job spec" + msgstr "" + + #: builtins/complete.def:251 + #, c-format + msgid "%s: invalid action name" + msgstr "" + + #: builtins/complete.def:381 builtins/complete.def:524 + #, c-format + msgid "%s: no completion specification" + msgstr "" + + #: builtins/complete.def:571 + msgid "warning: -F option may not work as you expect" + msgstr "" + + #: builtins/complete.def:573 + msgid "warning: -C option may not work as you expect" + msgstr "" + + #: builtins/declare.def:105 + msgid "can only be used in a function" + msgstr "" + + #: builtins/declare.def:295 + msgid "cannot use `-f' to make functions" + msgstr "" + + #: builtins/declare.def:307 execute_cmd.c:3949 + #, c-format + msgid "%s: readonly function" + msgstr "" + + #: builtins/declare.def:389 + #, c-format + msgid "%s: cannot destroy array variables in this way" + msgstr "" + + #: builtins/enable.def:128 builtins/enable.def:136 + msgid "dynamic loading not available" + msgstr "" + + #: builtins/enable.def:303 + #, c-format + msgid "cannot open shared object %s: %s" + msgstr "" + + #: builtins/enable.def:326 + #, c-format + msgid "cannot find %s in shared object %s: %s" + msgstr "" + + #: builtins/enable.def:450 + #, c-format + msgid "%s: not dynamically loaded" + msgstr "" + + #: builtins/enable.def:465 + #, c-format + msgid "%s: cannot delete: %s" + msgstr "" + + #: builtins/evalfile.c:128 execute_cmd.c:3821 shell.c:1395 + #, c-format + msgid "%s: is a directory" + msgstr "" + + #: builtins/evalfile.c:133 + #, c-format + msgid "%s: not a regular file" + msgstr "" + + #: builtins/evalfile.c:141 + #, c-format + msgid "%s: file is too large" + msgstr "" + + #: builtins/exec.def:205 + #, c-format + msgid "%s: cannot execute: %s" + msgstr "" + + #: builtins/exit.def:83 + msgid "not login shell: use `exit'" + msgstr "" + + #: builtins/exit.def:111 + msgid "There are stopped jobs.\n" + msgstr "" + + #: builtins/fc.def:252 + msgid "no command found" + msgstr "" + + #: builtins/fc.def:317 + msgid "history specification" + msgstr "" + + #: builtins/fc.def:338 + #, c-format + msgid "%s: cannot open temp file: %s" + msgstr "" + + #: builtins/fg_bg.def:133 + #, c-format + msgid "job %d started without job control" + msgstr "" + + #: builtins/getopt.c:109 + #, c-format + msgid "%s: illegal option -- %c\n" + msgstr "" + + #: builtins/getopt.c:110 + #, c-format + msgid "%s: option requires an argument -- %c\n" + msgstr "" + + #: builtins/hash.def:83 + msgid "hashing disabled" + msgstr "" + + #: builtins/hash.def:128 + #, c-format + msgid "%s: hash table empty\n" + msgstr "" + + #: builtins/help.def:108 + msgid "Shell commands matching keywords `" + msgstr "" + + #: builtins/help.def:110 + msgid "Shell commands matching keyword `" + msgstr "" + + #: builtins/help.def:138 + #, c-format + msgid "" + "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." + msgstr "" + + #: builtins/help.def:164 + #, c-format + msgid "%s: cannot open: %s" + msgstr "" + + #: builtins/help.def:182 + msgid "" + "These shell commands are defined internally. Type `help' to see this list.\n" + "Type `help name' to find out more about the function `name'.\n" + "Use `info bash' to find out more about the shell in general.\n" + "Use `man -k' or `info' to find out more about commands not in this list.\n" + "\n" + "A star (*) next to a name means that the command is disabled.\n" + "\n" + msgstr "" + + #: builtins/history.def:148 + msgid "cannot use more than one of -anrw" + msgstr "" + + #: builtins/history.def:180 + msgid "history position" + msgstr "" + + #: builtins/history.def:390 + #, c-format + msgid "%s: history expansion failed" + msgstr "" + + #: builtins/jobs.def:99 + msgid "no other options allowed with `-x'" + msgstr "" + + #: builtins/kill.def:187 + #, c-format + msgid "%s: arguments must be process or job IDs" + msgstr "" + + #: builtins/kill.def:248 + msgid "Unknown error" + msgstr "" + + #: builtins/let.def:94 builtins/let.def:119 expr.c:496 expr.c:511 + msgid "expression expected" + msgstr "" + + #: builtins/printf.def:249 + #, c-format + msgid "`%s': missing format character" + msgstr "" + + #: builtins/printf.def:408 + #, c-format + msgid "`%c': invalid format character" + msgstr "" + + #: builtins/printf.def:601 + msgid "missing hex digit for \\x" + msgstr "" + + #: builtins/pushd.def:168 + msgid "no other directory" + msgstr "" + + #: builtins/pushd.def:435 + msgid "" + msgstr "" + + #: builtins/pushd.def:652 builtins.c:1351 + msgid "Display the list of currently remembered directories. Directories" + msgstr "" + + #: builtins/pushd.def:653 builtins.c:1352 + msgid "find their way onto the list with the `pushd' command; you can get" + msgstr "" + + #: builtins/pushd.def:654 builtins.c:1353 + msgid "back up through the list with the `popd' command." + msgstr "" + + #: builtins/pushd.def:656 builtins.c:1355 + msgid "The -l flag specifies that `dirs' should not print shorthand versions" + msgstr "" + + #: builtins/pushd.def:657 builtins.c:1356 + msgid "of directories which are relative to your home directory. This means" + msgstr "" + + #: builtins/pushd.def:658 builtins.c:1357 + msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag" + msgstr "" + + #: builtins/pushd.def:659 builtins.c:1358 + msgid "causes `dirs' to print the directory stack with one entry per line," + msgstr "" + + #: builtins/pushd.def:660 builtins.c:1359 + msgid "prepending the directory name with its position in the stack. The -p" + msgstr "" + + #: builtins/pushd.def:661 builtins.c:1360 + msgid "flag does the same thing, but the stack position is not prepended." + msgstr "" + + #: builtins/pushd.def:662 builtins.c:1361 + msgid "The -c flag clears the directory stack by deleting all of the elements." + msgstr "" + + #: builtins/pushd.def:664 + msgid "+N displays the Nth entry counting from the left of the list shown by" + msgstr "" + + #: builtins/pushd.def:665 builtins/pushd.def:668 + msgid " dirs when invoked without options, starting with zero." + msgstr "" + + #: builtins/pushd.def:667 + msgid "" + "-N displays the Nth entry counting from the right of the list shown by" + msgstr "" + + #: builtins/pushd.def:673 builtins.c:1302 + msgid "Adds a directory to the top of the directory stack, or rotates" + msgstr "" + + #: builtins/pushd.def:674 builtins.c:1303 + msgid "the stack, making the new top of the stack the current working" + msgstr "" + + #: builtins/pushd.def:675 builtins.c:1304 + msgid "directory. With no arguments, exchanges the top two directories." + msgstr "" + + #: builtins/pushd.def:677 + msgid "+N Rotates the stack so that the Nth directory (counting" + msgstr "" + + #: builtins/pushd.def:678 + msgid " from the left of the list shown by `dirs', starting with" + msgstr "" + + #: builtins/pushd.def:679 builtins/pushd.def:683 + msgid " zero) is at the top." + msgstr "" + + #: builtins/pushd.def:681 + msgid "-N Rotates the stack so that the Nth directory (counting" + msgstr "" + + #: builtins/pushd.def:682 + msgid " from the right of the list shown by `dirs', starting with" + msgstr "" + + #: builtins/pushd.def:685 + msgid "-n suppress the normal change of directory when adding directories" + msgstr "" + + #: builtins/pushd.def:686 + msgid " to the stack, so only the stack is manipulated." + msgstr "" + + #: builtins/pushd.def:688 + msgid "dir adds DIR to the directory stack at the top, making it the" + msgstr "" + + #: builtins/pushd.def:689 + msgid " new current working directory." + msgstr "" + + #: builtins/pushd.def:691 builtins/pushd.def:711 builtins.c:1320 + #: builtins.c:1343 + msgid "You can see the directory stack with the `dirs' command." + msgstr "" + + #: builtins/pushd.def:696 builtins.c:1328 + msgid "Removes entries from the directory stack. With no arguments," + msgstr "" + + #: builtins/pushd.def:697 builtins.c:1329 + msgid "removes the top directory from the stack, and cd's to the new" + msgstr "" + + #: builtins/pushd.def:698 builtins.c:1330 + msgid "top directory." + msgstr "" + + #: builtins/pushd.def:700 + msgid "+N removes the Nth entry counting from the left of the list" + msgstr "" + + #: builtins/pushd.def:701 + msgid " shown by `dirs', starting with zero. For example: `popd +0'" + msgstr "" + + #: builtins/pushd.def:702 + msgid " removes the first directory, `popd +1' the second." + msgstr "" + + #: builtins/pushd.def:704 + msgid "-N removes the Nth entry counting from the right of the list" + msgstr "" + + #: builtins/pushd.def:705 + msgid " shown by `dirs', starting with zero. For example: `popd -0'" + msgstr "" + + #: builtins/pushd.def:706 + msgid " removes the last directory, `popd -1' the next to last." + msgstr "" + + #: builtins/pushd.def:708 + msgid "-n suppress the normal change of directory when removing directories" + msgstr "" + + #: builtins/pushd.def:709 + msgid " from the stack, so only the stack is manipulated." + msgstr "" + + #: builtins/read.def:207 + #, c-format + msgid "%s: invalid timeout specification" + msgstr "" + + #: builtins/read.def:230 + #, c-format + msgid "%s: invalid file descriptor specification" + msgstr "" + + #: builtins/read.def:237 + #, c-format + msgid "%d: invalid file descriptor: %s" + msgstr "" + + #: builtins/read.def:463 + #, c-format + msgid "read error: %d: %s" + msgstr "" + + #: builtins/return.def:63 + msgid "can only `return' from a function or sourced script" + msgstr "" + + #: builtins/set.def:743 + msgid "cannot simultaneously unset a function and a variable" + msgstr "" + + #: builtins/set.def:780 + #, c-format + msgid "%s: cannot unset" + msgstr "" + + #: builtins/set.def:787 + #, c-format + msgid "%s: cannot unset: readonly %s" + msgstr "" + + #: builtins/set.def:798 + #, c-format + msgid "%s: not an array variable" + msgstr "" + + #: builtins/setattr.def:165 + #, c-format + msgid "%s: not a function" + msgstr "" + + #: builtins/shift.def:66 builtins/shift.def:72 + msgid "shift count" + msgstr "" + + #: builtins/shopt.def:226 + msgid "cannot set and unset shell options simultaneously" + msgstr "" + + #: builtins/shopt.def:291 + #, c-format + msgid "%s: invalid shell option name" + msgstr "" + + #: builtins/source.def:117 + msgid "filename argument required" + msgstr "" + + #: builtins/source.def:137 + #, c-format + msgid "%s: file not found" + msgstr "" + + #: builtins/suspend.def:93 + msgid "cannot suspend" + msgstr "" + + #: builtins/suspend.def:103 + msgid "cannot suspend a login shell" + msgstr "" + + #: builtins/type.def:231 + #, c-format + msgid "%s is aliased to `%s'\n" + msgstr "" + + #: builtins/type.def:252 + #, c-format + msgid "%s is a shell keyword\n" + msgstr "" + + #: builtins/type.def:272 + #, c-format + msgid "%s is a function\n" + msgstr "" + + #: builtins/type.def:297 + #, c-format + msgid "%s is a shell builtin\n" + msgstr "" + + #: builtins/type.def:318 + #, c-format + msgid "%s is %s\n" + msgstr "" + + #: builtins/type.def:338 + #, c-format + msgid "%s is hashed (%s)\n" + msgstr "" + + #: builtins/ulimit.def:332 + #, c-format + msgid "%s: invalid limit argument" + msgstr "" + + #: builtins/ulimit.def:358 + #, c-format + msgid "`%c': bad command" + msgstr "" + + #: builtins/ulimit.def:387 + #, c-format + msgid "%s: cannot get limit: %s" + msgstr "" + + #: builtins/ulimit.def:425 + #, c-format + msgid "%s: cannot modify limit: %s" + msgstr "" + + #: builtins/umask.def:112 + msgid "octal number" + msgstr "" + + #: builtins/umask.def:226 + #, c-format + msgid "`%c': invalid symbolic mode operator" + msgstr "" + + #: builtins/umask.def:279 + #, c-format + msgid "`%c': invalid symbolic mode character" + msgstr "" + + #: error.c:165 + #, c-format + msgid "last command: %s\n" + msgstr "" + + #: error.c:173 + msgid "Aborting..." + msgstr "" + + #: error.c:260 + #, c-format + msgid "%s: warning: " + msgstr "" + + #: error.c:405 + msgid "unknown command error" + msgstr "" + + #: error.c:406 + msgid "bad command type" + msgstr "" + + #: error.c:407 + msgid "bad connector" + msgstr "" + + #: error.c:408 + msgid "bad jump" + msgstr "" + + #: error.c:446 + #, c-format + msgid "%s: unbound variable" + msgstr "" + + #: eval.c:175 + msgid "timed out waiting for input: auto-logout\n" + msgstr "" + + #: execute_cmd.c:466 + #, c-format + msgid "cannot redirect standard input from /dev/null: %s" + msgstr "" + + #: execute_cmd.c:1036 + #, c-format + msgid "TIMEFORMAT: `%c': invalid format character" + msgstr "" + + #: execute_cmd.c:3521 + #, c-format + msgid "%s: restricted: cannot specify `/' in command names" + msgstr "" + + #: execute_cmd.c:3609 + #, c-format + msgid "%s: command not found" + msgstr "" + + #: execute_cmd.c:3839 + #, c-format + msgid "%s: %s: bad interpreter" + msgstr "" + + #: execute_cmd.c:3876 + #, c-format + msgid "%s: cannot execute binary file" + msgstr "" + + #: execute_cmd.c:3988 + #, c-format + msgid "cannot duplicate fd %d to fd %d" + msgstr "" + + #: expr.c:239 + msgid "expression recursion level exceeded" + msgstr "" + + #: expr.c:263 + msgid "recursion stack underflow" + msgstr "" + + #: expr.c:374 + msgid "syntax error in expression" + msgstr "" + + #: expr.c:414 + msgid "attempted assignment to non-variable" + msgstr "" + + #: expr.c:435 expr.c:440 expr.c:750 + msgid "division by 0" + msgstr "" + + #: expr.c:466 + msgid "bug: bad expassign token" + msgstr "" + + #: expr.c:508 + msgid "`:' expected for conditional expression" + msgstr "" + + #: expr.c:775 + msgid "exponent less than 0" + msgstr "" + + #: expr.c:819 + msgid "identifier expected after pre-increment or pre-decrement" + msgstr "" + + #: expr.c:847 + msgid "missing `)'" + msgstr "" + + #: expr.c:871 + msgid "syntax error: operand expected" + msgstr "" + + #: expr.c:1146 + msgid "invalid number" + msgstr "" + + #: expr.c:1150 + msgid "invalid arithmetic base" + msgstr "" + + #: expr.c:1170 + msgid "value too great for base" + msgstr "" + + #: general.c:60 + msgid "getcwd: cannot access parent directories" + msgstr "" + + #: input.c:231 + #, c-format + msgid "cannot allocate new file descriptor for bash input from fd %d" + msgstr "" + + #: input.c:239 + #, c-format + msgid "save_bash_input: buffer already exists for new fd %d" + msgstr "" + + #: jobs.c:693 + #, c-format + msgid "deleting stopped job %d with process group %ld" + msgstr "" + + #: jobs.c:1001 + #, c-format + msgid "describe_pid: %ld: no such pid" + msgstr "" + + #: jobs.c:1632 nojobs.c:648 + #, c-format + msgid "wait: pid %ld is not a child of this shell" + msgstr "" + + #: jobs.c:1815 + #, c-format + msgid "wait_for: No record of process %ld" + msgstr "" + + #: jobs.c:2062 + #, c-format + msgid "wait_for_job: job %d is stopped" + msgstr "" + + #: jobs.c:2284 + #, c-format + msgid "%s: job has terminated" + msgstr "" + + #: jobs.c:2293 + #, c-format + msgid "%s: job %d already in background" + msgstr "" + + #: jobs.c:3037 + msgid "no job control in this shell" + msgstr "" + + #: lib/malloc/malloc.c:298 + #, c-format + msgid "malloc: failed assertion: %s\n" + msgstr "" + + #: lib/malloc/malloc.c:314 + #, c-format + msgid "" + "\r\n" + "malloc: %s:%d: assertion botched\r\n" + msgstr "" + + #: lib/malloc/malloc.c:740 + msgid "malloc: block on free list clobbered" + msgstr "" + + #: lib/malloc/malloc.c:817 + msgid "free: called with already freed block argument" + msgstr "" + + #: lib/malloc/malloc.c:820 + msgid "free: called with unallocated block argument" + msgstr "" + + #: lib/malloc/malloc.c:839 + msgid "free: underflow detected; mh_nbytes out of range" + msgstr "" + + #: lib/malloc/malloc.c:845 + msgid "free: start and end chunk sizes differ" + msgstr "" + + #: lib/malloc/malloc.c:942 + msgid "realloc: called with unallocated block argument" + msgstr "" + + #: lib/malloc/malloc.c:957 + msgid "realloc: underflow detected; mh_nbytes out of range" + msgstr "" + + #: lib/malloc/malloc.c:963 + msgid "realloc: start and end chunk sizes differ" + msgstr "" + + #: lib/malloc/table.c:175 + msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" + msgstr "" + + #: lib/malloc/table.c:182 + #, c-format + msgid "register_alloc: %p already in table as allocated?\n" + msgstr "" + + #: lib/malloc/table.c:218 + #, c-format + msgid "register_free: %p already in table as free?\n" + msgstr "" + + #: lib/malloc/watch.c:46 + msgid "allocated" + msgstr "" + + #: lib/malloc/watch.c:48 + msgid "freed" + msgstr "" + + #: lib/malloc/watch.c:50 + msgid "requesting resize" + msgstr "" + + #: lib/malloc/watch.c:52 + msgid "just resized" + msgstr "" + + #: lib/malloc/watch.c:54 + msgid "bug: unknown operation" + msgstr "" + + #: lib/malloc/watch.c:56 + #, c-format + msgid "malloc: watch alert: %p %s " + msgstr "" + + #: lib/sh/fmtulong.c:101 + msgid "invalid base" + msgstr "" + + #: lib/sh/netopen.c:158 + #, c-format + msgid "%s: host unknown" + msgstr "" + + #: lib/sh/netopen.c:165 + #, c-format + msgid "%s: invalid service" + msgstr "" + + #: lib/sh/netopen.c:296 + #, c-format + msgid "%s: bad network path specification" + msgstr "" + + #: lib/sh/netopen.c:336 + msgid "network operations not supported" + msgstr "" + + #: mailcheck.c:382 + msgid "You have mail in $_" + msgstr "" + + #: mailcheck.c:407 + msgid "You have new mail in $_" + msgstr "" + + #: mailcheck.c:423 + #, c-format + msgid "The mail in %s has been read\n" + msgstr "" + + #: make_cmd.c:318 + msgid "syntax error: arithmetic expression required" + msgstr "" + + #: make_cmd.c:320 + msgid "syntax error: `;' unexpected" + msgstr "" + + #: make_cmd.c:321 + #, c-format + msgid "syntax error: `((%s))'" + msgstr "" + + #: make_cmd.c:560 + #, c-format + msgid "make_here_document: bad instruction type %d" + msgstr "" + + #: make_cmd.c:730 + #, c-format + msgid "make_redirection: redirection instruction `%d' out of range" + msgstr "" + + #: parse.y:2726 + #, c-format + msgid "unexpected EOF while looking for matching `%c'" + msgstr "" + + #: parse.y:3011 + msgid "unexpected EOF while looking for `]]'" + msgstr "" + + #: parse.y:3016 + #, c-format + msgid "syntax error in conditional expression: unexpected token `%s'" + msgstr "" + + #: parse.y:3020 + msgid "syntax error in conditional expression" + msgstr "" + + #: parse.y:3098 + #, c-format + msgid "unexpected token `%s', expected `)'" + msgstr "" + + #: parse.y:3102 + msgid "expected `)'" + msgstr "" + + #: parse.y:3130 + #, c-format + msgid "unexpected argument `%s' to conditional unary operator" + msgstr "" + + #: parse.y:3134 + msgid "unexpected argument to conditional unary operator" + msgstr "" + + #: parse.y:3171 + #, c-format + msgid "unexpected token `%s', conditional binary operator expected" + msgstr "" + + #: parse.y:3175 + msgid "conditional binary operator expected" + msgstr "" + + #: parse.y:3191 + #, c-format + msgid "unexpected argument `%s' to conditional binary operator" + msgstr "" + + #: parse.y:3195 + msgid "unexpected argument to conditional binary operator" + msgstr "" + + #: parse.y:3206 + #, c-format + msgid "unexpected token `%c' in conditional command" + msgstr "" + + #: parse.y:3209 + #, c-format + msgid "unexpected token `%s' in conditional command" + msgstr "" + + #: parse.y:3213 + #, c-format + msgid "unexpected token %d in conditional command" + msgstr "" + + #: parse.y:4400 + #, c-format + msgid "syntax error near unexpected token `%s'" + msgstr "" + + #: parse.y:4418 + #, c-format + msgid "syntax error near `%s'" + msgstr "" + + #: parse.y:4428 + msgid "syntax error: unexpected end of file" + msgstr "" + + #: parse.y:4428 + msgid "syntax error" + msgstr "" + + #: parse.y:4490 + #, c-format + msgid "Use \"%s\" to leave the shell.\n" + msgstr "" + + #: parse.y:4649 + msgid "unexpected EOF while looking for matching `)'" + msgstr "" + + #: pcomplete.c:988 + #, c-format + msgid "completion: function `%s' not found" + msgstr "" + + #: pcomplib.c:179 + #, c-format + msgid "progcomp_insert: %s: NULL COMPSPEC" + msgstr "" + + #: print_cmd.c:260 + #, c-format + msgid "print_command: bad connector `%d'" + msgstr "" + + #: print_cmd.c:1172 + #, c-format + msgid "cprintf: `%c': invalid format character" + msgstr "" + + #: redir.c:99 + msgid "file descriptor out of range" + msgstr "" + + #: redir.c:141 + #, c-format + msgid "%s: ambiguous redirect" + msgstr "" + + #: redir.c:145 + #, c-format + msgid "%s: cannot overwrite existing file" + msgstr "" + + #: redir.c:150 + #, c-format + msgid "%s: restricted: cannot redirect output" + msgstr "" + + #: redir.c:155 + #, c-format + msgid "cannot create temp file for here document: %s" + msgstr "" + + #: redir.c:509 + msgid "/dev/(tcp|udp)/host/port not supported without networking" + msgstr "" + + #: redir.c:949 + msgid "redirection error: cannot duplicate fd" + msgstr "" + + #: shell.c:302 + msgid "could not find /tmp, please create!" + msgstr "" + + #: shell.c:306 + msgid "/tmp must be a valid directory name" + msgstr "" + + #: shell.c:839 + #, c-format + msgid "%c%c: invalid option" + msgstr "" + + #: shell.c:1590 + msgid "I have no name!" + msgstr "" + + #: shell.c:1725 + #, c-format + msgid "" + "Usage:\t%s [GNU long option] [option] ...\n" + "\t%s [GNU long option] [option] script-file ...\n" + msgstr "" + + #: shell.c:1727 + msgid "GNU long options:\n" + msgstr "" + + #: shell.c:1731 + msgid "Shell options:\n" + msgstr "" + + #: shell.c:1732 + msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n" + msgstr "" + + #: shell.c:1747 + #, c-format + msgid "\t-%s or -o option\n" + msgstr "" + + #: shell.c:1753 + #, c-format + msgid "Type `%s -c \"help set\"' for more information about shell options.\n" + msgstr "" + + #: shell.c:1754 + #, c-format + msgid "Type `%s -c help' for more information about shell builtin commands.\n" + msgstr "" + + #: shell.c:1755 + msgid "Use the `bashbug' command to report bugs.\n" + msgstr "" + + #: sig.c:485 + #, c-format + msgid "sigprocmask: %d: invalid operation" + msgstr "" + + #: subst.c:1011 + #, c-format + msgid "bad substitution: no closing `%s' in %s" + msgstr "" + + #: subst.c:2020 + #, c-format + msgid "%s: cannot assign list to array member" + msgstr "" + + #: subst.c:3516 subst.c:3532 + msgid "cannot make pipe for process substitution" + msgstr "" + + #: subst.c:3563 + msgid "cannot make child for process substitution" + msgstr "" + + #: subst.c:3608 + #, c-format + msgid "cannot open named pipe %s for reading" + msgstr "" + + #: subst.c:3610 + #, c-format + msgid "cannot open named pipe %s for writing" + msgstr "" + + #: subst.c:3618 + #, c-format + msgid "cannout reset nodelay mode for fd %d" + msgstr "" + + #: subst.c:3628 + #, c-format + msgid "cannot duplicate named pipe %s as fd %d" + msgstr "" + + #: subst.c:3803 + msgid "cannot make pipe for command substitution" + msgstr "" + + #: subst.c:3832 + msgid "cannot make child for command substitution" + msgstr "" + + #: subst.c:3849 + msgid "command_substitute: cannot duplicate pipe as fd 1" + msgstr "" + + #: subst.c:4284 + #, c-format + msgid "%s: parameter null or not set" + msgstr "" + + #: subst.c:4529 + #, c-format + msgid "%s: substring expression < 0" + msgstr "" + + #: subst.c:5209 + #, c-format + msgid "%s: bad substitution" + msgstr "" + + #: subst.c:5283 + #, c-format + msgid "$%s: cannot assign in this way" + msgstr "" + + #: subst.c:6652 + #, c-format + msgid "no match: %s" + msgstr "" + + #: test.c:154 + msgid "argument expected" + msgstr "" + + #: test.c:163 + #, c-format + msgid "%s: integer expression expected" + msgstr "" + + #: test.c:361 + msgid "`)' expected" + msgstr "" + + #: test.c:363 + #, c-format + msgid "`)' expected, found %s" + msgstr "" + + #: test.c:378 test.c:787 test.c:790 + #, c-format + msgid "%s: unary operator expected" + msgstr "" + + #: test.c:543 test.c:830 + #, c-format + msgid "%s: binary operator expected" + msgstr "" + + #: test.c:905 + msgid "missing `]'" + msgstr "" + + #: trap.c:194 + msgid "invalid signal number" + msgstr "" + + #: trap.c:309 + #, c-format + msgid "run_pending_traps: bad value in trap_list[%d]: %p" + msgstr "" + + #: trap.c:313 + #, c-format + msgid "" + "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" + msgstr "" + + #: trap.c:349 + #, c-format + msgid "trap_handler: bad signal %d" + msgstr "" + + #: variables.c:310 + #, c-format + msgid "error importing function definition for `%s'" + msgstr "" + + #: variables.c:670 + #, c-format + msgid "shell level (%d) too high, resetting to 1" + msgstr "" + + #: variables.c:1610 + msgid "make_local_variable: no function context at current scope" + msgstr "" + + #: variables.c:2709 + msgid "all_local_variables: no function context at current scope" + msgstr "" + + #: variables.c:2923 variables.c:2932 + #, c-format + msgid "invalid character %d in exportstr for %s" + msgstr "" + + #: variables.c:2938 + #, c-format + msgid "no `=' in exportstr for %s" + msgstr "" + + #: variables.c:3363 + msgid "pop_var_context: head of shell_variables not a function context" + msgstr "" + + #: variables.c:3376 + msgid "pop_var_context: no global_variables context" + msgstr "" + + #: variables.c:3442 + msgid "pop_scope: head of shell_variables not a temporary environment scope" + msgstr "" + + #: version.c:82 + msgid "Copyright (C) 2004 Free Software Foundation, Inc.\n" + msgstr "" + + #: xmalloc.c:93 + #, c-format + msgid "xmalloc: cannot allocate %lu bytes (%lu bytes allocated)" + msgstr "" + + #: xmalloc.c:95 + #, c-format + msgid "xmalloc: cannot allocate %lu bytes" + msgstr "" + + #: xmalloc.c:115 + #, c-format + msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" + msgstr "" + + #: xmalloc.c:117 + #, c-format + msgid "xrealloc: cannot allocate %lu bytes" + msgstr "" + + #: xmalloc.c:151 + #, c-format + msgid "xmalloc: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" + msgstr "" + + #: xmalloc.c:153 + #, c-format + msgid "xmalloc: %s:%d: cannot allocate %lu bytes" + msgstr "" + + #: xmalloc.c:175 + #, c-format + msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)" + msgstr "" + + #: xmalloc.c:177 + #, c-format + msgid "xrealloc: %s:%d: cannot allocate %lu bytes" + msgstr "" + + #: builtins.c:244 + msgid "`alias' with no arguments or with the -p option prints the list" + msgstr "" + + #: builtins.c:245 + msgid "of aliases in the form alias NAME=VALUE on standard output." + msgstr "" + + #: builtins.c:246 + msgid "Otherwise, an alias is defined for each NAME whose VALUE is given." + msgstr "" + + #: builtins.c:247 + msgid "A trailing space in VALUE causes the next word to be checked for" + msgstr "" + + #: builtins.c:248 + msgid "alias substitution when the alias is expanded. Alias returns" + msgstr "" + + #: builtins.c:249 + msgid "true unless a NAME is given for which no alias has been defined." + msgstr "" + + #: builtins.c:257 + msgid "" + "Remove NAMEs from the list of defined aliases. If the -a option is given," + msgstr "" + + #: builtins.c:258 + msgid "then remove all alias definitions." + msgstr "" + + #: builtins.c:266 + msgid "Bind a key sequence to a Readline function or a macro, or set" + msgstr "" + + #: builtins.c:267 + msgid "a Readline variable. The non-option argument syntax is equivalent" + msgstr "" + + #: builtins.c:268 + msgid "to that found in ~/.inputrc, but must be passed as a single argument:" + msgstr "" + + #: builtins.c:269 + msgid "bind '\"\\C-x\\C-r\": re-read-init-file'." + msgstr "" + + #: builtins.c:270 + msgid "bind accepts the following options:" + msgstr "" + + #: builtins.c:271 + msgid "" + " -m keymap Use `keymap' as the keymap for the duration of this" + msgstr "" + + #: builtins.c:272 + msgid " command. Acceptable keymap names are emacs," + msgstr "" + + #: builtins.c:273 + msgid "" + " emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move," + msgstr "" + + #: builtins.c:274 + msgid " vi-command, and vi-insert." + msgstr "" + + #: builtins.c:275 + msgid " -l List names of functions." + msgstr "" + + #: builtins.c:276 + msgid " -P List function names and bindings." + msgstr "" + + #: builtins.c:277 + msgid " -p List functions and bindings in a form that can be" + msgstr "" + + #: builtins.c:278 + msgid " reused as input." + msgstr "" + + #: builtins.c:279 + msgid " -r keyseq Remove the binding for KEYSEQ." + msgstr "" + + #: builtins.c:280 + msgid " -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when" + msgstr "" + + #: builtins.c:281 + msgid "\t\t\t\tKEYSEQ is entered." + msgstr "" + + #: builtins.c:282 + msgid " -f filename Read key bindings from FILENAME." + msgstr "" + + #: builtins.c:283 + msgid " -q function-name Query about which keys invoke the named function." + msgstr "" + + #: builtins.c:284 + msgid "" + " -u function-name Unbind all keys which are bound to the named function." + msgstr "" + + #: builtins.c:285 + msgid " -V List variable names and values" + msgstr "" + + #: builtins.c:286 + msgid " -v List variable names and values in a form that can" + msgstr "" + + #: builtins.c:287 + msgid " be reused as input." + msgstr "" + + #: builtins.c:288 + msgid "" + " -S List key sequences that invoke macros and their values" + msgstr "" + + #: builtins.c:289 + msgid "" + " -s List key sequences that invoke macros and their values" + msgstr "" + + #: builtins.c:290 + msgid " in a form that can be reused as input." + msgstr "" + + #: builtins.c:297 + msgid "Exit from within a FOR, WHILE or UNTIL loop. If N is specified," + msgstr "" + + #: builtins.c:298 + msgid "break N levels." + msgstr "" + + #: builtins.c:304 + msgid "Resume the next iteration of the enclosing FOR, WHILE or UNTIL loop." + msgstr "" + + #: builtins.c:305 + msgid "If N is specified, resume at the N-th enclosing loop." + msgstr "" + + #: builtins.c:311 + msgid "Run a shell builtin. This is useful when you wish to rename a" + msgstr "" + + #: builtins.c:312 + msgid "shell builtin to be a function, but need the functionality of the" + msgstr "" + + #: builtins.c:313 + msgid "builtin within the function itself." + msgstr "" + + #: builtins.c:334 + msgid "Change the current directory to DIR. The variable $HOME is the" + msgstr "" + + #: builtins.c:335 + msgid "default DIR. The variable CDPATH defines the search path for" + msgstr "" + + #: builtins.c:336 + msgid "the directory containing DIR. Alternative directory names in CDPATH" + msgstr "" + + #: builtins.c:337 + msgid "are separated by a colon (:). A null directory name is the same as" + msgstr "" + + #: builtins.c:338 + msgid "the current directory, i.e. `.'. If DIR begins with a slash (/)," + msgstr "" + + #: builtins.c:339 + msgid "then CDPATH is not used. If the directory is not found, and the" + msgstr "" + + #: builtins.c:340 + msgid "shell option `cdable_vars' is set, then try the word as a variable" + msgstr "" + + #: builtins.c:341 + msgid "name. If that variable has a value, then cd to the value of that" + msgstr "" + + #: builtins.c:342 + msgid "variable. The -P option says to use the physical directory structure" + msgstr "" + + #: builtins.c:343 + msgid "" + "instead of following symbolic links; the -L option forces symbolic links" + msgstr "" + + #: builtins.c:344 + msgid "to be followed." + msgstr "" + + #: builtins.c:350 + msgid "Print the current working directory. With the -P option, pwd prints" + msgstr "" + + #: builtins.c:351 + msgid "the physical directory, without any symbolic links; the -L option" + msgstr "" + + #: builtins.c:352 + msgid "makes pwd follow symbolic links." + msgstr "" + + #: builtins.c:358 + msgid "No effect; the command does nothing. A zero exit code is returned." + msgstr "" + + #: builtins.c:364 + msgid "Return a successful result." + msgstr "" + + #: builtins.c:370 + msgid "Return an unsuccessful result." + msgstr "" + + #: builtins.c:376 + msgid "Runs COMMAND with ARGS ignoring shell functions. If you have a shell" + msgstr "" + + #: builtins.c:377 + msgid "function called `ls', and you wish to call the command `ls', you can" + msgstr "" + + #: builtins.c:378 + msgid "say \"command ls\". If the -p option is given, a default value is used" + msgstr "" + + #: builtins.c:379 + msgid "for PATH that is guaranteed to find all of the standard utilities. If" + msgstr "" + + #: builtins.c:380 + msgid "the -V or -v option is given, a string is printed describing COMMAND." + msgstr "" + + #: builtins.c:381 + msgid "The -V option produces a more verbose description." + msgstr "" + + #: builtins.c:387 + msgid "Declare variables and/or give them attributes. If no NAMEs are" + msgstr "" + + #: builtins.c:388 + msgid "given, then display the values of variables instead. The -p option" + msgstr "" + + #: builtins.c:389 + msgid "will display the attributes and values of each NAME." + msgstr "" + + #: builtins.c:391 + msgid "The flags are:" + msgstr "" + + #: builtins.c:393 + msgid " -a\tto make NAMEs arrays (if supported)" + msgstr "" + + #: builtins.c:394 + msgid " -f\tto select from among function names only" + msgstr "" + + #: builtins.c:395 + msgid "" + " -F\tto display function names (and line number and source file name if" + msgstr "" + + #: builtins.c:396 + msgid "\tdebugging) without definitions" + msgstr "" + + #: builtins.c:397 + msgid " -i\tto make NAMEs have the `integer' attribute" + msgstr "" + + #: builtins.c:398 + msgid " -r\tto make NAMEs readonly" + msgstr "" + + #: builtins.c:399 + msgid " -t\tto make NAMEs have the `trace' attribute" + msgstr "" + + #: builtins.c:400 + msgid " -x\tto make NAMEs export" + msgstr "" + + #: builtins.c:402 + msgid "Variables with the integer attribute have arithmetic evaluation (see" + msgstr "" + + #: builtins.c:403 + msgid "`let') done when the variable is assigned to." + msgstr "" + + #: builtins.c:405 + msgid "When displaying values of variables, -f displays a function's name" + msgstr "" + + #: builtins.c:406 + msgid "and definition. The -F option restricts the display to function" + msgstr "" + + #: builtins.c:407 + msgid "name only." + msgstr "" + + #: builtins.c:409 + msgid "Using `+' instead of `-' turns off the given attribute instead. When" + msgstr "" + + #: builtins.c:410 + msgid "used in a function, makes NAMEs local, as with the `local' command." + msgstr "" + + #: builtins.c:416 + msgid "Obsolete. See `declare'." + msgstr "" + + #: builtins.c:422 + msgid "Create a local variable called NAME, and give it VALUE. LOCAL" + msgstr "" + + #: builtins.c:423 + msgid "can only be used within a function; it makes the variable NAME" + msgstr "" + + #: builtins.c:424 + msgid "have a visible scope restricted to that function and its children." + msgstr "" + + #: builtins.c:431 + msgid "Output the ARGs. If -n is specified, the trailing newline is" + msgstr "" + + #: builtins.c:432 + msgid "suppressed. If the -e option is given, interpretation of the" + msgstr "" + + #: builtins.c:433 + msgid "following backslash-escaped characters is turned on:" + msgstr "" + + #: builtins.c:434 + msgid "\t\\a\talert (bell)" + msgstr "" + + #: builtins.c:435 + msgid "\t\\b\tbackspace" + msgstr "" + + #: builtins.c:436 + msgid "\t\\c\tsuppress trailing newline" + msgstr "" + + #: builtins.c:437 + msgid "\t\\E\tescape character" + msgstr "" + + #: builtins.c:438 + msgid "\t\\f\tform feed" + msgstr "" + + #: builtins.c:439 + msgid "\t\\n\tnew line" + msgstr "" + + #: builtins.c:440 + msgid "\t\\r\tcarriage return" + msgstr "" + + #: builtins.c:441 + msgid "\t\\t\thorizontal tab" + msgstr "" + + #: builtins.c:442 + msgid "\t\\v\tvertical tab" + msgstr "" + + #: builtins.c:443 + msgid "\t\\\\\tbackslash" + msgstr "" + + #: builtins.c:444 + msgid "\t\\num\tthe character whose ASCII code is NUM (octal)." + msgstr "" + + #: builtins.c:446 + msgid "You can explicitly turn off the interpretation of the above characters" + msgstr "" + + #: builtins.c:447 + msgid "with the -E option." + msgstr "" + + #: builtins.c:455 + msgid "" + "Output the ARGs. If -n is specified, the trailing newline is suppressed." + msgstr "" + + #: builtins.c:462 + msgid "Enable and disable builtin shell commands. This allows" + msgstr "" + + #: builtins.c:463 + msgid "you to use a disk command which has the same name as a shell" + msgstr "" + + #: builtins.c:464 + msgid "builtin without specifying a full pathname. If -n is used, the" + msgstr "" + + #: builtins.c:465 + msgid "NAMEs become disabled; otherwise NAMEs are enabled. For example," + msgstr "" + + #: builtins.c:466 + msgid "to use the `test' found in $PATH instead of the shell builtin" + msgstr "" + + #: builtins.c:467 + msgid "version, type `enable -n test'. On systems supporting dynamic" + msgstr "" + + #: builtins.c:468 + msgid "loading, the -f option may be used to load new builtins from the" + msgstr "" + + #: builtins.c:469 + msgid "shared object FILENAME. The -d option will delete a builtin" + msgstr "" + + #: builtins.c:470 + msgid "previously loaded with -f. If no non-option names are given, or" + msgstr "" + + #: builtins.c:471 + msgid "the -p option is supplied, a list of builtins is printed. The" + msgstr "" + + #: builtins.c:472 + msgid "-a option means to print every builtin with an indication of whether" + msgstr "" + + #: builtins.c:473 + msgid "" + "or not it is enabled. The -s option restricts the output to the POSIX.2" + msgstr "" + + #: builtins.c:474 + msgid "" + "`special' builtins. The -n option displays a list of all disabled builtins." + msgstr "" + + #: builtins.c:480 + msgid "Read ARGs as input to the shell and execute the resulting command(s)." + msgstr "" + + #: builtins.c:486 + msgid "Getopts is used by shell procedures to parse positional parameters." + msgstr "" + + #: builtins.c:488 + msgid "OPTSTRING contains the option letters to be recognized; if a letter" + msgstr "" + + #: builtins.c:489 + msgid "is followed by a colon, the option is expected to have an argument," + msgstr "" + + #: builtins.c:490 + msgid "which should be separated from it by white space." + msgstr "" + + #: builtins.c:492 + msgid "Each time it is invoked, getopts will place the next option in the" + msgstr "" + + #: builtins.c:493 + msgid "shell variable $name, initializing name if it does not exist, and" + msgstr "" + + #: builtins.c:494 + msgid "the index of the next argument to be processed into the shell" + msgstr "" + + #: builtins.c:495 + msgid "variable OPTIND. OPTIND is initialized to 1 each time the shell or" + msgstr "" + + #: builtins.c:496 + msgid "a shell script is invoked. When an option requires an argument," + msgstr "" + + #: builtins.c:497 + msgid "getopts places that argument into the shell variable OPTARG." + msgstr "" + + #: builtins.c:499 + msgid "getopts reports errors in one of two ways. If the first character" + msgstr "" + + #: builtins.c:500 + msgid "of OPTSTRING is a colon, getopts uses silent error reporting. In" + msgstr "" + + #: builtins.c:501 + msgid "this mode, no error messages are printed. If an invalid option is" + msgstr "" + + #: builtins.c:502 + msgid "seen, getopts places the option character found into OPTARG. If a" + msgstr "" + + #: builtins.c:503 + msgid "required argument is not found, getopts places a ':' into NAME and" + msgstr "" + + #: builtins.c:504 + msgid "sets OPTARG to the option character found. If getopts is not in" + msgstr "" + + #: builtins.c:505 + msgid "silent mode, and an invalid option is seen, getopts places '?' into" + msgstr "" + + #: builtins.c:506 + msgid "NAME and unsets OPTARG. If a required argument is not found, a '?'" + msgstr "" + + #: builtins.c:507 + msgid "is placed in NAME, OPTARG is unset, and a diagnostic message is" + msgstr "" + + #: builtins.c:508 + msgid "printed." + msgstr "" + + #: builtins.c:510 + msgid "If the shell variable OPTERR has the value 0, getopts disables the" + msgstr "" + + #: builtins.c:511 + msgid "printing of error messages, even if the first character of" + msgstr "" + + #: builtins.c:512 + msgid "OPTSTRING is not a colon. OPTERR has the value 1 by default." + msgstr "" + + #: builtins.c:514 + msgid "Getopts normally parses the positional parameters ($0 - $9), but if" + msgstr "" + + #: builtins.c:515 + msgid "more arguments are given, they are parsed instead." + msgstr "" + + #: builtins.c:521 + msgid "Exec FILE, replacing this shell with the specified program." + msgstr "" + + #: builtins.c:522 + msgid "If FILE is not specified, the redirections take effect in this" + msgstr "" + + #: builtins.c:523 + msgid "shell. If the first argument is `-l', then place a dash in the" + msgstr "" + + #: builtins.c:524 + msgid "zeroth arg passed to FILE, as login does. If the `-c' option" + msgstr "" + + #: builtins.c:525 + msgid "is supplied, FILE is executed with a null environment. The `-a'" + msgstr "" + + #: builtins.c:526 + msgid "option means to make set argv[0] of the executed process to NAME." + msgstr "" + + #: builtins.c:527 + msgid "If the file cannot be executed and the shell is not interactive," + msgstr "" + + #: builtins.c:528 + msgid "then the shell exits, unless the shell option `execfail' is set." + msgstr "" + + #: builtins.c:534 + msgid "Exit the shell with a status of N. If N is omitted, the exit status" + msgstr "" + + #: builtins.c:535 + msgid "is that of the last command executed." + msgstr "" + + #: builtins.c:541 + msgid "Logout of a login shell." + msgstr "" + + #: builtins.c:548 + msgid "" + "fc is used to list or edit and re-execute commands from the history list." + msgstr "" + + #: builtins.c:549 + msgid "FIRST and LAST can be numbers specifying the range, or FIRST can be a" + msgstr "" + + #: builtins.c:550 + msgid "string, which means the most recent command beginning with that" + msgstr "" + + #: builtins.c:551 + msgid "string." + msgstr "" + + #: builtins.c:553 + msgid "" + " -e ENAME selects which editor to use. Default is FCEDIT, then EDITOR," + msgstr "" + + #: builtins.c:554 + msgid " then vi." + msgstr "" + + #: builtins.c:556 + msgid " -l means list lines instead of editing." + msgstr "" + + #: builtins.c:557 + msgid " -n means no line numbers listed." + msgstr "" + + #: builtins.c:558 + msgid "" + " -r means reverse the order of the lines (making it newest listed first)." + msgstr "" + + #: builtins.c:560 + msgid "With the `fc -s [pat=rep ...] [command]' format, the command is" + msgstr "" + + #: builtins.c:561 + msgid "re-executed after the substitution OLD=NEW is performed." + msgstr "" + + #: builtins.c:563 + msgid "A useful alias to use with this is r='fc -s', so that typing `r cc'" + msgstr "" + + #: builtins.c:564 + msgid "runs the last command beginning with `cc' and typing `r' re-executes" + msgstr "" + + #: builtins.c:565 + msgid "the last command." + msgstr "" + + #: builtins.c:573 + msgid "Place JOB_SPEC in the foreground, and make it the current job. If" + msgstr "" + + #: builtins.c:574 + msgid "JOB_SPEC is not present, the shell's notion of the current job is" + msgstr "" + + #: builtins.c:575 + msgid "used." + msgstr "" + + #: builtins.c:583 + msgid "Place JOB_SPEC in the background, as if it had been started with" + msgstr "" + + #: builtins.c:584 + msgid "`&'. If JOB_SPEC is not present, the shell's notion of the current" + msgstr "" + + #: builtins.c:585 + msgid "job is used." + msgstr "" + + #: builtins.c:592 + msgid "For each NAME, the full pathname of the command is determined and" + msgstr "" + + #: builtins.c:593 + msgid "remembered. If the -p option is supplied, PATHNAME is used as the" + msgstr "" + + #: builtins.c:594 + msgid "full pathname of NAME, and no path search is performed. The -r" + msgstr "" + + #: builtins.c:595 + msgid "option causes the shell to forget all remembered locations. The -d" + msgstr "" + + #: builtins.c:596 + msgid "option causes the shell to forget the remembered location of each NAME." + msgstr "" + + #: builtins.c:597 + msgid "If the -t option is supplied the full pathname to which each NAME" + msgstr "" + + #: builtins.c:598 + msgid "corresponds is printed. If multiple NAME arguments are supplied with" + msgstr "" + + #: builtins.c:599 + msgid "-t, the NAME is printed before the hashed full pathname. The -l option" + msgstr "" + + #: builtins.c:600 + msgid "causes output to be displayed in a format that may be reused as input." + msgstr "" + + #: builtins.c:601 + msgid "" + "If no arguments are given, information about remembered commands is " + "displayed." + msgstr "" + + #: builtins.c:608 + msgid "Display helpful information about builtin commands. If PATTERN is" + msgstr "" + + #: builtins.c:609 + msgid "specified, gives detailed help on all commands matching PATTERN," + msgstr "" + + #: builtins.c:610 + msgid "otherwise a list of the builtins is printed. The -s option" + msgstr "" + + #: builtins.c:611 + msgid "restricts the output for each builtin command matching PATTERN to" + msgstr "" + + #: builtins.c:612 + msgid "a short usage synopsis." + msgstr "" + + #: builtins.c:620 + msgid "Display the history list with line numbers. Lines listed with" + msgstr "" + + #: builtins.c:621 + msgid "with a `*' have been modified. Argument of N says to list only" + msgstr "" + + #: builtins.c:622 + msgid "the last N lines. The `-c' option causes the history list to be" + msgstr "" + + #: builtins.c:623 + msgid "cleared by deleting all of the entries. The `-d' option deletes" + msgstr "" + + #: builtins.c:624 + msgid "the history entry at offset OFFSET. The `-w' option writes out the" + msgstr "" + + #: builtins.c:625 + msgid "current history to the history file; `-r' means to read the file and" + msgstr "" + + #: builtins.c:626 + msgid "append the contents to the history list instead. `-a' means" + msgstr "" + + #: builtins.c:627 + msgid "to append history lines from this session to the history file." + msgstr "" + + #: builtins.c:628 + msgid "Argument `-n' means to read all history lines not already read" + msgstr "" + + #: builtins.c:629 + msgid "from the history file and append them to the history list." + msgstr "" + + #: builtins.c:631 + msgid "If FILENAME is given, then that is used as the history file else" + msgstr "" + + #: builtins.c:632 + msgid "if $HISTFILE has a value, that is used, else ~/.bash_history." + msgstr "" + + #: builtins.c:633 + msgid "If the -s option is supplied, the non-option ARGs are appended to" + msgstr "" + + #: builtins.c:634 + msgid "the history list as a single entry. The -p option means to perform" + msgstr "" + + #: builtins.c:635 + msgid "history expansion on each ARG and display the result, without storing" + msgstr "" + + #: builtins.c:636 + msgid "anything in the history list." + msgstr "" + + #: builtins.c:638 + msgid "If the $HISTTIMEFORMAT variable is set and not null, its value is used" + msgstr "" + + #: builtins.c:639 + msgid "as a format string for strftime(3) to print the time stamp associated" + msgstr "" + + #: builtins.c:640 + msgid "" + "with each displayed history entry. No time stamps are printed otherwise." + msgstr "" + + #: builtins.c:648 + msgid "Lists the active jobs. The -l option lists process id's in addition" + msgstr "" + + #: builtins.c:649 + msgid "to the normal information; the -p option lists process id's only." + msgstr "" + + #: builtins.c:650 + msgid "If -n is given, only processes that have changed status since the last" + msgstr "" + + #: builtins.c:651 + msgid "notification are printed. JOBSPEC restricts output to that job. The" + msgstr "" + + #: builtins.c:652 + msgid "-r and -s options restrict output to running and stopped jobs only," + msgstr "" + + #: builtins.c:653 + msgid "respectively. Without options, the status of all active jobs is" + msgstr "" + + #: builtins.c:654 + msgid "printed. If -x is given, COMMAND is run after all job specifications" + msgstr "" + + #: builtins.c:655 + msgid "" + "that appear in ARGS have been replaced with the process ID of that job's" + msgstr "" + + #: builtins.c:656 + msgid "process group leader." + msgstr "" + + #: builtins.c:664 + msgid "" + "By default, removes each JOBSPEC argument from the table of active jobs." + msgstr "" + + #: builtins.c:665 + msgid "" + "If the -h option is given, the job is not removed from the table, but is" + msgstr "" + + #: builtins.c:666 + msgid "marked so that SIGHUP is not sent to the job if the shell receives a" + msgstr "" + + #: builtins.c:667 + msgid "" + "SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove all" + msgstr "" + + #: builtins.c:668 + msgid "" + "jobs from the job table; the -r option means to remove only running jobs." + msgstr "" + + #: builtins.c:675 + msgid "Send the processes named by PID (or JOB) the signal SIGSPEC. If" + msgstr "" + + #: builtins.c:676 + msgid "SIGSPEC is not present, then SIGTERM is assumed. An argument of `-l'" + msgstr "" + + #: builtins.c:677 + msgid "lists the signal names; if arguments follow `-l' they are assumed to" + msgstr "" + + #: builtins.c:678 + msgid "be signal numbers for which names should be listed. Kill is a shell" + msgstr "" + + #: builtins.c:679 + msgid "builtin for two reasons: it allows job IDs to be used instead of" + msgstr "" + + #: builtins.c:680 + msgid "process IDs, and, if you have reached the limit on processes that" + msgstr "" + + #: builtins.c:681 + msgid "you can create, you don't have to start a process to kill another one." + msgstr "" + + #: builtins.c:687 + msgid "Each ARG is an arithmetic expression to be evaluated. Evaluation" + msgstr "" + + #: builtins.c:688 + msgid "is done in fixed-width integers with no check for overflow, though" + msgstr "" + + #: builtins.c:689 + msgid "division by 0 is trapped and flagged as an error. The following" + msgstr "" + + #: builtins.c:690 + msgid "list of operators is grouped into levels of equal-precedence operators." + msgstr "" + + #: builtins.c:691 + msgid "The levels are listed in order of decreasing precedence." + msgstr "" + + #: builtins.c:693 + msgid "\tid++, id--\tvariable post-increment, post-decrement" + msgstr "" + + #: builtins.c:694 + msgid "\t++id, --id\tvariable pre-increment, pre-decrement" + msgstr "" + + #: builtins.c:695 + msgid "\t-, +\t\tunary minus, plus" + msgstr "" + + #: builtins.c:696 + msgid "\t!, ~\t\tlogical and bitwise negation" + msgstr "" + + #: builtins.c:697 + msgid "\t**\t\texponentiation" + msgstr "" + + #: builtins.c:698 + msgid "\t*, /, %\t\tmultiplication, division, remainder" + msgstr "" + + #: builtins.c:699 + msgid "\t+, -\t\taddition, subtraction" + msgstr "" + + #: builtins.c:700 + msgid "\t<<, >>\t\tleft and right bitwise shifts" + msgstr "" + + #: builtins.c:701 + msgid "\t<=, >=, <, >\tcomparison" + msgstr "" + + #: builtins.c:702 + msgid "\t==, !=\t\tequality, inequality" + msgstr "" + + #: builtins.c:703 + msgid "\t&\t\tbitwise AND" + msgstr "" + + #: builtins.c:704 + msgid "\t^\t\tbitwise XOR" + msgstr "" + + #: builtins.c:705 + msgid "\t|\t\tbitwise OR" + msgstr "" + + #: builtins.c:706 + msgid "\t&&\t\tlogical AND" + msgstr "" + + #: builtins.c:707 + msgid "\t||\t\tlogical OR" + msgstr "" + + #: builtins.c:708 + msgid "\texpr ? expr : expr" + msgstr "" + + #: builtins.c:709 + msgid "\t\t\tconditional operator" + msgstr "" + + #: builtins.c:710 + msgid "\t=, *=, /=, %=," + msgstr "" + + #: builtins.c:711 + msgid "\t+=, -=, <<=, >>=," + msgstr "" + + #: builtins.c:712 + msgid "\t&=, ^=, |=\tassignment" + msgstr "" + + #: builtins.c:714 + msgid "Shell variables are allowed as operands. The name of the variable" + msgstr "" + + #: builtins.c:715 + msgid "is replaced by its value (coerced to a fixed-width integer) within" + msgstr "" + + #: builtins.c:716 + msgid "an expression. The variable need not have its integer attribute" + msgstr "" + + #: builtins.c:717 + msgid "turned on to be used in an expression." + msgstr "" + + #: builtins.c:719 + msgid "Operators are evaluated in order of precedence. Sub-expressions in" + msgstr "" + + #: builtins.c:720 + msgid "parentheses are evaluated first and may override the precedence" + msgstr "" + + #: builtins.c:721 + msgid "rules above." + msgstr "" + + #: builtins.c:723 + msgid "If the last ARG evaluates to 0, let returns 1; 0 is returned" + msgstr "" + + #: builtins.c:724 + msgid "otherwise." + msgstr "" + + #: builtins.c:730 + msgid "" + "One line is read from the standard input, or from file descriptor FD if the" + msgstr "" + + #: builtins.c:731 + msgid "" + "-u option is supplied, and the first word is assigned to the first NAME," + msgstr "" + + #: builtins.c:732 + msgid "" + "the second word to the second NAME, and so on, with leftover words assigned" + msgstr "" + + #: builtins.c:733 + msgid "" + "to the last NAME. Only the characters found in $IFS are recognized as word" + msgstr "" + + #: builtins.c:734 + msgid "" + "delimiters. If no NAMEs are supplied, the line read is stored in the REPLY" + msgstr "" + + #: builtins.c:735 + msgid "variable. If the -r option is given, this signifies `raw' input, and" + msgstr "" + + #: builtins.c:736 + msgid "backslash escaping is disabled. The -d option causes read to continue" + msgstr "" + + #: builtins.c:737 + msgid "" + "until the first character of DELIM is read, rather than newline. If the -p" + msgstr "" + + #: builtins.c:738 + msgid "" + "option is supplied, the string PROMPT is output without a trailing newline" + msgstr "" + + #: builtins.c:739 + msgid "" + "before attempting to read. If -a is supplied, the words read are assigned" + msgstr "" + + #: builtins.c:740 + msgid "" + "to sequential indices of ARRAY, starting at zero. If -e is supplied and" + msgstr "" + + #: builtins.c:741 + msgid "" + "the shell is interactive, readline is used to obtain the line. If -n is" + msgstr "" + + #: builtins.c:742 + msgid "supplied with a non-zero NCHARS argument, read returns after NCHARS" + msgstr "" + + #: builtins.c:743 + msgid "characters have been read. The -s option causes input coming from a" + msgstr "" + + #: builtins.c:744 + msgid "terminal to not be echoed." + msgstr "" + + #: builtins.c:746 + msgid "" + "The -t option causes read to time out and return failure if a complete line" + msgstr "" + + #: builtins.c:747 + msgid "" + "of input is not read within TIMEOUT seconds. If the TMOUT variable is set," + msgstr "" + + #: builtins.c:748 + msgid "" + "its value is the default timeout. The return code is zero, unless end-of-" + "file" + msgstr "" + + #: builtins.c:749 + msgid "" + "is encountered, read times out, or an invalid file descriptor is supplied as" + msgstr "" + + #: builtins.c:750 + msgid "the argument to -u." + msgstr "" + + #: builtins.c:756 + msgid "Causes a function to exit with the return value specified by N. If N" + msgstr "" + + #: builtins.c:757 + msgid "is omitted, the return status is that of the last command." + msgstr "" + + #: builtins.c:763 + msgid " -a Mark variables which are modified or created for export." + msgstr "" + + #: builtins.c:764 + msgid " -b Notify of job termination immediately." + msgstr "" + + #: builtins.c:765 + msgid " -e Exit immediately if a command exits with a non-zero status." + msgstr "" + + #: builtins.c:766 + msgid " -f Disable file name generation (globbing)." + msgstr "" + + #: builtins.c:767 + msgid " -h Remember the location of commands as they are looked up." + msgstr "" + + #: builtins.c:768 + msgid " -k All assignment arguments are placed in the environment for a" + msgstr "" + + #: builtins.c:769 + msgid " command, not just those that precede the command name." + msgstr "" + + #: builtins.c:770 + msgid " -m Job control is enabled." + msgstr "" + + #: builtins.c:771 + msgid " -n Read commands but do not execute them." + msgstr "" + + #: builtins.c:772 + msgid " -o option-name" + msgstr "" + + #: builtins.c:773 + msgid " Set the variable corresponding to option-name:" + msgstr "" + + #: builtins.c:774 + msgid " allexport same as -a" + msgstr "" + + #: builtins.c:775 + msgid " braceexpand same as -B" + msgstr "" + + #: builtins.c:777 + msgid " emacs use an emacs-style line editing interface" + msgstr "" + + #: builtins.c:779 + msgid " errexit same as -e" + msgstr "" + + #: builtins.c:780 + msgid " errtrace same as -E" + msgstr "" + + #: builtins.c:781 + msgid " functrace same as -T" + msgstr "" + + #: builtins.c:782 + msgid " hashall same as -h" + msgstr "" + + #: builtins.c:784 + msgid " histexpand same as -H" + msgstr "" + + #: builtins.c:787 + msgid " history enable command history" + msgstr "" + + #: builtins.c:789 + msgid " ignoreeof the shell will not exit upon reading EOF" + msgstr "" + + #: builtins.c:790 + msgid " interactive-comments" + msgstr "" + + #: builtins.c:791 + msgid "" + " allow comments to appear in interactive commands" + msgstr "" + + #: builtins.c:792 + msgid " keyword same as -k" + msgstr "" + + #: builtins.c:793 + msgid " monitor same as -m" + msgstr "" + + #: builtins.c:794 + msgid " noclobber same as -C" + msgstr "" + + #: builtins.c:795 + msgid " noexec same as -n" + msgstr "" + + #: builtins.c:796 + msgid " noglob same as -f" + msgstr "" + + #: builtins.c:797 + msgid " nolog currently accepted but ignored" + msgstr "" + + #: builtins.c:798 + msgid " notify same as -b" + msgstr "" + + #: builtins.c:799 + msgid " nounset same as -u" + msgstr "" + + #: builtins.c:800 + msgid " onecmd same as -t" + msgstr "" + + #: builtins.c:801 + msgid " physical same as -P" + msgstr "" + + #: builtins.c:802 + msgid "" + " pipefail the return value of a pipeline is the status of" + msgstr "" + + #: builtins.c:803 + msgid "" + " the last command to exit with a non-zero status," + msgstr "" + + #: builtins.c:804 + msgid "" + " or zero if no command exited with a non-zero status" + msgstr "" + + #: builtins.c:805 + msgid " posix change the behavior of bash where the default" + msgstr "" + + #: builtins.c:806 + msgid " operation differs from the 1003.2 standard to" + msgstr "" + + #: builtins.c:807 + msgid " match the standard" + msgstr "" + + #: builtins.c:808 + msgid " privileged same as -p" + msgstr "" + + #: builtins.c:809 + msgid " verbose same as -v" + msgstr "" + + #: builtins.c:811 + msgid " vi use a vi-style line editing interface" + msgstr "" + + #: builtins.c:813 + msgid " xtrace same as -x" + msgstr "" + + #: builtins.c:814 + msgid "" + " -p Turned on whenever the real and effective user ids do not match." + msgstr "" + + #: builtins.c:815 + msgid " Disables processing of the $ENV file and importing of shell" + msgstr "" + + #: builtins.c:816 + msgid "" + " functions. Turning this option off causes the effective uid and" + msgstr "" + + #: builtins.c:817 + msgid " gid to be set to the real uid and gid." + msgstr "" + + #: builtins.c:818 + msgid " -t Exit after reading and executing one command." + msgstr "" + + #: builtins.c:819 + msgid " -u Treat unset variables as an error when substituting." + msgstr "" + + #: builtins.c:820 + msgid " -v Print shell input lines as they are read." + msgstr "" + + #: builtins.c:821 + msgid " -x Print commands and their arguments as they are executed." + msgstr "" + + #: builtins.c:823 + msgid " -B the shell will perform brace expansion" + msgstr "" + + #: builtins.c:825 + msgid " -C If set, disallow existing regular files to be overwritten" + msgstr "" + + #: builtins.c:826 + msgid " by redirection of output." + msgstr "" + + #: builtins.c:827 + msgid " -E If set, the ERR trap is inherited by shell functions." + msgstr "" + + #: builtins.c:829 + msgid " -H Enable ! style history substitution. This flag is on" + msgstr "" + + #: builtins.c:830 + msgid " by default." + msgstr "" + + #: builtins.c:832 + msgid " -P If set, do not follow symbolic links when executing commands" + msgstr "" + + #: builtins.c:833 + msgid " such as cd which change the current directory." + msgstr "" + + #: builtins.c:834 + msgid " -T If set, the DEBUG trap is inherited by shell functions." + msgstr "" + + #: builtins.c:836 + msgid "Using + rather than - causes these flags to be turned off. The" + msgstr "" + + #: builtins.c:837 + msgid "flags can also be used upon invocation of the shell. The current" + msgstr "" + + #: builtins.c:838 + msgid "set of flags may be found in $-. The remaining n ARGs are positional" + msgstr "" + + #: builtins.c:839 + msgid "parameters and are assigned, in order, to $1, $2, .. $n. If no" + msgstr "" + + #: builtins.c:840 + msgid "ARGs are given, all shell variables are printed." + msgstr "" + + #: builtins.c:846 + msgid "For each NAME, remove the corresponding variable or function. Given" + msgstr "" + + #: builtins.c:847 + msgid "the `-v', unset will only act on variables. Given the `-f' flag," + msgstr "" + + #: builtins.c:848 + msgid "unset will only act on functions. With neither flag, unset first" + msgstr "" + + #: builtins.c:849 + msgid "tries to unset a variable, and if that fails, then tries to unset a" + msgstr "" + + #: builtins.c:850 + msgid "function. Some variables cannot be unset; also see readonly." + msgstr "" + + #: builtins.c:856 + msgid "NAMEs are marked for automatic export to the environment of" + msgstr "" + + #: builtins.c:857 + msgid "subsequently executed commands. If the -f option is given," + msgstr "" + + #: builtins.c:858 + msgid "the NAMEs refer to functions. If no NAMEs are given, or if `-p'" + msgstr "" + + #: builtins.c:859 + msgid "is given, a list of all names that are exported in this shell is" + msgstr "" + + #: builtins.c:860 + msgid "printed. An argument of `-n' says to remove the export property" + msgstr "" + + #: builtins.c:861 + msgid "from subsequent NAMEs. An argument of `--' disables further option" + msgstr "" + + #: builtins.c:862 builtins.c:874 + msgid "processing." + msgstr "" + + #: builtins.c:868 + msgid "The given NAMEs are marked readonly and the values of these NAMEs may" + msgstr "" + + #: builtins.c:869 + msgid "not be changed by subsequent assignment. If the -f option is given," + msgstr "" + + #: builtins.c:870 + msgid "then functions corresponding to the NAMEs are so marked. If no" + msgstr "" + + #: builtins.c:871 + msgid "arguments are given, or if `-p' is given, a list of all readonly names" + msgstr "" + + #: builtins.c:872 + msgid "is printed. The `-a' option means to treat each NAME as" + msgstr "" + + #: builtins.c:873 + msgid "an array variable. An argument of `--' disables further option" + msgstr "" + + #: builtins.c:880 + msgid "The positional parameters from $N+1 ... are renamed to $1 ... If N is" + msgstr "" + + #: builtins.c:881 + msgid "not given, it is assumed to be 1." + msgstr "" + + #: builtins.c:887 builtins.c:896 + msgid "Read and execute commands from FILENAME and return. The pathnames" + msgstr "" + + #: builtins.c:888 builtins.c:897 + msgid "in $PATH are used to find the directory containing FILENAME. If any" + msgstr "" + + #: builtins.c:889 builtins.c:898 + msgid "ARGUMENTS are supplied, they become the positional parameters when" + msgstr "" + + #: builtins.c:890 builtins.c:899 + msgid "FILENAME is executed." + msgstr "" + + #: builtins.c:906 + msgid "Suspend the execution of this shell until it receives a SIGCONT" + msgstr "" + + #: builtins.c:907 + msgid "signal. The `-f' if specified says not to complain about this" + msgstr "" + + #: builtins.c:908 + msgid "being a login shell if it is; just suspend anyway." + msgstr "" + + #: builtins.c:915 + msgid "Exits with a status of 0 (true) or 1 (false) depending on" + msgstr "" + + #: builtins.c:916 + msgid "the evaluation of EXPR. Expressions may be unary or binary. Unary" + msgstr "" + + #: builtins.c:917 + msgid "expressions are often used to examine the status of a file. There" + msgstr "" + + #: builtins.c:918 + msgid "are string operators as well, and numeric comparison operators." + msgstr "" + + #: builtins.c:920 + msgid "File operators:" + msgstr "" + + #: builtins.c:922 + msgid " -a FILE True if file exists." + msgstr "" + + #: builtins.c:923 + msgid " -b FILE True if file is block special." + msgstr "" + + #: builtins.c:924 + msgid " -c FILE True if file is character special." + msgstr "" + + #: builtins.c:925 + msgid " -d FILE True if file is a directory." + msgstr "" + + #: builtins.c:926 + msgid " -e FILE True if file exists." + msgstr "" + + #: builtins.c:927 + msgid " -f FILE True if file exists and is a regular file." + msgstr "" + + #: builtins.c:928 + msgid " -g FILE True if file is set-group-id." + msgstr "" + + #: builtins.c:929 + msgid " -h FILE True if file is a symbolic link." + msgstr "" + + #: builtins.c:930 + msgid " -L FILE True if file is a symbolic link." + msgstr "" + + #: builtins.c:931 + msgid " -k FILE True if file has its `sticky' bit set." + msgstr "" + + #: builtins.c:932 + msgid " -p FILE True if file is a named pipe." + msgstr "" + + #: builtins.c:933 + msgid " -r FILE True if file is readable by you." + msgstr "" + + #: builtins.c:934 + msgid " -s FILE True if file exists and is not empty." + msgstr "" + + #: builtins.c:935 + msgid " -S FILE True if file is a socket." + msgstr "" + + #: builtins.c:936 + msgid " -t FD True if FD is opened on a terminal." + msgstr "" + + #: builtins.c:937 + msgid " -u FILE True if the file is set-user-id." + msgstr "" + + #: builtins.c:938 + msgid " -w FILE True if the file is writable by you." + msgstr "" + + #: builtins.c:939 + msgid " -x FILE True if the file is executable by you." + msgstr "" + + #: builtins.c:940 + msgid " -O FILE True if the file is effectively owned by you." + msgstr "" + + #: builtins.c:941 + msgid " -G FILE True if the file is effectively owned by your group." + msgstr "" + + #: builtins.c:942 + msgid "" + " -N FILE True if the file has been modified since it was last read." + msgstr "" + + #: builtins.c:944 + msgid " FILE1 -nt FILE2 True if file1 is newer than file2 (according to" + msgstr "" + + #: builtins.c:945 + msgid " modification date)." + msgstr "" + + #: builtins.c:947 + msgid " FILE1 -ot FILE2 True if file1 is older than file2." + msgstr "" + + #: builtins.c:949 + msgid " FILE1 -ef FILE2 True if file1 is a hard link to file2." + msgstr "" + + #: builtins.c:951 + msgid "String operators:" + msgstr "" + + #: builtins.c:953 + msgid " -z STRING True if string is empty." + msgstr "" + + #: builtins.c:955 + msgid " -n STRING" + msgstr "" + + #: builtins.c:956 + msgid " STRING True if string is not empty." + msgstr "" + + #: builtins.c:958 + msgid " STRING1 = STRING2" + msgstr "" + + #: builtins.c:959 + msgid " True if the strings are equal." + msgstr "" + + #: builtins.c:960 + msgid " STRING1 != STRING2" + msgstr "" + + #: builtins.c:961 + msgid " True if the strings are not equal." + msgstr "" + + #: builtins.c:962 + msgid " STRING1 < STRING2" + msgstr "" + + #: builtins.c:963 + msgid "" + " True if STRING1 sorts before STRING2 lexicographically." + msgstr "" + + #: builtins.c:964 + msgid " STRING1 > STRING2" + msgstr "" + + #: builtins.c:965 + msgid "" + " True if STRING1 sorts after STRING2 lexicographically." + msgstr "" + + #: builtins.c:967 + msgid "Other operators:" + msgstr "" + + #: builtins.c:969 + msgid " -o OPTION True if the shell option OPTION is enabled." + msgstr "" + + #: builtins.c:970 + msgid " ! EXPR True if expr is false." + msgstr "" + + #: builtins.c:971 + msgid " EXPR1 -a EXPR2 True if both expr1 AND expr2 are true." + msgstr "" + + #: builtins.c:972 + msgid " EXPR1 -o EXPR2 True if either expr1 OR expr2 is true." + msgstr "" + + #: builtins.c:974 + msgid " arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne," + msgstr "" + + #: builtins.c:975 + msgid " -lt, -le, -gt, or -ge." + msgstr "" + + #: builtins.c:977 + msgid "Arithmetic binary operators return true if ARG1 is equal, not-equal," + msgstr "" + + #: builtins.c:978 + msgid "less-than, less-than-or-equal, greater-than, or greater-than-or-equal" + msgstr "" + + #: builtins.c:979 + msgid "than ARG2." + msgstr "" + + #: builtins.c:985 + msgid "This is a synonym for the \"test\" builtin, but the last" + msgstr "" + + #: builtins.c:986 + msgid "argument must be a literal `]', to match the opening `['." + msgstr "" + + #: builtins.c:992 + msgid "Print the accumulated user and system times for processes run from" + msgstr "" + + #: builtins.c:993 + msgid "the shell." + msgstr "" + + #: builtins.c:999 + msgid "The command ARG is to be read and executed when the shell receives" + msgstr "" + + #: builtins.c:1000 + msgid "signal(s) SIGNAL_SPEC. If ARG is absent all specified signals are" + msgstr "" + + #: builtins.c:1001 + msgid "reset to their original values. If ARG is the null string each" + msgstr "" + + #: builtins.c:1002 + msgid "SIGNAL_SPEC is ignored by the shell and by the commands it invokes." + msgstr "" + + #: builtins.c:1003 + msgid "If a SIGNAL_SPEC is EXIT (0) the command ARG is executed on exit from" + msgstr "" + + #: builtins.c:1004 + msgid "the shell. If a SIGNAL_SPEC is DEBUG, ARG is executed after every" + msgstr "" + + #: builtins.c:1005 + msgid "command. If ARG is `-p' then the trap commands associated with" + msgstr "" + + #: builtins.c:1006 + msgid "each SIGNAL_SPEC are displayed. If no arguments are supplied or if" + msgstr "" + + #: builtins.c:1007 + msgid "only `-p' is given, trap prints the list of commands associated with" + msgstr "" + + #: builtins.c:1008 + msgid "" + "each signal number. Each SIGNAL_SPEC is either a signal name in " + msgstr "" + + #: builtins.c:1009 + msgid "or a signal number. `trap -l' prints a list of signal names and their" + msgstr "" + + #: builtins.c:1010 + msgid "corresponding numbers. Note that a signal can be sent to the shell" + msgstr "" + + #: builtins.c:1011 + msgid "with \"kill -signal $$\"." + msgstr "" + + #: builtins.c:1017 + msgid "For each NAME, indicate how it would be interpreted if used as a" + msgstr "" + + #: builtins.c:1018 + msgid "command name." + msgstr "" + + #: builtins.c:1020 + msgid "If the -t option is used, `type' outputs a single word which is one of" + msgstr "" + + #: builtins.c:1021 + msgid "`alias', `keyword', `function', `builtin', `file' or `', if NAME is an" + msgstr "" + + #: builtins.c:1022 + msgid "alias, shell reserved word, shell function, shell builtin, disk file," + msgstr "" + + #: builtins.c:1023 + msgid "or unfound, respectively." + msgstr "" + + #: builtins.c:1025 + msgid "If the -p flag is used, `type' either returns the name of the disk" + msgstr "" + + #: builtins.c:1026 + msgid "file that would be executed, or nothing if `type -t NAME' would not" + msgstr "" + + #: builtins.c:1027 + msgid "return `file'." + msgstr "" + + #: builtins.c:1029 + msgid "If the -a flag is used, `type' displays all of the places that contain" + msgstr "" + + #: builtins.c:1030 + msgid "an executable named `file'. This includes aliases, builtins, and" + msgstr "" + + #: builtins.c:1031 + msgid "functions, if and only if the -p flag is not also used." + msgstr "" + + #: builtins.c:1033 + msgid "The -f flag suppresses shell function lookup." + msgstr "" + + #: builtins.c:1035 + msgid "The -P flag forces a PATH search for each NAME, even if it is an alias," + msgstr "" + + #: builtins.c:1036 + msgid "builtin, or function, and returns the name of the disk file that would" + msgstr "" + + #: builtins.c:1037 + msgid "be executed." + msgstr "" + + #: builtins.c:1044 + msgid "Ulimit provides control over the resources available to processes" + msgstr "" + + #: builtins.c:1045 + msgid "started by the shell, on systems that allow such control. If an" + msgstr "" + + #: builtins.c:1046 + msgid "option is given, it is interpreted as follows:" + msgstr "" + + #: builtins.c:1048 + msgid " -S\tuse the `soft' resource limit" + msgstr "" + + #: builtins.c:1049 + msgid " -H\tuse the `hard' resource limit" + msgstr "" + + #: builtins.c:1050 + msgid " -a\tall current limits are reported" + msgstr "" + + #: builtins.c:1051 + msgid " -c\tthe maximum size of core files created" + msgstr "" + + #: builtins.c:1052 + msgid " -d\tthe maximum size of a process's data segment" + msgstr "" + + #: builtins.c:1053 + msgid " -f\tthe maximum size of files created by the shell" + msgstr "" + + #: builtins.c:1054 + msgid " -l\tthe maximum size a process may lock into memory" + msgstr "" + + #: builtins.c:1055 + msgid " -m\tthe maximum resident set size" + msgstr "" + + #: builtins.c:1056 + msgid " -n\tthe maximum number of open file descriptors" + msgstr "" + + #: builtins.c:1057 + msgid " -p\tthe pipe buffer size" + msgstr "" + + #: builtins.c:1058 + msgid " -s\tthe maximum stack size" + msgstr "" + + #: builtins.c:1059 + msgid " -t\tthe maximum amount of cpu time in seconds" + msgstr "" + + #: builtins.c:1060 + msgid " -u\tthe maximum number of user processes" + msgstr "" + + #: builtins.c:1061 + msgid " -v\tthe size of virtual memory" + msgstr "" + + #: builtins.c:1063 + msgid "If LIMIT is given, it is the new value of the specified resource;" + msgstr "" + + #: builtins.c:1064 + msgid "the special LIMIT values `soft', `hard', and `unlimited' stand for" + msgstr "" + + #: builtins.c:1065 + msgid "" + "the current soft limit, the current hard limit, and no limit, respectively." + msgstr "" + + #: builtins.c:1066 + msgid "Otherwise, the current value of the specified resource is printed." + msgstr "" + + #: builtins.c:1067 + msgid "If no option is given, then -f is assumed. Values are in 1024-byte" + msgstr "" + + #: builtins.c:1068 + msgid "increments, except for -t, which is in seconds, -p, which is in" + msgstr "" + + #: builtins.c:1069 + msgid "increments of 512 bytes, and -u, which is an unscaled number of" + msgstr "" + + #: builtins.c:1070 + msgid "processes." + msgstr "" + + #: builtins.c:1077 + msgid "The user file-creation mask is set to MODE. If MODE is omitted, or if" + msgstr "" + + #: builtins.c:1078 + msgid "`-S' is supplied, the current value of the mask is printed. The `-S'" + msgstr "" + + #: builtins.c:1079 + msgid "option makes the output symbolic; otherwise an octal number is output." + msgstr "" + + #: builtins.c:1080 + msgid "If `-p' is supplied, and MODE is omitted, the output is in a form" + msgstr "" + + #: builtins.c:1081 + msgid "that may be used as input. If MODE begins with a digit, it is" + msgstr "" + + #: builtins.c:1082 + msgid "interpreted as an octal number, otherwise it is a symbolic mode string" + msgstr "" + + #: builtins.c:1083 + msgid "like that accepted by chmod(1)." + msgstr "" + + #: builtins.c:1090 builtins.c:1102 + msgid "Wait for the specified process and report its termination status. If" + msgstr "" + + #: builtins.c:1091 builtins.c:1103 + msgid "N is not given, all currently active child processes are waited for," + msgstr "" + + #: builtins.c:1092 + msgid "and the return code is zero. N may be a process ID or a job" + msgstr "" + + #: builtins.c:1093 + msgid "specification; if a job spec is given, all processes in the job's" + msgstr "" + + #: builtins.c:1094 + msgid "pipeline are waited for." + msgstr "" + + #: builtins.c:1104 + msgid "and the return code is zero. N is a process ID; if it is not given," + msgstr "" + + #: builtins.c:1105 + msgid "all child processes of the shell are waited for." + msgstr "" + + #: builtins.c:1112 + msgid "The `for' loop executes a sequence of commands for each member in a" + msgstr "" + + #: builtins.c:1113 + msgid "list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is" + msgstr "" + + #: builtins.c:1114 + msgid "assumed. For each element in WORDS, NAME is set to that element, and" + msgstr "" + + #: builtins.c:1115 + msgid "the COMMANDS are executed." + msgstr "" + + #: builtins.c:1121 + msgid "Equivalent to" + msgstr "" + + #: builtins.c:1122 + msgid "\t(( EXP1 ))" + msgstr "" + + #: builtins.c:1123 + msgid "\twhile (( EXP2 )); do" + msgstr "" + + #: builtins.c:1124 + msgid "\t\tCOMMANDS" + msgstr "" + + #: builtins.c:1125 + msgid "\t\t(( EXP3 ))" + msgstr "" + + #: builtins.c:1126 + msgid "\tdone" + msgstr "" + + #: builtins.c:1127 + msgid "EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is" + msgstr "" + + #: builtins.c:1128 + msgid "omitted, it behaves as if it evaluates to 1." + msgstr "" + + #: builtins.c:1134 + msgid "The WORDS are expanded, generating a list of words. The" + msgstr "" + + #: builtins.c:1135 + msgid "set of expanded words is printed on the standard error, each" + msgstr "" + + #: builtins.c:1136 + msgid "preceded by a number. If `in WORDS' is not present, `in \"$@\"'" + msgstr "" + + #: builtins.c:1137 + msgid "is assumed. The PS3 prompt is then displayed and a line read" + msgstr "" + + #: builtins.c:1138 + msgid "from the standard input. If the line consists of the number" + msgstr "" + + #: builtins.c:1139 + msgid "corresponding to one of the displayed words, then NAME is set" + msgstr "" + + #: builtins.c:1140 + msgid "to that word. If the line is empty, WORDS and the prompt are" + msgstr "" + + #: builtins.c:1141 + msgid "redisplayed. If EOF is read, the command completes. Any other" + msgstr "" + + #: builtins.c:1142 + msgid "value read causes NAME to be set to null. The line read is saved" + msgstr "" + + #: builtins.c:1143 + msgid "in the variable REPLY. COMMANDS are executed after each selection" + msgstr "" + + #: builtins.c:1144 + msgid "until a break command is executed." + msgstr "" + + #: builtins.c:1150 + msgid "Execute PIPELINE and print a summary of the real time, user CPU time," + msgstr "" + + #: builtins.c:1151 + msgid "and system CPU time spent executing PIPELINE when it terminates." + msgstr "" + + #: builtins.c:1152 + msgid "The return status is the return status of PIPELINE. The `-p' option" + msgstr "" + + #: builtins.c:1153 + msgid "prints the timing summary in a slightly different format. This uses" + msgstr "" + + #: builtins.c:1154 + msgid "the value of the TIMEFORMAT variable as the output format." + msgstr "" + + #: builtins.c:1160 + msgid "Selectively execute COMMANDS based upon WORD matching PATTERN. The" + msgstr "" + + #: builtins.c:1161 + msgid "`|' is used to separate multiple patterns." + msgstr "" + + #: builtins.c:1167 + msgid "" + "The if COMMANDS are executed. If the exit status is zero, then the then" + msgstr "" + + #: builtins.c:1168 + msgid "" + "COMMANDS are executed. Otherwise, each of the elif COMMANDS are executed" + msgstr "" + + #: builtins.c:1169 + msgid "" + "in turn, and if the exit status is zero, the corresponding then COMMANDS" + msgstr "" + + #: builtins.c:1170 + msgid "" + "are executed and the if command completes. Otherwise, the else COMMANDS" + msgstr "" + + #: builtins.c:1171 + msgid "" + "are executed, if present. The exit status is the exit status of the last" + msgstr "" + + #: builtins.c:1172 + msgid "command executed, or zero if no condition tested true." + msgstr "" + + #: builtins.c:1178 builtins.c:1185 + msgid "Expand and execute COMMANDS as long as the final command in the" + msgstr "" + + #: builtins.c:1179 + msgid "`while' COMMANDS has an exit status of zero." + msgstr "" + + #: builtins.c:1186 + msgid "`until' COMMANDS has an exit status which is not zero." + msgstr "" + + #: builtins.c:1192 + msgid "Create a simple command invoked by NAME which runs COMMANDS." + msgstr "" + + #: builtins.c:1193 + msgid "Arguments on the command line along with NAME are passed to the" + msgstr "" + + #: builtins.c:1194 + msgid "function as $0 .. $n." + msgstr "" + + #: builtins.c:1200 + msgid "Run a set of commands in a group. This is one way to redirect an" + msgstr "" + + #: builtins.c:1201 + msgid "entire set of commands." + msgstr "" + + #: builtins.c:1207 + msgid "This is similar to the `fg' command. Resume a stopped or background" + msgstr "" + + #: builtins.c:1208 + msgid "job. If you specifiy DIGITS, then that job is used. If you specify" + msgstr "" + + #: builtins.c:1209 + msgid "WORD, then the job whose name begins with WORD is used. Following the" + msgstr "" + + #: builtins.c:1210 + msgid "job specification with a `&' places the job in the background." + msgstr "" + + #: builtins.c:1216 + msgid "The EXPRESSION is evaluated according to the rules for arithmetic" + msgstr "" + + #: builtins.c:1217 + msgid "evaluation. Equivalent to \"let EXPRESSION\"." + msgstr "" + + #: builtins.c:1223 + msgid "" + "Returns a status of 0 or 1 depending on the evaluation of the conditional" + msgstr "" + + #: builtins.c:1224 + msgid "" + "expression EXPRESSION. Expressions are composed of the same primaries used" + msgstr "" + + #: builtins.c:1225 + msgid "" + "by the `test' builtin, and may be combined using the following operators" + msgstr "" + + #: builtins.c:1227 + msgid "\t( EXPRESSION )\tReturns the value of EXPRESSION" + msgstr "" + + #: builtins.c:1228 + msgid "\t! EXPRESSION\tTrue if EXPRESSION is false; else false" + msgstr "" + + #: builtins.c:1229 + msgid "\tEXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false" + msgstr "" + + #: builtins.c:1230 + msgid "\tEXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false" + msgstr "" + + #: builtins.c:1232 + msgid "" + "When the `==' and `!=' operators are used, the string to the right of the" + msgstr "" + + #: builtins.c:1233 + msgid "operator is used as a pattern and pattern matching is performed. The" + msgstr "" + + #: builtins.c:1234 + msgid "&& and || operators do not evaluate EXPR2 if EXPR1 is sufficient to" + msgstr "" + + #: builtins.c:1235 + msgid "determine the expression's value." + msgstr "" + + #: builtins.c:1241 + msgid "BASH_VERSION Version information for this Bash." + msgstr "" + + #: builtins.c:1242 + msgid "CDPATH A colon separated list of directories to search" + msgstr "" + + #: builtins.c:1243 + msgid "\t\twhen the argument to `cd' is not found in the current" + msgstr "" + + #: builtins.c:1244 + msgid "\t\tdirectory." + msgstr "" + + #: builtins.c:1245 + msgid "GLOBIGNORE\tA colon-separated list of patterns describing filenames to" + msgstr "" + + #: builtins.c:1246 + msgid "\t\tbe ignored by pathname expansion." + msgstr "" + + #: builtins.c:1248 + msgid "" + "HISTFILE The name of the file where your command history is stored." + msgstr "" + + #: builtins.c:1249 + msgid "HISTFILESIZE The maximum number of lines this file can contain." + msgstr "" + + #: builtins.c:1250 + msgid "HISTSIZE The maximum number of history lines that a running" + msgstr "" + + #: builtins.c:1251 + msgid "\t\tshell can access." + msgstr "" + + #: builtins.c:1253 + msgid "HOME The complete pathname to your login directory." + msgstr "" + + #: builtins.c:1254 + msgid "HOSTNAME\tThe name of the current host." + msgstr "" + + #: builtins.c:1255 + msgid "HOSTTYPE The type of CPU this version of Bash is running under." + msgstr "" + + #: builtins.c:1256 + msgid "IGNOREEOF Controls the action of the shell on receipt of an EOF" + msgstr "" + + #: builtins.c:1257 + msgid "\t\tcharacter as the sole input. If set, then the value" + msgstr "" + + #: builtins.c:1258 + msgid "\t\tof it is the number of EOF characters that can be seen" + msgstr "" + + #: builtins.c:1259 + msgid "\t\tin a row on an empty line before the shell will exit" + msgstr "" + + #: builtins.c:1260 + msgid "\t\t(default 10). When unset, EOF signifies the end of input." + msgstr "" + + #: builtins.c:1261 + msgid "MACHTYPE\tA string describing the current system Bash is running on." + msgstr "" + + #: builtins.c:1262 + msgid "MAILCHECK\tHow often, in seconds, Bash checks for new mail." + msgstr "" + + #: builtins.c:1263 + msgid "MAILPATH\tA colon-separated list of filenames which Bash checks" + msgstr "" + + #: builtins.c:1264 + msgid "\t\tfor new mail." + msgstr "" + + #: builtins.c:1265 + msgid "OSTYPE\t\tThe version of Unix this version of Bash is running on." + msgstr "" + + #: builtins.c:1266 + msgid "PATH A colon-separated list of directories to search when" + msgstr "" + + #: builtins.c:1267 + msgid "\t\tlooking for commands." + msgstr "" + + #: builtins.c:1268 + msgid "PROMPT_COMMAND A command to be executed before the printing of each" + msgstr "" + + #: builtins.c:1269 + msgid "\t\tprimary prompt." + msgstr "" + + #: builtins.c:1270 + msgid "PS1 The primary prompt string." + msgstr "" + + #: builtins.c:1271 + msgid "PS2 The secondary prompt string." + msgstr "" + + #: builtins.c:1272 + msgid "PWD\t\tThe full pathname of the current directory." + msgstr "" + + #: builtins.c:1273 + msgid "SHELLOPTS\tA colon-separated list of enabled shell options." + msgstr "" + + #: builtins.c:1274 + msgid "TERM The name of the current terminal type." + msgstr "" + + #: builtins.c:1275 + msgid "TIMEFORMAT\tThe output format for timing statistics displayed by the" + msgstr "" + + #: builtins.c:1276 + msgid "\t\t`time' reserved word." + msgstr "" + + #: builtins.c:1277 + msgid "auto_resume Non-null means a command word appearing on a line by" + msgstr "" + + #: builtins.c:1278 + msgid "\t\titself is first looked for in the list of currently" + msgstr "" + + #: builtins.c:1279 + msgid "\t\tstopped jobs. If found there, that job is foregrounded." + msgstr "" + + #: builtins.c:1280 + msgid "\t\tA value of `exact' means that the command word must" + msgstr "" + + #: builtins.c:1281 + msgid "\t\texactly match a command in the list of stopped jobs. A" + msgstr "" + + #: builtins.c:1282 + msgid "\t\tvalue of `substring' means that the command word must" + msgstr "" + + #: builtins.c:1283 + msgid "\t\tmatch a substring of the job. Any other value means that" + msgstr "" + + #: builtins.c:1284 + msgid "\t\tthe command must be a prefix of a stopped job." + msgstr "" + + #: builtins.c:1287 + msgid "histchars Characters controlling history expansion and quick" + msgstr "" + + #: builtins.c:1288 + msgid "\t\tsubstitution. The first character is the history" + msgstr "" + + #: builtins.c:1289 + msgid "\t\tsubstitution character, usually `!'. The second is" + msgstr "" + + #: builtins.c:1290 + msgid "\t\tthe `quick substitution' character, usually `^'. The" + msgstr "" + + #: builtins.c:1291 + msgid "\t\tthird is the `history comment' character, usually `#'." + msgstr "" + + #: builtins.c:1293 + msgid "HISTIGNORE\tA colon-separated list of patterns used to decide which" + msgstr "" + + #: builtins.c:1294 + msgid "\t\tcommands should be saved on the history list." + msgstr "" + + #: builtins.c:1306 + msgid "+N\tRotates the stack so that the Nth directory (counting" + msgstr "" + + #: builtins.c:1307 + msgid "\tfrom the left of the list shown by `dirs', starting with" + msgstr "" + + #: builtins.c:1308 builtins.c:1312 + msgid "\tzero) is at the top." + msgstr "" + + #: builtins.c:1310 + msgid "-N\tRotates the stack so that the Nth directory (counting" + msgstr "" + + #: builtins.c:1311 + msgid "\tfrom the right of the list shown by `dirs', starting with" + msgstr "" + + #: builtins.c:1314 + msgid "-n\tsuppress the normal change of directory when adding directories" + msgstr "" + + #: builtins.c:1315 + msgid "\tto the stack, so only the stack is manipulated." + msgstr "" + + #: builtins.c:1317 + msgid "dir\tadds DIR to the directory stack at the top, making it the" + msgstr "" + + #: builtins.c:1318 + msgid "\tnew current working directory." + msgstr "" + + #: builtins.c:1332 + msgid "+N\tremoves the Nth entry counting from the left of the list" + msgstr "" + + #: builtins.c:1333 + msgid "\tshown by `dirs', starting with zero. For example: `popd +0'" + msgstr "" + + #: builtins.c:1334 + msgid "\tremoves the first directory, `popd +1' the second." + msgstr "" + + #: builtins.c:1336 + msgid "-N\tremoves the Nth entry counting from the right of the list" + msgstr "" + + #: builtins.c:1337 + msgid "\tshown by `dirs', starting with zero. For example: `popd -0'" + msgstr "" + + #: builtins.c:1338 + msgid "\tremoves the last directory, `popd -1' the next to last." + msgstr "" + + #: builtins.c:1340 + msgid "-n\tsuppress the normal change of directory when removing directories" + msgstr "" + + #: builtins.c:1341 + msgid "\tfrom the stack, so only the stack is manipulated." + msgstr "" + + #: builtins.c:1363 + msgid "+N\tdisplays the Nth entry counting from the left of the list shown by" + msgstr "" + + #: builtins.c:1364 builtins.c:1367 + msgid "\tdirs when invoked without options, starting with zero." + msgstr "" + + #: builtins.c:1366 + msgid "-N\tdisplays the Nth entry counting from the right of the list shown by" + msgstr "" + + #: builtins.c:1374 + msgid "Toggle the values of variables controlling optional behavior." + msgstr "" + + #: builtins.c:1375 + msgid "The -s flag means to enable (set) each OPTNAME; the -u flag" + msgstr "" + + #: builtins.c:1376 + msgid "unsets each OPTNAME. The -q flag suppresses output; the exit" + msgstr "" + + #: builtins.c:1377 + msgid "status indicates whether each OPTNAME is set or unset. The -o" + msgstr "" + + #: builtins.c:1378 + msgid "option restricts the OPTNAMEs to those defined for use with" + msgstr "" + + #: builtins.c:1379 + msgid "`set -o'. With no options, or with the -p option, a list of all" + msgstr "" + + #: builtins.c:1380 + msgid "settable options is displayed, with an indication of whether or" + msgstr "" + + #: builtins.c:1381 + msgid "not each is set." + msgstr "" + + #: builtins.c:1387 + msgid "printf formats and prints ARGUMENTS under control of the FORMAT. FORMAT" + msgstr "" + + #: builtins.c:1388 + msgid "is a character string which contains three types of objects: plain" + msgstr "" + + #: builtins.c:1389 + msgid "" + "characters, which are simply copied to standard output, character escape" + msgstr "" + + #: builtins.c:1390 + msgid "sequences which are converted and copied to the standard output, and" + msgstr "" + + #: builtins.c:1391 + msgid "" + "format specifications, each of which causes printing of the next successive" + msgstr "" + + #: builtins.c:1392 + msgid "argument. In addition to the standard printf(1) formats, %b means to" + msgstr "" + + #: builtins.c:1393 + msgid "expand backslash escape sequences in the corresponding argument, and %q" + msgstr "" + + #: builtins.c:1394 + msgid "means to quote the argument in a way that can be reused as shell input." + msgstr "" + + #: builtins.c:1401 + msgid "For each NAME, specify how arguments are to be completed." + msgstr "" + + #: builtins.c:1402 + msgid "If the -p option is supplied, or if no options are supplied, existing" + msgstr "" + + #: builtins.c:1403 + msgid "completion specifications are printed in a way that allows them to be" + msgstr "" + + #: builtins.c:1404 + msgid "reused as input. The -r option removes a completion specification for" + msgstr "" + + #: builtins.c:1405 + msgid "each NAME, or, if no NAMEs are supplied, all completion specifications." + msgstr "" + + #: builtins.c:1413 + msgid "Display the possible completions depending on the options. Intended" + msgstr "" + + #: builtins.c:1414 + msgid "" + "to be used from within a shell function generating possible completions." + msgstr "" + + #: builtins.c:1415 + msgid "If the optional WORD argument is supplied, matches against WORD are" + msgstr "" + + #: builtins.c:1416 + msgid "generated." + msgstr "" diff -aNrc2 bash-2.05b-patched/po/boldquot.sed bash-3.0/po/boldquot.sed *** bash-2.05b-patched/po/boldquot.sed Wed Dec 31 19:00:00 1969 --- bash-3.0/po/boldquot.sed Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,10 ---- + s/"\([^"]*\)"/“\1â€/g + s/`\([^`']*\)'/‘\1’/g + s/ '\([^`']*\)' / ‘\1’ /g + s/ '\([^`']*\)'$/ ‘\1’/g + s/^'\([^`']*\)' /‘\1’ /g + s/“â€/""/g + s/“/“/g + s/â€/â€/g + s/‘/‘/g + s/’/’/g diff -aNrc2 bash-2.05b-patched/po/builtins.pot bash-3.0/po/builtins.pot *** bash-2.05b-patched/po/builtins.pot Wed Dec 31 19:00:00 1969 --- bash-3.0/po/builtins.pot Fri Dec 19 21:19:19 2003 *************** *** 0 **** --- 1,2845 ---- + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:244 + msgid "`alias' with no arguments or with the -p option prints the list" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:245 + msgid "of aliases in the form alias NAME=VALUE on standard output." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:246 + msgid "Otherwise, an alias is defined for each NAME whose VALUE is given." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:247 + msgid "A trailing space in VALUE causes the next word to be checked for" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:248 + msgid "alias substitution when the alias is expanded. Alias returns" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:249 + msgid "true unless a NAME is given for which no alias has been defined." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:257 + msgid "" + "Remove NAMEs from the list of defined aliases. If the -a option is given," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:258 + msgid "then remove all alias definitions." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:266 + msgid "Bind a key sequence to a Readline function or a macro, or set" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:267 + msgid "a Readline variable. The non-option argument syntax is equivalent" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:268 + msgid "to that found in ~/.inputrc, but must be passed as a single argument:" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:269 + msgid "bind '\"\\C-x\\C-r\": re-read-init-file'." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:270 + msgid "bind accepts the following options:" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:271 + msgid "" + " -m keymap Use `keymap' as the keymap for the duration of this" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:272 + msgid " command. Acceptable keymap names are emacs," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:273 + msgid "" + " emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:274 + msgid " vi-command, and vi-insert." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:275 + msgid " -l List names of functions." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:276 + msgid " -P List function names and bindings." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:277 + msgid " -p List functions and bindings in a form that can be" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:278 + msgid " reused as input." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:279 + msgid " -r keyseq Remove the binding for KEYSEQ." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:280 + msgid " -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:281 + msgid "\t\t\t\tKEYSEQ is entered." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:282 + msgid " -f filename Read key bindings from FILENAME." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:283 + msgid " -q function-name Query about which keys invoke the named function." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:284 + msgid "" + " -u function-name Unbind all keys which are bound to the named function." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:285 + msgid " -V List variable names and values" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:286 + msgid " -v List variable names and values in a form that can" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:287 + msgid " be reused as input." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:288 + msgid "" + " -S List key sequences that invoke macros and their values" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:289 + msgid "" + " -s List key sequences that invoke macros and their values" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:290 + msgid " in a form that can be reused as input." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:297 + msgid "Exit from within a FOR, WHILE or UNTIL loop. If N is specified," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:298 + msgid "break N levels." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:304 + msgid "Resume the next iteration of the enclosing FOR, WHILE or UNTIL loop." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:305 + msgid "If N is specified, resume at the N-th enclosing loop." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:311 + msgid "Run a shell builtin. This is useful when you wish to rename a" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:312 + msgid "shell builtin to be a function, but need the functionality of the" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:313 + msgid "builtin within the function itself." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:320 + msgid "Returns the context of the current subroutine call." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:321 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:325 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:390 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:392 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:401 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:404 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:408 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:445 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:487 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:491 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:498 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:509 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:513 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:552 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:555 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:559 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:562 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:630 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:637 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:692 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:713 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:718 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:722 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:745 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:835 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:919 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:921 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:943 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:946 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:948 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:950 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:952 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:954 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:957 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:966 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:968 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:973 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:976 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1019 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1024 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1028 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1032 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1034 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1047 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1062 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1226 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1231 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1305 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1309 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1313 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1316 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1319 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1331 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1335 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1339 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1342 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1354 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1362 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1365 + msgid "" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:322 + msgid "Without EXPR, returns returns \"$line $filename\". With EXPR," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:323 + msgid "returns \"$line $subroutine $filename\"; this extra information" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:324 + msgid "can be used used to provide a stack trace." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:326 + msgid "The value of EXPR indicates how many call frames to go back before the" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:327 + msgid "current one; the top frame is frame 0." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:334 + msgid "Change the current directory to DIR. The variable $HOME is the" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:335 + msgid "default DIR. The variable CDPATH defines the search path for" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:336 + msgid "the directory containing DIR. Alternative directory names in CDPATH" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:337 + msgid "are separated by a colon (:). A null directory name is the same as" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:338 + msgid "the current directory, i.e. `.'. If DIR begins with a slash (/)," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:339 + msgid "then CDPATH is not used. If the directory is not found, and the" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:340 + msgid "shell option `cdable_vars' is set, then try the word as a variable" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:341 + msgid "name. If that variable has a value, then cd to the value of that" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:342 + msgid "variable. The -P option says to use the physical directory structure" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:343 + msgid "" + "instead of following symbolic links; the -L option forces symbolic links" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:344 + msgid "to be followed." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:350 + msgid "Print the current working directory. With the -P option, pwd prints" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:351 + msgid "the physical directory, without any symbolic links; the -L option" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:352 + msgid "makes pwd follow symbolic links." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:358 + msgid "No effect; the command does nothing. A zero exit code is returned." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:364 + msgid "Return a successful result." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:370 + msgid "Return an unsuccessful result." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:376 + msgid "Runs COMMAND with ARGS ignoring shell functions. If you have a shell" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:377 + msgid "function called `ls', and you wish to call the command `ls', you can" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:378 + msgid "say \"command ls\". If the -p option is given, a default value is used" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:379 + msgid "for PATH that is guaranteed to find all of the standard utilities. If" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:380 + msgid "the -V or -v option is given, a string is printed describing COMMAND." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:381 + msgid "The -V option produces a more verbose description." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:387 + msgid "Declare variables and/or give them attributes. If no NAMEs are" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:388 + msgid "given, then display the values of variables instead. The -p option" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:389 + msgid "will display the attributes and values of each NAME." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:391 + msgid "The flags are:" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:393 + msgid " -a\tto make NAMEs arrays (if supported)" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:394 + msgid " -f\tto select from among function names only" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:395 + msgid "" + " -F\tto display function names (and line number and source file name if" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:396 + msgid "\tdebugging) without definitions" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:397 + msgid " -i\tto make NAMEs have the `integer' attribute" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:398 + msgid " -r\tto make NAMEs readonly" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:399 + msgid " -t\tto make NAMEs have the `trace' attribute" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:400 + msgid " -x\tto make NAMEs export" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:402 + msgid "Variables with the integer attribute have arithmetic evaluation (see" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:403 + msgid "`let') done when the variable is assigned to." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:405 + msgid "When displaying values of variables, -f displays a function's name" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:406 + msgid "and definition. The -F option restricts the display to function" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:407 + msgid "name only." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:409 + msgid "Using `+' instead of `-' turns off the given attribute instead. When" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:410 + msgid "used in a function, makes NAMEs local, as with the `local' command." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:416 + msgid "Obsolete. See `declare'." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:422 + msgid "Create a local variable called NAME, and give it VALUE. LOCAL" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:423 + msgid "can only be used within a function; it makes the variable NAME" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:424 + msgid "have a visible scope restricted to that function and its children." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:431 + msgid "Output the ARGs. If -n is specified, the trailing newline is" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:432 + msgid "suppressed. If the -e option is given, interpretation of the" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:433 + msgid "following backslash-escaped characters is turned on:" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:434 + msgid "\t\\a\talert (bell)" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:435 + msgid "\t\\b\tbackspace" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:436 + msgid "\t\\c\tsuppress trailing newline" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:437 + msgid "\t\\E\tescape character" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:438 + msgid "\t\\f\tform feed" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:439 + msgid "\t\\n\tnew line" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:440 + msgid "\t\\r\tcarriage return" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:441 + msgid "\t\\t\thorizontal tab" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:442 + msgid "\t\\v\tvertical tab" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:443 + msgid "\t\\\\\tbackslash" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:444 + msgid "\t\\num\tthe character whose ASCII code is NUM (octal)." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:446 + msgid "You can explicitly turn off the interpretation of the above characters" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:447 + msgid "with the -E option." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:455 + msgid "" + "Output the ARGs. If -n is specified, the trailing newline is suppressed." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:462 + msgid "Enable and disable builtin shell commands. This allows" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:463 + msgid "you to use a disk command which has the same name as a shell" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:464 + msgid "builtin without specifying a full pathname. If -n is used, the" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:465 + msgid "NAMEs become disabled; otherwise NAMEs are enabled. For example," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:466 + msgid "to use the `test' found in $PATH instead of the shell builtin" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:467 + msgid "version, type `enable -n test'. On systems supporting dynamic" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:468 + msgid "loading, the -f option may be used to load new builtins from the" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:469 + msgid "shared object FILENAME. The -d option will delete a builtin" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:470 + msgid "previously loaded with -f. If no non-option names are given, or" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:471 + msgid "the -p option is supplied, a list of builtins is printed. The" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:472 + msgid "-a option means to print every builtin with an indication of whether" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:473 + msgid "" + "or not it is enabled. The -s option restricts the output to the POSIX.2" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:474 + msgid "" + "`special' builtins. The -n option displays a list of all disabled builtins." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:480 + msgid "Read ARGs as input to the shell and execute the resulting command(s)." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:486 + msgid "Getopts is used by shell procedures to parse positional parameters." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:488 + msgid "OPTSTRING contains the option letters to be recognized; if a letter" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:489 + msgid "is followed by a colon, the option is expected to have an argument," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:490 + msgid "which should be separated from it by white space." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:492 + msgid "Each time it is invoked, getopts will place the next option in the" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:493 + msgid "shell variable $name, initializing name if it does not exist, and" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:494 + msgid "the index of the next argument to be processed into the shell" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:495 + msgid "variable OPTIND. OPTIND is initialized to 1 each time the shell or" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:496 + msgid "a shell script is invoked. When an option requires an argument," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:497 + msgid "getopts places that argument into the shell variable OPTARG." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:499 + msgid "getopts reports errors in one of two ways. If the first character" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:500 + msgid "of OPTSTRING is a colon, getopts uses silent error reporting. In" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:501 + msgid "this mode, no error messages are printed. If an invalid option is" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:502 + msgid "seen, getopts places the option character found into OPTARG. If a" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:503 + msgid "required argument is not found, getopts places a ':' into NAME and" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:504 + msgid "sets OPTARG to the option character found. If getopts is not in" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:505 + msgid "silent mode, and an invalid option is seen, getopts places '?' into" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:506 + msgid "NAME and unsets OPTARG. If a required argument is not found, a '?'" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:507 + msgid "is placed in NAME, OPTARG is unset, and a diagnostic message is" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:508 + msgid "printed." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:510 + msgid "If the shell variable OPTERR has the value 0, getopts disables the" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:511 + msgid "printing of error messages, even if the first character of" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:512 + msgid "OPTSTRING is not a colon. OPTERR has the value 1 by default." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:514 + msgid "Getopts normally parses the positional parameters ($0 - $9), but if" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:515 + msgid "more arguments are given, they are parsed instead." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:521 + msgid "Exec FILE, replacing this shell with the specified program." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:522 + msgid "If FILE is not specified, the redirections take effect in this" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:523 + msgid "shell. If the first argument is `-l', then place a dash in the" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:524 + msgid "zeroth arg passed to FILE, as login does. If the `-c' option" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:525 + msgid "is supplied, FILE is executed with a null environment. The `-a'" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:526 + msgid "option means to make set argv[0] of the executed process to NAME." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:527 + msgid "If the file cannot be executed and the shell is not interactive," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:528 + msgid "then the shell exits, unless the shell option `execfail' is set." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:534 + msgid "Exit the shell with a status of N. If N is omitted, the exit status" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:535 + msgid "is that of the last command executed." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:541 + msgid "Logout of a login shell." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:548 + msgid "" + "fc is used to list or edit and re-execute commands from the history list." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:549 + msgid "FIRST and LAST can be numbers specifying the range, or FIRST can be a" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:550 + msgid "string, which means the most recent command beginning with that" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:551 + msgid "string." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:553 + msgid "" + " -e ENAME selects which editor to use. Default is FCEDIT, then EDITOR," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:554 + msgid " then vi." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:556 + msgid " -l means list lines instead of editing." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:557 + msgid " -n means no line numbers listed." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:558 + msgid "" + " -r means reverse the order of the lines (making it newest listed first)." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:560 + msgid "With the `fc -s [pat=rep ...] [command]' format, the command is" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:561 + msgid "re-executed after the substitution OLD=NEW is performed." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:563 + msgid "A useful alias to use with this is r='fc -s', so that typing `r cc'" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:564 + msgid "runs the last command beginning with `cc' and typing `r' re-executes" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:565 + msgid "the last command." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:573 + msgid "Place JOB_SPEC in the foreground, and make it the current job. If" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:574 + msgid "JOB_SPEC is not present, the shell's notion of the current job is" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:575 + msgid "used." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:583 + msgid "Place JOB_SPEC in the background, as if it had been started with" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:584 + msgid "`&'. If JOB_SPEC is not present, the shell's notion of the current" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:585 + msgid "job is used." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:592 + msgid "For each NAME, the full pathname of the command is determined and" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:593 + msgid "remembered. If the -p option is supplied, PATHNAME is used as the" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:594 + msgid "full pathname of NAME, and no path search is performed. The -r" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:595 + msgid "option causes the shell to forget all remembered locations. The -d" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:596 + msgid "option causes the shell to forget the remembered location of each NAME." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:597 + msgid "If the -t option is supplied the full pathname to which each NAME" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:598 + msgid "corresponds is printed. If multiple NAME arguments are supplied with" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:599 + msgid "-t, the NAME is printed before the hashed full pathname. The -l option" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:600 + msgid "causes output to be displayed in a format that may be reused as input." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:601 + msgid "" + "If no arguments are given, information about remembered commands is " + "displayed." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:608 + msgid "Display helpful information about builtin commands. If PATTERN is" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:609 + msgid "specified, gives detailed help on all commands matching PATTERN," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:610 + msgid "otherwise a list of the builtins is printed. The -s option" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:611 + msgid "restricts the output for each builtin command matching PATTERN to" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:612 + msgid "a short usage synopsis." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:620 + msgid "Display the history list with line numbers. Lines listed with" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:621 + msgid "with a `*' have been modified. Argument of N says to list only" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:622 + msgid "the last N lines. The `-c' option causes the history list to be" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:623 + msgid "cleared by deleting all of the entries. The `-d' option deletes" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:624 + msgid "the history entry at offset OFFSET. The `-w' option writes out the" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:625 + msgid "current history to the history file; `-r' means to read the file and" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:626 + msgid "append the contents to the history list instead. `-a' means" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:627 + msgid "to append history lines from this session to the history file." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:628 + msgid "Argument `-n' means to read all history lines not already read" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:629 + msgid "from the history file and append them to the history list." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:631 + msgid "If FILENAME is given, then that is used as the history file else" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:632 + msgid "if $HISTFILE has a value, that is used, else ~/.bash_history." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:633 + msgid "If the -s option is supplied, the non-option ARGs are appended to" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:634 + msgid "the history list as a single entry. The -p option means to perform" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:635 + msgid "history expansion on each ARG and display the result, without storing" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:636 + msgid "anything in the history list." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:638 + msgid "If the $HISTTIMEFORMAT variable is set and not null, its value is used" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:639 + msgid "as a format string for strftime(3) to print the time stamp associated" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:640 + msgid "" + "with each displayed history entry. No time stamps are printed otherwise." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:648 + msgid "Lists the active jobs. The -l option lists process id's in addition" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:649 + msgid "to the normal information; the -p option lists process id's only." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:650 + msgid "If -n is given, only processes that have changed status since the last" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:651 + msgid "notification are printed. JOBSPEC restricts output to that job. The" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:652 + msgid "-r and -s options restrict output to running and stopped jobs only," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:653 + msgid "respectively. Without options, the status of all active jobs is" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:654 + msgid "printed. If -x is given, COMMAND is run after all job specifications" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:655 + msgid "" + "that appear in ARGS have been replaced with the process ID of that job's" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:656 + msgid "process group leader." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:664 + msgid "" + "By default, removes each JOBSPEC argument from the table of active jobs." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:665 + msgid "" + "If the -h option is given, the job is not removed from the table, but is" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:666 + msgid "marked so that SIGHUP is not sent to the job if the shell receives a" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:667 + msgid "" + "SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove all" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:668 + msgid "" + "jobs from the job table; the -r option means to remove only running jobs." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:675 + msgid "Send the processes named by PID (or JOB) the signal SIGSPEC. If" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:676 + msgid "SIGSPEC is not present, then SIGTERM is assumed. An argument of `-l'" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:677 + msgid "lists the signal names; if arguments follow `-l' they are assumed to" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:678 + msgid "be signal numbers for which names should be listed. Kill is a shell" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:679 + msgid "builtin for two reasons: it allows job IDs to be used instead of" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:680 + msgid "process IDs, and, if you have reached the limit on processes that" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:681 + msgid "you can create, you don't have to start a process to kill another one." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:687 + msgid "Each ARG is an arithmetic expression to be evaluated. Evaluation" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:688 + msgid "is done in fixed-width integers with no check for overflow, though" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:689 + msgid "division by 0 is trapped and flagged as an error. The following" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:690 + msgid "list of operators is grouped into levels of equal-precedence operators." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:691 + msgid "The levels are listed in order of decreasing precedence." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:693 + msgid "\tid++, id--\tvariable post-increment, post-decrement" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:694 + msgid "\t++id, --id\tvariable pre-increment, pre-decrement" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:695 + msgid "\t-, +\t\tunary minus, plus" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:696 + msgid "\t!, ~\t\tlogical and bitwise negation" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:697 + msgid "\t**\t\texponentiation" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:698 + msgid "\t*, /, %\t\tmultiplication, division, remainder" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:699 + msgid "\t+, -\t\taddition, subtraction" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:700 + msgid "\t<<, >>\t\tleft and right bitwise shifts" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:701 + msgid "\t<=, >=, <, >\tcomparison" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:702 + msgid "\t==, !=\t\tequality, inequality" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:703 + msgid "\t&\t\tbitwise AND" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:704 + msgid "\t^\t\tbitwise XOR" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:705 + msgid "\t|\t\tbitwise OR" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:706 + msgid "\t&&\t\tlogical AND" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:707 + msgid "\t||\t\tlogical OR" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:708 + msgid "\texpr ? expr : expr" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:709 + msgid "\t\t\tconditional operator" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:710 + msgid "\t=, *=, /=, %=," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:711 + msgid "\t+=, -=, <<=, >>=," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:712 + msgid "\t&=, ^=, |=\tassignment" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:714 + msgid "Shell variables are allowed as operands. The name of the variable" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:715 + msgid "is replaced by its value (coerced to a fixed-width integer) within" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:716 + msgid "an expression. The variable need not have its integer attribute" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:717 + msgid "turned on to be used in an expression." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:719 + msgid "Operators are evaluated in order of precedence. Sub-expressions in" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:720 + msgid "parentheses are evaluated first and may override the precedence" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:721 + msgid "rules above." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:723 + msgid "If the last ARG evaluates to 0, let returns 1; 0 is returned" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:724 + msgid "otherwise." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:730 + msgid "" + "One line is read from the standard input, or from file descriptor FD if the" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:731 + msgid "" + "-u option is supplied, and the first word is assigned to the first NAME," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:732 + msgid "" + "the second word to the second NAME, and so on, with leftover words assigned" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:733 + msgid "" + "to the last NAME. Only the characters found in $IFS are recognized as word" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:734 + msgid "" + "delimiters. If no NAMEs are supplied, the line read is stored in the REPLY" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:735 + msgid "variable. If the -r option is given, this signifies `raw' input, and" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:736 + msgid "backslash escaping is disabled. The -d option causes read to continue" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:737 + msgid "" + "until the first character of DELIM is read, rather than newline. If the -p" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:738 + msgid "" + "option is supplied, the string PROMPT is output without a trailing newline" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:739 + msgid "" + "before attempting to read. If -a is supplied, the words read are assigned" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:740 + msgid "" + "to sequential indices of ARRAY, starting at zero. If -e is supplied and" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:741 + msgid "" + "the shell is interactive, readline is used to obtain the line. If -n is" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:742 + msgid "supplied with a non-zero NCHARS argument, read returns after NCHARS" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:743 + msgid "characters have been read. The -s option causes input coming from a" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:744 + msgid "terminal to not be echoed." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:746 + msgid "" + "The -t option causes read to time out and return failure if a complete line" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:747 + msgid "" + "of input is not read within TIMEOUT seconds. If the TMOUT variable is set," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:748 + msgid "" + "its value is the default timeout. The return code is zero, unless end-of-" + "file" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:749 + msgid "" + "is encountered, read times out, or an invalid file descriptor is supplied as" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:750 + msgid "the argument to -u." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:756 + msgid "Causes a function to exit with the return value specified by N. If N" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:757 + msgid "is omitted, the return status is that of the last command." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:763 + msgid " -a Mark variables which are modified or created for export." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:764 + msgid " -b Notify of job termination immediately." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:765 + msgid " -e Exit immediately if a command exits with a non-zero status." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:766 + msgid " -f Disable file name generation (globbing)." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:767 + msgid " -h Remember the location of commands as they are looked up." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:768 + msgid " -k All assignment arguments are placed in the environment for a" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:769 + msgid " command, not just those that precede the command name." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:770 + msgid " -m Job control is enabled." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:771 + msgid " -n Read commands but do not execute them." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:772 + msgid " -o option-name" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:773 + msgid " Set the variable corresponding to option-name:" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:774 + msgid " allexport same as -a" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:775 + msgid " braceexpand same as -B" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:777 + msgid " emacs use an emacs-style line editing interface" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:779 + msgid " errexit same as -e" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:780 + msgid " errtrace same as -E" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:781 + msgid " functrace same as -T" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:782 + msgid " hashall same as -h" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:784 + msgid " histexpand same as -H" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:787 + msgid " history enable command history" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:789 + msgid " ignoreeof the shell will not exit upon reading EOF" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:790 + msgid " interactive-comments" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:791 + msgid "" + " allow comments to appear in interactive commands" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:792 + msgid " keyword same as -k" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:793 + msgid " monitor same as -m" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:794 + msgid " noclobber same as -C" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:795 + msgid " noexec same as -n" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:796 + msgid " noglob same as -f" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:797 + msgid " nolog currently accepted but ignored" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:798 + msgid " notify same as -b" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:799 + msgid " nounset same as -u" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:800 + msgid " onecmd same as -t" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:801 + msgid " physical same as -P" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:802 + msgid "" + " pipefail the return value of a pipeline is the status of" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:803 + msgid "" + " the last command to exit with a non-zero status," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:804 + msgid "" + " or zero if no command exited with a non-zero status" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:805 + msgid " posix change the behavior of bash where the default" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:806 + msgid " operation differs from the 1003.2 standard to" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:807 + msgid " match the standard" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:808 + msgid " privileged same as -p" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:809 + msgid " verbose same as -v" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:811 + msgid " vi use a vi-style line editing interface" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:813 + msgid " xtrace same as -x" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:814 + msgid "" + " -p Turned on whenever the real and effective user ids do not match." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:815 + msgid " Disables processing of the $ENV file and importing of shell" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:816 + msgid "" + " functions. Turning this option off causes the effective uid and" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:817 + msgid " gid to be set to the real uid and gid." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:818 + msgid " -t Exit after reading and executing one command." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:819 + msgid " -u Treat unset variables as an error when substituting." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:820 + msgid " -v Print shell input lines as they are read." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:821 + msgid " -x Print commands and their arguments as they are executed." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:823 + msgid " -B the shell will perform brace expansion" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:825 + msgid " -C If set, disallow existing regular files to be overwritten" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:826 + msgid " by redirection of output." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:827 + msgid " -E If set, the ERR trap is inherited by shell functions." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:829 + msgid " -H Enable ! style history substitution. This flag is on" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:830 + msgid " by default." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:832 + msgid " -P If set, do not follow symbolic links when executing commands" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:833 + msgid " such as cd which change the current directory." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:834 + msgid " -T If set, the DEBUG trap is inherited by shell functions." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:836 + msgid "Using + rather than - causes these flags to be turned off. The" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:837 + msgid "flags can also be used upon invocation of the shell. The current" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:838 + msgid "set of flags may be found in $-. The remaining n ARGs are positional" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:839 + msgid "parameters and are assigned, in order, to $1, $2, .. $n. If no" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:840 + msgid "ARGs are given, all shell variables are printed." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:846 + msgid "For each NAME, remove the corresponding variable or function. Given" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:847 + msgid "the `-v', unset will only act on variables. Given the `-f' flag," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:848 + msgid "unset will only act on functions. With neither flag, unset first" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:849 + msgid "tries to unset a variable, and if that fails, then tries to unset a" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:850 + msgid "function. Some variables cannot be unset; also see readonly." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:856 + msgid "NAMEs are marked for automatic export to the environment of" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:857 + msgid "subsequently executed commands. If the -f option is given," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:858 + msgid "the NAMEs refer to functions. If no NAMEs are given, or if `-p'" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:859 + msgid "is given, a list of all names that are exported in this shell is" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:860 + msgid "printed. An argument of `-n' says to remove the export property" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:861 + msgid "from subsequent NAMEs. An argument of `--' disables further option" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:862 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:874 + msgid "processing." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:868 + msgid "The given NAMEs are marked readonly and the values of these NAMEs may" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:869 + msgid "not be changed by subsequent assignment. If the -f option is given," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:870 + msgid "then functions corresponding to the NAMEs are so marked. If no" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:871 + msgid "arguments are given, or if `-p' is given, a list of all readonly names" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:872 + msgid "is printed. The `-a' option means to treat each NAME as" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:873 + msgid "an array variable. An argument of `--' disables further option" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:880 + msgid "The positional parameters from $N+1 ... are renamed to $1 ... If N is" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:881 + msgid "not given, it is assumed to be 1." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:887 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:896 + msgid "Read and execute commands from FILENAME and return. The pathnames" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:888 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:897 + msgid "in $PATH are used to find the directory containing FILENAME. If any" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:889 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:898 + msgid "ARGUMENTS are supplied, they become the positional parameters when" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:890 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:899 + msgid "FILENAME is executed." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:906 + msgid "Suspend the execution of this shell until it receives a SIGCONT" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:907 + msgid "signal. The `-f' if specified says not to complain about this" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:908 + msgid "being a login shell if it is; just suspend anyway." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:915 + msgid "Exits with a status of 0 (true) or 1 (false) depending on" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:916 + msgid "the evaluation of EXPR. Expressions may be unary or binary. Unary" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:917 + msgid "expressions are often used to examine the status of a file. There" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:918 + msgid "are string operators as well, and numeric comparison operators." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:920 + msgid "File operators:" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:922 + msgid " -a FILE True if file exists." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:923 + msgid " -b FILE True if file is block special." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:924 + msgid " -c FILE True if file is character special." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:925 + msgid " -d FILE True if file is a directory." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:926 + msgid " -e FILE True if file exists." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:927 + msgid " -f FILE True if file exists and is a regular file." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:928 + msgid " -g FILE True if file is set-group-id." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:929 + msgid " -h FILE True if file is a symbolic link." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:930 + msgid " -L FILE True if file is a symbolic link." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:931 + msgid " -k FILE True if file has its `sticky' bit set." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:932 + msgid " -p FILE True if file is a named pipe." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:933 + msgid " -r FILE True if file is readable by you." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:934 + msgid " -s FILE True if file exists and is not empty." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:935 + msgid " -S FILE True if file is a socket." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:936 + msgid " -t FD True if FD is opened on a terminal." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:937 + msgid " -u FILE True if the file is set-user-id." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:938 + msgid " -w FILE True if the file is writable by you." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:939 + msgid " -x FILE True if the file is executable by you." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:940 + msgid " -O FILE True if the file is effectively owned by you." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:941 + msgid " -G FILE True if the file is effectively owned by your group." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:942 + msgid "" + " -N FILE True if the file has been modified since it was last read." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:944 + msgid " FILE1 -nt FILE2 True if file1 is newer than file2 (according to" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:945 + msgid " modification date)." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:947 + msgid " FILE1 -ot FILE2 True if file1 is older than file2." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:949 + msgid " FILE1 -ef FILE2 True if file1 is a hard link to file2." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:951 + msgid "String operators:" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:953 + msgid " -z STRING True if string is empty." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:955 + msgid " -n STRING" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:956 + msgid " STRING True if string is not empty." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:958 + msgid " STRING1 = STRING2" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:959 + msgid " True if the strings are equal." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:960 + msgid " STRING1 != STRING2" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:961 + msgid " True if the strings are not equal." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:962 + msgid " STRING1 < STRING2" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:963 + msgid "" + " True if STRING1 sorts before STRING2 lexicographically." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:964 + msgid " STRING1 > STRING2" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:965 + msgid "" + " True if STRING1 sorts after STRING2 lexicographically." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:967 + msgid "Other operators:" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:969 + msgid " -o OPTION True if the shell option OPTION is enabled." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:970 + msgid " ! EXPR True if expr is false." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:971 + msgid " EXPR1 -a EXPR2 True if both expr1 AND expr2 are true." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:972 + msgid " EXPR1 -o EXPR2 True if either expr1 OR expr2 is true." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:974 + msgid " arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:975 + msgid " -lt, -le, -gt, or -ge." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:977 + msgid "Arithmetic binary operators return true if ARG1 is equal, not-equal," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:978 + msgid "less-than, less-than-or-equal, greater-than, or greater-than-or-equal" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:979 + msgid "than ARG2." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:985 + msgid "This is a synonym for the \"test\" builtin, but the last" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:986 + msgid "argument must be a literal `]', to match the opening `['." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:992 + msgid "Print the accumulated user and system times for processes run from" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:993 + msgid "the shell." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:999 + msgid "The command ARG is to be read and executed when the shell receives" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1000 + msgid "signal(s) SIGNAL_SPEC. If ARG is absent all specified signals are" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1001 + msgid "reset to their original values. If ARG is the null string each" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1002 + msgid "SIGNAL_SPEC is ignored by the shell and by the commands it invokes." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1003 + msgid "If a SIGNAL_SPEC is EXIT (0) the command ARG is executed on exit from" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1004 + msgid "the shell. If a SIGNAL_SPEC is DEBUG, ARG is executed after every" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1005 + msgid "command. If ARG is `-p' then the trap commands associated with" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1006 + msgid "each SIGNAL_SPEC are displayed. If no arguments are supplied or if" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1007 + msgid "only `-p' is given, trap prints the list of commands associated with" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1008 + msgid "" + "each signal number. Each SIGNAL_SPEC is either a signal name in " + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1009 + msgid "or a signal number. `trap -l' prints a list of signal names and their" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1010 + msgid "corresponding numbers. Note that a signal can be sent to the shell" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1011 + msgid "with \"kill -signal $$\"." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1017 + msgid "For each NAME, indicate how it would be interpreted if used as a" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1018 + msgid "command name." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1020 + msgid "If the -t option is used, `type' outputs a single word which is one of" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1021 + msgid "`alias', `keyword', `function', `builtin', `file' or `', if NAME is an" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1022 + msgid "alias, shell reserved word, shell function, shell builtin, disk file," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1023 + msgid "or unfound, respectively." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1025 + msgid "If the -p flag is used, `type' either returns the name of the disk" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1026 + msgid "file that would be executed, or nothing if `type -t NAME' would not" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1027 + msgid "return `file'." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1029 + msgid "If the -a flag is used, `type' displays all of the places that contain" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1030 + msgid "an executable named `file'. This includes aliases, builtins, and" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1031 + msgid "functions, if and only if the -p flag is not also used." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1033 + msgid "The -f flag suppresses shell function lookup." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1035 + msgid "The -P flag forces a PATH search for each NAME, even if it is an alias," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1036 + msgid "builtin, or function, and returns the name of the disk file that would" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1037 + msgid "be executed." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1044 + msgid "Ulimit provides control over the resources available to processes" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1045 + msgid "started by the shell, on systems that allow such control. If an" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1046 + msgid "option is given, it is interpreted as follows:" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1048 + msgid " -S\tuse the `soft' resource limit" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1049 + msgid " -H\tuse the `hard' resource limit" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1050 + msgid " -a\tall current limits are reported" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1051 + msgid " -c\tthe maximum size of core files created" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1052 + msgid " -d\tthe maximum size of a process's data segment" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1053 + msgid " -f\tthe maximum size of files created by the shell" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1054 + msgid " -l\tthe maximum size a process may lock into memory" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1055 + msgid " -m\tthe maximum resident set size" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1056 + msgid " -n\tthe maximum number of open file descriptors" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1057 + msgid " -p\tthe pipe buffer size" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1058 + msgid " -s\tthe maximum stack size" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1059 + msgid " -t\tthe maximum amount of cpu time in seconds" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1060 + msgid " -u\tthe maximum number of user processes" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1061 + msgid " -v\tthe size of virtual memory" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1063 + msgid "If LIMIT is given, it is the new value of the specified resource;" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1064 + msgid "the special LIMIT values `soft', `hard', and `unlimited' stand for" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1065 + msgid "" + "the current soft limit, the current hard limit, and no limit, respectively." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1066 + msgid "Otherwise, the current value of the specified resource is printed." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1067 + msgid "If no option is given, then -f is assumed. Values are in 1024-byte" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1068 + msgid "increments, except for -t, which is in seconds, -p, which is in" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1069 + msgid "increments of 512 bytes, and -u, which is an unscaled number of" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1070 + msgid "processes." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1077 + msgid "The user file-creation mask is set to MODE. If MODE is omitted, or if" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1078 + msgid "`-S' is supplied, the current value of the mask is printed. The `-S'" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1079 + msgid "option makes the output symbolic; otherwise an octal number is output." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1080 + msgid "If `-p' is supplied, and MODE is omitted, the output is in a form" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1081 + msgid "that may be used as input. If MODE begins with a digit, it is" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1082 + msgid "interpreted as an octal number, otherwise it is a symbolic mode string" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1083 + msgid "like that accepted by chmod(1)." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1090 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1102 + msgid "Wait for the specified process and report its termination status. If" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1091 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1103 + msgid "N is not given, all currently active child processes are waited for," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1092 + msgid "and the return code is zero. N may be a process ID or a job" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1093 + msgid "specification; if a job spec is given, all processes in the job's" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1094 + msgid "pipeline are waited for." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1104 + msgid "and the return code is zero. N is a process ID; if it is not given," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1105 + msgid "all child processes of the shell are waited for." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1112 + msgid "The `for' loop executes a sequence of commands for each member in a" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1113 + msgid "list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1114 + msgid "assumed. For each element in WORDS, NAME is set to that element, and" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1115 + msgid "the COMMANDS are executed." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1121 + msgid "Equivalent to" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1122 + msgid "\t(( EXP1 ))" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1123 + msgid "\twhile (( EXP2 )); do" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1124 + msgid "\t\tCOMMANDS" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1125 + msgid "\t\t(( EXP3 ))" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1126 + msgid "\tdone" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1127 + msgid "EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1128 + msgid "omitted, it behaves as if it evaluates to 1." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1134 + msgid "The WORDS are expanded, generating a list of words. The" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1135 + msgid "set of expanded words is printed on the standard error, each" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1136 + msgid "preceded by a number. If `in WORDS' is not present, `in \"$@\"'" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1137 + msgid "is assumed. The PS3 prompt is then displayed and a line read" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1138 + msgid "from the standard input. If the line consists of the number" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1139 + msgid "corresponding to one of the displayed words, then NAME is set" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1140 + msgid "to that word. If the line is empty, WORDS and the prompt are" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1141 + msgid "redisplayed. If EOF is read, the command completes. Any other" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1142 + msgid "value read causes NAME to be set to null. The line read is saved" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1143 + msgid "in the variable REPLY. COMMANDS are executed after each selection" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1144 + msgid "until a break command is executed." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1150 + msgid "Execute PIPELINE and print a summary of the real time, user CPU time," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1151 + msgid "and system CPU time spent executing PIPELINE when it terminates." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1152 + msgid "The return status is the return status of PIPELINE. The `-p' option" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1153 + msgid "prints the timing summary in a slightly different format. This uses" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1154 + msgid "the value of the TIMEFORMAT variable as the output format." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1160 + msgid "Selectively execute COMMANDS based upon WORD matching PATTERN. The" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1161 + msgid "`|' is used to separate multiple patterns." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1167 + msgid "" + "The if COMMANDS are executed. If the exit status is zero, then the then" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1168 + msgid "" + "COMMANDS are executed. Otherwise, each of the elif COMMANDS are executed" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1169 + msgid "" + "in turn, and if the exit status is zero, the corresponding then COMMANDS" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1170 + msgid "" + "are executed and the if command completes. Otherwise, the else COMMANDS" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1171 + msgid "" + "are executed, if present. The exit status is the exit status of the last" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1172 + msgid "command executed, or zero if no condition tested true." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1178 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1185 + msgid "Expand and execute COMMANDS as long as the final command in the" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1179 + msgid "`while' COMMANDS has an exit status of zero." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1186 + msgid "`until' COMMANDS has an exit status which is not zero." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1192 + msgid "Create a simple command invoked by NAME which runs COMMANDS." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1193 + msgid "Arguments on the command line along with NAME are passed to the" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1194 + msgid "function as $0 .. $n." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1200 + msgid "Run a set of commands in a group. This is one way to redirect an" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1201 + msgid "entire set of commands." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1207 + msgid "This is similar to the `fg' command. Resume a stopped or background" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1208 + msgid "job. If you specifiy DIGITS, then that job is used. If you specify" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1209 + msgid "WORD, then the job whose name begins with WORD is used. Following the" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1210 + msgid "job specification with a `&' places the job in the background." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1216 + msgid "The EXPRESSION is evaluated according to the rules for arithmetic" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1217 + msgid "evaluation. Equivalent to \"let EXPRESSION\"." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1223 + msgid "" + "Returns a status of 0 or 1 depending on the evaluation of the conditional" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1224 + msgid "" + "expression EXPRESSION. Expressions are composed of the same primaries used" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1225 + msgid "" + "by the `test' builtin, and may be combined using the following operators" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1227 + msgid "\t( EXPRESSION )\tReturns the value of EXPRESSION" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1228 + msgid "\t! EXPRESSION\tTrue if EXPRESSION is false; else false" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1229 + msgid "\tEXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1230 + msgid "\tEXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1232 + msgid "" + "When the `==' and `!=' operators are used, the string to the right of the" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1233 + msgid "operator is used as a pattern and pattern matching is performed. The" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1234 + msgid "&& and || operators do not evaluate EXPR2 if EXPR1 is sufficient to" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1235 + msgid "determine the expression's value." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1241 + msgid "BASH_VERSION Version information for this Bash." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1242 + msgid "CDPATH A colon separated list of directories to search" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1243 + msgid "\t\twhen the argument to `cd' is not found in the current" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1244 + msgid "\t\tdirectory." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1245 + msgid "GLOBIGNORE\tA colon-separated list of patterns describing filenames to" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1246 + msgid "\t\tbe ignored by pathname expansion." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1248 + msgid "" + "HISTFILE The name of the file where your command history is stored." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1249 + msgid "HISTFILESIZE The maximum number of lines this file can contain." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1250 + msgid "HISTSIZE The maximum number of history lines that a running" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1251 + msgid "\t\tshell can access." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1253 + msgid "HOME The complete pathname to your login directory." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1254 + msgid "HOSTNAME\tThe name of the current host." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1255 + msgid "HOSTTYPE The type of CPU this version of Bash is running under." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1256 + msgid "IGNOREEOF Controls the action of the shell on receipt of an EOF" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1257 + msgid "\t\tcharacter as the sole input. If set, then the value" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1258 + msgid "\t\tof it is the number of EOF characters that can be seen" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1259 + msgid "\t\tin a row on an empty line before the shell will exit" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1260 + msgid "\t\t(default 10). When unset, EOF signifies the end of input." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1261 + msgid "MACHTYPE\tA string describing the current system Bash is running on." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1262 + msgid "MAILCHECK\tHow often, in seconds, Bash checks for new mail." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1263 + msgid "MAILPATH\tA colon-separated list of filenames which Bash checks" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1264 + msgid "\t\tfor new mail." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1265 + msgid "OSTYPE\t\tThe version of Unix this version of Bash is running on." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1266 + msgid "PATH A colon-separated list of directories to search when" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1267 + msgid "\t\tlooking for commands." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1268 + msgid "PROMPT_COMMAND A command to be executed before the printing of each" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1269 + msgid "\t\tprimary prompt." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1270 + msgid "PS1 The primary prompt string." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1271 + msgid "PS2 The secondary prompt string." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1272 + msgid "PWD\t\tThe full pathname of the current directory." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1273 + msgid "SHELLOPTS\tA colon-separated list of enabled shell options." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1274 + msgid "TERM The name of the current terminal type." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1275 + msgid "TIMEFORMAT\tThe output format for timing statistics displayed by the" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1276 + msgid "\t\t`time' reserved word." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1277 + msgid "auto_resume Non-null means a command word appearing on a line by" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1278 + msgid "\t\titself is first looked for in the list of currently" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1279 + msgid "\t\tstopped jobs. If found there, that job is foregrounded." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1280 + msgid "\t\tA value of `exact' means that the command word must" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1281 + msgid "\t\texactly match a command in the list of stopped jobs. A" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1282 + msgid "\t\tvalue of `substring' means that the command word must" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1283 + msgid "\t\tmatch a substring of the job. Any other value means that" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1284 + msgid "\t\tthe command must be a prefix of a stopped job." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1287 + msgid "histchars Characters controlling history expansion and quick" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1288 + msgid "\t\tsubstitution. The first character is the history" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1289 + msgid "\t\tsubstitution character, usually `!'. The second is" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1290 + msgid "\t\tthe `quick substitution' character, usually `^'. The" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1291 + msgid "\t\tthird is the `history comment' character, usually `#'." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1293 + msgid "HISTIGNORE\tA colon-separated list of patterns used to decide which" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1294 + msgid "\t\tcommands should be saved on the history list." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1302 + msgid "Adds a directory to the top of the directory stack, or rotates" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1303 + msgid "the stack, making the new top of the stack the current working" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1304 + msgid "directory. With no arguments, exchanges the top two directories." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1306 + msgid "+N\tRotates the stack so that the Nth directory (counting" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1307 + msgid "\tfrom the left of the list shown by `dirs', starting with" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1308 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1312 + msgid "\tzero) is at the top." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1310 + msgid "-N\tRotates the stack so that the Nth directory (counting" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1311 + msgid "\tfrom the right of the list shown by `dirs', starting with" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1314 + msgid "-n\tsuppress the normal change of directory when adding directories" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1315 + msgid "\tto the stack, so only the stack is manipulated." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1317 + msgid "dir\tadds DIR to the directory stack at the top, making it the" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1318 + msgid "\tnew current working directory." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1320 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1343 + msgid "You can see the directory stack with the `dirs' command." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1328 + msgid "Removes entries from the directory stack. With no arguments," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1329 + msgid "removes the top directory from the stack, and cd's to the new" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1330 + msgid "top directory." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1332 + msgid "+N\tremoves the Nth entry counting from the left of the list" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1333 + msgid "\tshown by `dirs', starting with zero. For example: `popd +0'" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1334 + msgid "\tremoves the first directory, `popd +1' the second." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1336 + msgid "-N\tremoves the Nth entry counting from the right of the list" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1337 + msgid "\tshown by `dirs', starting with zero. For example: `popd -0'" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1338 + msgid "\tremoves the last directory, `popd -1' the next to last." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1340 + msgid "-n\tsuppress the normal change of directory when removing directories" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1341 + msgid "\tfrom the stack, so only the stack is manipulated." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1351 + msgid "Display the list of currently remembered directories. Directories" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1352 + msgid "find their way onto the list with the `pushd' command; you can get" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1353 + msgid "back up through the list with the `popd' command." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1355 + msgid "The -l flag specifies that `dirs' should not print shorthand versions" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1356 + msgid "of directories which are relative to your home directory. This means" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1357 + msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1358 + msgid "causes `dirs' to print the directory stack with one entry per line," + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1359 + msgid "prepending the directory name with its position in the stack. The -p" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1360 + msgid "flag does the same thing, but the stack position is not prepended." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1361 + msgid "The -c flag clears the directory stack by deleting all of the elements." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1363 + msgid "+N\tdisplays the Nth entry counting from the left of the list shown by" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1364 + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1367 + msgid "\tdirs when invoked without options, starting with zero." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1366 + msgid "-N\tdisplays the Nth entry counting from the right of the list shown by" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1374 + msgid "Toggle the values of variables controlling optional behavior." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1375 + msgid "The -s flag means to enable (set) each OPTNAME; the -u flag" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1376 + msgid "unsets each OPTNAME. The -q flag suppresses output; the exit" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1377 + msgid "status indicates whether each OPTNAME is set or unset. The -o" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1378 + msgid "option restricts the OPTNAMEs to those defined for use with" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1379 + msgid "`set -o'. With no options, or with the -p option, a list of all" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1380 + msgid "settable options is displayed, with an indication of whether or" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1381 + msgid "not each is set." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1387 + msgid "printf formats and prints ARGUMENTS under control of the FORMAT. FORMAT" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1388 + msgid "is a character string which contains three types of objects: plain" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1389 + msgid "" + "characters, which are simply copied to standard output, character escape" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1390 + msgid "sequences which are converted and copied to the standard output, and" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1391 + msgid "" + "format specifications, each of which causes printing of the next successive" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1392 + msgid "argument. In addition to the standard printf(1) formats, %b means to" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1393 + msgid "expand backslash escape sequences in the corresponding argument, and %q" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1394 + msgid "means to quote the argument in a way that can be reused as shell input." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1401 + msgid "For each NAME, specify how arguments are to be completed." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1402 + msgid "If the -p option is supplied, or if no options are supplied, existing" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1403 + msgid "completion specifications are printed in a way that allows them to be" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1404 + msgid "reused as input. The -r option removes a completion specification for" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1405 + msgid "each NAME, or, if no NAMEs are supplied, all completion specifications." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1413 + msgid "Display the possible completions depending on the options. Intended" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1414 + msgid "" + "to be used from within a shell function generating possible completions." + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1415 + msgid "If the optional WORD argument is supplied, matches against WORD are" + msgstr "" + + #: /usr/local/build/bash/bash-20031218/builtins/builtins.c:1416 + msgid "generated." + msgstr "" diff -aNrc2 bash-2.05b-patched/po/en@boldquot.gmo bash-3.0/po/en@boldquot.gmo *** bash-2.05b-patched/po/en@boldquot.gmo Wed Dec 31 19:00:00 1969 --- bash-3.0/po/en@boldquot.gmo Tue Jun 29 10:47:40 2004 *************** *** 0 **** --- 1,125 ---- + Þ•Ðœ=pQ*qQœQ³Q ËQ<ØQ5R + KRVR#nR6’R/ÉR ùR9S@S6PS5‡S½S;ÕS8TJT\T:pT5«T3áT7U0MU8~U7·U7ïU5'V#]VV‘V¢V/¹V éVõV- W17WiW†W™W¬W;ÅW&X(XAXQXAoXA±XóX YY 'Y5Y SY aY4nY£Y·YÊYÛYëY7 ZCZIZ9]Z:—Z2ÒZ3[9[3Y[8[=Æ[=\0B\s\‰\Ÿ\®\$¾\Iã\+-]FY]L ]Ií](7^A`^I¢^;ì^%(_/N_)~_I¨_Jò_1=`5o`&¥`#Ì`#ð`Ba#Wa#{a#Ÿa#Ãa#ça/ bA;b }b#žb#Âb#æb# + c#.c7Rc#Šc#®c#Òc#öcHdFcd#ªd#Îd>òd#1eCUe6™eÐe!äe>fHEf.Žf6½fôf;g=?g>}g6¼g#óg7h<OhAŒhAÎh4iEi)_i.‰iA¸i=úiG8j$€j=¥j3ãjMk@ekD¦k$ëk,l?=l&}l@¤l'ål. m1Xq—qªqHÆq0r3@rtr8’r0Ër5ür62s+is<•s3Òs!t1(t7Zt@’t9Ót+ u99u9su/­uÝuôu + v v<6vIsv*½v#èvK wGXw6 wK×w3#x(Wx-€x5®x/äx-yHByF‹yFÒyz35zKiz-µzKãzF/{v{B{9Ó{B |5P|†|¥|º|Ú| ñ|û| }$};}R}e}ƒ}“}§}¿}Ö}(í}"~9~N~&k~&’~¹~Ï~.å~3Jc"±Ôèù€/-€]€s€-†€´€Ê€ç€ø€2)Jt¢µÍá ÿ! ‚B‚ U‚v‚‚©‚É‚Ü‚ì‚ÿ‚ƒ.ƒHƒ cƒqƒƒ&¯ƒÖƒôƒ + „ „&/„3V„Š„§„Ä Ø„Cæ„8*…Ec…;©…:å…G †=h†8¦†F߆<&‡:c‡Hž‡>ç‡D&ˆBkˆD®ˆDóˆF8‰C‰GÉH Š9TŠ#ŽŠ²Š@ÉŠC + ‹BN‹0‘‹ ‹>΋> Œ?LŒDŒŒ2ÑŒ=HB?‹IËEŽ?[Ž2›Ž>ÎŽ< ?JBŠ>ÍB DOF”AÛB‘7`‘ ˜‘;¦‘Eâ‘@(’Di’9®’?è’(“E>“„“@”“DÕ“9”AT”E–”Ü”Cï”C3•Jw•B•B–BH–>‹– Ê–&×–Fþ–E—EU—F›—>â—@!˜Ab˜5¤˜AÚ˜E™Nb™C±™Fõ™F<šHƒšBÌšE›AU›A—›FÙ›@ œ<aœCžœBâœA%Dg¬CÅ: ž>DžDƒžCÈž; ŸAHŸCŠŸΟCÝŸ=! ?_ Ÿ K¹ C¡I¡BZ¡B¡=à¡I¢Dh¢D­¢*ò¢,£0J£@{£B¼£Bÿ£DB¤E‡¤BͤJ¥=[¥D™¥Þ¥ú¥I¦3c¦A—¦>Ù¦E§:^§I™§Cã§E'¨Cm¨@±¨!ò¨"©7©BG©Š©?œ©6Ü©Cª*WªG‚ª2ʪGýª-E«Es«;¹«Kõ«AA¬8ƒ¬C¼¬B­C­ER­H˜­8á­®F8®D®FÄ®F ¯R¯Ok¯6»°Dò°=7±Bu±E¸±Aþ± @²XN²§²*Ų?ð²E0³Dv³F»³E´BH´I‹´?Õ´<µFRµ8™µÒµæµþµ¶%/¶$U¶z¶Ž¶§¶Á¶!භ·C;· ·Œ·E£·'é·?¸FQ¸-˜¸@ƸL¹6T¹,‹¹*¸¹Bã¹@&ºgº=ºE½º0»94» n»?x»A¸»@ú»@;¼@|¼D½¼<½?½<]½Hš½Iã½C-¾?q¾±¾º¾9̾E¿FL¿E“¿EÙ¿$ÀDDÀ1‰ÀF»ÀÁÁ 'Á5Á'>Á9fÁ  ÁD­ÁJòÁ2=Â%pÂ#–ºÂÊÂãÂ@úÂ#;Ã?_ÃFŸÃHæÃ*/Ä3ZÄŽÄ>­Ä=ìÄ-*ÅXÅ'xÅ& Å*ÇÅ*òÅ)Æ)GÆ%qÆ%—Æ ½Æ1ÞÆ1Ç5BÇxLJÇ!¤Ç!ÆÇ$èÇC ÈFQÈD˜ÈHÝÈ@&É6gÉ žÉ?¬É1ìÉEÊ#dÊ$ˆÊC­Ê=ñÊE/Ë#uË'™ËEÁË&Ì=.Ì.lÌK›ÌçÌ!Í=(Í>fÍA¥Í çÍ@õÍ6ÎGTÎCœÎKàÎ,Ï,DÏ,qÏGžÏ æÏóÏKÐTÐ#hÐBŒÐIÏÐÑC6ÑzÑB•ÑBØÑAÒ4]ÒF’ÒKÙÒ.%Ó,TÓ&Ó0¨ÓÙÓCßÓ:#Ô<^Ô?›ÔÛÔDñÔ=6Õ7tÕ + ¬Õ(·Õ<àÕBÖC`Ö¤ÖBµÖBøÖE;××’×8¨×=á×DØBdØH§Ø?ðØ?0ÙHpÙF¹ÙÚ Ú(%ÚNÚ]ÚBsÚ=¶ÚBôÚL7ÛC„Û@ÈÛ: Ü?DÜ8„ÜB½Ü@Ý%AÝNgÝ"¶Ý ÙÝ>æÝD%ÞIjÞ ´ÞÁÞEÓÞßD9ßG~ßDÆß@ à+Là9xà;²à îà$á4áRáDnáG³á ûá ââ2,â + _âAjâ ¬âÍâèâþâHãXãgã „ã‘ã"¤ãDÇã ä!ä?äE[ä ¡äA®ä;ðäE,åKrå,¾åDëå40æEeæC«æGïæ.7çJfçF±çAøç;:èFvèH½èé; é + \é?gé?§éçéDê?Eê,…ê>²êEñê@7ë!xëšë@£ëEäëG*ì:rìD­ìAòì4í + Jí Uí"aí8„í½í/Ðí)î3*î^î&xî?Ÿî2ßî5ï,HïBuï=¸ïöïBð?Kð@‹ð + ÌðA×ðñ=(ñFfñ ­ñ1ºñIìñD6ò4{òE°òBöòD9ó<~óE»ó@ô?Bô<‚ôA¿ô)õB+õAnõ?°õ ðõBüõ>?ö"~öC¡öAåö@'÷@h÷>©÷?è÷(ø;0øClø=°ø îø&ûø="ù`ù{ù'’ùºùÑù,îùú$:ú_ú + zúB…úHÈú>ûEPû>–ûÕû@ðûA1üsüA‡üKÉüDýCZýCžýCâý=&þ@dþ¥þA·þKùþHEÿ + ŽÿB™ÿBÜÿ>:^@™?Ú"@=B~>ÁHHYE¢=èK&Ar=´òC0@t&µ%Ü.-17_6—2Î1*3,^,‹;¸#ôA.=p"®KÑCaAg©CÂE EL >’ *Ñ "ü  + -? + -m + 1› + 4Í +  ? IZ ¤ ¸ )È ?ò "2 8U *Ž B¹ #ü ; F\ <£ =à _*~©À Ø<åA" + d#o#“6·/î 9+e6u5¬â;ú86o:•AÐ3OF0–PÇCC\5 #Öú + /2 bn-‚1°âÿ%;>&z¡ºÊAèA*l   ® Ì Ú4ç0CTd7„¼ÂEÖF2c3–Ê?êD*UoUÅ0Lbx‡$—I¼+F2LyIÆ(A9I{;Å%/')WIJË15H&~#¥#ÉBí#0 #T #x #œ #À /ä A! V!#w!#›!#¿!#ã!#"7+"#c"#‡"#«"#Ï"Hó"F<##ƒ##§#>Ë## + $C.$6r$©$!½$>ß$H%.g%6–%Í%;Ü%I&Jb&6­&#ä&C'HL'Y•'Yï'4I(~()˜(.Â(Añ(=3)Gq)0¹)=ê)3(*M\*@ª*Dë*00+,a+?Ž+&Î+@õ+'6,.^,1,-¿,5í,3#-/W-C‡-'Ë-5ó-0).=Z.0˜.@É.3 + /D>/Eƒ/6É/$0%02E0.x0 §0>µ0ô01H#10l131Ñ18ï10(25Y262+Æ2<ò23/3!c31…37·3@ï3904+j49–49Ð4/ + 5:5Q5g5}5<“5IÐ5*6#E6Ki6Gµ66ý6K473€7(´7-Ý75 8;A8-}8T«8F9FG9Ž93ª9KÞ99*:Kd:F°:÷:B;9T;BŽ;5Ñ;<&<;<[< r<|<Ž<¥<"¼<ß<ò<= =4=L=c=(z="£=Æ=Û=&ø=&>F>\>.r>¡>À>×>ð> ?*?">?a?u?†?¤?/º?ê?@9@M@c@€@‘@«@Ë@)ã@ A(A;ANAfAzA ˜A!¹AÛA îAB&BBBbBuB…B˜B¯BÇBáB üB + C(C&HCoCC£C¹C&ÈC?ïC/DLDhD }DC‹D8ÏDEE;NE:ŠEGÅE= F8KFF„F<ËF:GHCG>ŒGDËGBHDSHD˜HFÝHC$IGhIH°I9ùI#3JWJ@nJO¯JBÿJ0BK sK>KJ¾K? LDIL2ŽL=ÁLHÿL?HMIˆMEÒM?N2XN>‹N<ÊN?OBGO>ŠOBÉOD PFQPA˜PBÚP7Q UQ;cQEŸQ@åQD&R9kR?¥RåREûRAS@QSD’S9×SATEST™TC¬TCðTJ4UBUBÂUBV>HV ‡V&”VF»VWEWFXW>ŸW@ÞWAX5aXM—XEåXN+YCzYF¾YRZHXZN¡ZEðZA6[Ax[Rº[@ \<N\C‹\BÏ\A]DT]™]C²]:ö]>1^Dp^Oµ^;_AA_Cƒ_Ç_CÖ_=`?X`%˜`K¾`C + aNaB_aB¢a=åaI#bDmbD²b*÷b,"c0Oc@€cBÁcBdDGdEŒdBÒdJe=`eDžeãeÿeIf3hfAœf>ÞfEg:cgIžgCègQ,hC~h@Âh!i"%iHiBXi›i?­i6íiC$j6hjGŸj2çjGk-bkQk;âkKlAjl8¬lOålB5mxmE‡mHÍm8nOnFmnP´nFoFLo“o—¬oBDqP‡q=ØqZrQqrAÃr sXs)ls6–s?Ís] tDktF°tE÷tB=ua€uKâuH.vFwvD¾vww/w*Mw1xw0ªwÛw$ûw% x*Fx-qx(Ÿx'ÈxOðx@y"Yy]|y3ÚyKzŽZz9ézL#{Xp{BÉ{8 |6E|B||@¿|}=}EV}0œ}9Í} ~K~M]~@«~@ì~@-Dn<³ðH€HW€I €Cê€?.nwQ‰EÛR!‚Et‚Eº‚$ƒD%ƒ=jƒF¨ƒïƒ„ „"„3+„9_„ ™„D¦„Jë„26…1i…#›…¿…Ï…è…@ÿ…#@†?d†F¤†Të†*@‡?k‡«‡>ʇ= ˆ-Gˆuˆ'•ˆ&½ˆ*äˆ*‰):‰)d‰%Ž‰%´‰ Ú‰1û‰1-Š5_Š•Š¤Š-ÁŠ!ïŠ$‹O6‹F†‹DÍ‹HŒL[Œ6¨Œ ߌKíŒ19Ek/±$áCŽ=JŽEˆŽ#ÎŽ3òŽQ&&x=Ÿ.ÝK X!w=™>×A‘ X‘@f‘§‘GÅ‘C ’KQ’’8µ’8î’G'“o“ˆ“K“é“#ý“B!”Id”®”OË”•N6•B…•AÈ•4 + –F?–K†–.Ò–,—&.—0U—†—OŒ—:Ü—<˜?T˜”˜\ª˜=™7E™ + }™(ˆ™<±™Bî™C1šušB†šBÉšE ›R›c›8y›=²›Dð›B5œHxœ?Áœ?HAFŠÑ é(öž.žBDž=‡žBÅžLŸCUŸ@™Ÿ:ÚŸ? DU Bš LÝ %*¡NP¡"Ÿ¡ ¡JÏ¡D¢I_¢ ©¢¶¢EÈ¢£h.£G—£Pߣ@0¤+q¤9¤Gפ ¥$@¥e¥ƒ¥DŸ¥Gä¥,¦D¦\¦2u¦ + ¨¦A³¦ õ¦&§!=§_§xp§é§ø§ ¨"¨.5¨Dd¨©¨!º¨'ܨE© J©AW©;™©EÕ©Kª,gªP”ªXåªE>«C„«GÈ«.¬J?¬FŠ¬AѬ;­RO­H¢­ë­;® + A®?L®?Œ®Ì®Då®?*¯,j¯b—¯Eú¯@@°-°¯°L¸°E±GK±:“±DαA²U² + k² v²"‚²8¥²Þ²/ñ²)!³3K³³&™³?À³2´53´,i´B–´=Ù´µN)µ?xµ@¸µ + ùµA¶F¶Ia¶F«¶ ò¶1ÿ¶I1·\{·4Ø·Q ¸B_¸D¢¸<ç¸E$¹@j¹?«¹<ë¹A(º)jºN”ºAãºK%» q»B}»JÀ»" ¼O.¼A~¼@À¼@½>B½?½Á½;ɽC¾=I¾ ‡¾&”¾I»¾¿" ¿3C¿"w¿(š¿,ÿð¿$À4À + OÀZZÀHµÀ>þÀE=Á>ƒÁÂÁLÝÁY*„ÂM˜ÂKæÂD2ÃCwÃO»ÃC Ä=OÄLÄÚÄAìÄK.ÅHzÅ + ÃÅBÎÅfÆ>xÆ:·Æ@òÆ?3Ç"sÇL–ÇBãÇ>&ÈeÈHuÈH¾ÈEÉ=MÉK‹ÉA×ÉIÊcÊvÊ…ÊC¡Ê@åÊ&&Ë1MË:Ë9ºËCôËB8Ì2{Ì1®Ì*àÌ8 Í8DÍG}Í;ÅÍÎAÎ=YÎ"—ÎKºÎOÏVÏA\ÏžÏC·ÏQûÏEMÐJ“Ð*ÞÐ" Ñ,Ñ-LÑ-zÑ1¨Ñ4ÚÑ#ÒK3ÒIÒÉÒÝÒ)íÒ?Ó"WÓ8zÓ*³ÓBÞÓ#!Ô;EÔFÔ<ÈÔIÕ÷LZNÈ'dc¹&žeI8;li’OôØ~6Ìí|U±Sa­QQp±øø—ÚŸ<qaºpô<­ïSTÉ΃% ÝÁÍ:©f½µ’ÑÔ¦G(k“Œ}y¯•KóP-Ex5ö_I©>e>%Ç!™bõãÜü¥Vßp&YÔRÆL £ÿVý¦?ÛÝ mj^K¤¥ÏÐÒH@"½îçìh8Mæ)Ã_Ekž°3¹(6·•ƒ¹xª®Ù=é«8€yùË¿1§êåwW¦«[ÆÑ =¨]w"_/µ™Þ™oà—vêÀWŸï¾ÀˆHûdau•|*-iô‘QFÀr€ÀX?Ï‹Ø”‡¥:ۖž]2£2ñbŸÕB§†ð…Qýð ‚š¢a â#çX€­r$0©ZéüÎCv”¬Û«Ê-èñÈOðÁœkPTv{w¨ „ÌWVŸ5ÎN q˜Æìàĺn0ŠÉg4UC`É¿º‘¬@¶Oh:¤\¡¬z„B³¾Â›o æ;Fsä–Hl"h+Ç¨Ý + Ž%˜Ó[2¶BÏ^äœÒpsÎ:¿ú,u…##Mн&³*N¶$ + ý!Ü ÿ*‰Zói0Ó1®}BÅûuÍI$0`—Þu?+Ž9Á|3êÈÕt'ãi³\÷4A’t7{ÅÿŠ°DƒÞV̸ €ßx(‚J‘·‹nyö‡ƒM†wM§“ÏþD`AZFŶ »4~놘6Ì9ç×%õ<雯>E ­)Y]ׄ7ë]L¢½f‰R.'q¸o†Õ¡ËͤEŒ²®ùÒåÇ=«–yn¢|–LŠ¯4OÁ9CU¸AX\d´›ÄüÑû‡¼þRá 3¤}rX쑼q´‡åmäv{´°`.bd)RšÅGfÖhÚî·“™ò5± ~Žáˆ/'·Â.W/¢$íº!ÉŒU͉¾»s˸KËG{íöPc—¡&æx”.Tî…Tz¿Gʦbⵂø1Œsl°kÄÕˆ+¹"mz;,6‚g£Dד1”YÙ2š^ï’¡7-DÐ\áâª[„²zñecÇÊÖ»f@ÄÙ,Jèˆtù*±¯¼_ßÜ +3¥²ú7Jë[Y »Ã®oŽœ(…8}ªe5©¼´;^ÖªF  + g³9rg ¬ š÷ œJòõ#~µ‹t),!ÐcSúÓó¨Èl›²> Nò˜nÔ=jmÆ£@A  KþCèÊŠã + HžÃ§j‹<P/ØSÚI‰?¾àjtimed out waiting for input: auto-logout + KEYSEQ is entered. conditional operator (( EXP3 )) (default 10). When unset, EOF signifies the end of input. A value of `exact' means that the command word must COMMANDS `time' reserved word. be ignored by pathname expansion. character as the sole input. If set, then the value commands should be saved on the history list. directory. exactly match a command in the list of stopped jobs. A for new mail. in a row on an empty line before the shell will exit itself is first looked for in the list of currently looking for commands. match a substring of the job. Any other value means that of it is the number of EOF characters that can be seen primary prompt. shell can access. stopped jobs. If found there, that job is foregrounded. substitution character, usually `!'. The second is substitution. The first character is the history the `quick substitution' character, usually `^'. The the command must be a prefix of a stopped job. third is the `history comment' character, usually `#'. value of `substring' means that the command word must when the argument to `cd' is not found in the current ! EXPRESSION True if EXPRESSION is false; else false !, ~ logical and bitwise negation & bitwise AND && logical AND &=, ^=, |= assignment ( EXPRESSION ) Returns the value of EXPRESSION (( EXP1 )) ** exponentiation *, /, % multiplication, division, remainder ++id, --id variable pre-increment, pre-decrement +, - addition, subtraction +=, -=, <<=, >>=, -%s or -o option + -, + unary minus, plus -irsD or -c command or -O shopt_option (invocation only) + <<, >> left and right bitwise shifts <=, >=, <, > comparison =, *=, /=, %=, ==, != equality, inequality EXPR1 && EXPR2 True if both EXPR1 and EXPR2 are true; else false EXPR1 || EXPR2 True if either EXPR1 or EXPR2 is true; else false \E escape character \\ backslash \a alert (bell) \b backspace \c suppress trailing newline \f form feed \n new line \num the character whose ASCII code is NUM (octal). \r carriage return \t horizontal tab \v vertical tab ^ bitwise XOR debugging) without definitions dirs when invoked without options, starting with zero. done expr ? expr : expr from the left of the list shown by `dirs', starting with from the right of the list shown by `dirs', starting with from the stack, so only the stack is manipulated. id++, id-- variable post-increment, post-decrement new current working directory. removes the first directory, `popd +1' the second. removes the last directory, `popd -1' the next to last. shown by `dirs', starting with zero. For example: `popd +0' shown by `dirs', starting with zero. For example: `popd -0' to the stack, so only the stack is manipulated. while (( EXP2 )); do zero) is at the top. | bitwise OR || logical OR + malloc: %s:%d: assertion botched + allow comments to appear in interactive commands match the standard operation differs from the 1003.2 standard to or zero if no command exited with a non-zero status the last command to exit with a non-zero status, be reused as input. command. Acceptable keymap names are emacs, emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move, in a form that can be reused as input. reused as input. vi-command, and vi-insert. -lt, -le, -gt, or -ge. True if STRING1 sorts after STRING2 lexicographically. True if STRING1 sorts before STRING2 lexicographically. True if the strings are equal. True if the strings are not equal. modification date). allexport same as -a braceexpand same as -B emacs use an emacs-style line editing interface errexit same as -e errtrace same as -E functrace same as -T hashall same as -h histexpand same as -H history enable command history ignoreeof the shell will not exit upon reading EOF interactive-comments keyword same as -k monitor same as -m noclobber same as -C noexec same as -n noglob same as -f nolog currently accepted but ignored notify same as -b nounset same as -u onecmd same as -t physical same as -P pipefail the return value of a pipeline is the status of posix change the behavior of bash where the default privileged same as -p verbose same as -v vi use a vi-style line editing interface xtrace same as -x Disables processing of the $ENV file and importing of shell Set the variable corresponding to option-name: by default. by redirection of output. command, not just those that precede the command name. functions. Turning this option off causes the effective uid and gid to be set to the real uid and gid. such as cd which change the current directory. then vi. dirs when invoked without options, starting with zero. from the left of the list shown by `dirs', starting with from the right of the list shown by `dirs', starting with from the stack, so only the stack is manipulated. new current working directory. removes the first directory, `popd +1' the second. removes the last directory, `popd -1' the next to last. shown by `dirs', starting with zero. For example: `popd +0' shown by `dirs', starting with zero. For example: `popd -0' to the stack, so only the stack is manipulated. zero) is at the top. ! EXPR True if expr is false. -B the shell will perform brace expansion -C If set, disallow existing regular files to be overwritten -E If set, the ERR trap is inherited by shell functions. -G FILE True if the file is effectively owned by your group. -H use the `hard' resource limit -H Enable ! style history substitution. This flag is on -L FILE True if file is a symbolic link. -N FILE True if the file has been modified since it was last read. -O FILE True if the file is effectively owned by you. -P If set, do not follow symbolic links when executing commands -S use the `soft' resource limit -S FILE True if file is a socket. -T If set, the DEBUG trap is inherited by shell functions. -a all current limits are reported -a Mark variables which are modified or created for export. -a FILE True if file exists. -b Notify of job termination immediately. -b FILE True if file is block special. -c the maximum size of core files created -c FILE True if file is character special. -d the maximum size of a process's data segment -d FILE True if file is a directory. -e Exit immediately if a command exits with a non-zero status. -e FILE True if file exists. -f the maximum size of files created by the shell -f Disable file name generation (globbing). -f FILE True if file exists and is a regular file. -g FILE True if file is set-group-id. -h Remember the location of commands as they are looked up. -h FILE True if file is a symbolic link. -k All assignment arguments are placed in the environment for a -k FILE True if file has its `sticky' bit set. -l the maximum size a process may lock into memory -m the maximum resident set size -m Job control is enabled. -n the maximum number of open file descriptors -n Read commands but do not execute them. -n STRING -o OPTION True if the shell option OPTION is enabled. -o option-name -p the pipe buffer size -p Turned on whenever the real and effective user ids do not match. -p FILE True if file is a named pipe. -r FILE True if file is readable by you. -s the maximum stack size -s FILE True if file exists and is not empty. -t the maximum amount of cpu time in seconds -t Exit after reading and executing one command. -t FD True if FD is opened on a terminal. -u the maximum number of user processes -u Treat unset variables as an error when substituting. -u FILE True if the file is set-user-id. -v the size of virtual memory -v Print shell input lines as they are read. -w FILE True if the file is writable by you. -x Print commands and their arguments as they are executed. -x FILE True if the file is executable by you. -z STRING True if string is empty. EXPR1 -a EXPR2 True if both expr1 AND expr2 are true. EXPR1 -o EXPR2 True if either expr1 OR expr2 is true. STRING True if string is not empty. STRING1 != STRING2 STRING1 < STRING2 STRING1 = STRING2 STRING1 > STRING2 arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne, -e ENAME selects which editor to use. Default is FCEDIT, then EDITOR, -l means list lines instead of editing. -n means no line numbers listed. -r means reverse the order of the lines (making it newest listed first). -F to display function names (and line number and source file name if -P List function names and bindings. -S List key sequences that invoke macros and their values -V List variable names and values -a to make NAMEs arrays (if supported) -f to select from among function names only -f filename Read key bindings from FILENAME. -i to make NAMEs have the `integer' attribute -l List names of functions. -m keymap Use `keymap' as the keymap for the duration of this -p List functions and bindings in a form that can be -q function-name Query about which keys invoke the named function. -r to make NAMEs readonly -r keyseq Remove the binding for KEYSEQ. -s List key sequences that invoke macros and their values -t to make NAMEs have the `trace' attribute -u function-name Unbind all keys which are bound to the named function. -v List variable names and values in a form that can -x to make NAMEs export -x keyseq:shell-command Cause SHELL-COMMAND to be executed when FILE1 -ef FILE2 True if file1 is a hard link to file2. FILE1 -nt FILE2 True if file1 is newer than file2 (according to FILE1 -ot FILE2 True if file1 is older than file2.$%s: cannot assign in this way%c%c: invalid option%d: invalid file descriptor: %s%s can be invoked via %s is %s + %s is a function + %s is a shell builtin + %s is a shell keyword + %s is aliased to `%s' + %s is hashed (%s) + %s is not bound to any keys. + %s out of range%s: %s out of range%s: %s: bad interpreter%s: ambiguous job spec%s: ambiguous redirect%s: arguments must be process or job IDs%s: bad network path specification%s: bad substitution%s: binary operator expected%s: cannot assign list to array member%s: cannot assign to non-numeric index%s: cannot create: %s%s: cannot delete: %s%s: cannot destroy array variables in this way%s: cannot execute binary file%s: cannot execute: %s%s: cannot get limit: %s%s: cannot modify limit: %s%s: cannot open temp file: %s%s: cannot open: %s%s: cannot overwrite existing file%s: cannot read: %s%s: cannot unset%s: cannot unset: readonly %s%s: command not found%s: error retrieving current directory: %s: %s + %s: file is too large%s: file not found%s: first non-whitespace character is not `"'%s: hash table empty + %s: history expansion failed%s: host unknown%s: illegal option -- %c + %s: integer expression expected%s: invalid action name%s: invalid file descriptor specification%s: invalid limit argument%s: invalid number%s: invalid option%s: invalid option name%s: invalid service%s: invalid shell option name%s: invalid signal specification%s: invalid timeout specification%s: is a directory%s: job %d already in background%s: job has terminated%s: missing colon separator%s: no completion specification%s: no job control%s: no such job%s: not a function%s: not a regular file%s: not a shell builtin%s: not an array variable%s: not dynamically loaded%s: not found%s: numeric argument required%s: option requires an argument%s: option requires an argument -- %c + %s: parameter null or not set%s: readonly function%s: readonly variable%s: restricted%s: restricted: cannot redirect output%s: restricted: cannot specify `/' in command names%s: substring expression < 0%s: unary operator expected%s: unbound variable%s: warning: && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to+N Rotates the stack so that the Nth directory (counting+N displays the Nth entry counting from the left of the list shown by+N removes the Nth entry counting from the left of the list+N Rotates the stack so that the Nth directory (counting+N displays the Nth entry counting from the left of the list shown by+N removes the Nth entry counting from the left of the list-N Rotates the stack so that the Nth directory (counting-N displays the Nth entry counting from the right of the list shown by-N removes the Nth entry counting from the right of the list-N Rotates the stack so that the Nth directory (counting-N displays the Nth entry counting from the right of the list shown by-N removes the Nth entry counting from the right of the list-a option means to print every builtin with an indication of whether-n suppress the normal change of directory when adding directories-n suppress the normal change of directory when removing directories-n suppress the normal change of directory when adding directories-n suppress the normal change of directory when removing directories-r and -s options restrict output to running and stopped jobs only,-t, the NAME is printed before the hashed full pathname. The -l option-u option is supplied, and the first word is assigned to the first NAME,/dev/(tcp|udp)/host/port not supported without networking/tmp must be a valid directory nameA trailing space in VALUE causes the next word to be checked forA useful alias to use with this is r='fc -s', so that typing `r cc'ARGUMENTS are supplied, they become the positional parameters whenARGs are given, all shell variables are printed.Aborting...Adds a directory to the top of the directory stack, or rotatesArgument `-n' means to read all history lines not already readArguments on the command line along with NAME are passed to theArithmetic binary operators return true if ARG1 is equal, not-equal,BASH_VERSION Version information for this Bash.Bind a key sequence to a Readline function or a macro, or setBy default, removes each JOBSPEC argument from the table of active jobs.CDPATH A colon separated list of directories to searchCOMMANDS are executed. Otherwise, each of the elif COMMANDS are executedCauses a function to exit with the return value specified by N. If NChange the current directory to DIR. The variable $HOME is theCopyright (C) 2004 Free Software Foundation, Inc. + Create a local variable called NAME, and give it VALUE. LOCALCreate a simple command invoked by NAME which runs COMMANDS.Declare variables and/or give them attributes. If no NAMEs areDisplay helpful information about builtin commands. If PATTERN isDisplay the history list with line numbers. Lines listed withDisplay the list of currently remembered directories. DirectoriesDisplay the possible completions depending on the options. IntendedEXP1, EXP2, and EXP3 are arithmetic expressions. If any expression isEach ARG is an arithmetic expression to be evaluated. EvaluationEach time it is invoked, getopts will place the next option in theEnable and disable builtin shell commands. This allowsEquivalent toExec FILE, replacing this shell with the specified program.Execute PIPELINE and print a summary of the real time, user CPU time,Exit from within a FOR, WHILE or UNTIL loop. If N is specified,Exit the shell with a status of N. If N is omitted, the exit statusExits with a status of 0 (true) or 1 (false) depending onExpand and execute COMMANDS as long as the final command in theFILENAME is executed.FIRST and LAST can be numbers specifying the range, or FIRST can be aFile operators:For each NAME, indicate how it would be interpreted if used as aFor each NAME, remove the corresponding variable or function. GivenFor each NAME, specify how arguments are to be completed.For each NAME, the full pathname of the command is determined andGLOBIGNORE A colon-separated list of patterns describing filenames toGNU long options: + Getopts is used by shell procedures to parse positional parameters.Getopts normally parses the positional parameters ($0 - $9), but ifHISTFILE The name of the file where your command history is stored.HISTFILESIZE The maximum number of lines this file can contain.HISTIGNORE A colon-separated list of patterns used to decide whichHISTSIZE The maximum number of history lines that a runningHOME The complete pathname to your login directory.HOME not setHOSTNAME The name of the current host.HOSTTYPE The type of CPU this version of Bash is running under.I have no name!IGNOREEOF Controls the action of the shell on receipt of an EOFIf -n is given, only processes that have changed status since the lastIf FILE is not specified, the redirections take effect in thisIf FILENAME is given, then that is used as the history file elseIf LIMIT is given, it is the new value of the specified resource;If N is specified, resume at the N-th enclosing loop.If `-p' is supplied, and MODE is omitted, the output is in a formIf a SIGNAL_SPEC is EXIT (0) the command ARG is executed on exit fromIf no arguments are given, information about remembered commands is displayed.If no option is given, then -f is assumed. Values are in 1024-byteIf the $HISTTIMEFORMAT variable is set and not null, its value is usedIf the -a flag is used, `type' displays all of the places that containIf the -h option is given, the job is not removed from the table, but isIf the -p flag is used, `type' either returns the name of the diskIf the -p option is supplied, or if no options are supplied, existingIf the -s option is supplied, the non-option ARGs are appended toIf the -t option is supplied the full pathname to which each NAMEIf the -t option is used, `type' outputs a single word which is one ofIf the file cannot be executed and the shell is not interactive,If the last ARG evaluates to 0, let returns 1; 0 is returnedIf the optional WORD argument is supplied, matches against WORD areIf the shell variable OPTERR has the value 0, getopts disables theJOB_SPEC is not present, the shell's notion of the current job isLists the active jobs. The -l option lists process id's in additionLogout of a login shell.MACHTYPE A string describing the current system Bash is running on.MAILCHECK How often, in seconds, Bash checks for new mail.MAILPATH A colon-separated list of filenames which Bash checksN is not given, all currently active child processes are waited for,NAME and unsets OPTARG. If a required argument is not found, a '?'NAMEs are marked for automatic export to the environment ofNAMEs become disabled; otherwise NAMEs are enabled. For example,No effect; the command does nothing. A zero exit code is returned.OLDPWD not setOPTSTRING contains the option letters to be recognized; if a letterOPTSTRING is not a colon. OPTERR has the value 1 by default.OSTYPE The version of Unix this version of Bash is running on.Obsolete. See `declare'.One line is read from the standard input, or from file descriptor FD if theOperators are evaluated in order of precedence. Sub-expressions inOther operators:Otherwise, an alias is defined for each NAME whose VALUE is given.Otherwise, the current value of the specified resource is printed.Output the ARGs. If -n is specified, the trailing newline isOutput the ARGs. If -n is specified, the trailing newline is suppressed.PATH A colon-separated list of directories to search whenPROMPT_COMMAND A command to be executed before the printing of eachPS1 The primary prompt string.PS2 The secondary prompt string.PWD The full pathname of the current directory.Place JOB_SPEC in the background, as if it had been started withPlace JOB_SPEC in the foreground, and make it the current job. IfPrint the accumulated user and system times for processes run fromPrint the current working directory. With the -P option, pwd printsRead ARGs as input to the shell and execute the resulting command(s).Read and execute commands from FILENAME and return. The pathnamesRemove NAMEs from the list of defined aliases. If the -a option is given,Removes entries from the directory stack. With no arguments,Resume the next iteration of the enclosing FOR, WHILE or UNTIL loop.Return a successful result.Return an unsuccessful result.Returns a status of 0 or 1 depending on the evaluation of the conditionalReturns the context of the current subroutine call.Run a set of commands in a group. This is one way to redirect anRun a shell builtin. This is useful when you wish to rename aRuns COMMAND with ARGS ignoring shell functions. If you have a shellSHELLOPTS A colon-separated list of enabled shell options.SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove allSIGNAL_SPEC is ignored by the shell and by the commands it invokes.SIGSPEC is not present, then SIGTERM is assumed. An argument of `-l'Selectively execute COMMANDS based upon WORD matching PATTERN. TheSend the processes named by PID (or JOB) the signal SIGSPEC. IfShell commands matching keyword `Shell commands matching keywords `Shell options: + Shell variables are allowed as operands. The name of the variableString operators:Suspend the execution of this shell until it receives a SIGCONTTERM The name of the current terminal type.TIMEFORMAT The output format for timing statistics displayed by theTIMEFORMAT: `%c': invalid format characterThe -P flag forces a PATH search for each NAME, even if it is an alias,The -V option produces a more verbose description.The -c flag clears the directory stack by deleting all of the elements.The -f flag suppresses shell function lookup.The -l flag specifies that `dirs' should not print shorthand versionsThe -s flag means to enable (set) each OPTNAME; the -u flagThe -t option causes read to time out and return failure if a complete lineThe EXPRESSION is evaluated according to the rules for arithmeticThe WORDS are expanded, generating a list of words. TheThe `for' loop executes a sequence of commands for each member in aThe command ARG is to be read and executed when the shell receivesThe flags are:The given NAMEs are marked readonly and the values of these NAMEs mayThe if COMMANDS are executed. If the exit status is zero, then the thenThe levels are listed in order of decreasing precedence.The mail in %s has been read + The positional parameters from $N+1 ... are renamed to $1 ... If N isThe return status is the return status of PIPELINE. The `-p' optionThe user file-creation mask is set to MODE. If MODE is omitted, or ifThe value of EXPR indicates how many call frames to go back before theThere are stopped jobs. + These shell commands are defined internally. Type `help' to see this list. + Type `help name' to find out more about the function `name'. + Use `info bash' to find out more about the shell in general. + Use `man -k' or `info' to find out more about commands not in this list. + + A star (*) next to a name means that the command is disabled. + + This is a synonym for the "test" builtin, but the lastThis is similar to the `fg' command. Resume a stopped or backgroundToggle the values of variables controlling optional behavior.Type `%s -c "help set"' for more information about shell options. + Type `%s -c help' for more information about shell builtin commands. + Ulimit provides control over the resources available to processesUnknown errorUsage: %s [GNU long option] [option] ... + %s [GNU long option] [option] script-file ... + Use "%s" to leave the shell. + Use the `bashbug' command to report bugs. + Using + rather than - causes these flags to be turned off. TheUsing `+' instead of `-' turns off the given attribute instead. WhenVariables with the integer attribute have arithmetic evaluation (seeWORD, then the job whose name begins with WORD is used. Following theWait for the specified process and report its termination status. IfWhen displaying values of variables, -f displays a function's nameWhen the `==' and `!=' operators are used, the string to the right of theWith the `fc -s [pat=rep ...] [command]' format, the command isWithout EXPR, returns returns "$line $filename". With EXPR,You can explicitly turn off the interpretation of the above charactersYou can see the directory stack with the `dirs' command.You have mail in $_You have new mail in $_`%c': bad command`%c': invalid format character`%c': invalid symbolic mode character`%c': invalid symbolic mode operator`%s': cannot unbind`%s': invalid alias name`%s': invalid keymap name`%s': missing format character`%s': not a pid or valid job spec`%s': not a valid identifier`%s': unknown function name`&'. If JOB_SPEC is not present, the shell's notion of the current`)' expected`)' expected, found %s`-S' is supplied, the current value of the mask is printed. The `-S'`:' expected for conditional expression`alias' with no arguments or with the -p option prints the list`alias', `keyword', `function', `builtin', `file' or `', if NAME is an`let') done when the variable is assigned to.`set -o'. With no options, or with the -p option, a list of all`special' builtins. The -n option displays a list of all disabled builtins.`until' COMMANDS has an exit status which is not zero.`while' COMMANDS has an exit status of zero.`|' is used to separate multiple patterns.a Readline variable. The non-option argument syntax is equivalenta shell script is invoked. When an option requires an argument,a short usage synopsis.alias substitution when the alias is expanded. Alias returnsalias, shell reserved word, shell function, shell builtin, disk file,all child processes of the shell are waited for.all_local_variables: no function context at current scopeallocatedan array variable. An argument of `--' disables further optionan executable named `file'. This includes aliases, builtins, andan expression. The variable need not have its integer attributeand definition. The -F option restricts the display to functionand system CPU time spent executing PIPELINE when it terminates.and the return code is zero. N is a process ID; if it is not given,and the return code is zero. N may be a process ID or a jobanything in the history list.append the contents to the history list instead. `-a' meansare executed and the if command completes. Otherwise, the else COMMANDSare executed, if present. The exit status is the exit status of the lastare separated by a colon (:). A null directory name is the same asare string operators as well, and numeric comparison operators.argumentargument expectedargument must be a literal `]', to match the opening `['.argument. In addition to the standard printf(1) formats, %b means toarguments are given, or if `-p' is given, a list of all readonly namesas a format string for strftime(3) to print the time stamp associatedassumed. For each element in WORDS, NAME is set to that element, andattempted assignment to non-variableauto_resume Non-null means a command word appearing on a line byback up through the list with the `popd' command.backslash escaping is disabled. The -d option causes read to continuebad array subscriptbad command typebad connectorbad jumpbad substitution: no closing `%s' in %sbash_execute_unix_command: cannot find keymap for commandbe executed.be signal numbers for which names should be listed. Kill is a shellbefore attempting to read. If -a is supplied, the words read are assignedbeing a login shell if it is; just suspend anyway.bind '"\C-x\C-r": re-read-init-file'.bind accepts the following options:break N levels.bug: bad expassign tokenbug: unknown operationbuiltin for two reasons: it allows job IDs to be used instead ofbuiltin within the function itself.builtin without specifying a full pathname. If -n is used, thebuiltin, or function, and returns the name of the disk file that wouldby the `test' builtin, and may be combined using the following operatorscan be used used to provide a stack trace.can only `return' from a function or sourced scriptcan only be used in a functioncan only be used within a function; it makes the variable NAMEcannot allocate new file descriptor for bash input from fd %dcannot create temp file for here document: %scannot duplicate fd %d to fd %dcannot duplicate named pipe %s as fd %dcannot find %s in shared object %s: %scannot make child for command substitutioncannot make child for process substitutioncannot make pipe for command substitutioncannot make pipe for process substitutioncannot open named pipe %s for readingcannot open named pipe %s for writingcannot open shared object %s: %scannot redirect standard input from /dev/null: %scannot set and unset shell options simultaneouslycannot simultaneously unset a function and a variablecannot suspendcannot suspend a login shellcannot use `-f' to make functionscannot use more than one of -anrwcannout reset nodelay mode for fd %dcauses `dirs' to print the directory stack with one entry per line,causes output to be displayed in a format that may be reused as input.characters have been read. The -s option causes input coming from acharacters, which are simply copied to standard output, character escapecleared by deleting all of the entries. The `-d' option deletescommand executed, or zero if no condition tested true.command name.command. If ARG is `-p' then the trap commands associated withcommand_substitute: cannot duplicate pipe as fd 1completion specifications are printed in a way that allows them to becompletion: function `%s' not foundconditional binary operator expectedcorresponding numbers. Note that a signal can be sent to the shellcorresponding to one of the displayed words, then NAME is setcorresponds is printed. If multiple NAME arguments are supplied withcould not find /tmp, please create!cprintf: `%c': invalid format charactercurrent history to the history file; `-r' means to read the file andcurrent one; the top frame is frame 0.default DIR. The variable CDPATH defines the search path fordeleting stopped job %d with process group %lddelimiters. If no NAMEs are supplied, the line read is stored in the REPLYdescribe_pid: %ld: no such piddetermine the expression's value.dir adds DIR to the directory stack at the top, making it thedir adds DIR to the directory stack at the top, making it thedirectory. With no arguments, exchanges the top two directories.division by 0division by 0 is trapped and flagged as an error. The followingdynamic loading not availableeach NAME, or, if no NAMEs are supplied, all completion specifications.each SIGNAL_SPEC are displayed. If no arguments are supplied or ifeach signal number. Each SIGNAL_SPEC is either a signal name in entire set of commands.error importing function definition for `%s'evaluation. Equivalent to "let EXPRESSION".expand backslash escape sequences in the corresponding argument, and %qexpected `)'exponent less than 0expression EXPRESSION. Expressions are composed of the same primaries usedexpression expectedexpression recursion level exceededexpressions are often used to examine the status of a file. Therefc is used to list or edit and re-execute commands from the history list.file descriptor out of rangefile that would be executed, or nothing if `type -t NAME' would notfilename argument requiredfind their way onto the list with the `pushd' command; you can getflag does the same thing, but the stack position is not prepended.flags can also be used upon invocation of the shell. The currentfollowing backslash-escaped characters is turned on:for PATH that is guaranteed to find all of the standard utilities. Ifformat specifications, each of which causes printing of the next successivefree: called with already freed block argumentfree: called with unallocated block argumentfree: start and end chunk sizes differfree: underflow detected; mh_nbytes out of rangefreedfrom subsequent NAMEs. An argument of `--' disables further optionfrom the history file and append them to the history list.from the standard input. If the line consists of the numberfull pathname of NAME, and no path search is performed. The -rfunction as $0 .. $n.function called `ls', and you wish to call the command `ls', you canfunction. Some variables cannot be unset; also see readonly.functions, if and only if the -p flag is not also used.generated.getcwd: cannot access parent directoriesgetopts places that argument into the shell variable OPTARG.getopts reports errors in one of two ways. If the first charactergiven, then display the values of variables instead. The -p optionhashing disabledhave a visible scope restricted to that function and its children.histchars Characters controlling history expansion and quickhistory expansion on each ARG and display the result, without storinghistory positionhistory specificationidentifier expected after pre-increment or pre-decrementif $HISTFILE has a value, that is used, else ~/.bash_history.in $PATH are used to find the directory containing FILENAME. If anyin the variable REPLY. COMMANDS are executed after each selectionin turn, and if the exit status is zero, the corresponding then COMMANDSincrements of 512 bytes, and -u, which is an unscaled number ofincrements, except for -t, which is in seconds, -p, which is ininstead of following symbolic links; the -L option forces symbolic linksinterpreted as an octal number, otherwise it is a symbolic mode stringinvalid arithmetic baseinvalid baseinvalid character %d in exportstr for %sinvalid numberinvalid signal numberis a character string which contains three types of objects: plainis assumed. The PS3 prompt is then displayed and a line readis done in fixed-width integers with no check for overflow, thoughis encountered, read times out, or an invalid file descriptor is supplied asis followed by a colon, the option is expected to have an argument,is given, a list of all names that are exported in this shell isis omitted, the return status is that of the last command.is placed in NAME, OPTARG is unset, and a diagnostic message isis printed. The `-a' option means to treat each NAME asis replaced by its value (coerced to a fixed-width integer) withinis supplied, FILE is executed with a null environment. The `-a'is that of the last command executed.its value is the default timeout. The return code is zero, unless end-of-filejob %d started without job controljob is used.job specification with a `&' places the job in the background.job. If you specifiy DIGITS, then that job is used. If you specifyjobs from the job table; the -r option means to remove only running jobs.just resizedlast command: %s + less-than, less-than-or-equal, greater-than, or greater-than-or-equallike that accepted by chmod(1).list of items. If `in WORDS ...;' is not present, then `in "$@"' islist of operators is grouped into levels of equal-precedence operators.lists the signal names; if arguments follow `-l' they are assumed toloading, the -f option may be used to load new builtins from themake_here_document: bad instruction type %dmake_local_variable: no function context at current scopemake_redirection: redirection instruction `%d' out of rangemakes pwd follow symbolic links.malloc: block on free list clobberedmalloc: failed assertion: %s + malloc: watch alert: %p %s marked so that SIGHUP is not sent to the job if the shell receives ameans to quote the argument in a way that can be reused as shell input.missing `)'missing `]'missing hex digit for \xmore arguments are given, they are parsed instead.name only.name. If that variable has a value, then cd to the value of thatnetwork operations not supportedno `=' in exportstr for %sno closing `%c' in %sno command foundno help topics match `%s'. Try `help help' or `man -k %s' or `info %s'.no job controlno job control in this shellno match: %sno other directoryno other options allowed with `-x'not be changed by subsequent assignment. If the -f option is given,not each is set.not given, it is assumed to be 1.not login shell: use `exit'notification are printed. JOBSPEC restricts output to that job. Theoctal numberof OPTSTRING is a colon, getopts uses silent error reporting. Inof aliases in the form alias NAME=VALUE on standard output.of directories which are relative to your home directory. This meansof input is not read within TIMEOUT seconds. If the TMOUT variable is set,omitted, it behaves as if it evaluates to 1.only `-p' is given, trap prints the list of commands associated withonly meaningful in a `for', `while', or `until' loopoperator is used as a pattern and pattern matching is performed. Theoption causes the shell to forget all remembered locations. The -doption causes the shell to forget the remembered location of each NAME.option is given, it is interpreted as follows:option is supplied, the string PROMPT is output without a trailing newlineoption makes the output symbolic; otherwise an octal number is output.option means to make set argv[0] of the executed process to NAME.option restricts the OPTNAMEs to those defined for use withor a signal number. `trap -l' prints a list of signal names and theiror not it is enabled. The -s option restricts the output to the POSIX.2or unfound, respectively.otherwise a list of the builtins is printed. The -s optionotherwise.parameters and are assigned, in order, to $1, $2, .. $n. If noparentheses are evaluated first and may override the precedencepipeline are waited for.pop_scope: head of shell_variables not a temporary environment scopepop_var_context: head of shell_variables not a function contextpop_var_context: no global_variables contextpreceded by a number. If `in WORDS' is not present, `in "$@"'prepending the directory name with its position in the stack. The -ppreviously loaded with -f. If no non-option names are given, orprint_command: bad connector `%d'printed.printed. An argument of `-n' says to remove the export propertyprinted. If -x is given, COMMAND is run after all job specificationsprintf formats and prints ARGUMENTS under control of the FORMAT. FORMATprinting of error messages, even if the first character ofprints the timing summary in a slightly different format. This usesprocess IDs, and, if you have reached the limit on processes thatprocess group leader.processes.processing.progcomp_insert: %s: NULL COMPSPECre-executed after the substitution OLD=NEW is performed.read error: %d: %srealloc: called with unallocated block argumentrealloc: start and end chunk sizes differrealloc: underflow detected; mh_nbytes out of rangerecursion stack underflowredirection error: cannot duplicate fdredisplayed. If EOF is read, the command completes. Any otherregister_alloc: %p already in table as allocated? + register_alloc: alloc table is full with FIND_ALLOC? + register_free: %p already in table as free? + remembered. If the -p option is supplied, PATHNAME is used as theremoves the top directory from the stack, and cd's to the newrequesting resizerequired argument is not found, getopts places a ':' into NAME andreset to their original values. If ARG is the null string eachrespectively. Without options, the status of all active jobs isrestrictedrestricts the output for each builtin command matching PATTERN toreturn `file'.returns "$line $subroutine $filename"; this extra informationreused as input. The -r option removes a completion specification forrules above.run_pending_traps: bad value in trap_list[%d]: %prun_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myselfruns the last command beginning with `cc' and typing `r' re-executessave_bash_input: buffer already exists for new fd %dsay "command ls". If the -p option is given, a default value is usedseen, getopts places the option character found into OPTARG. If asequences which are converted and copied to the standard output, andset of expanded words is printed on the standard error, eachset of flags may be found in $-. The remaining n ARGs are positionalsets OPTARG to the option character found. If getopts is not insettable options is displayed, with an indication of whether orshared object FILENAME. The -d option will delete a builtinshell builtin to be a function, but need the functionality of theshell level (%d) too high, resetting to 1shell option `cdable_vars' is set, then try the word as a variableshell variable $name, initializing name if it does not exist, andshell. If the first argument is `-l', then place a dash in theshift countsignal(s) SIGNAL_SPEC. If ARG is absent all specified signals aresignal. The `-f' if specified says not to complain about thissigprocmask: %d: invalid operationsilent mode, and an invalid option is seen, getopts places '?' intospecification; if a job spec is given, all processes in the job'sspecified, gives detailed help on all commands matching PATTERN,started by the shell, on systems that allow such control. If anstatus indicates whether each OPTNAME is set or unset. The -ostring, which means the most recent command beginning with thatstring.subsequently executed commands. If the -f option is given,supplied with a non-zero NCHARS argument, read returns after NCHARSsuppressed. If the -e option is given, interpretation of thesyntax errorsyntax error in conditional expressionsyntax error in conditional expression: unexpected token `%s'syntax error in expressionsyntax error near `%s'syntax error near unexpected token `%s'syntax error: `((%s))'syntax error: `;' unexpectedsyntax error: arithmetic expression requiredsyntax error: operand expectedsyntax error: unexpected end of fileterminal to not be echoed.than ARG2.that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flagthat appear in ARGS have been replaced with the process ID of that job'sthat may be used as input. If MODE begins with a digit, it isthe -V or -v option is given, a string is printed describing COMMAND.the -p option is supplied, a list of builtins is printed. Thethe COMMANDS are executed.the NAMEs refer to functions. If no NAMEs are given, or if `-p'the `-v', unset will only act on variables. Given the `-f' flag,the argument to -u.the current directory, i.e. `.'. If DIR begins with a slash (/),the current soft limit, the current hard limit, and no limit, respectively.the directory containing DIR. Alternative directory names in CDPATHthe evaluation of EXPR. Expressions may be unary or binary. Unarythe history entry at offset OFFSET. The `-w' option writes out thethe history list as a single entry. The -p option means to performthe index of the next argument to be processed into the shellthe last N lines. The `-c' option causes the history list to bethe last command.the physical directory, without any symbolic links; the -L optionthe second word to the second NAME, and so on, with leftover words assignedthe shell is interactive, readline is used to obtain the line. If -n isthe shell.the shell. If a SIGNAL_SPEC is DEBUG, ARG is executed after everythe special LIMIT values `soft', `hard', and `unlimited' stand forthe stack, making the new top of the stack the current workingthe value of the TIMEFORMAT variable as the output format.then CDPATH is not used. If the directory is not found, and thethen functions corresponding to the NAMEs are so marked. If nothen remove all alias definitions.then the shell exits, unless the shell option `execfail' is set.this mode, no error messages are printed. If an invalid option isto append history lines from this session to the history file.to be followed.to be used from within a shell function generating possible completions.to sequential indices of ARRAY, starting at zero. If -e is supplied andto that found in ~/.inputrc, but must be passed as a single argument:to that word. If the line is empty, WORDS and the prompt areto the last NAME. Only the characters found in $IFS are recognized as wordto the normal information; the -p option lists process id's only.to use the `test' found in $PATH instead of the shell builtintoo many argumentstop directory.trap_handler: bad signal %dtries to unset a variable, and if that fails, then tries to unset atrue unless a NAME is given for which no alias has been defined.turned on to be used in an expression.unexpected EOF while looking for `]]'unexpected EOF while looking for matching `%c'unexpected EOF while looking for matching `)'unexpected argument `%s' to conditional binary operatorunexpected argument `%s' to conditional unary operatorunexpected argument to conditional binary operatorunexpected argument to conditional unary operatorunexpected token %d in conditional commandunexpected token `%c' in conditional commandunexpected token `%s' in conditional commandunexpected token `%s', conditional binary operator expectedunexpected token `%s', expected `)'unknown command errorunset will only act on functions. With neither flag, unset firstunsets each OPTNAME. The -q flag suppresses output; the exituntil a break command is executed.until the first character of DELIM is read, rather than newline. If the -pused in a function, makes NAMEs local, as with the `local' command.used.value read causes NAME to be set to null. The line read is savedvalue too great for basevariable OPTIND. OPTIND is initialized to 1 each time the shell orvariable. If the -r option is given, this signifies `raw' input, andvariable. The -P option says to use the physical directory structureversion, type `enable -n test'. On systems supporting dynamicwait: pid %ld is not a child of this shellwait_for: No record of process %ldwait_for_job: job %d is stoppedwarning: -C option may not work as you expectwarning: -F option may not work as you expectwhich should be separated from it by white space.will display the attributes and values of each NAME.with "kill -signal $$".with a `*' have been modified. Argument of N says to list onlywith each displayed history entry. No time stamps are printed otherwise.with the -E option.write error: %sxmalloc: %s:%d: cannot allocate %lu bytesxmalloc: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)xmalloc: cannot allocate %lu bytesxmalloc: cannot allocate %lu bytes (%lu bytes allocated)xrealloc: %s:%d: cannot allocate %lu bytesxrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)xrealloc: cannot allocate %lu bytesxrealloc: cannot reallocate %lu bytes (%lu bytes allocated)you can create, you don't have to start a process to kill another one.you to use a disk command which has the same name as a shellzeroth arg passed to FILE, as login does. If the `-c' optionProject-Id-Version: GNU bash 3.0-rc1 + POT-Creation-Date: 2003-12-22 15:34-0500 + PO-Revision-Date: 2003-12-22 15:34-0500 + Last-Translator: Automatically generated + Language-Team: none + MIME-Version: 1.0 + Content-Type: text/plain; charset=UTF-8 + Content-Transfer-Encoding: 8bit + Report-Msgid-Bugs-To: bug-bash@gnu.org + Plural-Forms: nplurals=2; plural=(n != 1); + timed out waiting for input: auto-logout + KEYSEQ is entered. conditional operator (( EXP3 )) (default 10). When unset, EOF signifies the end of input. A value of ‘exact’ means that the command word must COMMANDS ‘time’ reserved word. be ignored by pathname expansion. character as the sole input. If set, then the value commands should be saved on the history list. directory. exactly match a command in the list of stopped jobs. A for new mail. in a row on an empty line before the shell will exit itself is first looked for in the list of currently looking for commands. match a substring of the job. Any other value means that of it is the number of EOF characters that can be seen primary prompt. shell can access. stopped jobs. If found there, that job is foregrounded. substitution character, usually ‘!’. The second is substitution. The first character is the history the ‘quick substitution’ character, usually ‘^’. The the command must be a prefix of a stopped job. third is the ‘history comment’ character, usually ‘#’. value of ‘substring’ means that the command word must when the argument to ‘cd’ is not found in the current ! EXPRESSION True if EXPRESSION is false; else false !, ~ logical and bitwise negation & bitwise AND && logical AND &=, ^=, |= assignment ( EXPRESSION ) Returns the value of EXPRESSION (( EXP1 )) ** exponentiation *, /, % multiplication, division, remainder ++id, --id variable pre-increment, pre-decrement +, - addition, subtraction +=, -=, <<=, >>=, -%s or -o option + -, + unary minus, plus -irsD or -c command or -O shopt_option (invocation only) + <<, >> left and right bitwise shifts <=, >=, <, > comparison =, *=, /=, %=, ==, != equality, inequality EXPR1 && EXPR2 True if both EXPR1 and EXPR2 are true; else false EXPR1 || EXPR2 True if either EXPR1 or EXPR2 is true; else false \E escape character \\ backslash \a alert (bell) \b backspace \c suppress trailing newline \f form feed \n new line \num the character whose ASCII code is NUM (octal). \r carriage return \t horizontal tab \v vertical tab ^ bitwise XOR debugging) without definitions dirs when invoked without options, starting with zero. done expr ? expr : expr from the left of the list shown by ‘dirs’, starting with from the right of the list shown by ‘dirs’, starting with from the stack, so only the stack is manipulated. id++, id-- variable post-increment, post-decrement new current working directory. removes the first directory, ‘popd +1’ the second. removes the last directory, ‘popd -1’ the next to last. shown by ‘dirs’, starting with zero. For example: ‘popd +0’ shown by ‘dirs’, starting with zero. For example: ‘popd -0’ to the stack, so only the stack is manipulated. while (( EXP2 )); do zero) is at the top. | bitwise OR || logical OR + malloc: %s:%d: assertion botched + allow comments to appear in interactive commands match the standard operation differs from the 1003.2 standard to or zero if no command exited with a non-zero status the last command to exit with a non-zero status, be reused as input. command. Acceptable keymap names are emacs, emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move, in a form that can be reused as input. reused as input. vi-command, and vi-insert. -lt, -le, -gt, or -ge. True if STRING1 sorts after STRING2 lexicographically. True if STRING1 sorts before STRING2 lexicographically. True if the strings are equal. True if the strings are not equal. modification date). allexport same as -a braceexpand same as -B emacs use an emacs-style line editing interface errexit same as -e errtrace same as -E functrace same as -T hashall same as -h histexpand same as -H history enable command history ignoreeof the shell will not exit upon reading EOF interactive-comments keyword same as -k monitor same as -m noclobber same as -C noexec same as -n noglob same as -f nolog currently accepted but ignored notify same as -b nounset same as -u onecmd same as -t physical same as -P pipefail the return value of a pipeline is the status of posix change the behavior of bash where the default privileged same as -p verbose same as -v vi use a vi-style line editing interface xtrace same as -x Disables processing of the $ENV file and importing of shell Set the variable corresponding to option-name: by default. by redirection of output. command, not just those that precede the command name. functions. Turning this option off causes the effective uid and gid to be set to the real uid and gid. such as cd which change the current directory. then vi. dirs when invoked without options, starting with zero. from the left of the list shown by ‘dirs’, starting with from the right of the list shown by ‘dirs’, starting with from the stack, so only the stack is manipulated. new current working directory. removes the first directory, ‘popd +1’ the second. removes the last directory, ‘popd -1’ the next to last. shown by ‘dirs’, starting with zero. For example: ‘popd +0’ shown by ‘dirs’, starting with zero. For example: ‘popd -0’ to the stack, so only the stack is manipulated. zero) is at the top. ! EXPR True if expr is false. -B the shell will perform brace expansion -C If set, disallow existing regular files to be overwritten -E If set, the ERR trap is inherited by shell functions. -G FILE True if the file is effectively owned by your group. -H use the ‘hard’ resource limit -H Enable ! style history substitution. This flag is on -L FILE True if file is a symbolic link. -N FILE True if the file has been modified since it was last read. -O FILE True if the file is effectively owned by you. -P If set, do not follow symbolic links when executing commands -S use the ‘soft’ resource limit -S FILE True if file is a socket. -T If set, the DEBUG trap is inherited by shell functions. -a all current limits are reported -a Mark variables which are modified or created for export. -a FILE True if file exists. -b Notify of job termination immediately. -b FILE True if file is block special. -c the maximum size of core files created -c FILE True if file is character special. -d the maximum size of a process's data segment -d FILE True if file is a directory. -e Exit immediately if a command exits with a non-zero status. -e FILE True if file exists. -f the maximum size of files created by the shell -f Disable file name generation (globbing). -f FILE True if file exists and is a regular file. -g FILE True if file is set-group-id. -h Remember the location of commands as they are looked up. -h FILE True if file is a symbolic link. -k All assignment arguments are placed in the environment for a -k FILE True if file has its ‘sticky’ bit set. -l the maximum size a process may lock into memory -m the maximum resident set size -m Job control is enabled. -n the maximum number of open file descriptors -n Read commands but do not execute them. -n STRING -o OPTION True if the shell option OPTION is enabled. -o option-name -p the pipe buffer size -p Turned on whenever the real and effective user ids do not match. -p FILE True if file is a named pipe. -r FILE True if file is readable by you. -s the maximum stack size -s FILE True if file exists and is not empty. -t the maximum amount of cpu time in seconds -t Exit after reading and executing one command. -t FD True if FD is opened on a terminal. -u the maximum number of user processes -u Treat unset variables as an error when substituting. -u FILE True if the file is set-user-id. -v the size of virtual memory -v Print shell input lines as they are read. -w FILE True if the file is writable by you. -x Print commands and their arguments as they are executed. -x FILE True if the file is executable by you. -z STRING True if string is empty. EXPR1 -a EXPR2 True if both expr1 AND expr2 are true. EXPR1 -o EXPR2 True if either expr1 OR expr2 is true. STRING True if string is not empty. STRING1 != STRING2 STRING1 < STRING2 STRING1 = STRING2 STRING1 > STRING2 arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne, -e ENAME selects which editor to use. Default is FCEDIT, then EDITOR, -l means list lines instead of editing. -n means no line numbers listed. -r means reverse the order of the lines (making it newest listed first). -F to display function names (and line number and source file name if -P List function names and bindings. -S List key sequences that invoke macros and their values -V List variable names and values -a to make NAMEs arrays (if supported) -f to select from among function names only -f filename Read key bindings from FILENAME. -i to make NAMEs have the ‘integer’ attribute -l List names of functions. -m keymap Use ‘keymap’ as the keymap for the duration of this -p List functions and bindings in a form that can be -q function-name Query about which keys invoke the named function. -r to make NAMEs readonly -r keyseq Remove the binding for KEYSEQ. -s List key sequences that invoke macros and their values -t to make NAMEs have the ‘trace’ attribute -u function-name Unbind all keys which are bound to the named function. -v List variable names and values in a form that can -x to make NAMEs export -x keyseq:shell-command Cause SHELL-COMMAND to be executed when FILE1 -ef FILE2 True if file1 is a hard link to file2. FILE1 -nt FILE2 True if file1 is newer than file2 (according to FILE1 -ot FILE2 True if file1 is older than file2.$%s: cannot assign in this way%c%c: invalid option%d: invalid file descriptor: %s%s can be invoked via %s is %s + %s is a function + %s is a shell builtin + %s is a shell keyword + %s is aliased to ‘%s’ + %s is hashed (%s) + %s is not bound to any keys. + %s out of range%s: %s out of range%s: %s: bad interpreter%s: ambiguous job spec%s: ambiguous redirect%s: arguments must be process or job IDs%s: bad network path specification%s: bad substitution%s: binary operator expected%s: cannot assign list to array member%s: cannot assign to non-numeric index%s: cannot create: %s%s: cannot delete: %s%s: cannot destroy array variables in this way%s: cannot execute binary file%s: cannot execute: %s%s: cannot get limit: %s%s: cannot modify limit: %s%s: cannot open temp file: %s%s: cannot open: %s%s: cannot overwrite existing file%s: cannot read: %s%s: cannot unset%s: cannot unset: readonly %s%s: command not found%s: error retrieving current directory: %s: %s + %s: file is too large%s: file not found%s: first non-whitespace character is not ‘"’%s: hash table empty + %s: history expansion failed%s: host unknown%s: illegal option -- %c + %s: integer expression expected%s: invalid action name%s: invalid file descriptor specification%s: invalid limit argument%s: invalid number%s: invalid option%s: invalid option name%s: invalid service%s: invalid shell option name%s: invalid signal specification%s: invalid timeout specification%s: is a directory%s: job %d already in background%s: job has terminated%s: missing colon separator%s: no completion specification%s: no job control%s: no such job%s: not a function%s: not a regular file%s: not a shell builtin%s: not an array variable%s: not dynamically loaded%s: not found%s: numeric argument required%s: option requires an argument%s: option requires an argument -- %c + %s: parameter null or not set%s: readonly function%s: readonly variable%s: restricted%s: restricted: cannot redirect output%s: restricted: cannot specify ‘/’ in command names%s: substring expression < 0%s: unary operator expected%s: unbound variable%s: warning: && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to+N Rotates the stack so that the Nth directory (counting+N displays the Nth entry counting from the left of the list shown by+N removes the Nth entry counting from the left of the list+N Rotates the stack so that the Nth directory (counting+N displays the Nth entry counting from the left of the list shown by+N removes the Nth entry counting from the left of the list-N Rotates the stack so that the Nth directory (counting-N displays the Nth entry counting from the right of the list shown by-N removes the Nth entry counting from the right of the list-N Rotates the stack so that the Nth directory (counting-N displays the Nth entry counting from the right of the list shown by-N removes the Nth entry counting from the right of the list-a option means to print every builtin with an indication of whether-n suppress the normal change of directory when adding directories-n suppress the normal change of directory when removing directories-n suppress the normal change of directory when adding directories-n suppress the normal change of directory when removing directories-r and -s options restrict output to running and stopped jobs only,-t, the NAME is printed before the hashed full pathname. The -l option-u option is supplied, and the first word is assigned to the first NAME,/dev/(tcp|udp)/host/port not supported without networking/tmp must be a valid directory nameA trailing space in VALUE causes the next word to be checked forA useful alias to use with this is r='fc -s', so that typing ‘r cc’ARGUMENTS are supplied, they become the positional parameters whenARGs are given, all shell variables are printed.Aborting...Adds a directory to the top of the directory stack, or rotatesArgument ‘-n’ means to read all history lines not already readArguments on the command line along with NAME are passed to theArithmetic binary operators return true if ARG1 is equal, not-equal,BASH_VERSION Version information for this Bash.Bind a key sequence to a Readline function or a macro, or setBy default, removes each JOBSPEC argument from the table of active jobs.CDPATH A colon separated list of directories to searchCOMMANDS are executed. Otherwise, each of the elif COMMANDS are executedCauses a function to exit with the return value specified by N. If NChange the current directory to DIR. The variable $HOME is theCopyright (C) 2004 Free Software Foundation, Inc. + Create a local variable called NAME, and give it VALUE. LOCALCreate a simple command invoked by NAME which runs COMMANDS.Declare variables and/or give them attributes. If no NAMEs areDisplay helpful information about builtin commands. If PATTERN isDisplay the history list with line numbers. Lines listed withDisplay the list of currently remembered directories. DirectoriesDisplay the possible completions depending on the options. IntendedEXP1, EXP2, and EXP3 are arithmetic expressions. If any expression isEach ARG is an arithmetic expression to be evaluated. EvaluationEach time it is invoked, getopts will place the next option in theEnable and disable builtin shell commands. This allowsEquivalent toExec FILE, replacing this shell with the specified program.Execute PIPELINE and print a summary of the real time, user CPU time,Exit from within a FOR, WHILE or UNTIL loop. If N is specified,Exit the shell with a status of N. If N is omitted, the exit statusExits with a status of 0 (true) or 1 (false) depending onExpand and execute COMMANDS as long as the final command in theFILENAME is executed.FIRST and LAST can be numbers specifying the range, or FIRST can be aFile operators:For each NAME, indicate how it would be interpreted if used as aFor each NAME, remove the corresponding variable or function. GivenFor each NAME, specify how arguments are to be completed.For each NAME, the full pathname of the command is determined andGLOBIGNORE A colon-separated list of patterns describing filenames toGNU long options: + Getopts is used by shell procedures to parse positional parameters.Getopts normally parses the positional parameters ($0 - $9), but ifHISTFILE The name of the file where your command history is stored.HISTFILESIZE The maximum number of lines this file can contain.HISTIGNORE A colon-separated list of patterns used to decide whichHISTSIZE The maximum number of history lines that a runningHOME The complete pathname to your login directory.HOME not setHOSTNAME The name of the current host.HOSTTYPE The type of CPU this version of Bash is running under.I have no name!IGNOREEOF Controls the action of the shell on receipt of an EOFIf -n is given, only processes that have changed status since the lastIf FILE is not specified, the redirections take effect in thisIf FILENAME is given, then that is used as the history file elseIf LIMIT is given, it is the new value of the specified resource;If N is specified, resume at the N-th enclosing loop.If ‘-p’ is supplied, and MODE is omitted, the output is in a formIf a SIGNAL_SPEC is EXIT (0) the command ARG is executed on exit fromIf no arguments are given, information about remembered commands is displayed.If no option is given, then -f is assumed. Values are in 1024-byteIf the $HISTTIMEFORMAT variable is set and not null, its value is usedIf the -a flag is used, ‘type’ displays all of the places that containIf the -h option is given, the job is not removed from the table, but isIf the -p flag is used, ‘type’ either returns the name of the diskIf the -p option is supplied, or if no options are supplied, existingIf the -s option is supplied, the non-option ARGs are appended toIf the -t option is supplied the full pathname to which each NAMEIf the -t option is used, ‘type’ outputs a single word which is one ofIf the file cannot be executed and the shell is not interactive,If the last ARG evaluates to 0, let returns 1; 0 is returnedIf the optional WORD argument is supplied, matches against WORD areIf the shell variable OPTERR has the value 0, getopts disables theJOB_SPEC is not present, the shell's notion of the current job isLists the active jobs. The -l option lists process id's in additionLogout of a login shell.MACHTYPE A string describing the current system Bash is running on.MAILCHECK How often, in seconds, Bash checks for new mail.MAILPATH A colon-separated list of filenames which Bash checksN is not given, all currently active child processes are waited for,NAME and unsets OPTARG. If a required argument is not found, a ‘?’NAMEs are marked for automatic export to the environment ofNAMEs become disabled; otherwise NAMEs are enabled. For example,No effect; the command does nothing. A zero exit code is returned.OLDPWD not setOPTSTRING contains the option letters to be recognized; if a letterOPTSTRING is not a colon. OPTERR has the value 1 by default.OSTYPE The version of Unix this version of Bash is running on.Obsolete. See ‘declare’.One line is read from the standard input, or from file descriptor FD if theOperators are evaluated in order of precedence. Sub-expressions inOther operators:Otherwise, an alias is defined for each NAME whose VALUE is given.Otherwise, the current value of the specified resource is printed.Output the ARGs. If -n is specified, the trailing newline isOutput the ARGs. If -n is specified, the trailing newline is suppressed.PATH A colon-separated list of directories to search whenPROMPT_COMMAND A command to be executed before the printing of eachPS1 The primary prompt string.PS2 The secondary prompt string.PWD The full pathname of the current directory.Place JOB_SPEC in the background, as if it had been started withPlace JOB_SPEC in the foreground, and make it the current job. IfPrint the accumulated user and system times for processes run fromPrint the current working directory. With the -P option, pwd printsRead ARGs as input to the shell and execute the resulting command(s).Read and execute commands from FILENAME and return. The pathnamesRemove NAMEs from the list of defined aliases. If the -a option is given,Removes entries from the directory stack. With no arguments,Resume the next iteration of the enclosing FOR, WHILE or UNTIL loop.Return a successful result.Return an unsuccessful result.Returns a status of 0 or 1 depending on the evaluation of the conditionalReturns the context of the current subroutine call.Run a set of commands in a group. This is one way to redirect anRun a shell builtin. This is useful when you wish to rename aRuns COMMAND with ARGS ignoring shell functions. If you have a shellSHELLOPTS A colon-separated list of enabled shell options.SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove allSIGNAL_SPEC is ignored by the shell and by the commands it invokes.SIGSPEC is not present, then SIGTERM is assumed. An argument of ‘-l’Selectively execute COMMANDS based upon WORD matching PATTERN. TheSend the processes named by PID (or JOB) the signal SIGSPEC. IfShell commands matching keyword `Shell commands matching keywords `Shell options: + Shell variables are allowed as operands. The name of the variableString operators:Suspend the execution of this shell until it receives a SIGCONTTERM The name of the current terminal type.TIMEFORMAT The output format for timing statistics displayed by theTIMEFORMAT: ‘%c’: invalid format characterThe -P flag forces a PATH search for each NAME, even if it is an alias,The -V option produces a more verbose description.The -c flag clears the directory stack by deleting all of the elements.The -f flag suppresses shell function lookup.The -l flag specifies that ‘dirs’ should not print shorthand versionsThe -s flag means to enable (set) each OPTNAME; the -u flagThe -t option causes read to time out and return failure if a complete lineThe EXPRESSION is evaluated according to the rules for arithmeticThe WORDS are expanded, generating a list of words. TheThe ‘for’ loop executes a sequence of commands for each member in aThe command ARG is to be read and executed when the shell receivesThe flags are:The given NAMEs are marked readonly and the values of these NAMEs mayThe if COMMANDS are executed. If the exit status is zero, then the thenThe levels are listed in order of decreasing precedence.The mail in %s has been read + The positional parameters from $N+1 ... are renamed to $1 ... If N isThe return status is the return status of PIPELINE. The ‘-p’ optionThe user file-creation mask is set to MODE. If MODE is omitted, or ifThe value of EXPR indicates how many call frames to go back before theThere are stopped jobs. + These shell commands are defined internally. Type ‘help’ to see this list. + Type ‘help name’ to find out more about the function ‘name’. + Use ‘info bash’ to find out more about the shell in general. + Use ‘man -k’ or ‘info’ to find out more about commands not in this list. + + A star (*) next to a name means that the command is disabled. + + This is a synonym for the “test†builtin, but the lastThis is similar to the ‘fg’ command. Resume a stopped or backgroundToggle the values of variables controlling optional behavior.Type ‘%s -c “help set‒ for more information about shell options. + Type ‘%s -c help’ for more information about shell builtin commands. + Ulimit provides control over the resources available to processesUnknown errorUsage: %s [GNU long option] [option] ... + %s [GNU long option] [option] script-file ... + Use “%s†to leave the shell. + Use the ‘bashbug’ command to report bugs. + Using + rather than - causes these flags to be turned off. TheUsing ‘+’ instead of ‘-’ turns off the given attribute instead. WhenVariables with the integer attribute have arithmetic evaluation (seeWORD, then the job whose name begins with WORD is used. Following theWait for the specified process and report its termination status. IfWhen displaying values of variables, -f displays a function's nameWhen the ‘==’ and ‘!=’ operators are used, the string to the right of theWith the ‘fc -s [pat=rep ...] [command]’ format, the command isWithout EXPR, returns returns “$line $filenameâ€. With EXPR,You can explicitly turn off the interpretation of the above charactersYou can see the directory stack with the ‘dirs’ command.You have mail in $_You have new mail in $_‘%c’: bad command‘%c’: invalid format character‘%c’: invalid symbolic mode character‘%c’: invalid symbolic mode operator‘%s’: cannot unbind‘%s’: invalid alias name‘%s’: invalid keymap name‘%s’: missing format character‘%s’: not a pid or valid job spec‘%s’: not a valid identifier‘%s’: unknown function name‘&’. If JOB_SPEC is not present, the shell's notion of the current‘)’ expected‘)’ expected, found %s‘-S’ is supplied, the current value of the mask is printed. The ‘-S’‘:’ expected for conditional expression‘alias’ with no arguments or with the -p option prints the list‘alias’, ‘keyword’, ‘function’, ‘builtin’, ‘file’ or ‘’, if NAME is an‘let’) done when the variable is assigned to.‘set -o’. With no options, or with the -p option, a list of all‘special’ builtins. The -n option displays a list of all disabled builtins.‘until’ COMMANDS has an exit status which is not zero.‘while’ COMMANDS has an exit status of zero.‘|’ is used to separate multiple patterns.a Readline variable. The non-option argument syntax is equivalenta shell script is invoked. When an option requires an argument,a short usage synopsis.alias substitution when the alias is expanded. Alias returnsalias, shell reserved word, shell function, shell builtin, disk file,all child processes of the shell are waited for.all_local_variables: no function context at current scopeallocatedan array variable. An argument of ‘--’ disables further optionan executable named ‘file’. This includes aliases, builtins, andan expression. The variable need not have its integer attributeand definition. The -F option restricts the display to functionand system CPU time spent executing PIPELINE when it terminates.and the return code is zero. N is a process ID; if it is not given,and the return code is zero. N may be a process ID or a jobanything in the history list.append the contents to the history list instead. ‘-a’ meansare executed and the if command completes. Otherwise, the else COMMANDSare executed, if present. The exit status is the exit status of the lastare separated by a colon (:). A null directory name is the same asare string operators as well, and numeric comparison operators.argumentargument expectedargument must be a literal ‘]’, to match the opening ‘[’.argument. In addition to the standard printf(1) formats, %b means toarguments are given, or if ‘-p’ is given, a list of all readonly namesas a format string for strftime(3) to print the time stamp associatedassumed. For each element in WORDS, NAME is set to that element, andattempted assignment to non-variableauto_resume Non-null means a command word appearing on a line byback up through the list with the ‘popd’ command.backslash escaping is disabled. The -d option causes read to continuebad array subscriptbad command typebad connectorbad jumpbad substitution: no closing ‘%s’ in %sbash_execute_unix_command: cannot find keymap for commandbe executed.be signal numbers for which names should be listed. Kill is a shellbefore attempting to read. If -a is supplied, the words read are assignedbeing a login shell if it is; just suspend anyway.bind '“\C-x\C-râ€: re-read-init-file'.bind accepts the following options:break N levels.bug: bad expassign tokenbug: unknown operationbuiltin for two reasons: it allows job IDs to be used instead ofbuiltin within the function itself.builtin without specifying a full pathname. If -n is used, thebuiltin, or function, and returns the name of the disk file that wouldby the ‘test’ builtin, and may be combined using the following operatorscan be used used to provide a stack trace.can only ‘return’ from a function or sourced scriptcan only be used in a functioncan only be used within a function; it makes the variable NAMEcannot allocate new file descriptor for bash input from fd %dcannot create temp file for here document: %scannot duplicate fd %d to fd %dcannot duplicate named pipe %s as fd %dcannot find %s in shared object %s: %scannot make child for command substitutioncannot make child for process substitutioncannot make pipe for command substitutioncannot make pipe for process substitutioncannot open named pipe %s for readingcannot open named pipe %s for writingcannot open shared object %s: %scannot redirect standard input from /dev/null: %scannot set and unset shell options simultaneouslycannot simultaneously unset a function and a variablecannot suspendcannot suspend a login shellcannot use ‘-f’ to make functionscannot use more than one of -anrwcannout reset nodelay mode for fd %dcauses ‘dirs’ to print the directory stack with one entry per line,causes output to be displayed in a format that may be reused as input.characters have been read. The -s option causes input coming from acharacters, which are simply copied to standard output, character escapecleared by deleting all of the entries. The ‘-d’ option deletescommand executed, or zero if no condition tested true.command name.command. If ARG is ‘-p’ then the trap commands associated withcommand_substitute: cannot duplicate pipe as fd 1completion specifications are printed in a way that allows them to becompletion: function ‘%s’ not foundconditional binary operator expectedcorresponding numbers. Note that a signal can be sent to the shellcorresponding to one of the displayed words, then NAME is setcorresponds is printed. If multiple NAME arguments are supplied withcould not find /tmp, please create!cprintf: ‘%c’: invalid format charactercurrent history to the history file; ‘-r’ means to read the file andcurrent one; the top frame is frame 0.default DIR. The variable CDPATH defines the search path fordeleting stopped job %d with process group %lddelimiters. If no NAMEs are supplied, the line read is stored in the REPLYdescribe_pid: %ld: no such piddetermine the expression's value.dir adds DIR to the directory stack at the top, making it thedir adds DIR to the directory stack at the top, making it thedirectory. With no arguments, exchanges the top two directories.division by 0division by 0 is trapped and flagged as an error. The followingdynamic loading not availableeach NAME, or, if no NAMEs are supplied, all completion specifications.each SIGNAL_SPEC are displayed. If no arguments are supplied or ifeach signal number. Each SIGNAL_SPEC is either a signal name in entire set of commands.error importing function definition for ‘%s’evaluation. Equivalent to “let EXPRESSIONâ€.expand backslash escape sequences in the corresponding argument, and %qexpected ‘)’exponent less than 0expression EXPRESSION. Expressions are composed of the same primaries usedexpression expectedexpression recursion level exceededexpressions are often used to examine the status of a file. Therefc is used to list or edit and re-execute commands from the history list.file descriptor out of rangefile that would be executed, or nothing if ‘type -t NAME’ would notfilename argument requiredfind their way onto the list with the ‘pushd’ command; you can getflag does the same thing, but the stack position is not prepended.flags can also be used upon invocation of the shell. The currentfollowing backslash-escaped characters is turned on:for PATH that is guaranteed to find all of the standard utilities. Ifformat specifications, each of which causes printing of the next successivefree: called with already freed block argumentfree: called with unallocated block argumentfree: start and end chunk sizes differfree: underflow detected; mh_nbytes out of rangefreedfrom subsequent NAMEs. An argument of ‘--’ disables further optionfrom the history file and append them to the history list.from the standard input. If the line consists of the numberfull pathname of NAME, and no path search is performed. The -rfunction as $0 .. $n.function called ‘ls’, and you wish to call the command ‘ls’, you canfunction. Some variables cannot be unset; also see readonly.functions, if and only if the -p flag is not also used.generated.getcwd: cannot access parent directoriesgetopts places that argument into the shell variable OPTARG.getopts reports errors in one of two ways. If the first charactergiven, then display the values of variables instead. The -p optionhashing disabledhave a visible scope restricted to that function and its children.histchars Characters controlling history expansion and quickhistory expansion on each ARG and display the result, without storinghistory positionhistory specificationidentifier expected after pre-increment or pre-decrementif $HISTFILE has a value, that is used, else ~/.bash_history.in $PATH are used to find the directory containing FILENAME. If anyin the variable REPLY. COMMANDS are executed after each selectionin turn, and if the exit status is zero, the corresponding then COMMANDSincrements of 512 bytes, and -u, which is an unscaled number ofincrements, except for -t, which is in seconds, -p, which is ininstead of following symbolic links; the -L option forces symbolic linksinterpreted as an octal number, otherwise it is a symbolic mode stringinvalid arithmetic baseinvalid baseinvalid character %d in exportstr for %sinvalid numberinvalid signal numberis a character string which contains three types of objects: plainis assumed. The PS3 prompt is then displayed and a line readis done in fixed-width integers with no check for overflow, thoughis encountered, read times out, or an invalid file descriptor is supplied asis followed by a colon, the option is expected to have an argument,is given, a list of all names that are exported in this shell isis omitted, the return status is that of the last command.is placed in NAME, OPTARG is unset, and a diagnostic message isis printed. The ‘-a’ option means to treat each NAME asis replaced by its value (coerced to a fixed-width integer) withinis supplied, FILE is executed with a null environment. The ‘-a’is that of the last command executed.its value is the default timeout. The return code is zero, unless end-of-filejob %d started without job controljob is used.job specification with a ‘&’ places the job in the background.job. If you specifiy DIGITS, then that job is used. If you specifyjobs from the job table; the -r option means to remove only running jobs.just resizedlast command: %s + less-than, less-than-or-equal, greater-than, or greater-than-or-equallike that accepted by chmod(1).list of items. If ‘in WORDS ...;’ is not present, then ‘in “$@‒ islist of operators is grouped into levels of equal-precedence operators.lists the signal names; if arguments follow ‘-l’ they are assumed toloading, the -f option may be used to load new builtins from themake_here_document: bad instruction type %dmake_local_variable: no function context at current scopemake_redirection: redirection instruction ‘%d’ out of rangemakes pwd follow symbolic links.malloc: block on free list clobberedmalloc: failed assertion: %s + malloc: watch alert: %p %s marked so that SIGHUP is not sent to the job if the shell receives ameans to quote the argument in a way that can be reused as shell input.missing ‘)’missing ‘]’missing hex digit for \xmore arguments are given, they are parsed instead.name only.name. If that variable has a value, then cd to the value of thatnetwork operations not supportedno ‘=’ in exportstr for %sno closing ‘%c’ in %sno command foundno help topics match ‘%s’. Try ‘help help’ or ‘man -k %s’ or ‘info %s’.no job controlno job control in this shellno match: %sno other directoryno other options allowed with ‘-x’not be changed by subsequent assignment. If the -f option is given,not each is set.not given, it is assumed to be 1.not login shell: use ‘exit’notification are printed. JOBSPEC restricts output to that job. Theoctal numberof OPTSTRING is a colon, getopts uses silent error reporting. Inof aliases in the form alias NAME=VALUE on standard output.of directories which are relative to your home directory. This meansof input is not read within TIMEOUT seconds. If the TMOUT variable is set,omitted, it behaves as if it evaluates to 1.only ‘-p’ is given, trap prints the list of commands associated withonly meaningful in a ‘for’, ‘while’, or ‘until’ loopoperator is used as a pattern and pattern matching is performed. Theoption causes the shell to forget all remembered locations. The -doption causes the shell to forget the remembered location of each NAME.option is given, it is interpreted as follows:option is supplied, the string PROMPT is output without a trailing newlineoption makes the output symbolic; otherwise an octal number is output.option means to make set argv[0] of the executed process to NAME.option restricts the OPTNAMEs to those defined for use withor a signal number. ‘trap -l’ prints a list of signal names and theiror not it is enabled. The -s option restricts the output to the POSIX.2or unfound, respectively.otherwise a list of the builtins is printed. The -s optionotherwise.parameters and are assigned, in order, to $1, $2, .. $n. If noparentheses are evaluated first and may override the precedencepipeline are waited for.pop_scope: head of shell_variables not a temporary environment scopepop_var_context: head of shell_variables not a function contextpop_var_context: no global_variables contextpreceded by a number. If ‘in WORDS’ is not present, ‘in “$@‒prepending the directory name with its position in the stack. The -ppreviously loaded with -f. If no non-option names are given, orprint_command: bad connector ‘%d’printed.printed. An argument of ‘-n’ says to remove the export propertyprinted. If -x is given, COMMAND is run after all job specificationsprintf formats and prints ARGUMENTS under control of the FORMAT. FORMATprinting of error messages, even if the first character ofprints the timing summary in a slightly different format. This usesprocess IDs, and, if you have reached the limit on processes thatprocess group leader.processes.processing.progcomp_insert: %s: NULL COMPSPECre-executed after the substitution OLD=NEW is performed.read error: %d: %srealloc: called with unallocated block argumentrealloc: start and end chunk sizes differrealloc: underflow detected; mh_nbytes out of rangerecursion stack underflowredirection error: cannot duplicate fdredisplayed. If EOF is read, the command completes. Any otherregister_alloc: %p already in table as allocated? + register_alloc: alloc table is full with FIND_ALLOC? + register_free: %p already in table as free? + remembered. If the -p option is supplied, PATHNAME is used as theremoves the top directory from the stack, and cd's to the newrequesting resizerequired argument is not found, getopts places a ‘:’ into NAME andreset to their original values. If ARG is the null string eachrespectively. Without options, the status of all active jobs isrestrictedrestricts the output for each builtin command matching PATTERN toreturn ‘file’.returns “$line $subroutine $filenameâ€; this extra informationreused as input. The -r option removes a completion specification forrules above.run_pending_traps: bad value in trap_list[%d]: %prun_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myselfruns the last command beginning with ‘cc’ and typing ‘r’ re-executessave_bash_input: buffer already exists for new fd %dsay “command lsâ€. If the -p option is given, a default value is usedseen, getopts places the option character found into OPTARG. If asequences which are converted and copied to the standard output, andset of expanded words is printed on the standard error, eachset of flags may be found in $-. The remaining n ARGs are positionalsets OPTARG to the option character found. If getopts is not insettable options is displayed, with an indication of whether orshared object FILENAME. The -d option will delete a builtinshell builtin to be a function, but need the functionality of theshell level (%d) too high, resetting to 1shell option ‘cdable_vars’ is set, then try the word as a variableshell variable $name, initializing name if it does not exist, andshell. If the first argument is ‘-l’, then place a dash in theshift countsignal(s) SIGNAL_SPEC. If ARG is absent all specified signals aresignal. The ‘-f’ if specified says not to complain about thissigprocmask: %d: invalid operationsilent mode, and an invalid option is seen, getopts places ‘?’ intospecification; if a job spec is given, all processes in the job'sspecified, gives detailed help on all commands matching PATTERN,started by the shell, on systems that allow such control. If anstatus indicates whether each OPTNAME is set or unset. The -ostring, which means the most recent command beginning with thatstring.subsequently executed commands. If the -f option is given,supplied with a non-zero NCHARS argument, read returns after NCHARSsuppressed. If the -e option is given, interpretation of thesyntax errorsyntax error in conditional expressionsyntax error in conditional expression: unexpected token ‘%s’syntax error in expressionsyntax error near ‘%s’syntax error near unexpected token ‘%s’syntax error: ‘((%s))’syntax error: ‘;’ unexpectedsyntax error: arithmetic expression requiredsyntax error: operand expectedsyntax error: unexpected end of fileterminal to not be echoed.than ARG2.that ‘~/bin’ might be displayed as ‘/homes/bfox/bin’. The -v flagthat appear in ARGS have been replaced with the process ID of that job'sthat may be used as input. If MODE begins with a digit, it isthe -V or -v option is given, a string is printed describing COMMAND.the -p option is supplied, a list of builtins is printed. Thethe COMMANDS are executed.the NAMEs refer to functions. If no NAMEs are given, or if ‘-p’the ‘-v’, unset will only act on variables. Given the ‘-f’ flag,the argument to -u.the current directory, i.e. ‘.’. If DIR begins with a slash (/),the current soft limit, the current hard limit, and no limit, respectively.the directory containing DIR. Alternative directory names in CDPATHthe evaluation of EXPR. Expressions may be unary or binary. Unarythe history entry at offset OFFSET. The ‘-w’ option writes out thethe history list as a single entry. The -p option means to performthe index of the next argument to be processed into the shellthe last N lines. The ‘-c’ option causes the history list to bethe last command.the physical directory, without any symbolic links; the -L optionthe second word to the second NAME, and so on, with leftover words assignedthe shell is interactive, readline is used to obtain the line. If -n isthe shell.the shell. If a SIGNAL_SPEC is DEBUG, ARG is executed after everythe special LIMIT values ‘soft’, ‘hard’, and ‘unlimited’ stand forthe stack, making the new top of the stack the current workingthe value of the TIMEFORMAT variable as the output format.then CDPATH is not used. If the directory is not found, and thethen functions corresponding to the NAMEs are so marked. If nothen remove all alias definitions.then the shell exits, unless the shell option ‘execfail’ is set.this mode, no error messages are printed. If an invalid option isto append history lines from this session to the history file.to be followed.to be used from within a shell function generating possible completions.to sequential indices of ARRAY, starting at zero. If -e is supplied andto that found in ~/.inputrc, but must be passed as a single argument:to that word. If the line is empty, WORDS and the prompt areto the last NAME. Only the characters found in $IFS are recognized as wordto the normal information; the -p option lists process id's only.to use the ‘test’ found in $PATH instead of the shell builtintoo many argumentstop directory.trap_handler: bad signal %dtries to unset a variable, and if that fails, then tries to unset atrue unless a NAME is given for which no alias has been defined.turned on to be used in an expression.unexpected EOF while looking for ‘]]’unexpected EOF while looking for matching ‘%c’unexpected EOF while looking for matching ‘)’unexpected argument ‘%s’ to conditional binary operatorunexpected argument ‘%s’ to conditional unary operatorunexpected argument to conditional binary operatorunexpected argument to conditional unary operatorunexpected token %d in conditional commandunexpected token ‘%c’ in conditional commandunexpected token ‘%s’ in conditional commandunexpected token ‘%s’, conditional binary operator expectedunexpected token ‘%s’, expected ‘)’unknown command errorunset will only act on functions. With neither flag, unset firstunsets each OPTNAME. The -q flag suppresses output; the exituntil a break command is executed.until the first character of DELIM is read, rather than newline. If the -pused in a function, makes NAMEs local, as with the ‘local’ command.used.value read causes NAME to be set to null. The line read is savedvalue too great for basevariable OPTIND. OPTIND is initialized to 1 each time the shell orvariable. If the -r option is given, this signifies ‘raw’ input, andvariable. The -P option says to use the physical directory structureversion, type ‘enable -n test’. On systems supporting dynamicwait: pid %ld is not a child of this shellwait_for: No record of process %ldwait_for_job: job %d is stoppedwarning: -C option may not work as you expectwarning: -F option may not work as you expectwhich should be separated from it by white space.will display the attributes and values of each NAME.with “kill -signal $$â€.with a ‘*’ have been modified. Argument of N says to list onlywith each displayed history entry. No time stamps are printed otherwise.with the -E option.write error: %sxmalloc: %s:%d: cannot allocate %lu bytesxmalloc: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)xmalloc: cannot allocate %lu bytesxmalloc: cannot allocate %lu bytes (%lu bytes allocated)xrealloc: %s:%d: cannot allocate %lu bytesxrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)xrealloc: cannot allocate %lu bytesxrealloc: cannot reallocate %lu bytes (%lu bytes allocated)you can create, you don't have to start a process to kill another one.you to use a disk command which has the same name as a shellzeroth arg passed to FILE, as login does. If the ‘-c’ option \ No newline at end of file diff -aNrc2 bash-2.05b-patched/po/en@boldquot.header bash-3.0/po/en@boldquot.header *** bash-2.05b-patched/po/en@boldquot.header Wed Dec 31 19:00:00 1969 --- bash-3.0/po/en@boldquot.header Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,25 ---- + # All this catalog "translates" are quotation characters. + # The msgids must be ASCII and therefore cannot contain real quotation + # characters, only substitutes like grave accent (0x60), apostrophe (0x27) + # and double quote (0x22). These substitutes look strange; see + # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html + # + # This catalog translates grave accent (0x60) and apostrophe (0x27) to + # left single quotation mark (U+2018) and right single quotation mark (U+2019). + # It also translates pairs of apostrophe (0x27) to + # left single quotation mark (U+2018) and right single quotation mark (U+2019) + # and pairs of quotation mark (0x22) to + # left double quotation mark (U+201C) and right double quotation mark (U+201D). + # + # When output to an UTF-8 terminal, the quotation characters appear perfectly. + # When output to an ISO-8859-1 terminal, the single quotation marks are + # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to + # grave/acute accent (by libiconv), and the double quotation marks are + # transliterated to 0x22. + # When output to an ASCII terminal, the single quotation marks are + # transliterated to apostrophes, and the double quotation marks are + # transliterated to 0x22. + # + # This catalog furthermore displays the text between the quotation marks in + # bold face, assuming the VT100/XTerm escape sequences. + # diff -aNrc2 bash-2.05b-patched/po/en@boldquot.po bash-3.0/po/en@boldquot.po *** bash-2.05b-patched/po/en@boldquot.po Wed Dec 31 19:00:00 1969 --- bash-3.0/po/en@boldquot.po Tue Jun 29 10:47:39 2004 *************** *** 0 **** --- 1,4349 ---- + # English translations for GNU bash package. + # Copyright (C) 2004 Free Software Foundation, Inc. + # This file is distributed under the same license as the GNU bash package. + # Automatically generated, 2004. + # + # All this catalog "translates" are quotation characters. + # The msgids must be ASCII and therefore cannot contain real quotation + # characters, only substitutes like grave accent (0x60), apostrophe (0x27) + # and double quote (0x22). These substitutes look strange; see + # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html + # + # This catalog translates grave accent (0x60) and apostrophe (0x27) to + # left single quotation mark (U+2018) and right single quotation mark (U+2019). + # It also translates pairs of apostrophe (0x27) to + # left single quotation mark (U+2018) and right single quotation mark (U+2019) + # and pairs of quotation mark (0x22) to + # left double quotation mark (U+201C) and right double quotation mark (U+201D). + # + # When output to an UTF-8 terminal, the quotation characters appear perfectly. + # When output to an ISO-8859-1 terminal, the single quotation marks are + # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to + # grave/acute accent (by libiconv), and the double quotation marks are + # transliterated to 0x22. + # When output to an ASCII terminal, the single quotation marks are + # transliterated to apostrophes, and the double quotation marks are + # transliterated to 0x22. + # + # This catalog furthermore displays the text between the quotation marks in + # bold face, assuming the VT100/XTerm escape sequences. + # + #: builtins/caller.def:128 builtins/caller.def:132 builtins/pushd.def:655 + #: builtins/pushd.def:663 builtins/pushd.def:666 builtins/pushd.def:676 + #: builtins/pushd.def:680 builtins/pushd.def:684 builtins/pushd.def:687 + #: builtins/pushd.def:690 builtins/pushd.def:699 builtins/pushd.def:703 + #: builtins/pushd.def:707 builtins/pushd.def:710 builtins.c:321 builtins.c:325 + #: builtins.c:390 builtins.c:392 builtins.c:401 builtins.c:404 builtins.c:408 + #: builtins.c:445 builtins.c:487 builtins.c:491 builtins.c:498 builtins.c:509 + #: builtins.c:513 builtins.c:552 builtins.c:555 builtins.c:559 builtins.c:562 + #: builtins.c:630 builtins.c:637 builtins.c:692 builtins.c:713 builtins.c:718 + #: builtins.c:722 builtins.c:745 builtins.c:835 builtins.c:919 builtins.c:921 + #: builtins.c:943 builtins.c:946 builtins.c:948 builtins.c:950 builtins.c:952 + #: builtins.c:954 builtins.c:957 builtins.c:966 builtins.c:968 builtins.c:973 + #: builtins.c:976 builtins.c:1019 builtins.c:1024 builtins.c:1028 + #: builtins.c:1032 builtins.c:1034 builtins.c:1047 builtins.c:1062 + #: builtins.c:1226 builtins.c:1231 builtins.c:1305 builtins.c:1309 + #: builtins.c:1313 builtins.c:1316 builtins.c:1319 builtins.c:1331 + #: builtins.c:1335 builtins.c:1339 builtins.c:1342 builtins.c:1354 + #: builtins.c:1362 builtins.c:1365 + msgid "" + msgstr "" + "Project-Id-Version: GNU bash 3.0-rc1\n" + "POT-Creation-Date: 2003-12-22 15:34-0500\n" + "PO-Revision-Date: 2003-12-22 15:34-0500\n" + "Last-Translator: Automatically generated\n" + "Language-Team: none\n" + "MIME-Version: 1.0\n" + "Content-Type: text/plain; charset=UTF-8\n" + "Content-Transfer-Encoding: 8bit\n" + "Report-Msgid-Bugs-To: bug-bash@gnu.org\n" + "Plural-Forms: nplurals=2; plural=(n != 1);\n" + + #: arrayfunc.c:45 + msgid "bad array subscript" + msgstr "bad array subscript" + + #: arrayfunc.c:306 + #, c-format + msgid "%s: cannot assign to non-numeric index" + msgstr "%s: cannot assign to non-numeric index" + + #: bashhist.c:321 + #, c-format + msgid "%s: cannot create: %s" + msgstr "%s: cannot create: %s" + + #: bashline.c:2791 + msgid "bash_execute_unix_command: cannot find keymap for command" + msgstr "bash_execute_unix_command: cannot find keymap for command" + + #: bashline.c:2840 + #, c-format + msgid "%s: first non-whitespace character is not `\"'" + msgstr "%s: first non-whitespace character is not ‘\"’" + + #: bashline.c:2869 + #, c-format + msgid "no closing `%c' in %s" + msgstr "no closing ‘%c’ in %s" + + #: bashline.c:2903 + #, c-format + msgid "%s: missing colon separator" + msgstr "%s: missing colon separator" + + #: builtins/alias.def:123 + #, c-format + msgid "`%s': invalid alias name" + msgstr "‘%s’: invalid alias name" + + #: builtins/bind.def:194 + #, c-format + msgid "`%s': invalid keymap name" + msgstr "‘%s’: invalid keymap name" + + #: builtins/bind.def:233 + #, c-format + msgid "%s: cannot read: %s" + msgstr "%s: cannot read: %s" + + #: builtins/bind.def:248 + #, c-format + msgid "`%s': cannot unbind" + msgstr "‘%s’: cannot unbind" + + #: builtins/bind.def:283 + #, c-format + msgid "`%s': unknown function name" + msgstr "‘%s’: unknown function name" + + #: builtins/bind.def:291 + #, c-format + msgid "%s is not bound to any keys.\n" + msgstr "%s is not bound to any keys.\n" + + #: builtins/bind.def:295 + #, c-format + msgid "%s can be invoked via " + msgstr "%s can be invoked via " + + #: builtins/break.def:128 + msgid "only meaningful in a `for', `while', or `until' loop" + msgstr "only meaningful in a ‘for’, ‘while’, or ‘until’ loop" + + #: builtins/caller.def:127 builtins.c:320 + msgid "Returns the context of the current subroutine call." + msgstr "Returns the context of the current subroutine call." + + #: builtins/caller.def:129 builtins.c:322 + msgid "Without EXPR, returns returns \"$line $filename\". With EXPR," + msgstr "Without EXPR, returns returns “$line $filenameâ€. With EXPR," + + #: builtins/caller.def:130 builtins.c:323 + msgid "returns \"$line $subroutine $filename\"; this extra information" + msgstr "returns “$line $subroutine $filenameâ€; this extra information" + + #: builtins/caller.def:131 builtins.c:324 + msgid "can be used used to provide a stack trace." + msgstr "can be used used to provide a stack trace." + + #: builtins/caller.def:133 builtins.c:326 + msgid "The value of EXPR indicates how many call frames to go back before the" + msgstr "The value of EXPR indicates how many call frames to go back before the" + + #: builtins/caller.def:134 builtins.c:327 + msgid "current one; the top frame is frame 0." + msgstr "current one; the top frame is frame 0." + + #: builtins/cd.def:188 + msgid "HOME not set" + msgstr "HOME not set" + + #: builtins/cd.def:200 + msgid "OLDPWD not set" + msgstr "OLDPWD not set" + + #: builtins/cd.def:357 + #, c-format + msgid "write error: %s" + msgstr "write error: %s" + + #: builtins/common.c:133 test.c:921 + msgid "too many arguments" + msgstr "too many arguments" + + #: builtins/common.c:157 shell.c:465 shell.c:737 + #, c-format + msgid "%s: option requires an argument" + msgstr "%s: option requires an argument" + + #: builtins/common.c:164 + #, c-format + msgid "%s: numeric argument required" + msgstr "%s: numeric argument required" + + #: builtins/common.c:171 + #, c-format + msgid "%s: not found" + msgstr "%s: not found" + + #: builtins/common.c:180 shell.c:750 + #, c-format + msgid "%s: invalid option" + msgstr "%s: invalid option" + + #: builtins/common.c:187 + #, c-format + msgid "%s: invalid option name" + msgstr "%s: invalid option name" + + #: builtins/common.c:194 general.c:229 general.c:234 + #, c-format + msgid "`%s': not a valid identifier" + msgstr "‘%s’: not a valid identifier" + + #: builtins/common.c:201 + #, c-format + msgid "%s: invalid number" + msgstr "%s: invalid number" + + #: builtins/common.c:208 + #, c-format + msgid "%s: invalid signal specification" + msgstr "%s: invalid signal specification" + + #: builtins/common.c:215 + #, c-format + msgid "`%s': not a pid or valid job spec" + msgstr "‘%s’: not a pid or valid job spec" + + #: builtins/common.c:222 error.c:453 + #, c-format + msgid "%s: readonly variable" + msgstr "%s: readonly variable" + + #: builtins/common.c:230 + #, c-format + msgid "%s: %s out of range" + msgstr "%s: %s out of range" + + #: builtins/common.c:230 builtins/common.c:232 + msgid "argument" + msgstr "argument" + + #: builtins/common.c:232 + #, c-format + msgid "%s out of range" + msgstr "%s out of range" + + #: builtins/common.c:240 + #, c-format + msgid "%s: no such job" + msgstr "%s: no such job" + + #: builtins/common.c:248 + #, c-format + msgid "%s: no job control" + msgstr "%s: no job control" + + #: builtins/common.c:250 + msgid "no job control" + msgstr "no job control" + + #: builtins/common.c:260 + #, c-format + msgid "%s: restricted" + msgstr "%s: restricted" + + #: builtins/common.c:262 + msgid "restricted" + msgstr "restricted" + + #: builtins/common.c:270 + #, c-format + msgid "%s: not a shell builtin" + msgstr "%s: not a shell builtin" + + #: builtins/common.c:486 + #, c-format + msgid "%s: error retrieving current directory: %s: %s\n" + msgstr "%s: error retrieving current directory: %s: %s\n" + + #: builtins/common.c:553 builtins/common.c:555 + #, c-format + msgid "%s: ambiguous job spec" + msgstr "%s: ambiguous job spec" + + #: builtins/complete.def:251 + #, c-format + msgid "%s: invalid action name" + msgstr "%s: invalid action name" + + #: builtins/complete.def:381 builtins/complete.def:524 + #, c-format + msgid "%s: no completion specification" + msgstr "%s: no completion specification" + + #: builtins/complete.def:571 + msgid "warning: -F option may not work as you expect" + msgstr "warning: -F option may not work as you expect" + + #: builtins/complete.def:573 + msgid "warning: -C option may not work as you expect" + msgstr "warning: -C option may not work as you expect" + + #: builtins/declare.def:105 + msgid "can only be used in a function" + msgstr "can only be used in a function" + + #: builtins/declare.def:295 + msgid "cannot use `-f' to make functions" + msgstr "cannot use ‘-f’ to make functions" + + #: builtins/declare.def:307 execute_cmd.c:3949 + #, c-format + msgid "%s: readonly function" + msgstr "%s: readonly function" + + #: builtins/declare.def:389 + #, c-format + msgid "%s: cannot destroy array variables in this way" + msgstr "%s: cannot destroy array variables in this way" + + #: builtins/enable.def:128 builtins/enable.def:136 + msgid "dynamic loading not available" + msgstr "dynamic loading not available" + + #: builtins/enable.def:303 + #, c-format + msgid "cannot open shared object %s: %s" + msgstr "cannot open shared object %s: %s" + + #: builtins/enable.def:326 + #, c-format + msgid "cannot find %s in shared object %s: %s" + msgstr "cannot find %s in shared object %s: %s" + + #: builtins/enable.def:450 + #, c-format + msgid "%s: not dynamically loaded" + msgstr "%s: not dynamically loaded" + + #: builtins/enable.def:465 + #, c-format + msgid "%s: cannot delete: %s" + msgstr "%s: cannot delete: %s" + + #: builtins/evalfile.c:128 execute_cmd.c:3821 shell.c:1395 + #, c-format + msgid "%s: is a directory" + msgstr "%s: is a directory" + + #: builtins/evalfile.c:133 + #, c-format + msgid "%s: not a regular file" + msgstr "%s: not a regular file" + + #: builtins/evalfile.c:141 + #, c-format + msgid "%s: file is too large" + msgstr "%s: file is too large" + + #: builtins/exec.def:205 + #, c-format + msgid "%s: cannot execute: %s" + msgstr "%s: cannot execute: %s" + + #: builtins/exit.def:83 + msgid "not login shell: use `exit'" + msgstr "not login shell: use ‘exit’" + + #: builtins/exit.def:111 + msgid "There are stopped jobs.\n" + msgstr "There are stopped jobs.\n" + + #: builtins/fc.def:252 + msgid "no command found" + msgstr "no command found" + + #: builtins/fc.def:317 + msgid "history specification" + msgstr "history specification" + + #: builtins/fc.def:338 + #, c-format + msgid "%s: cannot open temp file: %s" + msgstr "%s: cannot open temp file: %s" + + #: builtins/fg_bg.def:133 + #, c-format + msgid "job %d started without job control" + msgstr "job %d started without job control" + + #: builtins/getopt.c:109 + #, c-format + msgid "%s: illegal option -- %c\n" + msgstr "%s: illegal option -- %c\n" + + #: builtins/getopt.c:110 + #, c-format + msgid "%s: option requires an argument -- %c\n" + msgstr "%s: option requires an argument -- %c\n" + + #: builtins/hash.def:83 + msgid "hashing disabled" + msgstr "hashing disabled" + + #: builtins/hash.def:128 + #, c-format + msgid "%s: hash table empty\n" + msgstr "%s: hash table empty\n" + + #: builtins/help.def:108 + msgid "Shell commands matching keywords `" + msgstr "Shell commands matching keywords `" + + #: builtins/help.def:110 + msgid "Shell commands matching keyword `" + msgstr "Shell commands matching keyword `" + + #: builtins/help.def:138 + #, c-format + msgid "" + "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." + msgstr "" + "no help topics match ‘%s’. Try ‘help help’ or ‘man -k %s’ " + "or ‘info %s’." + + #: builtins/help.def:164 + #, c-format + msgid "%s: cannot open: %s" + msgstr "%s: cannot open: %s" + + #: builtins/help.def:182 + msgid "" + "These shell commands are defined internally. Type `help' to see this list.\n" + "Type `help name' to find out more about the function `name'.\n" + "Use `info bash' to find out more about the shell in general.\n" + "Use `man -k' or `info' to find out more about commands not in this list.\n" + "\n" + "A star (*) next to a name means that the command is disabled.\n" + "\n" + msgstr "" + "These shell commands are defined internally. Type ‘help’ to see this " + "list.\n" + "Type ‘help name’ to find out more about the function ‘name’.\n" + "Use ‘info bash’ to find out more about the shell in general.\n" + "Use ‘man -k’ or ‘info’ to find out more about commands not in " + "this list.\n" + "\n" + "A star (*) next to a name means that the command is disabled.\n" + "\n" + + #: builtins/history.def:148 + msgid "cannot use more than one of -anrw" + msgstr "cannot use more than one of -anrw" + + #: builtins/history.def:180 + msgid "history position" + msgstr "history position" + + #: builtins/history.def:390 + #, c-format + msgid "%s: history expansion failed" + msgstr "%s: history expansion failed" + + #: builtins/jobs.def:99 + msgid "no other options allowed with `-x'" + msgstr "no other options allowed with ‘-x’" + + #: builtins/kill.def:187 + #, c-format + msgid "%s: arguments must be process or job IDs" + msgstr "%s: arguments must be process or job IDs" + + #: builtins/kill.def:248 + msgid "Unknown error" + msgstr "Unknown error" + + #: builtins/let.def:94 builtins/let.def:119 expr.c:496 expr.c:511 + msgid "expression expected" + msgstr "expression expected" + + #: builtins/printf.def:249 + #, c-format + msgid "`%s': missing format character" + msgstr "‘%s’: missing format character" + + #: builtins/printf.def:408 + #, c-format + msgid "`%c': invalid format character" + msgstr "‘%c’: invalid format character" + + #: builtins/printf.def:601 + msgid "missing hex digit for \\x" + msgstr "missing hex digit for \\x" + + #: builtins/pushd.def:168 + msgid "no other directory" + msgstr "no other directory" + + #: builtins/pushd.def:435 + msgid "" + msgstr "" + + #: builtins/pushd.def:652 builtins.c:1351 + msgid "Display the list of currently remembered directories. Directories" + msgstr "Display the list of currently remembered directories. Directories" + + #: builtins/pushd.def:653 builtins.c:1352 + msgid "find their way onto the list with the `pushd' command; you can get" + msgstr "" + "find their way onto the list with the ‘pushd’ command; you can get" + + #: builtins/pushd.def:654 builtins.c:1353 + msgid "back up through the list with the `popd' command." + msgstr "back up through the list with the ‘popd’ command." + + #: builtins/pushd.def:656 builtins.c:1355 + msgid "The -l flag specifies that `dirs' should not print shorthand versions" + msgstr "" + "The -l flag specifies that ‘dirs’ should not print shorthand versions" + + #: builtins/pushd.def:657 builtins.c:1356 + msgid "of directories which are relative to your home directory. This means" + msgstr "of directories which are relative to your home directory. This means" + + #: builtins/pushd.def:658 builtins.c:1357 + msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag" + msgstr "" + "that ‘~/bin’ might be displayed as ‘/homes/bfox/bin’. The -v " + "flag" + + #: builtins/pushd.def:659 builtins.c:1358 + msgid "causes `dirs' to print the directory stack with one entry per line," + msgstr "" + "causes ‘dirs’ to print the directory stack with one entry per line," + + #: builtins/pushd.def:660 builtins.c:1359 + msgid "prepending the directory name with its position in the stack. The -p" + msgstr "prepending the directory name with its position in the stack. The -p" + + #: builtins/pushd.def:661 builtins.c:1360 + msgid "flag does the same thing, but the stack position is not prepended." + msgstr "flag does the same thing, but the stack position is not prepended." + + #: builtins/pushd.def:662 builtins.c:1361 + msgid "The -c flag clears the directory stack by deleting all of the elements." + msgstr "" + "The -c flag clears the directory stack by deleting all of the elements." + + #: builtins/pushd.def:664 + msgid "+N displays the Nth entry counting from the left of the list shown by" + msgstr "" + "+N displays the Nth entry counting from the left of the list shown by" + + #: builtins/pushd.def:665 builtins/pushd.def:668 + msgid " dirs when invoked without options, starting with zero." + msgstr " dirs when invoked without options, starting with zero." + + #: builtins/pushd.def:667 + msgid "" + "-N displays the Nth entry counting from the right of the list shown by" + msgstr "" + "-N displays the Nth entry counting from the right of the list shown by" + + #: builtins/pushd.def:673 builtins.c:1302 + msgid "Adds a directory to the top of the directory stack, or rotates" + msgstr "Adds a directory to the top of the directory stack, or rotates" + + #: builtins/pushd.def:674 builtins.c:1303 + msgid "the stack, making the new top of the stack the current working" + msgstr "the stack, making the new top of the stack the current working" + + #: builtins/pushd.def:675 builtins.c:1304 + msgid "directory. With no arguments, exchanges the top two directories." + msgstr "directory. With no arguments, exchanges the top two directories." + + #: builtins/pushd.def:677 + msgid "+N Rotates the stack so that the Nth directory (counting" + msgstr "+N Rotates the stack so that the Nth directory (counting" + + #: builtins/pushd.def:678 + msgid " from the left of the list shown by `dirs', starting with" + msgstr " from the left of the list shown by ‘dirs’, starting with" + + #: builtins/pushd.def:679 builtins/pushd.def:683 + msgid " zero) is at the top." + msgstr " zero) is at the top." + + #: builtins/pushd.def:681 + msgid "-N Rotates the stack so that the Nth directory (counting" + msgstr "-N Rotates the stack so that the Nth directory (counting" + + #: builtins/pushd.def:682 + msgid " from the right of the list shown by `dirs', starting with" + msgstr " from the right of the list shown by ‘dirs’, starting with" + + #: builtins/pushd.def:685 + msgid "-n suppress the normal change of directory when adding directories" + msgstr "-n suppress the normal change of directory when adding directories" + + #: builtins/pushd.def:686 + msgid " to the stack, so only the stack is manipulated." + msgstr " to the stack, so only the stack is manipulated." + + #: builtins/pushd.def:688 + msgid "dir adds DIR to the directory stack at the top, making it the" + msgstr "dir adds DIR to the directory stack at the top, making it the" + + #: builtins/pushd.def:689 + msgid " new current working directory." + msgstr " new current working directory." + + #: builtins/pushd.def:691 builtins/pushd.def:711 builtins.c:1320 + #: builtins.c:1343 + msgid "You can see the directory stack with the `dirs' command." + msgstr "You can see the directory stack with the ‘dirs’ command." + + #: builtins/pushd.def:696 builtins.c:1328 + msgid "Removes entries from the directory stack. With no arguments," + msgstr "Removes entries from the directory stack. With no arguments," + + #: builtins/pushd.def:697 builtins.c:1329 + msgid "removes the top directory from the stack, and cd's to the new" + msgstr "removes the top directory from the stack, and cd's to the new" + + #: builtins/pushd.def:698 builtins.c:1330 + msgid "top directory." + msgstr "top directory." + + #: builtins/pushd.def:700 + msgid "+N removes the Nth entry counting from the left of the list" + msgstr "+N removes the Nth entry counting from the left of the list" + + #: builtins/pushd.def:701 + msgid " shown by `dirs', starting with zero. For example: `popd +0'" + msgstr "" + " shown by ‘dirs’, starting with zero. For example: ‘popd +0’" + + #: builtins/pushd.def:702 + msgid " removes the first directory, `popd +1' the second." + msgstr " removes the first directory, ‘popd +1’ the second." + + #: builtins/pushd.def:704 + msgid "-N removes the Nth entry counting from the right of the list" + msgstr "-N removes the Nth entry counting from the right of the list" + + #: builtins/pushd.def:705 + msgid " shown by `dirs', starting with zero. For example: `popd -0'" + msgstr "" + " shown by ‘dirs’, starting with zero. For example: ‘popd -0’" + + #: builtins/pushd.def:706 + msgid " removes the last directory, `popd -1' the next to last." + msgstr " removes the last directory, ‘popd -1’ the next to last." + + #: builtins/pushd.def:708 + msgid "-n suppress the normal change of directory when removing directories" + msgstr "-n suppress the normal change of directory when removing directories" + + #: builtins/pushd.def:709 + msgid " from the stack, so only the stack is manipulated." + msgstr " from the stack, so only the stack is manipulated." + + #: builtins/read.def:207 + #, c-format + msgid "%s: invalid timeout specification" + msgstr "%s: invalid timeout specification" + + #: builtins/read.def:230 + #, c-format + msgid "%s: invalid file descriptor specification" + msgstr "%s: invalid file descriptor specification" + + #: builtins/read.def:237 + #, c-format + msgid "%d: invalid file descriptor: %s" + msgstr "%d: invalid file descriptor: %s" + + #: builtins/read.def:463 + #, c-format + msgid "read error: %d: %s" + msgstr "read error: %d: %s" + + #: builtins/return.def:63 + msgid "can only `return' from a function or sourced script" + msgstr "can only ‘return’ from a function or sourced script" + + #: builtins/set.def:743 + msgid "cannot simultaneously unset a function and a variable" + msgstr "cannot simultaneously unset a function and a variable" + + #: builtins/set.def:780 + #, c-format + msgid "%s: cannot unset" + msgstr "%s: cannot unset" + + #: builtins/set.def:787 + #, c-format + msgid "%s: cannot unset: readonly %s" + msgstr "%s: cannot unset: readonly %s" + + #: builtins/set.def:798 + #, c-format + msgid "%s: not an array variable" + msgstr "%s: not an array variable" + + #: builtins/setattr.def:165 + #, c-format + msgid "%s: not a function" + msgstr "%s: not a function" + + #: builtins/shift.def:66 builtins/shift.def:72 + msgid "shift count" + msgstr "shift count" + + #: builtins/shopt.def:226 + msgid "cannot set and unset shell options simultaneously" + msgstr "cannot set and unset shell options simultaneously" + + #: builtins/shopt.def:291 + #, c-format + msgid "%s: invalid shell option name" + msgstr "%s: invalid shell option name" + + #: builtins/source.def:117 + msgid "filename argument required" + msgstr "filename argument required" + + #: builtins/source.def:137 + #, c-format + msgid "%s: file not found" + msgstr "%s: file not found" + + #: builtins/suspend.def:93 + msgid "cannot suspend" + msgstr "cannot suspend" + + #: builtins/suspend.def:103 + msgid "cannot suspend a login shell" + msgstr "cannot suspend a login shell" + + #: builtins/type.def:231 + #, c-format + msgid "%s is aliased to `%s'\n" + msgstr "%s is aliased to ‘%s’\n" + + #: builtins/type.def:252 + #, c-format + msgid "%s is a shell keyword\n" + msgstr "%s is a shell keyword\n" + + #: builtins/type.def:272 + #, c-format + msgid "%s is a function\n" + msgstr "%s is a function\n" + + #: builtins/type.def:297 + #, c-format + msgid "%s is a shell builtin\n" + msgstr "%s is a shell builtin\n" + + #: builtins/type.def:318 + #, c-format + msgid "%s is %s\n" + msgstr "%s is %s\n" + + #: builtins/type.def:338 + #, c-format + msgid "%s is hashed (%s)\n" + msgstr "%s is hashed (%s)\n" + + #: builtins/ulimit.def:332 + #, c-format + msgid "%s: invalid limit argument" + msgstr "%s: invalid limit argument" + + #: builtins/ulimit.def:358 + #, c-format + msgid "`%c': bad command" + msgstr "‘%c’: bad command" + + #: builtins/ulimit.def:387 + #, c-format + msgid "%s: cannot get limit: %s" + msgstr "%s: cannot get limit: %s" + + #: builtins/ulimit.def:425 + #, c-format + msgid "%s: cannot modify limit: %s" + msgstr "%s: cannot modify limit: %s" + + #: builtins/umask.def:112 + msgid "octal number" + msgstr "octal number" + + #: builtins/umask.def:226 + #, c-format + msgid "`%c': invalid symbolic mode operator" + msgstr "‘%c’: invalid symbolic mode operator" + + #: builtins/umask.def:279 + #, c-format + msgid "`%c': invalid symbolic mode character" + msgstr "‘%c’: invalid symbolic mode character" + + #: error.c:165 + #, c-format + msgid "last command: %s\n" + msgstr "last command: %s\n" + + #: error.c:173 + msgid "Aborting..." + msgstr "Aborting..." + + #: error.c:260 + #, c-format + msgid "%s: warning: " + msgstr "%s: warning: " + + #: error.c:405 + msgid "unknown command error" + msgstr "unknown command error" + + #: error.c:406 + msgid "bad command type" + msgstr "bad command type" + + #: error.c:407 + msgid "bad connector" + msgstr "bad connector" + + #: error.c:408 + msgid "bad jump" + msgstr "bad jump" + + #: error.c:446 + #, c-format + msgid "%s: unbound variable" + msgstr "%s: unbound variable" + + #: eval.c:175 + msgid "timed out waiting for input: auto-logout\n" + msgstr "timed out waiting for input: auto-logout\n" + + #: execute_cmd.c:466 + #, c-format + msgid "cannot redirect standard input from /dev/null: %s" + msgstr "cannot redirect standard input from /dev/null: %s" + + #: execute_cmd.c:1036 + #, c-format + msgid "TIMEFORMAT: `%c': invalid format character" + msgstr "TIMEFORMAT: ‘%c’: invalid format character" + + #: execute_cmd.c:3521 + #, c-format + msgid "%s: restricted: cannot specify `/' in command names" + msgstr "%s: restricted: cannot specify ‘/’ in command names" + + #: execute_cmd.c:3609 + #, c-format + msgid "%s: command not found" + msgstr "%s: command not found" + + #: execute_cmd.c:3839 + #, c-format + msgid "%s: %s: bad interpreter" + msgstr "%s: %s: bad interpreter" + + #: execute_cmd.c:3876 + #, c-format + msgid "%s: cannot execute binary file" + msgstr "%s: cannot execute binary file" + + #: execute_cmd.c:3988 + #, c-format + msgid "cannot duplicate fd %d to fd %d" + msgstr "cannot duplicate fd %d to fd %d" + + #: expr.c:239 + msgid "expression recursion level exceeded" + msgstr "expression recursion level exceeded" + + #: expr.c:263 + msgid "recursion stack underflow" + msgstr "recursion stack underflow" + + #: expr.c:374 + msgid "syntax error in expression" + msgstr "syntax error in expression" + + #: expr.c:414 + msgid "attempted assignment to non-variable" + msgstr "attempted assignment to non-variable" + + #: expr.c:435 expr.c:440 expr.c:750 + msgid "division by 0" + msgstr "division by 0" + + #: expr.c:466 + msgid "bug: bad expassign token" + msgstr "bug: bad expassign token" + + #: expr.c:508 + msgid "`:' expected for conditional expression" + msgstr "‘:’ expected for conditional expression" + + #: expr.c:775 + msgid "exponent less than 0" + msgstr "exponent less than 0" + + #: expr.c:819 + msgid "identifier expected after pre-increment or pre-decrement" + msgstr "identifier expected after pre-increment or pre-decrement" + + #: expr.c:847 + msgid "missing `)'" + msgstr "missing ‘)’" + + #: expr.c:871 + msgid "syntax error: operand expected" + msgstr "syntax error: operand expected" + + #: expr.c:1146 + msgid "invalid number" + msgstr "invalid number" + + #: expr.c:1150 + msgid "invalid arithmetic base" + msgstr "invalid arithmetic base" + + #: expr.c:1170 + msgid "value too great for base" + msgstr "value too great for base" + + #: general.c:60 + msgid "getcwd: cannot access parent directories" + msgstr "getcwd: cannot access parent directories" + + #: input.c:231 + #, c-format + msgid "cannot allocate new file descriptor for bash input from fd %d" + msgstr "cannot allocate new file descriptor for bash input from fd %d" + + #: input.c:239 + #, c-format + msgid "save_bash_input: buffer already exists for new fd %d" + msgstr "save_bash_input: buffer already exists for new fd %d" + + #: jobs.c:693 + #, c-format + msgid "deleting stopped job %d with process group %ld" + msgstr "deleting stopped job %d with process group %ld" + + #: jobs.c:1001 + #, c-format + msgid "describe_pid: %ld: no such pid" + msgstr "describe_pid: %ld: no such pid" + + #: jobs.c:1632 nojobs.c:648 + #, c-format + msgid "wait: pid %ld is not a child of this shell" + msgstr "wait: pid %ld is not a child of this shell" + + #: jobs.c:1815 + #, c-format + msgid "wait_for: No record of process %ld" + msgstr "wait_for: No record of process %ld" + + #: jobs.c:2062 + #, c-format + msgid "wait_for_job: job %d is stopped" + msgstr "wait_for_job: job %d is stopped" + + #: jobs.c:2284 + #, c-format + msgid "%s: job has terminated" + msgstr "%s: job has terminated" + + #: jobs.c:2293 + #, c-format + msgid "%s: job %d already in background" + msgstr "%s: job %d already in background" + + #: jobs.c:3037 + msgid "no job control in this shell" + msgstr "no job control in this shell" + + #: lib/malloc/malloc.c:298 + #, c-format + msgid "malloc: failed assertion: %s\n" + msgstr "malloc: failed assertion: %s\n" + + #: lib/malloc/malloc.c:314 + #, c-format + msgid "" + "\r\n" + "malloc: %s:%d: assertion botched\r\n" + msgstr "" + "\r\n" + "malloc: %s:%d: assertion botched\r\n" + + #: lib/malloc/malloc.c:740 + msgid "malloc: block on free list clobbered" + msgstr "malloc: block on free list clobbered" + + #: lib/malloc/malloc.c:817 + msgid "free: called with already freed block argument" + msgstr "free: called with already freed block argument" + + #: lib/malloc/malloc.c:820 + msgid "free: called with unallocated block argument" + msgstr "free: called with unallocated block argument" + + #: lib/malloc/malloc.c:839 + msgid "free: underflow detected; mh_nbytes out of range" + msgstr "free: underflow detected; mh_nbytes out of range" + + #: lib/malloc/malloc.c:845 + msgid "free: start and end chunk sizes differ" + msgstr "free: start and end chunk sizes differ" + + #: lib/malloc/malloc.c:942 + msgid "realloc: called with unallocated block argument" + msgstr "realloc: called with unallocated block argument" + + #: lib/malloc/malloc.c:957 + msgid "realloc: underflow detected; mh_nbytes out of range" + msgstr "realloc: underflow detected; mh_nbytes out of range" + + #: lib/malloc/malloc.c:963 + msgid "realloc: start and end chunk sizes differ" + msgstr "realloc: start and end chunk sizes differ" + + #: lib/malloc/table.c:175 + msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" + msgstr "register_alloc: alloc table is full with FIND_ALLOC?\n" + + #: lib/malloc/table.c:182 + #, c-format + msgid "register_alloc: %p already in table as allocated?\n" + msgstr "register_alloc: %p already in table as allocated?\n" + + #: lib/malloc/table.c:218 + #, c-format + msgid "register_free: %p already in table as free?\n" + msgstr "register_free: %p already in table as free?\n" + + #: lib/malloc/watch.c:46 + msgid "allocated" + msgstr "allocated" + + #: lib/malloc/watch.c:48 + msgid "freed" + msgstr "freed" + + #: lib/malloc/watch.c:50 + msgid "requesting resize" + msgstr "requesting resize" + + #: lib/malloc/watch.c:52 + msgid "just resized" + msgstr "just resized" + + #: lib/malloc/watch.c:54 + msgid "bug: unknown operation" + msgstr "bug: unknown operation" + + #: lib/malloc/watch.c:56 + #, c-format + msgid "malloc: watch alert: %p %s " + msgstr "malloc: watch alert: %p %s " + + #: lib/sh/fmtulong.c:101 + msgid "invalid base" + msgstr "invalid base" + + #: lib/sh/netopen.c:158 + #, c-format + msgid "%s: host unknown" + msgstr "%s: host unknown" + + #: lib/sh/netopen.c:165 + #, c-format + msgid "%s: invalid service" + msgstr "%s: invalid service" + + #: lib/sh/netopen.c:296 + #, c-format + msgid "%s: bad network path specification" + msgstr "%s: bad network path specification" + + #: lib/sh/netopen.c:336 + msgid "network operations not supported" + msgstr "network operations not supported" + + #: mailcheck.c:382 + msgid "You have mail in $_" + msgstr "You have mail in $_" + + #: mailcheck.c:407 + msgid "You have new mail in $_" + msgstr "You have new mail in $_" + + #: mailcheck.c:423 + #, c-format + msgid "The mail in %s has been read\n" + msgstr "The mail in %s has been read\n" + + #: make_cmd.c:318 + msgid "syntax error: arithmetic expression required" + msgstr "syntax error: arithmetic expression required" + + #: make_cmd.c:320 + msgid "syntax error: `;' unexpected" + msgstr "syntax error: ‘;’ unexpected" + + #: make_cmd.c:321 + #, c-format + msgid "syntax error: `((%s))'" + msgstr "syntax error: ‘((%s))’" + + #: make_cmd.c:560 + #, c-format + msgid "make_here_document: bad instruction type %d" + msgstr "make_here_document: bad instruction type %d" + + #: make_cmd.c:730 + #, c-format + msgid "make_redirection: redirection instruction `%d' out of range" + msgstr "make_redirection: redirection instruction ‘%d’ out of range" + + #: parse.y:2726 + #, c-format + msgid "unexpected EOF while looking for matching `%c'" + msgstr "unexpected EOF while looking for matching ‘%c’" + + #: parse.y:3011 + msgid "unexpected EOF while looking for `]]'" + msgstr "unexpected EOF while looking for ‘]]’" + + #: parse.y:3016 + #, c-format + msgid "syntax error in conditional expression: unexpected token `%s'" + msgstr "syntax error in conditional expression: unexpected token ‘%s’" + + #: parse.y:3020 + msgid "syntax error in conditional expression" + msgstr "syntax error in conditional expression" + + #: parse.y:3098 + #, c-format + msgid "unexpected token `%s', expected `)'" + msgstr "unexpected token ‘%s’, expected ‘)’" + + #: parse.y:3102 + msgid "expected `)'" + msgstr "expected ‘)’" + + #: parse.y:3130 + #, c-format + msgid "unexpected argument `%s' to conditional unary operator" + msgstr "unexpected argument ‘%s’ to conditional unary operator" + + #: parse.y:3134 + msgid "unexpected argument to conditional unary operator" + msgstr "unexpected argument to conditional unary operator" + + #: parse.y:3171 + #, c-format + msgid "unexpected token `%s', conditional binary operator expected" + msgstr "unexpected token ‘%s’, conditional binary operator expected" + + #: parse.y:3175 + msgid "conditional binary operator expected" + msgstr "conditional binary operator expected" + + #: parse.y:3191 + #, c-format + msgid "unexpected argument `%s' to conditional binary operator" + msgstr "unexpected argument ‘%s’ to conditional binary operator" + + #: parse.y:3195 + msgid "unexpected argument to conditional binary operator" + msgstr "unexpected argument to conditional binary operator" + + #: parse.y:3206 + #, c-format + msgid "unexpected token `%c' in conditional command" + msgstr "unexpected token ‘%c’ in conditional command" + + #: parse.y:3209 + #, c-format + msgid "unexpected token `%s' in conditional command" + msgstr "unexpected token ‘%s’ in conditional command" + + #: parse.y:3213 + #, c-format + msgid "unexpected token %d in conditional command" + msgstr "unexpected token %d in conditional command" + + #: parse.y:4400 + #, c-format + msgid "syntax error near unexpected token `%s'" + msgstr "syntax error near unexpected token ‘%s’" + + #: parse.y:4418 + #, c-format + msgid "syntax error near `%s'" + msgstr "syntax error near ‘%s’" + + #: parse.y:4428 + msgid "syntax error: unexpected end of file" + msgstr "syntax error: unexpected end of file" + + #: parse.y:4428 + msgid "syntax error" + msgstr "syntax error" + + #: parse.y:4490 + #, c-format + msgid "Use \"%s\" to leave the shell.\n" + msgstr "Use “%s†to leave the shell.\n" + + #: parse.y:4649 + msgid "unexpected EOF while looking for matching `)'" + msgstr "unexpected EOF while looking for matching ‘)’" + + #: pcomplete.c:988 + #, c-format + msgid "completion: function `%s' not found" + msgstr "completion: function ‘%s’ not found" + + #: pcomplib.c:179 + #, c-format + msgid "progcomp_insert: %s: NULL COMPSPEC" + msgstr "progcomp_insert: %s: NULL COMPSPEC" + + #: print_cmd.c:260 + #, c-format + msgid "print_command: bad connector `%d'" + msgstr "print_command: bad connector ‘%d’" + + #: print_cmd.c:1172 + #, c-format + msgid "cprintf: `%c': invalid format character" + msgstr "cprintf: ‘%c’: invalid format character" + + #: redir.c:99 + msgid "file descriptor out of range" + msgstr "file descriptor out of range" + + #: redir.c:141 + #, c-format + msgid "%s: ambiguous redirect" + msgstr "%s: ambiguous redirect" + + #: redir.c:145 + #, c-format + msgid "%s: cannot overwrite existing file" + msgstr "%s: cannot overwrite existing file" + + #: redir.c:150 + #, c-format + msgid "%s: restricted: cannot redirect output" + msgstr "%s: restricted: cannot redirect output" + + #: redir.c:155 + #, c-format + msgid "cannot create temp file for here document: %s" + msgstr "cannot create temp file for here document: %s" + + #: redir.c:509 + msgid "/dev/(tcp|udp)/host/port not supported without networking" + msgstr "/dev/(tcp|udp)/host/port not supported without networking" + + #: redir.c:949 + msgid "redirection error: cannot duplicate fd" + msgstr "redirection error: cannot duplicate fd" + + #: shell.c:302 + msgid "could not find /tmp, please create!" + msgstr "could not find /tmp, please create!" + + #: shell.c:306 + msgid "/tmp must be a valid directory name" + msgstr "/tmp must be a valid directory name" + + #: shell.c:839 + #, c-format + msgid "%c%c: invalid option" + msgstr "%c%c: invalid option" + + #: shell.c:1590 + msgid "I have no name!" + msgstr "I have no name!" + + #: shell.c:1725 + #, c-format + msgid "" + "Usage:\t%s [GNU long option] [option] ...\n" + "\t%s [GNU long option] [option] script-file ...\n" + msgstr "" + "Usage:\t%s [GNU long option] [option] ...\n" + "\t%s [GNU long option] [option] script-file ...\n" + + #: shell.c:1727 + msgid "GNU long options:\n" + msgstr "GNU long options:\n" + + #: shell.c:1731 + msgid "Shell options:\n" + msgstr "Shell options:\n" + + #: shell.c:1732 + msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n" + msgstr "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n" + + #: shell.c:1747 + #, c-format + msgid "\t-%s or -o option\n" + msgstr "\t-%s or -o option\n" + + #: shell.c:1753 + #, c-format + msgid "Type `%s -c \"help set\"' for more information about shell options.\n" + msgstr "" + "Type ‘%s -c “help set‒ for more information about shell " + "options.\n" + + #: shell.c:1754 + #, c-format + msgid "Type `%s -c help' for more information about shell builtin commands.\n" + msgstr "" + "Type ‘%s -c help’ for more information about shell builtin commands.\n" + + #: shell.c:1755 + msgid "Use the `bashbug' command to report bugs.\n" + msgstr "Use the ‘bashbug’ command to report bugs.\n" + + #: sig.c:485 + #, c-format + msgid "sigprocmask: %d: invalid operation" + msgstr "sigprocmask: %d: invalid operation" + + #: subst.c:1011 + #, c-format + msgid "bad substitution: no closing `%s' in %s" + msgstr "bad substitution: no closing ‘%s’ in %s" + + #: subst.c:2020 + #, c-format + msgid "%s: cannot assign list to array member" + msgstr "%s: cannot assign list to array member" + + #: subst.c:3516 subst.c:3532 + msgid "cannot make pipe for process substitution" + msgstr "cannot make pipe for process substitution" + + #: subst.c:3563 + msgid "cannot make child for process substitution" + msgstr "cannot make child for process substitution" + + #: subst.c:3608 + #, c-format + msgid "cannot open named pipe %s for reading" + msgstr "cannot open named pipe %s for reading" + + #: subst.c:3610 + #, c-format + msgid "cannot open named pipe %s for writing" + msgstr "cannot open named pipe %s for writing" + + #: subst.c:3618 + #, c-format + msgid "cannout reset nodelay mode for fd %d" + msgstr "cannout reset nodelay mode for fd %d" + + #: subst.c:3628 + #, c-format + msgid "cannot duplicate named pipe %s as fd %d" + msgstr "cannot duplicate named pipe %s as fd %d" + + #: subst.c:3803 + msgid "cannot make pipe for command substitution" + msgstr "cannot make pipe for command substitution" + + #: subst.c:3832 + msgid "cannot make child for command substitution" + msgstr "cannot make child for command substitution" + + #: subst.c:3849 + msgid "command_substitute: cannot duplicate pipe as fd 1" + msgstr "command_substitute: cannot duplicate pipe as fd 1" + + #: subst.c:4284 + #, c-format + msgid "%s: parameter null or not set" + msgstr "%s: parameter null or not set" + + #: subst.c:4529 + #, c-format + msgid "%s: substring expression < 0" + msgstr "%s: substring expression < 0" + + #: subst.c:5209 + #, c-format + msgid "%s: bad substitution" + msgstr "%s: bad substitution" + + #: subst.c:5283 + #, c-format + msgid "$%s: cannot assign in this way" + msgstr "$%s: cannot assign in this way" + + #: subst.c:6652 + #, c-format + msgid "no match: %s" + msgstr "no match: %s" + + #: test.c:154 + msgid "argument expected" + msgstr "argument expected" + + #: test.c:163 + #, c-format + msgid "%s: integer expression expected" + msgstr "%s: integer expression expected" + + #: test.c:361 + msgid "`)' expected" + msgstr "‘)’ expected" + + #: test.c:363 + #, c-format + msgid "`)' expected, found %s" + msgstr "‘)’ expected, found %s" + + #: test.c:378 test.c:787 test.c:790 + #, c-format + msgid "%s: unary operator expected" + msgstr "%s: unary operator expected" + + #: test.c:543 test.c:830 + #, c-format + msgid "%s: binary operator expected" + msgstr "%s: binary operator expected" + + #: test.c:905 + msgid "missing `]'" + msgstr "missing ‘]’" + + #: trap.c:194 + msgid "invalid signal number" + msgstr "invalid signal number" + + #: trap.c:309 + #, c-format + msgid "run_pending_traps: bad value in trap_list[%d]: %p" + msgstr "run_pending_traps: bad value in trap_list[%d]: %p" + + #: trap.c:313 + #, c-format + msgid "" + "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" + msgstr "" + "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" + + #: trap.c:349 + #, c-format + msgid "trap_handler: bad signal %d" + msgstr "trap_handler: bad signal %d" + + #: variables.c:310 + #, c-format + msgid "error importing function definition for `%s'" + msgstr "error importing function definition for ‘%s’" + + #: variables.c:670 + #, c-format + msgid "shell level (%d) too high, resetting to 1" + msgstr "shell level (%d) too high, resetting to 1" + + #: variables.c:1610 + msgid "make_local_variable: no function context at current scope" + msgstr "make_local_variable: no function context at current scope" + + #: variables.c:2709 + msgid "all_local_variables: no function context at current scope" + msgstr "all_local_variables: no function context at current scope" + + #: variables.c:2923 variables.c:2932 + #, c-format + msgid "invalid character %d in exportstr for %s" + msgstr "invalid character %d in exportstr for %s" + + #: variables.c:2938 + #, c-format + msgid "no `=' in exportstr for %s" + msgstr "no ‘=’ in exportstr for %s" + + #: variables.c:3363 + msgid "pop_var_context: head of shell_variables not a function context" + msgstr "pop_var_context: head of shell_variables not a function context" + + #: variables.c:3376 + msgid "pop_var_context: no global_variables context" + msgstr "pop_var_context: no global_variables context" + + #: variables.c:3442 + msgid "pop_scope: head of shell_variables not a temporary environment scope" + msgstr "pop_scope: head of shell_variables not a temporary environment scope" + + #: version.c:82 + msgid "Copyright (C) 2004 Free Software Foundation, Inc.\n" + msgstr "Copyright (C) 2004 Free Software Foundation, Inc.\n" + + #: xmalloc.c:93 + #, c-format + msgid "xmalloc: cannot allocate %lu bytes (%lu bytes allocated)" + msgstr "xmalloc: cannot allocate %lu bytes (%lu bytes allocated)" + + #: xmalloc.c:95 + #, c-format + msgid "xmalloc: cannot allocate %lu bytes" + msgstr "xmalloc: cannot allocate %lu bytes" + + #: xmalloc.c:115 + #, c-format + msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" + msgstr "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" + + #: xmalloc.c:117 + #, c-format + msgid "xrealloc: cannot allocate %lu bytes" + msgstr "xrealloc: cannot allocate %lu bytes" + + #: xmalloc.c:151 + #, c-format + msgid "xmalloc: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" + msgstr "xmalloc: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" + + #: xmalloc.c:153 + #, c-format + msgid "xmalloc: %s:%d: cannot allocate %lu bytes" + msgstr "xmalloc: %s:%d: cannot allocate %lu bytes" + + #: xmalloc.c:175 + #, c-format + msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)" + msgstr "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)" + + #: xmalloc.c:177 + #, c-format + msgid "xrealloc: %s:%d: cannot allocate %lu bytes" + msgstr "xrealloc: %s:%d: cannot allocate %lu bytes" + + #: builtins.c:244 + msgid "`alias' with no arguments or with the -p option prints the list" + msgstr "‘alias’ with no arguments or with the -p option prints the list" + + #: builtins.c:245 + msgid "of aliases in the form alias NAME=VALUE on standard output." + msgstr "of aliases in the form alias NAME=VALUE on standard output." + + #: builtins.c:246 + msgid "Otherwise, an alias is defined for each NAME whose VALUE is given." + msgstr "Otherwise, an alias is defined for each NAME whose VALUE is given." + + #: builtins.c:247 + msgid "A trailing space in VALUE causes the next word to be checked for" + msgstr "A trailing space in VALUE causes the next word to be checked for" + + #: builtins.c:248 + msgid "alias substitution when the alias is expanded. Alias returns" + msgstr "alias substitution when the alias is expanded. Alias returns" + + #: builtins.c:249 + msgid "true unless a NAME is given for which no alias has been defined." + msgstr "true unless a NAME is given for which no alias has been defined." + + #: builtins.c:257 + msgid "" + "Remove NAMEs from the list of defined aliases. If the -a option is given," + msgstr "" + "Remove NAMEs from the list of defined aliases. If the -a option is given," + + #: builtins.c:258 + msgid "then remove all alias definitions." + msgstr "then remove all alias definitions." + + #: builtins.c:266 + msgid "Bind a key sequence to a Readline function or a macro, or set" + msgstr "Bind a key sequence to a Readline function or a macro, or set" + + #: builtins.c:267 + msgid "a Readline variable. The non-option argument syntax is equivalent" + msgstr "a Readline variable. The non-option argument syntax is equivalent" + + #: builtins.c:268 + msgid "to that found in ~/.inputrc, but must be passed as a single argument:" + msgstr "to that found in ~/.inputrc, but must be passed as a single argument:" + + #: builtins.c:269 + msgid "bind '\"\\C-x\\C-r\": re-read-init-file'." + msgstr "bind '“\\C-x\\C-râ€: re-read-init-file'." + + #: builtins.c:270 + msgid "bind accepts the following options:" + msgstr "bind accepts the following options:" + + #: builtins.c:271 + msgid "" + " -m keymap Use `keymap' as the keymap for the duration of this" + msgstr "" + " -m keymap Use ‘keymap’ as the keymap for the duration of " + "this" + + #: builtins.c:272 + msgid " command. Acceptable keymap names are emacs," + msgstr " command. Acceptable keymap names are emacs," + + #: builtins.c:273 + msgid "" + " emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move," + msgstr "" + " emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move," + + #: builtins.c:274 + msgid " vi-command, and vi-insert." + msgstr " vi-command, and vi-insert." + + #: builtins.c:275 + msgid " -l List names of functions." + msgstr " -l List names of functions." + + #: builtins.c:276 + msgid " -P List function names and bindings." + msgstr " -P List function names and bindings." + + #: builtins.c:277 + msgid " -p List functions and bindings in a form that can be" + msgstr " -p List functions and bindings in a form that can be" + + #: builtins.c:278 + msgid " reused as input." + msgstr " reused as input." + + #: builtins.c:279 + msgid " -r keyseq Remove the binding for KEYSEQ." + msgstr " -r keyseq Remove the binding for KEYSEQ." + + #: builtins.c:280 + msgid " -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when" + msgstr " -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when" + + #: builtins.c:281 + msgid "\t\t\t\tKEYSEQ is entered." + msgstr "\t\t\t\tKEYSEQ is entered." + + #: builtins.c:282 + msgid " -f filename Read key bindings from FILENAME." + msgstr " -f filename Read key bindings from FILENAME." + + #: builtins.c:283 + msgid " -q function-name Query about which keys invoke the named function." + msgstr " -q function-name Query about which keys invoke the named function." + + #: builtins.c:284 + msgid "" + " -u function-name Unbind all keys which are bound to the named function." + msgstr "" + " -u function-name Unbind all keys which are bound to the named function." + + #: builtins.c:285 + msgid " -V List variable names and values" + msgstr " -V List variable names and values" + + #: builtins.c:286 + msgid " -v List variable names and values in a form that can" + msgstr " -v List variable names and values in a form that can" + + #: builtins.c:287 + msgid " be reused as input." + msgstr " be reused as input." + + #: builtins.c:288 + msgid "" + " -S List key sequences that invoke macros and their values" + msgstr "" + " -S List key sequences that invoke macros and their values" + + #: builtins.c:289 + msgid "" + " -s List key sequences that invoke macros and their values" + msgstr "" + " -s List key sequences that invoke macros and their values" + + #: builtins.c:290 + msgid " in a form that can be reused as input." + msgstr " in a form that can be reused as input." + + #: builtins.c:297 + msgid "Exit from within a FOR, WHILE or UNTIL loop. If N is specified," + msgstr "Exit from within a FOR, WHILE or UNTIL loop. If N is specified," + + #: builtins.c:298 + msgid "break N levels." + msgstr "break N levels." + + #: builtins.c:304 + msgid "Resume the next iteration of the enclosing FOR, WHILE or UNTIL loop." + msgstr "Resume the next iteration of the enclosing FOR, WHILE or UNTIL loop." + + #: builtins.c:305 + msgid "If N is specified, resume at the N-th enclosing loop." + msgstr "If N is specified, resume at the N-th enclosing loop." + + #: builtins.c:311 + msgid "Run a shell builtin. This is useful when you wish to rename a" + msgstr "Run a shell builtin. This is useful when you wish to rename a" + + #: builtins.c:312 + msgid "shell builtin to be a function, but need the functionality of the" + msgstr "shell builtin to be a function, but need the functionality of the" + + #: builtins.c:313 + msgid "builtin within the function itself." + msgstr "builtin within the function itself." + + #: builtins.c:334 + msgid "Change the current directory to DIR. The variable $HOME is the" + msgstr "Change the current directory to DIR. The variable $HOME is the" + + #: builtins.c:335 + msgid "default DIR. The variable CDPATH defines the search path for" + msgstr "default DIR. The variable CDPATH defines the search path for" + + #: builtins.c:336 + msgid "the directory containing DIR. Alternative directory names in CDPATH" + msgstr "the directory containing DIR. Alternative directory names in CDPATH" + + #: builtins.c:337 + msgid "are separated by a colon (:). A null directory name is the same as" + msgstr "are separated by a colon (:). A null directory name is the same as" + + #: builtins.c:338 + msgid "the current directory, i.e. `.'. If DIR begins with a slash (/)," + msgstr "" + "the current directory, i.e. ‘.’. If DIR begins with a slash (/)," + + #: builtins.c:339 + msgid "then CDPATH is not used. If the directory is not found, and the" + msgstr "then CDPATH is not used. If the directory is not found, and the" + + #: builtins.c:340 + msgid "shell option `cdable_vars' is set, then try the word as a variable" + msgstr "" + "shell option ‘cdable_vars’ is set, then try the word as a variable" + + #: builtins.c:341 + msgid "name. If that variable has a value, then cd to the value of that" + msgstr "name. If that variable has a value, then cd to the value of that" + + #: builtins.c:342 + msgid "variable. The -P option says to use the physical directory structure" + msgstr "variable. The -P option says to use the physical directory structure" + + #: builtins.c:343 + msgid "" + "instead of following symbolic links; the -L option forces symbolic links" + msgstr "" + "instead of following symbolic links; the -L option forces symbolic links" + + #: builtins.c:344 + msgid "to be followed." + msgstr "to be followed." + + #: builtins.c:350 + msgid "Print the current working directory. With the -P option, pwd prints" + msgstr "Print the current working directory. With the -P option, pwd prints" + + #: builtins.c:351 + msgid "the physical directory, without any symbolic links; the -L option" + msgstr "the physical directory, without any symbolic links; the -L option" + + #: builtins.c:352 + msgid "makes pwd follow symbolic links." + msgstr "makes pwd follow symbolic links." + + #: builtins.c:358 + msgid "No effect; the command does nothing. A zero exit code is returned." + msgstr "No effect; the command does nothing. A zero exit code is returned." + + #: builtins.c:364 + msgid "Return a successful result." + msgstr "Return a successful result." + + #: builtins.c:370 + msgid "Return an unsuccessful result." + msgstr "Return an unsuccessful result." + + #: builtins.c:376 + msgid "Runs COMMAND with ARGS ignoring shell functions. If you have a shell" + msgstr "Runs COMMAND with ARGS ignoring shell functions. If you have a shell" + + #: builtins.c:377 + msgid "function called `ls', and you wish to call the command `ls', you can" + msgstr "" + "function called ‘ls’, and you wish to call the command ‘ls’, you " + "can" + + #: builtins.c:378 + msgid "say \"command ls\". If the -p option is given, a default value is used" + msgstr "" + "say “command lsâ€. If the -p option is given, a default value is used" + + #: builtins.c:379 + msgid "for PATH that is guaranteed to find all of the standard utilities. If" + msgstr "for PATH that is guaranteed to find all of the standard utilities. If" + + #: builtins.c:380 + msgid "the -V or -v option is given, a string is printed describing COMMAND." + msgstr "the -V or -v option is given, a string is printed describing COMMAND." + + #: builtins.c:381 + msgid "The -V option produces a more verbose description." + msgstr "The -V option produces a more verbose description." + + #: builtins.c:387 + msgid "Declare variables and/or give them attributes. If no NAMEs are" + msgstr "Declare variables and/or give them attributes. If no NAMEs are" + + #: builtins.c:388 + msgid "given, then display the values of variables instead. The -p option" + msgstr "given, then display the values of variables instead. The -p option" + + #: builtins.c:389 + msgid "will display the attributes and values of each NAME." + msgstr "will display the attributes and values of each NAME." + + #: builtins.c:391 + msgid "The flags are:" + msgstr "The flags are:" + + #: builtins.c:393 + msgid " -a\tto make NAMEs arrays (if supported)" + msgstr " -a\tto make NAMEs arrays (if supported)" + + #: builtins.c:394 + msgid " -f\tto select from among function names only" + msgstr " -f\tto select from among function names only" + + #: builtins.c:395 + msgid "" + " -F\tto display function names (and line number and source file name if" + msgstr "" + " -F\tto display function names (and line number and source file name if" + + #: builtins.c:396 + msgid "\tdebugging) without definitions" + msgstr "\tdebugging) without definitions" + + #: builtins.c:397 + msgid " -i\tto make NAMEs have the `integer' attribute" + msgstr " -i\tto make NAMEs have the ‘integer’ attribute" + + #: builtins.c:398 + msgid " -r\tto make NAMEs readonly" + msgstr " -r\tto make NAMEs readonly" + + #: builtins.c:399 + msgid " -t\tto make NAMEs have the `trace' attribute" + msgstr " -t\tto make NAMEs have the ‘trace’ attribute" + + #: builtins.c:400 + msgid " -x\tto make NAMEs export" + msgstr " -x\tto make NAMEs export" + + #: builtins.c:402 + msgid "Variables with the integer attribute have arithmetic evaluation (see" + msgstr "Variables with the integer attribute have arithmetic evaluation (see" + + #: builtins.c:403 + msgid "`let') done when the variable is assigned to." + msgstr "‘let’) done when the variable is assigned to." + + #: builtins.c:405 + msgid "When displaying values of variables, -f displays a function's name" + msgstr "When displaying values of variables, -f displays a function's name" + + #: builtins.c:406 + msgid "and definition. The -F option restricts the display to function" + msgstr "and definition. The -F option restricts the display to function" + + #: builtins.c:407 + msgid "name only." + msgstr "name only." + + #: builtins.c:409 + msgid "Using `+' instead of `-' turns off the given attribute instead. When" + msgstr "" + "Using ‘+’ instead of ‘-’ turns off the given attribute instead. " + "When" + + #: builtins.c:410 + msgid "used in a function, makes NAMEs local, as with the `local' command." + msgstr "" + "used in a function, makes NAMEs local, as with the ‘local’ command." + + #: builtins.c:416 + msgid "Obsolete. See `declare'." + msgstr "Obsolete. See ‘declare’." + + #: builtins.c:422 + msgid "Create a local variable called NAME, and give it VALUE. LOCAL" + msgstr "Create a local variable called NAME, and give it VALUE. LOCAL" + + #: builtins.c:423 + msgid "can only be used within a function; it makes the variable NAME" + msgstr "can only be used within a function; it makes the variable NAME" + + #: builtins.c:424 + msgid "have a visible scope restricted to that function and its children." + msgstr "have a visible scope restricted to that function and its children." + + #: builtins.c:431 + msgid "Output the ARGs. If -n is specified, the trailing newline is" + msgstr "Output the ARGs. If -n is specified, the trailing newline is" + + #: builtins.c:432 + msgid "suppressed. If the -e option is given, interpretation of the" + msgstr "suppressed. If the -e option is given, interpretation of the" + + #: builtins.c:433 + msgid "following backslash-escaped characters is turned on:" + msgstr "following backslash-escaped characters is turned on:" + + #: builtins.c:434 + msgid "\t\\a\talert (bell)" + msgstr "\t\\a\talert (bell)" + + #: builtins.c:435 + msgid "\t\\b\tbackspace" + msgstr "\t\\b\tbackspace" + + #: builtins.c:436 + msgid "\t\\c\tsuppress trailing newline" + msgstr "\t\\c\tsuppress trailing newline" + + #: builtins.c:437 + msgid "\t\\E\tescape character" + msgstr "\t\\E\tescape character" + + #: builtins.c:438 + msgid "\t\\f\tform feed" + msgstr "\t\\f\tform feed" + + #: builtins.c:439 + msgid "\t\\n\tnew line" + msgstr "\t\\n\tnew line" + + #: builtins.c:440 + msgid "\t\\r\tcarriage return" + msgstr "\t\\r\tcarriage return" + + #: builtins.c:441 + msgid "\t\\t\thorizontal tab" + msgstr "\t\\t\thorizontal tab" + + #: builtins.c:442 + msgid "\t\\v\tvertical tab" + msgstr "\t\\v\tvertical tab" + + #: builtins.c:443 + msgid "\t\\\\\tbackslash" + msgstr "\t\\\\\tbackslash" + + #: builtins.c:444 + msgid "\t\\num\tthe character whose ASCII code is NUM (octal)." + msgstr "\t\\num\tthe character whose ASCII code is NUM (octal)." + + #: builtins.c:446 + msgid "You can explicitly turn off the interpretation of the above characters" + msgstr "You can explicitly turn off the interpretation of the above characters" + + #: builtins.c:447 + msgid "with the -E option." + msgstr "with the -E option." + + #: builtins.c:455 + msgid "" + "Output the ARGs. If -n is specified, the trailing newline is suppressed." + msgstr "" + "Output the ARGs. If -n is specified, the trailing newline is suppressed." + + #: builtins.c:462 + msgid "Enable and disable builtin shell commands. This allows" + msgstr "Enable and disable builtin shell commands. This allows" + + #: builtins.c:463 + msgid "you to use a disk command which has the same name as a shell" + msgstr "you to use a disk command which has the same name as a shell" + + #: builtins.c:464 + msgid "builtin without specifying a full pathname. If -n is used, the" + msgstr "builtin without specifying a full pathname. If -n is used, the" + + #: builtins.c:465 + msgid "NAMEs become disabled; otherwise NAMEs are enabled. For example," + msgstr "NAMEs become disabled; otherwise NAMEs are enabled. For example," + + #: builtins.c:466 + msgid "to use the `test' found in $PATH instead of the shell builtin" + msgstr "to use the ‘test’ found in $PATH instead of the shell builtin" + + #: builtins.c:467 + msgid "version, type `enable -n test'. On systems supporting dynamic" + msgstr "version, type ‘enable -n test’. On systems supporting dynamic" + + #: builtins.c:468 + msgid "loading, the -f option may be used to load new builtins from the" + msgstr "loading, the -f option may be used to load new builtins from the" + + #: builtins.c:469 + msgid "shared object FILENAME. The -d option will delete a builtin" + msgstr "shared object FILENAME. The -d option will delete a builtin" + + #: builtins.c:470 + msgid "previously loaded with -f. If no non-option names are given, or" + msgstr "previously loaded with -f. If no non-option names are given, or" + + #: builtins.c:471 + msgid "the -p option is supplied, a list of builtins is printed. The" + msgstr "the -p option is supplied, a list of builtins is printed. The" + + #: builtins.c:472 + msgid "-a option means to print every builtin with an indication of whether" + msgstr "-a option means to print every builtin with an indication of whether" + + #: builtins.c:473 + msgid "" + "or not it is enabled. The -s option restricts the output to the POSIX.2" + msgstr "" + "or not it is enabled. The -s option restricts the output to the POSIX.2" + + #: builtins.c:474 + msgid "" + "`special' builtins. The -n option displays a list of all disabled builtins." + msgstr "" + "‘special’ builtins. The -n option displays a list of all disabled " + "builtins." + + #: builtins.c:480 + msgid "Read ARGs as input to the shell and execute the resulting command(s)." + msgstr "Read ARGs as input to the shell and execute the resulting command(s)." + + #: builtins.c:486 + msgid "Getopts is used by shell procedures to parse positional parameters." + msgstr "Getopts is used by shell procedures to parse positional parameters." + + #: builtins.c:488 + msgid "OPTSTRING contains the option letters to be recognized; if a letter" + msgstr "OPTSTRING contains the option letters to be recognized; if a letter" + + #: builtins.c:489 + msgid "is followed by a colon, the option is expected to have an argument," + msgstr "is followed by a colon, the option is expected to have an argument," + + #: builtins.c:490 + msgid "which should be separated from it by white space." + msgstr "which should be separated from it by white space." + + #: builtins.c:492 + msgid "Each time it is invoked, getopts will place the next option in the" + msgstr "Each time it is invoked, getopts will place the next option in the" + + #: builtins.c:493 + msgid "shell variable $name, initializing name if it does not exist, and" + msgstr "shell variable $name, initializing name if it does not exist, and" + + #: builtins.c:494 + msgid "the index of the next argument to be processed into the shell" + msgstr "the index of the next argument to be processed into the shell" + + #: builtins.c:495 + msgid "variable OPTIND. OPTIND is initialized to 1 each time the shell or" + msgstr "variable OPTIND. OPTIND is initialized to 1 each time the shell or" + + #: builtins.c:496 + msgid "a shell script is invoked. When an option requires an argument," + msgstr "a shell script is invoked. When an option requires an argument," + + #: builtins.c:497 + msgid "getopts places that argument into the shell variable OPTARG." + msgstr "getopts places that argument into the shell variable OPTARG." + + #: builtins.c:499 + msgid "getopts reports errors in one of two ways. If the first character" + msgstr "getopts reports errors in one of two ways. If the first character" + + #: builtins.c:500 + msgid "of OPTSTRING is a colon, getopts uses silent error reporting. In" + msgstr "of OPTSTRING is a colon, getopts uses silent error reporting. In" + + #: builtins.c:501 + msgid "this mode, no error messages are printed. If an invalid option is" + msgstr "this mode, no error messages are printed. If an invalid option is" + + #: builtins.c:502 + msgid "seen, getopts places the option character found into OPTARG. If a" + msgstr "seen, getopts places the option character found into OPTARG. If a" + + #: builtins.c:503 + msgid "required argument is not found, getopts places a ':' into NAME and" + msgstr "" + "required argument is not found, getopts places a ‘:’ into NAME and" + + #: builtins.c:504 + msgid "sets OPTARG to the option character found. If getopts is not in" + msgstr "sets OPTARG to the option character found. If getopts is not in" + + #: builtins.c:505 + msgid "silent mode, and an invalid option is seen, getopts places '?' into" + msgstr "" + "silent mode, and an invalid option is seen, getopts places ‘?’ into" + + #: builtins.c:506 + msgid "NAME and unsets OPTARG. If a required argument is not found, a '?'" + msgstr "" + "NAME and unsets OPTARG. If a required argument is not found, a ‘?’" + + #: builtins.c:507 + msgid "is placed in NAME, OPTARG is unset, and a diagnostic message is" + msgstr "is placed in NAME, OPTARG is unset, and a diagnostic message is" + + #: builtins.c:508 + msgid "printed." + msgstr "printed." + + #: builtins.c:510 + msgid "If the shell variable OPTERR has the value 0, getopts disables the" + msgstr "If the shell variable OPTERR has the value 0, getopts disables the" + + #: builtins.c:511 + msgid "printing of error messages, even if the first character of" + msgstr "printing of error messages, even if the first character of" + + #: builtins.c:512 + msgid "OPTSTRING is not a colon. OPTERR has the value 1 by default." + msgstr "OPTSTRING is not a colon. OPTERR has the value 1 by default." + + #: builtins.c:514 + msgid "Getopts normally parses the positional parameters ($0 - $9), but if" + msgstr "Getopts normally parses the positional parameters ($0 - $9), but if" + + #: builtins.c:515 + msgid "more arguments are given, they are parsed instead." + msgstr "more arguments are given, they are parsed instead." + + #: builtins.c:521 + msgid "Exec FILE, replacing this shell with the specified program." + msgstr "Exec FILE, replacing this shell with the specified program." + + #: builtins.c:522 + msgid "If FILE is not specified, the redirections take effect in this" + msgstr "If FILE is not specified, the redirections take effect in this" + + #: builtins.c:523 + msgid "shell. If the first argument is `-l', then place a dash in the" + msgstr "shell. If the first argument is ‘-l’, then place a dash in the" + + #: builtins.c:524 + msgid "zeroth arg passed to FILE, as login does. If the `-c' option" + msgstr "zeroth arg passed to FILE, as login does. If the ‘-c’ option" + + #: builtins.c:525 + msgid "is supplied, FILE is executed with a null environment. The `-a'" + msgstr "is supplied, FILE is executed with a null environment. The ‘-a’" + + #: builtins.c:526 + msgid "option means to make set argv[0] of the executed process to NAME." + msgstr "option means to make set argv[0] of the executed process to NAME." + + #: builtins.c:527 + msgid "If the file cannot be executed and the shell is not interactive," + msgstr "If the file cannot be executed and the shell is not interactive," + + #: builtins.c:528 + msgid "then the shell exits, unless the shell option `execfail' is set." + msgstr "then the shell exits, unless the shell option ‘execfail’ is set." + + #: builtins.c:534 + msgid "Exit the shell with a status of N. If N is omitted, the exit status" + msgstr "Exit the shell with a status of N. If N is omitted, the exit status" + + #: builtins.c:535 + msgid "is that of the last command executed." + msgstr "is that of the last command executed." + + #: builtins.c:541 + msgid "Logout of a login shell." + msgstr "Logout of a login shell." + + #: builtins.c:548 + msgid "" + "fc is used to list or edit and re-execute commands from the history list." + msgstr "" + "fc is used to list or edit and re-execute commands from the history list." + + #: builtins.c:549 + msgid "FIRST and LAST can be numbers specifying the range, or FIRST can be a" + msgstr "FIRST and LAST can be numbers specifying the range, or FIRST can be a" + + #: builtins.c:550 + msgid "string, which means the most recent command beginning with that" + msgstr "string, which means the most recent command beginning with that" + + #: builtins.c:551 + msgid "string." + msgstr "string." + + #: builtins.c:553 + msgid "" + " -e ENAME selects which editor to use. Default is FCEDIT, then EDITOR," + msgstr "" + " -e ENAME selects which editor to use. Default is FCEDIT, then EDITOR," + + #: builtins.c:554 + msgid " then vi." + msgstr " then vi." + + #: builtins.c:556 + msgid " -l means list lines instead of editing." + msgstr " -l means list lines instead of editing." + + #: builtins.c:557 + msgid " -n means no line numbers listed." + msgstr " -n means no line numbers listed." + + #: builtins.c:558 + msgid "" + " -r means reverse the order of the lines (making it newest listed first)." + msgstr "" + " -r means reverse the order of the lines (making it newest listed first)." + + #: builtins.c:560 + msgid "With the `fc -s [pat=rep ...] [command]' format, the command is" + msgstr "With the ‘fc -s [pat=rep ...] [command]’ format, the command is" + + #: builtins.c:561 + msgid "re-executed after the substitution OLD=NEW is performed." + msgstr "re-executed after the substitution OLD=NEW is performed." + + #: builtins.c:563 + msgid "A useful alias to use with this is r='fc -s', so that typing `r cc'" + msgstr "" + "A useful alias to use with this is r='fc -s', so that typing ‘r cc’" + + #: builtins.c:564 + msgid "runs the last command beginning with `cc' and typing `r' re-executes" + msgstr "" + "runs the last command beginning with ‘cc’ and typing ‘r’ re-" + "executes" + + #: builtins.c:565 + msgid "the last command." + msgstr "the last command." + + #: builtins.c:573 + msgid "Place JOB_SPEC in the foreground, and make it the current job. If" + msgstr "Place JOB_SPEC in the foreground, and make it the current job. If" + + #: builtins.c:574 + msgid "JOB_SPEC is not present, the shell's notion of the current job is" + msgstr "JOB_SPEC is not present, the shell's notion of the current job is" + + #: builtins.c:575 + msgid "used." + msgstr "used." + + #: builtins.c:583 + msgid "Place JOB_SPEC in the background, as if it had been started with" + msgstr "Place JOB_SPEC in the background, as if it had been started with" + + #: builtins.c:584 + msgid "`&'. If JOB_SPEC is not present, the shell's notion of the current" + msgstr "" + "‘&’. If JOB_SPEC is not present, the shell's notion of the current" + + #: builtins.c:585 + msgid "job is used." + msgstr "job is used." + + #: builtins.c:592 + msgid "For each NAME, the full pathname of the command is determined and" + msgstr "For each NAME, the full pathname of the command is determined and" + + #: builtins.c:593 + msgid "remembered. If the -p option is supplied, PATHNAME is used as the" + msgstr "remembered. If the -p option is supplied, PATHNAME is used as the" + + #: builtins.c:594 + msgid "full pathname of NAME, and no path search is performed. The -r" + msgstr "full pathname of NAME, and no path search is performed. The -r" + + #: builtins.c:595 + msgid "option causes the shell to forget all remembered locations. The -d" + msgstr "option causes the shell to forget all remembered locations. The -d" + + #: builtins.c:596 + msgid "option causes the shell to forget the remembered location of each NAME." + msgstr "" + "option causes the shell to forget the remembered location of each NAME." + + #: builtins.c:597 + msgid "If the -t option is supplied the full pathname to which each NAME" + msgstr "If the -t option is supplied the full pathname to which each NAME" + + #: builtins.c:598 + msgid "corresponds is printed. If multiple NAME arguments are supplied with" + msgstr "corresponds is printed. If multiple NAME arguments are supplied with" + + #: builtins.c:599 + msgid "-t, the NAME is printed before the hashed full pathname. The -l option" + msgstr "" + "-t, the NAME is printed before the hashed full pathname. The -l option" + + #: builtins.c:600 + msgid "causes output to be displayed in a format that may be reused as input." + msgstr "causes output to be displayed in a format that may be reused as input." + + #: builtins.c:601 + msgid "" + "If no arguments are given, information about remembered commands is " + "displayed." + msgstr "" + "If no arguments are given, information about remembered commands is " + "displayed." + + #: builtins.c:608 + msgid "Display helpful information about builtin commands. If PATTERN is" + msgstr "Display helpful information about builtin commands. If PATTERN is" + + #: builtins.c:609 + msgid "specified, gives detailed help on all commands matching PATTERN," + msgstr "specified, gives detailed help on all commands matching PATTERN," + + #: builtins.c:610 + msgid "otherwise a list of the builtins is printed. The -s option" + msgstr "otherwise a list of the builtins is printed. The -s option" + + #: builtins.c:611 + msgid "restricts the output for each builtin command matching PATTERN to" + msgstr "restricts the output for each builtin command matching PATTERN to" + + #: builtins.c:612 + msgid "a short usage synopsis." + msgstr "a short usage synopsis." + + #: builtins.c:620 + msgid "Display the history list with line numbers. Lines listed with" + msgstr "Display the history list with line numbers. Lines listed with" + + #: builtins.c:621 + msgid "with a `*' have been modified. Argument of N says to list only" + msgstr "with a ‘*’ have been modified. Argument of N says to list only" + + #: builtins.c:622 + msgid "the last N lines. The `-c' option causes the history list to be" + msgstr "the last N lines. The ‘-c’ option causes the history list to be" + + #: builtins.c:623 + msgid "cleared by deleting all of the entries. The `-d' option deletes" + msgstr "cleared by deleting all of the entries. The ‘-d’ option deletes" + + #: builtins.c:624 + msgid "the history entry at offset OFFSET. The `-w' option writes out the" + msgstr "" + "the history entry at offset OFFSET. The ‘-w’ option writes out the" + + #: builtins.c:625 + msgid "current history to the history file; `-r' means to read the file and" + msgstr "" + "current history to the history file; ‘-r’ means to read the file and" + + #: builtins.c:626 + msgid "append the contents to the history list instead. `-a' means" + msgstr "append the contents to the history list instead. ‘-a’ means" + + #: builtins.c:627 + msgid "to append history lines from this session to the history file." + msgstr "to append history lines from this session to the history file." + + #: builtins.c:628 + msgid "Argument `-n' means to read all history lines not already read" + msgstr "Argument ‘-n’ means to read all history lines not already read" + + #: builtins.c:629 + msgid "from the history file and append them to the history list." + msgstr "from the history file and append them to the history list." + + #: builtins.c:631 + msgid "If FILENAME is given, then that is used as the history file else" + msgstr "If FILENAME is given, then that is used as the history file else" + + #: builtins.c:632 + msgid "if $HISTFILE has a value, that is used, else ~/.bash_history." + msgstr "if $HISTFILE has a value, that is used, else ~/.bash_history." + + #: builtins.c:633 + msgid "If the -s option is supplied, the non-option ARGs are appended to" + msgstr "If the -s option is supplied, the non-option ARGs are appended to" + + #: builtins.c:634 + msgid "the history list as a single entry. The -p option means to perform" + msgstr "the history list as a single entry. The -p option means to perform" + + #: builtins.c:635 + msgid "history expansion on each ARG and display the result, without storing" + msgstr "history expansion on each ARG and display the result, without storing" + + #: builtins.c:636 + msgid "anything in the history list." + msgstr "anything in the history list." + + #: builtins.c:638 + msgid "If the $HISTTIMEFORMAT variable is set and not null, its value is used" + msgstr "If the $HISTTIMEFORMAT variable is set and not null, its value is used" + + #: builtins.c:639 + msgid "as a format string for strftime(3) to print the time stamp associated" + msgstr "as a format string for strftime(3) to print the time stamp associated" + + #: builtins.c:640 + msgid "" + "with each displayed history entry. No time stamps are printed otherwise." + msgstr "" + "with each displayed history entry. No time stamps are printed otherwise." + + #: builtins.c:648 + msgid "Lists the active jobs. The -l option lists process id's in addition" + msgstr "Lists the active jobs. The -l option lists process id's in addition" + + #: builtins.c:649 + msgid "to the normal information; the -p option lists process id's only." + msgstr "to the normal information; the -p option lists process id's only." + + #: builtins.c:650 + msgid "If -n is given, only processes that have changed status since the last" + msgstr "If -n is given, only processes that have changed status since the last" + + #: builtins.c:651 + msgid "notification are printed. JOBSPEC restricts output to that job. The" + msgstr "notification are printed. JOBSPEC restricts output to that job. The" + + #: builtins.c:652 + msgid "-r and -s options restrict output to running and stopped jobs only," + msgstr "-r and -s options restrict output to running and stopped jobs only," + + #: builtins.c:653 + msgid "respectively. Without options, the status of all active jobs is" + msgstr "respectively. Without options, the status of all active jobs is" + + #: builtins.c:654 + msgid "printed. If -x is given, COMMAND is run after all job specifications" + msgstr "printed. If -x is given, COMMAND is run after all job specifications" + + #: builtins.c:655 + msgid "" + "that appear in ARGS have been replaced with the process ID of that job's" + msgstr "" + "that appear in ARGS have been replaced with the process ID of that job's" + + #: builtins.c:656 + msgid "process group leader." + msgstr "process group leader." + + #: builtins.c:664 + msgid "" + "By default, removes each JOBSPEC argument from the table of active jobs." + msgstr "" + "By default, removes each JOBSPEC argument from the table of active jobs." + + #: builtins.c:665 + msgid "" + "If the -h option is given, the job is not removed from the table, but is" + msgstr "" + "If the -h option is given, the job is not removed from the table, but is" + + #: builtins.c:666 + msgid "marked so that SIGHUP is not sent to the job if the shell receives a" + msgstr "marked so that SIGHUP is not sent to the job if the shell receives a" + + #: builtins.c:667 + msgid "" + "SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove all" + msgstr "" + "SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove all" + + #: builtins.c:668 + msgid "" + "jobs from the job table; the -r option means to remove only running jobs." + msgstr "" + "jobs from the job table; the -r option means to remove only running jobs." + + #: builtins.c:675 + msgid "Send the processes named by PID (or JOB) the signal SIGSPEC. If" + msgstr "Send the processes named by PID (or JOB) the signal SIGSPEC. If" + + #: builtins.c:676 + msgid "SIGSPEC is not present, then SIGTERM is assumed. An argument of `-l'" + msgstr "" + "SIGSPEC is not present, then SIGTERM is assumed. An argument of ‘-l’" + + #: builtins.c:677 + msgid "lists the signal names; if arguments follow `-l' they are assumed to" + msgstr "" + "lists the signal names; if arguments follow ‘-l’ they are assumed to" + + #: builtins.c:678 + msgid "be signal numbers for which names should be listed. Kill is a shell" + msgstr "be signal numbers for which names should be listed. Kill is a shell" + + #: builtins.c:679 + msgid "builtin for two reasons: it allows job IDs to be used instead of" + msgstr "builtin for two reasons: it allows job IDs to be used instead of" + + #: builtins.c:680 + msgid "process IDs, and, if you have reached the limit on processes that" + msgstr "process IDs, and, if you have reached the limit on processes that" + + #: builtins.c:681 + msgid "you can create, you don't have to start a process to kill another one." + msgstr "you can create, you don't have to start a process to kill another one." + + #: builtins.c:687 + msgid "Each ARG is an arithmetic expression to be evaluated. Evaluation" + msgstr "Each ARG is an arithmetic expression to be evaluated. Evaluation" + + #: builtins.c:688 + msgid "is done in fixed-width integers with no check for overflow, though" + msgstr "is done in fixed-width integers with no check for overflow, though" + + #: builtins.c:689 + msgid "division by 0 is trapped and flagged as an error. The following" + msgstr "division by 0 is trapped and flagged as an error. The following" + + #: builtins.c:690 + msgid "list of operators is grouped into levels of equal-precedence operators." + msgstr "" + "list of operators is grouped into levels of equal-precedence operators." + + #: builtins.c:691 + msgid "The levels are listed in order of decreasing precedence." + msgstr "The levels are listed in order of decreasing precedence." + + #: builtins.c:693 + msgid "\tid++, id--\tvariable post-increment, post-decrement" + msgstr "\tid++, id--\tvariable post-increment, post-decrement" + + #: builtins.c:694 + msgid "\t++id, --id\tvariable pre-increment, pre-decrement" + msgstr "\t++id, --id\tvariable pre-increment, pre-decrement" + + #: builtins.c:695 + msgid "\t-, +\t\tunary minus, plus" + msgstr "\t-, +\t\tunary minus, plus" + + #: builtins.c:696 + msgid "\t!, ~\t\tlogical and bitwise negation" + msgstr "\t!, ~\t\tlogical and bitwise negation" + + #: builtins.c:697 + msgid "\t**\t\texponentiation" + msgstr "\t**\t\texponentiation" + + #: builtins.c:698 + msgid "\t*, /, %\t\tmultiplication, division, remainder" + msgstr "\t*, /, %\t\tmultiplication, division, remainder" + + #: builtins.c:699 + msgid "\t+, -\t\taddition, subtraction" + msgstr "\t+, -\t\taddition, subtraction" + + #: builtins.c:700 + msgid "\t<<, >>\t\tleft and right bitwise shifts" + msgstr "\t<<, >>\t\tleft and right bitwise shifts" + + #: builtins.c:701 + msgid "\t<=, >=, <, >\tcomparison" + msgstr "\t<=, >=, <, >\tcomparison" + + #: builtins.c:702 + msgid "\t==, !=\t\tequality, inequality" + msgstr "\t==, !=\t\tequality, inequality" + + #: builtins.c:703 + msgid "\t&\t\tbitwise AND" + msgstr "\t&\t\tbitwise AND" + + #: builtins.c:704 + msgid "\t^\t\tbitwise XOR" + msgstr "\t^\t\tbitwise XOR" + + #: builtins.c:705 + msgid "\t|\t\tbitwise OR" + msgstr "\t|\t\tbitwise OR" + + #: builtins.c:706 + msgid "\t&&\t\tlogical AND" + msgstr "\t&&\t\tlogical AND" + + #: builtins.c:707 + msgid "\t||\t\tlogical OR" + msgstr "\t||\t\tlogical OR" + + #: builtins.c:708 + msgid "\texpr ? expr : expr" + msgstr "\texpr ? expr : expr" + + #: builtins.c:709 + msgid "\t\t\tconditional operator" + msgstr "\t\t\tconditional operator" + + #: builtins.c:710 + msgid "\t=, *=, /=, %=," + msgstr "\t=, *=, /=, %=," + + #: builtins.c:711 + msgid "\t+=, -=, <<=, >>=," + msgstr "\t+=, -=, <<=, >>=," + + #: builtins.c:712 + msgid "\t&=, ^=, |=\tassignment" + msgstr "\t&=, ^=, |=\tassignment" + + #: builtins.c:714 + msgid "Shell variables are allowed as operands. The name of the variable" + msgstr "Shell variables are allowed as operands. The name of the variable" + + #: builtins.c:715 + msgid "is replaced by its value (coerced to a fixed-width integer) within" + msgstr "is replaced by its value (coerced to a fixed-width integer) within" + + #: builtins.c:716 + msgid "an expression. The variable need not have its integer attribute" + msgstr "an expression. The variable need not have its integer attribute" + + #: builtins.c:717 + msgid "turned on to be used in an expression." + msgstr "turned on to be used in an expression." + + #: builtins.c:719 + msgid "Operators are evaluated in order of precedence. Sub-expressions in" + msgstr "Operators are evaluated in order of precedence. Sub-expressions in" + + #: builtins.c:720 + msgid "parentheses are evaluated first and may override the precedence" + msgstr "parentheses are evaluated first and may override the precedence" + + #: builtins.c:721 + msgid "rules above." + msgstr "rules above." + + #: builtins.c:723 + msgid "If the last ARG evaluates to 0, let returns 1; 0 is returned" + msgstr "If the last ARG evaluates to 0, let returns 1; 0 is returned" + + #: builtins.c:724 + msgid "otherwise." + msgstr "otherwise." + + #: builtins.c:730 + msgid "" + "One line is read from the standard input, or from file descriptor FD if the" + msgstr "" + "One line is read from the standard input, or from file descriptor FD if the" + + #: builtins.c:731 + msgid "" + "-u option is supplied, and the first word is assigned to the first NAME," + msgstr "" + "-u option is supplied, and the first word is assigned to the first NAME," + + #: builtins.c:732 + msgid "" + "the second word to the second NAME, and so on, with leftover words assigned" + msgstr "" + "the second word to the second NAME, and so on, with leftover words assigned" + + #: builtins.c:733 + msgid "" + "to the last NAME. Only the characters found in $IFS are recognized as word" + msgstr "" + "to the last NAME. Only the characters found in $IFS are recognized as word" + + #: builtins.c:734 + msgid "" + "delimiters. If no NAMEs are supplied, the line read is stored in the REPLY" + msgstr "" + "delimiters. If no NAMEs are supplied, the line read is stored in the REPLY" + + #: builtins.c:735 + msgid "variable. If the -r option is given, this signifies `raw' input, and" + msgstr "" + "variable. If the -r option is given, this signifies ‘raw’ input, and" + + #: builtins.c:736 + msgid "backslash escaping is disabled. The -d option causes read to continue" + msgstr "backslash escaping is disabled. The -d option causes read to continue" + + #: builtins.c:737 + msgid "" + "until the first character of DELIM is read, rather than newline. If the -p" + msgstr "" + "until the first character of DELIM is read, rather than newline. If the -p" + + #: builtins.c:738 + msgid "" + "option is supplied, the string PROMPT is output without a trailing newline" + msgstr "" + "option is supplied, the string PROMPT is output without a trailing newline" + + #: builtins.c:739 + msgid "" + "before attempting to read. If -a is supplied, the words read are assigned" + msgstr "" + "before attempting to read. If -a is supplied, the words read are assigned" + + #: builtins.c:740 + msgid "" + "to sequential indices of ARRAY, starting at zero. If -e is supplied and" + msgstr "" + "to sequential indices of ARRAY, starting at zero. If -e is supplied and" + + #: builtins.c:741 + msgid "" + "the shell is interactive, readline is used to obtain the line. If -n is" + msgstr "" + "the shell is interactive, readline is used to obtain the line. If -n is" + + #: builtins.c:742 + msgid "supplied with a non-zero NCHARS argument, read returns after NCHARS" + msgstr "supplied with a non-zero NCHARS argument, read returns after NCHARS" + + #: builtins.c:743 + msgid "characters have been read. The -s option causes input coming from a" + msgstr "characters have been read. The -s option causes input coming from a" + + #: builtins.c:744 + msgid "terminal to not be echoed." + msgstr "terminal to not be echoed." + + #: builtins.c:746 + msgid "" + "The -t option causes read to time out and return failure if a complete line" + msgstr "" + "The -t option causes read to time out and return failure if a complete line" + + #: builtins.c:747 + msgid "" + "of input is not read within TIMEOUT seconds. If the TMOUT variable is set," + msgstr "" + "of input is not read within TIMEOUT seconds. If the TMOUT variable is set," + + #: builtins.c:748 + msgid "" + "its value is the default timeout. The return code is zero, unless end-of-" + "file" + msgstr "" + "its value is the default timeout. The return code is zero, unless end-of-" + "file" + + #: builtins.c:749 + msgid "" + "is encountered, read times out, or an invalid file descriptor is supplied as" + msgstr "" + "is encountered, read times out, or an invalid file descriptor is supplied as" + + #: builtins.c:750 + msgid "the argument to -u." + msgstr "the argument to -u." + + #: builtins.c:756 + msgid "Causes a function to exit with the return value specified by N. If N" + msgstr "Causes a function to exit with the return value specified by N. If N" + + #: builtins.c:757 + msgid "is omitted, the return status is that of the last command." + msgstr "is omitted, the return status is that of the last command." + + #: builtins.c:763 + msgid " -a Mark variables which are modified or created for export." + msgstr " -a Mark variables which are modified or created for export." + + #: builtins.c:764 + msgid " -b Notify of job termination immediately." + msgstr " -b Notify of job termination immediately." + + #: builtins.c:765 + msgid " -e Exit immediately if a command exits with a non-zero status." + msgstr " -e Exit immediately if a command exits with a non-zero status." + + #: builtins.c:766 + msgid " -f Disable file name generation (globbing)." + msgstr " -f Disable file name generation (globbing)." + + #: builtins.c:767 + msgid " -h Remember the location of commands as they are looked up." + msgstr " -h Remember the location of commands as they are looked up." + + #: builtins.c:768 + msgid " -k All assignment arguments are placed in the environment for a" + msgstr " -k All assignment arguments are placed in the environment for a" + + #: builtins.c:769 + msgid " command, not just those that precede the command name." + msgstr " command, not just those that precede the command name." + + #: builtins.c:770 + msgid " -m Job control is enabled." + msgstr " -m Job control is enabled." + + #: builtins.c:771 + msgid " -n Read commands but do not execute them." + msgstr " -n Read commands but do not execute them." + + #: builtins.c:772 + msgid " -o option-name" + msgstr " -o option-name" + + #: builtins.c:773 + msgid " Set the variable corresponding to option-name:" + msgstr " Set the variable corresponding to option-name:" + + #: builtins.c:774 + msgid " allexport same as -a" + msgstr " allexport same as -a" + + #: builtins.c:775 + msgid " braceexpand same as -B" + msgstr " braceexpand same as -B" + + #: builtins.c:777 + msgid " emacs use an emacs-style line editing interface" + msgstr " emacs use an emacs-style line editing interface" + + #: builtins.c:779 + msgid " errexit same as -e" + msgstr " errexit same as -e" + + #: builtins.c:780 + msgid " errtrace same as -E" + msgstr " errtrace same as -E" + + #: builtins.c:781 + msgid " functrace same as -T" + msgstr " functrace same as -T" + + #: builtins.c:782 + msgid " hashall same as -h" + msgstr " hashall same as -h" + + #: builtins.c:784 + msgid " histexpand same as -H" + msgstr " histexpand same as -H" + + #: builtins.c:787 + msgid " history enable command history" + msgstr " history enable command history" + + #: builtins.c:789 + msgid " ignoreeof the shell will not exit upon reading EOF" + msgstr " ignoreeof the shell will not exit upon reading EOF" + + #: builtins.c:790 + msgid " interactive-comments" + msgstr " interactive-comments" + + #: builtins.c:791 + msgid "" + " allow comments to appear in interactive commands" + msgstr "" + " allow comments to appear in interactive commands" + + #: builtins.c:792 + msgid " keyword same as -k" + msgstr " keyword same as -k" + + #: builtins.c:793 + msgid " monitor same as -m" + msgstr " monitor same as -m" + + #: builtins.c:794 + msgid " noclobber same as -C" + msgstr " noclobber same as -C" + + #: builtins.c:795 + msgid " noexec same as -n" + msgstr " noexec same as -n" + + #: builtins.c:796 + msgid " noglob same as -f" + msgstr " noglob same as -f" + + #: builtins.c:797 + msgid " nolog currently accepted but ignored" + msgstr " nolog currently accepted but ignored" + + #: builtins.c:798 + msgid " notify same as -b" + msgstr " notify same as -b" + + #: builtins.c:799 + msgid " nounset same as -u" + msgstr " nounset same as -u" + + #: builtins.c:800 + msgid " onecmd same as -t" + msgstr " onecmd same as -t" + + #: builtins.c:801 + msgid " physical same as -P" + msgstr " physical same as -P" + + #: builtins.c:802 + msgid "" + " pipefail the return value of a pipeline is the status of" + msgstr "" + " pipefail the return value of a pipeline is the status of" + + #: builtins.c:803 + msgid "" + " the last command to exit with a non-zero status," + msgstr "" + " the last command to exit with a non-zero status," + + #: builtins.c:804 + msgid "" + " or zero if no command exited with a non-zero status" + msgstr "" + " or zero if no command exited with a non-zero status" + + #: builtins.c:805 + msgid " posix change the behavior of bash where the default" + msgstr " posix change the behavior of bash where the default" + + #: builtins.c:806 + msgid " operation differs from the 1003.2 standard to" + msgstr " operation differs from the 1003.2 standard to" + + #: builtins.c:807 + msgid " match the standard" + msgstr " match the standard" + + #: builtins.c:808 + msgid " privileged same as -p" + msgstr " privileged same as -p" + + #: builtins.c:809 + msgid " verbose same as -v" + msgstr " verbose same as -v" + + #: builtins.c:811 + msgid " vi use a vi-style line editing interface" + msgstr " vi use a vi-style line editing interface" + + #: builtins.c:813 + msgid " xtrace same as -x" + msgstr " xtrace same as -x" + + #: builtins.c:814 + msgid "" + " -p Turned on whenever the real and effective user ids do not match." + msgstr "" + " -p Turned on whenever the real and effective user ids do not match." + + #: builtins.c:815 + msgid " Disables processing of the $ENV file and importing of shell" + msgstr " Disables processing of the $ENV file and importing of shell" + + #: builtins.c:816 + msgid "" + " functions. Turning this option off causes the effective uid and" + msgstr "" + " functions. Turning this option off causes the effective uid and" + + #: builtins.c:817 + msgid " gid to be set to the real uid and gid." + msgstr " gid to be set to the real uid and gid." + + #: builtins.c:818 + msgid " -t Exit after reading and executing one command." + msgstr " -t Exit after reading and executing one command." + + #: builtins.c:819 + msgid " -u Treat unset variables as an error when substituting." + msgstr " -u Treat unset variables as an error when substituting." + + #: builtins.c:820 + msgid " -v Print shell input lines as they are read." + msgstr " -v Print shell input lines as they are read." + + #: builtins.c:821 + msgid " -x Print commands and their arguments as they are executed." + msgstr " -x Print commands and their arguments as they are executed." + + #: builtins.c:823 + msgid " -B the shell will perform brace expansion" + msgstr " -B the shell will perform brace expansion" + + #: builtins.c:825 + msgid " -C If set, disallow existing regular files to be overwritten" + msgstr " -C If set, disallow existing regular files to be overwritten" + + #: builtins.c:826 + msgid " by redirection of output." + msgstr " by redirection of output." + + #: builtins.c:827 + msgid " -E If set, the ERR trap is inherited by shell functions." + msgstr " -E If set, the ERR trap is inherited by shell functions." + + #: builtins.c:829 + msgid " -H Enable ! style history substitution. This flag is on" + msgstr " -H Enable ! style history substitution. This flag is on" + + #: builtins.c:830 + msgid " by default." + msgstr " by default." + + #: builtins.c:832 + msgid " -P If set, do not follow symbolic links when executing commands" + msgstr " -P If set, do not follow symbolic links when executing commands" + + #: builtins.c:833 + msgid " such as cd which change the current directory." + msgstr " such as cd which change the current directory." + + #: builtins.c:834 + msgid " -T If set, the DEBUG trap is inherited by shell functions." + msgstr " -T If set, the DEBUG trap is inherited by shell functions." + + #: builtins.c:836 + msgid "Using + rather than - causes these flags to be turned off. The" + msgstr "Using + rather than - causes these flags to be turned off. The" + + #: builtins.c:837 + msgid "flags can also be used upon invocation of the shell. The current" + msgstr "flags can also be used upon invocation of the shell. The current" + + #: builtins.c:838 + msgid "set of flags may be found in $-. The remaining n ARGs are positional" + msgstr "set of flags may be found in $-. The remaining n ARGs are positional" + + #: builtins.c:839 + msgid "parameters and are assigned, in order, to $1, $2, .. $n. If no" + msgstr "parameters and are assigned, in order, to $1, $2, .. $n. If no" + + #: builtins.c:840 + msgid "ARGs are given, all shell variables are printed." + msgstr "ARGs are given, all shell variables are printed." + + #: builtins.c:846 + msgid "For each NAME, remove the corresponding variable or function. Given" + msgstr "For each NAME, remove the corresponding variable or function. Given" + + #: builtins.c:847 + msgid "the `-v', unset will only act on variables. Given the `-f' flag," + msgstr "" + "the ‘-v’, unset will only act on variables. Given the ‘-f’ flag," + + #: builtins.c:848 + msgid "unset will only act on functions. With neither flag, unset first" + msgstr "unset will only act on functions. With neither flag, unset first" + + #: builtins.c:849 + msgid "tries to unset a variable, and if that fails, then tries to unset a" + msgstr "tries to unset a variable, and if that fails, then tries to unset a" + + #: builtins.c:850 + msgid "function. Some variables cannot be unset; also see readonly." + msgstr "function. Some variables cannot be unset; also see readonly." + + #: builtins.c:856 + msgid "NAMEs are marked for automatic export to the environment of" + msgstr "NAMEs are marked for automatic export to the environment of" + + #: builtins.c:857 + msgid "subsequently executed commands. If the -f option is given," + msgstr "subsequently executed commands. If the -f option is given," + + #: builtins.c:858 + msgid "the NAMEs refer to functions. If no NAMEs are given, or if `-p'" + msgstr "the NAMEs refer to functions. If no NAMEs are given, or if ‘-p’" + + #: builtins.c:859 + msgid "is given, a list of all names that are exported in this shell is" + msgstr "is given, a list of all names that are exported in this shell is" + + #: builtins.c:860 + msgid "printed. An argument of `-n' says to remove the export property" + msgstr "printed. An argument of ‘-n’ says to remove the export property" + + #: builtins.c:861 + msgid "from subsequent NAMEs. An argument of `--' disables further option" + msgstr "" + "from subsequent NAMEs. An argument of ‘--’ disables further option" + + #: builtins.c:862 builtins.c:874 + msgid "processing." + msgstr "processing." + + #: builtins.c:868 + msgid "The given NAMEs are marked readonly and the values of these NAMEs may" + msgstr "The given NAMEs are marked readonly and the values of these NAMEs may" + + #: builtins.c:869 + msgid "not be changed by subsequent assignment. If the -f option is given," + msgstr "not be changed by subsequent assignment. If the -f option is given," + + #: builtins.c:870 + msgid "then functions corresponding to the NAMEs are so marked. If no" + msgstr "then functions corresponding to the NAMEs are so marked. If no" + + #: builtins.c:871 + msgid "arguments are given, or if `-p' is given, a list of all readonly names" + msgstr "" + "arguments are given, or if ‘-p’ is given, a list of all readonly names" + + #: builtins.c:872 + msgid "is printed. The `-a' option means to treat each NAME as" + msgstr "is printed. The ‘-a’ option means to treat each NAME as" + + #: builtins.c:873 + msgid "an array variable. An argument of `--' disables further option" + msgstr "an array variable. An argument of ‘--’ disables further option" + + #: builtins.c:880 + msgid "The positional parameters from $N+1 ... are renamed to $1 ... If N is" + msgstr "The positional parameters from $N+1 ... are renamed to $1 ... If N is" + + #: builtins.c:881 + msgid "not given, it is assumed to be 1." + msgstr "not given, it is assumed to be 1." + + #: builtins.c:887 builtins.c:896 + msgid "Read and execute commands from FILENAME and return. The pathnames" + msgstr "Read and execute commands from FILENAME and return. The pathnames" + + #: builtins.c:888 builtins.c:897 + msgid "in $PATH are used to find the directory containing FILENAME. If any" + msgstr "in $PATH are used to find the directory containing FILENAME. If any" + + #: builtins.c:889 builtins.c:898 + msgid "ARGUMENTS are supplied, they become the positional parameters when" + msgstr "ARGUMENTS are supplied, they become the positional parameters when" + + #: builtins.c:890 builtins.c:899 + msgid "FILENAME is executed." + msgstr "FILENAME is executed." + + #: builtins.c:906 + msgid "Suspend the execution of this shell until it receives a SIGCONT" + msgstr "Suspend the execution of this shell until it receives a SIGCONT" + + #: builtins.c:907 + msgid "signal. The `-f' if specified says not to complain about this" + msgstr "signal. The ‘-f’ if specified says not to complain about this" + + #: builtins.c:908 + msgid "being a login shell if it is; just suspend anyway." + msgstr "being a login shell if it is; just suspend anyway." + + #: builtins.c:915 + msgid "Exits with a status of 0 (true) or 1 (false) depending on" + msgstr "Exits with a status of 0 (true) or 1 (false) depending on" + + #: builtins.c:916 + msgid "the evaluation of EXPR. Expressions may be unary or binary. Unary" + msgstr "the evaluation of EXPR. Expressions may be unary or binary. Unary" + + #: builtins.c:917 + msgid "expressions are often used to examine the status of a file. There" + msgstr "expressions are often used to examine the status of a file. There" + + #: builtins.c:918 + msgid "are string operators as well, and numeric comparison operators." + msgstr "are string operators as well, and numeric comparison operators." + + #: builtins.c:920 + msgid "File operators:" + msgstr "File operators:" + + #: builtins.c:922 + msgid " -a FILE True if file exists." + msgstr " -a FILE True if file exists." + + #: builtins.c:923 + msgid " -b FILE True if file is block special." + msgstr " -b FILE True if file is block special." + + #: builtins.c:924 + msgid " -c FILE True if file is character special." + msgstr " -c FILE True if file is character special." + + #: builtins.c:925 + msgid " -d FILE True if file is a directory." + msgstr " -d FILE True if file is a directory." + + #: builtins.c:926 + msgid " -e FILE True if file exists." + msgstr " -e FILE True if file exists." + + #: builtins.c:927 + msgid " -f FILE True if file exists and is a regular file." + msgstr " -f FILE True if file exists and is a regular file." + + #: builtins.c:928 + msgid " -g FILE True if file is set-group-id." + msgstr " -g FILE True if file is set-group-id." + + #: builtins.c:929 + msgid " -h FILE True if file is a symbolic link." + msgstr " -h FILE True if file is a symbolic link." + + #: builtins.c:930 + msgid " -L FILE True if file is a symbolic link." + msgstr " -L FILE True if file is a symbolic link." + + #: builtins.c:931 + msgid " -k FILE True if file has its `sticky' bit set." + msgstr " -k FILE True if file has its ‘sticky’ bit set." + + #: builtins.c:932 + msgid " -p FILE True if file is a named pipe." + msgstr " -p FILE True if file is a named pipe." + + #: builtins.c:933 + msgid " -r FILE True if file is readable by you." + msgstr " -r FILE True if file is readable by you." + + #: builtins.c:934 + msgid " -s FILE True if file exists and is not empty." + msgstr " -s FILE True if file exists and is not empty." + + #: builtins.c:935 + msgid " -S FILE True if file is a socket." + msgstr " -S FILE True if file is a socket." + + #: builtins.c:936 + msgid " -t FD True if FD is opened on a terminal." + msgstr " -t FD True if FD is opened on a terminal." + + #: builtins.c:937 + msgid " -u FILE True if the file is set-user-id." + msgstr " -u FILE True if the file is set-user-id." + + #: builtins.c:938 + msgid " -w FILE True if the file is writable by you." + msgstr " -w FILE True if the file is writable by you." + + #: builtins.c:939 + msgid " -x FILE True if the file is executable by you." + msgstr " -x FILE True if the file is executable by you." + + #: builtins.c:940 + msgid " -O FILE True if the file is effectively owned by you." + msgstr " -O FILE True if the file is effectively owned by you." + + #: builtins.c:941 + msgid " -G FILE True if the file is effectively owned by your group." + msgstr "" + " -G FILE True if the file is effectively owned by your group." + + #: builtins.c:942 + msgid "" + " -N FILE True if the file has been modified since it was last read." + msgstr "" + " -N FILE True if the file has been modified since it was last read." + + #: builtins.c:944 + msgid " FILE1 -nt FILE2 True if file1 is newer than file2 (according to" + msgstr " FILE1 -nt FILE2 True if file1 is newer than file2 (according to" + + #: builtins.c:945 + msgid " modification date)." + msgstr " modification date)." + + #: builtins.c:947 + msgid " FILE1 -ot FILE2 True if file1 is older than file2." + msgstr " FILE1 -ot FILE2 True if file1 is older than file2." + + #: builtins.c:949 + msgid " FILE1 -ef FILE2 True if file1 is a hard link to file2." + msgstr " FILE1 -ef FILE2 True if file1 is a hard link to file2." + + #: builtins.c:951 + msgid "String operators:" + msgstr "String operators:" + + #: builtins.c:953 + msgid " -z STRING True if string is empty." + msgstr " -z STRING True if string is empty." + + #: builtins.c:955 + msgid " -n STRING" + msgstr " -n STRING" + + #: builtins.c:956 + msgid " STRING True if string is not empty." + msgstr " STRING True if string is not empty." + + #: builtins.c:958 + msgid " STRING1 = STRING2" + msgstr " STRING1 = STRING2" + + #: builtins.c:959 + msgid " True if the strings are equal." + msgstr " True if the strings are equal." + + #: builtins.c:960 + msgid " STRING1 != STRING2" + msgstr " STRING1 != STRING2" + + #: builtins.c:961 + msgid " True if the strings are not equal." + msgstr " True if the strings are not equal." + + #: builtins.c:962 + msgid " STRING1 < STRING2" + msgstr " STRING1 < STRING2" + + #: builtins.c:963 + msgid "" + " True if STRING1 sorts before STRING2 lexicographically." + msgstr "" + " True if STRING1 sorts before STRING2 lexicographically." + + #: builtins.c:964 + msgid " STRING1 > STRING2" + msgstr " STRING1 > STRING2" + + #: builtins.c:965 + msgid "" + " True if STRING1 sorts after STRING2 lexicographically." + msgstr "" + " True if STRING1 sorts after STRING2 lexicographically." + + #: builtins.c:967 + msgid "Other operators:" + msgstr "Other operators:" + + #: builtins.c:969 + msgid " -o OPTION True if the shell option OPTION is enabled." + msgstr " -o OPTION True if the shell option OPTION is enabled." + + #: builtins.c:970 + msgid " ! EXPR True if expr is false." + msgstr " ! EXPR True if expr is false." + + #: builtins.c:971 + msgid " EXPR1 -a EXPR2 True if both expr1 AND expr2 are true." + msgstr " EXPR1 -a EXPR2 True if both expr1 AND expr2 are true." + + #: builtins.c:972 + msgid " EXPR1 -o EXPR2 True if either expr1 OR expr2 is true." + msgstr " EXPR1 -o EXPR2 True if either expr1 OR expr2 is true." + + #: builtins.c:974 + msgid " arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne," + msgstr " arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne," + + #: builtins.c:975 + msgid " -lt, -le, -gt, or -ge." + msgstr " -lt, -le, -gt, or -ge." + + #: builtins.c:977 + msgid "Arithmetic binary operators return true if ARG1 is equal, not-equal," + msgstr "Arithmetic binary operators return true if ARG1 is equal, not-equal," + + #: builtins.c:978 + msgid "less-than, less-than-or-equal, greater-than, or greater-than-or-equal" + msgstr "less-than, less-than-or-equal, greater-than, or greater-than-or-equal" + + #: builtins.c:979 + msgid "than ARG2." + msgstr "than ARG2." + + #: builtins.c:985 + msgid "This is a synonym for the \"test\" builtin, but the last" + msgstr "This is a synonym for the “test†builtin, but the last" + + #: builtins.c:986 + msgid "argument must be a literal `]', to match the opening `['." + msgstr "argument must be a literal ‘]’, to match the opening ‘[’." + + #: builtins.c:992 + msgid "Print the accumulated user and system times for processes run from" + msgstr "Print the accumulated user and system times for processes run from" + + #: builtins.c:993 + msgid "the shell." + msgstr "the shell." + + #: builtins.c:999 + msgid "The command ARG is to be read and executed when the shell receives" + msgstr "The command ARG is to be read and executed when the shell receives" + + #: builtins.c:1000 + msgid "signal(s) SIGNAL_SPEC. If ARG is absent all specified signals are" + msgstr "signal(s) SIGNAL_SPEC. If ARG is absent all specified signals are" + + #: builtins.c:1001 + msgid "reset to their original values. If ARG is the null string each" + msgstr "reset to their original values. If ARG is the null string each" + + #: builtins.c:1002 + msgid "SIGNAL_SPEC is ignored by the shell and by the commands it invokes." + msgstr "SIGNAL_SPEC is ignored by the shell and by the commands it invokes." + + #: builtins.c:1003 + msgid "If a SIGNAL_SPEC is EXIT (0) the command ARG is executed on exit from" + msgstr "If a SIGNAL_SPEC is EXIT (0) the command ARG is executed on exit from" + + #: builtins.c:1004 + msgid "the shell. If a SIGNAL_SPEC is DEBUG, ARG is executed after every" + msgstr "the shell. If a SIGNAL_SPEC is DEBUG, ARG is executed after every" + + #: builtins.c:1005 + msgid "command. If ARG is `-p' then the trap commands associated with" + msgstr "command. If ARG is ‘-p’ then the trap commands associated with" + + #: builtins.c:1006 + msgid "each SIGNAL_SPEC are displayed. If no arguments are supplied or if" + msgstr "each SIGNAL_SPEC are displayed. If no arguments are supplied or if" + + #: builtins.c:1007 + msgid "only `-p' is given, trap prints the list of commands associated with" + msgstr "" + "only ‘-p’ is given, trap prints the list of commands associated with" + + #: builtins.c:1008 + msgid "" + "each signal number. Each SIGNAL_SPEC is either a signal name in " + msgstr "" + "each signal number. Each SIGNAL_SPEC is either a signal name in " + + #: builtins.c:1009 + msgid "or a signal number. `trap -l' prints a list of signal names and their" + msgstr "" + "or a signal number. ‘trap -l’ prints a list of signal names and their" + + #: builtins.c:1010 + msgid "corresponding numbers. Note that a signal can be sent to the shell" + msgstr "corresponding numbers. Note that a signal can be sent to the shell" + + #: builtins.c:1011 + msgid "with \"kill -signal $$\"." + msgstr "with “kill -signal $$â€." + + #: builtins.c:1017 + msgid "For each NAME, indicate how it would be interpreted if used as a" + msgstr "For each NAME, indicate how it would be interpreted if used as a" + + #: builtins.c:1018 + msgid "command name." + msgstr "command name." + + #: builtins.c:1020 + msgid "If the -t option is used, `type' outputs a single word which is one of" + msgstr "" + "If the -t option is used, ‘type’ outputs a single word which is one of" + + #: builtins.c:1021 + msgid "`alias', `keyword', `function', `builtin', `file' or `', if NAME is an" + msgstr "" + "‘alias’, ‘keyword’, ‘function’, ‘builtin’, ‘file" + "[0m’ or ‘’, if NAME is an" + + #: builtins.c:1022 + msgid "alias, shell reserved word, shell function, shell builtin, disk file," + msgstr "alias, shell reserved word, shell function, shell builtin, disk file," + + #: builtins.c:1023 + msgid "or unfound, respectively." + msgstr "or unfound, respectively." + + #: builtins.c:1025 + msgid "If the -p flag is used, `type' either returns the name of the disk" + msgstr "" + "If the -p flag is used, ‘type’ either returns the name of the disk" + + #: builtins.c:1026 + msgid "file that would be executed, or nothing if `type -t NAME' would not" + msgstr "" + "file that would be executed, or nothing if ‘type -t NAME’ would not" + + #: builtins.c:1027 + msgid "return `file'." + msgstr "return ‘file’." + + #: builtins.c:1029 + msgid "If the -a flag is used, `type' displays all of the places that contain" + msgstr "" + "If the -a flag is used, ‘type’ displays all of the places that contain" + + #: builtins.c:1030 + msgid "an executable named `file'. This includes aliases, builtins, and" + msgstr "" + "an executable named ‘file’. This includes aliases, builtins, and" + + #: builtins.c:1031 + msgid "functions, if and only if the -p flag is not also used." + msgstr "functions, if and only if the -p flag is not also used." + + #: builtins.c:1033 + msgid "The -f flag suppresses shell function lookup." + msgstr "The -f flag suppresses shell function lookup." + + #: builtins.c:1035 + msgid "The -P flag forces a PATH search for each NAME, even if it is an alias," + msgstr "" + "The -P flag forces a PATH search for each NAME, even if it is an alias," + + #: builtins.c:1036 + msgid "builtin, or function, and returns the name of the disk file that would" + msgstr "builtin, or function, and returns the name of the disk file that would" + + #: builtins.c:1037 + msgid "be executed." + msgstr "be executed." + + #: builtins.c:1044 + msgid "Ulimit provides control over the resources available to processes" + msgstr "Ulimit provides control over the resources available to processes" + + #: builtins.c:1045 + msgid "started by the shell, on systems that allow such control. If an" + msgstr "started by the shell, on systems that allow such control. If an" + + #: builtins.c:1046 + msgid "option is given, it is interpreted as follows:" + msgstr "option is given, it is interpreted as follows:" + + #: builtins.c:1048 + msgid " -S\tuse the `soft' resource limit" + msgstr " -S\tuse the ‘soft’ resource limit" + + #: builtins.c:1049 + msgid " -H\tuse the `hard' resource limit" + msgstr " -H\tuse the ‘hard’ resource limit" + + #: builtins.c:1050 + msgid " -a\tall current limits are reported" + msgstr " -a\tall current limits are reported" + + #: builtins.c:1051 + msgid " -c\tthe maximum size of core files created" + msgstr " -c\tthe maximum size of core files created" + + #: builtins.c:1052 + msgid " -d\tthe maximum size of a process's data segment" + msgstr " -d\tthe maximum size of a process's data segment" + + #: builtins.c:1053 + msgid " -f\tthe maximum size of files created by the shell" + msgstr " -f\tthe maximum size of files created by the shell" + + #: builtins.c:1054 + msgid " -l\tthe maximum size a process may lock into memory" + msgstr " -l\tthe maximum size a process may lock into memory" + + #: builtins.c:1055 + msgid " -m\tthe maximum resident set size" + msgstr " -m\tthe maximum resident set size" + + #: builtins.c:1056 + msgid " -n\tthe maximum number of open file descriptors" + msgstr " -n\tthe maximum number of open file descriptors" + + #: builtins.c:1057 + msgid " -p\tthe pipe buffer size" + msgstr " -p\tthe pipe buffer size" + + #: builtins.c:1058 + msgid " -s\tthe maximum stack size" + msgstr " -s\tthe maximum stack size" + + #: builtins.c:1059 + msgid " -t\tthe maximum amount of cpu time in seconds" + msgstr " -t\tthe maximum amount of cpu time in seconds" + + #: builtins.c:1060 + msgid " -u\tthe maximum number of user processes" + msgstr " -u\tthe maximum number of user processes" + + #: builtins.c:1061 + msgid " -v\tthe size of virtual memory" + msgstr " -v\tthe size of virtual memory" + + #: builtins.c:1063 + msgid "If LIMIT is given, it is the new value of the specified resource;" + msgstr "If LIMIT is given, it is the new value of the specified resource;" + + #: builtins.c:1064 + msgid "the special LIMIT values `soft', `hard', and `unlimited' stand for" + msgstr "" + "the special LIMIT values ‘soft’, ‘hard’, and ‘unlimited’ " + "stand for" + + #: builtins.c:1065 + msgid "" + "the current soft limit, the current hard limit, and no limit, respectively." + msgstr "" + "the current soft limit, the current hard limit, and no limit, respectively." + + #: builtins.c:1066 + msgid "Otherwise, the current value of the specified resource is printed." + msgstr "Otherwise, the current value of the specified resource is printed." + + #: builtins.c:1067 + msgid "If no option is given, then -f is assumed. Values are in 1024-byte" + msgstr "If no option is given, then -f is assumed. Values are in 1024-byte" + + #: builtins.c:1068 + msgid "increments, except for -t, which is in seconds, -p, which is in" + msgstr "increments, except for -t, which is in seconds, -p, which is in" + + #: builtins.c:1069 + msgid "increments of 512 bytes, and -u, which is an unscaled number of" + msgstr "increments of 512 bytes, and -u, which is an unscaled number of" + + #: builtins.c:1070 + msgid "processes." + msgstr "processes." + + #: builtins.c:1077 + msgid "The user file-creation mask is set to MODE. If MODE is omitted, or if" + msgstr "The user file-creation mask is set to MODE. If MODE is omitted, or if" + + #: builtins.c:1078 + msgid "`-S' is supplied, the current value of the mask is printed. The `-S'" + msgstr "" + "‘-S’ is supplied, the current value of the mask is printed. The ‘-S" + "[0m’" + + #: builtins.c:1079 + msgid "option makes the output symbolic; otherwise an octal number is output." + msgstr "option makes the output symbolic; otherwise an octal number is output." + + #: builtins.c:1080 + msgid "If `-p' is supplied, and MODE is omitted, the output is in a form" + msgstr "" + "If ‘-p’ is supplied, and MODE is omitted, the output is in a form" + + #: builtins.c:1081 + msgid "that may be used as input. If MODE begins with a digit, it is" + msgstr "that may be used as input. If MODE begins with a digit, it is" + + #: builtins.c:1082 + msgid "interpreted as an octal number, otherwise it is a symbolic mode string" + msgstr "interpreted as an octal number, otherwise it is a symbolic mode string" + + #: builtins.c:1083 + msgid "like that accepted by chmod(1)." + msgstr "like that accepted by chmod(1)." + + #: builtins.c:1090 builtins.c:1102 + msgid "Wait for the specified process and report its termination status. If" + msgstr "Wait for the specified process and report its termination status. If" + + #: builtins.c:1091 builtins.c:1103 + msgid "N is not given, all currently active child processes are waited for," + msgstr "N is not given, all currently active child processes are waited for," + + #: builtins.c:1092 + msgid "and the return code is zero. N may be a process ID or a job" + msgstr "and the return code is zero. N may be a process ID or a job" + + #: builtins.c:1093 + msgid "specification; if a job spec is given, all processes in the job's" + msgstr "specification; if a job spec is given, all processes in the job's" + + #: builtins.c:1094 + msgid "pipeline are waited for." + msgstr "pipeline are waited for." + + #: builtins.c:1104 + msgid "and the return code is zero. N is a process ID; if it is not given," + msgstr "and the return code is zero. N is a process ID; if it is not given," + + #: builtins.c:1105 + msgid "all child processes of the shell are waited for." + msgstr "all child processes of the shell are waited for." + + #: builtins.c:1112 + msgid "The `for' loop executes a sequence of commands for each member in a" + msgstr "" + "The ‘for’ loop executes a sequence of commands for each member in a" + + #: builtins.c:1113 + msgid "list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is" + msgstr "" + "list of items. If ‘in WORDS ...;’ is not present, then ‘in “$@" + "[0m‒ is" + + #: builtins.c:1114 + msgid "assumed. For each element in WORDS, NAME is set to that element, and" + msgstr "assumed. For each element in WORDS, NAME is set to that element, and" + + #: builtins.c:1115 + msgid "the COMMANDS are executed." + msgstr "the COMMANDS are executed." + + #: builtins.c:1121 + msgid "Equivalent to" + msgstr "Equivalent to" + + #: builtins.c:1122 + msgid "\t(( EXP1 ))" + msgstr "\t(( EXP1 ))" + + #: builtins.c:1123 + msgid "\twhile (( EXP2 )); do" + msgstr "\twhile (( EXP2 )); do" + + #: builtins.c:1124 + msgid "\t\tCOMMANDS" + msgstr "\t\tCOMMANDS" + + #: builtins.c:1125 + msgid "\t\t(( EXP3 ))" + msgstr "\t\t(( EXP3 ))" + + #: builtins.c:1126 + msgid "\tdone" + msgstr "\tdone" + + #: builtins.c:1127 + msgid "EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is" + msgstr "EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is" + + #: builtins.c:1128 + msgid "omitted, it behaves as if it evaluates to 1." + msgstr "omitted, it behaves as if it evaluates to 1." + + #: builtins.c:1134 + msgid "The WORDS are expanded, generating a list of words. The" + msgstr "The WORDS are expanded, generating a list of words. The" + + #: builtins.c:1135 + msgid "set of expanded words is printed on the standard error, each" + msgstr "set of expanded words is printed on the standard error, each" + + #: builtins.c:1136 + msgid "preceded by a number. If `in WORDS' is not present, `in \"$@\"'" + msgstr "" + "preceded by a number. If ‘in WORDS’ is not present, ‘in “$@" + "[0m‒" + + #: builtins.c:1137 + msgid "is assumed. The PS3 prompt is then displayed and a line read" + msgstr "is assumed. The PS3 prompt is then displayed and a line read" + + #: builtins.c:1138 + msgid "from the standard input. If the line consists of the number" + msgstr "from the standard input. If the line consists of the number" + + #: builtins.c:1139 + msgid "corresponding to one of the displayed words, then NAME is set" + msgstr "corresponding to one of the displayed words, then NAME is set" + + #: builtins.c:1140 + msgid "to that word. If the line is empty, WORDS and the prompt are" + msgstr "to that word. If the line is empty, WORDS and the prompt are" + + #: builtins.c:1141 + msgid "redisplayed. If EOF is read, the command completes. Any other" + msgstr "redisplayed. If EOF is read, the command completes. Any other" + + #: builtins.c:1142 + msgid "value read causes NAME to be set to null. The line read is saved" + msgstr "value read causes NAME to be set to null. The line read is saved" + + #: builtins.c:1143 + msgid "in the variable REPLY. COMMANDS are executed after each selection" + msgstr "in the variable REPLY. COMMANDS are executed after each selection" + + #: builtins.c:1144 + msgid "until a break command is executed." + msgstr "until a break command is executed." + + #: builtins.c:1150 + msgid "Execute PIPELINE and print a summary of the real time, user CPU time," + msgstr "Execute PIPELINE and print a summary of the real time, user CPU time," + + #: builtins.c:1151 + msgid "and system CPU time spent executing PIPELINE when it terminates." + msgstr "and system CPU time spent executing PIPELINE when it terminates." + + #: builtins.c:1152 + msgid "The return status is the return status of PIPELINE. The `-p' option" + msgstr "" + "The return status is the return status of PIPELINE. The ‘-p’ option" + + #: builtins.c:1153 + msgid "prints the timing summary in a slightly different format. This uses" + msgstr "prints the timing summary in a slightly different format. This uses" + + #: builtins.c:1154 + msgid "the value of the TIMEFORMAT variable as the output format." + msgstr "the value of the TIMEFORMAT variable as the output format." + + #: builtins.c:1160 + msgid "Selectively execute COMMANDS based upon WORD matching PATTERN. The" + msgstr "Selectively execute COMMANDS based upon WORD matching PATTERN. The" + + #: builtins.c:1161 + msgid "`|' is used to separate multiple patterns." + msgstr "‘|’ is used to separate multiple patterns." + + #: builtins.c:1167 + msgid "" + "The if COMMANDS are executed. If the exit status is zero, then the then" + msgstr "" + "The if COMMANDS are executed. If the exit status is zero, then the then" + + #: builtins.c:1168 + msgid "" + "COMMANDS are executed. Otherwise, each of the elif COMMANDS are executed" + msgstr "" + "COMMANDS are executed. Otherwise, each of the elif COMMANDS are executed" + + #: builtins.c:1169 + msgid "" + "in turn, and if the exit status is zero, the corresponding then COMMANDS" + msgstr "" + "in turn, and if the exit status is zero, the corresponding then COMMANDS" + + #: builtins.c:1170 + msgid "" + "are executed and the if command completes. Otherwise, the else COMMANDS" + msgstr "" + "are executed and the if command completes. Otherwise, the else COMMANDS" + + #: builtins.c:1171 + msgid "" + "are executed, if present. The exit status is the exit status of the last" + msgstr "" + "are executed, if present. The exit status is the exit status of the last" + + #: builtins.c:1172 + msgid "command executed, or zero if no condition tested true." + msgstr "command executed, or zero if no condition tested true." + + #: builtins.c:1178 builtins.c:1185 + msgid "Expand and execute COMMANDS as long as the final command in the" + msgstr "Expand and execute COMMANDS as long as the final command in the" + + #: builtins.c:1179 + msgid "`while' COMMANDS has an exit status of zero." + msgstr "‘while’ COMMANDS has an exit status of zero." + + #: builtins.c:1186 + msgid "`until' COMMANDS has an exit status which is not zero." + msgstr "‘until’ COMMANDS has an exit status which is not zero." + + #: builtins.c:1192 + msgid "Create a simple command invoked by NAME which runs COMMANDS." + msgstr "Create a simple command invoked by NAME which runs COMMANDS." + + #: builtins.c:1193 + msgid "Arguments on the command line along with NAME are passed to the" + msgstr "Arguments on the command line along with NAME are passed to the" + + #: builtins.c:1194 + msgid "function as $0 .. $n." + msgstr "function as $0 .. $n." + + #: builtins.c:1200 + msgid "Run a set of commands in a group. This is one way to redirect an" + msgstr "Run a set of commands in a group. This is one way to redirect an" + + #: builtins.c:1201 + msgid "entire set of commands." + msgstr "entire set of commands." + + #: builtins.c:1207 + msgid "This is similar to the `fg' command. Resume a stopped or background" + msgstr "" + "This is similar to the ‘fg’ command. Resume a stopped or background" + + #: builtins.c:1208 + msgid "job. If you specifiy DIGITS, then that job is used. If you specify" + msgstr "job. If you specifiy DIGITS, then that job is used. If you specify" + + #: builtins.c:1209 + msgid "WORD, then the job whose name begins with WORD is used. Following the" + msgstr "WORD, then the job whose name begins with WORD is used. Following the" + + #: builtins.c:1210 + msgid "job specification with a `&' places the job in the background." + msgstr "job specification with a ‘&’ places the job in the background." + + #: builtins.c:1216 + msgid "The EXPRESSION is evaluated according to the rules for arithmetic" + msgstr "The EXPRESSION is evaluated according to the rules for arithmetic" + + #: builtins.c:1217 + msgid "evaluation. Equivalent to \"let EXPRESSION\"." + msgstr "evaluation. Equivalent to “let EXPRESSIONâ€." + + #: builtins.c:1223 + msgid "" + "Returns a status of 0 or 1 depending on the evaluation of the conditional" + msgstr "" + "Returns a status of 0 or 1 depending on the evaluation of the conditional" + + #: builtins.c:1224 + msgid "" + "expression EXPRESSION. Expressions are composed of the same primaries used" + msgstr "" + "expression EXPRESSION. Expressions are composed of the same primaries used" + + #: builtins.c:1225 + msgid "" + "by the `test' builtin, and may be combined using the following operators" + msgstr "" + "by the ‘test’ builtin, and may be combined using the following " + "operators" + + #: builtins.c:1227 + msgid "\t( EXPRESSION )\tReturns the value of EXPRESSION" + msgstr "\t( EXPRESSION )\tReturns the value of EXPRESSION" + + #: builtins.c:1228 + msgid "\t! EXPRESSION\tTrue if EXPRESSION is false; else false" + msgstr "\t! EXPRESSION\tTrue if EXPRESSION is false; else false" + + #: builtins.c:1229 + msgid "\tEXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false" + msgstr "\tEXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false" + + #: builtins.c:1230 + msgid "\tEXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false" + msgstr "\tEXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false" + + #: builtins.c:1232 + msgid "" + "When the `==' and `!=' operators are used, the string to the right of the" + msgstr "" + "When the ‘==’ and ‘!=’ operators are used, the string to the " + "right of the" + + #: builtins.c:1233 + msgid "operator is used as a pattern and pattern matching is performed. The" + msgstr "operator is used as a pattern and pattern matching is performed. The" + + #: builtins.c:1234 + msgid "&& and || operators do not evaluate EXPR2 if EXPR1 is sufficient to" + msgstr "&& and || operators do not evaluate EXPR2 if EXPR1 is sufficient to" + + #: builtins.c:1235 + msgid "determine the expression's value." + msgstr "determine the expression's value." + + #: builtins.c:1241 + msgid "BASH_VERSION Version information for this Bash." + msgstr "BASH_VERSION Version information for this Bash." + + #: builtins.c:1242 + msgid "CDPATH A colon separated list of directories to search" + msgstr "CDPATH A colon separated list of directories to search" + + #: builtins.c:1243 + msgid "\t\twhen the argument to `cd' is not found in the current" + msgstr "\t\twhen the argument to ‘cd’ is not found in the current" + + #: builtins.c:1244 + msgid "\t\tdirectory." + msgstr "\t\tdirectory." + + #: builtins.c:1245 + msgid "GLOBIGNORE\tA colon-separated list of patterns describing filenames to" + msgstr "GLOBIGNORE\tA colon-separated list of patterns describing filenames to" + + #: builtins.c:1246 + msgid "\t\tbe ignored by pathname expansion." + msgstr "\t\tbe ignored by pathname expansion." + + #: builtins.c:1248 + msgid "" + "HISTFILE The name of the file where your command history is stored." + msgstr "" + "HISTFILE The name of the file where your command history is stored." + + #: builtins.c:1249 + msgid "HISTFILESIZE The maximum number of lines this file can contain." + msgstr "HISTFILESIZE The maximum number of lines this file can contain." + + #: builtins.c:1250 + msgid "HISTSIZE The maximum number of history lines that a running" + msgstr "HISTSIZE The maximum number of history lines that a running" + + #: builtins.c:1251 + msgid "\t\tshell can access." + msgstr "\t\tshell can access." + + #: builtins.c:1253 + msgid "HOME The complete pathname to your login directory." + msgstr "HOME The complete pathname to your login directory." + + #: builtins.c:1254 + msgid "HOSTNAME\tThe name of the current host." + msgstr "HOSTNAME\tThe name of the current host." + + #: builtins.c:1255 + msgid "HOSTTYPE The type of CPU this version of Bash is running under." + msgstr "HOSTTYPE The type of CPU this version of Bash is running under." + + #: builtins.c:1256 + msgid "IGNOREEOF Controls the action of the shell on receipt of an EOF" + msgstr "IGNOREEOF Controls the action of the shell on receipt of an EOF" + + #: builtins.c:1257 + msgid "\t\tcharacter as the sole input. If set, then the value" + msgstr "\t\tcharacter as the sole input. If set, then the value" + + #: builtins.c:1258 + msgid "\t\tof it is the number of EOF characters that can be seen" + msgstr "\t\tof it is the number of EOF characters that can be seen" + + #: builtins.c:1259 + msgid "\t\tin a row on an empty line before the shell will exit" + msgstr "\t\tin a row on an empty line before the shell will exit" + + #: builtins.c:1260 + msgid "\t\t(default 10). When unset, EOF signifies the end of input." + msgstr "\t\t(default 10). When unset, EOF signifies the end of input." + + #: builtins.c:1261 + msgid "MACHTYPE\tA string describing the current system Bash is running on." + msgstr "MACHTYPE\tA string describing the current system Bash is running on." + + #: builtins.c:1262 + msgid "MAILCHECK\tHow often, in seconds, Bash checks for new mail." + msgstr "MAILCHECK\tHow often, in seconds, Bash checks for new mail." + + #: builtins.c:1263 + msgid "MAILPATH\tA colon-separated list of filenames which Bash checks" + msgstr "MAILPATH\tA colon-separated list of filenames which Bash checks" + + #: builtins.c:1264 + msgid "\t\tfor new mail." + msgstr "\t\tfor new mail." + + #: builtins.c:1265 + msgid "OSTYPE\t\tThe version of Unix this version of Bash is running on." + msgstr "OSTYPE\t\tThe version of Unix this version of Bash is running on." + + #: builtins.c:1266 + msgid "PATH A colon-separated list of directories to search when" + msgstr "PATH A colon-separated list of directories to search when" + + #: builtins.c:1267 + msgid "\t\tlooking for commands." + msgstr "\t\tlooking for commands." + + #: builtins.c:1268 + msgid "PROMPT_COMMAND A command to be executed before the printing of each" + msgstr "PROMPT_COMMAND A command to be executed before the printing of each" + + #: builtins.c:1269 + msgid "\t\tprimary prompt." + msgstr "\t\tprimary prompt." + + #: builtins.c:1270 + msgid "PS1 The primary prompt string." + msgstr "PS1 The primary prompt string." + + #: builtins.c:1271 + msgid "PS2 The secondary prompt string." + msgstr "PS2 The secondary prompt string." + + #: builtins.c:1272 + msgid "PWD\t\tThe full pathname of the current directory." + msgstr "PWD\t\tThe full pathname of the current directory." + + #: builtins.c:1273 + msgid "SHELLOPTS\tA colon-separated list of enabled shell options." + msgstr "SHELLOPTS\tA colon-separated list of enabled shell options." + + #: builtins.c:1274 + msgid "TERM The name of the current terminal type." + msgstr "TERM The name of the current terminal type." + + #: builtins.c:1275 + msgid "TIMEFORMAT\tThe output format for timing statistics displayed by the" + msgstr "TIMEFORMAT\tThe output format for timing statistics displayed by the" + + #: builtins.c:1276 + msgid "\t\t`time' reserved word." + msgstr "\t\t‘time’ reserved word." + + #: builtins.c:1277 + msgid "auto_resume Non-null means a command word appearing on a line by" + msgstr "auto_resume Non-null means a command word appearing on a line by" + + #: builtins.c:1278 + msgid "\t\titself is first looked for in the list of currently" + msgstr "\t\titself is first looked for in the list of currently" + + #: builtins.c:1279 + msgid "\t\tstopped jobs. If found there, that job is foregrounded." + msgstr "\t\tstopped jobs. If found there, that job is foregrounded." + + #: builtins.c:1280 + msgid "\t\tA value of `exact' means that the command word must" + msgstr "\t\tA value of ‘exact’ means that the command word must" + + #: builtins.c:1281 + msgid "\t\texactly match a command in the list of stopped jobs. A" + msgstr "\t\texactly match a command in the list of stopped jobs. A" + + #: builtins.c:1282 + msgid "\t\tvalue of `substring' means that the command word must" + msgstr "\t\tvalue of ‘substring’ means that the command word must" + + #: builtins.c:1283 + msgid "\t\tmatch a substring of the job. Any other value means that" + msgstr "\t\tmatch a substring of the job. Any other value means that" + + #: builtins.c:1284 + msgid "\t\tthe command must be a prefix of a stopped job." + msgstr "\t\tthe command must be a prefix of a stopped job." + + #: builtins.c:1287 + msgid "histchars Characters controlling history expansion and quick" + msgstr "histchars Characters controlling history expansion and quick" + + #: builtins.c:1288 + msgid "\t\tsubstitution. The first character is the history" + msgstr "\t\tsubstitution. The first character is the history" + + #: builtins.c:1289 + msgid "\t\tsubstitution character, usually `!'. The second is" + msgstr "\t\tsubstitution character, usually ‘!’. The second is" + + #: builtins.c:1290 + msgid "\t\tthe `quick substitution' character, usually `^'. The" + msgstr "\t\tthe ‘quick substitution’ character, usually ‘^’. The" + + #: builtins.c:1291 + msgid "\t\tthird is the `history comment' character, usually `#'." + msgstr "\t\tthird is the ‘history comment’ character, usually ‘#’." + + #: builtins.c:1293 + msgid "HISTIGNORE\tA colon-separated list of patterns used to decide which" + msgstr "HISTIGNORE\tA colon-separated list of patterns used to decide which" + + #: builtins.c:1294 + msgid "\t\tcommands should be saved on the history list." + msgstr "\t\tcommands should be saved on the history list." + + #: builtins.c:1306 + msgid "+N\tRotates the stack so that the Nth directory (counting" + msgstr "+N\tRotates the stack so that the Nth directory (counting" + + #: builtins.c:1307 + msgid "\tfrom the left of the list shown by `dirs', starting with" + msgstr "\tfrom the left of the list shown by ‘dirs’, starting with" + + #: builtins.c:1308 builtins.c:1312 + msgid "\tzero) is at the top." + msgstr "\tzero) is at the top." + + #: builtins.c:1310 + msgid "-N\tRotates the stack so that the Nth directory (counting" + msgstr "-N\tRotates the stack so that the Nth directory (counting" + + #: builtins.c:1311 + msgid "\tfrom the right of the list shown by `dirs', starting with" + msgstr "\tfrom the right of the list shown by ‘dirs’, starting with" + + #: builtins.c:1314 + msgid "-n\tsuppress the normal change of directory when adding directories" + msgstr "-n\tsuppress the normal change of directory when adding directories" + + #: builtins.c:1315 + msgid "\tto the stack, so only the stack is manipulated." + msgstr "\tto the stack, so only the stack is manipulated." + + #: builtins.c:1317 + msgid "dir\tadds DIR to the directory stack at the top, making it the" + msgstr "dir\tadds DIR to the directory stack at the top, making it the" + + #: builtins.c:1318 + msgid "\tnew current working directory." + msgstr "\tnew current working directory." + + #: builtins.c:1332 + msgid "+N\tremoves the Nth entry counting from the left of the list" + msgstr "+N\tremoves the Nth entry counting from the left of the list" + + #: builtins.c:1333 + msgid "\tshown by `dirs', starting with zero. For example: `popd +0'" + msgstr "" + "\tshown by ‘dirs’, starting with zero. For example: ‘popd +0’" + + #: builtins.c:1334 + msgid "\tremoves the first directory, `popd +1' the second." + msgstr "\tremoves the first directory, ‘popd +1’ the second." + + #: builtins.c:1336 + msgid "-N\tremoves the Nth entry counting from the right of the list" + msgstr "-N\tremoves the Nth entry counting from the right of the list" + + #: builtins.c:1337 + msgid "\tshown by `dirs', starting with zero. For example: `popd -0'" + msgstr "" + "\tshown by ‘dirs’, starting with zero. For example: ‘popd -0’" + + #: builtins.c:1338 + msgid "\tremoves the last directory, `popd -1' the next to last." + msgstr "\tremoves the last directory, ‘popd -1’ the next to last." + + #: builtins.c:1340 + msgid "-n\tsuppress the normal change of directory when removing directories" + msgstr "-n\tsuppress the normal change of directory when removing directories" + + #: builtins.c:1341 + msgid "\tfrom the stack, so only the stack is manipulated." + msgstr "\tfrom the stack, so only the stack is manipulated." + + #: builtins.c:1363 + msgid "+N\tdisplays the Nth entry counting from the left of the list shown by" + msgstr "+N\tdisplays the Nth entry counting from the left of the list shown by" + + #: builtins.c:1364 builtins.c:1367 + msgid "\tdirs when invoked without options, starting with zero." + msgstr "\tdirs when invoked without options, starting with zero." + + #: builtins.c:1366 + msgid "-N\tdisplays the Nth entry counting from the right of the list shown by" + msgstr "" + "-N\tdisplays the Nth entry counting from the right of the list shown by" + + #: builtins.c:1374 + msgid "Toggle the values of variables controlling optional behavior." + msgstr "Toggle the values of variables controlling optional behavior." + + #: builtins.c:1375 + msgid "The -s flag means to enable (set) each OPTNAME; the -u flag" + msgstr "The -s flag means to enable (set) each OPTNAME; the -u flag" + + #: builtins.c:1376 + msgid "unsets each OPTNAME. The -q flag suppresses output; the exit" + msgstr "unsets each OPTNAME. The -q flag suppresses output; the exit" + + #: builtins.c:1377 + msgid "status indicates whether each OPTNAME is set or unset. The -o" + msgstr "status indicates whether each OPTNAME is set or unset. The -o" + + #: builtins.c:1378 + msgid "option restricts the OPTNAMEs to those defined for use with" + msgstr "option restricts the OPTNAMEs to those defined for use with" + + #: builtins.c:1379 + msgid "`set -o'. With no options, or with the -p option, a list of all" + msgstr "‘set -o’. With no options, or with the -p option, a list of all" + + #: builtins.c:1380 + msgid "settable options is displayed, with an indication of whether or" + msgstr "settable options is displayed, with an indication of whether or" + + #: builtins.c:1381 + msgid "not each is set." + msgstr "not each is set." + + #: builtins.c:1387 + msgid "printf formats and prints ARGUMENTS under control of the FORMAT. FORMAT" + msgstr "" + "printf formats and prints ARGUMENTS under control of the FORMAT. FORMAT" + + #: builtins.c:1388 + msgid "is a character string which contains three types of objects: plain" + msgstr "is a character string which contains three types of objects: plain" + + #: builtins.c:1389 + msgid "" + "characters, which are simply copied to standard output, character escape" + msgstr "" + "characters, which are simply copied to standard output, character escape" + + #: builtins.c:1390 + msgid "sequences which are converted and copied to the standard output, and" + msgstr "sequences which are converted and copied to the standard output, and" + + #: builtins.c:1391 + msgid "" + "format specifications, each of which causes printing of the next successive" + msgstr "" + "format specifications, each of which causes printing of the next successive" + + #: builtins.c:1392 + msgid "argument. In addition to the standard printf(1) formats, %b means to" + msgstr "argument. In addition to the standard printf(1) formats, %b means to" + + #: builtins.c:1393 + msgid "expand backslash escape sequences in the corresponding argument, and %q" + msgstr "" + "expand backslash escape sequences in the corresponding argument, and %q" + + #: builtins.c:1394 + msgid "means to quote the argument in a way that can be reused as shell input." + msgstr "" + "means to quote the argument in a way that can be reused as shell input." + + #: builtins.c:1401 + msgid "For each NAME, specify how arguments are to be completed." + msgstr "For each NAME, specify how arguments are to be completed." + + #: builtins.c:1402 + msgid "If the -p option is supplied, or if no options are supplied, existing" + msgstr "If the -p option is supplied, or if no options are supplied, existing" + + #: builtins.c:1403 + msgid "completion specifications are printed in a way that allows them to be" + msgstr "completion specifications are printed in a way that allows them to be" + + #: builtins.c:1404 + msgid "reused as input. The -r option removes a completion specification for" + msgstr "reused as input. The -r option removes a completion specification for" + + #: builtins.c:1405 + msgid "each NAME, or, if no NAMEs are supplied, all completion specifications." + msgstr "" + "each NAME, or, if no NAMEs are supplied, all completion specifications." + + #: builtins.c:1413 + msgid "Display the possible completions depending on the options. Intended" + msgstr "Display the possible completions depending on the options. Intended" + + #: builtins.c:1414 + msgid "" + "to be used from within a shell function generating possible completions." + msgstr "" + "to be used from within a shell function generating possible completions." + + #: builtins.c:1415 + msgid "If the optional WORD argument is supplied, matches against WORD are" + msgstr "If the optional WORD argument is supplied, matches against WORD are" + + #: builtins.c:1416 + msgid "generated." + msgstr "generated." diff -aNrc2 bash-2.05b-patched/po/en@quot.gmo bash-3.0/po/en@quot.gmo *** bash-2.05b-patched/po/en@quot.gmo Wed Dec 31 19:00:00 1969 --- bash-3.0/po/en@quot.gmo Tue Jun 29 10:47:40 2004 *************** *** 0 **** --- 1,119 ---- + Þ•Ðœ=pQ*qQœQ³Q ËQ<ØQ5R + KRVR#nR6’R/ÉR ùR9S@S6PS5‡S½S;ÕS8TJT\T:pT5«T3áT7U0MU8~U7·U7ïU5'V#]VV‘V¢V/¹V éVõV- W17WiW†W™W¬W;ÅW&X(XAXQXAoXA±XóX YY 'Y5Y SY aY4nY£Y·YÊYÛYëY7 ZCZIZ9]Z:—Z2ÒZ3[9[3Y[8[=Æ[=\0B\s\‰\Ÿ\®\$¾\Iã\+-]FY]L ]Ií](7^A`^I¢^;ì^%(_/N_)~_I¨_Jò_1=`5o`&¥`#Ì`#ð`Ba#Wa#{a#Ÿa#Ãa#ça/ bA;b }b#žb#Âb#æb# + c#.c7Rc#Šc#®c#Òc#öcHdFcd#ªd#Îd>òd#1eCUe6™eÐe!äe>fHEf.Žf6½fôf;g=?g>}g6¼g#óg7h<OhAŒhAÎh4iEi)_i.‰iA¸i=úiG8j$€j=¥j3ãjMk@ekD¦k$ëk,l?=l&}l@¤l'ål. m1Xq—qªqHÆq0r3@rtr8’r0Ër5ür62s+is<•s3Òs!t1(t7Zt@’t9Ót+ u99u9su/­uÝuôu + v v<6vIsv*½v#èvK wGXw6 wK×w3#x(Wx-€x5®x/äx-yHByF‹yFÒyz35zKiz-µzKãzF/{v{B{9Ó{B |5P|†|¥|º|Ú| ñ|û| }$};}R}e}ƒ}“}§}¿}Ö}(í}"~9~N~&k~&’~¹~Ï~.å~3Jc"±Ôèù€/-€]€s€-†€´€Ê€ç€ø€2)Jt¢µÍá ÿ! ‚B‚ U‚v‚‚©‚É‚Ü‚ì‚ÿ‚ƒ.ƒHƒ cƒqƒƒ&¯ƒÖƒôƒ + „ „&/„3V„Š„§„Ä Ø„Cæ„8*…Ec…;©…:å…G †=h†8¦†F߆<&‡:c‡Hž‡>ç‡D&ˆBkˆD®ˆDóˆF8‰C‰GÉH Š9TŠ#ŽŠ²Š@ÉŠC + ‹BN‹0‘‹ ‹>΋> Œ?LŒDŒŒ2ÑŒ=HB?‹IËEŽ?[Ž2›Ž>ÎŽ< ?JBŠ>ÍB DOF”AÛB‘7`‘ ˜‘;¦‘Eâ‘@(’Di’9®’?è’(“E>“„“@”“DÕ“9”AT”E–”Ü”Cï”C3•Jw•B•B–BH–>‹– Ê–&×–Fþ–E—EU—F›—>â—@!˜Ab˜5¤˜AÚ˜E™Nb™C±™Fõ™F<šHƒšBÌšE›AU›A—›FÙ›@ œ<aœCžœBâœA%Dg¬CÅ: ž>DžDƒžCÈž; ŸAHŸCŠŸΟCÝŸ=! ?_ Ÿ K¹ C¡I¡BZ¡B¡=à¡I¢Dh¢D­¢*ò¢,£0J£@{£B¼£Bÿ£DB¤E‡¤BͤJ¥=[¥D™¥Þ¥ú¥I¦3c¦A—¦>Ù¦E§:^§I™§Cã§E'¨Cm¨@±¨!ò¨"©7©BG©Š©?œ©6Ü©Cª*WªG‚ª2ʪGýª-E«Es«;¹«Kõ«AA¬8ƒ¬C¼¬B­C­ER­H˜­8á­®F8®D®FÄ®F ¯R¯Ok¯6»°Dò°=7±Bu±E¸±Aþ± @²XN²§²*Ų?ð²E0³Dv³F»³E´BH´I‹´?Õ´<µFRµ8™µÒµæµþµ¶%/¶$U¶z¶Ž¶§¶Á¶!භ·C;· ·Œ·E£·'é·?¸FQ¸-˜¸@ƸL¹6T¹,‹¹*¸¹Bã¹@&ºgº=ºE½º0»94» n»?x»A¸»@ú»@;¼@|¼D½¼<½?½<]½Hš½Iã½C-¾?q¾±¾º¾9̾E¿FL¿E“¿EÙ¿$ÀDDÀ1‰ÀF»ÀÁÁ 'Á5Á'>Á9fÁ  ÁD­ÁJòÁ2=Â%pÂ#–ºÂÊÂãÂ@úÂ#;Ã?_ÃFŸÃHæÃ*/Ä3ZÄŽÄ>­Ä=ìÄ-*ÅXÅ'xÅ& Å*ÇÅ*òÅ)Æ)GÆ%qÆ%—Æ ½Æ1ÞÆ1Ç5BÇxLJÇ!¤Ç!ÆÇ$èÇC ÈFQÈD˜ÈHÝÈ@&É6gÉ žÉ?¬É1ìÉEÊ#dÊ$ˆÊC­Ê=ñÊE/Ë#uË'™ËEÁË&Ì=.Ì.lÌK›ÌçÌ!Í=(Í>fÍA¥Í çÍ@õÍ6ÎGTÎCœÎKàÎ,Ï,DÏ,qÏGžÏ æÏóÏKÐTÐ#hÐBŒÐIÏÐÑC6ÑzÑB•ÑBØÑAÒ4]ÒF’ÒKÙÒ.%Ó,TÓ&Ó0¨ÓÙÓCßÓ:#Ô<^Ô?›ÔÛÔDñÔ=6Õ7tÕ + ¬Õ(·Õ<àÕBÖC`Ö¤ÖBµÖBøÖE;××’×8¨×=á×DØBdØH§Ø?ðØ?0ÙHpÙF¹ÙÚ Ú(%ÚNÚ]ÚBsÚ=¶ÚBôÚL7ÛC„Û@ÈÛ: Ü?DÜ8„ÜB½Ü@Ý%AÝNgÝ"¶Ý ÙÝ>æÝD%ÞIjÞ ´ÞÁÞEÓÞßD9ßG~ßDÆß@ à+Là9xà;²à îà$á4áRáDnáG³á ûá ââ2,â + _âAjâ ¬âÍâèâþâHãXãgã „ã‘ã"¤ãDÇã ä!ä?äE[ä ¡äA®ä;ðäE,åKrå,¾åDëå40æEeæC«æGïæ.7çJfçF±çAøç;:èFvèH½èé; é + \é?gé?§éçéDê?Eê,…ê>²êEñê@7ë!xëšë@£ëEäëG*ì:rìD­ìAòì4í + Jí Uí"aí8„í½í/Ðí)î3*î^î&xî?Ÿî2ßî5ï,HïBuï=¸ïöïBð?Kð@‹ð + ÌðA×ðñ=(ñFfñ ­ñ1ºñIìñD6ò4{òE°òBöòD9ó<~óE»ó@ô?Bô<‚ôA¿ô)õB+õAnõ?°õ ðõBüõ>?ö"~öC¡öAåö@'÷@h÷>©÷?è÷(ø;0øClø=°ø îø&ûø="ù`ù{ù'’ùºùÑù,îùú$:ú_ú + zúB…úHÈú>ûEPû>–ûÕû@ðûA1üsüA‡üKÉüDýCZýCžýCâý=&þ@dþ¥þA·þKùþHEÿ + ŽÿB™ÿBÜÿ>:^@™?Ú"@=B~>ÁHHYE¢=èK&Ar=´òC0@t&µ%Ü.-17_6—2Î1*3,^,‹;¸#ôA.=p"®KÑCaAg©CÂE EL >’ *Ñ "ü  + -? + -m + 1› + 4Í +  ? IZ ¤ ¸ )È ?ò "2 8U *Ž B¹ #ü ; F\ <£ =à _*~©À Ø<å9" + \g#ƒ6§/Þ 9U6e5œÒ;ê8&_q:…9À3ú?.0n@Ÿ;à;5X#Ž²ÂÓ/ê &-:1hš·ÊÝ;ö&2Yr‚A Aâ$ 9G Xf „ ’4ŸÔèû 7<tz=Ž>Ì2 3>r7’<ÊEEM0“ÄÚðÿ$I4+~FªLñI>(ˆA±Ió;=%y/Ÿ)ÏIùJC1Ž5À&ö##ABe#¨#Ì#ð# #8 /\ AŒ  Î #ï #!#7!#[!#!7£!#Û!#ÿ!##"#G"Hk"F´"#û"##>C##‚#C¦#6ê#!$!5$>W$H–$.ß$6%E%;T%A%BÒ%6&#L&;p&@¬&Ií&I7'4'¶')Ð'.ú'A)(=k(G©((ñ(=)3X)MŒ)@Ú)D*(`*,‰*?¶*&ö*@+'^+.†+1µ+-ç+5,3K,/,C¯,'ó,5-0Q-=‚-0À-@ñ-32.Df.=«.6é.$ /E/2e/.˜/ Ç/>Õ/0'0HC00Œ03½0ñ0810H15y16¯1+æ1<23O2!ƒ21¥27×2@39P3+Š39¶39ð3/*4Z4q4‡44<³4Ið4*:5#e5K‰5GÕ566KT63 6(Ô6-ý65+73a7-•7LÃ7F8FW8ž83º8Kî81:9Kl9F¸9ÿ9B:9\:B–:5Ù:;.;C;c; z;„;–;­;Ä;ß;ò;< <4<L<c<(z<"£<Æ<Û<&ø<&=F=\=.r=¡=À=×=ð= >*>">>a>u>†>¤>/º>ê>?1?E?[?x?‰?£?Ã?)Û?@ @3@F@^@r@ @!±@Ó@ æ@AA:AZAmA}AA§A¿AÙA ôAB B&@BgB…B›B±B&ÀB7çBCD:zDGµD=ýD8;EFtE<»E:øEH3F>|FD»FBGDCGDˆGFÍGCHGXHH H9éH##IGI@^IGŸIBçI0*J [J>gJB¦J?éJD)K2nK=¡KHßK?(LIhLE²L?øL28M>kM<ªM?çMB'N>jNB©NDìNF1OAxOBºO7ýO 5P;CPEP@ÅPDQ9KQ?…QÅQEÛQ!R@1RDrR9·RAñRE3SySCŒSCÐSJTB_TB¢TBåT>(U gU&tUF›UâUEòUF8V>V@¾VAÿV5AWEwWE½WNXCRXF–XJÝXH(YFqYE¸YAþYA@ZJ‚Z@ÍZ<[CK[B[AÒ[D\Y\Cr\:¶\>ñ\D0]Gu];½]Aù]C;^^CŽ^=Ò^?_P_Kn_Cº_þ_B`BR`=•`IÓ`DaDba*§a,Òa0ÿa@0bBqbB´bD÷bEŽeEÍe:fINfC˜fIÜfC&g@jg!«g"ÍgðgBhCh?Uh6•hCÌh.iG?i2‡iGºi-jI0j;zjK¶jAk8DkG}kBÅklElH]l8¦lßlFýlHDmFmFÔmng4n:œoH×o= pJ^pI©pAóp 5qXCq!œq.¾q?íqM-rD{rFÀrEsBMsQsCâs@&tFgt<®tëtÿtu"-u)Pu(zu£u»uØu"öu%v ?v`vG€vÈvÙvMôv+BwCnw^²w1xDCxPˆx:Ùx0y.EyBty@·yøy=zENz0”z9Åz ÿzC {EM{@“{@Ô{@|DV|<›|Ø|@ö|H7}I€}CÊ}?~N~W~Ai~E«~Jñ~E<E‚$ÈDí52€Fh€¯€À Ô€â€+ë€9 QD^J£2î)!‚#K‚o‚‚˜‚@¯‚#ð‚?ƒFTƒL›ƒ*èƒ7„K„>j„=©„-ç„…'5…&]…*„…*¯…)Ú…)†%.†%T† z†1›†1͆5ÿ†5‡D‡%a‡!‡‡$©‡G·FˆD]ˆH¢ˆDëˆ60‰ g‰Cu‰1¹‰Eë‰'1Š$YŠC~Š=ŠE‹#F‹+j‹I–‹&à‹=Œ.EŒKtŒÀŒ!ߌ=>?A~ À@ÎŽG-ŽCuŽK¹Ž00NGÇØKí9#MBqI´þG‘c‘F~‘BÅ‘A’4J’F’KÆ’.“,A“&n“0•“Æ“GÌ“:”<O”?Œ”Ì”Lâ”=/•7m• + ¥•(°•<Ù•B–CY––B®–Bñ–E4—z—‹—8¡—=Ú—D˜B]˜H ˜?é˜?)™Hi™F²™ù™ š(šGšVšBlš=¯šBíšL0›C}›@Á›:œ?=œ<}œBºœDýœ%BNh"· ÚBçD*žIož ¹žÆžEØžŸP>ŸGŸHן@  +a 9 ?Ç  ¡$(¡M¡k¡D‡¡GÌ¡¢$¢4¢2M¢ + €¢A‹¢ Í¢î¢ £'£X8£‘£ £ ½£Ê£&Ý£D¤I¤!Z¤|¤Eœ¤ â¤Aï¤;1¥Em¥K³¥,ÿ¥H,¦@u¦E¶¦Cü¦G@§.ˆ§J·§F¨AI¨;‹¨JǨH©[©;u© + ±©?¼©?ü©<ªDUª?šª,ÚªJ«ER«@˜«%Ù«ÿ«D¬EM¬G“¬:Û¬D­A[­­ + ³­ ¾­"Ê­8í­&®/9®)i®3“®Ç®&á®?¯2H¯5{¯,±¯BÞ¯=!°_°Fq°?¸°@ø° + 9±AD±†±A™±FÛ± "²1/²Ia²L«²4ø²I-³Bw³Dº³<ÿ³E<´@‚´?ô<µA@µ)‚µF¬µAóµC5¶ y¶B…¶Bȶ" ·G.·Av·@¸·@ù·>:¸?y¸¹¸;Á¸Cý¸=A¹ ¹&Œ¹A³¹õ¹º++ºWº rº,“ºÀº$ߺ» + »J*»Hu»>¾»Eý»>C¼‚¼D¼Iâ¼,½E@½K†½DÒ½C¾G[¾C£¾=ç¾D%¿j¿A|¿K¾¿H + À + SÀB^ÀN¡À>ðÀ:/Á@jÁ?«Á"ëÁDÂBSÂ>–ÂÕÂHåÂH.ÃEwÃ=½ÃKûÃAGÄA‰ÄËÄÞÄíÄC Å@MÅ&ŽÅ)µÅ2ßÅ1Æ;DÆ:€Æ2»Æ1îÆ* Ç0KÇ0|Ç?­Ç+íÇÈA/È=qÈ"¯ÈKÒÈGÉfÉAlÉ®ÉCÇÉI ÊEUÊB›Ê*ÞÊ" Ë,Ë-LË-zË1¨Ë4ÚËÌC+ÌIo̹ÌÍÌ)ÝÌ?Í"GÍ8jÍ*£ÍBÎÍ#Î;5ÎFqÎ<¸ÎAõÎ÷LZNÈ'dc¹&žeI8;li’OôØ~6Ìí|U±Sa­QQp±øø—ÚŸ<qaºpô<­ïSTÉ΃% ÝÁÍ:©f½µ’ÑÔ¦G(k“Œ}y¯•KóP-Ex5ö_I©>e>%Ç!™bõãÜü¥Vßp&YÔRÆL £ÿVý¦?ÛÝ mj^K¤¥ÏÐÒH@"½îçìh8Mæ)Ã_Ekž°3¹(6·•ƒ¹xª®Ù=é«8€yùË¿1§êåwW¦«[ÆÑ =¨]w"_/µ™Þ™oà—vêÀWŸï¾ÀˆHûdau•|*-iô‘QFÀr€ÀX?Ï‹Ø”‡¥:ۖž]2£2ñbŸÕB§†ð…Qýð ‚š¢a â#çX€­r$0©ZéüÎCv”¬Û«Ê-èñÈOðÁœkPTv{w¨ „ÌWVŸ5ÎN q˜Æìàĺn0ŠÉg4UC`É¿º‘¬@¶Oh:¤\¡¬z„B³¾Â›o æ;Fsä–Hl"h+Ç¨Ý + Ž%˜Ó[2¶BÏ^äœÒpsÎ:¿ú,u…##Mн&³*N¶$ + ý!Ü ÿ*‰Zói0Ó1®}BÅûuÍI$0`—Þu?+Ž9Á|3êÈÕt'ãi³\÷4A’t7{ÅÿŠ°DƒÞV̸ €ßx(‚J‘·‹nyö‡ƒM†wM§“ÏþD`AZFŶ »4~놘6Ì9ç×%õ<雯>E ­)Y]ׄ7ë]L¢½f‰R.'q¸o†Õ¡ËͤEŒ²®ùÒåÇ=«–yn¢|–LŠ¯4OÁ9CU¸AX\d´›ÄüÑû‡¼þRá 3¤}rX쑼q´‡åmäv{´°`.bd)RšÅGfÖhÚî·“™ò5± ~Žáˆ/'·Â.W/¢$íº!ÉŒU͉¾»s˸KËG{íöPc—¡&æx”.Tî…Tz¿Gʦbⵂø1Œsl°kÄÕˆ+¹"mz;,6‚g£Dד1”YÙ2š^ï’¡7-DÐ\áâª[„²zñecÇÊÖ»f@ÄÙ,Jèˆtù*±¯¼_ßÜ +3¥²ú7Jë[Y »Ã®oŽœ(…8}ªe5©¼´;^ÖªF  + g³9rg ¬ š÷ œJòõ#~µ‹t),!ÐcSúÓó¨Èl›²> Nò˜nÔ=jmÆ£@A  KþCèÊŠã + HžÃ§j‹<P/ØSÚI‰?¾àjtimed out waiting for input: auto-logout + KEYSEQ is entered. conditional operator (( EXP3 )) (default 10). When unset, EOF signifies the end of input. A value of `exact' means that the command word must COMMANDS `time' reserved word. be ignored by pathname expansion. character as the sole input. If set, then the value commands should be saved on the history list. directory. exactly match a command in the list of stopped jobs. A for new mail. in a row on an empty line before the shell will exit itself is first looked for in the list of currently looking for commands. match a substring of the job. Any other value means that of it is the number of EOF characters that can be seen primary prompt. shell can access. stopped jobs. If found there, that job is foregrounded. substitution character, usually `!'. The second is substitution. The first character is the history the `quick substitution' character, usually `^'. The the command must be a prefix of a stopped job. third is the `history comment' character, usually `#'. value of `substring' means that the command word must when the argument to `cd' is not found in the current ! EXPRESSION True if EXPRESSION is false; else false !, ~ logical and bitwise negation & bitwise AND && logical AND &=, ^=, |= assignment ( EXPRESSION ) Returns the value of EXPRESSION (( EXP1 )) ** exponentiation *, /, % multiplication, division, remainder ++id, --id variable pre-increment, pre-decrement +, - addition, subtraction +=, -=, <<=, >>=, -%s or -o option + -, + unary minus, plus -irsD or -c command or -O shopt_option (invocation only) + <<, >> left and right bitwise shifts <=, >=, <, > comparison =, *=, /=, %=, ==, != equality, inequality EXPR1 && EXPR2 True if both EXPR1 and EXPR2 are true; else false EXPR1 || EXPR2 True if either EXPR1 or EXPR2 is true; else false \E escape character \\ backslash \a alert (bell) \b backspace \c suppress trailing newline \f form feed \n new line \num the character whose ASCII code is NUM (octal). \r carriage return \t horizontal tab \v vertical tab ^ bitwise XOR debugging) without definitions dirs when invoked without options, starting with zero. done expr ? expr : expr from the left of the list shown by `dirs', starting with from the right of the list shown by `dirs', starting with from the stack, so only the stack is manipulated. id++, id-- variable post-increment, post-decrement new current working directory. removes the first directory, `popd +1' the second. removes the last directory, `popd -1' the next to last. shown by `dirs', starting with zero. For example: `popd +0' shown by `dirs', starting with zero. For example: `popd -0' to the stack, so only the stack is manipulated. while (( EXP2 )); do zero) is at the top. | bitwise OR || logical OR + malloc: %s:%d: assertion botched + allow comments to appear in interactive commands match the standard operation differs from the 1003.2 standard to or zero if no command exited with a non-zero status the last command to exit with a non-zero status, be reused as input. command. Acceptable keymap names are emacs, emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move, in a form that can be reused as input. reused as input. vi-command, and vi-insert. -lt, -le, -gt, or -ge. True if STRING1 sorts after STRING2 lexicographically. True if STRING1 sorts before STRING2 lexicographically. True if the strings are equal. True if the strings are not equal. modification date). allexport same as -a braceexpand same as -B emacs use an emacs-style line editing interface errexit same as -e errtrace same as -E functrace same as -T hashall same as -h histexpand same as -H history enable command history ignoreeof the shell will not exit upon reading EOF interactive-comments keyword same as -k monitor same as -m noclobber same as -C noexec same as -n noglob same as -f nolog currently accepted but ignored notify same as -b nounset same as -u onecmd same as -t physical same as -P pipefail the return value of a pipeline is the status of posix change the behavior of bash where the default privileged same as -p verbose same as -v vi use a vi-style line editing interface xtrace same as -x Disables processing of the $ENV file and importing of shell Set the variable corresponding to option-name: by default. by redirection of output. command, not just those that precede the command name. functions. Turning this option off causes the effective uid and gid to be set to the real uid and gid. such as cd which change the current directory. then vi. dirs when invoked without options, starting with zero. from the left of the list shown by `dirs', starting with from the right of the list shown by `dirs', starting with from the stack, so only the stack is manipulated. new current working directory. removes the first directory, `popd +1' the second. removes the last directory, `popd -1' the next to last. shown by `dirs', starting with zero. For example: `popd +0' shown by `dirs', starting with zero. For example: `popd -0' to the stack, so only the stack is manipulated. zero) is at the top. ! EXPR True if expr is false. -B the shell will perform brace expansion -C If set, disallow existing regular files to be overwritten -E If set, the ERR trap is inherited by shell functions. -G FILE True if the file is effectively owned by your group. -H use the `hard' resource limit -H Enable ! style history substitution. This flag is on -L FILE True if file is a symbolic link. -N FILE True if the file has been modified since it was last read. -O FILE True if the file is effectively owned by you. -P If set, do not follow symbolic links when executing commands -S use the `soft' resource limit -S FILE True if file is a socket. -T If set, the DEBUG trap is inherited by shell functions. -a all current limits are reported -a Mark variables which are modified or created for export. -a FILE True if file exists. -b Notify of job termination immediately. -b FILE True if file is block special. -c the maximum size of core files created -c FILE True if file is character special. -d the maximum size of a process's data segment -d FILE True if file is a directory. -e Exit immediately if a command exits with a non-zero status. -e FILE True if file exists. -f the maximum size of files created by the shell -f Disable file name generation (globbing). -f FILE True if file exists and is a regular file. -g FILE True if file is set-group-id. -h Remember the location of commands as they are looked up. -h FILE True if file is a symbolic link. -k All assignment arguments are placed in the environment for a -k FILE True if file has its `sticky' bit set. -l the maximum size a process may lock into memory -m the maximum resident set size -m Job control is enabled. -n the maximum number of open file descriptors -n Read commands but do not execute them. -n STRING -o OPTION True if the shell option OPTION is enabled. -o option-name -p the pipe buffer size -p Turned on whenever the real and effective user ids do not match. -p FILE True if file is a named pipe. -r FILE True if file is readable by you. -s the maximum stack size -s FILE True if file exists and is not empty. -t the maximum amount of cpu time in seconds -t Exit after reading and executing one command. -t FD True if FD is opened on a terminal. -u the maximum number of user processes -u Treat unset variables as an error when substituting. -u FILE True if the file is set-user-id. -v the size of virtual memory -v Print shell input lines as they are read. -w FILE True if the file is writable by you. -x Print commands and their arguments as they are executed. -x FILE True if the file is executable by you. -z STRING True if string is empty. EXPR1 -a EXPR2 True if both expr1 AND expr2 are true. EXPR1 -o EXPR2 True if either expr1 OR expr2 is true. STRING True if string is not empty. STRING1 != STRING2 STRING1 < STRING2 STRING1 = STRING2 STRING1 > STRING2 arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne, -e ENAME selects which editor to use. Default is FCEDIT, then EDITOR, -l means list lines instead of editing. -n means no line numbers listed. -r means reverse the order of the lines (making it newest listed first). -F to display function names (and line number and source file name if -P List function names and bindings. -S List key sequences that invoke macros and their values -V List variable names and values -a to make NAMEs arrays (if supported) -f to select from among function names only -f filename Read key bindings from FILENAME. -i to make NAMEs have the `integer' attribute -l List names of functions. -m keymap Use `keymap' as the keymap for the duration of this -p List functions and bindings in a form that can be -q function-name Query about which keys invoke the named function. -r to make NAMEs readonly -r keyseq Remove the binding for KEYSEQ. -s List key sequences that invoke macros and their values -t to make NAMEs have the `trace' attribute -u function-name Unbind all keys which are bound to the named function. -v List variable names and values in a form that can -x to make NAMEs export -x keyseq:shell-command Cause SHELL-COMMAND to be executed when FILE1 -ef FILE2 True if file1 is a hard link to file2. FILE1 -nt FILE2 True if file1 is newer than file2 (according to FILE1 -ot FILE2 True if file1 is older than file2.$%s: cannot assign in this way%c%c: invalid option%d: invalid file descriptor: %s%s can be invoked via %s is %s + %s is a function + %s is a shell builtin + %s is a shell keyword + %s is aliased to `%s' + %s is hashed (%s) + %s is not bound to any keys. + %s out of range%s: %s out of range%s: %s: bad interpreter%s: ambiguous job spec%s: ambiguous redirect%s: arguments must be process or job IDs%s: bad network path specification%s: bad substitution%s: binary operator expected%s: cannot assign list to array member%s: cannot assign to non-numeric index%s: cannot create: %s%s: cannot delete: %s%s: cannot destroy array variables in this way%s: cannot execute binary file%s: cannot execute: %s%s: cannot get limit: %s%s: cannot modify limit: %s%s: cannot open temp file: %s%s: cannot open: %s%s: cannot overwrite existing file%s: cannot read: %s%s: cannot unset%s: cannot unset: readonly %s%s: command not found%s: error retrieving current directory: %s: %s + %s: file is too large%s: file not found%s: first non-whitespace character is not `"'%s: hash table empty + %s: history expansion failed%s: host unknown%s: illegal option -- %c + %s: integer expression expected%s: invalid action name%s: invalid file descriptor specification%s: invalid limit argument%s: invalid number%s: invalid option%s: invalid option name%s: invalid service%s: invalid shell option name%s: invalid signal specification%s: invalid timeout specification%s: is a directory%s: job %d already in background%s: job has terminated%s: missing colon separator%s: no completion specification%s: no job control%s: no such job%s: not a function%s: not a regular file%s: not a shell builtin%s: not an array variable%s: not dynamically loaded%s: not found%s: numeric argument required%s: option requires an argument%s: option requires an argument -- %c + %s: parameter null or not set%s: readonly function%s: readonly variable%s: restricted%s: restricted: cannot redirect output%s: restricted: cannot specify `/' in command names%s: substring expression < 0%s: unary operator expected%s: unbound variable%s: warning: && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to+N Rotates the stack so that the Nth directory (counting+N displays the Nth entry counting from the left of the list shown by+N removes the Nth entry counting from the left of the list+N Rotates the stack so that the Nth directory (counting+N displays the Nth entry counting from the left of the list shown by+N removes the Nth entry counting from the left of the list-N Rotates the stack so that the Nth directory (counting-N displays the Nth entry counting from the right of the list shown by-N removes the Nth entry counting from the right of the list-N Rotates the stack so that the Nth directory (counting-N displays the Nth entry counting from the right of the list shown by-N removes the Nth entry counting from the right of the list-a option means to print every builtin with an indication of whether-n suppress the normal change of directory when adding directories-n suppress the normal change of directory when removing directories-n suppress the normal change of directory when adding directories-n suppress the normal change of directory when removing directories-r and -s options restrict output to running and stopped jobs only,-t, the NAME is printed before the hashed full pathname. The -l option-u option is supplied, and the first word is assigned to the first NAME,/dev/(tcp|udp)/host/port not supported without networking/tmp must be a valid directory nameA trailing space in VALUE causes the next word to be checked forA useful alias to use with this is r='fc -s', so that typing `r cc'ARGUMENTS are supplied, they become the positional parameters whenARGs are given, all shell variables are printed.Aborting...Adds a directory to the top of the directory stack, or rotatesArgument `-n' means to read all history lines not already readArguments on the command line along with NAME are passed to theArithmetic binary operators return true if ARG1 is equal, not-equal,BASH_VERSION Version information for this Bash.Bind a key sequence to a Readline function or a macro, or setBy default, removes each JOBSPEC argument from the table of active jobs.CDPATH A colon separated list of directories to searchCOMMANDS are executed. Otherwise, each of the elif COMMANDS are executedCauses a function to exit with the return value specified by N. If NChange the current directory to DIR. The variable $HOME is theCopyright (C) 2004 Free Software Foundation, Inc. + Create a local variable called NAME, and give it VALUE. LOCALCreate a simple command invoked by NAME which runs COMMANDS.Declare variables and/or give them attributes. If no NAMEs areDisplay helpful information about builtin commands. If PATTERN isDisplay the history list with line numbers. Lines listed withDisplay the list of currently remembered directories. DirectoriesDisplay the possible completions depending on the options. IntendedEXP1, EXP2, and EXP3 are arithmetic expressions. If any expression isEach ARG is an arithmetic expression to be evaluated. EvaluationEach time it is invoked, getopts will place the next option in theEnable and disable builtin shell commands. This allowsEquivalent toExec FILE, replacing this shell with the specified program.Execute PIPELINE and print a summary of the real time, user CPU time,Exit from within a FOR, WHILE or UNTIL loop. If N is specified,Exit the shell with a status of N. If N is omitted, the exit statusExits with a status of 0 (true) or 1 (false) depending onExpand and execute COMMANDS as long as the final command in theFILENAME is executed.FIRST and LAST can be numbers specifying the range, or FIRST can be aFile operators:For each NAME, indicate how it would be interpreted if used as aFor each NAME, remove the corresponding variable or function. GivenFor each NAME, specify how arguments are to be completed.For each NAME, the full pathname of the command is determined andGLOBIGNORE A colon-separated list of patterns describing filenames toGNU long options: + Getopts is used by shell procedures to parse positional parameters.Getopts normally parses the positional parameters ($0 - $9), but ifHISTFILE The name of the file where your command history is stored.HISTFILESIZE The maximum number of lines this file can contain.HISTIGNORE A colon-separated list of patterns used to decide whichHISTSIZE The maximum number of history lines that a runningHOME The complete pathname to your login directory.HOME not setHOSTNAME The name of the current host.HOSTTYPE The type of CPU this version of Bash is running under.I have no name!IGNOREEOF Controls the action of the shell on receipt of an EOFIf -n is given, only processes that have changed status since the lastIf FILE is not specified, the redirections take effect in thisIf FILENAME is given, then that is used as the history file elseIf LIMIT is given, it is the new value of the specified resource;If N is specified, resume at the N-th enclosing loop.If `-p' is supplied, and MODE is omitted, the output is in a formIf a SIGNAL_SPEC is EXIT (0) the command ARG is executed on exit fromIf no arguments are given, information about remembered commands is displayed.If no option is given, then -f is assumed. Values are in 1024-byteIf the $HISTTIMEFORMAT variable is set and not null, its value is usedIf the -a flag is used, `type' displays all of the places that containIf the -h option is given, the job is not removed from the table, but isIf the -p flag is used, `type' either returns the name of the diskIf the -p option is supplied, or if no options are supplied, existingIf the -s option is supplied, the non-option ARGs are appended toIf the -t option is supplied the full pathname to which each NAMEIf the -t option is used, `type' outputs a single word which is one ofIf the file cannot be executed and the shell is not interactive,If the last ARG evaluates to 0, let returns 1; 0 is returnedIf the optional WORD argument is supplied, matches against WORD areIf the shell variable OPTERR has the value 0, getopts disables theJOB_SPEC is not present, the shell's notion of the current job isLists the active jobs. The -l option lists process id's in additionLogout of a login shell.MACHTYPE A string describing the current system Bash is running on.MAILCHECK How often, in seconds, Bash checks for new mail.MAILPATH A colon-separated list of filenames which Bash checksN is not given, all currently active child processes are waited for,NAME and unsets OPTARG. If a required argument is not found, a '?'NAMEs are marked for automatic export to the environment ofNAMEs become disabled; otherwise NAMEs are enabled. For example,No effect; the command does nothing. A zero exit code is returned.OLDPWD not setOPTSTRING contains the option letters to be recognized; if a letterOPTSTRING is not a colon. OPTERR has the value 1 by default.OSTYPE The version of Unix this version of Bash is running on.Obsolete. See `declare'.One line is read from the standard input, or from file descriptor FD if theOperators are evaluated in order of precedence. Sub-expressions inOther operators:Otherwise, an alias is defined for each NAME whose VALUE is given.Otherwise, the current value of the specified resource is printed.Output the ARGs. If -n is specified, the trailing newline isOutput the ARGs. If -n is specified, the trailing newline is suppressed.PATH A colon-separated list of directories to search whenPROMPT_COMMAND A command to be executed before the printing of eachPS1 The primary prompt string.PS2 The secondary prompt string.PWD The full pathname of the current directory.Place JOB_SPEC in the background, as if it had been started withPlace JOB_SPEC in the foreground, and make it the current job. IfPrint the accumulated user and system times for processes run fromPrint the current working directory. With the -P option, pwd printsRead ARGs as input to the shell and execute the resulting command(s).Read and execute commands from FILENAME and return. The pathnamesRemove NAMEs from the list of defined aliases. If the -a option is given,Removes entries from the directory stack. With no arguments,Resume the next iteration of the enclosing FOR, WHILE or UNTIL loop.Return a successful result.Return an unsuccessful result.Returns a status of 0 or 1 depending on the evaluation of the conditionalReturns the context of the current subroutine call.Run a set of commands in a group. This is one way to redirect anRun a shell builtin. This is useful when you wish to rename aRuns COMMAND with ARGS ignoring shell functions. If you have a shellSHELLOPTS A colon-separated list of enabled shell options.SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove allSIGNAL_SPEC is ignored by the shell and by the commands it invokes.SIGSPEC is not present, then SIGTERM is assumed. An argument of `-l'Selectively execute COMMANDS based upon WORD matching PATTERN. TheSend the processes named by PID (or JOB) the signal SIGSPEC. IfShell commands matching keyword `Shell commands matching keywords `Shell options: + Shell variables are allowed as operands. The name of the variableString operators:Suspend the execution of this shell until it receives a SIGCONTTERM The name of the current terminal type.TIMEFORMAT The output format for timing statistics displayed by theTIMEFORMAT: `%c': invalid format characterThe -P flag forces a PATH search for each NAME, even if it is an alias,The -V option produces a more verbose description.The -c flag clears the directory stack by deleting all of the elements.The -f flag suppresses shell function lookup.The -l flag specifies that `dirs' should not print shorthand versionsThe -s flag means to enable (set) each OPTNAME; the -u flagThe -t option causes read to time out and return failure if a complete lineThe EXPRESSION is evaluated according to the rules for arithmeticThe WORDS are expanded, generating a list of words. TheThe `for' loop executes a sequence of commands for each member in aThe command ARG is to be read and executed when the shell receivesThe flags are:The given NAMEs are marked readonly and the values of these NAMEs mayThe if COMMANDS are executed. If the exit status is zero, then the thenThe levels are listed in order of decreasing precedence.The mail in %s has been read + The positional parameters from $N+1 ... are renamed to $1 ... If N isThe return status is the return status of PIPELINE. The `-p' optionThe user file-creation mask is set to MODE. If MODE is omitted, or ifThe value of EXPR indicates how many call frames to go back before theThere are stopped jobs. + These shell commands are defined internally. Type `help' to see this list. + Type `help name' to find out more about the function `name'. + Use `info bash' to find out more about the shell in general. + Use `man -k' or `info' to find out more about commands not in this list. + + A star (*) next to a name means that the command is disabled. + + This is a synonym for the "test" builtin, but the lastThis is similar to the `fg' command. Resume a stopped or backgroundToggle the values of variables controlling optional behavior.Type `%s -c "help set"' for more information about shell options. + Type `%s -c help' for more information about shell builtin commands. + Ulimit provides control over the resources available to processesUnknown errorUsage: %s [GNU long option] [option] ... + %s [GNU long option] [option] script-file ... + Use "%s" to leave the shell. + Use the `bashbug' command to report bugs. + Using + rather than - causes these flags to be turned off. TheUsing `+' instead of `-' turns off the given attribute instead. WhenVariables with the integer attribute have arithmetic evaluation (seeWORD, then the job whose name begins with WORD is used. Following theWait for the specified process and report its termination status. IfWhen displaying values of variables, -f displays a function's nameWhen the `==' and `!=' operators are used, the string to the right of theWith the `fc -s [pat=rep ...] [command]' format, the command isWithout EXPR, returns returns "$line $filename". With EXPR,You can explicitly turn off the interpretation of the above charactersYou can see the directory stack with the `dirs' command.You have mail in $_You have new mail in $_`%c': bad command`%c': invalid format character`%c': invalid symbolic mode character`%c': invalid symbolic mode operator`%s': cannot unbind`%s': invalid alias name`%s': invalid keymap name`%s': missing format character`%s': not a pid or valid job spec`%s': not a valid identifier`%s': unknown function name`&'. If JOB_SPEC is not present, the shell's notion of the current`)' expected`)' expected, found %s`-S' is supplied, the current value of the mask is printed. The `-S'`:' expected for conditional expression`alias' with no arguments or with the -p option prints the list`alias', `keyword', `function', `builtin', `file' or `', if NAME is an`let') done when the variable is assigned to.`set -o'. With no options, or with the -p option, a list of all`special' builtins. The -n option displays a list of all disabled builtins.`until' COMMANDS has an exit status which is not zero.`while' COMMANDS has an exit status of zero.`|' is used to separate multiple patterns.a Readline variable. The non-option argument syntax is equivalenta shell script is invoked. When an option requires an argument,a short usage synopsis.alias substitution when the alias is expanded. Alias returnsalias, shell reserved word, shell function, shell builtin, disk file,all child processes of the shell are waited for.all_local_variables: no function context at current scopeallocatedan array variable. An argument of `--' disables further optionan executable named `file'. This includes aliases, builtins, andan expression. The variable need not have its integer attributeand definition. The -F option restricts the display to functionand system CPU time spent executing PIPELINE when it terminates.and the return code is zero. N is a process ID; if it is not given,and the return code is zero. N may be a process ID or a jobanything in the history list.append the contents to the history list instead. `-a' meansare executed and the if command completes. Otherwise, the else COMMANDSare executed, if present. The exit status is the exit status of the lastare separated by a colon (:). A null directory name is the same asare string operators as well, and numeric comparison operators.argumentargument expectedargument must be a literal `]', to match the opening `['.argument. In addition to the standard printf(1) formats, %b means toarguments are given, or if `-p' is given, a list of all readonly namesas a format string for strftime(3) to print the time stamp associatedassumed. For each element in WORDS, NAME is set to that element, andattempted assignment to non-variableauto_resume Non-null means a command word appearing on a line byback up through the list with the `popd' command.backslash escaping is disabled. The -d option causes read to continuebad array subscriptbad command typebad connectorbad jumpbad substitution: no closing `%s' in %sbash_execute_unix_command: cannot find keymap for commandbe executed.be signal numbers for which names should be listed. Kill is a shellbefore attempting to read. If -a is supplied, the words read are assignedbeing a login shell if it is; just suspend anyway.bind '"\C-x\C-r": re-read-init-file'.bind accepts the following options:break N levels.bug: bad expassign tokenbug: unknown operationbuiltin for two reasons: it allows job IDs to be used instead ofbuiltin within the function itself.builtin without specifying a full pathname. If -n is used, thebuiltin, or function, and returns the name of the disk file that wouldby the `test' builtin, and may be combined using the following operatorscan be used used to provide a stack trace.can only `return' from a function or sourced scriptcan only be used in a functioncan only be used within a function; it makes the variable NAMEcannot allocate new file descriptor for bash input from fd %dcannot create temp file for here document: %scannot duplicate fd %d to fd %dcannot duplicate named pipe %s as fd %dcannot find %s in shared object %s: %scannot make child for command substitutioncannot make child for process substitutioncannot make pipe for command substitutioncannot make pipe for process substitutioncannot open named pipe %s for readingcannot open named pipe %s for writingcannot open shared object %s: %scannot redirect standard input from /dev/null: %scannot set and unset shell options simultaneouslycannot simultaneously unset a function and a variablecannot suspendcannot suspend a login shellcannot use `-f' to make functionscannot use more than one of -anrwcannout reset nodelay mode for fd %dcauses `dirs' to print the directory stack with one entry per line,causes output to be displayed in a format that may be reused as input.characters have been read. The -s option causes input coming from acharacters, which are simply copied to standard output, character escapecleared by deleting all of the entries. The `-d' option deletescommand executed, or zero if no condition tested true.command name.command. If ARG is `-p' then the trap commands associated withcommand_substitute: cannot duplicate pipe as fd 1completion specifications are printed in a way that allows them to becompletion: function `%s' not foundconditional binary operator expectedcorresponding numbers. Note that a signal can be sent to the shellcorresponding to one of the displayed words, then NAME is setcorresponds is printed. If multiple NAME arguments are supplied withcould not find /tmp, please create!cprintf: `%c': invalid format charactercurrent history to the history file; `-r' means to read the file andcurrent one; the top frame is frame 0.default DIR. The variable CDPATH defines the search path fordeleting stopped job %d with process group %lddelimiters. If no NAMEs are supplied, the line read is stored in the REPLYdescribe_pid: %ld: no such piddetermine the expression's value.dir adds DIR to the directory stack at the top, making it thedir adds DIR to the directory stack at the top, making it thedirectory. With no arguments, exchanges the top two directories.division by 0division by 0 is trapped and flagged as an error. The followingdynamic loading not availableeach NAME, or, if no NAMEs are supplied, all completion specifications.each SIGNAL_SPEC are displayed. If no arguments are supplied or ifeach signal number. Each SIGNAL_SPEC is either a signal name in entire set of commands.error importing function definition for `%s'evaluation. Equivalent to "let EXPRESSION".expand backslash escape sequences in the corresponding argument, and %qexpected `)'exponent less than 0expression EXPRESSION. Expressions are composed of the same primaries usedexpression expectedexpression recursion level exceededexpressions are often used to examine the status of a file. Therefc is used to list or edit and re-execute commands from the history list.file descriptor out of rangefile that would be executed, or nothing if `type -t NAME' would notfilename argument requiredfind their way onto the list with the `pushd' command; you can getflag does the same thing, but the stack position is not prepended.flags can also be used upon invocation of the shell. The currentfollowing backslash-escaped characters is turned on:for PATH that is guaranteed to find all of the standard utilities. Ifformat specifications, each of which causes printing of the next successivefree: called with already freed block argumentfree: called with unallocated block argumentfree: start and end chunk sizes differfree: underflow detected; mh_nbytes out of rangefreedfrom subsequent NAMEs. An argument of `--' disables further optionfrom the history file and append them to the history list.from the standard input. If the line consists of the numberfull pathname of NAME, and no path search is performed. The -rfunction as $0 .. $n.function called `ls', and you wish to call the command `ls', you canfunction. Some variables cannot be unset; also see readonly.functions, if and only if the -p flag is not also used.generated.getcwd: cannot access parent directoriesgetopts places that argument into the shell variable OPTARG.getopts reports errors in one of two ways. If the first charactergiven, then display the values of variables instead. The -p optionhashing disabledhave a visible scope restricted to that function and its children.histchars Characters controlling history expansion and quickhistory expansion on each ARG and display the result, without storinghistory positionhistory specificationidentifier expected after pre-increment or pre-decrementif $HISTFILE has a value, that is used, else ~/.bash_history.in $PATH are used to find the directory containing FILENAME. If anyin the variable REPLY. COMMANDS are executed after each selectionin turn, and if the exit status is zero, the corresponding then COMMANDSincrements of 512 bytes, and -u, which is an unscaled number ofincrements, except for -t, which is in seconds, -p, which is ininstead of following symbolic links; the -L option forces symbolic linksinterpreted as an octal number, otherwise it is a symbolic mode stringinvalid arithmetic baseinvalid baseinvalid character %d in exportstr for %sinvalid numberinvalid signal numberis a character string which contains three types of objects: plainis assumed. The PS3 prompt is then displayed and a line readis done in fixed-width integers with no check for overflow, thoughis encountered, read times out, or an invalid file descriptor is supplied asis followed by a colon, the option is expected to have an argument,is given, a list of all names that are exported in this shell isis omitted, the return status is that of the last command.is placed in NAME, OPTARG is unset, and a diagnostic message isis printed. The `-a' option means to treat each NAME asis replaced by its value (coerced to a fixed-width integer) withinis supplied, FILE is executed with a null environment. The `-a'is that of the last command executed.its value is the default timeout. The return code is zero, unless end-of-filejob %d started without job controljob is used.job specification with a `&' places the job in the background.job. If you specifiy DIGITS, then that job is used. If you specifyjobs from the job table; the -r option means to remove only running jobs.just resizedlast command: %s + less-than, less-than-or-equal, greater-than, or greater-than-or-equallike that accepted by chmod(1).list of items. If `in WORDS ...;' is not present, then `in "$@"' islist of operators is grouped into levels of equal-precedence operators.lists the signal names; if arguments follow `-l' they are assumed toloading, the -f option may be used to load new builtins from themake_here_document: bad instruction type %dmake_local_variable: no function context at current scopemake_redirection: redirection instruction `%d' out of rangemakes pwd follow symbolic links.malloc: block on free list clobberedmalloc: failed assertion: %s + malloc: watch alert: %p %s marked so that SIGHUP is not sent to the job if the shell receives ameans to quote the argument in a way that can be reused as shell input.missing `)'missing `]'missing hex digit for \xmore arguments are given, they are parsed instead.name only.name. If that variable has a value, then cd to the value of thatnetwork operations not supportedno `=' in exportstr for %sno closing `%c' in %sno command foundno help topics match `%s'. Try `help help' or `man -k %s' or `info %s'.no job controlno job control in this shellno match: %sno other directoryno other options allowed with `-x'not be changed by subsequent assignment. If the -f option is given,not each is set.not given, it is assumed to be 1.not login shell: use `exit'notification are printed. JOBSPEC restricts output to that job. Theoctal numberof OPTSTRING is a colon, getopts uses silent error reporting. Inof aliases in the form alias NAME=VALUE on standard output.of directories which are relative to your home directory. This meansof input is not read within TIMEOUT seconds. If the TMOUT variable is set,omitted, it behaves as if it evaluates to 1.only `-p' is given, trap prints the list of commands associated withonly meaningful in a `for', `while', or `until' loopoperator is used as a pattern and pattern matching is performed. Theoption causes the shell to forget all remembered locations. The -doption causes the shell to forget the remembered location of each NAME.option is given, it is interpreted as follows:option is supplied, the string PROMPT is output without a trailing newlineoption makes the output symbolic; otherwise an octal number is output.option means to make set argv[0] of the executed process to NAME.option restricts the OPTNAMEs to those defined for use withor a signal number. `trap -l' prints a list of signal names and theiror not it is enabled. The -s option restricts the output to the POSIX.2or unfound, respectively.otherwise a list of the builtins is printed. The -s optionotherwise.parameters and are assigned, in order, to $1, $2, .. $n. If noparentheses are evaluated first and may override the precedencepipeline are waited for.pop_scope: head of shell_variables not a temporary environment scopepop_var_context: head of shell_variables not a function contextpop_var_context: no global_variables contextpreceded by a number. If `in WORDS' is not present, `in "$@"'prepending the directory name with its position in the stack. The -ppreviously loaded with -f. If no non-option names are given, orprint_command: bad connector `%d'printed.printed. An argument of `-n' says to remove the export propertyprinted. If -x is given, COMMAND is run after all job specificationsprintf formats and prints ARGUMENTS under control of the FORMAT. FORMATprinting of error messages, even if the first character ofprints the timing summary in a slightly different format. This usesprocess IDs, and, if you have reached the limit on processes thatprocess group leader.processes.processing.progcomp_insert: %s: NULL COMPSPECre-executed after the substitution OLD=NEW is performed.read error: %d: %srealloc: called with unallocated block argumentrealloc: start and end chunk sizes differrealloc: underflow detected; mh_nbytes out of rangerecursion stack underflowredirection error: cannot duplicate fdredisplayed. If EOF is read, the command completes. Any otherregister_alloc: %p already in table as allocated? + register_alloc: alloc table is full with FIND_ALLOC? + register_free: %p already in table as free? + remembered. If the -p option is supplied, PATHNAME is used as theremoves the top directory from the stack, and cd's to the newrequesting resizerequired argument is not found, getopts places a ':' into NAME andreset to their original values. If ARG is the null string eachrespectively. Without options, the status of all active jobs isrestrictedrestricts the output for each builtin command matching PATTERN toreturn `file'.returns "$line $subroutine $filename"; this extra informationreused as input. The -r option removes a completion specification forrules above.run_pending_traps: bad value in trap_list[%d]: %prun_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myselfruns the last command beginning with `cc' and typing `r' re-executessave_bash_input: buffer already exists for new fd %dsay "command ls". If the -p option is given, a default value is usedseen, getopts places the option character found into OPTARG. If asequences which are converted and copied to the standard output, andset of expanded words is printed on the standard error, eachset of flags may be found in $-. The remaining n ARGs are positionalsets OPTARG to the option character found. If getopts is not insettable options is displayed, with an indication of whether orshared object FILENAME. The -d option will delete a builtinshell builtin to be a function, but need the functionality of theshell level (%d) too high, resetting to 1shell option `cdable_vars' is set, then try the word as a variableshell variable $name, initializing name if it does not exist, andshell. If the first argument is `-l', then place a dash in theshift countsignal(s) SIGNAL_SPEC. If ARG is absent all specified signals aresignal. The `-f' if specified says not to complain about thissigprocmask: %d: invalid operationsilent mode, and an invalid option is seen, getopts places '?' intospecification; if a job spec is given, all processes in the job'sspecified, gives detailed help on all commands matching PATTERN,started by the shell, on systems that allow such control. If anstatus indicates whether each OPTNAME is set or unset. The -ostring, which means the most recent command beginning with thatstring.subsequently executed commands. If the -f option is given,supplied with a non-zero NCHARS argument, read returns after NCHARSsuppressed. If the -e option is given, interpretation of thesyntax errorsyntax error in conditional expressionsyntax error in conditional expression: unexpected token `%s'syntax error in expressionsyntax error near `%s'syntax error near unexpected token `%s'syntax error: `((%s))'syntax error: `;' unexpectedsyntax error: arithmetic expression requiredsyntax error: operand expectedsyntax error: unexpected end of fileterminal to not be echoed.than ARG2.that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flagthat appear in ARGS have been replaced with the process ID of that job'sthat may be used as input. If MODE begins with a digit, it isthe -V or -v option is given, a string is printed describing COMMAND.the -p option is supplied, a list of builtins is printed. Thethe COMMANDS are executed.the NAMEs refer to functions. If no NAMEs are given, or if `-p'the `-v', unset will only act on variables. Given the `-f' flag,the argument to -u.the current directory, i.e. `.'. If DIR begins with a slash (/),the current soft limit, the current hard limit, and no limit, respectively.the directory containing DIR. Alternative directory names in CDPATHthe evaluation of EXPR. Expressions may be unary or binary. Unarythe history entry at offset OFFSET. The `-w' option writes out thethe history list as a single entry. The -p option means to performthe index of the next argument to be processed into the shellthe last N lines. The `-c' option causes the history list to bethe last command.the physical directory, without any symbolic links; the -L optionthe second word to the second NAME, and so on, with leftover words assignedthe shell is interactive, readline is used to obtain the line. If -n isthe shell.the shell. If a SIGNAL_SPEC is DEBUG, ARG is executed after everythe special LIMIT values `soft', `hard', and `unlimited' stand forthe stack, making the new top of the stack the current workingthe value of the TIMEFORMAT variable as the output format.then CDPATH is not used. If the directory is not found, and thethen functions corresponding to the NAMEs are so marked. If nothen remove all alias definitions.then the shell exits, unless the shell option `execfail' is set.this mode, no error messages are printed. If an invalid option isto append history lines from this session to the history file.to be followed.to be used from within a shell function generating possible completions.to sequential indices of ARRAY, starting at zero. If -e is supplied andto that found in ~/.inputrc, but must be passed as a single argument:to that word. If the line is empty, WORDS and the prompt areto the last NAME. Only the characters found in $IFS are recognized as wordto the normal information; the -p option lists process id's only.to use the `test' found in $PATH instead of the shell builtintoo many argumentstop directory.trap_handler: bad signal %dtries to unset a variable, and if that fails, then tries to unset atrue unless a NAME is given for which no alias has been defined.turned on to be used in an expression.unexpected EOF while looking for `]]'unexpected EOF while looking for matching `%c'unexpected EOF while looking for matching `)'unexpected argument `%s' to conditional binary operatorunexpected argument `%s' to conditional unary operatorunexpected argument to conditional binary operatorunexpected argument to conditional unary operatorunexpected token %d in conditional commandunexpected token `%c' in conditional commandunexpected token `%s' in conditional commandunexpected token `%s', conditional binary operator expectedunexpected token `%s', expected `)'unknown command errorunset will only act on functions. With neither flag, unset firstunsets each OPTNAME. The -q flag suppresses output; the exituntil a break command is executed.until the first character of DELIM is read, rather than newline. If the -pused in a function, makes NAMEs local, as with the `local' command.used.value read causes NAME to be set to null. The line read is savedvalue too great for basevariable OPTIND. OPTIND is initialized to 1 each time the shell orvariable. If the -r option is given, this signifies `raw' input, andvariable. The -P option says to use the physical directory structureversion, type `enable -n test'. On systems supporting dynamicwait: pid %ld is not a child of this shellwait_for: No record of process %ldwait_for_job: job %d is stoppedwarning: -C option may not work as you expectwarning: -F option may not work as you expectwhich should be separated from it by white space.will display the attributes and values of each NAME.with "kill -signal $$".with a `*' have been modified. Argument of N says to list onlywith each displayed history entry. No time stamps are printed otherwise.with the -E option.write error: %sxmalloc: %s:%d: cannot allocate %lu bytesxmalloc: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)xmalloc: cannot allocate %lu bytesxmalloc: cannot allocate %lu bytes (%lu bytes allocated)xrealloc: %s:%d: cannot allocate %lu bytesxrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)xrealloc: cannot allocate %lu bytesxrealloc: cannot reallocate %lu bytes (%lu bytes allocated)you can create, you don't have to start a process to kill another one.you to use a disk command which has the same name as a shellzeroth arg passed to FILE, as login does. If the `-c' optionProject-Id-Version: GNU bash 3.0-rc1 + POT-Creation-Date: 2003-12-22 15:34-0500 + PO-Revision-Date: 2003-12-22 15:34-0500 + Last-Translator: Automatically generated + Language-Team: none + MIME-Version: 1.0 + Content-Type: text/plain; charset=UTF-8 + Content-Transfer-Encoding: 8bit + Report-Msgid-Bugs-To: bug-bash@gnu.org + Plural-Forms: nplurals=2; plural=(n != 1); + timed out waiting for input: auto-logout + KEYSEQ is entered. conditional operator (( EXP3 )) (default 10). When unset, EOF signifies the end of input. A value of ‘exact’ means that the command word must COMMANDS ‘time’ reserved word. be ignored by pathname expansion. character as the sole input. If set, then the value commands should be saved on the history list. directory. exactly match a command in the list of stopped jobs. A for new mail. in a row on an empty line before the shell will exit itself is first looked for in the list of currently looking for commands. match a substring of the job. Any other value means that of it is the number of EOF characters that can be seen primary prompt. shell can access. stopped jobs. If found there, that job is foregrounded. substitution character, usually ‘!’. The second is substitution. The first character is the history the ‘quick substitution’ character, usually ‘^’. The the command must be a prefix of a stopped job. third is the ‘history comment’ character, usually ‘#’. value of ‘substring’ means that the command word must when the argument to ‘cd’ is not found in the current ! EXPRESSION True if EXPRESSION is false; else false !, ~ logical and bitwise negation & bitwise AND && logical AND &=, ^=, |= assignment ( EXPRESSION ) Returns the value of EXPRESSION (( EXP1 )) ** exponentiation *, /, % multiplication, division, remainder ++id, --id variable pre-increment, pre-decrement +, - addition, subtraction +=, -=, <<=, >>=, -%s or -o option + -, + unary minus, plus -irsD or -c command or -O shopt_option (invocation only) + <<, >> left and right bitwise shifts <=, >=, <, > comparison =, *=, /=, %=, ==, != equality, inequality EXPR1 && EXPR2 True if both EXPR1 and EXPR2 are true; else false EXPR1 || EXPR2 True if either EXPR1 or EXPR2 is true; else false \E escape character \\ backslash \a alert (bell) \b backspace \c suppress trailing newline \f form feed \n new line \num the character whose ASCII code is NUM (octal). \r carriage return \t horizontal tab \v vertical tab ^ bitwise XOR debugging) without definitions dirs when invoked without options, starting with zero. done expr ? expr : expr from the left of the list shown by ‘dirs’, starting with from the right of the list shown by ‘dirs’, starting with from the stack, so only the stack is manipulated. id++, id-- variable post-increment, post-decrement new current working directory. removes the first directory, ‘popd +1’ the second. removes the last directory, ‘popd -1’ the next to last. shown by ‘dirs’, starting with zero. For example: ‘popd +0’ shown by ‘dirs’, starting with zero. For example: ‘popd -0’ to the stack, so only the stack is manipulated. while (( EXP2 )); do zero) is at the top. | bitwise OR || logical OR + malloc: %s:%d: assertion botched + allow comments to appear in interactive commands match the standard operation differs from the 1003.2 standard to or zero if no command exited with a non-zero status the last command to exit with a non-zero status, be reused as input. command. Acceptable keymap names are emacs, emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move, in a form that can be reused as input. reused as input. vi-command, and vi-insert. -lt, -le, -gt, or -ge. True if STRING1 sorts after STRING2 lexicographically. True if STRING1 sorts before STRING2 lexicographically. True if the strings are equal. True if the strings are not equal. modification date). allexport same as -a braceexpand same as -B emacs use an emacs-style line editing interface errexit same as -e errtrace same as -E functrace same as -T hashall same as -h histexpand same as -H history enable command history ignoreeof the shell will not exit upon reading EOF interactive-comments keyword same as -k monitor same as -m noclobber same as -C noexec same as -n noglob same as -f nolog currently accepted but ignored notify same as -b nounset same as -u onecmd same as -t physical same as -P pipefail the return value of a pipeline is the status of posix change the behavior of bash where the default privileged same as -p verbose same as -v vi use a vi-style line editing interface xtrace same as -x Disables processing of the $ENV file and importing of shell Set the variable corresponding to option-name: by default. by redirection of output. command, not just those that precede the command name. functions. Turning this option off causes the effective uid and gid to be set to the real uid and gid. such as cd which change the current directory. then vi. dirs when invoked without options, starting with zero. from the left of the list shown by ‘dirs’, starting with from the right of the list shown by ‘dirs’, starting with from the stack, so only the stack is manipulated. new current working directory. removes the first directory, ‘popd +1’ the second. removes the last directory, ‘popd -1’ the next to last. shown by ‘dirs’, starting with zero. For example: ‘popd +0’ shown by ‘dirs’, starting with zero. For example: ‘popd -0’ to the stack, so only the stack is manipulated. zero) is at the top. ! EXPR True if expr is false. -B the shell will perform brace expansion -C If set, disallow existing regular files to be overwritten -E If set, the ERR trap is inherited by shell functions. -G FILE True if the file is effectively owned by your group. -H use the ‘hard’ resource limit -H Enable ! style history substitution. This flag is on -L FILE True if file is a symbolic link. -N FILE True if the file has been modified since it was last read. -O FILE True if the file is effectively owned by you. -P If set, do not follow symbolic links when executing commands -S use the ‘soft’ resource limit -S FILE True if file is a socket. -T If set, the DEBUG trap is inherited by shell functions. -a all current limits are reported -a Mark variables which are modified or created for export. -a FILE True if file exists. -b Notify of job termination immediately. -b FILE True if file is block special. -c the maximum size of core files created -c FILE True if file is character special. -d the maximum size of a process's data segment -d FILE True if file is a directory. -e Exit immediately if a command exits with a non-zero status. -e FILE True if file exists. -f the maximum size of files created by the shell -f Disable file name generation (globbing). -f FILE True if file exists and is a regular file. -g FILE True if file is set-group-id. -h Remember the location of commands as they are looked up. -h FILE True if file is a symbolic link. -k All assignment arguments are placed in the environment for a -k FILE True if file has its ‘sticky’ bit set. -l the maximum size a process may lock into memory -m the maximum resident set size -m Job control is enabled. -n the maximum number of open file descriptors -n Read commands but do not execute them. -n STRING -o OPTION True if the shell option OPTION is enabled. -o option-name -p the pipe buffer size -p Turned on whenever the real and effective user ids do not match. -p FILE True if file is a named pipe. -r FILE True if file is readable by you. -s the maximum stack size -s FILE True if file exists and is not empty. -t the maximum amount of cpu time in seconds -t Exit after reading and executing one command. -t FD True if FD is opened on a terminal. -u the maximum number of user processes -u Treat unset variables as an error when substituting. -u FILE True if the file is set-user-id. -v the size of virtual memory -v Print shell input lines as they are read. -w FILE True if the file is writable by you. -x Print commands and their arguments as they are executed. -x FILE True if the file is executable by you. -z STRING True if string is empty. EXPR1 -a EXPR2 True if both expr1 AND expr2 are true. EXPR1 -o EXPR2 True if either expr1 OR expr2 is true. STRING True if string is not empty. STRING1 != STRING2 STRING1 < STRING2 STRING1 = STRING2 STRING1 > STRING2 arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne, -e ENAME selects which editor to use. Default is FCEDIT, then EDITOR, -l means list lines instead of editing. -n means no line numbers listed. -r means reverse the order of the lines (making it newest listed first). -F to display function names (and line number and source file name if -P List function names and bindings. -S List key sequences that invoke macros and their values -V List variable names and values -a to make NAMEs arrays (if supported) -f to select from among function names only -f filename Read key bindings from FILENAME. -i to make NAMEs have the ‘integer’ attribute -l List names of functions. -m keymap Use ‘keymap’ as the keymap for the duration of this -p List functions and bindings in a form that can be -q function-name Query about which keys invoke the named function. -r to make NAMEs readonly -r keyseq Remove the binding for KEYSEQ. -s List key sequences that invoke macros and their values -t to make NAMEs have the ‘trace’ attribute -u function-name Unbind all keys which are bound to the named function. -v List variable names and values in a form that can -x to make NAMEs export -x keyseq:shell-command Cause SHELL-COMMAND to be executed when FILE1 -ef FILE2 True if file1 is a hard link to file2. FILE1 -nt FILE2 True if file1 is newer than file2 (according to FILE1 -ot FILE2 True if file1 is older than file2.$%s: cannot assign in this way%c%c: invalid option%d: invalid file descriptor: %s%s can be invoked via %s is %s + %s is a function + %s is a shell builtin + %s is a shell keyword + %s is aliased to ‘%s’ + %s is hashed (%s) + %s is not bound to any keys. + %s out of range%s: %s out of range%s: %s: bad interpreter%s: ambiguous job spec%s: ambiguous redirect%s: arguments must be process or job IDs%s: bad network path specification%s: bad substitution%s: binary operator expected%s: cannot assign list to array member%s: cannot assign to non-numeric index%s: cannot create: %s%s: cannot delete: %s%s: cannot destroy array variables in this way%s: cannot execute binary file%s: cannot execute: %s%s: cannot get limit: %s%s: cannot modify limit: %s%s: cannot open temp file: %s%s: cannot open: %s%s: cannot overwrite existing file%s: cannot read: %s%s: cannot unset%s: cannot unset: readonly %s%s: command not found%s: error retrieving current directory: %s: %s + %s: file is too large%s: file not found%s: first non-whitespace character is not ‘"’%s: hash table empty + %s: history expansion failed%s: host unknown%s: illegal option -- %c + %s: integer expression expected%s: invalid action name%s: invalid file descriptor specification%s: invalid limit argument%s: invalid number%s: invalid option%s: invalid option name%s: invalid service%s: invalid shell option name%s: invalid signal specification%s: invalid timeout specification%s: is a directory%s: job %d already in background%s: job has terminated%s: missing colon separator%s: no completion specification%s: no job control%s: no such job%s: not a function%s: not a regular file%s: not a shell builtin%s: not an array variable%s: not dynamically loaded%s: not found%s: numeric argument required%s: option requires an argument%s: option requires an argument -- %c + %s: parameter null or not set%s: readonly function%s: readonly variable%s: restricted%s: restricted: cannot redirect output%s: restricted: cannot specify ‘/’ in command names%s: substring expression < 0%s: unary operator expected%s: unbound variable%s: warning: && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to+N Rotates the stack so that the Nth directory (counting+N displays the Nth entry counting from the left of the list shown by+N removes the Nth entry counting from the left of the list+N Rotates the stack so that the Nth directory (counting+N displays the Nth entry counting from the left of the list shown by+N removes the Nth entry counting from the left of the list-N Rotates the stack so that the Nth directory (counting-N displays the Nth entry counting from the right of the list shown by-N removes the Nth entry counting from the right of the list-N Rotates the stack so that the Nth directory (counting-N displays the Nth entry counting from the right of the list shown by-N removes the Nth entry counting from the right of the list-a option means to print every builtin with an indication of whether-n suppress the normal change of directory when adding directories-n suppress the normal change of directory when removing directories-n suppress the normal change of directory when adding directories-n suppress the normal change of directory when removing directories-r and -s options restrict output to running and stopped jobs only,-t, the NAME is printed before the hashed full pathname. The -l option-u option is supplied, and the first word is assigned to the first NAME,/dev/(tcp|udp)/host/port not supported without networking/tmp must be a valid directory nameA trailing space in VALUE causes the next word to be checked forA useful alias to use with this is r='fc -s', so that typing ‘r cc’ARGUMENTS are supplied, they become the positional parameters whenARGs are given, all shell variables are printed.Aborting...Adds a directory to the top of the directory stack, or rotatesArgument ‘-n’ means to read all history lines not already readArguments on the command line along with NAME are passed to theArithmetic binary operators return true if ARG1 is equal, not-equal,BASH_VERSION Version information for this Bash.Bind a key sequence to a Readline function or a macro, or setBy default, removes each JOBSPEC argument from the table of active jobs.CDPATH A colon separated list of directories to searchCOMMANDS are executed. Otherwise, each of the elif COMMANDS are executedCauses a function to exit with the return value specified by N. If NChange the current directory to DIR. The variable $HOME is theCopyright (C) 2004 Free Software Foundation, Inc. + Create a local variable called NAME, and give it VALUE. LOCALCreate a simple command invoked by NAME which runs COMMANDS.Declare variables and/or give them attributes. If no NAMEs areDisplay helpful information about builtin commands. If PATTERN isDisplay the history list with line numbers. Lines listed withDisplay the list of currently remembered directories. DirectoriesDisplay the possible completions depending on the options. IntendedEXP1, EXP2, and EXP3 are arithmetic expressions. If any expression isEach ARG is an arithmetic expression to be evaluated. EvaluationEach time it is invoked, getopts will place the next option in theEnable and disable builtin shell commands. This allowsEquivalent toExec FILE, replacing this shell with the specified program.Execute PIPELINE and print a summary of the real time, user CPU time,Exit from within a FOR, WHILE or UNTIL loop. If N is specified,Exit the shell with a status of N. If N is omitted, the exit statusExits with a status of 0 (true) or 1 (false) depending onExpand and execute COMMANDS as long as the final command in theFILENAME is executed.FIRST and LAST can be numbers specifying the range, or FIRST can be aFile operators:For each NAME, indicate how it would be interpreted if used as aFor each NAME, remove the corresponding variable or function. GivenFor each NAME, specify how arguments are to be completed.For each NAME, the full pathname of the command is determined andGLOBIGNORE A colon-separated list of patterns describing filenames toGNU long options: + Getopts is used by shell procedures to parse positional parameters.Getopts normally parses the positional parameters ($0 - $9), but ifHISTFILE The name of the file where your command history is stored.HISTFILESIZE The maximum number of lines this file can contain.HISTIGNORE A colon-separated list of patterns used to decide whichHISTSIZE The maximum number of history lines that a runningHOME The complete pathname to your login directory.HOME not setHOSTNAME The name of the current host.HOSTTYPE The type of CPU this version of Bash is running under.I have no name!IGNOREEOF Controls the action of the shell on receipt of an EOFIf -n is given, only processes that have changed status since the lastIf FILE is not specified, the redirections take effect in thisIf FILENAME is given, then that is used as the history file elseIf LIMIT is given, it is the new value of the specified resource;If N is specified, resume at the N-th enclosing loop.If ‘-p’ is supplied, and MODE is omitted, the output is in a formIf a SIGNAL_SPEC is EXIT (0) the command ARG is executed on exit fromIf no arguments are given, information about remembered commands is displayed.If no option is given, then -f is assumed. Values are in 1024-byteIf the $HISTTIMEFORMAT variable is set and not null, its value is usedIf the -a flag is used, ‘type’ displays all of the places that containIf the -h option is given, the job is not removed from the table, but isIf the -p flag is used, ‘type’ either returns the name of the diskIf the -p option is supplied, or if no options are supplied, existingIf the -s option is supplied, the non-option ARGs are appended toIf the -t option is supplied the full pathname to which each NAMEIf the -t option is used, ‘type’ outputs a single word which is one ofIf the file cannot be executed and the shell is not interactive,If the last ARG evaluates to 0, let returns 1; 0 is returnedIf the optional WORD argument is supplied, matches against WORD areIf the shell variable OPTERR has the value 0, getopts disables theJOB_SPEC is not present, the shell's notion of the current job isLists the active jobs. The -l option lists process id's in additionLogout of a login shell.MACHTYPE A string describing the current system Bash is running on.MAILCHECK How often, in seconds, Bash checks for new mail.MAILPATH A colon-separated list of filenames which Bash checksN is not given, all currently active child processes are waited for,NAME and unsets OPTARG. If a required argument is not found, a ‘?’NAMEs are marked for automatic export to the environment ofNAMEs become disabled; otherwise NAMEs are enabled. For example,No effect; the command does nothing. A zero exit code is returned.OLDPWD not setOPTSTRING contains the option letters to be recognized; if a letterOPTSTRING is not a colon. OPTERR has the value 1 by default.OSTYPE The version of Unix this version of Bash is running on.Obsolete. See ‘declare’.One line is read from the standard input, or from file descriptor FD if theOperators are evaluated in order of precedence. Sub-expressions inOther operators:Otherwise, an alias is defined for each NAME whose VALUE is given.Otherwise, the current value of the specified resource is printed.Output the ARGs. If -n is specified, the trailing newline isOutput the ARGs. If -n is specified, the trailing newline is suppressed.PATH A colon-separated list of directories to search whenPROMPT_COMMAND A command to be executed before the printing of eachPS1 The primary prompt string.PS2 The secondary prompt string.PWD The full pathname of the current directory.Place JOB_SPEC in the background, as if it had been started withPlace JOB_SPEC in the foreground, and make it the current job. IfPrint the accumulated user and system times for processes run fromPrint the current working directory. With the -P option, pwd printsRead ARGs as input to the shell and execute the resulting command(s).Read and execute commands from FILENAME and return. The pathnamesRemove NAMEs from the list of defined aliases. If the -a option is given,Removes entries from the directory stack. With no arguments,Resume the next iteration of the enclosing FOR, WHILE or UNTIL loop.Return a successful result.Return an unsuccessful result.Returns a status of 0 or 1 depending on the evaluation of the conditionalReturns the context of the current subroutine call.Run a set of commands in a group. This is one way to redirect anRun a shell builtin. This is useful when you wish to rename aRuns COMMAND with ARGS ignoring shell functions. If you have a shellSHELLOPTS A colon-separated list of enabled shell options.SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove allSIGNAL_SPEC is ignored by the shell and by the commands it invokes.SIGSPEC is not present, then SIGTERM is assumed. An argument of ‘-l’Selectively execute COMMANDS based upon WORD matching PATTERN. TheSend the processes named by PID (or JOB) the signal SIGSPEC. IfShell commands matching keyword `Shell commands matching keywords `Shell options: + Shell variables are allowed as operands. The name of the variableString operators:Suspend the execution of this shell until it receives a SIGCONTTERM The name of the current terminal type.TIMEFORMAT The output format for timing statistics displayed by theTIMEFORMAT: ‘%c’: invalid format characterThe -P flag forces a PATH search for each NAME, even if it is an alias,The -V option produces a more verbose description.The -c flag clears the directory stack by deleting all of the elements.The -f flag suppresses shell function lookup.The -l flag specifies that ‘dirs’ should not print shorthand versionsThe -s flag means to enable (set) each OPTNAME; the -u flagThe -t option causes read to time out and return failure if a complete lineThe EXPRESSION is evaluated according to the rules for arithmeticThe WORDS are expanded, generating a list of words. TheThe ‘for’ loop executes a sequence of commands for each member in aThe command ARG is to be read and executed when the shell receivesThe flags are:The given NAMEs are marked readonly and the values of these NAMEs mayThe if COMMANDS are executed. If the exit status is zero, then the thenThe levels are listed in order of decreasing precedence.The mail in %s has been read + The positional parameters from $N+1 ... are renamed to $1 ... If N isThe return status is the return status of PIPELINE. The ‘-p’ optionThe user file-creation mask is set to MODE. If MODE is omitted, or ifThe value of EXPR indicates how many call frames to go back before theThere are stopped jobs. + These shell commands are defined internally. Type ‘help’ to see this list. + Type ‘help name’ to find out more about the function ‘name’. + Use ‘info bash’ to find out more about the shell in general. + Use ‘man -k’ or ‘info’ to find out more about commands not in this list. + + A star (*) next to a name means that the command is disabled. + + This is a synonym for the “test†builtin, but the lastThis is similar to the ‘fg’ command. Resume a stopped or backgroundToggle the values of variables controlling optional behavior.Type ‘%s -c “help setâ€â€™ for more information about shell options. + Type ‘%s -c help’ for more information about shell builtin commands. + Ulimit provides control over the resources available to processesUnknown errorUsage: %s [GNU long option] [option] ... + %s [GNU long option] [option] script-file ... + Use “%s†to leave the shell. + Use the ‘bashbug’ command to report bugs. + Using + rather than - causes these flags to be turned off. TheUsing ‘+’ instead of ‘-’ turns off the given attribute instead. WhenVariables with the integer attribute have arithmetic evaluation (seeWORD, then the job whose name begins with WORD is used. Following theWait for the specified process and report its termination status. IfWhen displaying values of variables, -f displays a function's nameWhen the ‘==’ and ‘!=’ operators are used, the string to the right of theWith the ‘fc -s [pat=rep ...] [command]’ format, the command isWithout EXPR, returns returns “$line $filenameâ€. With EXPR,You can explicitly turn off the interpretation of the above charactersYou can see the directory stack with the ‘dirs’ command.You have mail in $_You have new mail in $_‘%c’: bad command‘%c’: invalid format character‘%c’: invalid symbolic mode character‘%c’: invalid symbolic mode operator‘%s’: cannot unbind‘%s’: invalid alias name‘%s’: invalid keymap name‘%s’: missing format character‘%s’: not a pid or valid job spec‘%s’: not a valid identifier‘%s’: unknown function name‘&’. If JOB_SPEC is not present, the shell's notion of the current‘)’ expected‘)’ expected, found %s‘-S’ is supplied, the current value of the mask is printed. The ‘-S’‘:’ expected for conditional expression‘alias’ with no arguments or with the -p option prints the list‘alias’, ‘keyword’, ‘function’, ‘builtin’, ‘file’ or ‘’, if NAME is an‘let’) done when the variable is assigned to.‘set -o’. With no options, or with the -p option, a list of all‘special’ builtins. The -n option displays a list of all disabled builtins.‘until’ COMMANDS has an exit status which is not zero.‘while’ COMMANDS has an exit status of zero.‘|’ is used to separate multiple patterns.a Readline variable. The non-option argument syntax is equivalenta shell script is invoked. When an option requires an argument,a short usage synopsis.alias substitution when the alias is expanded. Alias returnsalias, shell reserved word, shell function, shell builtin, disk file,all child processes of the shell are waited for.all_local_variables: no function context at current scopeallocatedan array variable. An argument of ‘--’ disables further optionan executable named ‘file’. This includes aliases, builtins, andan expression. The variable need not have its integer attributeand definition. The -F option restricts the display to functionand system CPU time spent executing PIPELINE when it terminates.and the return code is zero. N is a process ID; if it is not given,and the return code is zero. N may be a process ID or a jobanything in the history list.append the contents to the history list instead. ‘-a’ meansare executed and the if command completes. Otherwise, the else COMMANDSare executed, if present. The exit status is the exit status of the lastare separated by a colon (:). A null directory name is the same asare string operators as well, and numeric comparison operators.argumentargument expectedargument must be a literal ‘]’, to match the opening ‘[’.argument. In addition to the standard printf(1) formats, %b means toarguments are given, or if ‘-p’ is given, a list of all readonly namesas a format string for strftime(3) to print the time stamp associatedassumed. For each element in WORDS, NAME is set to that element, andattempted assignment to non-variableauto_resume Non-null means a command word appearing on a line byback up through the list with the ‘popd’ command.backslash escaping is disabled. The -d option causes read to continuebad array subscriptbad command typebad connectorbad jumpbad substitution: no closing ‘%s’ in %sbash_execute_unix_command: cannot find keymap for commandbe executed.be signal numbers for which names should be listed. Kill is a shellbefore attempting to read. If -a is supplied, the words read are assignedbeing a login shell if it is; just suspend anyway.bind '“\C-x\C-râ€: re-read-init-file'.bind accepts the following options:break N levels.bug: bad expassign tokenbug: unknown operationbuiltin for two reasons: it allows job IDs to be used instead ofbuiltin within the function itself.builtin without specifying a full pathname. If -n is used, thebuiltin, or function, and returns the name of the disk file that wouldby the ‘test’ builtin, and may be combined using the following operatorscan be used used to provide a stack trace.can only ‘return’ from a function or sourced scriptcan only be used in a functioncan only be used within a function; it makes the variable NAMEcannot allocate new file descriptor for bash input from fd %dcannot create temp file for here document: %scannot duplicate fd %d to fd %dcannot duplicate named pipe %s as fd %dcannot find %s in shared object %s: %scannot make child for command substitutioncannot make child for process substitutioncannot make pipe for command substitutioncannot make pipe for process substitutioncannot open named pipe %s for readingcannot open named pipe %s for writingcannot open shared object %s: %scannot redirect standard input from /dev/null: %scannot set and unset shell options simultaneouslycannot simultaneously unset a function and a variablecannot suspendcannot suspend a login shellcannot use ‘-f’ to make functionscannot use more than one of -anrwcannout reset nodelay mode for fd %dcauses ‘dirs’ to print the directory stack with one entry per line,causes output to be displayed in a format that may be reused as input.characters have been read. The -s option causes input coming from acharacters, which are simply copied to standard output, character escapecleared by deleting all of the entries. The ‘-d’ option deletescommand executed, or zero if no condition tested true.command name.command. If ARG is ‘-p’ then the trap commands associated withcommand_substitute: cannot duplicate pipe as fd 1completion specifications are printed in a way that allows them to becompletion: function ‘%s’ not foundconditional binary operator expectedcorresponding numbers. Note that a signal can be sent to the shellcorresponding to one of the displayed words, then NAME is setcorresponds is printed. If multiple NAME arguments are supplied withcould not find /tmp, please create!cprintf: ‘%c’: invalid format charactercurrent history to the history file; ‘-r’ means to read the file andcurrent one; the top frame is frame 0.default DIR. The variable CDPATH defines the search path fordeleting stopped job %d with process group %lddelimiters. If no NAMEs are supplied, the line read is stored in the REPLYdescribe_pid: %ld: no such piddetermine the expression's value.dir adds DIR to the directory stack at the top, making it thedir adds DIR to the directory stack at the top, making it thedirectory. With no arguments, exchanges the top two directories.division by 0division by 0 is trapped and flagged as an error. The followingdynamic loading not availableeach NAME, or, if no NAMEs are supplied, all completion specifications.each SIGNAL_SPEC are displayed. If no arguments are supplied or ifeach signal number. Each SIGNAL_SPEC is either a signal name in entire set of commands.error importing function definition for ‘%s’evaluation. Equivalent to “let EXPRESSIONâ€.expand backslash escape sequences in the corresponding argument, and %qexpected ‘)’exponent less than 0expression EXPRESSION. Expressions are composed of the same primaries usedexpression expectedexpression recursion level exceededexpressions are often used to examine the status of a file. Therefc is used to list or edit and re-execute commands from the history list.file descriptor out of rangefile that would be executed, or nothing if ‘type -t NAME’ would notfilename argument requiredfind their way onto the list with the ‘pushd’ command; you can getflag does the same thing, but the stack position is not prepended.flags can also be used upon invocation of the shell. The currentfollowing backslash-escaped characters is turned on:for PATH that is guaranteed to find all of the standard utilities. Ifformat specifications, each of which causes printing of the next successivefree: called with already freed block argumentfree: called with unallocated block argumentfree: start and end chunk sizes differfree: underflow detected; mh_nbytes out of rangefreedfrom subsequent NAMEs. An argument of ‘--’ disables further optionfrom the history file and append them to the history list.from the standard input. If the line consists of the numberfull pathname of NAME, and no path search is performed. The -rfunction as $0 .. $n.function called ‘ls’, and you wish to call the command ‘ls’, you canfunction. Some variables cannot be unset; also see readonly.functions, if and only if the -p flag is not also used.generated.getcwd: cannot access parent directoriesgetopts places that argument into the shell variable OPTARG.getopts reports errors in one of two ways. If the first charactergiven, then display the values of variables instead. The -p optionhashing disabledhave a visible scope restricted to that function and its children.histchars Characters controlling history expansion and quickhistory expansion on each ARG and display the result, without storinghistory positionhistory specificationidentifier expected after pre-increment or pre-decrementif $HISTFILE has a value, that is used, else ~/.bash_history.in $PATH are used to find the directory containing FILENAME. If anyin the variable REPLY. COMMANDS are executed after each selectionin turn, and if the exit status is zero, the corresponding then COMMANDSincrements of 512 bytes, and -u, which is an unscaled number ofincrements, except for -t, which is in seconds, -p, which is ininstead of following symbolic links; the -L option forces symbolic linksinterpreted as an octal number, otherwise it is a symbolic mode stringinvalid arithmetic baseinvalid baseinvalid character %d in exportstr for %sinvalid numberinvalid signal numberis a character string which contains three types of objects: plainis assumed. The PS3 prompt is then displayed and a line readis done in fixed-width integers with no check for overflow, thoughis encountered, read times out, or an invalid file descriptor is supplied asis followed by a colon, the option is expected to have an argument,is given, a list of all names that are exported in this shell isis omitted, the return status is that of the last command.is placed in NAME, OPTARG is unset, and a diagnostic message isis printed. The ‘-a’ option means to treat each NAME asis replaced by its value (coerced to a fixed-width integer) withinis supplied, FILE is executed with a null environment. The ‘-a’is that of the last command executed.its value is the default timeout. The return code is zero, unless end-of-filejob %d started without job controljob is used.job specification with a ‘&’ places the job in the background.job. If you specifiy DIGITS, then that job is used. If you specifyjobs from the job table; the -r option means to remove only running jobs.just resizedlast command: %s + less-than, less-than-or-equal, greater-than, or greater-than-or-equallike that accepted by chmod(1).list of items. If ‘in WORDS ...;’ is not present, then ‘in “$@â€â€™ islist of operators is grouped into levels of equal-precedence operators.lists the signal names; if arguments follow ‘-l’ they are assumed toloading, the -f option may be used to load new builtins from themake_here_document: bad instruction type %dmake_local_variable: no function context at current scopemake_redirection: redirection instruction ‘%d’ out of rangemakes pwd follow symbolic links.malloc: block on free list clobberedmalloc: failed assertion: %s + malloc: watch alert: %p %s marked so that SIGHUP is not sent to the job if the shell receives ameans to quote the argument in a way that can be reused as shell input.missing ‘)’missing ‘]’missing hex digit for \xmore arguments are given, they are parsed instead.name only.name. If that variable has a value, then cd to the value of thatnetwork operations not supportedno ‘=’ in exportstr for %sno closing ‘%c’ in %sno command foundno help topics match ‘%s’. Try ‘help help’ or ‘man -k %s’ or ‘info %s’.no job controlno job control in this shellno match: %sno other directoryno other options allowed with ‘-x’not be changed by subsequent assignment. If the -f option is given,not each is set.not given, it is assumed to be 1.not login shell: use ‘exit’notification are printed. JOBSPEC restricts output to that job. Theoctal numberof OPTSTRING is a colon, getopts uses silent error reporting. Inof aliases in the form alias NAME=VALUE on standard output.of directories which are relative to your home directory. This meansof input is not read within TIMEOUT seconds. If the TMOUT variable is set,omitted, it behaves as if it evaluates to 1.only ‘-p’ is given, trap prints the list of commands associated withonly meaningful in a ‘for’, ‘while’, or ‘until’ loopoperator is used as a pattern and pattern matching is performed. Theoption causes the shell to forget all remembered locations. The -doption causes the shell to forget the remembered location of each NAME.option is given, it is interpreted as follows:option is supplied, the string PROMPT is output without a trailing newlineoption makes the output symbolic; otherwise an octal number is output.option means to make set argv[0] of the executed process to NAME.option restricts the OPTNAMEs to those defined for use withor a signal number. ‘trap -l’ prints a list of signal names and theiror not it is enabled. The -s option restricts the output to the POSIX.2or unfound, respectively.otherwise a list of the builtins is printed. The -s optionotherwise.parameters and are assigned, in order, to $1, $2, .. $n. If noparentheses are evaluated first and may override the precedencepipeline are waited for.pop_scope: head of shell_variables not a temporary environment scopepop_var_context: head of shell_variables not a function contextpop_var_context: no global_variables contextpreceded by a number. If ‘in WORDS’ is not present, ‘in “$@â€â€™prepending the directory name with its position in the stack. The -ppreviously loaded with -f. If no non-option names are given, orprint_command: bad connector ‘%d’printed.printed. An argument of ‘-n’ says to remove the export propertyprinted. If -x is given, COMMAND is run after all job specificationsprintf formats and prints ARGUMENTS under control of the FORMAT. FORMATprinting of error messages, even if the first character ofprints the timing summary in a slightly different format. This usesprocess IDs, and, if you have reached the limit on processes thatprocess group leader.processes.processing.progcomp_insert: %s: NULL COMPSPECre-executed after the substitution OLD=NEW is performed.read error: %d: %srealloc: called with unallocated block argumentrealloc: start and end chunk sizes differrealloc: underflow detected; mh_nbytes out of rangerecursion stack underflowredirection error: cannot duplicate fdredisplayed. If EOF is read, the command completes. Any otherregister_alloc: %p already in table as allocated? + register_alloc: alloc table is full with FIND_ALLOC? + register_free: %p already in table as free? + remembered. If the -p option is supplied, PATHNAME is used as theremoves the top directory from the stack, and cd's to the newrequesting resizerequired argument is not found, getopts places a ‘:’ into NAME andreset to their original values. If ARG is the null string eachrespectively. Without options, the status of all active jobs isrestrictedrestricts the output for each builtin command matching PATTERN toreturn ‘file’.returns “$line $subroutine $filenameâ€; this extra informationreused as input. The -r option removes a completion specification forrules above.run_pending_traps: bad value in trap_list[%d]: %prun_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myselfruns the last command beginning with ‘cc’ and typing ‘r’ re-executessave_bash_input: buffer already exists for new fd %dsay “command lsâ€. If the -p option is given, a default value is usedseen, getopts places the option character found into OPTARG. If asequences which are converted and copied to the standard output, andset of expanded words is printed on the standard error, eachset of flags may be found in $-. The remaining n ARGs are positionalsets OPTARG to the option character found. If getopts is not insettable options is displayed, with an indication of whether orshared object FILENAME. The -d option will delete a builtinshell builtin to be a function, but need the functionality of theshell level (%d) too high, resetting to 1shell option ‘cdable_vars’ is set, then try the word as a variableshell variable $name, initializing name if it does not exist, andshell. If the first argument is ‘-l’, then place a dash in theshift countsignal(s) SIGNAL_SPEC. If ARG is absent all specified signals aresignal. The ‘-f’ if specified says not to complain about thissigprocmask: %d: invalid operationsilent mode, and an invalid option is seen, getopts places ‘?’ intospecification; if a job spec is given, all processes in the job'sspecified, gives detailed help on all commands matching PATTERN,started by the shell, on systems that allow such control. If anstatus indicates whether each OPTNAME is set or unset. The -ostring, which means the most recent command beginning with thatstring.subsequently executed commands. If the -f option is given,supplied with a non-zero NCHARS argument, read returns after NCHARSsuppressed. If the -e option is given, interpretation of thesyntax errorsyntax error in conditional expressionsyntax error in conditional expression: unexpected token ‘%s’syntax error in expressionsyntax error near ‘%s’syntax error near unexpected token ‘%s’syntax error: ‘((%s))’syntax error: ‘;’ unexpectedsyntax error: arithmetic expression requiredsyntax error: operand expectedsyntax error: unexpected end of fileterminal to not be echoed.than ARG2.that ‘~/bin’ might be displayed as ‘/homes/bfox/bin’. The -v flagthat appear in ARGS have been replaced with the process ID of that job'sthat may be used as input. If MODE begins with a digit, it isthe -V or -v option is given, a string is printed describing COMMAND.the -p option is supplied, a list of builtins is printed. Thethe COMMANDS are executed.the NAMEs refer to functions. If no NAMEs are given, or if ‘-p’the ‘-v’, unset will only act on variables. Given the ‘-f’ flag,the argument to -u.the current directory, i.e. ‘.’. If DIR begins with a slash (/),the current soft limit, the current hard limit, and no limit, respectively.the directory containing DIR. Alternative directory names in CDPATHthe evaluation of EXPR. Expressions may be unary or binary. Unarythe history entry at offset OFFSET. The ‘-w’ option writes out thethe history list as a single entry. The -p option means to performthe index of the next argument to be processed into the shellthe last N lines. The ‘-c’ option causes the history list to bethe last command.the physical directory, without any symbolic links; the -L optionthe second word to the second NAME, and so on, with leftover words assignedthe shell is interactive, readline is used to obtain the line. If -n isthe shell.the shell. If a SIGNAL_SPEC is DEBUG, ARG is executed after everythe special LIMIT values ‘soft’, ‘hard’, and ‘unlimited’ stand forthe stack, making the new top of the stack the current workingthe value of the TIMEFORMAT variable as the output format.then CDPATH is not used. If the directory is not found, and thethen functions corresponding to the NAMEs are so marked. If nothen remove all alias definitions.then the shell exits, unless the shell option ‘execfail’ is set.this mode, no error messages are printed. If an invalid option isto append history lines from this session to the history file.to be followed.to be used from within a shell function generating possible completions.to sequential indices of ARRAY, starting at zero. If -e is supplied andto that found in ~/.inputrc, but must be passed as a single argument:to that word. If the line is empty, WORDS and the prompt areto the last NAME. Only the characters found in $IFS are recognized as wordto the normal information; the -p option lists process id's only.to use the ‘test’ found in $PATH instead of the shell builtintoo many argumentstop directory.trap_handler: bad signal %dtries to unset a variable, and if that fails, then tries to unset atrue unless a NAME is given for which no alias has been defined.turned on to be used in an expression.unexpected EOF while looking for ‘]]’unexpected EOF while looking for matching ‘%c’unexpected EOF while looking for matching ‘)’unexpected argument ‘%s’ to conditional binary operatorunexpected argument ‘%s’ to conditional unary operatorunexpected argument to conditional binary operatorunexpected argument to conditional unary operatorunexpected token %d in conditional commandunexpected token ‘%c’ in conditional commandunexpected token ‘%s’ in conditional commandunexpected token ‘%s’, conditional binary operator expectedunexpected token ‘%s’, expected ‘)’unknown command errorunset will only act on functions. With neither flag, unset firstunsets each OPTNAME. The -q flag suppresses output; the exituntil a break command is executed.until the first character of DELIM is read, rather than newline. If the -pused in a function, makes NAMEs local, as with the ‘local’ command.used.value read causes NAME to be set to null. The line read is savedvalue too great for basevariable OPTIND. OPTIND is initialized to 1 each time the shell orvariable. If the -r option is given, this signifies ‘raw’ input, andvariable. The -P option says to use the physical directory structureversion, type ‘enable -n test’. On systems supporting dynamicwait: pid %ld is not a child of this shellwait_for: No record of process %ldwait_for_job: job %d is stoppedwarning: -C option may not work as you expectwarning: -F option may not work as you expectwhich should be separated from it by white space.will display the attributes and values of each NAME.with “kill -signal $$â€.with a ‘*’ have been modified. Argument of N says to list onlywith each displayed history entry. No time stamps are printed otherwise.with the -E option.write error: %sxmalloc: %s:%d: cannot allocate %lu bytesxmalloc: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)xmalloc: cannot allocate %lu bytesxmalloc: cannot allocate %lu bytes (%lu bytes allocated)xrealloc: %s:%d: cannot allocate %lu bytesxrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)xrealloc: cannot allocate %lu bytesxrealloc: cannot reallocate %lu bytes (%lu bytes allocated)you can create, you don't have to start a process to kill another one.you to use a disk command which has the same name as a shellzeroth arg passed to FILE, as login does. If the ‘-c’ option \ No newline at end of file diff -aNrc2 bash-2.05b-patched/po/en@quot.header bash-3.0/po/en@quot.header *** bash-2.05b-patched/po/en@quot.header Wed Dec 31 19:00:00 1969 --- bash-3.0/po/en@quot.header Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,22 ---- + # All this catalog "translates" are quotation characters. + # The msgids must be ASCII and therefore cannot contain real quotation + # characters, only substitutes like grave accent (0x60), apostrophe (0x27) + # and double quote (0x22). These substitutes look strange; see + # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html + # + # This catalog translates grave accent (0x60) and apostrophe (0x27) to + # left single quotation mark (U+2018) and right single quotation mark (U+2019). + # It also translates pairs of apostrophe (0x27) to + # left single quotation mark (U+2018) and right single quotation mark (U+2019) + # and pairs of quotation mark (0x22) to + # left double quotation mark (U+201C) and right double quotation mark (U+201D). + # + # When output to an UTF-8 terminal, the quotation characters appear perfectly. + # When output to an ISO-8859-1 terminal, the single quotation marks are + # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to + # grave/acute accent (by libiconv), and the double quotation marks are + # transliterated to 0x22. + # When output to an ASCII terminal, the single quotation marks are + # transliterated to apostrophes, and the double quotation marks are + # transliterated to 0x22. + # diff -aNrc2 bash-2.05b-patched/po/en@quot.po bash-3.0/po/en@quot.po *** bash-2.05b-patched/po/en@quot.po Wed Dec 31 19:00:00 1969 --- bash-3.0/po/en@quot.po Tue Jun 29 10:47:34 2004 *************** *** 0 **** --- 1,4283 ---- + # English translations for GNU bash package. + # Copyright (C) 2004 Free Software Foundation, Inc. + # This file is distributed under the same license as the GNU bash package. + # Automatically generated, 2004. + # + # All this catalog "translates" are quotation characters. + # The msgids must be ASCII and therefore cannot contain real quotation + # characters, only substitutes like grave accent (0x60), apostrophe (0x27) + # and double quote (0x22). These substitutes look strange; see + # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html + # + # This catalog translates grave accent (0x60) and apostrophe (0x27) to + # left single quotation mark (U+2018) and right single quotation mark (U+2019). + # It also translates pairs of apostrophe (0x27) to + # left single quotation mark (U+2018) and right single quotation mark (U+2019) + # and pairs of quotation mark (0x22) to + # left double quotation mark (U+201C) and right double quotation mark (U+201D). + # + # When output to an UTF-8 terminal, the quotation characters appear perfectly. + # When output to an ISO-8859-1 terminal, the single quotation marks are + # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to + # grave/acute accent (by libiconv), and the double quotation marks are + # transliterated to 0x22. + # When output to an ASCII terminal, the single quotation marks are + # transliterated to apostrophes, and the double quotation marks are + # transliterated to 0x22. + # + #: builtins/caller.def:128 builtins/caller.def:132 builtins/pushd.def:655 + #: builtins/pushd.def:663 builtins/pushd.def:666 builtins/pushd.def:676 + #: builtins/pushd.def:680 builtins/pushd.def:684 builtins/pushd.def:687 + #: builtins/pushd.def:690 builtins/pushd.def:699 builtins/pushd.def:703 + #: builtins/pushd.def:707 builtins/pushd.def:710 builtins.c:321 builtins.c:325 + #: builtins.c:390 builtins.c:392 builtins.c:401 builtins.c:404 builtins.c:408 + #: builtins.c:445 builtins.c:487 builtins.c:491 builtins.c:498 builtins.c:509 + #: builtins.c:513 builtins.c:552 builtins.c:555 builtins.c:559 builtins.c:562 + #: builtins.c:630 builtins.c:637 builtins.c:692 builtins.c:713 builtins.c:718 + #: builtins.c:722 builtins.c:745 builtins.c:835 builtins.c:919 builtins.c:921 + #: builtins.c:943 builtins.c:946 builtins.c:948 builtins.c:950 builtins.c:952 + #: builtins.c:954 builtins.c:957 builtins.c:966 builtins.c:968 builtins.c:973 + #: builtins.c:976 builtins.c:1019 builtins.c:1024 builtins.c:1028 + #: builtins.c:1032 builtins.c:1034 builtins.c:1047 builtins.c:1062 + #: builtins.c:1226 builtins.c:1231 builtins.c:1305 builtins.c:1309 + #: builtins.c:1313 builtins.c:1316 builtins.c:1319 builtins.c:1331 + #: builtins.c:1335 builtins.c:1339 builtins.c:1342 builtins.c:1354 + #: builtins.c:1362 builtins.c:1365 + msgid "" + msgstr "" + "Project-Id-Version: GNU bash 3.0-rc1\n" + "POT-Creation-Date: 2003-12-22 15:34-0500\n" + "PO-Revision-Date: 2003-12-22 15:34-0500\n" + "Last-Translator: Automatically generated\n" + "Language-Team: none\n" + "MIME-Version: 1.0\n" + "Content-Type: text/plain; charset=UTF-8\n" + "Content-Transfer-Encoding: 8bit\n" + "Report-Msgid-Bugs-To: bug-bash@gnu.org\n" + "Plural-Forms: nplurals=2; plural=(n != 1);\n" + + #: arrayfunc.c:45 + msgid "bad array subscript" + msgstr "bad array subscript" + + #: arrayfunc.c:306 + #, c-format + msgid "%s: cannot assign to non-numeric index" + msgstr "%s: cannot assign to non-numeric index" + + #: bashhist.c:321 + #, c-format + msgid "%s: cannot create: %s" + msgstr "%s: cannot create: %s" + + #: bashline.c:2791 + msgid "bash_execute_unix_command: cannot find keymap for command" + msgstr "bash_execute_unix_command: cannot find keymap for command" + + #: bashline.c:2840 + #, c-format + msgid "%s: first non-whitespace character is not `\"'" + msgstr "%s: first non-whitespace character is not ‘\"’" + + #: bashline.c:2869 + #, c-format + msgid "no closing `%c' in %s" + msgstr "no closing ‘%c’ in %s" + + #: bashline.c:2903 + #, c-format + msgid "%s: missing colon separator" + msgstr "%s: missing colon separator" + + #: builtins/alias.def:123 + #, c-format + msgid "`%s': invalid alias name" + msgstr "‘%s’: invalid alias name" + + #: builtins/bind.def:194 + #, c-format + msgid "`%s': invalid keymap name" + msgstr "‘%s’: invalid keymap name" + + #: builtins/bind.def:233 + #, c-format + msgid "%s: cannot read: %s" + msgstr "%s: cannot read: %s" + + #: builtins/bind.def:248 + #, c-format + msgid "`%s': cannot unbind" + msgstr "‘%s’: cannot unbind" + + #: builtins/bind.def:283 + #, c-format + msgid "`%s': unknown function name" + msgstr "‘%s’: unknown function name" + + #: builtins/bind.def:291 + #, c-format + msgid "%s is not bound to any keys.\n" + msgstr "%s is not bound to any keys.\n" + + #: builtins/bind.def:295 + #, c-format + msgid "%s can be invoked via " + msgstr "%s can be invoked via " + + #: builtins/break.def:128 + msgid "only meaningful in a `for', `while', or `until' loop" + msgstr "only meaningful in a ‘for’, ‘while’, or ‘until’ loop" + + #: builtins/caller.def:127 builtins.c:320 + msgid "Returns the context of the current subroutine call." + msgstr "Returns the context of the current subroutine call." + + #: builtins/caller.def:129 builtins.c:322 + msgid "Without EXPR, returns returns \"$line $filename\". With EXPR," + msgstr "Without EXPR, returns returns “$line $filenameâ€. With EXPR," + + #: builtins/caller.def:130 builtins.c:323 + msgid "returns \"$line $subroutine $filename\"; this extra information" + msgstr "returns “$line $subroutine $filenameâ€; this extra information" + + #: builtins/caller.def:131 builtins.c:324 + msgid "can be used used to provide a stack trace." + msgstr "can be used used to provide a stack trace." + + #: builtins/caller.def:133 builtins.c:326 + msgid "The value of EXPR indicates how many call frames to go back before the" + msgstr "The value of EXPR indicates how many call frames to go back before the" + + #: builtins/caller.def:134 builtins.c:327 + msgid "current one; the top frame is frame 0." + msgstr "current one; the top frame is frame 0." + + #: builtins/cd.def:188 + msgid "HOME not set" + msgstr "HOME not set" + + #: builtins/cd.def:200 + msgid "OLDPWD not set" + msgstr "OLDPWD not set" + + #: builtins/cd.def:357 + #, c-format + msgid "write error: %s" + msgstr "write error: %s" + + #: builtins/common.c:133 test.c:921 + msgid "too many arguments" + msgstr "too many arguments" + + #: builtins/common.c:157 shell.c:465 shell.c:737 + #, c-format + msgid "%s: option requires an argument" + msgstr "%s: option requires an argument" + + #: builtins/common.c:164 + #, c-format + msgid "%s: numeric argument required" + msgstr "%s: numeric argument required" + + #: builtins/common.c:171 + #, c-format + msgid "%s: not found" + msgstr "%s: not found" + + #: builtins/common.c:180 shell.c:750 + #, c-format + msgid "%s: invalid option" + msgstr "%s: invalid option" + + #: builtins/common.c:187 + #, c-format + msgid "%s: invalid option name" + msgstr "%s: invalid option name" + + #: builtins/common.c:194 general.c:229 general.c:234 + #, c-format + msgid "`%s': not a valid identifier" + msgstr "‘%s’: not a valid identifier" + + #: builtins/common.c:201 + #, c-format + msgid "%s: invalid number" + msgstr "%s: invalid number" + + #: builtins/common.c:208 + #, c-format + msgid "%s: invalid signal specification" + msgstr "%s: invalid signal specification" + + #: builtins/common.c:215 + #, c-format + msgid "`%s': not a pid or valid job spec" + msgstr "‘%s’: not a pid or valid job spec" + + #: builtins/common.c:222 error.c:453 + #, c-format + msgid "%s: readonly variable" + msgstr "%s: readonly variable" + + #: builtins/common.c:230 + #, c-format + msgid "%s: %s out of range" + msgstr "%s: %s out of range" + + #: builtins/common.c:230 builtins/common.c:232 + msgid "argument" + msgstr "argument" + + #: builtins/common.c:232 + #, c-format + msgid "%s out of range" + msgstr "%s out of range" + + #: builtins/common.c:240 + #, c-format + msgid "%s: no such job" + msgstr "%s: no such job" + + #: builtins/common.c:248 + #, c-format + msgid "%s: no job control" + msgstr "%s: no job control" + + #: builtins/common.c:250 + msgid "no job control" + msgstr "no job control" + + #: builtins/common.c:260 + #, c-format + msgid "%s: restricted" + msgstr "%s: restricted" + + #: builtins/common.c:262 + msgid "restricted" + msgstr "restricted" + + #: builtins/common.c:270 + #, c-format + msgid "%s: not a shell builtin" + msgstr "%s: not a shell builtin" + + #: builtins/common.c:486 + #, c-format + msgid "%s: error retrieving current directory: %s: %s\n" + msgstr "%s: error retrieving current directory: %s: %s\n" + + #: builtins/common.c:553 builtins/common.c:555 + #, c-format + msgid "%s: ambiguous job spec" + msgstr "%s: ambiguous job spec" + + #: builtins/complete.def:251 + #, c-format + msgid "%s: invalid action name" + msgstr "%s: invalid action name" + + #: builtins/complete.def:381 builtins/complete.def:524 + #, c-format + msgid "%s: no completion specification" + msgstr "%s: no completion specification" + + #: builtins/complete.def:571 + msgid "warning: -F option may not work as you expect" + msgstr "warning: -F option may not work as you expect" + + #: builtins/complete.def:573 + msgid "warning: -C option may not work as you expect" + msgstr "warning: -C option may not work as you expect" + + #: builtins/declare.def:105 + msgid "can only be used in a function" + msgstr "can only be used in a function" + + #: builtins/declare.def:295 + msgid "cannot use `-f' to make functions" + msgstr "cannot use ‘-f’ to make functions" + + #: builtins/declare.def:307 execute_cmd.c:3949 + #, c-format + msgid "%s: readonly function" + msgstr "%s: readonly function" + + #: builtins/declare.def:389 + #, c-format + msgid "%s: cannot destroy array variables in this way" + msgstr "%s: cannot destroy array variables in this way" + + #: builtins/enable.def:128 builtins/enable.def:136 + msgid "dynamic loading not available" + msgstr "dynamic loading not available" + + #: builtins/enable.def:303 + #, c-format + msgid "cannot open shared object %s: %s" + msgstr "cannot open shared object %s: %s" + + #: builtins/enable.def:326 + #, c-format + msgid "cannot find %s in shared object %s: %s" + msgstr "cannot find %s in shared object %s: %s" + + #: builtins/enable.def:450 + #, c-format + msgid "%s: not dynamically loaded" + msgstr "%s: not dynamically loaded" + + #: builtins/enable.def:465 + #, c-format + msgid "%s: cannot delete: %s" + msgstr "%s: cannot delete: %s" + + #: builtins/evalfile.c:128 execute_cmd.c:3821 shell.c:1395 + #, c-format + msgid "%s: is a directory" + msgstr "%s: is a directory" + + #: builtins/evalfile.c:133 + #, c-format + msgid "%s: not a regular file" + msgstr "%s: not a regular file" + + #: builtins/evalfile.c:141 + #, c-format + msgid "%s: file is too large" + msgstr "%s: file is too large" + + #: builtins/exec.def:205 + #, c-format + msgid "%s: cannot execute: %s" + msgstr "%s: cannot execute: %s" + + #: builtins/exit.def:83 + msgid "not login shell: use `exit'" + msgstr "not login shell: use ‘exit’" + + #: builtins/exit.def:111 + msgid "There are stopped jobs.\n" + msgstr "There are stopped jobs.\n" + + #: builtins/fc.def:252 + msgid "no command found" + msgstr "no command found" + + #: builtins/fc.def:317 + msgid "history specification" + msgstr "history specification" + + #: builtins/fc.def:338 + #, c-format + msgid "%s: cannot open temp file: %s" + msgstr "%s: cannot open temp file: %s" + + #: builtins/fg_bg.def:133 + #, c-format + msgid "job %d started without job control" + msgstr "job %d started without job control" + + #: builtins/getopt.c:109 + #, c-format + msgid "%s: illegal option -- %c\n" + msgstr "%s: illegal option -- %c\n" + + #: builtins/getopt.c:110 + #, c-format + msgid "%s: option requires an argument -- %c\n" + msgstr "%s: option requires an argument -- %c\n" + + #: builtins/hash.def:83 + msgid "hashing disabled" + msgstr "hashing disabled" + + #: builtins/hash.def:128 + #, c-format + msgid "%s: hash table empty\n" + msgstr "%s: hash table empty\n" + + #: builtins/help.def:108 + msgid "Shell commands matching keywords `" + msgstr "Shell commands matching keywords `" + + #: builtins/help.def:110 + msgid "Shell commands matching keyword `" + msgstr "Shell commands matching keyword `" + + #: builtins/help.def:138 + #, c-format + msgid "" + "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." + msgstr "" + "no help topics match ‘%s’. Try ‘help help’ or ‘man -k %s’ or ‘info %s’." + + #: builtins/help.def:164 + #, c-format + msgid "%s: cannot open: %s" + msgstr "%s: cannot open: %s" + + #: builtins/help.def:182 + msgid "" + "These shell commands are defined internally. Type `help' to see this list.\n" + "Type `help name' to find out more about the function `name'.\n" + "Use `info bash' to find out more about the shell in general.\n" + "Use `man -k' or `info' to find out more about commands not in this list.\n" + "\n" + "A star (*) next to a name means that the command is disabled.\n" + "\n" + msgstr "" + "These shell commands are defined internally. Type ‘help’ to see this list.\n" + "Type ‘help name’ to find out more about the function ‘name’.\n" + "Use ‘info bash’ to find out more about the shell in general.\n" + "Use ‘man -k’ or ‘info’ to find out more about commands not in this list.\n" + "\n" + "A star (*) next to a name means that the command is disabled.\n" + "\n" + + #: builtins/history.def:148 + msgid "cannot use more than one of -anrw" + msgstr "cannot use more than one of -anrw" + + #: builtins/history.def:180 + msgid "history position" + msgstr "history position" + + #: builtins/history.def:390 + #, c-format + msgid "%s: history expansion failed" + msgstr "%s: history expansion failed" + + #: builtins/jobs.def:99 + msgid "no other options allowed with `-x'" + msgstr "no other options allowed with ‘-x’" + + #: builtins/kill.def:187 + #, c-format + msgid "%s: arguments must be process or job IDs" + msgstr "%s: arguments must be process or job IDs" + + #: builtins/kill.def:248 + msgid "Unknown error" + msgstr "Unknown error" + + #: builtins/let.def:94 builtins/let.def:119 expr.c:496 expr.c:511 + msgid "expression expected" + msgstr "expression expected" + + #: builtins/printf.def:249 + #, c-format + msgid "`%s': missing format character" + msgstr "‘%s’: missing format character" + + #: builtins/printf.def:408 + #, c-format + msgid "`%c': invalid format character" + msgstr "‘%c’: invalid format character" + + #: builtins/printf.def:601 + msgid "missing hex digit for \\x" + msgstr "missing hex digit for \\x" + + #: builtins/pushd.def:168 + msgid "no other directory" + msgstr "no other directory" + + #: builtins/pushd.def:435 + msgid "" + msgstr "" + + #: builtins/pushd.def:652 builtins.c:1351 + msgid "Display the list of currently remembered directories. Directories" + msgstr "Display the list of currently remembered directories. Directories" + + #: builtins/pushd.def:653 builtins.c:1352 + msgid "find their way onto the list with the `pushd' command; you can get" + msgstr "find their way onto the list with the ‘pushd’ command; you can get" + + #: builtins/pushd.def:654 builtins.c:1353 + msgid "back up through the list with the `popd' command." + msgstr "back up through the list with the ‘popd’ command." + + #: builtins/pushd.def:656 builtins.c:1355 + msgid "The -l flag specifies that `dirs' should not print shorthand versions" + msgstr "The -l flag specifies that ‘dirs’ should not print shorthand versions" + + #: builtins/pushd.def:657 builtins.c:1356 + msgid "of directories which are relative to your home directory. This means" + msgstr "of directories which are relative to your home directory. This means" + + #: builtins/pushd.def:658 builtins.c:1357 + msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag" + msgstr "that ‘~/bin’ might be displayed as ‘/homes/bfox/bin’. The -v flag" + + #: builtins/pushd.def:659 builtins.c:1358 + msgid "causes `dirs' to print the directory stack with one entry per line," + msgstr "causes ‘dirs’ to print the directory stack with one entry per line," + + #: builtins/pushd.def:660 builtins.c:1359 + msgid "prepending the directory name with its position in the stack. The -p" + msgstr "prepending the directory name with its position in the stack. The -p" + + #: builtins/pushd.def:661 builtins.c:1360 + msgid "flag does the same thing, but the stack position is not prepended." + msgstr "flag does the same thing, but the stack position is not prepended." + + #: builtins/pushd.def:662 builtins.c:1361 + msgid "The -c flag clears the directory stack by deleting all of the elements." + msgstr "" + "The -c flag clears the directory stack by deleting all of the elements." + + #: builtins/pushd.def:664 + msgid "+N displays the Nth entry counting from the left of the list shown by" + msgstr "" + "+N displays the Nth entry counting from the left of the list shown by" + + #: builtins/pushd.def:665 builtins/pushd.def:668 + msgid " dirs when invoked without options, starting with zero." + msgstr " dirs when invoked without options, starting with zero." + + #: builtins/pushd.def:667 + msgid "" + "-N displays the Nth entry counting from the right of the list shown by" + msgstr "" + "-N displays the Nth entry counting from the right of the list shown by" + + #: builtins/pushd.def:673 builtins.c:1302 + msgid "Adds a directory to the top of the directory stack, or rotates" + msgstr "Adds a directory to the top of the directory stack, or rotates" + + #: builtins/pushd.def:674 builtins.c:1303 + msgid "the stack, making the new top of the stack the current working" + msgstr "the stack, making the new top of the stack the current working" + + #: builtins/pushd.def:675 builtins.c:1304 + msgid "directory. With no arguments, exchanges the top two directories." + msgstr "directory. With no arguments, exchanges the top two directories." + + #: builtins/pushd.def:677 + msgid "+N Rotates the stack so that the Nth directory (counting" + msgstr "+N Rotates the stack so that the Nth directory (counting" + + #: builtins/pushd.def:678 + msgid " from the left of the list shown by `dirs', starting with" + msgstr " from the left of the list shown by ‘dirs’, starting with" + + #: builtins/pushd.def:679 builtins/pushd.def:683 + msgid " zero) is at the top." + msgstr " zero) is at the top." + + #: builtins/pushd.def:681 + msgid "-N Rotates the stack so that the Nth directory (counting" + msgstr "-N Rotates the stack so that the Nth directory (counting" + + #: builtins/pushd.def:682 + msgid " from the right of the list shown by `dirs', starting with" + msgstr " from the right of the list shown by ‘dirs’, starting with" + + #: builtins/pushd.def:685 + msgid "-n suppress the normal change of directory when adding directories" + msgstr "-n suppress the normal change of directory when adding directories" + + #: builtins/pushd.def:686 + msgid " to the stack, so only the stack is manipulated." + msgstr " to the stack, so only the stack is manipulated." + + #: builtins/pushd.def:688 + msgid "dir adds DIR to the directory stack at the top, making it the" + msgstr "dir adds DIR to the directory stack at the top, making it the" + + #: builtins/pushd.def:689 + msgid " new current working directory." + msgstr " new current working directory." + + #: builtins/pushd.def:691 builtins/pushd.def:711 builtins.c:1320 + #: builtins.c:1343 + msgid "You can see the directory stack with the `dirs' command." + msgstr "You can see the directory stack with the ‘dirs’ command." + + #: builtins/pushd.def:696 builtins.c:1328 + msgid "Removes entries from the directory stack. With no arguments," + msgstr "Removes entries from the directory stack. With no arguments," + + #: builtins/pushd.def:697 builtins.c:1329 + msgid "removes the top directory from the stack, and cd's to the new" + msgstr "removes the top directory from the stack, and cd's to the new" + + #: builtins/pushd.def:698 builtins.c:1330 + msgid "top directory." + msgstr "top directory." + + #: builtins/pushd.def:700 + msgid "+N removes the Nth entry counting from the left of the list" + msgstr "+N removes the Nth entry counting from the left of the list" + + #: builtins/pushd.def:701 + msgid " shown by `dirs', starting with zero. For example: `popd +0'" + msgstr " shown by ‘dirs’, starting with zero. For example: ‘popd +0’" + + #: builtins/pushd.def:702 + msgid " removes the first directory, `popd +1' the second." + msgstr " removes the first directory, ‘popd +1’ the second." + + #: builtins/pushd.def:704 + msgid "-N removes the Nth entry counting from the right of the list" + msgstr "-N removes the Nth entry counting from the right of the list" + + #: builtins/pushd.def:705 + msgid " shown by `dirs', starting with zero. For example: `popd -0'" + msgstr " shown by ‘dirs’, starting with zero. For example: ‘popd -0’" + + #: builtins/pushd.def:706 + msgid " removes the last directory, `popd -1' the next to last." + msgstr " removes the last directory, ‘popd -1’ the next to last." + + #: builtins/pushd.def:708 + msgid "-n suppress the normal change of directory when removing directories" + msgstr "-n suppress the normal change of directory when removing directories" + + #: builtins/pushd.def:709 + msgid " from the stack, so only the stack is manipulated." + msgstr " from the stack, so only the stack is manipulated." + + #: builtins/read.def:207 + #, c-format + msgid "%s: invalid timeout specification" + msgstr "%s: invalid timeout specification" + + #: builtins/read.def:230 + #, c-format + msgid "%s: invalid file descriptor specification" + msgstr "%s: invalid file descriptor specification" + + #: builtins/read.def:237 + #, c-format + msgid "%d: invalid file descriptor: %s" + msgstr "%d: invalid file descriptor: %s" + + #: builtins/read.def:463 + #, c-format + msgid "read error: %d: %s" + msgstr "read error: %d: %s" + + #: builtins/return.def:63 + msgid "can only `return' from a function or sourced script" + msgstr "can only ‘return’ from a function or sourced script" + + #: builtins/set.def:743 + msgid "cannot simultaneously unset a function and a variable" + msgstr "cannot simultaneously unset a function and a variable" + + #: builtins/set.def:780 + #, c-format + msgid "%s: cannot unset" + msgstr "%s: cannot unset" + + #: builtins/set.def:787 + #, c-format + msgid "%s: cannot unset: readonly %s" + msgstr "%s: cannot unset: readonly %s" + + #: builtins/set.def:798 + #, c-format + msgid "%s: not an array variable" + msgstr "%s: not an array variable" + + #: builtins/setattr.def:165 + #, c-format + msgid "%s: not a function" + msgstr "%s: not a function" + + #: builtins/shift.def:66 builtins/shift.def:72 + msgid "shift count" + msgstr "shift count" + + #: builtins/shopt.def:226 + msgid "cannot set and unset shell options simultaneously" + msgstr "cannot set and unset shell options simultaneously" + + #: builtins/shopt.def:291 + #, c-format + msgid "%s: invalid shell option name" + msgstr "%s: invalid shell option name" + + #: builtins/source.def:117 + msgid "filename argument required" + msgstr "filename argument required" + + #: builtins/source.def:137 + #, c-format + msgid "%s: file not found" + msgstr "%s: file not found" + + #: builtins/suspend.def:93 + msgid "cannot suspend" + msgstr "cannot suspend" + + #: builtins/suspend.def:103 + msgid "cannot suspend a login shell" + msgstr "cannot suspend a login shell" + + #: builtins/type.def:231 + #, c-format + msgid "%s is aliased to `%s'\n" + msgstr "%s is aliased to ‘%s’\n" + + #: builtins/type.def:252 + #, c-format + msgid "%s is a shell keyword\n" + msgstr "%s is a shell keyword\n" + + #: builtins/type.def:272 + #, c-format + msgid "%s is a function\n" + msgstr "%s is a function\n" + + #: builtins/type.def:297 + #, c-format + msgid "%s is a shell builtin\n" + msgstr "%s is a shell builtin\n" + + #: builtins/type.def:318 + #, c-format + msgid "%s is %s\n" + msgstr "%s is %s\n" + + #: builtins/type.def:338 + #, c-format + msgid "%s is hashed (%s)\n" + msgstr "%s is hashed (%s)\n" + + #: builtins/ulimit.def:332 + #, c-format + msgid "%s: invalid limit argument" + msgstr "%s: invalid limit argument" + + #: builtins/ulimit.def:358 + #, c-format + msgid "`%c': bad command" + msgstr "‘%c’: bad command" + + #: builtins/ulimit.def:387 + #, c-format + msgid "%s: cannot get limit: %s" + msgstr "%s: cannot get limit: %s" + + #: builtins/ulimit.def:425 + #, c-format + msgid "%s: cannot modify limit: %s" + msgstr "%s: cannot modify limit: %s" + + #: builtins/umask.def:112 + msgid "octal number" + msgstr "octal number" + + #: builtins/umask.def:226 + #, c-format + msgid "`%c': invalid symbolic mode operator" + msgstr "‘%c’: invalid symbolic mode operator" + + #: builtins/umask.def:279 + #, c-format + msgid "`%c': invalid symbolic mode character" + msgstr "‘%c’: invalid symbolic mode character" + + #: error.c:165 + #, c-format + msgid "last command: %s\n" + msgstr "last command: %s\n" + + #: error.c:173 + msgid "Aborting..." + msgstr "Aborting..." + + #: error.c:260 + #, c-format + msgid "%s: warning: " + msgstr "%s: warning: " + + #: error.c:405 + msgid "unknown command error" + msgstr "unknown command error" + + #: error.c:406 + msgid "bad command type" + msgstr "bad command type" + + #: error.c:407 + msgid "bad connector" + msgstr "bad connector" + + #: error.c:408 + msgid "bad jump" + msgstr "bad jump" + + #: error.c:446 + #, c-format + msgid "%s: unbound variable" + msgstr "%s: unbound variable" + + #: eval.c:175 + msgid "timed out waiting for input: auto-logout\n" + msgstr "timed out waiting for input: auto-logout\n" + + #: execute_cmd.c:466 + #, c-format + msgid "cannot redirect standard input from /dev/null: %s" + msgstr "cannot redirect standard input from /dev/null: %s" + + #: execute_cmd.c:1036 + #, c-format + msgid "TIMEFORMAT: `%c': invalid format character" + msgstr "TIMEFORMAT: ‘%c’: invalid format character" + + #: execute_cmd.c:3521 + #, c-format + msgid "%s: restricted: cannot specify `/' in command names" + msgstr "%s: restricted: cannot specify ‘/’ in command names" + + #: execute_cmd.c:3609 + #, c-format + msgid "%s: command not found" + msgstr "%s: command not found" + + #: execute_cmd.c:3839 + #, c-format + msgid "%s: %s: bad interpreter" + msgstr "%s: %s: bad interpreter" + + #: execute_cmd.c:3876 + #, c-format + msgid "%s: cannot execute binary file" + msgstr "%s: cannot execute binary file" + + #: execute_cmd.c:3988 + #, c-format + msgid "cannot duplicate fd %d to fd %d" + msgstr "cannot duplicate fd %d to fd %d" + + #: expr.c:239 + msgid "expression recursion level exceeded" + msgstr "expression recursion level exceeded" + + #: expr.c:263 + msgid "recursion stack underflow" + msgstr "recursion stack underflow" + + #: expr.c:374 + msgid "syntax error in expression" + msgstr "syntax error in expression" + + #: expr.c:414 + msgid "attempted assignment to non-variable" + msgstr "attempted assignment to non-variable" + + #: expr.c:435 expr.c:440 expr.c:750 + msgid "division by 0" + msgstr "division by 0" + + #: expr.c:466 + msgid "bug: bad expassign token" + msgstr "bug: bad expassign token" + + #: expr.c:508 + msgid "`:' expected for conditional expression" + msgstr "‘:’ expected for conditional expression" + + #: expr.c:775 + msgid "exponent less than 0" + msgstr "exponent less than 0" + + #: expr.c:819 + msgid "identifier expected after pre-increment or pre-decrement" + msgstr "identifier expected after pre-increment or pre-decrement" + + #: expr.c:847 + msgid "missing `)'" + msgstr "missing ‘)’" + + #: expr.c:871 + msgid "syntax error: operand expected" + msgstr "syntax error: operand expected" + + #: expr.c:1146 + msgid "invalid number" + msgstr "invalid number" + + #: expr.c:1150 + msgid "invalid arithmetic base" + msgstr "invalid arithmetic base" + + #: expr.c:1170 + msgid "value too great for base" + msgstr "value too great for base" + + #: general.c:60 + msgid "getcwd: cannot access parent directories" + msgstr "getcwd: cannot access parent directories" + + #: input.c:231 + #, c-format + msgid "cannot allocate new file descriptor for bash input from fd %d" + msgstr "cannot allocate new file descriptor for bash input from fd %d" + + #: input.c:239 + #, c-format + msgid "save_bash_input: buffer already exists for new fd %d" + msgstr "save_bash_input: buffer already exists for new fd %d" + + #: jobs.c:693 + #, c-format + msgid "deleting stopped job %d with process group %ld" + msgstr "deleting stopped job %d with process group %ld" + + #: jobs.c:1001 + #, c-format + msgid "describe_pid: %ld: no such pid" + msgstr "describe_pid: %ld: no such pid" + + #: jobs.c:1632 nojobs.c:648 + #, c-format + msgid "wait: pid %ld is not a child of this shell" + msgstr "wait: pid %ld is not a child of this shell" + + #: jobs.c:1815 + #, c-format + msgid "wait_for: No record of process %ld" + msgstr "wait_for: No record of process %ld" + + #: jobs.c:2062 + #, c-format + msgid "wait_for_job: job %d is stopped" + msgstr "wait_for_job: job %d is stopped" + + #: jobs.c:2284 + #, c-format + msgid "%s: job has terminated" + msgstr "%s: job has terminated" + + #: jobs.c:2293 + #, c-format + msgid "%s: job %d already in background" + msgstr "%s: job %d already in background" + + #: jobs.c:3037 + msgid "no job control in this shell" + msgstr "no job control in this shell" + + #: lib/malloc/malloc.c:298 + #, c-format + msgid "malloc: failed assertion: %s\n" + msgstr "malloc: failed assertion: %s\n" + + #: lib/malloc/malloc.c:314 + #, c-format + msgid "" + "\r\n" + "malloc: %s:%d: assertion botched\r\n" + msgstr "" + "\r\n" + "malloc: %s:%d: assertion botched\r\n" + + #: lib/malloc/malloc.c:740 + msgid "malloc: block on free list clobbered" + msgstr "malloc: block on free list clobbered" + + #: lib/malloc/malloc.c:817 + msgid "free: called with already freed block argument" + msgstr "free: called with already freed block argument" + + #: lib/malloc/malloc.c:820 + msgid "free: called with unallocated block argument" + msgstr "free: called with unallocated block argument" + + #: lib/malloc/malloc.c:839 + msgid "free: underflow detected; mh_nbytes out of range" + msgstr "free: underflow detected; mh_nbytes out of range" + + #: lib/malloc/malloc.c:845 + msgid "free: start and end chunk sizes differ" + msgstr "free: start and end chunk sizes differ" + + #: lib/malloc/malloc.c:942 + msgid "realloc: called with unallocated block argument" + msgstr "realloc: called with unallocated block argument" + + #: lib/malloc/malloc.c:957 + msgid "realloc: underflow detected; mh_nbytes out of range" + msgstr "realloc: underflow detected; mh_nbytes out of range" + + #: lib/malloc/malloc.c:963 + msgid "realloc: start and end chunk sizes differ" + msgstr "realloc: start and end chunk sizes differ" + + #: lib/malloc/table.c:175 + msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" + msgstr "register_alloc: alloc table is full with FIND_ALLOC?\n" + + #: lib/malloc/table.c:182 + #, c-format + msgid "register_alloc: %p already in table as allocated?\n" + msgstr "register_alloc: %p already in table as allocated?\n" + + #: lib/malloc/table.c:218 + #, c-format + msgid "register_free: %p already in table as free?\n" + msgstr "register_free: %p already in table as free?\n" + + #: lib/malloc/watch.c:46 + msgid "allocated" + msgstr "allocated" + + #: lib/malloc/watch.c:48 + msgid "freed" + msgstr "freed" + + #: lib/malloc/watch.c:50 + msgid "requesting resize" + msgstr "requesting resize" + + #: lib/malloc/watch.c:52 + msgid "just resized" + msgstr "just resized" + + #: lib/malloc/watch.c:54 + msgid "bug: unknown operation" + msgstr "bug: unknown operation" + + #: lib/malloc/watch.c:56 + #, c-format + msgid "malloc: watch alert: %p %s " + msgstr "malloc: watch alert: %p %s " + + #: lib/sh/fmtulong.c:101 + msgid "invalid base" + msgstr "invalid base" + + #: lib/sh/netopen.c:158 + #, c-format + msgid "%s: host unknown" + msgstr "%s: host unknown" + + #: lib/sh/netopen.c:165 + #, c-format + msgid "%s: invalid service" + msgstr "%s: invalid service" + + #: lib/sh/netopen.c:296 + #, c-format + msgid "%s: bad network path specification" + msgstr "%s: bad network path specification" + + #: lib/sh/netopen.c:336 + msgid "network operations not supported" + msgstr "network operations not supported" + + #: mailcheck.c:382 + msgid "You have mail in $_" + msgstr "You have mail in $_" + + #: mailcheck.c:407 + msgid "You have new mail in $_" + msgstr "You have new mail in $_" + + #: mailcheck.c:423 + #, c-format + msgid "The mail in %s has been read\n" + msgstr "The mail in %s has been read\n" + + #: make_cmd.c:318 + msgid "syntax error: arithmetic expression required" + msgstr "syntax error: arithmetic expression required" + + #: make_cmd.c:320 + msgid "syntax error: `;' unexpected" + msgstr "syntax error: ‘;’ unexpected" + + #: make_cmd.c:321 + #, c-format + msgid "syntax error: `((%s))'" + msgstr "syntax error: ‘((%s))’" + + #: make_cmd.c:560 + #, c-format + msgid "make_here_document: bad instruction type %d" + msgstr "make_here_document: bad instruction type %d" + + #: make_cmd.c:730 + #, c-format + msgid "make_redirection: redirection instruction `%d' out of range" + msgstr "make_redirection: redirection instruction ‘%d’ out of range" + + #: parse.y:2726 + #, c-format + msgid "unexpected EOF while looking for matching `%c'" + msgstr "unexpected EOF while looking for matching ‘%c’" + + #: parse.y:3011 + msgid "unexpected EOF while looking for `]]'" + msgstr "unexpected EOF while looking for ‘]]’" + + #: parse.y:3016 + #, c-format + msgid "syntax error in conditional expression: unexpected token `%s'" + msgstr "syntax error in conditional expression: unexpected token ‘%s’" + + #: parse.y:3020 + msgid "syntax error in conditional expression" + msgstr "syntax error in conditional expression" + + #: parse.y:3098 + #, c-format + msgid "unexpected token `%s', expected `)'" + msgstr "unexpected token ‘%s’, expected ‘)’" + + #: parse.y:3102 + msgid "expected `)'" + msgstr "expected ‘)’" + + #: parse.y:3130 + #, c-format + msgid "unexpected argument `%s' to conditional unary operator" + msgstr "unexpected argument ‘%s’ to conditional unary operator" + + #: parse.y:3134 + msgid "unexpected argument to conditional unary operator" + msgstr "unexpected argument to conditional unary operator" + + #: parse.y:3171 + #, c-format + msgid "unexpected token `%s', conditional binary operator expected" + msgstr "unexpected token ‘%s’, conditional binary operator expected" + + #: parse.y:3175 + msgid "conditional binary operator expected" + msgstr "conditional binary operator expected" + + #: parse.y:3191 + #, c-format + msgid "unexpected argument `%s' to conditional binary operator" + msgstr "unexpected argument ‘%s’ to conditional binary operator" + + #: parse.y:3195 + msgid "unexpected argument to conditional binary operator" + msgstr "unexpected argument to conditional binary operator" + + #: parse.y:3206 + #, c-format + msgid "unexpected token `%c' in conditional command" + msgstr "unexpected token ‘%c’ in conditional command" + + #: parse.y:3209 + #, c-format + msgid "unexpected token `%s' in conditional command" + msgstr "unexpected token ‘%s’ in conditional command" + + #: parse.y:3213 + #, c-format + msgid "unexpected token %d in conditional command" + msgstr "unexpected token %d in conditional command" + + #: parse.y:4400 + #, c-format + msgid "syntax error near unexpected token `%s'" + msgstr "syntax error near unexpected token ‘%s’" + + #: parse.y:4418 + #, c-format + msgid "syntax error near `%s'" + msgstr "syntax error near ‘%s’" + + #: parse.y:4428 + msgid "syntax error: unexpected end of file" + msgstr "syntax error: unexpected end of file" + + #: parse.y:4428 + msgid "syntax error" + msgstr "syntax error" + + #: parse.y:4490 + #, c-format + msgid "Use \"%s\" to leave the shell.\n" + msgstr "Use “%s†to leave the shell.\n" + + #: parse.y:4649 + msgid "unexpected EOF while looking for matching `)'" + msgstr "unexpected EOF while looking for matching ‘)’" + + #: pcomplete.c:988 + #, c-format + msgid "completion: function `%s' not found" + msgstr "completion: function ‘%s’ not found" + + #: pcomplib.c:179 + #, c-format + msgid "progcomp_insert: %s: NULL COMPSPEC" + msgstr "progcomp_insert: %s: NULL COMPSPEC" + + #: print_cmd.c:260 + #, c-format + msgid "print_command: bad connector `%d'" + msgstr "print_command: bad connector ‘%d’" + + #: print_cmd.c:1172 + #, c-format + msgid "cprintf: `%c': invalid format character" + msgstr "cprintf: ‘%c’: invalid format character" + + #: redir.c:99 + msgid "file descriptor out of range" + msgstr "file descriptor out of range" + + #: redir.c:141 + #, c-format + msgid "%s: ambiguous redirect" + msgstr "%s: ambiguous redirect" + + #: redir.c:145 + #, c-format + msgid "%s: cannot overwrite existing file" + msgstr "%s: cannot overwrite existing file" + + #: redir.c:150 + #, c-format + msgid "%s: restricted: cannot redirect output" + msgstr "%s: restricted: cannot redirect output" + + #: redir.c:155 + #, c-format + msgid "cannot create temp file for here document: %s" + msgstr "cannot create temp file for here document: %s" + + #: redir.c:509 + msgid "/dev/(tcp|udp)/host/port not supported without networking" + msgstr "/dev/(tcp|udp)/host/port not supported without networking" + + #: redir.c:949 + msgid "redirection error: cannot duplicate fd" + msgstr "redirection error: cannot duplicate fd" + + #: shell.c:302 + msgid "could not find /tmp, please create!" + msgstr "could not find /tmp, please create!" + + #: shell.c:306 + msgid "/tmp must be a valid directory name" + msgstr "/tmp must be a valid directory name" + + #: shell.c:839 + #, c-format + msgid "%c%c: invalid option" + msgstr "%c%c: invalid option" + + #: shell.c:1590 + msgid "I have no name!" + msgstr "I have no name!" + + #: shell.c:1725 + #, c-format + msgid "" + "Usage:\t%s [GNU long option] [option] ...\n" + "\t%s [GNU long option] [option] script-file ...\n" + msgstr "" + "Usage:\t%s [GNU long option] [option] ...\n" + "\t%s [GNU long option] [option] script-file ...\n" + + #: shell.c:1727 + msgid "GNU long options:\n" + msgstr "GNU long options:\n" + + #: shell.c:1731 + msgid "Shell options:\n" + msgstr "Shell options:\n" + + #: shell.c:1732 + msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n" + msgstr "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n" + + #: shell.c:1747 + #, c-format + msgid "\t-%s or -o option\n" + msgstr "\t-%s or -o option\n" + + #: shell.c:1753 + #, c-format + msgid "Type `%s -c \"help set\"' for more information about shell options.\n" + msgstr "Type ‘%s -c “help setâ€â€™ for more information about shell options.\n" + + #: shell.c:1754 + #, c-format + msgid "Type `%s -c help' for more information about shell builtin commands.\n" + msgstr "Type ‘%s -c help’ for more information about shell builtin commands.\n" + + #: shell.c:1755 + msgid "Use the `bashbug' command to report bugs.\n" + msgstr "Use the ‘bashbug’ command to report bugs.\n" + + #: sig.c:485 + #, c-format + msgid "sigprocmask: %d: invalid operation" + msgstr "sigprocmask: %d: invalid operation" + + #: subst.c:1011 + #, c-format + msgid "bad substitution: no closing `%s' in %s" + msgstr "bad substitution: no closing ‘%s’ in %s" + + #: subst.c:2020 + #, c-format + msgid "%s: cannot assign list to array member" + msgstr "%s: cannot assign list to array member" + + #: subst.c:3516 subst.c:3532 + msgid "cannot make pipe for process substitution" + msgstr "cannot make pipe for process substitution" + + #: subst.c:3563 + msgid "cannot make child for process substitution" + msgstr "cannot make child for process substitution" + + #: subst.c:3608 + #, c-format + msgid "cannot open named pipe %s for reading" + msgstr "cannot open named pipe %s for reading" + + #: subst.c:3610 + #, c-format + msgid "cannot open named pipe %s for writing" + msgstr "cannot open named pipe %s for writing" + + #: subst.c:3618 + #, c-format + msgid "cannout reset nodelay mode for fd %d" + msgstr "cannout reset nodelay mode for fd %d" + + #: subst.c:3628 + #, c-format + msgid "cannot duplicate named pipe %s as fd %d" + msgstr "cannot duplicate named pipe %s as fd %d" + + #: subst.c:3803 + msgid "cannot make pipe for command substitution" + msgstr "cannot make pipe for command substitution" + + #: subst.c:3832 + msgid "cannot make child for command substitution" + msgstr "cannot make child for command substitution" + + #: subst.c:3849 + msgid "command_substitute: cannot duplicate pipe as fd 1" + msgstr "command_substitute: cannot duplicate pipe as fd 1" + + #: subst.c:4284 + #, c-format + msgid "%s: parameter null or not set" + msgstr "%s: parameter null or not set" + + #: subst.c:4529 + #, c-format + msgid "%s: substring expression < 0" + msgstr "%s: substring expression < 0" + + #: subst.c:5209 + #, c-format + msgid "%s: bad substitution" + msgstr "%s: bad substitution" + + #: subst.c:5283 + #, c-format + msgid "$%s: cannot assign in this way" + msgstr "$%s: cannot assign in this way" + + #: subst.c:6652 + #, c-format + msgid "no match: %s" + msgstr "no match: %s" + + #: test.c:154 + msgid "argument expected" + msgstr "argument expected" + + #: test.c:163 + #, c-format + msgid "%s: integer expression expected" + msgstr "%s: integer expression expected" + + #: test.c:361 + msgid "`)' expected" + msgstr "‘)’ expected" + + #: test.c:363 + #, c-format + msgid "`)' expected, found %s" + msgstr "‘)’ expected, found %s" + + #: test.c:378 test.c:787 test.c:790 + #, c-format + msgid "%s: unary operator expected" + msgstr "%s: unary operator expected" + + #: test.c:543 test.c:830 + #, c-format + msgid "%s: binary operator expected" + msgstr "%s: binary operator expected" + + #: test.c:905 + msgid "missing `]'" + msgstr "missing ‘]’" + + #: trap.c:194 + msgid "invalid signal number" + msgstr "invalid signal number" + + #: trap.c:309 + #, c-format + msgid "run_pending_traps: bad value in trap_list[%d]: %p" + msgstr "run_pending_traps: bad value in trap_list[%d]: %p" + + #: trap.c:313 + #, c-format + msgid "" + "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" + msgstr "" + "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" + + #: trap.c:349 + #, c-format + msgid "trap_handler: bad signal %d" + msgstr "trap_handler: bad signal %d" + + #: variables.c:310 + #, c-format + msgid "error importing function definition for `%s'" + msgstr "error importing function definition for ‘%s’" + + #: variables.c:670 + #, c-format + msgid "shell level (%d) too high, resetting to 1" + msgstr "shell level (%d) too high, resetting to 1" + + #: variables.c:1610 + msgid "make_local_variable: no function context at current scope" + msgstr "make_local_variable: no function context at current scope" + + #: variables.c:2709 + msgid "all_local_variables: no function context at current scope" + msgstr "all_local_variables: no function context at current scope" + + #: variables.c:2923 variables.c:2932 + #, c-format + msgid "invalid character %d in exportstr for %s" + msgstr "invalid character %d in exportstr for %s" + + #: variables.c:2938 + #, c-format + msgid "no `=' in exportstr for %s" + msgstr "no ‘=’ in exportstr for %s" + + #: variables.c:3363 + msgid "pop_var_context: head of shell_variables not a function context" + msgstr "pop_var_context: head of shell_variables not a function context" + + #: variables.c:3376 + msgid "pop_var_context: no global_variables context" + msgstr "pop_var_context: no global_variables context" + + #: variables.c:3442 + msgid "pop_scope: head of shell_variables not a temporary environment scope" + msgstr "pop_scope: head of shell_variables not a temporary environment scope" + + #: version.c:82 + msgid "Copyright (C) 2004 Free Software Foundation, Inc.\n" + msgstr "Copyright (C) 2004 Free Software Foundation, Inc.\n" + + #: xmalloc.c:93 + #, c-format + msgid "xmalloc: cannot allocate %lu bytes (%lu bytes allocated)" + msgstr "xmalloc: cannot allocate %lu bytes (%lu bytes allocated)" + + #: xmalloc.c:95 + #, c-format + msgid "xmalloc: cannot allocate %lu bytes" + msgstr "xmalloc: cannot allocate %lu bytes" + + #: xmalloc.c:115 + #, c-format + msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" + msgstr "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" + + #: xmalloc.c:117 + #, c-format + msgid "xrealloc: cannot allocate %lu bytes" + msgstr "xrealloc: cannot allocate %lu bytes" + + #: xmalloc.c:151 + #, c-format + msgid "xmalloc: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" + msgstr "xmalloc: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" + + #: xmalloc.c:153 + #, c-format + msgid "xmalloc: %s:%d: cannot allocate %lu bytes" + msgstr "xmalloc: %s:%d: cannot allocate %lu bytes" + + #: xmalloc.c:175 + #, c-format + msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)" + msgstr "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)" + + #: xmalloc.c:177 + #, c-format + msgid "xrealloc: %s:%d: cannot allocate %lu bytes" + msgstr "xrealloc: %s:%d: cannot allocate %lu bytes" + + #: builtins.c:244 + msgid "`alias' with no arguments or with the -p option prints the list" + msgstr "‘alias’ with no arguments or with the -p option prints the list" + + #: builtins.c:245 + msgid "of aliases in the form alias NAME=VALUE on standard output." + msgstr "of aliases in the form alias NAME=VALUE on standard output." + + #: builtins.c:246 + msgid "Otherwise, an alias is defined for each NAME whose VALUE is given." + msgstr "Otherwise, an alias is defined for each NAME whose VALUE is given." + + #: builtins.c:247 + msgid "A trailing space in VALUE causes the next word to be checked for" + msgstr "A trailing space in VALUE causes the next word to be checked for" + + #: builtins.c:248 + msgid "alias substitution when the alias is expanded. Alias returns" + msgstr "alias substitution when the alias is expanded. Alias returns" + + #: builtins.c:249 + msgid "true unless a NAME is given for which no alias has been defined." + msgstr "true unless a NAME is given for which no alias has been defined." + + #: builtins.c:257 + msgid "" + "Remove NAMEs from the list of defined aliases. If the -a option is given," + msgstr "" + "Remove NAMEs from the list of defined aliases. If the -a option is given," + + #: builtins.c:258 + msgid "then remove all alias definitions." + msgstr "then remove all alias definitions." + + #: builtins.c:266 + msgid "Bind a key sequence to a Readline function or a macro, or set" + msgstr "Bind a key sequence to a Readline function or a macro, or set" + + #: builtins.c:267 + msgid "a Readline variable. The non-option argument syntax is equivalent" + msgstr "a Readline variable. The non-option argument syntax is equivalent" + + #: builtins.c:268 + msgid "to that found in ~/.inputrc, but must be passed as a single argument:" + msgstr "to that found in ~/.inputrc, but must be passed as a single argument:" + + #: builtins.c:269 + msgid "bind '\"\\C-x\\C-r\": re-read-init-file'." + msgstr "bind '“\\C-x\\C-râ€: re-read-init-file'." + + #: builtins.c:270 + msgid "bind accepts the following options:" + msgstr "bind accepts the following options:" + + #: builtins.c:271 + msgid "" + " -m keymap Use `keymap' as the keymap for the duration of this" + msgstr "" + " -m keymap Use ‘keymap’ as the keymap for the duration of this" + + #: builtins.c:272 + msgid " command. Acceptable keymap names are emacs," + msgstr " command. Acceptable keymap names are emacs," + + #: builtins.c:273 + msgid "" + " emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move," + msgstr "" + " emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move," + + #: builtins.c:274 + msgid " vi-command, and vi-insert." + msgstr " vi-command, and vi-insert." + + #: builtins.c:275 + msgid " -l List names of functions." + msgstr " -l List names of functions." + + #: builtins.c:276 + msgid " -P List function names and bindings." + msgstr " -P List function names and bindings." + + #: builtins.c:277 + msgid " -p List functions and bindings in a form that can be" + msgstr " -p List functions and bindings in a form that can be" + + #: builtins.c:278 + msgid " reused as input." + msgstr " reused as input." + + #: builtins.c:279 + msgid " -r keyseq Remove the binding for KEYSEQ." + msgstr " -r keyseq Remove the binding for KEYSEQ." + + #: builtins.c:280 + msgid " -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when" + msgstr " -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when" + + #: builtins.c:281 + msgid "\t\t\t\tKEYSEQ is entered." + msgstr "\t\t\t\tKEYSEQ is entered." + + #: builtins.c:282 + msgid " -f filename Read key bindings from FILENAME." + msgstr " -f filename Read key bindings from FILENAME." + + #: builtins.c:283 + msgid " -q function-name Query about which keys invoke the named function." + msgstr " -q function-name Query about which keys invoke the named function." + + #: builtins.c:284 + msgid "" + " -u function-name Unbind all keys which are bound to the named function." + msgstr "" + " -u function-name Unbind all keys which are bound to the named function." + + #: builtins.c:285 + msgid " -V List variable names and values" + msgstr " -V List variable names and values" + + #: builtins.c:286 + msgid " -v List variable names and values in a form that can" + msgstr " -v List variable names and values in a form that can" + + #: builtins.c:287 + msgid " be reused as input." + msgstr " be reused as input." + + #: builtins.c:288 + msgid "" + " -S List key sequences that invoke macros and their values" + msgstr "" + " -S List key sequences that invoke macros and their values" + + #: builtins.c:289 + msgid "" + " -s List key sequences that invoke macros and their values" + msgstr "" + " -s List key sequences that invoke macros and their values" + + #: builtins.c:290 + msgid " in a form that can be reused as input." + msgstr " in a form that can be reused as input." + + #: builtins.c:297 + msgid "Exit from within a FOR, WHILE or UNTIL loop. If N is specified," + msgstr "Exit from within a FOR, WHILE or UNTIL loop. If N is specified," + + #: builtins.c:298 + msgid "break N levels." + msgstr "break N levels." + + #: builtins.c:304 + msgid "Resume the next iteration of the enclosing FOR, WHILE or UNTIL loop." + msgstr "Resume the next iteration of the enclosing FOR, WHILE or UNTIL loop." + + #: builtins.c:305 + msgid "If N is specified, resume at the N-th enclosing loop." + msgstr "If N is specified, resume at the N-th enclosing loop." + + #: builtins.c:311 + msgid "Run a shell builtin. This is useful when you wish to rename a" + msgstr "Run a shell builtin. This is useful when you wish to rename a" + + #: builtins.c:312 + msgid "shell builtin to be a function, but need the functionality of the" + msgstr "shell builtin to be a function, but need the functionality of the" + + #: builtins.c:313 + msgid "builtin within the function itself." + msgstr "builtin within the function itself." + + #: builtins.c:334 + msgid "Change the current directory to DIR. The variable $HOME is the" + msgstr "Change the current directory to DIR. The variable $HOME is the" + + #: builtins.c:335 + msgid "default DIR. The variable CDPATH defines the search path for" + msgstr "default DIR. The variable CDPATH defines the search path for" + + #: builtins.c:336 + msgid "the directory containing DIR. Alternative directory names in CDPATH" + msgstr "the directory containing DIR. Alternative directory names in CDPATH" + + #: builtins.c:337 + msgid "are separated by a colon (:). A null directory name is the same as" + msgstr "are separated by a colon (:). A null directory name is the same as" + + #: builtins.c:338 + msgid "the current directory, i.e. `.'. If DIR begins with a slash (/)," + msgstr "the current directory, i.e. ‘.’. If DIR begins with a slash (/)," + + #: builtins.c:339 + msgid "then CDPATH is not used. If the directory is not found, and the" + msgstr "then CDPATH is not used. If the directory is not found, and the" + + #: builtins.c:340 + msgid "shell option `cdable_vars' is set, then try the word as a variable" + msgstr "shell option ‘cdable_vars’ is set, then try the word as a variable" + + #: builtins.c:341 + msgid "name. If that variable has a value, then cd to the value of that" + msgstr "name. If that variable has a value, then cd to the value of that" + + #: builtins.c:342 + msgid "variable. The -P option says to use the physical directory structure" + msgstr "variable. The -P option says to use the physical directory structure" + + #: builtins.c:343 + msgid "" + "instead of following symbolic links; the -L option forces symbolic links" + msgstr "" + "instead of following symbolic links; the -L option forces symbolic links" + + #: builtins.c:344 + msgid "to be followed." + msgstr "to be followed." + + #: builtins.c:350 + msgid "Print the current working directory. With the -P option, pwd prints" + msgstr "Print the current working directory. With the -P option, pwd prints" + + #: builtins.c:351 + msgid "the physical directory, without any symbolic links; the -L option" + msgstr "the physical directory, without any symbolic links; the -L option" + + #: builtins.c:352 + msgid "makes pwd follow symbolic links." + msgstr "makes pwd follow symbolic links." + + #: builtins.c:358 + msgid "No effect; the command does nothing. A zero exit code is returned." + msgstr "No effect; the command does nothing. A zero exit code is returned." + + #: builtins.c:364 + msgid "Return a successful result." + msgstr "Return a successful result." + + #: builtins.c:370 + msgid "Return an unsuccessful result." + msgstr "Return an unsuccessful result." + + #: builtins.c:376 + msgid "Runs COMMAND with ARGS ignoring shell functions. If you have a shell" + msgstr "Runs COMMAND with ARGS ignoring shell functions. If you have a shell" + + #: builtins.c:377 + msgid "function called `ls', and you wish to call the command `ls', you can" + msgstr "function called ‘ls’, and you wish to call the command ‘ls’, you can" + + #: builtins.c:378 + msgid "say \"command ls\". If the -p option is given, a default value is used" + msgstr "say “command lsâ€. If the -p option is given, a default value is used" + + #: builtins.c:379 + msgid "for PATH that is guaranteed to find all of the standard utilities. If" + msgstr "for PATH that is guaranteed to find all of the standard utilities. If" + + #: builtins.c:380 + msgid "the -V or -v option is given, a string is printed describing COMMAND." + msgstr "the -V or -v option is given, a string is printed describing COMMAND." + + #: builtins.c:381 + msgid "The -V option produces a more verbose description." + msgstr "The -V option produces a more verbose description." + + #: builtins.c:387 + msgid "Declare variables and/or give them attributes. If no NAMEs are" + msgstr "Declare variables and/or give them attributes. If no NAMEs are" + + #: builtins.c:388 + msgid "given, then display the values of variables instead. The -p option" + msgstr "given, then display the values of variables instead. The -p option" + + #: builtins.c:389 + msgid "will display the attributes and values of each NAME." + msgstr "will display the attributes and values of each NAME." + + #: builtins.c:391 + msgid "The flags are:" + msgstr "The flags are:" + + #: builtins.c:393 + msgid " -a\tto make NAMEs arrays (if supported)" + msgstr " -a\tto make NAMEs arrays (if supported)" + + #: builtins.c:394 + msgid " -f\tto select from among function names only" + msgstr " -f\tto select from among function names only" + + #: builtins.c:395 + msgid "" + " -F\tto display function names (and line number and source file name if" + msgstr "" + " -F\tto display function names (and line number and source file name if" + + #: builtins.c:396 + msgid "\tdebugging) without definitions" + msgstr "\tdebugging) without definitions" + + #: builtins.c:397 + msgid " -i\tto make NAMEs have the `integer' attribute" + msgstr " -i\tto make NAMEs have the ‘integer’ attribute" + + #: builtins.c:398 + msgid " -r\tto make NAMEs readonly" + msgstr " -r\tto make NAMEs readonly" + + #: builtins.c:399 + msgid " -t\tto make NAMEs have the `trace' attribute" + msgstr " -t\tto make NAMEs have the ‘trace’ attribute" + + #: builtins.c:400 + msgid " -x\tto make NAMEs export" + msgstr " -x\tto make NAMEs export" + + #: builtins.c:402 + msgid "Variables with the integer attribute have arithmetic evaluation (see" + msgstr "Variables with the integer attribute have arithmetic evaluation (see" + + #: builtins.c:403 + msgid "`let') done when the variable is assigned to." + msgstr "‘let’) done when the variable is assigned to." + + #: builtins.c:405 + msgid "When displaying values of variables, -f displays a function's name" + msgstr "When displaying values of variables, -f displays a function's name" + + #: builtins.c:406 + msgid "and definition. The -F option restricts the display to function" + msgstr "and definition. The -F option restricts the display to function" + + #: builtins.c:407 + msgid "name only." + msgstr "name only." + + #: builtins.c:409 + msgid "Using `+' instead of `-' turns off the given attribute instead. When" + msgstr "Using ‘+’ instead of ‘-’ turns off the given attribute instead. When" + + #: builtins.c:410 + msgid "used in a function, makes NAMEs local, as with the `local' command." + msgstr "used in a function, makes NAMEs local, as with the ‘local’ command." + + #: builtins.c:416 + msgid "Obsolete. See `declare'." + msgstr "Obsolete. See ‘declare’." + + #: builtins.c:422 + msgid "Create a local variable called NAME, and give it VALUE. LOCAL" + msgstr "Create a local variable called NAME, and give it VALUE. LOCAL" + + #: builtins.c:423 + msgid "can only be used within a function; it makes the variable NAME" + msgstr "can only be used within a function; it makes the variable NAME" + + #: builtins.c:424 + msgid "have a visible scope restricted to that function and its children." + msgstr "have a visible scope restricted to that function and its children." + + #: builtins.c:431 + msgid "Output the ARGs. If -n is specified, the trailing newline is" + msgstr "Output the ARGs. If -n is specified, the trailing newline is" + + #: builtins.c:432 + msgid "suppressed. If the -e option is given, interpretation of the" + msgstr "suppressed. If the -e option is given, interpretation of the" + + #: builtins.c:433 + msgid "following backslash-escaped characters is turned on:" + msgstr "following backslash-escaped characters is turned on:" + + #: builtins.c:434 + msgid "\t\\a\talert (bell)" + msgstr "\t\\a\talert (bell)" + + #: builtins.c:435 + msgid "\t\\b\tbackspace" + msgstr "\t\\b\tbackspace" + + #: builtins.c:436 + msgid "\t\\c\tsuppress trailing newline" + msgstr "\t\\c\tsuppress trailing newline" + + #: builtins.c:437 + msgid "\t\\E\tescape character" + msgstr "\t\\E\tescape character" + + #: builtins.c:438 + msgid "\t\\f\tform feed" + msgstr "\t\\f\tform feed" + + #: builtins.c:439 + msgid "\t\\n\tnew line" + msgstr "\t\\n\tnew line" + + #: builtins.c:440 + msgid "\t\\r\tcarriage return" + msgstr "\t\\r\tcarriage return" + + #: builtins.c:441 + msgid "\t\\t\thorizontal tab" + msgstr "\t\\t\thorizontal tab" + + #: builtins.c:442 + msgid "\t\\v\tvertical tab" + msgstr "\t\\v\tvertical tab" + + #: builtins.c:443 + msgid "\t\\\\\tbackslash" + msgstr "\t\\\\\tbackslash" + + #: builtins.c:444 + msgid "\t\\num\tthe character whose ASCII code is NUM (octal)." + msgstr "\t\\num\tthe character whose ASCII code is NUM (octal)." + + #: builtins.c:446 + msgid "You can explicitly turn off the interpretation of the above characters" + msgstr "You can explicitly turn off the interpretation of the above characters" + + #: builtins.c:447 + msgid "with the -E option." + msgstr "with the -E option." + + #: builtins.c:455 + msgid "" + "Output the ARGs. If -n is specified, the trailing newline is suppressed." + msgstr "" + "Output the ARGs. If -n is specified, the trailing newline is suppressed." + + #: builtins.c:462 + msgid "Enable and disable builtin shell commands. This allows" + msgstr "Enable and disable builtin shell commands. This allows" + + #: builtins.c:463 + msgid "you to use a disk command which has the same name as a shell" + msgstr "you to use a disk command which has the same name as a shell" + + #: builtins.c:464 + msgid "builtin without specifying a full pathname. If -n is used, the" + msgstr "builtin without specifying a full pathname. If -n is used, the" + + #: builtins.c:465 + msgid "NAMEs become disabled; otherwise NAMEs are enabled. For example," + msgstr "NAMEs become disabled; otherwise NAMEs are enabled. For example," + + #: builtins.c:466 + msgid "to use the `test' found in $PATH instead of the shell builtin" + msgstr "to use the ‘test’ found in $PATH instead of the shell builtin" + + #: builtins.c:467 + msgid "version, type `enable -n test'. On systems supporting dynamic" + msgstr "version, type ‘enable -n test’. On systems supporting dynamic" + + #: builtins.c:468 + msgid "loading, the -f option may be used to load new builtins from the" + msgstr "loading, the -f option may be used to load new builtins from the" + + #: builtins.c:469 + msgid "shared object FILENAME. The -d option will delete a builtin" + msgstr "shared object FILENAME. The -d option will delete a builtin" + + #: builtins.c:470 + msgid "previously loaded with -f. If no non-option names are given, or" + msgstr "previously loaded with -f. If no non-option names are given, or" + + #: builtins.c:471 + msgid "the -p option is supplied, a list of builtins is printed. The" + msgstr "the -p option is supplied, a list of builtins is printed. The" + + #: builtins.c:472 + msgid "-a option means to print every builtin with an indication of whether" + msgstr "-a option means to print every builtin with an indication of whether" + + #: builtins.c:473 + msgid "" + "or not it is enabled. The -s option restricts the output to the POSIX.2" + msgstr "" + "or not it is enabled. The -s option restricts the output to the POSIX.2" + + #: builtins.c:474 + msgid "" + "`special' builtins. The -n option displays a list of all disabled builtins." + msgstr "" + "‘special’ builtins. The -n option displays a list of all disabled builtins." + + #: builtins.c:480 + msgid "Read ARGs as input to the shell and execute the resulting command(s)." + msgstr "Read ARGs as input to the shell and execute the resulting command(s)." + + #: builtins.c:486 + msgid "Getopts is used by shell procedures to parse positional parameters." + msgstr "Getopts is used by shell procedures to parse positional parameters." + + #: builtins.c:488 + msgid "OPTSTRING contains the option letters to be recognized; if a letter" + msgstr "OPTSTRING contains the option letters to be recognized; if a letter" + + #: builtins.c:489 + msgid "is followed by a colon, the option is expected to have an argument," + msgstr "is followed by a colon, the option is expected to have an argument," + + #: builtins.c:490 + msgid "which should be separated from it by white space." + msgstr "which should be separated from it by white space." + + #: builtins.c:492 + msgid "Each time it is invoked, getopts will place the next option in the" + msgstr "Each time it is invoked, getopts will place the next option in the" + + #: builtins.c:493 + msgid "shell variable $name, initializing name if it does not exist, and" + msgstr "shell variable $name, initializing name if it does not exist, and" + + #: builtins.c:494 + msgid "the index of the next argument to be processed into the shell" + msgstr "the index of the next argument to be processed into the shell" + + #: builtins.c:495 + msgid "variable OPTIND. OPTIND is initialized to 1 each time the shell or" + msgstr "variable OPTIND. OPTIND is initialized to 1 each time the shell or" + + #: builtins.c:496 + msgid "a shell script is invoked. When an option requires an argument," + msgstr "a shell script is invoked. When an option requires an argument," + + #: builtins.c:497 + msgid "getopts places that argument into the shell variable OPTARG." + msgstr "getopts places that argument into the shell variable OPTARG." + + #: builtins.c:499 + msgid "getopts reports errors in one of two ways. If the first character" + msgstr "getopts reports errors in one of two ways. If the first character" + + #: builtins.c:500 + msgid "of OPTSTRING is a colon, getopts uses silent error reporting. In" + msgstr "of OPTSTRING is a colon, getopts uses silent error reporting. In" + + #: builtins.c:501 + msgid "this mode, no error messages are printed. If an invalid option is" + msgstr "this mode, no error messages are printed. If an invalid option is" + + #: builtins.c:502 + msgid "seen, getopts places the option character found into OPTARG. If a" + msgstr "seen, getopts places the option character found into OPTARG. If a" + + #: builtins.c:503 + msgid "required argument is not found, getopts places a ':' into NAME and" + msgstr "required argument is not found, getopts places a ‘:’ into NAME and" + + #: builtins.c:504 + msgid "sets OPTARG to the option character found. If getopts is not in" + msgstr "sets OPTARG to the option character found. If getopts is not in" + + #: builtins.c:505 + msgid "silent mode, and an invalid option is seen, getopts places '?' into" + msgstr "silent mode, and an invalid option is seen, getopts places ‘?’ into" + + #: builtins.c:506 + msgid "NAME and unsets OPTARG. If a required argument is not found, a '?'" + msgstr "NAME and unsets OPTARG. If a required argument is not found, a ‘?’" + + #: builtins.c:507 + msgid "is placed in NAME, OPTARG is unset, and a diagnostic message is" + msgstr "is placed in NAME, OPTARG is unset, and a diagnostic message is" + + #: builtins.c:508 + msgid "printed." + msgstr "printed." + + #: builtins.c:510 + msgid "If the shell variable OPTERR has the value 0, getopts disables the" + msgstr "If the shell variable OPTERR has the value 0, getopts disables the" + + #: builtins.c:511 + msgid "printing of error messages, even if the first character of" + msgstr "printing of error messages, even if the first character of" + + #: builtins.c:512 + msgid "OPTSTRING is not a colon. OPTERR has the value 1 by default." + msgstr "OPTSTRING is not a colon. OPTERR has the value 1 by default." + + #: builtins.c:514 + msgid "Getopts normally parses the positional parameters ($0 - $9), but if" + msgstr "Getopts normally parses the positional parameters ($0 - $9), but if" + + #: builtins.c:515 + msgid "more arguments are given, they are parsed instead." + msgstr "more arguments are given, they are parsed instead." + + #: builtins.c:521 + msgid "Exec FILE, replacing this shell with the specified program." + msgstr "Exec FILE, replacing this shell with the specified program." + + #: builtins.c:522 + msgid "If FILE is not specified, the redirections take effect in this" + msgstr "If FILE is not specified, the redirections take effect in this" + + #: builtins.c:523 + msgid "shell. If the first argument is `-l', then place a dash in the" + msgstr "shell. If the first argument is ‘-l’, then place a dash in the" + + #: builtins.c:524 + msgid "zeroth arg passed to FILE, as login does. If the `-c' option" + msgstr "zeroth arg passed to FILE, as login does. If the ‘-c’ option" + + #: builtins.c:525 + msgid "is supplied, FILE is executed with a null environment. The `-a'" + msgstr "is supplied, FILE is executed with a null environment. The ‘-a’" + + #: builtins.c:526 + msgid "option means to make set argv[0] of the executed process to NAME." + msgstr "option means to make set argv[0] of the executed process to NAME." + + #: builtins.c:527 + msgid "If the file cannot be executed and the shell is not interactive," + msgstr "If the file cannot be executed and the shell is not interactive," + + #: builtins.c:528 + msgid "then the shell exits, unless the shell option `execfail' is set." + msgstr "then the shell exits, unless the shell option ‘execfail’ is set." + + #: builtins.c:534 + msgid "Exit the shell with a status of N. If N is omitted, the exit status" + msgstr "Exit the shell with a status of N. If N is omitted, the exit status" + + #: builtins.c:535 + msgid "is that of the last command executed." + msgstr "is that of the last command executed." + + #: builtins.c:541 + msgid "Logout of a login shell." + msgstr "Logout of a login shell." + + #: builtins.c:548 + msgid "" + "fc is used to list or edit and re-execute commands from the history list." + msgstr "" + "fc is used to list or edit and re-execute commands from the history list." + + #: builtins.c:549 + msgid "FIRST and LAST can be numbers specifying the range, or FIRST can be a" + msgstr "FIRST and LAST can be numbers specifying the range, or FIRST can be a" + + #: builtins.c:550 + msgid "string, which means the most recent command beginning with that" + msgstr "string, which means the most recent command beginning with that" + + #: builtins.c:551 + msgid "string." + msgstr "string." + + #: builtins.c:553 + msgid "" + " -e ENAME selects which editor to use. Default is FCEDIT, then EDITOR," + msgstr "" + " -e ENAME selects which editor to use. Default is FCEDIT, then EDITOR," + + #: builtins.c:554 + msgid " then vi." + msgstr " then vi." + + #: builtins.c:556 + msgid " -l means list lines instead of editing." + msgstr " -l means list lines instead of editing." + + #: builtins.c:557 + msgid " -n means no line numbers listed." + msgstr " -n means no line numbers listed." + + #: builtins.c:558 + msgid "" + " -r means reverse the order of the lines (making it newest listed first)." + msgstr "" + " -r means reverse the order of the lines (making it newest listed first)." + + #: builtins.c:560 + msgid "With the `fc -s [pat=rep ...] [command]' format, the command is" + msgstr "With the ‘fc -s [pat=rep ...] [command]’ format, the command is" + + #: builtins.c:561 + msgid "re-executed after the substitution OLD=NEW is performed." + msgstr "re-executed after the substitution OLD=NEW is performed." + + #: builtins.c:563 + msgid "A useful alias to use with this is r='fc -s', so that typing `r cc'" + msgstr "A useful alias to use with this is r='fc -s', so that typing ‘r cc’" + + #: builtins.c:564 + msgid "runs the last command beginning with `cc' and typing `r' re-executes" + msgstr "runs the last command beginning with ‘cc’ and typing ‘r’ re-executes" + + #: builtins.c:565 + msgid "the last command." + msgstr "the last command." + + #: builtins.c:573 + msgid "Place JOB_SPEC in the foreground, and make it the current job. If" + msgstr "Place JOB_SPEC in the foreground, and make it the current job. If" + + #: builtins.c:574 + msgid "JOB_SPEC is not present, the shell's notion of the current job is" + msgstr "JOB_SPEC is not present, the shell's notion of the current job is" + + #: builtins.c:575 + msgid "used." + msgstr "used." + + #: builtins.c:583 + msgid "Place JOB_SPEC in the background, as if it had been started with" + msgstr "Place JOB_SPEC in the background, as if it had been started with" + + #: builtins.c:584 + msgid "`&'. If JOB_SPEC is not present, the shell's notion of the current" + msgstr "‘&’. If JOB_SPEC is not present, the shell's notion of the current" + + #: builtins.c:585 + msgid "job is used." + msgstr "job is used." + + #: builtins.c:592 + msgid "For each NAME, the full pathname of the command is determined and" + msgstr "For each NAME, the full pathname of the command is determined and" + + #: builtins.c:593 + msgid "remembered. If the -p option is supplied, PATHNAME is used as the" + msgstr "remembered. If the -p option is supplied, PATHNAME is used as the" + + #: builtins.c:594 + msgid "full pathname of NAME, and no path search is performed. The -r" + msgstr "full pathname of NAME, and no path search is performed. The -r" + + #: builtins.c:595 + msgid "option causes the shell to forget all remembered locations. The -d" + msgstr "option causes the shell to forget all remembered locations. The -d" + + #: builtins.c:596 + msgid "option causes the shell to forget the remembered location of each NAME." + msgstr "" + "option causes the shell to forget the remembered location of each NAME." + + #: builtins.c:597 + msgid "If the -t option is supplied the full pathname to which each NAME" + msgstr "If the -t option is supplied the full pathname to which each NAME" + + #: builtins.c:598 + msgid "corresponds is printed. If multiple NAME arguments are supplied with" + msgstr "corresponds is printed. If multiple NAME arguments are supplied with" + + #: builtins.c:599 + msgid "-t, the NAME is printed before the hashed full pathname. The -l option" + msgstr "" + "-t, the NAME is printed before the hashed full pathname. The -l option" + + #: builtins.c:600 + msgid "causes output to be displayed in a format that may be reused as input." + msgstr "causes output to be displayed in a format that may be reused as input." + + #: builtins.c:601 + msgid "" + "If no arguments are given, information about remembered commands is " + "displayed." + msgstr "" + "If no arguments are given, information about remembered commands is " + "displayed." + + #: builtins.c:608 + msgid "Display helpful information about builtin commands. If PATTERN is" + msgstr "Display helpful information about builtin commands. If PATTERN is" + + #: builtins.c:609 + msgid "specified, gives detailed help on all commands matching PATTERN," + msgstr "specified, gives detailed help on all commands matching PATTERN," + + #: builtins.c:610 + msgid "otherwise a list of the builtins is printed. The -s option" + msgstr "otherwise a list of the builtins is printed. The -s option" + + #: builtins.c:611 + msgid "restricts the output for each builtin command matching PATTERN to" + msgstr "restricts the output for each builtin command matching PATTERN to" + + #: builtins.c:612 + msgid "a short usage synopsis." + msgstr "a short usage synopsis." + + #: builtins.c:620 + msgid "Display the history list with line numbers. Lines listed with" + msgstr "Display the history list with line numbers. Lines listed with" + + #: builtins.c:621 + msgid "with a `*' have been modified. Argument of N says to list only" + msgstr "with a ‘*’ have been modified. Argument of N says to list only" + + #: builtins.c:622 + msgid "the last N lines. The `-c' option causes the history list to be" + msgstr "the last N lines. The ‘-c’ option causes the history list to be" + + #: builtins.c:623 + msgid "cleared by deleting all of the entries. The `-d' option deletes" + msgstr "cleared by deleting all of the entries. The ‘-d’ option deletes" + + #: builtins.c:624 + msgid "the history entry at offset OFFSET. The `-w' option writes out the" + msgstr "the history entry at offset OFFSET. The ‘-w’ option writes out the" + + #: builtins.c:625 + msgid "current history to the history file; `-r' means to read the file and" + msgstr "current history to the history file; ‘-r’ means to read the file and" + + #: builtins.c:626 + msgid "append the contents to the history list instead. `-a' means" + msgstr "append the contents to the history list instead. ‘-a’ means" + + #: builtins.c:627 + msgid "to append history lines from this session to the history file." + msgstr "to append history lines from this session to the history file." + + #: builtins.c:628 + msgid "Argument `-n' means to read all history lines not already read" + msgstr "Argument ‘-n’ means to read all history lines not already read" + + #: builtins.c:629 + msgid "from the history file and append them to the history list." + msgstr "from the history file and append them to the history list." + + #: builtins.c:631 + msgid "If FILENAME is given, then that is used as the history file else" + msgstr "If FILENAME is given, then that is used as the history file else" + + #: builtins.c:632 + msgid "if $HISTFILE has a value, that is used, else ~/.bash_history." + msgstr "if $HISTFILE has a value, that is used, else ~/.bash_history." + + #: builtins.c:633 + msgid "If the -s option is supplied, the non-option ARGs are appended to" + msgstr "If the -s option is supplied, the non-option ARGs are appended to" + + #: builtins.c:634 + msgid "the history list as a single entry. The -p option means to perform" + msgstr "the history list as a single entry. The -p option means to perform" + + #: builtins.c:635 + msgid "history expansion on each ARG and display the result, without storing" + msgstr "history expansion on each ARG and display the result, without storing" + + #: builtins.c:636 + msgid "anything in the history list." + msgstr "anything in the history list." + + #: builtins.c:638 + msgid "If the $HISTTIMEFORMAT variable is set and not null, its value is used" + msgstr "If the $HISTTIMEFORMAT variable is set and not null, its value is used" + + #: builtins.c:639 + msgid "as a format string for strftime(3) to print the time stamp associated" + msgstr "as a format string for strftime(3) to print the time stamp associated" + + #: builtins.c:640 + msgid "" + "with each displayed history entry. No time stamps are printed otherwise." + msgstr "" + "with each displayed history entry. No time stamps are printed otherwise." + + #: builtins.c:648 + msgid "Lists the active jobs. The -l option lists process id's in addition" + msgstr "Lists the active jobs. The -l option lists process id's in addition" + + #: builtins.c:649 + msgid "to the normal information; the -p option lists process id's only." + msgstr "to the normal information; the -p option lists process id's only." + + #: builtins.c:650 + msgid "If -n is given, only processes that have changed status since the last" + msgstr "If -n is given, only processes that have changed status since the last" + + #: builtins.c:651 + msgid "notification are printed. JOBSPEC restricts output to that job. The" + msgstr "notification are printed. JOBSPEC restricts output to that job. The" + + #: builtins.c:652 + msgid "-r and -s options restrict output to running and stopped jobs only," + msgstr "-r and -s options restrict output to running and stopped jobs only," + + #: builtins.c:653 + msgid "respectively. Without options, the status of all active jobs is" + msgstr "respectively. Without options, the status of all active jobs is" + + #: builtins.c:654 + msgid "printed. If -x is given, COMMAND is run after all job specifications" + msgstr "printed. If -x is given, COMMAND is run after all job specifications" + + #: builtins.c:655 + msgid "" + "that appear in ARGS have been replaced with the process ID of that job's" + msgstr "" + "that appear in ARGS have been replaced with the process ID of that job's" + + #: builtins.c:656 + msgid "process group leader." + msgstr "process group leader." + + #: builtins.c:664 + msgid "" + "By default, removes each JOBSPEC argument from the table of active jobs." + msgstr "" + "By default, removes each JOBSPEC argument from the table of active jobs." + + #: builtins.c:665 + msgid "" + "If the -h option is given, the job is not removed from the table, but is" + msgstr "" + "If the -h option is given, the job is not removed from the table, but is" + + #: builtins.c:666 + msgid "marked so that SIGHUP is not sent to the job if the shell receives a" + msgstr "marked so that SIGHUP is not sent to the job if the shell receives a" + + #: builtins.c:667 + msgid "" + "SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove all" + msgstr "" + "SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove all" + + #: builtins.c:668 + msgid "" + "jobs from the job table; the -r option means to remove only running jobs." + msgstr "" + "jobs from the job table; the -r option means to remove only running jobs." + + #: builtins.c:675 + msgid "Send the processes named by PID (or JOB) the signal SIGSPEC. If" + msgstr "Send the processes named by PID (or JOB) the signal SIGSPEC. If" + + #: builtins.c:676 + msgid "SIGSPEC is not present, then SIGTERM is assumed. An argument of `-l'" + msgstr "SIGSPEC is not present, then SIGTERM is assumed. An argument of ‘-l’" + + #: builtins.c:677 + msgid "lists the signal names; if arguments follow `-l' they are assumed to" + msgstr "lists the signal names; if arguments follow ‘-l’ they are assumed to" + + #: builtins.c:678 + msgid "be signal numbers for which names should be listed. Kill is a shell" + msgstr "be signal numbers for which names should be listed. Kill is a shell" + + #: builtins.c:679 + msgid "builtin for two reasons: it allows job IDs to be used instead of" + msgstr "builtin for two reasons: it allows job IDs to be used instead of" + + #: builtins.c:680 + msgid "process IDs, and, if you have reached the limit on processes that" + msgstr "process IDs, and, if you have reached the limit on processes that" + + #: builtins.c:681 + msgid "you can create, you don't have to start a process to kill another one." + msgstr "you can create, you don't have to start a process to kill another one." + + #: builtins.c:687 + msgid "Each ARG is an arithmetic expression to be evaluated. Evaluation" + msgstr "Each ARG is an arithmetic expression to be evaluated. Evaluation" + + #: builtins.c:688 + msgid "is done in fixed-width integers with no check for overflow, though" + msgstr "is done in fixed-width integers with no check for overflow, though" + + #: builtins.c:689 + msgid "division by 0 is trapped and flagged as an error. The following" + msgstr "division by 0 is trapped and flagged as an error. The following" + + #: builtins.c:690 + msgid "list of operators is grouped into levels of equal-precedence operators." + msgstr "" + "list of operators is grouped into levels of equal-precedence operators." + + #: builtins.c:691 + msgid "The levels are listed in order of decreasing precedence." + msgstr "The levels are listed in order of decreasing precedence." + + #: builtins.c:693 + msgid "\tid++, id--\tvariable post-increment, post-decrement" + msgstr "\tid++, id--\tvariable post-increment, post-decrement" + + #: builtins.c:694 + msgid "\t++id, --id\tvariable pre-increment, pre-decrement" + msgstr "\t++id, --id\tvariable pre-increment, pre-decrement" + + #: builtins.c:695 + msgid "\t-, +\t\tunary minus, plus" + msgstr "\t-, +\t\tunary minus, plus" + + #: builtins.c:696 + msgid "\t!, ~\t\tlogical and bitwise negation" + msgstr "\t!, ~\t\tlogical and bitwise negation" + + #: builtins.c:697 + msgid "\t**\t\texponentiation" + msgstr "\t**\t\texponentiation" + + #: builtins.c:698 + msgid "\t*, /, %\t\tmultiplication, division, remainder" + msgstr "\t*, /, %\t\tmultiplication, division, remainder" + + #: builtins.c:699 + msgid "\t+, -\t\taddition, subtraction" + msgstr "\t+, -\t\taddition, subtraction" + + #: builtins.c:700 + msgid "\t<<, >>\t\tleft and right bitwise shifts" + msgstr "\t<<, >>\t\tleft and right bitwise shifts" + + #: builtins.c:701 + msgid "\t<=, >=, <, >\tcomparison" + msgstr "\t<=, >=, <, >\tcomparison" + + #: builtins.c:702 + msgid "\t==, !=\t\tequality, inequality" + msgstr "\t==, !=\t\tequality, inequality" + + #: builtins.c:703 + msgid "\t&\t\tbitwise AND" + msgstr "\t&\t\tbitwise AND" + + #: builtins.c:704 + msgid "\t^\t\tbitwise XOR" + msgstr "\t^\t\tbitwise XOR" + + #: builtins.c:705 + msgid "\t|\t\tbitwise OR" + msgstr "\t|\t\tbitwise OR" + + #: builtins.c:706 + msgid "\t&&\t\tlogical AND" + msgstr "\t&&\t\tlogical AND" + + #: builtins.c:707 + msgid "\t||\t\tlogical OR" + msgstr "\t||\t\tlogical OR" + + #: builtins.c:708 + msgid "\texpr ? expr : expr" + msgstr "\texpr ? expr : expr" + + #: builtins.c:709 + msgid "\t\t\tconditional operator" + msgstr "\t\t\tconditional operator" + + #: builtins.c:710 + msgid "\t=, *=, /=, %=," + msgstr "\t=, *=, /=, %=," + + #: builtins.c:711 + msgid "\t+=, -=, <<=, >>=," + msgstr "\t+=, -=, <<=, >>=," + + #: builtins.c:712 + msgid "\t&=, ^=, |=\tassignment" + msgstr "\t&=, ^=, |=\tassignment" + + #: builtins.c:714 + msgid "Shell variables are allowed as operands. The name of the variable" + msgstr "Shell variables are allowed as operands. The name of the variable" + + #: builtins.c:715 + msgid "is replaced by its value (coerced to a fixed-width integer) within" + msgstr "is replaced by its value (coerced to a fixed-width integer) within" + + #: builtins.c:716 + msgid "an expression. The variable need not have its integer attribute" + msgstr "an expression. The variable need not have its integer attribute" + + #: builtins.c:717 + msgid "turned on to be used in an expression." + msgstr "turned on to be used in an expression." + + #: builtins.c:719 + msgid "Operators are evaluated in order of precedence. Sub-expressions in" + msgstr "Operators are evaluated in order of precedence. Sub-expressions in" + + #: builtins.c:720 + msgid "parentheses are evaluated first and may override the precedence" + msgstr "parentheses are evaluated first and may override the precedence" + + #: builtins.c:721 + msgid "rules above." + msgstr "rules above." + + #: builtins.c:723 + msgid "If the last ARG evaluates to 0, let returns 1; 0 is returned" + msgstr "If the last ARG evaluates to 0, let returns 1; 0 is returned" + + #: builtins.c:724 + msgid "otherwise." + msgstr "otherwise." + + #: builtins.c:730 + msgid "" + "One line is read from the standard input, or from file descriptor FD if the" + msgstr "" + "One line is read from the standard input, or from file descriptor FD if the" + + #: builtins.c:731 + msgid "" + "-u option is supplied, and the first word is assigned to the first NAME," + msgstr "" + "-u option is supplied, and the first word is assigned to the first NAME," + + #: builtins.c:732 + msgid "" + "the second word to the second NAME, and so on, with leftover words assigned" + msgstr "" + "the second word to the second NAME, and so on, with leftover words assigned" + + #: builtins.c:733 + msgid "" + "to the last NAME. Only the characters found in $IFS are recognized as word" + msgstr "" + "to the last NAME. Only the characters found in $IFS are recognized as word" + + #: builtins.c:734 + msgid "" + "delimiters. If no NAMEs are supplied, the line read is stored in the REPLY" + msgstr "" + "delimiters. If no NAMEs are supplied, the line read is stored in the REPLY" + + #: builtins.c:735 + msgid "variable. If the -r option is given, this signifies `raw' input, and" + msgstr "variable. If the -r option is given, this signifies ‘raw’ input, and" + + #: builtins.c:736 + msgid "backslash escaping is disabled. The -d option causes read to continue" + msgstr "backslash escaping is disabled. The -d option causes read to continue" + + #: builtins.c:737 + msgid "" + "until the first character of DELIM is read, rather than newline. If the -p" + msgstr "" + "until the first character of DELIM is read, rather than newline. If the -p" + + #: builtins.c:738 + msgid "" + "option is supplied, the string PROMPT is output without a trailing newline" + msgstr "" + "option is supplied, the string PROMPT is output without a trailing newline" + + #: builtins.c:739 + msgid "" + "before attempting to read. If -a is supplied, the words read are assigned" + msgstr "" + "before attempting to read. If -a is supplied, the words read are assigned" + + #: builtins.c:740 + msgid "" + "to sequential indices of ARRAY, starting at zero. If -e is supplied and" + msgstr "" + "to sequential indices of ARRAY, starting at zero. If -e is supplied and" + + #: builtins.c:741 + msgid "" + "the shell is interactive, readline is used to obtain the line. If -n is" + msgstr "" + "the shell is interactive, readline is used to obtain the line. If -n is" + + #: builtins.c:742 + msgid "supplied with a non-zero NCHARS argument, read returns after NCHARS" + msgstr "supplied with a non-zero NCHARS argument, read returns after NCHARS" + + #: builtins.c:743 + msgid "characters have been read. The -s option causes input coming from a" + msgstr "characters have been read. The -s option causes input coming from a" + + #: builtins.c:744 + msgid "terminal to not be echoed." + msgstr "terminal to not be echoed." + + #: builtins.c:746 + msgid "" + "The -t option causes read to time out and return failure if a complete line" + msgstr "" + "The -t option causes read to time out and return failure if a complete line" + + #: builtins.c:747 + msgid "" + "of input is not read within TIMEOUT seconds. If the TMOUT variable is set," + msgstr "" + "of input is not read within TIMEOUT seconds. If the TMOUT variable is set," + + #: builtins.c:748 + msgid "" + "its value is the default timeout. The return code is zero, unless end-of-" + "file" + msgstr "" + "its value is the default timeout. The return code is zero, unless end-of-" + "file" + + #: builtins.c:749 + msgid "" + "is encountered, read times out, or an invalid file descriptor is supplied as" + msgstr "" + "is encountered, read times out, or an invalid file descriptor is supplied as" + + #: builtins.c:750 + msgid "the argument to -u." + msgstr "the argument to -u." + + #: builtins.c:756 + msgid "Causes a function to exit with the return value specified by N. If N" + msgstr "Causes a function to exit with the return value specified by N. If N" + + #: builtins.c:757 + msgid "is omitted, the return status is that of the last command." + msgstr "is omitted, the return status is that of the last command." + + #: builtins.c:763 + msgid " -a Mark variables which are modified or created for export." + msgstr " -a Mark variables which are modified or created for export." + + #: builtins.c:764 + msgid " -b Notify of job termination immediately." + msgstr " -b Notify of job termination immediately." + + #: builtins.c:765 + msgid " -e Exit immediately if a command exits with a non-zero status." + msgstr " -e Exit immediately if a command exits with a non-zero status." + + #: builtins.c:766 + msgid " -f Disable file name generation (globbing)." + msgstr " -f Disable file name generation (globbing)." + + #: builtins.c:767 + msgid " -h Remember the location of commands as they are looked up." + msgstr " -h Remember the location of commands as they are looked up." + + #: builtins.c:768 + msgid " -k All assignment arguments are placed in the environment for a" + msgstr " -k All assignment arguments are placed in the environment for a" + + #: builtins.c:769 + msgid " command, not just those that precede the command name." + msgstr " command, not just those that precede the command name." + + #: builtins.c:770 + msgid " -m Job control is enabled." + msgstr " -m Job control is enabled." + + #: builtins.c:771 + msgid " -n Read commands but do not execute them." + msgstr " -n Read commands but do not execute them." + + #: builtins.c:772 + msgid " -o option-name" + msgstr " -o option-name" + + #: builtins.c:773 + msgid " Set the variable corresponding to option-name:" + msgstr " Set the variable corresponding to option-name:" + + #: builtins.c:774 + msgid " allexport same as -a" + msgstr " allexport same as -a" + + #: builtins.c:775 + msgid " braceexpand same as -B" + msgstr " braceexpand same as -B" + + #: builtins.c:777 + msgid " emacs use an emacs-style line editing interface" + msgstr " emacs use an emacs-style line editing interface" + + #: builtins.c:779 + msgid " errexit same as -e" + msgstr " errexit same as -e" + + #: builtins.c:780 + msgid " errtrace same as -E" + msgstr " errtrace same as -E" + + #: builtins.c:781 + msgid " functrace same as -T" + msgstr " functrace same as -T" + + #: builtins.c:782 + msgid " hashall same as -h" + msgstr " hashall same as -h" + + #: builtins.c:784 + msgid " histexpand same as -H" + msgstr " histexpand same as -H" + + #: builtins.c:787 + msgid " history enable command history" + msgstr " history enable command history" + + #: builtins.c:789 + msgid " ignoreeof the shell will not exit upon reading EOF" + msgstr " ignoreeof the shell will not exit upon reading EOF" + + #: builtins.c:790 + msgid " interactive-comments" + msgstr " interactive-comments" + + #: builtins.c:791 + msgid "" + " allow comments to appear in interactive commands" + msgstr "" + " allow comments to appear in interactive commands" + + #: builtins.c:792 + msgid " keyword same as -k" + msgstr " keyword same as -k" + + #: builtins.c:793 + msgid " monitor same as -m" + msgstr " monitor same as -m" + + #: builtins.c:794 + msgid " noclobber same as -C" + msgstr " noclobber same as -C" + + #: builtins.c:795 + msgid " noexec same as -n" + msgstr " noexec same as -n" + + #: builtins.c:796 + msgid " noglob same as -f" + msgstr " noglob same as -f" + + #: builtins.c:797 + msgid " nolog currently accepted but ignored" + msgstr " nolog currently accepted but ignored" + + #: builtins.c:798 + msgid " notify same as -b" + msgstr " notify same as -b" + + #: builtins.c:799 + msgid " nounset same as -u" + msgstr " nounset same as -u" + + #: builtins.c:800 + msgid " onecmd same as -t" + msgstr " onecmd same as -t" + + #: builtins.c:801 + msgid " physical same as -P" + msgstr " physical same as -P" + + #: builtins.c:802 + msgid "" + " pipefail the return value of a pipeline is the status of" + msgstr "" + " pipefail the return value of a pipeline is the status of" + + #: builtins.c:803 + msgid "" + " the last command to exit with a non-zero status," + msgstr "" + " the last command to exit with a non-zero status," + + #: builtins.c:804 + msgid "" + " or zero if no command exited with a non-zero status" + msgstr "" + " or zero if no command exited with a non-zero status" + + #: builtins.c:805 + msgid " posix change the behavior of bash where the default" + msgstr " posix change the behavior of bash where the default" + + #: builtins.c:806 + msgid " operation differs from the 1003.2 standard to" + msgstr " operation differs from the 1003.2 standard to" + + #: builtins.c:807 + msgid " match the standard" + msgstr " match the standard" + + #: builtins.c:808 + msgid " privileged same as -p" + msgstr " privileged same as -p" + + #: builtins.c:809 + msgid " verbose same as -v" + msgstr " verbose same as -v" + + #: builtins.c:811 + msgid " vi use a vi-style line editing interface" + msgstr " vi use a vi-style line editing interface" + + #: builtins.c:813 + msgid " xtrace same as -x" + msgstr " xtrace same as -x" + + #: builtins.c:814 + msgid "" + " -p Turned on whenever the real and effective user ids do not match." + msgstr "" + " -p Turned on whenever the real and effective user ids do not match." + + #: builtins.c:815 + msgid " Disables processing of the $ENV file and importing of shell" + msgstr " Disables processing of the $ENV file and importing of shell" + + #: builtins.c:816 + msgid "" + " functions. Turning this option off causes the effective uid and" + msgstr "" + " functions. Turning this option off causes the effective uid and" + + #: builtins.c:817 + msgid " gid to be set to the real uid and gid." + msgstr " gid to be set to the real uid and gid." + + #: builtins.c:818 + msgid " -t Exit after reading and executing one command." + msgstr " -t Exit after reading and executing one command." + + #: builtins.c:819 + msgid " -u Treat unset variables as an error when substituting." + msgstr " -u Treat unset variables as an error when substituting." + + #: builtins.c:820 + msgid " -v Print shell input lines as they are read." + msgstr " -v Print shell input lines as they are read." + + #: builtins.c:821 + msgid " -x Print commands and their arguments as they are executed." + msgstr " -x Print commands and their arguments as they are executed." + + #: builtins.c:823 + msgid " -B the shell will perform brace expansion" + msgstr " -B the shell will perform brace expansion" + + #: builtins.c:825 + msgid " -C If set, disallow existing regular files to be overwritten" + msgstr " -C If set, disallow existing regular files to be overwritten" + + #: builtins.c:826 + msgid " by redirection of output." + msgstr " by redirection of output." + + #: builtins.c:827 + msgid " -E If set, the ERR trap is inherited by shell functions." + msgstr " -E If set, the ERR trap is inherited by shell functions." + + #: builtins.c:829 + msgid " -H Enable ! style history substitution. This flag is on" + msgstr " -H Enable ! style history substitution. This flag is on" + + #: builtins.c:830 + msgid " by default." + msgstr " by default." + + #: builtins.c:832 + msgid " -P If set, do not follow symbolic links when executing commands" + msgstr " -P If set, do not follow symbolic links when executing commands" + + #: builtins.c:833 + msgid " such as cd which change the current directory." + msgstr " such as cd which change the current directory." + + #: builtins.c:834 + msgid " -T If set, the DEBUG trap is inherited by shell functions." + msgstr " -T If set, the DEBUG trap is inherited by shell functions." + + #: builtins.c:836 + msgid "Using + rather than - causes these flags to be turned off. The" + msgstr "Using + rather than - causes these flags to be turned off. The" + + #: builtins.c:837 + msgid "flags can also be used upon invocation of the shell. The current" + msgstr "flags can also be used upon invocation of the shell. The current" + + #: builtins.c:838 + msgid "set of flags may be found in $-. The remaining n ARGs are positional" + msgstr "set of flags may be found in $-. The remaining n ARGs are positional" + + #: builtins.c:839 + msgid "parameters and are assigned, in order, to $1, $2, .. $n. If no" + msgstr "parameters and are assigned, in order, to $1, $2, .. $n. If no" + + #: builtins.c:840 + msgid "ARGs are given, all shell variables are printed." + msgstr "ARGs are given, all shell variables are printed." + + #: builtins.c:846 + msgid "For each NAME, remove the corresponding variable or function. Given" + msgstr "For each NAME, remove the corresponding variable or function. Given" + + #: builtins.c:847 + msgid "the `-v', unset will only act on variables. Given the `-f' flag," + msgstr "the ‘-v’, unset will only act on variables. Given the ‘-f’ flag," + + #: builtins.c:848 + msgid "unset will only act on functions. With neither flag, unset first" + msgstr "unset will only act on functions. With neither flag, unset first" + + #: builtins.c:849 + msgid "tries to unset a variable, and if that fails, then tries to unset a" + msgstr "tries to unset a variable, and if that fails, then tries to unset a" + + #: builtins.c:850 + msgid "function. Some variables cannot be unset; also see readonly." + msgstr "function. Some variables cannot be unset; also see readonly." + + #: builtins.c:856 + msgid "NAMEs are marked for automatic export to the environment of" + msgstr "NAMEs are marked for automatic export to the environment of" + + #: builtins.c:857 + msgid "subsequently executed commands. If the -f option is given," + msgstr "subsequently executed commands. If the -f option is given," + + #: builtins.c:858 + msgid "the NAMEs refer to functions. If no NAMEs are given, or if `-p'" + msgstr "the NAMEs refer to functions. If no NAMEs are given, or if ‘-p’" + + #: builtins.c:859 + msgid "is given, a list of all names that are exported in this shell is" + msgstr "is given, a list of all names that are exported in this shell is" + + #: builtins.c:860 + msgid "printed. An argument of `-n' says to remove the export property" + msgstr "printed. An argument of ‘-n’ says to remove the export property" + + #: builtins.c:861 + msgid "from subsequent NAMEs. An argument of `--' disables further option" + msgstr "from subsequent NAMEs. An argument of ‘--’ disables further option" + + #: builtins.c:862 builtins.c:874 + msgid "processing." + msgstr "processing." + + #: builtins.c:868 + msgid "The given NAMEs are marked readonly and the values of these NAMEs may" + msgstr "The given NAMEs are marked readonly and the values of these NAMEs may" + + #: builtins.c:869 + msgid "not be changed by subsequent assignment. If the -f option is given," + msgstr "not be changed by subsequent assignment. If the -f option is given," + + #: builtins.c:870 + msgid "then functions corresponding to the NAMEs are so marked. If no" + msgstr "then functions corresponding to the NAMEs are so marked. If no" + + #: builtins.c:871 + msgid "arguments are given, or if `-p' is given, a list of all readonly names" + msgstr "arguments are given, or if ‘-p’ is given, a list of all readonly names" + + #: builtins.c:872 + msgid "is printed. The `-a' option means to treat each NAME as" + msgstr "is printed. The ‘-a’ option means to treat each NAME as" + + #: builtins.c:873 + msgid "an array variable. An argument of `--' disables further option" + msgstr "an array variable. An argument of ‘--’ disables further option" + + #: builtins.c:880 + msgid "The positional parameters from $N+1 ... are renamed to $1 ... If N is" + msgstr "The positional parameters from $N+1 ... are renamed to $1 ... If N is" + + #: builtins.c:881 + msgid "not given, it is assumed to be 1." + msgstr "not given, it is assumed to be 1." + + #: builtins.c:887 builtins.c:896 + msgid "Read and execute commands from FILENAME and return. The pathnames" + msgstr "Read and execute commands from FILENAME and return. The pathnames" + + #: builtins.c:888 builtins.c:897 + msgid "in $PATH are used to find the directory containing FILENAME. If any" + msgstr "in $PATH are used to find the directory containing FILENAME. If any" + + #: builtins.c:889 builtins.c:898 + msgid "ARGUMENTS are supplied, they become the positional parameters when" + msgstr "ARGUMENTS are supplied, they become the positional parameters when" + + #: builtins.c:890 builtins.c:899 + msgid "FILENAME is executed." + msgstr "FILENAME is executed." + + #: builtins.c:906 + msgid "Suspend the execution of this shell until it receives a SIGCONT" + msgstr "Suspend the execution of this shell until it receives a SIGCONT" + + #: builtins.c:907 + msgid "signal. The `-f' if specified says not to complain about this" + msgstr "signal. The ‘-f’ if specified says not to complain about this" + + #: builtins.c:908 + msgid "being a login shell if it is; just suspend anyway." + msgstr "being a login shell if it is; just suspend anyway." + + #: builtins.c:915 + msgid "Exits with a status of 0 (true) or 1 (false) depending on" + msgstr "Exits with a status of 0 (true) or 1 (false) depending on" + + #: builtins.c:916 + msgid "the evaluation of EXPR. Expressions may be unary or binary. Unary" + msgstr "the evaluation of EXPR. Expressions may be unary or binary. Unary" + + #: builtins.c:917 + msgid "expressions are often used to examine the status of a file. There" + msgstr "expressions are often used to examine the status of a file. There" + + #: builtins.c:918 + msgid "are string operators as well, and numeric comparison operators." + msgstr "are string operators as well, and numeric comparison operators." + + #: builtins.c:920 + msgid "File operators:" + msgstr "File operators:" + + #: builtins.c:922 + msgid " -a FILE True if file exists." + msgstr " -a FILE True if file exists." + + #: builtins.c:923 + msgid " -b FILE True if file is block special." + msgstr " -b FILE True if file is block special." + + #: builtins.c:924 + msgid " -c FILE True if file is character special." + msgstr " -c FILE True if file is character special." + + #: builtins.c:925 + msgid " -d FILE True if file is a directory." + msgstr " -d FILE True if file is a directory." + + #: builtins.c:926 + msgid " -e FILE True if file exists." + msgstr " -e FILE True if file exists." + + #: builtins.c:927 + msgid " -f FILE True if file exists and is a regular file." + msgstr " -f FILE True if file exists and is a regular file." + + #: builtins.c:928 + msgid " -g FILE True if file is set-group-id." + msgstr " -g FILE True if file is set-group-id." + + #: builtins.c:929 + msgid " -h FILE True if file is a symbolic link." + msgstr " -h FILE True if file is a symbolic link." + + #: builtins.c:930 + msgid " -L FILE True if file is a symbolic link." + msgstr " -L FILE True if file is a symbolic link." + + #: builtins.c:931 + msgid " -k FILE True if file has its `sticky' bit set." + msgstr " -k FILE True if file has its ‘sticky’ bit set." + + #: builtins.c:932 + msgid " -p FILE True if file is a named pipe." + msgstr " -p FILE True if file is a named pipe." + + #: builtins.c:933 + msgid " -r FILE True if file is readable by you." + msgstr " -r FILE True if file is readable by you." + + #: builtins.c:934 + msgid " -s FILE True if file exists and is not empty." + msgstr " -s FILE True if file exists and is not empty." + + #: builtins.c:935 + msgid " -S FILE True if file is a socket." + msgstr " -S FILE True if file is a socket." + + #: builtins.c:936 + msgid " -t FD True if FD is opened on a terminal." + msgstr " -t FD True if FD is opened on a terminal." + + #: builtins.c:937 + msgid " -u FILE True if the file is set-user-id." + msgstr " -u FILE True if the file is set-user-id." + + #: builtins.c:938 + msgid " -w FILE True if the file is writable by you." + msgstr " -w FILE True if the file is writable by you." + + #: builtins.c:939 + msgid " -x FILE True if the file is executable by you." + msgstr " -x FILE True if the file is executable by you." + + #: builtins.c:940 + msgid " -O FILE True if the file is effectively owned by you." + msgstr " -O FILE True if the file is effectively owned by you." + + #: builtins.c:941 + msgid " -G FILE True if the file is effectively owned by your group." + msgstr "" + " -G FILE True if the file is effectively owned by your group." + + #: builtins.c:942 + msgid "" + " -N FILE True if the file has been modified since it was last read." + msgstr "" + " -N FILE True if the file has been modified since it was last read." + + #: builtins.c:944 + msgid " FILE1 -nt FILE2 True if file1 is newer than file2 (according to" + msgstr " FILE1 -nt FILE2 True if file1 is newer than file2 (according to" + + #: builtins.c:945 + msgid " modification date)." + msgstr " modification date)." + + #: builtins.c:947 + msgid " FILE1 -ot FILE2 True if file1 is older than file2." + msgstr " FILE1 -ot FILE2 True if file1 is older than file2." + + #: builtins.c:949 + msgid " FILE1 -ef FILE2 True if file1 is a hard link to file2." + msgstr " FILE1 -ef FILE2 True if file1 is a hard link to file2." + + #: builtins.c:951 + msgid "String operators:" + msgstr "String operators:" + + #: builtins.c:953 + msgid " -z STRING True if string is empty." + msgstr " -z STRING True if string is empty." + + #: builtins.c:955 + msgid " -n STRING" + msgstr " -n STRING" + + #: builtins.c:956 + msgid " STRING True if string is not empty." + msgstr " STRING True if string is not empty." + + #: builtins.c:958 + msgid " STRING1 = STRING2" + msgstr " STRING1 = STRING2" + + #: builtins.c:959 + msgid " True if the strings are equal." + msgstr " True if the strings are equal." + + #: builtins.c:960 + msgid " STRING1 != STRING2" + msgstr " STRING1 != STRING2" + + #: builtins.c:961 + msgid " True if the strings are not equal." + msgstr " True if the strings are not equal." + + #: builtins.c:962 + msgid " STRING1 < STRING2" + msgstr " STRING1 < STRING2" + + #: builtins.c:963 + msgid "" + " True if STRING1 sorts before STRING2 lexicographically." + msgstr "" + " True if STRING1 sorts before STRING2 lexicographically." + + #: builtins.c:964 + msgid " STRING1 > STRING2" + msgstr " STRING1 > STRING2" + + #: builtins.c:965 + msgid "" + " True if STRING1 sorts after STRING2 lexicographically." + msgstr "" + " True if STRING1 sorts after STRING2 lexicographically." + + #: builtins.c:967 + msgid "Other operators:" + msgstr "Other operators:" + + #: builtins.c:969 + msgid " -o OPTION True if the shell option OPTION is enabled." + msgstr " -o OPTION True if the shell option OPTION is enabled." + + #: builtins.c:970 + msgid " ! EXPR True if expr is false." + msgstr " ! EXPR True if expr is false." + + #: builtins.c:971 + msgid " EXPR1 -a EXPR2 True if both expr1 AND expr2 are true." + msgstr " EXPR1 -a EXPR2 True if both expr1 AND expr2 are true." + + #: builtins.c:972 + msgid " EXPR1 -o EXPR2 True if either expr1 OR expr2 is true." + msgstr " EXPR1 -o EXPR2 True if either expr1 OR expr2 is true." + + #: builtins.c:974 + msgid " arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne," + msgstr " arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne," + + #: builtins.c:975 + msgid " -lt, -le, -gt, or -ge." + msgstr " -lt, -le, -gt, or -ge." + + #: builtins.c:977 + msgid "Arithmetic binary operators return true if ARG1 is equal, not-equal," + msgstr "Arithmetic binary operators return true if ARG1 is equal, not-equal," + + #: builtins.c:978 + msgid "less-than, less-than-or-equal, greater-than, or greater-than-or-equal" + msgstr "less-than, less-than-or-equal, greater-than, or greater-than-or-equal" + + #: builtins.c:979 + msgid "than ARG2." + msgstr "than ARG2." + + #: builtins.c:985 + msgid "This is a synonym for the \"test\" builtin, but the last" + msgstr "This is a synonym for the “test†builtin, but the last" + + #: builtins.c:986 + msgid "argument must be a literal `]', to match the opening `['." + msgstr "argument must be a literal ‘]’, to match the opening ‘[’." + + #: builtins.c:992 + msgid "Print the accumulated user and system times for processes run from" + msgstr "Print the accumulated user and system times for processes run from" + + #: builtins.c:993 + msgid "the shell." + msgstr "the shell." + + #: builtins.c:999 + msgid "The command ARG is to be read and executed when the shell receives" + msgstr "The command ARG is to be read and executed when the shell receives" + + #: builtins.c:1000 + msgid "signal(s) SIGNAL_SPEC. If ARG is absent all specified signals are" + msgstr "signal(s) SIGNAL_SPEC. If ARG is absent all specified signals are" + + #: builtins.c:1001 + msgid "reset to their original values. If ARG is the null string each" + msgstr "reset to their original values. If ARG is the null string each" + + #: builtins.c:1002 + msgid "SIGNAL_SPEC is ignored by the shell and by the commands it invokes." + msgstr "SIGNAL_SPEC is ignored by the shell and by the commands it invokes." + + #: builtins.c:1003 + msgid "If a SIGNAL_SPEC is EXIT (0) the command ARG is executed on exit from" + msgstr "If a SIGNAL_SPEC is EXIT (0) the command ARG is executed on exit from" + + #: builtins.c:1004 + msgid "the shell. If a SIGNAL_SPEC is DEBUG, ARG is executed after every" + msgstr "the shell. If a SIGNAL_SPEC is DEBUG, ARG is executed after every" + + #: builtins.c:1005 + msgid "command. If ARG is `-p' then the trap commands associated with" + msgstr "command. If ARG is ‘-p’ then the trap commands associated with" + + #: builtins.c:1006 + msgid "each SIGNAL_SPEC are displayed. If no arguments are supplied or if" + msgstr "each SIGNAL_SPEC are displayed. If no arguments are supplied or if" + + #: builtins.c:1007 + msgid "only `-p' is given, trap prints the list of commands associated with" + msgstr "only ‘-p’ is given, trap prints the list of commands associated with" + + #: builtins.c:1008 + msgid "" + "each signal number. Each SIGNAL_SPEC is either a signal name in " + msgstr "" + "each signal number. Each SIGNAL_SPEC is either a signal name in " + + #: builtins.c:1009 + msgid "or a signal number. `trap -l' prints a list of signal names and their" + msgstr "or a signal number. ‘trap -l’ prints a list of signal names and their" + + #: builtins.c:1010 + msgid "corresponding numbers. Note that a signal can be sent to the shell" + msgstr "corresponding numbers. Note that a signal can be sent to the shell" + + #: builtins.c:1011 + msgid "with \"kill -signal $$\"." + msgstr "with “kill -signal $$â€." + + #: builtins.c:1017 + msgid "For each NAME, indicate how it would be interpreted if used as a" + msgstr "For each NAME, indicate how it would be interpreted if used as a" + + #: builtins.c:1018 + msgid "command name." + msgstr "command name." + + #: builtins.c:1020 + msgid "If the -t option is used, `type' outputs a single word which is one of" + msgstr "If the -t option is used, ‘type’ outputs a single word which is one of" + + #: builtins.c:1021 + msgid "`alias', `keyword', `function', `builtin', `file' or `', if NAME is an" + msgstr "‘alias’, ‘keyword’, ‘function’, ‘builtin’, ‘file’ or ‘’, if NAME is an" + + #: builtins.c:1022 + msgid "alias, shell reserved word, shell function, shell builtin, disk file," + msgstr "alias, shell reserved word, shell function, shell builtin, disk file," + + #: builtins.c:1023 + msgid "or unfound, respectively." + msgstr "or unfound, respectively." + + #: builtins.c:1025 + msgid "If the -p flag is used, `type' either returns the name of the disk" + msgstr "If the -p flag is used, ‘type’ either returns the name of the disk" + + #: builtins.c:1026 + msgid "file that would be executed, or nothing if `type -t NAME' would not" + msgstr "file that would be executed, or nothing if ‘type -t NAME’ would not" + + #: builtins.c:1027 + msgid "return `file'." + msgstr "return ‘file’." + + #: builtins.c:1029 + msgid "If the -a flag is used, `type' displays all of the places that contain" + msgstr "If the -a flag is used, ‘type’ displays all of the places that contain" + + #: builtins.c:1030 + msgid "an executable named `file'. This includes aliases, builtins, and" + msgstr "an executable named ‘file’. This includes aliases, builtins, and" + + #: builtins.c:1031 + msgid "functions, if and only if the -p flag is not also used." + msgstr "functions, if and only if the -p flag is not also used." + + #: builtins.c:1033 + msgid "The -f flag suppresses shell function lookup." + msgstr "The -f flag suppresses shell function lookup." + + #: builtins.c:1035 + msgid "The -P flag forces a PATH search for each NAME, even if it is an alias," + msgstr "" + "The -P flag forces a PATH search for each NAME, even if it is an alias," + + #: builtins.c:1036 + msgid "builtin, or function, and returns the name of the disk file that would" + msgstr "builtin, or function, and returns the name of the disk file that would" + + #: builtins.c:1037 + msgid "be executed." + msgstr "be executed." + + #: builtins.c:1044 + msgid "Ulimit provides control over the resources available to processes" + msgstr "Ulimit provides control over the resources available to processes" + + #: builtins.c:1045 + msgid "started by the shell, on systems that allow such control. If an" + msgstr "started by the shell, on systems that allow such control. If an" + + #: builtins.c:1046 + msgid "option is given, it is interpreted as follows:" + msgstr "option is given, it is interpreted as follows:" + + #: builtins.c:1048 + msgid " -S\tuse the `soft' resource limit" + msgstr " -S\tuse the ‘soft’ resource limit" + + #: builtins.c:1049 + msgid " -H\tuse the `hard' resource limit" + msgstr " -H\tuse the ‘hard’ resource limit" + + #: builtins.c:1050 + msgid " -a\tall current limits are reported" + msgstr " -a\tall current limits are reported" + + #: builtins.c:1051 + msgid " -c\tthe maximum size of core files created" + msgstr " -c\tthe maximum size of core files created" + + #: builtins.c:1052 + msgid " -d\tthe maximum size of a process's data segment" + msgstr " -d\tthe maximum size of a process's data segment" + + #: builtins.c:1053 + msgid " -f\tthe maximum size of files created by the shell" + msgstr " -f\tthe maximum size of files created by the shell" + + #: builtins.c:1054 + msgid " -l\tthe maximum size a process may lock into memory" + msgstr " -l\tthe maximum size a process may lock into memory" + + #: builtins.c:1055 + msgid " -m\tthe maximum resident set size" + msgstr " -m\tthe maximum resident set size" + + #: builtins.c:1056 + msgid " -n\tthe maximum number of open file descriptors" + msgstr " -n\tthe maximum number of open file descriptors" + + #: builtins.c:1057 + msgid " -p\tthe pipe buffer size" + msgstr " -p\tthe pipe buffer size" + + #: builtins.c:1058 + msgid " -s\tthe maximum stack size" + msgstr " -s\tthe maximum stack size" + + #: builtins.c:1059 + msgid " -t\tthe maximum amount of cpu time in seconds" + msgstr " -t\tthe maximum amount of cpu time in seconds" + + #: builtins.c:1060 + msgid " -u\tthe maximum number of user processes" + msgstr " -u\tthe maximum number of user processes" + + #: builtins.c:1061 + msgid " -v\tthe size of virtual memory" + msgstr " -v\tthe size of virtual memory" + + #: builtins.c:1063 + msgid "If LIMIT is given, it is the new value of the specified resource;" + msgstr "If LIMIT is given, it is the new value of the specified resource;" + + #: builtins.c:1064 + msgid "the special LIMIT values `soft', `hard', and `unlimited' stand for" + msgstr "the special LIMIT values ‘soft’, ‘hard’, and ‘unlimited’ stand for" + + #: builtins.c:1065 + msgid "" + "the current soft limit, the current hard limit, and no limit, respectively." + msgstr "" + "the current soft limit, the current hard limit, and no limit, respectively." + + #: builtins.c:1066 + msgid "Otherwise, the current value of the specified resource is printed." + msgstr "Otherwise, the current value of the specified resource is printed." + + #: builtins.c:1067 + msgid "If no option is given, then -f is assumed. Values are in 1024-byte" + msgstr "If no option is given, then -f is assumed. Values are in 1024-byte" + + #: builtins.c:1068 + msgid "increments, except for -t, which is in seconds, -p, which is in" + msgstr "increments, except for -t, which is in seconds, -p, which is in" + + #: builtins.c:1069 + msgid "increments of 512 bytes, and -u, which is an unscaled number of" + msgstr "increments of 512 bytes, and -u, which is an unscaled number of" + + #: builtins.c:1070 + msgid "processes." + msgstr "processes." + + #: builtins.c:1077 + msgid "The user file-creation mask is set to MODE. If MODE is omitted, or if" + msgstr "The user file-creation mask is set to MODE. If MODE is omitted, or if" + + #: builtins.c:1078 + msgid "`-S' is supplied, the current value of the mask is printed. The `-S'" + msgstr "‘-S’ is supplied, the current value of the mask is printed. The ‘-S’" + + #: builtins.c:1079 + msgid "option makes the output symbolic; otherwise an octal number is output." + msgstr "option makes the output symbolic; otherwise an octal number is output." + + #: builtins.c:1080 + msgid "If `-p' is supplied, and MODE is omitted, the output is in a form" + msgstr "If ‘-p’ is supplied, and MODE is omitted, the output is in a form" + + #: builtins.c:1081 + msgid "that may be used as input. If MODE begins with a digit, it is" + msgstr "that may be used as input. If MODE begins with a digit, it is" + + #: builtins.c:1082 + msgid "interpreted as an octal number, otherwise it is a symbolic mode string" + msgstr "interpreted as an octal number, otherwise it is a symbolic mode string" + + #: builtins.c:1083 + msgid "like that accepted by chmod(1)." + msgstr "like that accepted by chmod(1)." + + #: builtins.c:1090 builtins.c:1102 + msgid "Wait for the specified process and report its termination status. If" + msgstr "Wait for the specified process and report its termination status. If" + + #: builtins.c:1091 builtins.c:1103 + msgid "N is not given, all currently active child processes are waited for," + msgstr "N is not given, all currently active child processes are waited for," + + #: builtins.c:1092 + msgid "and the return code is zero. N may be a process ID or a job" + msgstr "and the return code is zero. N may be a process ID or a job" + + #: builtins.c:1093 + msgid "specification; if a job spec is given, all processes in the job's" + msgstr "specification; if a job spec is given, all processes in the job's" + + #: builtins.c:1094 + msgid "pipeline are waited for." + msgstr "pipeline are waited for." + + #: builtins.c:1104 + msgid "and the return code is zero. N is a process ID; if it is not given," + msgstr "and the return code is zero. N is a process ID; if it is not given," + + #: builtins.c:1105 + msgid "all child processes of the shell are waited for." + msgstr "all child processes of the shell are waited for." + + #: builtins.c:1112 + msgid "The `for' loop executes a sequence of commands for each member in a" + msgstr "The ‘for’ loop executes a sequence of commands for each member in a" + + #: builtins.c:1113 + msgid "list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is" + msgstr "list of items. If ‘in WORDS ...;’ is not present, then ‘in “$@â€â€™ is" + + #: builtins.c:1114 + msgid "assumed. For each element in WORDS, NAME is set to that element, and" + msgstr "assumed. For each element in WORDS, NAME is set to that element, and" + + #: builtins.c:1115 + msgid "the COMMANDS are executed." + msgstr "the COMMANDS are executed." + + #: builtins.c:1121 + msgid "Equivalent to" + msgstr "Equivalent to" + + #: builtins.c:1122 + msgid "\t(( EXP1 ))" + msgstr "\t(( EXP1 ))" + + #: builtins.c:1123 + msgid "\twhile (( EXP2 )); do" + msgstr "\twhile (( EXP2 )); do" + + #: builtins.c:1124 + msgid "\t\tCOMMANDS" + msgstr "\t\tCOMMANDS" + + #: builtins.c:1125 + msgid "\t\t(( EXP3 ))" + msgstr "\t\t(( EXP3 ))" + + #: builtins.c:1126 + msgid "\tdone" + msgstr "\tdone" + + #: builtins.c:1127 + msgid "EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is" + msgstr "EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is" + + #: builtins.c:1128 + msgid "omitted, it behaves as if it evaluates to 1." + msgstr "omitted, it behaves as if it evaluates to 1." + + #: builtins.c:1134 + msgid "The WORDS are expanded, generating a list of words. The" + msgstr "The WORDS are expanded, generating a list of words. The" + + #: builtins.c:1135 + msgid "set of expanded words is printed on the standard error, each" + msgstr "set of expanded words is printed on the standard error, each" + + #: builtins.c:1136 + msgid "preceded by a number. If `in WORDS' is not present, `in \"$@\"'" + msgstr "preceded by a number. If ‘in WORDS’ is not present, ‘in “$@â€â€™" + + #: builtins.c:1137 + msgid "is assumed. The PS3 prompt is then displayed and a line read" + msgstr "is assumed. The PS3 prompt is then displayed and a line read" + + #: builtins.c:1138 + msgid "from the standard input. If the line consists of the number" + msgstr "from the standard input. If the line consists of the number" + + #: builtins.c:1139 + msgid "corresponding to one of the displayed words, then NAME is set" + msgstr "corresponding to one of the displayed words, then NAME is set" + + #: builtins.c:1140 + msgid "to that word. If the line is empty, WORDS and the prompt are" + msgstr "to that word. If the line is empty, WORDS and the prompt are" + + #: builtins.c:1141 + msgid "redisplayed. If EOF is read, the command completes. Any other" + msgstr "redisplayed. If EOF is read, the command completes. Any other" + + #: builtins.c:1142 + msgid "value read causes NAME to be set to null. The line read is saved" + msgstr "value read causes NAME to be set to null. The line read is saved" + + #: builtins.c:1143 + msgid "in the variable REPLY. COMMANDS are executed after each selection" + msgstr "in the variable REPLY. COMMANDS are executed after each selection" + + #: builtins.c:1144 + msgid "until a break command is executed." + msgstr "until a break command is executed." + + #: builtins.c:1150 + msgid "Execute PIPELINE and print a summary of the real time, user CPU time," + msgstr "Execute PIPELINE and print a summary of the real time, user CPU time," + + #: builtins.c:1151 + msgid "and system CPU time spent executing PIPELINE when it terminates." + msgstr "and system CPU time spent executing PIPELINE when it terminates." + + #: builtins.c:1152 + msgid "The return status is the return status of PIPELINE. The `-p' option" + msgstr "The return status is the return status of PIPELINE. The ‘-p’ option" + + #: builtins.c:1153 + msgid "prints the timing summary in a slightly different format. This uses" + msgstr "prints the timing summary in a slightly different format. This uses" + + #: builtins.c:1154 + msgid "the value of the TIMEFORMAT variable as the output format." + msgstr "the value of the TIMEFORMAT variable as the output format." + + #: builtins.c:1160 + msgid "Selectively execute COMMANDS based upon WORD matching PATTERN. The" + msgstr "Selectively execute COMMANDS based upon WORD matching PATTERN. The" + + #: builtins.c:1161 + msgid "`|' is used to separate multiple patterns." + msgstr "‘|’ is used to separate multiple patterns." + + #: builtins.c:1167 + msgid "" + "The if COMMANDS are executed. If the exit status is zero, then the then" + msgstr "" + "The if COMMANDS are executed. If the exit status is zero, then the then" + + #: builtins.c:1168 + msgid "" + "COMMANDS are executed. Otherwise, each of the elif COMMANDS are executed" + msgstr "" + "COMMANDS are executed. Otherwise, each of the elif COMMANDS are executed" + + #: builtins.c:1169 + msgid "" + "in turn, and if the exit status is zero, the corresponding then COMMANDS" + msgstr "" + "in turn, and if the exit status is zero, the corresponding then COMMANDS" + + #: builtins.c:1170 + msgid "" + "are executed and the if command completes. Otherwise, the else COMMANDS" + msgstr "" + "are executed and the if command completes. Otherwise, the else COMMANDS" + + #: builtins.c:1171 + msgid "" + "are executed, if present. The exit status is the exit status of the last" + msgstr "" + "are executed, if present. The exit status is the exit status of the last" + + #: builtins.c:1172 + msgid "command executed, or zero if no condition tested true." + msgstr "command executed, or zero if no condition tested true." + + #: builtins.c:1178 builtins.c:1185 + msgid "Expand and execute COMMANDS as long as the final command in the" + msgstr "Expand and execute COMMANDS as long as the final command in the" + + #: builtins.c:1179 + msgid "`while' COMMANDS has an exit status of zero." + msgstr "‘while’ COMMANDS has an exit status of zero." + + #: builtins.c:1186 + msgid "`until' COMMANDS has an exit status which is not zero." + msgstr "‘until’ COMMANDS has an exit status which is not zero." + + #: builtins.c:1192 + msgid "Create a simple command invoked by NAME which runs COMMANDS." + msgstr "Create a simple command invoked by NAME which runs COMMANDS." + + #: builtins.c:1193 + msgid "Arguments on the command line along with NAME are passed to the" + msgstr "Arguments on the command line along with NAME are passed to the" + + #: builtins.c:1194 + msgid "function as $0 .. $n." + msgstr "function as $0 .. $n." + + #: builtins.c:1200 + msgid "Run a set of commands in a group. This is one way to redirect an" + msgstr "Run a set of commands in a group. This is one way to redirect an" + + #: builtins.c:1201 + msgid "entire set of commands." + msgstr "entire set of commands." + + #: builtins.c:1207 + msgid "This is similar to the `fg' command. Resume a stopped or background" + msgstr "This is similar to the ‘fg’ command. Resume a stopped or background" + + #: builtins.c:1208 + msgid "job. If you specifiy DIGITS, then that job is used. If you specify" + msgstr "job. If you specifiy DIGITS, then that job is used. If you specify" + + #: builtins.c:1209 + msgid "WORD, then the job whose name begins with WORD is used. Following the" + msgstr "WORD, then the job whose name begins with WORD is used. Following the" + + #: builtins.c:1210 + msgid "job specification with a `&' places the job in the background." + msgstr "job specification with a ‘&’ places the job in the background." + + #: builtins.c:1216 + msgid "The EXPRESSION is evaluated according to the rules for arithmetic" + msgstr "The EXPRESSION is evaluated according to the rules for arithmetic" + + #: builtins.c:1217 + msgid "evaluation. Equivalent to \"let EXPRESSION\"." + msgstr "evaluation. Equivalent to “let EXPRESSIONâ€." + + #: builtins.c:1223 + msgid "" + "Returns a status of 0 or 1 depending on the evaluation of the conditional" + msgstr "" + "Returns a status of 0 or 1 depending on the evaluation of the conditional" + + #: builtins.c:1224 + msgid "" + "expression EXPRESSION. Expressions are composed of the same primaries used" + msgstr "" + "expression EXPRESSION. Expressions are composed of the same primaries used" + + #: builtins.c:1225 + msgid "" + "by the `test' builtin, and may be combined using the following operators" + msgstr "" + "by the ‘test’ builtin, and may be combined using the following operators" + + #: builtins.c:1227 + msgid "\t( EXPRESSION )\tReturns the value of EXPRESSION" + msgstr "\t( EXPRESSION )\tReturns the value of EXPRESSION" + + #: builtins.c:1228 + msgid "\t! EXPRESSION\tTrue if EXPRESSION is false; else false" + msgstr "\t! EXPRESSION\tTrue if EXPRESSION is false; else false" + + #: builtins.c:1229 + msgid "\tEXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false" + msgstr "\tEXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false" + + #: builtins.c:1230 + msgid "\tEXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false" + msgstr "\tEXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false" + + #: builtins.c:1232 + msgid "" + "When the `==' and `!=' operators are used, the string to the right of the" + msgstr "" + "When the ‘==’ and ‘!=’ operators are used, the string to the right of the" + + #: builtins.c:1233 + msgid "operator is used as a pattern and pattern matching is performed. The" + msgstr "operator is used as a pattern and pattern matching is performed. The" + + #: builtins.c:1234 + msgid "&& and || operators do not evaluate EXPR2 if EXPR1 is sufficient to" + msgstr "&& and || operators do not evaluate EXPR2 if EXPR1 is sufficient to" + + #: builtins.c:1235 + msgid "determine the expression's value." + msgstr "determine the expression's value." + + #: builtins.c:1241 + msgid "BASH_VERSION Version information for this Bash." + msgstr "BASH_VERSION Version information for this Bash." + + #: builtins.c:1242 + msgid "CDPATH A colon separated list of directories to search" + msgstr "CDPATH A colon separated list of directories to search" + + #: builtins.c:1243 + msgid "\t\twhen the argument to `cd' is not found in the current" + msgstr "\t\twhen the argument to ‘cd’ is not found in the current" + + #: builtins.c:1244 + msgid "\t\tdirectory." + msgstr "\t\tdirectory." + + #: builtins.c:1245 + msgid "GLOBIGNORE\tA colon-separated list of patterns describing filenames to" + msgstr "GLOBIGNORE\tA colon-separated list of patterns describing filenames to" + + #: builtins.c:1246 + msgid "\t\tbe ignored by pathname expansion." + msgstr "\t\tbe ignored by pathname expansion." + + #: builtins.c:1248 + msgid "" + "HISTFILE The name of the file where your command history is stored." + msgstr "" + "HISTFILE The name of the file where your command history is stored." + + #: builtins.c:1249 + msgid "HISTFILESIZE The maximum number of lines this file can contain." + msgstr "HISTFILESIZE The maximum number of lines this file can contain." + + #: builtins.c:1250 + msgid "HISTSIZE The maximum number of history lines that a running" + msgstr "HISTSIZE The maximum number of history lines that a running" + + #: builtins.c:1251 + msgid "\t\tshell can access." + msgstr "\t\tshell can access." + + #: builtins.c:1253 + msgid "HOME The complete pathname to your login directory." + msgstr "HOME The complete pathname to your login directory." + + #: builtins.c:1254 + msgid "HOSTNAME\tThe name of the current host." + msgstr "HOSTNAME\tThe name of the current host." + + #: builtins.c:1255 + msgid "HOSTTYPE The type of CPU this version of Bash is running under." + msgstr "HOSTTYPE The type of CPU this version of Bash is running under." + + #: builtins.c:1256 + msgid "IGNOREEOF Controls the action of the shell on receipt of an EOF" + msgstr "IGNOREEOF Controls the action of the shell on receipt of an EOF" + + #: builtins.c:1257 + msgid "\t\tcharacter as the sole input. If set, then the value" + msgstr "\t\tcharacter as the sole input. If set, then the value" + + #: builtins.c:1258 + msgid "\t\tof it is the number of EOF characters that can be seen" + msgstr "\t\tof it is the number of EOF characters that can be seen" + + #: builtins.c:1259 + msgid "\t\tin a row on an empty line before the shell will exit" + msgstr "\t\tin a row on an empty line before the shell will exit" + + #: builtins.c:1260 + msgid "\t\t(default 10). When unset, EOF signifies the end of input." + msgstr "\t\t(default 10). When unset, EOF signifies the end of input." + + #: builtins.c:1261 + msgid "MACHTYPE\tA string describing the current system Bash is running on." + msgstr "MACHTYPE\tA string describing the current system Bash is running on." + + #: builtins.c:1262 + msgid "MAILCHECK\tHow often, in seconds, Bash checks for new mail." + msgstr "MAILCHECK\tHow often, in seconds, Bash checks for new mail." + + #: builtins.c:1263 + msgid "MAILPATH\tA colon-separated list of filenames which Bash checks" + msgstr "MAILPATH\tA colon-separated list of filenames which Bash checks" + + #: builtins.c:1264 + msgid "\t\tfor new mail." + msgstr "\t\tfor new mail." + + #: builtins.c:1265 + msgid "OSTYPE\t\tThe version of Unix this version of Bash is running on." + msgstr "OSTYPE\t\tThe version of Unix this version of Bash is running on." + + #: builtins.c:1266 + msgid "PATH A colon-separated list of directories to search when" + msgstr "PATH A colon-separated list of directories to search when" + + #: builtins.c:1267 + msgid "\t\tlooking for commands." + msgstr "\t\tlooking for commands." + + #: builtins.c:1268 + msgid "PROMPT_COMMAND A command to be executed before the printing of each" + msgstr "PROMPT_COMMAND A command to be executed before the printing of each" + + #: builtins.c:1269 + msgid "\t\tprimary prompt." + msgstr "\t\tprimary prompt." + + #: builtins.c:1270 + msgid "PS1 The primary prompt string." + msgstr "PS1 The primary prompt string." + + #: builtins.c:1271 + msgid "PS2 The secondary prompt string." + msgstr "PS2 The secondary prompt string." + + #: builtins.c:1272 + msgid "PWD\t\tThe full pathname of the current directory." + msgstr "PWD\t\tThe full pathname of the current directory." + + #: builtins.c:1273 + msgid "SHELLOPTS\tA colon-separated list of enabled shell options." + msgstr "SHELLOPTS\tA colon-separated list of enabled shell options." + + #: builtins.c:1274 + msgid "TERM The name of the current terminal type." + msgstr "TERM The name of the current terminal type." + + #: builtins.c:1275 + msgid "TIMEFORMAT\tThe output format for timing statistics displayed by the" + msgstr "TIMEFORMAT\tThe output format for timing statistics displayed by the" + + #: builtins.c:1276 + msgid "\t\t`time' reserved word." + msgstr "\t\t‘time’ reserved word." + + #: builtins.c:1277 + msgid "auto_resume Non-null means a command word appearing on a line by" + msgstr "auto_resume Non-null means a command word appearing on a line by" + + #: builtins.c:1278 + msgid "\t\titself is first looked for in the list of currently" + msgstr "\t\titself is first looked for in the list of currently" + + #: builtins.c:1279 + msgid "\t\tstopped jobs. If found there, that job is foregrounded." + msgstr "\t\tstopped jobs. If found there, that job is foregrounded." + + #: builtins.c:1280 + msgid "\t\tA value of `exact' means that the command word must" + msgstr "\t\tA value of ‘exact’ means that the command word must" + + #: builtins.c:1281 + msgid "\t\texactly match a command in the list of stopped jobs. A" + msgstr "\t\texactly match a command in the list of stopped jobs. A" + + #: builtins.c:1282 + msgid "\t\tvalue of `substring' means that the command word must" + msgstr "\t\tvalue of ‘substring’ means that the command word must" + + #: builtins.c:1283 + msgid "\t\tmatch a substring of the job. Any other value means that" + msgstr "\t\tmatch a substring of the job. Any other value means that" + + #: builtins.c:1284 + msgid "\t\tthe command must be a prefix of a stopped job." + msgstr "\t\tthe command must be a prefix of a stopped job." + + #: builtins.c:1287 + msgid "histchars Characters controlling history expansion and quick" + msgstr "histchars Characters controlling history expansion and quick" + + #: builtins.c:1288 + msgid "\t\tsubstitution. The first character is the history" + msgstr "\t\tsubstitution. The first character is the history" + + #: builtins.c:1289 + msgid "\t\tsubstitution character, usually `!'. The second is" + msgstr "\t\tsubstitution character, usually ‘!’. The second is" + + #: builtins.c:1290 + msgid "\t\tthe `quick substitution' character, usually `^'. The" + msgstr "\t\tthe ‘quick substitution’ character, usually ‘^’. The" + + #: builtins.c:1291 + msgid "\t\tthird is the `history comment' character, usually `#'." + msgstr "\t\tthird is the ‘history comment’ character, usually ‘#’." + + #: builtins.c:1293 + msgid "HISTIGNORE\tA colon-separated list of patterns used to decide which" + msgstr "HISTIGNORE\tA colon-separated list of patterns used to decide which" + + #: builtins.c:1294 + msgid "\t\tcommands should be saved on the history list." + msgstr "\t\tcommands should be saved on the history list." + + #: builtins.c:1306 + msgid "+N\tRotates the stack so that the Nth directory (counting" + msgstr "+N\tRotates the stack so that the Nth directory (counting" + + #: builtins.c:1307 + msgid "\tfrom the left of the list shown by `dirs', starting with" + msgstr "\tfrom the left of the list shown by ‘dirs’, starting with" + + #: builtins.c:1308 builtins.c:1312 + msgid "\tzero) is at the top." + msgstr "\tzero) is at the top." + + #: builtins.c:1310 + msgid "-N\tRotates the stack so that the Nth directory (counting" + msgstr "-N\tRotates the stack so that the Nth directory (counting" + + #: builtins.c:1311 + msgid "\tfrom the right of the list shown by `dirs', starting with" + msgstr "\tfrom the right of the list shown by ‘dirs’, starting with" + + #: builtins.c:1314 + msgid "-n\tsuppress the normal change of directory when adding directories" + msgstr "-n\tsuppress the normal change of directory when adding directories" + + #: builtins.c:1315 + msgid "\tto the stack, so only the stack is manipulated." + msgstr "\tto the stack, so only the stack is manipulated." + + #: builtins.c:1317 + msgid "dir\tadds DIR to the directory stack at the top, making it the" + msgstr "dir\tadds DIR to the directory stack at the top, making it the" + + #: builtins.c:1318 + msgid "\tnew current working directory." + msgstr "\tnew current working directory." + + #: builtins.c:1332 + msgid "+N\tremoves the Nth entry counting from the left of the list" + msgstr "+N\tremoves the Nth entry counting from the left of the list" + + #: builtins.c:1333 + msgid "\tshown by `dirs', starting with zero. For example: `popd +0'" + msgstr "\tshown by ‘dirs’, starting with zero. For example: ‘popd +0’" + + #: builtins.c:1334 + msgid "\tremoves the first directory, `popd +1' the second." + msgstr "\tremoves the first directory, ‘popd +1’ the second." + + #: builtins.c:1336 + msgid "-N\tremoves the Nth entry counting from the right of the list" + msgstr "-N\tremoves the Nth entry counting from the right of the list" + + #: builtins.c:1337 + msgid "\tshown by `dirs', starting with zero. For example: `popd -0'" + msgstr "\tshown by ‘dirs’, starting with zero. For example: ‘popd -0’" + + #: builtins.c:1338 + msgid "\tremoves the last directory, `popd -1' the next to last." + msgstr "\tremoves the last directory, ‘popd -1’ the next to last." + + #: builtins.c:1340 + msgid "-n\tsuppress the normal change of directory when removing directories" + msgstr "-n\tsuppress the normal change of directory when removing directories" + + #: builtins.c:1341 + msgid "\tfrom the stack, so only the stack is manipulated." + msgstr "\tfrom the stack, so only the stack is manipulated." + + #: builtins.c:1363 + msgid "+N\tdisplays the Nth entry counting from the left of the list shown by" + msgstr "+N\tdisplays the Nth entry counting from the left of the list shown by" + + #: builtins.c:1364 builtins.c:1367 + msgid "\tdirs when invoked without options, starting with zero." + msgstr "\tdirs when invoked without options, starting with zero." + + #: builtins.c:1366 + msgid "-N\tdisplays the Nth entry counting from the right of the list shown by" + msgstr "" + "-N\tdisplays the Nth entry counting from the right of the list shown by" + + #: builtins.c:1374 + msgid "Toggle the values of variables controlling optional behavior." + msgstr "Toggle the values of variables controlling optional behavior." + + #: builtins.c:1375 + msgid "The -s flag means to enable (set) each OPTNAME; the -u flag" + msgstr "The -s flag means to enable (set) each OPTNAME; the -u flag" + + #: builtins.c:1376 + msgid "unsets each OPTNAME. The -q flag suppresses output; the exit" + msgstr "unsets each OPTNAME. The -q flag suppresses output; the exit" + + #: builtins.c:1377 + msgid "status indicates whether each OPTNAME is set or unset. The -o" + msgstr "status indicates whether each OPTNAME is set or unset. The -o" + + #: builtins.c:1378 + msgid "option restricts the OPTNAMEs to those defined for use with" + msgstr "option restricts the OPTNAMEs to those defined for use with" + + #: builtins.c:1379 + msgid "`set -o'. With no options, or with the -p option, a list of all" + msgstr "‘set -o’. With no options, or with the -p option, a list of all" + + #: builtins.c:1380 + msgid "settable options is displayed, with an indication of whether or" + msgstr "settable options is displayed, with an indication of whether or" + + #: builtins.c:1381 + msgid "not each is set." + msgstr "not each is set." + + #: builtins.c:1387 + msgid "printf formats and prints ARGUMENTS under control of the FORMAT. FORMAT" + msgstr "" + "printf formats and prints ARGUMENTS under control of the FORMAT. FORMAT" + + #: builtins.c:1388 + msgid "is a character string which contains three types of objects: plain" + msgstr "is a character string which contains three types of objects: plain" + + #: builtins.c:1389 + msgid "" + "characters, which are simply copied to standard output, character escape" + msgstr "" + "characters, which are simply copied to standard output, character escape" + + #: builtins.c:1390 + msgid "sequences which are converted and copied to the standard output, and" + msgstr "sequences which are converted and copied to the standard output, and" + + #: builtins.c:1391 + msgid "" + "format specifications, each of which causes printing of the next successive" + msgstr "" + "format specifications, each of which causes printing of the next successive" + + #: builtins.c:1392 + msgid "argument. In addition to the standard printf(1) formats, %b means to" + msgstr "argument. In addition to the standard printf(1) formats, %b means to" + + #: builtins.c:1393 + msgid "expand backslash escape sequences in the corresponding argument, and %q" + msgstr "" + "expand backslash escape sequences in the corresponding argument, and %q" + + #: builtins.c:1394 + msgid "means to quote the argument in a way that can be reused as shell input." + msgstr "" + "means to quote the argument in a way that can be reused as shell input." + + #: builtins.c:1401 + msgid "For each NAME, specify how arguments are to be completed." + msgstr "For each NAME, specify how arguments are to be completed." + + #: builtins.c:1402 + msgid "If the -p option is supplied, or if no options are supplied, existing" + msgstr "If the -p option is supplied, or if no options are supplied, existing" + + #: builtins.c:1403 + msgid "completion specifications are printed in a way that allows them to be" + msgstr "completion specifications are printed in a way that allows them to be" + + #: builtins.c:1404 + msgid "reused as input. The -r option removes a completion specification for" + msgstr "reused as input. The -r option removes a completion specification for" + + #: builtins.c:1405 + msgid "each NAME, or, if no NAMEs are supplied, all completion specifications." + msgstr "" + "each NAME, or, if no NAMEs are supplied, all completion specifications." + + #: builtins.c:1413 + msgid "Display the possible completions depending on the options. Intended" + msgstr "Display the possible completions depending on the options. Intended" + + #: builtins.c:1414 + msgid "" + "to be used from within a shell function generating possible completions." + msgstr "" + "to be used from within a shell function generating possible completions." + + #: builtins.c:1415 + msgid "If the optional WORD argument is supplied, matches against WORD are" + msgstr "If the optional WORD argument is supplied, matches against WORD are" + + #: builtins.c:1416 + msgid "generated." + msgstr "generated." diff -aNrc2 bash-2.05b-patched/po/insert-header.sin bash-3.0/po/insert-header.sin *** bash-2.05b-patched/po/insert-header.sin Wed Dec 31 19:00:00 1969 --- bash-3.0/po/insert-header.sin Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,23 ---- + # Sed script that inserts the file called HEADER before the header entry. + # + # At each occurrence of a line starting with "msgid ", we execute the following + # commands. At the first occurrence, insert the file. At the following + # occurrences, do nothing. The distinction between the first and the following + # occurrences is achieved by looking at the hold space. + /^msgid /{ + x + # Test if the hold space is empty. + s/m/m/ + ta + # Yes it was empty. First occurrence. Read the file. + r HEADER + # Output the file's contents by reading the next line. But don't lose the + # current line while doing this. + g + N + bb + :a + # The hold space was nonempty. Following occurrences. Do nothing. + x + :b + } diff -aNrc2 bash-2.05b-patched/po/quot.sed bash-3.0/po/quot.sed *** bash-2.05b-patched/po/quot.sed Wed Dec 31 19:00:00 1969 --- bash-3.0/po/quot.sed Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,6 ---- + s/"\([^"]*\)"/“\1â€/g + s/`\([^`']*\)'/‘\1’/g + s/ '\([^`']*\)' / ‘\1’ /g + s/ '\([^`']*\)'$/ ‘\1’/g + s/^'\([^`']*\)' /‘\1’ /g + s/“â€/""/g diff -aNrc2 bash-2.05b-patched/po/remove-potcdate.sin bash-3.0/po/remove-potcdate.sin *** bash-2.05b-patched/po/remove-potcdate.sin Wed Dec 31 19:00:00 1969 --- bash-3.0/po/remove-potcdate.sin Tue Dec 9 12:39:11 2003 *************** *** 0 **** --- 1,19 ---- + # Sed script that remove the POT-Creation-Date line in the header entry + # from a POT file. + # + # The distinction between the first and the following occurrences of the + # pattern is achieved by looking at the hold space. + /^"POT-Creation-Date: .*"$/{ + x + # Test if the hold space is empty. + s/P/P/ + ta + # Yes it was empty. First occurrence. Remove the line. + g + d + bb + :a + # The hold space was nonempty. Following occurrences. Do nothing. + x + :b + } diff -aNrc2 bash-2.05b-patched/print_cmd.c bash-3.0/print_cmd.c *** bash-2.05b-patched/print_cmd.c Tue Mar 12 14:39:30 2002 --- bash-3.0/print_cmd.c Tue Apr 13 20:02:38 2004 *************** *** 1,4 **** /* print_command -- A way to make readable commands from a command tree. */ ! /* Copyright (C) 1989 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,5 ---- /* print_command -- A way to make readable commands from a command tree. */ ! ! /* Copyright (C) 1989-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 36,39 **** --- 37,41 ---- #include "bashansi.h" + #include "bashintl.h" #include "shell.h" *************** *** 88,97 **** static void print_until_or_while __P((WHILE_COM *, char *)); static void print_if_command __P((IF_COM *)); - #if defined (DPAREN_ARITHMETIC) - static void print_arith_command __P((ARITH_COM *)); - #endif #if defined (COND_COMMAND) static void print_cond_node __P((COND_COM *)); - static void print_cond_command __P((COND_COM *)); #endif static void print_function_def __P((FUNCTION_DEF *)); --- 90,95 ---- *************** *** 198,202 **** #if defined (DPAREN_ARITHMETIC) case cm_arith: ! print_arith_command (command->value.Arith); break; #endif --- 196,200 ---- #if defined (DPAREN_ARITHMETIC) case cm_arith: ! print_arith_command (command->value.Arith->exp); break; #endif *************** *** 261,265 **** default: ! cprintf ("print_command: bad connector `%d'", command->value.Connection->connector); break; --- 259,263 ---- default: ! cprintf (_("print_command: bad connector `%d'"), command->value.Connection->connector); break; *************** *** 336,339 **** --- 334,340 ---- change_flag ('x', FLAG_ON); + if (ps4 == 0 || *ps4 == '\0') + return (indirection_string); + for (i = 0; *ps4 && i < indirection_level && i < 99; i++) indirection_string[i] = *ps4; *************** *** 347,359 **** } /* A function to print the words of a simple command when set -x is on. */ void ! xtrace_print_word_list (list) WORD_LIST *list; { WORD_LIST *w; char *t, *x; ! fprintf (stderr, "%s", indirection_level_string ()); for (w = list; w; w = w->next) { --- 348,394 ---- } + void + xtrace_print_assignment (name, value, assign_list, xflags) + char *name, *value; + int assign_list, xflags; + { + char *nval; + + if (xflags) + fprintf (stderr, "%s", indirection_level_string ()); + + /* VALUE should not be NULL when this is called. */ + if (*value == '\0' || assign_list) + nval = value; + else if (sh_contains_shell_metas (value)) + nval = sh_single_quote (value); + else if (ansic_shouldquote (value)) + nval = ansic_quote (value, 0, (int *)0); + else + nval = value; + + if (assign_list) + fprintf (stderr, "%s=(%s)\n", name, nval); + else + fprintf (stderr, "%s=%s\n", name, nval); + + if (nval != value) + FREE (nval); + + fflush (stderr); + } + /* A function to print the words of a simple command when set -x is on. */ void ! xtrace_print_word_list (list, xtflags) WORD_LIST *list; + int xtflags; { WORD_LIST *w; char *t, *x; ! if (xtflags) ! fprintf (stderr, "%s", indirection_level_string ()); ! for (w = list; w; w = w->next) { *************** *** 387,396 **** } ! static void ! print_for_command (for_command) FOR_COM *for_command; { cprintf ("for %s in ", for_command->name->word); command_print_word_list (for_command->map_list, " "); cprintf (";"); newline ("do\n"); --- 422,448 ---- } ! void ! print_for_command_head (for_command) FOR_COM *for_command; { cprintf ("for %s in ", for_command->name->word); command_print_word_list (for_command->map_list, " "); + } + + void + xtrace_print_for_command_head (for_command) + FOR_COM *for_command; + { + fprintf (stderr, "%s", indirection_level_string ()); + fprintf (stderr, "for %s in ", for_command->name->word); + xtrace_print_word_list (for_command->map_list, 0); + } + + static void + print_for_command (for_command) + FOR_COM *for_command; + { + print_for_command_head (for_command); + cprintf (";"); newline ("do\n"); *************** *** 407,411 **** ARITH_FOR_COM *arith_for_command; { ! cprintf ("for (( "); command_print_word_list (arith_for_command->init, " "); cprintf (" ; "); --- 459,463 ---- ARITH_FOR_COM *arith_for_command; { ! cprintf ("for (("); command_print_word_list (arith_for_command->init, " "); cprintf (" ; "); *************** *** 413,417 **** cprintf (" ; "); command_print_word_list (arith_for_command->step, " "); ! cprintf (" ))"); newline ("do\n"); indentation += indentation_amount; --- 465,469 ---- cprintf (" ; "); command_print_word_list (arith_for_command->step, " "); ! cprintf ("))"); newline ("do\n"); indentation += indentation_amount; *************** *** 424,433 **** #if defined (SELECT_COMMAND) ! static void ! print_select_command (select_command) SELECT_COM *select_command; { cprintf ("select %s in ", select_command->name->word); command_print_word_list (select_command->map_list, " "); cprintf (";"); newline ("do\n"); --- 476,502 ---- #if defined (SELECT_COMMAND) ! void ! print_select_command_head (select_command) SELECT_COM *select_command; { cprintf ("select %s in ", select_command->name->word); command_print_word_list (select_command->map_list, " "); + } + + void + xtrace_print_select_command_head (select_command) + SELECT_COM *select_command; + { + fprintf (stderr, "%s", indirection_level_string ()); + fprintf (stderr, "select %s in ", select_command->name->word); + xtrace_print_word_list (select_command->map_list, 0); + } + + static void + print_select_command (select_command) + SELECT_COM *select_command; + { + print_select_command_head (select_command); + cprintf (";"); newline ("do\n"); *************** *** 477,485 **** } static void print_case_command (case_command) CASE_COM *case_command; { ! cprintf ("case %s in ", case_command->word->word); if (case_command->clauses) print_case_clauses (case_command->clauses); --- 546,570 ---- } + void + print_case_command_head (case_command) + CASE_COM *case_command; + { + cprintf ("case %s in ", case_command->word->word); + } + + void + xtrace_print_case_command_head (case_command) + CASE_COM *case_command; + { + fprintf (stderr, "%s", indirection_level_string ()); + fprintf (stderr, "case %s in\n", case_command->word->word); + } + static void print_case_command (case_command) CASE_COM *case_command; { ! print_case_command_head (case_command); ! if (case_command->clauses) print_case_clauses (case_command->clauses); *************** *** 563,573 **** #if defined (DPAREN_ARITHMETIC) ! static void ! print_arith_command (arith_command) ! ARITH_COM *arith_command; { ! cprintf ("(( "); ! command_print_word_list (arith_command->exp, " "); ! cprintf (" ))"); } #endif --- 648,658 ---- #if defined (DPAREN_ARITHMETIC) ! void ! print_arith_command (arith_cmd_list) ! WORD_LIST *arith_cmd_list; { ! cprintf ("(("); ! command_print_word_list (arith_cmd_list, " "); ! cprintf ("))"); } #endif *************** *** 619,623 **** } ! static void print_cond_command (cond) COND_COM *cond; --- 704,708 ---- } ! void print_cond_command (cond) COND_COM *cond; *************** *** 723,726 **** --- 808,818 ---- hdtail = heredocs = newredir; } + else if (redirects->instruction == r_duplicating_output_word && redirects->redirector == 1) + { + /* Temporarily translate it as the execution code does. */ + redirects->instruction = r_err_and_out; + print_redirection (redirects); + redirects->instruction = r_duplicating_output_word; + } else print_redirection (redirects); *************** *** 1117,1121 **** default: ! programming_error ("cprintf: bad `%%' argument (%c)", c); /*NOTREACHED*/ } --- 1209,1213 ---- default: ! programming_error (_("cprintf: `%c': invalid format character"), c); /*NOTREACHED*/ } diff -aNrc2 bash-2.05b-patched/redir.c bash-3.0/redir.c *** bash-2.05b-patched/redir.c Tue Mar 12 15:27:38 2002 --- bash-3.0/redir.c Fri Dec 19 16:01:29 2003 *************** *** 26,30 **** #include #include "bashtypes.h" ! #ifndef _MINIX # include #endif --- 26,30 ---- #include #include "bashtypes.h" ! #if !defined (_MINIX) && defined (HAVE_SYS_FILE_H) # include #endif *************** *** 43,46 **** --- 43,47 ---- #include "bashansi.h" + #include "bashintl.h" #include "memalloc.h" *************** *** 54,57 **** --- 55,60 ---- #endif + int expanding_redir; + extern int posixly_correct; extern REDIRECT *redirection_undo_list; *************** *** 64,68 **** static int expandable_redirection_filename __P((REDIRECT *)); static int stdin_redirection __P((enum r_instruction, int)); ! static int do_redirection_internal __P((REDIRECT *, int, int, int)); static int write_here_document __P((int, WORD_DESC *)); --- 67,71 ---- static int expandable_redirection_filename __P((REDIRECT *)); static int stdin_redirection __P((enum r_instruction, int)); ! static int do_redirection_internal __P((REDIRECT *, int)); static int write_here_document __P((int, WORD_DESC *)); *************** *** 94,98 **** /* This can happen when read_token_word encounters overflow, like in exec 4294967297>x */ ! filename = "file descriptor out of range"; #ifdef EBADF else if (temp->redirector >= 0 && errno == EBADF) --- 97,101 ---- /* This can happen when read_token_word encounters overflow, like in exec 4294967297>x */ ! filename = _("file descriptor out of range"); #ifdef EBADF else if (temp->redirector >= 0 && errno == EBADF) *************** *** 136,154 **** { case AMBIGUOUS_REDIRECT: ! internal_error ("%s: ambiguous redirect", filename); break; case NOCLOBBER_REDIRECT: ! internal_error ("%s: cannot overwrite existing file", filename); break; #if defined (RESTRICTED_SHELL) case RESTRICTED_REDIRECT: ! internal_error ("%s: restricted: cannot redirect output", filename); break; #endif /* RESTRICTED_SHELL */ case HEREDOC_REDIRECT: ! internal_error ("cannot create temp file for here document: %s", strerror (heredoc_errno)); break; --- 139,157 ---- { case AMBIGUOUS_REDIRECT: ! internal_error (_("%s: ambiguous redirect"), filename); break; case NOCLOBBER_REDIRECT: ! internal_error (_("%s: cannot overwrite existing file"), filename); break; #if defined (RESTRICTED_SHELL) case RESTRICTED_REDIRECT: ! internal_error (_("%s: restricted: cannot redirect output"), filename); break; #endif /* RESTRICTED_SHELL */ case HEREDOC_REDIRECT: ! internal_error (_("cannot create temp file for here document: %s"), strerror (heredoc_errno)); break; *************** *** 161,179 **** } ! /* Perform the redirections on LIST. If FOR_REAL, then actually make ! input and output file descriptors, otherwise just do whatever is ! neccessary for side effecting. INTERNAL says to remember how to ! undo the redirections later, if non-zero. If SET_CLEXEC is non-zero, ! file descriptors opened in do_redirection () have their close-on-exec ! flag set. */ int ! do_redirections (list, for_real, internal, set_clexec) REDIRECT *list; ! int for_real, internal, set_clexec; { int error; REDIRECT *temp; ! if (internal) { if (redirection_undo_list) --- 164,182 ---- } ! /* Perform the redirections on LIST. If flags & RX_ACTIVE, then actually ! make input and output file descriptors, otherwise just do whatever is ! neccessary for side effecting. flags & RX_UNDOABLE says to remember ! how to undo the redirections later, if non-zero. If flags & RX_CLEXEC ! is non-zero, file descriptors opened in do_redirection () have their ! close-on-exec flag set. */ int ! do_redirections (list, flags) REDIRECT *list; ! int flags; { int error; REDIRECT *temp; ! if (flags & RX_UNDOABLE) { if (redirection_undo_list) *************** *** 188,192 **** for (temp = list; temp; temp = temp->next) { ! error = do_redirection_internal (temp, for_real, internal, set_clexec); if (error) { --- 191,195 ---- for (temp = list; temp; temp = temp->next) { ! error = do_redirection_internal (temp, flags); if (error) { *************** *** 239,243 **** --- 242,248 ---- tlist1 = make_word_list (w, (WORD_LIST *)NULL); + expanding_redir = 1; tlist2 = expand_words_no_vars (tlist1); + expanding_redir = 0; dispose_words (tlist1); *************** *** 264,268 **** herestr = expand_string_to_string (redirectee->word, 0); ! herelen = strlen (herestr); n = write (fd, herestr, herelen); --- 269,273 ---- herestr = expand_string_to_string (redirectee->word, 0); ! herelen = STRLEN (herestr); n = write (fd, herestr, herelen); *************** *** 273,277 **** } e = errno; ! free (herestr); if (n != herelen) { --- 278,282 ---- } e = errno; ! FREE (herestr); if (n != herelen) { *************** *** 502,506 **** fd = netopen (filename); #else ! internal_warning ("/dev/(tcp|udp)/host/port not supported without networking"); fd = open (filename, flags, mode); #endif --- 507,511 ---- fd = netopen (filename); #else ! internal_warning (_("/dev/(tcp|udp)/host/port not supported without networking")); fd = open (filename, flags, mode); #endif *************** *** 601,612 **** /* Do the specific redirection requested. Returns errno or one of the special redirection errors (*_REDIRECT) in case of error, 0 on success. ! If FOR_REAL is zero, then just do whatever is neccessary to produce the ! appropriate side effects. REMEMBERING, if non-zero, says to remember ! how to undo each redirection. If SET_CLEXEC is non-zero, then ! we set all file descriptors > 2 that we open to be close-on-exec. */ static int ! do_redirection_internal (redirect, for_real, remembering, set_clexec) REDIRECT *redirect; ! int for_real, remembering, set_clexec; { WORD_DESC *redirectee; --- 606,618 ---- /* Do the specific redirection requested. Returns errno or one of the special redirection errors (*_REDIRECT) in case of error, 0 on success. ! If flags & RX_ACTIVE is zero, then just do whatever is neccessary to ! produce the appropriate side effects. flags & RX_UNDOABLE, if non-zero, ! says to remember how to undo each redirection. If flags & RX_CLEXEC is ! non-zero, then we set all file descriptors > 2 that we open to be ! close-on-exec. */ static int ! do_redirection_internal (redirect, flags) REDIRECT *redirect; ! int flags; { WORD_DESC *redirectee; *************** *** 740,746 **** return (errno); ! if (for_real) { ! if (remembering) { /* Only setup to undo it if the thing to undo is active. */ --- 746,752 ---- return (errno); ! if (flags & RX_ACTIVE) { ! if (flags & RX_UNDOABLE) { /* Only setup to undo it if the thing to undo is active. */ *************** *** 776,780 **** * The Posix standard mentions only the exec builtin. */ ! if (set_clexec && (redirector > 2)) SET_CLOSE_ON_EXEC (redirector); } --- 782,786 ---- * The Posix standard mentions only the exec builtin. */ ! if ((flags & RX_CLEXEC) && (redirector > 2)) SET_CLOSE_ON_EXEC (redirector); } *************** *** 794,800 **** if (ri == r_err_and_out) { ! if (for_real) { ! if (remembering) add_undo_redirect (2); if (dup2 (1, 2) < 0) --- 800,806 ---- if (ri == r_err_and_out) { ! if (flags & RX_ACTIVE) { ! if (flags & RX_UNDOABLE) add_undo_redirect (2); if (dup2 (1, 2) < 0) *************** *** 819,825 **** } ! if (for_real) { ! if (remembering) { /* Only setup to undo it if the thing to undo is active. */ --- 825,831 ---- } ! if (flags & RX_ACTIVE) { ! if (flags & RX_UNDOABLE) { /* Only setup to undo it if the thing to undo is active. */ *************** *** 844,848 **** #endif ! if (set_clexec && (redirector > 2)) SET_CLOSE_ON_EXEC (redirector); } --- 850,854 ---- #endif ! if ((flags & RX_CLEXEC) && (redirector > 2)) SET_CLOSE_ON_EXEC (redirector); } *************** *** 861,867 **** case r_move_input: case r_move_output: ! if (for_real && (redir_fd != redirector)) { ! if (remembering) { /* Only setup to undo it if the thing to undo is active. */ --- 867,873 ---- case r_move_input: case r_move_output: ! if ((flags & RX_ACTIVE) && (redir_fd != redirector)) { ! if (flags & RX_UNDOABLE) { /* Only setup to undo it if the thing to undo is active. */ *************** *** 891,895 **** /* if ((already_set || set_unconditionally) && (ok_to_set)) set_it () */ ! if (((fcntl (redir_fd, F_GETFD, 0) == 1) || set_clexec) && (redirector > 2)) SET_CLOSE_ON_EXEC (redirector); --- 897,901 ---- /* if ((already_set || set_unconditionally) && (ok_to_set)) set_it () */ ! if (((fcntl (redir_fd, F_GETFD, 0) == 1) || (flags & RX_CLEXEC)) && (redirector > 2)) SET_CLOSE_ON_EXEC (redirector); *************** *** 902,908 **** case r_close_this: ! if (for_real) { ! if (remembering && (fcntl (redirector, F_GETFD, 0) != -1)) add_undo_redirect (redirector); --- 908,914 ---- case r_close_this: ! if (flags & RX_ACTIVE) { ! if ((flags & RX_UNDOABLE) && (fcntl (redirector, F_GETFD, 0) != -1)) add_undo_redirect (redirector); *************** *** 941,945 **** if (new_fd < 0) { ! sys_error ("redirection error: cannot duplicate fd"); return (-1); } --- 947,951 ---- if (new_fd < 0) { ! sys_error (_("redirection error: cannot duplicate fd")); return (-1); } diff -aNrc2 bash-2.05b-patched/redir.h bash-3.0/redir.h *** bash-2.05b-patched/redir.h Thu Sep 6 16:00:49 2001 --- bash-3.0/redir.h Fri Apr 4 15:14:45 2003 *************** *** 24,29 **** #include "stdc.h" extern void redirection_error __P((REDIRECT *, int)); ! extern int do_redirections __P((REDIRECT *, int, int, int)); extern char *redirection_expand __P((WORD_DESC *)); extern int stdin_redirects __P((REDIRECT *)); --- 24,34 ---- #include "stdc.h" + /* Values for flags argument to do_redirections */ + #define RX_ACTIVE 0x01 /* do it; don't just go through the motions */ + #define RX_UNDOABLE 0x02 /* make a list to undo these redirections */ + #define RX_CLEXEC 0x04 /* set close-on-exec for opened fds > 2 */ + extern void redirection_error __P((REDIRECT *, int)); ! extern int do_redirections __P((REDIRECT *, int)); extern char *redirection_expand __P((WORD_DESC *)); extern int stdin_redirects __P((REDIRECT *)); diff -aNrc2 bash-2.05b-patched/shell.c bash-3.0/shell.c *** bash-2.05b-patched/shell.c Mon Jul 1 11:27:11 2002 --- bash-3.0/shell.c Sat Jun 26 14:27:07 2004 *************** *** 1,5 **** /* shell.c -- GNU's idea of the POSIX shell specification. */ ! /* Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,5 ---- /* shell.c -- GNU's idea of the POSIX shell specification. */ ! /* Copyright (C) 1987-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 28,32 **** #include "bashtypes.h" ! #ifndef _MINIX # include #endif --- 28,32 ---- #include "bashtypes.h" ! #if !defined (_MINIX) && defined (HAVE_SYS_FILE_H) # include #endif *************** *** 44,47 **** --- 44,49 ---- #endif + #include "bashintl.h" + #define NEED_SH_SETLINEBUF_DECL /* used in externs.h */ *************** *** 193,196 **** --- 195,199 ---- static int want_initial_help; /* --help option */ + int debugging_mode = 0; /* In debugging mode with --debugger */ int no_line_editing = 0; /* Don't do fancy line editing. */ int posixly_correct = 0; /* Non-zero means posix.2 superset. */ *************** *** 198,201 **** --- 201,205 ---- int dump_po_strings; /* Dump strings in $"..." in po format */ int wordexp_only = 0; /* Do word expansion only */ + int protected_mode = 0; /* No command substitution with --wordexp */ /* Some long-winded argument names. These are obviously new. */ *************** *** 209,212 **** --- 213,219 ---- } long_args[] = { { "debug", Int, &debugging, (char **)0x0 }, + #if defined (DEBUGGER) + { "debugger", Int, &debugging_mode, (char **)0x0 }, + #endif { "dump-po-strings", Int, &dump_po_strings, (char **)0x0 }, { "dump-strings", Int, &dump_translatable_strings, (char **)0x0 }, *************** *** 218,221 **** --- 225,229 ---- { "norc", Int, &no_rc, (char **)0x0 }, { "posix", Int, &posixly_correct, (char **)0x0 }, + { "protected", Int, &protected_mode, (char **)0x0 }, { "rcfile", Charp, (int *)0x0, &bashrc_file }, #if defined (RESTRICTED_SHELL) *************** *** 246,253 **** int want_pending_command; /* -c flag supplied */ int malloc_trace_at_exit = 0; static int shell_reinitialized = 0; - static char *local_pending_command; static FILE *default_input; --- 254,263 ---- int want_pending_command; /* -c flag supplied */ + /* This variable is not static so it can be bound to $BASH_EXECUTION_STRING */ + char *command_execution_string; /* argument to -c option */ + int malloc_trace_at_exit = 0; static int shell_reinitialized = 0; static FILE *default_input; *************** *** 260,263 **** --- 270,275 ---- static int bind_args __P((char **, int, int, int)); + static void start_debugger __P((void)); + static void add_shopt_to_alist __P((char *, int)); static void run_shopt_alist __P((void)); *************** *** 288,296 **** if (stat ("/tmp", &sb) < 0) ! internal_warning ("could not find /tmp, please create!"); else { if (S_ISDIR (sb.st_mode) == 0) ! internal_warning ("/tmp must be a valid directory name"); } } --- 300,308 ---- if (stat ("/tmp", &sb) < 0) ! internal_warning (_("could not find /tmp, please create!")); else { if (S_ISDIR (sb.st_mode) == 0) ! internal_warning (_("/tmp must be a valid directory name")); } } *************** *** 375,379 **** /* Initialize `local' variables for all `invocations' of main (). */ arg_index = 1; ! local_pending_command = (char *)NULL; want_pending_command = locally_skip_execution = read_from_stdin = 0; default_input = stdin; --- 387,391 ---- /* Initialize `local' variables for all `invocations' of main (). */ arg_index = 1; ! command_execution_string = (char *)NULL; want_pending_command = locally_skip_execution = read_from_stdin = 0; default_input = stdin; *************** *** 448,456 **** if (want_pending_command) { ! local_pending_command = argv[arg_index]; ! if (local_pending_command == 0) { ! report_error ("-c: option requires an argument"); ! exit (EX_USAGE); } arg_index++; --- 460,468 ---- if (want_pending_command) { ! command_execution_string = argv[arg_index]; ! if (command_execution_string == 0) { ! report_error (_("%s: option requires an argument"), "-c"); ! exit (EX_BADUSAGE); } arg_index++; *************** *** 466,479 **** no arguments remaining or the -s flag given standard input is a terminal ! standard output is a terminal Refer to Posix.2, the description of the `sh' utility. */ if (forced_interactive || /* -i flag */ ! (!local_pending_command && /* No -c command and ... */ wordexp_only == 0 && /* No --wordexp and ... */ ((arg_index == argc) || /* no remaining args or... */ read_from_stdin) && /* -s flag with args, and */ isatty (fileno (stdin)) && /* Input is a terminal and */ ! isatty (fileno (stdout)))) /* output is a terminal. */ init_interactive (); else --- 478,491 ---- no arguments remaining or the -s flag given standard input is a terminal ! standard error is a terminal Refer to Posix.2, the description of the `sh' utility. */ if (forced_interactive || /* -i flag */ ! (!command_execution_string && /* No -c command and ... */ wordexp_only == 0 && /* No --wordexp and ... */ ((arg_index == argc) || /* no remaining args or... */ read_from_stdin) && /* -s flag with args, and */ isatty (fileno (stdin)) && /* Input is a terminal and */ ! isatty (fileno (stderr)))) /* error output is a terminal. */ init_interactive (); else *************** *** 516,527 **** if (interactive_shell) { ! char *term; ! term = getenv ("TERM"); no_line_editing |= term && (STREQ (term, "emacs")); ! term = getenv ("EMACS"); ! running_under_emacs = term ? ((strmatch ("*term*", term, 0) == 0) ? 2 : 1) : 0; ! no_line_editing |= term && term[0] == 't' && term[1] == '\0'; } --- 528,543 ---- if (interactive_shell) { ! char *term, *emacs; ! term = get_string_value ("TERM"); no_line_editing |= term && (STREQ (term, "emacs")); ! emacs = get_string_value ("EMACS"); ! running_under_emacs = emacs ? ((strmatch ("*term*", emacs, 0) == 0) ? 2 : 1) : 0; ! #if 0 ! no_line_editing |= emacs && emacs[0] == 't' && emacs[1] == '\0'; ! #else ! no_line_editing |= emacs && emacs[0] == 't' && emacs[1] == '\0' && STREQ (term, "dumb"); ! #endif } *************** *** 535,539 **** if (code) { ! if (code == EXITPROG) exit_shell (last_command_exit_value); else --- 551,555 ---- if (code) { ! if (code == EXITPROG || code == ERREXIT) exit_shell (last_command_exit_value); else *************** *** 615,628 **** } ! if (local_pending_command) { arg_index = bind_args (argv, arg_index, argc, 0); startup_state = 2; #if defined (ONESHOT) executing = 1; ! run_one_command (local_pending_command); exit_shell (last_command_exit_value); #else /* ONESHOT */ ! with_input_from_string (local_pending_command, "-c"); goto read_and_execute; #endif /* !ONESHOT */ --- 631,648 ---- } ! if (command_execution_string) { arg_index = bind_args (argv, arg_index, argc, 0); startup_state = 2; + + if (debugging_mode) + start_debugger (); + #if defined (ONESHOT) executing = 1; ! run_one_command (command_execution_string); exit_shell (last_command_exit_value); #else /* ONESHOT */ ! with_input_from_string (command_execution_string, "-c"); goto read_and_execute; #endif /* !ONESHOT */ *************** *** 649,652 **** --- 669,676 ---- /* Bind remaining args to $1 ... $n */ arg_index = bind_args (argv, arg_index, argc, 1); + + if (debugging_mode && locally_skip_execution == 0 && running_setuid == 0) + start_debugger (); + /* Do the things that should be done only for interactive shells. */ if (interactive_shell) *************** *** 711,716 **** else if (argv[++arg_index] == 0) { ! report_error ("%s: option requires an argument", long_args[i].name); ! exit (EX_USAGE); } else --- 735,740 ---- else if (argv[++arg_index] == 0) { ! report_error (_("%s: option requires an argument"), long_args[i].name); ! exit (EX_BADUSAGE); } else *************** *** 724,730 **** if (longarg) { ! report_error ("%s: invalid option", argv[arg_index]); show_shell_usage (stderr, 0); ! exit (EX_USAGE); } break; /* No such argument. Maybe flag arg. */ --- 748,754 ---- if (longarg) { ! report_error (_("%s: invalid option"), argv[arg_index]); show_shell_usage (stderr, 0); ! exit (EX_BADUSAGE); } break; /* No such argument. Maybe flag arg. */ *************** *** 787,791 **** } if (set_minus_o_option (on_or_off, o_option) != EXECUTION_SUCCESS) ! exit (EX_USAGE); next_arg++; break; --- 811,815 ---- } if (set_minus_o_option (on_or_off, o_option) != EXECUTION_SUCCESS) ! exit (EX_BADUSAGE); next_arg++; break; *************** *** 813,819 **** if (change_flag (arg_character, on_or_off) == FLAG_ERROR) { ! report_error ("%c%c: invalid option", on_or_off, arg_character); show_shell_usage (stderr, 0); ! exit (EX_USAGE); } } --- 837,843 ---- if (change_flag (arg_character, on_or_off) == FLAG_ERROR) { ! report_error (_("%c%c: invalid option"), on_or_off, arg_character); show_shell_usage (stderr, 0); ! exit (EX_BADUSAGE); } } *************** *** 930,934 **** /* get the rshd/sshd case out of the way first. */ if (interactive_shell == 0 && no_rc == 0 && login_shell == 0 && ! act_like_sh == 0 && local_pending_command) { #ifdef SSH_SOURCE_BASHRC --- 954,958 ---- /* get the rshd/sshd case out of the way first. */ if (interactive_shell == 0 && no_rc == 0 && login_shell == 0 && ! act_like_sh == 0 && command_execution_string) { #ifdef SSH_SOURCE_BASHRC *************** *** 1083,1086 **** --- 1107,1112 ---- temp = base_pathname (name); + if (*temp == '-') + temp++; if (restricted || (STREQ (temp, RESTRICTED_SHELL_NAME))) { *************** *** 1134,1138 **** { int code, nw, nb; ! WORD_LIST *wl, *result; code = setjmp (top_level); --- 1160,1164 ---- { int code, nw, nb; ! WORD_LIST *wl, *tl, *result; code = setjmp (top_level); *************** *** 1145,1148 **** --- 1171,1175 ---- case FORCE_EOF: return last_command_exit_value = 127; + case ERREXIT: case EXITPROG: return last_command_exit_value; *************** *** 1168,1171 **** --- 1195,1201 ---- return (126); wl = global_command->value.Simple->words; + if (protected_mode) + for (tl = wl; tl; tl = tl->next) + tl->word->flags |= W_NOCOMSUB; result = wl ? expand_words_no_vars (wl) : (WORD_LIST *)0; } *************** *** 1218,1221 **** --- 1248,1252 ---- case FORCE_EOF: return last_command_exit_value = 127; + case ERREXIT: case EXITPROG: return last_command_exit_value; *************** *** 1251,1257 **** dollar_vars[0] = savestring (args->word->word); remember_args (args->next, 1); } else /* bind to $1...$n for shell script */ ! remember_args (args, 1); dispose_words (args); --- 1282,1292 ---- dollar_vars[0] = savestring (args->word->word); remember_args (args->next, 1); + push_args (args->next); /* BASH_ARGV and BASH_ARGC */ } else /* bind to $1...$n for shell script */ ! { ! remember_args (args, 1); ! push_args (args); /* BASH_ARGV and BASH_ARGC */ ! } dispose_words (args); *************** *** 1265,1268 **** --- 1300,1320 ---- { remember_args ((WORD_LIST *)NULL, 1); + pop_args (); /* Reset BASH_ARGV and BASH_ARGC */ + } + + static void + start_debugger () + { + #if defined (DEBUGGER) && defined (DEBUGGER_START_FILE) + int old_errexit; + + old_errexit = exit_immediately_on_error; + exit_immediately_on_error = 0; + + maybe_execute_file (DEBUGGER_START_FILE, 1); + function_trace_mode = 1; + + exit_immediately_on_error += old_errexit; + #endif } *************** *** 1272,1282 **** { int fd, e, fd_is_tty; ! char *filename, *path_filename; char sample[80]; int sample_len; struct stat sb; - free (dollar_vars[0]); - dollar_vars[0] = savestring (script_name); filename = savestring (script_name); --- 1324,1336 ---- { int fd, e, fd_is_tty; ! char *filename, *path_filename, *t; char sample[80]; int sample_len; struct stat sb; + #if defined (ARRAY_VARS) + SHELL_VAR *funcname_v, *bash_source_v, *bash_lineno_v; + ARRAY *funcname_a, *bash_source_a, *bash_lineno_a; + #endif filename = savestring (script_name); *************** *** 1305,1308 **** --- 1359,1380 ---- } + free (dollar_vars[0]); + dollar_vars[0] = savestring (script_name); + + #if defined (ARRAY_VARS) + GET_ARRAY_FROM_VAR ("FUNCNAME", funcname_v, funcname_a); + GET_ARRAY_FROM_VAR ("BASH_SOURCE", bash_source_v, bash_source_a); + GET_ARRAY_FROM_VAR ("BASH_LINENO", bash_lineno_v, bash_lineno_a); + + array_push (bash_source_a, filename); + if (bash_lineno_a) + { + t = itos (executing_line_number ()); + array_push (bash_lineno_a, t); + free (t); + } + array_push (funcname_a, "main"); + #endif + #ifdef HAVE_DEV_FD fd_is_tty = isatty (fd); *************** *** 1322,1326 **** e = errno; if ((fstat (fd, &sb) == 0) && S_ISDIR (sb.st_mode)) ! internal_error ("%s: is a directory", filename); else { --- 1394,1398 ---- e = errno; if ((fstat (fd, &sb) == 0) && S_ISDIR (sb.st_mode)) ! internal_error (_("%s: is a directory"), filename); else { *************** *** 1517,1521 **** else { ! current_user.user_name = savestring ("I have no name!"); current_user.shell = savestring ("/bin/sh"); current_user.home_dir = savestring ("/"); --- 1589,1594 ---- else { ! current_user.user_name = _("I have no name!"); ! current_user.user_name = savestring (current_user.user_name); current_user.shell = savestring ("/bin/sh"); current_user.home_dir = savestring ("/"); *************** *** 1651,1662 **** if (extra) fprintf (fp, "GNU bash, version %s-(%s)\n", shell_version_string (), MACHTYPE); ! fprintf (fp, "Usage:\t%s [GNU long option] [option] ...\n\t%s [GNU long option] [option] script-file ...\n", shell_name, shell_name); ! fputs ("GNU long options:\n", fp); for (i = 0; long_args[i].name; i++) fprintf (fp, "\t--%s\n", long_args[i].name); ! fputs ("Shell options:\n", fp); ! fputs ("\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n", fp); for (i = 0, set_opts = 0; shell_builtins[i].name; i++) --- 1724,1735 ---- if (extra) fprintf (fp, "GNU bash, version %s-(%s)\n", shell_version_string (), MACHTYPE); ! fprintf (fp, _("Usage:\t%s [GNU long option] [option] ...\n\t%s [GNU long option] [option] script-file ...\n"), shell_name, shell_name); ! fputs (_("GNU long options:\n"), fp); for (i = 0; long_args[i].name; i++) fprintf (fp, "\t--%s\n", long_args[i].name); ! fputs (_("Shell options:\n"), fp); ! fputs (_("\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"), fp); for (i = 0, set_opts = 0; shell_builtins[i].name; i++) *************** *** 1673,1677 **** if (t) *t = '\0'; ! fprintf (fp, "\t-%s or -o option\n", s); free (set_opts); } --- 1746,1750 ---- if (t) *t = '\0'; ! fprintf (fp, _("\t-%s or -o option\n"), s); free (set_opts); } *************** *** 1679,1685 **** if (extra) { ! fprintf (fp, "Type `%s -c \"help set\"' for more information about shell options.\n", shell_name); ! fprintf (fp, "Type `%s -c help' for more information about shell builtin commands.\n", shell_name); ! fprintf (fp, "Use the `bashbug' command to report bugs.\n"); } } --- 1752,1758 ---- if (extra) { ! fprintf (fp, _("Type `%s -c \"help set\"' for more information about shell options.\n"), shell_name); ! fprintf (fp, _("Type `%s -c help' for more information about shell builtin commands.\n"), shell_name); ! fprintf (fp, _("Use the `bashbug' command to report bugs.\n")); } } *************** *** 1707,1711 **** for (i = 0; i < shopt_ind; i++) if (shopt_setopt (shopt_alist[i].word, (shopt_alist[i].token == '-')) != EXECUTION_SUCCESS) ! exit (EX_USAGE); free (shopt_alist); shopt_alist = 0; --- 1780,1784 ---- for (i = 0; i < shopt_ind; i++) if (shopt_setopt (shopt_alist[i].word, (shopt_alist[i].token == '-')) != EXECUTION_SUCCESS) ! exit (EX_BADUSAGE); free (shopt_alist); shopt_alist = 0; diff -aNrc2 bash-2.05b-patched/shell.h bash-3.0/shell.h *** bash-2.05b-patched/shell.h Thu Mar 7 16:59:10 2002 --- bash-3.0/shell.h Sun Jun 1 15:04:36 2003 *************** *** 1,5 **** /* shell.h -- The data structures used by the shell */ ! /* Copyright (C) 1993 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,5 ---- /* shell.h -- The data structures used by the shell */ ! /* Copyright (C) 1993-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 41,45 **** #include "pathnames.h" #include "externs.h" - #include "version.h" extern int EOF_Reached; --- 41,44 ---- *************** *** 72,83 **** /* Flag values that control parameter pattern substitution. */ ! #define MATCH_ANY 0x0 ! #define MATCH_BEG 0x1 ! #define MATCH_END 0x2 ! ! #define MATCH_TYPEMASK 0x3 ! ! #define MATCH_GLOBREP 0x10 ! #define MATCH_QUOTED 0x20 /* Some needed external declarations. */ --- 71,83 ---- /* Flag values that control parameter pattern substitution. */ ! #define MATCH_ANY 0x000 ! #define MATCH_BEG 0x001 ! #define MATCH_END 0x002 ! ! #define MATCH_TYPEMASK 0x003 ! ! #define MATCH_GLOBREP 0x010 ! #define MATCH_QUOTED 0x020 ! #define MATCH_STARSUB 0x040 /* Some needed external declarations. */ *************** *** 86,89 **** --- 86,90 ---- /* Generalized global variables. */ + extern int debugging_mode; extern int executing, login_shell; extern int interactive, interactive_shell; *************** *** 120,121 **** --- 121,163 ---- # define USE_VAR(x) #endif + + /* Structure in which to save partial parsing state when doing things like + PROMPT_COMMAND and bash_execute_unix_command execution. */ + + typedef struct _sh_parser_state_t { + + /* parsing state */ + int parser_state; + int *token_state; + + /* input line state -- line number saved elsewhere */ + int input_line_terminator; + int eof_encountered; + + #if defined (HANDLE_MULTIBYTE) + /* Nothing right now for multibyte state, but might want something later. */ + #endif + + /* history state affecting or modified by the parser */ + int current_command_line_count; + #if defined (HISTORY) + int remember_on_history; + int history_expansion_inhibited; + #endif + + /* execution state possibly modified by the parser */ + int last_command_exit_value; + #if defined (ARRAY_VARS) + ARRAY *pipestatus; + #endif + sh_builtin_func_t *last_shell_builtin, *this_shell_builtin; + + /* flags state affecting the parser */ + int expand_aliases; + int echo_input_at_read; + + } sh_parser_state_t; + + /* Let's try declaring these here. */ + extern sh_parser_state_t *save_parser_state __P((sh_parser_state_t *)); + extern void restore_parser_state __P((sh_parser_state_t *)); diff -aNrc2 bash-2.05b-patched/sig.c bash-3.0/sig.c *** bash-2.05b-patched/sig.c Wed Jul 10 16:07:53 2002 --- bash-3.0/sig.c Fri Dec 19 16:11:35 2003 *************** *** 33,36 **** --- 33,38 ---- #include + #include "bashintl.h" + #include "shell.h" #if defined (JOB_CONTROL) *************** *** 52,55 **** --- 54,58 ---- extern int last_command_exit_value; + extern int last_command_exit_signal; extern int return_catch_flag; extern int loop_level, continuing, breaking; *************** *** 344,347 **** --- 347,352 ---- return; + last_command_exit_signal = (last_command_exit_value > 128) ? + (last_command_exit_value - 128) : 0; last_command_exit_value |= 128; *************** *** 478,482 **** default: ! internal_error ("Bad code in sig.c: sigprocmask"); } --- 483,487 ---- default: ! internal_error (_("sigprocmask: %d: invalid operation"), operation); } diff -aNrc2 bash-2.05b-patched/subst.c bash-3.0/subst.c *** bash-2.05b-patched/subst.c Thu Sep 5 10:59:19 2002 --- bash-3.0/subst.c Sun Jul 4 13:56:13 2004 *************** *** 5,9 **** beauty, but, hey, you're alright.'' */ ! /* Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 5,9 ---- beauty, but, hey, you're alright.'' */ ! /* Copyright (C) 1987-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 38,41 **** --- 38,42 ---- #include "bashansi.h" #include "posixstat.h" + #include "bashintl.h" #include "shell.h" *************** *** 70,73 **** --- 71,76 ---- #define VT_ARRAYMEMBER 3 + #define VT_STARSUB 128 /* $* or ${array[*]} -- used to split */ + /* Flags for quoted_strchr */ #define ST_BACKSL 0x01 *************** *** 80,83 **** --- 83,89 ---- #define EX_VARNAME 0x02 /* variable name; for string_extract () */ + /* Flags for the `pflags' argument to param_expand() */ + #define PF_NOCOMSUB 0x01 /* Do not perform command substitution */ + /* These defs make it easier to use the editor. */ #define LBRACE '{' *************** *** 122,127 **** /* Extern functions and variables from different files. */ ! extern int last_command_exit_value; extern int subshell_environment; extern int eof_encountered; extern int return_catch_flag, return_catch_value; --- 128,134 ---- /* Extern functions and variables from different files. */ ! extern int last_command_exit_value, last_command_exit_signal; extern int subshell_environment; + extern int subshell_level; extern int eof_encountered; extern int return_catch_flag, return_catch_value; *************** *** 131,134 **** --- 138,143 ---- extern struct fd_bitmap *current_fds_to_close; extern int wordexp_only; + extern int expanding_redir; + extern int tempenv_assign_error; /* Non-zero means to allow unmatched globbed filenames to expand to *************** *** 136,139 **** --- 145,151 ---- int allow_null_glob_expansion; + /* Non-zero means to throw an error when globbing fails to match anything. */ + int fail_glob_expansion; + #if 0 /* Variables to keep track of which words in an expanded word list (the *************** *** 200,205 **** --- 212,232 ---- static char *pos_params __P((char *, int, int, int)); + static unsigned char *mb_getcharlens __P((char *, int)); + + static char *remove_upattern __P((char *, char *, int)); + #if defined (HANDLE_MULTIBYTE) + # if !defined (HAVE_WCSDUP) + static wchar_t *wcsdup __P((wchar_t *)); + # endif + static wchar_t *remove_wpattern __P((wchar_t *, size_t, wchar_t *, int)); + #endif static char *remove_pattern __P((char *, char *, int)); + static int match_pattern_char __P((char *, char *)); + static int match_upattern __P((char *, char *, int, char **, char **)); + #if defined (HANDLE_MULTIBYTE) + static int match_pattern_wchar __P((wchar_t *, wchar_t *)); + static int match_wpattern __P((wchar_t *, char **, size_t, wchar_t *, int, char **, char **)); + #endif static int match_pattern __P((char *, char *, int, char **, char **)); static int getpatspec __P((int, char *)); *************** *** 222,227 **** static int valid_brace_expansion_word __P((char *, int)); static char *parameter_brace_expand_word __P((char *, int, int)); ! static char *parameter_brace_expand_indir __P((char *, int, int)); static char *parameter_brace_expand_rhs __P((char *, char *, int, int, int *, int *)); static void parameter_brace_expand_error __P((char *, char *)); --- 249,256 ---- static int valid_brace_expansion_word __P((char *, int)); + static int chk_atstar __P((char *, int, int *, int *)); + static char *parameter_brace_expand_word __P((char *, int, int)); ! static char *parameter_brace_expand_indir __P((char *, int, int, int *, int *)); static char *parameter_brace_expand_rhs __P((char *, char *, int, int, int *, int *)); static void parameter_brace_expand_error __P((char *, char *)); *************** *** 232,236 **** static char *skiparith __P((char *, int)); static int verify_substring_values __P((char *, char *, int, intmax_t *, intmax_t *)); ! static int get_var_and_type __P((char *, char *, SHELL_VAR **, char **)); static char *parameter_brace_substring __P((char *, char *, char *, int)); --- 261,266 ---- static char *skiparith __P((char *, int)); static int verify_substring_values __P((char *, char *, int, intmax_t *, intmax_t *)); ! static int get_var_and_type __P((char *, char *, int, SHELL_VAR **, char **)); ! static char *mb_substring __P((char *, int, int)); static char *parameter_brace_substring __P((char *, char *, char *, int)); *************** *** 246,249 **** --- 276,281 ---- static WORD_LIST *word_list_split __P((WORD_LIST *)); + static void exp_jump_to_top_level __P((int)); + static WORD_LIST *separate_out_assignments __P((WORD_LIST *)); static WORD_LIST *glob_expand_word_list __P((WORD_LIST *, int)); *************** *** 648,651 **** --- 680,685 ---- if (c == '$' && ((string[i + 1] == LPAREN) || (string[i + 1] == LBRACE))) { + int free_ret = 1; + si = i + 2; if (string[i + 1] == LPAREN) *************** *** 657,666 **** temp[j++] = string[i + 1]; for (t = 0; ret[t]; t++, j++) temp[j] = ret[t]; ! temp[j++] = string[si]; ! i = si + 1; ! free (ret); continue; } --- 691,716 ---- temp[j++] = string[i + 1]; + /* Just paranoia; ret will not be 0 unless no_longjmp_on_fatal_error + is set. */ + if (ret == 0 && no_longjmp_on_fatal_error) + { + free_ret = 0; + ret = string + i + 2; + } + for (t = 0; ret[t]; t++, j++) temp[j] = ret[t]; ! temp[j] = string[si]; ! if (string[si]) ! { ! j++; ! i = si + 1; ! } ! else ! i = si; ! ! if (free_ret) ! free (ret); continue; } *************** *** 990,998 **** } ! if (c == 0 && nesting_level && no_longjmp_on_fatal_error == 0) { ! report_error ("bad substitution: no `%s' in %s", closer, string); ! last_command_exit_value = EXECUTION_FAILURE; ! jump_to_top_level (DISCARD); } --- 1040,1056 ---- } ! if (c == 0 && nesting_level) { ! if (no_longjmp_on_fatal_error == 0) ! { ! report_error (_("bad substitution: no closing `%s' in %s"), closer, string); ! last_command_exit_value = EXECUTION_FAILURE; ! exp_jump_to_top_level (DISCARD); ! } ! else ! { ! *sindex = i; ! return (char *)NULL; ! } } *************** *** 1103,1111 **** } ! if (c == 0 && nesting_level && no_longjmp_on_fatal_error == 0) { ! report_error ("bad substitution: no ending `}' in %s", string); ! last_command_exit_value = EXECUTION_FAILURE; ! jump_to_top_level (DISCARD); } --- 1161,1177 ---- } ! if (c == 0 && nesting_level) { ! if (no_longjmp_on_fatal_error == 0) ! { /* { */ ! report_error ("bad substitution: no closing `%s' in %s", "}", string); ! last_command_exit_value = EXECUTION_FAILURE; ! exp_jump_to_top_level (DISCARD); ! } ! else ! { ! *sindex = i; ! return ((char *)NULL); ! } } *************** *** 1138,1144 **** ADVANCE_CHAR (string, slen, i); if (j < prev_i) ! do string[j++] = string[prev_i++]; while (prev_i < i); else ! j = i; } string[j] = '\0'; --- 1204,1210 ---- ADVANCE_CHAR (string, slen, i); if (j < prev_i) ! do string[j++] = string[prev_i++]; while (prev_i < i); else ! j = i; } string[j] = '\0'; *************** *** 1358,1362 **** /* Split STRING (length SLEN) at DELIMS, and return a WORD_LIST with the individual words. If DELIMS is NULL, the current value of $IFS is used ! to split the string. SENTINEL is an index to look for. NWP, if non-NULL gets the number of words in the returned list. CWP, if non-NULL, gets the index of the word containing SENTINEL. Non-whitespace chars in --- 1424,1429 ---- /* Split STRING (length SLEN) at DELIMS, and return a WORD_LIST with the individual words. If DELIMS is NULL, the current value of $IFS is used ! to split the string, and the function follows the shell field splitting ! rules. SENTINEL is an index to look for. NWP, if non-NULL, gets the number of words in the returned list. CWP, if non-NULL, gets the index of the word containing SENTINEL. Non-whitespace chars in *************** *** 1370,1374 **** int *nwp, *cwp; { ! int ts, te, i, nw, cw; char *token, *d, *d2; WORD_LIST *ret, *tl; --- 1437,1441 ---- int *nwp, *cwp; { ! int ts, te, i, nw, cw, ifs_split; char *token, *d, *d2; WORD_LIST *ret, *tl; *************** *** 1384,1387 **** --- 1451,1455 ---- d = (delims == 0) ? ifs_value : delims; + ifs_split = delims == 0; /* Make d2 the non-whitespace characters in delims */ *************** *** 1400,1404 **** ret = (WORD_LIST *)NULL; ! for (i = 0; member (string[i], d) && spctabnl(string[i]); i++) ; if (string[i] == '\0') --- 1468,1474 ---- ret = (WORD_LIST *)NULL; ! /* Remove sequences of whitspace characters at the start of the string, as ! long as those characters are delimiters. */ ! for (i = 0; member (string[i], d) && spctabnl (string[i]); i++) ; if (string[i] == '\0') *************** *** 1418,1423 **** { te = ts + 1; ! while (member (string[te], d2)) ! te++; } --- 1488,1499 ---- { te = ts + 1; ! /* If we're using IFS splitting, the non-whitespace delimiter char ! and any additional IFS whitespace delimits a field. */ ! if (ifs_split) ! while (member (string[te], d) && spctabnl (string[te])) ! te++; ! else ! while (member (string[te], d2)) ! te++; } *************** *** 1450,1455 **** break; ! i = te /* + member (string[te], d) */; ! while (member (string[i], d) && spctabnl(string[i])) i++; --- 1526,1531 ---- break; ! i = te; ! while (member (string[i], d) && (ifs_split || spctabnl(string[i]))) i++; *************** *** 1494,1498 **** char *temp; ! offset = assignment (string); if (offset == 0) return (char *)NULL; --- 1570,1574 ---- char *temp; ! offset = assignment (string, 0); if (offset == 0) return (char *)NULL; *************** *** 1522,1525 **** --- 1598,1605 ---- return ((char *)NULL); + /* Short-circuit quickly if we don't need to separate anything. */ + if (list->next == 0) + return (savestring (list->word->word)); + /* This is nearly always called with either sep[0] == 0 or sep[1] == 0. */ sep_len = STRLEN (sep); *************** *** 1917,1924 **** #if defined (ARRAY_VARS) char *t; ! int ni, assign_list = 0; #endif ! offset = assignment (string); name = savestring (string); value = (char *)NULL; --- 1997,2005 ---- #if defined (ARRAY_VARS) char *t; ! int ni; #endif + int assign_list = 0; ! offset = assignment (string, 0); name = savestring (string); value = (char *)NULL; *************** *** 1961,1972 **** if (echo_command_at_execute) ! { ! #if defined (ARRAY_VARS) ! if (assign_list) ! fprintf (stderr, "%s%s=(%s)\n", indirection_level_string (), name, value); ! else ! #endif ! fprintf (stderr, "%s%s=%s\n", indirection_level_string (), name, value); ! } #define ASSIGN_RETURN(r) do { FREE (value); free (name); return (r); } while (0) --- 2042,2046 ---- if (echo_command_at_execute) ! xtrace_print_assignment (name, value, assign_list, 1); #define ASSIGN_RETURN(r) do { FREE (value); free (name); return (r); } while (0) *************** *** 1977,1981 **** if (assign_list) { ! report_error ("%s: cannot assign list to array member", name); ASSIGN_RETURN (0); } --- 2051,2055 ---- if (assign_list) { ! report_error (_("%s: cannot assign list to array member"), name); ASSIGN_RETURN (0); } *************** *** 2124,2128 **** --- 2198,2213 ---- t->next = (WORD_LIST *)NULL; if (string[0] == '*') + #if 0 ret = (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) ? string_list_dollar_star (quote_list (h)) : string_list (h); + #else + { + if (quoted & Q_DOUBLE_QUOTES) + ret = string_list_dollar_star (quote_list (h)); + else if (quoted & Q_HERE_DOCUMENT) + ret = string_list (quote_list (h)); + else + ret = string_list (h); + } + #endif else ret = string_list ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) ? quote_list (h) : h); *************** *** 2313,2317 **** if (result == &expand_word_error || result == &expand_word_fatal) { - expand_no_split_dollar_star = 0; /* XXX */ /* By convention, each time this error is returned, w->word has already been freed (it sometimes may not be in the fatal case, --- 2398,2401 ---- *************** *** 2320,2324 **** w->word = (char *)NULL; last_command_exit_value = EXECUTION_FAILURE; ! jump_to_top_level ((result == &expand_word_error) ? DISCARD : FORCE_EOF); /* NOTREACHED */ } --- 2404,2408 ---- w->word = (char *)NULL; last_command_exit_value = EXECUTION_FAILURE; ! exp_jump_to_top_level ((result == &expand_word_error) ? DISCARD : FORCE_EOF); /* NOTREACHED */ } *************** *** 2753,2763 **** { if (string[i] == CTLESC) ! { ! i++; j++; ! if (i == slen) ! break; ! } else if (string[i] == CTLNUL) ! i++; prev_i = i; --- 2837,2851 ---- { if (string[i] == CTLESC) ! { ! /* Old code had j++, but we cannot assume that i == j at this ! point -- what if a CTLNUL has already been removed from the ! string? We don't want to drop the CTLESC or recopy characters ! that we've already copied down. */ ! i++; string[j++] = CTLESC; ! if (i == slen) ! break; ! } else if (string[i] == CTLNUL) ! i++; prev_i = i; *************** *** 2793,2796 **** --- 2881,2911 ---- /* **************************************************************** */ + #if defined (HANDLE_MULTIBYTE) + #if 0 /* Currently unused */ + static unsigned char * + mb_getcharlens (string, len) + char *string; + int len; + { + int i, offset, last; + unsigned char *ret; + char *p; + DECLARE_MBSTATE; + + i = offset = 0; + last = 0; + ret = (unsigned char *)xmalloc (len); + memset (ret, 0, len); + while (string[last]) + { + ADVANCE_CHAR (string, len, offset); + ret[last] = offset - last; + last = offset; + } + return ret; + } + #endif + #endif + /* Remove the portion of PARAM matched by PATTERN according to OP, where OP can have one of 4 values: *************** *** 2807,2811 **** static char * ! remove_pattern (param, pattern, op) char *param, *pattern; int op; --- 2922,2926 ---- static char * ! remove_upattern (param, pattern, op) char *param, *pattern; int op; *************** *** 2815,2823 **** register char *p, *ret, c; - if (param == NULL || *param == '\0') - return (param); - if (pattern == NULL || *pattern == '\0') /* minor optimization */ - return (savestring (param)); - len = STRLEN (param); end = param + len; --- 2930,2933 ---- *************** *** 2835,2838 **** --- 2945,2949 ---- } *p = c; + } break; *************** *** 2877,2883 **** --- 2988,3129 ---- break; } + return (savestring (param)); /* no match, return original string */ } + #if defined (HANDLE_MULTIBYTE) + + #if !defined (HAVE_WCSDUP) + static wchar_t * + wcsdup (ws) + wchar_t *ws; + { + wchar_t *ret; + size_t len; + + len = wcslen (ws); + ret = xmalloc ((len + 1) * sizeof (wchar_t)); + if (ret == 0) + return ret; + return (wcscpy (ret, ws)); + } + #endif /* !HAVE_WCSDUP */ + + static wchar_t * + remove_wpattern (wparam, wstrlen, wpattern, op) + wchar_t *wparam; + size_t wstrlen; + wchar_t *wpattern; + int op; + { + wchar_t wc; + int n, n1; + wchar_t *ret; + + switch (op) + { + case RP_LONG_LEFT: /* remove longest match at start */ + for (n = wstrlen; n >= 0; n--) + { + wc = wparam[n]; wparam[n] = L'\0'; + if (wcsmatch (wpattern, wparam, FNMATCH_EXTFLAG) != FNM_NOMATCH) + { + wparam[n] = wc; + return (wcsdup (wparam + n)); + } + wparam[n] = wc; + } + break; + + case RP_SHORT_LEFT: /* remove shortest match at start */ + for (n = 0; n <= wstrlen; n++) + { + wc = wparam[n]; wparam[n] = L'\0'; + if (wcsmatch (wpattern, wparam, FNMATCH_EXTFLAG) != FNM_NOMATCH) + { + wparam[n] = wc; + return (wcsdup (wparam + n)); + } + wparam[n] = wc; + } + break; + + case RP_LONG_RIGHT: /* remove longest match at end */ + for (n = 0; n <= wstrlen; n++) + { + if (wcsmatch (wpattern, wparam + n, FNMATCH_EXTFLAG) != FNM_NOMATCH) + { + wc = wparam[n]; wparam[n] = L'\0'; + ret = wcsdup (wparam); + wparam[n] = wc; + return (ret); + } + } + break; + + case RP_SHORT_RIGHT: /* remove shortest match at end */ + for (n = wstrlen; n >= 0; n--) + { + if (wcsmatch (wpattern, wparam + n, FNMATCH_EXTFLAG) != FNM_NOMATCH) + { + wc = wparam[n]; wparam[n] = L'\0'; + ret = wcsdup (wparam); + wparam[n] = wc; + return (ret); + } + } + break; + } + + return (wcsdup (wparam)); /* no match, return original string */ + } + #endif /* HANDLE_MULTIBYTE */ + + static char * + remove_pattern (param, pattern, op) + char *param, *pattern; + int op; + { + if (param == NULL) + return (param); + if (*param == '\0' || pattern == NULL || *pattern == '\0') /* minor optimization */ + return (savestring (param)); + + #if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1) + { + wchar_t *ret, *oret; + size_t n; + wchar_t *wparam, *wpattern; + mbstate_t ps; + char *xret; + + n = xdupmbstowcs (&wpattern, NULL, pattern); + if (n == (size_t)-1) + return (remove_upattern (param, pattern, op)); + n = xdupmbstowcs (&wparam, NULL, param); + if (n == (size_t)-1) + { + free (wpattern); + return (remove_upattern (param, pattern, op)); + } + oret = ret = remove_wpattern (wparam, n, wpattern, op); + + free (wparam); + free (wpattern); + + n = strlen (param); + xret = xmalloc (n + 1); + memset (&ps, '\0', sizeof (mbstate_t)); + n = wcsrtombs (xret, (const wchar_t **)&ret, n, &ps); + xret[n] = '\0'; /* just to make sure */ + free (oret); + return xret; + } + else + #endif + return (remove_upattern (param, pattern, op)); + } + /* Return 1 of the first character of STRING could match the first character of pattern PAT. Used to avoid n2 calls to strmatch(). */ *************** *** 2917,2933 **** of the string, respectively. The longest match is returned. */ static int ! match_pattern (string, pat, mtype, sp, ep) char *string, *pat; int mtype; char **sp, **ep; { ! int c; register char *p, *p1; char *end; ! if (string == 0 || *string == 0 || pat == 0 || *pat == 0) ! return (0); ! ! end = string + STRLEN (string); switch (mtype) --- 3163,3177 ---- of the string, respectively. The longest match is returned. */ static int ! match_upattern (string, pat, mtype, sp, ep) char *string, *pat; int mtype; char **sp, **ep; { ! int c, len; register char *p, *p1; char *end; ! len = STRLEN (string); ! end = string + len; switch (mtype) *************** *** 2952,2955 **** --- 3196,3200 ---- } } + return (0); *************** *** 2957,2960 **** --- 3202,3206 ---- if (match_pattern_char (pat, string) == 0) return (0); + for (p = end; p >= string; p--) { *************** *** 2969,2982 **** *p = c; } return (0); case MATCH_END: for (p = string; p <= end; p++) ! if (strmatch (pat, p, FNMATCH_EXTFLAG) == 0) ! { ! *sp = p; ! *ep = end; ! return 1; ! } return (0); } --- 3215,3233 ---- *p = c; } + return (0); case MATCH_END: for (p = string; p <= end; p++) ! { ! if (strmatch (pat, p, FNMATCH_EXTFLAG) == 0) ! { ! *sp = p; ! *ep = end; ! return 1; ! } ! ! } ! return (0); } *************** *** 2985,2988 **** --- 3236,3392 ---- } + #if defined (HANDLE_MULTIBYTE) + /* Return 1 of the first character of WSTRING could match the first + character of pattern WPAT. Wide character version. */ + static int + match_pattern_wchar (wpat, wstring) + wchar_t *wpat, *wstring; + { + wchar_t wc; + + if (*wstring == 0) + return (0); + + switch (wc = *wpat++) + { + default: + return (*wstring == wc); + case L'\\': + return (*wstring == *wpat); + case L'?': + return (*wpat == LPAREN ? 1 : (*wstring != L'\0')); + case L'*': + return (1); + case L'+': + case L'!': + case L'@': + return (*wpat == LPAREN ? 1 : (*wstring == wc)); + case L'[': + return (*wstring != L'\0'); + } + } + + /* Match WPAT anywhere in WSTRING and return the match boundaries. + This returns 1 in case of a successful match, 0 otherwise. Wide + character version. */ + static int + match_wpattern (wstring, indices, wstrlen, wpat, mtype, sp, ep) + wchar_t *wstring; + char **indices; + size_t wstrlen; + wchar_t *wpat; + int mtype; + char **sp, **ep; + { + wchar_t wc; + int len; + #if 0 + size_t n, n1; /* Apple's gcc seems to miscompile this badly */ + #else + int n, n1; + #endif + + switch (mtype) + { + case MATCH_ANY: + for (n = 0; n <= wstrlen; n++) + { + if (match_pattern_wchar (wpat, wstring + n)) + { + for (n1 = wstrlen; n1 >= n; n1--) + { + wc = wstring[n1]; wstring[n1] = L'\0'; + if (wcsmatch (wpat, wstring + n, FNMATCH_EXTFLAG) == 0) + { + wstring[n1] = wc; + *sp = indices[n]; + *ep = indices[n1]; + return 1; + } + wstring[n1] = wc; + } + } + } + + return (0); + + case MATCH_BEG: + if (match_pattern_wchar (wpat, wstring) == 0) + return (0); + + for (n = wstrlen; n >= 0; n--) + { + wc = wstring[n]; wstring[n] = L'\0'; + if (wcsmatch (wpat, wstring, FNMATCH_EXTFLAG) == 0) + { + wstring[n] = wc; + *sp = indices[0]; + *ep = indices[n]; + return 1; + } + wstring[n] = wc; + } + + return (0); + + case MATCH_END: + for (n = 0; n <= wstrlen; n++) + { + if (wcsmatch (wpat, wstring + n, FNMATCH_EXTFLAG) == 0) + { + *sp = indices[n]; + *ep = indices[wstrlen]; + return 1; + } + } + + return (0); + } + + return (0); + } + #endif /* HANDLE_MULTIBYTE */ + + static int + match_pattern (string, pat, mtype, sp, ep) + char *string, *pat; + int mtype; + char **sp, **ep; + { + #if defined (HANDLE_MULTIBYTE) + int ret; + size_t n; + wchar_t *wstring, *wpat; + char **indices; + #endif + + if (string == 0 || *string == 0 || pat == 0 || *pat == 0) + return (0); + + #if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1) + { + n = xdupmbstowcs (&wpat, NULL, pat); + if (n == (size_t)-1) + return (match_upattern (string, pat, mtype, sp, ep)); + n = xdupmbstowcs (&wstring, &indices, string); + if (n == (size_t)-1) + { + free (wpat); + return (match_upattern (string, pat, mtype, sp, ep)); + } + ret = match_wpattern (wstring, indices, n, wpat, mtype, sp, ep); + + free (wpat); + free (wstring); + free (indices); + + return (ret); + } + else + #endif + return (match_upattern (string, pat, mtype, sp, ep)); + } + static int getpatspec (c, value) *************** *** 3078,3082 **** tword = remove_pattern (l->word->word, pattern, patspec); w = make_bare_word (tword); ! free (tword); new = make_word_list (w, new); } --- 3482,3486 ---- tword = remove_pattern (l->word->word, pattern, patspec); w = make_bare_word (tword); ! FREE (tword); new = make_word_list (w, new); } *************** *** 3084,3088 **** --- 3488,3496 ---- l = REVERSE_LIST (new, WORD_LIST *); if (itype == '*') + #if 0 tword = (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) ? string_list_dollar_star (l) : string_list (l); + #else + tword = (quoted & Q_DOUBLE_QUOTES) ? string_list_dollar_star (l) : string_list (l); + #endif else tword = string_list ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) ? quote_list (l) : l); *************** *** 3142,3146 **** int rtype, quoted; { ! int vtype, patspec; char *temp1, *val, *pattern; SHELL_VAR *v; --- 3550,3554 ---- int rtype, quoted; { ! int vtype, patspec, starsub; char *temp1, *val, *pattern; SHELL_VAR *v; *************** *** 3151,3158 **** this_command_name = varname; ! vtype = get_var_and_type (varname, value, &v, &val); if (vtype == -1) return ((char *)NULL); patspec = getpatspec (rtype, patstr); if (patspec == RP_LONG_LEFT || patspec == RP_LONG_RIGHT) --- 3559,3569 ---- this_command_name = varname; ! vtype = get_var_and_type (varname, value, quoted, &v, &val); if (vtype == -1) return ((char *)NULL); + starsub = vtype & VT_STARSUB; + vtype &= ~VT_STARSUB; + patspec = getpatspec (rtype, patstr); if (patspec == RP_LONG_LEFT || patspec == RP_LONG_RIGHT) *************** *** 3467,3471 **** if (pipe (fildes) < 0) { ! sys_error ("cannot make pipe for process substitution"); return ((char *)NULL); } --- 3878,3882 ---- if (pipe (fildes) < 0) { ! sys_error (_("cannot make pipe for process substitution")); return ((char *)NULL); } *************** *** 3483,3487 **** if (!pathname) { ! sys_error ("cannot make pipe for process substitution"); return ((char *)NULL); } --- 3894,3898 ---- if (!pathname) { ! sys_error (_("cannot make pipe for process substitution")); return ((char *)NULL); } *************** *** 3499,3502 **** --- 3910,3914 ---- { reset_terminating_signals (); /* XXX */ + free_pushed_string_input (); /* Cancel traps, in trap.c. */ restore_original_signals (); *************** *** 3513,3517 **** if (pid < 0) { ! sys_error ("cannot make child for process substitution"); free (pathname); #if defined (HAVE_DEV_FD) --- 3925,3929 ---- if (pid < 0) { ! sys_error (_("cannot make child for process substitution")); free (pathname); #if defined (HAVE_DEV_FD) *************** *** 3556,3561 **** if (fd < 0) { ! sys_error ("cannot open named pipe %s for %s", pathname, ! open_for_read_in_child ? "reading" : "writing"); exit (127); } --- 3968,3977 ---- if (fd < 0) { ! /* Two separate strings for ease of translation. */ ! if (open_for_read_in_child) ! sys_error (_("cannot open named pipe %s for reading"), pathname); ! else ! sys_error (_("cannot open named pipe %s for writing"), pathname); ! exit (127); } *************** *** 3564,3568 **** if (sh_unset_nodelay_mode (fd) < 0) { ! sys_error ("cannout reset nodelay mode for fd %d", fd); exit (127); } --- 3980,3984 ---- if (sh_unset_nodelay_mode (fd) < 0) { ! sys_error (_("cannout reset nodelay mode for fd %d"), fd); exit (127); } *************** *** 3574,3578 **** if (dup2 (fd, open_for_read_in_child ? 0 : 1) < 0) { ! sys_error ("cannot duplicate named pipe %s as fd %d", pathname, open_for_read_in_child ? 0 : 1); exit (127); --- 3990,3994 ---- if (dup2 (fd, open_for_read_in_child ? 0 : 1) < 0) { ! sys_error (_("cannot duplicate named pipe %s as fd %d"), pathname, open_for_read_in_child ? 0 : 1); exit (127); *************** *** 3716,3720 **** pid_t pid, old_pid, old_pipeline_pgrp; char *istring; ! int result, fildes[2], function_value; istring = (char *)NULL; --- 4132,4136 ---- pid_t pid, old_pid, old_pipeline_pgrp; char *istring; ! int result, fildes[2], function_value, pflags, rc; istring = (char *)NULL; *************** *** 3743,3750 **** maybe_make_export_env (); /* XXX */ /* Pipe the output of executing STRING into the current shell. */ if (pipe (fildes) < 0) { ! sys_error ("cannot make pipe for command substitution"); goto error_exit; } --- 4159,4169 ---- maybe_make_export_env (); /* XXX */ + /* Flags to pass to parse_and_execute() */ + pflags = interactive ? SEVAL_RESETLINE : 0; + /* Pipe the output of executing STRING into the current shell. */ if (pipe (fildes) < 0) { ! sys_error (_("cannot make pipe for command substitution")); goto error_exit; } *************** *** 3775,3779 **** if (pid < 0) { ! sys_error ("cannot make child for command substitution"); error_exit: --- 4194,4198 ---- if (pid < 0) { ! sys_error (_("cannot make child for command substitution")); error_exit: *************** *** 3788,3794 **** set_sigint_handler (); /* XXX */ if (dup2 (fildes[1], 1) < 0) { ! sys_error ("command_substitute: cannot duplicate pipe as fd 1"); exit (EXECUTION_FAILURE); } --- 4207,4215 ---- set_sigint_handler (); /* XXX */ + free_pushed_string_input (); + if (dup2 (fildes[1], 1) < 0) { ! sys_error (_("command_substitute: cannot duplicate pipe as fd 1")); exit (EXECUTION_FAILURE); } *************** *** 3836,3847 **** function_value = 0; ! if (result == EXITPROG) ! exit (last_command_exit_value); else if (result) ! exit (EXECUTION_FAILURE); else if (function_value) ! exit (return_catch_value); else ! exit (parse_and_execute (string, "command substitution", SEVAL_NOHIST)); } else --- 4257,4278 ---- function_value = 0; ! if (result == ERREXIT) ! rc = last_command_exit_value; ! else if (result == EXITPROG) ! rc = last_command_exit_value; else if (result) ! rc = EXECUTION_FAILURE; else if (function_value) ! rc = return_catch_value; else ! { ! subshell_level++; ! rc = parse_and_execute (string, "command substitution", pflags|SEVAL_NOHIST); ! subshell_level--; ! } ! ! last_command_exit_value = rc; ! rc = run_exit_trap (); ! exit (rc); } else *************** *** 3866,3870 **** was terminated by a signal. If that signal was SIGINT, then send SIGINT to ourselves. This will break out of loops, for instance. */ ! if (last_command_exit_value == (128 + SIGINT)) kill (getpid (), SIGINT); --- 4297,4301 ---- was terminated by a signal. If that signal was SIGINT, then send SIGINT to ourselves. This will break out of loops, for instance. */ ! if (last_command_exit_value == (128 + SIGINT) && last_command_exit_signal == SIGINT) kill (getpid (), SIGINT); *************** *** 3965,3968 **** --- 4396,4458 ---- } + static int + chk_atstar (name, quoted, quoted_dollar_atp, contains_dollar_at) + char *name; + int quoted; + int *quoted_dollar_atp, *contains_dollar_at; + { + char *temp1; + + if (name == 0) + { + if (quoted_dollar_atp) + *quoted_dollar_atp = 0; + if (contains_dollar_at) + *contains_dollar_at = 0; + return 0; + } + + /* check for $@ and $* */ + if (name[0] == '@' && name[1] == 0) + { + if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp) + *quoted_dollar_atp = 1; + if (contains_dollar_at) + *contains_dollar_at = 1; + return 1; + } + else if (name[0] == '*' && name[1] == '\0' && quoted == 0) + { + if (contains_dollar_at) + *contains_dollar_at = 1; + return 1; + } + + /* Now check for ${array[@]} and ${array[*]} */ + #if defined (ARRAY_VARS) + else if (valid_array_reference (name)) + { + temp1 = xstrchr (name, '['); + if (temp1 && temp1[1] == '@' && temp1[2] == ']') + { + if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp) + *quoted_dollar_atp = 1; + if (contains_dollar_at) + *contains_dollar_at = 1; + return 1; + } /* [ */ + /* ${array[*]}, when unquoted, should be treated like ${array[@]}, + which should result in separate words even when IFS is unset. */ + if (temp1 && temp1[1] == '*' && temp1[2] == ']' && quoted == 0) + { + if (contains_dollar_at) + *contains_dollar_at = 1; + return 1; + } + } + #endif + return 0; + } + /* Parameter expand NAME, and return a new string which is the expansion, or NULL if there was no expansion. *************** *** 3985,3989 **** { tt = get_dollar_var_value (arg_index); ! temp = tt ? quote_escapes (tt) : (char *)NULL; FREE (tt); } --- 4475,4484 ---- { tt = get_dollar_var_value (arg_index); ! if (tt) ! temp = (*tt && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))) ! ? quote_string (tt) ! : quote_escapes (tt); ! else ! temp = (char *)NULL; FREE (tt); } *************** *** 4004,4008 **** temp = array_value (name, quoted, &atype); if (atype == 0 && temp) ! temp = quote_escapes (temp); } #endif --- 4499,4505 ---- temp = array_value (name, quoted, &atype); if (atype == 0 && temp) ! temp = (*temp && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))) ! ? quote_string (temp) ! : quote_escapes (temp); } #endif *************** *** 4018,4022 **** if (temp) ! temp = quote_escapes (temp); } else --- 4515,4521 ---- if (temp) ! temp = (*temp && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))) ! ? quote_string (temp) ! : quote_escapes (temp); } else *************** *** 4032,4042 **** value of the variable whose name is the value of NAME. */ static char * ! parameter_brace_expand_indir (name, var_is_special, quoted) char *name; int var_is_special, quoted; { char *temp, *t; t = parameter_brace_expand_word (name, var_is_special, quoted); if (t == 0) return (t); --- 4531,4552 ---- value of the variable whose name is the value of NAME. */ static char * ! parameter_brace_expand_indir (name, var_is_special, quoted, quoted_dollar_atp, contains_dollar_at) char *name; int var_is_special, quoted; + int *quoted_dollar_atp, *contains_dollar_at; { char *temp, *t; t = parameter_brace_expand_word (name, var_is_special, quoted); + /* Have to dequote here if necessary */ + if (t) + { + temp = (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) + ? dequote_string (t) + : dequote_escapes (t); + free (t); + t = temp; + } + chk_atstar (t, quoted, quoted_dollar_atp, contains_dollar_at); if (t == 0) return (t); *************** *** 4088,4096 **** { /* The expansion of TEMP returned something. We need to treat things ! slightly differently if HASDOL is non-zero. */ ! temp = string_list (l); /* If l->next is not null, we know that TEMP contained "$@", since that is the only expansion that creates more than one word. */ ! if ((hasdol && quoted) || l->next) *qdollaratp = 1; dispose_words (l); --- 4598,4611 ---- { /* The expansion of TEMP returned something. We need to treat things ! slightly differently if HASDOL is non-zero. If we have "$@", the ! individual words have already been quoted. We need to turn them ! into a string with the words separated by the first character of ! $IFS without any additional quoting, so string_list_dollar_at won't ! do the right thing. We use string_list_dollar_star instead. */ ! temp = (hasdol || l->next) ? string_list_dollar_star (l) : string_list (l); ! /* If l->next is not null, we know that TEMP contained "$@", since that is the only expansion that creates more than one word. */ ! if (qdollaratp && ((hasdol && quoted) || l->next)) *qdollaratp = 1; dispose_words (l); *************** *** 4116,4119 **** --- 4631,4639 ---- t1 = dequote_string (t); free (t); + #if defined (ARRAY_VARS) + if (valid_array_reference (name)) + assign_array_element (name, t1); + else + #endif /* ARRAY_VARS */ bind_variable (name, t1); free (t1); *************** *** 4149,4153 **** } else ! report_error ("%s: parameter null or not set", name); /* Free the data we have allocated during this expansion, since we --- 4669,4673 ---- } else ! report_error (_("%s: parameter null or not set"), name); /* Free the data we have allocated during this expansion, since we *************** *** 4360,4364 **** case VT_ARRAYVAR: a = (ARRAY *)value; ! len = array_num_elements (a) + 1; break; #endif --- 4880,4885 ---- case VT_ARRAYVAR: a = (ARRAY *)value; ! /* For arrays, the first value deals with array indices. */ ! len = array_max_index (a); /* arrays index from 0 to n - 1 */ break; #endif *************** *** 4374,4377 **** --- 4895,4904 ---- return (-1); + #if defined (ARRAY_VARS) + /* For arrays, the second offset deals with the number of elements. */ + if (vtype == VT_ARRAYVAR) + len = array_num_elements (a); + #endif + if (t) { *************** *** 4387,4396 **** if (*e2p < 0) { ! internal_error ("%s: substring expression < 0", t); return (0); } ! *e2p += *e1p; /* want E2 chars starting at E1 */ ! if (*e2p > len) ! *e2p = len; } else --- 4914,4931 ---- if (*e2p < 0) { ! internal_error (_("%s: substring expression < 0"), t); return (0); } ! #if defined (ARRAY_VARS) ! /* In order to deal with sparse arrays, push the intelligence about how ! to deal with the number of elements desired down to the array- ! specific functions. */ ! if (vtype != VT_ARRAYVAR) ! #endif ! { ! *e2p += *e1p; /* want E2 chars starting at E1 */ ! if (*e2p > len) ! *e2p = len; ! } } else *************** *** 4407,4412 **** steps. For convenience, *VALP is set to the dequoted VALUE. */ static int ! get_var_and_type (varname, value, varp, valp) char *varname, *value; SHELL_VAR **varp; char **valp; --- 4942,4948 ---- steps. For convenience, *VALP is set to the dequoted VALUE. */ static int ! get_var_and_type (varname, value, quoted, varp, valp) char *varname, *value; + int quoted; SHELL_VAR **varp; char **valp; *************** *** 4420,4423 **** --- 4956,4961 ---- /* This sets vtype to VT_VARIABLE or VT_POSPARMS */ vtype = (varname[0] == '@' || varname[0] == '*') && varname[1] == '\0'; + if (vtype == VT_POSPARMS && varname[0] == '*') + vtype |= VT_STARSUB; *varp = (SHELL_VAR *)NULL; *************** *** 4431,4434 **** --- 4969,4974 ---- { vtype = VT_ARRAYVAR; + if (temp[0] == '*') + vtype |= VT_STARSUB; *valp = (char *)array_cell (v); } *************** *** 4451,4455 **** --- 4991,5009 ---- else #endif + #if 1 + { + if (value && vtype == VT_VARIABLE) + { + if (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) + *valp = dequote_string (value); + else + *valp = dequote_escapes (value); + } + else + *valp = value; + } + #else *valp = (value && vtype == VT_VARIABLE) ? dequote_escapes (value) : value; + #endif return vtype; *************** *** 4462,4465 **** --- 5016,5048 ---- /******************************************************/ + #if defined (HANDLE_MULTIBYTE) + /* Character-oriented rather than strictly byte-oriented substrings. S and + E, rather being strict indices into STRING, indicate character (possibly + multibyte character) positions that require calculation. + Used by the ${param:offset[:length]} expansion. */ + static char * + mb_substring (string, s, e) + char *string; + int s, e; + { + char *tt; + int start, stop, i, slen; + DECLARE_MBSTATE; + + start = 0; + slen = STRLEN (string); + + i = s; + while (string[start] && i--) + ADVANCE_CHAR (string, slen, start); + stop = start; + i = e - s; + while (string[stop] && i--) + ADVANCE_CHAR (string, slen, stop); + tt = substring (string, start, stop); + return tt; + } + #endif + /* Process a variable substring expansion: ${name:e1[:e2]}. If VARNAME is `@', use the positional parameters; otherwise, use the value of *************** *** 4472,4476 **** { intmax_t e1, e2; ! int vtype, r; char *temp, *val, *tt; SHELL_VAR *v; --- 5055,5059 ---- { intmax_t e1, e2; ! int vtype, r, starsub; char *temp, *val, *tt; SHELL_VAR *v; *************** *** 4481,4488 **** this_command_name = varname; ! vtype = get_var_and_type (varname, value, &v, &val); if (vtype == -1) return ((char *)NULL); r = verify_substring_values (val, substr, vtype, &e1, &e2); if (r <= 0) --- 5064,5074 ---- this_command_name = varname; ! vtype = get_var_and_type (varname, value, quoted, &v, &val); if (vtype == -1) return ((char *)NULL); + starsub = vtype & VT_STARSUB; + vtype &= ~VT_STARSUB; + r = verify_substring_values (val, substr, vtype, &e1, &e2); if (r <= 0) *************** *** 4493,4497 **** --- 5079,5089 ---- case VT_VARIABLE: case VT_ARRAYMEMBER: + #if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1) + tt = mb_substring (val, e1, e2); + else + #endif tt = substring (val, e1, e2); + if (vtype == VT_VARIABLE) FREE (val); *************** *** 4514,4518 **** #if defined (ARRAY_VARS) case VT_ARRAYVAR: ! tt = array_subrange (array_cell (v), e1, e2, quoted); if ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) == 0) { --- 5106,5113 ---- #if defined (ARRAY_VARS) case VT_ARRAYVAR: ! /* We want E2 to be the number of elements desired (arrays can be sparse, ! so verify_substring_values just returns the numbers specified and we ! rely on array_subrange to understand how to deal with them). */ ! tt = array_subrange (array_cell (v), e1, e2, starsub, quoted); if ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) == 0) { *************** *** 4597,4605 **** rptr += replen; } - if (s == e) - e++; /* avoid infinite recursion on zero-length match */ str = e; /* e == end of match */ if (((mflags & MATCH_GLOBREP) == 0) || mtype != MATCH_ANY) break; } --- 5192,5202 ---- rptr += replen; } str = e; /* e == end of match */ + if (((mflags & MATCH_GLOBREP) == 0) || mtype != MATCH_ANY) break; + + if (s == e) + e++, str++; /* avoid infinite recursion on zero-length match */ } *************** *** 4639,4643 **** } ! ret = string_list ((mflags & MATCH_QUOTED) ? quote_list (save) : save); dispose_words (save); --- 5236,5243 ---- } ! if ((mflags & (MATCH_QUOTED|MATCH_STARSUB)) == (MATCH_QUOTED|MATCH_STARSUB)) ! ret = string_list_dollar_star (quote_list (save)); ! else ! ret = string_list ((mflags & MATCH_QUOTED) ? quote_list (save) : save); dispose_words (save); *************** *** 4654,4658 **** int quoted; { ! int vtype, mflags; char *val, *temp, *pat, *rep, *p, *lpatsub, *tt; SHELL_VAR *v; --- 5254,5258 ---- int quoted; { ! int vtype, mflags, starsub; char *val, *temp, *pat, *rep, *p, *lpatsub, *tt; SHELL_VAR *v; *************** *** 4663,4670 **** this_command_name = varname; ! vtype = get_var_and_type (varname, value, &v, &val); if (vtype == -1) return ((char *)NULL); mflags = 0; if (*patsub == '/') --- 5263,5273 ---- this_command_name = varname; ! vtype = get_var_and_type (varname, value, quoted, &v, &val); if (vtype == -1) return ((char *)NULL); + starsub = vtype & VT_STARSUB; + vtype &= ~VT_STARSUB; + mflags = 0; if (*patsub == '/') *************** *** 4681,4684 **** --- 5284,5290 ---- mflags |= MATCH_QUOTED; + if (starsub) + mflags |= MATCH_STARSUB; + if (rep = quoted_strchr (lpatsub, '/', ST_BACKSL)) *rep++ = '\0'; *************** *** 4689,4696 **** --- 5295,5308 ---- rep = (char *)NULL; + #if 0 /* Expand PAT and REP for command, variable and parameter, arithmetic, and process substitution. Also perform quote removal. Do not perform word splitting or filename generation. */ pat = expand_string_if_necessary (lpatsub, (quoted & ~Q_DOUBLE_QUOTES), expand_string_unsplit); + #else + /* Perform the same expansions on the pattern as performed by the + pattern removal expansions. */ + pat = getpattern (lpatsub, quoted, 1); + #endif if (rep) *************** *** 4911,4915 **** } ! /* Process ${PREFIX*} expansion. */ if (want_indir && string[sindex - 1] == RBRACE && (string[sindex - 2] == '*' || string[sindex - 2] == '@') && --- 5523,5527 ---- } ! /* Process ${!PREFIX*} expansion. */ if (want_indir && string[sindex - 1] == RBRACE && (string[sindex - 2] == '*' || string[sindex - 2] == '@') && *************** *** 4940,4943 **** --- 5552,5585 ---- return (temp); } + + #if defined (ARRAY_VARS) + /* Process ${!ARRAY[@]} and ${!ARRAY[*]} expansion. */ /* [ */ + if (want_indir && string[sindex - 1] == RBRACE && + string[sindex - 2] == ']' && valid_array_reference (name+1)) + { + char *x, *x1; + + temp1 = savestring (name + 1); + x = array_variable_name (temp1, &x1, (int *)0); /* [ */ + FREE (x); + if (ALL_ELEMENT_SUB (x1[0]) && x1[1] == ']') + { + temp = array_keys (temp1, quoted); + if (x1[0] == '@') + { + if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp) + *quoted_dollar_atp = 1; + if (contains_dollar_at) + *contains_dollar_at = 1; + } + + free (temp1); + *indexp = sindex; + return (temp); + } + + free (temp1); + } + #endif /* ARRAY_VARS */ /* Make sure that NAME is valid before trying to go on. */ *************** *** 4950,4954 **** if (want_indir) ! temp = parameter_brace_expand_indir (name + 1, var_is_special, quoted); else temp = parameter_brace_expand_word (name, var_is_special, quoted); --- 5592,5596 ---- if (want_indir) ! temp = parameter_brace_expand_indir (name + 1, var_is_special, quoted, quoted_dollar_atp, contains_dollar_at); else temp = parameter_brace_expand_word (name, var_is_special, quoted); *************** *** 4956,4976 **** #if defined (ARRAY_VARS) if (valid_array_reference (name)) ! { ! temp1 = xstrchr (name, '['); ! if (temp1 && temp1[1] == '@' && temp1[2] == ']') ! { ! if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp) ! *quoted_dollar_atp = 1; ! if (contains_dollar_at) ! *contains_dollar_at = 1; ! } /* [ */ ! /* ${array[*]}, when unquoted, should be treated like ${array[@]}, ! which should result in separate words even when IFS is unset. */ ! if (temp1 && temp1[1] == '*' && temp1[2] == ']' && quoted == 0) ! { ! if (contains_dollar_at) ! *contains_dollar_at = 1; ! } ! } #endif --- 5598,5602 ---- #if defined (ARRAY_VARS) if (valid_array_reference (name)) ! chk_atstar (name, quoted, quoted_dollar_atp, contains_dollar_at); #endif *************** *** 5018,5022 **** case '\0': bad_substitution: ! report_error ("%s: bad substitution", string ? string : "??"); FREE (value); FREE (temp); --- 5644,5648 ---- case '\0': bad_substitution: ! report_error (_("%s: bad substitution"), string ? string : "??"); FREE (value); FREE (temp); *************** *** 5092,5096 **** if (c == '=' && var_is_special) { ! report_error ("$%s: cannot assign in this way", name); free (name); free (value); --- 5718,5722 ---- if (c == '=' && var_is_special) { ! report_error (_("$%s: cannot assign in this way"), name); free (name); free (value); *************** *** 5172,5176 **** --- 5798,5811 ---- return (interactive_shell ? &expand_param_error : &expand_param_fatal); } + #if 1 + if (temp1) + temp = (*temp1 && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) + ? quote_string (temp1) + : quote_escapes (temp1); + else + temp = (char *)NULL; + #else temp = temp1 ? quote_escapes (temp1) : (char *)NULL; + #endif break; *************** *** 5235,5239 **** --- 5870,5878 ---- is unset, the parameters are separated by ' '; if $IFS is null, the parameters are concatenated. */ + #if 0 temp = string_list_dollar_star (list); + #else + temp = (quoted & Q_DOUBLE_QUOTES) ? string_list_dollar_star (list) : string_list (list); + #endif temp1 = quote_string (temp); free (temp); *************** *** 5357,5361 **** comsub: ! temp1 = command_substitute (temp, quoted); FREE (temp); temp = temp1; --- 5996,6004 ---- comsub: ! if (pflags & PF_NOCOMSUB) ! /* we need zindex+1 because string[zindex] == RPAREN */ ! temp1 = substring (string, *sindex, zindex+1); ! else ! temp1 = command_substitute (temp, quoted); FREE (temp); temp = temp1; *************** *** 5405,5413 **** temp = array_reference (array_cell (var), 0); if (temp) ! temp = quote_escapes (temp); } else #endif ! temp = quote_escapes (value_cell (var)); free (temp1); --- 6048,6067 ---- temp = array_reference (array_cell (var), 0); if (temp) ! temp = (*temp && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) ! ? quote_string (temp) ! : quote_escapes (temp); ! else if (unbound_vars_is_error) ! goto unbound_variable; } else #endif ! { ! temp = value_cell (var); ! ! temp = (*temp && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) ! ? quote_string (temp) ! : quote_escapes (temp); ! } ! free (temp1); *************** *** 5417,5420 **** --- 6071,6075 ---- temp = (char *)NULL; + unbound_variable: if (unbound_vars_is_error) err_unboundvar (temp1); *************** *** 5546,5569 **** if (MB_CUR_MAX > 1 && string[sindex]) { ! int i; ! mbstate_t state_bak; ! size_t mblength; ! ! state_bak = state; ! mblength = mbrlen (string + sindex, string_size - sindex, &state); ! if (mblength == (size_t)-1 || mblength == (size_t)-2) ! { ! state = state_bak; ! mblength = 1; ! } ! if (mblength < 1) ! mblength = 1; ! temp = (char *)xmalloc (mblength + 2); ! temp[0] = CTLESC; ! for (i = 0; i < mblength; i++) ! temp[i+1] = string[sindex++]; ! temp[mblength + 1] = '\0'; ! ! goto add_string; } else --- 6201,6205 ---- if (MB_CUR_MAX > 1 && string[sindex]) { ! SADD_MBQCHAR_BODY(temp, string, sindex, string_size); } else *************** *** 5624,5628 **** temp = param_expand (string, &sindex, quoted, expanded_something, &has_dollar_at, "ed_dollar_at, ! &had_quoted_null, 0); if (temp == &expand_param_error || temp == &expand_param_fatal) --- 6260,6265 ---- temp = param_expand (string, &sindex, quoted, expanded_something, &has_dollar_at, "ed_dollar_at, ! &had_quoted_null, ! (word->flags & W_NOCOMSUB) ? PF_NOCOMSUB : 0); if (temp == &expand_param_error || temp == &expand_param_fatal) *************** *** 5640,5644 **** case '`': /* Backquoted command substitution. */ { ! sindex++; if (expanded_something) --- 6277,6281 ---- case '`': /* Backquoted command substitution. */ { ! t_index = sindex++; if (expanded_something) *************** *** 5646,5651 **** temp = string_extract (string, &sindex, "`", 0); ! de_backslash (temp); ! temp1 = command_substitute (temp, quoted); FREE (temp); temp = temp1; --- 6283,6294 ---- temp = string_extract (string, &sindex, "`", 0); ! if (word->flags & W_NOCOMSUB) ! /* sindex + 1 because string[sindex] == '`' */ ! temp1 = substring (string, t_index, sindex + 1); ! else ! { ! de_backslash (temp); ! temp1 = command_substitute (temp, quoted); ! } FREE (temp); temp = temp1; *************** *** 5806,5810 **** CTLNUL or CTLNUL is contained in the (non-null) expansion of some variable. I'm not sure what to do about this ! yet. */ if (QUOTED_NULL (temp) == 0) remove_quoted_nulls (temp); /* XXX */ --- 6449,6455 ---- CTLNUL or CTLNUL is contained in the (non-null) expansion of some variable. I'm not sure what to do about this ! yet. There has to be some way to indicate the difference ! between the two. An auxiliary data structure might be ! necessary. */ if (QUOTED_NULL (temp) == 0) remove_quoted_nulls (temp); /* XXX */ *************** *** 5896,5924 **** { #if HANDLE_MULTIBYTE - /* XXX - I'd like to use SCOPY_CHAR_I here. */ if (MB_CUR_MAX > 1) ! { ! int i; ! mbstate_t state_bak; ! size_t mblength; ! ! sindex--; ! state_bak = state; ! mblength = mbrlen (string + sindex, string_size - sindex, &state); ! if (mblength == (size_t)-1 || mblength == (size_t)-2) ! { ! state = state_bak; ! mblength = 1; ! } ! if (mblength < 1) ! mblength = 1; ! ! temp = (char *)xmalloc (mblength + 2); ! temp[0] = CTLESC; ! for (i = 0; i < mblength; i++) ! temp[i + 1] = string[sindex++]; ! temp[mblength + 1] = '\0'; ! goto add_string; } else --- 6541,6550 ---- { #if HANDLE_MULTIBYTE if (MB_CUR_MAX > 1) ! sindex--; ! if (MB_CUR_MAX > 1) ! { ! SADD_MBQCHAR_BODY(temp, string, sindex, string_size); } else *************** *** 6225,6228 **** --- 6851,6866 ---- **************************************************/ + /* Do any word-expansion-specific cleanup and jump to top_level */ + static void + exp_jump_to_top_level (v) + int v; + { + /* Cleanup code goes here. */ + expand_no_split_dollar_star = 0; /* XXX */ + expanding_redir = 0; + + jump_to_top_level (v); + } + /* Put NLIST (which is a WORD_LIST * of only one element) at the front of ELIST, and set ELIST to the new list. */ *************** *** 6408,6412 **** like "Read failed". */ ! if (GLOB_FAILED (glob_array)) { glob_array = (char **)xmalloc (sizeof (char *)); --- 7046,7050 ---- like "Read failed". */ ! if (glob_array == 0 || GLOB_FAILED (glob_array)) { glob_array = (char **)xmalloc (sizeof (char *)); *************** *** 6436,6439 **** --- 7074,7082 ---- PREPEND_LIST (tlist, disposables); } + else if (fail_glob_expansion != 0) + { + report_error (_("no match: %s"), tlist->word->word); + jump_to_top_level (DISCARD); + } else if (allow_null_glob_expansion == 0) { *************** *** 6586,6592 **** last_command_exit_value = EXECUTION_FAILURE; if (expanded == &expand_word_error) ! jump_to_top_level (DISCARD); else ! jump_to_top_level (FORCE_EOF); } --- 7229,7235 ---- last_command_exit_value = EXECUTION_FAILURE; if (expanded == &expand_word_error) ! exp_jump_to_top_level (DISCARD); else ! exp_jump_to_top_level (FORCE_EOF); } *************** *** 6662,6668 **** last_command_exit_value = EXECUTION_FAILURE; if (interactive_shell == 0 && posixly_correct) ! jump_to_top_level (FORCE_EOF); else ! jump_to_top_level (DISCARD); } } --- 7305,7311 ---- last_command_exit_value = EXECUTION_FAILURE; if (interactive_shell == 0 && posixly_correct) ! exp_jump_to_top_level (FORCE_EOF); else ! exp_jump_to_top_level (DISCARD); } } *************** *** 6709,6712 **** --- 7352,7356 ---- environment. */ assign_func = new_list ? assign_in_env : do_assignment; + tempenv_assign_error = 0; for (temp_list = subst_assign_varlist; temp_list; temp_list = temp_list->next) *************** *** 6716,6726 **** /* Variable assignment errors in non-interactive shells running in Posix.2 mode cause the shell to exit. */ ! if (tint == 0 && assign_func == do_assignment) { ! last_command_exit_value = EXECUTION_FAILURE; ! if (interactive_shell == 0 && posixly_correct) ! jump_to_top_level (FORCE_EOF); else ! jump_to_top_level (DISCARD); } } --- 7360,7375 ---- /* Variable assignment errors in non-interactive shells running in Posix.2 mode cause the shell to exit. */ ! if (tint == 0) { ! if (assign_func == do_assignment) ! { ! last_command_exit_value = EXECUTION_FAILURE; ! if (interactive_shell == 0 && posixly_correct) ! exp_jump_to_top_level (FORCE_EOF); ! else ! exp_jump_to_top_level (DISCARD); ! } else ! tempenv_assign_error++; } } diff -aNrc2 bash-2.05b-patched/support/Makefile.in bash-3.0/support/Makefile.in *** bash-2.05b-patched/support/Makefile.in Tue Apr 16 10:31:35 2002 --- bash-3.0/support/Makefile.in Wed Feb 19 09:02:58 2003 *************** *** 37,40 **** --- 37,41 ---- SHELL = @MAKE_SHELL@ CC = @CC@ + CC_FOR_BUILD = @CC_FOR_BUILD@ EXEEXT = @EXEEXT@ *************** *** 76,83 **** man2html$(EXEEXT): $(OBJ1) ! $(CC) $(CCFLAGS) $(OBJ1) -o $@ ${LIBS} clean: ! rm man2html man2html.o: man2html.c --- 77,87 ---- man2html$(EXEEXT): $(OBJ1) ! $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) $(OBJ1) -o $@ ${LIBS} clean: ! $(RM) man2html$(EXEEXT) ! ! distclean maintainer-clean mostly-clean: clean ! $(RM) $(OBJ1) man2html.o: man2html.c diff -aNrc2 bash-2.05b-patched/support/bashbug.sh bash-3.0/support/bashbug.sh *** bash-2.05b-patched/support/bashbug.sh Tue Apr 16 17:15:15 2002 --- bash-3.0/support/bashbug.sh Wed Apr 28 09:46:45 2004 *************** *** 5,12 **** # The bug address depends on the release status of the shell. Versions # with status `devel', `alpha', `beta', or `rc' mail bug reports to ! # chet@po.cwru.edu and, optionally, to bash-testers@po.cwru.edu. # Other versions send mail to bug-bash@gnu.org. # ! # Copyright (C) 1996-2002 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify --- 5,12 ---- # The bug address depends on the release status of the shell. Versions # with status `devel', `alpha', `beta', or `rc' mail bug reports to ! # chet@cwru.edu and, optionally, to bash-testers@cwru.edu. # Other versions send mail to bug-bash@gnu.org. # ! # Copyright (C) 1996-2004 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify *************** *** 40,72 **** export PATH ! # If the OS supplies a program to make temp files with semi-random names, ! # use it. : ${TMPDIR:=/tmp} - rm_tmp1=false - rm_tmp2=false - - # if we don't have mktemp or tempfile, we don't want to see error messages - # like `mktemp: not found', so temporarily redirect stderr using {...} while - # trying to run them. this may fail using old versions of the bourne shell - # that run {...} blocks with redirections in subshells; in that case we're - # no worse off than previous versions - - { TEMPFILE1=`mktemp "$TMPDIR/bbug.XXXXXX" 2>/dev/null` ; } 2>/dev/null - if [ -z "$TEMPFILE1" ]; then - { TEMPFILE1=`tempfile --prefix bbug --mode 600 2>/dev/null`; } 2>/dev/null - fi - if [ -z "$TEMPFILE1" ]; then - TEMPFILE1=$TMPDIR/bbug.$$ - rm_tmp1=true - fi - { TEMPFILE2=`mktemp "$TMPDIR/bbug.XXXXXX" 2>/dev/null`; } 2>/dev/null - if [ -z "$TEMPFILE2" ]; then - { TEMPFILE2=`tempfile --prefix bbug --mode 600 2>/dev/null`; } 2>/dev/null - fi - if [ -z "$TEMPFILE2" ]; then - TEMPFILE2="$TMPDIR/bbug.$$.x" - rm_tmp2=true - fi USAGE="Usage: $0 [--help] [--version] [bug-report-email-address]" VERSTR="GNU bashbug, version ${RELEASE}.${PATCHLEVEL}-${RELSTATUS}" --- 40,56 ---- export PATH ! # Check if TMPDIR is set, default to /tmp : ${TMPDIR:=/tmp} + #Securely create a temporary directory for the temporary files + TEMPDIR=$TMPDIR/bbug.$$ + (umask 077 && mkdir $TEMPDIR) || { + echo "$0: could not create temporary directory" >&2 + exit 1 + } + + TEMPFILE1=$TEMPDIR/bbug1 + TEMPFILE2=$TEMPDIR/bbug2 + USAGE="Usage: $0 [--help] [--version] [bug-report-email-address]" VERSTR="GNU bashbug, version ${RELEASE}.${PATCHLEVEL}-${RELSTATUS}" *************** *** 117,124 **** esac ! BASHTESTERS="bash-testers@po.cwru.edu" case "$RELSTATUS" in ! alpha*|beta*|devel*|rc*) BUGBASH=chet@po.cwru.edu ;; *) BUGBASH=bug-bash@gnu.org ;; esac --- 101,108 ---- esac ! BASHTESTERS="bash-testers@cwru.edu" case "$RELSTATUS" in ! alpha*|beta*|devel*|rc*) BUGBASH=chet@cwru.edu ;; *) BUGBASH=bug-bash@gnu.org ;; esac *************** *** 167,172 **** : ${USER=${LOGNAME-`whoami`}} ! trap 'rm -f "$TEMPFILE1" "$TEMPFILE2"; exit 1' 1 2 3 13 15 ! trap 'rm -f "$TEMPFILE1" "$TEMPFILE2"' 0 UN= --- 151,156 ---- : ${USER=${LOGNAME-`whoami`}} ! trap 'rm -rf "$TEMPDIR"; exit 1' 1 2 3 13 15 ! trap 'rm -rf "$TEMPDIR"' 0 UN= *************** *** 188,194 **** INITIAL_SUBJECT='[50 character or so descriptive subject here (for reference)]' - # this is raceable unless (hopefully) we used mktemp(1) or tempfile(1) - $rm_tmp1 && rm -f "$TEMPFILE1" - cat > "$TEMPFILE1" < $dummy.c ; for c in cc gcc c89 c99 ; do ! if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; ! rm -f $files ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; *************** *** 112,116 **** ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; ! esac' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. --- 121,126 ---- ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; ! esac ; ! unset files' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. *************** *** 118,126 **** if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH - elif (test -f /usr/5bin/uname) >/dev/null 2>&1 ; then # bash - PATH=$PATH:/usr/5bin fi - UNAME=`(uname) 2>/dev/null` || UNAME=unknown # bash UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown --- 128,133 ---- *************** *** 131,189 **** case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - # NOTE -- begin cases added for bash (mostly legacy) -- NOTE - mac68k:machten:*:*) - echo mac68k-apple-machten${UNAME_RELEASE} - exit 0 ;; - concurrent*:*:*:*) - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo concurrent-concurrent-sysv3 - else - echo concurrent-concurrent-bsd - fi - exit 0 ;; - ppc*:SunOS:5.*:*) - echo ppc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sparc:UNIX_SV:4.*:*) - echo sparc-unknown-sysv${UNAME_RELEASE} - exit 0 ;; - mips:UNIX_SV:4.*:*) - echo mips-mips-sysv${UNAME_RELEASE} - exit 0 ;; - mips:OSF*1:*:*) - echo mips-mips-osf1 - exit 0 ;; - mips:4.4BSD:*:*) - echo mips-mips-bsd4.4 - exit 0 ;; - MIS*:SMP_DC.OSx:*:dcosx) # not the same as below - echo pyramid-pyramid-sysv4 - exit 0 ;; - news*:NEWS*:*:*) - echo mips-sony-newsos${UNAME_RELEASE} - exit 0 ;; - *370:AIX:*:*) - echo ibm370-ibm-aix${UNAME_RELEASE} - exit 0 ;; - ksr1:OSF*1:*:*) - echo ksr1-ksr-osf1 - exit 0 ;; - esa:OSF*1:*:* | ESA:OSF*:*:*) - echo esa-ibm-osf1 - exit 0 ;; - DNP*:DNIX:*:*) - echo m68k-dnix-sysv - exit 0 ;; - *3b2*:*:*:*) - echo we32k-att-sysv3 - exit 0 ;; - Alpha*:Windows_NT:*:SP*) - echo alpha-pc-opennt - exit 0 ;; - *:Windows_NT:*:SP*) - echo i386-pc-opennt - exit 0 ;; - - # NOTE -- end legacy cases added for bash -- NOTE *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or --- 138,141 ---- *************** *** 201,204 **** --- 153,157 ---- /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; *************** *** 226,230 **** esac # The OS release ! release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: --- 179,194 ---- esac # The OS release ! # Debian GNU/NetBSD machines have a different userland, and ! # thus, need a distinct triplet. However, they do not need ! # kernel version information, so it can be replaced with a ! # suitable tag, in the style of linux-gnu. ! case "${UNAME_VERSION}" in ! Debian*) ! release='-gnu' ! ;; ! *) ! release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ! ;; ! esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: *************** *** 265,271 **** echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; - vax:OpenBSD:*:*) # bash - echo vax-dec-openbsd${UNAME_RELEASE} - exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} --- 229,232 ---- *************** *** 282,285 **** --- 243,247 ---- # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. + eval $set_cc_for_build cat <$dummy.s .data *************** *** 307,314 **** .end main EOF ! eval $set_cc_for_build ! $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then ! case `./$dummy` in 0-0) UNAME_MACHINE="alpha" --- 269,275 ---- .end main EOF ! $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null if test "$?" = 0 ; then ! case `$dummy` in 0-0) UNAME_MACHINE="alpha" *************** *** 332,338 **** UNAME_MACHINE="alphaev68" ;; esac fi ! rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; --- 293,302 ---- UNAME_MACHINE="alphaev68" ;; + 3-1307) + UNAME_MACHINE="alphaev7" + ;; esac fi ! rm -f $dummy.s $dummy && rmdir $tmpdir echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; *************** *** 375,378 **** --- 339,346 ---- echo pyramid-pyramid-svr4 exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` *************** *** 481,488 **** } EOF ! $CC_FOR_BUILD $dummy.c -o $dummy \ ! && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ ! && rm -f $dummy.c $dummy && exit 0 ! rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; --- 449,456 ---- } EOF ! $CC_FOR_BUILD -o $dummy $dummy.c \ ! && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ ! && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 ! rm -f $dummy.c $dummy && rmdir $tmpdir echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; *************** *** 490,493 **** --- 458,467 ---- echo powerpc-motorola-powermax exit 0 ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix *************** *** 562,567 **** } EOF ! $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 ! rm -f $dummy.c $dummy echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then --- 536,541 ---- } EOF ! $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 ! rm -f $dummy.c $dummy && rmdir $tmpdir echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then *************** *** 661,667 **** } EOF ! (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy` if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi ! rm -f $dummy.c $dummy fi ;; esac --- 635,641 ---- } EOF ! (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi ! rm -f $dummy.c $dummy && rmdir $tmpdir fi ;; esac *************** *** 699,704 **** } EOF ! $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 ! rm -f $dummy.c $dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; --- 673,678 ---- } EOF ! $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 ! rm -f $dummy.c $dummy && rmdir $tmpdir echo unknown-hitachi-hiuxwe2 exit 0 ;; *************** *** 782,787 **** echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) ! echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; i*:CYGWIN*:*) --- 756,776 ---- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; + amd64:FreeBSD:*:*) + echo x86_64-unknown-freebsd + 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=` ! rm -f $dummy.c && rmdir $tmpdir ! echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) *************** *** 795,799 **** exit 0 ;; x86:Interix*:3*) ! echo i386-pc-interix3 exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) --- 784,791 ---- exit 0 ;; x86:Interix*:3*) ! echo i586-pc-interix3 ! exit 0 ;; ! [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) ! echo i${UNAME_MACHINE}-pc-mks exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) *************** *** 801,805 **** # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? ! echo i386-pc-interix exit 0 ;; i*:UWIN*:*) --- 793,797 ---- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? ! echo i586-pc-interix exit 0 ;; i*:UWIN*:*) *************** *** 844,849 **** EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` ! rm -f $dummy.c ! test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 ;; ppc:Linux:*:*) --- 836,861 ---- EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` ! rm -f $dummy.c && rmdir $tmpdir ! test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ! ;; ! mips64:Linux:*:*) ! eval $set_cc_for_build ! sed 's/^ //' << EOF >$dummy.c ! #undef CPU ! #undef mips64 ! #undef mips64el ! #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) ! CPU=mips64el ! #else ! #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) ! CPU=mips64 ! #else ! CPU= ! #endif ! #endif ! EOF ! eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` ! rm -f $dummy.c && rmdir $tmpdir ! test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; ppc:Linux:*:*) *************** *** 907,911 **** a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ! exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" --- 919,923 ---- a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ! exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" *************** *** 940,944 **** EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` ! rm -f $dummy.c test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 --- 952,956 ---- EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` ! rm -f $dummy.c && rmdir $tmpdir test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 *************** *** 958,961 **** --- 970,990 ---- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` *************** *** 979,989 **** echo ${UNAME_MACHINE}-pc-isc$UNAME_REL elif /bin/uname -X 2>/dev/null >/dev/null ; then ! UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` ! (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 ! (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 ! (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ && UNAME_MACHINE=i686 ! (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL --- 1008,1018 ---- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL elif /bin/uname -X 2>/dev/null >/dev/null ; then ! UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` ! (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 ! (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 ! (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 ! (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL *************** *** 992,998 **** fi exit 0 ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; pc:*:*:*) # Left here for compatibility: --- 1021,1024 ---- *************** *** 1018,1024 **** echo m68010-convergent-sysv exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; ! 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ --- 1044,1056 ---- echo m68010-convergent-sysv exit 0 ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit 0 ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit 0 ;; M68*:*:R3V[567]*:*) 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) OS_REL='' test -r /etc/.relid \ *************** *** 1037,1043 **** echo m68k-atari-sysv4 exit 0 ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} --- 1069,1072 ---- *************** *** 1111,1114 **** --- 1140,1146 ---- echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} *************** *** 1131,1135 **** echo i386-pc-qnx exit 0 ;; ! NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; --- 1163,1167 ---- echo i386-pc-qnx exit 0 ;; ! NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *************** *** 1154,1162 **** echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 --- 1186,1189 ---- *************** *** 1177,1186 **** echo pdp10-unknown-its exit 0 ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit 0 ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit 0 ;; esac --- 1204,1207 ---- *************** *** 1303,1308 **** EOF ! $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 ! rm -f $dummy.c $dummy # Apollos put the system type in the environment. --- 1324,1329 ---- EOF ! $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 ! rm -f $dummy.c $dummy && rmdir $tmpdir # Apollos put the system type in the environment. *************** *** 1335,1349 **** esac fi - - # NOTE -- Begin fallback cases added for bash -- NOTE - case "$UNAME" in - uts) echo uts-amdahl-sysv${UNAME_RELEASE}; exit 0 ;; - esac - - if [ -f /bin/fxc.info ]; then - echo fxc-alliant-concentrix - exit 0 - fi - # NOTE -- End fallback cases added for bash -- NOTE cat >&2 <, 1996 + # + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2 of the License, or + # (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, but + # WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + # General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + # + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a + # configuration script generated by Autoconf, you may include it under + # the same distribution terms that you use for the rest of that program. + # + # The first argument passed to this file is the canonical host specification, + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM + # or + # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM + # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld + # should be set by the caller. + # + # The set of defined variables is at the end of this script. + + # Known limitations: + # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer + # than 256 bytes, otherwise the compiler driver will dump core. The only + # known workaround is to choose shorter directory names for the build + # directory and/or the installation directory. + + # All known linkers require a `.a' archive for static linking (except M$VC, + # which needs '.lib'). + libext=a + shrext=.so + + host="$1" + host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + # Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. + + wl= + if test "$GCC" = yes; then + wl='-Wl,' + else + case "$host_os" in + aix*) + wl='-Wl,' + ;; + mingw* | pw32* | os2*) + ;; + hpux9* | hpux10* | hpux11*) + wl='-Wl,' + ;; + irix5* | irix6* | nonstopux*) + wl='-Wl,' + ;; + newsos6) + ;; + linux*) + case $CC in + icc|ecc) + wl='-Wl,' + ;; + ccc) + wl='-Wl,' + ;; + esac + ;; + osf3* | osf4* | osf5*) + wl='-Wl,' + ;; + sco3.2v5*) + ;; + solaris*) + wl='-Wl,' + ;; + sunos4*) + wl='-Qoption ld ' + ;; + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + wl='-Wl,' + ;; + sysv4*MP*) + ;; + uts4*) + ;; + esac + fi + + # Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. + + hardcode_libdir_flag_spec= + hardcode_libdir_separator= + hardcode_direct=no + hardcode_minus_L=no + + case "$host_os" in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + if test "$with_gnu_ld" = yes; then + case "$host_os" in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + fi + ;; + amigaos*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can use + # them. + ld_shlibs=no + ;; + beos*) + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + cygwin* | mingw* | pw32*) + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + netbsd*) + ;; + solaris* | sysv5*) + if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + sunos4*) + hardcode_direct=yes + ;; + *) + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + esac + if test "$ld_shlibs" = yes; then + # Unlike libtool, we use -rpath here, not --rpath, since the documented + # option of GNU ld is called -rpath, not --rpath. + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + fi + else + case "$host_os" in + aix3*) + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + else + aix_use_runtimelinking=no + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + esac + fi + hardcode_direct=yes + hardcode_libdir_separator=':' + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct=yes + else + # We have old collect2 + hardcode_direct=unsupported + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + esac + fi + # Begin _LT_AC_SYS_LIBPATH_AIX. + echo 'int main () { return 0; }' > conftest.c + ${CC} ${LDFLAGS} conftest.c -o conftest + aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } + }'` + if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } + }'` + fi + if test -z "$aix_libpath"; then + aix_libpath="/usr/lib:/lib" + fi + rm -f conftest.c conftest + # End _LT_AC_SYS_LIBPATH_AIX. + if test "$aix_use_runtimelinking" = yes; then + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + else + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + fi + fi + ;; + amigaos*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + bsdi4*) + ;; + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + libext=lib + ;; + darwin* | rhapsody*) + if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then + hardcode_direct=no + fi + ;; + dgux*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + freebsd1*) + ld_shlibs=no + ;; + freebsd2.2*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + freebsd2*) + hardcode_direct=yes + hardcode_minus_L=yes + ;; + freebsd*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + hpux9*) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + hpux10* | hpux11*) + if test "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=no + ;; + ia64*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=no + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + *) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + irix5* | irix6* | nonstopux*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + netbsd*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + newsos6) + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + openbsd*) + hardcode_direct=yes + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + else + case "$host_os" in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + osf3*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + osf4* | osf5*) + if test "$GCC" = yes; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + # Both cc and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + hardcode_libdir_separator=: + ;; + sco3.2v5*) + ;; + solaris*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + sunos4*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + ;; + sysv4) + case $host_vendor in + sni) + hardcode_direct=yes # is this really true??? + ;; + siemens) + hardcode_direct=no + ;; + motorola) + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + ;; + sysv4.3*) + ;; + sysv4*MP*) + if test -d /usr/nec; then + ld_shlibs=yes + fi + ;; + sysv4.2uw2*) + hardcode_direct=yes + hardcode_minus_L=no + ;; + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) + ;; + sysv5*) + hardcode_libdir_flag_spec= + ;; + uts4*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + *) + ld_shlibs=no + ;; + esac + fi + + # Check dynamic linker characteristics + # Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. + libname_spec='lib$name' + case "$host_os" in + aix3*) + ;; + aix4* | aix5*) + ;; + amigaos*) + ;; + beos*) + ;; + bsdi4*) + ;; + cygwin* | mingw* | pw32*) + shrext=.dll + ;; + darwin* | rhapsody*) + shrext=.dylib + ;; + dgux*) + ;; + freebsd1*) + ;; + freebsd*) + ;; + gnu*) + ;; + hpux9* | hpux10* | hpux11*) + case "$host_cpu" in + ia64*) + shrext=.so + ;; + hppa*64*) + shrext=.sl + ;; + *) + shrext=.sl + ;; + esac + ;; + irix5* | irix6* | nonstopux*) + case "$host_os" in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; + *) libsuff= shlibsuff= ;; + esac + ;; + esac + ;; + linux*oldld* | linux*aout* | linux*coff*) + ;; + linux*) + ;; + netbsd*) + ;; + newsos6) + ;; + nto-qnx) + ;; + openbsd*) + ;; + os2*) + libname_spec='$name' + shrext=.dll + ;; + osf3* | osf4* | osf5*) + ;; + sco3.2v5*) + ;; + solaris*) + ;; + sunos4*) + ;; + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + ;; + sysv4*MP*) + ;; + uts4*) + ;; + esac + + sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` + shlibext=`echo "$shrext" | sed -e 's,^\.,,'` + escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` + + sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' < + # Created: 1993-05-16 + # Public domain + + errstatus=0 + dirmode="" + + usage="\ + Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." + + # process command line arguments + while test $# -gt 0 ; do + case $1 in + -h | --help | --h*) # -h for help + echo "$usage" 1>&2 + exit 0 + ;; + -m) # -m PERM arg + shift + test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } + dirmode=$1 + shift + ;; + --) # stop option processing + shift + break + ;; + -*) # unknown option + echo "$usage" 1>&2 + exit 1 + ;; + *) # first non-opt arg + break + ;; + esac + done + + for file + do + if test -d "$file"; then + shift + else + break + fi + done + + case $# in + 0) exit 0 ;; + esac + + case $dirmode in + '') + if mkdir -p -- . 2>/dev/null; then + echo "mkdir -p -- $*" + exec mkdir -p -- "$@" + fi + ;; + *) + if mkdir -m "$dirmode" -p -- . 2>/dev/null; then + echo "mkdir -m $dirmode -p -- $*" + exec mkdir -m "$dirmode" -p -- "$@" + fi + ;; + esac + + for file + do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d + do + pathcomp="$pathcomp$d" + case $pathcomp in + -*) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + else + if test ! -z "$dirmode"; then + echo "chmod $dirmode $pathcomp" + lasterr="" + chmod "$dirmode" "$pathcomp" || lasterr=$? + + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi + fi + fi + + pathcomp="$pathcomp/" + done + done + + exit $errstatus + + # Local Variables: + # mode: shell-script + # sh-indentation: 2 + # End: + # mkinstalldirs ends here diff -aNrc2 bash-2.05b-patched/support/mksignames.c bash-3.0/support/mksignames.c *** bash-2.05b-patched/support/mksignames.c Wed Jan 2 11:02:39 2002 --- bash-3.0/support/mksignames.c Mon Mar 24 17:11:38 2003 *************** *** 2,6 **** signal names. */ ! /* Copyright (C) 1992 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- signal names. */ ! /* Copyright (C) 1992-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 40,47 **** * DEBUG == NSIG * ERR == NSIG+1 */ ! #define LASTSIG NSIG+1 ! char *signal_names[2 * NSIG + 3]; #define signal_names_size (sizeof(signal_names)/sizeof(signal_names[0])) --- 40,48 ---- * DEBUG == NSIG * ERR == NSIG+1 + * RETURN == NSIG+2 */ ! #define LASTSIG NSIG+2 ! char *signal_names[2 * (LASTSIG)]; #define signal_names_size (sizeof(signal_names)/sizeof(signal_names[0])) *************** *** 370,373 **** --- 371,375 ---- signal_names[NSIG] = "DEBUG"; signal_names[NSIG+1] = "ERR"; + signal_names[NSIG+2] = "RETURN"; } *************** *** 383,387 **** fprintf (stream, "/* A translation list so we can be polite to our users. */\n"); ! fprintf (stream, "char *signal_names[NSIG + 3] = {\n"); for (i = 0; i <= LASTSIG; i++) --- 385,389 ---- fprintf (stream, "/* A translation list so we can be polite to our users. */\n"); ! fprintf (stream, "char *signal_names[NSIG + 4] = {\n"); for (i = 0; i <= LASTSIG; i++) diff -aNrc2 bash-2.05b-patched/support/mkversion.sh bash-3.0/support/mkversion.sh *** bash-2.05b-patched/support/mkversion.sh Wed Apr 17 13:24:59 2002 --- bash-3.0/support/mkversion.sh Fri Apr 25 16:43:55 2003 *************** *** 148,155 **** # extern function declarations ! echo ! echo '/* Functions from version.c. */' ! echo 'extern char *shell_version_string __P((void));' ! echo 'extern void show_shell_version __P((int));' if [ -n "$inc_build" ]; then --- 148,155 ---- # extern function declarations ! #echo ! #echo '/* Functions from version.c. */' ! #echo 'extern char *shell_version_string __P((void));' ! #echo 'extern void show_shell_version __P((int));' if [ -n "$inc_build" ]; then diff -aNrc2 bash-2.05b-patched/support/shobj-conf bash-3.0/support/shobj-conf *** bash-2.05b-patched/support/shobj-conf Wed Apr 17 13:27:46 2002 --- bash-3.0/support/shobj-conf Thu Nov 13 09:36:19 2003 *************** *** 98,102 **** # All versions of Linux or the semi-mythical GNU Hurd. ! linux*|gnu*) SHOBJ_CFLAGS=-fPIC SHOBJ_LD='${CC}' --- 98,102 ---- # All versions of Linux or the semi-mythical GNU Hurd. ! linux*-*|gnu*-*|k*bsd*-gnu-*) SHOBJ_CFLAGS=-fPIC SHOBJ_LD='${CC}' *************** *** 139,153 **** SHLIB_STATUS=supported ! SHOBJ_CFLAGS='-dynamic -fno-common' ! SHOBJ_LD=/usr/bin/libtool SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)' SHLIB_LIBSUFF='dylib' ! SHOBJ_LDFLAGS='-dynamic' ! SHLIB_XLDFLAGS='-arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' ! SHLIB_LIBS='-lSystem' ;; --- 139,159 ---- SHLIB_STATUS=supported ! SHOBJ_CFLAGS='-fno-common' ! SHOBJ_LD='${CC}' SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)' SHLIB_LIBSUFF='dylib' ! case "${host_os}" in ! darwin7*) SHOBJ_LDFLAGS='' ! SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' ! ;; ! *) SHOBJ_LDFLAGS='-dynamic' ! SHLIB_XLDFLAGS='-arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' ! ;; ! esac ! SHLIB_LIBS='-lncurses' # see if -lcurses works on MacOS X 10.1 ;; *************** *** 297,300 **** --- 303,308 ---- SHOBJ_CFLAGS='-fpic' SHOBJ_LD='${CC}' + # if you have problems linking here, moving the `-Wl,+h,$@' from + # SHLIB_XLDFLAGS to SHOBJ_LDFLAGS has been reported to work SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,+s' diff -aNrc2 bash-2.05b-patched/support/texi2dvi bash-3.0/support/texi2dvi *** bash-2.05b-patched/support/texi2dvi Tue Sep 28 15:36:53 1999 --- bash-3.0/support/texi2dvi Tue Feb 18 11:11:26 2003 *************** *** 1,7 **** #! /bin/sh # texi2dvi --- produce DVI (or PDF) files from Texinfo (or LaTeX) sources. ! # $Id: texi2dvi,v 0.43 1999/09/28 19:36:53 karl Exp $ # ! # Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify --- 1,8 ---- #! /bin/sh # texi2dvi --- produce DVI (or PDF) files from Texinfo (or LaTeX) sources. ! # $Id: texi2dvi,v 1.14 2003/02/05 00:42:33 karl Exp $ # ! # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, ! # 2002, 2003 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify *************** *** 27,36 **** # This string is expanded by rcs automatically when this file is checked out. ! rcs_revision='$Revision: 0.43 $' rcs_version=`set - $rcs_revision; echo $2` program=`echo $0 | sed -e 's!.*/!!'` ! version="texi2dvi (GNU Texinfo 4.0) $rcs_version ! Copyright (C) 1999 Free Software Foundation, Inc. There is NO warranty. You may redistribute this software under the terms of the GNU General Public License. --- 28,37 ---- # This string is expanded by rcs automatically when this file is checked out. ! rcs_revision='$Revision: 1.14 $' rcs_version=`set - $rcs_revision; echo $2` program=`echo $0 | sed -e 's!.*/!!'` ! version="texi2dvi (GNU Texinfo 4.5) $rcs_version ! Copyright (C) 2003 Free Software Foundation, Inc. There is NO warranty. You may redistribute this software under the terms of the GNU General Public License. *************** *** 47,66 **** when needed. ! Options: ! -@ Use @input instead of \input; for preloaded Texinfo. ! -b, --batch No interaction. ! -c, --clean Remove all auxiliary files. ! -D, --debug Turn on shell debugging (set -x). ! -e, --expand Force macro expansion using makeinfo. ! -I DIR Search DIR for Texinfo files. ! -h, --help Display this help and exit successfully. ! -l, --language=LANG Specify the LANG of FILE: LaTeX or Texinfo. ! -p, --pdf Use pdftex or pdflatex for processing. ! -q, --quiet No output unless errors (implies --batch). ! -s, --silent Same as --quiet. ! -t, --texinfo=CMD Insert CMD after @setfilename in copy of input file. ! Multiple values accumulate. ! -v, --version Display version information and exit successfully. ! -V, --verbose Report on what is done. The values of the BIBTEX, LATEX (or PDFLATEX), MAKEINDEX, MAKEINFO, --- 48,71 ---- when needed. ! Operation modes: ! -b, --batch no interaction ! -c, --clean remove all auxiliary files ! -D, --debug turn on shell debugging (set -x) ! -h, --help display this help and exit successfully ! -o, --output=OFILE leave output in OFILE (implies --clean); ! Only one input FILE may be specified in this case ! -q, --quiet no output unless errors (implies --batch) ! -s, --silent same as --quiet ! -v, --version display version information and exit successfully ! -V, --verbose report on what is done ! ! TeX tuning: ! -@ use @input instead of \input; for preloaded Texinfo ! -e, -E, --expand force macro expansion using makeinfo ! -I DIR search DIR for Texinfo files ! -l, --language=LANG specify the LANG of FILE (LaTeX or Texinfo) ! -p, --pdf use pdftex or pdflatex for processing ! -t, --texinfo=CMD insert CMD after @setfilename in copy of input file ! multiple values accumulate The values of the BIBTEX, LATEX (or PDFLATEX), MAKEINDEX, MAKEINFO, *************** *** 69,90 **** Email bug reports to , ! general questions and discussion to ." # Initialize variables for option overriding and otherwise. # Don't use `unset' since old bourne shells don't have this command. # Instead, assign them an empty value. - escape='\' batch=false # eval for batch mode clean= debug= expand= # t for expansion via makeinfo oformat=dvi set_language= - miincludes= # makeinfo include path textra= tmpdir=${TMPDIR:-/tmp}/t2d$$ # avoid collisions on 8.3 filesystems. ! txincludes= # TEXINPUTS extensions txiprereq=19990129 # minimum texinfo.tex version to have macro expansion - quiet= # by default let the tools' message be displayed verbose=false # echo for verbose mode --- 74,97 ---- Email bug reports to , ! general questions and discussion to . ! Texinfo home page: http://www.gnu.org/software/texinfo/" # Initialize variables for option overriding and otherwise. # Don't use `unset' since old bourne shells don't have this command. # Instead, assign them an empty value. batch=false # eval for batch mode clean= debug= + escape='\' expand= # t for expansion via makeinfo + miincludes= # makeinfo include path oformat=dvi + oname= # --output + quiet= # by default let the tools' message be displayed set_language= textra= tmpdir=${TMPDIR:-/tmp}/t2d$$ # avoid collisions on 8.3 filesystems. ! txincludes= # TEXINPUTS extensions, with trailing colon txiprereq=19990129 # minimum texinfo.tex version to have macro expansion verbose=false # echo for verbose mode *************** *** 99,102 **** --- 106,115 ---- fi + # Pacify verbose cds. + CDPATH=${ZSH_VERSION+.}$path_sep + + # In case someone crazy insists on using grep -E. + : ${EGREP=egrep} + # Save this so we can construct a new TEXINPUTS path for each file. TEXINPUTS_orig="$TEXINPUTS" *************** *** 137,148 **** -c | --c*) clean=t;; -D | --d*) debug=t;; ! -e | --e*) expand=t;; -h | --h*) echo "$usage"; exit 0;; -I | --I*) shift miincludes="$miincludes -I $1" ! txincludes="$txincludes$path_sep$1" ;; -l | --l*) shift; set_language=$1;; -p | --p*) oformat=pdf;; -t | --t*) shift; textra="$textra\\ --- 150,168 ---- -c | --c*) clean=t;; -D | --d*) debug=t;; ! -e | -E | --e*) expand=t;; -h | --h*) echo "$usage"; exit 0;; -I | --I*) shift miincludes="$miincludes -I $1" ! txincludes="$txincludes$1$path_sep" ;; -l | --l*) shift; set_language=$1;; + -o | --o*) + shift + clean=t + case "$1" in + /* | ?:/*) oname=$1;; + *) oname="$orig_pwd/$1";; + esac;; -p | --p*) oformat=pdf;; -t | --t*) shift; textra="$textra\\ *************** *** 169,177 **** # Interpret remaining command line args as filenames. ! if test $# = 0; then echo "$0: Missing file arguments." >&2 echo "$0: Try \`--help' for more information." >&2 exit 2 ! fi # Prepare the temporary directory. Remove it at exit, unless debugging. --- 189,206 ---- # Interpret remaining command line args as filenames. ! case $# in ! 0) echo "$0: Missing file arguments." >&2 echo "$0: Try \`--help' for more information." >&2 exit 2 ! ;; ! 1) ;; ! *) ! if test -n "$oname"; then ! echo "$0: Can't use option \`--output' with more than one argument." >&2 ! exit 2 ! fi ! ;; ! esac # Prepare the temporary directory. Remove it at exit, unless debugging. *************** *** 206,217 **** } } ! /^@html/,/^@end html/d ! /^@ifhtml/,/^@end ifhtml/d ! /^@ifnottex/,/^@end ifnottex/d /^@ifinfo/,/^@end ifinfo/{ /^@node/p /^@menu/,/^@end menu/p ! d } EOF # Uncommenting is simple: Remove any leading `@c texi2dvi'. --- 235,255 ---- } } ! /^@html/,/^@end html/{ ! s/^/@c (texi2dvi)/ ! } ! /^@ifhtml/,/^@end ifhtml/{ ! s/^/@c (texi2dvi)/ ! } ! /^@ifnottex/,/^@end ifnottex/{ ! s/^/@c (texi2dvi)/ ! } /^@ifinfo/,/^@end ifinfo/{ /^@node/p /^@menu/,/^@end menu/p ! t ! s/^/@c (texi2dvi)/ } + s/^@ifnotinfo/@c texi2dvi@ifnotinfo/ + s/^@end ifnotinfo/@c texi2dvi@end ifnotinfo/ EOF # Uncommenting is simple: Remove any leading `@c texi2dvi'. *************** *** 231,235 **** # Find all files having root filename with a two-letter extension, # saves the ones that are really Texinfo-related files. .?o? catches ! # LaTeX tables and lists. for this_file in "$1".?o? "$1".aux "$1".?? "$1".idx; do # If file is empty, skip it. --- 269,273 ---- # Find all files having root filename with a two-letter extension, # saves the ones that are really Texinfo-related files. .?o? catches ! # many files: .toc, .log, LaTeX tables and lists, FiXme's .lox, maybe more. for this_file in "$1".?o? "$1".aux "$1".?? "$1".idx; do # If file is empty, skip it. *************** *** 274,278 **** # If the COMMAND_LINE_FILENAME is not absolute (e.g., --debug.tex), # prepend `./' in order to avoid that the tools take it as an option. ! echo "$command_line_filename" | egrep '^(/|[A-z]:/)' >/dev/null \ || command_line_filename="./$command_line_filename" --- 312,316 ---- # If the COMMAND_LINE_FILENAME is not absolute (e.g., --debug.tex), # prepend `./' in order to avoid that the tools take it as an option. ! echo "$command_line_filename" | $EGREP '^(/|[A-z]:/)' >/dev/null \ || command_line_filename="./$command_line_filename" *************** *** 315,328 **** mkdir $tmpdir_src $tmpdir_xtr $tmpdir_bak || exit 1 ! # Source file might include additional sources. Put `.' and ! # directory where source file(s) reside in TEXINPUTS before anything ! # else. `.' goes first to ensure that any old .aux, .cps, # etc. files in ${directory} don't get used in preference to fresher # files in `.'. Include orig_pwd in case we are in clean mode, where # we've cd'd to a temp directory. ! common=".$path_sep$orig_pwd$path_sep$filename_dir$path_sep$txincludes$path_sep" TEXINPUTS="$common$TEXINPUTS_orig" INDEXSTYLE="$common$INDEXSTYLE_orig" # If the user explicitly specified the language, use that. # Otherwise, if the first line is \input texinfo, assume it's texinfo. --- 353,411 ---- mkdir $tmpdir_src $tmpdir_xtr $tmpdir_bak || exit 1 ! # Source file might include additional sources. ! # We want `.:$orig_pwd' before anything else. (We'll add `.:' later ! # after all other directories have been turned into absolute paths.) ! # `.' goes first to ensure that any old .aux, .cps, # etc. files in ${directory} don't get used in preference to fresher # files in `.'. Include orig_pwd in case we are in clean mode, where # we've cd'd to a temp directory. ! common="$orig_pwd$path_sep$filename_dir$path_sep$txincludes" TEXINPUTS="$common$TEXINPUTS_orig" INDEXSTYLE="$common$INDEXSTYLE_orig" + # Convert relative paths to absolute paths, so we can run in another + # directory (e.g., in --clean mode, or during the macro-support + # detection.) + # + # Empty path components are meaningful to tex. We rewrite them + # as `EMPTY' so they don't get lost when we split on $path_sep. + TEXINPUTS=`echo $TEXINPUTS |sed 's/^:/EMPTY:/;s/:$/:EMPTY/;s/::/:EMPTY:/g'` + INDEXSTYLE=`echo $INDEXSTYLE |sed 's/^:/EMPTY:/;s/:$/:EMPTY/;s/::/:EMPTY:/g'` + save_IFS=$IFS + IFS=$path_sep + set x $TEXINPUTS; shift + TEXINPUTS=. + for dir + do + case $dir in + EMPTY) + TEXINPUTS=$TEXINPUTS$path_sep + ;; + [\\/]* | ?:[\\/]*) # Absolute paths don't need to be expansed. + TEXINPUTS=$TEXINPUTS$path_sep$dir + ;; + *) + abs=`cd "$dir" && pwd` && TEXINPUTS=$TEXINPUTS$path_sep$abs + ;; + esac + done + set x $INDEXSTYLE; shift + INDEXSTYLE=. + for dir + do + case $dir in + EMPTY) + INDEXSTYLE=$INDEXSTYLE$path_sep + ;; + [\\/]* | ?:[\\/]*) # Absolute paths don't need to be expansed. + INDEXSTYLE=$INDEXSTYLE$path_sep$dir + ;; + *) + abs=`cd "$dir" && pwd` && INDEXSTYLE=$INDEXSTYLE$path_sep$abs + ;; + esac + done + IFS=$save_IFS + # If the user explicitly specified the language, use that. # Otherwise, if the first line is \input texinfo, assume it's texinfo. *************** *** 330,334 **** if test -n "$set_language"; then language=$set_language ! elif sed 1q "$command_line_filename" | fgrep 'input texinfo' >/dev/null; then language=texinfo else --- 413,417 ---- if test -n "$set_language"; then language=$set_language ! elif sed 1q "$command_line_filename" | grep 'input texinfo' >/dev/null; then language=texinfo else *************** *** 374,380 **** echo '\input texinfo.tex @bye' >$tmpdir/$txiversion_tex # Run in the tmpdir to avoid leaving files. ! eval `cd $tmpdir >/dev/null \ ! && $tex $txiversion_tex 2>/dev/null \ ! | sed -n 's/^.*\[\(.*\)version \(....\)-\(..\)-\(..\).*$/txiformat=\1 txiversion="\2\3\4"/p'` $verbose "texinfo.tex preloaded as \`$txiformat', version is \`$txiversion' ..." if test "$txiprereq" -le "$txiversion" >/dev/null 2>&1; then --- 457,463 ---- echo '\input texinfo.tex @bye' >$tmpdir/$txiversion_tex # Run in the tmpdir to avoid leaving files. ! eval `cd $tmpdir >/dev/null && ! $tex $txiversion_tex 2>/dev/null | ! sed -n 's/^.*\[\(.*\)version \(....\)-\(..\)-\(..\).*$/txiformat=\1 txiversion="\2\3\4"/p'` $verbose "texinfo.tex preloaded as \`$txiformat', version is \`$txiversion' ..." if test "$txiprereq" -le "$txiversion" >/dev/null 2>&1; then *************** *** 468,475 **** # What we'll run texindex on -- exclude non-index files. # Since we know index files are last, it is correct to remove everything ! # before .aux and .?o?. index_files=`echo "$orig_xref_files" \ | sed "s!.*\.aux!!g; ! s!./$filename_noext\..o.!!g; s/^[ ]*//;s/[ ]*$//"` # Run texindex (or makeindex) on current index files. If they --- 551,562 ---- # What we'll run texindex on -- exclude non-index files. # Since we know index files are last, it is correct to remove everything ! # before .aux and .?o?. But don't really do o ! # -- don't match whitespace as . ! # Otherwise, if orig_xref_files contains something like ! # foo.xo foo.whatever ! # the space after the o will get matched. index_files=`echo "$orig_xref_files" \ | sed "s!.*\.aux!!g; ! s!./$filename_noext\.[^ ]o[^ ]!!g; s/^[ ]*//;s/[ ]*$//"` # Run texindex (or makeindex) on current index files. If they *************** *** 490,495 **** # to be `/'. $batch tex_args="\\${escape}nonstopmode\ \\${escape}input" - $verbose "Running $cmd ..." cmd="$tex $tex_args $filename_input" if $cmd >&5; then :; else echo "$0: $tex exited with bad status, quitting." >&2 --- 577,582 ---- # to be `/'. $batch tex_args="\\${escape}nonstopmode\ \\${escape}input" cmd="$tex $tex_args $filename_input" + $verbose "Running $cmd ..." if $cmd >&5; then :; else echo "$0: $tex exited with bad status, quitting." >&2 *************** *** 509,513 **** # subdirs. Performing xref files test is still good since LaTeX # does not report changes in xref files. ! if fgrep "Rerun to get" "$filename_noext.log" >/dev/null 2>&1; then finished= fi --- 596,600 ---- # subdirs. Performing xref files test is still good since LaTeX # does not report changes in xref files. ! if grep "Rerun to get" "$filename_noext.log" >/dev/null 2>&1; then finished= fi *************** *** 551,556 **** # - the temporary file can be removed if test -n "$clean"; then ! $verbose "Copying $oformat file from `pwd` to $orig_pwd" ! cp -p "./$filename_noext.$oformat" "$orig_pwd" cd / # in case $orig_pwd is on a different drive (for DOS) cd $orig_pwd || exit 1 --- 638,648 ---- # - the temporary file can be removed if test -n "$clean"; then ! if test -n "$oname"; then ! dest=$oname ! else ! dest=$orig_pwd ! fi ! $verbose "Copying $oformat file from `pwd` to $dest" ! cp -p "./$filename_noext.$oformat" "$dest" cd / # in case $orig_pwd is on a different drive (for DOS) cd $orig_pwd || exit 1 diff -aNrc2 bash-2.05b-patched/support/xenix-link.sh bash-3.0/support/xenix-link.sh *** bash-2.05b-patched/support/xenix-link.sh Wed Apr 17 13:28:10 2002 --- bash-3.0/support/xenix-link.sh Thu Aug 1 14:34:38 2002 *************** *** 37,41 **** if [ -z "$CC" ] then ! if [ -f /unix -a ! -f /xenix ] then CC="cc -xenix" --- 37,41 ---- if [ -z "$CC" ] then ! if [ -f /unix ] && [ ! -f /xenix ] then CC="cc -xenix" diff -aNrc2 bash-2.05b-patched/syntax.h bash-3.0/syntax.h *** bash-2.05b-patched/syntax.h Mon Feb 25 11:52:37 2002 --- bash-3.0/syntax.h Wed Apr 14 23:19:36 2004 *************** *** 65,69 **** /* Defines for use by the rest of the shell. */ ! extern const int sh_syntaxtab[]; #define shellmeta(c) (sh_syntaxtab[(unsigned char)(c)] & CSHMETA) --- 65,70 ---- /* Defines for use by the rest of the shell. */ ! extern int sh_syntaxtab[]; ! extern int sh_syntabsiz; #define shellmeta(c) (sh_syntaxtab[(unsigned char)(c)] & CSHMETA) *************** *** 71,74 **** --- 72,77 ---- #define shellquote(c) (sh_syntaxtab[(unsigned char)(c)] & CQUOTE) + #define shellxquote(c) (sh_syntaxtab[(unsigned char)(c)] & CXQUOTE) + #define issyntype(c, t) ((sh_syntaxtab[(unsigned char)(c)] & (t)) != 0) #define notsyntype(c,t) ((sh_syntaxtab[(unsigned char)(c)] & (t)) == 0) *************** *** 92,95 **** --- 95,102 ---- #define CTLESC '\001' #define CTLNUL '\177' + + #if !defined (HAVE_ISBLANK) && !defined (isblank) + # define isblank(x) ((x) == ' ' || (x) == '\t') + #endif #endif /* _SYNTAX_H_ */ diff -aNrc2 bash-2.05b-patched/test.c bash-3.0/test.c *** bash-2.05b-patched/test.c Thu Feb 28 10:54:47 2002 --- bash-3.0/test.c Fri Dec 19 16:27:28 2003 *************** *** 46,50 **** #endif /* !errno */ ! #if !defined (_POSIX_VERSION) # include #endif /* !_POSIX_VERSION */ --- 46,50 ---- #endif /* !errno */ ! #if !defined (_POSIX_VERSION) && defined (HAVE_SYS_FILE_H) # include #endif /* !_POSIX_VERSION */ *************** *** 52,55 **** --- 52,57 ---- #include "filecntl.h" + #include "bashintl.h" + #include "shell.h" #include "pathexp.h" *************** *** 150,154 **** beyond () { ! test_syntax_error ("argument expected", (char *)NULL); } --- 152,156 ---- beyond () { ! test_syntax_error (_("argument expected"), (char *)NULL); } *************** *** 159,163 **** char *pch; { ! test_syntax_error ("%s: integer expression expected", pch); } --- 161,165 ---- char *pch; { ! test_syntax_error (_("%s: integer expression expected"), pch); } *************** *** 352,363 **** /* A paren-bracketed argument. */ ! if (argv[pos][0] == '(' && argv[pos][1] == '\0') { advance (1); value = expr (); ! if (argv[pos] == 0) ! test_syntax_error ("`)' expected", (char *)NULL); ! else if (argv[pos][0] != ')' || argv[pos][1]) ! test_syntax_error ("`)' expected, found %s", argv[pos]); advance (0); return (value); --- 354,365 ---- /* A paren-bracketed argument. */ ! if (argv[pos][0] == '(' && argv[pos][1] == '\0') /* ) */ { advance (1); value = expr (); ! if (argv[pos] == 0) /* ( */ ! test_syntax_error (_("`)' expected"), (char *)NULL); ! else if (argv[pos][0] != ')' || argv[pos][1]) /* ( */ ! test_syntax_error (_("`)' expected, found %s"), argv[pos]); advance (0); return (value); *************** *** 374,378 **** value = unary_operator (); else ! test_syntax_error ("%s: unary operator expected", argv[pos]); } else --- 376,380 ---- value = unary_operator (); else ! test_syntax_error (_("%s: unary operator expected"), argv[pos]); } else *************** *** 539,543 **** if ((w[0] != '-' || w[3] != '\0') || test_binop (w) == 0) { ! test_syntax_error ("%s: binary operator expected", w); /* NOTREACHED */ return (FALSE); --- 541,545 ---- if ((w[0] != '-' || w[3] != '\0') || test_binop (w) == 0) { ! test_syntax_error (_("%s: binary operator expected"), w); /* NOTREACHED */ return (FALSE); *************** *** 783,790 **** return (unary_operator ()); else ! test_syntax_error ("%s: unary operator expected", argv[pos]); } else ! test_syntax_error ("%s: unary operator expected", argv[pos]); return (0); --- 785,792 ---- return (unary_operator ()); else ! test_syntax_error (_("%s: unary operator expected"), argv[pos]); } else ! test_syntax_error (_("%s: unary operator expected"), argv[pos]); return (0); *************** *** 826,830 **** } else ! test_syntax_error ("%s: binary operator expected", argv[pos+1]); return (value); --- 828,832 ---- } else ! test_syntax_error (_("%s: binary operator expected"), argv[pos+1]); return (value); *************** *** 901,905 **** if (margv[margc] && (margv[margc][0] != ']' || margv[margc][1])) ! test_syntax_error ("missing `]'", (char *)NULL); if (margc < 2) --- 903,907 ---- if (margv[margc] && (margv[margc][0] != ']' || margv[margc][1])) ! test_syntax_error (_("missing `]'"), (char *)NULL); if (margc < 2) *************** *** 917,921 **** if (pos != argc) ! test_syntax_error ("too many arguments", (char *)NULL); test_exit (SHELL_BOOLEAN (value)); --- 919,923 ---- if (pos != argc) ! test_syntax_error (_("too many arguments"), (char *)NULL); test_exit (SHELL_BOOLEAN (value)); diff -aNrc2 bash-2.05b-patched/tests/alias.right bash-3.0/tests/alias.right *** bash-2.05b-patched/tests/alias.right Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/alias.right Fri Jan 31 21:23:17 2003 *************** *** 0 **** --- 1,4 ---- + alias: 0 + alias: 0 + ./alias.tests: line 25: qfoo: command not found + quux diff -aNrc2 bash-2.05b-patched/tests/alias.tests bash-3.0/tests/alias.tests *** bash-2.05b-patched/tests/alias.tests Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/alias.tests Fri Jan 31 21:22:57 2003 *************** *** 0 **** --- 1,37 ---- + # place holder for future alias testing + shopt -s expand_aliases + + # alias/unalias tests originally in builtins.tests + + unalias -a + # this should return success, according to POSIX.2 + alias + echo alias: $? + alias foo=bar + unalias foo + # this had better return success, according to POSIX.2 + alias + echo alias: $? + + # bug in all versions through bash-2.05b + + unalias qfoo qbar qbaz quux 2>/dev/null + + alias qfoo=qbar + alias qbar=qbaz + alias qbaz=quux + alias quux=qfoo + + qfoo + + unalias qfoo qbar qbaz quux + + unalias -a + + alias foo='echo ' + alias bar=baz + alias baz=quux + + foo bar + + unalias foo bar baz diff -aNrc2 bash-2.05b-patched/tests/arith-for.right bash-3.0/tests/arith-for.right *** bash-2.05b-patched/tests/arith-for.right Mon Sep 25 12:50:24 2000 --- bash-3.0/tests/arith-for.right Thu Aug 8 09:01:06 2002 *************** *** 15,51 **** { i=0; ! for (( 1 ; i < 3 ; i++ )) do echo $i; done; ! for (( i=0 ; 1 ; i++ )) do ! if (( " i >= 3 " )); then break; fi; echo $i; done; ! for (( i=0 ; i<3 ; 1 )) do echo $i; ! (( " i++ " )); done; i=0; ! for (( 1 ; 1 ; 1 )) do ! if (( " i > 2 " )); then break; fi; echo $i; ! (( " i++ " )); done; i=0; ! for (( 1 ; 1 ; 1 )) do ! if (( " i > 2 " )); then break; fi; echo $i; ! (( " i++ " )); done } --- 15,51 ---- { i=0; ! for ((1 ; i < 3 ; i++ )) do echo $i; done; ! for ((i=0 ; 1 ; i++ )) do ! if (( i >= 3 )); then break; fi; echo $i; done; ! for ((i=0 ; i<3 ; 1)) do echo $i; ! (( i++ )); done; i=0; ! for ((1 ; 1 ; 1)) do ! if (( i > 2 )); then break; fi; echo $i; ! (( i++ )); done; i=0; ! for ((1 ; 1 ; 1)) do ! if (( i > 2 )); then break; fi; echo $i; ! (( i++ )); done } diff -aNrc2 bash-2.05b-patched/tests/arith.right bash-3.0/tests/arith.right *** bash-2.05b-patched/tests/arith.right Wed Jan 16 12:37:40 2002 --- bash-3.0/tests/arith.right Sun Mar 14 17:24:56 2004 *************** *** 80,84 **** 62 63 ! ./arith.tests: line 143: 3425#56: illegal arithmetic base (error token is "3425#56") 0 ./arith.tests: line 149: 7 = 43 : attempted assignment to non-variable (error token is "= 43 ") --- 80,84 ---- 62 63 ! ./arith.tests: line 143: 3425#56: invalid arithmetic base (error token is "3425#56") 0 ./arith.tests: line 149: 7 = 43 : attempted assignment to non-variable (error token is "= 43 ") *************** *** 88,93 **** ./arith.tests: line 153: jv += $iv : syntax error: operand expected (error token is "$iv ") ./arith.tests: line 154: let: rv = 7 + (43 * 6: missing `)' (error token is "6") ! ./arith.tests: line 158: 0#4: bad number (error token is "0#4") ! ./arith.tests: line 159: 2#110#11: bad number (error token is "2#110#11") abc def --- 88,93 ---- ./arith.tests: line 153: jv += $iv : syntax error: operand expected (error token is "$iv ") ./arith.tests: line 154: let: rv = 7 + (43 * 6: missing `)' (error token is "6") ! ./arith.tests: line 158: 0#4: invalid number (error token is "0#4") ! ./arith.tests: line 159: 2#110#11: invalid number (error token is "2#110#11") abc def *************** *** 141,148 **** 7 7 8 12 ! ./arith.tests: line 265: ((: x=9 y=41 : syntax error in expression (error token is "y=41 ") ! ./arith.tests: line 269: a b: syntax error in expression (error token is "b") ! ./arith.tests: line 270: ((: a b: syntax error in expression (error token is "b") 42 42 --- 141,198 ---- 7 7 + ./arith1.sub: line 2: 4-- : syntax error: operand expected (error token is " ") + ./arith1.sub: line 3: 4++ : syntax error: operand expected (error token is " ") + ./arith1.sub: line 4: 4 -- : syntax error: operand expected (error token is " ") + ./arith1.sub: line 5: 4 ++ : syntax error: operand expected (error token is " ") + 1 + 2 + 1 + 2 + 6 + 3 + 7 + 4 + 0 + 3 + 7 + 2 + -2 + 1 + ./arith1.sub: line 35: ((: ++ : syntax error: operand expected (error token is " ") + 7 + 7 + ./arith1.sub: line 38: ((: -- : syntax error: operand expected (error token is " ") + 7 + 7 + 7 + 7 + 1 + 2 + 1 + 2 + 1 + 0 + 5 + 1 + 6 + 2 + 3 + 1 + 4 + 0 + ./arith2.sub: line 33: ((: -- : syntax error: operand expected (error token is " ") + -7 + -7 + ./arith2.sub: line 37: ((: ++ : syntax error: operand expected (error token is " ") + 7 + 7 + -7 + -7 + 7 + 7 8 12 ! ./arith.tests: line 268: ((: x=9 y=41 : syntax error in expression (error token is "y=41 ") ! ./arith.tests: line 272: a b: syntax error in expression (error token is "b") ! ./arith.tests: line 273: ((: a b: syntax error in expression (error token is "b") 42 42 *************** *** 151,152 **** --- 201,203 ---- 42 42 + ./arith.tests: line 284: b[c]d: syntax error in expression (error token is "d") diff -aNrc2 bash-2.05b-patched/tests/arith.tests bash-3.0/tests/arith.tests *** bash-2.05b-patched/tests/arith.tests Thu Oct 11 14:35:20 2001 --- bash-3.0/tests/arith.tests Sun Mar 14 17:24:49 2004 *************** *** 255,258 **** --- 255,261 ---- echo $(( --7 )) + ${THIS_SH} ./arith1.sub + ${THIS_SH} ./arith2.sub + x=4 y=7 *************** *** 277,278 **** --- 280,284 ---- echo $(( 16#$(printf "%x\n" $n) )) echo $(( 16#$(printf "%X\n" $n) )) + + # causes longjmp botches through bash-2.05b + a[b[c]d]=e diff -aNrc2 bash-2.05b-patched/tests/arith1.sub bash-3.0/tests/arith1.sub *** bash-2.05b-patched/tests/arith1.sub Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/arith1.sub Sun Mar 14 17:23:15 2004 *************** *** 0 **** --- 1,38 ---- + # test of redone post-increment and post-decrement code + echo $(( 4-- )) + echo $(( 4++ )) + echo $(( 4 -- )) + echo $(( 4 ++ )) + + (( array[0]++ )) + echo ${array} + + (( array[0] ++ )) + echo ${array} + + (( a++ )) + echo $a + (( a ++ )) + echo $a + + echo $(( a ++ + 4 )) + echo $a + + echo $(( a+++4 )) + echo $a + + echo $(( a---4 )) + echo $a + + echo $(( a -- + 4 )) + echo $a + + echo $(( a -- - 4 )) + echo $a + + (( ++ + 7 )) + + (( ++ )) + echo $(( +++7 )) + echo $(( ++ + 7 )) + (( -- )) diff -aNrc2 bash-2.05b-patched/tests/arith2.sub bash-3.0/tests/arith2.sub *** bash-2.05b-patched/tests/arith2.sub Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/arith2.sub Sun Mar 14 17:23:25 2004 *************** *** 0 **** --- 1,45 ---- + echo $(( --7 )) + echo $(( ++7 )) + echo $(( -- 7 )) + echo $(( ++ 7 )) + + ((++array[0] )) + echo $array + (( ++ array[0] )) + echo $array + + (( ++a )) + echo $a + (( ++ a )) + echo $a + + (( --a )) + echo $a + (( -- a )) + echo $a + + echo $(( 4 + ++a )) + echo $a + + echo $(( 4+++a )) + echo $a + + echo $(( 4---a )) + echo $a + + echo $(( 4 - -- a )) + echo $a + + (( -- )) + echo $(( ---7 )) + echo $(( -- - 7 )) + + (( ++ )) + echo $(( ++7 )) + echo $(( ++ + 7 )) + + echo $(( ++-7 )) + echo $(( ++ - 7 )) + + echo $(( +--7 )) + echo $(( -- + 7 )) diff -aNrc2 bash-2.05b-patched/tests/array.right bash-3.0/tests/array.right *** bash-2.05b-patched/tests/array.right Thu Mar 28 15:51:21 2002 --- bash-3.0/tests/array.right Sat Oct 4 23:25:10 2003 *************** *** 7,11 **** --- 7,16 ---- abcde bdef abcde bdef + declare -a BASH_ARGC='()' + declare -a BASH_ARGV='()' + declare -a BASH_LINENO='([0]="0")' + declare -a BASH_SOURCE='([0]="./array.tests")' declare -a DIRSTACK='()' + declare -a FUNCNAME='([0]="main")' declare -a a='([0]="abcde" [1]="" [2]="bdef")' declare -a b='()' *************** *** 30,34 **** --- 35,44 ---- readonly -a c='()' a test + declare -a BASH_ARGC='()' + declare -a BASH_ARGV='()' + declare -a BASH_LINENO='([0]="0")' + declare -a BASH_SOURCE='([0]="./array.tests")' declare -a DIRSTACK='()' + declare -a FUNCNAME='([0]="main")' declare -ar a='([1]="" [2]="bdef" [5]="hello world" [6]="test expression")' declare -a b='([0]="this" [1]="is" [2]="a" [3]="test" [4]="" [5]="/etc/passwd")' *************** *** 48,52 **** --- 58,67 ---- ./array.tests: line 109: [*]=last: cannot assign to non-numeric index ./array.tests: line 109: [-65]=negative: bad array subscript + declare -a BASH_ARGC='()' + declare -a BASH_ARGV='()' + declare -a BASH_LINENO='([0]="0")' + declare -a BASH_SOURCE='([0]="./array.tests")' declare -a DIRSTACK='()' + declare -a FUNCNAME='([0]="main")' declare -ar a='([1]="" [2]="bdef" [5]="hello world" [6]="test expression")' declare -a b='([0]="this" [1]="is" [2]="a" [3]="test" [4]="" [5]="/etc/passwd")' *************** *** 60,64 **** --- 75,84 ---- this test this is a test of arrays + declare -a BASH_ARGC='()' + declare -a BASH_ARGV='()' + declare -a BASH_LINENO='([0]="0")' + declare -a BASH_SOURCE='([0]="./array.tests")' declare -a DIRSTACK='()' + declare -a FUNCNAME='([0]="main")' declare -ar a='([1]="" [2]="bdef" [5]="hello world" [6]="test expression")' declare -a b='([0]="this" [1]="is" [2]="a" [3]="test" [4]="" [5]="/etc/passwd")' *************** *** 128,129 **** --- 148,180 ---- case if then else 5 case if then else 5 + argv[1] = <0> + argv[2] = <1> + argv[3] = <4> + argv[4] = <10> + argv[1] = <0> + argv[2] = <1> + argv[3] = <4> + argv[4] = <10> + argv[1] = <0> + argv[2] = <1> + argv[3] = <4> + argv[4] = <10> + argv[1] = <0 1 4 10> + include null element -- expect one + one + include unset element -- expect three five + three five + start at unset element -- expect five seven + five seven + too many elements -- expect three five seven + three five seven + positive offset - expect five seven + five seven + negative offset - expect five seven + five seven + positive offset 2 - expect seven + seven + negative offset 2 - expect seven + seven + out-of-range offset + diff -aNrc2 bash-2.05b-patched/tests/array.tests bash-3.0/tests/array.tests *** bash-2.05b-patched/tests/array.tests Thu Mar 28 15:50:21 2002 --- bash-3.0/tests/array.tests Sat Oct 4 23:25:00 2003 *************** *** 290,291 **** --- 290,334 ---- echo ${foo[@]} ${#foo[@]} echo ${foo[*]} ${#foo[*]} + + # new expansions added after bash-2.05b + x[0]=zero + x[1]=one + x[4]=four + x[10]=ten + + recho ${!x[@]} + recho "${!x[@]}" + recho ${!x[*]} + recho "${!x[*]}" + + # sparse array tests for code fixed in bash-3.0 + unset av + av[1]='one' + av[2]='' + + av[3]=three + av[5]=five + av[7]=seven + + echo include null element -- expect one + echo ${av[@]:1:2} # what happens when we include a null element? + echo include unset element -- expect three five + echo ${av[@]:3:2} # what happens when we include an unset element? + echo start at unset element -- expect five seven + echo ${av[@]:4:2} # what happens when we start at an unset element? + + echo too many elements -- expect three five seven + echo ${av[@]:3:5} # how about too many elements? + + echo positive offset - expect five seven + echo ${av[@]:5:2} + echo negative offset - expect five seven + echo ${av[@]: -2:2} + + echo positive offset 2 - expect seven + echo ${av[@]: 6:2} + echo negative offset 2 - expect seven + echo ${av[@]: -1:2} + + echo out-of-range offset + echo ${av[@]:12} diff -aNrc2 bash-2.05b-patched/tests/braces-tests bash-3.0/tests/braces-tests *** bash-2.05b-patched/tests/braces-tests Wed Feb 19 11:30:00 1997 --- bash-3.0/tests/braces-tests Wed Dec 31 19:00:00 1969 *************** *** 1,24 **** - echo ff{c,b,a} - echo f{d,e,f}g - echo {l,n,m}xyz - echo {abc\,def} - echo {abc} - - echo \{a,b,c,d,e} - echo {x,y,\{a,b,c}} - echo {x\,y,\{abc\},trie} - - echo /usr/{ucb/{ex,edit},lib/{ex,how_ex}} - - echo XXXX\{`echo a b c | tr ' ' ','`\} - eval echo XXXX\{`echo a b c | tr ' ' ','`\} - - echo {} - echo { } - echo } - echo { - echo abcd{efgh - - echo foo {1,2} bar - echo `zecho foo {1,2} bar` - echo $(zecho foo {1,2} bar) --- 0 ---- diff -aNrc2 bash-2.05b-patched/tests/braces.right bash-3.0/tests/braces.right *** bash-2.05b-patched/tests/braces.right Wed Feb 19 11:30:11 1997 --- bash-3.0/tests/braces.right Tue Apr 8 09:47:08 2003 *************** *** 18,19 **** --- 18,38 ---- foo 1 2 bar foo 1 2 bar + 1 2 3 4 5 6 7 8 9 10 + 0..10 braces + 0 1 2 3 4 5 6 7 8 9 10 braces + x0y x1y x2y x3y x4y x5y x6y x7y x8y x9y x10y xbracesy + 3 + x3y + 10 9 8 7 6 5 4 3 2 1 + 10y 9y 8y 7y 6y 5y 4y 3y 2y 1y + x10y x9y x8y x7y x6y x5y x4y x3y x2y x1y + a b c d e f + f e d c b a + a _ ^ ] [ Z Y X W V U T S R Q P O N M L K J I H G F E D C B A + A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ a + f + {1..f} + {f..1} + 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 + -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 + -20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 diff -aNrc2 bash-2.05b-patched/tests/braces.tests bash-3.0/tests/braces.tests *** bash-2.05b-patched/tests/braces.tests Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/braces.tests Tue Apr 8 09:47:03 2003 *************** *** 0 **** --- 1,57 ---- + echo ff{c,b,a} + echo f{d,e,f}g + echo {l,n,m}xyz + echo {abc\,def} + echo {abc} + + echo \{a,b,c,d,e} + echo {x,y,\{a,b,c}} + echo {x\,y,\{abc\},trie} + + echo /usr/{ucb/{ex,edit},lib/{ex,how_ex}} + + echo XXXX\{`echo a b c | tr ' ' ','`\} + eval echo XXXX\{`echo a b c | tr ' ' ','`\} + + echo {} + echo { } + echo } + echo { + echo abcd{efgh + + echo foo {1,2} bar + echo `zecho foo {1,2} bar` + echo $(zecho foo {1,2} bar) + + # new sequence brace operators + echo {1..10} + + # this doesn't work yet + echo {0..10,braces} + # but this does + echo {{0..10},braces} + echo x{{0..10},braces}y + + echo {3..3} + echo x{3..3}y + echo {10..1} + echo {10..1}y + echo x{10..1}y + + echo {a..f} + echo {f..a} + + echo {a..A} + echo {A..a} + + echo {f..f} + + # mixes are incorrectly-formed brace expansions + echo {1..f} + echo {f..1} + + echo 0{1..9} {10..20} + + # do negative numbers work? + echo {-1..-10} + echo {-20..0} diff -aNrc2 bash-2.05b-patched/tests/builtins.right bash-3.0/tests/builtins.right *** bash-2.05b-patched/tests/builtins.right Tue Mar 19 13:29:17 2002 --- bash-3.0/tests/builtins.right Tue Jan 14 11:09:56 2003 *************** *** 1,4 **** - alias: 0 - alias: 0 a end-1 --- 1,2 ---- *************** *** 119,127 **** declare -x foo="" declare -x FOO="\$\$" ! ./builtins.tests: line 219: declare: FOO: not found declare -x FOO="\$\$" ok ok ! ./builtins.tests: line 251: kill: 4096: invalid signal specification 1 a\n\n\nb --- 117,125 ---- declare -x foo="" declare -x FOO="\$\$" ! ./builtins.tests: line 207: declare: FOO: not found declare -x FOO="\$\$" ok ok ! ./builtins.tests: line 239: kill: 4096: invalid signal specification 1 a\n\n\nb *************** *** 130,132 **** b ! ./builtins.tests: line 260: exit: status: numeric argument required --- 128,130 ---- b ! ./builtins.tests: line 248: exit: status: numeric argument required diff -aNrc2 bash-2.05b-patched/tests/builtins.tests bash-3.0/tests/builtins.tests *** bash-2.05b-patched/tests/builtins.tests Tue Sep 21 11:47:51 1999 --- bash-3.0/tests/builtins.tests Tue Jan 14 11:09:26 2003 *************** *** 5,20 **** ulimit -c 0 2>/dev/null - # alias/unalias tests - - unalias -a - # this should return success, according to POSIX.2 - alias - echo alias: $? - alias foo=bar - unalias foo - # this had better return success, according to POSIX.2 - alias - echo alias: $? - # check that break breaks loops for i in a b c; do echo $i; break; echo bad-$i; done --- 5,8 ---- diff -aNrc2 bash-2.05b-patched/tests/cond.right bash-3.0/tests/cond.right *** bash-2.05b-patched/tests/cond.right Wed Jan 16 12:44:12 2002 --- bash-3.0/tests/cond.right Mon Mar 24 14:12:13 2003 *************** *** 34,35 **** --- 34,37 ---- returns: 0 ok + ok 42 + ok 43 diff -aNrc2 bash-2.05b-patched/tests/cond.tests bash-3.0/tests/cond.tests *** bash-2.05b-patched/tests/cond.tests Fri Sep 22 12:20:56 2000 --- bash-3.0/tests/cond.tests Mon Mar 24 14:11:31 2003 *************** *** 154,155 **** --- 154,159 ---- echo ok fi + + # bug in all versions up to and including bash-2.05b + if [[ "123abc" == *?(a)bc ]]; then echo ok 42; else echo bad 42; fi + if [[ "123abc" == *?(a)bc ]]; then echo ok 43; else echo bad 43; fi diff -aNrc2 bash-2.05b-patched/tests/cprint.right bash-3.0/tests/cprint.right *** bash-2.05b-patched/tests/cprint.right Tue Oct 3 14:52:27 2000 --- bash-3.0/tests/cprint.right Thu Aug 8 08:59:15 2002 *************** *** 15,19 **** }; i=0; ! while (( " i < 3 " )); do test -r /dev/fd/$i; i=$(( i + 1 )); --- 15,19 ---- }; i=0; ! while (( i < 3 )); do test -r /dev/fd/$i; i=$(( i + 1 )); *************** *** 27,31 **** echo ok >/dev/null; else ! if (( " 7 > 40 " )); then echo oops; else --- 27,31 ---- echo ok >/dev/null; else ! if (( 7 > 40 )); then echo oops; else diff -aNrc2 bash-2.05b-patched/tests/dbg-support.right bash-3.0/tests/dbg-support.right *** bash-2.05b-patched/tests/dbg-support.right Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/dbg-support.right Thu Apr 3 16:25:47 2003 *************** *** 0 **** --- 1,353 ---- + debug lineno: 63 main + debug lineno: 66 main + FUNCNAME main + debug lineno: 70 main + debug lineno: 17 fn1 + debug lineno: 18 fn1 + LINENO 18 + debug lineno: 19 fn1 + LINENO 19 + debug lineno: 20 fn1 + BASH_SOURCE[0] ./dbg-support.tests + debug lineno: 21 fn1 + FUNCNAME[0] fn1 + debug lineno: 22 fn1 + debug lineno: 22 fn1 70 ./dbg-support.tests + debug lineno: 23 fn1 + debug lineno: 23 fn1 70 main ./dbg-support.tests + debug lineno: 24 fn1 + debug lineno: 24 fn1 + debug lineno: 25 fn1 + ./dbg-support.tests: line 25: caller: foo: invalid number + caller: usage: caller [EXPR] + debug lineno: 25 fn1 + debug lineno: 17 fn1 + debug lineno: 12 print_return_trap + debug lineno: 13 print_return_trap + return lineno: 17 fn1 + debug lineno: 14 print_return_trap + debug lineno: 71 main + debug lineno: 28 fn2 + debug lineno: 29 fn2 + fn2 here. Calling fn1... + debug lineno: 30 fn2 + debug lineno: 17 fn1 + debug lineno: 18 fn1 + LINENO 18 + debug lineno: 19 fn1 + LINENO 19 + debug lineno: 20 fn1 + BASH_SOURCE[0] ./dbg-support.tests + debug lineno: 21 fn1 + FUNCNAME[0] fn1 + debug lineno: 22 fn1 + debug lineno: 22 fn1 30 ./dbg-support.tests + debug lineno: 23 fn1 + debug lineno: 23 fn1 30 fn2 ./dbg-support.tests + debug lineno: 24 fn1 + debug lineno: 24 fn1 71 main ./dbg-support.tests + debug lineno: 25 fn1 + ./dbg-support.tests: line 25: caller: foo: invalid number + caller: usage: caller [EXPR] + debug lineno: 25 fn1 + debug lineno: 17 fn1 + debug lineno: 12 print_return_trap + debug lineno: 13 print_return_trap + return lineno: 17 fn1 + debug lineno: 14 print_return_trap + debug lineno: 28 fn2 + debug lineno: 12 print_return_trap + debug lineno: 13 print_return_trap + return lineno: 28 fn2 + debug lineno: 14 print_return_trap + debug lineno: 72 main + debug lineno: 33 fn3 + debug lineno: 34 fn3 + LINENO 34 + debug lineno: 35 fn3 + BASH_SOURCE[0] ./dbg-support.tests + debug lineno: 38 fn3 + debug lineno: 39 fn3 + debug lineno: 40 fn3 + debug lineno: 40 fn3 + debug lineno: 41 fn3 + debug lineno: 42 fn3 + debug lineno: 43 fn3 + fn3 called from file `./dbg-support.tests' at line 0 + debug lineno: 40 fn3 + debug lineno: 40 fn3 + debug lineno: 41 fn3 + debug lineno: 42 fn3 + debug lineno: 42 fn3 + debug lineno: 43 fn3 + main called from file `./dbg-support.tests' at line 0 + debug lineno: 40 fn3 + debug lineno: 40 fn3 + debug lineno: 46 fn3 + debug lineno: 18 source + SOURCED LINENO 18 + debug lineno: 19 source + SOURCED BASH_SOURCE[0] ./dbg-support.sub + debug lineno: 20 source + debug lineno: 3 sourced_fn + debug lineno: 4 sourced_fn + debug lineno: 5 sourced_fn + SOURCED FN LINENO 5 + debug lineno: 8 sourced_fn + debug lineno: 9 sourced_fn + debug lineno: 10 sourced_fn + debug lineno: 10 sourced_fn + debug lineno: 11 sourced_fn + debug lineno: 12 sourced_fn + debug lineno: 13 sourced_fn + FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 20 + debug lineno: 10 sourced_fn + debug lineno: 10 sourced_fn + debug lineno: 11 sourced_fn + debug lineno: 12 sourced_fn + debug lineno: 13 sourced_fn + FUNCNAME[1]: source called from ./dbg-support.tests at line 46 + debug lineno: 10 sourced_fn + debug lineno: 10 sourced_fn + debug lineno: 11 sourced_fn + debug lineno: 12 sourced_fn + debug lineno: 13 sourced_fn + FUNCNAME[2]: fn3 called from ./dbg-support.tests at line 72 + debug lineno: 10 sourced_fn + debug lineno: 10 sourced_fn + debug lineno: 11 sourced_fn + debug lineno: 12 sourced_fn + debug lineno: 12 sourced_fn + debug lineno: 13 sourced_fn + FUNCNAME[3]: main called from ./dbg-support.tests at line 0 + debug lineno: 10 sourced_fn + debug lineno: 10 sourced_fn + debug lineno: 3 sourced_fn + debug lineno: 12 print_return_trap + debug lineno: 13 print_return_trap + return lineno: 3 sourced_fn + debug lineno: 14 print_return_trap + debug lineno: 46 fn3 + debug lineno: 12 print_return_trap + debug lineno: 13 print_return_trap + return lineno: 46 fn3 + debug lineno: 14 print_return_trap + debug lineno: 33 fn3 + debug lineno: 12 print_return_trap + debug lineno: 13 print_return_trap + return lineno: 33 fn3 + debug lineno: 14 print_return_trap + debug lineno: 73 main + debug lineno: 18 source + SOURCED LINENO 18 + debug lineno: 19 source + SOURCED BASH_SOURCE[0] ./dbg-support.sub + debug lineno: 20 source + debug lineno: 3 sourced_fn + debug lineno: 4 sourced_fn + debug lineno: 5 sourced_fn + SOURCED FN LINENO 5 + debug lineno: 8 sourced_fn + debug lineno: 9 sourced_fn + debug lineno: 10 sourced_fn + debug lineno: 10 sourced_fn + debug lineno: 11 sourced_fn + debug lineno: 12 sourced_fn + debug lineno: 13 sourced_fn + FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 20 + debug lineno: 10 sourced_fn + debug lineno: 10 sourced_fn + debug lineno: 11 sourced_fn + debug lineno: 12 sourced_fn + debug lineno: 13 sourced_fn + FUNCNAME[1]: source called from ./dbg-support.tests at line 73 + debug lineno: 10 sourced_fn + debug lineno: 10 sourced_fn + debug lineno: 11 sourced_fn + debug lineno: 12 sourced_fn + debug lineno: 12 sourced_fn + debug lineno: 13 sourced_fn + FUNCNAME[2]: main called from ./dbg-support.tests at line 0 + debug lineno: 10 sourced_fn + debug lineno: 10 sourced_fn + debug lineno: 3 sourced_fn + debug lineno: 12 print_return_trap + debug lineno: 13 print_return_trap + return lineno: 3 sourced_fn + debug lineno: 14 print_return_trap + debug lineno: 73 main + debug lineno: 12 print_return_trap + debug lineno: 13 print_return_trap + return lineno: 73 main + debug lineno: 14 print_return_trap + debug lineno: 76 main + debug lineno: 79 main + LINENO 18 + LINENO 19 + BASH_SOURCE[0] ./dbg-support.tests + FUNCNAME[0] fn1 + 79 ./dbg-support.tests + 79 main ./dbg-support.tests + + ./dbg-support.tests: line 25: caller: foo: invalid number + caller: usage: caller [EXPR] + + debug lineno: 80 main + fn2 here. Calling fn1... + LINENO 18 + LINENO 19 + BASH_SOURCE[0] ./dbg-support.tests + FUNCNAME[0] fn1 + 30 ./dbg-support.tests + 30 fn2 ./dbg-support.tests + 80 main ./dbg-support.tests + ./dbg-support.tests: line 25: caller: foo: invalid number + caller: usage: caller [EXPR] + + debug lineno: 81 main + LINENO 34 + BASH_SOURCE[0] ./dbg-support.tests + fn3 called from file `./dbg-support.tests' at line 0 + main called from file `./dbg-support.tests' at line 0 + SOURCED LINENO 18 + SOURCED BASH_SOURCE[0] ./dbg-support.sub + SOURCED FN LINENO 5 + FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 20 + FUNCNAME[1]: source called from ./dbg-support.tests at line 46 + FUNCNAME[2]: fn3 called from ./dbg-support.tests at line 81 + FUNCNAME[3]: main called from ./dbg-support.tests at line 0 + debug lineno: 82 main + fn4 here. Calling fn3... + LINENO 34 + BASH_SOURCE[0] ./dbg-support.tests + fn3 called from file `./dbg-support.tests' at line 82 + fn4 called from file `./dbg-support.tests' at line 0 + main called from file `./dbg-support.tests' at line 0 + SOURCED LINENO 18 + SOURCED BASH_SOURCE[0] ./dbg-support.sub + SOURCED FN LINENO 5 + FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 20 + FUNCNAME[1]: source called from ./dbg-support.tests at line 46 + FUNCNAME[2]: fn3 called from ./dbg-support.tests at line 51 + FUNCNAME[3]: fn4 called from ./dbg-support.tests at line 82 + FUNCNAME[4]: main called from ./dbg-support.tests at line 0 + debug lineno: 83 main + SOURCED LINENO 18 + SOURCED BASH_SOURCE[0] ./dbg-support.sub + SOURCED FN LINENO 5 + FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 20 + FUNCNAME[1]: source called from ./dbg-support.tests at line 83 + FUNCNAME[2]: main called from ./dbg-support.tests at line 0 + return lineno: 83 main + debug lineno: 86 main + debug lineno: 89 main + debug lineno: 18 source + SOURCED LINENO 18 + debug lineno: 19 source + SOURCED BASH_SOURCE[0] ./dbg-support.sub + debug lineno: 20 source + debug lineno: 3 sourced_fn + debug lineno: 4 sourced_fn + debug lineno: 5 sourced_fn + SOURCED FN LINENO 5 + debug lineno: 8 sourced_fn + debug lineno: 9 sourced_fn + debug lineno: 10 sourced_fn + debug lineno: 10 sourced_fn + debug lineno: 11 sourced_fn + debug lineno: 12 sourced_fn + debug lineno: 13 sourced_fn + FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 20 + debug lineno: 10 sourced_fn + debug lineno: 10 sourced_fn + debug lineno: 11 sourced_fn + debug lineno: 12 sourced_fn + debug lineno: 13 sourced_fn + FUNCNAME[1]: source called from ./dbg-support.tests at line 89 + debug lineno: 10 sourced_fn + debug lineno: 10 sourced_fn + debug lineno: 11 sourced_fn + debug lineno: 12 sourced_fn + debug lineno: 12 sourced_fn + debug lineno: 13 sourced_fn + FUNCNAME[2]: main called from ./dbg-support.tests at line 0 + debug lineno: 10 sourced_fn + debug lineno: 10 sourced_fn + debug lineno: 3 sourced_fn + debug lineno: 12 print_return_trap + debug lineno: 13 print_return_trap + return lineno: 3 sourced_fn + debug lineno: 14 print_return_trap + debug lineno: 89 main + debug lineno: 12 print_return_trap + debug lineno: 13 print_return_trap + return lineno: 89 main + debug lineno: 14 print_return_trap + debug lineno: 90 main + debug lineno: 93 main + debug lineno: 93 main + debug lineno: 94 main + debug lineno: 97 main + debug lineno: 93 main + debug lineno: 93 main + debug lineno: 94 main + debug lineno: 97 main + debug lineno: 93 main + debug lineno: 93 main + debug lineno: 94 main + debug lineno: 95 main + Hit 2 + debug lineno: 97 main + debug lineno: 93 main + debug lineno: 93 main + debug lineno: 103 main + SOURCED FN LINENO 5 FUNCNAME[0]: sourced_fn called from ./dbg-support.tests at line 103 FUNCNAME[1]: main called from ./dbg-support.tests at line 0 + debug lineno: 104 main + SOURCED FN LINENO 5 FUNCNAME[0]: sourced_fn called from ./dbg-support.tests at line 104 FUNCNAME[1]: main called from ./dbg-support.tests at line 0 + debug lineno: 105 main + debug lineno: 106 main + SOURCED FN LINENO 5 + FUNCNAME[0]: sourced_fn called from ./dbg-support.tests at line 106 + FUNCNAME[1]: main called from ./dbg-support.tests at line 0 + debug lineno: 110 main + debug lineno: 111 main + debug lineno: 3 sourced_fn + debug lineno: 4 sourced_fn + debug lineno: 5 sourced_fn + SOURCED FN LINENO 5 + debug lineno: 8 sourced_fn + debug lineno: 9 sourced_fn + debug lineno: 10 sourced_fn + debug lineno: 10 sourced_fn + debug lineno: 11 sourced_fn + debug lineno: 12 sourced_fn + debug lineno: 13 sourced_fn + FUNCNAME[0]: sourced_fn called from ./dbg-support.tests at line 111 + debug lineno: 10 sourced_fn + debug lineno: 10 sourced_fn + debug lineno: 11 sourced_fn + debug lineno: 12 sourced_fn + debug lineno: 12 sourced_fn + debug lineno: 13 sourced_fn + FUNCNAME[1]: main called from ./dbg-support.tests at line 0 + debug lineno: 10 sourced_fn + debug lineno: 10 sourced_fn + debug lineno: 3 sourced_fn + debug lineno: 12 print_return_trap + debug lineno: 13 print_return_trap + return lineno: 3 sourced_fn + debug lineno: 14 print_return_trap + debug lineno: 114 main + debug lineno: 119 main + debug lineno: 123 main + got it + debug lineno: 131 main + debug lineno: 132 main + debug lineno: 133 main + debug lineno: 132 main + debug lineno: 133 main + debug lineno: 131 main + debug lineno: 132 main + debug lineno: 133 main + debug lineno: 132 main + debug lineno: 133 main diff -aNrc2 bash-2.05b-patched/tests/dbg-support.sub bash-3.0/tests/dbg-support.sub *** bash-2.05b-patched/tests/dbg-support.sub Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/dbg-support.sub Mon Mar 24 17:32:12 2003 *************** *** 0 **** --- 1,26 ---- + # This file is intended to be sourced from one of the bashdb test programs + + sourced_fn() { + name="fn2" + echo "SOURCED FN LINENO $LINENO" + + # Print a stack trace + declare -i n + n=${#FUNCNAME[@]} + for (( i=0 ; (( i < $n )) ; i++ )) ; do + local -i j=i+1 + [ $j -eq $n ] && j=i # main()'s file is the same as the first caller + echo "FUNCNAME[$i]: ${FUNCNAME[$i]} called from ${BASH_SOURCE[$j]}" \ + "at line ${BASH_LINENO[$i]}" + done + } + + echo "SOURCED LINENO $LINENO" + echo "SOURCED BASH_SOURCE[0]" ${BASH_SOURCE[0]} + sourced_fn + + #;;; Local Variables: *** + #;;; mode:shell-script *** + #;;; eval: (sh-set-shell "bash") *** + #;;; End: *** + diff -aNrc2 bash-2.05b-patched/tests/dbg-support.tests bash-3.0/tests/dbg-support.tests *** bash-2.05b-patched/tests/dbg-support.tests Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/dbg-support.tests Tue Mar 25 15:33:03 2003 *************** *** 0 **** --- 1,139 ---- + #!../bash + # + # Test correct functioning bash debug support not via the bashdb + # debugger but merely by printing via print_trap() + # $Id: dbg-support.tests,v 1.13 2003/02/17 22:02:25 rockyb Exp $ + shopt -s extdebug + print_debug_trap() { + echo "debug lineno: $1 ${FUNCNAME[1]}" + return + } + + print_return_trap() { + echo "return lineno: $1 ${FUNCNAME[1]}" + return + } + + fn1() { + echo "LINENO $LINENO" + echo "LINENO $LINENO" + echo "BASH_SOURCE[0]" ${BASH_SOURCE[0]} + echo "FUNCNAME[0]" ${FUNCNAME[0]} + echo `caller` + echo `caller 0` + echo `caller 1` + echo `caller foo` + } + + fn2() { + echo "fn2 here. Calling fn1..." + fn1 + } + + fn3() { + echo "LINENO $LINENO" + echo "BASH_SOURCE[0]" ${BASH_SOURCE[0]} + + # Print a stack trace + declare -i n + n=${#FUNCNAME[@]} + for (( i=0 ; (( i < $n )) ; i++ )) ; do + local -i j=i+1 + [ $j -eq $n ] && j=i # main()'s file is the same as the first caller + echo "${FUNCNAME[$i]} called from file " \ + "\`${BASH_SOURCE[$j]}' at line ${BASH_LINENO[$j]}" + done + source ./dbg-support.sub + } + + fn4() { + echo "fn4 here. Calling fn3..." + fn3 + } + + + #!../bash + # + # Test of support for debugging facilities in bash + # + # Test debugger set option fntrace - set on. Not in vanilla Bash 2.05 + # + set -o functrace + trap 'print_debug_trap $LINENO' DEBUG + trap 'print_return_trap $LINENO' RETURN + + # Funcname is now an array. Vanilla Bash 2.05 doesn't have FUNCNAME array. + echo "FUNCNAME" ${FUNCNAME[0]} + + # We should trace into the below. + # Start easy with a simple function. + fn1 + fn2 + fn3 + source ./dbg-support.sub + + # Test debugger set option fntrace - set off + set +T + + # We should not trace into this. + fn1 + fn2 + fn3 + fn4 + source ./dbg-support.sub + + # Another way to say: set -o fntrace + set -T + + # We should trace into this. + source ./dbg-support.sub + set +T + + # Test that the line numbers in the presence of conditionals are correct. + for (( i=0 ; (( i <= 2 )) ; i++ )) ; do + if [ $i -eq 2 ] ; then + echo "Hit 2" + fi + j=4 + done + + # + # Check line numbers in command substitution + # + echo $(sourced_fn) + echo `sourced_fn` + x=$((sourced_fn)) + x={ sourced_fn } + + # Make sure we step into sourced_fn as a comand when we request to do so. + # Vanilla bash 2.0 doesn't do. + set -o functrace + x={ sourced_fn } + + # Should see line number of xyzzy below. Vanilla bash 2.05b doesn't do + case xyzzy in + a ) + x=5 + ;; + xyzz? ) + case 3 in + 2 ) + x=6 ;; + 3 ) + echo "got it" ;; + * ) echo "no good" ;; + esac + ;; + * ) + esac + + # Should see line numbers for initial for lines. + for i in 0 1 ; do + for j in 3 4 ; do + ((x=i+j)) + done + done + #;;; Local Variables: *** + #;;; mode:shell-script *** + #;;; eval: (sh-set-shell "bash") *** + #;;; End: *** diff -aNrc2 bash-2.05b-patched/tests/dbg-support2.right bash-3.0/tests/dbg-support2.right *** bash-2.05b-patched/tests/dbg-support2.right Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/dbg-support2.right Mon Mar 24 17:32:12 2003 *************** *** 0 **** --- 1,7 ---- + lineno: 17 (6) main + lineno: 18 (6) main + x is 1 + lineno: 19 (6) main + lineno: 20 (6) main + lineno: 21 (6) main + x is 1 diff -aNrc2 bash-2.05b-patched/tests/dbg-support2.tests bash-3.0/tests/dbg-support2.tests *** bash-2.05b-patched/tests/dbg-support2.tests Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/dbg-support2.tests Mon Mar 24 17:34:22 2003 *************** *** 0 **** --- 1,26 ---- + #!../bash + # + # Test correct trap return codes = 2 means skip execution. + shopt -s extdebug + print_trap() { + echo "lineno: $1 ($LINENO) ${FUNCNAME[1]}" + if [[ $debug_exit == 2 ]] ; then + debug_exit=0 + return 2 + fi + return 0 + } + + debug_exit=0 + trap 'print_trap $LINENO' DEBUG + + x=1 + echo "x is $x" + debug_exit=2 + x=2 + echo "x is $x" + + #;;; Local Variables: *** + #;;; mode:shell-script *** + #;;; eval: (sh-set-shell "bash") *** + #;;; End: *** diff -aNrc2 bash-2.05b-patched/tests/dollar-at-star bash-3.0/tests/dollar-at-star *** bash-2.05b-patched/tests/dollar-at-star Mon Sep 18 17:26:01 2000 --- bash-3.0/tests/dollar-at-star Sun Mar 14 17:20:19 2004 *************** *** 208,210 **** --- 208,222 ---- esac + # tests for special expansion of "$*" and "${array[*]}" when used with other + # expansions -- bugs through bash-2.05b + ${THIS_SH} ./dollar-star1.sub + + # tests for expansion of "$@" on rhs of things like ${param:+word}. Bugs + # though bash-2.05b + ${THIS_SH} ./dollar-at1.sub + + # tests for expansion of other variables in double-quoted strings containing + # $@. Bugs through bash-2.05b + ${THIS_SH} ./dollar-at2.sub + exit 0 diff -aNrc2 bash-2.05b-patched/tests/dollar-at1.sub bash-3.0/tests/dollar-at1.sub *** bash-2.05b-patched/tests/dollar-at1.sub Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/dollar-at1.sub Sat Jan 24 14:29:09 2004 *************** *** 0 **** --- 1,29 ---- + echo_argc() + { + echo $# + } + + a() + { + shift + echo_argc "$@" + echo_argc ${1:+"$@"} + echo_argc "${1:+$@}" + echo_argc 1 2 3 + } + + b() + { + _IFS="$IFS" + IFS="$1" + shift + echo_argc "$@" + echo_argc ${1:+"$@"} + echo_argc "${1:+$@}" + echo_argc 1 2 3 + IFS="$_IFS" + } + + a "X" foo bar hoge + + b "X" foo bar hoge diff -aNrc2 bash-2.05b-patched/tests/dollar-at2.sub bash-3.0/tests/dollar-at2.sub *** bash-2.05b-patched/tests/dollar-at2.sub Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/dollar-at2.sub Sun Mar 14 17:19:28 2004 *************** *** 0 **** --- 1,19 ---- + t1() + { + xxx="echo $@" + + recho "$xxx ; echo $@" + } + + t2() + { + xxx="echo $@" + + recho "${xxx} ; echo $@" + } + + t1 1 + t1 1 2 + + t2 1 + t2 1 2 diff -aNrc2 bash-2.05b-patched/tests/dollar-star1.sub bash-3.0/tests/dollar-star1.sub *** bash-2.05b-patched/tests/dollar-star1.sub Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/dollar-star1.sub Mon Jun 2 15:46:48 2003 *************** *** 0 **** --- 1,31 ---- + set -- a b c + x=(a b c); IFS='|' + + echo "${*/#/x}" + echo "${x[*]/#/x}" + + echo "$*" + echo "${x[*]}" + + echo "$@" + echo "${x[@]}" + + echo "${@/#/x}" + echo "${x[@]/#/x}" + + echo "${*:1:2}" + echo "${x[*]:1:2}" + + echo "${@:1:2}" + echo "${x[@]:1:2}" + + IFS=$' \t\n' + set -- xa xb xc + x=(xa xb xc) + IFS='|' + + echo "${*#x}" + echo "${x[*]#x}" + + echo "$*" + echo "${x[*]}" diff -aNrc2 bash-2.05b-patched/tests/dollar.right bash-3.0/tests/dollar.right *** bash-2.05b-patched/tests/dollar.right Mon Sep 18 17:26:37 2000 --- bash-3.0/tests/dollar.right Sun Mar 14 17:20:28 2004 *************** *** 96,97 **** --- 96,127 ---- ok 3 ok 4 + xa|xb|xc + xa|xb|xc + a|b|c + a|b|c + a b c + a b c + xa xb xc + xa xb xc + a|b + b|c + a b + b c + a|b|c + a|b|c + xa|xb|xc + xa|xb|xc + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + argv[1] = + argv[1] = + argv[2] = <2> + argv[1] = + argv[1] = + argv[2] = <2> diff -aNrc2 bash-2.05b-patched/tests/errors.right bash-3.0/tests/errors.right *** bash-2.05b-patched/tests/errors.right Mon Jun 24 15:07:52 2002 --- bash-3.0/tests/errors.right Thu May 27 22:26:03 2004 *************** *** 2,6 **** alias: usage: alias [-p] [name[=value] ... ] ./errors.tests: line 18: unalias: -x: invalid option ! unalias: usage: unalias [-a] [name ...] ./errors.tests: line 19: alias: hoowah: not found ./errors.tests: line 20: unalias: hoowah: not found --- 2,6 ---- alias: usage: alias [-p] [name[=value] ... ] ./errors.tests: line 18: unalias: -x: invalid option ! unalias: usage: unalias [-a] name [name ...] ./errors.tests: line 19: alias: hoowah: not found ./errors.tests: line 20: unalias: hoowah: not found *************** *** 16,20 **** ./errors.tests: line 55: unset: cannot simultaneously unset a function and a variable ./errors.tests: line 58: declare: -z: invalid option ! declare: usage: declare [-afFirtx] [-p] name[=value] ... ./errors.tests: line 60: declare: `-z': not a valid identifier ./errors.tests: line 61: declare: `/bin/sh': not a valid identifier --- 16,20 ---- ./errors.tests: line 55: unset: cannot simultaneously unset a function and a variable ./errors.tests: line 58: declare: -z: invalid option ! declare: usage: declare [-afFirtx] [-p] [name[=value] ...] ./errors.tests: line 60: declare: `-z': not a valid identifier ./errors.tests: line 61: declare: `/bin/sh': not a valid identifier *************** *** 54,60 **** ./errors.tests: line 161: declare: unset: not found ./errors.tests: line 164: VAR: readonly variable ! ./errors.tests: command substitution: line 2: syntax error: unexpected end of file ! ./errors.tests: command substitution: line 1: syntax error near unexpected token `done' ! ./errors.tests: command substitution: line 1: ` for z in 1 2 3; done ' ./errors.tests: line 171: cd: HOME not set ./errors.tests: line 172: cd: /tmp/xyz.bash: No such file or directory --- 54,60 ---- ./errors.tests: line 161: declare: unset: not found ./errors.tests: line 164: VAR: readonly variable ! ./errors.tests: command substitution: line 168: syntax error: unexpected end of file ! ./errors.tests: command substitution: line 168: syntax error near unexpected token `done' ! ./errors.tests: command substitution: line 168: ` for z in 1 2 3; done ' ./errors.tests: line 171: cd: HOME not set ./errors.tests: line 172: cd: /tmp/xyz.bash: No such file or directory *************** *** 63,71 **** ./errors.tests: line 177: cd: /tmp/cd-notthere: No such file or directory ./errors.tests: line 180: .: filename argument required ! .: usage: . filename ./errors.tests: line 181: source: filename argument required ! source: usage: source filename ./errors.tests: line 184: .: -i: invalid option ! .: usage: . filename ./errors.tests: line 187: set: -q: invalid option set: usage: set [--abefhkmnptuvxBCHP] [-o option] [arg ...] --- 63,71 ---- ./errors.tests: line 177: cd: /tmp/cd-notthere: No such file or directory ./errors.tests: line 180: .: filename argument required ! .: usage: . filename [arguments] ./errors.tests: line 181: source: filename argument required ! source: usage: source filename [arguments] ./errors.tests: line 184: .: -i: invalid option ! .: usage: . filename [arguments] ./errors.tests: line 187: set: -q: invalid option set: usage: set [--abefhkmnptuvxBCHP] [-o option] [arg ...] *************** *** 77,90 **** ./errors.tests: line 202: VAR: readonly variable ./errors.tests: line 205: readonly: -x: invalid option ! readonly: usage: readonly [-anf] [name[=value] ...] or readonly -p ./errors.tests: line 208: eval: -i: invalid option eval: usage: eval [arg ...] ./errors.tests: line 209: command: -i: invalid option command: usage: command [-pVv] command [arg ...] ! ./errors.tests: line 1: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0") ! ./errors.tests: line 1: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0") ./errors.tests: line 216: trap: NOSIG: invalid signal specification ./errors.tests: line 219: trap: -s: invalid option ! trap: usage: trap [arg] [signal_spec ...] or trap -l ./errors.tests: line 225: return: can only `return' from a function or sourced script ./errors.tests: line 229: break: 0: loop count out of range --- 77,90 ---- ./errors.tests: line 202: VAR: readonly variable ./errors.tests: line 205: readonly: -x: invalid option ! readonly: usage: readonly [-af] [name[=value] ...] or readonly -p ./errors.tests: line 208: eval: -i: invalid option eval: usage: eval [arg ...] ./errors.tests: line 209: command: -i: invalid option command: usage: command [-pVv] command [arg ...] ! ./errors.tests: line 212: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0") ! ./errors.tests: line 213: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0") ./errors.tests: line 216: trap: NOSIG: invalid signal specification ./errors.tests: line 219: trap: -s: invalid option ! trap: usage: trap [-lp] [[arg] signal_spec ...] ./errors.tests: line 225: return: can only `return' from a function or sourced script ./errors.tests: line 229: break: 0: loop count out of range diff -aNrc2 bash-2.05b-patched/tests/exec.right bash-3.0/tests/exec.right *** bash-2.05b-patched/tests/exec.right Wed Jan 16 12:39:46 2002 --- bash-3.0/tests/exec.right Sun Jan 25 21:09:52 2004 *************** *** 7,19 **** ./execscript: line 20: notthere: command not found 127 ! notthere: notthere: No such file or directory 127 /bin/sh: /bin/sh: cannot execute binary file 126 ! ./execscript: line 32: /: is a directory 126 /: /: cannot execute binary file 126 ! ./execscript: line 39: .: /: is a directory 1 127 --- 7,19 ---- ./execscript: line 20: notthere: command not found 127 ! /tmp/bash: notthere: No such file or directory 127 /bin/sh: /bin/sh: cannot execute binary file 126 ! ./execscript: line 39: /: is a directory 126 /: /: cannot execute binary file 126 ! ./execscript: line 46: .: /: is a directory 1 127 *************** *** 23,31 **** ./exec3.sub: line 3: exec: /tmp/bash-notthere: cannot execute: No such file or directory 126 ! ./execscript: line 61: notthere: No such file or directory 127 ! ./execscript: line 64: notthere: No such file or directory 127 ! ./execscript: line 67: notthere: No such file or directory 127 this is sh --- 23,31 ---- ./exec3.sub: line 3: exec: /tmp/bash-notthere: cannot execute: No such file or directory 126 ! ./execscript: line 68: notthere: No such file or directory 127 ! ./execscript: line 71: notthere: No such file or directory 127 ! ./execscript: line 74: notthere: No such file or directory 127 this is sh *************** *** 51,52 **** --- 51,53 ---- 0 1 + testb diff -aNrc2 bash-2.05b-patched/tests/exec7.sub bash-3.0/tests/exec7.sub *** bash-2.05b-patched/tests/exec7.sub Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/exec7.sub Tue Sep 16 15:04:04 2003 *************** *** 0 **** --- 1,20 ---- + # make sure that bash really checks the right things when deciding what + # constitutes an executable file + + [ $UID -eq 0 ] && { echo "exec7.sub: the test suite should not be run as root" >&2 ; } + + : ${TMPDIR:=/tmp} + + cd $TMPDIR || { echo "cannot cd to $TMPDIR" >&2 ; exit 2; } + + mkdir testa testb + + echo 'echo "testa"' > testa/foo + echo 'echo "testb"' > testb/foo + + chmod 655 testa/foo + chmod 755 testb/foo + + PATH=$TMPDIR/testa:$TMPDIR/testb $THIS_SH -c foo + + rm -rf testa testb diff -aNrc2 bash-2.05b-patched/tests/execscript bash-3.0/tests/execscript *** bash-2.05b-patched/tests/execscript Wed May 2 14:50:01 2001 --- bash-3.0/tests/execscript Sun Jan 25 21:09:29 2004 *************** *** 2,6 **** export LANG=C ! if (( $UID == 0 )); then echo "execscript: the test suite should not be run as root" >&2 fi --- 2,6 ---- export LANG=C ! if [ $UID -eq 0 ]; then echo "execscript: the test suite should not be run as root" >&2 fi *************** *** 22,27 **** # this is iffy, since the error messages may vary from system to system ! ${THIS_SH} notthere echo $? # /bin/sh should be there on all systems --- 22,34 ---- # this is iffy, since the error messages may vary from system to system ! # and /tmp might not exist ! ln -s ${THIS_SH} /tmp/bash 2>/dev/null ! if [ -f /tmp/bash ]; then ! /tmp/bash notthere ! else ! ${THIS_SH} notthere ! fi echo $? + rm -f /tmp/bash # /bin/sh should be there on all systems *************** *** 95,96 **** --- 102,106 ---- ${THIS_SH} ./exec6.sub + + # checks for properly deciding what constitutes an executable file + ${THIS_SH} ./exec7.sub diff -aNrc2 bash-2.05b-patched/tests/extglob.right bash-3.0/tests/extglob.right *** bash-2.05b-patched/tests/extglob.right Tue Dec 15 13:34:09 1998 --- bash-3.0/tests/extglob.right Mon Mar 24 14:12:01 2003 *************** *** 68,71 **** --- 68,72 ---- ok 40 ok 41 + ok 42 a b a,b a-b a.b a:b a;b a_b a b a,b a-b a.b a:b a;b a_b diff -aNrc2 bash-2.05b-patched/tests/extglob.tests bash-3.0/tests/extglob.tests *** bash-2.05b-patched/tests/extglob.tests Sat Oct 30 16:01:20 1999 --- bash-3.0/tests/extglob.tests Mon Mar 24 14:11:44 2003 *************** *** 322,325 **** --- 322,331 ---- esac + # bug in all versions up to and including bash-2.05b + case "123abc" in + *?(a)bc) echo ok 42;; + *) echo bad 42;; + esac + # clean up and do the next one diff -aNrc2 bash-2.05b-patched/tests/glob-test bash-3.0/tests/glob-test *** bash-2.05b-patched/tests/glob-test Mon Feb 18 13:56:45 2002 --- bash-3.0/tests/glob-test Wed Sep 10 09:43:09 2003 *************** *** 36,39 **** --- 36,49 ---- shopt -u nullglob + # see if the failglob option works + + mkdir tmp + touch tmp/l1 tmp/l2 tmp/l3 + builtin echo tmp/l[12] tmp/*4 tmp/*3 + shopt -s failglob + builtin echo tmp/l[12] tmp/*4 tmp/*3 + rm -r tmp + shopt -u failglob + # see if the code that expands directories only works expect '' diff -aNrc2 bash-2.05b-patched/tests/glob.right bash-3.0/tests/glob.right *** bash-2.05b-patched/tests/glob.right Sat Apr 1 15:38:36 2000 --- bash-3.0/tests/glob.right Wed Sep 10 09:45:00 2003 *************** *** 13,16 **** --- 13,18 ---- argv[3] = argv[4] = + tmp/l1 tmp/l2 tmp/*4 tmp/l3 + ./glob-test: line 44: no match: tmp/*4 argv[1] = argv[1] = <*> diff -aNrc2 bash-2.05b-patched/tests/herestr.right bash-3.0/tests/herestr.right *** bash-2.05b-patched/tests/herestr.right Tue Feb 26 08:52:10 2002 --- bash-3.0/tests/herestr.right Thu Apr 3 13:55:36 2003 *************** *** 25,26 **** --- 25,28 ---- echo ho echo off to work we go + declare -a uu='([0]="" [1]="kghfjk" [2]="jkfzuk" [3]="i\ + ")' diff -aNrc2 bash-2.05b-patched/tests/herestr.tests bash-3.0/tests/herestr.tests *** bash-2.05b-patched/tests/herestr.tests Tue Feb 26 08:51:22 2002 --- bash-3.0/tests/herestr.tests Thu Apr 3 13:55:09 2003 *************** *** 35,36 **** --- 35,39 ---- cat <<< "echo $(echo off to work we go)" + + IFS="/" read -r -d $'\000' -a uu <<< /kghfjk/jkfzuk/i + declare -p uu diff -aNrc2 bash-2.05b-patched/tests/histexp.right bash-3.0/tests/histexp.right *** bash-2.05b-patched/tests/histexp.right Wed Jan 16 12:47:43 2002 --- bash-3.0/tests/histexp.right Fri Mar 19 22:44:55 2004 *************** *** 89,92 **** --- 89,93 ---- echo 'xwhix.h' xwhix.h + 7 set -H 8 echo line 2 for history 9 echo a b c d e *************** *** 118,124 **** 35 echo xbar.c xbar.o xbar.html xbar.h 36 echo xwhix.c xwhix.o xwhix.html xwhix.h ! 37 echo xwhix.c xwhix.o xwhix.html xwhix.h ! 38 echo 'xwhix' ! 39 echo 'xwhix.h' !! !! --- 119,124 ---- 35 echo xbar.c xbar.o xbar.html xbar.h 36 echo xwhix.c xwhix.o xwhix.html xwhix.h ! 37 echo 'xwhix' ! 38 echo 'xwhix.h' !! !! diff -aNrc2 bash-2.05b-patched/tests/jobs.right bash-3.0/tests/jobs.right *** bash-2.05b-patched/tests/jobs.right Mon Mar 25 09:46:01 2002 --- bash-3.0/tests/jobs.right Thu May 6 09:08:19 2004 *************** *** 1,3 **** ! ./jobs2.sub: line 9: fg: job %1 started without job control fg: 1 Waiting for job 0 --- 1,3 ---- ! ./jobs2.sub: line 9: fg: job 1 started without job control fg: 1 Waiting for job 0 *************** *** 17,27 **** Waiting for job 7 job 7 returns 0 0 ! ./jobs.tests: line 15: wait: no job control ! ./jobs.tests: line 20: fg: no job control wait-for-pid wait-errors ! ./jobs.tests: line 33: wait: `1-1': not a pid or valid job spec ! ./jobs.tests: line 34: wait: `-4': not a pid or valid job spec wait-for-background-pids async list wait-for-background-pids --- 17,35 ---- Waiting for job 7 job 7 returns 0 + [1] Running sleep 5 & + [2] Running sleep 5 & + [3] Running sleep 5 & + [4]- Running sleep 5 & + [5]+ Running ( sleep 5; exit 4 ) & + 4 0 ! i killed it ! 0 ! ./jobs.tests: line 19: wait: %1: no such job ! ./jobs.tests: line 24: fg: no job control wait-for-pid wait-errors ! ./jobs.tests: line 37: wait: `1-1': not a pid or valid job spec ! ./jobs.tests: line 38: wait: `-4': not a pid or valid job spec wait-for-background-pids async list wait-for-background-pids *************** *** 30,34 **** wait-when-no-children wait-for-job ! ./jobs.tests: line 56: wait: %2: no such job 127 async list wait-for-job --- 38,42 ---- wait-when-no-children wait-for-job ! ./jobs.tests: line 60: wait: %2: no such job 127 async list wait-for-job *************** *** 43,59 **** sleep 5 fg-bg 5 ! ./jobs.tests: line 83: fg: %2: no such job ! ./jobs.tests: line 84: bg: bg background job? fg-bg 6 ! ./jobs.tests: line 91: fg: -s: invalid option fg: usage: fg [job_spec] ! ./jobs.tests: line 92: bg: -s: invalid option bg: usage: bg [job_spec] ! ./jobs.tests: line 97: disown: -s: invalid option disown: usage: disown [-h] [-ar] [jobspec ...] ! ./jobs.tests: line 101: disown: %1: no such job ! ./jobs.tests: line 104: disown: %2: no such job wait-for-non-child ! ./jobs.tests: line 107: wait: pid 1 is not a child of this shell 127 3 -- 1 2 3 -- 1 - 2 - 3 --- 51,67 ---- sleep 5 fg-bg 5 ! ./jobs.tests: line 87: fg: %2: no such job ! ./jobs.tests: line 88: bg: job 1 already in background fg-bg 6 ! ./jobs.tests: line 95: fg: -s: invalid option fg: usage: fg [job_spec] ! ./jobs.tests: line 96: bg: -s: invalid option bg: usage: bg [job_spec] ! ./jobs.tests: line 101: disown: -s: invalid option disown: usage: disown [-h] [-ar] [jobspec ...] ! ./jobs.tests: line 105: disown: %1: no such job ! ./jobs.tests: line 108: disown: %2: no such job wait-for-non-child ! ./jobs.tests: line 111: wait: pid 1 is not a child of this shell 127 3 -- 1 2 3 -- 1 - 2 - 3 *************** *** 65,70 **** [2]- Running sleep 350 & [3]+ Running sleep 400 & ! ./jobs.tests: line 123: kill: %4: no such job ! ./jobs.tests: line 125: jobs: %4: no such job current job: [3]+ Running sleep 400 & --- 73,78 ---- [2]- Running sleep 350 & [3]+ Running sleep 400 & ! ./jobs.tests: line 127: kill: %4: no such job ! ./jobs.tests: line 129: jobs: %4: no such job current job: [3]+ Running sleep 400 & diff -aNrc2 bash-2.05b-patched/tests/jobs.tests bash-3.0/tests/jobs.tests *** bash-2.05b-patched/tests/jobs.tests Wed Apr 21 13:07:10 1999 --- bash-3.0/tests/jobs.tests Thu May 6 09:06:20 2004 *************** *** 9,16 **** ${THIS_SH} ./jobs3.sub jobs echo $? ! # should be a job-control-not-enabled error wait %1 --- 9,20 ---- ${THIS_SH} ./jobs3.sub + # test out behavior of using job control notation when job control is not + # active + ${THIS_SH} ./jobs4.sub + jobs echo $? ! # a no-such-job error, since we can use job control notation without job control wait %1 diff -aNrc2 bash-2.05b-patched/tests/jobs4.sub bash-3.0/tests/jobs4.sub *** bash-2.05b-patched/tests/jobs4.sub Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/jobs4.sub Thu May 6 09:02:41 2004 *************** *** 0 **** --- 1,22 ---- + # test being able to use job control notation in jobs/kill/wait without + # job control active, as the SUS requires + + sleep 5 & + + sleep 5 & + sleep 5 & + sleep 5 & + (sleep 5 ; exit 4) & + + jobs + + wait %% + echo $? + + wait %1 + echo $? + + wait + + cat & + kill -1 %% && echo i killed it || echo could not kill it diff -aNrc2 bash-2.05b-patched/tests/new-exp.right bash-3.0/tests/new-exp.right *** bash-2.05b-patched/tests/new-exp.right Thu Mar 28 15:56:28 2002 --- bash-3.0/tests/new-exp.right Mon Jun 16 17:30:32 2003 *************** *** 423,427 **** ./new-exp3.sub: line 24: ${!1*}: bad substitution ./new-exp3.sub: line 26: ${!@*}: bad substitution ! ./new-exp.tests: line 503: ${$(($#-1))}: bad substitution argv[1] = argv[2] = --- 423,435 ---- ./new-exp3.sub: line 24: ${!1*}: bad substitution ./new-exp3.sub: line 26: ${!@*}: bad substitution ! Case01---3---A:B:C--- ! Case02---1---A B C::--- ! Case03---3---A:B:C--- ! Case04---3---A:B:C--- ! Case05---3---A:B:C--- ! Case06---1---A B C::--- ! Case07---3---A:B:C--- ! Case08---3---A:B:C--- ! ./new-exp.tests: line 506: ${$(($#-1))}: bad substitution argv[1] = argv[2] = *************** *** 440,444 **** argv[2] = argv[1] = <> ! ./new-exp.tests: line 522: $(($# - 2)): substring expression < 0 argv[1] = argv[2] = --- 448,452 ---- argv[2] = argv[1] = <> ! ./new-exp.tests: line 525: $(($# - 2)): substring expression < 0 argv[1] = argv[2] = *************** *** 472,474 **** argv[1] = argv[1] = ! ./new-exp.tests: line 542: ABXD: parameter unset --- 480,482 ---- argv[1] = argv[1] = ! ./new-exp.tests: line 545: ABXD: parameter unset diff -aNrc2 bash-2.05b-patched/tests/new-exp.tests bash-3.0/tests/new-exp.tests *** bash-2.05b-patched/tests/new-exp.tests Thu Mar 28 15:55:32 2002 --- bash-3.0/tests/new-exp.tests Mon Jun 16 17:30:03 2003 *************** *** 499,502 **** --- 499,505 ---- ${THIS_SH} ./new-exp3.sub + # bug with indirect expansion through bash-2.05b + ${THIS_SH} ./new-exp4.sub + # these caused errors and core dumps in versions before bash-2.04 c="" diff -aNrc2 bash-2.05b-patched/tests/new-exp4.sub bash-3.0/tests/new-exp4.sub *** bash-2.05b-patched/tests/new-exp4.sub Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/new-exp4.sub Mon Jun 16 17:29:09 2003 *************** *** 0 **** --- 1,31 ---- + #!/bin/bash + + arrayA=("A" "B" "C") + + arrayB=( ${arrayA[*]} ) + echo "Case01---${#arrayB[*]}---${arrayB[0]}:${arrayB[1]}:${arrayB[2]}---" + + arrayB=( "${arrayA[*]}" ) + echo "Case02---${#arrayB[*]}---${arrayB[0]}:${arrayB[1]}:${arrayB[2]}---" + + arrayB=( ${arrayA[@]} ) + echo "Case03---${#arrayB[@]}---${arrayB[0]}:${arrayB[1]}:${arrayB[2]}---" + + arrayB=( "${arrayA[@]}" ) + echo "Case04---${#arrayB[@]}---${arrayB[0]}:${arrayB[1]}:${arrayB[2]}---" + + xx="arrayA[*]" + + arrayB=( ${!xx} ) + echo "Case05---${#arrayB[*]}---${arrayB[0]}:${arrayB[1]}:${arrayB[2]}---" + + arrayB=( "${!xx}" ) + echo "Case06---${#arrayB[*]}---${arrayB[0]}:${arrayB[1]}:${arrayB[2]}---" + + xx="arrayA[@]" + + arrayB=( ${!xx} ) + echo "Case07---${#arrayB[@]}---${arrayB[0]}:${arrayB[1]}:${arrayB[2]}---" + + arrayB=( "${!xx}" ) + echo "Case08---${#arrayB[@]}---${arrayB[0]}:${arrayB[1]}:${arrayB[2]}---" diff -aNrc2 bash-2.05b-patched/tests/nquote4.right bash-3.0/tests/nquote4.right *** bash-2.05b-patched/tests/nquote4.right Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/nquote4.right Wed Oct 2 14:52:56 2002 *************** *** 0 **** --- 1,18 ---- + argv[1] = + argv[1] = + argv[1] = + argv[1] = + argv[1] = + argv[1] = + argv[1] = + argv[1] = + argv[1] = + argv[1] = <¼X> + argv[1] = <«cX> + argv[1] = <> + argv[1] = <> + argv[1] = + argv[1] = + argv[1] = <> + argv[1] = <^Abcd> + argv[1] = <Þ> diff -aNrc2 bash-2.05b-patched/tests/nquote4.tests bash-3.0/tests/nquote4.tests *** bash-2.05b-patched/tests/nquote4.tests Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/nquote4.tests Tue Aug 6 11:22:06 2002 *************** *** 0 **** --- 1,24 ---- + recho $'ab\x{}cd' + recho $'ab\x{41}cd' + recho $'ab\x41cd' + + recho $'ab\x{4}cd' + recho $'ab\x4cd' + + recho $'ab\x{cde' + + recho $'ab\x{cde' + recho $'ab\x{cd}e' + recho $'ab\x{c}de' + + recho $'\x{abcX' + recho $'\x{ab}cX' + recho $'\x{}X' + recho $'\x{X' + recho $'\x{01234567X' + + recho $'\x{41}b' + recho $'\x{}bc' + recho $'\x{1}bcd' + + recho $'\x{bde' diff -aNrc2 bash-2.05b-patched/tests/printf.right bash-3.0/tests/printf.right *** bash-2.05b-patched/tests/printf.right Mon Mar 25 09:49:29 2002 --- bash-3.0/tests/printf.right Wed Oct 1 16:42:04 2003 *************** *** 103,104 **** --- 103,109 ---- (foo )(bar ) 0 +  +  + 7 + e + "? diff -aNrc2 bash-2.05b-patched/tests/printf.tests bash-3.0/tests/printf.tests *** bash-2.05b-patched/tests/printf.tests Thu Oct 4 15:35:26 2001 --- bash-3.0/tests/printf.tests Wed Oct 1 16:41:34 2003 *************** *** 223,224 **** --- 223,240 ---- # this doesn't work with printf(3) on all systems #printf "%'s\n" foo + + # test cases from an austin-group list discussion + # prints ^G as an extension + printf '%b\n' '\7' + + # prints ^G + printf '%b\n' '\0007' + + # prints NUL then 7 + printf '\0007\n' + + # prints no more than two hex digits + printf '\x07e\n' + + # additional backslash escapes + printf '\"\?\n' diff -aNrc2 bash-2.05b-patched/tests/read.right bash-3.0/tests/read.right *** bash-2.05b-patched/tests/read.right Tue Mar 26 11:05:33 2002 --- bash-3.0/tests/read.right Sun Mar 14 17:18:16 2004 *************** *** 50,51 **** --- 50,63 ---- echo "$var" done 3<$0 + argv[1] = <> + argv[1] = <> + argv[1] = <:> + argv[1] = <:> + FOO + argv[1] = <> + argv[1] = <3> + argv[1] = <> + argv[2] = <> + argv[3] = <> + FOO + 0 0 0 diff -aNrc2 bash-2.05b-patched/tests/read.tests bash-3.0/tests/read.tests *** bash-2.05b-patched/tests/read.tests Tue Mar 26 11:04:25 2002 --- bash-3.0/tests/read.tests Sun Mar 14 17:18:02 2004 *************** *** 91,92 **** --- 91,95 ---- # test read -u fd behavior ${THIS_SH} ./read4.sub + + # test behavior when IFS is not the default -- bug through bash-2.05b + ${THIS_SH} ./read5.sub diff -aNrc2 bash-2.05b-patched/tests/read2.sub bash-3.0/tests/read2.sub *** bash-2.05b-patched/tests/read2.sub Wed Apr 21 12:33:30 1999 --- bash-3.0/tests/read2.sub Tue Sep 17 14:04:33 2002 *************** *** 1,5 **** a=4 ! read -t 2 a echo $? --- 1,5 ---- a=4 ! read -t 2 a < /dev/tty echo $? *************** *** 11,15 **** echo $a ! read -t -3 a echo $? --- 11,15 ---- echo $a ! read -t -3 a < /dev/tty echo $? diff -aNrc2 bash-2.05b-patched/tests/read5.sub bash-3.0/tests/read5.sub *** bash-2.05b-patched/tests/read5.sub Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/read5.sub Sun Mar 14 17:16:43 2004 *************** *** 0 **** --- 1,36 ---- + IFS=: read x y z << EOF + ::: + EOF + recho $x + recho "$x" + recho $y + recho "$y" + recho $z + recho "$z" + + if [ -z "$x" ]; then + echo FOO + else + echo BAR + fi + + IFS=: read -a A << EOF + ::: + EOF + + recho ${A[0]} + recho "${A[0]}" + + recho ${#A[@]} + + recho "${A[@]}" + + if [ -z "${A[0]}" ]; then + echo FOO + else + echo BAR + fi + + echo -n ${A[0]} | cat -vet + echo -n ${A[0]} | wc + diff -aNrc2 bash-2.05b-patched/tests/redir.right bash-3.0/tests/redir.right *** bash-2.05b-patched/tests/redir.right Tue Mar 26 11:11:29 2002 --- bash-3.0/tests/redir.right Mon Jun 2 15:45:32 2003 *************** *** 89,90 **** --- 89,96 ---- ./redir5.sub: line 27: read: read error: 0: Bad file descriptor # tests of ksh93-like dup-and-close redirection operators + / + / + / + 0 + 0 + 0 diff -aNrc2 bash-2.05b-patched/tests/redir.tests bash-3.0/tests/redir.tests *** bash-2.05b-patched/tests/redir.tests Tue Mar 26 11:10:28 2002 --- bash-3.0/tests/redir.tests Mon Jun 2 15:45:18 2003 *************** *** 154,155 **** --- 154,158 ---- # test ksh93 dup-and-close (move fd) redirections ${THIS_SH} ./redir5.sub + + # test behavior after a write error with a builtin command + ${THIS_SH} ./redir6.sub diff -aNrc2 bash-2.05b-patched/tests/redir6.sub bash-3.0/tests/redir6.sub *** bash-2.05b-patched/tests/redir6.sub Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/redir6.sub Mon Jun 2 15:43:40 2003 *************** *** 0 **** --- 1,8 ---- + cd / + pwd + help >&- + pwd + pwd + echo $? + echo $? + echo $? diff -aNrc2 bash-2.05b-patched/tests/run-alias bash-3.0/tests/run-alias *** bash-2.05b-patched/tests/run-alias Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/run-alias Tue Jan 14 11:07:31 2003 *************** *** 0 **** --- 1,2 ---- + ${THIS_SH} ./alias.tests > /tmp/xx 2>&1 + diff /tmp/xx alias.right && rm -f /tmp/xx diff -aNrc2 bash-2.05b-patched/tests/run-braces bash-3.0/tests/run-braces *** bash-2.05b-patched/tests/run-braces Fri Feb 2 16:09:54 1996 --- bash-3.0/tests/run-braces Tue Apr 8 09:46:27 2003 *************** *** 1,2 **** ! ${THIS_SH} ./braces-tests > /tmp/xx diff /tmp/xx braces.right && rm -f /tmp/xx --- 1,2 ---- ! ${THIS_SH} ./braces.tests > /tmp/xx diff /tmp/xx braces.right && rm -f /tmp/xx diff -aNrc2 bash-2.05b-patched/tests/run-dbg-support bash-3.0/tests/run-dbg-support *** bash-2.05b-patched/tests/run-dbg-support Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/run-dbg-support Wed Sep 24 08:56:13 2003 *************** *** 0 **** --- 1,11 ---- + #!../bash + #$Id: run-dbg-support,v 1.5 2002/11/14 06:08:16 rockyb Exp $ + + TEST_NAME='dbg-support' + TEST_FILE="/tmp/${TEST_NAME}.check" + ${THIS_SH} ./${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null + set -f + diff $TEST_FILE ${TEST_NAME}.right && rm -f $TEST_FILE + + # Return code tells testing mechanism whether passed or not. + exit $? diff -aNrc2 bash-2.05b-patched/tests/run-dbg-support2 bash-3.0/tests/run-dbg-support2 *** bash-2.05b-patched/tests/run-dbg-support2 Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/run-dbg-support2 Wed Sep 24 08:56:20 2003 *************** *** 0 **** --- 1,16 ---- + #!../bash + #$Id: run-dbg-support2,v 1.3 2002/11/14 06:08:16 rockyb Exp $ + + TEST_NAME='dbg-support2' + TEST_FILE="/tmp/${TEST_NAME}.check" + ${THIS_SH} ./${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null + set -f + diff $TEST_FILE ${TEST_NAME}.right && rm -f $TEST_FILE + + # Return code tells testing mechanism whether passed or not. + exit $? + + #;;; Local Variables: *** + #;;; mode:shell-script *** + #;;; eval: (sh-set-shell "bash") *** + #;;; End: *** diff -aNrc2 bash-2.05b-patched/tests/run-execscript bash-3.0/tests/run-execscript *** bash-2.05b-patched/tests/run-execscript Thu Jul 3 12:13:31 1997 --- bash-3.0/tests/run-execscript Mon Jan 26 13:30:15 2004 *************** *** 4,7 **** --- 4,9 ---- echo "warning: \`/tmp/bash-notthere' not being found or \`/' being a directory" >&2 echo "warning: produce diff output, please do not consider this a test failure" >&2 + echo "warning: if diff output differing only in the location of the bash" >&2 + echo "warning: binary appears, please do not consider this a test failure" >&2 ${THIS_SH} ./execscript > /tmp/xx 2>&1 diff /tmp/xx exec.right && rm -f /tmp/xx diff -aNrc2 bash-2.05b-patched/tests/run-glob-test bash-3.0/tests/run-glob-test *** bash-2.05b-patched/tests/run-glob-test Fri Feb 2 16:10:33 1996 --- bash-3.0/tests/run-glob-test Wed Sep 10 09:44:39 2003 *************** *** 1,4 **** PATH=$PATH:`pwd` export PATH ! ${THIS_SH} ./glob-test | grep -v '^expect' > /tmp/xx diff /tmp/xx glob.right && rm -f /tmp/xx --- 1,4 ---- PATH=$PATH:`pwd` export PATH ! ${THIS_SH} ./glob-test 2>&1 | grep -v '^expect' > /tmp/xx diff /tmp/xx glob.right && rm -f /tmp/xx diff -aNrc2 bash-2.05b-patched/tests/run-jobs bash-3.0/tests/run-jobs *** bash-2.05b-patched/tests/run-jobs Thu Mar 6 16:21:19 1997 --- bash-3.0/tests/run-jobs Wed Jul 21 16:37:50 2004 *************** *** 1,4 **** --- 1,6 ---- echo "warning: some of these tests may fail if job control has not been compiled" >&2 echo "warning: into the shell" >&2 + echo "warning: there may be a message regarding a cat process dying due to a" >&2 + echo "warning: SIGHUP. Please disregard." >&2 ${THIS_SH} ./jobs.tests > /tmp/xx 2>&1 diff -aNrc2 bash-2.05b-patched/tests/run-nquote4 bash-3.0/tests/run-nquote4 *** bash-2.05b-patched/tests/run-nquote4 Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/run-nquote4 Wed Oct 2 14:57:19 2002 *************** *** 0 **** --- 1,2 ---- + ${THIS_SH} ./nquote.tests 2>&1 | grep -v '^expect' > /tmp/xx + diff /tmp/xx nquote.right && rm -f /tmp/xx diff -aNrc2 bash-2.05b-patched/tests/run-read bash-3.0/tests/run-read *** bash-2.05b-patched/tests/run-read Wed Apr 21 12:34:05 1999 --- bash-3.0/tests/run-read Wed Jul 21 16:58:33 2004 *************** *** 1,2 **** --- 1,4 ---- + echo "warning: different versions of wc put differing amounts of whitespace" >&2 + echo "warning: before their output. Please do not consider this an error." >&2 ${THIS_SH} ./read.tests > /tmp/xx 2>&1 diff /tmp/xx read.right && rm -f /tmp/xx diff -aNrc2 bash-2.05b-patched/tests/run-set-x bash-3.0/tests/run-set-x *** bash-2.05b-patched/tests/run-set-x Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/run-set-x Wed Sep 24 17:56:45 2003 *************** *** 0 **** --- 1,11 ---- + #!../bash + #$Id: run-set-x,v 1.1 2002/12/09 13:12:37 rockyb Exp $ + + TEST_NAME='set-x' + TEST_FILE="/tmp/${TEST_NAME}.check" + ${THIS_SH} ./${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null + set -f + diff $TEST_FILE ${TEST_NAME}.right && rm -f $TEST_FILE + + # Return code tells testing mechanism whether passed or not. + exit $? diff -aNrc2 bash-2.05b-patched/tests/run-test bash-3.0/tests/run-test *** bash-2.05b-patched/tests/run-test Mon Mar 29 11:18:59 1999 --- bash-3.0/tests/run-test Wed Apr 9 09:05:12 2003 *************** *** 1,2 **** --- 1,4 ---- + unset GROUPS UID 2>/dev/null + ${THIS_SH} ./test.tests >/tmp/xx 2>&1 diff /tmp/xx test.right && rm -f /tmp/xx diff -aNrc2 bash-2.05b-patched/tests/set-x.right bash-3.0/tests/set-x.right *** bash-2.05b-patched/tests/set-x.right Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/set-x.right Mon Mar 24 17:31:40 2003 *************** *** 0 **** --- 1,28 ---- + + (( i=0 )) + + (( i<=5 )) + + x=0 + + (( i++ )) + + (( i<=5 )) + + x=0 + + (( i++ )) + + (( i<=5 )) + + x=0 + + (( i++ )) + + (( i<=5 )) + + x=0 + + (( i++ )) + + (( i<=5 )) + + x=0 + + (( i++ )) + + (( i<=5 )) + + x=0 + + (( i++ )) + + (( i<=5 )) + + for i in 0 1 2 + + x=i + + for i in 0 1 2 + + x=i + + for i in 0 1 2 + + x=i + + case x in + + x=i diff -aNrc2 bash-2.05b-patched/tests/set-x.tests bash-3.0/tests/set-x.tests *** bash-2.05b-patched/tests/set-x.tests Wed Dec 31 19:00:00 1969 --- bash-3.0/tests/set-x.tests Mon Mar 24 17:27:20 2003 *************** *** 0 **** --- 1,21 ---- + #!../bash + # $Id: set-x.tests,v 1.1 2002/12/09 13:12:37 rockyb Exp $ + # + # Test that "set -x" shows what we think it should. + # + set -x + for ((i=0; i<=5; i++ )) ; do + x=0 + done + for i in 0 1 2 ; do + x=i + done + case x in + 0) x=i ;; + *) x=i ;; + esac + + #;;; Local Variables: *** + #;;; mode:shell-script *** + #;;; eval: (sh-set-shell "bash") *** + #;;; End: *** diff -aNrc2 bash-2.05b-patched/tests/shopt.right bash-3.0/tests/shopt.right *** bash-2.05b-patched/tests/shopt.right Mon Mar 25 09:51:01 2002 --- bash-3.0/tests/shopt.right Fri Sep 12 18:46:50 2003 *************** *** 10,14 **** --- 10,19 ---- shopt -u execfail shopt -s expand_aliases + shopt -u extdebug shopt -u extglob + shopt -s extquote + shopt -u failglob + shopt -s force_fignore + shopt -u gnu_errfmt shopt -u histreedit shopt -u histappend *************** *** 37,40 **** --- 42,47 ---- shopt -s cmdhist shopt -s expand_aliases + shopt -s extquote + shopt -s force_fignore shopt -s hostcomplete shopt -s interactive_comments *************** *** 48,52 **** --- 55,62 ---- shopt -u dotglob shopt -u execfail + shopt -u extdebug shopt -u extglob + shopt -u failglob + shopt -u gnu_errfmt shopt -u histreedit shopt -u histappend *************** *** 68,72 **** --- 78,85 ---- dotglob off execfail off + extdebug off extglob off + failglob off + gnu_errfmt off histreedit off histappend off *************** *** 87,90 **** --- 100,105 ---- set -o emacs set +o errexit + set +o errtrace + set +o functrace set -o hashall set -o histexpand *************** *** 102,105 **** --- 117,121 ---- set +o onecmd set +o physical + set +o pipefail set +o posix set -o privileged *************** *** 112,115 **** --- 128,133 ---- emacs on errexit off + errtrace off + functrace off hashall on histexpand on *************** *** 127,130 **** --- 145,149 ---- onecmd off physical off + pipefail off posix off privileged on *************** *** 137,140 **** --- 156,161 ---- set -o emacs set +o errexit + set +o errtrace + set +o functrace set -o hashall set -o histexpand *************** *** 152,155 **** --- 173,177 ---- set +o onecmd set +o physical + set +o pipefail set +o posix set -o privileged *************** *** 172,175 **** --- 194,199 ---- set +o allexport set +o errexit + set +o errtrace + set +o functrace set +o ignoreeof set +o keyword *************** *** 182,185 **** --- 206,210 ---- set +o onecmd set +o physical + set +o pipefail set +o posix set +o verbose *************** *** 189,192 **** --- 214,219 ---- allexport off errexit off + errtrace off + functrace off ignoreeof off keyword off *************** *** 199,202 **** --- 226,230 ---- onecmd off physical off + pipefail off posix off verbose off diff -aNrc2 bash-2.05b-patched/tests/test.tests bash-3.0/tests/test.tests *** bash-2.05b-patched/tests/test.tests Thu Mar 8 08:59:32 2001 --- bash-3.0/tests/test.tests Mon May 10 10:11:42 2004 *************** *** 100,104 **** t -t 20 echo 't -t 0' ! t -t 0 echo 't -u noexist' --- 100,104 ---- t -t 20 echo 't -t 0' ! t -t 0 < /dev/tty echo 't -u noexist' *************** *** 356,360 **** if ln -s ${SHNAME} /tmp/test.symlink 2>/dev/null; then ! chgrp ${GROUPS[0]} /tmp/test.symlink echo 't -h /tmp/test.symlink' t -h /tmp/test.symlink --- 356,360 ---- if ln -s ${SHNAME} /tmp/test.symlink 2>/dev/null; then ! chgrp ${GROUPS[0]} /tmp/test.symlink 2>/dev/null echo 't -h /tmp/test.symlink' t -h /tmp/test.symlink diff -aNrc2 bash-2.05b-patched/tests/trap.right bash-3.0/tests/trap.right *** bash-2.05b-patched/tests/trap.right Thu Mar 14 13:24:09 2002 --- bash-3.0/tests/trap.right Mon Mar 24 17:21:33 2003 *************** *** 30,33 **** --- 30,34 ---- ./trap.tests[33] debug ./trap.tests[34] debug + func2[30] debug func2[31] debug func2debug line diff -aNrc2 bash-2.05b-patched/tests/trap.tests bash-3.0/tests/trap.tests *** bash-2.05b-patched/tests/trap.tests Tue Mar 12 09:43:25 2002 --- bash-3.0/tests/trap.tests Thu May 27 22:27:28 2004 *************** *** 82,86 **** # Now reset some of the signals the shell handles specially back to # their default values (with or without the SIG prefix) ! trap SIGINT QUIT TERM trap --- 82,86 ---- # Now reset some of the signals the shell handles specially back to # their default values (with or without the SIG prefix) ! trap - SIGINT QUIT TERM trap diff -aNrc2 bash-2.05b-patched/tests/type.right bash-3.0/tests/type.right *** bash-2.05b-patched/tests/type.right Mon Mar 25 09:51:20 2002 --- bash-3.0/tests/type.right Tue Nov 19 14:25:22 2002 *************** *** 5,9 **** function keyword - alias builtin file --- 5,8 ---- *************** *** 17,21 **** while is a shell keyword while is a shell keyword - m is aliased to `more' builtin is a shell builtin /bin/sh is /bin/sh --- 16,19 ---- *************** *** 28,31 **** --- 26,35 ---- while while is a shell keyword + ./type.tests: line 42: type: m: not found + ./type.tests: line 43: command: m: not found + alias m='more' + alias m='more' + m is aliased to `more' + alias alias m='more' alias m='more' *************** *** 36,41 **** /bin/sh /bin/sh is /bin/sh ! ./type.tests: line 51: type: func: not found ! ./type.tests: line 53: type: m: not found /bin/sh /tmp/bash --- 40,45 ---- /bin/sh /bin/sh is /bin/sh ! ./type.tests: line 64: type: func: not found ! ./type.tests: line 66: type: m: not found /bin/sh /tmp/bash diff -aNrc2 bash-2.05b-patched/tests/type.tests bash-3.0/tests/type.tests *** bash-2.05b-patched/tests/type.tests Wed Dec 19 16:23:00 2001 --- bash-3.0/tests/type.tests Tue Nov 19 14:23:20 2002 *************** *** 20,24 **** type -t func type -t while - type -t m type -t builtin type -t /bin/sh --- 20,23 ---- *************** *** 30,34 **** type while type -a while - type m type builtin type /bin/sh --- 29,32 ---- *************** *** 38,46 **** --- 36,59 ---- command -v while command -V while + # the following three lines should produce the same output + # first test with alias expansion off (should all fail or produce no output) + type -t m + type m command -v m alias -p alias m + + # then test with alias expansion on + shopt -s expand_aliases + type m + type -t m + command -v m + alias -p + alias m + command -V m + shopt -u expand_aliases + command -v builtin command -V builtin diff -aNrc2 bash-2.05b-patched/tests/varenv.right bash-3.0/tests/varenv.right *** bash-2.05b-patched/tests/varenv.right Tue Jan 15 16:25:48 2002 --- bash-3.0/tests/varenv.right Sun Feb 16 21:35:50 2003 *************** *** 31,35 **** hB braceexpand:hashall:interactive-comments ! hPB braceexpand:hashall:interactive-comments:physical declare -r SHELLOPTS="braceexpand:hashall:interactive-comments:physical" --- 31,35 ---- hB braceexpand:hashall:interactive-comments ! hBP braceexpand:hashall:interactive-comments:physical declare -r SHELLOPTS="braceexpand:hashall:interactive-comments:physical" diff -aNrc2 bash-2.05b-patched/trap.c bash-3.0/trap.c *** bash-2.05b-patched/trap.c Thu Mar 14 11:50:20 2002 --- bash-3.0/trap.c Fri Dec 19 16:28:50 2003 *************** *** 2,6 **** those objects. The trap command is in builtins/trap.def. */ ! /* Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 2,6 ---- those objects. The trap command is in builtins/trap.def. */ ! /* Copyright (C) 1987-2003 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 32,38 **** --- 32,41 ---- #include + #include "bashintl.h" + #include "trap.h" #include "shell.h" + #include "flags.h" #include "input.h" /* for save_token_state, restore_token_state */ #include "signames.h" *************** *** 55,59 **** #define SIG_IGNORED 0x40 /* The signal is currently being ignored. */ ! #define SPECIAL_TRAP(s) ((s) == EXIT_TRAP || (s) == DEBUG_TRAP || (s) == ERROR_TRAP) /* An array of such flags, one for each signal, describing what the --- 58,62 ---- #define SIG_IGNORED 0x40 /* The signal is currently being ignored. */ ! #define SPECIAL_TRAP(s) ((s) == EXIT_TRAP || (s) == DEBUG_TRAP || (s) == ERROR_TRAP || (s) == RETURN_TRAP) /* An array of such flags, one for each signal, describing what the *************** *** 67,71 **** static void get_original_signal __P((int)); ! static void _run_trap_internal __P((int, char *)); static void reset_signal __P((int)); --- 70,74 ---- static void get_original_signal __P((int)); ! static int _run_trap_internal __P((int, char *)); static void reset_signal __P((int)); *************** *** 78,83 **** --- 81,89 ---- extern int line_number; + extern char *this_command_name; extern sh_builtin_func_t *this_shell_builtin; extern procenv_t wait_intr_buf; + extern int return_catch_flag, return_catch_value; + extern int subshell_level; /* The list of things to do originally, before we started trapping. */ *************** *** 100,107 **** int running_trap; ! /* The value of line_number when the trap started executing, since ! parse_and_execute resets it to 1 and the trap command might want ! it. */ ! int trap_line_number; /* The (trapped) signal received while executing in the `wait' builtin */ --- 106,111 ---- int running_trap; ! /* Set to last_command_exit_value before running a trap. */ ! int trap_saved_exit_value; /* The (trapped) signal received while executing in the `wait' builtin */ *************** *** 116,121 **** register int i; ! trap_list[EXIT_TRAP] = trap_list[DEBUG_TRAP] = trap_list[ERROR_TRAP] = (char *)NULL; ! sigmodes[EXIT_TRAP] = sigmodes[DEBUG_TRAP] = sigmodes[ERROR_TRAP] = SIG_INHERITED; original_signals[EXIT_TRAP] = IMPOSSIBLE_TRAP_HANDLER; --- 120,125 ---- register int i; ! trap_list[EXIT_TRAP] = trap_list[DEBUG_TRAP] = trap_list[ERROR_TRAP] = trap_list[RETURN_TRAP] = (char *)NULL; ! sigmodes[EXIT_TRAP] = sigmodes[DEBUG_TRAP] = sigmodes[ERROR_TRAP] = sigmodes[RETURN_TRAP] = SIG_INHERITED; original_signals[EXIT_TRAP] = IMPOSSIBLE_TRAP_HANDLER; *************** *** 187,193 **** /* on cygwin32, signal_names[sig] could be null */ ! ret = (sig >= BASH_NSIG || sig < 0) ? "bad signal number" : signal_names[sig]; ! if (ret == NULL) ! ret = "unrecognized signal number"; return ret; } --- 191,198 ---- /* on cygwin32, signal_names[sig] could be null */ ! ret = (sig >= BASH_NSIG || sig < 0 || signal_names[sig] == NULL) ! ? _("invalid signal number") ! : signal_names[sig]; ! return ret; } *************** *** 198,205 **** contain a valid signal descriptor. */ int ! decode_signal (string) char *string; { intmax_t sig; if (legal_number (string, &sig)) --- 203,212 ---- contain a valid signal descriptor. */ int ! decode_signal (string, flags) char *string; + int flags; { intmax_t sig; + char *name; if (legal_number (string, &sig)) *************** *** 209,217 **** for (sig = 0; sig < BASH_NSIG; sig++) { ! if (signal_names[sig] == 0 || signal_names[sig][0] == '\0') continue; ! if (strcasecmp (string, signal_names[sig]) == 0 || ! (STREQN (signal_names[sig], "SIG", 3) && ! strcasecmp (string, &(signal_names[sig])[3]) == 0)) return ((int)sig); } --- 216,245 ---- for (sig = 0; sig < BASH_NSIG; sig++) { ! name = signal_names[sig]; ! if (name == 0 || name[0] == '\0') continue; ! ! /* Check name without the SIG prefix first case sensitivly or ! insensitively depending on whether flags includes DSIG_NOCASE */ ! if (STREQN (name, "SIG", 3)) ! { ! name += 3; ! ! if ((flags & DSIG_NOCASE) && strcasecmp (string, name) == 0) ! return ((int)sig); ! else if ((flags & DSIG_NOCASE) == 0 && strcmp (string, name) == 0) ! return ((int)sig); ! /* If we can't use the `SIG' prefix to match, punt on this ! name now. */ ! else if ((flags & DSIG_SIGPREFIX) == 0) ! continue; ! } ! ! /* Check name with SIG prefix case sensitively or insensitively ! depending on whether flags includes DSIG_NOCASE */ ! name = signal_names[sig]; ! if ((flags & DSIG_NOCASE) && strcasecmp (string, name) == 0) ! return ((int)sig); ! else if ((flags & DSIG_NOCASE) == 0 && strcmp (string, name) == 0) return ((int)sig); } *************** *** 279,287 **** trap_list[SIGTERM] == DEFAULT_SIG, because DEFAULT_SIG is usually 0x0. */ ! internal_warning ("run_pending_traps: bad value in trap_list[%d]: %p", sig, trap_list[sig]); if (trap_list[sig] == (char *)DEFAULT_SIG) { ! internal_warning ("run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself", sig, signal_name (sig)); kill (getpid (), sig); } --- 307,315 ---- trap_list[SIGTERM] == DEFAULT_SIG, because DEFAULT_SIG is usually 0x0. */ ! internal_warning (_("run_pending_traps: bad value in trap_list[%d]: %p"), sig, trap_list[sig]); if (trap_list[sig] == (char *)DEFAULT_SIG) { ! internal_warning (_("run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"), sig, signal_name (sig)); kill (getpid (), sig); } *************** *** 319,323 **** (trap_list[sig] == (char *)DEFAULT_SIG) || (trap_list[sig] == (char *)IGNORE_SIG)) ! programming_error ("trap_handler: bad signal %d", sig); else { --- 347,351 ---- (trap_list[sig] == (char *)DEFAULT_SIG) || (trap_list[sig] == (char *)IGNORE_SIG)) ! programming_error (_("trap_handler: bad signal %d"), sig); else { *************** *** 382,385 **** --- 410,420 ---- } + void + set_return_trap (command) + char *command; + { + set_signal (RETURN_TRAP, command); + } + #ifdef INCLUDE_UNUSED void *************** *** 542,546 **** if (SPECIAL_TRAP (sig)) { ! if ((sig != DEBUG_TRAP && sig != ERROR_TRAP) || (sigmodes[sig] & SIG_INPROGRESS) == 0) free_trap_command (sig); trap_list[sig] = (char *)NULL; --- 577,582 ---- if (SPECIAL_TRAP (sig)) { ! if ((sig != DEBUG_TRAP && sig != ERROR_TRAP && sig != RETURN_TRAP) || ! (sigmodes[sig] & SIG_INPROGRESS) == 0) free_trap_command (sig); trap_list[sig] = (char *)NULL; *************** *** 610,616 **** { char *trap_command; ! int code, old_exit_value; ! old_exit_value = last_command_exit_value; /* Run the trap only if signal 0 is trapped and not ignored, and we are not --- 646,653 ---- { char *trap_command; ! int code, function_code, retval; ! trap_saved_exit_value = last_command_exit_value; ! function_code = 0; /* Run the trap only if signal 0 is trapped and not ignored, and we are not *************** *** 624,641 **** sigmodes[EXIT_TRAP] |= SIG_INPROGRESS; code = setjmp (top_level); ! if (code == 0) { reset_parser (); parse_and_execute (trap_command, "exit trap", SEVAL_NONINT|SEVAL_NOHIST); } else if (code == EXITPROG) ! return (last_command_exit_value); else ! return (old_exit_value); } ! return (old_exit_value); } --- 661,692 ---- sigmodes[EXIT_TRAP] |= SIG_INPROGRESS; + retval = trap_saved_exit_value; + running_trap = 1; + code = setjmp (top_level); ! /* If we're in a function, make sure return longjmps come here, too. */ ! if (return_catch_flag) ! function_code = setjmp (return_catch); ! ! if (code == 0 && function_code == 0) { reset_parser (); parse_and_execute (trap_command, "exit trap", SEVAL_NONINT|SEVAL_NOHIST); } + else if (code == ERREXIT) + retval = last_command_exit_value; else if (code == EXITPROG) ! retval = last_command_exit_value; ! else if (function_code != 0) ! retval = return_catch_value; else ! retval = trap_saved_exit_value; ! ! running_trap = 0; ! return retval; } ! return (trap_saved_exit_value); } *************** *** 648,653 **** /* Run a trap command for SIG. SIG is one of the signals the shell treats ! specially. */ ! static void _run_trap_internal (sig, tag) int sig; --- 699,704 ---- /* Run a trap command for SIG. SIG is one of the signals the shell treats ! specially. Returns the exit status of the executed trap command list. */ ! static int _run_trap_internal (sig, tag) int sig; *************** *** 655,660 **** { char *trap_command, *old_trap; ! int old_exit_value, *token_state; /* Run the trap only if SIG is trapped and not ignored, and we are not currently executing in the trap handler. */ --- 706,714 ---- { char *trap_command, *old_trap; ! int trap_exit_value, *token_state; ! int save_return_catch_flag, function_code; ! procenv_t save_return_catch; + trap_exit_value = function_code = 0; /* Run the trap only if SIG is trapped and not ignored, and we are not currently executing in the trap handler. */ *************** *** 669,683 **** running_trap = sig + 1; ! old_exit_value = last_command_exit_value; ! /* Need to copy the value of line_number because parse_and_execute ! resets it to 1, and the trap command might want it. */ ! trap_line_number = line_number; token_state = save_token_state (); ! parse_and_execute (trap_command, tag, SEVAL_NONINT|SEVAL_NOHIST); restore_token_state (token_state); free (token_state); ! last_command_exit_value = old_exit_value; running_trap = 0; --- 723,746 ---- running_trap = sig + 1; ! trap_saved_exit_value = last_command_exit_value; token_state = save_token_state (); ! ! /* If we're in a function, make sure return longjmps come here, too. */ ! save_return_catch_flag = return_catch_flag; ! if (return_catch_flag) ! { ! COPY_PROCENV (return_catch, save_return_catch); ! function_code = setjmp (return_catch); ! } ! ! if (function_code == 0) ! parse_and_execute (trap_command, tag, SEVAL_NONINT|SEVAL_NOHIST); ! restore_token_state (token_state); free (token_state); ! trap_exit_value = last_command_exit_value; ! last_command_exit_value = trap_saved_exit_value; running_trap = 0; *************** *** 686,700 **** if (sigmodes[sig] & SIG_CHANGED) { ! free (old_trap); sigmodes[sig] &= ~SIG_CHANGED; } } } ! void run_debug_trap () { ! if ((sigmodes[DEBUG_TRAP] & SIG_TRAPPED) && ((sigmodes[DEBUG_TRAP] & SIG_INPROGRESS) == 0)) ! _run_trap_internal (DEBUG_TRAP, "debug trap"); } --- 749,797 ---- if (sigmodes[sig] & SIG_CHANGED) { ! #if 0 ! /* Special traps like EXIT, DEBUG, RETURN are handled explicitly in ! the places where they can be changed using unwind-protects. For ! example, look at execute_cmd.c:execute_function(). */ ! if (SPECIAL_TRAP (sig) == 0) ! #endif ! free (old_trap); sigmodes[sig] &= ~SIG_CHANGED; } + + if (save_return_catch_flag) + { + return_catch_flag = save_return_catch_flag; + return_catch_value = trap_exit_value; + COPY_PROCENV (save_return_catch, return_catch); + if (function_code) + longjmp (return_catch, 1); + } } + + return trap_exit_value; } ! int run_debug_trap () { ! int trap_exit_value; ! ! /* XXX - question: should the DEBUG trap inherit the RETURN trap? */ ! trap_exit_value = 0; ! if ((sigmodes[DEBUG_TRAP] & SIG_TRAPPED) && ((sigmodes[DEBUG_TRAP] & SIG_IGNORED) == 0) && ((sigmodes[DEBUG_TRAP] & SIG_INPROGRESS) == 0)) ! { ! trap_exit_value = _run_trap_internal (DEBUG_TRAP, "debug trap"); ! ! #if defined (DEBUGGER) ! /* If we're in the debugger and the DEBUG trap returns 2 while we're in ! a function or sourced script, we force a `return'. */ ! if (debugging_mode && trap_exit_value == 2 && return_catch_flag) ! { ! return_catch_value = trap_exit_value; ! longjmp (return_catch, 1); ! } ! #endif ! } ! return trap_exit_value; } *************** *** 702,709 **** run_error_trap () { ! if ((sigmodes[ERROR_TRAP] & SIG_TRAPPED) && (sigmodes[ERROR_TRAP] & SIG_INPROGRESS) == 0) _run_trap_internal (ERROR_TRAP, "error trap"); } /* Run a trap set on SIGINT. This is called from throw_to_top_level (), and declared here to localize the trap functions. */ --- 799,819 ---- run_error_trap () { ! if ((sigmodes[ERROR_TRAP] & SIG_TRAPPED) && ((sigmodes[ERROR_TRAP] & SIG_IGNORED) == 0) && (sigmodes[ERROR_TRAP] & SIG_INPROGRESS) == 0) _run_trap_internal (ERROR_TRAP, "error trap"); } + void + run_return_trap () + { + int old_exit_value; + + if ((sigmodes[RETURN_TRAP] & SIG_TRAPPED) && ((sigmodes[RETURN_TRAP] & SIG_IGNORED) == 0) && (sigmodes[RETURN_TRAP] & SIG_INPROGRESS) == 0) + { + old_exit_value = last_command_exit_value; + _run_trap_internal (RETURN_TRAP, "return trap"); + last_command_exit_value = old_exit_value; + } + } + /* Run a trap set on SIGINT. This is called from throw_to_top_level (), and declared here to localize the trap functions. */ *************** *** 728,732 **** sigmodes[i] &= ~SIG_TRAPPED; } ! trap_list[DEBUG_TRAP] = trap_list[EXIT_TRAP] = trap_list[ERROR_TRAP] = (char *)NULL; } #endif --- 838,842 ---- sigmodes[i] &= ~SIG_TRAPPED; } ! trap_list[DEBUG_TRAP] = trap_list[EXIT_TRAP] = trap_list[ERROR_TRAP] = trap_list[RETURN_TRAP] = (char *)NULL; } #endif *************** *** 765,768 **** --- 875,879 ---- sigmodes[EXIT_TRAP] &= ~SIG_TRAPPED; } + for (i = 1; i < NSIG; i++) { *************** *** 779,785 **** /* Command substitution and other child processes don't inherit the ! debug or error traps. */ ! sigmodes[DEBUG_TRAP] &= ~SIG_TRAPPED; ! sigmodes[ERROR_TRAP] &= ~SIG_TRAPPED; } --- 890,909 ---- /* Command substitution and other child processes don't inherit the ! debug, error, or return traps. If we're in the debugger, and the ! `functrace' or `errtrace' options have been set, then let command ! substitutions inherit them. Let command substitution inherit the ! RETURN trap if we're in the debugger and tracing functions. */ ! #if defined (DEBUGGER) ! if (debugging_mode == 0 || function_trace_mode == 0) ! #endif ! sigmodes[DEBUG_TRAP] &= ~SIG_TRAPPED; ! #if defined (DEBUGGER) ! if (debugging_mode == 0 || error_trace_mode == 0) ! #endif ! sigmodes[ERROR_TRAP] &= ~SIG_TRAPPED; ! #if defined (DEBUGGER) ! if (debugging_mode == 0 || function_trace_mode == 0) ! sigmodes[RETURN_TRAP] &= ~SIG_TRAPPED; ! #endif } diff -aNrc2 bash-2.05b-patched/trap.h bash-3.0/trap.h *** bash-2.05b-patched/trap.h Wed May 23 12:35:06 2001 --- bash-3.0/trap.h Fri May 30 15:28:00 2003 *************** *** 34,49 **** #define NO_SIG -1 ! #define DEFAULT_SIG SIG_DFL ! #define IGNORE_SIG SIG_IGN /* Special shell trap names. */ ! #define DEBUG_TRAP NSIG ! #define ERROR_TRAP NSIG+1 ! #define EXIT_TRAP 0 /* system signals plus special bash traps */ ! #define BASH_NSIG NSIG+2 ! #define signal_object_p(x) (decode_signal (x) != NO_SIG) #define TRAP_STRING(s) \ --- 34,54 ---- #define NO_SIG -1 ! #define DEFAULT_SIG SIG_DFL ! #define IGNORE_SIG SIG_IGN /* Special shell trap names. */ ! #define DEBUG_TRAP NSIG ! #define ERROR_TRAP NSIG+1 ! #define RETURN_TRAP NSIG+2 ! #define EXIT_TRAP 0 /* system signals plus special bash traps */ ! #define BASH_NSIG NSIG+3 ! /* Flags values for decode_signal() */ ! #define DSIG_SIGPREFIX 0x01 /* don't alllow `SIG' PREFIX */ ! #define DSIG_NOCASE 0x02 /* case-insensitive comparison */ ! ! #define signal_object_p(x,f) (decode_signal (x,f) != NO_SIG) #define TRAP_STRING(s) \ *************** *** 55,71 **** /* Externally-visible functions declared in trap.c. */ extern void initialize_traps __P((void)); extern void run_pending_traps __P((void)); extern void maybe_set_sigchld_trap __P((char *)); extern void set_sigchld_trap __P((char *)); extern void set_debug_trap __P((char *)); extern void set_error_trap __P((char *)); extern void set_sigint_trap __P((char *)); extern void set_signal __P((int, char *)); extern void restore_default_signal __P((int)); extern void ignore_signal __P((int)); extern int run_exit_trap __P((void)); extern void run_trap_cleanup __P((int)); ! extern void run_debug_trap __P((void)); extern void run_error_trap __P((void)); extern void free_trap_strings __P((void)); extern void reset_signal_handlers __P((void)); --- 60,84 ---- /* Externally-visible functions declared in trap.c. */ extern void initialize_traps __P((void)); + extern void run_pending_traps __P((void)); + extern void maybe_set_sigchld_trap __P((char *)); extern void set_sigchld_trap __P((char *)); + extern void set_debug_trap __P((char *)); extern void set_error_trap __P((char *)); + extern void set_return_trap __P((char *)); + extern void set_sigint_trap __P((char *)); extern void set_signal __P((int, char *)); + extern void restore_default_signal __P((int)); extern void ignore_signal __P((int)); extern int run_exit_trap __P((void)); extern void run_trap_cleanup __P((int)); ! extern int run_debug_trap __P((void)); extern void run_error_trap __P((void)); + extern void run_return_trap __P((void)); + extern void free_trap_strings __P((void)); extern void reset_signal_handlers __P((void)); *************** *** 74,78 **** extern char *signal_name __P((int)); ! extern int decode_signal __P((char *)); extern void run_interrupt_trap __P((void)); extern int maybe_call_trap_handler __P((int)); --- 87,91 ---- extern char *signal_name __P((int)); ! extern int decode_signal __P((char *, int)); extern void run_interrupt_trap __P((void)); extern int maybe_call_trap_handler __P((int)); diff -aNrc2 bash-2.05b-patched/variables.c bash-3.0/variables.c *** bash-2.05b-patched/variables.c Tue Jun 25 09:43:33 2002 --- bash-3.0/variables.c Sun Jul 4 13:57:26 2004 *************** *** 1,5 **** /* variables.c -- Functions for hacking shell variables. */ ! /* Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. --- 1,5 ---- /* variables.c -- Functions for hacking shell variables. */ ! /* Copyright (C) 1987-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. *************** *** 37,40 **** --- 37,41 ---- #include #include "bashansi.h" + #include "bashintl.h" #include "shell.h" *************** *** 73,78 **** extern int posixly_correct; extern int line_number; ! extern int subshell_environment, indirection_level; extern int build_version, patch_level; extern char *dist_version, *release_status; extern char *shell_name; --- 74,80 ---- extern int posixly_correct; extern int line_number; ! extern int subshell_environment, indirection_level, subshell_level; extern int build_version, patch_level; + extern int expanding_redir; extern char *dist_version, *release_status; extern char *shell_name; *************** *** 81,87 **** --- 83,95 ---- extern sh_builtin_func_t *this_shell_builtin; extern SHELL_VAR *this_shell_function; + extern char *the_printed_command_except_trap; extern char *this_command_name; + extern char *command_execution_string; extern time_t shell_start_time; + #if defined (READLINE) + extern int perform_hostname_completion; + #endif + /* The list of shell variables that the user has created at the global scope, or that came from the environment. */ *************** *** 95,98 **** --- 103,112 ---- HASH_TABLE *shell_functions = (HASH_TABLE *)NULL; + #if defined (DEBUGGER) + /* The table of shell function definitions that the user defined or that + came from the environment. */ + HASH_TABLE *shell_function_defs = (HASH_TABLE *)NULL; + #endif + /* The current variable context. This is really a count of how deep into executing functions we are. */ *************** *** 103,106 **** --- 117,124 ---- HASH_TABLE *temporary_env = (HASH_TABLE *)NULL; + /* Set to non-zero if an assignment error occurs while putting variables + into the temporary environment. */ + int tempenv_assign_error; + /* Some funky variables which are known about specially. Here is where "$*", "$1", and all the cruft is kept. */ *************** *** 140,143 **** --- 158,166 ---- static SHELL_VAR *null_array_assign __P((SHELL_VAR *, char *, arrayind_t)); #endif + static SHELL_VAR *get_self __P((SHELL_VAR *)); + + #if defined (ARRAY_VARS) + static SHELL_VAR *init_dynamic_array_var __P((char *, sh_var_value_func_t *, sh_var_assign_func_t *, int)); + #endif static SHELL_VAR *assign_seconds __P((SHELL_VAR *, char *, arrayind_t)); *************** *** 153,156 **** --- 176,182 ---- static SHELL_VAR *get_lineno __P((SHELL_VAR *)); + static SHELL_VAR *assign_subshell __P((SHELL_VAR *, char *, arrayind_t)); + static SHELL_VAR *get_subshell __P((SHELL_VAR *)); + #if defined (HISTORY) static SHELL_VAR *get_histcmd __P((SHELL_VAR *)); *************** *** 160,169 **** static SHELL_VAR *assign_dirstack __P((SHELL_VAR *, char *, arrayind_t)); static SHELL_VAR *get_dirstack __P((SHELL_VAR *)); - static SHELL_VAR *init_dirstack_var __P((void)); #endif #if defined (ARRAY_VARS) static SHELL_VAR *get_groupset __P((SHELL_VAR *)); - static SHELL_VAR *init_groups_var __P((void)); #endif --- 186,193 ---- *************** *** 240,243 **** --- 264,272 ---- shell_functions = hash_create (0); + #if defined (DEBUGGER) + if (shell_function_defs == 0) + shell_function_defs = hash_create (0); + #endif + for (string_index = 0; string = env[string_index++]; ) { *************** *** 283,287 **** } else ! report_error ("error importing function definition for `%s'", name); /* ( */ --- 312,316 ---- } else ! report_error (_("error importing function definition for `%s'"), name); /* ( */ *************** *** 409,412 **** --- 438,444 ---- #endif + if (command_execution_string) + bind_variable ("BASH_EXECUTION_STRING", command_execution_string); + /* Find out if we're supposed to be in Posix.2 mode via an environment variable. */ *************** *** 640,644 **** else if (shell_level > 1000) { ! internal_warning ("shell level (%d) too high, resetting to 1", shell_level); shell_level = 1; } --- 672,676 ---- else if (shell_level > 1000) { ! internal_warning (_("shell level (%d) too high, resetting to 1"), shell_level); shell_level = 1; } *************** *** 987,990 **** --- 1019,1054 ---- #endif + /* Degenerate `dynamic_value' function; just returns what's passed without + manipulation. */ + static SHELL_VAR * + get_self (self) + SHELL_VAR *self; + { + return (self); + } + + #if defined (ARRAY_VARS) + /* A generic dynamic array variable initializer. Intialize array variable + NAME with dynamic value function GETFUNC and assignment function SETFUNC. */ + static SHELL_VAR * + init_dynamic_array_var (name, getfunc, setfunc, attrs) + char *name; + sh_var_value_func_t *getfunc; + sh_var_assign_func_t *setfunc; + int attrs; + { + SHELL_VAR *v; + + v = find_variable (name); + if (v) + return (v); + INIT_DYNAMIC_ARRAY_VAR (name, getfunc, setfunc); + if (attrs) + VSETATTR (v, attrs); + return v; + } + #endif + + /* The value of $SECONDS. This is the number of seconds since shell invocation, or, the number of seconds since the last assignment + the *************** *** 1133,1136 **** --- 1197,1238 ---- } + static SHELL_VAR * + assign_subshell (var, value, unused) + SHELL_VAR *var; + char *value; + arrayind_t unused; + { + intmax_t new_value; + + if (value == 0 || *value == '\0' || legal_number (value, &new_value) == 0) + new_value = 0; + subshell_level = new_value; + return var; + } + + static SHELL_VAR * + get_subshell (var) + SHELL_VAR *var; + { + char *p; + + p = itos (subshell_level); + FREE (value_cell (var)); + var_setvalue (var, p); + return (var); + } + + static SHELL_VAR * + get_bash_command (var) + SHELL_VAR *var; + { + char *p; + + p = savestring (the_printed_command_except_trap); + FREE (value_cell (var)); + var_setvalue (var, p); + return (var); + } + #if defined (HISTORY) static SHELL_VAR * *************** *** 1147,1152 **** #endif #if defined (PUSHD_AND_POPD) && defined (ARRAY_VARS) ! static SHELL_VAR * assign_dirstack (self, value, ind) SHELL_VAR *self; --- 1249,1295 ---- #endif + #if defined (READLINE) + /* When this function returns, VAR->value points to malloced memory. */ + static SHELL_VAR * + get_comp_wordbreaks (var) + SHELL_VAR *var; + { + char *p; + + /* If we don't have anything yet, assign a default value. */ + if (rl_completer_word_break_characters == 0 && bash_readline_initialized == 0) + enable_hostname_completion (perform_hostname_completion); + + #if 0 + FREE (value_cell (var)); + p = savestring (rl_completer_word_break_characters); + + var_setvalue (var, p); + #else + var_setvalue (var, rl_completer_word_break_characters); + #endif + + return (var); + } + + /* When this function returns, rl_completer_word_break_characters points to + malloced memory. */ + static SHELL_VAR * + assign_comp_wordbreaks (self, value, unused) + SHELL_VAR *self; + char *value; + arrayind_t unused; + { + if (rl_completer_word_break_characters && + rl_completer_word_break_characters != rl_basic_word_break_characters) + free (rl_completer_word_break_characters); + + rl_completer_word_break_characters = savestring (value); + return self; + } + #endif /* READLINE */ + #if defined (PUSHD_AND_POPD) && defined (ARRAY_VARS) ! static SHELL_VAR * assign_dirstack (self, value, ind) SHELL_VAR *self; *************** *** 1172,1187 **** return self; } - - static SHELL_VAR * - init_dirstack_var () - { - SHELL_VAR *v; - - v = find_variable ("DIRSTACK"); - if (v) - return v; - INIT_DYNAMIC_ARRAY_VAR ("DIRSTACK", get_dirstack, assign_dirstack); - return v; - } #endif /* PUSHD AND POPD && ARRAY_VARS */ --- 1315,1318 ---- *************** *** 1207,1229 **** return (self); } - - static SHELL_VAR * - init_groups_var () - { - SHELL_VAR *v; - - v = find_variable ("GROUPS"); - if (v) - return (v); - INIT_DYNAMIC_ARRAY_VAR ("GROUPS", get_groupset, null_array_assign); - VSETATTR (v, att_noassign); - return v; - } #endif /* ARRAY_VARS */ static SHELL_VAR * get_funcname (self) SHELL_VAR *self; { char *t; if (variable_context && this_shell_function) --- 1338,1350 ---- return (self); } #endif /* ARRAY_VARS */ + /* If ARRAY_VARS is not defined, this just returns the name of any + currently-executing function. If we have arrays, it's a call stack. */ static SHELL_VAR * get_funcname (self) SHELL_VAR *self; { + #if ! defined (ARRAY_VARS) char *t; if (variable_context && this_shell_function) *************** *** 1233,1236 **** --- 1354,1358 ---- var_setvalue (self, t); } + #endif return (self); } *************** *** 1260,1264 **** --- 1382,1390 ---- if (v) return v; + #if defined (ARRAY_VARS) + INIT_DYNAMIC_ARRAY_VAR ("FUNCNAME", get_funcname, null_array_assign); + #else INIT_DYNAMIC_VAR ("FUNCNAME", (char *)NULL, get_funcname, null_assign); + #endif VSETATTR (v, att_invisible|att_noassign); return v; *************** *** 1272,1275 **** --- 1398,1404 ---- v = init_seconds_var (); + INIT_DYNAMIC_VAR ("BASH_COMMAND", (char *)NULL, get_bash_command, (sh_var_assign_func_t *)NULL); + INIT_DYNAMIC_VAR ("BASH_SUBSHELL", (char *)NULL, get_subshell, assign_subshell); + INIT_DYNAMIC_VAR ("RANDOM", (char *)NULL, get_random, assign_random); INIT_DYNAMIC_VAR ("LINENO", (char *)NULL, get_lineno, assign_lineno); *************** *** 1279,1288 **** #endif #if defined (PUSHD_AND_POPD) && defined (ARRAY_VARS) ! v = init_dirstack_var (); #endif /* PUSHD_AND_POPD && ARRAY_VARS */ #if defined (ARRAY_VARS) ! v = init_groups_var (); #endif --- 1408,1428 ---- #endif + #if defined (READLINE) + INIT_DYNAMIC_VAR ("COMP_WORDBREAKS", (char *)NULL, get_comp_wordbreaks, assign_comp_wordbreaks); + #endif + #if defined (PUSHD_AND_POPD) && defined (ARRAY_VARS) ! v = init_dynamic_array_var ("DIRSTACK", get_dirstack, assign_dirstack, 0); #endif /* PUSHD_AND_POPD && ARRAY_VARS */ #if defined (ARRAY_VARS) ! v = init_dynamic_array_var ("GROUPS", get_groupset, null_array_assign, att_noassign); ! ! # if defined (DEBUGGER) ! v = init_dynamic_array_var ("BASH_ARGC", get_self, null_array_assign, (att_invisible|att_noassign)); ! v = init_dynamic_array_var ("BASH_ARGV", get_self, null_array_assign, (att_invisible|att_noassign)); ! # endif /* DEBUGGER */ ! v = init_dynamic_array_var ("BASH_SOURCE", get_self, null_array_assign, (att_invisible|att_noassign)); ! v = init_dynamic_array_var ("BASH_LINENO", get_self, null_array_assign, (att_invisible|att_noassign)); #endif *************** *** 1335,1343 **** SHELL_VAR * ! find_variable_internal (name, search_tempenv) const char *name; ! int search_tempenv; { SHELL_VAR *var; var = (SHELL_VAR *)NULL; --- 1475,1484 ---- SHELL_VAR * ! find_variable_internal (name, force_tempenv) const char *name; ! int force_tempenv; { SHELL_VAR *var; + int search_tempenv; var = (SHELL_VAR *)NULL; *************** *** 1348,1352 **** a function or builtin, or if we are looking up a variable in a "subshell environment". */ ! if ((search_tempenv || subshell_environment) && temporary_env) var = hash_lookup (name, temporary_env); --- 1489,1495 ---- a function or builtin, or if we are looking up a variable in a "subshell environment". */ ! search_tempenv = force_tempenv || (expanding_redir == 0 && subshell_environment); ! ! if (search_tempenv && temporary_env) var = hash_lookup (name, temporary_env); *************** *** 1365,1369 **** const char *name; { ! return (find_variable_internal (name, this_shell_builtin != 0)); } --- 1508,1512 ---- const char *name; { ! return (find_variable_internal (name, (expanding_redir == 0 && this_shell_builtin != 0))); } *************** *** 1377,1380 **** --- 1520,1532 ---- } + /* Find the function definition for the shell function named NAME. Returns + the entry or NULL. */ + FUNCTION_DEF * + find_function_def (name) + const char *name; + { + return ((FUNCTION_DEF *)hash_lookup (name, shell_function_defs)); + } + /* Return the value of VAR. VAR is assumed to have been the result of a lookup without any subscript, if arrays are compiled into the shell. */ *************** *** 1460,1464 **** if (vc == 0) { ! internal_error ("make_local_variable: no function context at current scope found"); return ((SHELL_VAR *)NULL); } --- 1612,1616 ---- if (vc == 0) { ! internal_error (_("make_local_variable: no function context at current scope")); return ((SHELL_VAR *)NULL); } *************** *** 1516,1521 **** var = make_local_variable (name); ! if (var == 0) return var; array = array_create (); --- 1668,1674 ---- var = make_local_variable (name); ! if (var == 0 || array_p (var)) return var; + array = array_create (); *************** *** 1789,1793 **** --- 1942,1950 ---- isint = isarr = 0; #if defined (ARRAY_VARS) + # if 0 if (t = xstrchr (lhs, '[')) /*]*/ + # else + if (valid_array_reference (lhs)) + # endif { isarr = 1; *************** *** 1874,1877 **** --- 2031,2063 ---- } + /* Bind a function definition, which includes source file and line number + information in addition to the command, into the FUNCTION_DEF hash table.*/ + void + bind_function_def (name, value) + const char *name; + FUNCTION_DEF *value; + { + FUNCTION_DEF *entry; + BUCKET_CONTENTS *elt; + COMMAND *cmd; + + entry = find_function_def (name); + if (entry) + { + dispose_function_def_contents (entry); + entry = copy_function_def_contents (value, entry); + } + else + { + cmd = value->command; + value->command = 0; + entry = copy_function_def (value); + value->command = cmd; + + elt = hash_insert (savestring (name), shell_function_defs, HASH_NOSRCH); + elt->data = (PTR_T *)entry; + } + } + /* Add STRING, which is of the form foo=bar, to the temporary environment HASH_TABLE (temporary_env). The functions in execute_cmd.c are *************** *** 1886,1890 **** SHELL_VAR *var; ! offset = assignment (string); name = savestring (string); value = (char *)NULL; --- 2072,2076 ---- SHELL_VAR *var; ! offset = assignment (string, 0); name = savestring (string); value = (char *)NULL; *************** *** 1938,1948 **** if (echo_command_at_execute) ! { ! /* The Korn shell prints the `+ ' in front of assignment statements, ! so we do too. */ ! fprintf (stderr, "%s%s=%s\n", indirection_level_string (), name, value); ! fflush (stderr); ! } return 1; } --- 2124,2132 ---- if (echo_command_at_execute) ! /* The Korn shell prints the `+ ' in front of assignment statements, ! so we do too. */ ! xtrace_print_assignment (name, value, 0, 1); + free (name); return 1; } *************** *** 2063,2066 **** --- 2247,2272 ---- } + int + unbind_function_def (name) + const char *name; + { + BUCKET_CONTENTS *elt; + FUNCTION_DEF *funcdef; + + elt = hash_remove (name, shell_function_defs, 0); + + if (elt == 0) + return -1; + + funcdef = (FUNCTION_DEF *)elt->data; + if (funcdef) + dispose_function_def (funcdef); + + free (elt->key); + free (elt); + + return 0; + } + /* Make the variable associated with NAME go away. HASH_LIST is the hash table from which this variable should be deleted (either *************** *** 2097,2100 **** --- 2303,2311 ---- if (old_var && local_p (old_var) && variable_context == old_var->context) { + /* Reset the attributes. Preserve the export attribute if the variable + came from a temporary environment. Make sure it stays local, and + make it invisible. */ + old_var->attributes = (exported_p (old_var) && tempvar_p (old_var)) ? att_exported : 0; + VSETATTR (old_var, att_local); VSETATTR (old_var, att_invisible); FREE (value_cell (old_var)); *************** *** 2503,2507 **** if (vc == 0) { ! internal_error ("all_local_variables: no function context at current scope found"); return (SHELL_VAR **)NULL; } --- 2714,2718 ---- if (vc == 0) { ! internal_error (_("all_local_variables: no function context at current scope")); return (SHELL_VAR **)NULL; } *************** *** 2717,2721 **** if (legal_variable_starter ((unsigned char)*s) == 0) { ! internal_error ("invalid character %d in exportstr for %s", *s, v->name); return (0); } --- 2928,2932 ---- if (legal_variable_starter ((unsigned char)*s) == 0) { ! internal_error (_("invalid character %d in exportstr for %s"), *s, v->name); return (0); } *************** *** 2726,2730 **** if (legal_variable_char ((unsigned char)*s) == 0) { ! internal_error ("invalid character %d in exportstr for %s", *s, v->name); return (0); } --- 2937,2941 ---- if (legal_variable_char ((unsigned char)*s) == 0) { ! internal_error (_("invalid character %d in exportstr for %s"), *s, v->name); return (0); } *************** *** 2732,2736 **** if (*s != '=') { ! internal_error ("no `=' in exportstr for %s", v->name); return (0); } --- 2943,2947 ---- if (*s != '=') { ! internal_error (_("no `=' in exportstr for %s"), v->name); return (0); } *************** *** 2858,2862 **** int equal_offset; ! equal_offset = assignment (assign); if (equal_offset == 0) return (export_env); --- 3069,3073 ---- int equal_offset; ! equal_offset = assignment (assign, 0); if (equal_offset == 0) return (export_env); *************** *** 3157,3161 **** if (vc_isfuncenv (vcxt) == 0) { ! internal_error ("pop_var_context: head of shell_variables not a function context"); return; } --- 3368,3372 ---- if (vc_isfuncenv (vcxt) == 0) { ! internal_error (_("pop_var_context: head of shell_variables not a function context")); return; } *************** *** 3170,3174 **** } else ! internal_error ("pop_var_context: no global_variables context"); } --- 3381,3385 ---- } else ! internal_error (_("pop_var_context: no global_variables context")); } *************** *** 3236,3240 **** if (vc_istempscope (vcxt) == 0) { ! internal_error ("pop_scope: head of shell_variables not a temporary environment scope"); return; } --- 3447,3451 ---- if (vc_istempscope (vcxt) == 0) { ! internal_error (_("pop_scope: head of shell_variables not a temporary environment scope")); return; } *************** *** 3335,3338 **** --- 3546,3599 ---- } + /* Manipulate the special BASH_ARGV and BASH_ARGC variables. */ + + void + push_args (list) + WORD_LIST *list; + { + #if defined (ARRAY_VARS) && defined (DEBUGGER) + SHELL_VAR *bash_argv_v, *bash_argc_v; + ARRAY *bash_argv_a, *bash_argc_a; + WORD_LIST *l; + arrayind_t i; + char *t; + + GET_ARRAY_FROM_VAR ("BASH_ARGV", bash_argv_v, bash_argv_a); + GET_ARRAY_FROM_VAR ("BASH_ARGC", bash_argc_v, bash_argc_a); + + for (l = list, i = 0; l; l = l->next, i++) + array_push (bash_argv_a, l->word->word); + + t = itos (i); + array_push (bash_argc_a, t); + free (t); + #endif /* ARRAY_VARS && DEBUGGER */ + } + + /* Remove arguments from BASH_ARGV array. Pop top element off BASH_ARGC + array and use that value as the count of elements to remove from + BASH_ARGV. */ + void + pop_args () + { + #if defined (ARRAY_VARS) && defined (DEBUGGER) + SHELL_VAR *bash_argv_v, *bash_argc_v; + ARRAY *bash_argv_a, *bash_argc_a; + ARRAY_ELEMENT *ce; + intmax_t i; + + GET_ARRAY_FROM_VAR ("BASH_ARGV", bash_argv_v, bash_argv_a); + GET_ARRAY_FROM_VAR ("BASH_ARGC", bash_argc_v, bash_argc_a); + + ce = array_shift (bash_argc_a, 1, 0); + if (ce == 0 || legal_number (element_value (ce), &i) == 0) + i = 0; + + for ( ; i > 0; i--) + array_pop (bash_argv_a); + array_dispose_element (ce); + #endif /* ARRAY_VARS && DEBUGGER */ + } + /************************************************* * * *************** *** 3370,3373 **** --- 3631,3635 ---- { "HISTIGNORE", sv_histignore }, { "HISTSIZE", sv_histsize }, + { "HISTTIMEFORMAT", sv_histtimefmt }, #endif *************** *** 3599,3614 **** { char *temp; history_control = 0; temp = get_string_value (name); ! if (temp && *temp && STREQN (temp, "ignore", 6)) { ! if (temp[6] == 's') /* ignorespace */ ! history_control = 1; ! else if (temp[6] == 'd') /* ignoredups */ ! history_control = 2; ! else if (temp[6] == 'b') /* ignoreboth */ ! history_control = 3; } } --- 3861,3886 ---- { char *temp; + char *val; + int tptr; history_control = 0; temp = get_string_value (name); ! if (temp == 0 || *temp == 0) ! return; ! ! tptr = 0; ! while (val = extract_colon_unit (temp, &tptr)) { ! if (STREQ (val, "ignorespace")) ! history_control |= HC_IGNSPACE; ! else if (STREQ (val, "ignoredups")) ! history_control |= HC_IGNDUPS; ! else if (STREQ (val, "ignoreboth")) ! history_control |= HC_IGNBOTH; ! else if (STREQ (val, "erasedups")) ! history_control |= HC_ERASEDUPS; ! ! free (val); } } *************** *** 3641,3644 **** --- 3913,3926 ---- } #endif /* BANG_HISTORY */ + + void + sv_histtimefmt (name) + char *name; + { + SHELL_VAR *v; + + v = find_variable (name); + history_write_timestamps = (v != 0); + } #endif /* HISTORY */ diff -aNrc2 bash-2.05b-patched/variables.h bash-3.0/variables.h *** bash-2.05b-patched/variables.h Tue Mar 12 10:17:33 2002 --- bash-3.0/variables.h Thu Jul 31 10:26:47 2003 *************** *** 72,76 **** HASH_TABLE *h; /* associative array */ double d; /* floating point number */ ! void *v; /* opaque data for future use */ }; --- 72,80 ---- HASH_TABLE *h; /* associative array */ double d; /* floating point number */ ! #if defined (HAVE_LONG_DOUBLE) ! long double ld; /* long double */ ! #endif ! struct variable *v; /* possible indirect variable use */ ! void *opaque; /* opaque data for future use */ }; *************** *** 215,218 **** --- 219,223 ---- extern SHELL_VAR *find_function __P((const char *)); + extern FUNCTION_DEF *find_function_def __P((const char *)); extern SHELL_VAR *find_variable __P((const char *)); extern SHELL_VAR *find_variable_internal __P((const char *, int)); *************** *** 223,226 **** --- 228,233 ---- extern SHELL_VAR *bind_function __P((const char *, COMMAND *)); + extern void bind_function_def __P((const char *, FUNCTION_DEF *)); + extern SHELL_VAR **map_over __P((sh_var_map_func_t *, VAR_CONTEXT *)); SHELL_VAR **map_over_funcs __P((sh_var_map_func_t *)); *************** *** 253,256 **** --- 260,264 ---- extern int unbind_variable __P((const char *)); extern int unbind_func __P((const char *)); + extern int unbind_function_def __P((const char *)); extern int makunbound __P((const char *, VAR_CONTEXT *)); extern int kill_local_variable __P((const char *)); *************** *** 271,274 **** --- 279,285 ---- extern void dispose_saved_dollar_vars __P((void)); + extern void push_args __P((WORD_LIST *)); + extern void pop_args __P((void)); + extern void adjust_shell_level __P((int)); extern void non_unsettable __P((char *)); *************** *** 327,330 **** --- 338,342 ---- #if defined (READLINE) + extern void sv_comp_wordbreaks __P((char *)); extern void sv_terminal __P((char *)); extern void sv_hostfile __P((char *)); *************** *** 342,345 **** --- 354,358 ---- extern void sv_histchars __P((char *)); # endif + extern void sv_histtimefmt __P((char *)); #endif /* HISTORY */ diff -aNrc2 bash-2.05b-patched/version.c bash-3.0/version.c *** bash-2.05b-patched/version.c Wed Apr 3 08:49:19 2002 --- bash-3.0/version.c Fri Dec 19 16:34:02 2003 *************** *** 29,32 **** --- 29,34 ---- #include "conftypes.h" + #include "bashintl.h" + extern char *shell_name; *************** *** 44,47 **** --- 46,53 ---- /* Functions for getting, setting, and displaying the shell version. */ + /* Forward declarations so we don't have to include externs.h */ + extern char *shell_version_string __P((void)); + extern void show_shell_version __P((int)); + /* Give version information about this shell. */ char * *************** *** 53,59 **** --- 59,73 ---- { if (release_status) + #if defined (HAVE_SNPRINTF) + snprintf (tt, sizeof (tt), "%s.%d(%d)-%s", dist_version, patch_level, build_version, release_status); + #else sprintf (tt, "%s.%d(%d)-%s", dist_version, patch_level, build_version, release_status); + #endif else + #if defined (HAVE_SNPRINTF) + snprintf (tt, sizeof (tt), "%s.%d(%d)", dist_version, patch_level, build_version); + #else sprintf (tt, "%s.%d(%d)", dist_version, patch_level, build_version); + #endif } return tt; *************** *** 66,69 **** printf ("GNU bash, version %s (%s)\n", shell_version_string (), MACHTYPE); if (extended) ! printf ("Copyright (C) 2002 Free Software Foundation, Inc.\n"); } --- 80,83 ---- printf ("GNU bash, version %s (%s)\n", shell_version_string (), MACHTYPE); if (extended) ! printf (_("Copyright (C) 2004 Free Software Foundation, Inc.\n")); } diff -aNrc2 bash-2.05b-patched/xmalloc.c bash-3.0/xmalloc.c *** bash-2.05b-patched/xmalloc.c Mon Mar 25 09:10:09 2002 --- bash-3.0/xmalloc.c Fri Dec 19 16:36:27 2003 *************** *** 39,42 **** --- 39,44 ---- #include "error.h" + #include "bashintl.h" + #if !defined (PTR_T) # if defined (__STDC__) *************** *** 89,95 **** #if defined (HAVE_SBRK) allocated = findbrk (); ! fatal_error ("xmalloc: cannot allocate %lu bytes (%lu bytes allocated)", (unsigned long)bytes, (unsigned long)allocated); #else ! fatal_error ("xmalloc: cannot allocate %lu bytes", (unsigned long)bytes); #endif /* !HAVE_SBRK */ } --- 91,97 ---- #if defined (HAVE_SBRK) allocated = findbrk (); ! fatal_error (_("xmalloc: cannot allocate %lu bytes (%lu bytes allocated)"), (unsigned long)bytes, (unsigned long)allocated); #else ! fatal_error (_("xmalloc: cannot allocate %lu bytes"), (unsigned long)bytes); #endif /* !HAVE_SBRK */ } *************** *** 111,117 **** #if defined (HAVE_SBRK) allocated = findbrk (); ! fatal_error ("xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)", (unsigned long)bytes, (unsigned long)allocated); #else ! fatal_error ("xrealloc: cannot allocate %lu bytes", (unsigned long)bytes); #endif /* !HAVE_SBRK */ } --- 113,119 ---- #if defined (HAVE_SBRK) allocated = findbrk (); ! fatal_error (_("xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)"), (unsigned long)bytes, (unsigned long)allocated); #else ! fatal_error (_("xrealloc: cannot allocate %lu bytes"), (unsigned long)bytes); #endif /* !HAVE_SBRK */ } *************** *** 147,153 **** #if defined (HAVE_SBRK) allocated = findbrk (); ! fatal_error ("xmalloc: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)", file, line, (unsigned long)bytes, (unsigned long)allocated); #else ! fatal_error ("xmalloc: %s:%d: cannot allocate %lu bytes", file, line, (unsigned long)bytes); #endif /* !HAVE_SBRK */ } --- 149,155 ---- #if defined (HAVE_SBRK) allocated = findbrk (); ! fatal_error (_("xmalloc: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"), file, line, (unsigned long)bytes, (unsigned long)allocated); #else ! fatal_error (_("xmalloc: %s:%d: cannot allocate %lu bytes"), file, line, (unsigned long)bytes); #endif /* !HAVE_SBRK */ } *************** *** 171,177 **** #if defined (HAVE_SBRK) allocated = findbrk (); ! fatal_error ("xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)", file, line, (unsigned long)bytes, (unsigned long)allocated); #else ! fatal_error ("xrealloc: %s:%d: cannot allocate %lu bytes", file, line, (unsigned long)bytes); #endif /* !HAVE_SBRK */ } --- 173,179 ---- #if defined (HAVE_SBRK) allocated = findbrk (); ! fatal_error (_("xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)"), file, line, (unsigned long)bytes, (unsigned long)allocated); #else ! fatal_error (_("xrealloc: %s:%d: cannot allocate %lu bytes"), file, line, (unsigned long)bytes); #endif /* !HAVE_SBRK */ } diff -aNrc2 bash-2.05b-patched/y.tab.c bash-3.0/y.tab.c *** bash-2.05b-patched/y.tab.c Tue May 21 11:57:35 2002 --- bash-3.0/y.tab.c Wed May 5 14:32:28 2004 *************** *** 1,49 **** ! /* A Bison parser, made from /usr/homes/chet/src/bash/src/parse.y ! by GNU bison 1.34. */ #define YYBISON 1 /* Identify Bison output. */ ! # define IF 257 ! # define THEN 258 ! # define ELSE 259 ! # define ELIF 260 ! # define FI 261 ! # define CASE 262 ! # define ESAC 263 ! # define FOR 264 ! # define SELECT 265 ! # define WHILE 266 ! # define UNTIL 267 ! # define DO 268 ! # define DONE 269 ! # define FUNCTION 270 ! # define COND_START 271 ! # define COND_END 272 ! # define COND_ERROR 273 ! # define IN 274 ! # define BANG 275 ! # define TIME 276 ! # define TIMEOPT 277 ! # define WORD 278 ! # define ASSIGNMENT_WORD 279 ! # define NUMBER 280 ! # define ARITH_CMD 281 ! # define ARITH_FOR_EXPRS 282 ! # define COND_CMD 283 ! # define AND_AND 284 ! # define OR_OR 285 ! # define GREATER_GREATER 286 ! # define LESS_LESS 287 ! # define LESS_AND 288 ! # define LESS_LESS_LESS 289 ! # define GREATER_AND 290 ! # define SEMI_SEMI 291 ! # define LESS_LESS_MINUS 292 ! # define AND_GREATER 293 ! # define LESS_GREATER 294 ! # define GREATER_BAR 295 ! # define yacc_EOF 296 ! #line 21 "/usr/homes/chet/src/bash/src/parse.y" #include "config.h" --- 1,50 ---- ! ! /* A Bison parser, made from /Users/chet/src/bash/src/parse.y ! by GNU Bison version 1.28 */ #define YYBISON 1 /* Identify Bison output. */ ! #define IF 257 ! #define THEN 258 ! #define ELSE 259 ! #define ELIF 260 ! #define FI 261 ! #define CASE 262 ! #define ESAC 263 ! #define FOR 264 ! #define SELECT 265 ! #define WHILE 266 ! #define UNTIL 267 ! #define DO 268 ! #define DONE 269 ! #define FUNCTION 270 ! #define COND_START 271 ! #define COND_END 272 ! #define COND_ERROR 273 ! #define IN 274 ! #define BANG 275 ! #define TIME 276 ! #define TIMEOPT 277 ! #define WORD 278 ! #define ASSIGNMENT_WORD 279 ! #define NUMBER 280 ! #define ARITH_CMD 281 ! #define ARITH_FOR_EXPRS 282 ! #define COND_CMD 283 ! #define AND_AND 284 ! #define OR_OR 285 ! #define GREATER_GREATER 286 ! #define LESS_LESS 287 ! #define LESS_AND 288 ! #define LESS_LESS_LESS 289 ! #define GREATER_AND 290 ! #define SEMI_SEMI 291 ! #define LESS_LESS_MINUS 292 ! #define AND_GREATER 293 ! #define LESS_GREATER 294 ! #define GREATER_BAR 295 ! #define yacc_EOF 296 ! #line 21 "/Users/chet/src/bash/src/parse.y" #include "config.h" *************** *** 68,71 **** --- 69,74 ---- #include "memalloc.h" + #include "bashintl.h" + #define NEED_STRFTIME_DECL /* used in externs.h */ *************** *** 97,100 **** --- 100,105 ---- #if defined (ALIAS) # include "alias.h" + #else + typedef void *alias_t; #endif /* ALIAS */ *************** *** 199,203 **** #if defined (DPAREN_ARITHMETIC) || defined (ARITH_FOR_COMMAND) static int parse_dparen __P((int)); ! static int parse_arith_cmd __P((char **)); #endif #if defined (COND_COMMAND) --- 204,208 ---- #if defined (DPAREN_ARITHMETIC) || defined (ARITH_FOR_COMMAND) static int parse_dparen __P((int)); ! static int parse_arith_cmd __P((char **, int)); #endif #if defined (COND_COMMAND) *************** *** 267,270 **** --- 272,280 ---- int promptvars = 1; + /* If non-zero, $'...' and $"..." are expanded when they appear within + a ${...} expansion, even when the expansion appears within double + quotes. */ + int extended_quote = 1; + /* The decoded prompt string. Used if READLINE is not defined or if editing is turned off. Analogous to current_readline_prompt. */ *************** *** 298,305 **** static int arith_for_lineno; static REDIRECTEE redir; ! #line 276 "/usr/homes/chet/src/bash/src/parse.y" ! #ifndef YYSTYPE typedef union { WORD_DESC *word; /* the word that we read. */ --- 308,328 ---- static int arith_for_lineno; + /* The line number in a script where the word in a `case WORD', `select WORD' + or `for WORD' begins. This is a nested command maximum, since the array + index is decremented after a case, select, or for command is parsed. */ + #define MAX_CASE_NEST 128 + static int word_lineno[MAX_CASE_NEST]; + static int word_top = -1; + + /* If non-zero, it is the token that we want read_token to return + regardless of what text is (or isn't) present to be read. This + is reset by read_token. If token_to_read == WORD or + ASSIGNMENT_WORD, yylval.word should be set to word_desc_to_read. */ + static int token_to_read; + static WORD_DESC *word_desc_to_read; + static REDIRECTEE redir; ! #line 299 "/Users/chet/src/bash/src/parse.y" typedef union { WORD_DESC *word; /* the word that we read. */ *************** *** 310,761 **** ELEMENT element; PATTERN_LIST *pattern; ! } yystype; ! # define YYSTYPE yystype #endif - #ifndef YYDEBUG - # define YYDEBUG 0 #endif ! #define YYFINAL 301 #define YYFLAG -32768 #define YYNTBASE 54 - /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ #define YYTRANSLATE(x) ((unsigned)(x) <= 296 ? yytranslate[x] : 90) ! /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ ! static const char yytranslate[] = ! { ! 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 44, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 42, 2, ! 52, 53, 2, 2, 2, 49, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 43, ! 48, 2, 47, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 50, 46, 51, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 1, 3, 4, 5, ! 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ! 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, ! 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, ! 36, 37, 38, 39, 40, 41, 45 }; ! #if YYDEBUG ! static const short yyprhs[] = ! { ! 0, 0, 3, 5, 8, 10, 12, 15, 18, 21, ! 25, 29, 32, 36, 39, 43, 46, 50, 53, 57, ! 60, 64, 67, 71, 74, 78, 81, 85, 88, 92, ! 95, 99, 102, 106, 109, 112, 116, 118, 120, 122, ! 124, 127, 129, 132, 134, 136, 139, 141, 143, 145, ! 151, 157, 159, 161, 163, 165, 167, 169, 171, 178, ! 185, 193, 201, 212, 223, 233, 243, 251, 259, 265, ! 271, 278, 285, 293, 301, 312, 323, 330, 338, 345, ! 351, 358, 363, 365, 368, 372, 378, 386, 393, 397, ! 399, 403, 408, 415, 421, 423, 426, 431, 436, 442, ! 448, 451, 455, 457, 461, 464, 466, 469, 473, 477, ! 481, 486, 491, 496, 501, 506, 508, 510, 512, 514, ! 516, 518, 519, 522, 524, 527, 530, 535, 540, 544, ! 548, 550, 552, 555, 558, 562, 566, 571, 573, 575 }; ! static const short yyrhs[] = ! { ! 85, 82, 0, 44, 0, 1, 44, 0, 45, 0, ! 24, 0, 55, 24, 0, 47, 24, 0, 48, 24, ! 0, 26, 47, 24, 0, 26, 48, 24, 0, 32, ! 24, 0, 26, 32, 24, 0, 33, 24, 0, 26, ! 33, 24, 0, 35, 24, 0, 26, 35, 24, 0, ! 34, 26, 0, 26, 34, 26, 0, 36, 26, 0, ! 26, 36, 26, 0, 34, 24, 0, 26, 34, 24, ! 0, 36, 24, 0, 26, 36, 24, 0, 38, 24, ! 0, 26, 38, 24, 0, 36, 49, 0, 26, 36, ! 49, 0, 34, 49, 0, 26, 34, 49, 0, 39, ! 24, 0, 26, 40, 24, 0, 40, 24, 0, 41, ! 24, 0, 26, 41, 24, 0, 24, 0, 25, 0, ! 56, 0, 56, 0, 58, 56, 0, 57, 0, 59, ! 57, 0, 59, 0, 61, 0, 61, 58, 0, 66, ! 0, 62, 0, 65, 0, 12, 79, 14, 79, 15, ! 0, 13, 79, 14, 79, 15, 0, 64, 0, 69, ! 0, 68, 0, 70, 0, 71, 0, 72, 0, 63, ! 0, 10, 24, 84, 14, 79, 15, 0, 10, 24, ! 84, 50, 79, 51, 0, 10, 24, 43, 84, 14, ! 79, 15, 0, 10, 24, 43, 84, 50, 79, 51, ! 0, 10, 24, 84, 20, 55, 83, 84, 14, 79, ! 15, 0, 10, 24, 84, 20, 55, 83, 84, 50, ! 79, 51, 0, 10, 24, 84, 20, 83, 84, 14, ! 79, 15, 0, 10, 24, 84, 20, 83, 84, 50, ! 79, 51, 0, 10, 28, 83, 84, 14, 79, 15, ! 0, 10, 28, 83, 84, 50, 79, 51, 0, 10, ! 28, 14, 79, 15, 0, 10, 28, 50, 79, 51, ! 0, 11, 24, 84, 14, 78, 15, 0, 11, 24, ! 84, 50, 78, 51, 0, 11, 24, 43, 84, 14, ! 78, 15, 0, 11, 24, 43, 84, 50, 78, 51, ! 0, 11, 24, 84, 20, 55, 83, 84, 14, 78, ! 15, 0, 11, 24, 84, 20, 55, 83, 84, 50, ! 78, 51, 0, 8, 24, 84, 20, 84, 9, 0, ! 8, 24, 84, 20, 76, 84, 9, 0, 8, 24, ! 84, 20, 74, 9, 0, 24, 52, 53, 84, 67, ! 0, 16, 24, 52, 53, 84, 67, 0, 16, 24, ! 84, 67, 0, 61, 0, 61, 58, 0, 52, 79, ! 53, 0, 3, 79, 4, 79, 7, 0, 3, 79, ! 4, 79, 5, 79, 7, 0, 3, 79, 4, 79, ! 73, 7, 0, 50, 79, 51, 0, 27, 0, 17, ! 29, 18, 0, 6, 79, 4, 79, 0, 6, 79, ! 4, 79, 5, 79, 0, 6, 79, 4, 79, 73, ! 0, 75, 0, 76, 75, 0, 84, 77, 53, 79, ! 0, 84, 77, 53, 84, 0, 84, 52, 77, 53, ! 79, 0, 84, 52, 77, 53, 84, 0, 75, 37, ! 0, 76, 75, 37, 0, 24, 0, 77, 46, 24, ! 0, 84, 80, 0, 78, 0, 84, 81, 0, 81, ! 44, 84, 0, 81, 42, 84, 0, 81, 43, 84, ! 0, 81, 30, 84, 81, 0, 81, 31, 84, 81, ! 0, 81, 42, 84, 81, 0, 81, 43, 84, 81, ! 0, 81, 44, 84, 81, 0, 87, 0, 44, 0, ! 45, 0, 44, 0, 43, 0, 45, 0, 0, 84, ! 44, 0, 86, 0, 86, 42, 0, 86, 43, 0, ! 86, 30, 84, 86, 0, 86, 31, 84, 86, 0, ! 86, 42, 86, 0, 86, 43, 86, 0, 87, 0, ! 88, 0, 21, 88, 0, 89, 88, 0, 89, 21, ! 88, 0, 21, 89, 88, 0, 88, 46, 84, 88, ! 0, 60, 0, 22, 0, 22, 23, 0 }; #endif ! #if YYDEBUG ! /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ ! static const short yyrline[] = ! { ! 0, 326, 335, 342, 357, 367, 369, 373, 378, 383, ! 388, 393, 398, 403, 409, 415, 420, 425, 430, 435, ! 440, 445, 450, 455, 460, 465, 472, 479, 484, 489, ! 494, 499, 504, 509, 514, 519, 526, 528, 530, 534, ! 538, 549, 551, 555, 557, 559, 575, 579, 581, 583, ! 585, 587, 589, 591, 593, 595, 597, 599, 603, 605, ! 607, 609, 611, 613, 615, 617, 621, 623, 625, 627, ! 631, 635, 639, 643, 647, 651, 657, 659, 661, 665, ! 668, 671, 676, 678, 709, 716, 718, 720, 725, 729, ! 733, 737, 739, 741, 745, 746, 750, 752, 754, 756, ! 760, 761, 765, 767, 776, 784, 785, 791, 792, 799, ! 803, 805, 807, 814, 816, 818, 822, 823, 826, 827, ! 828, 831, 832, 841, 847, 856, 864, 866, 868, 875, ! 878, 882, 884, 889, 894, 899, 906, 909, 913, 915 }; #endif ! #if (YYDEBUG) || defined YYERROR_VERBOSE ! /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */ ! static const char *const yytname[] = ! { ! "$", "error", "$undefined.", "IF", "THEN", "ELSE", "ELIF", "FI", "CASE", ! "ESAC", "FOR", "SELECT", "WHILE", "UNTIL", "DO", "DONE", "FUNCTION", ! "COND_START", "COND_END", "COND_ERROR", "IN", "BANG", "TIME", "TIMEOPT", ! "WORD", "ASSIGNMENT_WORD", "NUMBER", "ARITH_CMD", "ARITH_FOR_EXPRS", ! "COND_CMD", "AND_AND", "OR_OR", "GREATER_GREATER", "LESS_LESS", ! "LESS_AND", "LESS_LESS_LESS", "GREATER_AND", "SEMI_SEMI", ! "LESS_LESS_MINUS", "AND_GREATER", "LESS_GREATER", "GREATER_BAR", "'&'", ! "';'", "'\\n'", "yacc_EOF", "'|'", "'>'", "'<'", "'-'", "'{'", "'}'", ! "'('", "')'", "inputunit", "word_list", "redirection", ! "simple_command_element", "redirection_list", "simple_command", ! "command", "shell_command", "for_command", "arith_for_command", ! "select_command", "case_command", "function_def", "function_body", ! "subshell", "if_command", "group_command", "arith_command", ! "cond_command", "elif_clause", "case_clause", "pattern_list", ! "case_clause_sequence", "pattern", "list", "compound_list", "list0", ! "list1", "simple_list_terminator", "list_terminator", "newline_list", ! "simple_list", "simple_list1", "pipeline_command", "pipeline", ! "timespec", 0 }; #endif ! /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ ! static const short yyr1[] = ! { ! 0, 54, 54, 54, 54, 55, 55, 56, 56, 56, ! 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, ! 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, ! 56, 56, 56, 56, 56, 56, 57, 57, 57, 58, ! 58, 59, 59, 60, 60, 60, 60, 61, 61, 61, ! 61, 61, 61, 61, 61, 61, 61, 61, 62, 62, ! 62, 62, 62, 62, 62, 62, 63, 63, 63, 63, ! 64, 64, 64, 64, 64, 64, 65, 65, 65, 66, ! 66, 66, 67, 67, 68, 69, 69, 69, 70, 71, ! 72, 73, 73, 73, 74, 74, 75, 75, 75, 75, ! 76, 76, 77, 77, 78, 79, 79, 80, 80, 80, ! 81, 81, 81, 81, 81, 81, 82, 82, 83, 83, ! 83, 84, 84, 85, 85, 85, 86, 86, 86, 86, ! 86, 87, 87, 87, 87, 87, 88, 88, 89, 89 }; ! /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ ! static const short yyr2[] = ! { ! 0, 2, 1, 2, 1, 1, 2, 2, 2, 3, ! 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, ! 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, ! 3, 2, 3, 2, 2, 3, 1, 1, 1, 1, ! 2, 1, 2, 1, 1, 2, 1, 1, 1, 5, ! 5, 1, 1, 1, 1, 1, 1, 1, 6, 6, ! 7, 7, 10, 10, 9, 9, 7, 7, 5, 5, ! 6, 6, 7, 7, 10, 10, 6, 7, 6, 5, ! 6, 4, 1, 2, 3, 5, 7, 6, 3, 1, ! 3, 4, 6, 5, 1, 2, 4, 4, 5, 5, ! 2, 3, 1, 3, 2, 1, 2, 3, 3, 3, ! 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, ! 1, 0, 2, 1, 2, 2, 4, 4, 3, 3, ! 1, 1, 2, 2, 3, 3, 4, 1, 1, 2 }; ! /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE ! doesn't specify something else to do. Zero means the default is an ! error. */ ! static const short yydefact[] = ! { ! 0, 0, 121, 0, 0, 0, 121, 121, 0, 0, ! 0, 138, 36, 37, 0, 89, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 2, 4, 0, 0, 121, ! 121, 38, 41, 43, 137, 44, 47, 57, 51, 48, ! 46, 53, 52, 54, 55, 56, 0, 123, 130, 131, ! 0, 3, 105, 0, 0, 121, 121, 0, 121, 0, ! 0, 121, 0, 132, 0, 139, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 11, 13, 21, ! 17, 29, 15, 23, 19, 27, 25, 31, 33, 34, ! 7, 8, 0, 0, 36, 42, 39, 45, 116, 117, ! 1, 121, 121, 124, 125, 121, 0, 133, 121, 122, ! 104, 106, 115, 0, 121, 0, 121, 119, 118, 120, ! 121, 121, 121, 0, 121, 121, 0, 0, 90, 135, ! 121, 12, 14, 22, 18, 30, 16, 24, 20, 28, ! 26, 32, 35, 9, 10, 88, 84, 40, 0, 0, ! 128, 129, 0, 134, 0, 121, 121, 121, 121, 121, ! 121, 0, 121, 0, 121, 0, 0, 0, 0, 121, ! 0, 121, 0, 0, 121, 82, 81, 0, 126, 127, ! 0, 0, 136, 121, 121, 85, 0, 0, 0, 108, ! 109, 107, 0, 94, 121, 0, 121, 121, 0, 5, ! 0, 121, 0, 68, 69, 121, 121, 121, 121, 0, ! 0, 0, 0, 49, 50, 0, 83, 79, 0, 0, ! 87, 110, 111, 112, 113, 114, 78, 100, 95, 0, ! 76, 102, 0, 0, 0, 0, 58, 6, 121, 0, ! 59, 0, 0, 0, 0, 70, 0, 121, 71, 80, ! 86, 121, 121, 121, 121, 101, 77, 0, 0, 121, ! 60, 61, 0, 121, 121, 66, 67, 72, 73, 0, ! 91, 0, 0, 0, 121, 103, 96, 97, 121, 121, ! 0, 0, 121, 121, 121, 93, 98, 99, 0, 0, ! 64, 65, 0, 0, 92, 62, 63, 74, 75, 0, ! 0, 0 }; ! static const short yydefgoto[] = ! { ! 299, 200, 31, 32, 97, 33, 34, 35, 36, 37, ! 38, 39, 40, 176, 41, 42, 43, 44, 45, 186, ! 192, 193, 194, 233, 52, 53, 110, 111, 100, 121, ! 54, 46, 150, 112, 49, 50 }; ! static const short yypact[] = ! { ! 273, -24,-32768, -2, 11, 6,-32768,-32768, 12, 9, ! 402, 41, 10,-32768, 552,-32768, 46, 52, -5, 58, ! 64, 68, 102, 117, 135,-32768,-32768, 146, 149,-32768, ! -32768,-32768,-32768, 169,-32768, 202,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768, -33, 42,-32768, 91, ! 445,-32768,-32768, 142, 316,-32768, 133, 72, 136, 172, ! 174, 97, 171, 91, 531,-32768, 139, 173, 182, 99, ! 188, 138, 189, 190, 191, 194, 195,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768, 145, 168,-32768,-32768,-32768, 202,-32768,-32768, ! -32768,-32768,-32768, 359, 359,-32768, 531, 91,-32768,-32768, ! -32768, 249,-32768, -12,-32768, 13,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768, 57,-32768,-32768, 170, 39,-32768, 91, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 316, 316, ! 28, 28, 488, 91, 74,-32768,-32768,-32768,-32768,-32768, ! -32768, 90,-32768, 220,-32768, 183, 178, 110, 113,-32768, ! 198,-32768, 209, 215,-32768, 202,-32768, 39,-32768,-32768, ! 359, 359, 91,-32768,-32768,-32768, 224, 316, 316, 316, ! 316, 316, 230, 196,-32768, 16,-32768,-32768, 231,-32768, ! 258,-32768, 197,-32768,-32768,-32768,-32768,-32768,-32768, 236, ! 316, 258, 201,-32768,-32768, 39, 202,-32768, 247, 255, ! -32768,-32768,-32768, 66, 66, 66,-32768,-32768, 223, 17, ! -32768,-32768, 237, 92, 251, 211,-32768,-32768,-32768, 121, ! -32768, 252, 218, 256, 219,-32768, 249,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768, 115, 253,-32768, ! -32768,-32768, 122,-32768,-32768,-32768,-32768,-32768,-32768, 125, ! 106, 316, 316, 316,-32768,-32768,-32768, 316,-32768,-32768, ! 260, 245,-32768,-32768,-32768,-32768,-32768, 316, 272, 259, ! -32768,-32768, 289, 264,-32768,-32768,-32768,-32768,-32768, 288, ! 322,-32768 }; ! static const short yypgoto[] = ! { ! -32768, 160, -32, 283, 156,-32768,-32768, -122,-32768,-32768, ! -32768,-32768,-32768, -167,-32768,-32768,-32768,-32768,-32768, 65, ! -32768, 140,-32768, 104, -162, -6,-32768, -173,-32768, -157, ! -27,-32768, 4, 2, 3, 329 }; ! #define YYLAST 600 ! static const short yytable[] = ! { ! 59, 60, 48, 96, 47, 175, 201, 209, 160, 212, ! 217, 98, 99, 63, 221, 222, 223, 224, 225, 79, ! 51, 80, 55, 92, 93, 230, 256, 162, 113, 115, ! 58, 123, 109, 163, 127, 56, 61, 246, 62, 57, ! 231, 231, 2, 238, 81, 243, 244, 3, 249, 4, ! 5, 6, 7, 107, 247, 175, 9, 109, 101, 102, ! 109, 109, 66, 164, 65, 147, 15, 129, 232, 232, ! 77, 169, 101, 102, 148, 149, 78, 170, 152, 183, ! 184, 185, 82, 109, 103, 104, 116, 161, 83, 29, ! 84, 30, 86, 175, 167, 168, 155, 156, 223, 224, ! 225, 109, 154, 177, 196, 48, 48, 171, 151, 153, ! 165, 284, 184, 85, 166, 117, 118, 119, 172, 173, ! 292, 293, 120, 133, 205, 134, 87, 207, 187, 188, ! 189, 190, 191, 195, 109, 263, 278, 105, 258, 282, ! 197, 88, 210, 96, 210, 259, 108, 215, 135, 126, ! 48, 48, 178, 179, 109, 182, 198, 109, 202, 89, ! 206, 258, 137, 208, 138, 109, 109, 229, 274, 109, ! 90, 264, 279, 91, 239, 283, 114, 218, 219, 122, ! 210, 210, 48, 48, 147, 151, 124, 139, 125, 128, ! 234, 235, 130, 94, 13, 14, 145, 131, 203, 241, ! 242, 16, 17, 18, 19, 20, 132, 21, 22, 23, ! 24, 262, 136, 140, 141, 142, 27, 28, 143, 144, ! 269, 146, 199, 174, 213, 271, 272, 273, 14, 204, ! 214, 220, 277, 227, 16, 17, 18, 19, 20, 226, ! 21, 22, 23, 24, 199, 270, 236, 287, 240, 27, ! 28, 245, 248, 276, 250, 210, 210, 280, 281, 251, ! 255, 231, 261, 117, 118, 119, 260, 265, 286, 266, ! 268, 267, 288, 289, 1, 290, 2, 275, 294, 155, ! 156, 3, 237, 4, 5, 6, 7, 295, 300, 8, ! 9, 157, 158, 159, 10, 11, 291, 12, 13, 14, ! 15, 117, 118, 119, 297, 16, 17, 18, 19, 20, ! 296, 21, 22, 23, 24, 298, 95, 25, 26, 2, ! 27, 28, 301, 29, 3, 30, 4, 5, 6, 7, ! 211, 216, 8, 9, 228, 285, 257, 10, 11, 64, ! 12, 13, 14, 15, 0, 0, 0, 0, 16, 17, ! 18, 19, 20, 0, 21, 22, 23, 24, 0, 0, ! 109, 0, 2, 27, 28, 0, 29, 3, 30, 4, ! 5, 6, 7, 0, 0, 8, 9, 0, 0, 0, ! 10, 11, 0, 12, 13, 14, 15, 0, 0, 0, ! 0, 16, 17, 18, 19, 20, 0, 21, 22, 23, ! 24, 0, 0, 0, 0, 2, 27, 28, 0, 29, ! 3, 30, 4, 5, 6, 7, 0, 0, 8, 9, ! 0, 0, 0, 0, 11, 0, 12, 13, 14, 15, ! 0, 0, 0, 0, 16, 17, 18, 19, 20, 0, ! 21, 22, 23, 24, 0, 0, 0, 0, 2, 27, ! 28, 0, 29, 3, 30, 4, 5, 6, 7, 0, ! 0, 8, 9, 0, 0, 0, 106, 0, 0, 12, ! 13, 14, 15, 0, 0, 0, 0, 16, 17, 18, ! 19, 20, 0, 21, 22, 23, 24, 0, 0, 0, ! 0, 2, 27, 28, 0, 29, 3, 30, 4, 5, ! 6, 7, 0, 0, 8, 9, 0, 0, 0, 0, ! 0, 0, 12, 13, 14, 15, 0, 0, 0, 0, ! 16, 17, 18, 19, 20, 0, 21, 22, 23, 24, ! 0, 0, 109, 0, 2, 27, 28, 0, 29, 3, ! 30, 4, 5, 6, 7, 0, 0, 8, 9, 0, ! 0, 0, 0, 0, 0, 12, 13, 14, 15, 0, ! 0, 0, 0, 16, 17, 18, 19, 20, 0, 21, ! 22, 23, 24, 0, 0, 0, 0, 0, 27, 28, ! 0, 29, 0, 30, 67, 68, 69, 70, 71, 0, ! 72, 0, 73, 74, 0, 0, 0, 0, 0, 75, ! 76 }; ! static const short yycheck[] = ! { ! 6, 7, 0, 35, 0, 127, 163, 169, 20, 171, ! 177, 44, 45, 10, 187, 188, 189, 190, 191, 24, ! 44, 26, 24, 29, 30, 9, 9, 14, 55, 56, ! 24, 58, 44, 20, 61, 24, 24, 210, 29, 28, ! 24, 24, 3, 200, 49, 207, 208, 8, 215, 10, ! 11, 12, 13, 50, 211, 177, 17, 44, 30, 31, ! 44, 44, 52, 50, 23, 97, 27, 64, 52, 52, ! 24, 14, 30, 31, 101, 102, 24, 20, 105, 5, ! 6, 7, 24, 44, 42, 43, 14, 114, 24, 50, ! 26, 52, 24, 215, 121, 122, 30, 31, 271, 272, ! 273, 44, 108, 130, 14, 103, 104, 50, 104, 106, ! 116, 5, 6, 49, 120, 43, 44, 45, 124, 125, ! 282, 283, 50, 24, 14, 26, 24, 14, 155, 156, ! 157, 158, 159, 160, 44, 14, 14, 46, 46, 14, ! 50, 24, 169, 175, 171, 53, 4, 174, 49, 52, ! 148, 149, 148, 149, 44, 152, 162, 44, 164, 24, ! 50, 46, 24, 50, 26, 44, 44, 194, 53, 44, ! 24, 50, 50, 24, 201, 50, 43, 183, 184, 43, ! 207, 208, 180, 181, 216, 181, 14, 49, 14, 18, ! 196, 197, 53, 24, 25, 26, 51, 24, 15, 205, ! 206, 32, 33, 34, 35, 36, 24, 38, 39, 40, ! 41, 238, 24, 24, 24, 24, 47, 48, 24, 24, ! 247, 53, 24, 53, 15, 252, 253, 254, 26, 51, ! 15, 7, 259, 37, 32, 33, 34, 35, 36, 9, ! 38, 39, 40, 41, 24, 251, 15, 274, 51, 47, ! 48, 15, 51, 259, 7, 282, 283, 263, 264, 4, ! 37, 24, 51, 43, 44, 45, 15, 15, 274, 51, ! 51, 15, 278, 279, 1, 15, 3, 24, 284, 30, ! 31, 8, 24, 10, 11, 12, 13, 15, 0, 16, ! 17, 42, 43, 44, 21, 22, 51, 24, 25, 26, ! 27, 43, 44, 45, 15, 32, 33, 34, 35, 36, ! 51, 38, 39, 40, 41, 51, 33, 44, 45, 3, ! 47, 48, 0, 50, 8, 52, 10, 11, 12, 13, ! 170, 175, 16, 17, 194, 270, 232, 21, 22, 10, ! 24, 25, 26, 27, -1, -1, -1, -1, 32, 33, ! 34, 35, 36, -1, 38, 39, 40, 41, -1, -1, ! 44, -1, 3, 47, 48, -1, 50, 8, 52, 10, ! 11, 12, 13, -1, -1, 16, 17, -1, -1, -1, ! 21, 22, -1, 24, 25, 26, 27, -1, -1, -1, ! -1, 32, 33, 34, 35, 36, -1, 38, 39, 40, ! 41, -1, -1, -1, -1, 3, 47, 48, -1, 50, ! 8, 52, 10, 11, 12, 13, -1, -1, 16, 17, ! -1, -1, -1, -1, 22, -1, 24, 25, 26, 27, ! -1, -1, -1, -1, 32, 33, 34, 35, 36, -1, ! 38, 39, 40, 41, -1, -1, -1, -1, 3, 47, ! 48, -1, 50, 8, 52, 10, 11, 12, 13, -1, ! -1, 16, 17, -1, -1, -1, 21, -1, -1, 24, ! 25, 26, 27, -1, -1, -1, -1, 32, 33, 34, ! 35, 36, -1, 38, 39, 40, 41, -1, -1, -1, ! -1, 3, 47, 48, -1, 50, 8, 52, 10, 11, ! 12, 13, -1, -1, 16, 17, -1, -1, -1, -1, ! -1, -1, 24, 25, 26, 27, -1, -1, -1, -1, ! 32, 33, 34, 35, 36, -1, 38, 39, 40, 41, ! -1, -1, 44, -1, 3, 47, 48, -1, 50, 8, ! 52, 10, 11, 12, 13, -1, -1, 16, 17, -1, ! -1, -1, -1, -1, -1, 24, 25, 26, 27, -1, ! -1, -1, -1, 32, 33, 34, 35, 36, -1, 38, ! 39, 40, 41, -1, -1, -1, -1, -1, 47, 48, ! -1, 50, -1, 52, 32, 33, 34, 35, 36, -1, ! 38, -1, 40, 41, -1, -1, -1, -1, -1, 47, ! 48 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ ! #line 3 "/usr/local/share/bison/bison.simple" /* Skeleton output parser for bison, ! ! Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software ! Foundation, Inc. This program is free software; you can redistribute it and/or modify --- 333,758 ---- ELEMENT element; PATTERN_LIST *pattern; ! } YYSTYPE; ! #include ! ! #ifndef __cplusplus ! #ifndef __STDC__ ! #define const #endif #endif ! #define YYFINAL 302 #define YYFLAG -32768 #define YYNTBASE 54 #define YYTRANSLATE(x) ((unsigned)(x) <= 296 ? yytranslate[x] : 90) ! static const char yytranslate[] = { 0, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 44, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 42, 2, 52, ! 53, 2, 2, 2, 49, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 43, 48, ! 2, 47, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 50, 46, 51, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, ! 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, ! 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, ! 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, ! 37, 38, 39, 40, 41, 45 }; ! #if YYDEBUG != 0 ! static const short yyprhs[] = { 0, ! 0, 3, 5, 8, 10, 12, 15, 18, 21, 25, ! 29, 32, 36, 39, 43, 46, 50, 53, 57, 60, ! 64, 67, 71, 74, 78, 81, 85, 88, 92, 95, ! 99, 102, 106, 109, 112, 116, 118, 120, 122, 124, ! 127, 129, 132, 134, 136, 139, 141, 143, 145, 151, ! 157, 159, 161, 163, 165, 167, 169, 171, 178, 185, ! 193, 201, 212, 223, 233, 243, 251, 259, 265, 271, ! 278, 285, 293, 301, 312, 323, 330, 338, 345, 351, ! 358, 363, 365, 368, 372, 378, 386, 393, 397, 399, ! 403, 408, 415, 421, 423, 426, 431, 436, 442, 448, ! 451, 455, 457, 461, 464, 466, 469, 473, 477, 481, ! 486, 491, 496, 501, 506, 508, 510, 512, 514, 516, ! 518, 519, 522, 524, 527, 530, 535, 540, 544, 548, ! 550, 552, 555, 558, 562, 566, 569, 574, 576, 578 }; ! ! static const short yyrhs[] = { 85, ! 82, 0, 44, 0, 1, 44, 0, 45, 0, 24, ! 0, 55, 24, 0, 47, 24, 0, 48, 24, 0, ! 26, 47, 24, 0, 26, 48, 24, 0, 32, 24, ! 0, 26, 32, 24, 0, 33, 24, 0, 26, 33, ! 24, 0, 35, 24, 0, 26, 35, 24, 0, 34, ! 26, 0, 26, 34, 26, 0, 36, 26, 0, 26, ! 36, 26, 0, 34, 24, 0, 26, 34, 24, 0, ! 36, 24, 0, 26, 36, 24, 0, 38, 24, 0, ! 26, 38, 24, 0, 36, 49, 0, 26, 36, 49, ! 0, 34, 49, 0, 26, 34, 49, 0, 39, 24, ! 0, 26, 40, 24, 0, 40, 24, 0, 41, 24, ! 0, 26, 41, 24, 0, 24, 0, 25, 0, 56, ! 0, 56, 0, 58, 56, 0, 57, 0, 59, 57, ! 0, 59, 0, 61, 0, 61, 58, 0, 66, 0, ! 62, 0, 65, 0, 12, 79, 14, 79, 15, 0, ! 13, 79, 14, 79, 15, 0, 64, 0, 69, 0, ! 68, 0, 70, 0, 71, 0, 72, 0, 63, 0, ! 10, 24, 84, 14, 79, 15, 0, 10, 24, 84, ! 50, 79, 51, 0, 10, 24, 43, 84, 14, 79, ! 15, 0, 10, 24, 43, 84, 50, 79, 51, 0, ! 10, 24, 84, 20, 55, 83, 84, 14, 79, 15, ! 0, 10, 24, 84, 20, 55, 83, 84, 50, 79, ! 51, 0, 10, 24, 84, 20, 83, 84, 14, 79, ! 15, 0, 10, 24, 84, 20, 83, 84, 50, 79, ! 51, 0, 10, 28, 83, 84, 14, 79, 15, 0, ! 10, 28, 83, 84, 50, 79, 51, 0, 10, 28, ! 14, 79, 15, 0, 10, 28, 50, 79, 51, 0, ! 11, 24, 84, 14, 78, 15, 0, 11, 24, 84, ! 50, 78, 51, 0, 11, 24, 43, 84, 14, 78, ! 15, 0, 11, 24, 43, 84, 50, 78, 51, 0, ! 11, 24, 84, 20, 55, 83, 84, 14, 78, 15, ! 0, 11, 24, 84, 20, 55, 83, 84, 50, 78, ! 51, 0, 8, 24, 84, 20, 84, 9, 0, 8, ! 24, 84, 20, 76, 84, 9, 0, 8, 24, 84, ! 20, 74, 9, 0, 24, 52, 53, 84, 67, 0, ! 16, 24, 52, 53, 84, 67, 0, 16, 24, 84, ! 67, 0, 61, 0, 61, 58, 0, 52, 79, 53, ! 0, 3, 79, 4, 79, 7, 0, 3, 79, 4, ! 79, 5, 79, 7, 0, 3, 79, 4, 79, 73, ! 7, 0, 50, 79, 51, 0, 27, 0, 17, 29, ! 18, 0, 6, 79, 4, 79, 0, 6, 79, 4, ! 79, 5, 79, 0, 6, 79, 4, 79, 73, 0, ! 75, 0, 76, 75, 0, 84, 77, 53, 79, 0, ! 84, 77, 53, 84, 0, 84, 52, 77, 53, 79, ! 0, 84, 52, 77, 53, 84, 0, 75, 37, 0, ! 76, 75, 37, 0, 24, 0, 77, 46, 24, 0, ! 84, 80, 0, 78, 0, 84, 81, 0, 81, 44, ! 84, 0, 81, 42, 84, 0, 81, 43, 84, 0, ! 81, 30, 84, 81, 0, 81, 31, 84, 81, 0, ! 81, 42, 84, 81, 0, 81, 43, 84, 81, 0, ! 81, 44, 84, 81, 0, 87, 0, 44, 0, 45, ! 0, 44, 0, 43, 0, 45, 0, 0, 84, 44, ! 0, 86, 0, 86, 42, 0, 86, 43, 0, 86, ! 30, 84, 86, 0, 86, 31, 84, 86, 0, 86, ! 42, 86, 0, 86, 43, 86, 0, 87, 0, 88, ! 0, 21, 88, 0, 89, 88, 0, 89, 21, 88, ! 0, 21, 89, 88, 0, 89, 83, 0, 88, 46, ! 84, 88, 0, 60, 0, 22, 0, 22, 23, 0 }; #endif ! #if YYDEBUG != 0 ! static const short yyrline[] = { 0, ! 350, 359, 366, 381, 391, 393, 397, 402, 407, 412, ! 417, 422, 427, 433, 439, 444, 449, 454, 459, 464, ! 469, 474, 479, 484, 489, 496, 503, 508, 513, 518, ! 523, 528, 533, 538, 543, 550, 552, 554, 558, 562, ! 573, 575, 579, 581, 583, 599, 603, 605, 607, 609, ! 611, 613, 615, 617, 619, 621, 623, 627, 632, 637, ! 642, 647, 652, 657, 662, 669, 674, 679, 684, 691, ! 696, 701, 706, 711, 716, 723, 728, 733, 740, 743, ! 746, 751, 753, 784, 791, 793, 795, 800, 804, 808, ! 812, 814, 816, 820, 821, 825, 827, 829, 831, 835, ! 836, 840, 842, 851, 859, 860, 866, 867, 874, 878, ! 880, 882, 889, 891, 893, 897, 898, 901, 903, 905, ! 909, 910, 919, 925, 934, 942, 944, 946, 953, 956, ! 960, 962, 967, 972, 977, 982, 1002, 1005, 1009, 1011 }; #endif ! #if YYDEBUG != 0 || defined (YYERROR_VERBOSE) ! static const char * const yytname[] = { "$","error","$undefined.","IF","THEN", ! "ELSE","ELIF","FI","CASE","ESAC","FOR","SELECT","WHILE","UNTIL","DO","DONE", ! "FUNCTION","COND_START","COND_END","COND_ERROR","IN","BANG","TIME","TIMEOPT", ! "WORD","ASSIGNMENT_WORD","NUMBER","ARITH_CMD","ARITH_FOR_EXPRS","COND_CMD","AND_AND", ! "OR_OR","GREATER_GREATER","LESS_LESS","LESS_AND","LESS_LESS_LESS","GREATER_AND", ! "SEMI_SEMI","LESS_LESS_MINUS","AND_GREATER","LESS_GREATER","GREATER_BAR","'&'", ! "';'","'\\n'","yacc_EOF","'|'","'>'","'<'","'-'","'{'","'}'","'('","')'","inputunit", ! "word_list","redirection","simple_command_element","redirection_list","simple_command", ! "command","shell_command","for_command","arith_for_command","select_command", ! "case_command","function_def","function_body","subshell","if_command","group_command", ! "arith_command","cond_command","elif_clause","case_clause","pattern_list","case_clause_sequence", ! "pattern","list","compound_list","list0","list1","simple_list_terminator","list_terminator", ! "newline_list","simple_list","simple_list1","pipeline_command","pipeline","timespec", NULL }; #endif ! static const short yyr1[] = { 0, ! 54, 54, 54, 54, 55, 55, 56, 56, 56, 56, ! 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, ! 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, ! 56, 56, 56, 56, 56, 57, 57, 57, 58, 58, ! 59, 59, 60, 60, 60, 60, 61, 61, 61, 61, ! 61, 61, 61, 61, 61, 61, 61, 62, 62, 62, ! 62, 62, 62, 62, 62, 63, 63, 63, 63, 64, ! 64, 64, 64, 64, 64, 65, 65, 65, 66, 66, ! 66, 67, 67, 68, 69, 69, 69, 70, 71, 72, ! 73, 73, 73, 74, 74, 75, 75, 75, 75, 76, ! 76, 77, 77, 78, 79, 79, 80, 80, 80, 81, ! 81, 81, 81, 81, 81, 82, 82, 83, 83, 83, ! 84, 84, 85, 85, 85, 86, 86, 86, 86, 86, ! 87, 87, 87, 87, 87, 87, 88, 88, 89, 89 }; ! static const short yyr2[] = { 0, ! 2, 1, 2, 1, 1, 2, 2, 2, 3, 3, ! 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, ! 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, ! 2, 3, 2, 2, 3, 1, 1, 1, 1, 2, ! 1, 2, 1, 1, 2, 1, 1, 1, 5, 5, ! 1, 1, 1, 1, 1, 1, 1, 6, 6, 7, ! 7, 10, 10, 9, 9, 7, 7, 5, 5, 6, ! 6, 7, 7, 10, 10, 6, 7, 6, 5, 6, ! 4, 1, 2, 3, 5, 7, 6, 3, 1, 3, ! 4, 6, 5, 1, 2, 4, 4, 5, 5, 2, ! 3, 1, 3, 2, 1, 2, 3, 3, 3, 4, ! 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, ! 0, 2, 1, 2, 2, 4, 4, 3, 3, 1, ! 1, 2, 2, 3, 3, 2, 4, 1, 1, 2 }; ! static const short yydefact[] = { 0, ! 0, 121, 0, 0, 0, 121, 121, 0, 0, 0, ! 139, 36, 37, 0, 89, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 2, 4, 0, 0, 121, 121, ! 38, 41, 43, 138, 44, 47, 57, 51, 48, 46, ! 53, 52, 54, 55, 56, 0, 123, 130, 131, 0, ! 3, 105, 0, 0, 121, 121, 0, 121, 0, 0, ! 121, 0, 132, 0, 140, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 11, 13, 21, 17, ! 29, 15, 23, 19, 27, 25, 31, 33, 34, 7, ! 8, 0, 0, 36, 42, 39, 45, 116, 117, 1, ! 121, 121, 124, 125, 121, 0, 119, 118, 120, 136, ! 133, 121, 122, 104, 106, 115, 0, 121, 0, 121, ! 121, 121, 121, 0, 121, 121, 0, 0, 90, 135, ! 121, 12, 14, 22, 18, 30, 16, 24, 20, 28, ! 26, 32, 35, 9, 10, 88, 84, 40, 0, 0, ! 128, 129, 0, 134, 0, 121, 121, 121, 121, 121, ! 121, 0, 121, 0, 121, 0, 0, 0, 0, 121, ! 0, 121, 0, 0, 121, 82, 81, 0, 126, 127, ! 0, 0, 137, 121, 121, 85, 0, 0, 0, 108, ! 109, 107, 0, 94, 121, 0, 121, 121, 0, 5, ! 0, 121, 0, 68, 69, 121, 121, 121, 121, 0, ! 0, 0, 0, 49, 50, 0, 83, 79, 0, 0, ! 87, 110, 111, 112, 113, 114, 78, 100, 95, 0, ! 76, 102, 0, 0, 0, 0, 58, 6, 121, 0, ! 59, 0, 0, 0, 0, 70, 0, 121, 71, 80, ! 86, 121, 121, 121, 121, 101, 77, 0, 0, 121, ! 60, 61, 0, 121, 121, 66, 67, 72, 73, 0, ! 91, 0, 0, 0, 121, 103, 96, 97, 121, 121, ! 0, 0, 121, 121, 121, 93, 98, 99, 0, 0, ! 64, 65, 0, 0, 92, 62, 63, 74, 75, 0, ! 0, 0 }; ! static const short yydefgoto[] = { 300, ! 201, 31, 32, 97, 33, 34, 35, 36, 37, 38, ! 39, 40, 177, 41, 42, 43, 44, 45, 187, 193, ! 194, 195, 234, 52, 53, 114, 115, 100, 110, 54, ! 46, 151, 116, 49, 50 }; ! static const short yypact[] = { 274, ! -23,-32768, 5, 55, 10,-32768,-32768, 21, 31, 446, ! 32, 19,-32768, 553,-32768, 56, 72, -12, 89, -11, ! 92, 102, 111, 113,-32768,-32768, 117, 124,-32768,-32768, ! -32768,-32768, 183,-32768, 202,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768, -13, 134,-32768, 52, 317, ! -32768,-32768, 148, 360,-32768, 115, 22, 120, 154, 173, ! 114, 155, 52, 532,-32768, 140, 180, 181, 101, 182, ! 112, 186, 188, 189, 190, 205,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768, 193, 195,-32768,-32768,-32768, 202,-32768,-32768,-32768, ! -32768,-32768, 403, 403,-32768, 532,-32768,-32768,-32768,-32768, ! 52,-32768,-32768,-32768, 221,-32768, -9,-32768, 42,-32768, ! -32768,-32768,-32768, 61,-32768,-32768, 200, 41,-32768, 52, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 360, 360, ! 152, 152, 489, 52, 192,-32768,-32768,-32768,-32768,-32768, ! -32768, 26,-32768, 127,-32768, 218, 194, 34, 73,-32768, ! 215,-32768, 242, 245,-32768, 202,-32768, 41,-32768,-32768, ! 403, 403, 52,-32768,-32768,-32768, 254, 360, 360, 360, ! 360, 360, 253, 229,-32768, -2,-32768,-32768, 252,-32768, ! 151,-32768, 217,-32768,-32768,-32768,-32768,-32768,-32768, 255, ! 360, 151, 220,-32768,-32768, 41, 202,-32768, 265, 272, ! -32768,-32768,-32768, 159, 159, 159,-32768,-32768, 241, 17, ! -32768,-32768, 256, 36, 266, 232,-32768,-32768,-32768, 74, ! -32768, 273, 238, 277, 243,-32768, 221,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768, 116, 269,-32768, ! -32768,-32768, 90,-32768,-32768,-32768,-32768,-32768,-32768, 95, ! 197, 360, 360, 360,-32768,-32768,-32768, 360,-32768,-32768, ! 282, 251,-32768,-32768,-32768,-32768,-32768, 360, 288, 260, ! -32768,-32768, 289, 280,-32768,-32768,-32768,-32768,-32768, 305, ! 316,-32768 }; ! static const short yypgoto[] = {-32768, ! 146, -33, 290, 156,-32768,-32768, -119,-32768,-32768,-32768, ! -32768,-32768, -153,-32768,-32768,-32768,-32768,-32768, 64,-32768, ! 141,-32768, 104, -162, -6,-32768, -172,-32768, -52, -28, ! -32768, 6, 4, -7, 329 }; ! #define YYLAST 601 ! static const short yytable[] = { 59, ! 60, 96, 63, 48, 122, 47, 231, 210, 176, 213, ! 161, 79, 83, 80, 84, 222, 223, 224, 225, 226, ! 51, 232, 92, 93, 218, 257, 117, 119, 55, 124, ! 98, 99, 128, 58, 113, 120, 81, 85, 247, 197, ! 232, 113, 111, 2, 61, 244, 245, 206, 3, 233, ! 4, 5, 6, 7, 65, 163, 130, 9, 176, 62, ! 113, 164, 250, 148, 107, 108, 109, 15, 233, 113, ! 66, 121, 149, 150, 170, 198, 153, 113, 56, 77, ! 171, 259, 57, 207, 113, 113, 208, 264, 260, 162, ! 29, 165, 30, 168, 169, 78, 176, 105, 154, 224, ! 225, 226, 178, 279, 113, 155, 48, 48, 283, 152, ! 172, 202, 82, 166, 167, 86, 113, 113, 173, 174, ! 293, 294, 209, 265, 134, 87, 135, 188, 189, 190, ! 191, 192, 196, 113, 88, 138, 89, 139, 113, 280, ! 90, 211, 96, 211, 284, 183, 216, 91, 239, 136, ! 200, 112, 48, 48, 179, 180, 199, 118, 203, 248, ! 140, 259, 123, 101, 102, 127, 230, 125, 275, 107, ! 108, 109, 129, 240, 238, 103, 104, 219, 220, 211, ! 211, 101, 102, 148, 48, 48, 126, 152, 156, 157, ! 235, 236, 131, 107, 108, 109, 184, 185, 186, 242, ! 243, 285, 185, 132, 133, 137, 94, 13, 14, 141, ! 263, 142, 143, 144, 16, 17, 18, 19, 20, 270, ! 21, 22, 23, 24, 272, 273, 274, 14, 145, 27, ! 28, 278, 204, 16, 17, 18, 19, 20, 200, 21, ! 22, 23, 24, 146, 205, 271, 288, 147, 27, 28, ! 156, 157, 175, 277, 211, 211, 214, 281, 282, 215, ! 221, 227, 158, 159, 160, 228, 237, 241, 287, 246, ! 249, 251, 289, 290, 1, 252, 2, 256, 295, 232, ! 261, 3, 262, 4, 5, 6, 7, 266, 267, 8, ! 9, 268, 276, 269, 10, 11, 291, 12, 13, 14, ! 15, 292, 296, 298, 301, 16, 17, 18, 19, 20, ! 297, 21, 22, 23, 24, 302, 212, 25, 26, 2, ! 27, 28, 95, 29, 3, 30, 4, 5, 6, 7, ! 299, 217, 8, 9, 286, 229, 258, 106, 64, 0, ! 12, 13, 14, 15, 0, 0, 0, 0, 16, 17, ! 18, 19, 20, 0, 21, 22, 23, 24, 0, 107, ! 108, 109, 2, 27, 28, 0, 29, 3, 30, 4, ! 5, 6, 7, 0, 0, 8, 9, 0, 0, 0, ! 10, 11, 0, 12, 13, 14, 15, 0, 0, 0, ! 0, 16, 17, 18, 19, 20, 0, 21, 22, 23, ! 24, 0, 0, 113, 0, 2, 27, 28, 0, 29, ! 3, 30, 4, 5, 6, 7, 0, 0, 8, 9, ! 0, 0, 0, 10, 11, 0, 12, 13, 14, 15, ! 0, 0, 0, 0, 16, 17, 18, 19, 20, 0, ! 21, 22, 23, 24, 0, 0, 0, 0, 2, 27, ! 28, 0, 29, 3, 30, 4, 5, 6, 7, 0, ! 0, 8, 9, 0, 0, 0, 0, 11, 0, 12, ! 13, 14, 15, 0, 0, 0, 0, 16, 17, 18, ! 19, 20, 0, 21, 22, 23, 24, 0, 0, 0, ! 0, 2, 27, 28, 0, 29, 3, 30, 4, 5, ! 6, 7, 0, 0, 8, 9, 0, 0, 0, 0, ! 0, 0, 12, 13, 14, 15, 0, 0, 0, 0, ! 16, 17, 18, 19, 20, 0, 21, 22, 23, 24, ! 0, 0, 113, 0, 2, 27, 28, 0, 29, 3, ! 30, 4, 5, 6, 7, 0, 0, 8, 9, 0, ! 0, 0, 0, 0, 0, 12, 13, 14, 15, 0, ! 0, 0, 0, 16, 17, 18, 19, 20, 0, 21, ! 22, 23, 24, 0, 0, 0, 0, 0, 27, 28, ! 0, 29, 0, 30, 67, 68, 69, 70, 71, 0, ! 72, 0, 73, 74, 0, 0, 0, 0, 0, 75, ! 76 }; ! static const short yycheck[] = { 6, ! 7, 35, 10, 0, 57, 0, 9, 170, 128, 172, ! 20, 24, 24, 26, 26, 188, 189, 190, 191, 192, ! 44, 24, 29, 30, 178, 9, 55, 56, 24, 58, ! 44, 45, 61, 24, 44, 14, 49, 49, 211, 14, ! 24, 44, 50, 3, 24, 208, 209, 14, 8, 52, ! 10, 11, 12, 13, 23, 14, 64, 17, 178, 29, ! 44, 20, 216, 97, 43, 44, 45, 27, 52, 44, ! 52, 50, 101, 102, 14, 50, 105, 44, 24, 24, ! 20, 46, 28, 50, 44, 44, 14, 14, 53, 118, ! 50, 50, 52, 122, 123, 24, 216, 46, 106, 272, ! 273, 274, 131, 14, 44, 112, 103, 104, 14, 104, ! 50, 164, 24, 120, 121, 24, 44, 44, 125, 126, ! 283, 284, 50, 50, 24, 24, 26, 156, 157, 158, ! 159, 160, 161, 44, 24, 24, 24, 26, 44, 50, ! 24, 170, 176, 172, 50, 153, 175, 24, 201, 49, ! 24, 4, 149, 150, 149, 150, 163, 43, 165, 212, ! 49, 46, 43, 30, 31, 52, 195, 14, 53, 43, ! 44, 45, 18, 202, 24, 42, 43, 184, 185, 208, ! 209, 30, 31, 217, 181, 182, 14, 182, 30, 31, ! 197, 198, 53, 43, 44, 45, 5, 6, 7, 206, ! 207, 5, 6, 24, 24, 24, 24, 25, 26, 24, ! 239, 24, 24, 24, 32, 33, 34, 35, 36, 248, ! 38, 39, 40, 41, 253, 254, 255, 26, 24, 47, ! 48, 260, 15, 32, 33, 34, 35, 36, 24, 38, ! 39, 40, 41, 51, 51, 252, 275, 53, 47, 48, ! 30, 31, 53, 260, 283, 284, 15, 264, 265, 15, ! 7, 9, 42, 43, 44, 37, 15, 51, 275, 15, ! 51, 7, 279, 280, 1, 4, 3, 37, 285, 24, ! 15, 8, 51, 10, 11, 12, 13, 15, 51, 16, ! 17, 15, 24, 51, 21, 22, 15, 24, 25, 26, ! 27, 51, 15, 15, 0, 32, 33, 34, 35, 36, ! 51, 38, 39, 40, 41, 0, 171, 44, 45, 3, ! 47, 48, 33, 50, 8, 52, 10, 11, 12, 13, ! 51, 176, 16, 17, 271, 195, 233, 21, 10, -1, ! 24, 25, 26, 27, -1, -1, -1, -1, 32, 33, ! 34, 35, 36, -1, 38, 39, 40, 41, -1, 43, ! 44, 45, 3, 47, 48, -1, 50, 8, 52, 10, ! 11, 12, 13, -1, -1, 16, 17, -1, -1, -1, ! 21, 22, -1, 24, 25, 26, 27, -1, -1, -1, ! -1, 32, 33, 34, 35, 36, -1, 38, 39, 40, ! 41, -1, -1, 44, -1, 3, 47, 48, -1, 50, ! 8, 52, 10, 11, 12, 13, -1, -1, 16, 17, ! -1, -1, -1, 21, 22, -1, 24, 25, 26, 27, ! -1, -1, -1, -1, 32, 33, 34, 35, 36, -1, ! 38, 39, 40, 41, -1, -1, -1, -1, 3, 47, ! 48, -1, 50, 8, 52, 10, 11, 12, 13, -1, ! -1, 16, 17, -1, -1, -1, -1, 22, -1, 24, ! 25, 26, 27, -1, -1, -1, -1, 32, 33, 34, ! 35, 36, -1, 38, 39, 40, 41, -1, -1, -1, ! -1, 3, 47, 48, -1, 50, 8, 52, 10, 11, ! 12, 13, -1, -1, 16, 17, -1, -1, -1, -1, ! -1, -1, 24, 25, 26, 27, -1, -1, -1, -1, ! 32, 33, 34, 35, 36, -1, 38, 39, 40, 41, ! -1, -1, 44, -1, 3, 47, 48, -1, 50, 8, ! 52, 10, 11, 12, 13, -1, -1, 16, 17, -1, ! -1, -1, -1, -1, -1, 24, 25, 26, 27, -1, ! -1, -1, -1, 32, 33, 34, 35, 36, -1, 38, ! 39, 40, 41, -1, -1, -1, -1, -1, 47, 48, ! -1, 50, -1, 52, 32, 33, 34, 35, 36, -1, ! 38, -1, 40, 41, -1, -1, -1, -1, -1, 47, ! 48 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ ! #line 3 "/usr/share/bison.simple" ! /* This file comes from bison-1.28. */ /* Skeleton output parser for bison, ! Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify *************** *** 779,885 **** in version 1.24 of Bison. */ ! /* This is the parser code that is written into each bison parser when ! the %semantic_parser declaration is not specified in the grammar. ! It was written by Richard Stallman by simplifying the hairy parser ! used when %semantic_parser is specified. */ ! ! /* All symbols defined below should begin with yy or YY, to avoid ! infringing on user name space. This should be done even for local ! variables, as they might otherwise be expanded by user macros. ! There are some unavoidable exceptions within include files to ! define necessary library symbols; they are noted "INFRINGES ON ! USER NAME SPACE" below. */ ! ! #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) ! ! /* The parser invokes alloca or malloc; define the necessary symbols. */ ! ! # if YYSTACK_USE_ALLOCA ! # define YYSTACK_ALLOC alloca ! # else ! # ifndef YYSTACK_USE_ALLOCA ! # if defined (alloca) || defined (_ALLOCA_H) ! # define YYSTACK_ALLOC alloca ! # else ! # ifdef __GNUC__ ! # define YYSTACK_ALLOC __builtin_alloca ! # endif ! # endif ! # endif ! # endif ! ! # ifdef YYSTACK_ALLOC ! /* Pacify GCC's `empty if-body' warning. */ ! # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) ! # else ! # if defined (__STDC__) || defined (__cplusplus) ! # include /* INFRINGES ON USER NAME SPACE */ ! # define YYSIZE_T size_t ! # endif ! # define YYSTACK_ALLOC malloc ! # define YYSTACK_FREE free ! # endif ! ! /* A type that is properly aligned for any stack member. */ ! union yyalloc ! { ! short yyss; ! YYSTYPE yyvs; ! # if YYLSP_NEEDED ! YYLTYPE yyls; ! # endif ! }; ! ! /* The size of the maximum gap between one aligned stack and the next. */ ! # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) ! /* The size of an array large to enough to hold all stacks, each with ! N elements. */ ! # if YYLSP_NEEDED ! # define YYSTACK_BYTES(N) \ ! ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ ! + 2 * YYSTACK_GAP_MAX) ! # else ! # define YYSTACK_BYTES(N) \ ! ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ ! + YYSTACK_GAP_MAX) ! # endif ! ! /* Relocate the TYPE STACK from its old location to the new one. The ! local variables YYSIZE and YYSTACKSIZE give the old and new number of ! elements in the stack, and YYPTR gives the new location of the ! stack. Advance YYPTR to a properly aligned location for the next ! stack. */ ! # define YYSTACK_RELOCATE(Type, Stack) \ ! do \ ! { \ ! YYSIZE_T yynewbytes; \ ! yymemcpy ((char *) yyptr, (char *) (Stack), \ ! yysize * (YYSIZE_T) sizeof (Type)); \ ! Stack = &yyptr->Stack; \ ! yynewbytes = yystacksize * sizeof (Type) + YYSTACK_GAP_MAX; \ ! yyptr += yynewbytes / sizeof (*yyptr); \ ! } \ ! while (0) ! ! #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ ! ! ! #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) ! # define YYSIZE_T __SIZE_TYPE__ ! #endif ! #if ! defined (YYSIZE_T) && defined (size_t) ! # define YYSIZE_T size_t ! #endif ! #if ! defined (YYSIZE_T) ! # if defined (__STDC__) || defined (__cplusplus) ! # include /* INFRINGES ON USER NAME SPACE */ ! # define YYSIZE_T size_t ! # endif ! #endif ! #if ! defined (YYSIZE_T) ! # define YYSIZE_T unsigned int #endif #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) --- 776,836 ---- in version 1.24 of Bison. */ ! /* This is the parser code that is written into each bison parser ! when the %semantic_parser declaration is not specified in the grammar. ! It was written by Richard Stallman by simplifying the hairy parser ! used when %semantic_parser is specified. */ ! ! #ifndef YYSTACK_USE_ALLOCA ! #ifdef alloca ! #define YYSTACK_USE_ALLOCA ! #else /* alloca not defined */ ! #ifdef __GNUC__ ! #define YYSTACK_USE_ALLOCA ! #define alloca __builtin_alloca ! #else /* not GNU C. */ ! #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) ! #define YYSTACK_USE_ALLOCA ! #include ! #else /* not sparc */ ! /* We think this test detects Watcom and Microsoft C. */ ! /* This used to test MSDOS, but that is a bad idea ! since that symbol is in the user namespace. */ ! #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) ! #if 0 /* No need for malloc.h, which pollutes the namespace; ! instead, just don't use alloca. */ ! #include ! #endif ! #else /* not MSDOS, or __TURBOC__ */ ! #if defined(_AIX) ! /* I don't know what this was needed for, but it pollutes the namespace. ! So I turned it off. rms, 2 May 1997. */ ! /* #include */ ! #pragma alloca ! #define YYSTACK_USE_ALLOCA ! #else /* not MSDOS, or __TURBOC__, or _AIX */ ! #if 0 ! #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, ! and on HPUX 10. Eventually we can turn this on. */ ! #define YYSTACK_USE_ALLOCA ! #define alloca __builtin_alloca ! #endif /* __hpux */ ! #endif ! #endif /* not _AIX */ ! #endif /* not MSDOS, or __TURBOC__ */ ! #endif /* not sparc */ ! #endif /* not GNU C */ ! #endif /* alloca not defined */ ! #endif /* YYSTACK_USE_ALLOCA not defined */ ! #ifdef YYSTACK_USE_ALLOCA ! #define YYSTACK_ALLOC alloca ! #else ! #define YYSTACK_ALLOC malloc #endif + /* Note: there must be only one dollar sign in this file. + It is replaced by the list of actions, each action + as one case of the switch. */ + #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) *************** *** 889,903 **** #define YYABORT goto yyabortlab #define YYERROR goto yyerrlab1 ! /* Like YYERROR except do call yyerror. This remains here temporarily ! to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) ! #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ ! { \ ! yychar = (Token); \ ! yylval = (Value); \ yychar1 = YYTRANSLATE (yychar); \ YYPOPSTACK; \ --- 840,853 ---- #define YYABORT goto yyabortlab #define YYERROR goto yyerrlab1 ! /* Like YYERROR except do call yyerror. ! This remains here temporarily to ease the ! transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) ! #define YYBACKUP(token, value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ ! { yychar = (token), yylval = (value); \ yychar1 = YYTRANSLATE (yychar); \ YYPOPSTACK; \ *************** *** 905,912 **** } \ else \ ! { \ ! yyerror ("syntax error: cannot back up"); \ ! YYERROR; \ ! } \ while (0) --- 855,859 ---- } \ else \ ! { yyerror ("syntax error: cannot back up"); YYERROR; } \ while (0) *************** *** 914,1074 **** #define YYERRCODE 256 ! /* YYLLOC_DEFAULT -- Compute the default location (before the actions ! are run). ! When YYLLOC_DEFAULT is run, CURRENT is set the location of the ! first token. By default, to implement support for ranges, extend ! its range to the last symbol. */ ! #ifndef YYLLOC_DEFAULT ! # define YYLLOC_DEFAULT(Current, Rhs, N) \ ! Current.last_line = Rhs[N].last_line; \ ! Current.last_column = Rhs[N].last_column; #endif ! /* YYLEX -- calling `yylex' with the right arguments. */ ! #if YYPURE ! # if YYLSP_NEEDED ! # ifdef YYLEX_PARAM ! # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) ! # else ! # define YYLEX yylex (&yylval, &yylloc) ! # endif ! # else /* !YYLSP_NEEDED */ ! # ifdef YYLEX_PARAM ! # define YYLEX yylex (&yylval, YYLEX_PARAM) ! # else ! # define YYLEX yylex (&yylval) ! # endif ! # endif /* !YYLSP_NEEDED */ ! #else /* !YYPURE */ ! # define YYLEX yylex () ! #endif /* !YYPURE */ ! ! ! /* Enable debugging if requested. */ ! #if YYDEBUG ! ! # ifndef YYFPRINTF ! # include /* INFRINGES ON USER NAME SPACE */ ! # define YYFPRINTF fprintf ! # endif ! ! # define YYDPRINTF(Args) \ ! do { \ ! if (yydebug) \ ! YYFPRINTF Args; \ ! } while (0) ! /* Nonzero means print parse trace. It is left uninitialized so that ! multiple parsers can coexist. */ ! int yydebug; ! #else /* !YYDEBUG */ ! # define YYDPRINTF(Args) ! #endif /* !YYDEBUG */ - /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH ! # define YYINITDEPTH 200 #endif ! /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only ! if the built-in stack extension method is used). ! ! Do not make this value too large; the results are undefined if ! SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) ! evaluated with infinite-precision integer arithmetic. */ #if YYMAXDEPTH == 0 ! # undef YYMAXDEPTH #endif #ifndef YYMAXDEPTH ! # define YYMAXDEPTH 10000 #endif ! #if ! defined (yyoverflow) && ! defined (yymemcpy) ! # if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ ! # define yymemcpy __builtin_memcpy ! # else /* not GNU C or C++ */ /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void ! # if defined (__STDC__) || defined (__cplusplus) ! yymemcpy (char *yyto, const char *yyfrom, YYSIZE_T yycount) ! # else ! yymemcpy (yyto, yyfrom, yycount) ! char *yyto; ! const char *yyfrom; ! YYSIZE_T yycount; ! # endif { ! register const char *yyf = yyfrom; ! register char *yyt = yyto; ! register YYSIZE_T yyi = yycount; ! while (yyi-- != 0) ! *yyt++ = *yyf++; } - # endif - #endif ! #ifdef YYERROR_VERBOSE ! # ifndef yystrlen ! # if defined (__GLIBC__) && defined (_STRING_H) ! # define yystrlen strlen ! # else ! /* Return the length of YYSTR. */ ! static YYSIZE_T ! # if defined (__STDC__) || defined (__cplusplus) ! yystrlen (const char *yystr) ! # else ! yystrlen (yystr) ! const char *yystr; ! # endif { ! register const char *yys = yystr; ! while (*yys++ != '\0') ! continue; ! ! return yys - yystr - 1; } - # endif - # endif - - # ifndef yystpcpy - # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) - # define yystpcpy stpcpy - # else - /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ - static char * - # if defined (__STDC__) || defined (__cplusplus) - yystpcpy (char *yydest, const char *yysrc) - # else - yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; - # endif - { - register char *yyd = yydest; - register const char *yys = yysrc; ! while ((*yyd++ = *yys++) != '\0') ! continue; ! ! return yyd - 1; ! } ! # endif ! # endif #endif ! #line 319 "/usr/local/share/bison/bison.simple" ! /* The user can define YYPARSE_PARAM as the name of an argument to be passed --- 861,968 ---- #define YYERRCODE 256 + #ifndef YYPURE + #define YYLEX yylex() + #endif + + #ifdef YYPURE + #ifdef YYLSP_NEEDED + #ifdef YYLEX_PARAM + #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) + #else + #define YYLEX yylex(&yylval, &yylloc) + #endif + #else /* not YYLSP_NEEDED */ + #ifdef YYLEX_PARAM + #define YYLEX yylex(&yylval, YYLEX_PARAM) + #else + #define YYLEX yylex(&yylval) + #endif + #endif /* not YYLSP_NEEDED */ + #endif + + /* If nonreentrant, generate the variables here */ ! #ifndef YYPURE ! int yychar; /* the lookahead symbol */ ! YYSTYPE yylval; /* the semantic value of the */ ! /* lookahead symbol */ ! #ifdef YYLSP_NEEDED ! YYLTYPE yylloc; /* location data for the lookahead */ ! /* symbol */ #endif + int yynerrs; /* number of parse errors so far */ + #endif /* not YYPURE */ ! #if YYDEBUG != 0 ! int yydebug; /* nonzero means print parse trace */ ! /* Since this is uninitialized, it does not stop multiple parsers ! from coexisting. */ ! #endif ! /* YYINITDEPTH indicates the initial size of the parser's stacks */ #ifndef YYINITDEPTH ! #define YYINITDEPTH 200 #endif ! /* YYMAXDEPTH is the maximum size the stacks can grow to ! (effective only if the built-in stack extension method is used). */ #if YYMAXDEPTH == 0 ! #undef YYMAXDEPTH #endif #ifndef YYMAXDEPTH ! #define YYMAXDEPTH 10000 #endif ! /* Define __yy_memcpy. Note that the size argument ! should be passed with type unsigned int, because that is what the non-GCC ! definitions require. With GCC, __builtin_memcpy takes an arg ! of type size_t, but it can handle unsigned int. */ ! ! #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ ! #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) ! #else /* not GNU C or C++ */ ! #ifndef __cplusplus /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void ! __yy_memcpy (to, from, count) ! char *to; ! char *from; ! unsigned int count; { ! register char *f = from; ! register char *t = to; ! register int i = count; ! while (i-- > 0) ! *t++ = *f++; } ! #else /* __cplusplus */ ! /* This is the most reliable way to avoid incompatibilities ! in available built-in functions on various systems. */ ! static void ! __yy_memcpy (char *to, char *from, unsigned int count) { ! register char *t = to; ! register char *f = from; ! register int i = count; ! while (i-- > 0) ! *t++ = *f++; } ! #endif #endif ! #line 217 "/usr/share/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed *************** *** 1079,1197 **** #ifdef YYPARSE_PARAM ! # if defined (__STDC__) || defined (__cplusplus) ! # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM ! # define YYPARSE_PARAM_DECL ! # else ! # define YYPARSE_PARAM_ARG YYPARSE_PARAM ! # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; ! # endif ! #else /* !YYPARSE_PARAM */ ! # define YYPARSE_PARAM_ARG ! # define YYPARSE_PARAM_DECL ! #endif /* !YYPARSE_PARAM */ /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ ! # ifdef YYPARSE_PARAM int yyparse (void *); ! # else int yyparse (void); - # endif #endif - - /* YY_DECL_VARIABLES -- depending whether we use a pure parser, - variables are global, or local to YYPARSE. */ - - #define YY_DECL_NON_LSP_VARIABLES \ - /* The lookahead symbol. */ \ - int yychar; \ - \ - /* The semantic value of the lookahead symbol. */ \ - YYSTYPE yylval; \ - \ - /* Number of parse errors so far. */ \ - int yynerrs; - - #if YYLSP_NEEDED - # define YY_DECL_VARIABLES \ - YY_DECL_NON_LSP_VARIABLES \ - \ - /* Location data for the lookahead symbol. */ \ - YYLTYPE yylloc; - #else - # define YY_DECL_VARIABLES \ - YY_DECL_NON_LSP_VARIABLES #endif - - /* If nonreentrant, generate the variables here. */ - - #if !YYPURE - YY_DECL_VARIABLES - #endif /* !YYPURE */ - int ! yyparse (YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL { - /* If reentrant, generate the variables here. */ - #if YYPURE - YY_DECL_VARIABLES - #endif /* !YYPURE */ - register int yystate; register int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Lookahead token as an internal (translated) token number. */ - int yychar1 = 0; - - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - short yyssa[YYINITDEPTH]; - short *yyss = yyssa; register short *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; register YYSTYPE *yyvsp; ! #if YYLSP_NEEDED ! /* The location stack. */ ! YYLTYPE yylsa[YYINITDEPTH]; YYLTYPE *yyls = yylsa; YYLTYPE *yylsp; - #endif ! #if YYLSP_NEEDED ! # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) #else ! # define YYPOPSTACK (yyvsp--, yyssp--) #endif ! YYSIZE_T yystacksize = YYINITDEPTH; ! ! /* The variables used to return semantic value and location from the ! action routines. */ ! YYSTYPE yyval; ! #if YYLSP_NEEDED ! YYLTYPE yyloc; #endif ! /* When reducing, the number of symbols on the RHS of the reduced ! rule. */ int yylen; ! YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; --- 973,1046 ---- #ifdef YYPARSE_PARAM ! #ifdef __cplusplus ! #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM ! #define YYPARSE_PARAM_DECL ! #else /* not __cplusplus */ ! #define YYPARSE_PARAM_ARG YYPARSE_PARAM ! #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; ! #endif /* not __cplusplus */ ! #else /* not YYPARSE_PARAM */ ! #define YYPARSE_PARAM_ARG ! #define YYPARSE_PARAM_DECL ! #endif /* not YYPARSE_PARAM */ /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ ! #ifdef YYPARSE_PARAM int yyparse (void *); ! #else int yyparse (void); #endif #endif int ! yyparse(YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL { register int yystate; register int yyn; register short *yyssp; register YYSTYPE *yyvsp; + int yyerrstatus; /* number of tokens to shift before error messages enabled */ + int yychar1 = 0; /* lookahead token as an internal (translated) token number */ ! short yyssa[YYINITDEPTH]; /* the state stack */ ! YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ ! ! short *yyss = yyssa; /* refer to the stacks thru separate pointers */ ! YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ ! ! #ifdef YYLSP_NEEDED ! YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ YYLTYPE *yyls = yylsa; YYLTYPE *yylsp; ! #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) #else ! #define YYPOPSTACK (yyvsp--, yyssp--) #endif ! int yystacksize = YYINITDEPTH; ! int yyfree_stacks = 0; ! #ifdef YYPURE ! int yychar; ! YYSTYPE yylval; ! int yynerrs; ! #ifdef YYLSP_NEEDED ! YYLTYPE yylloc; ! #endif #endif ! YYSTYPE yyval; /* the variable used to return */ ! /* semantic values from the action */ ! /* routines */ ! int yylen; ! #if YYDEBUG != 0 ! if (yydebug) ! fprintf(stderr, "Starting parse\n"); ! #endif yystate = 0; *************** *** 1205,1294 **** The wasted elements are never initialized. */ ! yyssp = yyss; yyvsp = yyvs; ! #if YYLSP_NEEDED yylsp = yyls; #endif - goto yysetstate; ! /*------------------------------------------------------------. ! | yynewstate -- Push a new state, which is found in yystate. | ! `------------------------------------------------------------*/ ! yynewstate: ! /* In all cases, when you get here, the value and location stacks ! have just been pushed. so pushing a state here evens the stacks. ! */ ! yyssp++; ! yysetstate: ! *yyssp = yystate; if (yyssp >= yyss + yystacksize - 1) { /* Get the current used size of the three stacks, in elements. */ ! YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow ! { ! /* Give user a chance to reallocate the stack. Use copies of ! these so that the &'s don't force the real ones into ! memory. */ ! YYSTYPE *yyvs1 = yyvs; ! short *yyss1 = yyss; ! ! /* Each stack pointer address is followed by the size of the ! data in use in that stack, in bytes. */ ! # if YYLSP_NEEDED ! YYLTYPE *yyls1 = yyls; ! /* This used to be a conditional around just the two extra args, ! but that might be undefined if yyoverflow is a macro. */ ! yyoverflow ("parser stack overflow", ! &yyss1, yysize * sizeof (*yyssp), ! &yyvs1, yysize * sizeof (*yyvsp), ! &yyls1, yysize * sizeof (*yylsp), ! &yystacksize); ! yyls = yyls1; ! # else ! yyoverflow ("parser stack overflow", ! &yyss1, yysize * sizeof (*yyssp), ! &yyvs1, yysize * sizeof (*yyvsp), ! &yystacksize); ! # endif ! yyss = yyss1; ! yyvs = yyvs1; ! } #else /* no yyoverflow */ /* Extend the stack our own way. */ if (yystacksize >= YYMAXDEPTH) ! goto yyoverflowlab; yystacksize *= 2; if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; ! ! { ! short *yyss1 = yyss; ! union yyalloc *yyptr = ! (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); ! if (! yyptr) ! goto yyoverflowlab; ! YYSTACK_RELOCATE (short, yyss); ! YYSTACK_RELOCATE (YYSTYPE, yyvs); ! # if YYLSP_NEEDED ! YYSTACK_RELOCATE (YYLTYPE, yyls); ! # endif ! # undef YYSTACK_RELOCATE ! if (yyss1 != yyssa) ! YYSTACK_FREE (yyss1); ! } #endif /* no yyoverflow */ ! yyssp = yyss + yysize - 1; ! yyvsp = yyvs + yysize - 1; ! #if YYLSP_NEEDED ! yylsp = yyls + yysize - 1; #endif ! YYDPRINTF ((stderr, "Stack size increased to %lu\n", ! (unsigned long int) yystacksize)); if (yyssp >= yyss + yystacksize - 1) --- 1054,1149 ---- The wasted elements are never initialized. */ ! yyssp = yyss - 1; yyvsp = yyvs; ! #ifdef YYLSP_NEEDED yylsp = yyls; #endif ! /* Push a new state, which is found in yystate . */ ! /* In all cases, when you get here, the value and location stacks ! have just been pushed. so pushing a state here evens the stacks. */ ! yynewstate: ! *++yyssp = yystate; if (yyssp >= yyss + yystacksize - 1) { + /* Give user a chance to reallocate the stack */ + /* Use copies of these so that the &'s don't force the real ones into memory. */ + YYSTYPE *yyvs1 = yyvs; + short *yyss1 = yyss; + #ifdef YYLSP_NEEDED + YYLTYPE *yyls1 = yyls; + #endif + /* Get the current used size of the three stacks, in elements. */ ! int size = yyssp - yyss + 1; #ifdef yyoverflow ! /* Each stack pointer address is followed by the size of ! the data in use in that stack, in bytes. */ ! #ifdef YYLSP_NEEDED ! /* This used to be a conditional around just the two extra args, ! but that might be undefined if yyoverflow is a macro. */ ! yyoverflow("parser stack overflow", ! &yyss1, size * sizeof (*yyssp), ! &yyvs1, size * sizeof (*yyvsp), ! &yyls1, size * sizeof (*yylsp), ! &yystacksize); ! #else ! yyoverflow("parser stack overflow", ! &yyss1, size * sizeof (*yyssp), ! &yyvs1, size * sizeof (*yyvsp), ! &yystacksize); ! #endif ! ! yyss = yyss1; yyvs = yyvs1; ! #ifdef YYLSP_NEEDED ! yyls = yyls1; ! #endif #else /* no yyoverflow */ /* Extend the stack our own way. */ if (yystacksize >= YYMAXDEPTH) ! { ! yyerror("parser stack overflow"); ! if (yyfree_stacks) ! { ! free (yyss); ! free (yyvs); ! #ifdef YYLSP_NEEDED ! free (yyls); ! #endif ! } ! return 2; ! } yystacksize *= 2; if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; ! #ifndef YYSTACK_USE_ALLOCA ! yyfree_stacks = 1; ! #endif ! yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); ! __yy_memcpy ((char *)yyss, (char *)yyss1, ! size * (unsigned int) sizeof (*yyssp)); ! yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); ! __yy_memcpy ((char *)yyvs, (char *)yyvs1, ! size * (unsigned int) sizeof (*yyvsp)); ! #ifdef YYLSP_NEEDED ! yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); ! __yy_memcpy ((char *)yyls, (char *)yyls1, ! size * (unsigned int) sizeof (*yylsp)); ! #endif #endif /* no yyoverflow */ ! yyssp = yyss + size - 1; ! yyvsp = yyvs + size - 1; ! #ifdef YYLSP_NEEDED ! yylsp = yyls + size - 1; #endif ! #if YYDEBUG != 0 ! if (yydebug) ! fprintf(stderr, "Stack size increased to %d\n", yystacksize); ! #endif if (yyssp >= yyss + yystacksize - 1) *************** *** 1296,1308 **** } ! YYDPRINTF ((stderr, "Entering state %d\n", yystate)); goto yybackup; ! ! ! /*-----------. ! | yybackup. | ! `-----------*/ ! yybackup: /* Do appropriate processing given the current state. */ --- 1151,1161 ---- } ! #if YYDEBUG != 0 ! if (yydebug) ! fprintf(stderr, "Entering state %d\n", yystate); ! #endif goto yybackup; ! yybackup: /* Do appropriate processing given the current state. */ *************** *** 1323,1327 **** if (yychar == YYEMPTY) { ! YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } --- 1176,1183 ---- if (yychar == YYEMPTY) { ! #if YYDEBUG != 0 ! if (yydebug) ! fprintf(stderr, "Reading a token: "); ! #endif yychar = YYLEX; } *************** *** 1334,1356 **** yychar = YYEOF; /* Don't call YYLEX any more */ ! YYDPRINTF ((stderr, "Now at end of input.\n")); } else { ! yychar1 = YYTRANSLATE (yychar); ! #if YYDEBUG ! /* We have to keep this `#if YYDEBUG', since we use variables ! which are defined only if `YYDEBUG' is set. */ if (yydebug) { ! YYFPRINTF (stderr, "Next token is %d (%s", ! yychar, yytname[yychar1]); ! /* Give the individual parser a way to print the precise ! meaning of a token, for further debugging info. */ ! # ifdef YYPRINT YYPRINT (stderr, yychar, yylval); ! # endif ! YYFPRINTF (stderr, ")\n"); } #endif --- 1190,1212 ---- yychar = YYEOF; /* Don't call YYLEX any more */ ! #if YYDEBUG != 0 ! if (yydebug) ! fprintf(stderr, "Now at end of input.\n"); ! #endif } else { ! yychar1 = YYTRANSLATE(yychar); ! #if YYDEBUG != 0 if (yydebug) { ! fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); ! /* Give the individual parser a way to print the precise meaning ! of a token, for further debugging info. */ ! #ifdef YYPRINT YYPRINT (stderr, yychar, yylval); ! #endif ! fprintf (stderr, ")\n"); } #endif *************** *** 1384,1389 **** /* Shift the lookahead token. */ ! YYDPRINTF ((stderr, "Shifting token %d (%s), ", ! yychar, yytname[yychar1])); /* Discard the token being shifted unless it is eof. */ --- 1240,1248 ---- /* Shift the lookahead token. */ ! ! #if YYDEBUG != 0 ! if (yydebug) ! fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); ! #endif /* Discard the token being shifted unless it is eof. */ *************** *** 1392,1463 **** *++yyvsp = yylval; ! #if YYLSP_NEEDED *++yylsp = yylloc; #endif ! /* Count tokens shifted since error; after three, turn off error ! status. */ ! if (yyerrstatus) ! yyerrstatus--; yystate = yyn; goto yynewstate; ! ! /*-----------------------------------------------------------. ! | yydefault -- do the default action for the current state. | ! `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; - goto yyreduce; - ! /*-----------------------------. ! | yyreduce -- Do a reduction. | ! `-----------------------------*/ yyreduce: - /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; ! /* If YYLEN is nonzero, implement the default value of the action: ! `$$ = $1'. ! ! Otherwise, the following line sets YYVAL to the semantic value of ! the lookahead token. This behavior is undocumented and Bison ! users should not rely upon it. Assigning to YYVAL ! unconditionally makes the parser a bit smaller, and it avoids a ! GCC warning that YYVAL may be used uninitialized. */ ! yyval = yyvsp[1-yylen]; ! ! #if YYLSP_NEEDED ! /* Similarly for the default location. Let the user run additional ! commands if for instance locations are ranges. */ ! yyloc = yylsp[1-yylen]; ! YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); ! #endif ! ! #if YYDEBUG ! /* We have to keep this `#if YYDEBUG', since we use variables which ! are defined only if `YYDEBUG' is set. */ if (yydebug) { ! int yyi; ! YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", ! yyn, yyrline[yyn]); /* Print the symbols being reduced, and their result. */ ! for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++) ! YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); ! YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); } #endif switch (yyn) { case 1: ! #line 327 "/usr/homes/chet/src/bash/src/parse.y" { /* Case of regular command. Discard the error --- 1251,1297 ---- *++yyvsp = yylval; ! #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif ! /* count tokens shifted since error; after three, turn off error status. */ ! if (yyerrstatus) yyerrstatus--; yystate = yyn; goto yynewstate; ! /* Do the default action for the current state. */ yydefault: + yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; ! /* Do a reduction. yyn is the number of a rule to reduce with. */ yyreduce: yylen = yyr2[yyn]; + if (yylen > 0) + yyval = yyvsp[1-yylen]; /* implement default value of the action */ ! #if YYDEBUG != 0 if (yydebug) { ! int i; ! fprintf (stderr, "Reducing via rule %d (line %d), ", ! yyn, yyrline[yyn]); /* Print the symbols being reduced, and their result. */ ! for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) ! fprintf (stderr, "%s ", yytname[yyrhs[i]]); ! fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); } #endif + switch (yyn) { case 1: ! #line 351 "/Users/chet/src/bash/src/parse.y" { /* Case of regular command. Discard the error *************** *** 1467,1474 **** /* discard_parser_constructs (0); */ YYACCEPT; ! } ! break; case 2: ! #line 336 "/usr/homes/chet/src/bash/src/parse.y" { /* Case of regular command, but not a very --- 1301,1308 ---- /* discard_parser_constructs (0); */ YYACCEPT; ! ; ! break;} case 2: ! #line 360 "/Users/chet/src/bash/src/parse.y" { /* Case of regular command, but not a very *************** *** 1476,1483 **** global_command = (COMMAND *)NULL; YYACCEPT; ! } ! break; case 3: ! #line 343 "/usr/homes/chet/src/bash/src/parse.y" { /* Error during parsing. Return NULL command. */ --- 1310,1317 ---- global_command = (COMMAND *)NULL; YYACCEPT; ! ; ! break;} case 3: ! #line 367 "/Users/chet/src/bash/src/parse.y" { /* Error during parsing. Return NULL command. */ *************** *** 1493,1500 **** YYABORT; } ! } ! break; case 4: ! #line 358 "/usr/homes/chet/src/bash/src/parse.y" { /* Case of EOF seen by itself. Do ignoreeof or --- 1327,1334 ---- YYABORT; } ! ; ! break;} case 4: ! #line 382 "/Users/chet/src/bash/src/parse.y" { /* Case of EOF seen by itself. Do ignoreeof or *************** *** 1503,1646 **** handle_eof_input_unit (); YYACCEPT; ! } ! break; case 5: ! #line 368 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.word_list = make_word_list (yyvsp[0].word, (WORD_LIST *)NULL); } ! break; case 6: ! #line 370 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.word_list = make_word_list (yyvsp[0].word, yyvsp[-1].word_list); } ! break; case 7: ! #line 374 "/usr/homes/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (1, r_output_direction, redir); ! } ! break; case 8: ! #line 379 "/usr/homes/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (0, r_input_direction, redir); ! } ! break; case 9: ! #line 384 "/usr/homes/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_output_direction, redir); ! } ! break; case 10: ! #line 389 "/usr/homes/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_input_direction, redir); ! } ! break; case 11: ! #line 394 "/usr/homes/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (1, r_appending_to, redir); ! } ! break; case 12: ! #line 399 "/usr/homes/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_appending_to, redir); ! } ! break; case 13: ! #line 404 "/usr/homes/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (0, r_reading_until, redir); redir_stack[need_here_doc++] = yyval.redirect; ! } ! break; case 14: ! #line 410 "/usr/homes/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_reading_until, redir); redir_stack[need_here_doc++] = yyval.redirect; ! } ! break; case 15: ! #line 416 "/usr/homes/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (0, r_reading_string, redir); ! } ! break; case 16: ! #line 421 "/usr/homes/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_reading_string, redir); ! } ! break; case 17: ! #line 426 "/usr/homes/chet/src/bash/src/parse.y" { redir.dest = yyvsp[0].number; yyval.redirect = make_redirection (0, r_duplicating_input, redir); ! } ! break; case 18: ! #line 431 "/usr/homes/chet/src/bash/src/parse.y" { redir.dest = yyvsp[0].number; yyval.redirect = make_redirection (yyvsp[-2].number, r_duplicating_input, redir); ! } ! break; case 19: ! #line 436 "/usr/homes/chet/src/bash/src/parse.y" { redir.dest = yyvsp[0].number; yyval.redirect = make_redirection (1, r_duplicating_output, redir); ! } ! break; case 20: ! #line 441 "/usr/homes/chet/src/bash/src/parse.y" { redir.dest = yyvsp[0].number; yyval.redirect = make_redirection (yyvsp[-2].number, r_duplicating_output, redir); ! } ! break; case 21: ! #line 446 "/usr/homes/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (0, r_duplicating_input_word, redir); ! } ! break; case 22: ! #line 451 "/usr/homes/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_duplicating_input_word, redir); ! } ! break; case 23: ! #line 456 "/usr/homes/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (1, r_duplicating_output_word, redir); ! } ! break; case 24: ! #line 461 "/usr/homes/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_duplicating_output_word, redir); ! } ! break; case 25: ! #line 466 "/usr/homes/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; --- 1337,1480 ---- handle_eof_input_unit (); YYACCEPT; ! ; ! break;} case 5: ! #line 392 "/Users/chet/src/bash/src/parse.y" ! { yyval.word_list = make_word_list (yyvsp[0].word, (WORD_LIST *)NULL); ; ! break;} case 6: ! #line 394 "/Users/chet/src/bash/src/parse.y" ! { yyval.word_list = make_word_list (yyvsp[0].word, yyvsp[-1].word_list); ; ! break;} case 7: ! #line 398 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (1, r_output_direction, redir); ! ; ! break;} case 8: ! #line 403 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (0, r_input_direction, redir); ! ; ! break;} case 9: ! #line 408 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_output_direction, redir); ! ; ! break;} case 10: ! #line 413 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_input_direction, redir); ! ; ! break;} case 11: ! #line 418 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (1, r_appending_to, redir); ! ; ! break;} case 12: ! #line 423 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_appending_to, redir); ! ; ! break;} case 13: ! #line 428 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (0, r_reading_until, redir); redir_stack[need_here_doc++] = yyval.redirect; ! ; ! break;} case 14: ! #line 434 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_reading_until, redir); redir_stack[need_here_doc++] = yyval.redirect; ! ; ! break;} case 15: ! #line 440 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (0, r_reading_string, redir); ! ; ! break;} case 16: ! #line 445 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_reading_string, redir); ! ; ! break;} case 17: ! #line 450 "/Users/chet/src/bash/src/parse.y" { redir.dest = yyvsp[0].number; yyval.redirect = make_redirection (0, r_duplicating_input, redir); ! ; ! break;} case 18: ! #line 455 "/Users/chet/src/bash/src/parse.y" { redir.dest = yyvsp[0].number; yyval.redirect = make_redirection (yyvsp[-2].number, r_duplicating_input, redir); ! ; ! break;} case 19: ! #line 460 "/Users/chet/src/bash/src/parse.y" { redir.dest = yyvsp[0].number; yyval.redirect = make_redirection (1, r_duplicating_output, redir); ! ; ! break;} case 20: ! #line 465 "/Users/chet/src/bash/src/parse.y" { redir.dest = yyvsp[0].number; yyval.redirect = make_redirection (yyvsp[-2].number, r_duplicating_output, redir); ! ; ! break;} case 21: ! #line 470 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (0, r_duplicating_input_word, redir); ! ; ! break;} case 22: ! #line 475 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_duplicating_input_word, redir); ! ; ! break;} case 23: ! #line 480 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (1, r_duplicating_output_word, redir); ! ; ! break;} case 24: ! #line 485 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_duplicating_output_word, redir); ! ; ! break;} case 25: ! #line 490 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; *************** *** 1648,1655 **** (0, r_deblank_reading_until, redir); redir_stack[need_here_doc++] = yyval.redirect; ! } ! break; case 26: ! #line 473 "/usr/homes/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; --- 1482,1489 ---- (0, r_deblank_reading_until, redir); redir_stack[need_here_doc++] = yyval.redirect; ! ; ! break;} case 26: ! #line 497 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; *************** *** 1657,1745 **** (yyvsp[-2].number, r_deblank_reading_until, redir); redir_stack[need_here_doc++] = yyval.redirect; ! } ! break; case 27: ! #line 480 "/usr/homes/chet/src/bash/src/parse.y" { redir.dest = 0; yyval.redirect = make_redirection (1, r_close_this, redir); ! } ! break; case 28: ! #line 485 "/usr/homes/chet/src/bash/src/parse.y" { redir.dest = 0; yyval.redirect = make_redirection (yyvsp[-2].number, r_close_this, redir); ! } ! break; case 29: ! #line 490 "/usr/homes/chet/src/bash/src/parse.y" { redir.dest = 0; yyval.redirect = make_redirection (0, r_close_this, redir); ! } ! break; case 30: ! #line 495 "/usr/homes/chet/src/bash/src/parse.y" { redir.dest = 0; yyval.redirect = make_redirection (yyvsp[-2].number, r_close_this, redir); ! } ! break; case 31: ! #line 500 "/usr/homes/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (1, r_err_and_out, redir); ! } ! break; case 32: ! #line 505 "/usr/homes/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_input_output, redir); ! } ! break; case 33: ! #line 510 "/usr/homes/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (0, r_input_output, redir); ! } ! break; case 34: ! #line 515 "/usr/homes/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (1, r_output_force, redir); ! } ! break; case 35: ! #line 520 "/usr/homes/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_output_force, redir); ! } ! break; case 36: ! #line 527 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.element.word = yyvsp[0].word; yyval.element.redirect = 0; } ! break; case 37: ! #line 529 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.element.word = yyvsp[0].word; yyval.element.redirect = 0; } ! break; case 38: ! #line 531 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.element.redirect = yyvsp[0].redirect; yyval.element.word = 0; } ! break; case 39: ! #line 535 "/usr/homes/chet/src/bash/src/parse.y" { yyval.redirect = yyvsp[0].redirect; ! } ! break; case 40: ! #line 539 "/usr/homes/chet/src/bash/src/parse.y" { register REDIRECT *t; --- 1491,1579 ---- (yyvsp[-2].number, r_deblank_reading_until, redir); redir_stack[need_here_doc++] = yyval.redirect; ! ; ! break;} case 27: ! #line 504 "/Users/chet/src/bash/src/parse.y" { redir.dest = 0; yyval.redirect = make_redirection (1, r_close_this, redir); ! ; ! break;} case 28: ! #line 509 "/Users/chet/src/bash/src/parse.y" { redir.dest = 0; yyval.redirect = make_redirection (yyvsp[-2].number, r_close_this, redir); ! ; ! break;} case 29: ! #line 514 "/Users/chet/src/bash/src/parse.y" { redir.dest = 0; yyval.redirect = make_redirection (0, r_close_this, redir); ! ; ! break;} case 30: ! #line 519 "/Users/chet/src/bash/src/parse.y" { redir.dest = 0; yyval.redirect = make_redirection (yyvsp[-2].number, r_close_this, redir); ! ; ! break;} case 31: ! #line 524 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (1, r_err_and_out, redir); ! ; ! break;} case 32: ! #line 529 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_input_output, redir); ! ; ! break;} case 33: ! #line 534 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (0, r_input_output, redir); ! ; ! break;} case 34: ! #line 539 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (1, r_output_force, redir); ! ; ! break;} case 35: ! #line 544 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_output_force, redir); ! ; ! break;} case 36: ! #line 551 "/Users/chet/src/bash/src/parse.y" ! { yyval.element.word = yyvsp[0].word; yyval.element.redirect = 0; ; ! break;} case 37: ! #line 553 "/Users/chet/src/bash/src/parse.y" ! { yyval.element.word = yyvsp[0].word; yyval.element.redirect = 0; ; ! break;} case 38: ! #line 555 "/Users/chet/src/bash/src/parse.y" ! { yyval.element.redirect = yyvsp[0].redirect; yyval.element.word = 0; ; ! break;} case 39: ! #line 559 "/Users/chet/src/bash/src/parse.y" { yyval.redirect = yyvsp[0].redirect; ! ; ! break;} case 40: ! #line 563 "/Users/chet/src/bash/src/parse.y" { register REDIRECT *t; *************** *** 1749,1772 **** t->next = yyvsp[0].redirect; yyval.redirect = yyvsp[-1].redirect; ! } ! break; case 41: ! #line 550 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_simple_command (yyvsp[0].element, (COMMAND *)NULL); } ! break; case 42: ! #line 552 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_simple_command (yyvsp[0].element, yyvsp[-1].command); } ! break; case 43: ! #line 556 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = clean_simple_command (yyvsp[0].command); } ! break; case 44: ! #line 558 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; } ! break; case 45: ! #line 560 "/usr/homes/chet/src/bash/src/parse.y" { COMMAND *tc; --- 1583,1606 ---- t->next = yyvsp[0].redirect; yyval.redirect = yyvsp[-1].redirect; ! ; ! break;} case 41: ! #line 574 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = make_simple_command (yyvsp[0].element, (COMMAND *)NULL); ; ! break;} case 42: ! #line 576 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = make_simple_command (yyvsp[0].element, yyvsp[-1].command); ; ! break;} case 43: ! #line 580 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = clean_simple_command (yyvsp[0].command); ; ! break;} case 44: ! #line 582 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; ; ! break;} case 45: ! #line 584 "/Users/chet/src/bash/src/parse.y" { COMMAND *tc; *************** *** 1783,1950 **** tc->redirects = yyvsp[0].redirect; yyval.command = yyvsp[-1].command; ! } ! break; case 46: ! #line 576 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; } ! break; case 47: ! #line 580 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; } ! break; case 48: ! #line 582 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; } ! break; case 49: ! #line 584 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_while_command (yyvsp[-3].command, yyvsp[-1].command); } ! break; case 50: ! #line 586 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_until_command (yyvsp[-3].command, yyvsp[-1].command); } ! break; case 51: ! #line 588 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; } ! break; case 52: ! #line 590 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; } ! break; case 53: ! #line 592 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; } ! break; case 54: ! #line 594 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; } ! break; case 55: ! #line 596 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; } ! break; case 56: ! #line 598 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; } ! break; case 57: ! #line 600 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; } ! break; case 58: ! #line 604 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_for_command (yyvsp[-4].word, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), yyvsp[-1].command); } ! break; case 59: ! #line 606 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_for_command (yyvsp[-4].word, add_string_to_list ("$@", (WORD_LIST *)NULL), yyvsp[-1].command); } ! break; case 60: ! #line 608 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_for_command (yyvsp[-5].word, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), yyvsp[-1].command); } ! break; case 61: ! #line 610 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_for_command (yyvsp[-5].word, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), yyvsp[-1].command); } ! break; case 62: ! #line 612 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_for_command (yyvsp[-8].word, REVERSE_LIST (yyvsp[-5].word_list, WORD_LIST *), yyvsp[-1].command); } ! break; case 63: ! #line 614 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_for_command (yyvsp[-8].word, REVERSE_LIST (yyvsp[-5].word_list, WORD_LIST *), yyvsp[-1].command); } ! break; case 64: ! #line 616 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_for_command (yyvsp[-7].word, (WORD_LIST *)NULL, yyvsp[-1].command); } ! break; case 65: ! #line 618 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_for_command (yyvsp[-7].word, (WORD_LIST *)NULL, yyvsp[-1].command); } ! break; case 66: ! #line 622 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_arith_for_command (yyvsp[-5].word_list, yyvsp[-1].command, arith_for_lineno); } ! break; case 67: ! #line 624 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_arith_for_command (yyvsp[-5].word_list, yyvsp[-1].command, arith_for_lineno); } ! break; case 68: ! #line 626 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_arith_for_command (yyvsp[-3].word_list, yyvsp[-1].command, arith_for_lineno); } ! break; case 69: ! #line 628 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_arith_for_command (yyvsp[-3].word_list, yyvsp[-1].command, arith_for_lineno); } ! break; case 70: ! #line 632 "/usr/homes/chet/src/bash/src/parse.y" { ! yyval.command = make_select_command (yyvsp[-4].word, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), yyvsp[-1].command); ! } ! break; case 71: ! #line 636 "/usr/homes/chet/src/bash/src/parse.y" { ! yyval.command = make_select_command (yyvsp[-4].word, add_string_to_list ("$@", (WORD_LIST *)NULL), yyvsp[-1].command); ! } ! break; case 72: ! #line 640 "/usr/homes/chet/src/bash/src/parse.y" { ! yyval.command = make_select_command (yyvsp[-5].word, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), yyvsp[-1].command); ! } ! break; case 73: ! #line 644 "/usr/homes/chet/src/bash/src/parse.y" { ! yyval.command = make_select_command (yyvsp[-5].word, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), yyvsp[-1].command); ! } ! break; case 74: ! #line 648 "/usr/homes/chet/src/bash/src/parse.y" { ! yyval.command = make_select_command (yyvsp[-8].word, REVERSE_LIST (yyvsp[-5].word_list, WORD_LIST *), yyvsp[-1].command); ! } ! break; case 75: ! #line 652 "/usr/homes/chet/src/bash/src/parse.y" { ! yyval.command = make_select_command (yyvsp[-8].word, REVERSE_LIST (yyvsp[-5].word_list, WORD_LIST *), yyvsp[-1].command); ! } ! break; case 76: ! #line 658 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_case_command (yyvsp[-4].word, (PATTERN_LIST *)NULL); } ! break; case 77: ! #line 660 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_case_command (yyvsp[-5].word, yyvsp[-2].pattern); } ! break; case 78: ! #line 662 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_case_command (yyvsp[-4].word, yyvsp[-1].pattern); } ! break; case 79: ! #line 666 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_function_def (yyvsp[-4].word, yyvsp[0].command, function_dstart, function_bstart); } ! break; case 80: ! #line 669 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_function_def (yyvsp[-4].word, yyvsp[0].command, function_dstart, function_bstart); } ! break; case 81: ! #line 672 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_function_def (yyvsp[-2].word, yyvsp[0].command, function_dstart, function_bstart); } ! break; case 82: ! #line 677 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; } ! break; case 83: ! #line 679 "/usr/homes/chet/src/bash/src/parse.y" { COMMAND *tc; --- 1617,1835 ---- tc->redirects = yyvsp[0].redirect; yyval.command = yyvsp[-1].command; ! ; ! break;} case 46: ! #line 600 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; ; ! break;} case 47: ! #line 604 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; ; ! break;} case 48: ! #line 606 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; ; ! break;} case 49: ! #line 608 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = make_while_command (yyvsp[-3].command, yyvsp[-1].command); ; ! break;} case 50: ! #line 610 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = make_until_command (yyvsp[-3].command, yyvsp[-1].command); ; ! break;} case 51: ! #line 612 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; ; ! break;} case 52: ! #line 614 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; ; ! break;} case 53: ! #line 616 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; ; ! break;} case 54: ! #line 618 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; ; ! break;} case 55: ! #line 620 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; ; ! break;} case 56: ! #line 622 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; ; ! break;} case 57: ! #line 624 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; ; ! break;} case 58: ! #line 628 "/Users/chet/src/bash/src/parse.y" ! { ! yyval.command = make_for_command (yyvsp[-4].word, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), yyvsp[-1].command, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! ; ! break;} case 59: ! #line 633 "/Users/chet/src/bash/src/parse.y" ! { ! yyval.command = make_for_command (yyvsp[-4].word, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), yyvsp[-1].command, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! ; ! break;} case 60: ! #line 638 "/Users/chet/src/bash/src/parse.y" ! { ! yyval.command = make_for_command (yyvsp[-5].word, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), yyvsp[-1].command, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! ; ! break;} case 61: ! #line 643 "/Users/chet/src/bash/src/parse.y" ! { ! yyval.command = make_for_command (yyvsp[-5].word, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), yyvsp[-1].command, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! ; ! break;} case 62: ! #line 648 "/Users/chet/src/bash/src/parse.y" ! { ! yyval.command = make_for_command (yyvsp[-8].word, REVERSE_LIST (yyvsp[-5].word_list, WORD_LIST *), yyvsp[-1].command, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! ; ! break;} case 63: ! #line 653 "/Users/chet/src/bash/src/parse.y" ! { ! yyval.command = make_for_command (yyvsp[-8].word, REVERSE_LIST (yyvsp[-5].word_list, WORD_LIST *), yyvsp[-1].command, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! ; ! break;} case 64: ! #line 658 "/Users/chet/src/bash/src/parse.y" ! { ! yyval.command = make_for_command (yyvsp[-7].word, (WORD_LIST *)NULL, yyvsp[-1].command, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! ; ! break;} case 65: ! #line 663 "/Users/chet/src/bash/src/parse.y" ! { ! yyval.command = make_for_command (yyvsp[-7].word, (WORD_LIST *)NULL, yyvsp[-1].command, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! ; ! break;} case 66: ! #line 670 "/Users/chet/src/bash/src/parse.y" ! { ! yyval.command = make_arith_for_command (yyvsp[-5].word_list, yyvsp[-1].command, arith_for_lineno); ! if (word_top > 0) word_top--; ! ; ! break;} case 67: ! #line 675 "/Users/chet/src/bash/src/parse.y" ! { ! yyval.command = make_arith_for_command (yyvsp[-5].word_list, yyvsp[-1].command, arith_for_lineno); ! if (word_top > 0) word_top--; ! ; ! break;} case 68: ! #line 680 "/Users/chet/src/bash/src/parse.y" ! { ! yyval.command = make_arith_for_command (yyvsp[-3].word_list, yyvsp[-1].command, arith_for_lineno); ! if (word_top > 0) word_top--; ! ; ! break;} case 69: ! #line 685 "/Users/chet/src/bash/src/parse.y" ! { ! yyval.command = make_arith_for_command (yyvsp[-3].word_list, yyvsp[-1].command, arith_for_lineno); ! if (word_top > 0) word_top--; ! ; ! break;} case 70: ! #line 692 "/Users/chet/src/bash/src/parse.y" { ! yyval.command = make_select_command (yyvsp[-4].word, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), yyvsp[-1].command, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! ; ! break;} case 71: ! #line 697 "/Users/chet/src/bash/src/parse.y" { ! yyval.command = make_select_command (yyvsp[-4].word, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), yyvsp[-1].command, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! ; ! break;} case 72: ! #line 702 "/Users/chet/src/bash/src/parse.y" { ! yyval.command = make_select_command (yyvsp[-5].word, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), yyvsp[-1].command, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! ; ! break;} case 73: ! #line 707 "/Users/chet/src/bash/src/parse.y" { ! yyval.command = make_select_command (yyvsp[-5].word, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), yyvsp[-1].command, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! ; ! break;} case 74: ! #line 712 "/Users/chet/src/bash/src/parse.y" { ! yyval.command = make_select_command (yyvsp[-8].word, REVERSE_LIST (yyvsp[-5].word_list, WORD_LIST *), yyvsp[-1].command, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! ; ! break;} case 75: ! #line 717 "/Users/chet/src/bash/src/parse.y" { ! yyval.command = make_select_command (yyvsp[-8].word, REVERSE_LIST (yyvsp[-5].word_list, WORD_LIST *), yyvsp[-1].command, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! ; ! break;} case 76: ! #line 724 "/Users/chet/src/bash/src/parse.y" ! { ! yyval.command = make_case_command (yyvsp[-4].word, (PATTERN_LIST *)NULL, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! ; ! break;} case 77: ! #line 729 "/Users/chet/src/bash/src/parse.y" ! { ! yyval.command = make_case_command (yyvsp[-5].word, yyvsp[-2].pattern, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! ; ! break;} case 78: ! #line 734 "/Users/chet/src/bash/src/parse.y" ! { ! yyval.command = make_case_command (yyvsp[-4].word, yyvsp[-1].pattern, word_lineno[word_top]); ! if (word_top > 0) word_top--; ! ; ! break;} case 79: ! #line 741 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = make_function_def (yyvsp[-4].word, yyvsp[0].command, function_dstart, function_bstart); ; ! break;} case 80: ! #line 744 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = make_function_def (yyvsp[-4].word, yyvsp[0].command, function_dstart, function_bstart); ; ! break;} case 81: ! #line 747 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = make_function_def (yyvsp[-2].word, yyvsp[0].command, function_dstart, function_bstart); ; ! break;} case 82: ! #line 752 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; ; ! break;} case 83: ! #line 754 "/Users/chet/src/bash/src/parse.y" { COMMAND *tc; *************** *** 1974,2070 **** tc->redirects = yyvsp[0].redirect; yyval.command = yyvsp[-1].command; ! } ! break; case 84: ! #line 710 "/usr/homes/chet/src/bash/src/parse.y" { yyval.command = make_subshell_command (yyvsp[-1].command); yyval.command->flags |= CMD_WANT_SUBSHELL; ! } ! break; case 85: ! #line 717 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_if_command (yyvsp[-3].command, yyvsp[-1].command, (COMMAND *)NULL); } ! break; case 86: ! #line 719 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_if_command (yyvsp[-5].command, yyvsp[-3].command, yyvsp[-1].command); } ! break; case 87: ! #line 721 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_if_command (yyvsp[-4].command, yyvsp[-2].command, yyvsp[-1].command); } ! break; case 88: ! #line 726 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_group_command (yyvsp[-1].command); } ! break; case 89: ! #line 730 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_arith_command (yyvsp[0].word_list); } ! break; case 90: ! #line 734 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[-1].command; } ! break; case 91: ! #line 738 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_if_command (yyvsp[-2].command, yyvsp[0].command, (COMMAND *)NULL); } ! break; case 92: ! #line 740 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_if_command (yyvsp[-4].command, yyvsp[-2].command, yyvsp[0].command); } ! break; case 93: ! #line 742 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = make_if_command (yyvsp[-3].command, yyvsp[-1].command, yyvsp[0].command); } ! break; case 95: ! #line 747 "/usr/homes/chet/src/bash/src/parse.y" ! { yyvsp[0].pattern->next = yyvsp[-1].pattern; yyval.pattern = yyvsp[0].pattern; } ! break; case 96: ! #line 751 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.pattern = make_pattern_list (yyvsp[-2].word_list, yyvsp[0].command); } ! break; case 97: ! #line 753 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.pattern = make_pattern_list (yyvsp[-2].word_list, (COMMAND *)NULL); } ! break; case 98: ! #line 755 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.pattern = make_pattern_list (yyvsp[-2].word_list, yyvsp[0].command); } ! break; case 99: ! #line 757 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.pattern = make_pattern_list (yyvsp[-2].word_list, (COMMAND *)NULL); } ! break; case 101: ! #line 762 "/usr/homes/chet/src/bash/src/parse.y" ! { yyvsp[-1].pattern->next = yyvsp[-2].pattern; yyval.pattern = yyvsp[-1].pattern; } ! break; case 102: ! #line 766 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.word_list = make_word_list (yyvsp[0].word, (WORD_LIST *)NULL); } ! break; case 103: ! #line 768 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.word_list = make_word_list (yyvsp[0].word, yyvsp[-2].word_list); } ! break; case 104: ! #line 777 "/usr/homes/chet/src/bash/src/parse.y" { yyval.command = yyvsp[0].command; if (need_here_doc) gather_here_documents (); ! } ! break; case 106: ! #line 786 "/usr/homes/chet/src/bash/src/parse.y" { yyval.command = yyvsp[0].command; ! } ! break; case 108: ! #line 793 "/usr/homes/chet/src/bash/src/parse.y" { if (yyvsp[-2].command->type == cm_connection) --- 1859,1955 ---- tc->redirects = yyvsp[0].redirect; yyval.command = yyvsp[-1].command; ! ; ! break;} case 84: ! #line 785 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_subshell_command (yyvsp[-1].command); yyval.command->flags |= CMD_WANT_SUBSHELL; ! ; ! break;} case 85: ! #line 792 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = make_if_command (yyvsp[-3].command, yyvsp[-1].command, (COMMAND *)NULL); ; ! break;} case 86: ! #line 794 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = make_if_command (yyvsp[-5].command, yyvsp[-3].command, yyvsp[-1].command); ; ! break;} case 87: ! #line 796 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = make_if_command (yyvsp[-4].command, yyvsp[-2].command, yyvsp[-1].command); ; ! break;} case 88: ! #line 801 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = make_group_command (yyvsp[-1].command); ; ! break;} case 89: ! #line 805 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = make_arith_command (yyvsp[0].word_list); ; ! break;} case 90: ! #line 809 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[-1].command; ; ! break;} case 91: ! #line 813 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = make_if_command (yyvsp[-2].command, yyvsp[0].command, (COMMAND *)NULL); ; ! break;} case 92: ! #line 815 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = make_if_command (yyvsp[-4].command, yyvsp[-2].command, yyvsp[0].command); ; ! break;} case 93: ! #line 817 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = make_if_command (yyvsp[-3].command, yyvsp[-1].command, yyvsp[0].command); ; ! break;} case 95: ! #line 822 "/Users/chet/src/bash/src/parse.y" ! { yyvsp[0].pattern->next = yyvsp[-1].pattern; yyval.pattern = yyvsp[0].pattern; ; ! break;} case 96: ! #line 826 "/Users/chet/src/bash/src/parse.y" ! { yyval.pattern = make_pattern_list (yyvsp[-2].word_list, yyvsp[0].command); ; ! break;} case 97: ! #line 828 "/Users/chet/src/bash/src/parse.y" ! { yyval.pattern = make_pattern_list (yyvsp[-2].word_list, (COMMAND *)NULL); ; ! break;} case 98: ! #line 830 "/Users/chet/src/bash/src/parse.y" ! { yyval.pattern = make_pattern_list (yyvsp[-2].word_list, yyvsp[0].command); ; ! break;} case 99: ! #line 832 "/Users/chet/src/bash/src/parse.y" ! { yyval.pattern = make_pattern_list (yyvsp[-2].word_list, (COMMAND *)NULL); ; ! break;} case 101: ! #line 837 "/Users/chet/src/bash/src/parse.y" ! { yyvsp[-1].pattern->next = yyvsp[-2].pattern; yyval.pattern = yyvsp[-1].pattern; ; ! break;} case 102: ! #line 841 "/Users/chet/src/bash/src/parse.y" ! { yyval.word_list = make_word_list (yyvsp[0].word, (WORD_LIST *)NULL); ; ! break;} case 103: ! #line 843 "/Users/chet/src/bash/src/parse.y" ! { yyval.word_list = make_word_list (yyvsp[0].word, yyvsp[-2].word_list); ; ! break;} case 104: ! #line 852 "/Users/chet/src/bash/src/parse.y" { yyval.command = yyvsp[0].command; if (need_here_doc) gather_here_documents (); ! ; ! break;} case 106: ! #line 861 "/Users/chet/src/bash/src/parse.y" { yyval.command = yyvsp[0].command; ! ; ! break;} case 108: ! #line 868 "/Users/chet/src/bash/src/parse.y" { if (yyvsp[-2].command->type == cm_connection) *************** *** 2072,2087 **** else yyval.command = command_connect (yyvsp[-2].command, (COMMAND *)NULL, '&'); ! } ! break; case 110: ! #line 804 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, AND_AND); } ! break; case 111: ! #line 806 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, OR_OR); } ! break; case 112: ! #line 808 "/usr/homes/chet/src/bash/src/parse.y" { if (yyvsp[-3].command->type == cm_connection) --- 1957,1972 ---- else yyval.command = command_connect (yyvsp[-2].command, (COMMAND *)NULL, '&'); ! ; ! break;} case 110: ! #line 879 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, AND_AND); ; ! break;} case 111: ! #line 881 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, OR_OR); ; ! break;} case 112: ! #line 883 "/Users/chet/src/bash/src/parse.y" { if (yyvsp[-3].command->type == cm_connection) *************** *** 2089,2116 **** else yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, '&'); ! } ! break; case 113: ! #line 815 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, ';'); } ! break; case 114: ! #line 817 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, ';'); } ! break; case 115: ! #line 819 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; } ! break; case 123: ! #line 842 "/usr/homes/chet/src/bash/src/parse.y" { yyval.command = yyvsp[0].command; if (need_here_doc) gather_here_documents (); ! } ! break; case 124: ! #line 848 "/usr/homes/chet/src/bash/src/parse.y" { if (yyvsp[-1].command->type == cm_connection) --- 1974,2013 ---- else yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, '&'); ! ; ! break;} case 113: ! #line 890 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, ';'); ; ! break;} case 114: ! #line 892 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, ';'); ; ! break;} case 115: ! #line 894 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; ; ! break;} ! case 118: ! #line 902 "/Users/chet/src/bash/src/parse.y" ! { yyval.number = '\n'; ; ! break;} ! case 119: ! #line 904 "/Users/chet/src/bash/src/parse.y" ! { yyval.number = ';'; ; ! break;} ! case 120: ! #line 906 "/Users/chet/src/bash/src/parse.y" ! { yyval.number = yacc_EOF; ; ! break;} case 123: ! #line 920 "/Users/chet/src/bash/src/parse.y" { yyval.command = yyvsp[0].command; if (need_here_doc) gather_here_documents (); ! ; ! break;} case 124: ! #line 926 "/Users/chet/src/bash/src/parse.y" { if (yyvsp[-1].command->type == cm_connection) *************** *** 2120,2143 **** if (need_here_doc) gather_here_documents (); ! } ! break; case 125: ! #line 857 "/usr/homes/chet/src/bash/src/parse.y" { yyval.command = yyvsp[-1].command; if (need_here_doc) gather_here_documents (); ! } ! break; case 126: ! #line 865 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, AND_AND); } ! break; case 127: ! #line 867 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, OR_OR); } ! break; case 128: ! #line 869 "/usr/homes/chet/src/bash/src/parse.y" { if (yyvsp[-2].command->type == cm_connection) --- 2017,2040 ---- if (need_here_doc) gather_here_documents (); ! ; ! break;} case 125: ! #line 935 "/Users/chet/src/bash/src/parse.y" { yyval.command = yyvsp[-1].command; if (need_here_doc) gather_here_documents (); ! ; ! break;} case 126: ! #line 943 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, AND_AND); ; ! break;} case 127: ! #line 945 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, OR_OR); ; ! break;} case 128: ! #line 947 "/Users/chet/src/bash/src/parse.y" { if (yyvsp[-2].command->type == cm_connection) *************** *** 2145,2236 **** else yyval.command = command_connect (yyvsp[-2].command, yyvsp[0].command, '&'); ! } ! break; case 129: ! #line 876 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = command_connect (yyvsp[-2].command, yyvsp[0].command, ';'); } ! break; case 130: ! #line 879 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; } ! break; case 131: ! #line 883 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; } ! break; case 132: ! #line 885 "/usr/homes/chet/src/bash/src/parse.y" { yyvsp[0].command->flags |= CMD_INVERT_RETURN; yyval.command = yyvsp[0].command; ! } ! break; case 133: ! #line 890 "/usr/homes/chet/src/bash/src/parse.y" { yyvsp[0].command->flags |= yyvsp[-1].number; yyval.command = yyvsp[0].command; ! } ! break; case 134: ! #line 895 "/usr/homes/chet/src/bash/src/parse.y" { yyvsp[0].command->flags |= yyvsp[-2].number|CMD_INVERT_RETURN; yyval.command = yyvsp[0].command; ! } ! break; case 135: ! #line 900 "/usr/homes/chet/src/bash/src/parse.y" { yyvsp[0].command->flags |= yyvsp[-1].number|CMD_INVERT_RETURN; yyval.command = yyvsp[0].command; ! } ! break; case 136: ! #line 908 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, '|'); } ! break; case 137: ! #line 910 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; } ! break; case 138: ! #line 914 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.number = CMD_TIME_PIPELINE; } ! break; case 139: ! #line 916 "/usr/homes/chet/src/bash/src/parse.y" ! { yyval.number = CMD_TIME_PIPELINE|CMD_TIME_POSIX; } ! break; } ! ! #line 705 "/usr/local/share/bison/bison.simple" ! yyvsp -= yylen; yyssp -= yylen; ! #if YYLSP_NEEDED yylsp -= yylen; #endif ! #if YYDEBUG if (yydebug) { ! short *yyssp1 = yyss - 1; ! YYFPRINTF (stderr, "state stack now"); ! while (yyssp1 != yyssp) ! YYFPRINTF (stderr, " %d", *++yyssp1); ! YYFPRINTF (stderr, "\n"); } #endif *++yyvsp = yyval; ! #if YYLSP_NEEDED ! *++yylsp = yyloc; #endif ! /* Now `shift' the result of the reduction. Determine what state ! that goes to, based on the state we popped back to and the rule ! number reduced by. */ yyn = yyr1[yyn]; --- 2042,2166 ---- else yyval.command = command_connect (yyvsp[-2].command, yyvsp[0].command, '&'); ! ; ! break;} case 129: ! #line 954 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = command_connect (yyvsp[-2].command, yyvsp[0].command, ';'); ; ! break;} case 130: ! #line 957 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; ; ! break;} case 131: ! #line 961 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; ; ! break;} case 132: ! #line 963 "/Users/chet/src/bash/src/parse.y" { yyvsp[0].command->flags |= CMD_INVERT_RETURN; yyval.command = yyvsp[0].command; ! ; ! break;} case 133: ! #line 968 "/Users/chet/src/bash/src/parse.y" { yyvsp[0].command->flags |= yyvsp[-1].number; yyval.command = yyvsp[0].command; ! ; ! break;} case 134: ! #line 973 "/Users/chet/src/bash/src/parse.y" { yyvsp[0].command->flags |= yyvsp[-2].number|CMD_INVERT_RETURN; yyval.command = yyvsp[0].command; ! ; ! break;} case 135: ! #line 978 "/Users/chet/src/bash/src/parse.y" { yyvsp[0].command->flags |= yyvsp[-1].number|CMD_INVERT_RETURN; yyval.command = yyvsp[0].command; ! ; ! break;} case 136: ! #line 983 "/Users/chet/src/bash/src/parse.y" ! { ! ELEMENT x; ! ! /* Boy, this is unclean. `time' by itself can ! time a null command. We cheat and push a ! newline back if the list_terminator was a newline ! to avoid the double-newline problem (one to ! terminate this, one to terminate the command) */ ! x.word = 0; ! x.redirect = 0; ! yyval.command = make_simple_command (x, (COMMAND *)NULL); ! yyval.command->flags |= yyvsp[-1].number; ! /* XXX - let's cheat and push a newline back */ ! if (yyvsp[0].number == '\n') ! token_to_read = '\n'; ! ; ! break;} case 137: ! #line 1004 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, '|'); ; ! break;} case 138: ! #line 1006 "/Users/chet/src/bash/src/parse.y" ! { yyval.command = yyvsp[0].command; ; ! break;} case 139: ! #line 1010 "/Users/chet/src/bash/src/parse.y" ! { yyval.number = CMD_TIME_PIPELINE; ; ! break;} ! case 140: ! #line 1012 "/Users/chet/src/bash/src/parse.y" ! { yyval.number = CMD_TIME_PIPELINE|CMD_TIME_POSIX; ; ! break;} } ! /* the action file gets copied in in place of this dollarsign */ ! #line 543 "/usr/share/bison.simple" yyvsp -= yylen; yyssp -= yylen; ! #ifdef YYLSP_NEEDED yylsp -= yylen; #endif ! #if YYDEBUG != 0 if (yydebug) { ! short *ssp1 = yyss - 1; ! fprintf (stderr, "state stack now"); ! while (ssp1 != yyssp) ! fprintf (stderr, " %d", *++ssp1); ! fprintf (stderr, "\n"); } #endif *++yyvsp = yyval; ! ! #ifdef YYLSP_NEEDED ! yylsp++; ! if (yylen == 0) ! { ! yylsp->first_line = yylloc.first_line; ! yylsp->first_column = yylloc.first_column; ! yylsp->last_line = (yylsp-1)->last_line; ! yylsp->last_column = (yylsp-1)->last_column; ! yylsp->text = 0; ! } ! else ! { ! yylsp->last_line = (yylsp+yylen-1)->last_line; ! yylsp->last_column = (yylsp+yylen-1)->last_column; ! } #endif ! /* Now "shift" the result of the reduction. ! Determine what state that goes to, ! based on the state we popped back to ! and the rule number reduced by. */ yyn = yyr1[yyn]; *************** *** 2244,2254 **** goto yynewstate; ! /*------------------------------------. ! | yyerrlab -- here on detecting error | ! `------------------------------------*/ ! yyerrlab: ! /* If not already recovering from an error, report this error. */ ! if (!yyerrstatus) { ++yynerrs; --- 2174,2181 ---- goto yynewstate; + yyerrlab: /* here on detecting error */ ! if (! yyerrstatus) ! /* If not already recovering from an error, report this error. */ { ++yynerrs; *************** *** 2259,2327 **** if (yyn > YYFLAG && yyn < YYLAST) { ! YYSIZE_T yysize = 0; ! char *yymsg; ! int yyx, yycount; ! ! yycount = 0; ! /* Start YYX at -YYN if negative to avoid negative indexes in ! YYCHECK. */ ! for (yyx = yyn < 0 ? -yyn : 0; ! yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) ! if (yycheck[yyx + yyn] == yyx) ! yysize += yystrlen (yytname[yyx]) + 15, yycount++; ! yysize += yystrlen ("parse error, unexpected ") + 1; ! yysize += yystrlen (yytname[YYTRANSLATE (yychar)]); ! yymsg = (char *) YYSTACK_ALLOC (yysize); ! if (yymsg != 0) { ! char *yyp = yystpcpy (yymsg, "parse error, unexpected "); ! yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]); ! if (yycount < 5) { ! yycount = 0; ! for (yyx = yyn < 0 ? -yyn : 0; ! yyx < (int) (sizeof (yytname) / sizeof (char *)); ! yyx++) ! if (yycheck[yyx + yyn] == yyx) { ! const char *yyq = ! yycount ? ", expecting " : " or "; ! yyp = yystpcpy (yyp, yyq); ! yyp = yystpcpy (yyp, yytname[yyx]); ! yycount++; } } ! yyerror (yymsg); ! YYSTACK_FREE (yymsg); } else ! yyerror ("parse error; also virtual memory exhausted"); } else ! #endif /* defined (YYERROR_VERBOSE) */ ! yyerror ("parse error"); } - goto yyerrlab1; - /*--------------------------------------------------. - | yyerrlab1 -- error raised explicitly by an action | - `--------------------------------------------------*/ - yyerrlab1: if (yyerrstatus == 3) { ! /* If just tried and failed to reuse lookahead token after an ! error, discard it. */ /* return failure if at end of input */ if (yychar == YYEOF) YYABORT; ! YYDPRINTF ((stderr, "Discarding token %d (%s).\n", ! yychar, yytname[yychar1])); yychar = YYEMPTY; } ! /* Else will try to reuse lookahead token after shifting the error ! token. */ yyerrstatus = 3; /* Each real token shifted decrements this */ --- 2186,2249 ---- if (yyn > YYFLAG && yyn < YYLAST) { ! int size = 0; ! char *msg; ! int x, count; ! ! count = 0; ! /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ ! for (x = (yyn < 0 ? -yyn : 0); ! x < (sizeof(yytname) / sizeof(char *)); x++) ! if (yycheck[x + yyn] == x) ! size += strlen(yytname[x]) + 15, count++; ! msg = (char *) malloc(size + 15); ! if (msg != 0) { ! strcpy(msg, "parse error"); ! if (count < 5) { ! count = 0; ! for (x = (yyn < 0 ? -yyn : 0); ! x < (sizeof(yytname) / sizeof(char *)); x++) ! if (yycheck[x + yyn] == x) { ! strcat(msg, count == 0 ? ", expecting `" : " or `"); ! strcat(msg, yytname[x]); ! strcat(msg, "'"); ! count++; } } ! yyerror(msg); ! free(msg); } else ! yyerror ("parse error; also virtual memory exceeded"); } else ! #endif /* YYERROR_VERBOSE */ ! yyerror("parse error"); } + goto yyerrlab1; + yyerrlab1: /* here on error raised explicitly by an action */ if (yyerrstatus == 3) { ! /* if just tried and failed to reuse lookahead token after an error, discard it. */ /* return failure if at end of input */ if (yychar == YYEOF) YYABORT; ! ! #if YYDEBUG != 0 ! if (yydebug) ! fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); ! #endif ! yychar = YYEMPTY; } ! /* Else will try to reuse lookahead token ! after shifting the error token. */ yyerrstatus = 3; /* Each real token shifted decrements this */ *************** *** 2329,2377 **** goto yyerrhandle; - /*-------------------------------------------------------------------. - | yyerrdefault -- current state does not do anything special for the | - | error token. | - `-------------------------------------------------------------------*/ - yyerrdefault: #if 0 /* This is wrong; only states that explicitly want error tokens should shift them. */ ! ! /* If its default is to accept any token, ok. Otherwise pop it. */ ! yyn = yydefact[yystate]; ! if (yyn) ! goto yydefault; #endif ! /*---------------------------------------------------------------. ! | yyerrpop -- pop the current state because it cannot handle the | ! | error token | ! `---------------------------------------------------------------*/ ! yyerrpop: ! if (yyssp == yyss) ! YYABORT; yyvsp--; yystate = *--yyssp; ! #if YYLSP_NEEDED yylsp--; #endif ! #if YYDEBUG if (yydebug) { ! short *yyssp1 = yyss - 1; ! YYFPRINTF (stderr, "Error: state stack now"); ! while (yyssp1 != yyssp) ! YYFPRINTF (stderr, " %d", *++yyssp1); ! YYFPRINTF (stderr, "\n"); } #endif - /*--------------. - | yyerrhandle. | - `--------------*/ yyerrhandle: yyn = yypact[yystate]; if (yyn == YYFLAG) --- 2251,2285 ---- goto yyerrhandle; + yyerrdefault: /* current state does not do anything special for the error token. */ #if 0 /* This is wrong; only states that explicitly want error tokens should shift them. */ ! yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ ! if (yyn) goto yydefault; #endif + yyerrpop: /* pop the current state because it cannot handle the error token */ ! if (yyssp == yyss) YYABORT; yyvsp--; yystate = *--yyssp; ! #ifdef YYLSP_NEEDED yylsp--; #endif ! #if YYDEBUG != 0 if (yydebug) { ! short *ssp1 = yyss - 1; ! fprintf (stderr, "Error: state stack now"); ! while (ssp1 != yyssp) ! fprintf (stderr, " %d", *++ssp1); ! fprintf (stderr, "\n"); } #endif yyerrhandle: + yyn = yypact[yystate]; if (yyn == YYFLAG) *************** *** 2396,2403 **** YYACCEPT; ! YYDPRINTF ((stderr, "Shifting error token, ")); *++yyvsp = yylval; ! #if YYLSP_NEEDED *++yylsp = yylloc; #endif --- 2304,2314 ---- YYACCEPT; ! #if YYDEBUG != 0 ! if (yydebug) ! fprintf(stderr, "Shifting error token, "); ! #endif *++yyvsp = yylval; ! #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif *************** *** 2406,2454 **** goto yynewstate; ! /*-------------------------------------. ! | yyacceptlab -- YYACCEPT comes here. | ! `-------------------------------------*/ ! yyacceptlab: ! yyresult = 0; ! goto yyreturn; ! ! /*-----------------------------------. ! | yyabortlab -- YYABORT comes here. | ! `-----------------------------------*/ ! yyabortlab: ! yyresult = 1; ! goto yyreturn; ! ! /*---------------------------------------------. ! | yyoverflowab -- parser overflow comes here. | ! `---------------------------------------------*/ ! yyoverflowlab: ! yyerror ("parser stack overflow"); ! yyresult = 2; ! /* Fall through. */ ! ! yyreturn: ! #ifndef yyoverflow ! if (yyss != yyssa) ! YYSTACK_FREE (yyss); #endif ! return yyresult; } ! #line 918 "/usr/homes/chet/src/bash/src/parse.y" /* Possible states for the parser that require it to do special things. */ ! #define PST_CASEPAT 0x001 /* in a case pattern list */ ! #define PST_ALEXPNEXT 0x002 /* expand next word for aliases */ ! #define PST_ALLOWOPNBRC 0x004 /* allow open brace for function def */ ! #define PST_NEEDCLOSBRC 0x008 /* need close brace */ ! #define PST_DBLPAREN 0x010 /* double-paren parsing */ ! #define PST_SUBSHELL 0x020 /* ( ... ) subshell */ ! #define PST_CMDSUBST 0x040 /* $( ... ) command substitution */ ! #define PST_CASESTMT 0x080 /* parsing a case statement */ ! #define PST_CONDCMD 0x100 /* parsing a [[...]] command */ ! #define PST_CONDEXPR 0x200 /* parsing the guts of [[...]] */ ! #define PST_ARITHFOR 0x400 /* parsing an arithmetic for command */ /* Initial size to allocate for tokens, and the --- 2317,2362 ---- goto yynewstate; + yyacceptlab: + /* YYACCEPT comes here. */ + if (yyfree_stacks) + { + free (yyss); + free (yyvs); + #ifdef YYLSP_NEEDED + free (yyls); + #endif + } + return 0; ! yyabortlab: ! /* YYABORT comes here. */ ! if (yyfree_stacks) ! { ! free (yyss); ! free (yyvs); ! #ifdef YYLSP_NEEDED ! free (yyls); #endif ! } ! return 1; } ! #line 1014 "/Users/chet/src/bash/src/parse.y" /* Possible states for the parser that require it to do special things. */ ! #define PST_CASEPAT 0x0001 /* in a case pattern list */ ! #define PST_ALEXPNEXT 0x0002 /* expand next word for aliases */ ! #define PST_ALLOWOPNBRC 0x0004 /* allow open brace for function def */ ! #define PST_NEEDCLOSBRC 0x0008 /* need close brace */ ! #define PST_DBLPAREN 0x0010 /* double-paren parsing */ ! #define PST_SUBSHELL 0x0020 /* ( ... ) subshell */ ! #define PST_CMDSUBST 0x0040 /* $( ... ) command substitution */ ! #define PST_CASESTMT 0x0080 /* parsing a case statement */ ! #define PST_CONDCMD 0x0100 /* parsing a [[...]] command */ ! #define PST_CONDEXPR 0x0200 /* parsing the guts of [[...]] */ ! #define PST_ARITHFOR 0x0400 /* parsing an arithmetic for command */ ! #define PST_ALEXPAND 0x0800 /* OK to expand aliases - unused */ ! #define PST_CMDTOKEN 0x1000 /* command token OK - unused */ ! #define PST_COMPASSIGN 0x2000 /* parsing x=(...) compound assignment */ /* Initial size to allocate for tokens, and the *************** *** 2457,2460 **** --- 2365,2378 ---- #define TOKEN_DEFAULT_GROW_SIZE 512 + /* Should we call prompt_again? */ + #define SHOULD_PROMPT() \ + (interactive && (bash_input.type == st_stdin || bash_input.type == st_stream)) + + #if defined (ALIAS) + # define expanding_alias() (pushed_string_list && pushed_string_list->expander) + #else + # define expanding_alias() 0 + #endif + /* The token currently being read. */ static int current_token; *************** *** 2470,2480 **** static int two_tokens_ago; - /* If non-zero, it is the token that we want read_token to return - regardless of what text is (or isn't) present to be read. This - is reset by read_token. If token_to_read == WORD or - ASSIGNMENT_WORD, yylval.word should be set to word_desc_to_read. */ - static int token_to_read; - static WORD_DESC *word_desc_to_read; - /* The current parser state. */ static int parser_state; --- 2388,2391 ---- *************** *** 2921,2928 **** #if defined (ALIAS) || defined (DPAREN_ARITHMETIC) - #if !defined (ALIAS) - typedef void *alias_t; - #endif - #define END_OF_ALIAS 0 --- 2832,2835 ---- *************** *** 2984,2988 **** shell_input_line_index = 0; shell_input_line_terminator = '\0'; ! parser_state &= ~PST_ALEXPNEXT; set_line_mbstate (); --- 2891,2897 ---- shell_input_line_index = 0; shell_input_line_terminator = '\0'; ! #if 0 ! parser_state &= ~PST_ALEXPNEXT; /* XXX */ ! #endif set_line_mbstate (); *************** *** 3045,3048 **** --- 2954,2965 ---- #endif /* ALIAS || DPAREN_ARITHMETIC */ + void + free_pushed_string_input () + { + #if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + free_string_list (); + #endif + } + /* Return a line of text, taken from wherever yylex () reads input. If there is no more input, then we return NULL. If REMOVE_QUOTED_NEWLINE *************** *** 3058,3064 **** #if defined (READLINE) ! if (interactive && bash_input.type != st_string && no_line_editing) #else ! if (interactive && bash_input.type != st_string) #endif print_prompt (); --- 2975,2981 ---- #if defined (READLINE) ! if (no_line_editing && SHOULD_PROMPT ()) #else ! if (SHOULD_PROMPT ()) #endif print_prompt (); *************** *** 3109,3113 **** peekc = yy_getc (); if (peekc == '\n') ! continue; /* Make the unquoted \ pair disappear. */ else { --- 3026,3033 ---- peekc = yy_getc (); if (peekc == '\n') ! { ! line_number++; ! continue; /* Make the unquoted \ pair disappear. */ ! } else { *************** *** 3138,3142 **** { prompt_string_pointer = &ps2_prompt; ! prompt_again (); return (read_a_line (remove_quoted_newline)); } --- 3058,3063 ---- { prompt_string_pointer = &ps2_prompt; ! if (SHOULD_PROMPT()) ! prompt_again (); return (read_a_line (remove_quoted_newline)); } *************** *** 3300,3303 **** --- 3221,3230 ---- shell_input_line_terminator = 0; + /* If the shell is interatctive, but not currently printing a prompt + (interactive_shell && interactive == 0), we don't want to print + notifies or cleanup the jobs -- we want to defer it until we do + print the next prompt. */ + if (interactive_shell == 0 || SHOULD_PROMPT()) + { #if defined (JOB_CONTROL) /* This can cause a problem when reading a command as the result *************** *** 3305,3317 **** had better not cause jobs to disappear from the job table in that case, or we will have big trouble. */ ! notify_and_cleanup (); #else /* !JOB_CONTROL */ ! cleanup_dead_jobs (); #endif /* !JOB_CONTROL */ #if defined (READLINE) ! if (interactive && bash_input.type != st_string && no_line_editing) #else ! if (interactive && bash_input.type != st_string) #endif print_prompt (); --- 3232,3245 ---- had better not cause jobs to disappear from the job table in that case, or we will have big trouble. */ ! notify_and_cleanup (); #else /* !JOB_CONTROL */ ! cleanup_dead_jobs (); #endif /* !JOB_CONTROL */ + } #if defined (READLINE) ! if (no_line_editing && SHOULD_PROMPT()) #else ! if (SHOULD_PROMPT()) #endif print_prompt (); *************** *** 3433,3437 **** shell_input_line_size = 0; prompt_string_pointer = ¤t_prompt_string; ! prompt_again (); goto restart_read; } --- 3361,3366 ---- shell_input_line_size = 0; prompt_string_pointer = ¤t_prompt_string; ! if (SHOULD_PROMPT ()) ! prompt_again (); goto restart_read; } *************** *** 3459,3463 **** if MBTEST(uc == '\\' && remove_quoted_newline && shell_input_line[shell_input_line_index] == '\n') { ! prompt_again (); line_number++; goto restart_read; --- 3388,3393 ---- if MBTEST(uc == '\\' && remove_quoted_newline && shell_input_line[shell_input_line_index] == '\n') { ! if (SHOULD_PROMPT ()) ! prompt_again (); line_number++; goto restart_read; *************** *** 3472,3488 **** if (!uc && (pushed_string_list != (STRING_SAVER *)NULL)) { ! if (mustpop) ! { ! pop_string (); ! uc = shell_input_line[shell_input_line_index]; ! if (uc) ! shell_input_line_index++; ! mustpop--; ! } ! else ! { ! mustpop++; ! uc = ' '; ! } } #endif /* ALIAS || DPAREN_ARITHMETIC */ --- 3402,3409 ---- if (!uc && (pushed_string_list != (STRING_SAVER *)NULL)) { ! pop_string (); ! uc = shell_input_line[shell_input_line_index]; ! if (uc) ! shell_input_line_index++; } #endif /* ALIAS || DPAREN_ARITHMETIC */ *************** *** 3538,3549 **** char *command; { - sh_builtin_func_t *temp_last, *temp_this; char *last_lastarg; ! int temp_exit_value, temp_eof_encountered; ! temp_last = last_shell_builtin; ! temp_this = this_shell_builtin; ! temp_exit_value = last_command_exit_value; ! temp_eof_encountered = eof_encountered; last_lastarg = get_string_value ("_"); if (last_lastarg) --- 3459,3466 ---- char *command; { char *last_lastarg; ! sh_parser_state_t ps; ! save_parser_state (&ps); last_lastarg = get_string_value ("_"); if (last_lastarg) *************** *** 3552,3560 **** parse_and_execute (savestring (command), "PROMPT_COMMAND", SEVAL_NONINT|SEVAL_NOHIST); ! last_shell_builtin = temp_last; ! this_shell_builtin = temp_this; ! last_command_exit_value = temp_exit_value; ! eof_encountered = temp_eof_encountered; ! bind_variable ("_", last_lastarg); FREE (last_lastarg); --- 3469,3473 ---- parse_and_execute (savestring (command), "PROMPT_COMMAND", SEVAL_NONINT|SEVAL_NOHIST); ! restore_parser_state (&ps); bind_variable ("_", last_lastarg); FREE (last_lastarg); *************** *** 3596,3600 **** /* Avoid printing a prompt if we're not going to read anything, e.g. after resetting the parser with read_token (RESET). */ ! if (token_to_read == 0 && interactive) prompt_again (); } --- 3509,3513 ---- /* Avoid printing a prompt if we're not going to read anything, e.g. after resetting the parser with read_token (RESET). */ ! if (token_to_read == 0 && SHOULD_PROMPT ()) prompt_again (); } *************** *** 3630,3635 **** ((token) != SEMI_SEMI && reserved_word_acceptable(token))) ! #define assignment_acceptable(token) command_token_position(token) && \ ! ((parser_state & PST_CASEPAT) == 0) /* Check to see if TOKEN is a reserved word and return the token --- 3543,3548 ---- ((token) != SEMI_SEMI && reserved_word_acceptable(token))) ! #define assignment_acceptable(token) \ ! (command_token_position(token) && ((parser_state & PST_CASEPAT) == 0)) /* Check to see if TOKEN is a reserved word and return the token *************** *** 3646,3650 **** if ((parser_state & PST_CASEPAT) && (word_token_alist[i].token != ESAC)) \ break; \ ! if (word_token_alist[i].token == TIME) \ break; \ if (word_token_alist[i].token == ESAC) \ --- 3559,3563 ---- if ((parser_state & PST_CASEPAT) && (word_token_alist[i].token != ESAC)) \ break; \ ! if (word_token_alist[i].token == TIME && time_command_acceptable () == 0) \ break; \ if (word_token_alist[i].token == ESAC) \ *************** *** 3679,3682 **** --- 3592,3612 ---- Special cases that disqualify: In a pattern list in a case statement (parser_state & PST_CASEPAT). */ + + static char * + mk_alexpansion (s) + char *s; + { + int l; + char *r; + + l = strlen (s); + r = xmalloc (l + 2); + strcpy (r, s); + if (r[l -1] != ' ') + r[l++] = ' '; + r[l] = '\0'; + return r; + } + static int alias_expand_token (tokstr) *************** *** 3695,3699 **** return (NO_EXPANSION); ! expanded = ap ? savestring (ap->value) : (char *)NULL; if (expanded) { --- 3625,3634 ---- return (NO_EXPANSION); ! /* mk_alexpansion puts an extra space on the end of the alias expansion, ! so the lookahead by the parser works right. If this gets changed, ! make sure the code in shell_getc that deals with reaching the end of ! an expanded alias is changed with it. */ ! expanded = ap ? mk_alexpansion (ap->value) : (char *)NULL; ! if (expanded) { *************** *** 3839,3846 **** --- 3774,3783 ---- #endif + #if 0 #if defined (COMMAND_TIMING) if (STREQ (token, "time") && ((parser_state & PST_CASEPAT) == 0) && time_command_acceptable ()) return (TIME); #endif /* COMMAND_TIMING */ + #endif #if defined (COND_COMMAND) /* [[ */ *************** *** 4087,4090 **** --- 4024,4028 ---- #define P_FIRSTCLOSE 0x01 #define P_ALLOWESC 0x02 + #define P_DQUOTE 0x04 static char matched_pair_error; *************** *** 4098,4106 **** int pass_next_character, nestlen, ttranslen, start_lineno; char *ret, *nestret, *ttrans; ! int retind, retsize; count = 1; pass_next_character = was_dollar = 0; ret = (char *)xmalloc (retsize = 64); retind = 0; --- 4036,4047 ---- int pass_next_character, nestlen, ttranslen, start_lineno; char *ret, *nestret, *ttrans; ! int retind, retsize, rflags; count = 1; pass_next_character = was_dollar = 0; + /* RFLAGS is the set of flags we want to pass to recursive calls. */ + rflags = (qc == '"') ? P_DQUOTE : (flags & P_DQUOTE); + ret = (char *)xmalloc (retsize = 64); retind = 0; *************** *** 4113,4117 **** { free (ret); ! parser_error (start_lineno, "unexpected EOF while looking for matching `%c'", close); EOF_Reached = 1; /* XXX */ return (&matched_pair_error); --- 4054,4058 ---- { free (ret); ! parser_error (start_lineno, _("unexpected EOF while looking for matching `%c'"), close); EOF_Reached = 1; /* XXX */ return (&matched_pair_error); *************** *** 4119,4124 **** /* Possible reprompting. */ ! if (ch == '\n' && interactive && ! (bash_input.type == st_stdin || bash_input.type == st_stream)) prompt_again (); --- 4060,4064 ---- /* Possible reprompting. */ ! if (ch == '\n' && SHOULD_PROMPT ()) prompt_again (); *************** *** 4176,4182 **** push_delimiter (dstack, ch); if MBTEST(was_dollar && ch == '\'') /* $'...' inside group */ ! nestret = parse_matched_pair (ch, ch, ch, &nestlen, P_ALLOWESC); else ! nestret = parse_matched_pair (ch, ch, ch, &nestlen, 0); pop_delimiter (dstack); if (nestret == &matched_pair_error) --- 4116,4122 ---- push_delimiter (dstack, ch); if MBTEST(was_dollar && ch == '\'') /* $'...' inside group */ ! nestret = parse_matched_pair (ch, ch, ch, &nestlen, P_ALLOWESC|rflags); else ! nestret = parse_matched_pair (ch, ch, ch, &nestlen, rflags); pop_delimiter (dstack); if (nestret == &matched_pair_error) *************** *** 4185,4189 **** return &matched_pair_error; } ! if MBTEST(was_dollar && ch == '\'') { /* Translate $'...' here. */ --- 4125,4129 ---- return &matched_pair_error; } ! if MBTEST(was_dollar && ch == '\'' && (extended_quote || (rflags & P_DQUOTE) == 0)) { /* Translate $'...' here. */ *************** *** 4195,4199 **** retind -= 2; /* back up before the $' */ } ! else if MBTEST(was_dollar && ch == '"') { /* Locale expand $"..." here. */ --- 4135,4139 ---- retind -= 2; /* back up before the $' */ } ! else if MBTEST(was_dollar && ch == '"' && (extended_quote || (rflags & P_DQUOTE) == 0)) { /* Locale expand $"..." here. */ *************** *** 4224,4228 **** else if MBTEST(open == '"' && ch == '`') { ! nestret = parse_matched_pair (0, '`', '`', &nestlen, 0); if (nestret == &matched_pair_error) { --- 4164,4168 ---- else if MBTEST(open == '"' && ch == '`') { ! nestret = parse_matched_pair (0, '`', '`', &nestlen, rflags); if (nestret == &matched_pair_error) { *************** *** 4244,4252 **** count--; if (ch == '(') /* ) */ ! nestret = parse_matched_pair (0, '(', ')', &nestlen, 0); else if (ch == '{') /* } */ ! nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE); else if (ch == '[') /* ] */ ! nestret = parse_matched_pair (0, '[', ']', &nestlen, 0); if (nestret == &matched_pair_error) { --- 4184,4192 ---- count--; if (ch == '(') /* ) */ ! nestret = parse_matched_pair (0, '(', ')', &nestlen, rflags); else if (ch == '{') /* } */ ! nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|rflags); else if (ch == '[') /* ] */ ! nestret = parse_matched_pair (0, '[', ']', &nestlen, rflags); if (nestret == &matched_pair_error) { *************** *** 4288,4304 **** { arith_for_lineno = line_number; ! cmdtyp = parse_arith_cmd (&wval); if (cmdtyp == 1) { ! /* parse_arith_cmd adds quotes at the beginning and end ! of the string it returns; we need to take those out. */ ! len = strlen (wval); ! wv2 = (char *)xmalloc (len); ! strncpy (wv2, wval + 1, len - 2); ! wv2[len - 2] = '\0'; ! wd = make_word (wv2); yylval.word_list = make_word_list (wd, (WORD_LIST *)NULL); free (wval); - free (wv2); return (ARITH_FOR_EXPRS); } --- 4228,4237 ---- { arith_for_lineno = line_number; ! cmdtyp = parse_arith_cmd (&wval, 0); if (cmdtyp == 1) { ! wd = make_word (wval); yylval.word_list = make_word_list (wd, (WORD_LIST *)NULL); free (wval); return (ARITH_FOR_EXPRS); } *************** *** 4312,4320 **** { sline = line_number; ! cmdtyp = parse_arith_cmd (&wval); if (cmdtyp == 1) /* arithmetic command */ { wd = make_word (wval); wd->flags = W_QUOTED; yylval.word_list = make_word_list (wd, (WORD_LIST *)NULL); free (wval); /* make_word copies it */ --- 4245,4261 ---- { sline = line_number; ! #if 0 ! cmdtyp = parse_arith_cmd (&wval, 1); ! #else ! cmdtyp = parse_arith_cmd (&wval, 0); ! #endif if (cmdtyp == 1) /* arithmetic command */ { wd = make_word (wval); + #if 0 wd->flags = W_QUOTED; + #else + wd->flags = W_QUOTED|W_NOSPLIT|W_NOGLOB; + #endif yylval.word_list = make_word_list (wd, (WORD_LIST *)NULL); free (wval); /* make_word copies it */ *************** *** 4342,4347 **** error, for example EOF. */ static int ! parse_arith_cmd (ep) char **ep; { int exp_lineno, rval, c; --- 4283,4289 ---- error, for example EOF. */ static int ! parse_arith_cmd (ep, adddq) char **ep; + int adddq; { int exp_lineno, rval, c; *************** *** 4362,4379 **** tokstr = (char *)xmalloc (ttoklen + 4); ! /* (( ... )) -> "..." */ ! tokstr[0] = (rval == 1) ? '"' : '('; ! strncpy (tokstr + 1, ttok, ttoklen - 1); /* don't copy the final `)' */ ! if (rval == 1) { tokstr[ttoklen] = '"'; tokstr[ttoklen+1] = '\0'; } ! else { tokstr[ttoklen] = ')'; tokstr[ttoklen+1] = c; tokstr[ttoklen+2] = '\0'; } *ep = tokstr; FREE (ttok); --- 4304,4329 ---- tokstr = (char *)xmalloc (ttoklen + 4); ! /* if ADDDQ != 0 then (( ... )) -> "..." */ ! if (rval == 1 && adddq) /* arith cmd, add double quotes */ { + tokstr[0] = '"'; + strncpy (tokstr + 1, ttok, ttoklen - 1); tokstr[ttoklen] = '"'; tokstr[ttoklen+1] = '\0'; } ! else if (rval == 1) /* arith cmd, don't add double quotes */ { + strncpy (tokstr, ttok, ttoklen - 1); + tokstr[ttoklen-1] = '\0'; + } + else /* nested subshell */ + { + tokstr[0] = '('; + strncpy (tokstr + 1, ttok, ttoklen - 1); tokstr[ttoklen] = ')'; tokstr[ttoklen+1] = c; tokstr[ttoklen+2] = '\0'; } + *ep = tokstr; FREE (ttok); *************** *** 4389,4402 **** if (EOF_Reached && cond_token != COND_ERROR) /* [[ */ ! parser_error (cond_lineno, "unexpected EOF while looking for `]]'"); else if (cond_token != COND_ERROR) { if (etext = error_token_from_token (cond_token)) { ! parser_error (cond_lineno, "syntax error in conditional expression: unexpected token `%s'", etext); free (etext); } else ! parser_error (cond_lineno, "syntax error in conditional expression"); } } --- 4339,4352 ---- if (EOF_Reached && cond_token != COND_ERROR) /* [[ */ ! parser_error (cond_lineno, _("unexpected EOF while looking for `]]'")); else if (cond_token != COND_ERROR) { if (etext = error_token_from_token (cond_token)) { ! parser_error (cond_lineno, _("syntax error in conditional expression: unexpected token `%s'"), etext); free (etext); } else ! parser_error (cond_lineno, _("syntax error in conditional expression")); } } *************** *** 4441,4445 **** while ((cond_token = read_token (READ)) == '\n') { ! if (interactive && (bash_input.type == st_stdin || bash_input.type == st_stream)) prompt_again (); } --- 4391,4395 ---- while ((cond_token = read_token (READ)) == '\n') { ! if (SHOULD_PROMPT ()) prompt_again (); } *************** *** 4476,4484 **** if (etext = error_token_from_token (cond_token)) { ! parser_error (lineno, "unexpected token `%s', expected `)'", etext); free (etext); } else ! parser_error (lineno, "expected `)'"); COND_RETURN_ERROR (); } --- 4426,4434 ---- if (etext = error_token_from_token (cond_token)) { ! parser_error (lineno, _("unexpected token `%s', expected `)'"), etext); free (etext); } else ! parser_error (lineno, _("expected `)'")); COND_RETURN_ERROR (); } *************** *** 4508,4516 **** if (etext = error_token_from_token (tok)) { ! parser_error (line_number, "unexpected argument `%s' to conditional unary operator", etext); free (etext); } else ! parser_error (line_number, "unexpected argument to conditional unary operator"); COND_RETURN_ERROR (); } --- 4458,4466 ---- if (etext = error_token_from_token (tok)) { ! parser_error (line_number, _("unexpected argument `%s' to conditional unary operator"), etext); free (etext); } else ! parser_error (line_number, _("unexpected argument to conditional unary operator")); COND_RETURN_ERROR (); } *************** *** 4527,4530 **** --- 4477,4484 ---- if (tok == WORD && test_binop (yylval.word->word)) op = yylval.word; + #if defined (COND_REGEXP) + else if (tok == WORD && STREQ (yylval.word->word,"=~")) + op = yylval.word; + #endif else if (tok == '<' || tok == '>') op = make_word_from_token (tok); /* ( */ *************** *** 4545,4553 **** if (etext = error_token_from_token (tok)) { ! parser_error (line_number, "unexpected token `%s', conditional binary operator expected", etext); free (etext); } else ! parser_error (line_number, "conditional binary operator expected"); dispose_cond_node (tleft); COND_RETURN_ERROR (); --- 4499,4507 ---- if (etext = error_token_from_token (tok)) { ! parser_error (line_number, _("unexpected token `%s', conditional binary operator expected"), etext); free (etext); } else ! parser_error (line_number, _("conditional binary operator expected")); dispose_cond_node (tleft); COND_RETURN_ERROR (); *************** *** 4565,4573 **** if (etext = error_token_from_token (tok)) { ! parser_error (line_number, "unexpected argument `%s' to conditional binary operator", etext); free (etext); } else ! parser_error (line_number, "unexpected argument to conditional binary operator"); dispose_cond_node (tleft); dispose_word (op); --- 4519,4527 ---- if (etext = error_token_from_token (tok)) { ! parser_error (line_number, _("unexpected argument `%s' to conditional binary operator"), etext); free (etext); } else ! parser_error (line_number, _("unexpected argument to conditional binary operator")); dispose_cond_node (tleft); dispose_word (op); *************** *** 4580,4591 **** { if (tok < 256) ! parser_error (line_number, "unexpected token `%c' in conditional command", tok); else if (etext = error_token_from_token (tok)) { ! parser_error (line_number, "unexpected token `%s' in conditional command", etext); free (etext); } else ! parser_error (line_number, "unexpected token %d in conditional command", tok); COND_RETURN_ERROR (); } --- 4534,4545 ---- { if (tok < 256) ! parser_error (line_number, _("unexpected token `%c' in conditional command"), tok); else if (etext = error_token_from_token (tok)) { ! parser_error (line_number, _("unexpected token `%s' in conditional command"), etext); free (etext); } else ! parser_error (line_number, _("unexpected token %d in conditional command"), tok); COND_RETURN_ERROR (); } *************** *** 4618,4622 **** c = t[i]; c1 = t[i+1]; t[i] = '='; t[i+1] = '\0'; ! r = assignment (t); t[i] = c; t[i+1] = c1; return r; --- 4572,4576 ---- c = t[i]; c1 = t[i+1]; t[i] = '='; t[i+1] = '\0'; ! r = assignment (t, (parser_state & PST_COMPASSIGN) != 0); t[i] = c; t[i+1] = c1; return r; *************** *** 4942,4947 **** next_character: ! if (character == '\n' && interactive && ! (bash_input.type == st_stdin || bash_input.type == st_stream)) prompt_again (); --- 4896,4900 ---- next_character: ! if (character == '\n' && SHOULD_PROMPT ()) prompt_again (); *************** *** 5012,5020 **** simple command, or after another assignment word. This is context-dependent, so it cannot be handled in the grammar. */ ! if (assignment (token)) { the_word->flags |= W_ASSIGNMENT; /* Don't perform word splitting on assignment statements. */ ! if (assignment_acceptable (last_read_token)) the_word->flags |= W_NOSPLIT; } --- 4965,4973 ---- simple command, or after another assignment word. This is context-dependent, so it cannot be handled in the grammar. */ ! if (assignment (token, (parser_state & PST_COMPASSIGN) != 0)) { the_word->flags |= W_ASSIGNMENT; /* Don't perform word splitting on assignment statements. */ ! if (assignment_acceptable (last_read_token) || (parser_state & PST_COMPASSIGN) != 0) the_word->flags |= W_NOSPLIT; } *************** *** 5025,5032 **** ? ASSIGNMENT_WORD : WORD; ! if (last_read_token == FUNCTION) { parser_state |= PST_ALLOWOPNBRC; function_dstart = line_number; } --- 4978,4994 ---- ? ASSIGNMENT_WORD : WORD; ! switch (last_read_token) { + case FUNCTION: parser_state |= PST_ALLOWOPNBRC; function_dstart = line_number; + break; + case CASE: + case SELECT: + case FOR: + if (word_top < MAX_CASE_NEST) + word_top++; + word_lineno[word_top] = line_number; + break; } *************** *** 5186,5190 **** char *temp_prompt; ! if (!interactive) /* XXX */ return; --- 5148,5152 ---- char *temp_prompt; ! if (interactive == 0 || expanding_alias()) /* XXX */ return; *************** *** 5379,5383 **** n = strftime (timebuf, sizeof (timebuf), "%H:%M", tm); ! timebuf[sizeof(timebuf) - 1] = '\0'; temp = savestring (timebuf); goto add_string; --- 5341,5349 ---- n = strftime (timebuf, sizeof (timebuf), "%H:%M", tm); ! if (n == 0) ! timebuf[0] = '\0'; ! else ! timebuf[sizeof(timebuf) - 1] = '\0'; ! temp = savestring (timebuf); goto add_string; *************** *** 5404,5408 **** free (timefmt); ! timebuf[sizeof(timebuf) - 1] = '\0'; if (promptvars || posixly_correct) /* Make sure that expand_prompt_string is called with a --- 5370,5378 ---- free (timefmt); ! if (n == 0) ! timebuf[0] = '\0'; ! else ! timebuf[sizeof(timebuf) - 1] = '\0'; ! if (promptvars || posixly_correct) /* Make sure that expand_prompt_string is called with a *************** *** 5439,5443 **** { /* Use the value of PWD because it is much more efficient. */ ! char t_string[PATH_MAX]; int tlen; --- 5409,5413 ---- { /* Use the value of PWD because it is much more efficient. */ ! char t_string[PATH_MAX], *t; int tlen; *************** *** 5463,5467 **** #define ROOT_PATH(x) ((x)[0] == '/' && (x)[1] == 0) #define DOUBLE_SLASH_ROOT(x) ((x)[0] == '/' && (x)[1] == '/' && (x)[2] == 0) ! if (c == 'W') { if (ROOT_PATH (t_string) == 0 && DOUBLE_SLASH_ROOT (t_string) == 0) --- 5433,5438 ---- #define ROOT_PATH(x) ((x)[0] == '/' && (x)[1] == 0) #define DOUBLE_SLASH_ROOT(x) ((x)[0] == '/' && (x)[1] == '/' && (x)[2] == 0) ! /* Abbreviate \W as ~ if $PWD == $HOME */ ! if (c == 'W' && (((t = get_string_value ("HOME")) == 0) || STREQ (t, temp) == 0)) { if (ROOT_PATH (t_string) == 0 && DOUBLE_SLASH_ROOT (t_string) == 0) *************** *** 5542,5545 **** --- 5513,5521 ---- case '[': case ']': + if (no_line_editing) + { + string++; + break; + } temp = (char *)xmalloc (3); temp[0] = '\001'; *************** *** 5761,5765 **** if (current_token != 0 && EOF_Reached == 0 && (msg = error_token_from_token (current_token))) { ! parser_error (line_number, "syntax error near unexpected token `%s'", msg); free (msg); --- 5737,5741 ---- if (current_token != 0 && EOF_Reached == 0 && (msg = error_token_from_token (current_token))) { ! parser_error (line_number, _("syntax error near unexpected token `%s'"), msg); free (msg); *************** *** 5779,5783 **** if (msg) { ! parser_error (line_number, "syntax error near `%s'", msg); free (msg); } --- 5755,5759 ---- if (msg) { ! parser_error (line_number, _("syntax error near `%s'"), msg); free (msg); } *************** *** 5789,5793 **** else { ! msg = EOF_Reached ? "syntax error: unexpected end of file" : "syntax error"; parser_error (line_number, "%s", msg); /* When the shell is interactive, this file uses EOF_Reached --- 5765,5769 ---- else { ! msg = EOF_Reached ? _("syntax error: unexpected end of file") : _("syntax error"); parser_error (line_number, "%s", msg); /* When the shell is interactive, this file uses EOF_Reached *************** *** 5851,5855 **** if (eof_encountered < eof_encountered_limit) { ! fprintf (stderr, "Use \"%s\" to leave the shell.\n", login_shell ? "logout" : "exit"); eof_encountered++; --- 5827,5831 ---- if (eof_encountered < eof_encountered_limit) { ! fprintf (stderr, _("Use \"%s\" to leave the shell.\n"), login_shell ? "logout" : "exit"); eof_encountered++; *************** *** 5888,5893 **** resultant word list. Used by compound array assignment. */ WORD_LIST * ! parse_string_to_word_list (s, whom) char *s; const char *whom; { --- 5864,5870 ---- resultant word list. Used by compound array assignment. */ WORD_LIST * ! parse_string_to_word_list (s, flags, whom) char *s; + int flags; const char *whom; { *************** *** 5921,5924 **** --- 5898,5905 ---- with_input_from_string (s, whom); wl = (WORD_LIST *)NULL; + + if (flags & 1) + parser_state |= PST_COMPASSIGN; + while ((tok = read_token (READ)) != yacc_EOF) { *************** *** 5958,5961 **** --- 5939,5945 ---- shell_input_line_terminator = orig_input_terminator; + if (flags & 1) + parser_state &= ~PST_COMPASSIGN; + if (wl == &parse_string_error) { *************** *** 5988,6000 **** wl = (WORD_LIST *)NULL; /* ( */ while ((tok = read_token (READ)) != ')') { if (tok == '\n') /* Allow newlines in compound assignments */ ! continue; if (tok != WORD && tok != ASSIGNMENT_WORD) { current_token = tok; /* for error reporting */ if (tok == yacc_EOF) /* ( */ ! parser_error (orig_line_number, "unexpected EOF while looking for matching `)'"); else yyerror ((char *)NULL); /* does the right thing */ --- 5972,5990 ---- wl = (WORD_LIST *)NULL; /* ( */ + parser_state |= PST_COMPASSIGN; + while ((tok = read_token (READ)) != ')') { if (tok == '\n') /* Allow newlines in compound assignments */ ! { ! if (SHOULD_PROMPT ()) ! prompt_again (); ! continue; ! } if (tok != WORD && tok != ASSIGNMENT_WORD) { current_token = tok; /* for error reporting */ if (tok == yacc_EOF) /* ( */ ! parser_error (orig_line_number, _("unexpected EOF while looking for matching `)'")); else yyerror ((char *)NULL); /* does the right thing */ *************** *** 6011,6014 **** --- 6001,6006 ---- token_buffer_size = orig_token_size; + parser_state &= ~PST_COMPASSIGN; + if (wl == &parse_string_error) { *************** *** 6038,6041 **** --- 6030,6132 ---- /************************************************ * * + * SAVING AND RESTORING PARTIAL PARSE STATE * + * * + ************************************************/ + + sh_parser_state_t * + save_parser_state (ps) + sh_parser_state_t *ps; + { + #if defined (ARRAY_VARS) + SHELL_VAR *v; + #endif + + if (ps == 0) + ps = xmalloc (sizeof (sh_parser_state_t)); + if (ps == 0) + return ((sh_parser_state_t *)NULL); + + ps->parser_state = parser_state; + ps->token_state = save_token_state (); + + ps->input_line_terminator = shell_input_line_terminator; + ps->eof_encountered = eof_encountered; + + ps->current_command_line_count = current_command_line_count; + + #if defined (HISTORY) + ps->remember_on_history = remember_on_history; + # if defined (BANG_HISTORY) + ps->history_expansion_inhibited = history_expansion_inhibited; + # endif + #endif + + ps->last_command_exit_value = last_command_exit_value; + #if defined (ARRAY_VARS) + v = find_variable ("PIPESTATUS"); + if (v && array_p (v) && array_cell (v)) + ps->pipestatus = array_copy (array_cell (v)); + else + ps->pipestatus = (ARRAY *)NULL; + #endif + + ps->last_shell_builtin = last_shell_builtin; + ps->this_shell_builtin = this_shell_builtin; + + ps->expand_aliases = expand_aliases; + ps->echo_input_at_read = echo_input_at_read; + + return (ps); + } + + void + restore_parser_state (ps) + sh_parser_state_t *ps; + { + #if defined (ARRAY_VARS) + SHELL_VAR *v; + #endif + + if (ps == 0) + return; + + parser_state = ps->parser_state; + if (ps->token_state) + { + restore_token_state (ps->token_state); + free (ps->token_state); + } + + shell_input_line_terminator = ps->input_line_terminator; + eof_encountered = ps->eof_encountered; + + current_command_line_count = ps->current_command_line_count; + + #if defined (HISTORY) + remember_on_history = ps->remember_on_history; + # if defined (BANG_HISTORY) + history_expansion_inhibited = ps->history_expansion_inhibited; + # endif + #endif + + last_command_exit_value = ps->last_command_exit_value; + #if defined (ARRAY_VARS) + v = find_variable ("PIPESTATUS"); + if (v && array_p (v) && array_cell (v)) + { + array_dispose (array_cell (v)); + var_setarray (v, ps->pipestatus); + } + #endif + + last_shell_builtin = ps->last_shell_builtin; + this_shell_builtin = ps->this_shell_builtin; + + expand_aliases = ps->expand_aliases; + echo_input_at_read = ps->echo_input_at_read; + } + + /************************************************ + * * * MULTIBYTE CHARACTER HANDLING * * * *************** *** 6046,6050 **** set_line_mbstate () { ! int i, previ, len; mbstate_t mbs, prevs; size_t mbclen; --- 6137,6141 ---- set_line_mbstate () { ! int i, previ, len, c; mbstate_t mbs, prevs; size_t mbclen; *************** *** 6061,6065 **** mbs = prevs; ! if (shell_input_line[i] == EOF) { int j; --- 6152,6157 ---- mbs = prevs; ! c = shell_input_line[i]; ! if (c == EOF) { int j; *************** *** 6085,6089 **** else { ! /* mbrlen doesn't return any other values */ } --- 6177,6185 ---- else { ! /* XXX - what to do if mbrlen returns 0? (null wide character) */ ! int j; ! for (j = i; j < len; j++) ! shell_input_line_property[j] = 1; ! break; } diff -aNrc2 bash-2.05b-patched/y.tab.h bash-3.0/y.tab.h *** bash-2.05b-patched/y.tab.h Tue May 21 11:57:35 2002 --- bash-3.0/y.tab.h Wed May 5 14:32:28 2004 *************** *** 1,6 **** - #ifndef BISON_Y_TAB_H - # define BISON_Y_TAB_H - - #ifndef YYSTYPE typedef union { WORD_DESC *word; /* the word that we read. */ --- 1,2 ---- *************** *** 11,60 **** ELEMENT element; PATTERN_LIST *pattern; ! } yystype; ! # define YYSTYPE yystype ! #endif ! # define IF 257 ! # define THEN 258 ! # define ELSE 259 ! # define ELIF 260 ! # define FI 261 ! # define CASE 262 ! # define ESAC 263 ! # define FOR 264 ! # define SELECT 265 ! # define WHILE 266 ! # define UNTIL 267 ! # define DO 268 ! # define DONE 269 ! # define FUNCTION 270 ! # define COND_START 271 ! # define COND_END 272 ! # define COND_ERROR 273 ! # define IN 274 ! # define BANG 275 ! # define TIME 276 ! # define TIMEOPT 277 ! # define WORD 278 ! # define ASSIGNMENT_WORD 279 ! # define NUMBER 280 ! # define ARITH_CMD 281 ! # define ARITH_FOR_EXPRS 282 ! # define COND_CMD 283 ! # define AND_AND 284 ! # define OR_OR 285 ! # define GREATER_GREATER 286 ! # define LESS_LESS 287 ! # define LESS_AND 288 ! # define LESS_LESS_LESS 289 ! # define GREATER_AND 290 ! # define SEMI_SEMI 291 ! # define LESS_LESS_MINUS 292 ! # define AND_GREATER 293 ! # define LESS_GREATER 294 ! # define GREATER_BAR 295 ! # define yacc_EOF 296 extern YYSTYPE yylval; - - #endif /* not BISON_Y_TAB_H */ --- 7,52 ---- ELEMENT element; PATTERN_LIST *pattern; ! } YYSTYPE; ! #define IF 257 ! #define THEN 258 ! #define ELSE 259 ! #define ELIF 260 ! #define FI 261 ! #define CASE 262 ! #define ESAC 263 ! #define FOR 264 ! #define SELECT 265 ! #define WHILE 266 ! #define UNTIL 267 ! #define DO 268 ! #define DONE 269 ! #define FUNCTION 270 ! #define COND_START 271 ! #define COND_END 272 ! #define COND_ERROR 273 ! #define IN 274 ! #define BANG 275 ! #define TIME 276 ! #define TIMEOPT 277 ! #define WORD 278 ! #define ASSIGNMENT_WORD 279 ! #define NUMBER 280 ! #define ARITH_CMD 281 ! #define ARITH_FOR_EXPRS 282 ! #define COND_CMD 283 ! #define AND_AND 284 ! #define OR_OR 285 ! #define GREATER_GREATER 286 ! #define LESS_LESS 287 ! #define LESS_AND 288 ! #define LESS_LESS_LESS 289 ! #define GREATER_AND 290 ! #define SEMI_SEMI 291 ! #define LESS_LESS_MINUS 292 ! #define AND_GREATER 293 ! #define LESS_GREATER 294 ! #define GREATER_BAR 295 ! #define yacc_EOF 296 extern YYSTYPE yylval;