summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJari Aalto <jari.aalto@cante.net>2004-07-27 13:29:18 +0000
committerJari Aalto <jari.aalto@cante.net>2009-09-12 16:46:56 +0000
commitb80f6443b6b7b620c7272664c66ecb0b120a0998 (patch)
tree9f71c98d8fe8fa0f41d95e1eb4227f32a09d43ca
parent7117c2d221b2aed4ede8600f6a36b7c1454b4f55 (diff)
downloadbash-b80f6443b6b7b620c7272664c66ecb0b120a0998.tar.gz
Imported from ../bash-3.0.tar.gz.
-rw-r--r--ABOUT-NLS625
-rw-r--r--AUTHORS3
-rw-r--r--CHANGES711
-rw-r--r--COMPAT18
-rw-r--r--CWRU/changelog3386
-rw-r--r--INSTALL11
-rw-r--r--MANIFEST123
-rw-r--r--Makefile.in316
-rw-r--r--NEWS194
-rw-r--r--NOTES3
-rw-r--r--POSIX38
-rw-r--r--README6
-rw-r--r--Y2K3
-rw-r--r--aclocal.m42257
-rw-r--r--array.c97
-rw-r--r--array.h22
-rw-r--r--arrayfunc.c76
-rw-r--r--arrayfunc.h2
-rw-r--r--bashhist.c92
-rw-r--r--bashhist.h7
-rw-r--r--bashintl.h23
-rw-r--r--bashjmp.h9
-rw-r--r--bashline.c370
-rw-r--r--bashline.h3
-rw-r--r--braces.c169
-rw-r--r--builtins/Makefile.in105
-rw-r--r--builtins/alias.def41
-rw-r--r--builtins/bind.def16
-rw-r--r--builtins/break.def6
-rw-r--r--builtins/builtin.def2
-rw-r--r--builtins/caller.def147
-rw-r--r--builtins/cd.def68
-rw-r--r--builtins/common.c94
-rw-r--r--builtins/common.h9
-rw-r--r--builtins/complete.def31
-rw-r--r--builtins/declare.def38
-rw-r--r--builtins/echo.def2
-rw-r--r--builtins/enable.def22
-rw-r--r--builtins/evalfile.c75
-rw-r--r--builtins/evalstring.c25
-rw-r--r--builtins/exec.def8
-rw-r--r--builtins/exit.def33
-rw-r--r--builtins/fc.def12
-rw-r--r--builtins/fg_bg.def6
-rw-r--r--builtins/getopt.c5
-rw-r--r--builtins/getopts.def3
-rw-r--r--builtins/hash.def7
-rw-r--r--builtins/help.def19
-rw-r--r--builtins/history.def77
-rw-r--r--builtins/jobs.def30
-rw-r--r--builtins/kill.def45
-rw-r--r--builtins/let.def8
-rw-r--r--builtins/mkbuiltins.c15
-rw-r--r--builtins/printf.def56
-rw-r--r--builtins/pushd.def111
-rw-r--r--builtins/read.def20
-rw-r--r--builtins/return.def6
-rw-r--r--builtins/set.def19
-rw-r--r--builtins/setattr.def14
-rw-r--r--builtins/shift.def7
-rw-r--r--builtins/shopt.def30
-rw-r--r--builtins/source.def43
-rw-r--r--builtins/suspend.def10
-rw-r--r--builtins/trap.def50
-rw-r--r--builtins/type.def16
-rw-r--r--builtins/ulimit.def12
-rw-r--r--builtins/umask.def16
-rw-r--r--builtins/wait.def10
-rw-r--r--command.h32
-rw-r--r--config-bot.h100
-rw-r--r--config-top.h4
-rw-r--r--config.h.in126
-rwxr-xr-xconfigure16818
-rw-r--r--configure.in161
-rw-r--r--copy_cmd.c22
-rw-r--r--dispose_cmd.c21
-rw-r--r--dispose_cmd.h3
-rw-r--r--doc/FAQ242
-rw-r--r--doc/Makefile.in79
-rw-r--r--doc/bash.1659
-rw-r--r--doc/bashref.info3308
-rw-r--r--doc/bashref.texi812
-rw-r--r--doc/builtins.12
-rw-r--r--doc/fdl.texi452
-rw-r--r--doc/fdl.txt397
-rwxr-xr-xdoc/infopost.sh8
-rw-r--r--doc/rbash.12
-rw-r--r--doc/texinfo.tex2918
-rw-r--r--doc/version.texi10
-rw-r--r--error.c78
-rw-r--r--eval.c6
-rw-r--r--examples/complete/bashcc-1.0.1.tar.gzbin0 -> 4609 bytes
-rw-r--r--examples/functions/coproc.bash3
-rw-r--r--examples/functions/csh-compat13
-rw-r--r--examples/functions/exitstat2
-rw-r--r--examples/functions/getoptx.bash3
-rw-r--r--examples/functions/kshenv2
-rw-r--r--examples/functions/manpage4
-rw-r--r--examples/functions/recurse7
-rw-r--r--examples/functions/substr2
-rw-r--r--examples/functions/substr22
-rw-r--r--examples/functions/xalias.bash13
-rw-r--r--examples/functions/xfind.bash2
-rw-r--r--examples/loadables/Makefile.in6
-rw-r--r--examples/loadables/finfo.c13
-rw-r--r--examples/loadables/getconf.c322
-rw-r--r--examples/loadables/strftime.c105
-rwxr-xr-xexamples/misc/aliasconv.bash12
-rwxr-xr-xexamples/misc/aliasconv.sh12
-rwxr-xr-xexamples/misc/cshtobash12
-rw-r--r--examples/obashdb/README6
-rw-r--r--examples/obashdb/bashdb.fns4
-rw-r--r--examples/scripts.noah/number.bash2
-rw-r--r--examples/scripts.noah/string.bash4
-rw-r--r--examples/scripts.v2/cdhist.bash4
-rw-r--r--examples/scripts.v2/fman4
-rwxr-xr-xexamples/scripts.v2/frcp2
-rw-r--r--examples/scripts.v2/repeat2
-rw-r--r--examples/scripts.v2/vtree2
-rwxr-xr-xexamples/scripts/bcsh.sh20
-rw-r--r--examples/scripts/fixfiles.bash2
-rw-r--r--examples/scripts/line-input.bash7
-rw-r--r--execute_cmd.c533
-rw-r--r--expr.c132
-rw-r--r--externs.h41
-rw-r--r--findcmd.c27
-rw-r--r--flags.c29
-rw-r--r--flags.h3
-rw-r--r--general.c65
-rw-r--r--general.h8
-rw-r--r--include/gettext.h69
-rw-r--r--include/posixdir.h10
-rw-r--r--include/shmbutil.h167
-rw-r--r--include/stdc.h2
-rw-r--r--input.c17
-rw-r--r--jobs.c142
-rw-r--r--jobs.h3
-rw-r--r--lib/glob/glob.c124
-rw-r--r--lib/glob/sm_loop.c20
-rw-r--r--lib/glob/smatch.c27
-rw-r--r--lib/glob/strmatch.c22
-rw-r--r--lib/glob/strmatch.h12
-rw-r--r--lib/glob/xmbsrtowcs.c143
-rw-r--r--lib/intl/ChangeLog4
-rw-r--r--lib/intl/Makefile.in463
-rw-r--r--lib/intl/VERSION1
-rw-r--r--lib/intl/bindtextdom.c374
-rwxr-xr-xlib/intl/config.charset467
-rw-r--r--lib/intl/dcgettext.c59
-rw-r--r--lib/intl/dcigettext.c1238
-rw-r--r--lib/intl/dcngettext.c60
-rw-r--r--lib/intl/dgettext.c59
-rw-r--r--lib/intl/dngettext.c61
-rw-r--r--lib/intl/eval-plural.h114
-rw-r--r--lib/intl/explodename.c192
-rw-r--r--lib/intl/finddomain.c195
-rw-r--r--lib/intl/gettext.c64
-rw-r--r--lib/intl/gettextP.h224
-rw-r--r--lib/intl/gmo.h148
-rw-r--r--lib/intl/hash-string.h59
-rw-r--r--lib/intl/intl-compat.c151
-rw-r--r--lib/intl/l10nflist.c453
-rw-r--r--lib/intl/libgnuintl.h.in309
-rw-r--r--lib/intl/loadinfo.h156
-rw-r--r--lib/intl/loadmsgcat.c1322
-rw-r--r--lib/intl/localcharset.c398
-rw-r--r--lib/intl/localcharset.h42
-rw-r--r--lib/intl/locale.alias78
-rw-r--r--lib/intl/localealias.c419
-rw-r--r--lib/intl/localename.c772
-rw-r--r--lib/intl/log.c104
-rw-r--r--lib/intl/ngettext.c68
-rw-r--r--lib/intl/os2compat.c98
-rw-r--r--lib/intl/os2compat.h46
-rw-r--r--lib/intl/osdep.c24
-rw-r--r--lib/intl/plural-exp.c156
-rw-r--r--lib/intl/plural-exp.h126
-rw-r--r--lib/intl/plural.c1518
-rw-r--r--lib/intl/plural.y409
-rw-r--r--lib/intl/ref-add.sin31
-rw-r--r--lib/intl/ref-del.sin26
-rw-r--r--lib/intl/relocatable.c439
-rw-r--r--lib/intl/relocatable.h67
-rw-r--r--lib/intl/textdomain.c142
-rw-r--r--lib/malloc/Makefile.in15
-rw-r--r--lib/malloc/getpagesize.h2
-rw-r--r--lib/malloc/imalloc.h8
-rw-r--r--lib/malloc/malloc.c28
-rw-r--r--lib/malloc/mstats.h2
-rw-r--r--lib/malloc/shmalloc.h3
-rw-r--r--lib/malloc/stats.c48
-rw-r--r--lib/malloc/stub.c2
-rw-r--r--lib/malloc/table.c8
-rw-r--r--lib/malloc/table.h2
-rw-r--r--lib/malloc/trace.c21
-rw-r--r--lib/malloc/watch.c14
-rw-r--r--lib/malloc/watch.h2
-rw-r--r--lib/malloc/xmalloc.c2
-rw-r--r--lib/readline/Makefile.in10
-rw-r--r--lib/readline/bind.c125
-rw-r--r--lib/readline/callback.c2
-rw-r--r--lib/readline/chardefs.h6
-rw-r--r--lib/readline/complete.c288
-rw-r--r--lib/readline/display.c226
-rw-r--r--lib/readline/doc/Makefile33
-rw-r--r--lib/readline/doc/fdl.texi452
-rw-r--r--lib/readline/doc/hist.texinfo110
-rw-r--r--lib/readline/doc/history.texi104
-rw-r--r--lib/readline/doc/hstech.texi (renamed from lib/readline/doc/hstech.texinfo)37
-rw-r--r--lib/readline/doc/hsuser.texi (renamed from lib/readline/doc/hsuser.texinfo)22
-rw-r--r--lib/readline/doc/manvers.texinfo10
-rw-r--r--lib/readline/doc/rlman.texi101
-rw-r--r--lib/readline/doc/rlman.texinfo108
-rw-r--r--lib/readline/doc/rltech.texi (renamed from lib/readline/doc/rltech.texinfo)162
-rw-r--r--lib/readline/doc/rluser.texi (renamed from lib/readline/doc/rluser.texinfo)42
-rw-r--r--lib/readline/doc/rluserman.texi88
-rw-r--r--lib/readline/doc/rluserman.texinfo94
-rw-r--r--lib/readline/doc/version.texi10
-rw-r--r--lib/readline/examples/histexamp.c116
-rw-r--r--lib/readline/funmap.c1
-rw-r--r--lib/readline/histexpand.c330
-rw-r--r--lib/readline/histfile.c133
-rw-r--r--lib/readline/history.c90
-rw-r--r--lib/readline/history.h24
-rw-r--r--lib/readline/histsearch.c6
-rw-r--r--lib/readline/input.c24
-rw-r--r--lib/readline/keymaps.c13
-rw-r--r--lib/readline/kill.c41
-rw-r--r--lib/readline/mbutil.c41
-rw-r--r--lib/readline/misc.c16
-rw-r--r--lib/readline/nls.c37
-rw-r--r--lib/readline/parens.c4
-rw-r--r--lib/readline/posixdir.h10
-rw-r--r--lib/readline/readline.c69
-rw-r--r--lib/readline/readline.h59
-rw-r--r--lib/readline/rldefs.h2
-rw-r--r--lib/readline/rlmbutil.h15
-rw-r--r--lib/readline/rlprivate.h8
-rw-r--r--lib/readline/rlstdc.h2
-rw-r--r--lib/readline/rltty.c149
-rw-r--r--lib/readline/rltty.h32
-rw-r--r--lib/readline/rltypedefs.h8
-rw-r--r--lib/readline/savestring.c3
-rw-r--r--lib/readline/search.c12
-rw-r--r--lib/readline/shell.c4
-rw-r--r--lib/readline/signals.c8
-rw-r--r--lib/readline/terminal.c16
-rw-r--r--lib/readline/text.c29
-rw-r--r--lib/readline/util.c2
-rw-r--r--lib/readline/vi_mode.c76
-rw-r--r--lib/sh/Makefile.in53
-rw-r--r--lib/sh/fmtulong.c7
-rw-r--r--lib/sh/getcwd.c4
-rw-r--r--lib/sh/getenv.c4
-rw-r--r--lib/sh/mailstat.c2
-rw-r--r--lib/sh/netconn.c2
-rw-r--r--lib/sh/netopen.c10
-rw-r--r--lib/sh/pathcanon.c8
-rw-r--r--lib/sh/pathphys.c48
-rw-r--r--lib/sh/shmatch.c121
-rw-r--r--lib/sh/shquote.c13
-rw-r--r--lib/sh/snprintf.c9
-rw-r--r--lib/sh/strftime.c2
-rw-r--r--lib/sh/strstr.c122
-rw-r--r--lib/sh/strtrans.c21
-rw-r--r--lib/sh/tmpfile.c8
-rw-r--r--lib/termcap/termcap.c4
-rw-r--r--locale.c165
-rw-r--r--mailcheck.c20
-rw-r--r--make_cmd.c64
-rw-r--r--make_cmd.h6
-rw-r--r--mksyntax.c11
-rw-r--r--nojobs.c121
-rw-r--r--parse.y585
-rw-r--r--parser-built90
-rw-r--r--pathnames.h.in (renamed from pathnames.h)3
-rw-r--r--pcomplete.c65
-rw-r--r--pcomplete.h2
-rw-r--r--pcomplib.c7
-rw-r--r--po/LINGUAS2
-rw-r--r--po/Makefile.in.in357
-rw-r--r--po/Makevars41
-rw-r--r--po/POTFILES.in76
-rw-r--r--po/Rules-builtins19
-rw-r--r--po/Rules-quot42
-rw-r--r--po/bash.pot4174
-rw-r--r--po/boldquot.sed10
-rw-r--r--po/builtins.pot2845
-rw-r--r--po/en@boldquot.gmobin0 -> 120143 bytes
-rw-r--r--po/en@boldquot.header25
-rw-r--r--po/en@boldquot.po4349
-rw-r--r--po/en@quot.gmobin0 -> 118583 bytes
-rw-r--r--po/en@quot.header22
-rw-r--r--po/en@quot.po4283
-rw-r--r--po/insert-header.sin23
-rw-r--r--po/quot.sed6
-rw-r--r--po/remove-potcdate.sin19
-rw-r--r--print_cmd.c140
-rw-r--r--redir.c86
-rw-r--r--redir.h7
-rw-r--r--shell.c165
-rw-r--r--shell.h58
-rw-r--r--sig.c7
-rw-r--r--subst.c1030
-rw-r--r--support/Makefile.in8
-rw-r--r--support/bashbug.sh58
-rwxr-xr-xsupport/config.guess270
-rwxr-xr-xsupport/config.rpath548
-rwxr-xr-x[-rw-r--r--]support/config.sub193
-rwxr-xr-xsupport/mkinstalldirs111
-rw-r--r--support/mksignames.c10
-rwxr-xr-xsupport/mkversion.sh8
-rwxr-xr-xsupport/shobj-conf20
-rwxr-xr-xsupport/texi2dvi192
-rwxr-xr-xsupport/xenix-link.sh2
-rw-r--r--syntax.h9
-rw-r--r--test.c32
-rw-r--r--tests/alias.right4
-rw-r--r--tests/alias.tests37
-rw-r--r--tests/arith-for.right22
-rw-r--r--tests/arith.right63
-rw-r--r--tests/arith.tests6
-rw-r--r--tests/arith1.sub38
-rw-r--r--tests/arith2.sub45
-rw-r--r--tests/array.right51
-rw-r--r--tests/array.tests43
-rw-r--r--tests/braces-tests24
-rw-r--r--tests/braces.right19
-rw-r--r--tests/braces.tests57
-rw-r--r--tests/builtins.right8
-rw-r--r--tests/builtins.tests12
-rw-r--r--tests/cond.right2
-rwxr-xr-xtests/cond.tests4
-rw-r--r--tests/cprint.right4
-rw-r--r--tests/dbg-support.right353
-rw-r--r--tests/dbg-support.sub26
-rwxr-xr-xtests/dbg-support.tests139
-rw-r--r--tests/dbg-support2.right7
-rwxr-xr-xtests/dbg-support2.tests26
-rwxr-xr-xtests/dollar-at-star12
-rw-r--r--tests/dollar-at1.sub29
-rw-r--r--tests/dollar-at2.sub19
-rw-r--r--tests/dollar-star1.sub31
-rw-r--r--tests/dollar.right30
-rw-r--r--tests/errors.right24
-rw-r--r--tests/exec.right13
-rw-r--r--tests/exec7.sub20
-rw-r--r--tests/execscript14
-rw-r--r--tests/extglob.right1
-rw-r--r--tests/extglob.tests6
-rw-r--r--tests/glob-test10
-rw-r--r--tests/glob.right2
-rw-r--r--tests/herestr.right2
-rw-r--r--tests/herestr.tests3
-rw-r--r--tests/histexp.right6
-rw-r--r--tests/jobs.right40
-rw-r--r--tests/jobs.tests6
-rw-r--r--tests/jobs4.sub22
-rw-r--r--tests/new-exp.right14
-rw-r--r--tests/new-exp.tests3
-rw-r--r--tests/new-exp4.sub31
-rw-r--r--tests/nquote4.right18
-rw-r--r--tests/nquote4.tests24
-rw-r--r--tests/printf.rightbin1331 -> 1344 bytes
-rw-r--r--tests/printf.tests16
-rw-r--r--tests/read.right12
-rw-r--r--tests/read.tests3
-rw-r--r--tests/read2.sub4
-rw-r--r--tests/read5.sub36
-rw-r--r--tests/redir.right6
-rw-r--r--tests/redir.tests3
-rw-r--r--tests/redir6.sub8
-rw-r--r--tests/run-alias2
-rw-r--r--tests/run-braces2
-rwxr-xr-xtests/run-dbg-support11
-rwxr-xr-xtests/run-dbg-support216
-rw-r--r--tests/run-execscript2
-rw-r--r--tests/run-glob-test2
-rw-r--r--tests/run-jobs2
-rw-r--r--tests/run-nquote42
-rw-r--r--tests/run-read2
-rwxr-xr-xtests/run-set-x11
-rw-r--r--tests/run-test2
-rw-r--r--tests/set-x.right28
-rwxr-xr-xtests/set-x.tests21
-rw-r--r--tests/shopt.right28
-rw-r--r--tests/test.tests4
-rw-r--r--tests/trap.right1
-rw-r--r--tests/trap.tests2
-rw-r--r--tests/type.right12
-rw-r--r--tests/type.tests17
-rw-r--r--tests/varenv.right2
-rw-r--r--trap.c214
-rw-r--r--trap.h31
-rw-r--r--variables.c406
-rw-r--r--variables.h15
-rw-r--r--version.c16
-rw-r--r--xmalloc.c18
-rw-r--r--y.tab.c3168
-rw-r--r--y.tab.h90
400 files changed, 67698 insertions, 11797 deletions
diff --git a/ABOUT-NLS b/ABOUT-NLS
new file mode 100644
index 00000000..47d5e39f
--- /dev/null
+++ b/ABOUT-NLS
@@ -0,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 --git a/AUTHORS b/AUTHORS
index 656a07de..3a8f71ff 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,6 +1,8 @@
#
# 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.
#
@@ -100,6 +102,7 @@ builtins/alias.def Brian Fox, Chet Ramey
builtins/bind.def Brian Fox, Chet Ramey
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
builtins/command.def Brian Fox, Chet Ramey
diff --git a/CHANGES b/CHANGES
index 1a751280..159da675 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,712 @@
+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
+ <blank>, 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.
@@ -157,7 +866,7 @@ e. The `fc' builtin has been fixed, as POSIX requires, to use the closest
f. The history file loading code was changed to allow lines to be saved in
the history list from the shell startup files.
-g. `history -s args' now works bettern in compound commands.
+g. `history -s args' now works better in compound commands.
h. The tilde expansion code was fixed to better recognize when it's being
invoked in an assignment context, which enables expansion after `='
diff --git a/COMPAT b/COMPAT
index c2778fe0..6858ce7c 100644
--- a/COMPAT
+++ b/COMPAT
@@ -1,11 +1,12 @@
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
+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
instance, if you are doing something like this to get the value of
@@ -208,3 +209,6 @@ versions 2.0 and above.
17. Bash no longer removes the export attribute from the SSH_CLIENT or
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 --git a/CWRU/changelog b/CWRU/changelog
index d090bf4f..f6ce0b92 100644
--- a/CWRU/changelog
+++ b/CWRU/changelog
@@ -500,7 +500,7 @@ builtins/read.def
- check for arithmetic overflow with -t and -n options
input.c
- - check for read error before doing \r\n translation on cygnus in
+ - 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
in b_fill_buffer
@@ -6254,3 +6254,3387 @@ shell.c
----
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 <jir@yamato.ibm.com>
+
+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 <sys/file.h> 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
+ <don@coleman.org>)
+
+ 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 \<newline> 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 <opengeometry@yahoo.ca>)
+
+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 <opengeometry@yahoo.ca>)
+
+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 <anderson110@poptop.llnl.gov>)
+
+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</etc/passwd are undone immediately, since they're
+ being done in the current shell
+ - functions now inherit the RETURN trap only if function tracing is
+ on for that function or globally
+
+lib/readline/misc.c
+ - in rl_replace_from_history, 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)
+
+ 4/4
+ ---
+trap.c
+ - initialize RETURN_TRAP stuff appropriately in initialize_traps()
+ - let command substitutions inherit the RETURN trap if we're in
+ the debugger and function tracing has been enabled
+
+redir.c
+ - do_redirections and do_redirection_internal now take a single
+ flags argument instead of multiple boolean flags
+
+redir.h
+ - new #defines for flags argument to do_redirection{s,_internal}
+
+execute_cmd.c
+ - change all calls to do_redirection to use new flag values
+
+parse.y
+ - new function, free_pushed_string_input(), an external interface to
+ clear the pushed_string list (alias expansion)
+ - new define SHOULD_PROMPT to say when it's OK to call prompt_again
+ (if the shell is currently interactive and is reading input from
+ the terminal or readline)
+ - make sure shell_getc and read_secondary_line only call prompt_again
+ if SHOULD_PROMPT evaluates to true
+ - prompt_again shouldn't do anything if the shell is currently in the
+ middle of expanding a multiline alias, since we won't be printing a
+ prompt anyway
+
+externs.h
+ - new extern declaration for free_pushed_string_input()
+
+execute_cmd.c
+ - command_substitute and process_substitute now call
+ free_pushed_string_input because they shouldn't deal with any
+ partial alias expansion the parent shell may have started
+
+ 4/5
+ ---
+braces.c
+ - added {x..y} brace expansion, shorthand for {x,x+1,x+2,...,y}:
+ x, y can be integers or single characters; the sequence can be
+ ascending or descending; increment is always 1. Beware that
+ something like {a..A} can lead to non-letters.
+
+ 4/7
+ ---
+subst.c
+ - change extract_delimited_string and extract_dollar_brace_string to
+ return NULL on an expansion error when no_longjmp_on_fatal_error
+ is set, so the calling functions don't assume that the expansion
+ was successful (primarily the prompt expansion and completion code)
+
+doc/{bash.1,bashref.texi}
+ - documented new sequence generation feature of brace expansion
+
+ 4/8
+ ---
+lib/sh/strstr.c
+ - replacement for strstr(3), in case the C library doesn't provide it
+
+configure.in
+ - check for strstr, add to LIBOBJS if not found
+
+array.c
+ - array_walk now takes a third void * argument; it's passed to `func'
+ as its second argument
+
+array.h
+ - change sh_ae_map_func_t prototype to add void * second argument
+
+ 4/10
+ ----
+array.c
+ - new function: array_keys_to_word_list, returns a list of indices for
+ a given array
+
+array.h
+ - new extern declaration for array_keys_to_word_list
+
+arrayfunc.c
+3 - new function: char *array_keys(), returns a string with keys for a
+ given array, with the appropriate quoting
+
+arrayfunc.h
+ - new extern declaration for array_keys
+
+subst.c
+ - code to implement ksh93-like ${!array[@]} expansion (array[*] works,
+ too), which expands to all the keys (indices) of ARRAY
+
+doc/{bash.1,bashref.texi}
+ - documented new ${!array[@]} expansion
+
+ 4/19
+ ----
+builtins/setattr.def
+ - remove any mention of the `-n' option from readonly builtin's short
+ and long documentation
+
+pcomplib.c
+ - fix progcomp_insert to increase the refcount on the `cs' argument
+ before calling hash_insert -- fixes the problem of multiple calls
+ to progcomp_insert with the same compspec
+
+doc/bash.1
+ - add mention of characters that inhibit history expansion when found
+ immediately following an unquoted `!'
+
+bashline.c
+ - convert the code conditionally compiled in by the NO_FORCE_FIGNORE
+ #define to something runtime-tunable with the `force_fignore'
+ variable (opposite sense). force_fignore is 1 by default
+
+builtins/shopt.def
+ - new tunable `shopt' option: `force_fignore', controls force_fignore
+ variable and behavior of FIGNORE handling
+
+lib/readline/complete.c
+ - new variable, _rl_complete_show_unmodified, causes completer to list
+ possible completions if more than one completion and partial
+ completion cannot be done
+ - new value for what_to_do argument to rl_complete_internal, `@',
+ indicating that we want the show-unmodified behavior
+ - change rl_completion_type to return `@' when appropriate
+
+lib/readline/bind.c
+ - new bindable variable, show-all-if-unmodified, which controls value
+ of _rl_complete_show_unmodified
+
+lib/readline/rlprivate.h
+ - extern declaration for _rl_complete_show_unmodified
+
+lib/readline/doc/rluser.texi
+ - documented show-all-if-unmodified
+
+lib/readline/doc/rltech.texi
+ - documented new `@' value for second argument to rl_complete_internal
+ - documented new return value from rl_completion_type
+
+ 4/22
+ ----
+lib/readline/signals.c
+ - in rl_set_signal, set sa_flags to SA_RESTART for SIGWINCH, if we
+ have POSIX signals -- this is what most applications expect, and
+ they're not prepared to deal with EINTR
+
+ 4/25
+ ----
+bashline.c
+ - take out attempts to suppress readline filename completion when
+ attempting command completion and there is a directory with the
+ same name in the current directory. #if 0'd for now; maybe make
+ it conditional later
+
+error.c
+ - new variable, gnu_error_format, causes non-interactive errors with
+ line numbers to be printed in the `gnu style' (filename:lineno:)
+ instead of the `shell style' (filename: line lineno:) by
+ error_prolog and parser_error
+
+version.h,support/mkversion
+ - don't put extern function declarations into created version.h any
+ more
+
+version.c,externs.h
+ - add extern declarations for show_shell_version() and
+ shell_version_string(), since they're no longer in version.h
+ (this backs out change from 9/10/2001)
+
+shell.h
+ - don't include version.h
+
+Makefile.in
+ - remove unneeded dependencies on version.h -- only version.o
+ needs it now
+
+builtins/shopt.def
+ - new option `gnu_errfmt', changes error messages with line numbers
+ to use the `standard' gnu format
+
+pcomplete.h
+ - new COPT_BASHDEFAULT and COPT_PLUSDIRS defines
+
+bashline.c
+ - if the COPT_BASHDEFAULT flag is set, try the rest of the bash
+ default completions if a compspec with that flag set generates
+ no matches
+ - broke bash completions out into separate function:
+ bash_default_completion(const char *text, int start, int end,
+ int qc, int in_command_position); change attempt_shell_completion
+ to call it
+
+bashline.h
+ - new extern declaration for bash_default_completion
+
+builtins/complete.def
+ - added code to compgen to call bash_default_completion if a compspec
+ with the COPT_BASHDEFAULT flag set generates no matches from the
+ programmable completion options
+
+doc/{bash.1,bashref.texi}
+ - document new `gnu_errfmt' shopt option
+
+doc/bash.1,lib/readline/doc/rluser.texi
+ - document new `-o bashdefault' option to complete and compgen
+
+ 4/26
+ ----
+pcomplete.c
+ - if a compspec has the COPT_PLUSDIRS flag set, generate any
+ directory name completions and add them to the set of possible
+ completions as the last thing in gen_compspec_completions
+
+builtins/complete.def
+ - add new `-o plusdirs' option to complete and compgen; means to
+ do directory name completion in addition to other actions
+ specified by the compspec, and do it last
+
+ 5/12
+ ----
+copy_cmd.c
+ - fix copy_{for,select,case}_command to copy the line member
+
+ 5/13
+ ----
+lib/readline/rlmbutil.h,include/shmbutil.h
+ - new #define MB_INVALIDCH, evaluates to true if return value from
+ mbrtowc or mbrlen denotes an invalid multibyte character
+ - new #define MB_NULLWCH, evaluates to true if return value from
+ mbrtowc or mbrlen denotes a null multibyte character
+
+lib/readline/complete.c
+ - new function, fnwidth(), returns printed length of a filename,
+ correctly handling multibyte characters
+ - new function, fnprint(), displays a filename on rl_outstream
+ correctly handling multibyte characters
+ - use fnwidth() instead of simple strlen() for length calculations
+ in display_matches
+
+lib/readline/{display,mbutil}.c
+ - use MB_INVALIDCH and MB_NULLWCH as appropriate
+
+ 5/21
+ ----
+configure.in
+ - turn off the builtin malloc on GNU/FreeBSD systems (GNU userland,
+ FreeBSD kernel)
+
+ 5/24
+ ----
+pcomplete.c
+ - in programmable_completions, copy the compspec before using it to
+ generate the possible completions, allowing the completion for the
+ command to be changed by the compspec itself without causing a
+ core dump because the shell frees freed memory (reported by
+ marcus.harnish@gmx.net)
+
+parse.y
+ - in shell_getc, don't call notify_and_cleanup in an interactive shell
+ unless the shell is currently reading from the terminal and would
+ print a prompt. This fixes programmable completions printing job
+ notifications (reported by r.d.green@lancaster.ac.uk)
+ - use SHOULD_PROMPT macro consistently
+
+shell.c
+ - use get_string_value instead of getenv when looking up $TERM and
+ $EMACS to see whether the shell is running under emacs
+ - check for `TERM=dumb' as well as `EMACS=t' to decide whether or
+ not to turn off command-line editing in emacs shell windows
+ (reported by jik@kamens.brookline.ma.us)
+
+ 5/28
+ ----
+expr.c
+ - save and restore the `evalbuf' context, since evalexp can be
+ called recursively (e.g. a[b[c]])
+
+ 5/29
+ ----
+builtins/common.c
+ - in display_signal_list, when displaying for `kill -l' in posix mode,
+ display signal names without the `SIG' prefix
+
+doc/bashref.texi
+ - documented changed to posix mode behavior of kill -l
+
+builtins/kill.def
+ - changed the error message printed when argument is not a pid or
+ job id
+
+doc/{bash.1,bashref.texi}
+ - fixed a slight inconsistency in the different sections describing
+ the `promptvars' option
+
+doc/Makefile.in
+ - new rule to create `bash.info' from `bashref.info' by running sed
+ to change the internal references. This makes the installed
+ bash.info work right
+ - make the install target install bash.info after it's been modified
+ from bashref.info
+
+ 5/30
+ ----
+builtins/cd.def
+ - after testing with ferror(), call clearerr if ferror() evaluates
+ to true
+
+execute_cmd.c
+ - call clearerr(stdout) after executing a builtin or function,
+ before restoring any redirections
+
+bashhist.c
+ - initialize history_comment_char in bash_history_initialize
+
+builtins/alias.def
+ - if posix mode is enabled, and the `-p' option is not supplied, don't
+ list aliases with a preceding `alias ', as POSIX.2 specifies
+
+doc/bashref.texi
+ - note new posix mode behavior of displaying alias names and values
+ - note new posix mode behavior of trap builtin not checking first
+ argument to be a possible signal specification
+ - note new posix mode behavior of `kill' not accepting signal names
+ with a leading `SIG'
+
+include/stdc.h,lib/readline/rlstdc.h
+ - don't check the __STRICT_ANSI__ define when deciding whether or not
+ to #undef __attribute__
+
+trap.[ch]
+ - decode_signal and signal_object_p take an additional flags arg to
+ satisfy POSIX.2 signal name translation requirements
+ - change decode_signal to honor the new DSIG_NOCASE (match case-
+ insensitively) and DSIG_SIGPREFIX (allow signal specifications
+ with the `SIG' prefix) flags
+
+builtins/{common.c,{trap,kill}.def}
+ - change calls to decode_signal to add the new argument with
+ appropriate values. For kill, POSIX.2 says case-insensitive without
+ the `SIG' prefix. For trap, POSIX.2 says applications may decode
+ case-insensitively and with the SIG prefix
+
+builtins/trap.def
+ - when in posix mode, don't check for the first argument being a
+ possible signal spec and revert the signal handling to the
+ original disposition
+
+ 6/1
+ ---
+shell.h
+ - new MATCH_STARSUB define, to tell the callers of the various pattern
+ substitution and removal functions that call string_list to treat
+ "$*" and "${array[*]}" appropriately
+subst.c
+ - if get_var_and_type encounters an array variable subscripted by `*'
+ or `$*', return VT_STARSUB or'd into the variable type value
+ - callers of get_var_and_type check for VT_STARSUB in the returned type
+ this will fix problems with ${*...} not being separated with the
+ first character of $IFS when double-quoted
+ - in parameter_brace_patsub, set MATCH_STARSUB if VT_STARSUB is set by
+ get_var_and_type
+ - change pos_params_pat_subst to call string_list_dollar_star if
+ the match flags include MATCH_STARSUB
+ - change parameter_brace_substring to call array_subrange with an
+ additional argument indicating the character indexing the array
+
+array.c
+ - change array_patsub to join the modified array elements with the
+ first character of $IFS if MATCH_STARSUB is set in the match flags
+ passed in
+ - array_subrange now takes an additional argument indicating the
+ index type -- used to separate with first char of $IFS if the
+ index char is `*' and the expression is double-quoted
+
+array.h
+ - change prototype declaration of array_subrange to add additional arg
+
+ 6/2
+ ---
+doc/FAQ
+ - merged in some updates about POSIX from Andrew Josey
+
+ 6/3
+ ---
+bashjmp.h
+ - new value for jump_to_top_level: ERREXIT
+
+{eval,shell,subst,trap}.c,builtins/evalstring.c
+ - ERREXIT is (for now) equivalent to EXITPROG as a value from
+ jump_to_top_level
+
+ 6/9
+ ---
+doc/bash.1,lib/readline/doc/readline.3
+ - documented new `show-all-if-unmodified' readline variable
+
+ 6/14
+ ----
+lib/readline/history.c
+ - new function, histdata_t free_history_entry (HIST_ENTRY *h),
+ frees H and its line, returning the application-specific data
+ - use free_history_entry where appropriate
+
+lib/readline/history.h
+ - extern declaration for free_history_entry()
+
+lib/readline/doc/{history.3,hstech.texi}
+ - document free_history_entry
+
+ 6/16
+ ----
+lib/readline/readline.[ch]
+ - changed varions defines for readline/history library versions to 5.0
+
+subst.c
+ - pass information about whether or not an indirectly-expanded variable
+ contains ${array[@]}, ${array[*]}, $@, or $*
+ - new function, chk_atstar, performs checks for ${array[@]},
+ ${array[*]}, $@, or $* for the parameter_brace_expand* functions and
+ sets flags (passed as args) to the results
+ - call chk_atstar from parameter_brace_expand_indir and
+ parameter_brace_expand
+
+ 6/28
+ ----
+doc/{bash.1,bashref.texi}
+ - clarified that (...) commands are executed in a subshell environment
+
+ 6/30
+ ----
+lib/readline/bind.c
+ - fix a problem with parsing nested if statements in inputrc files
+ (fix from dimakar@yahoo.com)
+
+ 7/3
+ ---
+{jobs,nojobs}.c
+ - fix places that use the return value from strsignal() to check
+ for NULL return values using a new function, j_strsignal()
+
+builtins/kill.def
+ - removed JOB_CONTROL restriction; kill is now available as a builtin
+ when the shell is built without job control
+
+ 7/10
+ ----
+jobs.c
+ - some systems have WIFCONTINUED but not WCONTINUED; separate the
+ #defines
+
+ 7/14
+ ----
+lib/readline/history.h
+ - new `timestamp' member of a HIST_ENTRY
+ - extern declarations for add_history_time and history_get_time
+
+lib/readline/doc/{history.3,hstech.texi}
+ - document add_history_time and history_get_time
+
+lib/readline/history.c
+ - implementations of history_get_time and add_history_time
+ - change add_history to initialize the timestamp information
+ - change free_history_entry to free the timestamp
+ - change replace_history_entry to duplicate the timestamp
+ - change history_total_bytes to add the memory taken by the time
+ stamps
+
+bashhist.c,builtins/history.def
+ - use free_history_entry where appropriate
+
+lib/readline/histfile.c
+ - changes to read_history_range to deal with new history file format
+ including timestamps
+ - changes to history_do_write to write out the timestamp information
+ - changes to history_truncate_file to understand the timestamp
+ information
+
+ 7/22
+ ----
+doc/{bash.1,bashref.texi}
+ - fixed function declaration documentation to specify that any compound
+ command may be used as the function body, not just a group command
+
+ 7/23
+ ----
+lib/readline/histfile.c
+ - don't allocate space for null timestamps in history_do_write, and
+ don't write out null timestamp entries
+
+parse.y
+ - fix CHECK_FOR_RESERVED_WORD to call time_command_acceptable() and
+ return TIME if the token is "time" and `time' is legal in that
+ context
+
+ 7/29
+ ----
+lib/sh/fmtulong.c
+ - include <inttypes.h> 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
+ <gmorris+gmane@ast.cam.ac.uk>)
+
+ 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
+ <moseley@hank.org>; fix inspired by <carlo@alinoe.com>
+
+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 <blank> 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 <petrides@redhat.com>.
+
+ 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 <ed@catmur.co.uk> 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 <twaugh@redhat.com>
+ - 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 <config.h> 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
+ <nordhaus@informatik.hu-berlin.de> 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 <mwberryman@copper.net>
+
+ 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 <twaugh@redhat.com>
+
+ 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 --git a/INSTALL b/INSTALL
index bd0d4172..fc664072 100644
--- a/INSTALL
+++ b/INSTALL
@@ -283,7 +283,12 @@ does not provide the necessary support.
builtins and functions to be timed.
`--enable-cond-command'
- Include support for the `[[' conditional command (*note
+ 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::).
`--enable-directory-stack'
@@ -316,6 +321,10 @@ does not provide the necessary support.
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'
This enables the special handling of filenames of the form
`/dev/tcp/HOST/PORT' and `/dev/udp/HOST/PORT' when used in
diff --git a/MANIFEST b/MANIFEST
index bfcac430..121135fe 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -26,6 +26,7 @@ include d
lib d
lib/glob d
lib/glob/doc d
+lib/intl d
lib/malloc d
lib/readline d
lib/readline/doc d
@@ -35,9 +36,11 @@ lib/termcap d
lib/termcap/grot d
lib/tilde d
lib/tilde/doc d
+po d
support d
tests d
tests/misc d
+ABOUT-NLS f
CHANGES f
COMPAT f
COPYING f
@@ -140,16 +143,17 @@ execute_cmd.h f
redir.h f
bashtypes.h f
mailcheck.h f
-pathnames.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
builtins/bind.def f
builtins/break.def f
builtins/builtin.def f
+builtins/caller.def f
builtins/cd.def f
builtins/colon.def f
builtins/command.def f
@@ -207,6 +211,7 @@ cross-build/opennt.cache f
include/ansi_stdlib.h f
include/chartypes.h f
include/filecntl.h f
+include/gettext.h f
include/maxpath.h f
include/memalloc.h f
include/ocache.h f
@@ -234,6 +239,47 @@ lib/glob/collsyms.h f
lib/glob/doc/Makefile f
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
lib/malloc/imalloc.h f
@@ -313,14 +359,15 @@ lib/readline/rlstdc.h f
lib/readline/rlprivate.h f
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/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
lib/readline/examples/fileman.c f
@@ -351,6 +398,7 @@ lib/sh/pathcanon.c f
lib/sh/pathphys.c f
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
lib/sh/snprintf.c f
@@ -362,6 +410,7 @@ lib/sh/strindex.c f
lib/sh/stringlist.c f
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
lib/sh/strtol.c f
@@ -406,6 +455,24 @@ lib/tilde/doc/Makefile f
lib/tilde/tilde.c f
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
CWRU/misc/sigstat.c f
@@ -427,12 +494,17 @@ doc/README f
doc/INTRO f
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
support/printenv.c f
@@ -441,6 +513,7 @@ support/missing f 755
support/mkclone f 755
support/mkconffiles f 755
support/mkdirs f 755
+support/mkinstalldirs f 755
support/mkversion.sh f 755
support/mksignames.c f
support/bashbug.sh f
@@ -450,7 +523,7 @@ support/zecho.c f
support/SYMLINKS f
support/fixlinks f 755
support/install.sh f 755
-support/texi2dvi f
+support/texi2dvi f 755
support/texi2html f 755
support/xenix-link.sh f 755
support/shobj-conf f 755
@@ -468,6 +541,7 @@ examples/complete/complete.ianmac f
examples/complete/complete2.ianmac f
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
examples/loadables/Makefile.in f
@@ -476,6 +550,7 @@ examples/loadables/hello.c f
examples/loadables/print.c f
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
examples/loadables/getconf.c f
@@ -601,15 +676,19 @@ examples/misc/aliasconv.sh f
examples/misc/aliasconv.bash f
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.tests f
tests/braces.right f
tests/builtins.tests f
tests/builtins.right f
@@ -624,7 +703,15 @@ tests/cond.tests f
tests/cond.right f
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
tests/dstack.right f
@@ -640,6 +727,7 @@ tests/exec3.sub f
tests/exec4.sub f
tests/exec5.sub f
tests/exec6.sub f
+tests/exec7.sub f
tests/exp-tests f
tests/exp.right f
tests/extglob.tests f
@@ -683,6 +771,7 @@ tests/jobs.tests f
tests/jobs1.sub f
tests/jobs2.sub f
tests/jobs3.sub f
+tests/jobs4.sub f
tests/jobs.right f
tests/more-exp.tests f
tests/more-exp.right f
@@ -690,6 +779,7 @@ tests/new-exp.tests f
tests/new-exp1.sub f
tests/new-exp2.sub f
tests/new-exp3.sub f
+tests/new-exp4.sub f
tests/new-exp.right f
tests/nquote.tests f
tests/nquote.right f
@@ -699,6 +789,8 @@ tests/nquote2.tests f
tests/nquote2.right f
tests/nquote3.tests f
tests/nquote3.right f
+tests/nquote4.tests f
+tests/nquote4.right f
tests/posix2.tests f
tests/posix2.right f
tests/posixpat.tests f
@@ -715,6 +807,7 @@ tests/read1.sub f
tests/read2.sub f
tests/read3.sub f
tests/read4.sub f
+tests/read5.sub f
tests/redir.tests f
tests/redir.right f
tests/redir1.sub f
@@ -725,12 +818,14 @@ tests/redir3.in2 f
tests/redir4.sub f
tests/redir4.in1 f
tests/redir5.sub f
+tests/redir6.sub f
tests/rhs-exp.tests f
tests/rhs-exp.right f
tests/rsh.tests f
tests/rsh.right f
tests/run-all f
tests/run-minimal f
+tests/run-alias f
tests/run-arith-for f
tests/run-arith f
tests/run-array f
@@ -739,6 +834,8 @@ tests/run-braces f
tests/run-builtins f
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
tests/run-errors f
@@ -763,6 +860,7 @@ tests/run-nquote f
tests/run-nquote1 f
tests/run-nquote2 f
tests/run-nquote3 f
+tests/run-nquote4 f
tests/run-posix2 f
tests/run-posixpat f
tests/run-precedence f
@@ -773,6 +871,7 @@ tests/run-redir f
tests/run-rhs-exp f
tests/run-rsh f
tests/run-set-e f
+tests/run-set-x f
tests/run-shopt f
tests/run-strip f
tests/run-test f
@@ -782,6 +881,8 @@ tests/run-type f
tests/run-varenv f
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
tests/strip.tests f
diff --git a/Makefile.in b/Makefile.in
index a3dcd7ee..56bc2b4b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,6 +1,6 @@
-# Makefile for bash-2.05b, version 2.142
+# Makefile for bash-3.0, version 2.152
#
-# Copyright (C) 1996-2002 Free Software Foundation, Inc.
+# Copyright (C) 1996-2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,6 +19,14 @@
# Make sure the first target in the makefile is the right one
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@
@@ -28,6 +36,7 @@ libdir = @libdir@
infodir = @infodir@
includedir = @includedir@
datadir = @datadir@
+localedir = $(datadir)/locale
mandir = @mandir@
manpfx = man
@@ -44,6 +53,7 @@ DESTDIR =
topdir = @top_srcdir@
BUILD_DIR = @BUILD_DIR@
+top_builddir = @BUILD_DIR@
srcdir = @srcdir@
VPATH = .:@srcdir@
@@ -113,12 +123,14 @@ LOCAL_CFLAGS = @LOCAL_CFLAGS@ ${DEBUG}
DEFS = @DEFS@
LOCAL_DEFS = @LOCAL_DEFS@
+LOCALE_DEFS = -DLOCALEDIR='"$(localedir)"' -DPACKAGE='"$(PACKAGE)"'
+
LOCAL_LIBS = @LOCAL_LIBS@
LIBS = $(BUILTINS_LIB) $(LIBRARIES) @LIBS@
STATIC_LD = @STATIC_LD@
LOCAL_LDFLAGS = @LOCAL_LDFLAGS@
-SYSTEM_FLAGS = -DPROGRAM='"$(Program)"' -DCONF_HOSTTYPE='"$(Machine)"' -DCONF_OSTYPE='"$(OS)"' -DCONF_MACHTYPE='"$(MACHTYPE)"' -DCONF_VENDOR='"$(VENDOR)"'
+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) \
$(DEFS) $(LOCAL_CFLAGS) $(INCLUDES)
@@ -130,7 +142,7 @@ CCFLAGS_FOR_BUILD = $(BASE_CCFLAGS) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD)
LDFLAGS = @LDFLAGS@ $(STATIC_LD) $(LOCAL_LDFLAGS) $(PROFILE_FLAGS) $(CFLAGS)
LDFLAGS_FOR_BUILD = $(LDFLAGS)
-INCLUDES = -I. @RL_INCLUDE@ -I$(srcdir) -I$(BASHINCDIR) -I$(LIBSRC)
+INCLUDES = -I. @RL_INCLUDE@ -I$(srcdir) -I$(BASHINCDIR) -I$(LIBSRC) $(INTL_INC)
GCC_LINT_FLAGS = -Wall -Wshadow -Wpointer-arith -Wcast-qual \
-Wcast-align -Wstrict-prototypes -Wconversion \
@@ -147,8 +159,13 @@ dot = .
LIBSUBDIR = lib
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
# some platforms and general shell utility functions
@@ -179,7 +196,7 @@ SHLIB_SOURCE = ${SH_LIBSRC}/clktck.c ${SH_LIBSRC}/getcwd.c \
${SH_LIBSRC}/fmtumax.c ${SH_LIBSRC}/netconn.c \
${SH_LIBSRC}/mktime.c ${SH_LIBSRC}/strftime.c \
${SH_LIBSRC}/memset.c ${SH_LIBSRC}/xstrchr.c \
- ${SH_LIBSRC}/zcatfd.c
+ ${SH_LIBSRC}/zcatfd.c ${SH_LIBSRC}/shmatch.c
SHLIB_LIB = -lsh
SHLIB_LIBNAME = libsh.a
@@ -221,7 +238,7 @@ READLINE_SOURCE = $(RL_LIBSRC)/rldefs.h $(RL_LIBSRC)/rlconf.h \
$(RL_LIBSRC)/terminal.c $(RL_LIBSRC)/nls.c \
$(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)/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
@@ -236,7 +253,7 @@ READLINE_OBJ = $(RL_LIBDIR)/readline.o $(RL_LIBDIR)/funmap.o \
$(RL_LIBDIR)/macro.o $(RL_LIBDIR)/input.o \
$(RL_LIBDIR)/terminal.o $(RL_LIBDIR)/callback.o \
$(RL_LIBDIR)/shell.o $(RL_LIBDIR)/savestring.o \
- $(RL_LIBDIR)/compat.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
@@ -300,6 +317,25 @@ TILDE_DEP = $(TILDE_LIBRARY)
TILDE_SOURCE = $(TILDE_LIBSRC)/tilde.c $(TILDE_LIBSRC)/tilde.h
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@
@@ -341,9 +377,9 @@ BASHINCFILES = $(BASHINCDIR)/posixstat.h $(BASHINCDIR)/ansi_stdlib.h \
$(BASHINCDIR)/ocache.h
LIBRARIES = $(SHLIB_LIB) $(READLINE_LIB) $(HISTORY_LIB) $(TERMCAP_LIB) $(GLOB_LIB) \
- $(TILDE_LIB) $(MALLOC_LIB) $(LOCAL_LIBS)
+ $(TILDE_LIB) $(MALLOC_LIB) $(INTL_LIB) $(LOCAL_LIBS)
-LIBDEP = $(SHLIB_DEP) $(READLINE_DEP) $(HISTORY_DEP) $(TERMCAP_DEP) $(GLOB_DEP) \
+LIBDEP = $(SHLIB_DEP) $(INTL_DEP) $(READLINE_DEP) $(HISTORY_DEP) $(TERMCAP_DEP) $(GLOB_DEP) \
$(TILDE_DEP) $(MALLOC_DEP)
LIBRARY_LDFLAGS = $(READLINE_LDFLAGS) $(HISTORY_LDFLAGS) $(GLOB_LDFLAGS) \
@@ -395,11 +431,12 @@ BUILTIN_SRCDIR=$(srcdir)/builtins
DEFSRC=$(BUILTIN_SRCDIR)
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)/declare.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 \
$(DEFSRC)/fg_bg.def $(DEFSRC)/hash.def $(DEFSRC)/help.def \
@@ -418,7 +455,7 @@ BUILTIN_C_OBJ = $(DEFDIR)/common.o $(DEFDIR)/evalstring.o \
$(DEFDIR)/evalfile.o $(DEFDIR)/bashgetopt.o
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)/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 \
$(DEFDIR)/fg_bg.o $(DEFDIR)/hash.o $(DEFDIR)/help.o \
@@ -442,6 +479,10 @@ BUILTINS_DEP = $(BUILTINS_LIBRARY)
DOCSRC = $(srcdir)/doc
DOCDIR = $(dot)/doc
+# Translations and other i18n support files
+PO_SRC = $(srcdir)/po/
+PO_DIR = $(dot)/po/
+
SIGNAMES_SUPPORT = $(SUPPORT_SRC)mksignames.c
SUPPORT_SRC = $(srcdir)/support/
@@ -454,12 +495,13 @@ CREATED_SUPPORT = signames.h recho$(EXEEXT) zecho$(EXEEXT) printenv$(EXEEXT) \
mksyntax${EXEEXT} syntax.c $(VERSPROG) $(VERSOBJ) \
buildversion.o
CREATED_CONFIGURE = config.h config.cache config.status config.log \
- stamp-h
+ 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
+ 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.
.NOEXPORT:
@@ -506,7 +548,7 @@ bashversion$(EXEEXT): patchlevel.h conftypes.h version.h buildversion.o $(SUPPOR
$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)bashversion.c buildversion.o
buildversion.o: version.h conftypes.h patchlevel.h $(srcdir)/version.c
- $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -c -o $@ $(srcdir)/version.c
+ $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -DBUILDTOOL -c -o $@ $(srcdir)/version.c
# old rules
GRAM_H = parser-built
@@ -558,6 +600,13 @@ $(SHLIB_LIBRARY): config.h ${SHLIB_SOURCE}
@(cd ${SH_LIBDIR} && \
$(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
@@ -578,7 +627,7 @@ syntax.c: mksyntax${EXEEXT} $(srcdir)/syntax.h
$(RM) $@
./mksyntax -o $@
-$(BUILTINS_LIBRARY): $(BUILTIN_DEFS) $(BUILTIN_C_SRC) config.h ${BASHINCDIR}/memalloc.h
+$(BUILTINS_LIBRARY): $(BUILTIN_DEFS) $(BUILTIN_C_SRC) config.h ${BASHINCDIR}/memalloc.h version.h
@(cd $(DEFDIR) && $(MAKE) $(MFLAGS) DEBUG=${DEBUG} libbuiltins.a ) || exit 1
# these require special rules to circumvent make builtin rules
@@ -597,6 +646,9 @@ ${DEFDIR}/builtext.h: $(BUILTIN_DEFS)
Makefile makefile: config.status $(srcdir)/Makefile.in
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 \
CONFIG_FILES=$$mf CONFIG_HEADERS= $(SHELL) ./config.status ; \
@@ -641,9 +693,10 @@ TAGS: $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE)
# Targets that actually do things not part of the build
installdirs:
- @${SHELL} $(SUPPORT_SRC)mkdirs $(DESTDIR)$(bindir)
- @${SHELL} $(SUPPORT_SRC)mkdirs $(DESTDIR)$(man1dir)
- @${SHELL} $(SUPPORT_SRC)mkdirs $(DESTDIR)$(infodir)
+ @${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
$(INSTALL_PROGRAM) $(INSTALLMODE) $(Program) $(DESTDIR)$(bindir)/$(Program)
@@ -653,6 +706,7 @@ install: .made installdirs
man3dir=$(man3dir) man3ext=$(man3ext) \
infodir=$(infodir) htmldir=$(htmldir) DESTDIR=$(DESTDIR) $@ )
-( cd $(DEFDIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ )
+ -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ )
install-strip:
$(MAKE) $(MFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
@@ -665,49 +719,44 @@ uninstall: .made
man1dir=$(man1dir) man1ext=$(man1ext) \
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
+ $(RM) .build .made version.h pathnames.h
clean: basic-clean
( cd $(DOCDIR) && $(MAKE) $(MFLAGS) $@ )
( 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) $@)
+ -for libdir in ${LIB_SUBDIRS}; do \
+ (cd $$libdir && test -f Makefile && $(MAKE) $(MFLAGS) $@) ;\
+ done
+ -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ )
$(RM) $(CREATED_SUPPORT)
mostlyclean: basic-clean
( cd $(DOCDIR) && $(MAKE) $(MFLAGS) $@ )
( 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) $@)
+ -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
( cd $(DOCDIR) && $(MAKE) $(MFLAGS) $@ )
( 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) $@)
+ -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)
@@ -718,13 +767,10 @@ maintainer-clean: basic-clean
( cd $(DOCDIR) && $(MAKE) $(MFLAGS) $@ )
( 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) $@)
+ -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
@@ -754,9 +800,9 @@ symlinks:
dist: force
@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
+ @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
@@ -799,22 +845,27 @@ dispose_cmd.o: make_cmd.h subst.h sig.h pathnames.h externs.h
dispose_cmd.o: ${BASHINCDIR}/ocache.h
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
eval.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
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
+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: 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: 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
expr.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
@@ -826,7 +877,7 @@ findcmd.o: ${BASHINCDIR}/stdc.h error.h general.h xmalloc.h variables.h arrayfun
findcmd.o: dispose_cmd.h make_cmd.h subst.h sig.h pathnames.h externs.h
findcmd.o: flags.h hashlib.h pathexp.h hashcmd.h
findcmd.o: ${BASHINCDIR}/chartypes.h
-flags.o: config.h flags.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
flags.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
@@ -835,7 +886,7 @@ general.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl
general.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
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: make_cmd.h subst.h sig.h pathnames.h externs.h
general.o: ${BASHINCDIR}/maxpath.h ${BASHINCDIR}/posixtime.h
general.o: ${BASHINCDIR}/chartypes.h
hashcmd.o: config.h ${BASHINCDIR}/posixstat.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
@@ -846,18 +897,18 @@ hashlib.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
hashlib.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
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
+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
list.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
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
+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: 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
mailcheck.o: ${BASHINCDIR}/posixtime.h
@@ -865,7 +916,7 @@ mailcheck.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h comman
mailcheck.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
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
+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
make_cmd.o: variables.h arrayfunc.h conftypes.h array.h hashlib.h subst.h input.h externs.h
@@ -890,18 +941,18 @@ print_cmd.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
print_cmd.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
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: 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: 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
shell.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
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: 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
shell.o: ${GLOB_LIBSRC}/strmatch.h ${BASHINCDIR}/posixtime.h
@@ -909,20 +960,20 @@ sig.o: config.h bashtypes.h
sig.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
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: 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
stringlib.o: bashtypes.h ${BASHINCDIR}/chartypes.h
stringlib.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
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: 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
subst.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
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: 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
subst.o: bashline.h bashhist.h ${GLOB_LIBSRC}/strmatch.h
@@ -933,25 +984,26 @@ test.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h $
test.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
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
+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: 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
variables.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
variables.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
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: 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: pcomplete.h ${BASHINCDIR}/chartypes.h
variables.o: ${BASHINCDIR}/posixtime.h
-version.o: version.h conftypes.h patchlevel.h
+version.o: conftypes.h patchlevel.h version.h
xmalloc.o: config.h bashtypes.h ${BASHINCDIR}/ansi_stdlib.h error.h
# job control
@@ -961,7 +1013,7 @@ jobs.o: bashansi.h ${BASHINCDIR}/ansi_stdlib.h
jobs.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
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: 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
jobs.o: ${BASHINCDIR}/posixtime.h
@@ -975,24 +1027,24 @@ array.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
array.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
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: 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
arrayfunc.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
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: make_cmd.h subst.h sig.h pathnames.h externs.h
arrayfunc.o: $(DEFSRC)/common.h
arrayfunc.o: ${BASHINCDIR}/shmbutil.h
braces.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
braces.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
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: 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: pcomplete.h
alias.o: ${BASHINCDIR}/chartypes.h
pcomplib.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h bashtypes.h
@@ -1005,7 +1057,7 @@ pcomplete.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h bashtypes.h
pcomplete.o: ${BASHINCDIR}/stdc.h hashlib.h pcomplete.h shell.h syntax.h
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
+pcomplete.o: externs.h ${BASHINCDIR}/maxpath.h execute_cmd.h
# library support files
@@ -1014,14 +1066,14 @@ bashhist.o: ${BASHINCDIR}/filecntl.h
bashhist.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
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: 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
bashline.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
bashline.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
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: 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
bashline.o: pcomplete.h ${BASHINCDIR}/chartypes.h input.h
@@ -1029,7 +1081,7 @@ bracecomp.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
bracecomp.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
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: 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
bracecomp.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
@@ -1059,27 +1111,57 @@ shell.o: $(TILDE_LIBSRC)/tilde.h
subst.o: $(TILDE_LIBSRC)/tilde.h
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
# builtin c sources
builtins/bashgetopt.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
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: make_cmd.h subst.h sig.h pathnames.h externs.h
builtins/bashgetopt.o: $(DEFSRC)/common.h
builtins/bashgetopt.o: ${BASHINCDIR}/chartypes.h
builtins/common.o: bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
builtins/common.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h command.h
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: 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
builtins/common.o: ${BASHINCDIR}/chartypes.h
builtins/evalfile.o: bashtypes.h ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
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: 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
builtins/evalstring.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
@@ -1092,7 +1174,7 @@ builtins/evalstring.o: bashhist.h $(DEFSRC)/common.h
builtins/getopt.o: config.h ${BASHINCDIR}/memalloc.h
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: 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
builtins/mkbuiltins.o: bashansi.h ${BASHINCDIR}/ansi_stdlib.h
@@ -1113,6 +1195,12 @@ builtins/builtin.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.
builtins/builtin.o: quit.h $(DEFSRC)/common.h $(DEFSRC)/bashgetopt.h
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
builtins/cd.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
@@ -1131,16 +1219,16 @@ builtins/echo.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
builtins/enable.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
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/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: 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: 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: 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
builtins/exit.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
@@ -1151,22 +1239,22 @@ builtins/fc.o: flags.h unwind_prot.h variables.h arrayfunc.h conftypes.h shell.h
builtins/fc.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h quit.h
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: 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
builtins/fg_bg.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
builtins/getopts.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
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: 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
builtins/hash.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: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
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/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
builtins/history.o: ${BASHINCDIR}/filecntl.h shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h
@@ -1217,14 +1305,14 @@ builtins/shopt.o: $(DEFSRC)/common.h $(DEFSRC)/bashgetopt.h
builtins/source.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
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/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
builtins/suspend.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h
builtins/test.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
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/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
builtins/times.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h
@@ -1251,10 +1339,47 @@ builtins/wait.o: ${BASHINCDIR}/chartypes.h
builtins/complete.o: config.h shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h
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: 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
builtins/bind.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/rlstdc.h
@@ -1270,6 +1395,7 @@ builtins/alias.o: $(DEFSRC)/alias.def
builtins/bind.o: $(DEFSRC)/bind.def
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
builtins/command.o: $(DEFSRC)/command.def
diff --git a/NEWS b/NEWS
index b545eb60..a8e05129 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,197 @@
+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
the place to look for complete descriptions.
diff --git a/NOTES b/NOTES
index 31068d0e..d6e3d813 100644
--- a/NOTES
+++ b/NOTES
@@ -324,3 +324,6 @@ Platform-Specific Configuration and Operation Notes
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 --git a/POSIX b/POSIX
index 977f9891..05700c61 100644
--- a/POSIX
+++ b/POSIX
@@ -29,20 +29,20 @@ The following list is what's changed when `POSIX mode' is in effect:
performed on the values of `PS1' and `PS2' regardless of the
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
+ 6. 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
+ 7. 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
+ 8. 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.
+ 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
found.
@@ -103,23 +103,33 @@ The following list is what's changed when `POSIX mode' is in effect:
26. The `trap' builtin displays signal names without the leading `SIG'.
- 27. The `.' and `source' builtins do not search the current directory
+ 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'.
- 28. Subshells spawned to execute command substitutions inherit the
+ 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.
- 29. Alias expansion is always enabled, even in non-interactive shells.
+ 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.
- 30. When the `set' builtin is invoked without options, it does not
+ 32. 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
+ 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.
- 32. When the `cd' builtin is invoked in LOGICAL mode, and the pathname
+ 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
instead of falling back to PHYSICAL mode.
diff --git a/README b/README
index 9dff9ef2..08ebaf2c 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
Introduction
============
-This is GNU Bash, version 2.05b. Bash is the GNU Project's Bourne
+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
architectures that support it, csh-like features such as history
@@ -11,11 +11,11 @@ type of shell, see the file `doc/bashref.texi'. There is also a
large Unix-style man page. The man page is the definitive description
of the shell's features.
-See the file CWRU/POSIX.NOTES for a discussion of how Bash differs
+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 the previous widely-distributed version, bash-1.14.
+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 --git a/Y2K b/Y2K
index aa7ac311..d12e3525 100644
--- a/Y2K
+++ b/Y2K
@@ -1,5 +1,4 @@
Since Bash does not manipulate date strings, it is Y2K-safe.
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.
+returned by ctime(3) or strftime(3) in the prompt customization code.
diff --git a/aclocal.m4 b/aclocal.m4
index d1ad025f..9d2ed544 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -685,65 +685,26 @@ fi
])
AC_DEFUN(BASH_FUNC_GETCWD,
-[AC_MSG_CHECKING([if getcwd() calls popen()])
-AC_CACHE_VAL(bash_cv_getcwd_calls_popen,
+[AC_MSG_CHECKING([if getcwd() will dynamically allocate memory])
+AC_CACHE_VAL(bash_cv_getcwd_malloc,
[AC_TRY_RUN([
#include <stdio.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#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);
+ char *xpwd;
+ xpwd = getcwd(0, 0);
+ exit (xpwd == 0);
}
-], 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]
+], 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_calls_popen)
-if test $bash_cv_getcwd_calls_popen = yes; then
+AC_MSG_RESULT($bash_cv_getcwd_malloc)
+if test $bash_cv_getcwd_malloc = no; then
AC_DEFINE(GETCWD_BROKEN)
AC_LIBOBJ(getcwd)
fi
@@ -981,11 +942,12 @@ AC_MSG_CHECKING(which library has the termcap functions)
_bash_needmsg=
fi
AC_CACHE_VAL(bash_cv_termcap_lib,
-[AC_CHECK_LIB(termcap, tgetent, bash_cv_termcap_lib=libtermcap,
+[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)])])])])
+ bash_cv_termcap_lib=gnutermcap)])])])])])
if test "X$_bash_needmsg" = "Xyes"; then
AC_MSG_CHECKING(which library has the termcap functions)
fi
@@ -1003,6 +965,9 @@ TERMCAP_DEP=
elif test $bash_cv_termcap_lib = libncurses; then
TERMCAP_LIB=-lncurses
TERMCAP_DEP=
+elif test $bash_cv_termcap_lib = libc; then
+TERMCAP_LIB=
+TERMCAP_DEP=
else
TERMCAP_LIB=-lcurses
TERMCAP_DEP=
@@ -1061,7 +1026,7 @@ fi
AC_DEFUN(BASH_STRUCT_DIRENT_D_INO,
[AC_REQUIRE([AC_HEADER_DIRENT])
-AC_MSG_CHECKING(if struct dirent has a d_ino member)
+AC_MSG_CHECKING(for struct dirent.d_ino)
AC_CACHE_VAL(bash_cv_dirent_has_dino,
[AC_TRY_COMPILE([
#include <stdio.h>
@@ -1088,13 +1053,13 @@ struct dirent d; int z; z = d.d_ino;
], bash_cv_dirent_has_dino=yes, bash_cv_dirent_has_dino=no)])
AC_MSG_RESULT($bash_cv_dirent_has_dino)
if test $bash_cv_dirent_has_dino = yes; then
-AC_DEFINE(STRUCT_DIRENT_HAS_D_INO)
+AC_DEFINE(HAVE_STRUCT_DIRENT_D_INO)
fi
])
AC_DEFUN(BASH_STRUCT_DIRENT_D_FILENO,
[AC_REQUIRE([AC_HEADER_DIRENT])
-AC_MSG_CHECKING(if struct dirent has a d_fileno member)
+AC_MSG_CHECKING(for struct dirent.d_fileno)
AC_CACHE_VAL(bash_cv_dirent_has_d_fileno,
[AC_TRY_COMPILE([
#include <stdio.h>
@@ -1121,7 +1086,40 @@ struct dirent d; int z; z = d.d_fileno;
], bash_cv_dirent_has_d_fileno=yes, bash_cv_dirent_has_d_fileno=no)])
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)
+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 <stdio.h>
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#if defined(HAVE_DIRENT_H)
+# include <dirent.h>
+#else
+# define dirent direct
+# ifdef HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif /* SYSNDIR */
+# ifdef HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif /* SYSDIR */
+# ifdef HAVE_NDIR_H
+# include <ndir.h>
+# 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
])
@@ -1141,6 +1139,22 @@ if test $bash_cv_struct_timeval = yes; then
fi
])
+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)
AC_CACHE_VAL(bash_cv_struct_winsize_header,
@@ -1526,9 +1540,9 @@ fi
AC_DEFUN(BASH_CHECK_DEV_FD,
[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
+[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; then
+ elif test -d /proc/self/fd && test -r /proc/self/fd/0 < /dev/null; then
bash_cv_dev_fd=whacky
else
bash_cv_dev_fd=absent
@@ -1547,9 +1561,9 @@ fi
AC_DEFUN(BASH_CHECK_DEV_STDIN,
[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
+[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; then
+ elif test -d /proc/self/fd && test -r /dev/stdin < /dev/null; then
bash_cv_dev_stdin=present
else
bash_cv_dev_stdin=absent
@@ -1653,17 +1667,19 @@ AC_CHECK_HEADERS(wchar.h)
AC_CHECK_HEADERS(langinfo.h)
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_RUN([
-#include <wchar.h>
-int
-main ()
-{
+[AC_TRY_COMPILE([
+#include <wchar.h>], [
mbstate_t ps;
- return 0;
-}], bash_cv_have_mbstate_t=yes, bash_cv_have_mbstate_t=no)])
+ 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)
fi
@@ -1712,7 +1728,8 @@ LIBS="$LIBS -lreadline ${TERMCAP_LIB}"
CFLAGS="$CFLAGS -I${ac_cv_rl_includedir}"
LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}"
-AC_TRY_RUN([
+AC_CACHE_VAL(ac_cv_rl_version,
+[AC_TRY_RUN([
#include <stdio.h>
#include <readline/readline.h>
@@ -1728,7 +1745,7 @@ main()
],
ac_cv_rl_version=`cat conftest.rlv`,
ac_cv_rl_version='0.0',
-ac_cv_rl_version='4.2')
+ac_cv_rl_version='4.2')])
CFLAGS="$_save_CFLAGS"
LDFLAGS="$_save_LDFLAGS"
@@ -1790,3 +1807,2107 @@ AC_MSG_RESULT($ac_cv_rl_version)
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 <locale.h>
+#endif
+#include <stdio.h>
+#include <ctype.h>
+
+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 <langinfo.h>],
+ [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 <langinfo.h> 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 <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 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 <inttypes.h> 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 <libintl.h>
+]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 <libintl.h>
+]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 <libintl.h>
+]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 <features.h>
+#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 <stdlib.h>
+#include <iconv.h>],
+ [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 <stdlib.h>
+#include <iconv.h>],
+ [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 <stdlib.h>
+#include <iconv.h>
+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 <stdlib.h>
+#include <signal.h>
+
+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 <inttypes.h> exists and doesn't clash with
+# <sys/types.h>.
+
+AC_DEFUN([gt_HEADER_INTTYPES_H],
+[
+ AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
+ [
+ AC_TRY_COMPILE(
+ [#include <sys/types.h>
+#include <inttypes.h>],
+ [], 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 <inttypes.h> exists and doesn't clash with <sys/types.h>.])
+ 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 <inttypes.h> exists,
+# doesn't clash with <sys/types.h>, 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 <sys/types.h>
+#include <inttypes.h>],
+ [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 <inttypes.h> exists, doesn't clash with <sys/types.h>,
+ 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 <inttypes.h> 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 <inttypes.h>
+#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 <inttypes.h> 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 <drepper@cygnus.com>, 1995.
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+
+AC_DEFUN([AM_LC_MESSAGES],
+[
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
+ [Define if your <locale.h> 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 </dev/null | egrep '(GNU|with BFD)' 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 <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 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 <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 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 <drepper@cygnus.com>, 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 <stdint.h> exists,
+# doesn't clash with <sys/types.h>, 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 <sys/types.h>
+#include <stdint.h>],
+ [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 <stdint.h> exists, doesn't clash with <sys/types.h>,
+ 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 <stdint.h> or <inttypes.h>.
+
+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 <stdint.h> and <inttypes.h> don't define.])
+ else
+ AC_DEFINE(HAVE_UINTMAX_T, 1,
+ [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
+ 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 --git a/array.c b/array.c
index a73be55a..7b0a5d7b 100644
--- a/array.c
+++ b/array.c
@@ -9,7 +9,7 @@
* chet@ins.cwru.edu
*/
-/* Copyright (C) 1997-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -154,16 +154,17 @@ ARRAY_ELEMENT *s, *e;
* element as the argument.
*/
void
-array_walk(a, func)
+array_walk(a, func, udata)
ARRAY *a;
sh_ae_map_func_t *func;
+void *udata;
{
register ARRAY_ELEMENT *ae;
if (a == 0 || array_empty(a))
return;
for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae))
- if ((*func)(ae) < 0)
+ if ((*func)(ae, udata) < 0)
return;
}
@@ -265,6 +266,21 @@ char *s;
return (a->num_elements);
}
+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)
ARRAY *array;
@@ -282,27 +298,50 @@ ARRAY *array;
return array;
}
+/*
+ * 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, end, quoted)
+array_subrange (a, start, nelem, starsub, quoted)
ARRAY *a;
-arrayind_t start, end;
-int quoted;
+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_num_elements (a))
+ if (p == 0 || array_empty (a) || start > array_max_index(a))
return ((char *)NULL);
- for (i = 0, p = element_forw(p); p != a->head && i < start; i++, p = element_forw(p))
+ /*
+ * 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);
- for (h = p; p != a->head && i < end; i++, p = element_forw(p))
+
+ /* Starting at P, take NELEM elements, inclusive. */
+ for (i = 0, h = p; p != a->head && i < nelem; i++, p = element_forw(p))
;
- return (array_to_string_internal (h, p, " ", quoted));
+ 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));
}
char *
@@ -313,7 +352,7 @@ int mflags;
{
ARRAY *a2;
ARRAY_ELEMENT *e;
- char *t;
+ char *t, *ifs, sifs[2];
if (array_head (a) == 0 || array_empty (a))
return ((char *)NULL);
@@ -327,7 +366,13 @@ int mflags;
if (mflags & MATCH_QUOTED)
array_quote (a2);
- t = array_to_string (a2, " ", 0);
+ 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);
return t;
@@ -365,8 +410,10 @@ void
array_dispose_element(ae)
ARRAY_ELEMENT *ae;
{
- FREE(ae->value);
- free(ae);
+ if (ae) {
+ FREE(ae->value);
+ free(ae);
+ }
}
/*
@@ -460,6 +507,7 @@ arrayind_t i;
/* 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)
ARRAY *a;
@@ -487,6 +535,25 @@ WORD_LIST *list;
return (array_assign_list (a, list));
}
+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)
ARRAY *array;
@@ -767,7 +834,7 @@ print_array(a)
ARRAY *a;
{
printf("\n");
- array_walk(a, print_element);
+ array_walk(a, print_element, (void *)NULL);
}
main()
diff --git a/array.h b/array.h
index 9c8e5fc5..8c671b79 100644
--- a/array.h
+++ b/array.h
@@ -40,7 +40,7 @@ typedef struct array_element {
struct array_element *next, *prev;
} ARRAY_ELEMENT;
-typedef int sh_ae_map_func_t __P((ARRAY_ELEMENT *));
+typedef int sh_ae_map_func_t __P((ARRAY_ELEMENT *, void *));
/* Basic operations on entire arrays */
extern ARRAY *array_create __P((void));
@@ -48,13 +48,15 @@ extern void array_flush __P((ARRAY *));
extern void array_dispose __P((ARRAY *));
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 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));
+extern char *array_subrange __P((ARRAY *, arrayind_t, arrayind_t, int, int));
extern char *array_patsub __P((ARRAY *, char *, char *, int));
/* Basic operations on array elements. */
@@ -69,6 +71,8 @@ extern char *array_reference __P((ARRAY *, arrayind_t));
/* Converting to and from arrays */
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 *));
extern char **array_to_argv __P((ARRAY *));
@@ -90,6 +94,18 @@ extern ARRAY *array_from_string __P((char *, char *));
#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) == '*')
#endif /* _ARRAY_H_ */
diff --git a/arrayfunc.c b/arrayfunc.c
index 60e70d92..a00f17f8 100644
--- a/arrayfunc.c
+++ b/arrayfunc.c
@@ -1,6 +1,6 @@
/* arrayfunc.c -- High-level array functions used by other parts of the shell. */
-/* Copyright (C) 2001-2002 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -27,6 +27,8 @@
#endif
#include <stdio.h>
+#include "bashintl.h"
+
#include "shell.h"
#include "shmbutil.h"
@@ -39,6 +41,9 @@ extern int last_command_exit_value;
static void quote_array_assignment_chars __P((WORD_LIST *));
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");
+
/* **************************************************************** */
/* */
/* Functions to manipulate array variables and perform assignments */
@@ -56,7 +61,8 @@ convert_var_to_array (var)
oldval = value_cell (var);
array = array_create ();
- array_insert (array, 0, oldval);
+ if (oldval)
+ array_insert (array, 0, oldval);
FREE (value_cell (var));
var_setarray (var, array);
@@ -245,7 +251,7 @@ assign_array_var_from_string (var, value)
shell expansions including pathname generation and word splitting. */
/* 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");
+ list = parse_string_to_word_list (val, 1, "array assign");
/* If we're using [subscript]=value, we need to quote each [ and ] to
prevent unwanted filename expansion. */
@@ -273,7 +279,7 @@ assign_array_var_from_string (var, value)
w = list->word->word;
/* We have a word of the form [ind]=value */
- if (w[0] == '[')
+ if ((list->word->flags & W_ASSIGNMENT) && w[0] == '[')
{
len = skipsubscript (w, 0);
@@ -297,7 +303,7 @@ assign_array_var_from_string (var, value)
if (ALL_ELEMENT_SUB (w[1]) && len == 2)
{
- report_error ("%s: cannot assign to non-numeric index", w);
+ report_error (_("%s: cannot assign to non-numeric index"), w);
continue;
}
@@ -395,13 +401,13 @@ skipsubscript (s, i)
state_bak = state;
mblength = mbrlen (s + i, slength, &state);
- if (mblength == (size_t)-2 || mblength == (size_t)-1)
+ if (MB_INVALIDCH (mblength))
{
state = state_bak;
i++;
slength--;
}
- else if (mblength == 0)
+ else if (MB_NULLWCH (mblength))
return i;
else
{
@@ -441,7 +447,7 @@ unbind_array_element (var, sub)
len = skipsubscript (sub, 0);
if (sub[len] != ']' || len == 0)
{
- builtin_error ("%s[%s: bad array subscript", var->name, sub);
+ builtin_error ("%s[%s: %s", var->name, sub, _(bash_badsub_errmsg));
return -1;
}
sub[len] = '\0';
@@ -454,7 +460,7 @@ unbind_array_element (var, sub)
ind = array_expand_index (sub, len+1);
if (ind < 0)
{
- builtin_error ("[%s]: bad array subscript", sub);
+ builtin_error ("[%s]: %s", sub, _(bash_badsub_errmsg));
return -1;
}
ae = array_remove (array_cell (var), ind);
@@ -557,12 +563,22 @@ array_variable_name (s, subp, lenp)
t = xstrchr (s, '[');
if (t == 0)
- return ((char *)NULL);
+ {
+ if (subp)
+ *subp = t;
+ if (lenp)
+ *lenp = 0;
+ return ((char *)NULL);
+ }
ind = t - s;
ni = skipsubscript (s, ind);
if (ni <= ind + 1 || s[ni] != ']')
{
err_badarraysub (s);
+ if (subp)
+ *subp = t;
+ if (lenp)
+ *lenp = 0;
return ((char *)NULL);
}
@@ -623,6 +639,9 @@ array_value_internal (s, quoted, allow_all, rtype)
return (char *)NULL;
#endif
+ if (len == 0)
+ return ((char *)NULL); /* error message already printed */
+
/* [ */
if (ALL_ELEMENT_SUB (t[0]) && t[1] == ']')
{
@@ -704,4 +723,41 @@ get_array_value (s, allow_all, rtype)
return (array_value_internal (s, 0, allow_all, rtype));
}
+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 --git a/arrayfunc.h b/arrayfunc.h
index 7eae976f..375f6f37 100644
--- a/arrayfunc.h
+++ b/arrayfunc.h
@@ -45,6 +45,8 @@ extern int valid_array_reference __P((char *));
extern char *array_value __P((char *, int, int *));
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 --git a/bashhist.c b/bashhist.c
index 80902668..a271567c 100644
--- a/bashhist.c
+++ b/bashhist.c
@@ -1,6 +1,6 @@
/* bashhist.c -- bash interface to the GNU history library. */
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -36,6 +36,8 @@
#include "posixstat.h"
#include "filecntl.h"
+#include "bashintl.h"
+
#include "shell.h"
#include "flags.h"
#include "input.h"
@@ -50,6 +52,7 @@
#if defined (READLINE)
# include "bashline.h"
+extern int rl_done, rl_dispatching; /* should really include readline.h */
#endif
#if !defined (errno)
@@ -58,6 +61,7 @@ extern int errno;
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 *));
static struct ignorevar histignore =
@@ -77,7 +81,10 @@ static struct ignorevar histignore =
becomes zero when we read lines from a file, for example. */
int remember_on_history = 1;
-/* The number of lines that Bash has added to this history session. */
+/* 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;
/* The number of lines that Bash has read from the history file. */
@@ -134,10 +141,14 @@ int literal_history;
exit, even if the history has been stifled. */
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. */
+/* 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;
/* Set to 1 if the last command was added to the history list successfully
@@ -206,6 +217,7 @@ bash_initialize_history ()
history_quotes_inhibit_expansion = 1;
history_search_delimiter_chars = ";&()|<>";
history_inhibit_expansion_function = bash_history_inhibit_expansion;
+ sv_histchars ("histchars");
}
void
@@ -307,7 +319,7 @@ maybe_append_history (filename)
fd = open (filename, O_WRONLY|O_CREAT, 0600);
if (fd < 0)
{
- builtin_error ("%s: cannot create: %s", filename, strerror (errno));
+ builtin_error (_("%s: cannot create: %s"), filename, strerror (errno));
return (EXECUTION_FAILURE);
}
close (fd);
@@ -433,12 +445,19 @@ pre_process_line (line, print_changes, addit)
/* If there was an error, return NULL. */
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);
# if defined (READLINE)
/* New hack. We can allow the user to edit the
failed history expansion. */
- if (history_reediting && expanded < 0)
+ if (history_reediting && expanded < 0 && rl_done)
re_edit (line);
# endif /* READLINE */
return ((char *)NULL);
@@ -511,27 +530,49 @@ check_history_control (line)
HIST_ENTRY *temp;
int r;
- switch (history_control)
+ 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)
{
- 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 ();
r = (temp == 0 || STREQ (temp->line, line) == 0);
using_history ();
- return r;
+
+ if (r == 0)
+ return r;
}
- return 0;
+ 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 ();
}
/* Add LINE to the history list, handling possibly multi-line compound
@@ -577,6 +618,11 @@ check_add_history (line, force)
{
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)
{
really_add_history (line);
@@ -635,10 +681,8 @@ bash_add_history (line)
free (new_line);
if (old)
- {
- FREE (old->line);
- free (old);
- }
+ free_history_entry (old);
+
add_it = 0;
}
}
diff --git a/bashhist.h b/bashhist.h
index f17e7e7f..a4edb505 100644
--- a/bashhist.h
+++ b/bashhist.h
@@ -23,6 +23,13 @@
#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;
extern int history_lines_in_file;
diff --git a/bashintl.h b/bashintl.h
index f9e6cdbb..12068e48 100644
--- a/bashintl.h
+++ b/bashintl.h
@@ -1,6 +1,6 @@
/* bashintl.h -- Internationalization stuff
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -21,15 +21,22 @@
#if !defined (_BASHINTL_H_)
#define _BASHINTL_H_
-/* Include this *after* config.h */
-#if defined (HAVE_LIBINTL_H)
-# include <libintl.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 <locale.h>
#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
#endif
@@ -38,12 +45,4 @@
# define setlocale(cat, loc)
#endif
-#if !defined (HAVE_TEXTDOMAIN)
-# define textdomain(dom)
-#endif
-
-#if !defined (HAVE_BINDTEXTDOMAIN)
-# define bindtextdomain(dom, dir)
-#endif
-
#endif /* !_BASHINTL_H_ */
diff --git a/bashjmp.h b/bashjmp.h
index 2b441893..12173e1a 100644
--- a/bashjmp.h
+++ b/bashjmp.h
@@ -33,9 +33,10 @@ extern procenv_t return_catch; /* used by `return' builtin */
xbcopy ((char *)old, (char *)save, sizeof (procenv_t));
/* 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 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 --git a/bashline.c b/bashline.c
index 8874314b..6a4963ad 100644
--- a/bashline.c
+++ b/bashline.c
@@ -1,6 +1,6 @@
/* bashline.c -- Bash's interface to the readline library. */
-/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -40,6 +40,8 @@
#include <stdio.h>
#include "chartypes.h"
#include "bashansi.h"
+#include "bashintl.h"
+
#include "shell.h"
#include "input.h"
#include "builtins.h"
@@ -150,10 +152,15 @@ static char **prog_complete_matches;
#endif
/* Variables used here but defined in other files. */
-extern int current_command_line_count;
+#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
completion functions which indicate what type of completion should be
@@ -186,11 +193,13 @@ static int bash_glob_completion_internal __P((int));
static int bash_glob_complete_word __P((int, int));
static int bash_glob_expand_word __P((int, int));
static int bash_glob_list_expansions __P((int, int));
+
#endif /* SPECIFIC_COMPLETION_FUNCTIONS */
static int edit_and_execute_command __P((int, int, int, char *));
#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));
@@ -205,8 +214,14 @@ int perform_hostname_completion = 1;
/* If non-zero, we don't do command completion on an empty line. */
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;
@@ -233,11 +248,14 @@ posix_readline_initialize (on_or_off)
#endif
}
+/* When this function returns, rl_completer_word_break_characters points to
+ dynamically allocated memory. */
int
enable_hostname_completion (on_or_off)
int on_or_off;
{
int old_value;
+ char *at, *nv, *nval;
old_value = perform_hostname_completion;
@@ -245,13 +263,60 @@ enable_hostname_completion (on_or_off)
{
perform_hostname_completion = 1;
rl_special_prefixes = "$@";
- rl_completer_word_break_characters = bash_completer_word_break_characters;
}
else
{
perform_hostname_completion = 0;
rl_special_prefixes = "$";
- rl_completer_word_break_characters = bash_nohostname_word_break_characters;
+ }
+
+ /* 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;
}
return (old_value);
@@ -261,6 +326,9 @@ enable_hostname_completion (on_or_off)
void
initialize_readline ()
{
+ rl_command_func_t *func;
+ char kseq[2];
+
if (bash_readline_initialized)
return;
@@ -320,52 +388,65 @@ initialize_readline ()
rl_initialize ();
/* Bind up our special shell functions. */
- rl_bind_key_in_map (CTRL('E'), shell_expand_line, emacs_meta_keymap);
+ rl_bind_key_if_unbound_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);
+ rl_bind_key_if_unbound_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);
+ 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. */
- rl_unbind_key_in_map (CTRL('J'), emacs_meta_keymap);
- rl_unbind_key_in_map (CTRL('M'), emacs_meta_keymap);
+ 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);
#endif
#if defined (BRACE_COMPLETION)
- rl_bind_key_in_map ('{', bash_brace_completion, emacs_meta_keymap);
+ rl_bind_key_if_unbound_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_if_unbound_in_map ('/', bash_complete_filename, emacs_meta_keymap);
+ rl_bind_key_if_unbound_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);
+ /* 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_in_map ('@', bash_complete_hostname, emacs_meta_keymap);
- rl_bind_key_in_map ('@', bash_possible_hostname_completions, emacs_ctlx_keymap);
+ rl_bind_key_if_unbound_in_map ('~', bash_possible_username_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_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_in_map ('!', bash_complete_command, emacs_meta_keymap);
- rl_bind_key_in_map ('!', bash_possible_command_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_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);
+ 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_in_map (TAB, dynamic_complete_history, emacs_meta_keymap);
+ rl_bind_key_if_unbound_in_map (TAB, dynamic_complete_history, emacs_meta_keymap);
/* Tell the completer that we want a crack first. */
rl_attempted_completion_function = attempt_shell_completion;
@@ -378,12 +459,16 @@ initialize_readline ()
rl_ignore_some_completions_function = filename_completion_ignore;
/* 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);
+ rl_bind_key_if_unbound_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);
+ rl_bind_key_if_unbound_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);
+ 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
rl_completer_quote_characters = "'\"";
@@ -708,8 +793,8 @@ operate_and_get_next (count, c)
command being entered (if no explicit argument is given), otherwise on
a command from the history file. */
-#define VI_EDIT_COMMAND "fc -e ${VISUAL:-${EDITOR:-vi}}"
-#define EMACS_EDIT_COMMAND "fc -e ${VISUAL:-${EDITOR:-emacs}}"
+#define VI_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-vi}}\""
+#define EMACS_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-emacs}}\""
static int
edit_and_execute_command (count, c, editing_mode, edit_command)
@@ -810,6 +895,7 @@ posix_edit_macros (count, key)
/* **************************************************************** */
#define COMMAND_SEPARATORS ";|&{(`"
+/* )} */
static int
check_redir (ti)
@@ -922,7 +1008,7 @@ attempt_shell_completion (text, start, end)
#if 1
/* 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] == '\'')
+ if (ti >= 0 && (rl_line_buffer[ti] == '"' || rl_line_buffer[ti] == '\''))
{
qc = rl_line_buffer[ti];
saveti = ti--;
@@ -1008,11 +1094,27 @@ attempt_shell_completion (text, start, end)
matches = rl_completion_matches (text, prog_complete_return);
if ((foundcs & COPT_DEFAULT) == 0)
rl_attempted_completion_over = 1; /* no default */
- return (matches);
+ 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 == '$')
{
@@ -1044,7 +1146,10 @@ attempt_shell_completion (text, start, end)
}
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);
+
/* If we are attempting command completion and nothing matches, we
do not want readline to perform filename completion for us. We
still want to be able to complete partial pathnames, so set the
@@ -1052,7 +1157,8 @@ attempt_shell_completion (text, start, end)
filenames and leave directories in the match list. */
if (matches == (char **)NULL)
rl_ignore_some_completions_function = bash_ignore_filenames;
- else if (matches[1] == 0 && *matches[0] != '/')
+#if 0
+ else if (matches[1] == 0 && CMD_IS_DIR(matches[0]))
/* Turn off rl_filename_completion_desired so readline doesn't
append a slash if there is a directory with the same name
in the current directory, or other filename-specific things.
@@ -1061,7 +1167,7 @@ attempt_shell_completion (text, start, end)
looking in the current directory anyway, so there's no
conflict. */
rl_filename_completion_desired = 0;
- else if (matches[0] && matches[1] && STREQ (matches[0], matches[1]) && *matches[0] != '/')
+ else if (matches[0] && matches[1] && STREQ (matches[0], matches[1]) && CMD_IS_DIR (matches[0]))
/* There are multiple instances of the same match (duplicate
completions haven't yet been removed). In this case, all of
the matches will be the same, and the duplicate removal code
@@ -1071,6 +1177,7 @@ attempt_shell_completion (text, start, end)
completion. If there are multiple completions this won't
make a difference and the problem won't occur. */
rl_filename_completion_desired = 0;
+#endif
}
}
@@ -1365,6 +1472,9 @@ command_subst_completion_function (text, state)
text++;
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);
if (matches)
@@ -1631,8 +1741,13 @@ history_expand_line_internal (line)
char *line;
{
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;
}
#endif
@@ -1643,11 +1758,20 @@ static void
cleanup_expansion_error ()
{
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);
+ FREE (to_free);
putc ('\r', rl_outstream);
rl_forced_update_display ();
}
@@ -1773,9 +1897,7 @@ history_and_alias_expand_line (count, ignore)
{
char *new_line;
- new_line = pre_process_line (rl_line_buffer, 0, 0);
- if (new_line == rl_line_buffer)
- new_line = savestring (new_line);
+ new_line = history_expand_line_internal (rl_line_buffer);
#if defined (ALIAS)
if (new_line)
@@ -1811,9 +1933,7 @@ shell_expand_line (count, ignore)
char *new_line;
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);
+ new_line = history_expand_line_internal (rl_line_buffer);
#if defined (ALIAS)
if (new_line)
@@ -1873,10 +1993,6 @@ shell_expand_line (count, ignore)
}
}
-/* 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
suffix, delete the others, else just return and let the completer
@@ -1901,10 +2017,8 @@ _ignore_completion_names (names, name_func)
{
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
not, free it up. In any case, short-circuit and return. This is a
@@ -1912,13 +2026,13 @@ _ignore_completion_names (names, name_func)
if there is only one completion; it is the completion itself. */
if (names[1] == (char *)0)
{
-#ifndef NO_FORCE_FIGNORE
- if ((*name_func) (names[0]) == 0)
- {
- free (names[0]);
- names[0] = (char *)NULL;
- }
-#endif
+ if (force_fignore)
+ if ((*name_func) (names[0]) == 0)
+ {
+ free (names[0]);
+ names[0] = (char *)NULL;
+ }
+
return;
}
@@ -1927,22 +2041,22 @@ _ignore_completion_names (names, name_func)
for (nidx = 1; names[nidx]; nidx++)
;
newnames = strvec_create (nidx + 1);
-#ifdef NO_FORCE_FIGNORE
- oldnames = strvec_create (nidx - 1);
- oidx = 0;
-#endif
+
+ if (force_fignore == 0)
+ {
+ oldnames = strvec_create (nidx - 1);
+ oidx = 0;
+ }
newnames[0] = names[0];
for (idx = nidx = 1; names[idx]; idx++)
{
if ((*name_func) (names[idx]))
newnames[nidx++] = names[idx];
+ else if (force_fignore == 0)
+ oldnames[oidx++] = names[idx];
else
-#ifndef NO_FORCE_FIGNORE
free (names[idx]);
-#else
- oldnames[oidx++] = names[idx];
-#endif
}
newnames[nidx] = (char *)NULL;
@@ -1950,21 +2064,24 @@ _ignore_completion_names (names, name_func)
/* If none are acceptable then let the completer handle it. */
if (nidx == 1)
{
-#ifndef NO_FORCE_FIGNORE
- free (names[0]);
- names[0] = (char *)NULL;
-#else
- free (oldnames);
-#endif
+ if (force_fignore)
+ {
+ free (names[0]);
+ names[0] = (char *)NULL;
+ }
+ else
+ free (oldnames);
+
free (newnames);
return;
}
-#ifdef NO_FORCE_FIGNORE
- while (oidx)
- free (oldnames[--oidx]);
- free (oldnames);
-#endif
+ if (force_fignore == 0)
+ {
+ while (oidx)
+ free (oldnames[--oidx]);
+ free (oldnames);
+ }
/* If only one is acceptable, copy it to names[0] and return. */
if (nidx == 2)
@@ -2079,6 +2196,7 @@ bash_directory_completion_hook (dirname)
char *local_dirname, *new_dirname, *t;
int return_value, should_expand_dirname;
WORD_LIST *wl;
+ struct stat sb;
return_value = should_expand_dirname = 0;
local_dirname = *dirname;
@@ -2096,6 +2214,13 @@ bash_directory_completion_hook (dirname)
}
#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)
{
new_dirname = savestring (local_dirname);
@@ -2292,7 +2417,7 @@ bash_complete_filename_internal (what_to_do)
rl_compentry_func_t *orig_func;
rl_completion_func_t *orig_attempt_func;
rl_icppfunc_t *orig_dir_func;
- const char *orig_rl_completer_word_break_characters;
+ /*const*/ char *orig_rl_completer_word_break_characters;
int r;
orig_func = rl_completion_entry_function;
@@ -2449,7 +2574,8 @@ bash_glob_complete_word (count, key)
int r;
rl_quote_func_t *orig_quoting_function;
- rl_explicit_arg = 1; /* force `*' append */
+ 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;
@@ -2497,6 +2623,63 @@ bash_specific_completion (what_to_do, generator)
#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
quotes, and backslashes). It allows single quotes to appear
@@ -2676,8 +2859,7 @@ bash_execute_unix_command (count, key)
Keymap xkmap; /* unix command executing keymap */
register int i;
char *cmd;
- int old_line_count;
- int *ts;
+ sh_parser_state_t ps;
/* First, we need to find the right command to execute. This is tricky,
because we might have already indirected into another keymap. */
@@ -2695,7 +2877,7 @@ bash_execute_unix_command (count, key)
else
{
rl_crlf ();
- internal_error ("bash_execute_unix_command: cannot find keymap for command");
+ internal_error (_("bash_execute_unix_command: cannot find keymap for command"));
rl_forced_update_display ();
return 1;
}
@@ -2713,14 +2895,12 @@ bash_execute_unix_command (count, key)
rl_crlf (); /* move to a new line */
- old_line_count = current_command_line_count;
- ts = save_token_state ();
+ save_parser_state (&ps);
cmd = savestring (cmd);
parse_and_execute (cmd, "bash_execute_unix_command", SEVAL_NOHIST);
- current_command_line_count = old_line_count;
- restore_token_state (ts);
+ restore_parser_state (&ps);
/* and restore the readline buffer and display after command execution. */
rl_forced_update_display ();
@@ -2746,7 +2926,7 @@ isolate_sequence (string, ind, need_dquote, startp)
/* NEED_DQUOTE means that the first non-white character *must* be `"'. */
if (need_dquote && string[i] != '"')
{
- builtin_error ("%s: first non-whitespace character is not `\"'", string);
+ builtin_error (_("%s: first non-whitespace character is not `\"'"), string);
return -1;
}
@@ -2775,7 +2955,7 @@ isolate_sequence (string, ind, need_dquote, startp)
if (delim && string[i] != delim)
{
- builtin_error ("%s: no closing `%c'", string, delim);
+ builtin_error (_("no closing `%c' in %s"), delim, string);
return -1;
}
@@ -2809,7 +2989,7 @@ bind_keyseq_to_unix_command (line)
;
if (line[i] != ':')
{
- builtin_error ("%s: missing colon separator", line);
+ builtin_error (_("%s: missing colon separator"), line);
return -1;
}
@@ -2825,7 +3005,7 @@ bind_keyseq_to_unix_command (line)
/* 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);
+ rl_bind_keyseq_in_map (kseq, bash_execute_unix_command, kmap);
return 0;
}
@@ -2841,7 +3021,11 @@ bash_directory_completion_matches (text)
char *dfn;
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);
free (dfn);
@@ -2854,4 +3038,16 @@ bash_directory_completion_matches (text)
(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 --git a/bashline.h b/bashline.h
index 32d3b098..eac5d353 100644
--- a/bashline.h
+++ b/bashline.h
@@ -33,6 +33,8 @@ extern int bash_re_edit __P((char *));
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));
extern char *bash_groupname_completion_function __P((const char *, int));
@@ -42,5 +44,6 @@ extern char **get_hostname_list __P((void));
extern void clear_hostname_list __P((void));
extern char **bash_directory_completion_matches __P((const char *));
+extern char *bash_dequote_text __P((const char *));
#endif /* _BASHLINE_H_ */
diff --git a/braces.c b/braces.c
index 4f5b0f0f..0fb9b9d7 100644
--- a/braces.c
+++ b/braces.c
@@ -1,6 +1,6 @@
/* braces.c -- code for doing word expansion in curly braces. */
-/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -39,9 +39,12 @@
#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:
Segregate the text into 3 sections: preamble (stuff before an open brace),
@@ -56,11 +59,15 @@ int brace_arg_separator = ',';
#if defined (__P)
static int brace_gobbler __P((char *, size_t, int *, int));
-static char **expand_amble __P((char *, size_t));
+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
@@ -117,9 +124,9 @@ brace_expand (text)
}
if (text[j] == brace_arg_separator)
- {
+ { /* { */
strvec_dispose (result);
- report_error ("missing `}'");
+ report_error ("no closing `%c' in %s", '}', text);
throw_to_top_level ();
}
ADVANCE_CHAR (text, tlen, j);
@@ -161,22 +168,29 @@ brace_expand (text)
ADVANCE_CHAR (amble, alen, j);
}
- if (!amble[j])
+ if (amble[j] == 0)
{
- free (amble);
- free (preamble);
- result[0] = savestring (text);
- return (result);
+ tack = expand_seqterm (amble, alen);
+ if (tack)
+ goto add_tack;
+ else
+ {
+ free (amble);
+ free (preamble);
+ result[0] = savestring (text);
+ return (result);
+ }
}
#endif /* SHELL */
- postamble = &text[i + 1];
-
- tack = expand_amble (amble, alen);
+ 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);
strvec_dispose (tack);
@@ -189,9 +203,10 @@ brace_expand (text)
expand each slot which needs it, until there are no more slots which
need it. */
static char **
-expand_amble (text, tlen)
+expand_amble (text, tlen, flags)
char *text;
size_t tlen;
+ int flags;
{
char **result, **partial;
char *tem;
@@ -220,9 +235,10 @@ expand_amble (text, tlen)
result = partial;
else
{
- register int lr = strvec_len (result);
- register int lp = strvec_len (partial);
- register int j;
+ register int lr, lp, j;
+
+ lr = strvec_len (result);
+ lp = strvec_len (partial);
result = strvec_resize (result, lp + lr + 1);
@@ -239,6 +255,108 @@ expand_amble (text, tlen)
return (result);
}
+#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
quoting. Return the character that caused us to stop searching;
@@ -278,6 +396,16 @@ brace_gobbler (text, tlen, indx, satisfy)
continue;
}
+#if defined (SHELL)
+ /* If compiling for the shell, treat ${...} like \{...} */
+ if (c == '$' && text[i+1] == '{' && quoted != '\'') /* } */
+ {
+ pass_next = 1;
+ i++;
+ continue;
+ }
+#endif
+
if (quoted)
{
if (c == quoted)
@@ -318,11 +446,7 @@ brace_gobbler (text, tlen, indx, satisfy)
i++;
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;
}
@@ -368,8 +492,7 @@ array_concat (arr1, arr2)
for (j = 0; j < len2; j++)
{
- result[len] =
- (char *)xmalloc (1 + strlen_1 + strlen (arr2[j]));
+ result[len] = (char *)xmalloc (1 + strlen_1 + strlen (arr2[j]));
strcpy (result[len], arr1[i]);
strcpy (result[len] + strlen_1, arr2[j]);
len++;
diff --git a/builtins/Makefile.in b/builtins/Makefile.in
index 53ae75ac..4bb4ea5e 100644
--- a/builtins/Makefile.in
+++ b/builtins/Makefile.in
@@ -1,6 +1,6 @@
# This Makefile for building libbuiltins.a is in -*- text -*- for Emacs.
#
-# Copyright (C) 1996 Free Software Foundation, Inc.
+# Copyright (C) 1996-2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,6 +16,12 @@
# along with this program; if not, write to the Free Software
# 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@
RANLIB = @RANLIB@
@@ -35,6 +41,7 @@ VPATH = .:@srcdir@
topdir = @top_srcdir@
includedir = @includedir@
datadir = @datadir@
+localedir = $(datadir)/locale
# Support an alternate destination root directory for package building
DESTDIR =
@@ -43,6 +50,8 @@ INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
BUILD_DIR = @BUILD_DIR@
+LIBBUILD = ${BUILD_DIR}/lib
+
PROFILE_FLAGS = @PROFILE_FLAGS@
CFLAGS = @CFLAGS@
CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
@@ -63,10 +72,15 @@ BASHINCDIR = ${topdir}/include
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)
+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) \
${INCLUDES} $(LOCAL_CFLAGS)
@@ -106,7 +120,8 @@ RL_LIBSRC = $(topdir)/lib/readline
$(CC) -c $(CCFLAGS) $<
DEFSRC = $(srcdir)/alias.def $(srcdir)/bind.def $(srcdir)/break.def \
- $(srcdir)/builtin.def $(srcdir)/cd.def $(srcdir)/colon.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 \
$(srcdir)/exec.def $(srcdir)/exit.def $(srcdir)/fc.def \
@@ -124,7 +139,7 @@ STATIC_SOURCE = common.c evalstring.c evalfile.c getopt.c bashgetopt.c \
getopt.h
OFILES = builtins.o \
- alias.o bind.o break.o builtin.o cd.o colon.o command.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 \
exit.o fc.o fg_bg.o hash.o help.o history.o jobs.o kill.o let.o \
@@ -214,10 +229,20 @@ distclean maintainer-clean: clean
$(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
command.o: command.def
@@ -263,7 +288,7 @@ bashgetopt.o: $(topdir)/command.h $(topdir)/general.h $(topdir)/xmalloc.h $(topd
bashgetopt.o: $(topdir)/variables.h $(topdir)/conftypes.h $(topdir)/quit.h $(BASHINCDIR)/maxpath.h
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: ../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
common.o: $(topdir)/shell.h $(topdir)/syntax.h ../config.h $(topdir)/bashjmp.h $(BASHINCDIR)/posixjmp.h
@@ -274,7 +299,7 @@ common.o: $(topdir)/siglist.h $(topdir)/bashhist.h $(topdir)/quit.h
common.o: $(topdir)/unwind_prot.h $(BASHINCDIR)/maxpath.h $(topdir)/jobs.h
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: $(topdir)/externs.h ../pathnames.h ./builtext.h
common.o: $(BASHINCDIR)/chartypes.h
evalfile.o: $(topdir)/bashtypes.h $(BASHINCDIR)/posixstat.h ${BASHINCDIR}/filecntl.h
evalfile.o: $(topdir)/bashansi.h $(BASHINCDIR)/ansi_stdlib.h
@@ -283,7 +308,7 @@ evalfile.o: $(topdir)/command.h $(topdir)/general.h $(topdir)/xmalloc.h $(topdir
evalfile.o: $(topdir)/variables.h $(topdir)/conftypes.h $(topdir)/quit.h $(BASHINCDIR)/maxpath.h
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: ../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
evalfile.o: $(topdir)/bashhist.h $(srcdir)/common.h
@@ -303,8 +328,8 @@ getopt.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/bashjmp.h $(topdir)/com
getopt.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/error.h $(topdir)/variables.h $(topdir)/conftypes.h
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
+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
mkbuiltins.o: $(topdir)/bashansi.h $(BASHINCDIR)/ansi_stdlib.h
@@ -331,6 +356,12 @@ builtin.o: $(topdir)/quit.h $(srcdir)/common.h $(BASHINCDIR)/maxpath.h
builtin.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h
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
cd.o: $(topdir)/make_cmd.h $(topdir)/subst.h $(topdir)/externs.h
@@ -347,6 +378,7 @@ declare.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
declare.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h
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
echo.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
@@ -362,7 +394,7 @@ enable.o: $(topdir)/pcomplete.h
eval.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
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)/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
exec.o: $(topdir)/bashtypes.h
@@ -377,7 +409,7 @@ exit.o: $(topdir)/bashtypes.h
exit.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
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)/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
fc.o: $(topdir)/bashtypes.h $(BASHINCDIR)/posixstat.h
@@ -416,7 +448,7 @@ history.o: $(topdir)/bashtypes.h
history.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
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: $(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
inlib.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
@@ -426,7 +458,7 @@ inlib.o: $(BASHINCDIR)/maxpath.h $(topdir)/subst.h $(topdir)/externs.h
inlib.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
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: $(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
kill.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h
@@ -443,13 +475,13 @@ printf.o: ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/bashjmp.h
printf.o: $(topdir)/command.h $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
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: ../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
pushd.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
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)/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
read.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
@@ -474,7 +506,7 @@ setattr.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
setattr.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h $(BASHINCDIR)/maxpath.h
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)/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
shift.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
@@ -487,7 +519,7 @@ source.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/fi
source.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
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
+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
suspend.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
@@ -541,7 +573,7 @@ shopt.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h
shopt.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
shopt.o: $(srcdir)/common.h $(srcdir)/bashgetopt.h
-complete.o: ../config.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
complete.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
@@ -550,3 +582,40 @@ complete.o: ${topdir}/pcomplete.h
complete.o: ${srcdir}/common.h ${srcdir}/bashgetopt.h
#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 --git a/builtins/alias.def b/builtins/alias.def
index f51df948..572910bc 100644
--- a/builtins/alias.def
+++ b/builtins/alias.def
@@ -1,7 +1,7 @@
This file is alias.def, from which is created alias.c
It implements the builtins "alias" and "unalias" in Bash.
-Copyright (C) 1987-2002 Free Software Foundation, Inc.
+Copyright (C) 1987-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -44,6 +44,7 @@ $END
#endif
# include "../bashansi.h"
+# include "../bashintl.h"
# include <stdio.h>
# include "../shell.h"
@@ -51,17 +52,23 @@ $END
# include "common.h"
# include "bashgetopt.h"
-static void print_alias __P((alias_t *));
+/* 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. */
int
alias_builtin (list)
WORD_LIST *list;
{
- int any_failed, offset, pflag;
+ 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 ();
while ((offset = internal_getopt (list, "p")) != -1)
@@ -70,6 +77,7 @@ alias_builtin (list)
{
case 'p':
pflag = 1;
+ dflags |= AL_REUSABLE;
break;
default:
builtin_usage ();
@@ -90,7 +98,7 @@ alias_builtin (list)
return (EXECUTION_SUCCESS);
for (offset = 0; alias_list[offset]; offset++)
- print_alias (alias_list[offset]);
+ print_alias (alias_list[offset], dflags);
free (alias_list); /* XXX - Do not free the strings. */
@@ -111,13 +119,19 @@ alias_builtin (list)
name[offset] = '\0';
value = name + offset + 1;
- add_alias (name, value);
+ if (legal_alias_name (name, 0) == 0)
+ {
+ builtin_error (_("`%s': invalid alias name"), name);
+ any_failed++;
+ }
+ else
+ add_alias (name, value);
}
else
{
t = find_alias (name);
if (t)
- print_alias (t);
+ print_alias (t, dflags);
else
{
sh_notfound (name);
@@ -134,7 +148,7 @@ alias_builtin (list)
$BUILTIN unalias
$FUNCTION unalias_builtin
$DEPENDS_ON ALIAS
-$SHORT_DOC unalias [-a] [name ...]
+$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.
$END
@@ -171,6 +185,12 @@ unalias_builtin (list)
return (EXECUTION_SUCCESS);
}
+ if (list == 0)
+ {
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+
aflag = 0;
while (list)
{
@@ -192,13 +212,16 @@ unalias_builtin (list)
/* Output ALIAS in such a way as to allow it to be read back in. */
static void
-print_alias (alias)
+print_alias (alias, flags)
alias_t *alias;
+ int flags;
{
char *value;
value = sh_single_quote (alias->value);
- printf ("alias %s=%s\n", alias->name, value);
+ if (flags & AL_REUSABLE)
+ printf ("alias ");
+ printf ("%s=%s\n", alias->name, value);
free (value);
fflush (stdout);
diff --git a/builtins/bind.def b/builtins/bind.def
index ddf56199..4711031e 100644
--- a/builtins/bind.def
+++ b/builtins/bind.def
@@ -1,7 +1,7 @@
This file is bind.def, from which is created bind.c.
It implements the builtin "bind" in Bash.
-Copyright (C) 1987-2002 Free Software Foundation, Inc.
+Copyright (C) 1987-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -72,6 +72,8 @@ extern int errno;
#include <readline/readline.h>
#include <readline/history.h>
+#include "../bashintl.h"
+
#include "../shell.h"
#include "../bashline.h"
#include "bashgetopt.h"
@@ -189,7 +191,7 @@ bind_builtin (list)
kmap = rl_get_keymap_by_name (map_name);
if (!kmap)
{
- builtin_error ("`%s': invalid keymap name", map_name);
+ builtin_error (_("`%s': invalid keymap name"), map_name);
BIND_RETURN (EXECUTION_FAILURE);
}
}
@@ -228,7 +230,7 @@ bind_builtin (list)
{
if (rl_read_init_file (initfile) != 0)
{
- builtin_error ("%s: cannot read: %s", initfile, strerror (errno));
+ builtin_error (_("%s: cannot read: %s"), initfile, strerror (errno));
BIND_RETURN (EXECUTION_FAILURE);
}
}
@@ -243,7 +245,7 @@ bind_builtin (list)
{
if (rl_set_key (remove_seq, (rl_command_func_t *)NULL, rl_get_keymap ()) != 0)
{
- builtin_error ("`%s': cannot unbind", remove_seq);
+ builtin_error (_("`%s': cannot unbind"), remove_seq);
BIND_RETURN (EXECUTION_FAILURE);
}
}
@@ -278,7 +280,7 @@ query_bindings (name)
function = rl_named_function (name);
if (function == 0)
{
- builtin_error ("`%s': unknown function name", name);
+ builtin_error (_("`%s': unknown function name"), name);
return EXECUTION_FAILURE;
}
@@ -286,11 +288,11 @@ query_bindings (name)
if (!keyseqs)
{
- printf ("%s is not bound to any keys.\n", name);
+ printf (_("%s is not bound to any keys.\n"), name);
return EXECUTION_FAILURE;
}
- printf ("%s can be invoked via ", name);
+ printf (_("%s can be invoked via "), name);
for (j = 0; j < 5 && keyseqs[j]; j++)
printf ("\"%s\"%s", keyseqs[j], keyseqs[j + 1] ? ", " : ".\n");
if (keyseqs[j])
diff --git a/builtins/break.def b/builtins/break.def
index 10254145..e61d5027 100644
--- a/builtins/break.def
+++ b/builtins/break.def
@@ -1,7 +1,7 @@
This file is break.def, from which is created break.c.
It implements the builtins "break" and "continue" in Bash.
-Copyright (C) 1987-2002 Free Software Foundation, Inc.
+Copyright (C) 1987-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -36,6 +36,8 @@ $END
# include <unistd.h>
#endif
+#include "../bashintl.h"
+
#include "../shell.h"
#include "common.h"
@@ -123,7 +125,7 @@ check_loop_level ()
{
#if defined (BREAK_COMPLAINS)
if (loop_level == 0 && posixly_correct == 0)
- builtin_error ("only meaningful in a `for', `while', or `until' loop");
+ builtin_error (_("only meaningful in a `for', `while', or `until' loop"));
#endif /* BREAK_COMPLAINS */
return (loop_level);
diff --git a/builtins/builtin.def b/builtins/builtin.def
index 8571f372..dfa58bc9 100644
--- a/builtins/builtin.def
+++ b/builtins/builtin.def
@@ -68,7 +68,7 @@ builtin_builtin (list)
if (!function)
{
- builtin_error ("%s: not a shell builtin", command);
+ sh_notbuiltin (command);
return (EXECUTION_FAILURE);
}
else
diff --git a/builtins/caller.def b/builtins/caller.def
new file mode 100644
index 00000000..d372c588
--- /dev/null
+++ b/builtins/caller.def
@@ -0,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 <config.h>
+#include <stdio.h>
+#include "chartypes.h"
+#include "bashtypes.h"
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include <errno.h>
+
+#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 --git a/builtins/cd.def b/builtins/cd.def
index 1c58c7c1..2be86d11 100644
--- a/builtins/cd.def
+++ b/builtins/cd.def
@@ -1,7 +1,7 @@
This file is cd.def, from which is created cd.c. It implements the
builtins "cd" and "pwd" in Bash.
-Copyright (C) 1987, 1989, 1991 Free Software Foundation, Inc.
+Copyright (C) 1987-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -39,6 +39,7 @@ $PRODUCES cd.c
#include <stdio.h>
#include "../bashansi.h"
+#include "../bashintl.h"
#include <errno.h>
#include <tilde/tilde.h>
@@ -106,28 +107,30 @@ bindpwd (no_symlinks)
array_needs_making = 0;
}
- tvar = bind_variable ("PWD", dirname);
+ tvar = bind_variable ("PWD", dirname ? dirname : "");
if (old_anm == 0 && array_needs_making && exported_p (tvar))
{
- update_export_env_inplace ("PWD=", 4, dirname);
+ update_export_env_inplace ("PWD=", 4, dirname ? dirname : "");
array_needs_making = 0;
}
if (dirname && dirname != the_current_working_directory)
free (dirname);
+
return (EXECUTION_SUCCESS);
}
/* Call get_working_directory to reset the value of
the_current_working_directory () */
static char *
-resetpwd ()
+resetpwd (caller)
+ char *caller;
{
char *tdir;
FREE (the_current_working_directory);
the_current_working_directory = (char *)NULL;
- tdir = get_working_directory ("cd");
+ tdir = get_working_directory (caller);
return (tdir);
}
@@ -184,7 +187,7 @@ cd_builtin (list)
if (dirname == 0)
{
- builtin_error ("HOME not set");
+ builtin_error (_("HOME not set"));
return (EXECUTION_FAILURE);
}
lflag = 0;
@@ -196,10 +199,14 @@ cd_builtin (list)
if (dirname == 0)
{
- builtin_error ("OLDPWD not set");
+ 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))
dirname = list->word->word;
@@ -222,8 +229,8 @@ cd_builtin (list)
is used to find the directory to change to, the new
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);
+ if (opt && (path = no_symlinks ? temp : the_current_working_directory))
+ printf ("%s\n", path);
free (temp);
/* Posix.2 says that after using CDPATH, the resultant
@@ -332,6 +339,12 @@ pwd_builtin (list)
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
if (directory)
@@ -342,9 +355,11 @@ pwd_builtin (list)
fflush (stdout);
if (ferror (stdout))
{
- builtin_error ("write error: %s", strerror (errno));
+ builtin_error (_("write error: %s"), strerror (errno));
+ clearerr (stdout);
return (EXECUTION_FAILURE);
}
+
return (EXECUTION_SUCCESS);
}
else
@@ -363,7 +378,7 @@ change_to_directory (newdir, nolinks)
int nolinks;
{
char *t, *tdir;
- int err, canon_failed;
+ int err, canon_failed, r;
tdir = (char *)NULL;
@@ -398,7 +413,12 @@ change_to_directory (newdir, nolinks)
resolved path doesn't exist), fail immediately. */
if (posixly_correct && nolinks == 0 && canon_failed)
{
- errno = ENOENT;
+#if defined ENAMETOOLONG
+ if (errno != ENOENT && errno != ENAMETOOLONG)
+#else
+ if (errno != ENOENT)
+#endif
+ errno = ENOTDIR;
return (0);
}
@@ -408,12 +428,13 @@ change_to_directory (newdir, nolinks)
/* If canonicalization failed, but the chdir succeeded, reset the
shell's idea of the_current_working_directory. */
if (canon_failed)
- resetpwd ();
- else
{
- FREE (the_current_working_directory);
- the_current_working_directory = tdir;
+ t = resetpwd ("cd");
+ if (t == 0)
+ set_working_directory (tdir);
}
+ else
+ set_working_directory (tdir);
return (1);
}
@@ -424,23 +445,28 @@ change_to_directory (newdir, nolinks)
return (0);
err = errno;
- free (tdir);
/* We're not in physical mode (nolinks == 0), but we failed to change to
the canonicalized directory name (TDIR). Try what the user passed
verbatim. If we succeed, reinitialize the_current_working_directory. */
if (chdir (newdir) == 0)
{
- tdir = resetpwd ();
- FREE (tdir);
+ t = resetpwd ("cd");
+ if (t == 0)
+ set_working_directory (tdir);
+ else
+ free (t);
- return (1);
+ r = 1;
}
else
{
errno = err;
- return (0);
+ r = 0;
}
+
+ free (tdir);
+ return r;
}
/* Code for cd spelling correction. Original patch submitted by
diff --git a/builtins/common.c b/builtins/common.c
index b8186002..3d3dd594 100644
--- a/builtins/common.c
+++ b/builtins/common.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -40,6 +40,7 @@
#endif
#include "../bashansi.h"
+#include "../bashintl.h"
#include "../shell.h"
#include "maxpath.h"
@@ -129,7 +130,7 @@ no_args (list)
{
if (list)
{
- builtin_error ("too many arguments");
+ builtin_error (_("too many arguments"));
jump_to_top_level (DISCARD);
}
}
@@ -153,21 +154,21 @@ void
sh_needarg (s)
char *s;
{
- builtin_error ("%s: option requires an argument", s);
+ builtin_error (_("%s: option requires an argument"), s);
}
void
sh_neednumarg (s)
char *s;
{
- builtin_error ("%s: numeric argument required", s);
+ builtin_error (_("%s: numeric argument required"), s);
}
void
sh_notfound (s)
char *s;
{
- builtin_error ("%s: not found", s);
+ builtin_error (_("%s: not found"), s);
}
/* Function called when one of the builtin commands detects an invalid
@@ -176,49 +177,49 @@ void
sh_invalidopt (s)
char *s;
{
- builtin_error ("%s: invalid option", s);
+ builtin_error (_("%s: invalid option"), s);
}
void
sh_invalidoptname (s)
char *s;
{
- builtin_error ("%s: invalid option name", s);
+ builtin_error (_("%s: invalid option name"), s);
}
void
sh_invalidid (s)
char *s;
{
- builtin_error ("`%s': not a valid identifier", s);
+ builtin_error (_("`%s': not a valid identifier"), s);
}
void
sh_invalidnum (s)
char *s;
{
- builtin_error ("%s: invalid number", s);
+ builtin_error (_("%s: invalid number"), s);
}
void
sh_invalidsig (s)
char *s;
{
- builtin_error ("%s: invalid signal specification", s);
+ builtin_error (_("%s: invalid signal specification"), s);
}
void
sh_badpid (s)
char *s;
{
- builtin_error ("`%s': not a pid or valid job spec", s);
+ builtin_error (_("`%s': not a pid or valid job spec"), s);
}
void
sh_readonly (s)
const char *s;
{
- builtin_error ("%s: readonly variable", s);
+ builtin_error (_("%s: readonly variable"), s);
}
void
@@ -226,9 +227,9 @@ sh_erange (s, desc)
char *s, *desc;
{
if (s)
- builtin_error ("%s: %s out of range", s, desc ? desc : "argument");
+ builtin_error (_("%s: %s out of range"), s, desc ? desc : _("argument"));
else
- builtin_error ("%s out of range", desc ? desc : "argument");
+ builtin_error (_("%s out of range"), desc ? desc : _("argument"));
}
#if defined (JOB_CONTROL)
@@ -236,7 +237,7 @@ void
sh_badjob (s)
char *s;
{
- builtin_error ("%s: no such job", s);
+ builtin_error (_("%s: no such job"), s);
}
void
@@ -244,9 +245,9 @@ sh_nojobs (s)
char *s;
{
if (s)
- builtin_error ("%s: no job control");
+ builtin_error (_("%s: no job control"), s);
else
- builtin_error ("no job control");
+ builtin_error (_("no job control"));
}
#endif
@@ -256,12 +257,19 @@ sh_restricted (s)
char *s;
{
if (s)
- builtin_error ("%s: restricted", s);
+ builtin_error (_("%s: restricted"), s);
else
- builtin_error ("restricted");
+ builtin_error (_("restricted"));
}
#endif
+void
+sh_notbuiltin (s)
+ char *s;
+{
+ builtin_error (_("%s: not a shell builtin"), s);
+}
+
/* **************************************************************** */
/* */
/* Shell positional parameter manipulation */
@@ -454,28 +462,22 @@ get_working_directory (for_whom)
char *for_whom;
{
char *directory;
+ size_t dsize;
if (no_symbolic_links)
{
- if (the_current_working_directory)
- free (the_current_working_directory);
-
+ FREE (the_current_working_directory);
the_current_working_directory = (char *)NULL;
}
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)
+ the_current_working_directory = getcwd (0, 0);
+ if (the_current_working_directory == 0)
{
- fprintf (stderr, "%s: could not get current directory: %s: %s\n",
+ 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));
-
- free (the_current_working_directory);
- the_current_working_directory = (char *)NULL;
+ _(bash_getcwd_errstr), strerror (errno));
return (char *)NULL;
}
}
@@ -537,9 +539,9 @@ get_job_by_name (name, flags)
else if (job != NO_JOB)
{
if (this_shell_builtin)
- builtin_error ("%s: ambiguous job spec", name);
+ builtin_error (_("%s: ambiguous job spec"), name);
else
- report_error ("%s: ambiguous job spec", name);
+ report_error (_("%s: ambiguous job spec"), name);
return (DUP_JOB);
}
else
@@ -565,7 +567,7 @@ get_job_spec (list)
word = list->word->word;
if (*word == '\0')
- return (current_job);
+ return (NO_JOB);
if (*word == '%')
word++;
@@ -573,17 +575,14 @@ get_job_spec (list)
if (DIGIT (*word) && all_digits (word))
{
job = atoi (word);
-#if 0
- return (job >= job_slots ? NO_JOB : job - 1);
-#else
return (job > job_slots ? NO_JOB : job - 1);
-#endif
}
jflags = 0;
switch (*word)
{
case 0:
+ return NO_JOB;
case '%':
case '+':
return (current_job);
@@ -602,6 +601,9 @@ get_job_spec (list)
}
#endif /* JOB_CONTROL */
+/*
+ * NOTE: `kill' calls this function with forcecols == 0
+ */
int
display_signal_list (list, forcecols)
WORD_LIST *list;
@@ -609,8 +611,7 @@ display_signal_list (list, forcecols)
{
register int i, column;
char *name;
- int result;
- int signum;
+ int result, signum, dflags;
intmax_t lsignum;
result = EXECUTION_SUCCESS;
@@ -623,7 +624,13 @@ display_signal_list (list, forcecols)
continue;
if (posixly_correct && !forcecols)
- printf ("%s%s", name, (i == NSIG - 1) ? "" : " ");
+ {
+ /* 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
{
printf ("%2d) %s", i, name);
@@ -677,7 +684,10 @@ display_signal_list (list, forcecols)
}
else
{
- signum = decode_signal (list->word->word);
+ 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)
{
sh_invalidsig (list->word->word);
diff --git a/builtins/common.h b/builtins/common.h
index a971bcda..411ce1eb 100644
--- a/builtins/common.h
+++ b/builtins/common.h
@@ -1,6 +1,6 @@
/* common.h -- extern declarations for functions defined in common.c. */
-/* Copyright (C) 1993-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -30,6 +30,7 @@
#define SEVAL_INTERACT 0x002
#define SEVAL_NOHIST 0x004
#define SEVAL_NOFREE 0x008
+#define SEVAL_RESETLINE 0x010
/* Flags for describe_command, shared between type.def and command.def */
#define CDESC_ALL 0x001 /* type -a */
@@ -74,6 +75,7 @@ extern void sh_badjob __P((char *));
extern void sh_readonly __P((const char *));
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 *));
extern void remember_args __P((WORD_LIST *, int));
@@ -105,6 +107,9 @@ extern sh_builtin_func_t *builtin_address __P((char *));
extern sh_builtin_func_t *find_special_builtin __P((char *));
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));
@@ -150,7 +155,7 @@ extern void parse_and_execute_cleanup __P((void));
/* Functions from evalfile.c */
extern int maybe_execute_file __P((const char *, int));
-extern int source_file __P((const char *));
+extern int source_file __P((const char *, int));
extern int fc_execute_file __P((const char *));
#endif /* !__COMMON_H */
diff --git a/builtins/complete.def b/builtins/complete.def
index f3916204..a859b88f 100644
--- a/builtins/complete.def
+++ b/builtins/complete.def
@@ -1,7 +1,7 @@
This file is complete.def, from which is created complete.c.
It implements the builtins "complete" and "compgen" in Bash.
-Copyright (C) 1999-2002 Free Software Foundation, Inc.
+Copyright (C) 1999-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -43,10 +43,12 @@ $END
#endif
#include "../bashansi.h"
+#include "../bashintl.h"
#include "../shell.h"
#include "../builtins.h"
#include "../pcomplete.h"
+#include "../bashline.h"
#include "common.h"
#include "bashgetopt.h"
@@ -106,10 +108,12 @@ static struct _compopt {
char *optname;
int optflag;
} compopts[] = {
+ { "bashdefault", COPT_BASHDEFAULT },
{ "default", COPT_DEFAULT },
{ "dirnames", COPT_DIRNAMES },
{ "filenames",COPT_FILENAMES},
{ "nospace", COPT_NOSPACE },
+ { "plusdirs", COPT_PLUSDIRS },
{ (char *)NULL, 0 },
};
@@ -244,7 +248,7 @@ build_actions (list, pp, rp, actp, optp)
ind = find_compact (list_optarg);
if (ind < 0)
{
- builtin_error ("%s: invalid action name", list_optarg);
+ builtin_error (_("%s: invalid action name"), list_optarg);
return (EX_USAGE);
}
acts |= compacts[ind].actflag;
@@ -374,7 +378,7 @@ remove_cmd_completions (list)
{
if (progcomp_remove (l->word->word) == 0)
{
- builtin_error ("%s: no completion specification", l->word->word);
+ builtin_error (_("%s: no completion specification"), l->word->word);
ret = EXECUTION_FAILURE;
}
}
@@ -428,10 +432,12 @@ print_one_completion (cmd, cs)
copts = cs->options;
/* 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;
@@ -515,7 +521,7 @@ print_cmd_completions (list)
print_one_completion (l->word->word, cs);
else
{
- builtin_error ("%s: no completion specification", l->word->word);
+ builtin_error (_("%s: no completion specification"), l->word->word);
ret = EXECUTION_FAILURE;
}
}
@@ -540,7 +546,7 @@ compgen_builtin (list)
unsigned long acts, copts;
COMPSPEC *cs;
STRINGLIST *sl;
- char *word;
+ char *word, **matches;
if (list == 0)
return (EXECUTION_SUCCESS);
@@ -562,9 +568,9 @@ compgen_builtin (list)
word = (list && list->word) ? list->word->word : "";
if (Farg)
- internal_warning ("compgen: -F option may not work as you expect");
+ builtin_error (_("warning: -F option may not work as you expect"));
if (Carg)
- internal_warning ("compgen: -C option may not work as you expect");
+ builtin_error (_("warning: -C option may not work as you expect"));
/* If we get here, we need to build a compspec and evaluate it. */
cs = compspec_create ();
@@ -583,12 +589,19 @@ compgen_builtin (list)
rval = EXECUTION_FAILURE;
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))
{
- char **matches;
-
matches = rl_completion_matches (word, rl_filename_completion_function);
sl = completions_to_stringlist (matches);
strvec_dispose (matches);
diff --git a/builtins/declare.def b/builtins/declare.def
index 75b154f8..fe112dd6 100644
--- a/builtins/declare.def
+++ b/builtins/declare.def
@@ -1,7 +1,7 @@
This file is declare.def, from which is created declare.c.
It implements the builtins "declare" and "local" in Bash.
-Copyright (C) 1987-2002 Free Software Foundation, Inc.
+Copyright (C) 1987-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -23,7 +23,7 @@ $PRODUCES declare.c
$BUILTIN declare
$FUNCTION declare_builtin
-$SHORT_DOC declare [-afFirtx] [-p] name[=value] ...
+$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
will display the attributes and values of each NAME.
@@ -32,7 +32,8 @@ The flags are:
-a to make NAMEs arrays (if supported)
-f to select from among function names only
- -F to display function names without definitions
+ -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
-t to make NAMEs have the `trace' attribute
@@ -67,6 +68,7 @@ $END
#include <stdio.h>
#include "../bashansi.h"
+#include "../bashintl.h"
#include "../shell.h"
#include "common.h"
@@ -100,7 +102,7 @@ local_builtin (list)
return (declare_internal (list, 1));
else
{
- builtin_error ("can only be used in a function");
+ builtin_error (_("can only be used in a function"));
return (EXECUTION_FAILURE);
}
}
@@ -120,6 +122,7 @@ declare_internal (list, local_var)
int flags_on, flags_off, *flags, any_failed, assign_error, pflag, nodefs, opt;
char *t, *subscript_start;
SHELL_VAR *var;
+ FUNCTION_DEF *shell_fn;
flags_on = flags_off = any_failed = assign_error = pflag = nodefs = 0;
reset_internal_getopt ();
@@ -225,7 +228,7 @@ declare_internal (list, local_var)
#endif
name = savestring (list->word->word);
- offset = assignment (name);
+ offset = assignment (name, 0);
if (offset) /* declare [-afFirx] name=value */
{
@@ -289,7 +292,7 @@ declare_internal (list, local_var)
{
if (offset) /* declare -f [-rix] foo=bar */
{
- builtin_error ("cannot use `-f' to make functions");
+ builtin_error (_("cannot use `-f' to make functions"));
free (name);
return (EXECUTION_FAILURE);
}
@@ -301,7 +304,7 @@ declare_internal (list, local_var)
{
if (readonly_p (var) && (flags_off & att_readonly))
{
- builtin_error ("%s: readonly function", name);
+ builtin_error (_("%s: readonly function"), name);
any_failed++;
NEXT_VARIABLE ();
}
@@ -309,9 +312,22 @@ declare_internal (list, local_var)
/* declare -[Ff] name [name...] */
if (flags_on == att_function && flags_off == 0)
{
- t = nodefs ? var->name
- : named_function_string (name, function_cell (var), 1);
- printf ("%s\n", t);
+#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...] */
{
@@ -370,7 +386,7 @@ declare_internal (list, local_var)
/* Cannot use declare +a name to remove an array variable. */
if ((flags_off & att_array) && array_p (var))
{
- builtin_error ("%s: cannot destroy array variables in this way", name);
+ builtin_error (_("%s: cannot destroy array variables in this way"), name);
any_failed++;
NEXT_VARIABLE ();
}
diff --git a/builtins/echo.def b/builtins/echo.def
index 07e9f247..a91c8e4c 100644
--- a/builtins/echo.def
+++ b/builtins/echo.def
@@ -133,6 +133,8 @@ echo_builtin (list)
just_echo:
+ clearerr (stdout); /* clear error before writing and testing success */
+
while (list)
{
i = len = 0;
diff --git a/builtins/enable.def b/builtins/enable.def
index 7496d427..823c38f9 100644
--- a/builtins/enable.def
+++ b/builtins/enable.def
@@ -1,7 +1,7 @@
This file is enable.def, from which is created enable.c.
It implements the builtin "enable" in Bash.
-Copyright (C) 1987-2002 Free Software Foundation, Inc.
+Copyright (C) 1987-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -50,6 +50,8 @@ $END
#include <stdio.h>
#include "../bashansi.h"
+#include "../bashintl.h"
+
#include "../shell.h"
#include "../builtins.h"
#include "../flags.h"
@@ -123,7 +125,7 @@ enable_builtin (list)
filename = list_optarg;
break;
#else
- builtin_error ("dynamic loading not available");
+ builtin_error (_("dynamic loading not available"));
return (EX_USAGE);
#endif
#if defined (HAVE_DLCLOSE)
@@ -131,7 +133,7 @@ enable_builtin (list)
flags |= DFLAG;
break;
#else
- builtin_error ("dynamic loading not available");
+ builtin_error (_("dynamic loading not available"));
return (EX_USAGE);
#endif /* HAVE_DLCLOSE */
default:
@@ -197,7 +199,7 @@ enable_builtin (list)
if (opt == EXECUTION_FAILURE)
{
- builtin_error ("%s: not a shell builtin", list->word->word);
+ sh_notbuiltin (list->word->word);
result = EXECUTION_FAILURE;
}
list = list->next;
@@ -298,7 +300,7 @@ dyn_load_builtin (list, flags, filename)
if (handle == 0)
{
- builtin_error ("cannot open shared object %s: %s", filename, dlerror ());
+ builtin_error (_("cannot open shared object %s: %s"), filename, dlerror ());
return (EXECUTION_FAILURE);
}
@@ -321,8 +323,8 @@ dyn_load_builtin (list, flags, filename)
b = (struct builtin *)dlsym (handle, struct_name);
if (b == 0)
{
- builtin_error ("cannot find %s in shared object %s: %s", struct_name,
- filename, dlerror ());
+ builtin_error (_("cannot find %s in shared object %s: %s"),
+ struct_name, filename, dlerror ());
free (struct_name);
continue;
}
@@ -440,12 +442,12 @@ dyn_unload_builtin (name)
b = builtin_address_internal (name, 1);
if (b == 0)
{
- builtin_error ("%s: not a shell builtin", name);
+ sh_notbuiltin (name);
return (EXECUTION_FAILURE);
}
if (b->flags & STATIC_BUILTIN)
{
- builtin_error ("%s: not dynamically loaded", name);
+ builtin_error (_("%s: not dynamically loaded"), name);
return (EXECUTION_FAILURE);
}
@@ -460,7 +462,7 @@ dyn_unload_builtin (name)
using it drops to zero. */
if (ref == 1 && local_dlclose (handle) != 0)
{
- builtin_error ("%s: cannot delete: %s", name, dlerror ());
+ builtin_error (_("%s: cannot delete: %s"), name, dlerror ());
return (EXECUTION_FAILURE);
}
diff --git a/builtins/evalfile.c b/builtins/evalfile.c
index 0675753e..c17e547b 100644
--- a/builtins/evalfile.c
+++ b/builtins/evalfile.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -31,6 +31,7 @@
#include <errno.h>
#include "../bashansi.h"
+#include "../bashintl.h"
#include "../shell.h"
#include "../jobs.h"
@@ -58,6 +59,7 @@ extern int errno;
#define FEVAL_HISTORY 0x020
#define FEVAL_CHECKBINARY 0x040
#define FEVAL_REGFILE 0x080
+#define FEVAL_NOPUSHARGS 0x100
extern int posixly_correct;
extern int indirection_level, startup_state, subshell_environment;
@@ -79,9 +81,28 @@ _evalfile (filename, flags)
struct stat finfo;
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);
if (fd < 0 || (fstat (fd, &finfo) == -1))
@@ -104,12 +125,12 @@ file_error_and_exit:
if (S_ISDIR (finfo.st_mode))
{
- (*errfunc) ("%s: is a directory", filename);
+ (*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);
+ (*errfunc) (_("%s: not a regular file"), filename);
return ((flags & FEVAL_BUILTIN) ? EXECUTION_FAILURE : -1);
}
@@ -117,7 +138,7 @@ file_error_and_exit:
/* Check for overflow with large files. */
if (file_size != finfo.st_size || file_size + 1 < file_size)
{
- (*errfunc) ("%s: file is too large", filename);
+ (*errfunc) (_("%s: file is too large"), filename);
return ((flags & FEVAL_BUILTIN) ? EXECUTION_FAILURE : -1);
}
@@ -176,8 +197,27 @@ file_error_and_exit:
return_catch_flag++;
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 = (flags & FEVAL_HISTORY) ? 0 : SEVAL_NOHIST;
+ pflags = SEVAL_RESETLINE;
+ pflags |= (flags & FEVAL_HISTORY) ? 0 : SEVAL_NOHIST;
if (flags & FEVAL_BUILTIN)
result = EXECUTION_SUCCESS;
@@ -205,6 +245,19 @@ file_error_and_exit:
COPY_PROCENV (old_return_catch, return_catch);
}
+#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);
}
@@ -240,14 +293,20 @@ fc_execute_file (filename)
#endif /* HISTORY */
int
-source_file (filename)
+source_file (filename, sflags)
const char *filename;
+ int sflags;
{
- int flags;
+ 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;
- return (_evalfile (filename, flags));
+ rval = _evalfile (filename, flags);
+
+ run_return_trap ();
+ return rval;
}
diff --git a/builtins/evalstring.c b/builtins/evalstring.c
index 860a3de8..88d6a9e5 100644
--- a/builtins/evalstring.c
+++ b/builtins/evalstring.c
@@ -84,6 +84,7 @@ parse_and_execute_cleanup ()
(flags & SEVAL_INTERACT) -> interactive = 1;
(flags & SEVAL_NOHIST) -> call bash_history_disable ()
(flags & SEVAL_NOFREE) -> don't free STRING when finished
+ (flags & SEVAL_RESETLINE) -> reset line_number to 1
*/
int
@@ -92,7 +93,7 @@ parse_and_execute (string, from_file, flags)
const char *from_file;
int flags;
{
- int code, x;
+ int code, x, lreset;
volatile int should_jump_to_top_level, last_result;
char *orig_string;
COMMAND *volatile command;
@@ -107,6 +108,8 @@ parse_and_execute (string, from_file, flags)
if (flags & (SEVAL_NONINT|SEVAL_INTERACT))
unwind_protect_int (interactive);
+ lreset = flags & SEVAL_RESETLINE;
+
#if defined (HISTORY)
unwind_protect_int (remember_on_history); /* can be used in scripts */
# if defined (BANG_HISTORY)
@@ -129,7 +132,15 @@ parse_and_execute (string, from_file, flags)
end_unwind_frame ();
parse_and_execute_level++;
- push_stream (1); /* reset the line number */
+
+ /* 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))
interactive = (flags & SEVAL_NONINT) ? 0 : 1;
@@ -141,11 +152,12 @@ parse_and_execute (string, from_file, flags)
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))
{
+ command = (COMMAND *)NULL;
+
if (interrupt_state)
{
last_result = EXECUTION_FAILURE;
@@ -163,15 +175,18 @@ parse_and_execute (string, from_file, flags)
switch (code)
{
case FORCE_EOF:
+ case ERREXIT:
case EXITPROG:
- run_unwind_frame ("pe_dispose");
+ if (command)
+ run_unwind_frame ("pe_dispose");
/* Remember to call longjmp (top_level) after the old
value for it is restored. */
should_jump_to_top_level = 1;
goto out;
case DISCARD:
- run_unwind_frame ("pe_dispose");
+ if (command)
+ run_unwind_frame ("pe_dispose");
last_result = last_command_exit_value = EXECUTION_FAILURE; /* XXX */
if (subshell_environment)
{
diff --git a/builtins/exec.def b/builtins/exec.def
index a6881b88..acfdae10 100644
--- a/builtins/exec.def
+++ b/builtins/exec.def
@@ -1,7 +1,7 @@
This file is exec.def, from which is created exec.c.
It implements the builtin "exec" in Bash.
-Copyright (C) 1987-2002 Free Software Foundation, Inc.
+Copyright (C) 1987-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -46,6 +46,7 @@ $END
#endif
#include "../bashansi.h"
+#include "../bashintl.h"
#include "../shell.h"
#include "../execute_cmd.h"
@@ -201,15 +202,14 @@ exec_builtin (list)
if (executable_file (command) == 0)
{
- builtin_error ("%s: cannot execute: %s", command, strerror (errno));
+ builtin_error (_("%s: cannot execute: %s"), command, strerror (errno));
exit_value = EX_NOEXEC; /* As per Posix.2, 3.14.6 */
}
else
file_error (command);
failed_exec:
- if (command)
- free (command);
+ FREE (command);
if (subshell_environment || (interactive == 0 && no_exit_on_failed_exec == 0))
exit_shell (exit_value);
diff --git a/builtins/exit.def b/builtins/exit.def
index bf1d9205..9384adef 100644
--- a/builtins/exit.def
+++ b/builtins/exit.def
@@ -1,7 +1,7 @@
This file is exit.def, from which is created exit.c.
It implements the builtins "exit", and "logout" in Bash.
-Copyright (C) 1987-2002 Free Software Foundation, Inc.
+Copyright (C) 1987-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -37,6 +37,8 @@ $END
# include <unistd.h>
#endif
+#include "../bashintl.h"
+
#include "../shell.h"
#include "../jobs.h"
@@ -44,6 +46,7 @@ $END
#include "builtext.h" /* for jobs_builtin */
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;
extern sh_builtin_func_t *last_shell_builtin;
@@ -77,7 +80,7 @@ logout_builtin (list)
{
if (login_shell == 0 /* && interactive */)
{
- builtin_error ("not login shell: use `exit'");
+ builtin_error (_("not login shell: use `exit'"));
return (EXECUTION_FAILURE);
}
else
@@ -105,7 +108,7 @@ exit_or_logout (list)
for (i = 0; i < job_slots; i++)
if (jobs[i] && STOPPED (i))
{
- fprintf (stderr, "There are stopped jobs.\n");
+ fprintf (stderr, _("There are stopped jobs.\n"));
/* This is NOT superfluous because EOF can get here without
going through the command parser. Set both last and this
@@ -120,8 +123,24 @@ exit_or_logout (list)
/* Get return value if present. This means that you can type
`logout 5' to a shell, and it returns 5. */
- exit_value = get_exitstat (list);
+ /* 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)
{
@@ -130,10 +149,4 @@ exit_or_logout (list)
maybe_execute_file (SYS_BASH_LOGOUT, 1);
#endif
}
-
- last_command_exit_value = exit_value;
-
- /* Exit the program. */
- jump_to_top_level (EXITPROG);
- /*NOTREACHED*/
}
diff --git a/builtins/fc.def b/builtins/fc.def
index c300066f..93c7ae3d 100644
--- a/builtins/fc.def
+++ b/builtins/fc.def
@@ -1,7 +1,7 @@
This file is fc.def, from which is created fc.c.
It implements the builtin "fc" in Bash.
-Copyright (C) 1987-2002 Free Software Foundation, Inc.
+Copyright (C) 1987-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -25,7 +25,6 @@ $BUILTIN fc
$FUNCTION fc_builtin
$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
string, which means the most recent command beginning with that
@@ -54,7 +53,7 @@ $END
#endif
#include "../bashtypes.h"
#include "posixstat.h"
-#ifndef _MINIX
+#if ! defined(_MINIX) && defined (HAVE_SYS_FILE_H)
# include <sys/file.h>
#endif
@@ -66,6 +65,7 @@ $END
#include <chartypes.h>
#include "../bashansi.h"
+#include "../bashintl.h"
#include <errno.h>
#include "../shell.h"
@@ -249,7 +249,7 @@ fc_builtin (list)
if (command == NULL)
{
- builtin_error ("no command found");
+ builtin_error (_("no command found"));
if (rlist)
FREE_RLIST ();
@@ -314,7 +314,7 @@ fc_builtin (list)
/* We print error messages for line specifications out of range. */
if ((histbeg < 0) || (histend < 0))
{
- sh_erange ((char *)NULL, "history specification");
+ sh_erange ((char *)NULL, _("history specification"));
return (EXECUTION_FAILURE);
}
@@ -335,7 +335,7 @@ fc_builtin (list)
stream = sh_mktmpfp ("bash-fc", MT_USERANDOM|MT_USETMPDIR, &fn);
if (stream == 0)
{
- builtin_error ("cannot open temp file %s", fn ? fn : "");
+ builtin_error (_("%s: cannot open temp file: %s"), fn ? fn : "", strerror (errno));
FREE (fn);
return (EXECUTION_FAILURE);
}
diff --git a/builtins/fg_bg.def b/builtins/fg_bg.def
index c16d894d..ea13bef3 100644
--- a/builtins/fg_bg.def
+++ b/builtins/fg_bg.def
@@ -1,7 +1,7 @@
This file is fg_bg.def, from which is created fg_bg.c.
It implements the builtins "bg" and "fg" in Bash.
-Copyright (C) 1987-2002 Free Software Foundation, Inc.
+Copyright (C) 1987-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -39,6 +39,8 @@ $END
# include <unistd.h>
#endif
+#include "../bashintl.h"
+
#include "../shell.h"
#include "../jobs.h"
#include "common.h"
@@ -128,7 +130,7 @@ fg_bg (list, foreground)
/* Or if jobs[job]->pgrp == shell_pgrp. */
if (IS_JOBCONTROL (job) == 0)
{
- builtin_error ("job %%%d started without job control", job + 1);
+ builtin_error (_("job %d started without job control"), job + 1);
goto failure;
}
diff --git a/builtins/getopt.c b/builtins/getopt.c
index 60c6188a..b223a76a 100644
--- a/builtins/getopt.c
+++ b/builtins/getopt.c
@@ -28,6 +28,7 @@
#include <stdio.h>
#include "memalloc.h"
+#include "../bashintl.h"
#include "../shell.h"
#include "getopt.h"
@@ -105,8 +106,8 @@ int sh_badopt = 0;
ARGV-element, is returned in `sh_optarg'. */
/* 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)
+#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
sh_getopt (argc, argv, optstring)
diff --git a/builtins/getopts.def b/builtins/getopts.def
index a2a82ff4..eb0a31d1 100644
--- a/builtins/getopts.def
+++ b/builtins/getopts.def
@@ -44,7 +44,7 @@ seen, getopts places the option character found into OPTARG. If a
required argument is not found, getopts places a ':' into NAME and
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 '?'
+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.
@@ -245,6 +245,7 @@ dogetopts (argc, argv)
if (ret == G_EOF)
{
+ unbind_variable ("OPTARG");
getopts_bind_variable (name, "?");
return (EXECUTION_FAILURE);
}
diff --git a/builtins/hash.def b/builtins/hash.def
index 6e0e3476..d311ac90 100644
--- a/builtins/hash.def
+++ b/builtins/hash.def
@@ -1,7 +1,7 @@
This file is hash.def, from which is created hash.c.
It implements the builtin "hash" in Bash.
-Copyright (C) 1987-2002 Free Software Foundation, Inc.
+Copyright (C) 1987-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -49,6 +49,7 @@ $END
#include <errno.h>
#include "../bashansi.h"
+#include "../bashintl.h"
#include "../shell.h"
#include "../builtins.h"
@@ -79,7 +80,7 @@ hash_builtin (list)
if (hashing_enabled == 0)
{
- builtin_error ("hashing disabled");
+ builtin_error (_("hashing disabled"));
return (EXECUTION_FAILURE);
}
@@ -124,7 +125,7 @@ hash_builtin (list)
if (list == 0 && expunge_hash_table == 0)
{
if (print_hashed_commands (list_portably) == 0)
- printf ("%s: hash table empty\n", this_command_name);
+ printf (_("%s: hash table empty\n"), this_command_name);
return (EXECUTION_SUCCESS);
}
diff --git a/builtins/help.def b/builtins/help.def
index 234307b7..1935b64e 100644
--- a/builtins/help.def
+++ b/builtins/help.def
@@ -1,7 +1,7 @@
This file is help.def, from which is created help.c.
It implements the builtin "help" in Bash.
-Copyright (C) 1987-2002 Free Software Foundation, Inc.
+Copyright (C) 1987-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -48,6 +48,8 @@ $END
#include <filecntl.h>
+#include "../bashintl.h"
+
#include "../shell.h"
#include "../builtins.h"
#include "../pathexp.h"
@@ -102,7 +104,10 @@ help_builtin (list)
if (glob_pattern_p (list->word->word))
{
- printf ("Shell commands matching keyword%s `", list->next ? "s" : "");
+ if (list->next)
+ printf (_("Shell commands matching keywords `"));
+ else
+ printf (_("Shell commands matching keyword `"));
print_word_list (list, ", ");
printf ("'\n\n");
}
@@ -130,7 +135,7 @@ help_builtin (list)
if (match_found == 0)
{
- builtin_error ("no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'.", pattern, pattern, pattern);
+ builtin_error (_("no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."), pattern, pattern, pattern);
return (EXECUTION_FAILURE);
}
@@ -156,7 +161,7 @@ show_longdoc (i)
fd = open (doc[0], O_RDONLY);
if (fd == -1)
{
- builtin_error ("%s: cannot open: %s", doc[0], strerror (errno));
+ builtin_error (_("%s: cannot open: %s"), doc[0], strerror (errno));
return;
}
zcatfd (fd, 1, doc[0]);
@@ -164,7 +169,7 @@ show_longdoc (i)
}
else
for (j = 0; doc[j]; j++)
- printf (" %s\n", doc[j]);
+ printf (" %s\n", _(doc[j]));
}
static void
@@ -174,13 +179,13 @@ show_builtin_command_help ()
char blurb[36];
printf (
-"These shell commands are defined internally. Type `help' to see this list.\n\
+_("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");
+\n"));
for (i = 0; i < num_shell_builtins; i++)
{
diff --git a/builtins/history.def b/builtins/history.def
index 7311705d..52b1113f 100644
--- a/builtins/history.def
+++ b/builtins/history.def
@@ -1,7 +1,7 @@
This file is history.def, from which is created history.c.
It implements the builtin "history" in Bash.
-Copyright (C) 1987-2002 Free Software Foundation, Inc.
+Copyright (C) 1987-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -34,20 +34,25 @@ current history to the history file; `-r' means to read the file and
append the contents to the history list instead. `-a' means
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
+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
the history list as a single entry. The -p option means to perform
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
#include <config.h>
#if defined (HISTORY)
#include "../bashtypes.h"
-#ifndef _MINIX
+#if ! defined(_MINIX) && defined (HAVE_SYS_FILE_H)
# include <sys/file.h>
#endif
#include "posixstat.h"
@@ -59,6 +64,7 @@ $END
#endif
#include "../bashansi.h"
+#include "../bashintl.h"
#include "../shell.h"
#include "../bashhist.h"
@@ -72,6 +78,7 @@ extern int errno;
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));
static int delete_last_history __P((void));
@@ -91,7 +98,7 @@ int
history_builtin (list)
WORD_LIST *list;
{
- int flags, opt, result, old_history_lines;
+ int flags, opt, result, old_history_lines, obase;
char *filename, *delete_arg;
intmax_t delete_offset;
@@ -138,7 +145,7 @@ history_builtin (list)
opt = flags & (AFLAG|RFLAG|WFLAG|NFLAG);
if (opt && opt != AFLAG && opt != RFLAG && opt != WFLAG && opt != NFLAG)
{
- builtin_error ("cannot use more than one of -anrw");
+ builtin_error (_("cannot use more than one of -anrw"));
return (EXECUTION_FAILURE);
}
@@ -170,7 +177,7 @@ history_builtin (list)
|| (delete_offset < history_base)
|| (delete_offset > (history_base + history_length)))
{
- sh_erange (delete_arg, "history position");
+ sh_erange (delete_arg, _("history position"));
return (EXECUTION_FAILURE);
}
opt = delete_offset;
@@ -200,11 +207,23 @@ history_builtin (list)
{
/* 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 ();
- history_lines_this_session += history_lines_in_file - old_history_lines;
+ /* 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;
}
return (result ? EXECUTION_FAILURE : EXECUTION_SUCCESS);
@@ -214,6 +233,22 @@ history_builtin (list)
#define histline(i) (hlist[(i)]->line)
#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)
WORD_LIST *list;
@@ -221,6 +256,7 @@ display_history (list)
register int i;
intmax_t limit;
HIST_ENTRY **hlist;
+ char *histtimefmt, *timestr;
if (list)
{
@@ -243,11 +279,17 @@ display_history (list)
else
i = 0;
+
+ histtimefmt = get_string_value ("HISTTIMEFORMAT");
+
while (hlist[i])
{
QUIT;
- printf ("%5d%c %s\n", i + history_base,
+
+ 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++;
}
@@ -263,11 +305,8 @@ delete_histent (i)
discard = remove_history (i);
if (discard)
- {
- if (discard->line)
- free (discard->line);
- free ((char *) discard);
- }
+ free_history_entry (discard);
+
return 1;
}
@@ -276,6 +315,7 @@ delete_last_history ()
{
register int i;
HIST_ENTRY **hlist, *histent;
+ int r;
hlist = history_list ();
if (hlist == NULL)
@@ -290,7 +330,12 @@ delete_last_history ()
if (histent == NULL)
return 0;
- return (delete_histent (i));
+ r = delete_histent (i);
+
+ if (where_history () > history_length)
+ history_set_pos (history_length);
+
+ return r;
}
/* Remove the last entry in the history list and add each argument in
@@ -342,7 +387,7 @@ expand_and_print_history (list)
r = history_expand (list->word->word, &s);
if (r < 0)
{
- builtin_error ("%s: history expansion failed", list->word->word);
+ builtin_error (_("%s: history expansion failed"), list->word->word);
result = EXECUTION_FAILURE;
}
else
diff --git a/builtins/jobs.def b/builtins/jobs.def
index 54f50ca3..76d1957f 100644
--- a/builtins/jobs.def
+++ b/builtins/jobs.def
@@ -1,7 +1,7 @@
This file is jobs.def, from which is created jobs.c.
It implements the builtins "jobs" and "disown" in Bash.
-Copyright (C) 1987-2002 Free Software Foundation, Inc.
+Copyright (C) 1987-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -46,6 +46,7 @@ $END
#endif
#include "../bashansi.h"
+#include "../bashintl.h"
#include "../shell.h"
#include "../jobs.h"
@@ -74,9 +75,6 @@ jobs_builtin (list)
int form, execute, state, opt, any_failed, job;
sigset_t set, oset;
- if (job_control == 0 && interactive_shell == 0)
- return (EXECUTION_SUCCESS);
-
execute = any_failed = 0;
form = JLIST_STANDARD;
state = JSTATE_ANY;
@@ -98,7 +96,7 @@ jobs_builtin (list)
case 'x':
if (form != JLIST_STANDARD)
{
- builtin_error ("no other options allowed with `-x'");
+ builtin_error (_("no other options allowed with `-x'"));
return (EXECUTION_FAILURE);
}
execute++;
@@ -163,6 +161,7 @@ execute_list_with_replacements (list)
{
register WORD_LIST *l;
int job, result;
+ COMMAND *command;
/* First do the replacement of job specifications with pids. */
for (l = list; l; l = l->next)
@@ -182,21 +181,18 @@ execute_list_with_replacements (list)
/* 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;
+ 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);
- }
+ add_unwind_protect (dispose_command, command);
+ result = execute_command (command);
+ dispose_command (command);
- run_unwind_frame ("jobs_builtin");
+ discard_unwind_frame ("jobs_builtin");
return (result);
}
#endif /* JOB_CONTROL */
diff --git a/builtins/kill.def b/builtins/kill.def
index 96b34fcb..d1b9f6da 100644
--- a/builtins/kill.def
+++ b/builtins/kill.def
@@ -1,7 +1,7 @@
This file is kill.def, from which is created kill.c.
It implements the builtin "kill" in Bash.
-Copyright (C) 1987-2002 Free Software Foundation, Inc.
+Copyright (C) 1987-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -23,7 +23,6 @@ $PRODUCES kill.c
$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
SIGSPEC is not present, then SIGTERM is assumed. An argument of `-l'
@@ -46,6 +45,7 @@ $END
#endif
#include "../bashansi.h"
+#include "../bashintl.h"
#include "../shell.h"
#include "../trap.h"
@@ -57,9 +57,10 @@ $END
extern int errno;
#endif /* !errno */
-#if defined (JOB_CONTROL)
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)
#else
@@ -73,7 +74,7 @@ int
kill_builtin (list)
WORD_LIST *list;
{
- int sig, any_succeeded, listing, saw_signal;
+ int sig, any_succeeded, listing, saw_signal, dflags;
char *sigspec, *word;
pid_t pid;
intmax_t pid_value;
@@ -88,6 +89,7 @@ kill_builtin (list)
sig = SIGTERM;
sigspec = "TERM";
+ dflags = DSIG_NOCASE | ((posixly_correct == 0) ? DSIG_SIGPREFIX : 0);
/* Process options. */
while (list)
{
@@ -107,7 +109,7 @@ kill_builtin (list)
if (sigspec[0] == '0' && sigspec[1] == '\0')
sig = 0;
else
- sig = decode_signal (sigspec);
+ sig = decode_signal (sigspec, dflags);
list = list->next;
}
else
@@ -132,7 +134,7 @@ kill_builtin (list)
else if ((*word == '-') && !saw_signal)
{
sigspec = word + 1;
- sig = decode_signal (sigspec);
+ sig = decode_signal (sigspec, dflags);
saw_signal++;
list = list->next;
}
@@ -169,16 +171,23 @@ kill_builtin (list)
pid = (pid_t) pid_value;
if ((pid < -1 ? kill_pid (-pid, sig, 1) : kill_pid (pid, sig, 0)) < 0)
- goto signal_error;
+ {
+ 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: no such pid", list->word->word);
+ builtin_error (_("%s: arguments must be process or job IDs"), list->word->word);
CONTINUE_OR_FAIL;
}
- else if (*word && (interactive || job_control))
+ else if (*word)
/* Posix.2 says you can kill without job control active (4.32.4) */
{ /* Must be a job spec. Check it out. */
int job;
@@ -205,16 +214,16 @@ kill_builtin (list)
if (kill_pid (pid, sig, 1) < 0)
{
- signal_error:
if (errno == EINVAL)
sh_invalidsig (sigspec);
else
- builtin_error ("(%ld) - %s", (long)pid, strerror (errno));
+ kill_error (pid, errno);
CONTINUE_OR_FAIL;
}
else
any_succeeded++;
}
+#endif /* !JOB_CONTROL */
else
{
sh_badpid (list->word->word);
@@ -226,4 +235,16 @@ kill_builtin (list)
return (any_succeeded ? EXECUTION_SUCCESS : EXECUTION_FAILURE);
}
-#endif /* JOB_CONTROL */
+
+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 --git a/builtins/let.def b/builtins/let.def
index 7c9341ed..ab43a454 100644
--- a/builtins/let.def
+++ b/builtins/let.def
@@ -45,7 +45,7 @@ The levels are listed in order of decreasing precedence.
&& logical AND
|| logical OR
expr ? expr : expr
- conditional expression
+ conditional operator
=, *=, /=, %=,
+=, -=, <<=, >>=,
&=, ^=, |= assignment
@@ -72,6 +72,8 @@ $END
# include <unistd.h>
#endif
+#include "../bashintl.h"
+
#include "../shell.h"
#include "common.h"
@@ -89,7 +91,7 @@ let_builtin (list)
if (list == 0)
{
- builtin_error ("expression expected");
+ builtin_error (_("expression expected"));
return (EXECUTION_FAILURE);
}
@@ -114,7 +116,7 @@ exp_builtin (list)
if (list == 0)
{
- builtin_error ("expression expected");
+ builtin_error (_("expression expected"));
return (EXECUTION_FAILURE);
}
diff --git a/builtins/mkbuiltins.c b/builtins/mkbuiltins.c
index c911f86e..278755b4 100644
--- a/builtins/mkbuiltins.c
+++ b/builtins/mkbuiltins.c
@@ -29,8 +29,10 @@ Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#endif
#ifndef _MINIX
-#include "../bashtypes.h"
-#include <sys/file.h>
+# include "../bashtypes.h"
+# if defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+# endif
#endif
#include "posixstat.h"
@@ -1127,6 +1129,9 @@ write_file_headers (structfile, externfile)
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");
}
@@ -1367,8 +1372,9 @@ write_documentation (stream, documentation, indentation, flags)
continue;
}
+ /* prefix with N_( for gettext */
if (string_array)
- fprintf (stream, " \"");
+ fprintf (stream, " N_(\"");
if (indentation)
for (j = 0; j < indentation; j++)
@@ -1390,7 +1396,8 @@ write_documentation (stream, documentation, indentation, flags)
}
}
- fprintf (stream, "\",\n");
+ /* closing right paren for gettext */
+ fprintf (stream, "\"),\n");
}
else if (texinfo)
{
diff --git a/builtins/printf.def b/builtins/printf.def
index 8821ecb2..9b377a93 100644
--- a/builtins/printf.def
+++ b/builtins/printf.def
@@ -1,7 +1,7 @@
This file is printf.def, from which is created printf.c.
It implements the builtin "printf" in Bash.
-Copyright (C) 1997-2002 Free Software Foundation, Inc.
+Copyright (C) 1997-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -55,6 +55,7 @@ $END
#endif
#include "../bashansi.h"
+#include "../bashintl.h"
#include "../shell.h"
#include "stdc.h"
@@ -105,7 +106,7 @@ extern int errno;
static void printf_erange __P((char *));
static void printstr __P((char *, char *, int, int, int));
-static int tescape __P((char *, int, char *, int *));
+static int tescape __P((char *, char *, int *));
static char *bexpand __P((char *, int, int *, int *));
static char *mklong __P((char *, char *, size_t));
static int getchr __P((void));
@@ -114,7 +115,7 @@ static int getint __P((void));
static intmax_t getintmax __P((void));
static uintmax_t getuintmax __P((void));
-#if defined (HAVE_LONG_DOUBLE) && HAVE_DECL_STRTOLD
+#if defined (HAVE_LONG_DOUBLE) && HAVE_DECL_STRTOLD && !defined(STRTOLD_BROKEN)
typedef long double floatmax_t;
# define FLOATMAX_CONV "L"
# define strtofltmax strtold
@@ -182,13 +183,12 @@ printf_builtin (list)
precision = fieldwidth = 0;
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);
+ /* 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 */
continue;
@@ -246,7 +246,7 @@ printf_builtin (list)
if (*fmt == 0)
{
- builtin_error ("`%s': missing format character", start);
+ builtin_error (_("`%s': missing format character"), start);
PRETURN (EXECUTION_FAILURE);
}
@@ -405,7 +405,7 @@ printf_builtin (list)
/* We don't output unrecognized format characters; we print an
error message and return a failure exit status. */
default:
- builtin_error ("`%c': invalid format character", convch);
+ builtin_error (_("`%c': invalid format character"), convch);
PRETURN (EXECUTION_FAILURE);
}
@@ -531,6 +531,7 @@ printstr (fmt, string, len, fieldwidth, precision)
/* 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. */
@@ -540,11 +541,10 @@ printstr (fmt, string, len, fieldwidth, precision)
value. *SAWC is set to 1 if the escape sequence was \c, since that means
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. */
+ sequence; we also bypass the other processing specific to %b arguments. */
static int
-tescape (estart, trans_squote, cp, sawc)
+tescape (estart, cp, sawc)
char *estart;
- int trans_squote;
char *cp;
int *sawc;
{
@@ -576,14 +576,13 @@ tescape (estart, trans_squote, cp, sawc)
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++)
+ /* 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;
break;
@@ -591,11 +590,15 @@ tescape (estart, trans_squote, cp, sawc)
/* And, as another extension, we allow \xNNN, where each N is a
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 (temp == 2)
+ if (p == estart + 1)
{
- builtin_error ("missing hex digit for \\x");
+ builtin_error (_("missing hex digit for \\x"));
*cp = '\\';
return 0;
}
@@ -606,8 +609,11 @@ tescape (estart, trans_squote, cp, sawc)
*cp = c;
break;
- case '\'': /* TRANS_SQUOTE != 0 means \' -> ' */
- if (trans_squote)
+ /* 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
{
@@ -657,7 +663,7 @@ bexpand (string, len, sawc, lenp)
continue;
}
temp = 0;
- s += tescape (s, 0, &c, &temp);
+ s += tescape (s, &c, &temp);
if (temp)
{
if (sawc)
diff --git a/builtins/pushd.def b/builtins/pushd.def
index 2bb72ffa..83b69c44 100644
--- a/builtins/pushd.def
+++ b/builtins/pushd.def
@@ -1,7 +1,7 @@
This file is pushd.def, from which is created pushd.c. It implements the
builtins "pushd", "popd", and "dirs" in Bash.
-Copyright (C) 1987-2002 Free Software Foundation, Inc.
+Copyright (C) 1987-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -107,6 +107,7 @@ $END
#endif
#include "../bashansi.h"
+#include "../bashintl.h"
#include <errno.h>
@@ -164,7 +165,7 @@ pushd_builtin (list)
{
if (directory_list_offset == 0)
{
- builtin_error ("no other directory");
+ builtin_error (_("no other directory"));
return (EXECUTION_FAILURE);
}
@@ -431,7 +432,7 @@ dirs_builtin (list)
{
temp = get_working_directory ("dirs");
if (temp == 0)
- temp = savestring ("<no current directory>");
+ temp = savestring (_("<no current directory>"));
if (vflag & 2)
printf ("%2d %s", 0, DIRSTACK_FORMAT (temp));
else
@@ -648,66 +649,66 @@ get_directory_stack ()
#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.",
+ 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[] = {
- "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.",
+ 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[] = {
- "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.",
+ 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 --git a/builtins/read.def b/builtins/read.def
index 46a0407b..cdac9c4b 100644
--- a/builtins/read.def
+++ b/builtins/read.def
@@ -1,7 +1,7 @@
This file is read.def, from which is created read.c.
It implements the builtin "read" in Bash.
-Copyright (C) 1987-2002 Free Software Foundation, Inc.
+Copyright (C) 1987-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -66,6 +66,8 @@ $END
# include <io.h>
#endif
+#include "../bashintl.h"
+
#include "../shell.h"
#include "common.h"
#include "bashgetopt.h"
@@ -202,7 +204,7 @@ read_builtin (list)
code = legal_number (list_optarg, &intval);
if (code == 0 || intval < 0 || intval != (unsigned int)intval)
{
- builtin_error ("%s: invalid timeout specification", list_optarg);
+ builtin_error (_("%s: invalid timeout specification"), list_optarg);
return (EXECUTION_FAILURE);
}
else
@@ -225,14 +227,14 @@ read_builtin (list)
code = legal_number (list_optarg, &intval);
if (code == 0 || intval < 0 || intval != (int)intval)
{
- builtin_error ("%s: invalid file descriptor specification", list_optarg);
+ builtin_error (_("%s: invalid file descriptor specification"), list_optarg);
return (EXECUTION_FAILURE);
}
else
fd = intval;
if (sh_validfd (fd) == 0)
{
- builtin_error ("%d: invalid file descriptor: %s", fd, strerror (errno));
+ builtin_error (_("%d: invalid file descriptor: %s"), fd, strerror (errno));
return (EXECUTION_FAILURE);
}
break;
@@ -458,7 +460,7 @@ read_builtin (list)
#if 1
if (retval < 0)
{
- builtin_error ("read error: %d: %s", fd, strerror (errno));
+ builtin_error (_("read error: %d: %s"), fd, strerror (errno));
return (EXECUTION_FAILURE);
}
#endif
@@ -497,6 +499,13 @@ read_builtin (list)
an assign them to `arrayname' in turn. */
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)
return EXECUTION_FAILURE; /* readonly or noassign */
@@ -505,6 +514,7 @@ read_builtin (list)
alist = list_string (input_string, ifs_chars, 0);
if (alist)
{
+ word_list_remove_quoted_nulls (alist);
assign_array_var_from_word_list (var, alist);
dispose_words (alist);
}
diff --git a/builtins/return.def b/builtins/return.def
index 84a90a33..23389c07 100644
--- a/builtins/return.def
+++ b/builtins/return.def
@@ -1,7 +1,7 @@
This file is return.def, from which is created return.c.
It implements the builtin "return" in Bash.
-Copyright (C) 1987-2002 Free Software Foundation, Inc.
+Copyright (C) 1987-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -38,6 +38,8 @@ $END
# include <unistd.h>
#endif
+#include "../bashintl.h"
+
#include "../shell.h"
#include "common.h"
@@ -58,7 +60,7 @@ return_builtin (list)
longjmp (return_catch, 1);
else
{
- builtin_error ("can only `return' from a function or sourced script");
+ builtin_error (_("can only `return' from a function or sourced script"));
return (EXECUTION_FAILURE);
}
}
diff --git a/builtins/set.def b/builtins/set.def
index 10aaf5ff..02cc16a1 100644
--- a/builtins/set.def
+++ b/builtins/set.def
@@ -33,6 +33,7 @@ $PRODUCES set.c
#include <stdio.h>
#include "../bashansi.h"
+#include "../bashintl.h"
#include "../shell.h"
#include "../flags.h"
@@ -77,6 +78,8 @@ $SHORT_DOC set [--abefhkmnptuvxBCHP] [-o option] [arg ...]
emacs use an emacs-style line editing interface
#endif /* READLINE */
errexit same as -e
+ errtrace same as -E
+ functrace same as -T
hashall same as -h
#if defined (BANG_HISTORY)
histexpand same as -H
@@ -97,6 +100,9 @@ $SHORT_DOC set [--abefhkmnptuvxBCHP] [-o option] [arg ...]
nounset same as -u
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
match the standard
@@ -119,12 +125,14 @@ $SHORT_DOC set [--abefhkmnptuvxBCHP] [-o option] [arg ...]
#endif /* BRACE_EXPANSION */
-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
by default.
#endif /* BANG_HISTORY */
-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
flags can also be used upon invocation of the shell. The current
@@ -172,6 +180,8 @@ struct {
{ "emacs", '\0', (int *)NULL, set_edit_mode, get_edit_mode },
#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)
{ "histexpand", 'H', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
@@ -195,6 +205,7 @@ struct {
{ "nounset", 'u', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
{ "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 },
{ "verbose", 'v', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
@@ -729,7 +740,7 @@ unset_builtin (list)
if (unset_function && unset_variable)
{
- builtin_error ("cannot simultaneously unset a function and a variable");
+ builtin_error (_("cannot simultaneously unset a function and a variable"));
return (EXECUTION_FAILURE);
}
@@ -766,14 +777,14 @@ unset_builtin (list)
if (var && !unset_function && non_unsettable_p (var))
{
- builtin_error ("%s: cannot unset", name);
+ builtin_error (_("%s: cannot unset"), name);
NEXT_VARIABLE ();
}
/* Posix.2 says that unsetting readonly variables is an error. */
if (var && readonly_p (var))
{
- builtin_error ("%s: cannot unset: readonly %s",
+ builtin_error (_("%s: cannot unset: readonly %s"),
name, unset_function ? "function" : "variable");
NEXT_VARIABLE ();
}
@@ -784,7 +795,7 @@ unset_builtin (list)
{
if (array_p (var) == 0)
{
- builtin_error ("%s: not an array variable", name);
+ builtin_error (_("%s: not an array variable"), name);
NEXT_VARIABLE ();
}
else
diff --git a/builtins/setattr.def b/builtins/setattr.def
index 8465e7d3..d211dbc4 100644
--- a/builtins/setattr.def
+++ b/builtins/setattr.def
@@ -1,7 +1,7 @@
This file is setattr.def, from which is created setattr.c.
It implements the builtins "export" and "readonly", in Bash.
-Copyright (C) 1987-2002 Free Software Foundation, Inc.
+Copyright (C) 1987-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -32,6 +32,7 @@ $PRODUCES setattr.c
#include <stdio.h>
#include "../bashansi.h"
+#include "../bashintl.h"
#include "../shell.h"
#include "common.h"
@@ -75,13 +76,12 @@ export_builtin (list)
$BUILTIN readonly
$FUNCTION readonly_builtin
-$SHORT_DOC readonly [-anf] [name[=value] ...] or readonly -p
+$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. An argument of `-n' says to remove the readonly property
-from subsequent NAMEs. The `-a' option means to treat each NAME as
+is printed. The `-a' option means to treat each NAME as
an array variable. An argument of `--' disables further option
processing.
$END
@@ -103,7 +103,7 @@ readonly_builtin (list)
/* 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. */
+ remaining names in LIST (doesn't work for readonly). */
int
set_or_show_attributes (list, attribute, nodefs)
register WORD_LIST *list;
@@ -162,7 +162,7 @@ set_or_show_attributes (list, attribute, nodefs)
var = find_function (name);
if (var == 0)
{
- builtin_error ("%s: not a function", name);
+ builtin_error (_("%s: not a function"), name);
any_failed++;
}
else
@@ -173,7 +173,7 @@ set_or_show_attributes (list, attribute, nodefs)
}
/* xxx [-np] name[=value] */
- assign = assignment (name);
+ assign = assignment (name, 0);
if (assign)
name[assign] = '\0';
diff --git a/builtins/shift.def b/builtins/shift.def
index dbff0622..e20b4d54 100644
--- a/builtins/shift.def
+++ b/builtins/shift.def
@@ -1,7 +1,7 @@
This file is shift.def, from which is created shift.c.
It implements the builtin "shift" in Bash.
-Copyright (C) 1987-2002 Free Software Foundation, Inc.
+Copyright (C) 1987-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -31,6 +31,7 @@ $PRODUCES shift.c
#endif
#include "../bashansi.h"
+#include "../bashintl.h"
#include "../shell.h"
#include "common.h"
@@ -62,13 +63,13 @@ shift_builtin (list)
return (EXECUTION_SUCCESS);
else if (times < 0)
{
- sh_erange (list->word->word, "shift count");
+ sh_erange (list ? list->word->word : NULL, _("shift count"));
return (EXECUTION_FAILURE);
}
else if (times > number_of_args ())
{
if (print_shift_error)
- sh_erange (list->word->word, "shift count");
+ sh_erange (list ? list->word->word : NULL, _("shift count"));
return (EXECUTION_FAILURE);
}
diff --git a/builtins/shopt.def b/builtins/shopt.def
index ae15330d..ad432e0c 100644
--- a/builtins/shopt.def
+++ b/builtins/shopt.def
@@ -1,7 +1,7 @@
This file is shopt.def, from which is created shopt.c.
It implements the Bash `shopt' builtin.
-Copyright (C) 1994-2002 Free Software Foundation, Inc.
+Copyright (C) 1994-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -45,6 +45,8 @@ $END
#include <stdio.h>
+#include "../bashintl.h"
+
#include "../shell.h"
#include "../flags.h"
#include "common.h"
@@ -55,15 +57,17 @@ $END
#define OPTFMT "%-15s\t%s\n"
-extern int allow_null_glob_expansion, glob_dot_filenames;
+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)
extern int extended_glob;
@@ -77,6 +81,7 @@ extern int force_append_history;
#if defined (READLINE)
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
@@ -88,9 +93,13 @@ extern int prog_completion_enabled;
extern char *shell_name;
#endif
+#if defined (DEBUGGER)
+extern int debugging_mode;
+#endif
+
static void shopt_error __P((char *));
-static int set_interactive_comments __P((int));
+static int set_shellopts_after_change __P((int));
#if defined (RESTRICTED_SHELL)
static int set_restricted_shell __P((int));
@@ -115,10 +124,17 @@ static struct {
{ "dotglob", &glob_dot_filenames, (shopt_set_func_t *)NULL },
{ "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
#if defined (HISTORY)
@@ -129,7 +145,7 @@ static struct {
{ "hostcomplete", &perform_hostname_completion, enable_hostname_completion },
#endif
{ "huponexit", &hup_on_exit, (shopt_set_func_t *)NULL },
- { "interactive_comments", &interactive_comments, set_interactive_comments },
+ { "interactive_comments", &interactive_comments, set_shellopts_after_change },
#if defined (HISTORY)
{ "lithist", &literal_history, (shopt_set_func_t *)NULL },
#endif
@@ -207,7 +223,7 @@ shopt_builtin (list)
if ((flags & (SFLAG|UFLAG)) == (SFLAG|UFLAG))
{
- builtin_error ("cannot set and unset shell options simultaneously");
+ builtin_error (_("cannot set and unset shell options simultaneously"));
return (EXECUTION_FAILURE);
}
@@ -272,7 +288,7 @@ static void
shopt_error (s)
char *s;
{
- builtin_error ("%s: invalid shell option name", s);
+ builtin_error (_("%s: invalid shell option name"), s);
}
static int
@@ -435,7 +451,7 @@ set_shopt_o_options (mode, list, quiet)
/* If we set or unset interactive_comments with shopt, make sure the
change is reflected in $SHELLOPTS. */
static int
-set_interactive_comments (mode)
+set_shellopts_after_change (mode)
int mode;
{
set_shellopts ();
diff --git a/builtins/source.def b/builtins/source.def
index ffb23f07..f9f812f8 100644
--- a/builtins/source.def
+++ b/builtins/source.def
@@ -1,7 +1,7 @@
This file is source.def, from which is created source.c.
It implements the builtins "." and "source" in Bash.
-Copyright (C) 1987-2002 Free Software Foundation, Inc.
+Copyright (C) 1987-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -23,16 +23,20 @@ $PRODUCES source.c
$BUILTIN source
$FUNCTION source_builtin
-$SHORT_DOC source filename
+$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.
+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
+$SHORT_DOC . filename [arguments]
Read and execute commands from FILENAME and return. The pathnames
-in $PATH are used to find the directory containing FILENAME.
+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. */
@@ -41,7 +45,7 @@ $END
#include "../bashtypes.h"
#include "posixstat.h"
#include "filecntl.h"
-#ifndef _MINIX
+#if ! defined(_MINIX) && defined (HAVE_SYS_FILE_H)
# include <sys/file.h>
#endif
#include <errno.h>
@@ -51,11 +55,14 @@ $END
#endif
#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)
extern int errno;
@@ -85,6 +92,8 @@ maybe_pop_dollar_vars ()
dispose_saved_dollar_vars ();
else
pop_dollar_vars ();
+ if (debugging_mode)
+ pop_args (); /* restore BASH_ARGC and BASH_ARGV */
set_dollar_vars_unchanged ();
}
@@ -97,7 +106,7 @@ source_builtin (list)
WORD_LIST *list;
{
int result;
- char *filename;
+ char *filename, *debug_trap;
if (no_options (list))
return (EX_USAGE);
@@ -105,7 +114,7 @@ source_builtin (list)
if (list == 0)
{
- builtin_error ("filename argument required");
+ builtin_error (_("filename argument required"));
builtin_usage ();
return (EX_USAGE);
}
@@ -125,7 +134,7 @@ source_builtin (list)
{
if (source_searches_cwd == 0)
{
- builtin_error ("%s: file not found", list->word->word);
+ builtin_error (_("%s: file not found"), list->word->word);
return (EXECUTION_FAILURE);
}
else
@@ -140,10 +149,24 @@ source_builtin (list)
push_dollar_vars ();
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 ();
- result = source_file (filename);
+ /* 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 --git a/builtins/suspend.def b/builtins/suspend.def
index 43391c0d..d616d775 100644
--- a/builtins/suspend.def
+++ b/builtins/suspend.def
@@ -1,7 +1,7 @@
This file is suspend.def, from which is created suspend.c.
It implements the builtin "suspend" in Bash.
-Copyright (C) 1987-2002 Free Software Foundation, Inc.
+Copyright (C) 1987-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -42,6 +42,7 @@ $END
#include "../bashtypes.h"
#include <signal.h>
+#include "../bashintl.h"
#include "../shell.h"
#include "../jobs.h"
#include "common.h"
@@ -89,7 +90,7 @@ suspend_builtin (list)
if (job_control == 0)
{
- sh_nojobs ("cannot suspend");
+ sh_nojobs (_("cannot suspend"));
return (EXECUTION_FAILURE);
}
@@ -99,11 +100,14 @@ suspend_builtin (list)
if (login_shell)
{
- builtin_error ("cannot suspend a 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
old_stop = (SigHandler *)set_signal_handler (SIGSTOP, SIG_DFL);
diff --git a/builtins/trap.def b/builtins/trap.def
index af9e6d6c..9dd746fb 100644
--- a/builtins/trap.def
+++ b/builtins/trap.def
@@ -1,7 +1,7 @@
This file is trap.def, from which is created trap.c.
It implements the builtin "trap" in Bash.
-Copyright (C) 1987-2002 Free Software Foundation, Inc.
+Copyright (C) 1987-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -23,20 +23,21 @@ $PRODUCES trap.c
$BUILTIN trap
$FUNCTION trap_builtin
-$SHORT_DOC trap [arg] [signal_spec ...] or trap -l
+$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 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 <signal.h>
-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 $$".
+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 <signal.h> 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
#include <config.h>
@@ -108,6 +109,8 @@ trap_builtin (list)
}
list = loptend;
+ opt = DSIG_NOCASE|DSIG_SIGPREFIX; /* flags for decode_signal */
+
if (list_signal_names)
return (display_signal_list ((WORD_LIST *)NULL, 1));
else if (display || list == 0)
@@ -119,13 +122,22 @@ trap_builtin (list)
operation = SET;
first_arg = list->word->word;
- if (first_arg && *first_arg && (*first_arg != '-' || first_arg[1]) &&
- signal_object_p (first_arg))
+ /* 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 (*first_arg == '\0')
+ if (list == 0)
+ {
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ else if (*first_arg == '\0')
operation = IGNORE;
else if (first_arg[0] == '-' && !first_arg[1])
operation = REVERT;
@@ -133,7 +145,7 @@ trap_builtin (list)
while (list)
{
- sig = decode_signal (list->word->word);
+ sig = decode_signal (list->word->word, opt);
if (sig == NO_SIG)
{
@@ -235,7 +247,7 @@ display_traps (list)
for (result = EXECUTION_SUCCESS; list; list = list->next)
{
- i = decode_signal (list->word->word);
+ i = decode_signal (list->word->word, DSIG_NOCASE|DSIG_SIGPREFIX);
if (i == NO_SIG)
{
sh_invalidsig (list->word->word);
diff --git a/builtins/type.def b/builtins/type.def
index 2d9d2a56..7abcedf2 100644
--- a/builtins/type.def
+++ b/builtins/type.def
@@ -58,6 +58,7 @@ $END
#include <stdio.h>
#include "../bashansi.h"
+#include "../bashintl.h"
#include "../shell.h"
#include "../findcmd.h"
@@ -73,6 +74,7 @@ $END
extern int find_reserved_word __P((char *));
extern char *this_command_name;
+extern int expand_aliases;
/* For each word in LIST, find out what the shell is going to do with
it as a simple command. i.e., which file would this shell use to
@@ -221,12 +223,12 @@ describe_command (command, dflags)
#if defined (ALIAS)
/* Command is an alias? */
- if (((dflags & CDESC_FORCE_PATH) == 0) && (alias = find_alias (command)))
+ 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);
+ printf (_("%s is aliased to `%s'\n"), command, alias->value);
else if (dflags & CDESC_REUSABLE)
{
x = sh_single_quote (alias->value);
@@ -247,7 +249,7 @@ describe_command (command, dflags)
if (dflags & CDESC_TYPE)
puts ("keyword");
else if (dflags & CDESC_SHORTDESC)
- printf ("%s is a shell keyword\n", command);
+ printf (_("%s is a shell keyword\n"), command);
else if (dflags & CDESC_REUSABLE)
printf ("%s\n", command);
@@ -267,7 +269,7 @@ describe_command (command, dflags)
#define PRETTY_PRINT_FUNC 1
char *result;
- printf ("%s is a function\n", command);
+ printf (_("%s is a function\n"), command);
/* We're blowing away THE_PRINTED_COMMAND here... */
@@ -292,7 +294,7 @@ describe_command (command, dflags)
if (dflags & CDESC_TYPE)
puts ("builtin");
else if (dflags & CDESC_SHORTDESC)
- printf ("%s is a shell builtin\n", command);
+ printf (_("%s is a shell builtin\n"), command);
else if (dflags & CDESC_REUSABLE)
printf ("%s\n", command);
@@ -313,7 +315,7 @@ describe_command (command, dflags)
if (dflags & CDESC_TYPE)
puts ("file");
else if (dflags & CDESC_SHORTDESC)
- printf ("%s is %s\n", command, command);
+ printf (_("%s is %s\n"), command, command);
else if (dflags & (CDESC_REUSABLE|CDESC_PATH_ONLY))
printf ("%s\n", command);
@@ -333,7 +335,7 @@ describe_command (command, dflags)
if (dflags & CDESC_TYPE)
puts ("file");
else if (dflags & CDESC_SHORTDESC)
- printf ("%s is hashed (%s)\n", command, full_path);
+ printf (_("%s is hashed (%s)\n"), command, full_path);
else if (dflags & (CDESC_REUSABLE|CDESC_PATH_ONLY))
printf ("%s\n", full_path);
diff --git a/builtins/ulimit.def b/builtins/ulimit.def
index 3e147b4f..932a6ea4 100644
--- a/builtins/ulimit.def
+++ b/builtins/ulimit.def
@@ -1,7 +1,7 @@
This file is ulimit.def, from which is created ulimit.c.
It implements the builtin "ulimit" in Bash.
-Copyright (C) 1987-2002 Free Software Foundation, Inc.
+Copyright (C) 1987-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -70,6 +70,8 @@ $END
#include <stdio.h>
#include <errno.h>
+#include "../bashintl.h"
+
#include "../shell.h"
#include "common.h"
#include "bashgetopt.h"
@@ -327,7 +329,7 @@ ulimit_builtin (list)
{
if (STREQ (list->word->word, "unlimited") == 0)
{
- builtin_error ("%s: invalid limit argument", list->word->word);
+ builtin_error (_("%s: invalid limit argument"), list->word->word);
return (EXECUTION_FAILURE);
}
return (set_all_limits (mode == 0 ? LIMIT_SOFT|LIMIT_HARD : mode, RLIM_INFINITY));
@@ -353,7 +355,7 @@ ulimit_builtin (list)
limind = _findlim (cmdlist[c].cmd);
if (limind == -1)
{
- builtin_error ("`%c': bad command", cmdlist[c].cmd);
+ builtin_error (_("`%c': bad command"), cmdlist[c].cmd);
return (EX_USAGE);
}
}
@@ -382,7 +384,7 @@ ulimit_internal (cmd, cmdarg, mode, multiple)
opt = get_limit (limind, &soft_limit, &hard_limit);
if (opt < 0)
{
- builtin_error ("%s: cannot get limit: %s", limits[limind].description,
+ builtin_error (_("%s: cannot get limit: %s"), limits[limind].description,
strerror (errno));
return (EXECUTION_FAILURE);
}
@@ -420,7 +422,7 @@ ulimit_internal (cmd, cmdarg, mode, multiple)
if (set_limit (limind, real_limit, mode) < 0)
{
- builtin_error ("%s: cannot modify limit: %s", limits[limind].description,
+ builtin_error (_("%s: cannot modify limit: %s"), limits[limind].description,
strerror (errno));
return (EXECUTION_FAILURE);
}
diff --git a/builtins/umask.def b/builtins/umask.def
index 19a0ac0d..489ca330 100644
--- a/builtins/umask.def
+++ b/builtins/umask.def
@@ -1,7 +1,7 @@
This file is umask.def, from which is created umask.c.
It implements the builtin "umask" in Bash.
-Copyright (C) 1987-2002 Free Software Foundation, Inc.
+Copyright (C) 1987-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -37,7 +37,7 @@ $END
#include "../bashtypes.h"
#include "filecntl.h"
-#ifndef _MINIX
+#if ! defined(_MINIX) && defined (HAVE_SYS_FILE_H)
# include <sys/file.h>
#endif
@@ -48,6 +48,8 @@ $END
#include <stdio.h>
#include <chartypes.h>
+#include "../bashintl.h"
+
#include "../shell.h"
#include "posixstat.h"
#include "common.h"
@@ -107,7 +109,7 @@ umask_builtin (list)
is lousy. */
if (umask_value == -1)
{
- sh_erange (list->word->word, "octal number");
+ sh_erange (list->word->word, _("octal number"));
return (EXECUTION_FAILURE);
}
}
@@ -221,7 +223,7 @@ parse_symbolic_mode (mode, initial_bits)
case '=':
break;
default:
- builtin_error ("`%c': invalid symbolic mode operator", op);
+ builtin_error (_("`%c': invalid symbolic mode operator"), op);
return (-1);
}
@@ -260,6 +262,8 @@ parse_symbolic_mode (mode, initial_bits)
bits &= ~perm;
break;
case '=':
+ if (who == 0)
+ who = S_IRWXU | S_IRWXG | S_IRWXO;
bits &= ~who;
bits |= perm;
break;
@@ -274,7 +278,7 @@ parse_symbolic_mode (mode, initial_bits)
}
else
{
- builtin_error ("`%c': invalid symbolic mode character", *s);
+ builtin_error (_("`%c': invalid symbolic mode character"), *s);
return (-1);
}
}
@@ -298,7 +302,7 @@ symbolic_umask (list)
/* All work is done with the complement of the umask -- it's
more intuitive and easier to deal with. It is complemented
again before being returned. */
- bits = parse_symbolic_mode (list->word->word, ~um);
+ bits = parse_symbolic_mode (list->word->word, ~um & 0777);
if (bits == -1)
return (-1);
diff --git a/builtins/wait.def b/builtins/wait.def
index 23c8b19f..9eb66f60 100644
--- a/builtins/wait.def
+++ b/builtins/wait.def
@@ -1,7 +1,7 @@
This file is wait.def, from which is created wait.c.
It implements the builtin "wait" in Bash.
-Copyright (C) 1987-2002 Free Software Foundation, Inc.
+Copyright (C) 1987-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -141,7 +141,7 @@ wait_builtin (list)
}
}
#if defined (JOB_CONTROL)
- else if (job_control && *w)
+ else if (*w && *w == '%')
/* Must be a job spec. Check it out. */
{
int job;
@@ -164,12 +164,6 @@ wait_builtin (list)
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 */
else
{
diff --git a/command.h b/command.h
index e72b3eed..0e1375dc 100644
--- a/command.h
+++ b/command.h
@@ -67,14 +67,17 @@ enum command_type { cm_for, cm_case, cm_while, cm_if, cm_simple, cm_select,
cm_arith, cm_cond, cm_arith_for, cm_subshell };
/* 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 */
+#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 */
#define SUBSHELL_ASYNC 0x01 /* subshell caused by `command &' */
@@ -195,6 +198,7 @@ typedef struct pattern_list {
/* The CASE command. */
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. */
} CASE_COM;
@@ -202,6 +206,7 @@ typedef struct case_com {
/* FOR command. */
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. */
COMMAND *action; /* The action to execute.
@@ -224,6 +229,7 @@ typedef struct arith_for_com {
/* KSH SELECT command. */
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. */
COMMAND *action; /* The action to execute.
@@ -253,8 +259,8 @@ typedef struct while_com {
time being. */
typedef struct arith_com {
int flags;
- WORD_LIST *exp;
int line;
+ WORD_LIST *exp;
} ARITH_COM;
#endif /* DPAREN_ARITHMETIC */
@@ -278,18 +284,19 @@ typedef struct cond_com {
/* The "simple" command. Just a collection of words and redirects. */
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. */
- int line; /* line number the command starts on */
} SIMPLE_COM;
/* The "function definition" command. */
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. */
- int line; /* Line number the function def starts on. */
+ char *source_file; /* file in which function was defined, if any */
} FUNCTION_DEF;
/* A command that is `grouped' allows pipes and redirections to affect all
@@ -316,6 +323,9 @@ extern COMMAND *global_command;
/* 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 *));
extern WORD_LIST *copy_word_list __P((WORD_LIST *));
extern REDIRECT *copy_redirect __P((REDIRECT *));
diff --git a/config-bot.h b/config-bot.h
index 76732998..18946872 100644
--- a/config-bot.h
+++ b/config-bot.h
@@ -19,11 +19,51 @@
with Bash; see the file COPYING. If not, write to the Free Software
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
# define HAVE_VPRINTF
#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 */
#if !defined (HAVE_TERMIOS_H) || !defined (HAVE_TCGETATTR) || defined (ultrix)
@@ -36,16 +76,20 @@
# undef HAVE_GETCWD
#endif
-#if defined (HAVE_SYS_RESOURCE_H) && defined (HAVE_GETRLIMIT)
-# define HAVE_RESOURCE
+#if !defined (HAVE_DEV_FD) && defined (NAMED_PIPES_MISSING)
+# undef PROCESS_SUBSTITUTION
#endif
-#if !defined (GETPGRP_VOID)
-# define HAVE_BSD_PGRP
+#if defined (JOB_CONTROL_MISSING)
+# undef JOB_CONTROL
#endif
-#if !defined (HAVE_DEV_FD) && defined (NAMED_PIPES_MISSING)
-# undef PROCESS_SUBSTITUTION
+#if defined (STRCOLL_BROKEN)
+# undef HAVE_STRCOLL
+#endif
+
+#if !defined (HAVE_POSIX_REGEXP)
+# undef COND_REGEXP
#endif
/* If the shell is called by this name, it will become restricted. */
@@ -53,6 +97,10 @@
# define RESTRICTED_SHELL_NAME "rbash"
#endif
+/***********************************************************/
+/* Make sure feature defines have necessary prerequisites. */
+/***********************************************************/
+
/* BANG_HISTORY requires HISTORY. */
#if defined (BANG_HISTORY) && !defined (HISTORY)
# define HISTORY
@@ -70,28 +118,6 @@
# undef DEFAULT_ECHO_TO_XPG
#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
# define PPROMPT "$ "
@@ -107,11 +133,18 @@
#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H)
# include <wchar.h>
# include <wctype.h>
-# if defined (HAVE_MBSRTOWCS) /* system is supposed to support XPG5 */
+# 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)
# define wcsrtombs(dest, src, len, ps) (wcsrtombs) (dest, src, len, 0)
@@ -137,3 +170,12 @@
/************************************************/
/* 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 --git a/config-top.h b/config-top.h
index b2bcffab..c094fc59 100644
--- a/config-top.h
+++ b/config-top.h
@@ -52,14 +52,14 @@
/* The default value of the PATH variable. */
#ifndef DEFAULT_PATH_VALUE
#define DEFAULT_PATH_VALUE \
- "/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin:."
+ "/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:."
#endif
/* The value for PATH when invoking `command -p'. This is only used when
the Posix.2 confstr () function, or CS_PATH define are not present. */
#ifndef STANDARD_UTILS_PATH
#define STANDARD_UTILS_PATH \
- "/bin:/usr/bin:/usr/ucb:/sbin:/usr/sbin:/etc:/usr/etc"
+ "/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc"
#endif
/* Default primary and secondary prompt strings. */
diff --git a/config.h.in b/config.h.in
index ff28c0d1..753b18a8 100644
--- a/config.h.in
+++ b/config.h.in
@@ -1,6 +1,6 @@
/* config.h -- Configuration file for bash. */
-/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -119,6 +119,10 @@
command. */
#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
arithmetic for command. */
@@ -132,6 +136,14 @@
and the complete builtin. */
#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(). */
#undef MEMSCRAMBLE
@@ -139,6 +151,8 @@
/* Define AFS if you are using Transarc's AFS. */
#undef AFS
+#undef ENABLE_NLS
+
/* End of configuration settings controllable by autoconf. */
/* Other settable options appear in config-top.h. */
@@ -314,6 +328,7 @@
libraries. */
/* Define if `sys_siglist' is declared by <signal.h> or <unistd.h>. */
+#undef HAVE_DECL_SYS_SIGLIST
#undef SYS_SIGLIST_DECLARED
/* Define if `_sys_siglist' is declared by <signal.h> or <unistd.h>. */
@@ -325,16 +340,16 @@
#undef HAVE_SYS_ERRLIST
-#undef HAVE_TIMEVAL
-
#undef HAVE_TZNAME
/* Characteristics of some of the system structures. */
-#undef STRUCT_DIRENT_HAS_D_INO
+#undef HAVE_STRUCT_DIRENT_D_INO
-#undef STRUCT_DIRENT_HAS_D_FILENO
+#undef HAVE_STRUCT_DIRENT_D_FILENO
+
+#undef HAVE_STRUCT_DIRENT_D_NAMLEN
#undef TIOCSTAT_IN_SYS_IOCTL
@@ -359,6 +374,10 @@
#undef HAVE_STRUCT_TM_TM_ZONE
#undef HAVE_TM_ZONE
+#undef HAVE_TIMEVAL
+
+#undef HAVE_STRUCT_TIMEZONE
+
/* Characteristics of definitions in the system header files. */
#undef HAVE_GETPW_DECLS
@@ -380,6 +399,7 @@
#undef HAVE_DECL_STRTOLD
+#undef STRTOLD_BROKEN
#undef HAVE_MBSTATE_T
@@ -420,6 +440,8 @@
#undef HAVE_PRINTF_A_FORMAT
+#undef CTYPE_NON_ASCII
+
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
#undef HAVE_LANGINFO_CODESET
@@ -465,9 +487,6 @@
/* Define if you have the bcopy function. */
#undef HAVE_BCOPY
-/* Define if you have the bindtextdomain function. */
-#undef HAVE_BINDTEXTDOMAIN
-
/* Define if you have the bzero function. */
#undef HAVE_BZERO
@@ -525,9 +544,6 @@
/* Define if you have the getservent function. */
#undef HAVE_GETSERVENT
-/* Define if you have the gettext function. */
-#undef HAVE_GETTEXT
-
/* Define if you have the gettimeofday function. */
#undef HAVE_GETTIMEOFDAY
@@ -564,6 +580,12 @@
/* Define if you have the lstat function. */
#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
@@ -585,6 +607,12 @@
/* Define if you have the readlink function. */
#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
@@ -639,6 +667,9 @@
/* Define if you have the strpbrk function. */
#undef HAVE_STRPBRK
+/* Define if you have the strstr function. */
+#undef HAVE_STRSTR
+
/* Define if you have the strtod function. */
#undef HAVE_STRTOD
@@ -672,9 +703,6 @@
/* Define if you have the tcgetpgrp function. */
#undef HAVE_TCGETPGRP
-/* Define if you have the textdomain function. */
-#undef HAVE_TEXTDOMAIN
-
/* Define if you have the times function. */
#undef HAVE_TIMES
@@ -708,6 +736,12 @@
/* Define if you have the wait3 function. */
#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
@@ -749,6 +783,9 @@
/* Define if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H
+/* Define if you have the <regex.h> header file. */
+#undef HAVE_REGEX_H
+
/* Define if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
@@ -797,6 +834,9 @@
/* Define if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
+/* Define if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
/* Define if you have the <sys/stream.h> header file. */
#undef HAVE_SYS_STREAM_H
@@ -808,6 +848,9 @@
/* Define if you have <sys/times.h> */
#undef HAVE_SYS_TIMES_H
+/* Define if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
#undef HAVE_SYS_WAIT_H
@@ -873,6 +916,61 @@
#undef GETCWD_BROKEN
+/* Additional defines for configuring lib/intl, maintained by autoscan/autoheader */
+
+/* Define if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
+
+/* Define if you have the <errno.h> header file. */
+#undef HAVE_ERRNO_H
+
+/* Define if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define if you have the <stdio_ext.h> 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"
#endif /* _CONFIG_H_ */
diff --git a/configure b/configure
index 58b0a7fb..77b11206 100755
--- a/configure
+++ b/configure
@@ -1,15 +1,84 @@
#! /bin/sh
-# From configure.in for Bash 2.05b, version 2.144, from autoconf version 2.52.
+# 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 Autoconf 2.52 for bash 2.05b.
+# Generated by GNU Autoconf 2.57 for bash 3.0-release.
#
# Report bugs to <bug-bash@gnu.org>.
#
-# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+# 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'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@@ -17,22 +86,113 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
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"
+# 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
-# 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
+ 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
-# Name of the executable.
-as_me=`echo "$0" |sed 's,.*[\\/],,'`
+ ;;
+ 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
as_expr=expr
@@ -58,24 +218,20 @@ else
fi
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
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
else
- as_unset=false
+ as_mkdir_p=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; }
+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
# We need space, tab and new line, in precisely that order.
@@ -84,7 +240,8 @@ as_nl='
IFS=" $as_nl"
# CDPATH.
-$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
+$as_unset CDPATH
+
# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
@@ -97,9 +254,11 @@ exec 6>&1
# Initializations.
#
ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
cross_compiling=no
subdirs=
-MFLAGS= MAKEFLAGS=
+MFLAGS=
+MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
@@ -107,6 +266,13 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# only ac_max_sed_lines should be used.
: ${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.
ac_includes_default="\
@@ -145,6 +311,9 @@ ac_includes_default="\
# include <unistd.h>
#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=
ac_init_version=false
@@ -183,13 +352,6 @@ oldincludedir='/usr/include'
infodir='${prefix}/info'
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
do
@@ -322,7 +484,7 @@ do
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
+ | --no-cr | --no-c | -n)
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
@@ -501,7 +663,7 @@ do
eval ac_val=$`echo $ac_var`
case $ac_val in
[\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
{ (exit 1); exit 1; }; };;
esac
done
@@ -513,18 +675,19 @@ do
eval ac_val=$`echo $ac_var`
case $ac_val in
[\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
{ (exit 1); exit 1; }; };;
esac
done
# There might be people who depend on the old broken behavior: `$host'
# used to hold the argument of --host etc.
+# FIXME: To remove some day.
build=$build_alias
host=$host_alias
target=$target_alias
-# FIXME: should be removed in autoconf 3.0.
+# FIXME: To remove some day.
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
@@ -540,13 +703,23 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias-
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=.
+ 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
srcdir=..
@@ -556,13 +729,16 @@ else
fi
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
+ { 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 in $srcdir" >&2
+ { 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}
ac_env_build_alias_value=$build_alias
@@ -576,6 +752,10 @@ ac_env_target_alias_set=${target_alias+set}
ac_env_target_alias_value=$target_alias
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
ac_cv_env_CC_set=${CC+set}
@@ -603,8 +783,8 @@ ac_cv_env_CPP_value=$CPP
if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
- cat <<EOF
-\`configure' configures bash 2.05b to adapt to many kinds of systems.
+ cat <<_ACEOF
+\`configure' configures bash 3.0-release to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -624,9 +804,9 @@ Configuration:
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or \`..']
-EOF
+_ACEOF
- cat <<EOF
+ cat <<_ACEOF
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[$ac_default_prefix]
@@ -653,21 +833,21 @@ Fine tuning of the installation directories:
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--infodir=DIR info documentation [PREFIX/info]
--mandir=DIR man documentation [PREFIX/man]
-EOF
+_ACEOF
- cat <<\EOF
+ cat <<\_ACEOF
System types:
--build=BUILD configure for building on BUILD [guessed]
- --host=HOST build programs to run on HOST [BUILD]
-EOF
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of bash 2.05b:";;
+ short | recursive ) echo "Configuration of bash 3.0-release:";;
esac
- cat <<\EOF
+ cat <<\_ACEOF
Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
@@ -683,6 +863,9 @@ Optional Features:
include brace expansion
--enable-command-timing enable the time reserved word and command timing
--enable-cond-command enable the conditional command
+ --enable-cond-regexp enable extgended regular expression matching in
+ conditional commands
+ --enable-debugger enable support for bash debugger
--enable-directory-stack
enable builtins pushd/popd/dirs
--enable-disabled-builtins
@@ -693,6 +876,7 @@ Optional Features:
--enable-help-builtin include the help builtin
--enable-history turn on command history
--enable-job-control enable job control features
+ --enable-multibyte enable multibyte characters if OS supports them
--enable-net-redirections
enable /dev/tcp/host/port redirection
--enable-process-substitution
@@ -715,10 +899,13 @@ Optional Features:
--enable-profiling allow profiling with gprof
--enable-static-link link bash statically, for use as a root shell
--disable-largefile omit support for large files
+ --disable-nls do not use Native Language Support
+ --disable-rpath do not hardcode runtime library paths
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-lispdir override the default lisp directory
--with-afs if you are running AFS
--with-bash-malloc use the Bash version of malloc
--with-curses use the curses library instead of the termcap
@@ -729,8 +916,16 @@ Optional Packages:
already installed
--with-purecov configure to postprocess with pure coverage
--with-purify configure to postprocess with purify
+ --with-gnu-ld assume the C compiler uses GNU ld default=no
+ --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
+ --without-libiconv-prefix don't search for libiconv in includedir and libdir
+ --with-included-gettext use the GNU gettext library included here
+ --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
+ --without-libintl-prefix don't search for libintl in includedir and libdir
Some influential environment variables:
+ DEBUGGER_START_FILE
+ location of bash debugger initialization file
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
@@ -743,40 +938,60 @@ Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to <bug-bash@gnu.org>.
-EOF
+_ACEOF
fi
if test "$ac_init_help" = "recursive"; then
# 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
+ 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_sub_srcdir/configure.gnu; then
+ if test -f $ac_srcdir/configure.gnu; then
echo
- $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
- elif test -f $ac_sub_srcdir/configure; then
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_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
+ $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_subdir" >&2
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi
cd $ac_popdir
done
@@ -784,33 +999,33 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
- cat <<\EOF
-bash configure 2.05b
-generated by GNU Autoconf 2.52
+ cat <<\_ACEOF
+bash configure 3.0-release
+generated by GNU Autoconf 2.57
-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+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.
-EOF
+_ACEOF
exit 0
fi
exec 5>config.log
-cat >&5 <<EOF
+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 2.05b, which was
-generated by GNU Autoconf 2.52. Invocation command line was
+It was created by bash $as_me 3.0-release, which was
+generated by GNU Autoconf 2.57. Invocation command line was
$ $0 $@
-EOF
+_ACEOF
{
cat <<_ASUNAME
-## ---------- ##
-## Platform. ##
-## ---------- ##
+## --------- ##
+## Platform. ##
+## --------- ##
hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
uname -m = `(uname -m) 2>/dev/null || echo unknown`
@@ -829,51 +1044,96 @@ hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-PATH = $PATH
-
_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 <<EOF
-## ------------ ##
-## Core tests. ##
-## ------------ ##
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
-EOF
# 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=
-for ac_arg
+ac_must_keep_next=false
+for ac_pass in 1 2
do
- case $ac_arg in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_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.
+ 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 >&5
- echo "## ----------------- ##" >&5
- echo "## Cache variables. ##" >&5
- echo "## ----------------- ##" >&5
- echo >&5
- # The following way of writing the cache mishandles newlines in values,
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
{
(set) 2>&1 |
case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
@@ -887,21 +1147,53 @@ trap 'exit_status=$?
"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
;;
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 &&
+}
+ 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
for ac_signal in 1 2 13 15; do
@@ -914,6 +1206,33 @@ rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
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.
if test -z "$CONFIG_SITE"; then
@@ -925,9 +1244,9 @@ if test -z "$CONFIG_SITE"; then
fi
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:$LINENO: loading site script $ac_site_file" >&5
echo "$as_me: loading site script $ac_site_file" >&6;}
- cat "$ac_site_file" >&5
+ sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file"
fi
done
@@ -936,7 +1255,7 @@ if test -r "$cache_file"; then
# Some versions of bash will fail to source /dev/null (special
# files actually), so we avoid doing that.
if test -f "$cache_file"; then
- { echo "$as_me:939: loading cache $cache_file" >&5
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . $cache_file;;
@@ -944,7 +1263,7 @@ echo "$as_me: loading cache $cache_file" >&6;}
esac
fi
else
- { echo "$as_me:947: creating cache $cache_file" >&5
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
@@ -960,42 +1279,42 @@ for ac_var in `(set) 2>&1 |
eval ac_new_val="\$ac_env_${ac_var}_value"
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:$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:967: error: \`$ac_var' was not set in the previous run" >&5
+ { 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=: ;;
,);;
*)
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:$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:975: former value: $ac_old_val" >&5
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:977: current value: $ac_new_val" >&5
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
echo "$as_me: current value: $ac_new_val" >&2;}
ac_cache_corrupted=:
fi;;
esac
- # Pass precious variables to config.status. It doesn't matter if
- # we pass some twice (in addition to the command line arguments).
+ # 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_configure_args="$ac_configure_args '$ac_arg'"
- ;;
- *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
- ;;
+ 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:996: error: changes in the environment can compromise the build" >&5
+ { 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:998: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+ { { 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; }; }
fi
@@ -1006,26 +1325,35 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-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=
for ac_dir in ./support $srcdir/./support; do
@@ -1044,7 +1372,7 @@ for ac_dir in ./support $srcdir/./support; do
fi
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:$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; }; }
fi
@@ -1052,9 +1380,10 @@ ac_config_guess="$SHELL $ac_aux_dir/config.guess"
ac_config_sub="$SHELL $ac_aux_dir/config.sub"
ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
-ac_config_headers="$ac_config_headers config.h"
+ ac_config_headers="$ac_config_headers config.h"
-BASHVERS=2.05b
+
+BASHVERS=3.0
RELSTATUS=release
case "$RELSTATUS" in
@@ -1064,11 +1393,11 @@ esac
# 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:$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:1071: checking build system type" >&5
+echo "$as_me:$LINENO: checking build system type" >&5
echo $ECHO_N "checking build system type... $ECHO_C" >&6
if test "${ac_cv_build+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1077,23 +1406,24 @@ else
test -z "$ac_cv_build_alias" &&
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:$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:1084: error: $ac_config_sub $ac_cv_build_alias failed." >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
+ { { 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:1089: result: $ac_cv_build" >&5
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
echo "${ECHO_T}$ac_cv_build" >&6
build=$ac_cv_build
build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$as_me:1096: checking host system type" >&5
+
+echo "$as_me:$LINENO: checking host system type" >&5
echo $ECHO_N "checking host system type... $ECHO_C" >&6
if test "${ac_cv_host+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1102,18 +1432,20 @@ else
test -z "$ac_cv_host_alias" &&
ac_cv_host_alias=$ac_cv_build_alias
ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
- { { echo "$as_me:1105: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+ { { 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:1110: result: $ac_cv_host" >&5
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
echo "${ECHO_T}$ac_cv_host" >&6
host=$ac_cv_host
host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
opt_bash_malloc=yes
opt_purify=no
opt_purecov=no
@@ -1132,6 +1464,7 @@ sparc-netbsd*) opt_bash_malloc=no ;; # needs 8-byte alignment
mips-irix6*) opt_bash_malloc=no ;; # needs 8-byte alignment
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
*-aix*) opt_bash_malloc=no ;; # AIX machines
@@ -1154,6 +1487,86 @@ sco3.2v5*|sco3.2v4*) opt_memscramble=no ;;
*) opt_memscramble=yes ;;
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
withval="$with_afs"
@@ -1205,9 +1618,9 @@ if test "$opt_bash_malloc" = yes; then
MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)'
MALLOC_DEP='$(MALLOC_LIBRARY)'
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define USING_BASH_MALLOC 1
-EOF
+_ACEOF
else
MALLOC_LIB=
@@ -1218,9 +1631,9 @@ fi
if test "$opt_purify" = yes; then
PURIFY="purify "
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define DISABLE_MALLOC_WRAPPERS 1
-EOF
+_ACEOF
else
PURIFY=
@@ -1231,9 +1644,9 @@ if test "$opt_purecov" = yes; then
fi
if test "$opt_afs" = yes; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define AFS 1
-EOF
+_ACEOF
fi
@@ -1241,6 +1654,10 @@ if test "$opt_curses" = yes; then
prefer_curses=yes
fi
+if test -z "${DEBUGGER_START_FILE}"; then
+ DEBUGGER_START_FILE=${ac_default_prefix}/lib/bashdb/bashdb-main.inc
+fi
+
opt_minimal_config=no
opt_job_control=yes
@@ -1262,10 +1679,13 @@ opt_disabled_builtins=no
opt_command_timing=yes
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
opt_profiling=no
@@ -1284,6 +1704,7 @@ if test $opt_minimal_config = yes; then
opt_brace_expansion=no opt_disabled_builtins=no opt_command_timing=no
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
# Check whether --enable-alias or --disable-alias was given.
@@ -1321,6 +1742,16 @@ if test "${enable_cond_command+set}" = set; then
enableval="$enable_cond_command"
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
enableval="$enable_directory_stack"
@@ -1356,6 +1787,11 @@ if test "${enable_job_control+set}" = set; then
enableval="$enable_job_control"
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
enableval="$enable_net_redirections"
@@ -1423,119 +1859,139 @@ if test "${enable_static_link+set}" = set; then
opt_static_link=$enableval
fi;
+
+
if test $opt_alias = yes; then
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define ALIAS 1
-EOF
+_ACEOF
fi
if test $opt_dirstack = yes; then
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define PUSHD_AND_POPD 1
-EOF
+_ACEOF
fi
if test $opt_restricted = yes; then
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define RESTRICTED_SHELL 1
-EOF
+_ACEOF
fi
if test $opt_process_subst = yes; then
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define PROCESS_SUBSTITUTION 1
-EOF
+_ACEOF
fi
if test $opt_prompt_decoding = yes; then
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define PROMPT_STRING_DECODE 1
-EOF
+_ACEOF
fi
if test $opt_select = yes; then
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define SELECT_COMMAND 1
-EOF
+_ACEOF
fi
if test $opt_help = yes; then
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HELP_BUILTIN 1
-EOF
+_ACEOF
fi
if test $opt_array_variables = yes; then
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define ARRAY_VARS 1
-EOF
+_ACEOF
fi
if test $opt_dparen_arith = yes; then
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define DPAREN_ARITHMETIC 1
-EOF
+_ACEOF
fi
if test $opt_brace_expansion = yes; then
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define BRACE_EXPANSION 1
-EOF
+_ACEOF
fi
if test $opt_disabled_builtins = yes; then
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define DISABLED_BUILTINS 1
-EOF
+_ACEOF
fi
if test $opt_command_timing = yes; then
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define COMMAND_TIMING 1
-EOF
+_ACEOF
fi
if test $opt_xpg_echo = yes ; then
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define DEFAULT_ECHO_TO_XPG 1
-EOF
+_ACEOF
fi
if test $opt_extended_glob = yes ; then
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define EXTENDED_GLOB 1
-EOF
+_ACEOF
fi
if test $opt_cond_command = yes ; then
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define COND_COMMAND 1
-EOF
+_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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define ARITH_FOR_COMMAND 1
-EOF
+_ACEOF
fi
if test $opt_net_redirs = yes; then
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define NETWORK_REDIRECTIONS 1
-EOF
+_ACEOF
fi
if test $opt_progcomp = yes; then
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define PROGRAMMABLE_COMPLETION 1
-EOF
+_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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define MEMSCRAMBLE 1
-EOF
+_ACEOF
fi
@@ -1556,6 +2012,22 @@ if test "$opt_separate_help" != no; then
HELPINSTALL='install-help'
fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
echo ""
echo "Beginning configuration for bash-$BASHVERS-$RELSTATUS for ${host_cpu}-${host_vendor}-${host_os}"
echo ""
@@ -1568,7 +2040,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:1571: checking for $ac_word" >&5
+echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1576,25 +2048,28 @@ else
if test -n "$CC"; then
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
+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
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:1594: result: $CC" >&5
+ echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
- echo "$as_me:1597: result: no" >&5
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1603,7 +2078,7 @@ if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-echo "$as_me:1606: checking for $ac_word" >&5
+echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1611,25 +2086,28 @@ else
if test -n "$ac_ct_CC"; then
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
+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
fi
fi
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 "$as_me:$LINENO: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
- echo "$as_me:1632: result: no" >&5
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1642,7 +2120,7 @@ if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:1645: checking for $ac_word" >&5
+echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1650,25 +2128,28 @@ else
if test -n "$CC"; then
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
+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
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:1668: result: $CC" >&5
+ echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
- echo "$as_me:1671: result: no" >&5
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1677,7 +2158,7 @@ if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-echo "$as_me:1680: checking for $ac_word" >&5
+echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1685,25 +2166,28 @@ else
if test -n "$ac_ct_CC"; then
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
+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
fi
fi
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 "$as_me:$LINENO: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
- echo "$as_me:1706: result: no" >&5
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1716,7 +2200,7 @@ fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-echo "$as_me:1719: checking for $ac_word" >&5
+echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1725,19 +2209,22 @@ else
ac_cv_prog_CC="$CC" # Let the user override the test.
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
+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
if test $ac_prog_rejected = yes; then
@@ -1749,19 +2236,17 @@ if test $ac_prog_rejected = yes; then
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
- set dummy "$ac_dir/$ac_word" ${1+"$@"}
- shift
- ac_cv_prog_CC="$@"
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:1761: result: $CC" >&5
+ echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
- echo "$as_me:1764: result: no" >&5
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1772,7 +2257,7 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:1775: checking for $ac_word" >&5
+echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1780,25 +2265,28 @@ else
if test -n "$CC"; then
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
+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
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:1798: result: $CC" >&5
+ echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
- echo "$as_me:1801: result: no" >&5
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1811,7 +2299,7 @@ if test -z "$CC"; then
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:1814: checking for $ac_word" >&5
+echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1819,25 +2307,28 @@ else
if test -n "$ac_ct_CC"; then
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
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
done
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- echo "$as_me:1837: result: $ac_ct_CC" >&5
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
- echo "$as_me:1840: result: no" >&5
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1849,33 +2340,40 @@ fi
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;}
+
+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:1857:" \
+echo "$as_me:$LINENO:" \
"checking for C compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:1860: \"$ac_compiler --version </dev/null >&5\"") >&5
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
(eval $ac_compiler --version </dev/null >&5) 2>&5
ac_status=$?
- echo "$as_me:1863: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
-{ (eval echo "$as_me:1865: \"$ac_compiler -v </dev/null >&5\"") >&5
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
(eval $ac_compiler -v </dev/null >&5) 2>&5
ac_status=$?
- echo "$as_me:1868: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
-{ (eval echo "$as_me:1870: \"$ac_compiler -V </dev/null >&5\"") >&5
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
(eval $ac_compiler -V </dev/null >&5) 2>&5
ac_status=$?
- echo "$as_me:1873: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
cat >conftest.$ac_ext <<_ACEOF
-#line 1877 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -1886,100 +2384,120 @@ main ()
}
_ACEOF
ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe"
+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:1893: checking for C compiler default output" >&5
+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:1896: \"$ac_link_default\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
(eval $ac_link_default) 2>&5
ac_status=$?
- echo "$as_me:1899: \$? = $ac_status" >&5
+ 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.
-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
+
+# 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 | *.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;;
+ *.$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
-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;}
+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:1928: result: $ac_file" >&5
+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:1933: checking whether the C compiler works" >&5
+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
# If not cross compiling, check that we can run a simple program.
if test "$cross_compiling" != yes; then
if { ac_try='./$ac_file'
- { (eval echo "$as_me:1939: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1942: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cross_compiling=no
else
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
- { { echo "$as_me:1949: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'." >&5
+ { { 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'." >&2;}
+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:1957: result: yes" >&5
+echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
-rm -f a.out a.exe conftest$ac_cv_exeext
+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:1964: checking whether we are cross compiling" >&5
+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:1966: result: $cross_compiling" >&5
+echo "$as_me:$LINENO: 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
+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:1974: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
# `rm'.
-for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
export ac_cv_exeext
break;;
@@ -1987,26 +2505,32 @@ for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
esac
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;}
+ { { 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:1996: result: $ac_cv_exeext" >&5
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
echo "${ECHO_T}$ac_cv_exeext" >&6
rm -f conftest.$ac_ext
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
+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 2008 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -2017,40 +2541,47 @@ main ()
}
_ACEOF
rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:2020: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2023: \$? = $ac_status" >&5
+ 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 ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
*) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
break;;
esac
done
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;}
+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
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
-echo "$as_me:2042: result: $ac_cv_objext" >&5
+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:2046: checking whether we are using the GNU C compiler" >&5
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
if test "${ac_cv_c_compiler_gnu+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 2052 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -2064,41 +2595,46 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2067: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2070: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2073: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2076: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_compiler_gnu=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_compiler_gnu=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-echo "$as_me:2088: result: $ac_cv_c_compiler_gnu" >&5
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
GCC=`test $ac_compiler_gnu = yes && echo yes`
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
CFLAGS="-g"
-echo "$as_me:2094: checking whether $CC accepts -g" >&5
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_cc_g+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 2100 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -2109,26 +2645,27 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2112: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2115: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2118: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2121: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:2131: result: $ac_cv_prog_cc_g" >&5
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
@@ -2145,6 +2682,102 @@ else
CFLAGS=
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 <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* 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
# for both compiling C and C++ we need to have the C++ compiler decide
@@ -2155,16 +2788,16 @@ cat >conftest.$ac_ext <<_ACEOF
#endif
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2158: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2161: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2164: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2167: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
for ac_declaration in \
''\
@@ -2176,8 +2809,12 @@ if { (eval echo "$as_me:2158: \"$ac_compile\"") >&5
'void exit (int);'
do
cat >conftest.$ac_ext <<_ACEOF
-#line 2179 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
$ac_declaration
int
@@ -2189,27 +2826,32 @@ exit (42);
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2192: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2195: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2198: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2201: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' 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"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_declaration
int
main ()
@@ -2220,21 +2862,22 @@ exit (42);
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2223: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2226: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2229: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2232: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
@@ -2247,7 +2890,8 @@ fi
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
@@ -2256,36 +2900,75 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-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
+
+ 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
- echo "$as_me:2278: result: no" >&5
-echo "${ECHO_T}no" >&6
- ISC=
+ 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
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:2288: checking how to run the C preprocessor" >&5
+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.
if test -n "$CPP" && test -d "$CPP"; then
@@ -2303,21 +2986,31 @@ for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> 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 2309 "configure"
-#include "confdefs.h"
-#include <assert.h>
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
Syntax error
_ACEOF
-if { (eval echo "$as_me:2314: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:2320: \$? = $ac_status" >&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
@@ -2331,7 +3024,8 @@ if test -z "$ac_cpp_err"; then
:
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
# Broken: fails on valid input.
continue
fi
@@ -2340,17 +3034,21 @@ rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether non-existent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
-#line 2343 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if { (eval echo "$as_me:2347: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:2353: \$? = $ac_status" >&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
@@ -2365,7 +3063,8 @@ if test -z "$ac_cpp_err"; then
continue
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
# Passes both tests.
ac_preproc_ok=:
break
@@ -2387,28 +3086,38 @@ fi
else
ac_cv_prog_CPP=$CPP
fi
-echo "$as_me:2390: result: $CPP" >&5
+echo "$as_me:$LINENO: result: $CPP" >&5
echo "${ECHO_T}$CPP" >&6
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> 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 2400 "configure"
-#include "confdefs.h"
-#include <assert.h>
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
Syntax error
_ACEOF
-if { (eval echo "$as_me:2405: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:2411: \$? = $ac_status" >&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
@@ -2422,7 +3131,8 @@ if test -z "$ac_cpp_err"; then
:
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
# Broken: fails on valid input.
continue
fi
@@ -2431,17 +3141,21 @@ rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether non-existent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
-#line 2434 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if { (eval echo "$as_me:2438: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:2444: \$? = $ac_status" >&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
@@ -2456,7 +3170,8 @@ if test -z "$ac_cpp_err"; then
continue
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
# Passes both tests.
ac_preproc_ok=:
break
@@ -2469,8 +3184,10 @@ rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
:
else
- { { echo "$as_me:2472: error: C preprocessor \"$CPP\" fails sanity check" >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
+ { { 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
@@ -2480,23 +3197,309 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:2483: checking for minix/config.h" >&5
+
+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 <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+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 <string.h>
+
+_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 <stdlib.h>
+
+_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 <ctype.h>
+#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
- cat >conftest.$ac_ext <<_ACEOF
-#line 2489 "configure"
-#include "confdefs.h"
+ # 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 <minix/config.h>
_ACEOF
-if { (eval echo "$as_me:2493: \"$ac_cpp conftest.$ac_ext\"") >&5
+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 <minix/config.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:2499: \$? = $ac_status" >&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
@@ -2507,48 +3510,100 @@ else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
- ac_cv_header_minix_config_h=yes
+ ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_header_minix_config_h=no
+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:2518: result: $ac_cv_header_minix_config_h" >&5
+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
else
MINIX=
fi
+
if test "$MINIX" = yes; then
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define _POSIX_SOURCE 1
-EOF
+_ACEOF
-cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define _POSIX_1_SOURCE 2
-EOF
+_ACEOF
+
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define _MINIX 1
-EOF
+_ACEOF
fi
+
+
case $host_os in
*cygwin* ) CYGWIN=yes;;
* ) CYGWIN=no;;
esac
+
case $host_os in
*mingw32* ) MINGW32=yes;;
* ) MINGW32=no;;
esac
+
# Check whether --enable-largefile or --disable-largefile was given.
if test "${enable_largefile+set}" = set; then
enableval="$enable_largefile"
@@ -2556,7 +3611,7 @@ if test "${enable_largefile+set}" = set; then
fi;
if test "$enable_largefile" != no; then
- echo "$as_me:2559: checking for special C compiler options needed for large files" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2568,8 +3623,12 @@ else
# IRIX 6.2 and later do not support large files by default,
# so use the C compiler's -n32 option if that helps.
cat >conftest.$ac_ext <<_ACEOF
-#line 2571 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
@@ -2588,40 +3647,42 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2591: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2594: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2597: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2600: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&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:2610: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2613: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2616: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2619: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext
break
@@ -2630,13 +3691,13 @@ rm -f conftest.$ac_objext
rm -f conftest.$ac_ext
fi
fi
-echo "$as_me:2633: result: $ac_cv_sys_largefile_CC" >&5
+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
CC=$CC$ac_cv_sys_largefile_CC
fi
- echo "$as_me:2639: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2644,8 +3705,12 @@ else
while :; do
ac_cv_sys_file_offset_bits=no
cat >conftest.$ac_ext <<_ACEOF
-#line 2647 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
@@ -2664,26 +3729,31 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2667: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2670: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2673: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2676: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line 2685 "configure"
-#include "confdefs.h"
+#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 <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
@@ -2703,37 +3773,38 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2706: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2709: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2712: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2715: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest.$ac_ext
break
done
fi
-echo "$as_me:2726: result: $ac_cv_sys_file_offset_bits" >&5
+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 <<EOF
+cat >>confdefs.h <<_ACEOF
#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
-EOF
+_ACEOF
fi
rm -f conftest*
- echo "$as_me:2736: checking for _LARGE_FILES value needed for large files" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2741,8 +3812,12 @@ else
while :; do
ac_cv_sys_large_files=no
cat >conftest.$ac_ext <<_ACEOF
-#line 2744 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
@@ -2761,26 +3836,31 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2764: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2767: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2770: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2773: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line 2782 "configure"
-#include "confdefs.h"
+#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 <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
@@ -2800,40 +3880,45 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2803: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2806: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2809: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2812: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest.$ac_ext
break
done
fi
-echo "$as_me:2823: result: $ac_cv_sys_large_files" >&5
+echo "$as_me:$LINENO: 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 <<EOF
+cat >>confdefs.h <<_ACEOF
#define _LARGE_FILES $ac_cv_sys_large_files
-EOF
+_ACEOF
fi
rm -f conftest*
fi
+
+
SIGNAMES_H=lsignames.h
+
+
if test "x$cross_compiling" = "xyes"; then
case "${host}" in
*-cygwin*)
@@ -2854,6 +3939,7 @@ if test "x$cross_compiling" = "xyes"; then
unset cross_cache
fi
+
if test -z "$CC_FOR_BUILD"; then
if test "x$cross_compiling" = "xno"; then
CC_FOR_BUILD='$(CC)'
@@ -2862,6 +3948,8 @@ if test -z "$CC_FOR_BUILD"; then
fi
fi
+
+
test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O2"
@@ -2886,69 +3974,172 @@ if test "$opt_static_link" = yes; then
fi
fi
-test -z "$CPPFLAGS_FOR_BUILD" && CPPFLAGS_FOR_BUILD="$CPPFLAGS"
+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:2893: checking whether $CC needs -traditional" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_pattern="Autoconf.*'x'"
cat >conftest.$ac_ext <<_ACEOF
-#line 2900 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sgtty.h>
Autoconf TIOCGETP
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "$ac_pattern" >/dev/null 2>&1; then
+ $EGREP "$ac_pattern" >/dev/null 2>&1; then
ac_cv_prog_gcc_traditional=yes
else
ac_cv_prog_gcc_traditional=no
fi
rm -f conftest*
+
if test $ac_cv_prog_gcc_traditional = no; then
cat >conftest.$ac_ext <<_ACEOF
-#line 2915 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <termio.h>
Autoconf TCGETA
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "$ac_pattern" >/dev/null 2>&1; then
+ $EGREP "$ac_pattern" >/dev/null 2>&1; then
ac_cv_prog_gcc_traditional=yes
fi
rm -f conftest*
fi
fi
-echo "$as_me:2928: result: $ac_cv_prog_gcc_traditional" >&5
+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
CC="$CC -traditional"
fi
fi
+
+
if test "$opt_readline" = yes && test "$opt_with_installed_readline" != "no"
then
# If the user specified --with-installed-readline=PREFIX and PREFIX
# is not `yes', set ac_cv_rl_prefix to PREFIX
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 "$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=
fi
if test "${bash_cv_termcap_lib+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$as_me:2951: checking for tgetent in -ltermcap" >&5
+ 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 <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2956,8 +4147,12 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ltermcap $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 2959 "configure"
-#include "confdefs.h"
+#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
@@ -2975,32 +4170,33 @@ tgetent ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2978: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2981: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:2984: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2987: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_termcap_tgetent=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:2998: result: $ac_cv_lib_termcap_tgetent" >&5
+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:3003: checking for tgetent in -ltinfo" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3008,8 +4204,12 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ltinfo $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 3011 "configure"
-#include "confdefs.h"
+#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
@@ -3027,32 +4227,33 @@ tgetent ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3030: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3033: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3036: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3039: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_tinfo_tgetent=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:3050: result: $ac_cv_lib_tinfo_tgetent" >&5
+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:3055: checking for tgetent in -lcurses" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3060,8 +4261,12 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lcurses $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 3063 "configure"
-#include "confdefs.h"
+#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
@@ -3079,32 +4284,33 @@ tgetent ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3082: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3085: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3088: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3091: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_curses_tgetent=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:3102: result: $ac_cv_lib_curses_tgetent" >&5
+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:3107: checking for tgetent in -lncurses" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3112,8 +4318,12 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lncurses $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 3115 "configure"
-#include "confdefs.h"
+#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
@@ -3131,27 +4341,28 @@ tgetent ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3134: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3137: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3140: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3143: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_ncurses_tgetent=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:3154: result: $ac_cv_lib_ncurses_tgetent" >&5
+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
bash_cv_termcap_lib=libncurses
@@ -3167,11 +4378,13 @@ fi
fi
+fi
+
if test "X$_bash_needmsg" = "Xyes"; then
-echo "$as_me:3171: checking which library has the termcap functions" >&5
+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:3174: result: using $bash_cv_termcap_lib" >&5
+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
LDFLAGS="$LDFLAGS -L./lib/termcap"
@@ -3186,12 +4399,18 @@ TERMCAP_DEP=
elif test $bash_cv_termcap_lib = libncurses; then
TERMCAP_LIB=-lncurses
TERMCAP_DEP=
+elif test $bash_cv_termcap_lib = libc; then
+TERMCAP_LIB=
+TERMCAP_DEP=
else
TERMCAP_LIB=-lcurses
TERMCAP_DEP=
fi
-echo "$as_me:3194: checking version of installed readline library" >&5
+
+
+
+echo "$as_me:$LINENO: checking version of installed readline library" >&5
echo $ECHO_N "checking version of installed readline library... $ECHO_C" >&6
# What a pain in the ass this is.
@@ -3216,12 +4435,19 @@ LIBS="$LIBS -lreadline ${TERMCAP_LIB}"
CFLAGS="$CFLAGS -I${ac_cv_rl_includedir}"
LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}"
-if test "$cross_compiling" = yes; then
+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 3223 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdio.h>
#include <readline/readline.h>
@@ -3238,26 +4464,30 @@ main()
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:3241: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3244: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:3246: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3249: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_rl_version=`cat conftest.rlv`
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
ac_cv_rl_version='0.0'
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
fi
+
CFLAGS="$_save_CFLAGS"
LDFLAGS="$_save_LDFLAGS"
LIBS="$_save_LIBS"
@@ -3292,60 +4522,73 @@ RL_VERSION="0x${_RL_MAJOR}${_RL_MINOR}"
# Readline versions greater than 4.2 have these defines in readline.h
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:$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
# set these for use by the caller
RL_PREFIX=$ac_cv_rl_prefix
RL_LIBDIR=$ac_cv_rl_libdir
RL_INCLUDEDIR=$ac_cv_rl_includedir
- echo "$as_me:3302: result: $ac_cv_rl_version" >&5
+ echo "$as_me:$LINENO: result: $ac_cv_rl_version" >&5
echo "${ECHO_T}$ac_cv_rl_version" >&6
else
-cat >>confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define RL_READLINE_VERSION $RL_VERSION
-EOF
+_ACEOF
+
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define RL_VERSION_MAJOR $RL_MAJOR
-EOF
+_ACEOF
-cat >>confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define RL_VERSION_MINOR $RL_MINOR
-EOF
+_ACEOF
+
+
+
+
+
# set these for use by the caller
RL_PREFIX=$ac_cv_rl_prefix
RL_LIBDIR=$ac_cv_rl_libdir
RL_INCLUDEDIR=$ac_cv_rl_includedir
-echo "$as_me:3323: result: $ac_cv_rl_version" >&5
+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
- 4.[3-9]*|5*|6*|7*|8*|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:$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:3333: WARNING: using private bash version" >&5
+ { echo "$as_me:$LINENO: WARNING: using private bash version" >&5
echo "$as_me: WARNING: using private bash version" >&2;}
;;
esac
fi
if test $opt_readline = yes; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define READLINE 1
-EOF
+_ACEOF
READLINE_LIB=-lreadline
if test "$opt_with_installed_readline" != "no" ; then
- case "$RL_INCLUDEDIR" in
- /usr/include) ;;
- *) RL_INCLUDE='-I${RL_INCLUDEDIR}'
+ case "$opt_with_installed_readline" in
+ yes) RL_INCLUDE= ;;
+ *) case "$RL_INCLUDEDIR" in
+ /usr/include) ;;
+ *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;;
+ esac
+ ;;
esac
READLINE_DEP=
else
@@ -3358,24 +4601,28 @@ else
fi
if test $opt_history = yes || test $opt_bang_history = yes; then
if test $opt_history = yes; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HISTORY 1
-EOF
+_ACEOF
fi
if test $opt_bang_history = yes; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define BANG_HISTORY 1
-EOF
+_ACEOF
fi
HISTORY_LIB=-lhistory
if test "$opt_with_installed_readline" != "no"; then
HIST_LIBDIR=$RL_LIBDIR
HISTORY_DEP=
- case "$RL_INCLUDEDIR" in
- /usr/include) ;;
- *) RL_INCLUDE='-I${RL_INCLUDEDIR}'
+ case "$opt_with_installed_readline" in
+ yes) RL_INCLUDE= ;;
+ *) case "$RL_INCLUDEDIR" in
+ /usr/include) ;;
+ *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;;
+ esac
+ ;;
esac
else
HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
@@ -3386,6 +4633,15 @@ else
HISTORY_LIB= HISTORY_DEP=
fi
+
+
+
+
+
+
+
+
+
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
@@ -3398,43 +4654,48 @@ fi
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:3401: checking for a BSD compatible install" >&5
-echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
+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
- 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
+ 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
- ;;
- esac
- done
+ done
+ ;;
+esac
+done
+
fi
if test "${ac_cv_path_install+set}" = set; then
@@ -3447,7 +4708,7 @@ fi
INSTALL=$ac_install_sh
fi
fi
-echo "$as_me:3450: result: $INSTALL" >&5
+echo "$as_me:$LINENO: result: $INSTALL" >&5
echo "${ECHO_T}$INSTALL" >&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
@@ -3460,7 +4721,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
# 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 "$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
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3468,15 +4729,18 @@ else
if test -n "$AR"; then
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
+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
test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
@@ -3484,10 +4748,10 @@ fi
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
- echo "$as_me:3487: result: $AR" >&5
+ echo "$as_me:$LINENO: result: $AR" >&5
echo "${ECHO_T}$AR" >&6
else
- echo "$as_me:3490: result: no" >&5
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -3495,7 +4759,7 @@ test -n "$ARFLAGS" || ARFLAGS="cr"
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:3498: checking for $ac_word" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3503,25 +4767,28 @@ else
if test -n "$RANLIB"; then
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
+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
fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- echo "$as_me:3521: result: $RANLIB" >&5
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
echo "${ECHO_T}$RANLIB" >&6
else
- echo "$as_me:3524: result: no" >&5
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -3530,7 +4797,7 @@ if test -z "$ac_cv_prog_RANLIB"; then
ac_ct_RANLIB=$RANLIB
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
-echo "$as_me:3533: checking for $ac_word" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3538,15 +4805,18 @@ else
if test -n "$ac_ct_RANLIB"; then
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
+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
test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
@@ -3554,10 +4824,10 @@ fi
fi
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 "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
- echo "$as_me:3560: result: no" >&5
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -3570,7 +4840,7 @@ for ac_prog in 'bison -y' byacc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:3573: checking for $ac_word" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3578,25 +4848,28 @@ else
if test -n "$YACC"; then
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
+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
fi
fi
YACC=$ac_cv_prog_YACC
if test -n "$YACC"; then
- echo "$as_me:3596: result: $YACC" >&5
+ echo "$as_me:$LINENO: result: $YACC" >&5
echo "${ECHO_T}$YACC" >&6
else
- echo "$as_me:3599: result: no" >&5
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -3604,16 +4877,16 @@ fi
done
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
+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 <<\EOF
+ cat >conftest.make <<\_ACEOF
all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
+ @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=`
if test -n "$ac_maketemp"; then
@@ -3624,123 +4897,39 @@ fi
rm -f conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$as_me:3627: result: yes" >&5
+ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
SET_MAKE=
else
- echo "$as_me:3631: result: no" >&5
+ 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" ;;
*) MAKE_SHELL=/bin/sh ;;
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 <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* 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;
-}
+cat >>confdefs.h <<\_ACEOF
+#define _GNU_SOURCE 1
_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 "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
if test "${ac_cv_c_const+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 3742 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -3797,36 +4986,37 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3800: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3803: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3806: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3809: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+sed 's/^/| /' 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 "$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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define const
-EOF
+_ACEOF
fi
-echo "$as_me:3829: checking for inline" >&5
+echo "$as_me:$LINENO: checking for inline" >&5
echo $ECHO_N "checking for inline... $ECHO_C" >&6
if test "${ac_cv_c_inline+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3834,60 +5024,69 @@ else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat >conftest.$ac_ext <<_ACEOF
-#line 3837 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#ifndef __cplusplus
-static $ac_kw int static_foo () {return 0; }
-$ac_kw int foo () {return 0; }
+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:3846: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3849: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3852: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3855: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:3866: result: $ac_cv_c_inline" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define inline
-EOF
+_ACEOF
;;
- *) cat >>confdefs.h <<EOF
+ *) cat >>confdefs.h <<_ACEOF
#define inline $ac_cv_c_inline
-EOF
+_ACEOF
;;
esac
-echo "$as_me:3881: checking whether byte ordering is bigendian" >&5
+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
- ac_cv_c_bigendian=unknown
-# See if sys/param.h defines the BYTE_ORDER macro.
+ # See if sys/param.h defines the BYTE_ORDER macro.
cat >conftest.$ac_ext <<_ACEOF
-#line 3889 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/param.h>
@@ -3903,21 +5102,25 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3906: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3909: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3912: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3915: \$? = $ac_status" >&5
+ 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 3919 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/param.h>
@@ -3933,38 +5136,91 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3936: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3939: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3942: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3945: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_c_bigendian=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&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
-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"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
{
@@ -3979,51 +5235,67 @@ main ()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:3982: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3985: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:3987: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3990: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_c_bigendian=no
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
ac_cv_c_bigendian=yes
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+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:4003: result: $ac_cv_c_bigendian" >&5
+echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
echo "${ECHO_T}$ac_cv_c_bigendian" >&6
-if test $ac_cv_c_bigendian = yes; then
+case $ac_cv_c_bigendian in
+ yes)
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define WORDS_BIGENDIAN 1
-EOF
-
-fi
+_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:4013: checking for preprocessor stringizing operator" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 4019 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define x(y) #y
char *s = x(teststring);
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "#teststring" >/dev/null 2>&1; then
+ $EGREP "#teststring" >/dev/null 2>&1; then
ac_cv_c_stringize=no
else
ac_cv_c_stringize=yes
@@ -4031,110 +5303,961 @@ fi
rm -f conftest*
fi
-echo "$as_me:4034: result: $ac_cv_c_stringize" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HAVE_STRINGIZE 1
-EOF
+_ACEOF
fi
-echo "$as_me:4044: checking for long double" >&5
-echo $ECHO_N "checking for long double... $ECHO_C" >&6
+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
- 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"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <float.h>
+ long double foo = 0.0;
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));
+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_exeext
-if { (eval echo "$as_me:4071: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&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
+ 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:4079: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' 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
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:4092: result: $ac_cv_c_long_double" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HAVE_LONG_DOUBLE 1
-EOF
+_ACEOF
fi
-echo "$as_me:4102: checking for function prototypes" >&5
+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:4105: result: yes" >&5
+ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define PROTOTYPES 1
-EOF
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define __PROTOTYPES 1
+_ACEOF
else
- echo "$as_me:4113: result: no" >&5
+ echo "$as_me:$LINENO: 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 "$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 4123 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
+#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;
+}
+_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 <alloca.h>
+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 <malloc.h>
+# define alloca _alloca
+# else
+# if HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
+
+int
+main ()
+{
+char *p = (char *) alloca (1);
+ ;
+ return 0;
+}
+_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 <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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
-if { (eval echo "$as_me:4131: \"$ac_cpp conftest.$ac_ext\"") >&5
+
+
+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=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:4137: \$? = $ac_status" >&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
@@ -4145,217 +6268,2724 @@ else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
- ac_cv_header_stdc=yes
+ ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_header_stdc=no
+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
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+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 4159 "configure"
-#include "confdefs.h"
-#include <string.h>
+#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 <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "memchr" >/dev/null 2>&1; then
- :
+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
- ac_cv_header_stdc=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
fi
-rm -f conftest*
+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
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+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 4177 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
+#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 <fcntl.h>
+#include <sys/mman.h>
+
+#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 <sys/param.h>
+# ifdef EXEC_PAGESIZE
+# define getpagesize() EXEC_PAGESIZE
+# else /* no EXEC_PAGESIZE */
+# ifdef NBPG
+# define getpagesize() NBPG * CLSIZE
+# ifndef CLSIZE
+# define CLSIZE 1
+# endif /* no CLSIZE */
+# else /* no NBPG */
+# ifdef NBPC
+# define getpagesize() NBPC
+# else /* no NBPC */
+# ifdef PAGESIZE
+# define getpagesize() PAGESIZE
+# endif /* PAGESIZE */
+# endif /* no NBPC */
+# endif /* no NBPG */
+# endif /* no EXEC_PAGESIZE */
+# else /* no HAVE_SYS_PARAM_H */
+# define getpagesize() 8192 /* punt totally */
+# endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+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 <features.h>
+#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 "free" >/dev/null 2>&1; then
- :
+ $EGREP "Lucky GNU user" >/dev/null 2>&1; then
+ ac_cv_gnu_library_2_1=yes
else
- ac_cv_header_stdc=no
+ 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
-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 <ctype.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdlib.h>
+#include <signal.h>
+
+static void
+#ifdef __cplusplus
+sigfpe_handler (int sig)
#else
-# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+sigfpe_handler (sig) int sig;
#endif
+{
+ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
+ exit (sig != SIGFPE);
+}
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
+int x = 1;
+int y = 0;
+int z;
+int nan;
+
+int main ()
{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- exit(2);
- exit (0);
+ 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:4224: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4227: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:4229: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4232: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
-ac_cv_header_stdc=no
+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 <sys/types.h>
+#include <inttypes.h>
+int
+main ()
+{
+uintmax_t i = (uintmax_t) -1;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&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 core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+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 <sys/types.h>
+#include <stdint.h>
+int
+main ()
+{
+uintmax_t i = (uintmax_t) -1;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&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:4245: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
-if test $ac_cv_header_stdc = yes; then
+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 <<\EOF
-#define STDC_HEADERS 1
-EOF
+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
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_UNSIGNED_LONG_LONG 1
+_ACEOF
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
+ 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 <sys/types.h>
+#include <inttypes.h>
+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 <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&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 </dev/null | egrep '(GNU|with BFD)' 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`
-echo "$as_me:4261: checking for $ac_header" >&5
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-#line 4267 "configure"
-#include "confdefs.h"
+ # 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:4273: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4276: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4279: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4282: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- eval "$as_ac_Header=yes"
+ ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-eval "$as_ac_Header=no"
+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
-echo "$as_me:4292: result: `eval echo '${'$as_ac_Header'}'`" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-EOF
+_ACEOF
fi
+
done
-echo "$as_me:4302: 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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+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 4308 "configure"
-#include "confdefs.h"
-$ac_includes_default
+#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 <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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
+
+
+
+
+
+
+
+ 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 <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (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 <stdlib.h>
+#include <iconv.h>
int
main ()
{
-int _array_ [1 - 2 * !(((char) -1) < 0)]
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (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 <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+
+int
+main ()
+{
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4320: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4323: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4326: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4329: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_c_char_unsigned=no
+ am_cv_proto_iconv_arg1=""
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_c_char_unsigned=yes
+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
-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
+ 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 <langinfo.h>
+int
+main ()
+{
+char* cs = nl_langinfo(CODESET);
+ ;
+ 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
+ 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 <locale.h>
+int
+main ()
+{
+return LC_MESSAGES
+ ;
+ 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
+ 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 <libintl.h>
+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;
+}
+_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 <libintl.h>
+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;
+}
+_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 <libintl.h>
+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;
+}
+_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:4351: checking for $ac_hdr that defines DIR" >&5
+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 4357 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <$ac_hdr>
@@ -4369,31 +8999,32 @@ return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4372: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4375: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4378: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4381: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+sed 's/^/| /' 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 "$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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
-EOF
+_ACEOF
ac_header_dirent=$ac_hdr; break
fi
@@ -4401,16 +9032,20 @@ 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:4404: checking for opendir in -ldir" >&5
-echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
-if test "${ac_cv_lib_dir_opendir+set}" = set; 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_check_lib_save_LIBS=$LIBS
-LIBS="-ldir $LIBS"
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_opendir=no
cat >conftest.$ac_ext <<_ACEOF
-#line 4412 "configure"
-#include "confdefs.h"
+#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
@@ -4428,43 +9063,96 @@ opendir ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4431: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4434: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4437: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4440: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_lib_dir_opendir=yes
+ ac_cv_search_opendir="none required"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_lib_dir_opendir=no
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+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
-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"
+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: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 "$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_check_lib_save_LIBS=$LIBS
-LIBS="-lx $LIBS"
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_opendir=no
cat >conftest.$ac_ext <<_ACEOF
-#line 4466 "configure"
-#include "confdefs.h"
+#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
@@ -4482,42 +9170,95 @@ opendir ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4485: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4488: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4491: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4494: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_lib_x_opendir=yes
+ ac_cv_search_opendir="none required"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_lib_x_opendir=no
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+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
-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"
+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
-echo "$as_me:4513: checking whether time.h and sys/time.h may both be included" >&5
+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 4519 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
@@ -4532,55 +9273,106 @@ return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4535: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4538: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4541: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4544: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+sed 's/^/| /' 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 "$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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define TIME_WITH_SYS_TIME 1
-EOF
+_ACEOF
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
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-#line 4573 "configure"
-#include "confdefs.h"
+ # 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
-if { (eval echo "$as_me:4577: \"$ac_cpp conftest.$ac_ext\"") >&5
+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=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:4583: \$? = $ac_status" >&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
@@ -4591,46 +9383,159 @@ else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
- eval "$as_ac_Header=yes"
+ ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- eval "$as_ac_Header=no"
+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:4602: result: `eval echo '${'$as_ac_Header'}'`" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-EOF
+_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
+ 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`
-echo "$as_me:4617: checking for $ac_header" >&5
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-#line 4623 "configure"
-#include "confdefs.h"
+ # 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
-if { (eval echo "$as_me:4627: \"$ac_cpp conftest.$ac_ext\"") >&5
+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=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:4633: \$? = $ac_status" >&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
@@ -4641,46 +9546,152 @@ else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
- eval "$as_ac_Header=yes"
+ ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- eval "$as_ac_Header=no"
+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:4652: result: `eval echo '${'$as_ac_Header'}'`" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-EOF
+_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/time.h sys/times.h sys/wait.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`
-echo "$as_me:4667: checking for $ac_header" >&5
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-#line 4673 "configure"
-#include "confdefs.h"
+ # 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
-if { (eval echo "$as_me:4677: \"$ac_cpp conftest.$ac_ext\"") >&5
+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=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:4683: \$? = $ac_status" >&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
@@ -4691,44 +9702,139 @@ else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
- eval "$as_ac_Header=yes"
+ ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- eval "$as_ac_Header=no"
+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:4702: result: `eval echo '${'$as_ac_Header'}'`" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-EOF
+_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`
-echo "$as_me:4715: checking for $ac_header" >&5
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-#line 4721 "configure"
-#include "confdefs.h"
+ # 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
-if { (eval echo "$as_me:4725: \"$ac_cpp conftest.$ac_ext\"") >&5
+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=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:4731: \$? = $ac_status" >&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
@@ -4739,34 +9845,85 @@ else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
- eval "$as_ac_Header=yes"
+ ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- eval "$as_ac_Header=no"
+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:4750: result: `eval echo '${'$as_ac_Header'}'`" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-EOF
+_ACEOF
fi
+
done
+
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
-echo "$as_me:4762: checking for working alloca.h" >&5
+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 4768 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <alloca.h>
int
main ()
@@ -4777,43 +9934,48 @@ char *p = (char *) alloca (2 * sizeof (int));
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4780: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4783: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4786: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4789: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:4799: result: $ac_cv_working_alloca_h" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HAVE_ALLOCA_H 1
-EOF
+_ACEOF
fi
-echo "$as_me:4809: checking for alloca" >&5
+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 4815 "configure"
-#include "confdefs.h"
+#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
@@ -4844,33 +10006,34 @@ char *p = (char *) alloca (1);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4847: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4850: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4853: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4856: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:4866: result: $ac_cv_func_alloca_works" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HAVE_ALLOCA 1
-EOF
+_ACEOF
else
# The SVR3 libPW and SVR4 libucb both contain incompatible functions
@@ -4880,18 +10043,23 @@ else
ALLOCA=alloca.$ac_objext
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define C_ALLOCA 1
-EOF
+_ACEOF
-echo "$as_me:4887: checking whether \`alloca.c' needs Cray hooks" >&5
+
+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 4893 "configure"
-#include "confdefs.h"
+#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
@@ -4900,7 +10068,7 @@ wenotbecray
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "webecray" >/dev/null 2>&1; then
+ $EGREP "webecray" >/dev/null 2>&1; then
ac_cv_os_cray=yes
else
ac_cv_os_cray=no
@@ -4908,74 +10076,88 @@ fi
rm -f conftest*
fi
-echo "$as_me:4911: result: $ac_cv_os_cray" >&5
+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:4916: checking for $ac_func" >&5
+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 4922 "configure"
-#include "confdefs.h"
+#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. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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 ();
-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;
+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:4953: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4956: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4959: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4962: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:4972: result: `eval echo '${'$as_ac_var'}'`" >&5
+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 <<EOF
+cat >>confdefs.h <<_ACEOF
#define CRAY_STACKSEG_END $ac_func
-EOF
+_ACEOF
break
fi
@@ -4983,7 +10165,7 @@ fi
done
fi
-echo "$as_me:4986: checking stack direction for C alloca" >&5
+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
@@ -4992,8 +10174,12 @@ else
ac_cv_c_stack_direction=0
else
cat >conftest.$ac_ext <<_ACEOF
-#line 4995 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
find_stack_direction ()
{
@@ -5015,44 +10201,51 @@ main ()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:5018: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5021: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:5023: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5026: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
ac_cv_c_stack_direction=-1
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:5038: result: $ac_cv_c_stack_direction" >&5
+echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define STACK_DIRECTION $ac_cv_c_stack_direction
-EOF
+_ACEOF
+
fi
-echo "$as_me:5047: checking whether getpgrp takes no argument" >&5
-echo $ECHO_N "checking whether getpgrp takes no argument... $ECHO_C" >&6
+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 5054 "configure"
-#include "confdefs.h"
+#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 ()
@@ -5063,347 +10256,346 @@ getpgrp (0);
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5066: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:5069: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:5072: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5075: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_func_getpgrp_1=yes
+ ac_cv_func_getpgrp_void=no
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_func_getpgrp_1=no
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_getpgrp_void=yes
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
+
+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 <stdio.h>
+# if PROTOTYPES
+ int (setvbuf) (FILE *, int, char *, size_t);
+# endif
int
main ()
{
-getpgrp ();
+char buf; return setvbuf (stdout, _IOLBF, &buf, 1);
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5098: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+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:5101: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:5104: \"$ac_try\"") >&5
+ { 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:5107: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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;
-
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdio.h>
+# if PROTOTYPES
+ int (setvbuf) (FILE *, int, char *, size_t);
+# endif
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);
- }
+char buf; return setvbuf (stdout, &buf, _IOLBF, 1);
+ ;
+ return 0;
}
-
_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:5180: \"$ac_link\"") >&5
+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:5183: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:5185: \"$ac_try\"") >&5
+ 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:5188: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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; }; }
+ # 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 5223 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdio.h>
-/* 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. */
+/* 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:5240: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5243: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:5245: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5248: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
-ac_cv_func_setvbuf_reversed=no
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+rm -f core core.* *.core
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-rm -f core core.* *.core
+ 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:5261: result: $ac_cv_func_setvbuf_reversed" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define SETVBUF_REVERSED 1
-EOF
+_ACEOF
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 "$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 5280 "configure"
-#include "confdefs.h"
+#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. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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 ();
-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;
+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:5311: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5314: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5317: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5320: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:5330: result: `eval echo '${'$as_ac_var'}'`" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-EOF
+_ACEOF
-echo "$as_me:5337: checking for _doprnt" >&5
+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 5343 "configure"
-#include "confdefs.h"
+#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. */
-#include <assert.h>
+ which can conflict with char _doprnt (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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 ();
-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;
+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:5374: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5377: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5380: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5383: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:5393: result: $ac_cv_func__doprnt" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HAVE_DOPRNT 1
-EOF
+_ACEOF
fi
fi
done
-echo "$as_me:5406: checking for working strcoll" >&5
+
+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
@@ -5412,8 +10604,12 @@ else
ac_cv_func_strcoll_works=no
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5415 "configure"
-#include "confdefs.h"
+#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 ()
@@ -5426,36 +10622,40 @@ exit (strcoll ("abc", "def") >= 0 ||
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:5429: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5432: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:5434: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5437: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
ac_cv_func_strcoll_works=no
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:5449: result: $ac_cv_func_strcoll_works" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HAVE_STRCOLL 1
-EOF
+_ACEOF
fi
+
+
if test "$ac_cv_func_alloca_works" = "no" && test "$opt_bash_malloc" = "no"; then
MALLOC_TARGET=alloca
MALLOC_SRC=alloca.c
@@ -5467,26 +10667,30 @@ if test "$ac_cv_func_alloca_works" = "no" && test "$opt_bash_malloc" = "no"; the
fi
if test "$ac_cv_func_vprintf" = no; then
- echo "$as_me:5470: checking for declaration of vprintf in stdio.h" >&5
+ 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 5473 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdio.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "[int[ ]*vprintf[^a-zA-Z0-9]]" >/dev/null 2>&1; then
+ $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 "$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 <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_VPRINTF 1
-EOF
+_ACEOF
fi
fi
@@ -5495,14 +10699,18 @@ 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 "$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 5504 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <signal.h>
#ifdef signal
@@ -5523,732 +10731,956 @@ int i;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5526: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:5529: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:5532: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5535: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+sed 's/^/| /' 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 "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
echo "${ECHO_T}$ac_cv_type_signal" >&6
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define RETSIGTYPE $ac_cv_type_signal
-EOF
+_ACEOF
+
-echo "$as_me:5552: checking for __setostype" >&5
+
+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 5558 "configure"
-#include "confdefs.h"
+#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. */
-#include <assert.h>
+ which can conflict with char __setostype (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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 ();
-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;
+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:5589: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5592: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5595: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5598: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:5608: result: $ac_cv_func___setostype" >&5
+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 <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_SETOSTYPE 1
-EOF
+_ACEOF
fi
-echo "$as_me:5617: checking for wait3" >&5
+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 5623 "configure"
-#include "confdefs.h"
+#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. */
-#include <assert.h>
+ which can conflict with char wait3 (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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 ();
-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;
+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:5654: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5657: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5660: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5663: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:5673: result: $ac_cv_func_wait3" >&5
+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 <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_WAIT3 1
-EOF
+_ACEOF
fi
-echo "$as_me:5682: checking for isinf" >&5
+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 5688 "configure"
-#include "confdefs.h"
+#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. */
-#include <assert.h>
+ which can conflict with char isinf (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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 ();
-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;
+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:5719: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5722: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5725: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5728: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:5738: result: $ac_cv_func_isinf" >&5
+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 <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_ISINF_IN_LIBC 1
-EOF
+_ACEOF
fi
-echo "$as_me:5747: checking for mkfifo" >&5
+
+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 5753 "configure"
-#include "confdefs.h"
+#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. */
-#include <assert.h>
+ which can conflict with char mkfifo (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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 ();
-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;
+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:5784: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5787: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5790: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5793: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:5803: result: $ac_cv_func_mkfifo" >&5
+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 <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_MKFIFO 1
-EOF
+_ACEOF
else
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define MKFIFO_MISSING 1
-EOF
+_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:5823: checking for $ac_func" >&5
+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 5829 "configure"
-#include "confdefs.h"
+#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. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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 ();
-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;
+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:5860: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5863: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5866: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5869: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:5879: result: `eval echo '${'$as_ac_var'}'`" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-EOF
+_ACEOF
fi
done
+
for ac_func in rename
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:5892: checking for $ac_func" >&5
+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 5898 "configure"
-#include "confdefs.h"
+#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. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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 ();
-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;
+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:5929: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5932: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5935: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5938: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:5948: result: `eval echo '${'$as_ac_var'}'`" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-EOF
+_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
+ vsnprintf snprintf vasprintf asprintf fnmatch regcomp regexec
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:5967: checking for $ac_func" >&5
+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 5973 "configure"
-#include "confdefs.h"
+#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. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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 ();
-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;
+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:6004: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6007: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6010: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6013: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:6023: result: `eval echo '${'$as_ac_var'}'`" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-EOF
+_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:6036: checking for $ac_func" >&5
+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 6042 "configure"
-#include "confdefs.h"
+#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. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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 ();
-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;
+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:6073: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6076: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6079: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6082: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:6092: result: `eval echo '${'$as_ac_var'}'`" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-EOF
+_ACEOF
fi
done
-for ac_func in getcwd strcasecmp strerror strftime strpbrk memset
+
+
+
+
+
+
+
+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:6105: checking for $ac_func" >&5
+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 6111 "configure"
-#include "confdefs.h"
+#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. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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 ();
-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;
+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:6142: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6145: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6148: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6151: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:6161: result: `eval echo '${'$as_ac_var'}'`" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-EOF
+_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:6176: checking for $ac_func" >&5
+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 6182 "configure"
-#include "confdefs.h"
+#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. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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 ();
-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;
+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:6213: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6216: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6219: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6222: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:6232: result: `eval echo '${'$as_ac_var'}'`" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-EOF
+_ACEOF
else
LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
fi
done
-echo "$as_me:6244: checking whether confstr is declared" >&5
+
+
+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 6250 "configure"
-#include "confdefs.h"
+#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 ()
@@ -6262,48 +11694,56 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6265: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6268: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6271: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6274: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:6284: result: $ac_cv_have_decl_confstr" >&5
+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 <<EOF
+cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_CONFSTR 1
-EOF
+_ACEOF
+
else
- cat >>confdefs.h <<EOF
+ cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_CONFSTR 0
-EOF
+_ACEOF
+
fi
-echo "$as_me:6299: checking whether printf is declared" >&5
+
+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 6305 "configure"
-#include "confdefs.h"
+#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 ()
@@ -6317,48 +11757,56 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6320: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6323: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6326: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6329: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:6339: result: $ac_cv_have_decl_printf" >&5
+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 <<EOF
+cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_PRINTF 1
-EOF
+_ACEOF
+
else
- cat >>confdefs.h <<EOF
+ cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_PRINTF 0
-EOF
+_ACEOF
+
fi
-echo "$as_me:6354: checking whether sbrk is declared" >&5
+
+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 6360 "configure"
-#include "confdefs.h"
+#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 ()
@@ -6372,48 +11820,56 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6375: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6378: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6381: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6384: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:6394: result: $ac_cv_have_decl_sbrk" >&5
+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 <<EOF
+cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_SBRK 1
-EOF
+_ACEOF
+
else
- cat >>confdefs.h <<EOF
+ cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_SBRK 0
-EOF
+_ACEOF
+
fi
-echo "$as_me:6409: checking whether strcpy is declared" >&5
+
+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 6415 "configure"
-#include "confdefs.h"
+#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 ()
@@ -6427,48 +11883,56 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6430: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6433: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6436: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6439: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:6449: result: $ac_cv_have_decl_strcpy" >&5
+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 <<EOF
+cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_STRCPY 1
-EOF
+_ACEOF
+
else
- cat >>confdefs.h <<EOF
+ cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_STRCPY 0
-EOF
+_ACEOF
+
fi
-echo "$as_me:6464: checking whether strsignal is declared" >&5
+
+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 6470 "configure"
-#include "confdefs.h"
+#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 ()
@@ -6482,48 +11946,57 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6485: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6488: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6491: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6494: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:6504: result: $ac_cv_have_decl_strsignal" >&5
+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 <<EOF
+cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_STRSIGNAL 1
-EOF
+_ACEOF
+
else
- cat >>confdefs.h <<EOF
+ cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_STRSIGNAL 0
-EOF
+_ACEOF
+
fi
-echo "$as_me:6519: checking whether strtold is declared" >&5
+
+
+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 6525 "configure"
-#include "confdefs.h"
+#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 ()
@@ -6537,48 +12010,115 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6540: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6543: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6546: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6549: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:6559: result: $ac_cv_have_decl_strtold" >&5
+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 <<EOF
+cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_STRTOLD 1
-EOF
+_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 <stdlib.h>
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_STRTOLD 0
-EOF
+_ACEOF
+
fi
-echo "$as_me:6574: checking for declaration of strtoimax" >&5
+
+
+
+
+
+
+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 6580 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#if STDC_HEADERS
# include <stdlib.h>
@@ -6596,48 +12136,56 @@ return !strtoimax;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6599: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6602: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6605: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6608: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:6618: result: $bash_cv_decl_strtoimax" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define $bash_tr_func 1
-EOF
+_ACEOF
else
- cat >>confdefs.h <<EOF
+ cat >>confdefs.h <<_ACEOF
#define $bash_tr_func 0
-EOF
+_ACEOF
fi
-echo "$as_me:6633: checking for declaration of strtol" >&5
+
+
+
+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 6639 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#if STDC_HEADERS
# include <stdlib.h>
@@ -6655,48 +12203,56 @@ return !strtol;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6658: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6661: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6664: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6667: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:6677: result: $bash_cv_decl_strtol" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define $bash_tr_func 1
-EOF
+_ACEOF
else
- cat >>confdefs.h <<EOF
+ cat >>confdefs.h <<_ACEOF
#define $bash_tr_func 0
-EOF
+_ACEOF
fi
-echo "$as_me:6692: checking for declaration of strtoll" >&5
+
+
+
+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 6698 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#if STDC_HEADERS
# include <stdlib.h>
@@ -6714,48 +12270,56 @@ return !strtoll;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6717: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6720: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6723: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6726: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:6736: result: $bash_cv_decl_strtoll" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define $bash_tr_func 1
-EOF
+_ACEOF
else
- cat >>confdefs.h <<EOF
+ cat >>confdefs.h <<_ACEOF
#define $bash_tr_func 0
-EOF
+_ACEOF
fi
-echo "$as_me:6751: checking for declaration of strtoul" >&5
+
+
+
+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 6757 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#if STDC_HEADERS
# include <stdlib.h>
@@ -6773,48 +12337,56 @@ return !strtoul;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6776: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6779: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6782: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6785: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:6795: result: $bash_cv_decl_strtoul" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define $bash_tr_func 1
-EOF
+_ACEOF
else
- cat >>confdefs.h <<EOF
+ cat >>confdefs.h <<_ACEOF
#define $bash_tr_func 0
-EOF
+_ACEOF
fi
-echo "$as_me:6810: checking for declaration of strtoull" >&5
+
+
+
+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 6816 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#if STDC_HEADERS
# include <stdlib.h>
@@ -6832,48 +12404,56 @@ return !strtoull;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6835: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6838: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6841: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6844: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:6854: result: $bash_cv_decl_strtoull" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define $bash_tr_func 1
-EOF
+_ACEOF
else
- cat >>confdefs.h <<EOF
+ cat >>confdefs.h <<_ACEOF
#define $bash_tr_func 0
-EOF
+_ACEOF
fi
-echo "$as_me:6869: checking for declaration of strtoumax" >&5
+
+
+
+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 6875 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#if STDC_HEADERS
# include <stdlib.h>
@@ -6891,60 +12471,111 @@ return !strtoumax;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6894: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6897: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6900: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6903: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:6913: result: $bash_cv_decl_strtoumax" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define $bash_tr_func 1
-EOF
+_ACEOF
else
- cat >>confdefs.h <<EOF
+ cat >>confdefs.h <<_ACEOF
#define $bash_tr_func 0
-EOF
+_ACEOF
fi
+
+
+
for ac_header in sys/time.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:6931: checking for $ac_header" >&5
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-#line 6937 "configure"
-#include "confdefs.h"
+ # 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
-if { (eval echo "$as_me:6941: \"$ac_cpp conftest.$ac_ext\"") >&5
+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=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:6947: \$? = $ac_status" >&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
@@ -6955,94 +12586,155 @@ else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
- eval "$as_ac_Header=yes"
+ ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- eval "$as_ac_Header=no"
+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:6966: result: `eval echo '${'$as_ac_Header'}'`" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-EOF
+_ACEOF
fi
+
done
+
for ac_func in alarm
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:6979: checking for $ac_func" >&5
+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 6985 "configure"
-#include "confdefs.h"
+#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. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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 ();
-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;
+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:7016: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7019: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7022: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7025: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:7035: result: `eval echo '${'$as_ac_var'}'`" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-EOF
+_ACEOF
fi
done
-echo "$as_me:7045: checking for working mktime" >&5
+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
@@ -7051,8 +12743,12 @@ else
ac_cv_func_working_mktime=no
else
cat >conftest.$ac_ext <<_ACEOF
-#line 7054 "configure"
-#include "confdefs.h"
+#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 <sys/time.h>
@@ -7200,52 +12896,108 @@ main ()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:7203: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7206: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:7208: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7211: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
ac_cv_func_working_mktime=no
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:7223: result: $ac_cv_func_working_mktime" >&5
+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 libintl.h
+
+
+
+
+
+
+
+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`
-echo "$as_me:7232: checking for $ac_header" >&5
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-#line 7238 "configure"
-#include "confdefs.h"
+ # 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:7242: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:7248: \$? = $ac_status" >&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
@@ -7256,247 +13008,648 @@ else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
- eval "$as_ac_Header=yes"
+ 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
- cat conftest.$ac_ext >&5
- eval "$as_ac_Header=no"
+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:7267: result: `eval echo '${'$as_ac_Header'}'`" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-EOF
+_ACEOF
fi
+
done
-for ac_func in gettext textdomain bindtextdomain
+
+for ac_func in getpagesize
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:7280: checking for $ac_func" >&5
+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 7286 "configure"
-#include "confdefs.h"
+#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. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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 ();
-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;
+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:7317: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7320: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7323: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7326: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:7336: result: `eval echo '${'$as_ac_var'}'`" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-EOF
+_ACEOF
fi
done
-if test "$ac_cv_func_bindtextdomain" = "no"; then
-
-echo "$as_me:7348: checking for bindtextdomain in -lintl" >&5
-echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
-if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
+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
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line 7356 "configure"
-#include "confdefs.h"
+ 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) */
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
+#include <fcntl.h>
+#include <sys/mman.h>
+
+#if !STDC_HEADERS && !HAVE_STDLIB_H
+char *malloc ();
#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 ();
+
+/* 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 <sys/param.h>
+# ifdef EXEC_PAGESIZE
+# define getpagesize() EXEC_PAGESIZE
+# else /* no EXEC_PAGESIZE */
+# ifdef NBPG
+# define getpagesize() NBPG * CLSIZE
+# ifndef CLSIZE
+# define CLSIZE 1
+# endif /* no CLSIZE */
+# else /* no NBPG */
+# ifdef NBPC
+# define getpagesize() NBPC
+# else /* no NBPC */
+# ifdef PAGESIZE
+# define getpagesize() PAGESIZE
+# endif /* PAGESIZE */
+# endif /* no NBPC */
+# endif /* no NBPG */
+# endif /* no EXEC_PAGESIZE */
+# else /* no HAVE_SYS_PARAM_H */
+# define getpagesize() 8192 /* punt totally */
+# endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
int
main ()
{
-bindtextdomain ();
- ;
- return 0;
+ 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_objext conftest$ac_exeext
-if { (eval echo "$as_me:7375: \"$ac_link\"") >&5
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$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
+ 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:7384: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_lib_intl_bindtextdomain=yes
+ ac_cv_func_mmap_fixed_mapped=yes
else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_lib_intl_bindtextdomain=no
+ 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 conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
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 <<EOF
-#define HAVE_LIBINTL 1
-EOF
+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
- LIBS="-lintl $LIBS"
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MMAP 1
+_ACEOF
fi
+rm -f conftest.mmap
+
+
+
- if test "$ac_cv_lib_intl" = "yes"; then
-for ac_func in gettext textdomain bindtextdomain
+
+
+
+
+
+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:7411: checking for $ac_func" >&5
+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 7417 "configure"
-#include "confdefs.h"
+#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. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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 ();
-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;
+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:7448: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7451: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7454: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7457: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:7467: result: `eval echo '${'$as_ac_var'}'`" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-EOF
+_ACEOF
fi
done
- fi
+
+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`
-echo "$as_me:7483: checking for $ac_header" >&5
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-#line 7489 "configure"
-#include "confdefs.h"
+ # 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
-if { (eval echo "$as_me:7493: \"$ac_cpp conftest.$ac_ext\"") >&5
+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=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:7499: \$? = $ac_status" >&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
@@ -7507,44 +13660,138 @@ else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
- eval "$as_ac_Header=yes"
+ ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- eval "$as_ac_Header=no"
+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:7518: result: `eval echo '${'$as_ac_Header'}'`" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-EOF
+_ACEOF
fi
+
done
+
for ac_header in wchar.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:7531: checking for $ac_header" >&5
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-#line 7537 "configure"
-#include "confdefs.h"
+ # 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
-if { (eval echo "$as_me:7541: \"$ac_cpp conftest.$ac_ext\"") >&5
+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=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:7547: \$? = $ac_status" >&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
@@ -7555,44 +13802,138 @@ else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
- eval "$as_ac_Header=yes"
+ ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- eval "$as_ac_Header=no"
+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:7566: result: `eval echo '${'$as_ac_Header'}'`" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-EOF
+_ACEOF
fi
+
done
+
for ac_header in langinfo.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:7579: checking for $ac_header" >&5
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-#line 7585 "configure"
-#include "confdefs.h"
+ # 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:7589: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:7595: \$? = $ac_status" >&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
@@ -7603,214 +13944,614 @@ else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
- eval "$as_ac_Header=yes"
+ ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- eval "$as_ac_Header=no"
+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:7614: result: `eval echo '${'$as_ac_Header'}'`" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-EOF
+_ACEOF
fi
+
done
-echo "$as_me:7624: checking for mbsrtowcs" >&5
+
+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 7630 "configure"
-#include "confdefs.h"
+#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. */
-#include <assert.h>
+ which can conflict with char mbsrtowcs (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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 ();
-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;
+char (*f) () = mbsrtowcs;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != mbsrtowcs;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7661: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7664: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7667: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7670: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:7680: result: $ac_cv_func_mbsrtowcs" >&5
+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 <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_MBSRTOWCS 1
-EOF
+_ACEOF
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 "$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 7695 "configure"
-#include "confdefs.h"
+#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. */
-#include <assert.h>
+ which can conflict with char mbrtowc (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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 ();
-char (*f) ();
+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;
+}
+_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 <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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;
+}
+_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 <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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 <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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
-f = wcwidth;
+char (*f) () = wcwidth;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != wcwidth;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7726: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7729: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7732: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7735: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:7745: result: $ac_cv_func_wcwidth" >&5
+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 <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_WCWIDTH 1
-EOF
+_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 <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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;
+}
+_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:7754: checking for mbstate_t" >&5
+
+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
- 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"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <wchar.h>
int
main ()
{
+
mbstate_t ps;
+ mbstate_t *psp;
+ psp = (mbstate_t *)0;
+
+ ;
return 0;
}
_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:7777: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&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
+ 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:7785: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' 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
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:7797: result: $bash_cv_have_mbstate_t" >&5
+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 <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_MBSTATE_T 1
-EOF
+_ACEOF
fi
-echo "$as_me:7806: checking for nl_langinfo and CODESET" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 7812 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <langinfo.h>
int
main ()
@@ -7821,37 +14562,40 @@ char* cs = nl_langinfo(CODESET);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7824: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7827: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7830: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7833: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:7843: result: $bash_cv_langinfo_codeset" >&5
+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 <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_LANGINFO_CODESET 1
-EOF
+_ACEOF
fi
+
+
if test "$opt_static_link" != yes; then
-echo "$as_me:7854: checking for dlopen in -ldl" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7859,8 +14603,12 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 7862 "configure"
-#include "confdefs.h"
+#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
@@ -7878,171 +14626,205 @@ dlopen ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7881: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7884: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7887: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7890: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_dl_dlopen=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:7901: result: $ac_cv_lib_dl_dlopen" >&5
+echo "$as_me:$LINENO: 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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define HAVE_LIBDL 1
-EOF
+_ACEOF
LIBS="-ldl $LIBS"
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 "$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 7921 "configure"
-#include "confdefs.h"
+#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. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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 ();
-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;
+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:7952: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7955: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7958: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7961: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:7971: result: `eval echo '${'$as_ac_var'}'`" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-EOF
+_ACEOF
fi
done
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 "$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 7989 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <signal.h>
-/* NetBSD declares sys_siglist in unistd.h. */
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
+#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 ()
{
-char *msg = *(sys_siglist + 1);
+#ifndef sys_siglist
+ char *p = (char *) sys_siglist;
+#endif
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8007: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:8010: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:8013: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8016: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_decl_sys_siglist=yes
+ ac_cv_have_decl_sys_siglist=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_decl_sys_siglist=no
+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: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
+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
-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 "$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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 8044 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <netinet/in.h>
@@ -8057,31 +14839,32 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8060: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:8063: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:8066: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8069: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:8079: result: $bash_cv_func_inet_aton" >&5
+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 <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_INET_ATON 1
-EOF
+_ACEOF
else
LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
@@ -8091,7 +14874,7 @@ fi
case "$host_os" in
irix4*)
-echo "$as_me:8094: checking for getpwent in -lsun" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8099,8 +14882,12 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsun $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 8102 "configure"
-#include "confdefs.h"
+#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
@@ -8118,32 +14905,33 @@ getpwent ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8121: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:8124: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:8127: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8130: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_sun_getpwent=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:8141: result: $ac_cv_lib_sun_getpwent" >&5
+echo "$as_me:$LINENO: 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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define HAVE_LIBSUN 1
-EOF
+_ACEOF
LIBS="-lsun $LIBS"
@@ -8156,14 +14944,14 @@ if test "$ac_cv_func_getpeername" = no; then
if test "X$bash_cv_have_socklib" = "X"; then
_bash_needmsg=
else
-echo "$as_me:8159: checking for socket library" >&5
+echo "$as_me:$LINENO: checking for socket library" >&5
echo $ECHO_N "checking for socket library... $ECHO_C" >&6
_bash_needmsg=yes
fi
if test "${bash_cv_have_socklib+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$as_me:8166: checking for getpeername in -lsocket" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8171,8 +14959,12 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket -lnsl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 8174 "configure"
-#include "confdefs.h"
+#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
@@ -8190,27 +14982,28 @@ getpeername ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8193: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:8196: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:8199: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8202: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_socket_getpeername=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:8213: result: $ac_cv_lib_socket_getpeername" >&5
+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
bash_cv_have_socklib=yes
@@ -8221,7 +15014,7 @@ fi
fi
if test "X$_bash_needmsg" = Xyes; then
- echo "$as_me:8224: result: $bash_cv_have_socklib" >&5
+ echo "$as_me:$LINENO: result: $bash_cv_have_socklib" >&5
echo "${ECHO_T}$bash_cv_have_socklib" >&6
_bash_needmsg=
fi
@@ -8230,14 +15023,14 @@ if test $bash_cv_have_socklib = yes; then
if test "X$bash_cv_have_libnsl" = "X"; then
_bash_needmsg=
else
- echo "$as_me:8233: checking for libnsl" >&5
+ echo "$as_me:$LINENO: checking for libnsl" >&5
echo $ECHO_N "checking for libnsl... $ECHO_C" >&6
_bash_needmsg=yes
fi
if test "${bash_cv_have_libnsl+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$as_me:8240: checking for t_open in -lnsl" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8245,8 +15038,12 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 8248 "configure"
-#include "confdefs.h"
+#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
@@ -8264,27 +15061,28 @@ t_open ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8267: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:8270: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:8273: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8276: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_nsl_t_open=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:8287: result: $ac_cv_lib_nsl_t_open" >&5
+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
bash_cv_have_libnsl=yes
@@ -8295,7 +15093,7 @@ fi
fi
if test "X$_bash_needmsg" = Xyes; then
- echo "$as_me:8298: result: $bash_cv_have_libnsl" >&5
+ echo "$as_me:$LINENO: result: $bash_cv_have_libnsl" >&5
echo "${ECHO_T}$bash_cv_have_libnsl" >&6
_bash_needmsg=
fi
@@ -8304,13 +15102,13 @@ echo "${ECHO_T}$bash_cv_have_libnsl" >&6
else
LIBS="-lsocket $LIBS"
fi
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBSOCKET 1
-EOF
+_ACEOF
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_GETPEERNAME 1
-EOF
+_ACEOF
fi
@@ -8319,7 +15117,7 @@ if test "$ac_cv_func_gethostbyname" = no; then
if test "X$bash_cv_have_gethostbyname" = "X"; then
_bash_needmsg=yes
else
-echo "$as_me:8322: checking for gethostbyname in socket library" >&5
+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=
fi
@@ -8327,8 +15125,12 @@ if test "${bash_cv_have_gethostbyname+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 8330 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <netdb.h>
int
main ()
@@ -8341,21 +15143,22 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8344: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:8347: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:8350: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8353: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+sed 's/^/| /' conftest.$ac_ext >&5
+
bash_cv_have_gethostbyname=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -8363,33 +15166,37 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
if test "X$_bash_needmsg" = Xyes; then
- echo "$as_me:8366: checking for gethostbyname in socket library" >&5
+ 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:8369: result: $bash_cv_have_gethostbyname" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HAVE_GETHOSTBYNAME 1
-EOF
+_ACEOF
fi
fi
-echo "$as_me:8380: checking for uid_t in sys/types.h" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 8386 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "uid_t" >/dev/null 2>&1; then
+ $EGREP "uid_t" >/dev/null 2>&1; then
ac_cv_type_uid_t=yes
else
ac_cv_type_uid_t=no
@@ -8397,21 +15204,22 @@ fi
rm -f conftest*
fi
-echo "$as_me:8400: result: $ac_cv_type_uid_t" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define uid_t int
-EOF
+_ACEOF
+
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define gid_t int
-EOF
+_ACEOF
fi
-echo "$as_me:8414: checking type of array argument to getgroups" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8420,8 +15228,12 @@ else
ac_cv_type_getgroups=cross
else
cat >conftest.$ac_ext <<_ACEOF
-#line 8423 "configure"
-#include "confdefs.h"
+#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 <sys/types.h>
#define NGID 256
@@ -8446,34 +15258,40 @@ main ()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:8449: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:8452: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:8454: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8457: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_type_getgroups=gid_t
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
ac_cv_type_getgroups=int
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+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 8470 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <unistd.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
+ $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
ac_cv_type_getgroups=gid_t
else
ac_cv_type_getgroups=int
@@ -8482,21 +15300,26 @@ rm -f conftest*
fi
fi
-echo "$as_me:8485: result: $ac_cv_type_getgroups" >&5
+echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
echo "${ECHO_T}$ac_cv_type_getgroups" >&6
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define GETGROUPS_T $ac_cv_type_getgroups
-EOF
+_ACEOF
+
-echo "$as_me:8492: checking for off_t" >&5
+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 8498 "configure"
-#include "confdefs.h"
+#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 ()
@@ -8510,45 +15333,50 @@ if (sizeof (off_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8513: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:8516: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:8519: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8522: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:8532: result: $ac_cv_type_off_t" >&5
+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 <<EOF
+cat >>confdefs.h <<_ACEOF
#define off_t long
-EOF
+_ACEOF
fi
-echo "$as_me:8544: checking for mode_t" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 8550 "configure"
-#include "confdefs.h"
+#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 ()
@@ -8562,50 +15390,55 @@ if (sizeof (mode_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8565: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:8568: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:8571: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8574: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:8584: result: $ac_cv_type_mode_t" >&5
+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
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define mode_t int
-EOF
+_ACEOF
fi
-echo "$as_me:8596: checking for uid_t in sys/types.h" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 8602 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "uid_t" >/dev/null 2>&1; then
+ $EGREP "uid_t" >/dev/null 2>&1; then
ac_cv_type_uid_t=yes
else
ac_cv_type_uid_t=no
@@ -8613,28 +15446,33 @@ fi
rm -f conftest*
fi
-echo "$as_me:8616: result: $ac_cv_type_uid_t" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define uid_t int
-EOF
+_ACEOF
-cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define gid_t int
-EOF
+_ACEOF
fi
-echo "$as_me:8630: checking for pid_t" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 8636 "configure"
-#include "confdefs.h"
+#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 ()
@@ -8648,45 +15486,50 @@ if (sizeof (pid_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8651: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:8654: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:8657: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8660: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:8670: result: $ac_cv_type_pid_t" >&5
+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
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define pid_t int
-EOF
+_ACEOF
fi
-echo "$as_me:8682: checking for size_t" >&5
+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 8688 "configure"
-#include "confdefs.h"
+#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 ()
@@ -8700,45 +15543,50 @@ if (sizeof (size_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8703: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:8706: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:8709: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8712: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:8722: result: $ac_cv_type_size_t" >&5
+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 <<EOF
+cat >>confdefs.h <<_ACEOF
#define size_t unsigned
-EOF
+_ACEOF
fi
-echo "$as_me:8734: checking for ssize_t" >&5
+echo "$as_me:$LINENO: checking for ssize_t" >&5
echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
if test "${ac_cv_type_ssize_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 8740 "configure"
-#include "confdefs.h"
+#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 ()
@@ -8752,45 +15600,50 @@ if (sizeof (ssize_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8755: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:8758: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:8761: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8764: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:8774: result: $ac_cv_type_ssize_t" >&5
+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
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define ssize_t int
-EOF
+_ACEOF
fi
-echo "$as_me:8786: checking for time_t" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 8792 "configure"
-#include "confdefs.h"
+#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 ()
@@ -8804,45 +15657,52 @@ if (sizeof (time_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8807: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:8810: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:8813: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8816: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:8826: result: $ac_cv_type_time_t" >&5
+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
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define time_t long
-EOF
+_ACEOF
fi
-echo "$as_me:8838: checking for long long" >&5
+
+
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 8844 "configure"
-#include "confdefs.h"
+#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;
int
@@ -8857,42 +15717,48 @@ return ll << i | ll >> i | llm / ll | llm % ll;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8860: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:8863: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:8866: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8869: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:8879: result: $bash_cv_type_long_long" >&5
+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 <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_LONG_LONG 1
-EOF
+_ACEOF
fi
-echo "$as_me:8888: checking for unsigned long long" >&5
+
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 8894 "configure"
-#include "confdefs.h"
+#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
@@ -8907,42 +15773,48 @@ return ull << i | ull >> i | ullmax / ull | ullmax % ull;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8910: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:8913: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:8916: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8919: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:8929: result: $bash_cv_type_unsigned_long_long" >&5
+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 <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_UNSIGNED_LONG_LONG 1
-EOF
+_ACEOF
fi
-echo "$as_me:8938: checking return type of signal handlers" >&5
+
+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 8944 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <signal.h>
#ifdef signal
@@ -8963,40 +15835,47 @@ int i;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8966: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:8969: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:8972: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8975: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+sed 's/^/| /' 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 "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
echo "${ECHO_T}$ac_cv_type_signal" >&6
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define RETSIGTYPE $ac_cv_type_signal
-EOF
+_ACEOF
+
+
-echo "$as_me:8992: checking for char" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 8998 "configure"
-#include "confdefs.h"
+#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 ()
@@ -9010,209 +15889,328 @@ if (sizeof (char))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9013: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9016: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9019: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9022: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+sed 's/^/| /' 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 "$as_me:$LINENO: result: $ac_cv_type_char" >&5
echo "${ECHO_T}$ac_cv_type_char" >&6
-echo "$as_me:9035: checking size of char" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
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 9044 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (char)) >= 0)]
+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:9056: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9059: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9062: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9065: \$? = $ac_status" >&5
+ 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 9070 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (char)) <= $ac_mid)]
+static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9082: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9085: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9088: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9091: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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`
+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
done
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_hi=-1 ac_mid=-1
+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 9107 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (char)) >= $ac_mid)]
+static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9119: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9122: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9125: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9128: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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`
+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
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
cat >conftest.$ac_ext <<_ACEOF
-#line 9144 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (char)) <= $ac_mid)]
+static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9156: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9159: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9162: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9165: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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`
+sed 's/^/| /' 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
+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:9178: error: cannot run test program while cross compiling" >&5
-echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { { 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 9183 "configure"
-#include "confdefs.h"
+#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 <stdio.h>
+#include <stdlib.h>
int
main ()
{
-FILE *f = fopen ("conftest.val", "w");
-if (!f)
- exit (1);
-fprintf (f, "%d", (sizeof (char)));
-fclose (f);
+
+ 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;
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:9199: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:9202: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:9204: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9207: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_sizeof_char=`cat conftest.val`
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&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 conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
@@ -9220,20 +16218,25 @@ else
ac_cv_sizeof_char=0
fi
fi
-echo "$as_me:9223: result: $ac_cv_sizeof_char" >&5
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
echo "${ECHO_T}$ac_cv_sizeof_char" >&6
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define SIZEOF_CHAR $ac_cv_sizeof_char
-EOF
+_ACEOF
+
-echo "$as_me:9229: checking for short" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 9235 "configure"
-#include "confdefs.h"
+#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 ()
@@ -9247,209 +16250,328 @@ if (sizeof (short))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9250: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9253: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9256: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9259: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+sed 's/^/| /' 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 "$as_me:$LINENO: result: $ac_cv_type_short" >&5
echo "${ECHO_T}$ac_cv_type_short" >&6
-echo "$as_me:9272: checking size of short" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
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 9281 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (short)) >= 0)]
+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:9293: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9296: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9299: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9302: \$? = $ac_status" >&5
+ 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 9307 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (short)) <= $ac_mid)]
+static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9319: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9322: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9325: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9328: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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`
+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
done
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_hi=-1 ac_mid=-1
+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 9344 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (short)) >= $ac_mid)]
+static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9356: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9359: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9362: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9365: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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`
+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
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
cat >conftest.$ac_ext <<_ACEOF
-#line 9381 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (short)) <= $ac_mid)]
+static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9393: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9396: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9399: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9402: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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`
+sed 's/^/| /' 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
+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:9415: error: cannot run test program while cross compiling" >&5
-echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { { 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 9420 "configure"
-#include "confdefs.h"
+#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 <stdio.h>
+#include <stdlib.h>
int
main ()
{
-FILE *f = fopen ("conftest.val", "w");
-if (!f)
- exit (1);
-fprintf (f, "%d", (sizeof (short)));
-fclose (f);
+
+ 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;
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:9436: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:9439: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:9441: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9444: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_sizeof_short=`cat conftest.val`
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&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 conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
@@ -9457,20 +16579,25 @@ else
ac_cv_sizeof_short=0
fi
fi
-echo "$as_me:9460: result: $ac_cv_sizeof_short" >&5
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
echo "${ECHO_T}$ac_cv_sizeof_short" >&6
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define SIZEOF_SHORT $ac_cv_sizeof_short
-EOF
+_ACEOF
+
-echo "$as_me:9466: checking for int" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 9472 "configure"
-#include "confdefs.h"
+#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 ()
@@ -9484,209 +16611,328 @@ if (sizeof (int))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9487: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9490: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9493: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9496: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+sed 's/^/| /' 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 "$as_me:$LINENO: result: $ac_cv_type_int" >&5
echo "${ECHO_T}$ac_cv_type_int" >&6
-echo "$as_me:9509: checking size of int" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
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 9518 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (int)) >= 0)]
+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:9530: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9533: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9536: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9539: \$? = $ac_status" >&5
+ 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 9544 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)]
+static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9556: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9559: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9562: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9565: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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`
+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
done
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_hi=-1 ac_mid=-1
+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 9581 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (int)) >= $ac_mid)]
+static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9593: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9596: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9599: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9602: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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`
+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
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
cat >conftest.$ac_ext <<_ACEOF
-#line 9618 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)]
+static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9630: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9633: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9636: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9639: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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`
+sed 's/^/| /' 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
+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:9652: error: cannot run test program while cross compiling" >&5
-echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { { 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 9657 "configure"
-#include "confdefs.h"
+#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 <stdio.h>
+#include <stdlib.h>
int
main ()
{
-FILE *f = fopen ("conftest.val", "w");
-if (!f)
- exit (1);
-fprintf (f, "%d", (sizeof (int)));
-fclose (f);
+
+ 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;
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:9673: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:9676: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:9678: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9681: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_sizeof_int=`cat conftest.val`
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&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 conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
@@ -9694,20 +16940,25 @@ else
ac_cv_sizeof_int=0
fi
fi
-echo "$as_me:9697: result: $ac_cv_sizeof_int" >&5
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
echo "${ECHO_T}$ac_cv_sizeof_int" >&6
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define SIZEOF_INT $ac_cv_sizeof_int
-EOF
+_ACEOF
-echo "$as_me:9703: checking for long" >&5
+
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 9709 "configure"
-#include "confdefs.h"
+#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 ()
@@ -9721,209 +16972,328 @@ if (sizeof (long))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9724: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9727: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9730: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9733: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+sed 's/^/| /' 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 "$as_me:$LINENO: result: $ac_cv_type_long" >&5
echo "${ECHO_T}$ac_cv_type_long" >&6
-echo "$as_me:9746: checking size of long" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
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 9755 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (long)) >= 0)]
+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:9767: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9770: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9773: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9776: \$? = $ac_status" >&5
+ 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 9781 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)]
+static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9793: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9796: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9799: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9802: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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`
+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
done
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_hi=-1 ac_mid=-1
+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 9818 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (long)) >= $ac_mid)]
+static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9830: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9833: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9836: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9839: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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`
+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
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
cat >conftest.$ac_ext <<_ACEOF
-#line 9855 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)]
+static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9867: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9870: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9873: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9876: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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`
+sed 's/^/| /' 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
+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:9889: error: cannot run test program while cross compiling" >&5
-echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { { 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 9894 "configure"
-#include "confdefs.h"
+#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 <stdio.h>
+#include <stdlib.h>
int
main ()
{
-FILE *f = fopen ("conftest.val", "w");
-if (!f)
- exit (1);
-fprintf (f, "%d", (sizeof (long)));
-fclose (f);
+
+ 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;
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:9910: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:9913: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:9915: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9918: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_sizeof_long=`cat conftest.val`
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&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 conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
@@ -9931,20 +17301,25 @@ else
ac_cv_sizeof_long=0
fi
fi
-echo "$as_me:9934: result: $ac_cv_sizeof_long" >&5
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
echo "${ECHO_T}$ac_cv_sizeof_long" >&6
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG $ac_cv_sizeof_long
-EOF
+_ACEOF
+
-echo "$as_me:9940: checking for char *" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 9946 "configure"
-#include "confdefs.h"
+#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 ()
@@ -9958,209 +17333,328 @@ if (sizeof (char *))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9961: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9964: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9967: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9970: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:9980: result: $ac_cv_type_char_p" >&5
+echo "$as_me:$LINENO: 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 "$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
echo $ECHO_N "(cached) $ECHO_C" >&6
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 9992 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (char *)) >= 0)]
+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:10004: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10007: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10010: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10013: \$? = $ac_status" >&5
+ 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 10018 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (char *)) <= $ac_mid)]
+static int test_array [1 - 2 * !(((long) (sizeof (char *))) <= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10030: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10033: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10036: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10039: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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`
+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
done
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_hi=-1 ac_mid=-1
+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 10055 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (char *)) >= $ac_mid)]
+static int test_array [1 - 2 * !(((long) (sizeof (char *))) >= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10067: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10070: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10073: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10076: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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`
+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
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
cat >conftest.$ac_ext <<_ACEOF
-#line 10092 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (char *)) <= $ac_mid)]
+static int test_array [1 - 2 * !(((long) (sizeof (char *))) <= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10104: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10107: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10110: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10113: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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`
+sed 's/^/| /' 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
+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:10126: error: cannot run test program while cross compiling" >&5
-echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { { 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 10131 "configure"
-#include "confdefs.h"
+#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 <stdio.h>
+#include <stdlib.h>
int
main ()
{
-FILE *f = fopen ("conftest.val", "w");
-if (!f)
- exit (1);
-fprintf (f, "%d", (sizeof (char *)));
-fclose (f);
+
+ 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;
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:10147: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10150: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:10152: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10155: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_sizeof_char_p=`cat conftest.val`
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&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 conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
@@ -10168,20 +17662,25 @@ else
ac_cv_sizeof_char_p=0
fi
fi
-echo "$as_me:10171: result: $ac_cv_sizeof_char_p" >&5
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_char_p" >&5
echo "${ECHO_T}$ac_cv_sizeof_char_p" >&6
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
-EOF
+_ACEOF
+
-echo "$as_me:10177: checking for double" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 10183 "configure"
-#include "confdefs.h"
+#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 ()
@@ -10195,209 +17694,328 @@ if (sizeof (double))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10198: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10201: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10204: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10207: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+sed 's/^/| /' 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 "$as_me:$LINENO: result: $ac_cv_type_double" >&5
echo "${ECHO_T}$ac_cv_type_double" >&6
-echo "$as_me:10220: checking size of double" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
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 10229 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (double)) >= 0)]
+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:10241: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10244: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10247: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10250: \$? = $ac_status" >&5
+ 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 10255 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (double)) <= $ac_mid)]
+static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10267: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10270: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10273: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10276: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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`
+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
done
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_hi=-1 ac_mid=-1
+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 10292 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (double)) >= $ac_mid)]
+static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10304: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10307: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10310: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10313: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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`
+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
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
cat >conftest.$ac_ext <<_ACEOF
-#line 10329 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (double)) <= $ac_mid)]
+static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10341: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10344: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10347: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10350: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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`
+sed 's/^/| /' 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
+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:10363: error: cannot run test program while cross compiling" >&5
-echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { { 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 10368 "configure"
-#include "confdefs.h"
+#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 <stdio.h>
+#include <stdlib.h>
int
main ()
{
-FILE *f = fopen ("conftest.val", "w");
-if (!f)
- exit (1);
-fprintf (f, "%d", (sizeof (double)));
-fclose (f);
+
+ 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;
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:10384: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10387: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:10389: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10392: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_sizeof_double=`cat conftest.val`
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&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 conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
@@ -10405,20 +18023,25 @@ else
ac_cv_sizeof_double=0
fi
fi
-echo "$as_me:10408: result: $ac_cv_sizeof_double" >&5
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
echo "${ECHO_T}$ac_cv_sizeof_double" >&6
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define SIZEOF_DOUBLE $ac_cv_sizeof_double
-EOF
+_ACEOF
-echo "$as_me:10414: checking for long long" >&5
+
+echo "$as_me:$LINENO: checking for long long" >&5
echo $ECHO_N "checking for long long... $ECHO_C" >&6
if test "${ac_cv_type_long_long+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 10420 "configure"
-#include "confdefs.h"
+#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 ()
@@ -10432,209 +18055,328 @@ if (sizeof (long long))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10435: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10438: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10441: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10444: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:10454: result: $ac_cv_type_long_long" >&5
+echo "$as_me:$LINENO: 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 "$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
echo $ECHO_N "(cached) $ECHO_C" >&6
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 10466 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (long long)) >= 0)]
+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:10478: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10481: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10484: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10487: \$? = $ac_status" >&5
+ 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 10492 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (long long)) <= $ac_mid)]
+static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10504: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10507: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10510: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10513: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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`
+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
done
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_hi=-1 ac_mid=-1
+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 10529 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (long long)) >= $ac_mid)]
+static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10541: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10544: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10547: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10550: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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`
+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
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
cat >conftest.$ac_ext <<_ACEOF
-#line 10566 "configure"
-#include "confdefs.h"
+#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 ()
{
-int _array_ [1 - 2 * !((sizeof (long long)) <= $ac_mid)]
+static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10578: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10581: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10584: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10587: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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`
+sed 's/^/| /' 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
+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:10600: error: cannot run test program while cross compiling" >&5
-echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { { 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 10605 "configure"
-#include "confdefs.h"
+#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 <stdio.h>
+#include <stdlib.h>
int
main ()
{
-FILE *f = fopen ("conftest.val", "w");
-if (!f)
- exit (1);
-fprintf (f, "%d", (sizeof (long long)));
-fclose (f);
+
+ 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;
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:10621: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10624: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:10626: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10629: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_sizeof_long_long=`cat conftest.val`
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&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 conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
@@ -10642,20 +18384,26 @@ else
ac_cv_sizeof_long_long=0
fi
fi
-echo "$as_me:10645: result: $ac_cv_sizeof_long_long" >&5
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
-EOF
+_ACEOF
+
+
-echo "$as_me:10651: checking for u_int" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 10657 "configure"
-#include "confdefs.h"
+#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 ()
@@ -10669,45 +18417,50 @@ if (sizeof (u_int))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10672: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10675: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10678: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10681: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:10691: result: $ac_cv_type_u_int" >&5
+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
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define u_int unsigned int
-EOF
+_ACEOF
fi
-echo "$as_me:10703: checking for u_long" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 10709 "configure"
-#include "confdefs.h"
+#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 ()
@@ -10721,46 +18474,53 @@ if (sizeof (u_long))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10724: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10727: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10730: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10733: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:10743: result: $ac_cv_type_u_long" >&5
+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
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define u_long unsigned long
-EOF
+_ACEOF
fi
+
+
if test "$ac_cv_sizeof_short" = 2; then
- echo "$as_me:10756: checking for bits16_t" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 10762 "configure"
-#include "confdefs.h"
+#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 ()
@@ -10774,46 +18534,51 @@ if (sizeof (bits16_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10777: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10780: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10783: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10786: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:10796: result: $ac_cv_type_bits16_t" >&5
+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
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define bits16_t short
-EOF
+_ACEOF
fi
elif test "$ac_cv_sizeof_char" = 2; then
- echo "$as_me:10809: checking for bits16_t" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 10815 "configure"
-#include "confdefs.h"
+#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 ()
@@ -10827,46 +18592,51 @@ if (sizeof (bits16_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10830: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10833: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10836: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10839: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:10849: result: $ac_cv_type_bits16_t" >&5
+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
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define bits16_t char
-EOF
+_ACEOF
fi
else
- echo "$as_me:10862: checking for bits16_t" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 10868 "configure"
-#include "confdefs.h"
+#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 ()
@@ -10880,48 +18650,54 @@ if (sizeof (bits16_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10883: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10886: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10889: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10892: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:10902: result: $ac_cv_type_bits16_t" >&5
+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
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define bits16_t short
-EOF
+_ACEOF
fi
fi
+
if test "$ac_cv_sizeof_short" = 2; then
- echo "$as_me:10917: checking for u_bits16_t" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 10923 "configure"
-#include "confdefs.h"
+#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 ()
@@ -10935,46 +18711,51 @@ if (sizeof (u_bits16_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10938: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10941: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10944: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10947: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:10957: result: $ac_cv_type_u_bits16_t" >&5
+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
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define u_bits16_t unsigned short
-EOF
+_ACEOF
fi
elif test "$ac_cv_sizeof_char" = 2; then
- echo "$as_me:10970: checking for u_bits16_t" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 10976 "configure"
-#include "confdefs.h"
+#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 ()
@@ -10988,46 +18769,51 @@ if (sizeof (u_bits16_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10991: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10994: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10997: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11000: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:11010: result: $ac_cv_type_u_bits16_t" >&5
+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
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define u_bits16_t unsigned char
-EOF
+_ACEOF
fi
else
- echo "$as_me:11023: checking for u_bits16_t" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11029 "configure"
-#include "confdefs.h"
+#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 ()
@@ -11041,48 +18827,54 @@ if (sizeof (u_bits16_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11044: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11047: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11050: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11053: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:11063: result: $ac_cv_type_u_bits16_t" >&5
+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
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define u_bits16_t unsigned short
-EOF
+_ACEOF
fi
fi
+
if test "$ac_cv_sizeof_int" = 4; then
- echo "$as_me:11078: checking for bits32_t" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11084 "configure"
-#include "confdefs.h"
+#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 ()
@@ -11096,46 +18888,51 @@ if (sizeof (bits32_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11099: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11102: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11105: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11108: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:11118: result: $ac_cv_type_bits32_t" >&5
+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
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define bits32_t int
-EOF
+_ACEOF
fi
elif test "$ac_cv_sizeof_long" = 4; then
- echo "$as_me:11131: checking for bits32_t" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11137 "configure"
-#include "confdefs.h"
+#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 ()
@@ -11149,46 +18946,51 @@ if (sizeof (bits32_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11152: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11155: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11158: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11161: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:11171: result: $ac_cv_type_bits32_t" >&5
+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
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define bits32_t long
-EOF
+_ACEOF
fi
else
- echo "$as_me:11184: checking for bits32_t" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11190 "configure"
-#include "confdefs.h"
+#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 ()
@@ -11202,48 +19004,54 @@ if (sizeof (bits32_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11205: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11208: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11211: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11214: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:11224: result: $ac_cv_type_bits32_t" >&5
+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
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define bits32_t int
-EOF
+_ACEOF
fi
fi
+
if test "$ac_cv_sizeof_int" = 4; then
- echo "$as_me:11239: checking for u_bits32_t" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11245 "configure"
-#include "confdefs.h"
+#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 ()
@@ -11257,46 +19065,51 @@ if (sizeof (u_bits32_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11260: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11263: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11266: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11269: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:11279: result: $ac_cv_type_u_bits32_t" >&5
+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
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define u_bits32_t unsigned int
-EOF
+_ACEOF
fi
elif test "$ac_cv_sizeof_long" = 4; then
- echo "$as_me:11292: checking for u_bits32_t" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11298 "configure"
-#include "confdefs.h"
+#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 ()
@@ -11310,46 +19123,51 @@ if (sizeof (u_bits32_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11313: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11316: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11319: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11322: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:11332: result: $ac_cv_type_u_bits32_t" >&5
+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
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define u_bits32_t unsigned long
-EOF
+_ACEOF
fi
else
- echo "$as_me:11345: checking for u_bits32_t" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11351 "configure"
-#include "confdefs.h"
+#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 ()
@@ -11363,48 +19181,54 @@ if (sizeof (u_bits32_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11366: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11369: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11372: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11375: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:11385: result: $ac_cv_type_u_bits32_t" >&5
+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
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define u_bits32_t unsigned int
-EOF
+_ACEOF
fi
fi
+
if test "$ac_cv_sizeof_char_p" = 8; then
- echo "$as_me:11400: checking for bits64_t" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11406 "configure"
-#include "confdefs.h"
+#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 ()
@@ -11418,46 +19242,51 @@ if (sizeof (bits64_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11421: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11424: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11427: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11430: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:11440: result: $ac_cv_type_bits64_t" >&5
+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
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define bits64_t char *
-EOF
+_ACEOF
fi
elif test "$ac_cv_sizeof_double" = 8; then
- echo "$as_me:11453: checking for bits64_t" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11459 "configure"
-#include "confdefs.h"
+#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 ()
@@ -11471,46 +19300,51 @@ if (sizeof (bits64_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11474: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11477: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11480: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11483: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:11493: result: $ac_cv_type_bits64_t" >&5
+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
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define bits64_t double
-EOF
+_ACEOF
fi
elif test -n "$ac_cv_type_long_long" && test "$ac_cv_sizeof_long_long" = 8; then
- echo "$as_me:11506: checking for bits64_t" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11512 "configure"
-#include "confdefs.h"
+#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 ()
@@ -11524,46 +19358,51 @@ if (sizeof (bits64_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11527: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11530: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11533: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11536: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:11546: result: $ac_cv_type_bits64_t" >&5
+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
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define bits64_t long long
-EOF
+_ACEOF
fi
elif test "$ac_cv_sizeof_long" = 8; then
- echo "$as_me:11559: checking for bits64_t" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11565 "configure"
-#include "confdefs.h"
+#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 ()
@@ -11577,46 +19416,51 @@ if (sizeof (bits64_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11580: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11583: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11586: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11589: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:11599: result: $ac_cv_type_bits64_t" >&5
+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
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define bits64_t long
-EOF
+_ACEOF
fi
else
- echo "$as_me:11612: checking for bits64_t" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11618 "configure"
-#include "confdefs.h"
+#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 ()
@@ -11630,48 +19474,55 @@ if (sizeof (bits64_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11633: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11636: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11639: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11642: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:11652: result: $ac_cv_type_bits64_t" >&5
+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
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define bits64_t double
-EOF
+_ACEOF
fi
fi
+
+
if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then
- echo "$as_me:11667: checking for ptrdiff_t" >&5
+ echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6
if test "${ac_cv_type_ptrdiff_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11673 "configure"
-#include "confdefs.h"
+#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 ()
@@ -11685,46 +19536,51 @@ if (sizeof (ptrdiff_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11688: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11691: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11694: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11697: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:11707: result: $ac_cv_type_ptrdiff_t" >&5
+echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5
echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6
if test $ac_cv_type_ptrdiff_t = yes; then
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define ptrdiff_t int
-EOF
+_ACEOF
fi
elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then
- echo "$as_me:11720: checking for ptrdiff_t" >&5
+ echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6
if test "${ac_cv_type_ptrdiff_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11726 "configure"
-#include "confdefs.h"
+#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 ()
@@ -11738,46 +19594,51 @@ if (sizeof (ptrdiff_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11741: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11744: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11747: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11750: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:11760: result: $ac_cv_type_ptrdiff_t" >&5
+echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5
echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6
if test $ac_cv_type_ptrdiff_t = yes; then
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define ptrdiff_t long
-EOF
+_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:11773: checking for ptrdiff_t" >&5
+ echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6
if test "${ac_cv_type_ptrdiff_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11779 "configure"
-#include "confdefs.h"
+#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 ()
@@ -11791,46 +19652,51 @@ if (sizeof (ptrdiff_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11794: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11797: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11800: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11803: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:11813: result: $ac_cv_type_ptrdiff_t" >&5
+echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5
echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6
if test $ac_cv_type_ptrdiff_t = yes; then
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define ptrdiff_t long long
-EOF
+_ACEOF
fi
else
- echo "$as_me:11826: checking for ptrdiff_t" >&5
+ echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6
if test "${ac_cv_type_ptrdiff_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11832 "configure"
-#include "confdefs.h"
+#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 ()
@@ -11844,47 +19710,53 @@ if (sizeof (ptrdiff_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11847: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11850: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11853: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11856: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:11866: result: $ac_cv_type_ptrdiff_t" >&5
+echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5
echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6
if test $ac_cv_type_ptrdiff_t = yes; then
:
else
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define ptrdiff_t int
-EOF
+_ACEOF
fi
fi
-echo "$as_me:11880: checking whether stat file-mode macros are broken" >&5
+
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11886 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/stat.h>
@@ -11914,7 +19786,7 @@ You lose.
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "You lose" >/dev/null 2>&1; then
+ $EGREP "You lose" >/dev/null 2>&1; then
ac_cv_header_stat_broken=yes
else
ac_cv_header_stat_broken=no
@@ -11922,17 +19794,18 @@ fi
rm -f conftest*
fi
-echo "$as_me:11925: result: $ac_cv_header_stat_broken" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define STAT_MACROS_BROKEN 1
-EOF
+_ACEOF
fi
-echo "$as_me:11935: checking whether #! works in shell scripts" >&5
+
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11949,26 +19822,30 @@ else
fi
rm -f conftest
fi
-echo "$as_me:11952: result: $ac_cv_sys_interpreter" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HAVE_HASH_BANG_EXEC 1
-EOF
+_ACEOF
fi
if test "$ac_cv_func_lstat" = "no"; then
-echo "$as_me:11964: checking for lstat" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11970 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/stat.h>
@@ -11982,49 +19859,138 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11985: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11988: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11991: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11994: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:12004: result: $bash_cv_func_lstat" >&5
+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 <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_LSTAT 1
-EOF
+_ACEOF
fi
fi
-echo "$as_me:12015: checking if dup2 fails to clear the close-on-exec flag" >&5
+
+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 <locale.h>
+#endif
+#include <stdio.h>
+#include <ctype.h>
+
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
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:$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 12026 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <fcntl.h>
@@ -12044,50 +20010,57 @@ main()
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:12047: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12050: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:12052: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12055: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
bash_cv_dup2_broken=yes
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
bash_cv_dup2_broken=no
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:12069: result: $bash_cv_dup2_broken" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define DUP2_BROKEN 1
-EOF
+_ACEOF
fi
-echo "$as_me:12078: checking whether pgrps need synchronization" >&5
+
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
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:$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 12089 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#ifdef HAVE_UNISTD_H
# include <unistd.h>
@@ -12139,46 +20112,53 @@ main()
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:12142: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12145: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:12147: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12150: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
bash_cv_pgrp_pipe=no
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
bash_cv_pgrp_pipe=yes
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:12164: result: $bash_cv_pgrp_pipe" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define PGRP_PIPE 1
-EOF
+_ACEOF
fi
-echo "$as_me:12173: checking for type of signal functions" >&5
+
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12180 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <signal.h>
int
main ()
@@ -12195,25 +20175,30 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12198: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12201: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12204: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12207: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+sed 's/^/| /' conftest.$ac_ext >&5
+
cat >conftest.$ac_ext <<_ACEOF
-#line 12215 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <signal.h>
int
main ()
@@ -12227,25 +20212,30 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12230: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12233: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12236: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12239: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
cat >conftest.$ac_ext <<_ACEOF
-#line 12247 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <signal.h>
RETSIGTYPE foo() { }
@@ -12262,21 +20252,22 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12265: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12268: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12271: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12274: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+sed 's/^/| /' conftest.$ac_ext >&5
+
bash_cv_signal_vintage=v7
fi
@@ -12290,33 +20281,38 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:12293: result: $bash_cv_signal_vintage" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HAVE_POSIX_SIGNALS 1
-EOF
+_ACEOF
elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HAVE_BSD_SIGNALS 1
-EOF
+_ACEOF
elif test "$bash_cv_signal_vintage" = svr3; then
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HAVE_USG_SIGHOLD 1
-EOF
+_ACEOF
fi
-echo "$as_me:12312: checking for sys_errlist and sys_nerr" >&5
+
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12318 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <errno.h>
int
main ()
@@ -12329,47 +20325,53 @@ extern char *sys_errlist[];
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12332: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12335: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12338: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12341: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:12351: result: $bash_cv_sys_errlist" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HAVE_SYS_ERRLIST 1
-EOF
+_ACEOF
fi
-echo "$as_me:12360: checking for sys_siglist in system C library" >&5
+
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
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:$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 12371 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <signal.h>
@@ -12386,44 +20388,50 @@ exit(msg == 0);
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:12389: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12392: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:12394: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12397: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
bash_cv_sys_siglist=yes
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
bash_cv_sys_siglist=no
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:12410: result: $bash_cv_sys_siglist" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HAVE_SYS_SIGLIST 1
-EOF
+_ACEOF
fi
-echo "$as_me:12419: checking for _sys_siglist in signal.h or unistd.h" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12425 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <signal.h>
@@ -12439,47 +20447,53 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12442: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12445: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12448: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12451: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:12461: result: $bash_cv_decl_under_sys_siglist" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define UNDER_SYS_SIGLIST_DECLARED 1
-EOF
+_ACEOF
fi
-echo "$as_me:12470: checking for _sys_siglist in system C library" >&5
+
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
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:$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 12481 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <signal.h>
@@ -12496,44 +20510,51 @@ exit(msg == 0);
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:12499: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12502: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:12504: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12507: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
bash_cv_under_sys_siglist=yes
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
bash_cv_under_sys_siglist=no
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:12520: result: $bash_cv_under_sys_siglist" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HAVE_UNDER_SYS_SIGLIST 1
-EOF
+_ACEOF
fi
-echo "$as_me:12529: checking whether signal handlers are of type void" >&5
+
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12535 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <signal.h>
#ifdef signal
@@ -12552,42 +20573,49 @@ int i;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12555: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12558: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12561: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12564: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+sed 's/^/| /' 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 "$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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define VOID_SIGHANDLER 1
-EOF
+_ACEOF
fi
-echo "$as_me:12583: checking for clock_t" >&5
+
+
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12589 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
@@ -12600,7 +20628,7 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "clock_t" >/dev/null 2>&1; then
+ $EGREP "clock_t" >/dev/null 2>&1; then
bash_cv_type_clock_t=yes
else
bash_cv_type_clock_t=no
@@ -12609,24 +20637,30 @@ rm -f conftest*
fi
-echo "$as_me:12612: result: $bash_cv_type_clock_t" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define clock_t long
-EOF
+_ACEOF
fi
-echo "$as_me:12622: checking for sigset_t" >&5
+
+
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12628 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
@@ -12639,7 +20673,7 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "sigset_t" >/dev/null 2>&1; then
+ $EGREP "sigset_t" >/dev/null 2>&1; then
bash_cv_type_sigset_t=yes
else
bash_cv_type_sigset_t=no
@@ -12648,24 +20682,30 @@ rm -f conftest*
fi
-echo "$as_me:12651: result: $bash_cv_type_sigset_t" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define sigset_t int
-EOF
+_ACEOF
fi
-echo "$as_me:12661: checking for quad_t" >&5
+
+
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12667 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
@@ -12675,9 +20715,10 @@ else
#include <inttypes.h>
#endif
+
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "quad_t" >/dev/null 2>&1; then
+ $EGREP "quad_t" >/dev/null 2>&1; then
bash_cv_type_quad_t=yes
else
bash_cv_type_quad_t=no
@@ -12686,29 +20727,35 @@ rm -f conftest*
fi
-echo "$as_me:12689: result: $bash_cv_type_quad_t" >&5
+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 <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_QUAD_T 1
-EOF
+_ACEOF
fi
if test $bash_cv_type_quad_t = no; then
- cat >>confdefs.h <<EOF
+ cat >>confdefs.h <<_ACEOF
#define quad_t long
-EOF
+_ACEOF
fi
-echo "$as_me:12704: checking for intmax_t" >&5
+
+
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12710 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
@@ -12718,9 +20765,10 @@ else
#include <inttypes.h>
#endif
+
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "intmax_t" >/dev/null 2>&1; then
+ $EGREP "intmax_t" >/dev/null 2>&1; then
bash_cv_type_intmax_t=yes
else
bash_cv_type_intmax_t=no
@@ -12729,24 +20777,30 @@ rm -f conftest*
fi
-echo "$as_me:12732: result: $bash_cv_type_intmax_t" >&5
+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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define intmax_t $bash_cv_type_long_long
-EOF
+_ACEOF
fi
-echo "$as_me:12742: checking for uintmax_t" >&5
+
+
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12748 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
@@ -12756,9 +20810,10 @@ else
#include <inttypes.h>
#endif
+
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "uintmax_t" >/dev/null 2>&1; then
+ $EGREP "uintmax_t" >/dev/null 2>&1; then
bash_cv_type_uintmax_t=yes
else
bash_cv_type_uintmax_t=no
@@ -12767,26 +20822,31 @@ rm -f conftest*
fi
-echo "$as_me:12770: result: $bash_cv_type_uintmax_t" >&5
+echo "$as_me:$LINENO: 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 <<EOF
+ cat >>confdefs.h <<_ACEOF
#define uintmax_t $bash_cv_type_unsigned_long_long
-EOF
+_ACEOF
fi
if test "$ac_cv_header_sys_socket_h" = "yes"; then
-echo "$as_me:12782: checking for socklen_t" >&5
+
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12788 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
@@ -12799,7 +20859,7 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "socklen_t" >/dev/null 2>&1; then
+ $EGREP "socklen_t" >/dev/null 2>&1; then
bash_cv_type_socklen_t=yes
else
bash_cv_type_socklen_t=no
@@ -12808,30 +20868,34 @@ rm -f conftest*
fi
-echo "$as_me:12811: result: $bash_cv_type_socklen_t" >&5
+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 <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_SOCKLEN_T 1
-EOF
+_ACEOF
fi
if test $bash_cv_type_socklen_t = no; then
- cat >>confdefs.h <<EOF
+ cat >>confdefs.h <<_ACEOF
#define socklen_t int
-EOF
+_ACEOF
fi
fi
-echo "$as_me:12827: checking for size and type of struct rlimit fields" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12833 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/resource.h>
int
@@ -12843,30 +20907,35 @@ rlim_t xxx;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12846: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12849: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12852: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12855: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' 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:$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 12868 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/time.h>
@@ -12882,56 +20951,65 @@ main()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:12885: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12888: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:12890: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12893: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
bash_cv_type_rlimit=quad_t
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
bash_cv_type_rlimit=long
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+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:12909: result: $bash_cv_type_rlimit" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define RLIMTYPE quad_t
-EOF
+_ACEOF
elif test $bash_cv_type_rlimit = rlim_t; then
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define RLIMTYPE rlim_t
-EOF
+_ACEOF
fi
-echo "$as_me:12923: checking for struct termios.c_line" >&5
+
+
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12929 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <termios.h>
+
int
main ()
{
@@ -12943,46 +21021,95 @@ return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12946: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12949: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12952: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12955: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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 <sys/types.h>
+#include <termios.h>
+
+
+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
-echo "$as_me:12965: result: $ac_cv_member_struct_termios_c_line" >&5
+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 <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define TERMIOS_LDISC 1
-EOF
+_ACEOF
fi
-echo "$as_me:12974: checking for struct termio.c_line" >&5
+
+
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12980 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <termio.h>
+
int
main ()
{
@@ -12994,42 +21121,90 @@ return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12997: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13000: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13003: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13006: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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 <sys/types.h>
+#include <termio.h>
+
+
+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
-echo "$as_me:13016: result: $ac_cv_member_struct_termio_c_line" >&5
+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 <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define TERMIO_LDISC 1
-EOF
+_ACEOF
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
+
+
+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 13031 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdio.h>
#include <sys/types.h>
@@ -13062,43 +21237,49 @@ struct dirent d; int z; z = d.d_ino;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13065: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13068: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13071: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13074: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
bash_cv_dirent_has_dino=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:13085: result: $bash_cv_dirent_has_dino" >&5
+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 <<\EOF
-#define STRUCT_DIRENT_HAS_D_INO 1
-EOF
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRUCT_DIRENT_D_INO 1
+_ACEOF
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
+
+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 13100 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdio.h>
#include <sys/types.h>
@@ -13131,43 +21312,123 @@ struct dirent d; int z; z = d.d_fileno;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13134: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13137: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13140: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13143: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
bash_cv_dirent_has_d_fileno=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:13154: result: $bash_cv_dirent_has_d_fileno" >&5
+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 <<\EOF
-#define STRUCT_DIRENT_HAS_D_FILENO 1
-EOF
+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 <stdio.h>
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#if defined(HAVE_DIRENT_H)
+# include <dirent.h>
+#else
+# define dirent direct
+# ifdef HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif /* SYSNDIR */
+# ifdef HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif /* SYSDIR */
+# ifdef HAVE_NDIR_H
+# include <ndir.h>
+# 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:13163: checking for struct winsize in sys/ioctl.h and termios.h" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13169 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/ioctl.h>
int
@@ -13179,24 +21440,29 @@ struct winsize x;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13182: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13185: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13188: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13191: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
cat >conftest.$ac_ext <<_ACEOF
-#line 13198 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <termios.h>
int
@@ -13208,21 +21474,22 @@ struct winsize x;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13211: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13214: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13217: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13220: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
bash_cv_struct_winsize_header=other
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -13232,48 +21499,56 @@ rm -f conftest.$ac_objext conftest.$ac_ext
fi
if test $bash_cv_struct_winsize_header = ioctl_h; then
- echo "$as_me:13235: result: sys/ioctl.h" >&5
+ echo "$as_me:$LINENO: result: sys/ioctl.h" >&5
echo "${ECHO_T}sys/ioctl.h" >&6
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define STRUCT_WINSIZE_IN_SYS_IOCTL 1
-EOF
+_ACEOF
elif test $bash_cv_struct_winsize_header = termios_h; then
- echo "$as_me:13242: result: termios.h" >&5
+ echo "$as_me:$LINENO: result: termios.h" >&5
echo "${ECHO_T}termios.h" >&6
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define STRUCT_WINSIZE_IN_TERMIOS 1
-EOF
+_ACEOF
else
- echo "$as_me:13249: result: not found" >&5
+ echo "$as_me:$LINENO: 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 "$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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13260 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/time.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "struct timeval" >/dev/null 2>&1; then
+ $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"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <time.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "struct timeval" >/dev/null 2>&1; then
+ $EGREP "struct timeval" >/dev/null 2>&1; then
bash_cv_struct_timeval=yes
else
bash_cv_struct_timeval=no
@@ -13283,25 +21558,30 @@ rm -f conftest*
fi
rm -f conftest*
+
fi
-echo "$as_me:13288: result: $bash_cv_struct_timeval" >&5
+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 <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_TIMEVAL 1
-EOF
+_ACEOF
fi
-echo "$as_me:13297: checking for struct stat.st_blocks" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13303 "configure"
-#include "confdefs.h"
+#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 ()
@@ -13314,43 +21594,86 @@ return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13317: \"$ac_compile\"") >&5
+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:13320: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13323: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13326: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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
-echo "$as_me:13336: result: $ac_cv_member_struct_stat_st_blocks" >&5
+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 <<EOF
+cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_STAT_ST_BLOCKS 1
-EOF
+_ACEOF
+
fi
-echo "$as_me:13346: checking whether struct tm is in sys/time.h or time.h" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13352 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <time.h>
@@ -13363,46 +21686,52 @@ struct tm *tp; tp->tm_sec;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13366: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13369: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13372: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13375: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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:13385: result: $ac_cv_struct_tm" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define TM_IN_SYS_TIME 1
-EOF
+_ACEOF
fi
-echo "$as_me:13395: checking for struct tm.tm_zone" >&5
+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 13401 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <$ac_cv_struct_tm>
+
int
main ()
{
@@ -13414,50 +21743,96 @@ return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13417: \"$ac_compile\"") >&5
+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 <sys/types.h>
+#include <$ac_cv_struct_tm>
+
+
+int
+main ()
+{
+static struct tm ac_aggr;
+if (sizeof ac_aggr.tm_zone)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13420: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13423: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13426: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&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
-echo "$as_me:13436: result: $ac_cv_member_struct_tm_tm_zone" >&5
+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 <<EOF
+cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_TM_TM_ZONE 1
-EOF
+_ACEOF
+
fi
if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HAVE_TM_ZONE 1
-EOF
+_ACEOF
else
- echo "$as_me:13453: checking for tzname" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13459 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <time.h>
#ifndef tzname /* For SGI. */
extern char *tzname[]; /* RS6000 and others reject char **tzname. */
@@ -13472,44 +21847,103 @@ atoi(*tzname);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13475: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13478: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13481: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13484: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+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:13494: result: $ac_cv_var_tzname" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HAVE_TZNAME 1
-EOF
+_ACEOF
fi
fi
-echo "$as_me:13505: checking for the existence of strsignal" >&5
+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 <sys/time.h>
+
+_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 <time.h>
+
+_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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13511 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <signal.h>
int
@@ -13521,49 +21955,54 @@ char *s = (char *)strsignal(2);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13524: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13527: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13530: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13533: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+sed 's/^/| /' conftest.$ac_ext >&5
+
bash_cv_have_strsignal=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:13544: result: $bash_cv_have_strsignal" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HAVE_STRSIGNAL 1
-EOF
+_ACEOF
fi
-echo "$as_me:13553: checking if opendir() opens non-directories" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
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:$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
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13565 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdio.h>
#include <sys/types.h>
@@ -13605,50 +22044,56 @@ exit (dir == 0);
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:13608: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13611: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:13613: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13616: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
bash_cv_opendir_not_robust=yes
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
bash_cv_opendir_not_robust=no
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:13629: result: $bash_cv_opendir_not_robust" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define OPENDIR_NOT_ROBUST 1
-EOF
+_ACEOF
fi
-echo "$as_me:13638: checking whether ulimit can substitute for getdtablesize" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
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:$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
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13650 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
main()
{
@@ -13658,50 +22103,56 @@ exit (maxfds == -1L);
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:13661: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13664: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:13666: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13669: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
bash_cv_ulimit_maxfds=yes
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
bash_cv_ulimit_maxfds=no
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:13682: result: $bash_cv_ulimit_maxfds" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define ULIMIT_MAXFDS 1
-EOF
+_ACEOF
fi
-echo "$as_me:13691: checking to see if getenv can be redefined" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
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:$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
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13703 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#ifdef HAVE_UNISTD_H
# include <unistd.h>
@@ -13736,152 +22187,125 @@ exit(s == 0); /* force optimizer to leave getenv in */
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:13739: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13742: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:13744: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13747: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
bash_cv_getenv_redef=yes
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
bash_cv_getenv_redef=no
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:13760: result: $bash_cv_getenv_redef" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define CAN_REDEFINE_GETENV 1
-EOF
+_ACEOF
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 "$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: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
+ { 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 13782 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdio.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#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);
+ char *xpwd;
+ xpwd = getcwd(0, 0);
+ exit (xpwd == 0);
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:13838: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13841: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:13843: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13846: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- bash_cv_getcwd_calls_popen=no
+ bash_cv_getcwd_malloc=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_getcwd_calls_popen=yes
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+bash_cv_getcwd_malloc=no
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out 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
+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
-EOF
+_ACEOF
LIBOBJS="$LIBOBJS getcwd.$ac_objext"
fi
fi
-echo "$as_me:13871: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
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:$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
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13883 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@@ -13922,50 +22346,57 @@ exit(1);
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:13925: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13928: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:13930: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13933: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
bash_cv_func_sigsetjmp=present
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
bash_cv_func_sigsetjmp=missing
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:13946: result: $bash_cv_func_sigsetjmp" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HAVE_POSIX_SIGSETJMP 1
-EOF
+_ACEOF
fi
-echo "$as_me:13955: checking whether or not strcoll and strcmp differ" >&5
+
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
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:$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
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13967 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdio.h>
#if defined (HAVE_LOCALE_H)
@@ -14004,46 +22435,56 @@ char *v[];
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:14007: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14010: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:14012: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14015: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
bash_cv_func_strcoll_broken=yes
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
bash_cv_func_strcoll_broken=no
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:14028: result: $bash_cv_func_strcoll_broken" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define STRCOLL_BROKEN 1
-EOF
+_ACEOF
fi
+
+
if test "$ac_cv_func_putenv" = "yes"; then
-echo "$as_me:14039: checking for standard-conformant putenv declaration" >&5
+
+
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14045 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#if STDC_HEADERS
#include <stdlib.h>
@@ -14069,51 +22510,58 @@ return (putenv == 0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14072: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14075: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14078: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14081: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+sed 's/^/| /' conftest.$ac_ext >&5
+
bash_cv_std_putenv=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:14092: result: $bash_cv_std_putenv" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HAVE_STD_PUTENV 1
-EOF
+_ACEOF
fi
else
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HAVE_STD_PUTENV 1
-EOF
+_ACEOF
fi
if test "$ac_cv_func_unsetenv" = "yes"; then
-echo "$as_me:14109: checking for standard-conformant unsetenv declaration" >&5
+
+
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14115 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#if STDC_HEADERS
#include <stdlib.h>
@@ -14139,56 +22587,61 @@ return (unsetenv == 0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14142: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14145: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14148: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14151: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+sed 's/^/| /' conftest.$ac_ext >&5
+
bash_cv_std_unsetenv=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:14162: result: $bash_cv_std_unsetenv" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HAVE_STD_UNSETENV 1
-EOF
+_ACEOF
fi
else
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HAVE_STD_UNSETENV 1
-EOF
+_ACEOF
fi
-echo "$as_me:14178: checking for printf floating point output in hex notation" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
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:$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
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14190 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdio.h>
#include <string.h>
@@ -14205,50 +22658,59 @@ main()
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:14208: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14211: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:14213: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14216: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
bash_cv_printf_a_format=yes
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
bash_cv_printf_a_format=no
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:14229: result: $bash_cv_printf_a_format" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HAVE_PRINTF_A_FORMAT 1
-EOF
+_ACEOF
fi
-echo "$as_me:14238: checking if signal handlers must be reinstalled when invoked" >&5
+
+
+
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
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:$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
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14250 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <signal.h>
#ifdef HAVE_UNISTD_H
@@ -14295,50 +22757,57 @@ main()
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:14298: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14301: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:14303: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14306: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
bash_cv_must_reinstall_sighandlers=no
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
bash_cv_must_reinstall_sighandlers=yes
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:14319: result: $bash_cv_must_reinstall_sighandlers" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define MUST_REINSTALL_SIGHANDLERS 1
-EOF
+_ACEOF
fi
-echo "$as_me:14328: checking for presence of necessary job control definitions" >&5
+
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
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:$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
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14340 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#ifdef HAVE_SYS_WAIT_H
@@ -14385,50 +22854,56 @@ exit(0);
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:14388: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14391: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:14393: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14396: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
bash_cv_job_control_missing=present
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
bash_cv_job_control_missing=missing
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:14409: result: $bash_cv_job_control_missing" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define JOB_CONTROL_MISSING 1
-EOF
+_ACEOF
fi
-echo "$as_me:14418: checking for presence of named pipes" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
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:$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
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14430 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/stat.h>
@@ -14469,88 +22944,51 @@ exit(0);
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:14472: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14475: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:14477: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14480: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
bash_cv_sys_named_pipes=present
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
bash_cv_sys_named_pipes=missing
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:14493: result: $bash_cv_sys_named_pipes" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define NAMED_PIPES_MISSING 1
-EOF
+_ACEOF
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 <sys/types.h>
-#include <unistd.h>
-#include <termios.h>
-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 "$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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14552 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <termios.h>
#ifdef TIOCGWINSZ
@@ -14559,7 +22997,7 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
+ $EGREP "yes" >/dev/null 2>&1; then
ac_cv_sys_tiocgwinsz_in_termios_h=yes
else
ac_cv_sys_tiocgwinsz_in_termios_h=no
@@ -14567,19 +23005,22 @@ fi
rm -f conftest*
fi
-echo "$as_me:14570: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
+echo "$as_me:$LINENO: 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 "$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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14581 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/ioctl.h>
#ifdef TIOCGWINSZ
@@ -14588,7 +23029,7 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
+ $EGREP "yes" >/dev/null 2>&1; then
ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
else
ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
@@ -14596,26 +23037,30 @@ fi
rm -f conftest*
fi
-echo "$as_me:14599: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define GWINSZ_IN_SYS_IOCTL 1
-EOF
+_ACEOF
fi
fi
-echo "$as_me:14611: checking for TIOCSTAT in sys/ioctl.h" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14617 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/ioctl.h>
int
@@ -14627,43 +23072,48 @@ int x = TIOCSTAT;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14630: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14633: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14636: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14639: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
bash_cv_tiocstat_in_ioctl=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:14650: result: $bash_cv_tiocstat_in_ioctl" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define TIOCSTAT_IN_SYS_IOCTL 1
-EOF
+_ACEOF
fi
-echo "$as_me:14659: checking for FIONREAD in sys/ioctl.h" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14665 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/ioctl.h>
int
@@ -14675,43 +23125,49 @@ int x = FIONREAD;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14678: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14681: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14684: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14687: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
bash_cv_fionread_in_ioctl=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:14698: result: $bash_cv_fionread_in_ioctl" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define FIONREAD_IN_SYS_IOCTL 1
-EOF
+_ACEOF
fi
-echo "$as_me:14707: checking for speed_t in sys/types.h" >&5
+
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14713 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
int
main ()
@@ -14722,43 +23178,48 @@ speed_t x;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14725: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14728: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14731: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14734: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
bash_cv_speed_t_in_sys_types=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:14745: result: $bash_cv_speed_t_in_sys_types" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define SPEED_T_IN_SYS_TYPES 1
-EOF
+_ACEOF
fi
-echo "$as_me:14754: checking whether getpw functions are declared in pwd.h" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14760 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
@@ -14768,7 +23229,7 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "getpwuid" >/dev/null 2>&1; then
+ $EGREP "getpwuid" >/dev/null 2>&1; then
bash_cv_getpw_declared=yes
else
bash_cv_getpw_declared=no
@@ -14777,29 +23238,33 @@ rm -f conftest*
fi
-echo "$as_me:14780: result: $bash_cv_getpw_declared" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HAVE_GETPW_DECLS 1
-EOF
+_ACEOF
fi
-echo "$as_me:14789: checking for unusable real-time signals due to large values" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
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:$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
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14801 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <signal.h>
@@ -14821,51 +23286,63 @@ main ()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:14824: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14827: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:14829: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14832: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
bash_cv_unusable_rtsigs=yes
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
bash_cv_unusable_rtsigs=no
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:14845: result: $bash_cv_unusable_rtsigs" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define UNUSABLE_RT_SIGNALS 1
-EOF
+_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
else
SIGLIST_O=
fi
+
+
case "$host_os" in
-hpux*) echo "$as_me:14861: checking whether $host_os needs _KERNEL for RLIMIT defines" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14867 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/resource.h>
@@ -14882,24 +23359,29 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14885: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14888: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14891: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14894: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+sed 's/^/| /' conftest.$ac_ext >&5
+
cat >conftest.$ac_ext <<_ACEOF
-#line 14901 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#define _KERNEL
@@ -14918,21 +23400,22 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14921: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14924: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14927: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14930: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+sed 's/^/| /' conftest.$ac_ext >&5
+
bash_cv_kernel_rlimit=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -14941,12 +23424,12 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:14944: result: $bash_cv_kernel_rlimit" >&5
+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 <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define RLIMIT_NEEDS_KERNEL 1
-EOF
+_ACEOF
fi
;;
@@ -14960,14 +23443,89 @@ esac
if test "X$bash_cv_termcap_lib" = "X"; then
_bash_needmsg=yes
else
-echo "$as_me:14963: checking which library has the termcap functions" >&5
+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=
fi
if test "${bash_cv_termcap_lib+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$as_me:14970: checking for tgetent in -ltermcap" >&5
+ 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 <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14975,8 +23533,12 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ltermcap $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 14978 "configure"
-#include "confdefs.h"
+#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
@@ -14994,32 +23556,33 @@ tgetent ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14997: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:15000: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:15003: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:15006: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_termcap_tgetent=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:15017: result: $ac_cv_lib_termcap_tgetent" >&5
+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:15022: checking for tgetent in -ltinfo" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -15027,8 +23590,12 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ltinfo $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 15030 "configure"
-#include "confdefs.h"
+#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
@@ -15046,32 +23613,33 @@ tgetent ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:15049: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:15052: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:15055: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:15058: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_tinfo_tgetent=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:15069: result: $ac_cv_lib_tinfo_tgetent" >&5
+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:15074: checking for tgetent in -lcurses" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -15079,8 +23647,12 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lcurses $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 15082 "configure"
-#include "confdefs.h"
+#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
@@ -15098,32 +23670,33 @@ tgetent ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:15101: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:15104: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:15107: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:15110: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_curses_tgetent=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:15121: result: $ac_cv_lib_curses_tgetent" >&5
+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:15126: checking for tgetent in -lncurses" >&5
+ 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
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -15131,8 +23704,12 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lncurses $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 15134 "configure"
-#include "confdefs.h"
+#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
@@ -15150,27 +23727,28 @@ tgetent ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:15153: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:15156: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:15159: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:15162: \$? = $ac_status" >&5
+ 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
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_ncurses_tgetent=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:15173: result: $ac_cv_lib_ncurses_tgetent" >&5
+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
bash_cv_termcap_lib=libncurses
@@ -15186,11 +23764,13 @@ fi
fi
+fi
+
if test "X$_bash_needmsg" = "Xyes"; then
-echo "$as_me:15190: checking which library has the termcap functions" >&5
+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:15193: result: using $bash_cv_termcap_lib" >&5
+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
LDFLAGS="$LDFLAGS -L./lib/termcap"
@@ -15205,6 +23785,9 @@ TERMCAP_DEP=
elif test $bash_cv_termcap_lib = libncurses; then
TERMCAP_LIB=-lncurses
TERMCAP_DEP=
+elif test $bash_cv_termcap_lib = libc; then
+TERMCAP_LIB=
+TERMCAP_DEP=
else
TERMCAP_LIB=-lcurses
TERMCAP_DEP=
@@ -15212,14 +23795,16 @@ fi
fi
-echo "$as_me:15215: checking whether /dev/fd is available" >&5
+
+
+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; then
+ 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; then
+ elif test -d /proc/self/fd && test -r /proc/self/fd/0 < /dev/null; then
bash_cv_dev_fd=whacky
else
bash_cv_dev_fd=absent
@@ -15227,36 +23812,36 @@ else
fi
-echo "$as_me:15230: result: $bash_cv_dev_fd" >&5
+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 <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_DEV_FD 1
-EOF
+_ACEOF
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define DEV_FD_PREFIX "/dev/fd/"
-EOF
+_ACEOF
elif test $bash_cv_dev_fd = "whacky"; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_DEV_FD 1
-EOF
+_ACEOF
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define DEV_FD_PREFIX "/proc/self/fd/"
-EOF
+_ACEOF
fi
-echo "$as_me:15252: checking whether /dev/stdin stdout stderr are available" >&5
+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; then
+ 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; then
+ elif test -d /proc/self/fd && test -r /dev/stdin < /dev/null; then
bash_cv_dev_stdin=present
else
bash_cv_dev_stdin=absent
@@ -15264,16 +23849,16 @@ else
fi
-echo "$as_me:15267: result: $bash_cv_dev_stdin" >&5
+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 <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_DEV_STDIN 1
-EOF
+_ACEOF
fi
-echo "$as_me:15276: checking for default mail directory" >&5
+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
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -15292,44 +23877,50 @@ else
fi
-echo "$as_me:15295: result: $bash_cv_mail_dir" >&5
+echo "$as_me:$LINENO: result: $bash_cv_mail_dir" >&5
echo "${ECHO_T}$bash_cv_mail_dir" >&6
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define DEFAULT_MAIL_DIRECTORY "$bash_cv_mail_dir"
-EOF
+_ACEOF
+
+
if test "$bash_cv_job_control_missing" = missing; then
opt_job_control=no
fi
if test "$opt_job_control" = yes; then
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define JOB_CONTROL 1
-EOF
+_ACEOF
JOBS_O=jobs.o
else
JOBS_O=nojobs.o
fi
+
+
+
LOCAL_DEFS=-DSHELL
+
case "${host_os}" in
-sysv4.2*) cat >>confdefs.h <<\EOF
+sysv4.2*) cat >>confdefs.h <<\_ACEOF
#define SVR4_2 1
-EOF
+_ACEOF
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define SVR4 1
-EOF
+_ACEOF
;;
-sysv4*) cat >>confdefs.h <<\EOF
+sysv4*) cat >>confdefs.h <<\_ACEOF
#define SVR4 1
-EOF
+_ACEOF
;;
-sysv5*) cat >>confdefs.h <<\EOF
+sysv5*) cat >>confdefs.h <<\_ACEOF
#define SVR5 1
-EOF
+_ACEOF
;;
hpux9*) LOCAL_CFLAGS="-DHPUX9 -DHPUX" ;;
hpux*) LOCAL_CFLAGS=-DHPUX ;;
@@ -15346,7 +23937,7 @@ lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
linux*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
*qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;;
powerux*) LOCAL_LIBS="-lgen" ;;
-cygwin*) LOCAL_LIBS="-luser32" ;;
+cygwin*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
opennt*|interix*) LOCAL_CFLAGS="-DNO_MAIN_ENV_ARG -DBROKEN_DIRENT_D_INO" ;;
esac
@@ -15383,11 +23974,17 @@ esac
#
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 "$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:15390: result: $SHOBJ_STATUS" >&5
+
+
+
+
+
+
+ echo "$as_me:$LINENO: result: $SHOBJ_STATUS" >&5
echo "${ECHO_T}$SHOBJ_STATUS" >&6
fi
@@ -15408,11 +24005,34 @@ esac
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"
+ 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
# tests run on this system so they can be shared between configure
@@ -15423,7 +24043,7 @@ cat >confcache <<\_ACEOF
# config.status only pays attention to the cache file if you give it
# the --recheck option to rerun configure.
#
-# `ac_cv_env_foo' variables (set or unset) will be overriden when
+# `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.
@@ -15458,7 +24078,7 @@ _ACEOF
t end
/^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
: end' >>confcache
-if cmp -s $cache_file confcache; then :; else
+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"
cat confcache >$cache_file
@@ -15489,35 +24109,227 @@ fi
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:15495: creating $CONFIG_STATUS" >&5
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
echo "$as_me: creating $CONFIG_STATUS" >&6;}
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
-# Generated automatically by configure.
+# Generated by $as_me.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
# configure, is in config.log if it exists.
debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
SHELL=\${CONFIG_SHELL-$SHELL}
-ac_cs_invocation="\$0 \$@"
-
_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=`echo "$0" |sed 's,.*[\\/],,'`
+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
as_expr=expr
@@ -15543,24 +24355,20 @@ else
fi
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
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
else
- as_unset=false
+ as_mkdir_p=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; }
+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
# We need space, tab and new line, in precisely that order.
@@ -15569,10 +24377,34 @@ as_nl='
IFS=" $as_nl"
# CDPATH.
-$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export 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
# Files that config.status was made for.
@@ -15592,7 +24424,7 @@ if test -n "$ac_config_commands"; then
echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
fi
-cat >>$CONFIG_STATUS <<\EOF
+cat >>$CONFIG_STATUS <<\_ACEOF
ac_cs_usage="\
\`$as_me' instantiates files from templates according to the
@@ -15602,6 +24434,7 @@ Usage: $0 [OPTIONS] [FILE]...
-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
--file=FILE[:TEMPLATE]
@@ -15619,12 +24452,12 @@ Configuration commands:
$config_commands
Report bugs to <bug-autoconf@gnu.org>."
-EOF
+_ACEOF
-cat >>$CONFIG_STATUS <<EOF
+cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-bash config.status 2.05b
-configured by $0, generated by GNU Autoconf 2.52,
+bash config.status 3.0-release
+configured by $0, generated by GNU Autoconf 2.57,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
@@ -15633,9 +24466,9 @@ This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
srcdir=$srcdir
INSTALL="$INSTALL"
-EOF
+_ACEOF
-cat >>$CONFIG_STATUS <<\EOF
+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.
ac_need_defaults=:
@@ -15645,30 +24478,30 @@ do
--*=*)
ac_option=`expr "x$1" : 'x\([^=]*\)='`
ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
- shift
- set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
- shift
+ 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 $1 in
+ case $ac_option in
# Handling of the options.
-EOF
-cat >>$CONFIG_STATUS <<EOF
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
- exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
-EOF
-cat >>$CONFIG_STATUS <<\EOF
+ ac_cs_recheck=: ;;
--version | --vers* | -V )
echo "$ac_cs_version"; exit 0 ;;
--he | --h)
# Conflict between --help and --header
- { { echo "$as_me:15671: error: ambiguous option: $1
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: ambiguous option: $1
Try \`$0 --help' for more information." >&2;}
@@ -15678,16 +24511,19 @@ Try \`$0 --help' for more information." >&2;}
--debug | --d* | -d )
debug=: ;;
--file | --fil | --fi | --f )
- shift
- CONFIG_FILES="$CONFIG_FILES $1"
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
ac_need_defaults=false;;
--header | --heade | --head | --hea )
- shift
- CONFIG_HEADERS="$CONFIG_HEADERS $1"
+ $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:15690: error: unrecognized option: $1
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: unrecognized option: $1
Try \`$0 --help' for more information." >&2;}
@@ -15699,25 +24535,40 @@ Try \`$0 --help' for more information." >&2;}
shift
done
-exec 5>>config.log
-cat >&5 << _ACEOF
+ac_configure_extra_args=
-## ----------------------- ##
-## Running config.status. ##
-## ----------------------- ##
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
-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
+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
-EOF
-cat >>$CONFIG_STATUS <<\EOF
+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
case "$ac_config_target" in
@@ -15726,17 +24577,21 @@ do
"builtins/Makefile" ) CONFIG_FILES="$CONFIG_FILES builtins/Makefile" ;;
"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" ;;
"lib/termcap/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/termcap/Makefile" ;;
"lib/tilde/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/tilde/Makefile" ;;
"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:15739: error: invalid argument: $ac_config_target" >&5
+ *) { { 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; }; };;
esac
@@ -15752,6 +24607,9 @@ if $ac_need_defaults; then
test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
fi
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason 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 ||
{
@@ -15760,23 +24618,23 @@ $debug ||
}
# Create a (secure) tmp directory for tmp files.
-: ${TMPDIR=/tmp}
+
{
- tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
test -n "$tmp" && test -d "$tmp"
} ||
{
- tmp=$TMPDIR/cs$$-$RANDOM
+ tmp=./confstat$$-$RANDOM
(umask 077 && mkdir $tmp)
} ||
{
- echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+ echo "$me: cannot create a temporary directory in ." >&2
{ (exit 1); exit 1; }
}
-EOF
+_ACEOF
-cat >>$CONFIG_STATUS <<EOF
+cat >>$CONFIG_STATUS <<_ACEOF
#
# CONFIG_FILES section.
@@ -15789,6 +24647,12 @@ if test -n "\$CONFIG_FILES"; then
sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
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
s,@program_transform_name@,$program_transform_name,;t t
@@ -15804,19 +24668,13 @@ s,@includedir@,$includedir,;t t
s,@oldincludedir@,$oldincludedir,;t t
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,@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,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@DEFS@,$DEFS,;t t
s,@LIBS@,$LIBS,;t t
s,@build@,$build,;t t
s,@build_cpu@,$build_cpu,;t t
@@ -15826,6 +24684,9 @@ s,@host@,$host,;t t
s,@host_cpu@,$host_cpu,;t t
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
s,@MALLOC_TARGET@,$MALLOC_TARGET,;t t
@@ -15846,6 +24707,7 @@ s,@ac_ct_CC@,$ac_ct_CC,;t t
s,@EXEEXT@,$EXEEXT,;t t
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
s,@STATIC_LD@,$STATIC_LD,;t t
@@ -15872,8 +24734,33 @@ s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
s,@YACC@,$YACC,;t t
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
s,@TERMCAP_DEP@,$TERMCAP_DEP,;t t
@@ -15897,11 +24784,12 @@ s,@LOCAL_LIBS@,$LOCAL_LIBS,;t t
s,@LOCAL_CFLAGS@,$LOCAL_CFLAGS,;t t
s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
s,@LOCAL_DEFS@,$LOCAL_DEFS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
CEOF
-EOF
+_ACEOF
- cat >>$CONFIG_STATUS <<\EOF
+ 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.
ac_max_sed_lines=48
@@ -15940,8 +24828,8 @@ EOF
fi
fi # test -n "$CONFIG_FILES"
-EOF
-cat >>$CONFIG_STATUS <<\EOF
+_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".
case $ac_file in
@@ -15955,7 +24843,8 @@ for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
esac
# Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| \
@@ -15966,60 +24855,84 @@ echo X"$ac_file" |
/^X\(\/\/\)$/{ s//\1/; q; }
/^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'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
else
- ac_dir_suffix= ac_dots=
- fi
+ 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; }; }; }
- 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 ;;
+ 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_dots$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_dots$srcdir ;;
- esac
+ 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_dots$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
esac
if test x"$ac_file" != x-; then
- { echo "$as_me:16014: creating $ac_file" >&5
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
rm -f "$ac_file"
fi
# 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."
+ # /* 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
# src tree.
@@ -16029,7 +24942,7 @@ echo "$as_me: creating $ac_file" >&6;}
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:16032: error: cannot find input file: $f" >&5
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
@@ -16042,23 +24955,29 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
echo $srcdir/$f
else
# /dev/null tree
- { { echo "$as_me:16045: error: cannot find input file: $f" >&5
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
esac
done` || { (exit 1); exit 1; }
-EOF
-cat >>$CONFIG_STATUS <<EOF
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
sed "$ac_vpsub
$extrasub
-EOF
-cat >>$CONFIG_STATUS <<\EOF
+_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
rm -f $tmp/stdin
@@ -16070,8 +24989,8 @@ s,@INSTALL@,$ac_INSTALL,;t t
fi
done
-EOF
-cat >>$CONFIG_STATUS <<\EOF
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
#
# CONFIG_HEADER section.
@@ -16103,7 +25022,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
* ) ac_file_in=$ac_file.in ;;
esac
- test x"$ac_file" != x- && { echo "$as_me:16106: creating $ac_file" >&5
+ test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
# First look for the input files in the build tree, otherwise in the
@@ -16114,7 +25033,7 @@ echo "$as_me: creating $ac_file" >&6;}
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:16117: error: cannot find input file: $f" >&5
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
@@ -16127,7 +25046,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
echo $srcdir/$f
else
# /dev/null tree
- { { echo "$as_me:16130: error: cannot find input file: $f" >&5
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
@@ -16136,7 +25055,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
# Remove the trailing spaces.
sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
-EOF
+_ACEOF
# Transform confdefs.h into two sed scripts, `conftest.defines' and
# `conftest.undefs', that substitutes the proper values into
@@ -16152,16 +25071,16 @@ rm -f conftest.defines conftest.undefs
# `end' is used to avoid that the second main sed command (meant for
# 0-ary CPP macros) applies to n-ary macro definitions.
# See the Autoconf documentation for `clear'.
-cat >confdef2sed.sed <<\EOF
+cat >confdef2sed.sed <<\_ACEOF
s/[\\&,]/\\&/g
s,[\\$`],\\&,g
t clear
: clear
-s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
t end
s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
: end
-EOF
+_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
# sort them, since we want the *last* AC-DEFINE to be honored.
@@ -16172,14 +25091,14 @@ rm -f confdef2sed.sed
# This sed command replaces #undef with comments. This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
-cat >>conftest.undefs <<\EOF
+cat >>conftest.undefs <<\_ACEOF
s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
-EOF
+_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 egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
echo ' :' >>$CONFIG_STATUS
rm -f conftest.tail
@@ -16203,7 +25122,7 @@ do
mv conftest.tail conftest.defines
done
rm -f conftest.defines
-echo ' fi # egrep' >>$CONFIG_STATUS
+echo ' fi # grep' >>$CONFIG_STATUS
echo >>$CONFIG_STATUS
# Break up conftest.undefs because some shells have a limit on the size
@@ -16231,23 +25150,24 @@ do
done
rm -f conftest.undefs
-cat >>$CONFIG_STATUS <<\EOF
+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 automatically by config.status. */
+ # /* config.h. Generated by config.status. */
if test x"$ac_file" = x-; then
- echo "/* Generated automatically by configure. */" >$tmp/config.h
+ echo "/* Generated by configure. */" >$tmp/config.h
else
- echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
+ 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 cmp -s $ac_file $tmp/config.h 2>/dev/null; then
- { echo "$as_me:16247: $ac_file is unchanged" >&5
+ 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=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| \
@@ -16258,24 +25178,31 @@ echo X"$ac_file" |
/^X\(\/\/\)$/{ s//\1/; q; }
/^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; }
+ { 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; }; }; }
- fi
rm -f $ac_file
mv $tmp/config.h $ac_file
fi
@@ -16284,8 +25211,8 @@ done; }
rm -f $tmp/config.h
fi
done
-EOF
-cat >>$CONFIG_STATUS <<\EOF
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
#
# CONFIG_COMMANDS section.
@@ -16293,23 +25220,171 @@ cat >>$CONFIG_STATUS <<\EOF
for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
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.
echo timestamp > stamp-h
;;
esac
done
-EOF
+_ACEOF
-cat >>$CONFIG_STATUS <<\EOF
+cat >>$CONFIG_STATUS <<\_ACEOF
{ (exit 0); exit 0; }
-EOF
+_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.
# Unfortunately, on DOS this fails, as config.log is still kept open
@@ -16320,8 +25395,11 @@ ac_clean_files=$ac_clean_files_save
# need to make the FD available again.
if test "$no_create" != yes; then
ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
exec 5>/dev/null
- $SHELL $CONFIG_STATUS || ac_cs_success=false
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
diff --git a/configure.in b/configure.in
index 5f069788..791282d7 100644
--- a/configure.in
+++ b/configure.in
@@ -1,11 +1,11 @@
dnl
-dnl Configure script for bash-2.05
+dnl Configure script for bash-3.0
dnl
dnl report bugs to chet@po.cwru.edu
dnl
dnl Process this file with autoconf to produce a configure script.
-# Copyright (C) 1987-2002 Free Software Foundation, Inc.
+# Copyright (C) 1987-2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,9 +22,12 @@ dnl Process this file with autoconf to produce a configure script.
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
-AC_REVISION([for Bash 2.05b, version 2.144, from autoconf version] AC_ACVERSION)dnl
+AC_REVISION([for Bash 3.0, version 3.166, from autoconf version] AC_ACVERSION)dnl
-AC_INIT(bash, 2.05b, bug-bash@gnu.org)
+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
AC_PREREQ(2.50)
@@ -35,8 +38,8 @@ AC_CONFIG_AUX_DIR(./support)
AC_CONFIG_HEADERS(config.h)
dnl checks for version info
-BASHVERS=2.05b
-RELSTATUS=release
+BASHVERS=bashvers
+RELSTATUS=relstatus
dnl defaults for debug settings
case "$RELSTATUS" in
@@ -70,6 +73,7 @@ sparc-netbsd*) opt_bash_malloc=no ;; # needs 8-byte alignment
mips-irix6*) opt_bash_malloc=no ;; # needs 8-byte alignment
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
*-aix*) opt_bash_malloc=no ;; # AIX machines
@@ -92,6 +96,12 @@ sco3.2v5*|sco3.2v4*) opt_memscramble=no ;;
*) opt_memscramble=yes ;;
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
AC_ARG_WITH(afs, AC_HELP_STRING([--with-afs], [if you are running AFS]), opt_afs=$withval)
@@ -138,6 +148,10 @@ if test "$opt_curses" = yes; then
prefer_curses=yes
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
@@ -160,10 +174,13 @@ opt_disabled_builtins=no
opt_command_timing=yes
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
opt_static_link=no
@@ -182,6 +199,7 @@ if test $opt_minimal_config = yes; then
opt_brace_expansion=no opt_disabled_builtins=no opt_command_timing=no
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
AC_ARG_ENABLE(alias, AC_HELP_STRING([--enable-alias], [enable shell aliases]), opt_alias=$enableval)
@@ -191,6 +209,8 @@ AC_ARG_ENABLE(bang-history, AC_HELP_STRING([--enable-bang-history], [turn on csh
AC_ARG_ENABLE(brace-expansion, AC_HELP_STRING([--enable-brace-expansion], [include brace expansion]), opt_brace_expansion=$enableval)
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)
AC_ARG_ENABLE(dparen-arithmetic, AC_HELP_STRING([--enable-dparen-arithmetic], [include ((...)) command]), opt_dparen_arith=$enableval)
@@ -198,6 +218,7 @@ AC_ARG_ENABLE(extended-glob, AC_HELP_STRING([--enable-extended-glob], [include k
AC_ARG_ENABLE(help-builtin, AC_HELP_STRING([--enable-help-builtin], [include the help builtin]), opt_help=$enableval)
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)
AC_ARG_ENABLE(progcomp, AC_HELP_STRING([--enable-progcomp], [enable programmable completion and the complete builtin]), opt_progcomp=$enableval)
@@ -265,6 +286,9 @@ fi
if test $opt_cond_command = yes ; then
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)
fi
@@ -274,6 +298,12 @@ fi
if test $opt_progcomp = yes; then
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
AC_DEFINE(MEMSCRAMBLE)
@@ -403,7 +433,14 @@ if test "$opt_static_link" = yes; then
fi
fi
-test -z "$CPPFLAGS_FOR_BUILD" && CPPFLAGS_FOR_BUILD="$CPPFLAGS"
+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"
AC_SUBST(CFLAGS)
@@ -430,7 +467,7 @@ then
RL_LIB_READLINE_VERSION
case "$ac_cv_rl_version" in
- 4.[[3-9]]*|5*|6*|7*|8*|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)
AC_MSG_WARN(using private bash version)
@@ -442,9 +479,13 @@ if test $opt_readline = yes; then
AC_DEFINE(READLINE)
READLINE_LIB=-lreadline
if test "$opt_with_installed_readline" != "no" ; then
- case "$RL_INCLUDEDIR" in
- /usr/include) ;;
- *) RL_INCLUDE='-I${RL_INCLUDEDIR}'
+ case "$opt_with_installed_readline" in
+ yes) RL_INCLUDE= ;;
+ *) case "$RL_INCLUDEDIR" in
+ /usr/include) ;;
+ *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;;
+ esac
+ ;;
esac
READLINE_DEP=
else
@@ -466,9 +507,13 @@ if test $opt_history = yes || test $opt_bang_history = yes; then
if test "$opt_with_installed_readline" != "no"; then
HIST_LIBDIR=$RL_LIBDIR
HISTORY_DEP=
- case "$RL_INCLUDEDIR" in
- /usr/include) ;;
- *) RL_INCLUDE='-I${RL_INCLUDEDIR}'
+ case "$opt_with_installed_readline" in
+ yes) RL_INCLUDE= ;;
+ *) case "$RL_INCLUDEDIR" in
+ /usr/include) ;;
+ *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;;
+ esac
+ ;;
esac
else
HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
@@ -517,6 +562,9 @@ AC_C_LONG_DOUBLE
AC_C_PROTOTYPES
AC_C_CHAR_UNSIGNED
+dnl initialize GNU gettext
+AM_GNU_GETTEXT([no-libtool], [need-ngettext], [lib/intl])
+
dnl header files
AC_HEADER_DIRENT
AC_HEADER_TIME
@@ -525,10 +573,10 @@ BASH_HEADER_INTTYPES
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)
+ 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/time.h sys/times.h sys/wait.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)
dnl special checks for libc functions
@@ -588,9 +636,9 @@ AC_CHECK_FUNCS(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)
+ 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)
+AC_REPLACE_FUNCS(getcwd strcasecmp strerror strftime strpbrk memset strstr)
AC_REPLACE_FUNCS(strtod strtol strtoul strtoll strtoull strtoimax strtoumax)
AC_CHECK_DECLS([confstr])
@@ -598,7 +646,24 @@ AC_CHECK_DECLS([printf])
AC_CHECK_DECLS([sbrk])
AC_CHECK_DECLS([strcpy])
AC_CHECK_DECLS([strsignal])
-AC_CHECK_DECLS([strtold])
+
+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 <stdlib.h>],
+ [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)
BASH_CHECK_DECL(strtol)
@@ -609,18 +674,31 @@ BASH_CHECK_DECL(strtoumax)
AC_FUNC_MKTIME
-dnl checks for locale functions
-AC_CHECK_HEADERS(libintl.h)
-AC_CHECK_FUNCS(gettext textdomain bindtextdomain)
+dnl
+dnl Checks for lib/intl and related code (uses some of the output from
+dnl AM_GNU_GETTEXT)
+dnl
-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
+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
@@ -702,6 +780,7 @@ BASH_FUNC_LSTAT
fi
dnl behavior of system calls and library functions
+BASH_FUNC_CTYPE_NONASCII
BASH_FUNC_DUP2_CLOEXEC_CHECK
BASH_SYS_PGRP_SYNC
BASH_SYS_SIGNAL_VINTAGE
@@ -728,11 +807,13 @@ BASH_STRUCT_TERMIOS_LDISC
BASH_STRUCT_TERMIO_LDISC
BASH_STRUCT_DIRENT_D_INO
BASH_STRUCT_DIRENT_D_FILENO
+BASH_STRUCT_DIRENT_D_NAMLEN
BASH_STRUCT_WINSIZE
BASH_STRUCT_TIMEVAL
AC_CHECK_MEMBERS([struct stat.st_blocks])
AC_STRUCT_TM
AC_STRUCT_TIMEZONE
+BASH_STRUCT_TIMEZONE
dnl presence and behavior of C library functions
BASH_FUNC_STRSIGNAL
@@ -759,18 +840,6 @@ else
AC_DEFINE(HAVE_STD_UNSETENV)
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
dnl presence and behavior of OS functions
@@ -851,7 +920,7 @@ lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
linux*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
*qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;;
powerux*) LOCAL_LIBS="-lgen" ;;
-cygwin*) LOCAL_LIBS="-luser32" ;;
+cygwin*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
opennt*|interix*) LOCAL_CFLAGS="-DNO_MAIN_ENV_ARG -DBROKEN_DIRENT_D_INO" ;;
esac
@@ -946,9 +1015,11 @@ AC_SUBST(LOCAL_DEFS)
#AC_SUBST(ALLOCA_OBJECT)
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 \
- examples/loadables/Makefile examples/loadables/perl/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.
echo timestamp > stamp-h
diff --git a/copy_cmd.c b/copy_cmd.c
index 07c0693f..d36436c9 100644
--- a/copy_cmd.c
+++ b/copy_cmd.c
@@ -50,7 +50,6 @@ static ARITH_COM *copy_arith_command __P((ARITH_COM *));
static COND_COM *copy_cond_command __P((COND_COM *));
#endif
static SIMPLE_COM *copy_simple_command __P((SIMPLE_COM *));
-static FUNCTION_DEF *copy_function_def __P((FUNCTION_DEF *));
WORD_DESC *
copy_word (w)
@@ -166,6 +165,7 @@ copy_for_command (com)
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);
new_for->action = copy_command (com->action);
@@ -221,6 +221,7 @@ copy_case_command (com)
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);
return (new_case);
@@ -302,17 +303,26 @@ copy_simple_command (com)
return (new_simple);
}
-static FUNCTION_DEF *
+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;
{
FUNCTION_DEF *new_def;
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;
+ new_def = copy_function_def_contents (com, new_def);
return (new_def);
}
diff --git a/dispose_cmd.c b/dispose_cmd.c
index 90515df8..1a4c0d7e 100644
--- a/dispose_cmd.c
+++ b/dispose_cmd.c
@@ -186,9 +186,7 @@ dispose_command (command)
register FUNCTION_DEF *c;
c = command->value.Function_def;
- dispose_word (c->name);
- dispose_command (c->command);
- free (c);
+ dispose_function_def (c);
break;
}
@@ -218,6 +216,23 @@ dispose_cond_node (cond)
}
#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. */
void
dispose_word (w)
diff --git a/dispose_cmd.h b/dispose_cmd.h
index 595a6ad7..2d23505b 100644
--- a/dispose_cmd.h
+++ b/dispose_cmd.h
@@ -33,4 +33,7 @@ extern void dispose_redirects __P((REDIRECT *));
extern void dispose_cond_node __P((COND_COM *));
#endif
+extern void dispose_function_def_contents __P((FUNCTION_DEF *));
+extern void dispose_function_def __P((FUNCTION_DEF *));
+
#endif /* !_DISPOSE_CMD_H_ */
diff --git a/doc/FAQ b/doc/FAQ
index b81d339a..c0e902f1 100644
--- a/doc/FAQ
+++ b/doc/FAQ
@@ -1,4 +1,4 @@
-This is the Bash FAQ, version 3.20, for Bash version 2.05b.
+This is the Bash FAQ, version 3.27, for Bash version 3.0.
This document contains a set of frequently-asked questions concerning
Bash, the GNU Bourne-Again Shell. Bash is a freely-available command
@@ -31,13 +31,13 @@ A6) How can I build bash with gcc?
A7) How can I make bash my login shell?
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'?
+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 2.05b?
-B2) Are there any user-visible incompatibilities between bash-2.05b and
+B1) What's new in version 3.0?
+B2) Are there any user-visible incompatibilities between bash-3.0 and
bash-1.14.7?
Section C: Differences from other Unix shells
@@ -75,6 +75,9 @@ E8) Why does the arithmetic evaluation code complain about `08'?
E9) Why does the pattern matching expression [A-Z]* match files beginning
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
@@ -137,30 +140,29 @@ of Case Western Reserve University.
A2) What's the latest version?
-The latest version is 2.05b, first made available on Wednesday, 17
-July, 2002.
+The latest version is 3.0, first made available on 27 July, 2004.
A3) Where can I get it?
Bash is the GNU project's shell, and so is available from the
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:
+The following URLs tell how to get version 3.0:
-ftp://ftp.gnu.org/pub/gnu/bash/bash-2.05b.tar.gz
-ftp://ftp.cwru.edu/pub/bash/bash-2.05b.tar.gz
+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-2.05b.tar.gz
-ftp://ftp.cwru.edu/pub/bash/bash-doc-2.05b.tar.gz
+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
+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
+will attempt to discover the version of Unix you have and tailor
itself accordingly, using a script created by GNU autoconf.
More information appears in the file `INSTALL' in the distribution.
@@ -190,13 +192,8 @@ early GNU-Win32 (the original name) releases. Cygnus has also done a
port of bash-2.05 to the CYGWIN environment, and it is available as
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
+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
of the DJGPP project. For more information on the project, see
@@ -212,19 +209,10 @@ ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh204b.zip binary
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh204d.zip documentation
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.
+Mark began to work with bash-2.05, but I don't know the current status.
-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.
+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?
@@ -271,7 +259,8 @@ it is invoked as a login shell.
Next, add a line similar to the above to ~/.profile:
- [ -f /usr/gnu/bin/bash ] && exec /usr/gnu/bin/bash --login
+ [ -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
a login shell. Once you have this working, you can copy your initialization
@@ -325,7 +314,7 @@ this before you can make bash your login shell.
Most versions of ftpd use this file to prohibit `special' users
such as `uucp' and `news' from using FTP.
-A9) What's the `POSIX 1003.2 standard'?
+A9) What's the `POSIX Shell and Utilities standard'?
POSIX is a name originally coined by Richard Stallman for a
family of open system standards based on UNIX. There are a
@@ -335,44 +324,49 @@ call and C library level to applications and tools to system
administration and management. Each area of standardization is
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
+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. An initial version of the
-standard has been approved and published by the IEEE, and work is
-currently underway to update it.
+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 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.
+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.2 not
+`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.2 also specifies aspects of the shell's interactive
+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
standardized; emacs editing commands were left out due to
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
+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.opengroup.org/onlinepubs/007904975/
+http://www.UNIX-systems.org/version3/
A10) What is the bash `posix mode'?
-Although bash is an implementation of the POSIX.2 shell
+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
behavior in these areas so that it obeys the spec more closely.
@@ -387,18 +381,48 @@ They are also listed in a section in the Bash Reference Manual
Section B: The latest version
-B1) What's new in version 2.05b?
+B1) What's new in version 3.0?
-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-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-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
+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
o the DEBUG trap is now run *before* simple commands, ((...)) commands,
@@ -427,9 +451,6 @@ o the expansion of $LINENO inside a shell function is only relative to the
script, $LINENO expands to the line number in the script. This is as
POSIX-2001 requires
-
-A short feature history dating from Bash-2.0:
-
Bash-2.05a introduced the following new features:
o The `printf' builtin has undergone major work
@@ -607,10 +628,10 @@ grammar tighter and smaller (66 reduce-reduce conflicts gone)
lots of code now smaller and faster
test suite greatly expanded
-B2) Are there any user-visible incompatibilities between bash-2.05b and
+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 2.05b.
+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
if if you find something that's not mentioned there.
@@ -696,6 +717,9 @@ Things bash has that sh does not:
posix mode
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:
uses variable SHACCT to do shell accounting
@@ -768,6 +792,10 @@ Things bash has or uses that ksh88 does not:
redirection to /dev/fd/N, /dev/stdin, /dev/stdout, /dev/stderr
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:
tracked aliases (alias -t)
@@ -776,9 +804,9 @@ Things ksh88 has or uses that bash does not:
weirdly-scoped functions
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,
+ builtins: alias -x, cd old new, newgrp, print,
read -p/-s/var?prompt, set -A/-o gmacs/
- -o bgnice/-o markdirs/-o nolog/-o trackall/-o viraw/-s,
+ -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
arithmetic evaluation done on arguments to some builtins
@@ -795,7 +823,7 @@ Implementation differences:
C3) Which new features in ksh-93 are not in bash, and which are?
-New things in ksh-93 not in bash-2.05b:
+New things in ksh-93 not in bash-3.0:
associative arrays
floating point arithmetic and variables
math library functions
@@ -814,15 +842,15 @@ New things in ksh-93 not in bash-2.05b:
`fc' has been renamed to `hist'
`.' 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
+ lexical scoping for local variables in `ksh' functions
+ no scoping for local variables in `POSIX' functions
-New things in ksh-93 present in bash-2.05b:
+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
?:, ++, --, `expr1 , expr2' arithmetic operators
@@ -847,6 +875,7 @@ New things in ksh-93 present in bash-2.05b:
command and arithmetic substitution performed on PS1, PS4, and ENV
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?
@@ -1235,9 +1264,9 @@ subdirs-clean:
( cd $$d && ${MAKE} ${MFLAGS} clean ) \
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.
+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'?
@@ -1305,6 +1334,49 @@ This is, I presume, for historical compatibility. Certain versions of
Unix, and early network file systems, used paths of the form
//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
F1) Why can't I use command line editing in my `cmdtool'?
@@ -1410,7 +1482,7 @@ comp.unix.shell). While most commands of the form
can be converted to `< file command', shell control structures such as
loops and subshells require `command < file'.
-The file CWRU/sh-redir-hack in the bash-2.05a distribution is an
+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
modify parse.y by hand. Note that if you apply this, you must
@@ -1671,11 +1743,17 @@ A second edition of this book is available, published in January, 1998.
The ISBN number is 1-56592-347-2. Look for it in the same fine bookstores
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.
-a better bash debugger (a minimally-tested version is included with bash-2.05b)
+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
@@ -1685,7 +1763,6 @@ These are features that may or may not appear in a future version of bash.
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
a better loadable interface to perl with access to the shell builtins and
@@ -1698,10 +1775,9 @@ Some of the new ksh93 pattern matching operators, like backreferencing
H5) When will the next release appear?
-The next version will appear sometime in 2002. Never make predictions.
-
+The next version will appear sometime in 2005. Never make predictions.
-This document is Copyright 1995-2002 by Chester Ramey.
+This document is Copyright 1995-2004 by Chester Ramey.
Permission is hereby granted, without written agreement and
without license or royalty fees, to use, copy, and distribute
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 3ecc5d88..270ddfd7 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -1,6 +1,6 @@
# This Makefile is for the Bash/documentation directory -*- text -*-.
#
-# Copyright (C) 1996 Free Software Foundation, Inc.
+# Copyright (C) 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,6 +16,14 @@
# along with this program; if not, write to the Free Software
# 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@
RM = rm -f
@@ -47,6 +55,8 @@ INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
BUILD_DIR = @BUILD_DIR@
+SUPPORT_SRCDIR = $(topdir)/support
+
# bad style
RL_LIBDIR = $(topdir)/lib/readline
@@ -55,21 +65,24 @@ TEXINDEX = texindex
TEX = tex
MAKEINFO = makeinfo
-TEXI2DVI = ${topdir}/support/texi2dvi
-TEXI2HTML = ${topdir}/support/texi2html
+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 = 300 # could be 600 if you like
+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
DVIPDF = dvipdfm -o $@ -p ${PAPERSIZE}
PSPDF = gs -sPAPERSIZE=${PAPERSIZE} -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@
-MKDIRS = ${topdir}/support/mkdirs
+MKDIRS = ${SUPPORT_SRCDIR}/mkdirs
# This should be a program that converts troff to an ascii-readable format
NROFF = groff -Tascii
@@ -77,8 +90,10 @@ NROFF = groff -Tascii
# This should be a program that converts troff to postscript
GROFF = groff
-HSUSER = $(RL_LIBDIR)/doc/hsuser.texinfo
-RLUSER = $(RL_LIBDIR)/doc/rluser.texinfo
+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
@@ -122,10 +137,14 @@ RLUSER = $(RL_LIBDIR)/doc/rluser.texinfo
$(RM) $@
-${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
+PSFILES = bash.ps bashbug.ps article.ps builtins.ps rbash.ps
DVIFILES = bashref.dvi bashref.ps
INFOFILES = bashref.info
MAN0FILES = bash.0 bashbug.0 builtins.0 rbash.0
@@ -139,35 +158,17 @@ text: ${MAN0FILES}
html: ${HTMLFILES}
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.dvi: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
+ ${SET_TEXINPUTS} $(TEXI2DVI) $(srcdir)/bashref.texi
-bashref.info: $(srcdir)/bashref.texi $(HSUSER) $(RLUSER)
+bashref.info: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
$(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi
-bashref.html: bashref.texi $(HSUSER) $(RLUSER)
+bashref.html: $(BASHREF_FILES) $(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.info: bashref.info
+ ${SHELL} ${INFOPOST} < $(srcdir)/bashref.info > $@ ; \
bash.txt: bash.1
bash.ps: bash.1
@@ -181,6 +182,8 @@ builtins.0: builtins.1 bash.1
rbash.0: rbash.1 bash.1
article.ps: article.ms
+bashref.ps: bashref.dvi
+
article.pdf: article.ps
bashref.pdf: bashref.dvi
bash.pdf: bash.ps
@@ -211,18 +214,18 @@ maybe-clean:
fi
installdirs:
- -test -d $(man1dir) || $(SHELL) ${MKDIRS} $(DESTDIR)$(man1dir)
- -test -d $(infodir) || $(SHELL) ${MKDIRS} $(DESTDIR)$(infodir)
+ -$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(man1dir)
+ -$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(infodir)
-if test -n "$(htmldir)" ; then \
- test -d $(htmldir) || $(SHELL) ${MKDIRS} $(DESTDIR)$(htmldir) ; \
+ $(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(htmldir) ; \
fi
-install: info installdirs
+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)/bashref.info $(DESTDIR)$(infodir)/bash.info
+ -$(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 \
install-info --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/bash.info; \
@@ -285,4 +288,4 @@ rbash: bashref.texi
cmp -s RBASH ../RBASH || mv RBASH ../RBASH
$(RM) RBASH
-xdist: inst posix rbash
+xdist: pdf inst posix rbash
diff --git a/doc/bash.1 b/doc/bash.1
index 2b35d253..21d0aba7 100644
--- a/doc/bash.1
+++ b/doc/bash.1
@@ -4,14 +4,14 @@
.\" Chet Ramey
.\" Information Network Services
.\" Case Western Reserve University
-.\" chet@ins.CWRU.Edu
+.\" chet@po.CWRU.Edu
.\"
-.\" Last Change: Mon Jul 15 15:20:56 EDT 2002
+.\" 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 "2002 July 15" "GNU Bash-2.05b"
+.TH BASH 1 "2004 June 26" "GNU Bash-3.0"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
@@ -51,8 +51,8 @@ bash \- GNU Bourne-Again SHell
[options]
[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.
+.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
is an \fBsh\fR-compatible command language interpreter that
@@ -152,6 +152,17 @@ single-character options to be recognized.
.PP
.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
\fBpo\fP (portable object) file format.
@@ -258,7 +269,7 @@ An \fIinteractive\fP shell is one started without non-option arguments
and without the
.B \-c
option
-whose standard input and output are
+whose standard input and error are
both connected to terminals (as determined by
.IR isatty (3)),
or one started with the
@@ -476,7 +487,6 @@ command:
.if n ! case do done elif else esac fi for function if in select then until while { } time [[ ]]
.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
.PP
@@ -510,12 +520,15 @@ command (see
.B REDIRECTION
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 NOT of the exit status of the last command.
-Otherwise, the status of the pipeline is the exit status of the last
-command.
+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.
.PP
@@ -610,7 +623,11 @@ executed in the list.
A \fIcompound command\fP is one of the following:
.TP
(\fIlist\fP)
-\fIlist\fP is executed in a subshell. Variable assignments and builtin
+\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
\fIlist\fP.
@@ -621,7 +638,7 @@ after the command completes. The return status is the exit status of
This is known as a \fIgroup command\fP.
The return status is the exit status of
\fIlist\fP.
-Note that unlike the metacharacters \fB(\fP and \fB\)\fP, \fB{\fP and
+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
break, they must be separated from \fIlist\fP by whitespace.
@@ -645,6 +662,8 @@ Word splitting and pathname expansion are not performed on the words
between the \fB[[\fP and \fB]]\fP; tilde expansion, parameter and
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
When the \fB==\fP and \fB!=\fP operators are used, the string to the
@@ -656,6 +675,26 @@ Any part of the pattern may be quoted to force it to be matched as a
string.
.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:
.if t .sp 0.5
@@ -798,15 +837,32 @@ The exit status of the \fBwhile\fP and \fBuntil\fP commands
is the exit status
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
+.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
below.)
@@ -880,6 +936,8 @@ or
.BR <newline> .
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
.B *
@@ -958,7 +1016,7 @@ It can be a
.IR name ,
a number, or one of the special characters listed below under
.BR "Special Parameters" .
-For the shell's purposes, a
+A
.I variable
is a parameter denoted by a
.IR name .
@@ -1001,7 +1059,7 @@ below). If the variable has its
.B integer
attribute set, then
.I value
-is subject to arithmetic expansion even if the $((...)) expansion is
+is evaluated as an arithmetic expression even if the $((...)) expansion is
not used (see
.B "Arithmetic Expansion"
below).
@@ -1010,6 +1068,7 @@ of \fB"$@"\fP as explained below under
.BR "Special Parameters" .
Pathname expansion is not performed.
Assignment statements may also appear as arguments to the
+.BR alias ,
.BR declare ,
.BR typeset ,
.BR export ,
@@ -1138,6 +1197,54 @@ The following variables are set by the shell:
Expands to the full file name used to invoke this instance of
.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
this instance of
@@ -1195,6 +1302,15 @@ commands invoked by the
programmable completion facilities (see \fBProgrammable Completion\fP
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
words in the current command line.
@@ -1227,7 +1343,11 @@ Expands to the effective user ID of the current user, initialized at
shell startup. This variable is readonly.
.TP
.B FUNCNAME
-The name of any currently-executing shell function.
+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
.SM
@@ -1439,6 +1559,14 @@ An array variable from which \fBbash\fP reads the possible completions
generated by a shell function invoked by the programmable completion
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
.B fc
@@ -1468,23 +1596,27 @@ of the patterns in
it is removed from the list of matches.
.TP
.B HISTCONTROL
-If set to a value of
+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 entered on the history list.
-If set to a value of
-.IR ignoredups ,
-lines matching the last history line are not entered.
+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
-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
+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
not tested, and are added to the history regardless of the value of
@@ -1525,6 +1657,13 @@ The number of commands to remember in the command history (see
.B HISTORY
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
\fBcd\fP builtin command.
@@ -1673,12 +1812,17 @@ is a colon-separated list of directories in which
the shell looks for commands (see
.SM
.B COMMAND EXECUTION
-below). The default path is system-dependent,
+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:.''.
+.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
If this variable is in the environment when \fBbash\fP starts, the shell
@@ -1726,6 +1870,12 @@ displays during an execution trace. The first character of
is replicated multiple times, as necessary, to indicate multiple
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
how the timing information for pipelines prefixed with the
@@ -1958,8 +2108,9 @@ may be generated. This mechanism is similar to
need not exist. Patterns to be brace expanded take
the form of an optional
.IR preamble ,
-followed by a series of comma-separated strings
-between a pair of braces, followed by an optional
+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
within the braces, and the postscript is then appended
@@ -1969,6 +2120,14 @@ Brace expansions may be nested. The results of each expanded
string are not sorted; left to right order is preserved.
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
in the result. It is strictly textual.
@@ -1977,7 +2136,8 @@ does not apply any syntactic interpretation to the context of the
expansion or the text between the braces.
.PP
A correctly-formed brace expansion must contain unquoted opening
-and closing braces, and at least one unquoted comma.
+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
being considered part of a brace expression.
@@ -2115,8 +2275,10 @@ a level of variable indirection is introduced.
expanded and that value is used in the rest of the substitution, rather
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.
+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,
parameter expansion, command substitution, and arithmetic expansion.
@@ -2194,12 +2356,28 @@ Substring indexing is zero-based unless the positional parameters
are used, in which case the indexing starts at 1.
.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
.SM
.B IFS
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.
If
@@ -2367,7 +2545,7 @@ is treated as if it were within double quotes, but a double quote
inside the parentheses is not treated specially.
All tokens in the expression undergo parameter expansion, string
expansion, command substitution, and quote removal.
-Arithmetic substitutions may be nested.
+Arithmetic expansions may be nested.
.PP
The evaluation is performed according to the rules listed below under
.SM
@@ -2490,6 +2668,10 @@ If the
.B nullglob
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
is enabled, the match is performed without regard to the case
@@ -2514,6 +2696,7 @@ below under
for a description of the
.BR nocaseglob ,
.BR nullglob ,
+.BR failglob ,
and
.B dotglob
shell options.
@@ -2534,13 +2717,13 @@ The file names
.B ``.''
and
.B ``..''
-are always ignored, even when
+are always ignored when
.SM
.B GLOBIGNORE
-is set. However, setting
+is set and not null. However, setting
.SM
.B GLOBIGNORE
-has the effect of enabling the
+to a non-null value has the effect of enabling the
.B dotglob
shell option, so all other file names beginning with a
.B ``.''
@@ -2563,7 +2746,9 @@ is unset.
.PP
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
+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
The special pattern characters have the following meanings:
@@ -3009,16 +3194,18 @@ builtin commands (see
.SM
.B SHELL BUILTIN COMMANDS
below).
-The first word of each command, if unquoted,
+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 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
+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
+is not expanded a second time.
+This means that one may alias
.B ls
to
.BR "ls \-F" ,
@@ -3092,9 +3279,9 @@ function become the positional parameters
during its execution.
The special parameter
.B #
-is updated to reflect the change. Positional parameter 0
+is updated to reflect the change. Special parameter 0
is unchanged.
-The
+The first element of the
.SM
.B FUNCNAME
variable is set to the name of the function while the function
@@ -3113,7 +3300,10 @@ below) is not inherited unless the function has been given the
\fBtrace\fP attribute (see the description of the
.SM
.B declare
-builtin below).
+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
.B local
@@ -3124,7 +3314,10 @@ If the builtin command
.B 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
+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 #
are restored to the values they had prior to the function's
@@ -3142,24 +3335,30 @@ option to
.B declare
or
.B typeset
-will list the function names only.
+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
.B \-f
option to the
.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
of recursive calls.
.SH "ARITHMETIC EVALUATION"
The shell allows arithmetic expressions to be evaluated, under
-certain circumstances (see the \fBlet\fP builtin command and
-\fBArithmetic Expansion\fP).
+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 and associativity are the same
-as in the C language.
+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.
@@ -3212,7 +3411,7 @@ logical AND
logical OR
.TP
.B \fIexpr\fP?\fIexpr\fP:\fIexpr\fP
-conditional evaluation
+conditional operator
.TP
.B = *= /= %= += \-= <<= >>= &= ^= |=
assignment
@@ -3225,8 +3424,12 @@ Shell variables are allowed as operands; parameter expansion is
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.
+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.
.PP
@@ -3348,9 +3551,11 @@ builtin below.
.B \-z \fIstring\fP
True if the length of \fIstring\fP is zero.
.TP
-.B \-n \fIstring\fP
-.TP
\fIstring\fP
+.PD 0
+.TP
+.B \-n \fIstring\fP
+.PD
True if the length of
.I string
is non-zero.
@@ -3537,16 +3742,17 @@ the current working directory
.IP \(bu
the file creation mode mask
.IP \(bu
-shell variables marked for export, along with variables exported for
-the command, passed in the environment
+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 the inherited
-from the shell's parent, and traps ignored by the shell are ignored
+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 and asynchronous commands are invoked in a
+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
@@ -3660,7 +3866,7 @@ and
.SM
.BR SIGTSTP .
.PP
-Synchronous jobs started by \fBbash\fP have signal handlers
+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
ignore
@@ -3669,7 +3875,7 @@ ignore
and
.SM
.B SIGQUIT
-as well.
+in addition to these inherited handlers.
Commands run as a result of command substitution ignore the
keyboard-generated job control signals
.SM
@@ -3717,9 +3923,9 @@ sends a
.B SIGHUP
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.
+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
cause the \fBwait\fP builtin to return immediately with an exit status
@@ -3957,13 +4163,14 @@ the username of the current user
the version of \fBbash\fP (e.g., 2.00)
.TP
.B \eV
-the release of \fBbash\fP, version + patchelvel (e.g., 2.00.0)
+the release of \fBbash\fP, version + patch level (e.g., 2.00.0)
.TP
.B \ew
-the current working directory
+the current working directory, with \fB$HOME\fP abbreviated with a tilde
.TP
.B \eW
-the basename of the current working directory
+the basename of the current working directory, with \fB$HOME\fP
+abbreviated with a tilde
.TP
.B \e!
the history number of this command
@@ -4420,6 +4627,16 @@ set to
words which have more than one possible completion cause the
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
by \fIstat\fP(2) is appended to the filename when listing possible
@@ -4795,6 +5012,11 @@ Word boundaries are the same as those used by \fBbackward\-word\fP.
Kill the word behind point, using white space as a word boundary.
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.
.TP
@@ -5184,13 +5406,21 @@ If the previously-applied actions do not generate any matches, and the
\fB\-o dirnames\fP option was supplied to \fBcomplete\fP when the
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 default\fP option was supplied to \fBcomplete\fP when the
-compspec was defined, readline's default completion will be performed
+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,
the programmable completion functions force readline to append a slash
@@ -5342,6 +5572,12 @@ history expansion character, which is \^\fB!\fP\^ by default.
Only backslash (\^\fB\e\fP\^) and single quotes can quote
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
builtin may be used to tailor the behavior of history expansion.
@@ -5393,7 +5629,9 @@ history list.
.B !
Start a history substitution, except when followed by a
.BR blank ,
-newline, = or (.
+newline, carriage return, =
+or ( (when the \fBextglob\fP shell option is enabled using
+the \fBshopt\fP builtin).
.TP
.B !\fIn\fR
Refer to command line
@@ -5553,6 +5791,10 @@ or `\fB:&\fP'. If used with
`\fB:s\fP', any delimiter can be used
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"
.\" start of bash_builtins
@@ -5796,9 +6038,27 @@ option forces symbolic links to be followed. An argument of
is equivalent to
.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
.I command
@@ -5895,6 +6155,10 @@ beyond the simple generation of completions.
\fIcomp-option\fP may be one of:
.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
no matches.
@@ -6062,10 +6326,10 @@ shell is not executing a loop when
.B continue
is executed.
.TP
-\fBdeclare\fP [\fB\-afFirtx\fP] [\fB\-p\fP] [\fIname\fP[=\fIvalue\fP]]
+\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]]
+\fBtypeset\fP [\fB\-afFirtx\fP] [\fB\-p\fP] [\fIname\fP[=\fIvalue\fP] ...]
.PD
Declare variables and/or give them attributes.
If no \fIname\fPs are given then display the values of variables.
@@ -6080,7 +6344,9 @@ The
.B \-F
option inhibits the display of function definitions; only the
function name and attributes are printed.
-The
+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
.BR \-f .
@@ -6123,7 +6389,10 @@ may not be used to destroy an array variable. When used in a function,
makes each
\fIname\fP local, as with the
.B local
-command. The return value is 0 unless an invalid option is encountered,
+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'',
.if t \f(CW\-f foo=bar\fP,
@@ -6397,8 +6666,10 @@ option is supplied, a list
of all names that are exported in this shell is printed.
The
.B \-n
-option causes the export property to be removed from the
-named variables.
+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
encountered,
@@ -6472,7 +6743,7 @@ echoed and executed.
In the second form, \fIcommand\fP is re-executed after each instance
of \fIpat\fP is replaced by \fIrep\fP.
A useful alias to use with this is
-.if n ``r=fc -s'',
+.if n ``r="fc -s"'',
.if t \f(CWr='fc \-s'\fP,
so that typing
.if n ``r cc''
@@ -6688,7 +6959,13 @@ have been modified. An argument of
.I n
lists only the last
.I n
-lines. If \fIfilename\fP is supplied, it is used as the
+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
.B HISTFILE
@@ -6735,6 +7012,8 @@ history list is removed before the
are added.
.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
\fIoffset\fP is supplied as an argument to \fB\-d\fP, or the
@@ -6809,18 +7088,15 @@ to the processes named by
or
.IR jobspec .
.I sigspec
-is either a signal name such as
+is either a case-insensitive 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
+(with or without the
.SM
.B SIG
-prefix.
+prefix) or a signal number;
+.I signum
+is a signal number.
If
.I sigspec
is not present, then
@@ -6939,7 +7215,10 @@ format specifications, each of which causes printing of the next successive
\fIargument\fP.
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 (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
The \fIformat\fP is reused as necessary to consume all of the \fIarguments\fP.
@@ -7101,7 +7380,7 @@ times out, or an invalid file descriptor is supplied as the argument to
\fB\-u\fP.
.RE
.TP
-\fBreadonly\fP [\fB\-apf\fP] [\fIname\fP ...]
+\fBreadonly\fP [\fB\-apf\fP] [\fIname\fP[=\fIword\fP] ...]
.PD
The given
\fInames\fP are marked readonly; the values of these
@@ -7124,6 +7403,8 @@ The
.B \-p
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
.I names
@@ -7149,6 +7430,8 @@ or the exit status of the last command executed within the
script as the exit status of the script. If used outside a
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 ...]
Without options, the name and value of each shell variable are displayed
@@ -7166,8 +7449,8 @@ Options, if specified, have the following meanings:
.PD 0
.TP 8
.B \-a
-Automatically mark variables and functions which are modified or created
-for export to the environment of subsequent commands.
+Automatically mark variables and functions which are modified or
+created for export to the environment of subsequent commands.
.TP 8
.B \-b
Report the status of terminated background jobs
@@ -7178,13 +7461,14 @@ effective only when job control is enabled.
Exit immediately if a \fIsimple command\fP (see
.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
+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
-.I while
-loop,
-part of an
+.B until
+keyword,
+part of the test in an
.I if
statement, part of a
.B &&
@@ -7241,6 +7525,14 @@ with the
.B \-\-noediting
option.
.TP 8
+.B errtrace
+Same as
+.BR \-E .
+.TP 8
+.B functrace
+Same as
+.BR \-T .
+.TP 8
.B errexit
Same as
.BR \-e .
@@ -7306,11 +7598,17 @@ Same as
Same as
.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 (\fIposix mode\fP).
+from the POSIX 1003.2 standard to match the standard (\fI`posix mode\fP).
.TP 8
.B privileged
Same as
@@ -7376,10 +7674,12 @@ Print shell input lines as they are read.
.TP 8
.B \-x
After expanding each \fIsimple command\fP,
-display the expanded value of
+\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.
+followed by the command and its expanded arguments
+or associated word list.
.TP 8
.B \-B
The shell performs brace expansion (see
@@ -7400,6 +7700,11 @@ creating output files by using the redirection operator
instead of
.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
.B !
@@ -7416,6 +7721,11 @@ physical directory structure instead. By default,
follows the logical chain of directories when performing commands
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
unset. Otherwise, the positional parameters are set to the
@@ -7576,10 +7886,53 @@ If set, aliases are expanded as described above under
.BR ALIASES .
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
of the
@@ -7675,8 +8028,9 @@ If set, the programmable completion facilities (see
This option is enabled by default.
.TP 8
.B promptvars
-If set, prompt strings undergo variable and parameter expansion after
-being expanded as described in
+If set, prompt strings undergo
+parameter expansion, command substitution, arithmetic
+expansion, and quote removal after being expanded as described in
.SM
.B PROMPTING
above. This option is enabled by default.
@@ -7818,7 +8172,7 @@ using the rules listed above.
Print the accumulated user and system times for the shell and
for processes run from the shell. The return status is 0.
.TP
-\fBtrap\fP [\fB\-lp\fP] [\fIarg\fP] [\fIsigspec\fP ...]
+\fBtrap\fP [\fB\-lp\fP] [[\fIarg\fP] \fIsigspec\fP ...]
The command
.I arg
is to be read and executed when the shell receives
@@ -7826,10 +8180,10 @@ signal(s)
.IR sigspec .
If
.I arg
-is absent or
+is absent (and there is a single \fIsigspec\fP) or
.BR \- ,
-all specified signals are
-reset to their original values (the values they had
+each specified signal is
+reset to its original disposition (the value it had
upon entrance to the shell).
If
.I arg
@@ -7847,11 +8201,16 @@ If no arguments are supplied or if only
.B \-p
is given,
.B trap
-prints the list of commands associated with each signal number.
+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
is
@@ -7867,10 +8226,14 @@ is
.BR DEBUG ,
the command
.I arg
-is executed after every \fIsimple command\fP (see
+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
is
@@ -7878,16 +8241,18 @@ is
.BR ERR ,
the command
.I arg
-is executed whenever a simple command has a non\-zero exit status.
+is executed whenever a simple command has a non\-zero exit status,
+subject to the following conditions.
The
.SM
-.BR ERR
-trap is not executed if the failed command is part of an
-.I until
+.B ERR
+trap is not executed if the failed
+command is part of the command list immediately following a
+.B while
or
-.I while
-loop,
-part of an
+.B until
+keyword,
+part of the test in an
.I if
statement, part of a
.B &&
@@ -7896,10 +8261,16 @@ or
list, or if the command's return value is
being inverted via
.BR ! .
-The
-.B \-l
-option causes the shell to print a list of signal names and
-their corresponding numbers.
+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
process when it is created.
@@ -8142,7 +8513,7 @@ or
are unset, they lose their special properties, even if they are
subsequently reset. The exit status is true unless a
.I name
-does not exist or is readonly.
+is readonly.
.TP
\fBwait\fP [\fIn\fP]
Wait for the specified process and return its termination
@@ -8233,10 +8604,13 @@ turning off restricted mode with
.PP
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
+.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
script.
@@ -8287,15 +8661,16 @@ bfox@gnu.org
.PP
Chet Ramey, Case Western Reserve University
.br
-chet@ins.CWRU.Edu
+chet@po.CWRU.Edu
.SH BUG REPORTS
If you find a bug in
.B bash,
you should report it. But first, you should
make sure that it really is a bug, and that it appears in the latest
version of
-.B bash
-that you have.
+.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
.I bashbug
@@ -8327,7 +8702,7 @@ it provides for filing a bug report.
.PP
Comments and bug reports concerning
this manual page should be directed to
-.IR chet@ins.CWRU.Edu .
+.IR chet@po.CWRU.Edu .
.SH BUGS
.PP
It's too big and too slow.
@@ -8355,7 +8730,9 @@ a unit.
.PP
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.
+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.
.zZ
diff --git a/doc/bashref.info b/doc/bashref.info
index 8f1b799c..650361b4 100644
--- a/doc/bashref.info
+++ b/doc/bashref.info
@@ -1,33 +1,34 @@
-This is bashref.info, produced by makeinfo version 4.1 from
-/usr/homes/chet/src/bash/src/doc/bashref.texi.
+This is bashref.info, produced by makeinfo version 4.7 from
+/Users/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 (version 3.0, 27 July 2004).
-This text is a brief description of the features that are present in
-the Bash shell.
+ This is Edition 3.0, last updated 27 July 2004, of `The GNU Bash
+Reference Manual', for `Bash', Version 3.0.
-This is Edition 2.5b, last updated 15 July 2002,
-of `The GNU Bash Reference Manual',
-for `Bash', Version 2.05b.
+ Copyright (C) 1988-2004 Free Software Foundation, Inc.
-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 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."
-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.
+ (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."
-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.
+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)
@@ -35,13 +36,11 @@ File: bashref.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir)
Bash Features
*************
- 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.
+This text is a brief description of the features that are present in
+the Bash shell (version 3.0, 27 July 2004)..
- Copyright (C) 1991-2002 Free Software Foundation, Inc.
+ 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
features that only appear in Bash. Some of the shells that Bash has
@@ -86,6 +85,8 @@ on shell behavior.
between Bash and historical
versions of /bin/sh.
+* Copying This Manual:: Copying this manual.
+
* Builtin Index:: Index of Bash builtin commands.
* Reserved Word Index:: Index of Bash reserved words.
@@ -101,8 +102,8 @@ on shell behavior.

File: bashref.info, Node: Introduction, Next: Definitions, Prev: Top, Up: Top
-Introduction
-************
+1 Introduction
+**************
* Menu:
@@ -113,14 +114,14 @@ Introduction

File: bashref.info, Node: What is Bash?, Next: What is a shell?, Up: Introduction
-What is Bash?
-=============
+1.1 What is Bash?
+=================
- Bash is the shell, or command language interpreter, for the GNU
+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.
+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
features from the Korn shell `ksh' and the C shell `csh'. It is
@@ -132,21 +133,30 @@ improvements over `sh' for both interactive and programming use.
version of `csh', Bash is the default shell. Like other GNU software,
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.
+exist for MS-DOS, OS/2, and Windows platforms.

File: bashref.info, Node: What is a shell?, Prev: What is Bash?, Up: Introduction
-What is a shell?
-================
+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.
- 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
+ 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.
+`/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
asynchronously. The shell waits for synchronous commands to complete
@@ -154,9 +164,7 @@ before accepting more input; asynchronous commands continue to execute
in parallel with the shell while it reads and executes additional
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.
+control over the contents of commands' environments.
Shells also provide a small set of built-in commands ("builtins")
implementing functionality impossible or inconvenient to obtain via
@@ -175,16 +183,16 @@ control constructs, quoting, and functions.
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.
+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
-Definitions
-***********
+2 Definitions
+*************
- These definitions are used throughout the remainder of this manual.
+These definitions are used throughout the remainder of this manual.
`POSIX'
A family of open system standards based on Unix. Bash is
@@ -270,14 +278,14 @@ Definitions

File: bashref.info, Node: Basic Shell Features, Next: Shell Builtin Commands, Prev: Definitions, Up: Top
-Basic Shell Features
-********************
+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, and the
-rules for evaluation and quoting are taken from the POSIX 1003.2
-specification for the `standard' Unix shell.
+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':
commands, control structures, shell functions, shell parameters, shell
@@ -289,8 +297,8 @@ from and to named files, and how the shell executes commands.
* Shell Syntax:: What your input means to the shell.
* 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
+* 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.
* Executing Commands:: What happens when you run a command.
@@ -299,8 +307,8 @@ from and to named files, and how the shell executes commands.

File: bashref.info, Node: Shell Syntax, Next: Shell Commands, Up: Basic Shell Features
-Shell Syntax
-============
+3.1 Shell Syntax
+================
* Menu:
@@ -327,10 +335,10 @@ exit status available for further inspection or processing.

File: bashref.info, Node: Shell Operation, Next: Quoting, Up: Shell Syntax
-Shell Operation
----------------
+3.1.1 Shell Operation
+---------------------
- The following is a brief description of the shell's operation when it
+The following is a brief description of the shell's operation when it
reads and executes a command. Basically, the shell does the following:
1. Reads its input from a file (*note Shell Scripts::), from a string
@@ -362,8 +370,8 @@ reads and executes a command. Basically, the shell does the following:

File: bashref.info, Node: Quoting, Next: Comments, Prev: Shell Operation, Up: Shell Syntax
-Quoting
--------
+3.1.2 Quoting
+-------------
* Menu:
@@ -387,18 +395,20 @@ meaning to the shell and must be quoted if it is to represent itself.
When the command history expansion facilities are being used, the
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.
+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
-................
+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
+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
effectively ignored).
@@ -406,29 +416,30 @@ effectively ignored).

File: bashref.info, Node: Single Quotes, Next: Double Quotes, Prev: Escape Character, Up: Quoting
-Single Quotes
-.............
+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
+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.

File: bashref.info, Node: Double Quotes, Next: ANSI-C Quoting, Prev: Single Quotes, Up: Quoting
-Double Quotes
-.............
+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
+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
characters: `$', ``', `"', `\', or `newline'. Within double quotes,
backslashes that are followed by one of these characters are removed.
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.
+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
double quotes (*note Shell Parameter Expansion::).
@@ -436,13 +447,13 @@ double quotes (*note Shell Parameter Expansion::).

File: bashref.info, Node: ANSI-C Quoting, Next: Locale Translation, Prev: Double Quotes, Up: Quoting
-ANSI-C 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:
+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'
alert (bell)
@@ -491,11 +502,11 @@ been present.

File: bashref.info, Node: Locale Translation, Prev: ANSI-C Quoting, Up: Quoting
-Locale-Specific Translation
-...........................
+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
+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.
@@ -510,10 +521,10 @@ Still others use both variables in this fashion:

File: bashref.info, Node: Comments, Prev: Quoting, Up: Shell Syntax
-Comments
---------
+3.1.3 Comments
+--------------
- In a non-interactive shell, or an interactive shell in which the
+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
remaining characters on that line to be ignored. An interactive shell
@@ -525,10 +536,10 @@ what makes a shell interactive.

File: bashref.info, Node: Shell Commands, Next: Shell Functions, Prev: Shell Syntax, Up: Basic Shell Features
-Shell Commands
-==============
+3.2 Shell Commands
+==================
- A simple shell command such as `echo a b c' consists of the command
+A simple shell command such as `echo a b c' consists of the command
itself followed by arguments, separated by spaces.
More complex shell commands are composed of simple commands arranged
@@ -542,19 +553,17 @@ construct, or in some other grouping.
* Pipelines:: Connecting the input and output of several
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.
+* Compound Commands:: Shell commands for control flow.

File: bashref.info, Node: Simple Commands, Next: Pipelines, Up: Shell Commands
-Simple 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
+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.
@@ -565,10 +574,10 @@ exit status as provided by the POSIX 1003.1 `waitpid' function, or

File: bashref.info, Node: Pipelines, Next: Lists, Prev: Simple Commands, Up: Shell Commands
-Pipelines
----------
+3.2.2 Pipelines
+---------------
- A `pipeline' is a sequence of simple commands separated by `|'.
+A `pipeline' is a sequence of simple commands separated by `|'.
The format for a pipeline is
[`time' [`-p']] [`!'] COMMAND1 [`|' COMMAND2 ...]
@@ -593,19 +602,24 @@ shell waits for all commands in the pipeline to complete.
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.
+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: Looping Constructs, Prev: Pipelines, Up: Shell Commands
+File: bashref.info, Node: Lists, Next: Compound Commands, Prev: Pipelines, Up: Shell Commands
-Lists of 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'.
+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,
followed by `;' and `&', which have equal precedence.
@@ -642,12 +656,34 @@ status.
command executed in the list.

-File: bashref.info, Node: Looping Constructs, Next: Conditional Constructs, Prev: Lists, Up: Shell Commands
+File: bashref.info, Node: Compound Commands, Prev: Lists, Up: Shell Commands
-Looping Constructs
-------------------
+3.2.4 Compound Commands
+-----------------------
- Bash supports the following looping constructs.
+* 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
syntax, it may be replaced with one or more newlines.
@@ -695,14 +731,15 @@ syntax, it may be replaced with one or more newlines.
command in LIST that is executed, or false if any of the
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
+File: bashref.info, Node: Conditional Constructs, Next: Command Grouping, Prev: Looping Constructs, Up: Compound Commands
-Conditional Constructs
-----------------------
+3.2.4.2 Conditional Constructs
+..............................
`if'
The syntax of the `if' command is:
@@ -800,7 +837,6 @@ Conditional Constructs
expression is non-zero, the return status is 0; otherwise the
return status is 1. This is exactly equivalent to
let "EXPRESSION"
-
*Note Bash Builtins::, for a full description of the `let' builtin.
`[[...]]'
@@ -813,7 +849,8 @@ Conditional Constructs
performed on the words between the `[[' and `]]'; tilde expansion,
parameter and variable expansion, arithmetic expansion, command
substitution, process substitution, and quote removal are
- performed.
+ 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
of the operator is considered a pattern and matched according to
@@ -822,6 +859,22 @@ Conditional Constructs
respectively, and 1 otherwise. Any part of the pattern may be
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:
@@ -837,19 +890,19 @@ Conditional Constructs
`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
+File: bashref.info, Node: Command Grouping, Prev: Conditional Constructs, Up: Compound Commands
-Grouping 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
+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.
@@ -857,9 +910,10 @@ the list may be redirected to a single stream.
( LIST )
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.
+ 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.
`{}'
{ LIST; }
@@ -881,72 +935,99 @@ LIST.

File: bashref.info, Node: Shell Functions, Next: Shell Parameters, Prev: Shell Commands, Up: Basic Shell Features
-Shell Functions
-===============
+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.
+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; }
+ 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
-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.
+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. Positional
-parameter `0' is unchanged. The `FUNCNAME' variable is set to the name
-of the function while the function is executing.
+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. 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'.
+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'
builtin. These variables are visible only to the function and the
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.

File: bashref.info, Node: Shell Parameters, Next: Shell Expansions, Prev: Shell Functions, Up: Basic Shell Features
-Shell Parameters
-================
+3.4 Shell Parameters
+====================
* Menu:
* Positional Parameters:: The shell's command-line arguments.
-* Special Parameters:: Parameters with special meanings.
+* 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. 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::).
+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
is a valid value. Once a variable is set, it may be unset only by using
@@ -954,25 +1035,24 @@ the `unset' builtin command.
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
+ 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.
+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
-Positional Parameters
----------------------
+3.4.1 Positional Parameters
+---------------------------
- A POSITIONAL PARAMETER is a parameter denoted by one or more digits,
+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
using the `set' builtin command. Positional parameter `N' may be
@@ -988,10 +1068,10 @@ is expanded, it must be enclosed in braces.

File: bashref.info, Node: Special Parameters, Prev: Positional Parameters, Up: Shell Parameters
-Special Parameters
-------------------
+3.4.2 Special Parameters
+------------------------
- The shell treats several parameters specially. These parameters may
+The shell treats several parameters specially. These parameters may
only be referenced; assignment to them is not allowed.
`*'
@@ -1052,11 +1132,11 @@ only be referenced; assignment to them is not allowed.

File: bashref.info, Node: Shell Expansions, Next: Redirections, Prev: Shell Parameters, Up: Basic Shell Features
-Shell Expansions
-================
+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:
+Expansion is performed on the command line after it has been split into
+`token's. There are seven kinds of expansion performed:
* brace expansion
* tilde expansion
@@ -1107,23 +1187,31 @@ performed.

File: bashref.info, Node: Brace Expansion, Next: Tilde Expansion, Up: Shell Expansions
-Brace Expansion
----------------
+3.5.1 Brace Expansion
+---------------------
- Brace expansion is a mechanism by which arbitrary strings may be
+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.
+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
are not sorted; left to right order is preserved. For example,
bash$ echo a{d,c,b}e
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
is strictly textual. Bash does not apply any syntactic interpretation
@@ -1132,8 +1220,13 @@ avoid conflicts with parameter expansion, the string `${' is not
considered eligible for brace expansion.
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.
+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
of the strings to be generated is longer than in the above example:
@@ -1144,10 +1237,10 @@ of the strings to be generated is longer than in the above example:

File: bashref.info, Node: Tilde Expansion, Next: Shell Parameter Expansion, Prev: Brace Expansion, Up: Shell Expansions
-Tilde Expansion
----------------
+3.5.2 Tilde Expansion
+---------------------
- If a word begins with an unquoted tilde character (`~'), all of the
+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
characters in the tilde-prefix are quoted, the characters in the
@@ -1205,17 +1298,18 @@ the expanded value.
`~-N'
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
--------------------------
+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.
+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
escaped by a backslash or within a quoted string, and not within an
@@ -1233,8 +1327,10 @@ of variable indirection is introduced. Bash uses the value of the
variable formed from the rest of PARAMETER as the name of the variable;
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.
+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,
parameter expansion, command substitution, and arithmetic expansion.
@@ -1252,8 +1348,8 @@ if the colon is omitted, the operator tests only for existence.
`${PARAMETER:=WORD}'
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.
+ Positional parameters and special parameters may not be assigned to
+ in this way.
`${PARAMETER:?WORD}'
If PARAMETER is null or unset, the expansion of WORD (or a message
@@ -1284,9 +1380,18 @@ if the colon is omitted, the operator tests only for existence.
starts at 1.
`${!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
substituted. If PARAMETER is `*' or `@', the value substituted is
@@ -1340,18 +1445,18 @@ if the colon is omitted, the operator tests only for existence.
member of the array in turn, and the expansion is the resultant
list.
+

File: bashref.info, Node: Command Substitution, Next: Arithmetic Expansion, Prev: Shell Parameter Expansion, Up: Shell Expansions
-Command Substitution
---------------------
+3.5.4 Command Substitution
+--------------------------
- Command substitution allows the output of a command to replace the
+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
+ or
`COMMAND`
Bash performs the expansion by executing COMMAND and replacing the
@@ -1375,20 +1480,19 @@ filename expansion are not performed on the results.

File: bashref.info, Node: Arithmetic Expansion, Next: Process Substitution, Prev: Command Substitution, Up: Shell Expansions
-Arithmetic Expansion
---------------------
+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:
+Arithmetic expansion allows the evaluation of an arithmetic expression
+and the substitution of the result. The format for arithmetic
+expansion is:
$(( EXPRESSION ))
The expression is treated as if it were within double quotes, but a
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.
+substitution, and quote removal. Arithmetic expansions may be nested.
The evaluation is performed according to the rules listed below
(*note Shell Arithmetic::). If the expression is invalid, Bash prints
@@ -1398,20 +1502,18 @@ occurs.

File: bashref.info, Node: Process Substitution, Next: Word Splitting, Prev: Arithmetic Expansion, Up: Shell Expansions
-Process Substitution
---------------------
+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
+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
+ 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
+ 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
should be read to obtain the output of LIST. Note that no space may
@@ -1425,10 +1527,10 @@ expansion.

File: bashref.info, Node: Word Splitting, Next: Filename Expansion, Prev: Process Substitution, Up: Shell Expansions
-Word Splitting
---------------
+3.5.7 Word Splitting
+--------------------
- The shell scans the results of parameter expansion, command
+The shell scans the results of parameter expansion, command
substitution, and arithmetic expansion that did not occur within double
quotes for word splitting.
@@ -1455,8 +1557,8 @@ expanded within double quotes, a null argument results and is retained.

File: bashref.info, Node: Filename Expansion, Next: Quote Removal, Prev: Word Splitting, Up: Shell Expansions
-Filename Expansion
-------------------
+3.5.8 Filename Expansion
+------------------------
* Menu:
@@ -1469,8 +1571,10 @@ a PATTERN, and replaced with an alphabetically sorted list of file
names matching the pattern. If no matching file names are found, and
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.
+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
the start of a filename or immediately following a slash must be
@@ -1479,29 +1583,31 @@ matching a file name, the slash character must always be matched
explicitly. In other cases, the `.' character is not treated specially.
See the description of `shopt' in *Note Bash Builtins::, for a
-description of the `nocaseglob', `nullglob', and `dotglob' options.
+description of the `nocaseglob', `nullglob', `failglob', and `dotglob'
+options.
The `GLOBIGNORE' shell variable may be used to restrict the set of
filenames matching a pattern. If `GLOBIGNORE' is set, each matching
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.
+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
-Pattern Matching
-................
+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. The special pattern characters must be
-quoted if they are to be matched literally.
+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:
`*'
@@ -1537,7 +1643,6 @@ quoted if they are to be matched literally.
defined in the POSIX 1003.2 standard:
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
character `_'.
@@ -1574,20 +1679,20 @@ of the following sub-patterns:

File: bashref.info, Node: Quote Removal, Prev: Filename Expansion, Up: Shell Expansions
-Quote Removal
--------------
+3.5.9 Quote Removal
+-------------------
- After the preceding expansions, all unquoted occurrences of the
+After the preceding expansions, all unquoted occurrences of the
characters `\', `'', and `"' that did not result from one of the above
expansions are removed.

File: bashref.info, Node: Redirections, Next: Executing Commands, Prev: Shell Expansions, Up: Basic Shell Features
-Redirections
-============
+3.6 Redirections
+================
- Before a command is executed, its input and output may be REDIRECTED
+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
environment. The following redirection operators may precede or appear
@@ -1609,14 +1714,12 @@ it expands to more than one word, Bash reports an error.
Note that the order of redirections is significant. For example,
the command
ls > DIRLIST 2>&1
-
-directs both standard output (file descriptor 1) and standard error
+ 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.
+ 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
redirections, as described in the following table:
@@ -1643,22 +1746,23 @@ redirections, as described in the following table:
integer port number or service name, Bash attempts to open a UDP
connection to the corresponding socket.
+
A failure to open or create a file causes the redirection to fail.
-Redirecting Input
------------------
+3.6.1 Redirecting Input
+-----------------------
- Redirection of input causes the file whose name results from the
+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.
The general format for redirecting input is:
[N]<WORD
-Redirecting Output
-------------------
+3.6.2 Redirecting Output
+------------------------
- Redirection of output causes the file whose name results from the
+Redirection of output causes the file whose name results from the
expansion of WORD to be opened for writing on file descriptor N, or the
standard output (file descriptor 1) if N is not specified. If the file
does not exist it is created; if it does exist it is truncated to zero
@@ -1674,10 +1778,10 @@ regular file. If the redirection operator is `>|', or the redirection
operator is `>' and the `noclobber' option is not enabled, the
redirection is attempted even if the file named by WORD exists.
-Appending Redirected Output
----------------------------
+3.6.3 Appending Redirected Output
+---------------------------------
- Redirection of output in this fashion causes the file whose name
+Redirection of output in this fashion causes the file whose name
results from the expansion of WORD to be opened for appending on file
descriptor N, or the standard output (file descriptor 1) if N is not
specified. If the file does not exist it is created.
@@ -1685,28 +1789,26 @@ specified. If the file does not exist it is created.
The general format for appending output is:
[N]>>WORD
-Redirecting Standard Output and Standard Error
-----------------------------------------------
+3.6.4 Redirecting Standard Output and Standard Error
+----------------------------------------------------
- Bash allows both the standard output (file descriptor 1) and the
+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.
There are two formats for redirecting standard output and standard
error:
&>WORD
-
-and
+ and
>&WORD
-
-Of the two forms, the first is preferred. This is semantically
+ Of the two forms, the first is preferred. This is semantically
equivalent to
>WORD 2>&1
-Here Documents
---------------
+3.6.5 Here Documents
+--------------------
- This type of redirection instructs the shell to read input from the
+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
as the standard input for a command.
@@ -1730,69 +1832,64 @@ characters are stripped from input lines and the line containing
DELIMITER. This allows here-documents within shell scripts to be
indented in a natural fashion.
-Here Strings
-------------
+3.6.6 Here Strings
+------------------
- A variant of here documents, the format is:
+A variant of here documents, the format is:
<<< WORD
The WORD is expanded and supplied to the command on its standard
input.
-Duplicating File Descriptors
-----------------------------
+3.6.7 Duplicating File Descriptors
+----------------------------------
- The redirection operator
+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
+ 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,
the standard input (file descriptor 0) is used.
The operator
[N]>&WORD
-
-is used similarly to duplicate output file descriptors. If N is not
+ 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
redirection error occurs. As a special case, if N is omitted, and WORD
does not expand to one or more digits, the standard output and standard
error are redirected as described previously.
-Moving File Descriptors
------------------------
+3.6.8 Moving File Descriptors
+-----------------------------
- The redirection operator
+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.
+ 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.
-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
-------------------------------------------------
+3.6.9 Opening File Descriptors for Reading and Writing
+------------------------------------------------------
- The redirection operator
+The redirection operator
[N]<>WORD
-
-causes the file whose name is the expansion of WORD to be opened for
+ 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.

File: bashref.info, Node: Executing Commands, Next: Shell Scripts, Prev: Redirections, Up: Basic Shell Features
-Executing Commands
-==================
+3.7 Executing Commands
+======================
* Menu:
@@ -1816,10 +1913,10 @@ Executing Commands

File: bashref.info, Node: Simple Command Expansion, Next: Command Search and Execution, Up: Executing Commands
-Simple Command Expansion
-------------------------
+3.7.1 Simple Command Expansion
+------------------------------
- When a simple command is executed, the shell performs the following
+When a simple command is executed, the shell performs the following
expansions, assignments, and redirections, from left to right.
1. The words that the parser has marked as variable assignments (those
@@ -1859,10 +1956,10 @@ of zero.

File: bashref.info, Node: Command Search and Execution, Next: Command Execution Environment, Prev: Simple Command Expansion, Up: Executing Commands
-Command Search and Execution
-----------------------------
+3.7.2 Command Search and Execution
+----------------------------------
- After a command has been split into words, if it results in a simple
+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.
@@ -1902,11 +1999,10 @@ taken.

File: bashref.info, Node: Command Execution Environment, Next: Environment, Prev: Command Search and Execution, Up: Executing Commands
-Command Execution Environment
------------------------------
+3.7.3 Command Execution Environment
+-----------------------------------
- The shell has an EXECUTION ENVIRONMENT, which consists of the
-following:
+The shell has an EXECUTION ENVIRONMENT, which consists of the following:
* open files inherited by the shell at invocation, as modified by
redirections supplied to the `exec' builtin
@@ -1948,8 +2044,9 @@ inherited from the shell.
* the file creation mode mask
- * shell variables marked for export, along with variables exported
- for the command, passed in the environment (*note Environment::)
+ * 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
the shell's parent, and traps ignored by the shell are ignored
@@ -1958,13 +2055,13 @@ inherited from the shell.
A command invoked in this separate environment cannot affect the
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.
+ 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
default standard input for the command is the empty file `/dev/null'.
@@ -1974,10 +2071,10 @@ calling shell as modified by redirections.

File: bashref.info, Node: Environment, Next: Exit Status, Prev: Command Execution Environment, Up: Executing Commands
-Environment
------------
+3.7.4 Environment
+-----------------
- When a program is invoked it is given an array of strings called the
+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'.
@@ -2010,11 +2107,11 @@ environment.

File: bashref.info, Node: Exit Status, Next: Signals, Prev: Environment, Up: Executing Commands
-Exit Status
------------
+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
+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
failure modes. When a command terminates on a fatal signal whose
@@ -2039,10 +2136,10 @@ conditional and list constructs. All builtins return an exit status of

File: bashref.info, Node: Signals, Prev: Exit Status, Up: Executing Commands
-Signals
--------
+3.7.6 Signals
+-------------
- When Bash is interactive, in the absence of any traps, it ignores
+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
interruptible). When Bash receives a `SIGINT', it breaks out of any
@@ -2050,12 +2147,12 @@ executing loops. In all cases, Bash ignores `SIGQUIT'. If job control
is in effect (*note Job Control::), Bash ignores `SIGTTIN', `SIGTTOU',
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'.
+ 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
exiting, an interactive shell resends the `SIGHUP' to all jobs, running
@@ -2069,22 +2166,22 @@ receive `SIGHUP' using `disown -h'.
Bash Builtins::), Bash sends a `SIGHUP' to all jobs when 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 `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.
+ 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
-Shell Scripts
-=============
+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
+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
of operation creates a non-interactive shell. The shell first searches
@@ -2102,8 +2199,7 @@ to turn on the execute bit. When Bash finds such a file while
searching the `$PATH' for a command, it spawns a subshell to execute
it. In other words, executing
filename ARGUMENTS
-
-is equivalent to executing
+ is equivalent to executing
bash filename ARGUMENTS
if `filename' is an executable shell script. This subshell
@@ -2133,8 +2229,8 @@ interpret the script, even if it is executed under another shell.

File: bashref.info, Node: Shell Builtin Commands, Next: Shell Variables, Prev: Basic Shell Features, Up: Top
-Shell Builtin Commands
-**********************
+4 Shell Builtin Commands
+************************
* Menu:
@@ -2166,13 +2262,16 @@ Completion Builtins::).
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
-Bourne Shell Builtins
-=====================
+4.1 Bourne Shell Builtins
+=========================
- The following shell builtin commands are inherited from the Bourne
+The following shell builtin commands are inherited from the Bourne
Shell. These commands are implemented as specified by the POSIX 1003.2
standard.
@@ -2206,11 +2305,19 @@ standard.
Change the current working directory to DIRECTORY. If DIRECTORY
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.
+ 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'
continue [N]
@@ -2253,10 +2360,12 @@ standard.
option means to no longer mark each NAME for export. If no NAMES
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.
+ 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'
getopts OPTSTRING NAME [ARGS]
@@ -2328,17 +2437,19 @@ standard.
current directory or an invalid option is supplied.
`readonly'
- readonly [-apf] [NAME] ...
+ 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,
each NAME refers to a shell function. The `-a' option means each
NAME refers to an array variable. If no NAME arguments are given,
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.
+ 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'
return [N]
@@ -2348,9 +2459,10 @@ standard.
terminate execution of a script being executed with the `.' (or
`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'.
+ 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'
shift [N]
@@ -2436,25 +2548,36 @@ standard.
`trap'
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.
+ 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.
Trapped signals are reset to their original values in a child
@@ -2487,15 +2610,15 @@ standard.
variable. If the `-f' option is given, the NAMEs refer to shell
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.
+ zero unless a NAME is readonly.

File: bashref.info, Node: Bash Builtins, Next: The Set Builtin, Prev: Bourne Shell Builtins, Up: Shell Builtin Commands
-Bash Builtin Commands
-=====================
+4.2 Bash Builtin Commands
+=========================
- This section describes builtin commands which are unique to or have
+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.
@@ -2576,6 +2699,7 @@ POSIX 1003.2 standard.
`-x KEYSEQ:SHELL-COMMAND'
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.
@@ -2587,6 +2711,23 @@ POSIX 1003.2 standard.
within the function. The return status is non-zero if
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 ...]
Runs COMMAND with ARGUMENTS ignoring any shell function named
@@ -2607,7 +2748,7 @@ POSIX 1003.2 standard.
non-zero if not.
`declare'
- declare [-afFirtx] [-p] [NAME[=VALUE]]
+ declare [-afFirtx] [-p] [NAME[=VALUE] ...]
Declare variables and give them attributes. If no NAMEs are
given, then display the values of variables instead.
@@ -2615,9 +2756,12 @@ POSIX 1003.2 standard.
The `-p' option will display the attributes and values of each
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:
+ 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'
Each NAME is an array variable (*note Arrays::).
@@ -2645,7 +2789,8 @@ POSIX 1003.2 standard.
Using `+' instead of `-' turns off the attribute instead. When
used in a function, `declare' makes each NAME local, as with the
- `local' command.
+ `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,
an attempt is made to define a function using `-f foo=bar', an
@@ -2755,7 +2900,7 @@ POSIX 1003.2 standard.
evaluates to 0, `let' returns 1; otherwise 0 is returned.
`local'
- local [OPTION] NAME[=VALUE]
+ 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
`declare'. `local' can only be used within a function; it makes
@@ -2778,9 +2923,11 @@ POSIX 1003.2 standard.
specifications, each of which causes printing of the next
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.
+ 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.
If the FORMAT requires more ARGUMENTS than are supplied, the extra
@@ -2848,6 +2995,7 @@ POSIX 1003.2 standard.
`-u FD'
Read input from file descriptor FD.
+
`shopt'
shopt [-pqsu] [-o] [OPTNAME ...]
Toggle the values of variables controlling optional shell behavior.
@@ -2927,10 +3075,47 @@ POSIX 1003.2 standard.
*Note Aliases::. This option is enabled by default for
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
value of the `HISTFILE' variable when the shell exits, rather
@@ -2994,8 +3179,9 @@ POSIX 1003.2 standard.
enabled by default.
`promptvars'
- If set, prompt strings undergo variable and parameter
- expansion after being expanded (*note Printing a Prompt::).
+ 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.
`restricted_shell'
@@ -3019,6 +3205,7 @@ POSIX 1003.2 standard.
If set, the `echo' builtin expands backslash-escape sequences
by default.
+
The return status when listing options is zero if all OPTNAMES are
enabled, non-zero otherwise. When setting or unsetting options,
the return status is zero unless an OPTNAME is not a valid shell
@@ -3060,7 +3247,7 @@ POSIX 1003.2 standard.
if none are found.
`typeset'
- typeset [-afFrxi] [-p] [NAME[=VALUE]]
+ 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'
builtin command.
@@ -3112,6 +3299,7 @@ POSIX 1003.2 standard.
`-v'
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
the current hard limit, the current soft limit, and no limit,
@@ -3132,13 +3320,14 @@ POSIX 1003.2 standard.
Remove each NAME from the list of aliases. If `-a' is supplied,
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
-===============
+4.3 The Set Builtin
+===================
- This builtin is so complicated that it deserves its own section.
+This builtin is so complicated that it deserves its own section.
`set'
set [--abefhkmnptuvxBCHP] [-o OPTION] [ARGUMENT ...]
@@ -3162,10 +3351,11 @@ The Set Builtin
`-e'
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.
+ 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'
Disable file name generation (globbing).
@@ -3203,6 +3393,12 @@ The Set Builtin
`errexit'
Same as `-e'.
+ `errtrace'
+ Same as `-E'.
+
+ `functrace'
+ Same as `-T'.
+
`hashall'
Same as `-h'.
@@ -3247,6 +3443,12 @@ The Set Builtin
`physical'
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
differs from the POSIX 1003.2 standard to match the
@@ -3290,8 +3492,13 @@ The Set Builtin
Print shell input lines as they are read.
`-x'
- Print a trace of simple commands and their arguments after
- they are expanded and before they are executed.
+ 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'
The shell will perform brace expansion (*note Brace
@@ -3301,6 +3508,12 @@ The Set Builtin
Prevent output redirection using `>', `>&', and `<>' from
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
Interaction::). This option is on by default for interactive
@@ -3326,6 +3539,12 @@ The Set Builtin
$ cd ..; pwd
/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
parameters are unset. Otherwise, the positional parameters
@@ -3352,10 +3571,10 @@ The Set Builtin

File: bashref.info, Node: Special Builtins, Prev: The Set Builtin, Up: Shell Builtin Commands
-Special Builtins
-================
+4.4 Special Builtins
+====================
- For historical reasons, the POSIX 1003.2 standard has classified
+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
respects:
@@ -3380,8 +3599,8 @@ mode is described in *Note Bash POSIX Mode::.

File: bashref.info, Node: Shell Variables, Next: Bash Features, Prev: Shell Builtin Commands, Up: Top
-Shell Variables
-***************
+5 Shell Variables
+*****************
* Menu:
@@ -3395,11 +3614,11 @@ automatically assigns default values to a number of variables.

File: bashref.info, Node: Bourne Shell Variables, Next: Bash Variables, Up: Shell Variables
-Bourne 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.
+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'
A colon-separated list of directories used as a search path for
@@ -3436,7 +3655,9 @@ shell. In some cases, Bash assigns a default value to the variable.
`PATH'
A colon-separated list of directories in which the shell looks for
- commands.
+ 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'
The primary prompt string. The default value is `\s-\v\$ '.
@@ -3446,13 +3667,14 @@ shell. In some cases, Bash assigns a default value to the variable.
`PS2'
The secondary prompt string. The default value is `> '.
+

File: bashref.info, Node: Bash Variables, Prev: Bourne Shell Variables, Up: Shell Variables
-Bash Variables
-==============
+5.2 Bash Variables
+==================
- These variables are set or used by Bash, but other shells do not
+These variables are set or used by Bash, but other shells do not
normally treat them specially.
A few variables used by Bash are described in different chapters:
@@ -3462,14 +3684,58 @@ Variables::).
`BASH'
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
script, its value is expanded and used as the name of a startup
file to read before executing the script. *Note Bash Startup
Files::.
-`BASH_VERSION'
- The version number of the current instance of Bash.
+`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'
A readonly array variable (*note Arrays::) whose members hold
@@ -3494,6 +3760,10 @@ Variables::).
`BASH_VERSINFO[5]'
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
width when printing selection lists. Automatically set upon
@@ -3518,6 +3788,12 @@ Variables::).
functions and external commands invoked by the programmable
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
current command line. This variable is available only in shell
@@ -3539,6 +3815,11 @@ Variables::).
the current directory. If `DIRSTACK' is unset, it loses its
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
is readonly.
@@ -3554,11 +3835,13 @@ Variables::).
names. A sample value is `.o:~'
`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.
+ 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'
A colon-separated list of patterns defining the set of filenames to
@@ -3593,14 +3876,20 @@ Variables::).
even if it is subsequently reset.
`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'.
+ 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'
The name of the file to which the command history is saved. The
@@ -3636,6 +3925,13 @@ Variables::).
The maximum number of commands to remember on the history list.
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
should be read when the shell needs to complete a hostname. The
@@ -3738,7 +4034,6 @@ Variables::).
supplied. If it is set while the shell is running, `bash' enables
POSIX mode, as if the command
`set -o posix'
-
had been executed.
`PPID'
@@ -3777,6 +4072,11 @@ Variables::).
value assigned, and the expanded value becomes the value assigned
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
list is a valid argument for the `-o' option to the `set' builtin
@@ -3845,13 +4145,14 @@ Variables::).
The numeric real user id of the current user. This variable is
readonly.
+

File: bashref.info, Node: Bash Features, Next: Job Control, Prev: Shell Variables, Up: Top
-Bash Features
-*************
+6 Bash Features
+***************
- This section describes features unique to Bash.
+This section describes features unique to Bash.
* Menu:
@@ -3873,8 +4174,8 @@ Bash Features

File: bashref.info, Node: Invoking Bash, Next: Bash Startup Files, Up: Bash Features
-Invoking Bash
-=============
+6.1 Invoking Bash
+=================
bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o OPTION] [-O SHOPT_OPTION] [ARGUMENT ...]
bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o OPTION] [-O SHOPT_OPTION] -c STRING [ARGUMENT ...]
@@ -3885,6 +4186,13 @@ Invoking Bash
that you can use. These options must appear on the command line before
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
the standard ouput in the GNU `gettext' PO (portable object) file
@@ -3935,6 +4243,7 @@ the single-character options to be recognized.
Show version information for this instance of Bash on the standard
output and exit successfully.
+
There are several single-character options that may be supplied at
invocation which are not available with the `set' builtin.
@@ -3986,6 +4295,7 @@ invocation which are not available with the `set' builtin.
processing. Any arguments after the `--' are treated as filenames
and arguments.
+
A _login_ shell is one whose first character of argument zero is
`-', or one invoked with the `--login' option.
@@ -4007,20 +4317,20 @@ script. If no commands are executed, the exit status is 0.

File: bashref.info, Node: Bash Startup Files, Next: Interactive Shells, Prev: Invoking Bash, Up: Bash Features
-Bash Startup Files
-==================
+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::).
+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::.
Invoked as an interactive login shell, or with `--login'
........................................................
- When Bash is invoked as an interactive login shell, or as a
+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.
After reading that file, it looks for `~/.bash_profile',
@@ -4035,7 +4345,7 @@ file `~/.bash_logout', if it exists.
Invoked as an interactive non-login shell
.........................................
- When an interactive shell that is not a login shell is started, Bash
+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
FILE' option will force Bash to read and execute commands from FILE
@@ -4043,21 +4353,19 @@ instead of `~/.bashrc'.
So, typically, your `~/.bash_profile' contains the line
`if [ -f ~/.bashrc ]; then . ~/.bashrc; fi'
-
-after (or before) any login-specific initializations.
+ after (or before) any login-specific initializations.
Invoked non-interactively
.........................
- When Bash is started non-interactively, to run a shell script, for
+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
the name of a file to read and execute. Bash behaves as if the
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.
+ 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
`--login' option, Bash attempts to read and execute commands from the
@@ -4066,7 +4374,7 @@ login shell startup files.
Invoked with name `sh'
......................
- If Bash is invoked with the name `sh', it tries to mimic the startup
+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.
@@ -4088,16 +4396,16 @@ are read.
Invoked in POSIX mode
.....................
- 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.
+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
+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
is readable. It will not do this if invoked as `sh'. The `--norc'
@@ -4109,19 +4417,19 @@ specified.
Invoked with unequal effective and real UID/GIDs
................................................
- 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.
+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
-==================
+6.3 Interactive Shells
+======================
* Menu:
@@ -4132,13 +4440,13 @@ Interactive Shells

File: bashref.info, Node: What is an Interactive Shell?, Next: Is this Shell Interactive?, Up: Interactive Shells
-What is an Interactive Shell?
------------------------------
+6.3.1 What is an Interactive Shell?
+-----------------------------------
- An interactive shell is one started without non-option arguments,
+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.
+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
terminal.
@@ -4149,10 +4457,10 @@ parameters when an interactive shell is started.

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?
---------------------------
+6.3.2 Is this Shell Interactive?
+--------------------------------
- To determine within a startup script whether or not Bash is running
+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:
@@ -4173,10 +4481,10 @@ unset in non-interactive shells, and set in interactive shells. Thus:

File: bashref.info, Node: Interactive Shell Behavior, Prev: Is this Shell Interactive?, Up: Interactive Shells
-Interactive Shell Behavior
---------------------------
+6.3.3 Interactive Shell Behavior
+--------------------------------
- When the shell is running interactively, it changes its behavior in
+When the shell is running interactively, it changes its behavior in
several ways.
1. Startup files are read and executed as described in *Note Bash
@@ -4255,11 +4563,11 @@ several ways.

File: bashref.info, Node: Bash Conditional Expressions, Next: Shell Arithmetic, Prev: Interactive Shells, Up: Bash Features
-Bash Conditional Expressions
-============================
+6.4 Bash Conditional Expressions
+================================
- Conditional expressions are used by the `[[' compound command and
-the `test' and `[' builtin commands.
+Conditional expressions are used by the `[[' compound command and the
+`test' and `[' builtin commands.
Expressions may be unary or binary. Unary expressions are often
used to examine the status of a file. There are string operators and
@@ -4377,21 +4685,23 @@ checked. If the FILE argument to one of the primaries is one of
greater than or equal to ARG2, respectively. ARG1 and ARG2 may be
positive or negative integers.
+

File: bashref.info, Node: Shell Arithmetic, Next: Aliases, Prev: Bash Conditional Expressions, Up: Bash Features
-Shell Arithmetic
-================
+6.5 Shell Arithmetic
+====================
- The shell allows arithmetic expressions to be evaluated, as one of
-the shell expansions or by the `let' builtin.
+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 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.
+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--'
variable post-increment and post-decrement
@@ -4439,7 +4749,7 @@ decreasing precedence.
logical OR
`expr ? expr : expr'
- conditional evaluation
+ conditional operator
`= *= /= %= += -= <<= >>= &= ^= |='
assignment
@@ -4450,9 +4760,13 @@ decreasing precedence.
Shell variables are allowed as operands; parameter expansion is
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.
+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
leading `0x' or `0X' denotes hexadecimal. Otherwise, numbers take the
@@ -4471,25 +4785,26 @@ above.

File: bashref.info, Node: Aliases, Next: Arrays, Prev: Shell Arithmetic, Up: Bash Features
-Aliases
-=======
+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 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.
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.
+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
with the `unalias' command.
@@ -4522,10 +4837,10 @@ in compound commands.

File: bashref.info, Node: Arrays, Next: The Directory Stack, Prev: Aliases, Up: Bash Features
-Arrays
-======
+6.7 Arrays
+==========
- Bash provides one-dimensional array variables. Any variable may be
+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
requirement that members be indexed or assigned contiguously. Arrays
@@ -4539,18 +4854,15 @@ The SUBSCRIPT is treated as an arithmetic expression that must evaluate
to a number greater than or equal to zero. To explicitly declare an
array, use
declare -a NAME
-
-The syntax
+ The syntax
declare -a NAME[SUBSCRIPT]
-
-is also accepted; the SUBSCRIPT is ignored. Attributes may be
+ 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.
Arrays are assigned to using compound assignments of the form
name=(value1 ... valueN)
-
-where each VALUE is of the form `[[SUBSCRIPT]=]'STRING. If the
+ 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
statement plus one. Indexing starts at zero. This syntax is also
@@ -4587,8 +4899,8 @@ allows them to be reused as input.

File: bashref.info, Node: The Directory Stack, Next: Printing a Prompt, Prev: Arrays, Up: Bash Features
-The Directory Stack
-===================
+6.8 The Directory Stack
+=======================
* Menu:
@@ -4607,8 +4919,8 @@ the `DIRSTACK' shell variable.

File: bashref.info, Node: Directory Stack Builtins, Up: The Directory Stack
-Directory Stack Builtins
-------------------------
+6.8.1 Directory Stack Builtins
+------------------------------
`dirs'
dirs [+N | -N] [-clpv]
@@ -4688,14 +5000,15 @@ Directory Stack Builtins
Makes the current working directory be the top of the stack,
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
-======================
+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
+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.
@@ -4760,10 +5073,11 @@ which can appear in the prompt variables:
The release of Bash, version + patchlevel (e.g., 2.00.0)
`\w'
- The current working directory.
+ The current working directory, with `$HOME' abbreviated with a
+ tilde.
`\W'
- The basename of `$PWD'.
+ The basename of `$PWD', with `$HOME' abbreviated with a tilde.
`\!'
The history number of this command.
@@ -4800,11 +5114,11 @@ to the value of the `promptvars' shell option (*note Bash Builtins::).

File: bashref.info, Node: The Restricted Shell, Next: Bash POSIX Mode, Prev: Printing a Prompt, Up: Bash Features
-The Restricted Shell
-====================
+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
+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'
with the exception that the following are disallowed or not performed:
@@ -4852,13 +5166,13 @@ spawned to execute the script.

File: bashref.info, Node: Bash POSIX Mode, Prev: The Restricted Shell, Up: Bash Features
-Bash POSIX Mode
-===============
+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.
+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
startup files.
@@ -4883,20 +5197,20 @@ startup files.
performed on the values of `PS1' and `PS2' regardless of the
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
+ 6. 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
+ 7. 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
+ 8. 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.
+ 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
found.
@@ -4957,23 +5271,33 @@ startup files.
26. The `trap' builtin displays signal names without the leading `SIG'.
- 27. The `.' and `source' builtins do not search the current directory
+ 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'.
- 28. Subshells spawned to execute command substitutions inherit the
+ 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.
- 29. Alias expansion is always enabled, even in non-interactive shells.
+ 30. Alias expansion is always enabled, even in non-interactive shells.
- 30. When the `set' builtin is invoked without options, it does not
+ 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.
- 31. When the `set' builtin is invoked without options, it displays
+ 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.
- 32. When the `cd' builtin is invoked in LOGICAL mode, and the pathname
+ 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
instead of falling back to PHYSICAL mode.
@@ -4997,11 +5321,11 @@ Specifically:

File: bashref.info, Node: Job Control, Next: Using History Interactively, Prev: Bash Features, Up: Top
-Job Control
-***********
+7 Job Control
+*************
- This chapter discusses what job control is, how it works, and how
-Bash allows you to access its facilities.
+This chapter discusses what job control is, how it works, and how Bash
+allows you to access its facilities.
* Menu:
@@ -5014,10 +5338,10 @@ Bash allows you to access its facilities.

File: bashref.info, Node: Job Control Basics, Next: Job Control Builtins, Up: Job Control
-Job Control Basics
-==================
+7.1 Job Control Basics
+======================
- Job control refers to the ability to selectively stop (suspend) the
+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
interface supplied jointly by the system's terminal driver and Bash.
@@ -5026,11 +5350,10 @@ interface supplied jointly by the system's terminal driver and Bash.
currently executing jobs, which may be listed with the `jobs' command.
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.
+ 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
control, the operating system maintains the notion of a current terminal
@@ -5088,7 +5411,7 @@ output. If the `-b' option to the `set' builtin is enabled, Bash
reports such changes immediately (*note The Set Builtin::). Any trap
on `SIGCHLD' is executed for each child process that exits.
- If an attempt to exit Bash is while jobs are stopped, the shell
+ 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
to exit is made without an intervening command, Bash does not print
@@ -5097,8 +5420,8 @@ another warning, and the stopped jobs are terminated.

File: bashref.info, Node: Job Control Builtins, Next: Job Control Variables, Prev: Job Control Basics, Up: Job Control
-Job Control Builtins
-====================
+7.2 Job Control Builtins
+========================
`bg'
bg [JOBSPEC]
@@ -5155,16 +5478,16 @@ Job Control Builtins
kill -l [EXIT_STATUS]
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.
+ 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'
wait [JOBSPEC or PID]
@@ -5193,14 +5516,15 @@ Job Control Builtins
signal. The `-f' option means to suspend even if the shell is a
login shell.
+
When job control is not active, the `kill' and `wait' builtins do
not accept JOBSPEC arguments. They must be supplied process IDs.

File: bashref.info, Node: Job Control Variables, Prev: Job Control Builtins, Up: Job Control
-Job Control Variables
-=====================
+7.3 Job Control Variables
+=========================
`auto_resume'
This variable controls how the shell interacts with the user and
@@ -5219,13 +5543,14 @@ Job Control Variables
a prefix of a stopped job's name; this provides functionality
analogous to the `%' job ID.
+

File: bashref.info, Node: Command Line Editing, Next: Installing Bash, Prev: Using History Interactively, Up: Top
-Command Line Editing
-********************
+8 Command Line Editing
+**********************
- This chapter describes the basic features of the GNU command line
+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.
@@ -5247,10 +5572,10 @@ library, which is used by several different programs, including Bash.

File: bashref.info, Node: Introduction and Notation, Next: Readline Interaction, Up: Command Line Editing
-Introduction to Line Editing
-============================
+8.1 Introduction to Line Editing
+================================
- The following paragraphs describe the notation used to represent
+The following paragraphs describe the notation used to represent
keystrokes.
The text `C-k' is read as `Control-K' and describes the character
@@ -5283,10 +5608,10 @@ some keyboards.

File: bashref.info, Node: Readline Interaction, Next: Readline Init File, Prev: Introduction and Notation, Up: Command Line Editing
-Readline Interaction
-====================
+8.2 Readline Interaction
+========================
- Often during an interactive session you type in a long line of text,
+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
@@ -5308,13 +5633,13 @@ location of the cursor within the line.

File: bashref.info, Node: Readline Bare Essentials, Next: Readline Movement Commands, Up: Readline Interaction
-Readline Bare Essentials
-------------------------
+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.
+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
@@ -5356,10 +5681,10 @@ character to the left of the cursor.)

File: bashref.info, Node: Readline Movement Commands, Next: Readline Killing Commands, Prev: Readline Bare Essentials, Up: Readline Interaction
-Readline Movement Commands
---------------------------
+8.2.2 Readline Movement Commands
+--------------------------------
- The above table describes the most basic keystrokes that you need in
+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
<DEL>. Here are some commands for moving more rapidly about the line.
@@ -5387,11 +5712,11 @@ operate on characters while meta keystrokes operate on words.

File: bashref.info, Node: Readline Killing Commands, Next: Readline Arguments, Prev: Readline Movement Commands, Up: Readline Interaction
-Readline Killing Commands
--------------------------
+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
+"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'.)
@@ -5403,7 +5728,7 @@ place later.
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.
+available to be yanked back later, when you are typing another line.
Here is the list of commands for killing text.
@@ -5425,6 +5750,7 @@ available to be yanked back later, when you are typing another line.
Kill from the cursor to the previous whitespace. This is
different than `M-<DEL>' 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.
@@ -5439,10 +5765,10 @@ copy the most-recently-killed text from the kill buffer.

File: bashref.info, Node: Readline Arguments, Next: Searching, Prev: Readline Killing Commands, Up: Readline Interaction
-Readline Arguments
-------------------
+8.2.4 Readline Arguments
+------------------------
- You can pass numeric arguments to Readline commands. Sometimes the
+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
command which normally acts in a forward direction, that command will
@@ -5460,10 +5786,10 @@ will delete the next ten characters on the input line.

File: bashref.info, Node: Searching, Prev: Readline Arguments, Up: Readline Interaction
-Searching for Commands in the History
--------------------------------------
+8.2.5 Searching for Commands in the History
+-------------------------------------------
- Readline provides commands for searching through the command 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
"non-incremental".
@@ -5502,10 +5828,10 @@ typed by the user or be part of the contents of the current line.

File: bashref.info, Node: Readline Init File, Next: Bindable Readline Commands, Prev: Readline Interaction, Up: Command Line Editing
-Readline Init File
-==================
+8.3 Readline Init File
+======================
- Although the Readline library comes with a set of Emacs-like
+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 "inputrc" file, conventionally in his home
@@ -5530,10 +5856,10 @@ incorporating any changes that you might have made to it.

File: bashref.info, Node: Readline Init File Syntax, Next: Conditional Init Constructs, Up: Readline Init File
-Readline Init File Syntax
--------------------------
+8.3.1 Readline Init File Syntax
+-------------------------------
- There are only a few basic constructs allowed in the Readline init
+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
(*note Conditional Init Constructs::). Other lines denote variable
@@ -5579,12 +5905,12 @@ Variable Settings
`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'.
+ 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'
If set to `on', Readline will convert characters with the
@@ -5613,7 +5939,7 @@ Variable Settings
attempts word completion. The default is `off'.
If set to `on', the history code attempts to place point at
- the same location on each history line retrived with
+ the same location on each history line retrieved with
`previous-history' or `next-history'.
`horizontal-scroll-mode'
@@ -5688,11 +6014,21 @@ Variable Settings
completion cause the matches to be listed immediately instead
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
appended to the filename when listing possible completions.
The default is `off'.
+
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
@@ -5747,6 +6083,7 @@ Key Bindings
`<ESC> <[> <1> <1> <~>' is bound to insert the text `Function
Key 1'.
+
The following GNU Emacs style escape sequences are available when
specifying key sequences:
@@ -5812,13 +6149,14 @@ Key Bindings
the line:
"\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
----------------------------
+8.3.2 Conditional Init Constructs
+---------------------------------
- Readline implements a facility similar in spirit to the conditional
+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.
@@ -5875,11 +6213,11 @@ are four parser directives used.

File: bashref.info, Node: Sample Init File, Prev: Conditional Init Constructs, Up: Readline Init File
-Sample 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.
+Here is an example of an INPUTRC file. This illustrates key binding,
+variable assignment, and conditional syntax.
# This file controls the behaviour of line input editing for
@@ -5892,16 +6230,16 @@ binding, variable assignment, and conditional syntax.
# 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
#
@@ -5930,14 +6268,14 @@ binding, variable assignment, and conditional syntax.
#"\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
@@ -5956,25 +6294,25 @@ binding, variable assignment, and conditional syntax.
# 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-?"
@@ -5985,8 +6323,8 @@ binding, variable assignment, and conditional syntax.

File: bashref.info, Node: Bindable Readline Commands, Next: Readline vi Mode, Prev: Readline Init File, Up: Command Line Editing
-Bindable Readline Commands
-==========================
+8.4 Bindable Readline Commands
+==============================
* Menu:
@@ -6013,8 +6351,8 @@ as the "region".

File: bashref.info, Node: Commands For Moving, Next: Commands For History, Up: Bindable Readline Commands
-Commands For Moving
--------------------
+8.4.1 Commands For Moving
+-------------------------
`beginning-of-line (C-a)'
Move to the start of the current line.
@@ -6043,11 +6381,12 @@ Commands For Moving
`redraw-current-line ()'
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
--------------------------------------
+8.4.2 Commands For Manipulating The History
+-------------------------------------------
`accept-line (Newline or Return)'
Accept the line regardless of where the cursor is. If this line is
@@ -6113,11 +6452,12 @@ Commands For Manipulating The History
through the history list, inserting the last argument of each line
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
---------------------------
+8.4.3 Commands For Changing Text
+--------------------------------
`delete-char (C-d)'
Delete the character at point. If point is at the beginning of
@@ -6177,11 +6517,12 @@ Commands For Changing Text
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
--------------------
+8.4.4 Killing And Yanking
+-------------------------
`kill-line (C-k)'
Kill the text from point to the end of the line.
@@ -6209,6 +6550,11 @@ Killing And Yanking
Kill the word behind point, using white space as a word boundary.
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
unbound.
@@ -6241,8 +6587,8 @@ Killing And Yanking

File: bashref.info, Node: Numeric Arguments, Next: Commands For Completion, Prev: Commands For Killing, Up: Bindable Readline Commands
-Specifying Numeric Arguments
-----------------------------
+8.4.5 Specifying Numeric Arguments
+----------------------------------
`digit-argument (M-0, M-1, ... M--)'
Add this digit to the argument already accumulating, or start a new
@@ -6264,8 +6610,8 @@ Specifying Numeric Arguments

File: bashref.info, Node: Commands For Completion, Next: Keyboard Macros, Prev: Numeric Arguments, Up: Bindable Readline Commands
-Letting Readline Type For You
------------------------------
+8.4.6 Letting Readline Type For You
+-----------------------------------
`complete (<TAB>)'
Attempt to perform completion on the text before point. The
@@ -6352,11 +6698,12 @@ Letting Readline Type For You
completions enclosed within braces so the list is available to the
shell (*note Brace Expansion::).
+

File: bashref.info, Node: Keyboard Macros, Next: Miscellaneous Commands, Prev: Commands For Completion, Up: Bindable Readline Commands
-Keyboard Macros
----------------
+8.4.7 Keyboard Macros
+---------------------
`start-kbd-macro (C-x ()'
Begin saving the characters typed into the current keyboard macro.
@@ -6369,11 +6716,12 @@ Keyboard Macros
Re-execute the last keyboard macro defined, by making the
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
----------------------------
+8.4.8 Some Miscellaneous Commands
+---------------------------------
`re-read-init-file (C-x C-r)'
Read in the contents of the INPUTRC file, and incorporate any
@@ -6500,16 +6848,17 @@ Some Miscellaneous Commands
`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',
+ 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
-Readline vi Mode
-================
+8.5 Readline vi Mode
+====================
- While the Readline library does not have a full set of `vi' editing
+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
standard.
@@ -6527,10 +6876,10 @@ the standard `vi' movement keys, move to previous history lines with

File: bashref.info, Node: Programmable Completion, Next: Programmable Completion Builtins, Prev: Readline vi Mode, Up: Command Line Editing
-Programmable Completion
-=======================
+8.6 Programmable Completion
+===========================
- When word completion is attempted for an argument to a command for
+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
programmable completion facilities are invoked.
@@ -6611,12 +6960,19 @@ completions.
the `-o dirnames' option was supplied to `complete' when the compspec
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 default' option was
-supplied to `complete' when the compspec was defined, Readline's
-default completion will be performed if the compspec generates no
+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.
When a compspec indicates that directory name completion is desired,
@@ -6628,10 +6984,10 @@ setting of the MARK-SYMLINKED-DIRECTORIES Readline variable.

File: bashref.info, Node: Programmable Completion Builtins, Prev: Programmable Completion, Up: Command Line Editing
-Programmable Completion Builtins
-================================
+8.7 Programmable Completion Builtins
+====================================
- Two builtin commands are available to manipulate the programmable
+Two builtin commands are available to manipulate the programmable
completion facilities.
`compgen'
@@ -6679,6 +7035,10 @@ completion facilities.
behavior beyond the simple generation of completions.
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
compspec generates no matches.
@@ -6689,7 +7049,7 @@ completion facilities.
`filenames'
Tell Readline that the compspec generates filenames, so
- it can perform any filename\-specific processing (like
+ 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 `-F'.
@@ -6824,13 +7184,14 @@ completion facilities.
for a NAME for which no specification exists, or an error occurs
adding a completion specification.
+

File: bashref.info, Node: Using History Interactively, Next: Command Line Editing, Prev: Job Control, Up: Top
-Using History Interactively
-***************************
+9 Using History Interactively
+*****************************
- This chapter describes how to use the GNU History Library
+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
other programs, see the GNU Readline Library Manual.
@@ -6846,18 +7207,17 @@ other programs, see the GNU Readline Library Manual.

File: bashref.info, Node: Bash History Facilities, Next: Bash History Builtins, Up: Using History Interactively
-Bash History Facilities
-=======================
+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 `-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
named by the `HISTFILE' variable (default `~/.bash_history'). The file
@@ -6873,6 +7233,9 @@ history, the history file is truncated to contain no more than
`$HISTFILESIZE' lines. If `HISTFILESIZE' is not set, no truncation is
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
display or modify the history list and manipulate the history file.
@@ -6893,10 +7256,10 @@ options. *Note Bash Builtins::, for a description of `shopt'.

File: bashref.info, Node: Bash History Builtins, Next: History Interaction, Prev: Bash History Facilities, Up: Using History Interactively
-Bash History Builtins
-=====================
+9.2 Bash History Builtins
+=========================
- Bash provides two builtin commands which manipulate the history list
+Bash provides two builtin commands which manipulate the history list
and history file.
`fc'
@@ -6937,8 +7300,13 @@ and history file.
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:
+ 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'
Clear the history list. This may be combined with the other
@@ -6974,19 +7342,21 @@ and history file.
The ARGs are added to the end of the history list as a single
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
-=================
+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.
+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
input stream, making it easy to repeat commands, insert the arguments
@@ -7032,15 +7402,16 @@ history expansion mechanism with the `histchars' variable.

File: bashref.info, Node: Event Designators, Next: Word Designators, Up: History Interaction
-Event Designators
------------------
+9.3.1 Event Designators
+-----------------------
- An event designator is a reference to a command line entry in the
-history list.
+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 `('.
+ the end of the line, `=' or `(' (when the `extglob' shell option
+ is enabled using the `shopt' builtin).
`!N'
Refer to command line N.
@@ -7066,13 +7437,14 @@ history list.
`!#'
The entire command line typed so far.
+

File: bashref.info, Node: Word Designators, Next: Modifiers, Prev: Event Designators, Up: History Interaction
-Word Designators
-----------------
+9.3.2 Word Designators
+----------------------
- Word designators are used to select desired words from the event. A
+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
`%'. Words are numbered from the beginning of the line, with the first
@@ -7124,16 +7496,17 @@ line separated by single spaces.
`X-'
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.

File: bashref.info, Node: Modifiers, Prev: Word Designators, Up: History Interaction
-Modifiers
----------
+9.3.3 Modifiers
+---------------
- After the optional word designator, you can add a sequence of one or
+After the optional word designator, you can add a sequence of one or
more of the following modifiers, each preceded by a `:'.
`h'
@@ -7171,20 +7544,25 @@ more of the following modifiers, each preceded by a `:'.
Repeat the previous substitution.
`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
-Installing Bash
-***************
+10 Installing Bash
+******************
- This chapter provides basic instructions for installing Bash on the
+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.
+MS-DOS, OS/2, and Windows platforms.
* Menu:
@@ -7212,10 +7590,10 @@ MS-DOS, OS/2, Windows 95/98, and Windows NT.

File: bashref.info, Node: Basic Installation, Next: Compilers and Options, Up: Installing Bash
-Basic Installation
-==================
+10.1 Basic Installation
+=======================
- These are installation instructions for Bash.
+These are installation instructions for Bash.
The simplest way to compile Bash is:
@@ -7275,10 +7653,10 @@ computer), type `make distclean'.

File: bashref.info, Node: Compilers and Options, Next: Compiling For Multiple Architectures, Prev: Basic Installation, Up: Installing Bash
-Compilers and Options
-=====================
+10.2 Compilers and Options
+==========================
- Some systems require unusual options for compilation or linking that
+Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
@@ -7295,10 +7673,10 @@ this:

File: bashref.info, Node: Compiling For Multiple Architectures, Next: Installation Names, Prev: Compilers and Options, Up: Installing Bash
-Compiling For Multiple Architectures
-====================================
+10.3 Compiling For Multiple Architectures
+=========================================
- You can compile Bash for more than one kind of computer at the same
+You can compile Bash for more than one kind of computer at the same
time, by placing the object files for each architecture in their own
directory. To do this, you must use a version of `make' that supports
the `VPATH' variable, such as GNU `make'. `cd' to the directory where
@@ -7329,10 +7707,10 @@ for other architectures.

File: bashref.info, Node: Installation Names, Next: Specifying the System Type, Prev: Compiling For Multiple Architectures, Up: Installing Bash
-Installation Names
-==================
+10.4 Installation Names
+=======================
- By default, `make install' will install into `/usr/local/bin',
+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
by specifying a value for the `DESTDIR' `make' variable when running
@@ -7347,10 +7725,10 @@ Documentation and other data files will still use the regular prefix.

File: bashref.info, Node: Specifying the System Type, Next: Sharing Defaults, Prev: Installation Names, Up: Installing Bash
-Specifying the System Type
-==========================
+10.5 Specifying the System Type
+===============================
- There may be some features `configure' can not figure out
+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
message saying it can not guess the host type, give it the
@@ -7364,13 +7742,13 @@ field.

File: bashref.info, Node: Sharing Defaults, Next: Operation Controls, Prev: Specifying the System Type, Up: Installing Bash
-Sharing Defaults
-================
+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
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'. `configure'
+looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: the Bash `configure' looks for a site script, but not all
@@ -7379,11 +7757,10 @@ A warning: the Bash `configure' looks for a site script, but not all

File: bashref.info, Node: Operation Controls, Next: Optional Features, Prev: Sharing Defaults, Up: Installing Bash
-Operation Controls
-==================
+10.7 Operation Controls
+=======================
- `configure' recognizes the following options to control how it
-operates.
+`configure' recognizes the following options to control how it operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
@@ -7412,14 +7789,14 @@ options. `configure --help' prints the complete list.

File: bashref.info, Node: Optional Features, Prev: Operation Controls, Up: Installing Bash
-Optional Features
-=================
+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
+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'.
Here is a complete list of the `--enable-' and `--with-' options
@@ -7521,7 +7898,12 @@ does not provide the necessary support.
builtins and functions to be timed.
`--enable-cond-command'
- Include support for the `[[' conditional command (*note
+ 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::).
`--enable-directory-stack'
@@ -7554,6 +7936,10 @@ does not provide the necessary support.
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'
This enables the special handling of filenames of the form
`/dev/tcp/HOST/PORT' and `/dev/udp/HOST/PORT' when used in
@@ -7598,6 +7984,7 @@ does not provide the necessary support.
Specification, version 2. *Note Bash Builtins::, for a
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
not meant to be changed; beware of the consequences if you do. Read
@@ -7607,12 +7994,13 @@ its effect.

File: bashref.info, Node: Reporting Bugs, Next: Major Differences From The Bourne Shell, Prev: Installing Bash, Up: Top
-Reporting Bugs
-**************
+Appendix A Reporting Bugs
+*************************
- Please report all bugs you find in Bash. But first, you should make
+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.
+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
`bashbug' command to submit a bug report. If you have a fix, you are
@@ -7638,12 +8026,12 @@ it provides for filing a bug report.
Please send all reports concerning this manual to <chet@po.CWRU.Edu>.

-File: bashref.info, Node: Major Differences From The Bourne Shell, Next: Builtin Index, Prev: Reporting Bugs, Up: Top
+File: bashref.info, Node: Major Differences From The Bourne Shell, Next: Copying This Manual, Prev: Reporting Bugs, Up: Top
-Major Differences From The Bourne Shell
-***************************************
+Appendix B Major Differences From The Bourne Shell
+**************************************************
- Bash implements essentially the same grammar, parameter and variable
+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
be implemented. There are some differences between the traditional
@@ -7666,7 +8054,9 @@ included in SVR4.2 as the baseline reference.
and `compgen', to manipulate it.
* Bash has command history (*note Bash History Facilities::) and the
- `history' and `fc' builtins to manipulate it.
+ `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
Interaction::).
@@ -7862,20 +8252,42 @@ included in SVR4.2 as the baseline reference.
* Bash has much more optional behavior controllable with the `set'
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 after every simple
- command. The `DEBUG' trap is not inherited by shell functions
- unless the function has been given the `trace' attribute.
+ 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'
pseudo-signal specification, similar to `EXIT' and `DEBUG'.
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.
* The Bash `type' builtin is more extensive and gives more
@@ -7913,11 +8325,11 @@ included in SVR4.2 as the baseline reference.
More features unique to Bash may be found in *Note Bash Features::.
-Implementation Differences From The SVR4.2 Shell
-================================================
+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:
+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
shell control structure such as an `if' or `while' statement.
@@ -7958,68 +8370,547 @@ from many of the limitations of the SVR4.2 shell. For instance:
turns on job control).

-File: bashref.info, Node: Builtin Index, Next: Reserved Word Index, Prev: Major Differences From The Bourne Shell, Up: Top
+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
*******************************
+
* Menu:
* .: Bourne Shell Builtins.
+ (line 16)
* :: Bourne Shell Builtins.
+ (line 11)
* [: Bourne Shell Builtins.
-* alias: Bash Builtins.
+ (line 212)
+* alias: Bash Builtins. (line 11)
* bg: Job Control Builtins.
-* bind: Bash Builtins.
+ (line 7)
+* bind: Bash Builtins. (line 21)
* break: Bourne Shell Builtins.
-* builtin: Bash Builtins.
+ (line 29)
+* builtin: Bash Builtins. (line 92)
+* caller: Bash Builtins. (line 100)
* cd: Bourne Shell Builtins.
-* command: Bash Builtins.
+ (line 36)
+* command: Bash Builtins. (line 117)
* compgen: Programmable Completion Builtins.
+ (line 10)
* complete: Programmable Completion Builtins.
+ (line 28)
* continue: Bourne Shell Builtins.
-* declare: Bash Builtins.
+ (line 55)
+* declare: Bash Builtins. (line 136)
* dirs: Directory Stack Builtins.
+ (line 7)
* disown: Job Control Builtins.
-* echo: Bash Builtins.
-* enable: Bash 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.
-* help: Bash Builtins.
+ (line 145)
+* help: Bash Builtins. (line 272)
* history: Bash History Builtins.
+ (line 39)
* jobs: Job Control Builtins.
+ (line 25)
* kill: Job Control Builtins.
-* let: Bash Builtins.
-* local: Bash Builtins.
-* logout: Bash Builtins.
+ (line 57)
+* let: Bash Builtins. (line 281)
+* local: Bash Builtins. (line 288)
+* logout: Bash Builtins. (line 298)
* popd: Directory Stack Builtins.
-* printf: Bash Builtins.
+ (line 37)
+* printf: Bash Builtins. (line 302)
* pushd: Directory Stack Builtins.
+ (line 58)
* pwd: Bourne Shell Builtins.
-* read: Bash Builtins.
+ (line 163)
+* read: Bash Builtins. (line 324)
* readonly: Bourne Shell Builtins.
+ (line 172)
* return: Bourne Shell Builtins.
-* set: The Set Builtin.
+ (line 187)
+* set: The Set Builtin. (line 9)
* shift: Bourne Shell Builtins.
-* shopt: Bash Builtins.
-* source: Bash 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.
-* type: Bash Builtins.
-* typeset: Bash Builtins.
-* ulimit: Bash Builtins.
+ (line 281)
+* type: Bash Builtins. (line 604)
+* typeset: Bash Builtins. (line 635)
+* ulimit: Bash Builtins. (line 641)
* umask: Bourne Shell Builtins.
-* unalias: Bash Builtins.
+ (line 322)
+* unalias: Bash Builtins. (line 703)
* unset: Bourne Shell Builtins.
+ (line 339)
* wait: Job Control Builtins.
+ (line 73)

File: bashref.info, Node: Reserved Word Index, Next: Variable Index, Prev: Builtin Index, Up: Top
@@ -8027,29 +8918,41 @@ File: bashref.info, Node: Reserved Word Index, Next: Variable Index, Prev: Bu
Index of Shell Reserved Words
*****************************
+
* Menu:
-* !: Pipelines.
+* !: Pipelines. (line 8)
* [[: Conditional Constructs.
+ (line 105)
* ]]: Conditional Constructs.
+ (line 105)
* case: Conditional Constructs.
-* do: Looping Constructs.
-* done: Looping 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.
-* for: Looping Constructs.
-* function: Shell Functions.
+ (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.
-* time: Pipelines.
-* until: Looping Constructs.
-* while: Looping Constructs.
-* {: Command Grouping.
-* }: Command Grouping.
+ (line 7)
+* time: Pipelines. (line 8)
+* until: Looping Constructs. (line 12)
+* while: Looping Constructs. (line 20)
+* {: Command Grouping. (line 21)
+* }: Command Grouping. (line 21)

File: bashref.info, Node: Variable Index, Next: Function Index, Prev: Reserved Word Index, Up: Top
@@ -8057,109 +8960,156 @@ File: bashref.info, Node: Variable Index, Next: Function Index, Prev: Reserve
Parameter and Variable Index
****************************
+
* Menu:
-* !: Special Parameters.
-* #: Special Parameters.
-* $: Special Parameters.
-* *: Special Parameters.
-* -: Special Parameters.
-* 0: Special Parameters.
-* ?: Special Parameters.
-* @: Special Parameters.
-* _: Special Parameters.
+* !: 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.
-* BASH: Bash Variables.
-* BASH_ENV: Bash Variables.
-* BASH_VERSINFO: Bash Variables.
-* BASH_VERSION: Bash 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.
-* COLUMNS: Bash Variables.
+ (line 9)
+* COLUMNS: Bash Variables. (line 96)
* comment-begin: Readline Init File Syntax.
-* COMP_CWORD: Bash Variables.
-* COMP_LINE: Bash Variables.
-* COMP_POINT: Bash Variables.
-* COMP_WORDS: Bash Variables.
+ (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.
-* COMPREPLY: Bash Variables.
+ (line 51)
+* COMPREPLY: Bash Variables. (line 132)
* convert-meta: Readline Init File Syntax.
-* DIRSTACK: Bash Variables.
+ (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.
-* EUID: Bash Variables.
+ (line 77)
+* EUID: Bash Variables. (line 152)
* 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.
+ (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.
-* HISTSIZE: Bash Variables.
+ (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.
-* HOSTFILE: Bash Variables.
-* HOSTNAME: Bash Variables.
-* HOSTTYPE: Bash Variables.
+ (line 90)
+* HOSTFILE: Bash Variables. (line 264)
+* HOSTNAME: Bash Variables. (line 275)
+* HOSTTYPE: Bash Variables. (line 278)
* IFS: Bourne Shell Variables.
-* IGNOREEOF: Bash Variables.
+ (line 18)
+* IGNOREEOF: Bash Variables. (line 281)
* input-meta: Readline Init File Syntax.
-* INPUTRC: Bash Variables.
+ (line 97)
+* INPUTRC: Bash Variables. (line 291)
* isearch-terminators: Readline Init File Syntax.
+ (line 104)
* 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.
+ (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.
-* MAILCHECK: Bash 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.
-* OLDPWD: Bash Variables.
+ (line 97)
+* OLDPWD: Bash Variables. (line 344)
* OPTARG: Bourne Shell Variables.
-* OPTERR: Bash Variables.
+ (line 34)
+* OPTERR: Bash Variables. (line 347)
* OPTIND: Bourne Shell Variables.
-* OSTYPE: Bash 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.
-* PIPESTATUS: Bash Variables.
-* POSIXLY_CORRECT: Bash Variables.
-* PPID: Bash Variables.
-* PROMPT_COMMAND: Bash 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.
-* PS3: Bash Variables.
-* PS4: Bash Variables.
-* PWD: Bash Variables.
-* RANDOM: Bash Variables.
-* REPLY: Bash Variables.
-* SECONDS: Bash Variables.
-* SHELLOPTS: Bash Variables.
-* SHLVL: Bash 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.
-* TEXTDOMAIN: Locale Translation.
-* TEXTDOMAINDIR: Locale Translation.
-* TIMEFORMAT: Bash Variables.
-* TMOUT: Bash Variables.
-* UID: Bash Variables.
+ (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)

File: bashref.info, Node: Function Index, Next: Concept Index, Prev: Variable Index, Up: Top
@@ -8167,78 +9117,101 @@ File: bashref.info, Node: Function Index, Next: Concept Index, Prev: Variable
Function Index
**************
+
* 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-<DEL>): 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.
+ (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-<DEL>): 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.
-* clear-screen (C-l): Commands For Moving.
+ (line 46)
+* clear-screen (C-l): Commands For Moving. (line 26)
* complete (<TAB>): 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.
+ (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.
-* delete-horizontal-space (): Commands For Killing.
-* digit-argument (M-0, M-1, ... M--): Numeric Arguments.
+ (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.
-* downcase-word (M-l): Commands For Text.
+ (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.
-* end-kbd-macro (C-x )): Keyboard Macros.
-* end-of-history (M->): Commands For History.
-* end-of-line (C-e): Commands For Moving.
+ (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.
-* 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.
+ (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.
-* 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.
+ (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.
-* next-history (C-n): Commands For History.
+ (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.
-* overwrite-mode (): Commands For Text.
+ (line 36)
+* overwrite-mode (): Commands For Text. (line 50)
* possible-completions (M-?): Commands For Completion.
+ (line 15)
* prefix-meta (<ESC>): Miscellaneous Commands.
-* previous-history (C-p): Commands For History.
-* quoted-insert (C-q or C-v): Commands For Text.
+ (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.
-* redraw-current-line (): Commands For Moving.
-* reverse-search-history (C-r): Commands For History.
+ (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.
-* self-insert (a, b, A, 1, !, ...): Commands For Text.
+ (line 25)
+* self-insert (a, b, A, 1, !, ...): Commands For Text. (line 24)
* 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.
+ (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.
-* 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.
+ (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)

File: bashref.info, Node: Concept Index, Prev: Function Index, Up: Top
@@ -8246,248 +9219,285 @@ File: bashref.info, Node: Concept Index, Prev: Function Index, Up: Top
Concept Index
*************
+
* Menu:
-* alias expansion: Aliases.
-* arithmetic evaluation: Shell Arithmetic.
+* alias expansion: Aliases. (line 6)
+* arithmetic evaluation: Shell Arithmetic. (line 6)
* arithmetic expansion: Arithmetic Expansion.
-* arithmetic, shell: Shell Arithmetic.
-* arrays: Arrays.
-* background: Job Control Basics.
-* Bash configuration: Basic Installation.
-* Bash installation: Basic Installation.
+ (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.
-* brace expansion: Brace Expansion.
-* builtin: Definitions.
+ (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.
-* command timing: Pipelines.
+ (line 6)
+* command timing: Pipelines. (line 8)
+* commands, compound: Compound Commands. (line 6)
* 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.
+ (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.
-* configuration: Basic Installation.
-* control operator: Definitions.
-* directory stack: The Directory Stack.
+ (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.
-* environment: Environment.
-* evaluation, arithmetic: Shell Arithmetic.
-* event designators: Event Designators.
+ (line 6)
+* environment: Environment. (line 6)
+* evaluation, arithmetic: Shell Arithmetic. (line 6)
+* event designators: Event Designators. (line 6)
* execution environment: Command Execution Environment.
-* exit status <1>: Exit Status.
-* exit status: Definitions.
-* expansion: Shell Expansions.
+ (line 6)
+* exit status <1>: Exit Status. (line 6)
+* exit status: Definitions. (line 24)
+* expansion: Shell Expansions. (line 6)
* expansion, arithmetic: Arithmetic Expansion.
-* expansion, brace: Brace Expansion.
-* expansion, filename: Filename Expansion.
+ (line 6)
+* expansion, brace: Brace Expansion. (line 6)
+* expansion, filename: Filename Expansion. (line 9)
* expansion, parameter: Shell Parameter Expansion.
-* expansion, pathname: Filename Expansion.
-* expansion, tilde: Tilde Expansion.
-* expressions, arithmetic: Shell Arithmetic.
+ (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.
-* field: Definitions.
-* filename: Definitions.
-* filename expansion: Filename Expansion.
-* foreground: Job Control Basics.
-* functions, shell: Shell Functions.
+ (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.
-* history events: Event Designators.
-* history expansion: History Interaction.
+ (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.
-* identifier: Definitions.
-* initialization file, readline: Readline Init File.
-* installation: Basic Installation.
+ (line 203)
+* identifier: Definitions. (line 49)
+* initialization file, readline: Readline Init File. (line 6)
+* installation: Basic Installation. (line 6)
* 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.
+ (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.
-* localization: Locale Translation.
-* login shell: Invoking Bash.
-* matching, pattern: Pattern Matching.
-* metacharacter: Definitions.
-* name: Definitions.
-* native languages: Locale Translation.
+ (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.
-* operator, shell: Definitions.
+ (line 6)
+* operator, shell: Definitions. (line 55)
* parameter expansion: Shell Parameter Expansion.
-* parameters: Shell Parameters.
+ (line 6)
+* parameters: Shell Parameters. (line 6)
* 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.
+ (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.
-* prompting: Printing a Prompt.
-* quoting: Quoting.
-* quoting, ANSI: ANSI-C Quoting.
+ (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.
-* redirection: Redirections.
-* reserved word: Definitions.
+ (line 24)
+* redirection: Redirections. (line 6)
+* reserved word: Definitions. (line 67)
* 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.
+ (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.
-* word: Definitions.
-* word splitting: Word Splitting.
+ (line 33)
+* word: Definitions. (line 87)
+* word splitting: Word Splitting. (line 6)
* yanking text: Readline Killing Commands.
+ (line 6)

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
+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 --git a/doc/bashref.texi b/doc/bashref.texi
index 4a00d54a..3b33021b 100644
--- a/doc/bashref.texi
+++ b/doc/bashref.texi
@@ -4,104 +4,82 @@
@settitle Bash Reference Manual
@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
+@include version.texi
-@format
+@copying
This text is a brief description of the features that are present in
-the Bash shell.
+the Bash shell (version @value{VERSION}, @value{UPDATED}).
This is Edition @value{EDITION}, last updated @value{UPDATED},
of @cite{The GNU Bash Reference Manual},
for @code{Bash}, Version @value{VERSION}.
-Copyright (C) 1991-2002 Free Software Foundation, Inc.
+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.
-@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
+@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
@title Bash Reference Manual
@subtitle Reference Documentation for Bash
@subtitle Edition @value{EDITION}, for @code{Bash} Version @value{VERSION}.
-@subtitle @value{UPDATE-MONTH}
+@subtitle @value{UPDATED-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.
+@insertcopying
-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.
+@sp 1
+Published by the Free Software Foundation @*
+59 Temple Place, Suite 330, @*
+Boston, MA 02111-1307 @*
+USA @*
-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
+@contents
+
+@ifnottex
@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.
+the Bash shell (version @value{VERSION}, @value{UPDATED})..
This is Edition @value{EDITION}, last updated @value{UPDATED},
of @cite{The GNU Bash Reference Manual},
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
borrowed concepts from are the Bourne Shell (@file{sh}), the Korn Shell
@@ -145,6 +123,8 @@ reference on shell behavior.
between Bash and historical
versions of /bin/sh.
+* Copying This Manual:: Copying this manual.
+
* Builtin Index:: Index of Bash builtin commands.
* Reserved Word Index:: Index of Bash reserved words.
@@ -157,7 +137,7 @@ reference on shell behavior.
* Concept Index:: General index for concepts described in
this manual.
@end menu
-@end ifinfo
+@end ifnottex
@node Introduction
@chapter Introduction
@@ -174,7 +154,7 @@ Bash is the shell, or command language interpreter,
for the @sc{gnu} operating system.
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},
+the current Unix shell @code{sh},
which appeared in the Seventh Edition Bell Labs Research version
of Unix.
@@ -190,19 +170,29 @@ a version of @code{csh}, Bash is the default shell.
Like other @sc{gnu} software, Bash is quite portable. It currently runs
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}.
+and Windows platforms.
@node What is a shell?
@section 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 @sc{gnu} utilities,
-and a programming language, allowing these utilitites to be
-combined. Files containing commands can be created, and become
+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.
+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
asynchronously.
@@ -213,8 +203,6 @@ The @dfn{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 (@dfn{builtins}) implementing functionality impossible
@@ -236,7 +224,7 @@ variables, flow control constructs, quoting, and functions.
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
+editing, command history and aliases. Each of these features is
described in this manual.
@node Definitions
@@ -358,8 +346,8 @@ Bash is an acronym for @samp{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 @sc{posix}
-1003.2 specification for the `standard' Unix shell.
+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':
commands, control structures, shell functions, shell @i{parameters},
@@ -371,8 +359,8 @@ and to named files, and how the shell executes commands.
* Shell Syntax:: What your input means to the shell.
* 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
+* 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.
* Executing Commands:: What happens when you run a command.
@@ -473,6 +461,7 @@ When the command history expansion facilities are being used, the
@var{history expansion} character, usually @samp{!}, must be quoted
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.
@@ -508,6 +497,8 @@ characters are removed. 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 @samp{*} and @samp{@@} have special meaning
when in double quotes (@pxref{Shell Parameter Expansion}).
@@ -614,9 +605,7 @@ some other grouping.
* Pipelines:: Connecting the input and output of several
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.
+* Compound Commands:: Shell commands for control flow.
@end menu
@node Simple Commands
@@ -674,8 +663,16 @@ shell waits for all commands in the pipeline to complete.
Each command in a pipeline is executed in its own subshell
(@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.
+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
@subsection Lists of Commands
@@ -730,8 +727,27 @@ The return status of
@sc{and} and @sc{or} lists is the exit status of the last command
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
-@subsection Looping Constructs
+@subsubsection Looping Constructs
@cindex commands, looping
Bash supports the following looping constructs.
@@ -803,7 +819,7 @@ The @code{break} and @code{continue} builtins (@pxref{Bourne Shell Builtins})
may be used to control loop execution.
@node Conditional Constructs
-@subsection Conditional Constructs
+@subsubsection Conditional Constructs
@cindex commands, conditional
@table @code
@@ -950,6 +966,8 @@ Word splitting and filename expansion are not performed on the words
between the @samp{[[} and @samp{]]}; tilde expansion, parameter and
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
right of the operator is considered a pattern and matched according
@@ -959,6 +977,25 @@ the pattern, respectively, and 1 otherwise.
Any part of the pattern may be quoted to force it to be matched as a
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:
@@ -984,7 +1021,7 @@ value of the entire conditional expression.
@end table
@node Command Grouping
-@subsection Grouping Commands
+@subsubsection Grouping Commands
@cindex commands, grouping
Bash provides two ways to group a list of commands to be executed
@@ -999,9 +1036,10 @@ commands in the list may be redirected to a single stream.
@end example
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.
+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 @{@}
@rwindex @{
@@ -1041,39 +1079,61 @@ shell context; no new process is created to interpret them.
Functions are declared using this syntax:
@rwindex function
@example
-[ @code{function} ] @var{name} () @{ @var{command-list}; @}
+[ @code{function} ] @var{name} () @var{compound-command} [ @var{redirections} ]
@end example
This defines a shell function named @var{name}. The reserved
word @code{function} is optional.
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
+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, the @var{command-list} must be terminated with a semicolon
-or a newline.
+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
function become the positional parameters
during its execution (@pxref{Positional Parameters}).
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.
+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. When a function completes, the values of the
+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
execution. If a numeric argument is given to @code{return},
@@ -1085,6 +1145,22 @@ Variables local to the function may be declared with the
@code{local} builtin. These variables are visible only to
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.
@@ -1096,14 +1172,13 @@ recursive calls.
@menu
* Positional Parameters:: The shell's command-line arguments.
-* Special Parameters:: Parameters with special meanings.
+* Special Parameters:: Parameters denoted by special characters.
@end menu
A @var{parameter} is an entity that stores values.
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 @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
(see the description of the @code{declare} builtin in @ref{Bash Builtins}).
@@ -1123,12 +1198,13 @@ is not given, the variable is assigned the null string. All
command substitution, arithmetic expansion, and quote
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{}))}
+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
of @code{"$@@"} as explained below.
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.
@@ -1287,7 +1363,8 @@ This mechanism is similar to
@var{filename expansion} (@pxref{Filename Expansion}),
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 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
the postscript is then appended to each resulting string, expanding left
@@ -1302,6 +1379,14 @@ bash$ echo a@{d,c,b@}e
ade ace abe
@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
in the result. It is strictly textual. Bash
@@ -1311,9 +1396,15 @@ To avoid conflicts with parameter expansion, the string @samp{$@{}
is not considered eligible for brace expansion.
A correctly-formed brace expansion must contain unquoted opening
-and closing braces, and at least one unquoted comma.
+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
above example:
@@ -1428,8 +1519,11 @@ Bash uses the value of the variable formed from the rest of
expanded and that value is used in the rest of the substitution, rather
than the value of @var{parameter} itself.
This is known as @code{indirect expansion}.
-The exception to this is the expansion of $@{!@var{prefix*@}}
+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,
parameter expansion, command substitution, and arithmetic expansion.
@@ -1451,9 +1545,9 @@ If @var{parameter} is unset or null, the expansion of
If @var{parameter}
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.
+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}@}
If @var{parameter}
@@ -1490,9 +1584,19 @@ Substring indexing is zero-based unless the positional parameters
are used, in which case the indexing starts at 1.
@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
substituted.
@@ -1615,7 +1719,7 @@ The expression is treated as if it were within double quotes, but
a 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.
+Arithmetic expansions may be nested.
The evaluation is performed according to the rules listed below
(@pxref{Shell Arithmetic}).
@@ -1708,6 +1812,8 @@ and the shell option @code{nullglob} is disabled, the word is left
unchanged.
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.
@@ -1720,7 +1826,7 @@ In other cases, the @samp{.} character is not treated specially.
See the description of @code{shopt} in @ref{Bash Builtins},
for a description of the @code{nocaseglob}, @code{nullglob},
-and @code{dotglob} options.
+@code{failglob}, and @code{dotglob} options.
The @env{GLOBIGNORE}
shell variable may be used to restrict the set of filenames matching a
@@ -1728,8 +1834,9 @@ pattern. If @env{GLOBIGNORE}
is set, each matching filename that also matches one of the patterns in
@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
+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
@samp{.} will match.
@@ -1744,9 +1851,12 @@ is unset.
@cindex matching, pattern
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.
+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:
@table @code
@@ -2257,8 +2367,8 @@ the current working directory
the file creation mode mask
@item
-shell variables marked for export, along with variables exported for
-the command, passed in the environment (@pxref{Environment})
+shell variables and functions marked for export, along with variables
+exported for the command, passed in the environment (@pxref{Environment})
@item
traps caught by the shell are reset to the values inherited from the
@@ -2269,7 +2379,8 @@ shell's parent, and traps ignored by the shell are ignored
A command invoked in this separate environment cannot affect the
shell's execution environment.
-Command substitution and asynchronous commands are invoked in a
+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
@@ -2362,10 +2473,11 @@ In all cases, Bash ignores @code{SIGQUIT}.
If job control is in effect (@pxref{Job Control}), Bash
ignores @code{SIGTTIN}, @code{SIGTTOU}, and @code{SIGTSTP}.
-Commands started by Bash have signal handlers set to the
+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} as well.
+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
@code{SIGTTIN}, @code{SIGTTOU}, and @code{SIGTSTP}.
@@ -2385,9 +2497,9 @@ If the @code{huponexit} shell option has been set with @code{shopt}
(@pxref{Bash Builtins}), Bash sends a @code{SIGHUP} to all jobs when
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.
+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
which a trap has been set will cause the @code{wait} builtin to return
@@ -2488,6 +2600,10 @@ facilities (@pxref{Programmable Completion Builtins}).
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
@@ -2536,14 +2652,21 @@ The return status is zero unless @var{n} is not greater than or equal to 1.
@example
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.
+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.
@@ -2609,6 +2732,9 @@ The @option{-n} option means to no longer mark each @var{name} for export.
If no @var{names} are supplied, or if the @option{-p} option is given, a
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
with a name that is not a shell function.
@@ -2709,7 +2835,7 @@ is supplied.
@item readonly
@btindex readonly
@example
-readonly [-apf] [@var{name}] @dots{}
+readonly [-apf] [@var{name}[=@var{value}]] @dots{}
@end example
Mark each @var{name} as readonly.
The values of these names may not be changed by subsequent assignment.
@@ -2720,6 +2846,8 @@ If no @var{name} arguments are given, or if the @option{-p}
option is supplied, a list of all readonly names is printed.
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,
or the @option{-f} option is supplied with a name that is not a shell function.
@@ -2736,6 +2864,8 @@ This may also be used to terminate execution of a script being executed
with the @code{.} (or @code{source}) builtin, returning either @var{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 @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}.
@@ -2843,9 +2973,10 @@ The return status is zero.
trap [-lp] [@var{arg}] [@var{sigspec} @dots{}]
@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.
+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.
If @var{arg} is not present and @option{-p} has been supplied,
@@ -2854,20 +2985,31 @@ If no arguments are supplied, or
only @option{-p} is given, @code{trap} prints the list of commands
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.
+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
-after every simple command.
+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.
-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,
+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{!}.
-The @option{-l} option causes the shell to print a list of signal names
-and their corresponding numbers.
+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.
Trapped signals are reset to their original values in a child
@@ -2908,8 +3050,7 @@ If no options are supplied, or the @option{-v} option is given, each
If the @option{-f} option is given, the @var{name}s refer to shell
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.
+The return status is zero unless a @var{name} is readonly.
@end table
@node Bash Builtins
@@ -3031,6 +3172,26 @@ the function.
The return status is non-zero if @var{shell-builtin} is not a shell
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
@example
@@ -3059,19 +3220,23 @@ zero if @var{command} is found, and non-zero if not.
@item declare
@btindex declare
@example
-declare [-afFirtx] [-p] [@var{name}[=@var{value}]]
+declare [-afFirtx] [-p] [@var{name}[=@var{value}] @dots{}]
@end example
Declare variables and give them attributes. If no @var{name}s
are given, then display the values of variables instead.
The @option{-p} option will display the attributes and values of each
-@var{name}. When @option{-p} is used, additional options are ignored.
+@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:
+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
@item -a
@@ -3101,7 +3266,8 @@ the environment.
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.
+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,
an attempt is made to define a function using @samp{-f foo=bar},
@@ -3221,7 +3387,7 @@ otherwise 0 is returned.
@item local
@btindex local
@example
-local [@var{option}] @var{name}[=@var{value}]
+local [@var{option}] @var{name}[=@var{value}] @dots{}
@end example
For each argument, a local variable named @var{name} is created,
and assigned @var{value}.
@@ -3254,7 +3420,11 @@ format specifications, each of which causes printing of the next successive
@var{argument}.
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
+@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.
The @var{format} is reused as necessary to consume all of the @var{arguments}.
@@ -3422,10 +3592,50 @@ If set, aliases are expanded as described below under Aliases,
@ref{Aliases}.
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
of the @env{HISTFILE}
@@ -3492,8 +3702,10 @@ If set, the programmable completion facilities
This option is enabled by default.
@item promptvars
-If set, prompt strings undergo variable and parameter expansion after
-being expanded (@pxref{Printing a Prompt}).
+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.
@item restricted_shell
@@ -3572,7 +3784,7 @@ if none are found.
@item typeset
@btindex typeset
@example
-typeset [-afFrxi] [-p] [@var{name}[=@var{value}]]
+typeset [-afFrxi] [-p] [@var{name}[=@var{value}] @dots{}]
@end example
The @code{typeset} command is supplied for compatibility with the Korn
shell; however, it has been deprecated in favor of the @code{declare}
@@ -3689,8 +3901,9 @@ immediately, rather than before printing the next primary prompt.
@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,
+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{!}.
A trap on @code{ERR}, if set, is executed before the shell exits.
@@ -3732,6 +3945,12 @@ Use an @code{emacs}-style line editing interface (@pxref{Command Line Editing}).
@item errexit
Same as @code{-e}.
+@item errtrace
+Same as @code{-E}.
+
+@item functrace
+Same as @code{-T}.
+
@item hashall
Same as @code{-h}.
@@ -3775,6 +3994,12 @@ Same as @code{-t}.
@item physical
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
from the @sc{posix} 1003.2 standard to match the standard
@@ -3821,8 +4046,12 @@ shell will exit.
Print shell input lines as they are read.
@item -x
-Print a trace of simple commands and their arguments after they are
-expanded and before they are executed.
+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
The shell will perform brace expansion (@pxref{Brace Expansion}).
@@ -3832,6 +4061,11 @@ This option is on by default.
Prevent output redirection using @samp{>}, @samp{>&}, and @samp{<>}
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}).
This option is on by default for interactive shells.
@@ -3861,6 +4095,11 @@ $ cd ..; pwd
/usr/local
@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
unset. Otherwise, the positional parameters are set to the
@@ -3972,6 +4211,11 @@ The index of the last option argument processed by the @code{getopts} builtin.
@item PATH
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
The primary prompt string. The default value is @samp{\s-\v\$ }.
@@ -3998,13 +4242,59 @@ variables for controlling the job control facilities
@item BASH
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
script, its value is expanded and used as the name of a startup file
to read before executing the script. @xref{Bash Startup Files}.
-@item BASH_VERSION
-The version number of the current instance of Bash.
+@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
A readonly array variable (@pxref{Arrays})
@@ -4033,6 +4323,9 @@ The value of @env{MACHTYPE}.
@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
when printing selection lists. Automatically set upon receipt of a
@@ -4059,6 +4352,12 @@ This variable is available only in shell functions and external
commands invoked by the
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
words in the current command line.
@@ -4081,6 +4380,11 @@ Assignment to this variable will not change the current directory.
If @env{DIRSTACK} is unset, it loses its special properties, even if
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
is readonly.
@@ -4098,7 +4402,11 @@ is excluded from the list of matched file names. A sample
value is @samp{.o:~}
@item FUNCNAME
-The name of any currently-executing shell function.
+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.
If @env{FUNCNAME} is unset, it loses its special properties, even if
@@ -4138,13 +4446,21 @@ command. If @env{HISTCMD} is unset, it loses its special properties,
even if it is subsequently reset.
@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.
+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
@env{HISTCONTROL}.
@@ -4185,6 +4501,13 @@ provides the functionality of @code{ignoreboth}.
The maximum number of commands to remember on the history list.
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
should be read when the shell needs to complete a hostname.
@@ -4330,6 +4653,11 @@ the count to the value assigned, and the expanded value
becomes the value assigned plus the number of seconds
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
the list is a valid argument for the @option{-o} option to the
@@ -4445,6 +4773,14 @@ options that you can use. These options must appear on the command
line before the single-character options to be recognized.
@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{$}
is printed on the standard ouput
@@ -4710,7 +5046,7 @@ the same, but the effective user id is not reset.
An interactive shell
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
+whose input and error output are both
connected to terminals (as determined by @code{isatty(3)}),
or one started with the @option{-i} option.
@@ -4988,12 +5324,13 @@ may be positive or negative integers.
@cindex arithmetic evaluation
The shell allows arithmetic expressions to be evaluated, as one of
-the shell expansions or by the @code{let} builtin.
+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 and associativity are the same
-as in the C language.
+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.
@@ -5046,7 +5383,7 @@ logical AND
logical OR
@item expr ? expr : expr
-conditional evaluation
+conditional operator
@item = *= /= %= += -= <<= >>= &= ^= |=
assignment
@@ -5059,8 +5396,12 @@ Shell variables are allowed as operands; parameter expansion is
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.
+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.
@@ -5092,13 +5433,15 @@ the @code{alias} and @code{unalias} builtin commands.
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 @samp{=}.
+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"},
+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
space or tab character, then the next command word following the
@@ -5384,9 +5727,9 @@ The version of Bash (e.g., 2.00)
@item \V
The release of Bash, version + patchlevel (e.g., 2.00.0)
@item \w
-The current working directory.
+The current working directory, with @env{$HOME} abbreviated with a tilde.
@item \W
-The basename of @env{$PWD}.
+The basename of @env{$PWD}, with @env{$HOME} abbreviated with a tilde.
@item \!
The history number of this command.
@item \#
@@ -5509,10 +5852,6 @@ and parameter expansion is performed on the values of @env{PS1} and
@env{PS2} regardless of the setting of the @code{promptvars} option.
@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.
@@ -5526,7 +5865,11 @@ default value of @env{$HISTFILE}).
@item
The output of @samp{kill -l} prints all the signal names on a single line,
-separated by spaces.
+separated by spaces, without the @samp{SIG} prefix.
+
+@item
+The @code{kill} builtin does not accept signal names with a @samp{SIG}
+prefix.
@item
Non-interactive shells exit if @var{filename} in @code{.} @var{filename}
@@ -5608,6 +5951,13 @@ The @code{trap} builtin displays signal names without the leading
@code{SIG}.
@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}.
@@ -5620,6 +5970,11 @@ Bash clears the @option{-e} option in such subshells.
Alias expansion is always enabled, even in non-interactive shells.
@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.
@@ -5762,7 +6117,7 @@ Bash reports such changes immediately (@pxref{The Set Builtin}).
Any trap on @code{SIGCHLD} is executed for each child process
that exits.
-If an attempt to exit Bash is while jobs are stopped, the
+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.
If a second attempt to exit is made without an intervening command,
@@ -5844,8 +6199,9 @@ kill -l [@var{exit_status}]
@end example
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.
+@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.
If any arguments are supplied when @option{-l} is given, the names of the
@@ -5929,9 +6285,9 @@ analogous to the @samp{%} job @sc{id}.
@set readline-appendix
@set history-appendix
@cindex Readline, how to use
-@include rluser.texinfo
+@include rluser.texi
@cindex History, how to use
-@include hsuser.texinfo
+@include hsuser.texi
@clear readline-appendix
@clear history-appendix
@@ -5943,7 +6299,7 @@ the various supported platforms. The distribution supports the
@sc{gnu} operating systems, nearly every version of Unix, and several
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}.
+@sc{ms-dos}, @sc{os/2}, and Windows platforms.
@menu
* Basic Installation:: Installation instructions.
@@ -6304,7 +6660,12 @@ displaying timing statistics for the pipeline following @code{time}
This allows pipelines as well as shell builtins and functions to be timed.
@item --enable-cond-command
-Include support for the @code{[[} conditional 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}).
@item --enable-directory-stack
@@ -6338,6 +6699,10 @@ builtin commands (@pxref{Bash History Facilities}).
This enables the job control features (@pxref{Job Control}),
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
@code{/dev/tcp/@var{host}/@var{port}} and
@@ -6400,7 +6765,9 @@ information about its effect.
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.
+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
@code{bashbug} command to submit a bug report.
@@ -6466,6 +6833,8 @@ Bash provides a programmable word completion mechanism
@item
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
Bash implements @code{csh}-like history expansion
@@ -6715,23 +7084,48 @@ Bash has much more optional behavior controllable with the @code{set}
builtin (@pxref{The Set Builtin}).
@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,
which specifies the behavior based on the number of arguments.
@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 after every
-simple command.
+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.
+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
@code{ERR} pseudo-signal specification, similar to @code{EXIT} and @code{DEBUG}.
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.
+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
The Bash @code{type} builtin is more extensive and gives more information
@@ -6841,6 +7235,15 @@ The SVR4.2 shell behaves differently when invoked as @code{jsh}
(it turns on job control).
@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
@printindex bt
@@ -6861,5 +7264,4 @@ The SVR4.2 shell behaves differently when invoked as @code{jsh}
@unnumbered Concept Index
@printindex cp
-@contents
@bye
diff --git a/doc/builtins.1 b/doc/builtins.1
index 800f6f1d..6a0b2483 100644
--- a/doc/builtins.1
+++ b/doc/builtins.1
@@ -1,6 +1,6 @@
.\" 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"
+.TH BASH_BUILTINS 1 "2004 Apr 20" "GNU Bash-3.0"
.SH NAME
bash, :, ., [, alias, bg, bind, break, builtin, cd, command, compgen, complete,
continue, declare, dirs, disown, echo, enable, eval, exec, exit,
diff --git a/doc/fdl.texi b/doc/fdl.texi
new file mode 100644
index 00000000..47ead9f0
--- /dev/null
+++ b/doc/fdl.texi
@@ -0,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 --git a/doc/fdl.txt b/doc/fdl.txt
new file mode 100644
index 00000000..daa2dd4f
--- /dev/null
+++ b/doc/fdl.txt
@@ -0,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 --git a/doc/infopost.sh b/doc/infopost.sh
new file mode 100755
index 00000000..85c49b4d
--- /dev/null
+++ b/doc/infopost.sh
@@ -0,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 --git a/doc/rbash.1 b/doc/rbash.1
index 78a247c2..c148abfa 100644
--- a/doc/rbash.1
+++ b/doc/rbash.1
@@ -1,4 +1,4 @@
-.TH RBASH 1 "1999 Nov 29" GNU
+.TH RBASH 1 "2004 Apr 20" "GNU Bash-3.0"
.SH NAME
rbash \- restricted bash, see \fBbash\fR(1)
.SH RESTRICTED SHELL
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index c49af9f4..555a0770 100644
--- a/doc/texinfo.tex
+++ b/doc/texinfo.tex
@@ -3,10 +3,10 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{1999-09-25.10}
+\def\texinfoversion{2003-02-03.16}
%
-% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
-% Free Software Foundation, Inc.
+% 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
% modify it under the terms of the GNU General Public License as
@@ -29,16 +29,17 @@
%
% 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.
+% 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.
-% 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
% problem. Patches are, of course, greatly appreciated.
@@ -50,13 +51,14 @@
% texindex foo.??
% 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.
+% 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. You can get
-% the existing language-specific files from ftp://ftp.gnu.org/gnu/texinfo/.
+%
+% 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]:}
@@ -66,6 +68,13 @@
\everyjob{\message{[Texinfo version \texinfoversion]}%
\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
\let\ptexbullet=\bullet
@@ -76,19 +85,16 @@
\let\ptexend=\end
\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
-% We never want plain's outer \+ definition in Texinfo.
-% For @tex, we can use \tabalign.
-\let\+ = \relax
-
-\message{Basics,}
-\chardef\other=12
-
% If this character appears in an error message or help string, it
% starts a new line in the output.
\newlinechar = `^^J
@@ -135,40 +141,74 @@
\ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi
\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}
\hyphenation{eshell}
\hyphenation{white-space}
% Margin to add to right of even pages, to left of odd pages.
-\newdimen \bindingoffset
-\newdimen \normaloffset
+\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.
+% 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}%
-\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
+\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
}%
-\fi
+
+% add check for \lastpenalty to plain's definitions. If the last thing
+% we did was a \nobreak, we don't want to insert more space.
+%
+\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount
+ \removelastskip\penalty-50\smallskip\fi\fi}
+\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount
+ \removelastskip\penalty-100\medskip\fi\fi}
+\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
+ \removelastskip\penalty-200\bigskip\fi\fi}
% For @cropmarks command.
% Do @cropmarks to get crop marks.
@@ -214,6 +254,9 @@
\normalturnoffactive % \ in index entries must not stay \, e.g., if
% the page break happens to be in the middle of an example.
\shipout\vbox{%
+ % Do this early so pdf references go to the beginning of the page.
+ \ifpdfmakepagedest \pdfmkdest{\the\pageno} \fi
+ %
\ifcropmarks \vbox to \outervsize\bgroup
\hsize = \outerhsize
\vskip-\topandbottommargin
@@ -243,8 +286,6 @@
\unvbox\footlinebox
\fi
%
- \ifpdfmakepagedest \pdfmkdest{\the\pageno} \fi
- %
\ifcropmarks
\egroup % end of \vbox\bgroup
\hfil\egroup % end of (centering) \line\bgroup
@@ -262,7 +303,7 @@
\egroup % \vbox from first cropmarks clause
\fi
}% end of \shipout\vbox
- }% end of group with \turnoffactive
+ }% end of group with \normalturnoffactive
\advancepageno
\ifnum\outputpenalty>-20000 \else\dosupereject\fi
}
@@ -422,17 +463,6 @@
}
-% Single-spacing is done by various environments (specifically, in
-% \nonfillstart and \quotations).
-\newskip\singlespaceskip \singlespaceskip = 12.5pt
-\def\singlespace{%
- % Why was this kern here? It messes up equalizing space above and below
- % environments. --karl, 6may93
- %{\advance \baselineskip by -\singlespaceskip
- %\kern \baselineskip}%
- \setleading \singlespaceskip
-}
-
%% Simple single-character @ commands
% @@ prints an @
@@ -452,16 +482,19 @@
\let\{=\mylbrace
\let\}=\myrbrace
\begingroup
- % Definitions to produce actual \{ & \} command in an index.
- \catcode`\{ = 12 \catcode`\} = 12
+ % Definitions to produce \{ and \} commands for indices,
+ % and @{ and @} for the aux file.
+ \catcode`\{ = \other \catcode`\} = \other
\catcode`\[ = 1 \catcode`\] = 2
- \catcode`\@ = 0 \catcode`\\ = 12
- @gdef@lbracecmd[\{]%
- @gdef@rbracecmd[\}]%
-@endgroup
+ \catcode`\! = 0 \catcode`\\ = \other
+ !gdef!lbracecmd[\{]%
+ !gdef!rbracecmd[\}]%
+ !gdef!lbraceatcmd[@{]%
+ !gdef!rbraceatcmd[@}]%
+!endgroup
% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
-% Others are defined by plain TeX: @` @' @" @^ @~ @= @v @H.
+% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
\let\, = \c
\let\dotaccent = \.
\def\ringaccent#1{{\accent23 #1}}
@@ -470,7 +503,7 @@
\let\udotaccent = \d
% Other special characters: @questiondown @exclamdown
-% Plain TeX defines: @AA @AE @O @OE @L (and lowercase versions) @ss.
+% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
\def\questiondown{?`}
\def\exclamdown{!`}
@@ -525,6 +558,16 @@
% therefore, no glue is inserted, and the space between the headline and
% the text is small, which looks bad.
%
+% Another complication is that the group might be very large. This can
+% cause the glue on the previous page to be unduly stretched, because it
+% does not have much material. In this case, it's better to add an
+% explicit \vfill so that the extra space is at the bottom. The
+% threshold for doing this is if the group is more than \vfilllimit
+% percent of a page (\vfilllimit can be changed inside of @tex).
+%
+\newbox\groupbox
+\def\vfilllimit{0.7}
+%
\def\group{\begingroup
\ifnum\catcode13=\active \else
\errhelp = \groupinvalidhelp
@@ -538,10 +581,22 @@
% above. But it's pretty close.
\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.
}%
%
- \vtop\bgroup
+ \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.
% Otherwise, the interline space between the last line of the group
@@ -687,44 +742,88 @@ where each line of input produces a line of output.}
\def\nofillexdentyyy #1{{\advance \leftskip by -\exdentamount
\leftline{\hskip\leftskip{\rm#1}}}}
-% @inmargin{TEXT} puts TEXT in the margin next to the current paragraph.
-
-\def\inmargin#1{%
-\strut\vadjust{\nobreak\kern-\strutdepth
- \vtop to \strutdepth{\baselineskip\strutdepth\vss
- \llap{\rightskip=\inmarginspacing \vbox{\noindent #1}}\null}}}
+% @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}
-
-%\hbox{{\rm#1}}\hfil\break}}
+%
+\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`\\=12
- \catcode`~=12
- \catcode`^=12
- \catcode`_=12
- \catcode`|=12
- \catcode`<=12
- \catcode`>=12
- \catcode`+=12
+ \catcode`\\=\other
+ \catcode`~=\other
+ \catcode`^=\other
+ \catcode`_=\other
+ \catcode`|=\other
+ \catcode`<=\other
+ \catcode`>=\other
+ \catcode`+=\other
\parsearg\includezzz}
% Restore active chars for included file.
\def\includezzz#1{\endgroup\begingroup
% Read the included file in a group so nested @include's work.
\def\thisfile{#1}%
+ \let\value=\expandablevalue
\input\thisfile
\endgroup}
\def\thisfile{}
-% @center line outputs that line, centered
-
-\def\center{\parsearg\centerzzz}
-\def\centerzzz #1{{\advance\hsize by -\leftskip
-\advance\hsize by -\rightskip
-\centerline{#1}}}
+% @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
@@ -784,18 +883,56 @@ where each line of input produces a line of output.}
%
\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.
+% @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
%
-% This isn't quite enough for @math to work properly in indices, but it
-% seems unlikely it will ever be needed there.
+% 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}%
+}}
%
-\let\implicitmath = $
-\def\math#1{\implicitmath #1\implicitmath}
+% 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.
\def\bullet{\implicitmath\ptexbullet\implicitmath}
@@ -878,20 +1015,26 @@ where each line of input produces a line of output.}
\def\dopdfimage#1#2#3{%
\def\imagewidth{#2}%
\def\imageheight{#3}%
+ % without \immediate, pdftex seg faults when the same image is
+ % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
\ifnum\pdftexversion < 14
- \pdfimage
+ \immediate\pdfimage
\else
- \pdfximage
+ \immediate\pdfximage
\fi
\ifx\empty\imagewidth\else width \imagewidth \fi
\ifx\empty\imageheight\else height \imageheight \fi
- {#1.pdf}%
+ \ifnum\pdftexversion<13
+ #1.pdf%
+ \else
+ {#1.pdf}%
+ \fi
\ifnum\pdftexversion < 14 \else
\pdfrefximage \pdflastximage
\fi}
- \def\pdfmkdest#1{\pdfdest name{#1@} xyz}
- \def\pdfmkpgn#1{#1@}
- \let\linkcolor = \Cyan
+ \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
% come from Petr Olsak
@@ -902,41 +1045,43 @@ where each line of input produces a line of output.}
\expandafter\xdef\csname#1\endcsname{\the\tempnum}}
\def\pdfmakeoutlines{{%
\openin 1 \jobname.toc
- \ifeof 1\else\bgroup
+ \ifeof 1\else\begingroup
\closein 1
- \indexnofonts
- \def\tt{}
- % thanh's hack / proper braces in bookmarks
+ % 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{}
+ \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\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}}
+ \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
- \egroup\fi
+ \endgroup\fi
}}
\def\makelinks #1,{%
\def\params{#1}\def\E{END}%
@@ -986,6 +1131,7 @@ where each line of input produces a line of output.}
\def\pdfurl#1{%
\begingroup
\normalturnoffactive\def\@{@}%
+ \let\value=\expandablevalue
\leavevmode\Red
\startlink attr{/Border [0 0 0]}%
user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
@@ -1013,9 +1159,8 @@ where each line of input produces a line of output.}
\def\makelink{\addtokens{\toksB}%
{\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
\def\pdflink#1{%
- \startlink attr{/Border [0 0 0]} goto name{\mkpgn{#1}}
+ \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
\linkcolor #1\endlink}
- \def\mkpgn#1{#1@}
\def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
\fi % \ifx\pdfoutput
@@ -1032,9 +1177,26 @@ where each line of input produces a line of output.}
% We don't need math for this one.
\def\ttsl{\tenttsl}
-% Use Computer Modern fonts at \magstephalf (11pt).
-\newcount\mainmagstep
-\mainmagstep=\magstephalf
+% Default leading.
+\newdimen\textleading \textleading = 13.2pt
+
+% Set the baselineskip to #1, and the lineskip and strut size
+% correspondingly. There is no deep meaning behind these magic numbers
+% used as factors; they just match (closely enough) what Knuth defined.
+%
+\def\lineskipfactor{.08333}
+\def\strutheightpercent{.70833}
+\def\strutdepthpercent {.29167}
+%
+\def\setleading#1{%
+ \normalbaselineskip = #1\relax
+ \normallineskip = \lineskipfactor\normalbaselineskip
+ \normalbaselines
+ \setbox\strutbox =\hbox{%
+ \vrule width0pt height\strutheightpercent\baselineskip
+ depth \strutdepthpercent \baselineskip
+ }%
+}
% Set the font macro #1 to the font named #2, adding on the
% specified font prefix (normally `cm').
@@ -1064,17 +1226,21 @@ where each line of input produces a line of output.}
\def\scshape{csc}
\def\scbshape{csc}
+\newcount\mainmagstep
\ifx\bigger\relax
-\let\mainmagstep=\magstep1
-\setfont\textrm\rmshape{12}{1000}
-\setfont\texttt\ttshape{12}{1000}
+ % not really supported.
+ \mainmagstep=\magstep1
+ \setfont\textrm\rmshape{12}{1000}
+ \setfont\texttt\ttshape{12}{1000}
\else
-\setfont\textrm\rmshape{10}{\mainmagstep}
-\setfont\texttt\ttshape{10}{\mainmagstep}
+ \mainmagstep=\magstephalf
+ \setfont\textrm\rmshape{10}{\mainmagstep}
+ \setfont\texttt\ttshape{10}{\mainmagstep}
\fi
-% Instead of cmb10, you many want to use cmbx10.
+% 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.
+% looks better when embedded in a line with cmr10
+% (in Bob's opinion).
\setfont\textbf\bfshape{10}{\mainmagstep}
\setfont\textit\itshape{10}{\mainmagstep}
\setfont\textsl\slshape{10}{\mainmagstep}
@@ -1101,6 +1267,18 @@ where each line of input produces a line of output.}
\font\smalli=cmmi9
\font\smallsy=cmsy9
+% Fonts for small examples (8pt).
+\setfont\smallerrm\rmshape{8}{1000}
+\setfont\smallertt\ttshape{8}{1000}
+\setfont\smallerbf\bfshape{10}{800}
+\setfont\smallerit\itshape{8}{1000}
+\setfont\smallersl\slshape{8}{1000}
+\setfont\smallersf\sfshape{8}{1000}
+\setfont\smallersc\scshape{10}{800}
+\setfont\smallerttsl\ttslshape{10}{800}
+\font\smalleri=cmmi8
+\font\smallersy=cmsy8
+
% Fonts for title page:
\setfont\titlerm\rmbshape{12}{\magstep3}
\setfont\titleit\itbshape{10}{\magstep4}
@@ -1113,6 +1291,7 @@ where each line of input produces a line of output.}
\font\titlei=cmmi12 scaled \magstep3
\font\titlesy=cmsy10 scaled \magstep4
\def\authorrm{\secrm}
+\def\authortt{\sectt}
% Chapter (and unnumbered) fonts (17.28pt).
\setfont\chaprm\rmbshape{12}{\magstep2}
@@ -1138,20 +1317,6 @@ where each line of input produces a line of output.}
\font\seci=cmmi12 scaled \magstep1
\font\secsy=cmsy10 scaled \magstep2
-% \setfont\ssecrm\bxshape{10}{\magstep1} % This size an font looked bad.
-% \setfont\ssecit\itshape{10}{\magstep1} % The letters were too crowded.
-% \setfont\ssecsl\slshape{10}{\magstep1}
-% \setfont\ssectt\ttshape{10}{\magstep1}
-% \setfont\ssecsf\sfshape{10}{\magstep1}
-
-%\setfont\ssecrm\bfshape{10}{1315} % Note the use of cmb rather than cmbx.
-%\setfont\ssecit\itshape{10}{1315} % Also, the size is a little larger than
-%\setfont\ssecsl\slshape{10}{1315} % being scaled magstep1.
-%\setfont\ssectt\ttshape{10}{1315}
-%\setfont\ssecsf\sfshape{10}{1315}
-
-%\let\ssecbf=\ssecrm
-
% Subsection fonts (13.15pt).
\setfont\ssecrm\rmbshape{12}{\magstephalf}
\setfont\ssecit\itbshape{10}{1315}
@@ -1168,17 +1333,16 @@ where each line of input produces a line of output.}
% 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).
+% 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
+ \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy
+ \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf
+ \textfont\ttfam=\tentt \textfont\sffam=\tensf
}
-
% The font-changing commands redefine the meanings of \tenSTYLE, instead
% of just \STYLE. We do this so that font changes will continue to work
% in math mode, where it is the current \fam that is relevant in most
@@ -1189,7 +1353,7 @@ where each line of input produces a line of output.}
\let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
\let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
\let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl
- \resetmathfonts}
+ \resetmathfonts \setleading{\textleading}}
\def\titlefonts{%
\let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
\let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
@@ -1218,7 +1382,32 @@ where each line of input produces a line of output.}
\let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc
\let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy
\let\tenttsl=\smallttsl
- \resetmathfonts \setleading{11pt}}
+ \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.
%
@@ -1235,6 +1424,7 @@ where each line of input produces a line of output.}
\setfont\shortcontrm\rmshape{12}{1000}
\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
%% serif) and @ii for TeX italic
@@ -1242,8 +1432,8 @@ where each line of input produces a line of output.}
% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
% unless the following character is such as not to need one.
\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi}
-\def\smartslanted#1{{\sl #1}\futurelet\next\smartitalicx}
-\def\smartitalic#1{{\it #1}\futurelet\next\smartitalicx}
+\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx}
+\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx}
\let\i=\smartitalic
\let\var=\smartslanted
@@ -1261,6 +1451,17 @@ where each line of input produces a line of output.}
\def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation}
\def\restorehyphenation{\hyphenchar\font = `- }
+% Set sfcode to normal for the chars that usually have another value.
+% Can't use plain's \frenchspacing because it uses the `\x notation, and
+% sometimes \x has an active definition that messes things up.
+%
+\catcode`@=11
+ \def\frenchspacing{%
+ \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
+ \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m
+ }
+\catcode`@=\other
+
\def\t#1{%
{\tt \rawbackslash \frenchspacing #1}%
\null
@@ -1332,11 +1533,19 @@ where each line of input produces a line of output.}
\def\realdash{-}
\def\codedash{-\discretionary{}{}{}}
-\def\codeunder{\ifusingtt{\normalunderscore\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}
-%\let\exp=\tclose %Was temporary
-
% @kbd is like @code, except that if the argument is just one @key command,
% then @kbd has no effect.
@@ -1352,15 +1561,17 @@ where each line of input produces a line of output.}
\gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
\else\ifx\arg\wordcode
\gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @kbdinputstyle `\arg'}%
\fi\fi\fi
}
\def\worddistinct{distinct}
\def\wordexample{example}
\def\wordcode{code}
-% Default is kbdinputdistinct. (Too much of a hassle to call the macro,
-% the catcodes are wrong for parsearg to work.)
-\gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}
+% Default is `distinct.'
+\kbdinputstyle distinct
\def\xkey{\key}
\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
@@ -1474,7 +1685,8 @@ where each line of input produces a line of output.}
\let\subtitlerm=\tenrm
\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}%
%
- \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}%
+ \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines
+ \let\tt=\authortt}%
%
% Leave some space at the very top of the page.
\vglue\titlepagetopglue
@@ -1521,6 +1733,10 @@ where each line of input produces a line of output.}
\oldpage
\endgroup
%
+ % Need this before the \...aftertitlepage checks so that if they are
+ % in effect the toc pages will come out with page numbers.
+ \HEADINGSon
+ %
% If they want short, they certainly want long too.
\ifsetshortcontentsaftertitlepage
\shortcontents
@@ -1534,10 +1750,6 @@ where each line of input produces a line of output.}
\global\let\contents = \relax
\global\let\shortcontents = \relax
\fi
- %
- \ifpdf \pdfmakepagedesttrue \fi
- %
- \HEADINGSon
}
\def\finishtitlepage{%
@@ -1670,7 +1882,10 @@ where each line of input produces a line of output.}
}
% Subroutines used in generating headings
-% Produces Day Month Year style of output.
+% This produces Day Month Year style of output.
+% Only define if not already defined, in case a txi-??.tex file has set
+% up a different format (e.g., txi-cs.tex does this).
+\ifx\today\undefined
\def\today{%
\number\day\space
\ifcase\month
@@ -1679,6 +1894,7 @@ where each line of input produces a line of output.}
\or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec
\fi
\space\number\year}
+\fi
% @settitle line... specifies the title of the document, for headings.
% It generates no output of its own.
@@ -1751,10 +1967,18 @@ where each line of input produces a line of output.}
% \parskip glue -- logically it's part of the @item we just started.
\nobreak \vskip-\parskip
%
- % Stop a page break at the \parskip glue coming up. Unfortunately
+ % 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
+ % \baselineskip glue.) However, if what follows is an environment
+ % such as @example, there will be no \parskip glue; then
+ % the negative vskip we just would cause the example and the item to
+ % crash together. So we use this bizarre value of 10001 as a signal
+ % to \aboveenvbreak to insert \parskip glue after all.
+ % (Possibly there are other commands that could be followed by
+ % @example which need the same treatment, but not section titles; or
+ % maybe section titles are the only special case and they should be
+ % penalty 10001...)
+ \penalty 10001
\endgroup
\itemxneedsnegativevskipfalse
\else
@@ -1860,11 +2084,6 @@ where each line of input produces a line of output.}
\def\itemcontents{#1}%
\let\item=\itemizeitem}
-% Set sfcode to normal for the chars that usually have another value.
-% These are `.?!:;,'
-\def\frenchspacing{\sfcode46=1000 \sfcode63=1000 \sfcode33=1000
- \sfcode58=1000 \sfcode59=1000 \sfcode44=1000 }
-
% \splitoff TOKENS\endmark defines \first to be the first token in
% TOKENS, and \rest to be the remainder.
%
@@ -2086,8 +2305,8 @@ where each line of input produces a line of output.}
\let\go\pickupwholefraction
\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.
+ \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a
+ % separator; typically that is always in the input, anyway.
\expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%
\fi
\fi
@@ -2102,18 +2321,18 @@ where each line of input produces a line of output.}
\go
}
-% 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:
%
\def\multitable{\parsearg\dotable}
\def\dotable#1{\bgroup
\vskip\parskip
- \let\item\crcr
+ \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
\setmultitablespacing
@@ -2121,7 +2340,11 @@ where each line of input produces a line of output.}
\parindent=\multitableparindent
\overfullrule=0pt
\global\colcount=0
- \def\Emultitable{\global\setpercentfalse\cr\egroup\egroup}%
+ \def\Emultitable{%
+ \global\setpercentfalse
+ \crcrwithfootnotes\crcr
+ \egroup\egroup
+ }%
%
% To parse everything between @multitable and @item:
\setuptable#1 \endsetuptable
@@ -2210,6 +2433,25 @@ width0pt\relax} \fi
%% than skip between lines in the table.
\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,}
% Prevent errors for section commands.
@@ -2245,64 +2487,117 @@ width0pt\relax} \fi
% and so want to turn off most commands, in case they are used
% 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 = \relax
- \let\deffn = \relax
- \let\deffnx = \relax
+ \let\defcv = \empty
+ \let\defcvx = \empty
+ \let\Edefcv = \empty
+ \let\deffn = \empty
+ \let\deffnx = \empty
+ \let\Edeffn = \empty
\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\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\oddheading = \relax
\let\everyfooting = \relax
- \let\evenfooting = \relax
- \let\oddfooting = \relax
+ \let\everyheading = \relax
\let\headings = \relax
\let\include = \relax
+ \let\item = \relax
\let\lowersections = \relax
- \let\down = \relax
+ \let\oddfooting = \relax
+ \let\oddheading = \relax
+ \let\printindex = \relax
+ \let\pxref = \relax
\let\raisesections = \relax
- \let\up = \relax
+ \let\ref = \relax
\let\set = \relax
- \let\clear = \relax
- \let\item = \relax
+ \let\setchapternewpage = \relax
+ \let\setchapterstyle = \relax
+ \let\settitle = \relax
+ \let\up = \relax
+ \let\verbatiminclude = \relax
+ \let\xref = \relax
}
-% Ignore @ignore ... @end ignore.
-%
-\def\ignore{\doignore{ignore}}
-
-% Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text.
+% Ignore @ignore, @ifhtml, @ifinfo, and the like.
%
-\def\ifinfo{\doignore{ifinfo}}
+\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\html{\doignore{html}}
+\def\ifplaintext{\doignore{ifplaintext}}
+\def\ifxml{\doignore{ifxml}}
+\def\ignore{\doignore{ignore}}
\def\menu{\doignore{menu}}
-\def\direntry{\doignore{direntry}}
+\def\xml{\doignore{xml}}
% @dircategory CATEGORY -- specify a category of the dir file
% which this file should belong to. Ignore this in TeX.
@@ -2320,7 +2615,7 @@ width0pt\relax} \fi
\long\def\doignoretext##1@end #1{\enddoignore}%
%
% Make sure that spaces turn into tokens that match what \doignoretext wants.
- \catcode32 = 10
+ \catcode\spaceChar = 10
%
% Ignore braces, too, so mismatched braces don't cause trouble.
\catcode`\{ = 9
@@ -2329,14 +2624,21 @@ width0pt\relax} \fi
% We must not have @c interpreted as a control sequence.
\catcode`\@ = 12
%
- % Make the letter c a comment character so that the rest of the line
- % will be ignored. This way, the document can have (for example)
- % @c @end ifinfo
- % and the @end ifinfo will be properly ignored.
- % (We've just changed @ to catcode 12.)
- \catcode`\c = 14
+ \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 that command.
+ % And now expand the command defined above.
\doignoretext
}
@@ -2355,7 +2657,7 @@ width0pt\relax} \fi
\immediate\write16{If you are running another version of TeX, relax.}
\immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.}
\immediate\write16{ Then upgrade your TeX installation if you can.}
- \immediate\write16{ (See ftp://ftp.gnu.org/pub/gnu/TeX.README.)}
+ \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}
\immediate\write16{ to use a workaround.}
@@ -2377,8 +2679,8 @@ width0pt\relax} \fi
% We must actually expand the ignored text to look for the @end
% command, so that nested ignore constructs work. Thus, we put the
% text into a \vbox and then do nothing with the result. To minimize
- % the change of memory overflow, we follow the approach outlined on
- % page 401 of the TeXbook: make the current font be a dummy font.
+ % the chance of memory overflow, we follow the approach outlined on
+ % page 401 of the TeXbook.
%
\setbox0 = \vbox\bgroup
% Don't complain about control sequences we have declared \outer.
@@ -2399,8 +2701,8 @@ width0pt\relax} \fi
%
% 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
+ % 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.
%
@@ -2408,10 +2710,14 @@ width0pt\relax} \fi
\let\tenrm=\nullfont \let\tenit=\nullfont \let\tensl=\nullfont
\let\tenbf=\nullfont \let\tentt=\nullfont \let\smallcaps=\nullfont
\let\tensf=\nullfont
- % Similarly for index fonts (mostly for their use in smallexample).
+ % 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.
\tracinglostchars = 0
@@ -2425,7 +2731,7 @@ width0pt\relax} \fi
% Do minimal line-breaking.
\pretolerance = 10000
%
- % Do not execute instructions in @tex
+ % Do not execute instructions in @tex.
\def\tex{\doignore{tex}}%
% Do not execute macro definitions.
% `c' is a comment character, so the word `macro' will get cut off.
@@ -2470,7 +2776,7 @@ width0pt\relax} \fi
% we're called from @code, as @code{@value{foo-bar_}}. So \let any
% such active characters to their normal equivalents.
\gdef\value{\begingroup
- \catcode`\-=12 \catcode`\_=12
+ \catcode`\-=\other \catcode`\_=\other
\indexbreaks \let_\normalunderscore
\valuexxx}
}
@@ -2479,15 +2785,17 @@ width0pt\relax} \fi
% We have this subroutine so that we can handle at least some @value's
% properly in indexes (we \let\value to this in \indexdummies). Ones
% whose names contain - or _ still won't work, but we can't do anything
-% about that. The command has to be fully expandable, since the result
-% winds up in the index file. This means that if the variable's value
-% contains other Texinfo commands, it's almost certain it will fail
-% (although perhaps we could fix that with sufficient work to do a
-% one-level expansion on the result, instead of complete).
+% 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
\fi
@@ -2496,13 +2804,14 @@ width0pt\relax} \fi
% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
% with @set.
%
-\def\ifset{\parsearg\ifsetxxx}
-\def\ifsetxxx #1{%
+\def\ifset{\parsearg\doifset}
+\def\doifset#1{%
\expandafter\ifx\csname SET#1\endcsname\relax
- \expandafter\ifsetfail
+ \let\next=\ifsetfail
\else
- \expandafter\ifsetsucceed
+ \let\next=\ifsetsucceed
\fi
+ \next
}
\def\ifsetsucceed{\conditionalsucceed{ifset}}
\def\ifsetfail{\nestedignore{ifset}}
@@ -2511,51 +2820,39 @@ width0pt\relax} \fi
% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
% defined with @set, or has been undefined with @clear.
%
-\def\ifclear{\parsearg\ifclearxxx}
-\def\ifclearxxx #1{%
+\def\ifclear{\parsearg\doifclear}
+\def\doifclear#1{%
\expandafter\ifx\csname SET#1\endcsname\relax
- \expandafter\ifclearsucceed
+ \let\next=\ifclearsucceed
\else
- \expandafter\ifclearfail
+ \let\next=\ifclearfail
\fi
+ \next
}
\def\ifclearsucceed{\conditionalsucceed{ifclear}}
\def\ifclearfail{\nestedignore{ifclear}}
\defineunmatchedend{ifclear}
-% @iftex, @ifnothtml, @ifnotinfo always succeed; we read the text
-% following, through the first @end iftex (etc.). Make `@end iftex'
-% (etc.) valid only after an @iftex.
+% @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}
-% 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.
+% 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\nece#1{\expandafter\noexpand\csname#1\endcsname}
+\def\conditionalsucceed#1{\begingroup
+ \expandafter\def\csname E#1\endcsname{\endgroup}%
+}
% @defininfoenclose.
\let\definfoenclose=\comment
@@ -2587,42 +2884,48 @@ width0pt\relax} \fi
}
% @defindex foo == \newindex{foo}
-
+%
\def\defindex{\parsearg\newindex}
% Define @defcodeindex, like @defindex except put all entries in @code.
-
+%
+\def\defcodeindex{\parsearg\newcodeindex}
+%
\def\newcodeindex#1{%
\iflinks
\expandafter\newwrite \csname#1indfile\endcsname
\openout \csname#1indfile\endcsname \jobname.#1
\fi
\expandafter\xdef\csname#1index\endcsname{%
- \noexpand\docodeindex{#1}}
+ \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}}%
+%
+\def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}}
+\def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}}
+
+% #1 is \doindex or \docodeindex, #2 the index getting redefined (foo),
+% #3 the target index (bar).
+\def\dosynindex#1#2#3{%
+ % Only do \closeout if we haven't already done it, else we'll end up
+ % closing the target index.
+ \expandafter \ifx\csname donesynindex#2\endcsname \undefined
+ % The \closeout helps reduce unnecessary open files; the limit on the
+ % Acorn RISC OS is a mere 16 files.
+ \expandafter\closeout\csname#2indfile\endcsname
+ \expandafter\let\csname\donesynindex#2\endcsname = 1
+ \fi
+ % redefine \fooindfile:
+ \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname
+ \expandafter\let\csname#2indfile\endcsname=\temp
+ % redefine \fooindex:
+ \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}%
}
% Define \doindex, the driver for all \fooindex macros.
@@ -2642,171 +2945,254 @@ width0pt\relax} \fi
\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
+% Take care of Texinfo commands that can appear in an index entry.
+% Since there are some commands we want to expand, and others we don't,
+% we have to laboriously prevent expansion for those that we don't.
+%
\def\indexdummies{%
-\def\ { }%
-% 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
+ \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 \ ).
+% 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}
+
+% \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{%
-% 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{\}}
+ \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.
\let\SETmarginindex=\relax % put index entries in margin (undocumented)?
@@ -2838,32 +3224,29 @@ width0pt\relax} \fi
\def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now
% so it will be output as is; and it will print as backslash.
%
- \def\thirdarg{#3}%
- %
- % If third arg is present, precede it with space in sort key.
- \ifx\thirdarg\emptymacro
- \let\subentry = \empty
- \else
- \def\subentry{ #3}%
- \fi
- %
- % First process the index 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.
+ % The main index entry text.
\toks0 = {#2}%
%
- % If third (subentry) arg is present, add it to the index
- % string. And include a space.
+ % 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
%
- % 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.
+ % 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{%
\realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}%
@@ -2889,12 +3272,11 @@ width0pt\relax} \fi
\iflinks
\ifvmode
\skip0 = \lastskip
- \ifdim\lastskip = 0pt \else \nobreak\vskip-\lastskip \fi
+ \ifdim\lastskip = 0pt \else \nobreak\vskip-\skip0 \fi
\fi
%
\temp % do the write
%
- %
\ifvmode \ifdim\skip0 = 0pt \else \nobreak\vskip\skip0 \fi \fi
\fi
}%
@@ -3085,11 +3467,18 @@ width0pt\relax} \fi
\def\primary #1{\line{#1\hfil}}
\newskip\secondaryindent \secondaryindent=0.5cm
-
-\def\secondary #1#2{
-{\parfillskip=0in \parskip=0in
-\hangindent =1in \hangafter=1
-\noindent\hskip\secondaryindent\hbox{#1}\indexdotfill #2\par
+\def\secondary#1#2{{%
+ \parfillskip=0in
+ \parskip=0in
+ \hangindent=1in
+ \hangafter=1
+ \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill
+ \ifpdf
+ \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
+ \else
+ #2
+ \fi
+ \par
}}
% Define two-column mode, which we use to typeset indexes.
@@ -3149,7 +3538,6 @@ width0pt\relax} \fi
%
% 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
}
@@ -3163,6 +3551,7 @@ width0pt\relax} \fi
% previous page.
\dimen@ = \vsize
\divide\dimen@ by 2
+ \advance\dimen@ by -\ht\partialpage
%
% box0 will be the left-hand column, box2 the right.
\setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
@@ -3170,15 +3559,18 @@ width0pt\relax} \fi
\unvbox255
\penalty\outputpenalty
}
+%
+% Re-output the contents of the output page -- any previous material,
+% followed by the two boxes we just split, in box0 and box2.
\def\pagesofar{%
- % 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
%
\hsize = \doublecolumnhsize
\wd0=\hsize \wd2=\hsize
\hbox to\pagewidth{\box0\hfil\box2}%
}
+%
+% All done with double columns.
\def\enddoublecolumns{%
\output = {%
% Split the last of the double-column material. Leave it on the
@@ -3203,8 +3595,9 @@ width0pt\relax} \fi
% \endgroup where \vsize got restored).
\pagegoal = \vsize
}
+%
+% Called at the end of the double column material.
\def\balancecolumns{%
- % Called at the end of the double column material.
\setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120.
\dimen@ = \ht0
\advance\dimen@ by \topskip
@@ -3359,42 +3752,41 @@ width0pt\relax} \fi
\outer\def\chapter{\parsearg\chapteryyy}
\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
-}
+ \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}{\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
+ \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
}
% @centerchap is like @unnumbered, but the heading is centered.
@@ -3407,149 +3799,121 @@ width0pt\relax} \fi
\outer\def\unnumbered{\parsearg\unnumberedyyy}
\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<toks register> to achieve this: TeX expands \the<toks> only once,
-% simply yielding the contents of <toks register>. (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
+ \secno=0 \subsecno=0 \subsubsecno=0
+ %
+ % This used to be simply \message{#1}, but TeX fully expands the
+ % argument to \message. Therefore, if #1 contained @-commands, TeX
+ % expanded them. For example, in `@unnumbered The @cite{Book}', TeX
+ % expanded @cite (which turns out to cause errors because \cite is meant
+ % to be executed, not expanded).
+ %
+ % Anyway, we don't want the fully-expanded definition of @cite to appear
+ % as a result of the \message, we just want `@cite' itself. We use
+ % \the<toks register> to achieve this: TeX expands \the<toks> only once,
+ % simply yielding the contents of <toks register>. (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
}
% Sections.
\outer\def\numberedsec{\parsearg\secyyy}
\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
+ \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
}
\outer\def\appendixsection{\parsearg\appendixsecyyy}
\outer\def\appendixsec{\parsearg\appendixsecyyy}
\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
+ \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
}
\outer\def\unnumberedsec{\parsearg\unnumberedsecyyy}
\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
+ \plainsecheading {#1}\gdef\thissection{#1}%
+ \writetocentry{unnumbsec}{#1}{{\the\chapno}{\the\secno}}
+ \unnumbnoderef
+ \nobreak
}
% Subsections.
\outer\def\numberedsubsec{\parsearg\numberedsubsecyyy}
\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
+ \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
}
\outer\def\appendixsubsec{\parsearg\appendixsubsecyyy}
\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
+ \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
}
\outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy}
\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
+ \plainsubsecheading {#1}\gdef\thissection{#1}%
+ \writetocentry{unnumbsubsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}}
+ \unnumbnoderef
+ \nobreak
}
% Subsubsections.
\outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy}
\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
+ \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
}
\outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy}
\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
+ \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
}
\outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy}
\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
+ \plainsubsubsecheading {#1}\gdef\thissection{#1}%
+ \writetocentry{unnumbsubsubsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}}
+ \unnumbnoderef
+ \nobreak
}
% These are variants which are not "outer", so they can appear in @ifinfo.
@@ -3590,16 +3954,16 @@ width0pt\relax} \fi
\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}
+ {\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}
+ {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
+ \parindent=0pt\raggedright
+ \rm #1\hfill}}\bigskip \par\penalty 200}
% @heading, @subheading, @subsubheading.
\def\heading{\parsearg\plainsecheading}
@@ -3745,7 +4109,16 @@ width0pt\relax} \fi
\hangindent = \wd0 % zero if no section number
\unhbox0 #3}%
}%
- \ifdim\parskip<10pt \nobreak\kern10pt\nobreak\kern-\parskip\fi \nobreak
+ % 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
}
@@ -3757,16 +4130,30 @@ width0pt\relax} \fi
% Called from @chapter, etc. We supply {\folio} at the end of the
% 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.
+% 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{%
+\def\writetocentry#1#2#3{%
\iftocfileopened\else
\immediate\openout\tocfile = \jobname.toc
\global\tocfileopenedtrue
\fi
- \iflinks \write\tocfile{#1{\folio}}\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
}
\newskip\contentsrightmargin \contentsrightmargin=1in
@@ -3797,7 +4184,7 @@ width0pt\relax} \fi
\advance\hsize by -\contentsrightmargin % Don't use the full line length.
%
% Roman numerals for page numbers.
- \ifnum \pageno>0 \pageno = \lastnegativepageno \fi
+ \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi
}
@@ -3814,7 +4201,7 @@ width0pt\relax} \fi
\pdfmakeoutlines
\endgroup
\lastnegativepageno = \pageno
- \pageno = \savepageno
+ \global\pageno = \savepageno
}
% And just the chapters.
@@ -3822,19 +4209,21 @@ width0pt\relax} \fi
\startcontents{\putwordShortTOC}%
%
\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\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\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{}
+ \let\unnumbsecentry = \secentry
+ \let\unnumbsubsecentry = \subsecentry
+ \let\unnumbsubsubsecentry = \subsubsecentry
\openin 1 \jobname.toc
\ifeof 1 \else
\closein 1
@@ -3844,7 +4233,7 @@ width0pt\relax} \fi
\contentsalignmacro % in case @setchapternewpage odd is in effect
\endgroup
\lastnegativepageno = \pageno
- \pageno = \savepageno
+ \global\pageno = \savepageno
}
\let\shortcontents = \summarycontents
@@ -3857,16 +4246,24 @@ width0pt\relax} \fi
% The last argument is the page number.
% The arguments in between are the chapter number, section number, ...
-% Chapter-level things, for both the long and short contents.
+% Chapters, in the main contents.
\def\chapentry#1#2#3{\dochapentry{#2\labelspace#1}{#3}}
-
-% See comments in \dochapentry re vbox and related settings
+%
+% 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.
+% The arg is, e.g., `Appendix A' for an appendix, or `3' for a chapter.
% We could simplify the code here by writing out an \appendixentry
% command in the toc file for appendices, instead of using \chapentry
% for both, but it doesn't seem worth it.
@@ -3874,38 +4271,31 @@ width0pt\relax} \fi
\newdimen\shortappendixwidth
%
\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
+ % 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.)
- \advance\dimen0 by 1.1em
- \hbox to \dimen0{#1\hfil}%
+ \dimen0 = 1em
+ \hbox to \dimen0{#1\hss}%
}
-\def\unnumbchapentry#1#2{\dochapentry{#1}{#2}}
-\def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno\bgroup#2\egroup}}
+% 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{\dosecentry{#1}{#2}}
+\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{\dosubsecentry{#1}{#2}}
+\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{\dosubsubsecentry{#1}{#2}}
+\def\unnumbsubsubsecentry#1#2#3#4#5#6{\dosubsubsecentry{#1}{#6}}
% This parameter controls the indentation of the various levels.
\newdimen\tocindent \tocindent = 3pc
@@ -3946,7 +4336,7 @@ width0pt\relax} \fi
\def\tocentry#1#2{\begingroup
\vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks
% Do not use \turnoffactive in these arguments. Since the toc is
- % typeset in cmr, so characters such as _ would come out wrong; we
+ % typeset in cmr, characters such as _ would come out wrong; we
% have to do the usual translation tricks.
\entry{#1}{#2}%
\endgroup}
@@ -3966,36 +4356,27 @@ width0pt\relax} \fi
\message{environments,}
% @foo ... @end foo.
+% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
+%
% Since these characters are used in examples, it should be an even number of
% \tt widths. Each \tt character is 1en, so two makes it 1em.
-% Furthermore, these definitions must come after we define our fonts.
-\newbox\dblarrowbox \newbox\longdblarrowbox
-\newbox\pushcharbox \newbox\bullbox
-\newbox\equivbox \newbox\errorbox
-
-%{\tentt
-%\global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil}
-%\global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil}
-%\global\setbox\pushcharbox = \hbox to 1em{\hfil$\dashv$\hfil}
-%\global\setbox\equivbox = \hbox to 1em{\hfil$\ptexequiv$\hfil}
-% Adapted from the manmac format (p.420 of TeXbook)
-%\global\setbox\bullbox = \hbox to 1em{\kern.15em\vrule height .75ex width .85ex
-% depth .1ex\hfil}
-%}
-
-% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
+%
\def\point{$\star$}
\def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
\def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}}
\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
\def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}}
+% 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.
\advance\hsize by -2\dimen2 % Rules.
@@ -4006,8 +4387,7 @@ width0pt\relax} \fi
\kern3pt\vrule width\dimen2}% Space to right.
\hrule height\dimen2}
\hfil}
-
-% The @error{} command.
+%
\def\error{\leavevmode\lower.7ex\copy\errorbox}
% @tex ... @end tex escapes into raw Tex temporarily.
@@ -4017,14 +4397,14 @@ width0pt\relax} \fi
\def\tex{\begingroup
\catcode `\\=0 \catcode `\{=1 \catcode `\}=2
\catcode `\$=3 \catcode `\&=4 \catcode `\#=6
- \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie
+ \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie
\catcode `\%=14
- \catcode 43=12 % plus
- \catcode`\"=12
- \catcode`\==12
- \catcode`\|=12
- \catcode`\<=12
- \catcode`\>=12
+ \catcode `\+=\other
+ \catcode `\"=\other
+ \catcode `\==\other
+ \catcode `\|=\other
+ \catcode `\<=\other
+ \catcode `\>=\other
\escapechar=`\\
%
\let\b=\ptexb
@@ -4047,9 +4427,9 @@ width0pt\relax} \fi
\def\@{@}%
\let\Etex=\endgroup}
-% Define @lisp ... @endlisp.
+% Define @lisp ... @end lisp.
% @lisp does a \begingroup so it can rebind things,
-% including the definition of @endlisp (which normally is erroneous).
+% including the definition of @end lisp (which normally is erroneous).
% Amount to narrow the margins by for @lisp.
\newskip\lispnarrowing \lispnarrowing=0.4in
@@ -4078,11 +4458,22 @@ width0pt\relax} \fi
% Make spacing and below environment symmetrical. We use \parskip here
% to help in doing that, since in @example-like environments \parskip
% is reset to zero; thus the \afterenvbreak inserts no space -- but the
-% start of the next paragraph will insert \parskip
-%
-\def\aboveenvbreak{{\advance\envskipamount by \parskip
-\endgraf \ifdim\lastskip<\envskipamount
-\removelastskip \penalty-50 \vskip\envskipamount \fi}}
+% 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
@@ -4110,7 +4501,8 @@ width0pt\relax} \fi
%
\newskip\lskip\newskip\rskip
-\long\def\cartouche{%
+\def\cartouche{%
+\par % can't be in the midst of a paragraph.
\begingroup
\lskip=\leftskip \rskip=\rightskip
\leftskip=0pt\rightskip=0pt %we want these *outside*.
@@ -4157,7 +4549,6 @@ width0pt\relax} \fi
\inENV % This group ends at the end of the body
\hfuzz = 12pt % Don't be fussy
\sepspaces % Make spaces be word-separators rather than space tokens.
- \singlespace
\let\par = \lisppar % don't ignore blank lines
\obeylines % each line of input is a line of output
\parskip = 0pt
@@ -4196,27 +4587,16 @@ width0pt\relax} \fi
% @example: Same as @lisp.
\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.
+% @smallexample and @smalllisp: use smaller fonts.
% Originally contributed by Pavel@xerox.
-\def\smalllispx{\begingroup
+\def\smalllisp{\begingroup
\def\Esmalllisp{\nonfillfinish\endgroup}%
\def\Esmallexample{\nonfillfinish\endgroup}%
- \smallfonts
+ \smallexamplefonts
\lisp
}
+\let\smallexample = \smalllisp
+
% @display: same as @lisp except keep current font.
%
@@ -4225,12 +4605,12 @@ width0pt\relax} \fi
\let\Edisplay = \nonfillfinish
\gobble
}
-
-% @smalldisplay (when @smallbook): @display plus smaller fonts.
%
-\def\smalldisplayx{\begingroup
+% @smalldisplay: @display plus smaller fonts.
+%
+\def\smalldisplay{\begingroup
\def\Esmalldisplay{\nonfillfinish\endgroup}%
- \smallfonts \rm
+ \smallexamplefonts \rm
\display
}
@@ -4242,12 +4622,12 @@ width0pt\relax} \fi
\let\Eformat = \nonfillfinish
\gobble
}
-
-% @smallformat (when @smallbook): @format plus smaller fonts.
%
-\def\smallformatx{\begingroup
+% @smallformat: @format plus smaller fonts.
+%
+\def\smallformat{\begingroup
\def\Esmallformat{\nonfillfinish\endgroup}%
- \smallfonts \rm
+ \smallexamplefonts \rm
\format
}
@@ -4265,13 +4645,13 @@ width0pt\relax} \fi
\gobble
}
+
% @quotation does normal linebreaking (hence we can't use \nonfillstart)
% and narrows the margins.
%
\def\quotation{%
\begingroup\inENV %This group ends at the end of the @quotation body
{\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
- \singlespace
\parindent=0pt
% We have retained a nonzero parskip for the environment, since we're
% doing normal filling. So to avoid extra space below the environment...
@@ -4287,23 +4667,257 @@ width0pt\relax} \fi
}
+% LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
+% If we want to allow any <char> 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'{'<char>#1<char>'}'{#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}
+\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.
+
+% We want ()&[] to print specially on the defun line.
+%
\def\activeparens{%
-\catcode`\(=\active \catcode`\)=\active \catcode`\&=\active
-\catcode`\[=\active \catcode`\]=\active}
+ \catcode`\(=\active \catcode`\)=\active
+ \catcode`\&=\active
+ \catcode`\[=\active \catcode`\]=\active
+}
% Make control sequences which act like normal parenthesis chars.
\let\lparen = ( \let\rparen = )
@@ -4350,88 +4964,124 @@ width0pt\relax} \fi
% Active &'s sneak into the index arguments, so make sure it's defined.
{
- \catcode`& = 13
+ \catcode`& = \active
\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}
+% \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 for consecutive fns (which we define).
-% #3 is the control sequence to call to resume processing.
+% #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 {\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}}}
+\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 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.
+% #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 {\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}}}
+\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
% extra argument at the beginning which is the `category', instead of it
@@ -4440,64 +5090,48 @@ width0pt\relax} \fi
% input at hand. Thus also need a control sequence (passed as #5) for
% 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}}}
+\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{\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
+\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}}%
}
@@ -4512,6 +5146,8 @@ width0pt\relax} \fi
%
\def\deftpparsebody #1#2#3#4 {%
\parsebodycommon{#1}{#2}{#3}%
+ \def#2##1 {\defxbodycommon \spacesplit{#3{##1}}}%
+ \begingroup\obeylines
\spacesplit{\parsetpheaderline{#3{#4}}}\empty
}
@@ -4528,38 +5164,37 @@ width0pt\relax} \fi
#1{\removeemptybraces#2\relax}{#3}%
}%
-\def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV %
-\medbreak %
-% Define the end token that this defining construct specifies
-% so that it will exit this group.
-\def#1{\endgraf\endgroup\medbreak}%
-\def#2##1 ##2 {\def#4{##1}%
-\begingroup\obeylines\spacesplit{#3{##2}}}%
-\parindent=0in
-\advance\leftskip by \defbodyindent
-\exdentamount=\defbodyindent
-\begingroup\obeylines\spacesplit{#3{#5}}}
-
-% Split up #2 at the first space token.
+% 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,
% the second is all of #2 after that space token.
% If #2 contains no space token, all of it is passed as the first arg
% and the second is passed as empty.
-
-{\obeylines
-\gdef\spacesplit#1#2^^M{\endgroup\spacesplitfoo{#1}#2 \relax\spacesplitfoo}%
-\long\gdef\spacesplitfoo#1#2 #3#4\spacesplitfoo{%
-\ifx\relax #3%
-#1{#2}{}\else #1{#2}{#3#4}\fi}}
-
-% So much for the things common to all kinds of definitions.
+%
+{\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.
-% First, define the processing that is wanted for arguments of \defun
-% Use this to expand the args and terminate the paragraph they make up
+% 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.
% Note that groups don't affect changes in \hyphenchar.
@@ -4568,9 +5203,7 @@ width0pt\relax} \fi
#1%
{\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
+ \defargscommonending
}
\def\deftypefunargs #1{%
@@ -4579,9 +5212,7 @@ width0pt\relax} \fi
% Use \boldbraxnoamp, not \functionparens, so that & is not special.
\boldbraxnoamp
\tclose{#1}% avoid \code because of side effects on active chars
-\interlinepenalty=10000
-\advance\rightskip by 0pt plus 1fil
-\endgraf\nobreak\vskip -\parskip\nobreak
+ \defargscommonending
}
% Do complete processing of one @defun or @defunx line already parsed.
@@ -4592,7 +5223,7 @@ width0pt\relax} \fi
\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
+\catcode\equalChar=\other % Turn off change made in \defparsebody
}
% @defun == @deffn Function
@@ -4602,7 +5233,7 @@ width0pt\relax} \fi
\def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
\begingroup\defname {#1}{\putwordDeffunc}%
\defunargs {#2}\endgroup %
-\catcode 61=\other % Turn off change made in \defparsebody
+\catcode\equalChar=\other % Turn off change made in \defparsebody
}
% @deftypefun int foobar (int @var{foo}, float @var{bar})
@@ -4614,18 +5245,18 @@ width0pt\relax} \fi
% #1 is the data type, #2 the name, #3 the args.
\def\deftypefunheaderx #1#2 #3\relax{%
\doind {fn}{\code{#2}}% Make entry in function index
-\begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypefun}%
+\begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypefun}%
\deftypefunargs {#3}\endgroup %
-\catcode 61=\other % Turn off change made in \defparsebody
+\catcode\equalChar=\other % Turn off change made in \defparsebody
}
% @deftypefn {Library Function} int foobar (int @var{foo}, float @var{bar})
\def\deftypefn{\defmethparsebody\Edeftypefn\deftypefnx\deftypefnheader}
-% \defheaderxcond#1\relax$$$
+% \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}
+\def\defheaderxcond#1#2$.${\ifx#1\relax\else\code{#1#2} \fi}
% #1 is the classification. #2 is the data type. #3 is the name and args.
\def\deftypefnheader #1#2#3{\deftypefnheaderx{#1}{#2}#3 \relax}
@@ -4635,9 +5266,9 @@ width0pt\relax} \fi
\begingroup
\normalparens % notably, turn off `&' magic, which prevents
% at least some C++ text from working
-\defname {\defheaderxcond#2\relax$$$#3}{#1}%
+\defname {\defheaderxcond#2\relax$.$#3}{#1}%
\deftypefunargs {#4}\endgroup %
-\catcode 61=\other % Turn off change made in \defparsebody
+\catcode\equalChar=\other % Turn off change made in \defparsebody
}
% @defmac == @deffn Macro
@@ -4647,7 +5278,7 @@ width0pt\relax} \fi
\def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
\begingroup\defname {#1}{\putwordDefmac}%
\defunargs {#2}\endgroup %
-\catcode 61=\other % Turn off change made in \defparsebody
+\catcode\equalChar=\other % Turn off change made in \defparsebody
}
% @defspec == @deffn Special Form
@@ -4657,7 +5288,7 @@ width0pt\relax} \fi
\def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
\begingroup\defname {#1}{\putwordDefspec}%
\defunargs {#2}\endgroup %
-\catcode 61=\other % Turn off change made in \defparsebody
+\catcode\equalChar=\other % Turn off change made in \defparsebody
}
% @defop CATEGORY CLASS OPERATION ARG...
@@ -4666,9 +5297,11 @@ width0pt\relax} \fi
\defopparsebody\Edefop\defopx\defopheader\defoptype}
%
\def\defopheader#1#2#3{%
-\dosubind {fn}{\code{#2}}{\putwordon\ #1}% Make entry in function index
-\begingroup\defname {#2}{\defoptype\ \putwordon\ #1}%
-\defunargs {#3}\endgroup %
+ \dosubind{fn}{\code{#2}}{\putwordon\ \code{#1}}% function index entry
+ \begingroup
+ \defname{#2}{\defoptype\ \putwordon\ #1}%
+ \defunargs{#3}%
+ \endgroup
}
% @deftypeop CATEGORY CLASS TYPE OPERATION ARG...
@@ -4681,7 +5314,7 @@ width0pt\relax} \fi
\def\deftypeopheader#1#2#3#4{%
\dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index
\begingroup
- \defname{\defheaderxcond#2\relax$$$#3}
+ \defname{\defheaderxcond#2\relax$.$#3}
{\deftypeopcategory\ \putwordon\ \code{#1}}%
\deftypefunargs{#4}%
\endgroup
@@ -4696,7 +5329,7 @@ width0pt\relax} \fi
\def\deftypemethodheader#1#2#3#4{%
\dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index
\begingroup
- \defname{\defheaderxcond#2\relax$$$#3}{\putwordMethodon\ \code{#1}}%
+ \defname{\defheaderxcond#2\relax$.$#3}{\putwordMethodon\ \code{#1}}%
\deftypefunargs{#4}%
\endgroup
}
@@ -4710,7 +5343,8 @@ width0pt\relax} \fi
\def\deftypeivarheader#1#2#3{%
\dosubind{vr}{\code{#3}}{\putwordof\ \code{#1}}% entry in variable index
\begingroup
- \defname{#3}{\putwordInstanceVariableof\ \code{#1}}%
+ \defname{\defheaderxcond#2\relax$.$#3}
+ {\putwordInstanceVariableof\ \code{#1}}%
\defvarargs{#3}%
\endgroup
}
@@ -4734,9 +5368,11 @@ width0pt\relax} \fi
\defopvarparsebody\Edefcv\defcvx\defcvarheader\defcvtype}
\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 %
+ \dosubind{vr}{\code{#2}}{\putwordof\ \code{#1}}% variable index entry
+ \begingroup
+ \defname{#2}{\defcvtype\ \putwordof\ #1}%
+ \defvarargs{#3}%
+ \endgroup
}
% @defivar CLASS VARNAME == @defcv {Instance Variable} CLASS VARNAME
@@ -4744,7 +5380,7 @@ width0pt\relax} \fi
\def\defivar{\defvrparsebody\Edefivar\defivarx\defivarheader}
%
\def\defivarheader#1#2#3{%
- \dosubind {vr}{\code{#2}}{\putwordof\ #1}% entry in var index
+ \dosubind{vr}{\code{#2}}{\putwordof\ \code{#1}}% entry in var index
\begingroup
\defname{#2}{\putwordInstanceVariableof\ #1}%
\defvarargs{#3}%
@@ -4756,8 +5392,8 @@ width0pt\relax} \fi
% This is actually simple: just print them in roman.
% This must expand the args and terminate the paragraph they make up
\def\defvarargs #1{\normalparens #1%
-\interlinepenalty=10000
-\endgraf\nobreak\vskip -\parskip\nobreak}
+ \defargscommonending
+}
% @defvr Counter foo-count
@@ -4792,9 +5428,8 @@ width0pt\relax} \fi
% is actually part of the data type, which should not be put into the index.
\def\deftypevarheader #1#2{%
\dovarind#2 \relax% Make entry in variables index
-\begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypevar}%
-\interlinepenalty=10000
-\endgraf\nobreak\vskip -\parskip\nobreak
+\begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypevar}%
+ \defargscommonending
\endgroup}
\def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}}
@@ -4803,9 +5438,8 @@ width0pt\relax} \fi
\def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader}
\def\deftypevrheader #1#2#3{\dovarind#3 \relax%
-\begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1}
-\interlinepenalty=10000
-\endgraf\nobreak\vskip -\parskip\nobreak
+\begingroup\defname {\defheaderxcond#2\relax$.$#3}{#1}
+ \defargscommonending
\endgroup}
% Now define @deftp
@@ -4854,7 +5488,7 @@ width0pt\relax} \fi
\def\scanmacro#1{%
\begingroup \newlinechar`\^^M
% Undo catcode changes of \startcontents and \doprintindex
- \catcode`\@=0 \catcode`\\=12 \escapechar=`\@
+ \catcode`\@=0 \catcode`\\=\other \escapechar=`\@
% Append \endinput to make sure that TeX does not see the ending newline.
\toks0={#1\endinput}%
\immediate\openout\macscribble=\jobname.tmp
@@ -4868,7 +5502,7 @@ width0pt\relax} \fi
\def\scanmacro#1{%
\begingroup \newlinechar`\^^M
% Undo catcode changes of \startcontents and \doprintindex
-\catcode`\@=0 \catcode`\\=12 \escapechar=`\@
+\catcode`\@=0 \catcode`\\=\other \escapechar=`\@
\let\xeatspaces\eatspaces\scantokens{#1\endinput}\endgroup}
\fi
@@ -4898,7 +5532,7 @@ width0pt\relax} \fi
}
% Trim a single trailing ^^M off a string.
-{\catcode`\^^M=12\catcode`\Q=3%
+{\catcode`\^^M=\other \catcode`\Q=3%
\gdef\eatcr #1{\eatcra #1Q^^MQ}%
\gdef\eatcra#1^^MQ{\eatcrb#1Q}%
\gdef\eatcrb#1Q#2Q{#1}%
@@ -4913,29 +5547,29 @@ width0pt\relax} \fi
% body, and then making it the \newlinechar in \scanmacro.
\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
+ \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`\~=12
- \catcode`\^=12
- \catcode`\_=12
- \catcode`\|=12
- \catcode`\<=12
- \catcode`\>=12
- \catcode`\+=12
- \catcode`\@=12
- \catcode`\\=12}
+ \catcode`\~=\other
+ \catcode`\^=\other
+ \catcode`\_=\other
+ \catcode`\|=\other
+ \catcode`\<=\other
+ \catcode`\>=\other
+ \catcode`\+=\other
+ \catcode`\@=\other
+ \catcode`\\=\other}
% \mbodybackslash is the definition of \ in @macro bodies.
% It maps \foo\ => \csname macarg.foo\endcsname => #N
@@ -4963,7 +5597,7 @@ width0pt\relax} \fi
\message{Warning: redefining \the\macname}%
\else
\expandafter\ifx\csname \the\macname\endcsname \relax
- \else \errmessage{The name \the\macname\space is reserved}\fi
+ \else \errmessage{Macro name \the\macname\space already defined}\fi
\global\cslet{macsave.\the\macname}{\the\macname}%
\global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
% Add the macroname to \macrolist
@@ -4976,32 +5610,33 @@ width0pt\relax} \fi
\else \expandafter\parsemacbody
\fi}
-\def\unmacro{\parsearg\unmacroxxx}
-\def\unmacroxxx#1{%
+\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
+ % 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
+ \expandafter\let\csname#1\endcsname \relax
+ \let\do\unmacrodo
+ \xdef\macrolist{\macrolist}%
\endgroup
\else
\errmessage{Macro #1 not defined}%
\fi
}
+% Called by \do from \dounmacro on each macro. The idea is to omit any
+% macro definitions that have been changed to \relax.
+%
+\def\unmacrodo#1{%
+ \ifx#1\relax
+ % remove this
+ \else
+ \noexpand\do \noexpand #1%
+ \fi
+}
+
% This makes use of the obscure feature that if the last token of a
% <parameter list> is #, then the preceding argument is delimited by
% an opening brace, and that opening brace is not consumed.
@@ -5184,15 +5819,23 @@ width0pt\relax} \fi
\gdef\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi}
\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.
+% \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{{%
- \indexdummies
+ \atdummies
\pdfmkdest{#1}%
+ %
+ \turnoffactive
\dosetq{#1-title}{Ytitle}%
\dosetq{#1-pg}{Ypagenumber}%
\dosetq{#1-snt}{#2}%
@@ -5244,13 +5887,15 @@ width0pt\relax} \fi
\ifpdf
\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
+ {\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
%
@@ -5262,7 +5907,7 @@ width0pt\relax} \fi
% into the usual \leavevmode...\vrule stuff for purposes of
% printing. So we \turnoffactive for the \refx-snt, back on for the
% printing, back off for the \refx-pg.
- {\normalturnoffactive
+ {\turnoffactive \otherbackslash
% Only output a following space if the -snt ref is nonempty; for
% @unnumbered and @anchor, it won't be.
\setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
@@ -5271,73 +5916,74 @@ width0pt\relax} \fi
% [mynode],
[\printednodename],\space
% page 3
- \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
+ \turnoffactive \otherbackslash \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 \.)
+% \dosetq is called from \setref to do the actual \write (\iflinks).
+%
\def\dosetq#1#2{%
{\let\folio=0%
- \normalturnoffactive
\edef\next{\write\auxfile{\internalsetq{#1}{#2}}}%
- \iflinks
- \next
- \fi
+ \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
+% \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\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 }
+ \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\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}
+ \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
% messages, but if we're using an old version of TeX, don't do anything.
%
\ifx\inputlineno\thisisundefined
- \let\linenumber = \empty % Non-3.0.
+ \let\linenumber = \empty % Pre-3.0.
\else
\def\linenumber{\the\inputlineno:\space}
\fi
% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
% If its value is nonempty, SUFFIX is output afterward.
-
+%
\def\refx#1#2{%
- \expandafter\ifx\csname X#1\endcsname\relax
+ {%
+ \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
\iflinks
@@ -5352,19 +5998,14 @@ width0pt\relax} \fi
\fi
\else
% It's defined, so just use it.
- \csname X#1\endcsname
+ \thisrefX
\fi
#2% Output the suffix in any case.
}
% This is the macro invoked by entries in the aux file.
%
-\def\xrdef#1{\begingroup
- % Reenable \ as an escape while reading the second argument.
- \catcode`\\ = 0
- \afterassignment\endgroup
- \expandafter\gdef\csname X#1\endcsname
-}
+\def\xrdef#1{\expandafter\gdef\csname X#1\endcsname}
% Read the last existing aux file, if any. No error if none exists.
\def\readauxfile{\begingroup
@@ -5395,9 +6036,7 @@ width0pt\relax} \fi
\catcode`\^^]=\other
\catcode`\^^^=\other
\catcode`\^^_=\other
- \catcode`\@=\other
- \catcode`\^=\other
- % It was suggested to define this as 7, which would allow ^^e4 etc.
+ % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc.
% in xref tags, i.e., node names. But since ^^e4 notation isn't
% supported in the main text, it doesn't seem desirable. Furthermore,
% that is not enough: for node names that actually contain a ^
@@ -5410,6 +6049,9 @@ width0pt\relax} \fi
% \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter
% and then to call \auxhat in \setq.
%
+ \catcode`\^=\other
+ %
+ % Special characters. Should be turned off anyway, but...
\catcode`\~=\other
\catcode`\[=\other
\catcode`\]=\other
@@ -5421,7 +6063,9 @@ width0pt\relax} \fi
\catcode`\$=\other
\catcode`\#=\other
\catcode`\&=\other
+ \catcode`\%=\other
\catcode`+=\other % avoid \+ for paranoia even though we've turned it off
+ %
% Make the characters 128-255 be printing characters
{%
\count 1=128
@@ -5431,17 +6075,18 @@ width0pt\relax} \fi
\ifnum \count 1<256 \loop \fi
}%
}%
- % The aux file uses ' as the escape (for now).
+ %
% Turn off \ as an escape so we do not lose on
% entries which were dumped with control sequences in their names.
- % For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^
+ % 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`\%=\other
- \catcode`\'=0
- \catcode`\\=\other
+ \catcode`\@=0
%
\openin 1 \jobname.aux
\ifeof 1 \else
@@ -5486,7 +6131,7 @@ width0pt\relax} \fi
% Remove inadvertent blank space before typesetting the footnote number.
\unskip
\thisfootno\@sf
- \footnotezzz
+ \dofootnote
}%
% Don't bother with the trickery in plain.tex to not require the
@@ -5496,10 +6141,17 @@ width0pt\relax} \fi
% \parseargline fail inside footnotes because the tokens are fixed when
% the footnote is read. --karl, 16nov96.
%
-\long\gdef\footnotezzz{\insert\footins\bgroup
+% 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
\splitmaxdepth\dp\strutbox
@@ -5512,8 +6164,15 @@ width0pt\relax} \fi
%
\smallfonts \rm
%
- % Hang the footnote text off the number.
- \hang
+ % Because we use hanging indentation in footnotes, a @noindent appears
+ % to exdent this text, so make it be a no-op. makeinfo does not use
+ % hanging indentation so @noindent can still be needed within footnote
+ % text after an @example or the like (not that this is good style).
+ \let\noindent = \relax
+ %
+ % Hang the footnote text off the number. Use \everypar in case the
+ % footnote extends for more than one paragraph.
+ \everypar = {\hang}%
\textindent{\thisfootno}%
%
% Don't crash into the line above the footnote text. Since this
@@ -5522,32 +6181,8 @@ width0pt\relax} \fi
\footstrut
\futurelet\next\fo@t
}
-\def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t
- \else\let\next\f@t\fi \next}
-\def\f@@t{\bgroup\aftergroup\@foot\let\next}
-\def\f@t#1{#1\@foot}
-\def\@foot{\strut\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
% change spans more than two lines of output. To handle that, we would
@@ -5592,8 +6227,8 @@ width0pt\relax} \fi
\openin 1 = epsf.tex
\ifeof 1 \else
\closein 1
- % Do not bother showing banner with post-v2.7 epsf.tex (available in
- % doc/epsf.tex until it shows up on ctan).
+ % Do not bother showing banner with epsf.tex v2.7k (available in
+ % doc/epsf.tex and on ctan).
\def\epsfannounce{\toks0 = }%
\input epsf.tex
\fi
@@ -5612,40 +6247,44 @@ width0pt\relax} \fi
\global\warnednoepsftrue
\fi
\else
- \imagexxx #1,,,\finish
+ \imagexxx #1,,,,,\finish
\fi
}
%
% Arguments to @image:
% #1 is (mandatory) image filename; we tack on .eps extension.
% #2 is (optional) width, #3 is (optional) height.
-% #4 is just the usual extra ignored arg for parsing this stuff.
-\def\imagexxx#1,#2,#3,#4\finish{%
+% #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
- \centerline{\dopdfimage{#1}{#2}{#3}}%
+ \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
+ \epsfbox{#1.eps}%
\fi
-}
+ %
+ \ifimagevmode \hss \egroup \bigbreak \fi % space after the image
+\endgroup}
\message{localization,}
@@ -5714,10 +6353,13 @@ should work if nowhere else does.}
}
% 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.
+% 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{%
+\def\internalpagesizes#1#2#3#4#5#6#7#8{%
\voffset = #3\relax
\topskip = #6\relax
\splittopskip = \topskip
@@ -5736,6 +6378,13 @@ should work if nowhere else does.}
\normaloffset = #4\relax
\bindingoffset = #5\relax
%
+ \ifpdf
+ \pdfpageheight #7\relax
+ \pdfpagewidth #8\relax
+ \fi
+ %
+ \setleading{\textleading}
+ %
\parindent = \defaultparindent
\setemergencystretch
}
@@ -5743,61 +6392,99 @@ should work if nowhere else does.}
% @letterpaper (the default).
\def\letterpaper{{\globaldefs = 1
\parskip = 3pt plus 2pt minus 1pt
- \setleading{13.2pt}%
+ \textleading = 13.2pt
%
% If page is nothing but text, make it come out even.
- \internalpagesizes{46\baselineskip}{6in}{\voffset}{.25in}{\bindingoffset}{36pt}%
+ \internalpagesizes{46\baselineskip}{6in}%
+ {\voffset}{.25in}%
+ {\bindingoffset}{36pt}%
+ {11in}{8.5in}%
}}
% Use @smallbook to reset parameters for 7x9.5 (or so) format.
\def\smallbook{{\globaldefs = 1
\parskip = 2pt plus 1pt
- \setleading{12pt}%
+ \textleading = 12pt
%
- \internalpagesizes{7.5in}{5.in}{\voffset}{.25in}{\bindingoffset}{16pt}%
+ \internalpagesizes{7.5in}{5in}%
+ {\voffset}{.25in}%
+ {\bindingoffset}{16pt}%
+ {9.25in}{7in}%
%
\lispnarrowing = 0.3in
\tolerance = 700
\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
+ \textleading = 13.2pt
%
- \internalpagesizes{53\baselineskip}{160mm}{\voffset}{4mm}{\bindingoffset}{44pt}%
+ % 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
}}
-% 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}%
+% 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}{3.6mm}{3.6mm}{3mm}{7mm}%
+ \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 European A4 paper in wide format.
-\def\afourwide{%
+% Use @afourwide to print on A4 paper in landscape format.
+\def\afourwide{{\globaldefs = 1
\afourpaper
- \internalpagesizes{9.5in}{6.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}%
- %
+ \internalpagesizes{241mm}{165mm}%
+ {\voffset}{-2.95mm}%
+ {\bindingoffset}{7mm}%
+ {297mm}{210mm}%
\globaldefs = 0
-}
+}}
% @pagesizes TEXTHEIGHT[,TEXTWIDTH]
% Perhaps we should allow setting the margins, \topskip, \parskip,
@@ -5810,9 +6497,18 @@ should work if nowhere else does.}
\globaldefs = 1
%
\parskip = 3pt plus 2pt minus 1pt
- \setleading{13.2pt}%
+ \setleading{\textleading}%
+ %
+ \dimen0 = #1
+ \advance\dimen0 by \voffset
%
- \internalpagesizes{#1}{\hsize}{\voffset}{\normaloffset}{\bindingoffset}{44pt}%
+ \dimen2 = \hsize
+ \advance\dimen2 by \normaloffset
+ %
+ \internalpagesizes{#1}{\hsize}%
+ {\voffset}{\normaloffset}%
+ {\bindingoffset}{44pt}%
+ {\dimen0}{\dimen2}%
}}
% Set default to letter.
@@ -5840,7 +6536,7 @@ should work if nowhere else does.}
\def\normalless{<}
\def\normalgreater{>}
\def\normalplus{+}
-\def\normaldollar{$}
+\def\normaldollar{$}%$ font-lock fix
% This macro is used to make a character print one way in ttfont
% where it can probably just be output, and another way in other fonts,
@@ -5876,7 +6572,7 @@ should work if nowhere else does.}
\catcode`\_=\active
\def_{\ifusingtt\normalunderscore\_}
% Subroutine for the previous macro.
-\def\_{\leavevmode \kern.06em \vbox{\hrule width.3em height.1ex}}
+\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }
\catcode`\|=\active
\def|{{\tt\char124}}
@@ -5889,9 +6585,7 @@ should work if nowhere else does.}
\catcode`\+=\active
\def+{{\tt \char 43}}
\catcode`\$=\active
-\def${\ifusingit{{\sl\$}}\normaldollar}
-%\catcode 27=\active
-%\def^^[{$\diamondsuit$}
+\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
% Set up an active definition for =, but don't enable it most of the time.
{\catcode`\==\active
@@ -5908,44 +6602,46 @@ should work if nowhere else does.}
\catcode`\@=0
-% \rawbackslashxx output one backslash character in current font
+% \rawbackslashxx outputs one backslash character in current font,
+% as in \char`\\.
\global\chardef\rawbackslashxx=`\\
-%{\catcode`\\=\other
-%@gdef@rawbackslashxx{\}}
-% \rawbackslash redefines \ as input to do \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@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 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}
+@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.
% This is canceled by @fixbackslash.
diff --git a/doc/version.texi b/doc/version.texi
new file mode 100644
index 00000000..0ca20b11
--- /dev/null
+++ b/doc/version.texi
@@ -0,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 --git a/error.c b/error.c
index 837a3e2b..edb0e2e9 100644
--- a/error.c
+++ b/error.c
@@ -1,5 +1,5 @@
/* error.c -- Functions for handling errors. */
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -40,11 +40,10 @@ extern int errno;
#endif /* !errno */
#include "bashansi.h"
+#include "bashintl.h"
+
+#include "shell.h"
#include "flags.h"
-#include "error.h"
-#include "command.h"
-#include "general.h"
-#include "externs.h"
#include "input.h"
#if defined (HISTORY)
@@ -61,6 +60,10 @@ extern pid_t shell_pgrp;
extern int give_terminal_to __P((pid_t, int));
#endif /* JOB_CONTROL */
+#if defined (ARRAY_VARS)
+extern char *bash_badsub_errmsg;
+#endif
+
static void error_prolog __P((int));
/* The current maintainer of the shell. You change this in the
@@ -71,20 +74,22 @@ static void error_prolog __P((int));
char *the_current_maintainer = MAINTAINER;
+int gnu_error_format = 0;
+
static void
error_prolog (print_lineno)
int print_lineno;
{
+ char *ename;
int line;
- fprintf (stderr, "%s: ", get_name_for_error ());
+ ename = get_name_for_error ();
+ line = (print_lineno && interactive_shell == 0) ? executing_line_number () : -1;
- if (print_lineno && interactive_shell == 0)
- {
- line = executing_line_number ();
- if (line > 0)
- fprintf (stderr, "line %d: ", line);
- }
+ if (line > 0)
+ fprintf (stderr, "%s:%s%d: ", ename, gnu_error_format ? "" : " line ", line);
+ else
+ fprintf (stderr, "%s: ", ename);
}
/* Return the name of the shell or the shell script for error reporting. */
@@ -92,10 +97,23 @@ char *
get_name_for_error ()
{
char *name;
+#if defined (ARRAY_VARS)
+ SHELL_VAR *bash_source_v;
+ ARRAY *bash_source_a;
+#endif
name = (char *)NULL;
if (interactive_shell == 0)
- name = dollar_vars[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);
if (name == 0)
@@ -144,7 +162,7 @@ programming_error (format, va_alist)
if (remember_on_history)
{
h = last_history_line ();
- fprintf (stderr, "last command: %s\n", h ? h : "(null)");
+ fprintf (stderr, _("last command: %s\n"), h ? h : "(null)");
}
#endif
@@ -152,7 +170,7 @@ programming_error (format, va_alist)
fprintf (stderr, "Report this to %s\n", the_current_maintainer);
#endif
- fprintf (stderr, "Stopping myself...");
+ fprintf (stderr, _("Aborting..."));
fflush (stderr);
abort ();
@@ -182,7 +200,7 @@ report_error (format, va_alist)
va_end (args);
if (exit_immediately_on_error)
- sh_exit (1);
+ exit_shell (1);
}
void
@@ -239,7 +257,7 @@ internal_warning (format, va_alist)
{
va_list args;
- fprintf (stderr, "%s: warning: ", get_name_for_error ());
+ fprintf (stderr, _("%s: warning: "), get_name_for_error ());
SH_VA_START (args, format);
@@ -299,11 +317,11 @@ parser_error (lineno, format, va_alist)
if (interactive)
fprintf (stderr, "%s: ", ename);
else if (interactive_shell)
- fprintf (stderr, "%s: %s: line %d: ", ename, iname, lineno);
+ fprintf (stderr, "%s: %s:%s%d: ", ename, iname, gnu_error_format ? "" : " line ", lineno);
else if (STREQ (ename, iname))
- fprintf (stderr, "%s: line %d: ", ename, lineno);
+ fprintf (stderr, "%s:%s%d: ", ename, gnu_error_format ? "" : " line ", lineno);
else
- fprintf (stderr, "%s: %s: line %d: ", ename, iname, lineno);
+ fprintf (stderr, "%s: %s:%s%d: ", ename, iname, gnu_error_format ? "" : " line ", lineno);
SH_VA_START (args, format);
@@ -313,7 +331,7 @@ parser_error (lineno, format, va_alist)
va_end (args);
if (exit_immediately_on_error)
- sh_exit (2);
+ exit_shell (2);
}
#ifdef DEBUG
@@ -384,10 +402,10 @@ trace (format, va_alist)
static char *cmd_error_table[] = {
- "unknown command error", /* CMDERR_DEFAULT */
- "bad command type", /* CMDERR_BADTYPE */
- "bad connector", /* CMDERR_BADCONN */
- "bad jump", /* CMDERR_BADJUMP */
+ N_("unknown command error"), /* CMDERR_DEFAULT */
+ N_("bad command type"), /* CMDERR_BADTYPE */
+ N_("bad connector"), /* CMDERR_BADCONN */
+ N_("bad jump"), /* CMDERR_BADJUMP */
0
};
@@ -399,7 +417,7 @@ command_error (func, code, e, flags)
if (code > CMDERR_LAST)
code = CMDERR_DEFAULT;
- programming_error ("%s: %s: %d", func, cmd_error_table[code], e);
+ programming_error ("%s: %s: %d", func, _(cmd_error_table[code]), e);
}
char *
@@ -409,7 +427,7 @@ command_errstr (code)
if (code > CMDERR_LAST)
code = CMDERR_DEFAULT;
- return (cmd_error_table[code]);
+ return (_(cmd_error_table[code]));
}
#ifdef ARRAY_VARS
@@ -417,7 +435,7 @@ void
err_badarraysub (s)
const char *s;
{
- report_error ("%s: bad array subscript", s);
+ report_error ("%s: %s", s, _(bash_badsub_errmsg));
}
#endif
@@ -425,12 +443,12 @@ void
err_unboundvar (s)
const char *s;
{
- report_error ("%s: unbound variable", s);
+ report_error (_("%s: unbound variable"), s);
}
void
err_readonly (s)
const char *s;
{
- report_error ("%s: readonly variable", s);
+ report_error (_("%s: readonly variable"), s);
}
diff --git a/eval.c b/eval.c
index 9908f22d..cb4d85a0 100644
--- a/eval.c
+++ b/eval.c
@@ -30,6 +30,8 @@
#include "bashansi.h"
#include <stdio.h>
+#include "bashintl.h"
+
#include "shell.h"
#include "flags.h"
#include "trap.h"
@@ -88,6 +90,7 @@ reader_loop ()
{
/* Some kind of throw to top_level has occured. */
case FORCE_EOF:
+ case ERREXIT:
case EXITPROG:
current_command = (COMMAND *)NULL;
if (exit_immediately_on_error)
@@ -169,7 +172,8 @@ static sighandler
alrm_catcher(i)
int i;
{
- printf ("\007timed out waiting for input: auto-logout\n");
+ 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 --git a/examples/complete/bashcc-1.0.1.tar.gz b/examples/complete/bashcc-1.0.1.tar.gz
new file mode 100644
index 00000000..d6804358
--- /dev/null
+++ b/examples/complete/bashcc-1.0.1.tar.gz
Binary files differ
diff --git a/examples/functions/coproc.bash b/examples/functions/coproc.bash
index d9175a1c..61dc8d74 100644
--- a/examples/functions/coproc.bash
+++ b/examples/functions/coproc.bash
@@ -63,7 +63,7 @@ function coprocess ()
shift
local old_trap=$(trap -p SIGPIPE)
trap 'coprocess close -SIGPIPE' SIGPIPE
- if [ $# -eq 1 -a "$1" = "--stdin" ] ; then
+ if [ $# -eq 1 ] && [ "$1" = "--stdin" ] ; then
cat >&61
else
echo "$@" >&61
@@ -106,4 +106,3 @@ function coprocess ()
coprocess status
return $?
}
-
diff --git a/examples/functions/csh-compat b/examples/functions/csh-compat
index a855eaf5..b8dcf8f7 100644
--- a/examples/functions/csh-compat
+++ b/examples/functions/csh-compat
@@ -33,15 +33,16 @@ function alias ()
then
declare -f $1
else
- echo $2 | egrep -s '(\!|#)' 2>/dev/null
- if [ $? -eq 0 ]
- then
+ case $2 in
+ *[#\!]*)
comm=$(echo $2 | sed 's/\\!\*/\"$\@\"/g
s/\\!:\([1-9]\)/\"$\1\"/g
s/#/\\#/g')
- else
- comm="$2 \"\$@\""
- fi
+ ;;
+ *)
+ comm="$2 \"\$@\"" ;;
+ esac
+
eval function $1 \(\) "{" command "$comm" "; }"
fi
}
diff --git a/examples/functions/exitstat b/examples/functions/exitstat
index 2828a891..f49ebf58 100644
--- a/examples/functions/exitstat
+++ b/examples/functions/exitstat
@@ -8,7 +8,7 @@ function check_exit_status ()
local status="$?"
local signal=""
- if [ ${status} -ne 0 -a ${status} != 128 ]; then
+ if [ ${status} -ne 0 ] && [ ${status} != 128 ]; then
# If process exited by a signal, determine name of signal.
if [ ${status} -gt 128 ]; then
signal="$(builtin kill -l $((${status} - 128)) 2>/dev/null)"
diff --git a/examples/functions/getoptx.bash b/examples/functions/getoptx.bash
index 23e5de52..d402c7d7 100644
--- a/examples/functions/getoptx.bash
+++ b/examples/functions/getoptx.bash
@@ -134,7 +134,7 @@ function getoptex()
let OPTIND || OPTIND=1
[ $OPTIND -lt $# ] || return 1
shift $OPTIND
- if [ "$1" != "-" -a "$1" != "${1#-}" ]
+ if [ "$1" != "-" ] && [ "$1" != "${1#-}" ]
then OPTIND=$[OPTIND+1]; if [ "$1" != "--" ]
then
local o
@@ -299,4 +299,3 @@ function getopt()
#**************************************
#*** (end of getopt2) ***
-
diff --git a/examples/functions/kshenv b/examples/functions/kshenv
index 2b9a6ebb..7594f2d3 100644
--- a/examples/functions/kshenv
+++ b/examples/functions/kshenv
@@ -207,7 +207,7 @@ substring ()
;;
esac
# test for too few or too many arguments
- if [ x"$1" = x -o $# -gt 2 ]; then
+ if [ x"$1" = x ] || [ $# -gt 2 ]; then
print -u2 'substring: bad argument count'
return 1
fi
diff --git a/examples/functions/manpage b/examples/functions/manpage
index 224643e4..60f9aed0 100644
--- a/examples/functions/manpage
+++ b/examples/functions/manpage
@@ -70,7 +70,7 @@ function whatis ()
function apropos ()
{
- whatis_internal "$1" "fgrep"
+ whatis_internal "$1" "grep -F"
}
# Note: "-" and "-t" together not supported. This man could be
@@ -102,7 +102,7 @@ function man ()
g="grep -w"
a=$(basename "$2")
else
- g=fgrep
+ g="grep -F"
a="$2"
fi
whatis_internal "$a" "$g"
diff --git a/examples/functions/recurse b/examples/functions/recurse
index 14c4b9e3..f69cd503 100644
--- a/examples/functions/recurse
+++ b/examples/functions/recurse
@@ -44,15 +44,15 @@ function recurse
if cd "$1" ; then
for file in $2; do
- if [ -f "$file" -o -d "$file" ]; then
+ if [ -f "$file" ] || [ -d "$file" ]; then
eval "$3"
fi
done
for file in .* * ; do
- if [ "$file" = "." -o "$file" = ".." ] ; then
+ if [ "$file" = "." ] || [ "$file" = ".." ] ; then
continue
fi
- if [ -d "$file" -a ! -L "$file" ]; then
+ if [ -d "$file" ] && [ ! -L "$file" ]; then
recurse "$file" "$2" "$3" "$path"
fi
done
@@ -61,4 +61,3 @@ function recurse
}
recurse "$1" "$2" 'echo "$path$file"'
-
diff --git a/examples/functions/substr b/examples/functions/substr
index c5576779..a80b3b46 100644
--- a/examples/functions/substr
+++ b/examples/functions/substr
@@ -30,7 +30,7 @@ substr()
;;
esac
- if [ "$#" -eq 0 -o "$#" -gt 2 ] ; then
+ if [ "$#" -eq 0 ] || [ "$#" -gt 2 ] ; then
echo "substr: bad argument count"
return 2
fi
diff --git a/examples/functions/substr2 b/examples/functions/substr2
index f5e75473..2bb8d363 100644
--- a/examples/functions/substr2
+++ b/examples/functions/substr2
@@ -32,7 +32,7 @@ substr()
shift $[ $OPTIND -1 ]
fi
- if [ "$#" -eq 0 -o "$#" -gt 2 ] ; then
+ if [ "$#" -eq 0 ] || [ "$#" -gt 2 ] ; then
echo "substr: bad argument count"
return 2
fi
diff --git a/examples/functions/xalias.bash b/examples/functions/xalias.bash
index 29e8bfb7..88a00dc6 100644
--- a/examples/functions/xalias.bash
+++ b/examples/functions/xalias.bash
@@ -7,15 +7,16 @@ function xalias ()
then
declare -f $1
else
- echo $2 | egrep -q '(\!|#)'
- if [ $? -eq 0 ]
- then
+ case $2 in
+ *[#\!]*)
comm=$(echo $2 | sed 's/\\!\*/\"$\@\"/g
s/\\!:\([1-9]\)/\"$\1\"/g
s/#/\\#/g')
- else
- comm="$2 \"\$@\""
- fi
+ ;;
+ *)
+ comm="$2 \"\$@\"" ;;
+ esac
+
eval function $1 \(\) "{" command "$comm" "; }"
fi
}
diff --git a/examples/functions/xfind.bash b/examples/functions/xfind.bash
index 578e8838..6d290381 100644
--- a/examples/functions/xfind.bash
+++ b/examples/functions/xfind.bash
@@ -39,7 +39,7 @@ xfind()
# and directories that start with a period.
for x in * ; do
- if [ -d "$x" -a ! -L "$x" ] ; then
+ if [ -d "$x" ] && [ ! -L "$x" ] ; then
$FUNCNAME "$x" "$2" "$action"
fi
done
diff --git a/examples/loadables/Makefile.in b/examples/loadables/Makefile.in
index ed1721f5..356baef3 100644
--- a/examples/loadables/Makefile.in
+++ b/examples/loadables/Makefile.in
@@ -72,7 +72,7 @@ INC = -I. -I.. -I$(topdir) -I$(topdir)/lib -I$(topdir)/builtins \
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
+ uname sync push ln unlink cut realpath getconf strftime
OTHERPROG = necho hello cat
all: $(SHOBJ_STATUS)
@@ -172,6 +172,9 @@ cut: cut.o
realpath: realpath.o
$(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.
#
@@ -221,3 +224,4 @@ sync.o: sync.c
push.o: push.c
mkdir.o: mkdir.c
realpath.o: realpath.c
+strftime.o: strftime.c
diff --git a/examples/loadables/finfo.c b/examples/loadables/finfo.c
index b6336296..c1682eda 100644
--- a/examples/loadables/finfo.c
+++ b/examples/loadables/finfo.c
@@ -247,10 +247,17 @@ struct stat *st;
struct passwd *pw;
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("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);
printmode((int) st->st_mode);
diff --git a/examples/loadables/getconf.c b/examples/loadables/getconf.c
index 5d079b6f..cc6d50b3 100644
--- a/examples/loadables/getconf.c
+++ b/examples/loadables/getconf.c
@@ -78,7 +78,7 @@ extern int errno;
struct conf_variable
{
const char *name;
- enum { SYSCONF, CONFSTR, PATHCONF, CONSTANT, G_UNDEF } type;
+ enum { SYSCONF, CONFSTR, PATHCONF, CONSTANT, LLCONST, G_UNDEF } type;
long value;
};
@@ -94,6 +94,11 @@ static long sysconf __P((int));
static long pathconf __P((const char *, int));
#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[] =
{
/* POSIX.2 Configurable Variable Values */
@@ -169,6 +174,8 @@ static const struct conf_variable conf_table[] =
{ "POSIX_V6_ILP32_OFF32_CFLAGS", CONFSTR, _CS_POSIX_V6_ILP32_OFF32_CFLAGS },
{ "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
#if defined (_SC_POSIX_V6_ILP32_OFFBIG)
@@ -178,6 +185,8 @@ static const struct conf_variable conf_table[] =
{ "POSIX_V6_ILP32_OFFBIG_CFLAGS", CONFSTR, _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS },
{ "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
#if defined (_SC_POSIX_V6_LP64_OFF64)
@@ -187,6 +196,8 @@ static const struct conf_variable conf_table[] =
{ "POSIX_V6_LP64_OFF64_CFLAGS", CONFSTR, _CS_POSIX_V6_LP64_OFF64_CFLAGS },
{ "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
#if defined (_SC_POSIX_V6_LPBIG_OFFBIG)
@@ -196,9 +207,15 @@ static const struct conf_variable conf_table[] =
{ "POSIX_V6_LPBIG_OFFBIG_CFLAGS", CONFSTR, _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS },
{ "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
{ "POSIX2_BC_BASE_MAX", CONSTANT, _POSIX2_BC_BASE_MAX },
@@ -220,6 +237,11 @@ static const struct conf_variable conf_table[] =
#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
@@ -251,7 +273,83 @@ static const struct conf_variable conf_table[] =
# endif
#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 },
#else
@@ -260,13 +358,28 @@ static const struct conf_variable conf_table[] =
#ifdef _POSIX_CHILD_MAX
{ "_POSIX_CHILD_MAX", CONSTANT, _POSIX_CHILD_MAX },
#else
- { "_POSIX_CHILD_MAX", G_UNDEF, -1 },
+ { "_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
{ "_POSIX_LINK_MAX", CONSTANT, _POSIX_LINK_MAX },
#else
{ "_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 },
#else
@@ -277,6 +390,16 @@ static const struct conf_variable conf_table[] =
#else
{ "_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 },
#else
@@ -302,20 +425,129 @@ static const struct conf_variable conf_table[] =
#else
{ "_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 },
#else
{ "_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 },
#else
{ "_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 },
+ { "_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 <limits.h> */
+#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
/* POSIX.2/XPG 4.2 (and later) Symbolic Utility Limits */
@@ -361,55 +593,58 @@ static const struct conf_variable conf_table[] =
#ifdef NL_TEXTMAX
{ "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 },
#endif
/* POSIX.2 Optional Facility Configuration Values */
#ifdef _SC_2_C_BIND
- { "_POSIX2_C_BIND", SYSCONF, _SC_2_C_BIND },
+ { "POSIX2_C_BIND", SYSCONF, _SC_2_C_BIND },
#else
- { "_POSIX2_C_BIND", G_UNDEF, -1 },
+ { "POSIX2_C_BIND", G_UNDEF, -1 },
#endif
#ifdef _SC_2_C_DEV
- { "_POSIX2_C_DEV", SYSCONF, _SC_2_C_DEV },
+ { "POSIX2_C_DEV", SYSCONF, _SC_2_C_DEV },
#else
- { "_POSIX2_C_DEV", G_UNDEF, -1 },
+ { "POSIX2_C_DEV", G_UNDEF, -1 },
#endif
#if defined (_SC_2_C_VERSION)
- { "_POSIX2_C_VERSION", SYSCONF, _SC_2_C_VERSION },
+ { "POSIX2_C_VERSION", SYSCONF, _SC_2_C_VERSION },
#else
- { "_POSIX2_C_VERSION", G_UNDEF, -1 },
+ { "POSIX2_C_VERSION", G_UNDEF, -1 },
#endif
#if defined (_SC_2_CHAR_TERM)
- { "_POSIX2_CHAR_TERM", SYSCONF, _SC_2_CHAR_TERM },
+ { "POSIX2_CHAR_TERM", SYSCONF, _SC_2_CHAR_TERM },
#else
- { "_POSIX2_CHAR_TERM", G_UNDEF, -1 },
+ { "POSIX2_CHAR_TERM", G_UNDEF, -1 },
#endif
#ifdef _SC_2_FORT_DEV
- { "_POSIX2_FORT_DEV", SYSCONF, _SC_2_FORT_DEV },
+ { "POSIX2_FORT_DEV", SYSCONF, _SC_2_FORT_DEV },
#else
- { "_POSIX2_FORT_DEV", G_UNDEF, -1 },
+ { "POSIX2_FORT_DEV", G_UNDEF, -1 },
#endif
#ifdef _SC_2_FORT_RUN
- { "_POSIX2_FORT_RUN", SYSCONF, _SC_2_FORT_RUN },
+ { "POSIX2_FORT_RUN", SYSCONF, _SC_2_FORT_RUN },
#else
- { "_POSIX2_FORT_RUN", G_UNDEF, -1 },
+ { "POSIX2_FORT_RUN", G_UNDEF, -1 },
#endif
#ifdef _SC_2_LOCALEDEF
- { "_POSIX2_LOCALEDEF", SYSCONF, _SC_2_LOCALEDEF },
+ { "POSIX2_LOCALEDEF", SYSCONF, _SC_2_LOCALEDEF },
#else
- { "_POSIX2_LOCALEDEF", G_UNDEF, -1 },
+ { "POSIX2_LOCALEDEF", G_UNDEF, -1 },
#endif
#ifdef _SC_2_SW_DEV
- { "_POSIX2_SW_DEV", SYSCONF, _SC_2_SW_DEV },
+ { "POSIX2_SW_DEV", SYSCONF, _SC_2_SW_DEV },
#else
- { "_POSIX2_SW_DEV", G_UNDEF, -1 },
+ { "POSIX2_SW_DEV", G_UNDEF, -1 },
#endif
#if defined (_SC2_UPE)
- { "_POSIX2_UPE", SYSCONF, _SC_2_UPE },
+ { "POSIX2_UPE", SYSCONF, _SC_2_UPE },
#else
- { "_POSIX2_UPE", G_UNDEF, -1 },
+ { "POSIX2_UPE", G_UNDEF, -1 },
#endif
#if !defined (_POSIX2_VERSION) && defined (_SC_2_VERSION)
{ "_POSIX2_VERSION", SYSCONF, _SC_2_VERSION },
@@ -418,13 +653,18 @@ static const struct conf_variable conf_table[] =
#endif
#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
#if defined (_SC_2_PBS)
{ "_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 },
{ "_POSIX2_PBS_TRACK", SYSCONF, _SC_2_PBS_TRACK },
@@ -517,6 +757,9 @@ static const struct conf_variable conf_table[] =
#if defined (_SC_FSYNC)
{ "_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 },
#endif
@@ -556,6 +799,9 @@ static const struct conf_variable conf_table[] =
#if defined (_SC_READER_WRITER_LOCKS)
{ "_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 },
#endif
@@ -587,6 +833,9 @@ static const struct conf_variable conf_table[] =
#if defined (_SC_SPORADIC_SERVER)
{ "_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 },
#endif
@@ -701,9 +950,6 @@ static const struct conf_variable conf_table[] =
#if defined (_SC_AIO_PRIO_DELTA_MAX)
{ "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 },
#endif
@@ -758,6 +1004,9 @@ static const struct conf_variable conf_table[] =
#if defined (_SC_XOPEN_SHM)
{ "_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 },
#endif
@@ -842,6 +1091,10 @@ static const struct conf_variable conf_table[] =
{ "INT_BIT", CONSTANT, INT_BIT },
{ "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 },
{ "LONG_MIN", CONSTANT, LONG_MIN },
@@ -856,6 +1109,9 @@ static const struct conf_variable conf_table[] =
{ "SSIZE_MAX", CONSTANT, SSIZE_MAX },
{ "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 },
{ "WORD_BIT", CONSTANT, WORD_BIT },
@@ -940,6 +1196,24 @@ int all;
printf("undefined\n");
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) {
case UCHAR_MAX:
diff --git a/examples/loadables/strftime.c b/examples/loadables/strftime.c
new file mode 100644
index 00000000..92f489e3
--- /dev/null
+++ b/examples/loadables/strftime.c
@@ -0,0 +1,105 @@
+/* strftime - loadable builtin interface to strftime(3) */
+
+/* See Makefile for compilation details. */
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "bashtypes.h"
+#include "posixtime.h"
+
+#include <stdio.h>
+
+#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 --git a/examples/misc/aliasconv.bash b/examples/misc/aliasconv.bash
index 3fbe877d..d3b5776c 100755
--- a/examples/misc/aliasconv.bash
+++ b/examples/misc/aliasconv.bash
@@ -14,16 +14,16 @@ T=$'\t'
cat << \EOF >/tmp/cb$$.1
mkalias ()
{
- if [ "x$2" = "x" ]; then
- echo alias ${1}="''"
- elif echo "$2" | egrep -s '(\!|#)' >/dev/null 2>&1; then
+ case $2 in
+ '') echo alias ${1}="''" ;;
+ *[#\!]*)
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
+ ;;
+ *) echo alias ${1}=\'$(echo "${2}" | sed "s:':'\\\\'':")\' ;;
+ esac
}
EOF
diff --git a/examples/misc/aliasconv.sh b/examples/misc/aliasconv.sh
index 29e1ead9..75db0778 100755
--- a/examples/misc/aliasconv.sh
+++ b/examples/misc/aliasconv.sh
@@ -14,16 +14,16 @@ T=' '
cat << \EOF >/tmp/cb$$.1
mkalias ()
{
- if [ "x$2" = "x" ]; then
- echo alias ${1}="''"
- elif echo "$2" | egrep -s '(\!|#)' >/dev/null 2>&1; then
+ case $2 in
+ '') echo alias ${1}="''" ;;
+ *[#\!]*)
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
+ ;;
+ *) echo alias ${1}=\'`echo "${2}" | sed "s:':'\\\\\\\\'':"`\' ;;
+ esac
}
EOF
diff --git a/examples/misc/cshtobash b/examples/misc/cshtobash
index 93696220..8e2b05cf 100755
--- a/examples/misc/cshtobash
+++ b/examples/misc/cshtobash
@@ -36,16 +36,16 @@ EOF
cat << \EOF >/tmp/cb$$.1
mkalias ()
{
- if [ -z "$2" ]; then
- echo alias ${1}="''"
- elif echo "$2" | egrep -s '(\!|#)' >/dev/null 2>&1; then
+ case $2 in
+ '') echo alias ${1}="''" ;;
+ *[#\!]*)
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
+ ;;
+ *) echo alias ${1}=\'$(echo "${2}" | sed "s:':'\\\\'':")\' ;;
+ esac
}
EOF
diff --git a/examples/obashdb/README b/examples/obashdb/README
index aa3aea75..3373f5f8 100644
--- a/examples/obashdb/README
+++ b/examples/obashdb/README
@@ -4,5 +4,9 @@ and Associates (ISBN 1-56592-054-6).
The original `kshdb' is available for anonymous FTP with the URL
-ftp://ftp.uu.net/published/oreilly/nutshell/ksh/ksh.tar.Z
+http://examples.oreilly.com/korn/ksh.tar.Z
+
+A revised edition is available at:
+
+http://examples.oreilly.com/korn2/korn2_examples.tar.gz
diff --git a/examples/obashdb/bashdb.fns b/examples/obashdb/bashdb.fns
index 79d9737e..ac0612c0 100644
--- a/examples/obashdb/bashdb.fns
+++ b/examples/obashdb/bashdb.fns
@@ -88,7 +88,7 @@ _at_linenumbp() {
if [ -z "${_linebp}" ]; then
return 1
fi
- echo "${_curline}" | egrep "(${_linebp%\|})" >/dev/null 2>&1
+ echo "${_curline}" | grep -E "(${_linebp%\|})" >/dev/null 2>&1
return $?
}
@@ -101,7 +101,7 @@ _at_stringbp() {
return 1;
fi
l=${_lines[$_curline-$_firstline+1]}
- echo "${l}" | egrep "*(${_stringbp%\|})*" >/dev/null 2>&1
+ echo "${l}" | grep -E "\\*(${_stringbp%\|})\\*" >/dev/null 2>&1
return $?
}
diff --git a/examples/scripts.noah/number.bash b/examples/scripts.noah/number.bash
index 23e58b46..37b62b6f 100644
--- a/examples/scripts.noah/number.bash
+++ b/examples/scripts.noah/number.bash
@@ -108,7 +108,7 @@ function number ()
;;
0 ) : ;;
* )
- if test ".${val2}" != '.' -a ".${d1}" != '.0' ; then
+ if test ".${val2}" != '.' && test ".${d1}" != '.0' ; then
val2="${val2}-"
fi
case "${d1}" in
diff --git a/examples/scripts.noah/string.bash b/examples/scripts.noah/string.bash
index 38c0af8b..d80ebe80 100644
--- a/examples/scripts.noah/string.bash
+++ b/examples/scripts.noah/string.bash
@@ -95,11 +95,11 @@ function strcmp ()
###;;;autoload
function strncmp ()
{
- if [ -z "${3}" -o "${3}" -le "0" ]; then
+ if [ -z "${3}" ] || [ "${3}" -le "0" ]; then
return 0
fi
- if [ ${3} -ge ${#1} -a ${3} -ge ${#2} ]; then
+ if [ ${3} -ge ${#1} ] && [ ${3} -ge ${#2} ]; then
strcmp "$1" "$2"
return $?
else
diff --git a/examples/scripts.v2/cdhist.bash b/examples/scripts.v2/cdhist.bash
index 39bec884..df8aea78 100644
--- a/examples/scripts.v2/cdhist.bash
+++ b/examples/scripts.v2/cdhist.bash
@@ -39,7 +39,7 @@ cd()
set -- $HOME
fi
- if [ "$CDHISTFILE" -a -r "$CDHISTFILE" ] # if directory history exists
+ if [ "$CDHISTFILE" ] && [ -r "$CDHISTFILE" ] # if directory history exists
then
typeset CDHIST
i=-1
@@ -49,7 +49,7 @@ cd()
done <$CDHISTFILE
fi
- if [ "${CDHIST[0]}" != "$PWD" -a "$PWD" != "" ]
+ if [ "${CDHIST[0]}" != "$PWD" ] && [ -n "$PWD" ]
then
_cdins # insert $PWD into cd history
fi
diff --git a/examples/scripts.v2/fman b/examples/scripts.v2/fman
index c9cf301a..1e94d21a 100644
--- a/examples/scripts.v2/fman
+++ b/examples/scripts.v2/fman
@@ -56,13 +56,13 @@ FindSectionsInIndex ()
fi
done
[ -z "$indexes" ] && return
- # Make egrep give filename
+ # Make grep give filename
[ NIndex -lt 2 ] && indexes="$indexes /dev/null"
# set positional parameters to
# indexfile:searchname pagename section ...
# e.g.
# /usr/man/index:FP_OFF Routines DOS
- set -- `egrep "^$page[ ]" $indexes`
+ set -- `grep "^$page[ ]" $indexes`
while [ $# -gt 2 ]; do
FileNames[i]=${1%%index*}cat$3/$2.$3
Sections[i]=$3
diff --git a/examples/scripts.v2/frcp b/examples/scripts.v2/frcp
index 08028e12..572aa7bc 100755
--- a/examples/scripts.v2/frcp
+++ b/examples/scripts.v2/frcp
@@ -110,7 +110,7 @@ function CopyFiles {
*/) ;; # don't add / if trailing / already present
*) 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 ] ||
+ [ $DestMach = $LocalMach ] && [ -d "$DestPath" ] ||
# If dest ends with . or .., it is a directory
lastisdot "$DestPath"
then
diff --git a/examples/scripts.v2/repeat b/examples/scripts.v2/repeat
index 315d36ee..b6fccac6 100644
--- a/examples/scripts.v2/repeat
+++ b/examples/scripts.v2/repeat
@@ -103,7 +103,7 @@ esac
shift
-[ -z "$end" -o $count -le "$end" ] && increment=1 || increment=-1
+[ -z "$end" ] && [ $count -le "$end" ] && increment=1 || increment=-1
istrue $verbose && echo "start=$count end=$end" 1>&2
diff --git a/examples/scripts.v2/vtree b/examples/scripts.v2/vtree
index 60583b0c..7523cc8f 100644
--- a/examples/scripts.v2/vtree
+++ b/examples/scripts.v2/vtree
@@ -38,7 +38,7 @@ for i in "$@"; do
vars="$vars $i"
;;
*)
- if [ ! -x $i -o ! -d $i ]; then # arg must be a dir and executable
+ if [ ! -x $i ] || [ ! -d $i ]; then # arg must be a dir and executable
echo "$i: directory not accessible."
exit
fi
diff --git a/examples/scripts/bcsh.sh b/examples/scripts/bcsh.sh
index 509fe885..b810cab8 100755
--- a/examples/scripts/bcsh.sh
+++ b/examples/scripts/bcsh.sh
@@ -389,7 +389,7 @@ esac
trap ':' 2
trap exit 3
-trap "tail -$savehist $histfile>/tmp/hist$$;uniq /tmp/hist$$ > $histfile;\
+trap "tail -n $savehist $histfile>/tmp/hist$$;uniq /tmp/hist$$ > $histfile;\
rm -f /tmp/*$$;exit 0" 15
getcmd=yes
@@ -517,7 +517,7 @@ do
esac
cmd="${cmd};$line"
- while test "$line" != "done" -a "$line" != "end"
+ while test "$line" != "done" && test "$line" != "end"
do
echo $n "$PS2$c"
read line
@@ -531,7 +531,7 @@ do
echo "$cmd" > /tmp/bcsh$$
;;
if[\ \ ]*)
- while test "$line" != "fi" -a "$line" != "endif"
+ while test "$line" != "fi" && test "$line" != "endif"
do
echo $n "$PS2$c"
read line
@@ -659,7 +659,7 @@ esac/
-[0-9]*)
wanted="`expr \"$i\" : '-\([0-9][0-9]*\).*'`"
rest="`expr \"$i\" : '-[0-9][0-9]*\(.*\)'`"
- i="`tail -$wanted $histfile | sed -e "1q"`"
+ i="`tail -n $wanted $histfile | sed -e "1q"`"
;;
esac
;;
@@ -917,14 +917,14 @@ esac/
continue
;;
exec[\ \ ]*)
- tail -$savehist $histfile>/tmp/hist$$
+ tail -n $savehist $histfile>/tmp/hist$$
uniq /tmp/hist$$ > $histfile
rm -f /tmp/*$$
echo $cmd > /tmp/cmd$$
. /tmp/cmd$$
;;
login[\ \ ]*|newgrp[\ \ ]*)
- tail -$savehist $histfile>/tmp/hist$$
+ tail -n $savehist $histfile>/tmp/hist$$
uniq /tmp/hist$$ > $histfile
rm -f /tmp/*$$
echo $cmd > /tmp/cmd$$
@@ -936,22 +936,22 @@ esac/
# sh $logoutfile
$SHELL $logoutfile
fi
- tail -$savehist $histfile > /tmp/hist$$
+ tail -n $savehist $histfile > /tmp/hist$$
uniq /tmp/hist$$ > $histfile
rm -f /tmp/*$$
exit 0
;;
h|history)
- grep -n . $histfile | tail -$history | sed -e 's@:@ @' | $PAGER
+ 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 -$history | sed -e 's@:@ @'@\"`"
+ 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 -$history | sed -e 's@:@ @'@\"`"
+ cmd="`echo \"$cmd\" | sed -e \"s@history@grep -n . $histfile | tail -n $history | sed -e 's@:@ @'@\"`"
getcmd=no
continue
;;
diff --git a/examples/scripts/fixfiles.bash b/examples/scripts/fixfiles.bash
index 67311eed..15f3ba86 100644
--- a/examples/scripts/fixfiles.bash
+++ b/examples/scripts/fixfiles.bash
@@ -62,7 +62,7 @@ processdir()
set +f
for file in * ; do
set -f
- if [ "$file" != "." -a "$file" != ".." ] ; then
+ if [ "$file" != "." ] && [ "$file" != ".." ] ; then
if [ -L "$file" ] ; then
echo "skipping symlink" $file in `pwd`
elif [ -d "$file" ] ; then
diff --git a/examples/scripts/line-input.bash b/examples/scripts/line-input.bash
index 02c2bc2c..3f2efaef 100644
--- a/examples/scripts/line-input.bash
+++ b/examples/scripts/line-input.bash
@@ -125,11 +125,11 @@ function getline
unset linesave # forget temp var
;;
 )
- while [ "${line% }" != "$line" -a ${#line} != 0 ] ; do
+ while [ "${line% }" != "$line" ] && [ ${#line} != 0 ] ; do
echo -n " "
line="${line%?}"
done
- while [ "${line% }" = "$line" -a ${#line} != 0 ] ; do
+ while [ "${line% }" = "$line" ] && [ ${#line} != 0 ] ; do
echo -n " "
line="${line%?}"
done
@@ -151,7 +151,7 @@ function getline
# If length is restricted, and the line is too
# long, then beep...
- if [ "$2" != 0 -a $(( ${#line} >= $2 )) = 1 ] ; then
+ if [ "$2" != 0 ] && [ $(( ${#line} >= $2 )) = 1 ] ; then
echo -n 
else # Otherwise add
line="$line$key" # the character.
@@ -182,4 +182,3 @@ getline LINE 50
restore
echo "<$LINE>"
-
diff --git a/execute_cmd.c b/execute_cmd.c
index 2291c7af..44426fda 100644
--- a/execute_cmd.c
+++ b/execute_cmd.c
@@ -1,6 +1,6 @@
/* execute_command.c -- Execute a COMMAND structure. */
-/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -26,7 +26,7 @@
#include <stdio.h>
#include "chartypes.h"
#include "bashtypes.h"
-#ifndef _MINIX
+#if !defined (_MINIX) && defined (HAVE_SYS_FILE_H)
# include <sys/file.h>
#endif
#include "filecntl.h"
@@ -57,6 +57,7 @@ extern int errno;
#endif
#include "bashansi.h"
+#include "bashintl.h"
#include "memalloc.h"
#include "shell.h"
@@ -97,10 +98,11 @@ extern int errno;
extern int posixly_correct;
extern int breaking, continuing, loop_level;
extern int expand_aliases;
-extern int parse_and_execute_level, running_trap, trap_line_number;
+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;
extern sh_builtin_func_t *last_shell_builtin, *this_shell_builtin;
@@ -196,12 +198,22 @@ int stdin_redir;
`test' needs this, for example. */
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;
struct stat SB; /* used for debugging */
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;
int return_catch_value;
@@ -210,6 +222,10 @@ procenv_t return_catch;
/* The value returned by the last synchronous command. */
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. */
REDIRECT *redirection_undo_list = (REDIRECT *)NULL;
@@ -223,6 +239,9 @@ REDIRECT *exec_redirection_undo_list = (REDIRECT *)NULL;
environment. */
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;
@@ -282,21 +301,25 @@ close_fd_bitmap (fdbp)
int
executing_line_number ()
{
- if (executing && (variable_context == 0 || interactive_shell == 0) && currently_executing_command)
+ if (executing && showing_function_line == 0 &&
+ (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)
+#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;
- else
+#endif
+
return line_number;
}
- else if (running_trap)
- return trap_line_number;
else
return line_number;
}
@@ -374,7 +397,7 @@ static void
cleanup_redirects (list)
REDIRECT *list;
{
- do_redirections (list, 1, 0, 0);
+ do_redirections (list, RX_ACTIVE);
dispose_redirects (list);
}
@@ -384,7 +407,7 @@ static void
cleanup_func_redirects (list)
REDIRECT *list;
{
- do_redirections (list, 1, 0, 0);
+ do_redirections (list, RX_ACTIVE);
}
#endif
@@ -441,7 +464,7 @@ async_redirect_stdin ()
close (fd);
}
else if (fd < 0)
- internal_error ("cannot redirect standard input from /dev/null: %s", strerror (errno));
+ internal_error (_("cannot redirect standard input from /dev/null: %s"), strerror (errno));
}
#define DESCRIBE_PID(pid) do { if (interactive) describe_pid (pid); } while (0)
@@ -469,13 +492,16 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out,
int exec_result, invert, ignore_return, was_error_trap;
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)
return (EXECUTION_SUCCESS);
run_pending_traps ();
+#if 0
if (running_trap == 0)
+#endif
currently_executing_command = command;
invert = (command->flags & CMD_INVERT_RETURN) != 0;
@@ -561,7 +587,9 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out,
else
{
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;
}
return (exec_result);
@@ -573,7 +601,7 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out,
/* Handle WHILE FOR CASE etc. with redirections. (Also '&' input
redirection.) */
- if (do_redirections (command->redirects, 1, 1, 0) != 0)
+ if (do_redirections (command->redirects, RX_ACTIVE|RX_UNDOABLE) != 0)
{
cleanup_redirects (redirection_undo_list);
redirection_undo_list = (REDIRECT *)NULL;
@@ -616,7 +644,8 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out,
{
case cm_simple:
{
- /* We can't rely on this variable retaining its value across a
+ 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. */
last_pid = last_made_pid;
@@ -626,9 +655,12 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out,
command->value.Simple->flags |= CMD_IGNORE_RETURN;
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
command immediately following its definition. */
@@ -662,12 +694,15 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out,
#endif
/* When executing a shell function that executes other
commands, this causes the last simple command in
- the function to be waited for twice. */
+ 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. */
+ 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;
#endif
@@ -686,7 +721,7 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out,
{
last_command_exit_value = exec_result;
run_pending_traps ();
- jump_to_top_level (EXITPROG);
+ jump_to_top_level (ERREXIT);
}
break;
@@ -798,7 +833,9 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out,
case cm_cond:
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
@@ -813,7 +850,7 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out,
if (my_undo_list)
{
- do_redirections (my_undo_list, 1, 0, 0);
+ do_redirections (my_undo_list, RX_ACTIVE);
dispose_redirects (my_undo_list);
}
@@ -831,7 +868,9 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out,
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);
}
@@ -995,7 +1034,7 @@ print_formatted_time (fp, format, rs, rsf, us, usf, ss, ssf, cpu)
len = mkfmt (ts, prec, lng, ss, ssf);
else
{
- internal_error ("bad format character in time format: %c", *s);
+ internal_error (_("TIMEFORMAT: `%c': invalid format character"), *s);
free (str);
return;
}
@@ -1027,7 +1066,9 @@ time_command (command, asynchronous, pipe_in, pipe_out, fds_to_close)
#if defined (HAVE_GETRUSAGE) && defined (HAVE_GETTIMEOFDAY)
struct timeval real, user, sys;
struct timeval before, after;
- struct timezone dtz;
+# 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
# if defined (HAVE_TIMES)
@@ -1037,7 +1078,11 @@ time_command (command, asynchronous, pipe_in, pipe_out, fds_to_close)
#endif
#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);
#else
@@ -1057,7 +1102,11 @@ time_command (command, asynchronous, pipe_in, pipe_out, fds_to_close)
rsf = usf = ssf = cpu = 0;
#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);
@@ -1125,6 +1174,7 @@ execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close)
USE_VAR(tcom);
USE_VAR(asynchronous);
+ subshell_level++;
should_redir_stdin = (asynchronous && (command->flags & CMD_STDIN_REDIR) &&
pipe_in == NO_PIPE &&
stdin_redirects (command->redirects) == 0);
@@ -1215,7 +1265,7 @@ execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close)
/* Do redirections, then dispose of them before recursive call. */
if (command->redirects)
{
- if (do_redirections (command->redirects, 1, 0, 0) != 0)
+ if (do_redirections (command->redirects, RX_ACTIVE) != 0)
exit (invert ? EXECUTION_SUCCESS : EXECUTION_FAILURE);
dispose_redirects (command->redirects);
@@ -1270,6 +1320,7 @@ execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close)
return_code = run_exit_trap ();
}
+ subshell_level--;
return (return_code);
/* NOTREACHED */
}
@@ -1522,17 +1573,18 @@ execute_for_command (for_command)
register WORD_LIST *releaser, *list;
SHELL_VAR *v;
char *identifier;
- int retval;
+ 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)
{
if (posixly_correct && interactive_shell == 0)
{
last_command_exit_value = EX_USAGE;
- jump_to_top_level (EXITPROG);
+ jump_to_top_level (ERREXIT);
}
return (EXECUTION_FAILURE);
}
@@ -1560,10 +1612,36 @@ execute_for_command (for_command)
for (retval = EXECUTION_SUCCESS; list; list = list->next)
{
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)
{
last_command_exit_value = EXECUTION_FAILURE;
@@ -1571,7 +1649,8 @@ execute_for_command (for_command)
}
else
{
- run_unwind_frame ("for");
+ dispose_words (releaser);
+ discard_unwind_frame ("for");
loop_level--;
return (EXECUTION_FAILURE);
}
@@ -1595,6 +1674,7 @@ execute_for_command (for_command)
}
loop_level--;
+ line_number = save_line_number;
#if 0
if (lexical_scoping)
@@ -1640,6 +1720,7 @@ eval_arith_for_expr (l, okp)
{
WORD_LIST *new;
intmax_t expresult;
+ int r;
new = expand_words_no_vars (l);
if (new)
@@ -1647,9 +1728,27 @@ eval_arith_for_expr (l, okp)
if (echo_command_at_execute)
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 ();
+
+ 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);
}
else
@@ -1670,6 +1769,7 @@ execute_arith_for_command (arith_for_command)
body_status = EXECUTION_SUCCESS;
loop_level++;
+ save_lineno = line_number;
if (arith_for_command->flags & CMD_IGNORE_RETURN)
arith_for_command->action->flags |= CMD_IGNORE_RETURN;
@@ -1679,19 +1779,21 @@ execute_arith_for_command (arith_for_command)
/* save the starting line number of the command so we can reset
line_number before executing each expression -- for $LINENO
and the DEBUG trap. */
- arith_lineno = arith_for_command->line;
+ line_number = arith_lineno = arith_for_command->line;
if (variable_context && interactive_shell)
- line_number = arith_lineno -= function_line_number;
+ line_number -= function_line_number;
/* Evaluate the initialization expression. */
expresult = eval_arith_for_expr (arith_for_command->init, &expok);
if (expok == 0)
- return (EXECUTION_FAILURE);
+ {
+ line_number = save_lineno;
+ 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);
line_number = save_lineno;
@@ -1725,7 +1827,6 @@ execute_arith_for_command (arith_for_command)
}
/* Evaluate the step expression. */
- save_lineno = line_number;
line_number = arith_lineno;
expresult = eval_arith_for_expr (arith_for_command->step, &expok);
line_number = save_lineno;
@@ -1738,6 +1839,8 @@ execute_arith_for_command (arith_for_command)
}
loop_level--;
+ line_number = save_lineno;
+
return (body_status);
}
#endif
@@ -1922,11 +2025,31 @@ execute_select_command (select_command)
WORD_LIST *releaser, *list;
SHELL_VAR *v;
char *identifier, *ps3_prompt, *selection;
- int retval, list_len, show_menu;
+ 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;
@@ -1938,6 +2061,7 @@ execute_select_command (select_command)
{
if (list)
dispose_words (list);
+ line_number = save_line_number;
return (EXECUTION_SUCCESS);
}
@@ -1952,6 +2076,7 @@ execute_select_command (select_command)
while (1)
{
+ line_number = select_command->line;
ps3_prompt = get_string_value ("PS3");
if (ps3_prompt == 0)
ps3_prompt = "#? ";
@@ -1977,7 +2102,10 @@ execute_select_command (select_command)
}
else
{
- run_unwind_frame ("select");
+ dispose_words (releaser);
+ discard_unwind_frame ("select");
+ loop_level--;
+ line_number = save_line_number;
return (EXECUTION_FAILURE);
}
}
@@ -2009,8 +2137,10 @@ execute_select_command (select_command)
}
loop_level--;
+ line_number = save_line_number;
- run_unwind_frame ("select");
+ dispose_words (releaser);
+ discard_unwind_frame ("select");
return (retval);
}
#endif /* SELECT_COMMAND */
@@ -2027,7 +2157,33 @@ execute_case_command (case_command)
WORD_LIST *wlist, *es;
PATTERN_LIST *clauses;
char *word, *pattern;
- int retval, match, ignore_return;
+ 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. */
if (member ('~', case_command->word->word))
@@ -2096,6 +2252,7 @@ execute_case_command (case_command)
exit_case_command:
free (word);
discard_unwind_frame ("case");
+ line_number = save_line_number;
return (retval);
}
@@ -2191,10 +2348,12 @@ static int
execute_if_command (if_command)
IF_COM *if_command;
{
- int return_value;
+ 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)
{
@@ -2221,32 +2380,56 @@ static int
execute_arith_command (arith_command)
ARITH_COM *arith_command;
{
- int expok;
+ int expok, save_line_number, retval;
intmax_t expresult;
WORD_LIST *new;
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 = arith_command->line - function_line_number;
+ 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. */
- if (signal_is_trapped (DEBUG_TRAP) && signal_is_ignored (DEBUG_TRAP) == 0)
- run_debug_trap ();
+ 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 (arith_command->exp);
+ new = expand_words_no_vars (arith_command->exp);
/* If we're tracing, make a new word list with `((' at the front and `))'
at the back and print it. */
if (echo_command_at_execute)
xtrace_print_arith_cmd (new);
- expresult = evalexp (new->word->word, &expok);
- dispose_words (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)
return (EXECUTION_FAILURE);
@@ -2263,7 +2446,7 @@ static int
execute_cond_node (cond)
COND_COM *cond;
{
- int result, invert, patmatch;
+ int result, invert, patmatch, rmatch, mflags;
char *arg1, *arg2;
invert = (cond->flags & CMD_INVERT_RETURN);
@@ -2298,6 +2481,10 @@ execute_cond_node (cond)
patmatch = ((cond->op->word[1] == '=') && (cond->op->word[2] == '\0') &&
(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);
if (arg1 == 0)
@@ -2309,7 +2496,19 @@ execute_cond_node (cond)
if (echo_command_at_execute)
xtrace_print_cond_term (cond->type, invert, cond->op, arg1, arg2);
- result = binary_test (cond->op->word, arg1, arg2, TEST_PATMATCH|TEST_ARITHEXP)
+#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;
if (arg1 != nullstr)
@@ -2334,25 +2533,42 @@ static int
execute_cond_command (cond_command)
COND_COM *cond_command;
{
- int result;
+ int retval, save_line_number;
- result = EXECUTION_SUCCESS;
+ 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 = cond_command->line - function_line_number;
+ 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. */
- if (signal_is_trapped (DEBUG_TRAP) && signal_is_ignored (DEBUG_TRAP) == 0)
- run_debug_trap ();
+ 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 = result = execute_cond_node (cond_command);
- return (result);
+
+ last_command_exit_value = retval = execute_cond_node (cond_command);
+ line_number = save_line_number;
+ return (retval);
}
#endif /* COND_COMMAND */
@@ -2377,6 +2593,8 @@ execute_null_command (redirects, pipe_in, pipe_out, async, old_last_command_subs
int pipe_in, pipe_out, async;
pid_t old_last_command_subst_pid;
{
+ int r;
+
if (pipe_in != NO_PIPE || pipe_out != NO_PIPE || async)
{
/* We have a null command, but we really want a subshell to take
@@ -2390,7 +2608,7 @@ execute_null_command (redirects, pipe_in, pipe_out, async, old_last_command_subs
subshell_environment = SUBSHELL_ASYNC;
- if (do_redirections (redirects, 1, 0, 0) == 0)
+ if (do_redirections (redirects, RX_ACTIVE) == 0)
exit (EXECUTION_SUCCESS);
else
exit (EXECUTION_FAILURE);
@@ -2413,7 +2631,11 @@ execute_null_command (redirects, pipe_in, pipe_out, async, old_last_command_subs
expanding the command or a redirection, return the value of that
substitution. Otherwise, return EXECUTION_SUCCESS. */
- if (do_redirections (redirects, 0, 0, 0) != 0)
+ 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)
return (last_command_exit_value);
@@ -2471,17 +2693,28 @@ execute_simple_command (simple_command, pipe_in, pipe_out, async, fds_to_close)
/* 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 ();
+ line_number -= function_line_number;
/* Remember what this command line looks like at invocation. */
command_string_index = 0;
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;
@@ -2506,14 +2739,20 @@ execute_simple_command (simple_command, pipe_in, pipe_out, async, fds_to_close)
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
vast majority of cases. */
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;
simple_command->flags |= CMD_NO_FORK;
@@ -2562,6 +2801,7 @@ execute_simple_command (simple_command, pipe_in, pipe_out, async, fds_to_close)
no variable `$foo'. */
if (words == 0)
{
+ this_command_name = 0;
result = execute_null_command (simple_command->redirects,
pipe_in, pipe_out,
already_forked ? 0 : async,
@@ -2581,7 +2821,7 @@ execute_simple_command (simple_command, pipe_in, pipe_out, async, fds_to_close)
begin_unwind_frame ("simple-command");
if (echo_command_at_execute)
- xtrace_print_word_list (words);
+ xtrace_print_word_list (words, 1);
builtin = (sh_builtin_func_t *)NULL;
func = (SHELL_VAR *)NULL;
@@ -2603,6 +2843,14 @@ execute_simple_command (simple_command, pipe_in, pipe_out, async, fds_to_close)
func = find_function (words->word->word);
}
+ /* 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;
@@ -2690,10 +2938,12 @@ execute_simple_command (simple_command, pipe_in, pipe_out, async, fds_to_close)
setup_async_signals ();
}
+ 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
{
@@ -2738,7 +2988,9 @@ execute_simple_command (simple_command, pipe_in, pipe_out, async, fds_to_close)
return_result:
bind_lastarg (lastarg);
FREE (command_line);
- run_unwind_frame ("simple-command");
+ dispose_words (words);
+ discard_unwind_frame ("simple-command");
+ this_command_name = (char *)NULL; /* points to freed memory now */
return (result);
}
@@ -2850,11 +3102,24 @@ execute_function (var, words, flags, fds_to_close, async, subshell)
int async, subshell;
{
int return_val, result;
- COMMAND *tc, *fc;
- char *debug_trap, *error_trap;
+ 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))
tc->flags |= CMD_IGNORE_RETURN;
@@ -2881,12 +3146,16 @@ execute_function (var, words, flags, fds_to_close, async, subshell)
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 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))
+ /* 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)
{
@@ -2897,7 +3166,8 @@ execute_function (var, words, flags, fds_to_close, async, subshell)
restore_default_signal (DEBUG_TRAP);
}
- if (error_trap)
+ /* error_trace_mode != 0 means that functions inherit the ERR trap. */
+ if (error_trap && error_trace_mode == 0)
{
if (subshell == 0)
{
@@ -2908,14 +3178,41 @@ execute_function (var, words, flags, fds_to_close, async, subshell)
restore_default_signal (ERROR_TRAP);
}
+ 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. */
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. */
- if (interactive_shell)
- line_number = function_line_number = tc->line;
+ line_number = function_line_number = tc->line;
if (subshell)
{
@@ -2936,11 +3233,46 @@ execute_function (var, words, flags, fds_to_close, async, subshell)
if (return_val)
result = return_catch_value;
else
- result = execute_command_internal (fc, 0, NO_PIPE, NO_PIPE, fds_to_close);
+ {
+ /* 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);
@@ -3023,7 +3355,7 @@ execute_subshell_builtin_or_function (words, redirects, builtin, var,
do_piping (pipe_in, pipe_out);
- if (do_redirections (redirects, 1, 0, 0) != 0)
+ if (do_redirections (redirects, RX_ACTIVE) != 0)
exit (EXECUTION_FAILURE);
if (builtin)
@@ -3070,7 +3402,7 @@ execute_builtin_or_function (words, builtin, var, redirects,
REDIRECT *saved_undo_list;
sh_builtin_func_t *saved_this_shell_builtin;
- if (do_redirections (redirects, 1, 1, 0) != 0)
+ if (do_redirections (redirects, RX_ACTIVE|RX_UNDOABLE) != 0)
{
cleanup_redirects (redirection_undo_list);
redirection_undo_list = (REDIRECT *)NULL;
@@ -3104,6 +3436,10 @@ execute_builtin_or_function (words, builtin, var, redirects,
else
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
`command exec [redirection]', since otherwise `exec' would have
@@ -3167,7 +3503,9 @@ setup_async_signals ()
Note that the filename hashing stuff has to take place up here,
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. */
+ 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,
async, fds_to_close, cmdflags)
@@ -3186,12 +3524,19 @@ execute_disk_command (words, redirects, command_line, pipe_in, pipe_out,
pathname = words->word->word;
#if defined (RESTRICTED_SHELL)
+ command = (char *)NULL;
if (restricted && xstrchr (pathname, '/'))
{
- internal_error ("%s: restricted: cannot specify `/' in command names",
+ internal_error (_("%s: restricted: cannot specify `/' in command names"),
pathname);
last_command_exit_value = EXECUTION_FAILURE;
- return;
+
+ /* 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 */
@@ -3255,7 +3600,7 @@ execute_disk_command (words, redirects, command_line, pipe_in, pipe_out,
subshell_environment = SUBSHELL_FORK;
- if (redirects && (do_redirections (redirects, 1, 0, 0) != 0))
+ if (redirects && (do_redirections (redirects, RX_ACTIVE) != 0))
{
#if defined (PROCESS_SUBSTITUTION)
/* Try to remove named pipes that may have been created as the
@@ -3270,7 +3615,7 @@ execute_disk_command (words, redirects, command_line, pipe_in, pipe_out,
if (command == 0)
{
- internal_error ("%s: command not found", pathname);
+ internal_error (_("%s: command not found"), pathname);
exit (EX_NOTFOUND); /* Posix.2 says the exit status is 127 */
}
@@ -3282,6 +3627,7 @@ execute_disk_command (words, redirects, command_line, pipe_in, pipe_out,
}
else
{
+parent_return:
/* Make sure that the pipes are closed in the parent. */
close_pipes (pipe_in, pipe_out);
#if defined (PROCESS_SUBSTITUTION) && defined (HAVE_DEV_FD)
@@ -3436,7 +3782,7 @@ initialize_subshell ()
/* If we're not interactive, close the file descriptor from which we're
reading the current shell script. */
if (interactive_shell == 0)
- unset_bash_input (1);
+ unset_bash_input (0);
}
#if defined (HAVE_SETOSTYPE) && defined (_POSIX_SOURCE)
@@ -3481,7 +3827,7 @@ shell_execve (command, args, env)
if (i != ENOEXEC)
{
if ((stat (command, &finfo) == 0) && (S_ISDIR (finfo.st_mode)))
- internal_error ("%s: is a directory", command);
+ internal_error (_("%s: is a directory"), command);
else if (executable_file (command) == 0)
{
errno = i;
@@ -3499,7 +3845,7 @@ shell_execve (command, args, env)
interp = getinterp (sample, sample_len, (int *)NULL);
errno = i;
- sys_error ("%s: %s: bad interpreter", command, interp ? interp : "");
+ sys_error (_("%s: %s: bad interpreter"), command, interp ? interp : "");
FREE (interp);
return (EX_NOEXEC);
}
@@ -3536,7 +3882,7 @@ shell_execve (command, args, env)
#endif
if (check_binary_file (sample, sample_len))
{
- internal_error ("%s: cannot execute binary file", command);
+ internal_error (_("%s: cannot execute binary file"), command);
return (EX_BINARY_FILE);
}
}
@@ -3600,7 +3946,7 @@ execute_intern_function (name, function)
if (posixly_correct && interactive_shell == 0)
{
last_command_exit_value = EX_USAGE;
- jump_to_top_level (EXITPROG);
+ jump_to_top_level (ERREXIT);
}
return (EXECUTION_FAILURE);
}
@@ -3609,7 +3955,7 @@ execute_intern_function (name, function)
if (var && (readonly_p (var) || noassign_p (var)))
{
if (readonly_p (var))
- internal_error ("%s: readonly function", var->name);
+ internal_error (_("%s: readonly function"), var->name);
return (EXECUTION_FAILURE);
}
@@ -3644,6 +3990,13 @@ close_pipes (in, out)
close (out);
}
+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. */
static void
@@ -3653,7 +4006,7 @@ do_piping (pipe_in, pipe_out)
if (pipe_in != NO_PIPE)
{
if (dup2 (pipe_in, 0) < 0)
- sys_error ("cannot duplicate fd %d to fd 0", pipe_in);
+ dup_error (pipe_in, 0);
if (pipe_in > 0)
close (pipe_in);
}
@@ -3662,14 +4015,14 @@ do_piping (pipe_in, pipe_out)
if (pipe_out != REDIRECT_BOTH)
{
if (dup2 (pipe_out, 1) < 0)
- sys_error ("cannot duplicate fd %d to fd 1", pipe_out);
+ dup_error (pipe_out, 1);
if (pipe_out == 0 || pipe_out > 1)
close (pipe_out);
}
else
{
if (dup2 (1, 2) < 0)
- sys_error ("cannot duplicate fd 1 to fd 2");
+ dup_error (1, 2);
}
}
}
diff --git a/expr.c b/expr.c
index a4a3ae8a..a45e6a7c 100644
--- a/expr.c
+++ b/expr.c
@@ -1,6 +1,6 @@
/* expr.c -- arithmetic expression evaluation. */
-/* Copyright (C) 1990-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1990-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -42,6 +42,7 @@
"||"
"expr ? expr : expr"
"=", "*=", "/=", "%=", "+=", "-=", "<<=", ">>=", "&=", "^=", "|="
+ , [comma]
(Note that most of these operators have special meaning to bash, and an
entire expression should be quoted, e.g. "a=$a+1" or "a=a+1" to ensure
@@ -78,6 +79,7 @@
#endif
#include "chartypes.h"
+#include "bashintl.h"
#include "shell.h"
@@ -155,6 +157,7 @@ static void evalerror __P((char *));
static void pushexp __P((void));
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 *));
@@ -200,6 +203,10 @@ static int expr_stack_size; /* Number of slots already allocated. */
extern char *this_command_name;
extern int unbound_vars_is_error;
+#if defined (ARRAY_VARS)
+extern char *bash_badsub_errmsg;
+#endif
+
#define SAVETOK(X) \
do { \
(X)->curtok = curtok; \
@@ -230,7 +237,7 @@ pushexp ()
EXPR_CONTEXT *context;
if (expr_depth >= MAX_EXPR_RECURSION_LEVEL)
- evalerror ("expression recursion level exceeded");
+ evalerror (_("expression recursion level exceeded"));
if (expr_depth >= expr_stack_size)
{
@@ -254,7 +261,7 @@ popexp ()
EXPR_CONTEXT *context;
if (expr_depth == 0)
- evalerror ("recursion stack underflow");
+ evalerror (_("recursion stack underflow"));
context = expr_stack[--expr_depth];
@@ -280,6 +287,14 @@ expr_unwind ()
free (expr_stack[expr_depth]); /* free the allocated EXPR_CONTEXT */
}
+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
if the expression is invalid, non-zero otherwise. If a non-zero
@@ -299,10 +314,16 @@ evalexp (expr, validp)
int *validp;
{
intmax_t val;
+ int c;
+ procenv_t oevalbuf;
val = 0;
- if (setjmp (evalbuf))
+ FASTCOPY (evalbuf, oevalbuf, sizeof (evalbuf));
+
+ c = setjmp (evalbuf);
+
+ if (c)
{
FREE (tokstr);
FREE (expression);
@@ -320,6 +341,8 @@ evalexp (expr, validp)
if (validp)
*validp = 1;
+ FASTCOPY (oevalbuf, evalbuf, sizeof (evalbuf));
+
return (val);
}
@@ -349,7 +372,7 @@ subexpr (expr)
val = EXP_HIGHEST ();
if (curtok != 0)
- evalerror ("syntax error in expression");
+ evalerror (_("syntax error in expression"));
FREE (tokstr);
FREE (expression);
@@ -389,7 +412,7 @@ expassign ()
special = curtok == OP_ASSIGN;
if (lasttok != STR)
- evalerror ("attempted assignment to non-variable");
+ evalerror (_("attempted assignment to non-variable"));
if (special)
{
@@ -410,12 +433,12 @@ expassign ()
break;
case DIV:
if (value == 0)
- evalerror ("division by 0");
+ evalerror (_("division by 0"));
lvalue /= value;
break;
case MOD:
if (value == 0)
- evalerror ("division by 0");
+ evalerror (_("division by 0"));
lvalue %= value;
break;
case PLUS:
@@ -441,7 +464,7 @@ expassign ()
break;
default:
free (lhs);
- evalerror ("bug: bad expassign token");
+ evalerror (_("bug: bad expassign token"));
break;
}
value = lvalue;
@@ -449,7 +472,7 @@ expassign ()
rhs = itos (value);
if (noeval == 0)
- (void)bind_int_variable (lhs, rhs);
+ expr_bind_variable (lhs, rhs);
free (rhs);
free (lhs);
FREE (tokstr);
@@ -471,7 +494,7 @@ expcond ()
{
readtok ();
if (curtok == 0 || curtok == COL)
- evalerror ("expression expected");
+ evalerror (_("expression expected"));
if (cval == 0)
{
set_noeval = 1;
@@ -483,10 +506,10 @@ expcond ()
if (set_noeval)
noeval--;
if (curtok != COL)
- evalerror ("`:' expected for conditional expression");
+ evalerror (_("`:' expected for conditional expression"));
readtok ();
if (curtok == 0)
- evalerror ("expression expected");
+ evalerror (_("expression expected"));
set_noeval = 0;
if (cval)
{
@@ -725,7 +748,7 @@ exp2 ()
val2 = exppower ();
if (((op == DIV) || (op == MOD)) && (val2 == 0))
- evalerror ("division by 0");
+ evalerror (_("division by 0"));
if (op == MUL)
val1 *= val2;
@@ -743,14 +766,14 @@ exppower ()
register intmax_t val1, val2, c;
val1 = exp1 ();
- if (curtok == POWER)
+ while (curtok == POWER)
{
readtok ();
val2 = exp1 ();
if (val2 == 0)
return (1);
if (val2 < 0)
- evalerror ("exponent less than 0");
+ evalerror (_("exponent less than 0"));
for (c = 1; val2--; c *= val1)
;
val1 = c;
@@ -785,6 +808,7 @@ exp0 ()
register intmax_t val = 0, v2;
char *vincdec;
int stok;
+ EXPR_CONTEXT ec;
/* XXX - might need additional logic here to decide whether or not
pre-increment or pre-decrement is legal at this point. */
@@ -794,12 +818,12 @@ exp0 ()
readtok ();
if (curtok != STR)
/* readtok() catches this */
- evalerror ("identifier expected after pre-increment or pre-decrement");
+ 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);
+ expr_bind_variable (tokstr, vincdec);
free (vincdec);
val = v2;
@@ -821,8 +845,8 @@ exp0 ()
readtok ();
val = EXP_HIGHEST ();
- if (curtok != RPAR)
- evalerror ("missing `)'");
+ if (curtok != RPAR) /* ( */
+ evalerror (_("missing `)'"));
/* Skip over closing paren. */
readtok ();
@@ -830,23 +854,42 @@ exp0 ()
else if ((curtok == NUM) || (curtok == STR))
{
val = tokval;
- if (curtok == STR && (*tp == '+' || *tp == '-') && tp[1] == *tp &&
- (tp[2] == '\0' || (ISALNUM ((unsigned char)tp[2]) == 0)))
+ if (curtok == STR)
{
+ SAVETOK (&ec);
+ tokstr = (char *)NULL; /* keep it from being freed */
+ noeval = 1;
+ readtok ();
+ stok = curtok;
+
/* 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 */
+ 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);
+ }
+
}
readtok ();
}
else
- evalerror ("syntax error: operand expected");
+ evalerror (_("syntax error: operand expected"));
return (val);
}
@@ -913,7 +956,7 @@ expr_streval (tok, e)
static void
readtok ()
{
- register char *cp;
+ register char *cp, *xp;
register unsigned char c, c1;
register int e;
@@ -959,7 +1002,7 @@ readtok ()
e = ']';
}
else
- evalerror ("bad array subscript");
+ evalerror (bash_badsub_errmsg);
}
#endif /* ARRAY_VARS */
@@ -972,6 +1015,7 @@ readtok ()
tokstr = (char *)NULL; /* keep it from being freed */
tp = savecp = cp;
noeval = 1;
+ curtok = STR;
readtok ();
peektok = curtok;
if (peektok == STR) /* free new tokstr before old one is restored */
@@ -1041,10 +1085,20 @@ readtok ()
c = LOR;
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 ((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, "*/%+-&^|"))
{
assigntok = c; /* a OP= b */
@@ -1121,11 +1175,11 @@ strlong (num)
if (c == '#')
{
if (foundbase)
- evalerror ("bad number");
+ evalerror (_("invalid number"));
/* Illegal base specifications raise an evaluation error. */
if (val < 2 || val > 64)
- evalerror ("illegal arithmetic base");
+ evalerror (_("invalid arithmetic base"));
base = val;
val = 0;
@@ -1145,7 +1199,7 @@ strlong (num)
c = 63;
if (c >= base)
- evalerror ("value too great for base");
+ evalerror (_("value too great for base"));
val = (val * base) + c;
}
diff --git a/externs.h b/externs.h
index 1da16f74..a015d782 100644
--- a/externs.h
+++ b/externs.h
@@ -31,12 +31,34 @@ extern intmax_t evalexp __P((char *, int *));
/* 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 char *named_function_string __P((char *, COMMAND *, int));
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_word_list __P((WORD_LIST *));
+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 *));
#endif
@@ -72,7 +94,9 @@ extern char **brace_expand __P((char *));
extern int yyparse __P((void));
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 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 *));
@@ -113,6 +137,10 @@ extern void strip_leading __P((char *));
extern void strip_trailing __P((char *, int, int));
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,6 +225,13 @@ extern char *sh_realpath __P((const char *, char *));
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 */
extern char *sh_single_quote __P((char *));
extern char *sh_double_quote __P((char *));
diff --git a/findcmd.c b/findcmd.c
index 9c6670a4..09ad2fad 100644
--- a/findcmd.c
+++ b/findcmd.c
@@ -24,7 +24,7 @@
#include <stdio.h>
#include "chartypes.h"
#include "bashtypes.h"
-#ifndef _MINIX
+#if !defined (_MINIX) && defined (HAVE_SYS_FILE_H)
# include <sys/file.h>
#endif
#include "filecntl.h"
@@ -100,10 +100,7 @@ file_status (name)
/* We have to use access(2) to determine access because AFS does not
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);
+ return ((access (name, X_OK) == 0) ? (FS_EXISTS|FS_EXECABLE) : FS_EXISTS);
#else /* !AFS */
/* Find out if the file is actually executable. By definition, the
@@ -120,24 +117,20 @@ file_status (name)
g_mode_bits (finfo.st_mode) |
o_mode_bits (finfo.st_mode));
- if (X_BIT (bits))
- return (FS_EXISTS | FS_EXECABLE);
+ 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 && X_BIT (u_mode_bits (finfo.st_mode)))
- return (FS_EXISTS | FS_EXECABLE);
+ 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. */
- 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);
+ else if (group_member (finfo.st_gid))
+ return ((X_BIT (g_mode_bits (finfo.st_mode))) ? (FS_EXISTS | FS_EXECABLE) : FS_EXISTS);
- return (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 --git a/flags.c b/flags.c
index 8846ba30..0c0868bc 100644
--- a/flags.c
+++ b/flags.c
@@ -40,6 +40,8 @@ extern int set_job_control __P((int));
extern char *shell_name;
#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;
@@ -151,6 +153,17 @@ int privileged_mode = 0;
int brace_expansion = 1;
#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;
+
/* **************************************************************** */
/* */
/* The Flags ALIST. */
@@ -180,24 +193,22 @@ struct flags_alist shell_flags[] = {
{ 'u', &unbound_vars_is_error },
{ 'v', &echo_input_at_read },
{ 'x', &echo_command_at_execute },
- { 'C', &noclobber },
/* New flags that control non-standard things. */
#if 0
{ 'l', &lexical_scoping },
#endif
- { 'I', &no_invisible_vars },
-
- { 'P', &no_symbolic_links },
-
#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}
};
@@ -271,7 +282,7 @@ change_flag (flag, on_or_off)
#if defined (RESTRICTED_SHELL)
case 'r':
- if (on_or_off == FLAG_ON)
+ if (on_or_off == FLAG_ON && shell_initialized)
maybe_make_restricted (shell_name);
break;
#endif
@@ -310,7 +321,7 @@ reset_shell_flags ()
place_keywords_in_env = read_but_dont_execute = just_one_command = 0;
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;
+ no_symbolic_links = no_invisible_vars = privileged_mode = pipefail_opt = 0;
hashing_enabled = interactive_comments = 1;
diff --git a/flags.h b/flags.h
index decfe693..f16e6048 100644
--- a/flags.h
+++ b/flags.h
@@ -46,7 +46,8 @@ extern int
just_one_command, unbound_vars_is_error, echo_input_at_read,
echo_command_at_execute, no_invisible_vars, noclobber,
hashing_enabled, forced_interactive, privileged_mode,
- asynchronous_notification, interactive_comments, no_symbolic_links;
+ asynchronous_notification, interactive_comments, no_symbolic_links,
+ function_trace_mode, error_trace_mode, pipefail_opt;
#if 0
extern int lexical_scoping;
diff --git a/general.c b/general.c
index 446e42f4..df4b1133 100644
--- a/general.c
+++ b/general.c
@@ -1,6 +1,6 @@
/* general.c -- Stuff that is used by all files. */
-/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -36,6 +36,8 @@
#include "chartypes.h"
#include <errno.h>
+#include "bashintl.h"
+
#include "shell.h"
#include <tilde/tilde.h>
@@ -55,7 +57,7 @@ static int unquoted_tilde_word __P((const char *));
static void initialize_group_array __P((void));
/* A standard error message to use when getcwd() returns NULL. */
-char *bash_getcwd_errstr = "getcwd: cannot access parent directories";
+char *bash_getcwd_errstr = N_("getcwd: cannot access parent directories");
/* Do whatever is necessary to initialize `Posix mode'. */
void
@@ -224,30 +226,51 @@ check_identifier (word, check_word)
{
if ((word->flags & (W_HASDOLLAR|W_QUOTED)) || all_digits (word->word))
{
- internal_error ("`%s': not a valid identifier", 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);
+ internal_error (_("`%s': not a valid identifier"), word->word);
return (0);
}
else
return (1);
}
+/* 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)
+assignment (string, flags)
const char *string;
+ int flags;
{
register unsigned char c;
register int newi, indx;
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);
while (c = string[indx])
@@ -455,6 +478,29 @@ check_binary_file (sample, sample_len)
/* **************************************************************** */
/* */
+/* 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 */
/* */
/* **************************************************************** */
@@ -470,7 +516,16 @@ make_absolute (string, dot_path)
char *result;
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 --git a/general.h b/general.h
index 71f787c6..afc7fb04 100644
--- a/general.h
+++ b/general.h
@@ -1,6 +1,6 @@
/* general.h -- defines that everybody likes to use. */
-/* Copyright (C) 1993-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -277,7 +277,8 @@ extern int all_digits __P((char *));
extern int legal_number __P((char *, intmax_t *));
extern int legal_identifier __P((char *));
extern int check_identifier __P((WORD_DESC *, int));
-extern int assignment __P((const char *));
+extern int legal_alias_name __P((char *, int));
+extern int assignment __P((const char *, int));
extern int sh_unset_nodelay_mode __P((int));
extern int sh_validfd __P((int));
@@ -289,6 +290,9 @@ extern int check_binary_file __P((char *, int));
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 *));
extern int absolute_pathname __P((const char *));
extern int absolute_program __P((const char *));
diff --git a/include/gettext.h b/include/gettext.h
new file mode 100644
index 00000000..8b262f4c
--- /dev/null
+++ b/include/gettext.h
@@ -0,0 +1,69 @@
+/* Convenience header for conditional use of GNU <libintl.h>.
+ 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 <libintl.h>
+
+#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 <locale.h> a NOP. We don't include <libintl.h>
+ as well because people using "gettext.h" will not include <libintl.h>,
+ and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
+ is OK. */
+#if defined(__sun)
+# include <locale.h>
+#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 --git a/include/posixdir.h b/include/posixdir.h
index 505e2795..91f6d961 100644
--- a/include/posixdir.h
+++ b/include/posixdir.h
@@ -25,7 +25,11 @@
#if defined (HAVE_DIRENT_H)
# include <dirent.h>
-# define D_NAMLEN(d) (strlen ((d)->d_name))
+# 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)
# include <sys/ndir.h>
@@ -42,11 +46,11 @@
# define D_NAMLEN(d) ((d)->d_namlen)
#endif /* !HAVE_DIRENT_H */
-#if defined (STRUCT_DIRENT_HAS_D_INO) && !defined (STRUCT_DIRENT_HAS_D_FILENO)
+#if defined (HAVE_STRUCT_DIRENT_D_INO) && !defined (HAVE_STRUCT_DIRENT_D_FILENO)
# define d_fileno d_ino
#endif
-#if defined (_POSIX_SOURCE) && (!defined (STRUCT_DIRENT_HAS_D_INO) || defined (BROKEN_DIRENT_D_INO))
+#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. */
# define REAL_DIR_ENTRY(dp) 1
diff --git a/include/shmbutil.h b/include/shmbutil.h
index 7fe2f8ea..a737780c 100644
--- a/include/shmbutil.h
+++ b/include/shmbutil.h
@@ -1,6 +1,6 @@
/* shmbutil.h -- utility functions for multibyte characters. */
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -23,53 +23,21 @@
#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: <wchar.h> must be included before <wctype.h>. */
-#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H)
-# include <wchar.h>
-# include <wctype.h>
-# 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 <limits.h>
-# 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 */
-/************************************************/
+/* Include config.h for HANDLE_MULTIBYTE */
+#include <config.h>
#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 */
#undef MB_LEN_MAX
@@ -81,6 +49,11 @@ extern char *xstrchr __P((const char *, int));
#undef xstrchr
#define xstrchr(s, c) strchr(s, c)
+#ifndef MB_INVALIDCH
+#define MB_INVALIDCH(x) (0)
+#define MB_NULLWCH(x) (0)
+#endif
+
#endif /* !HANDLE_MULTIBYTE */
/* Declare and initialize a multibyte state. Call must be terminated
@@ -120,6 +93,8 @@ extern char *xstrchr __P((const char *, int));
state = state_bak; \
(_i)++; \
} \
+ else if (mblength == 0) \
+ (_i)++; \
else \
(_i) += mblength; \
} \
@@ -160,6 +135,89 @@ extern char *xstrchr __P((const char *, int));
# define ADVANCE_CHAR_P(_str, _strsize)
#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. */
#if defined (HANDLE_MULTIBYTE)
@@ -344,4 +402,31 @@ extern char *xstrchr __P((const char *, int));
# define SADD_MBCHAR(_dst, _src, _si, _srcsize)
#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 --git a/include/stdc.h b/include/stdc.h
index 05b743e5..efab869e 100644
--- a/include/stdc.h
+++ b/include/stdc.h
@@ -66,7 +66,7 @@
#endif /* !__STDC__ */
#ifndef __attribute__
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
# define __attribute__(x)
# endif
#endif
diff --git a/input.c b/input.c
index 9cb5401d..c4f335d5 100644
--- a/input.c
+++ b/input.c
@@ -21,7 +21,7 @@
#include "config.h"
#include "bashtypes.h"
-#ifndef _MINIX
+#if !defined (_MINIX) && defined (HAVE_SYS_FILE_H)
# include <sys/file.h>
#endif
#include "filecntl.h"
@@ -34,6 +34,8 @@
#endif
#include "bashansi.h"
+#include "bashintl.h"
+
#include "command.h"
#include "general.h"
#include "input.h"
@@ -226,7 +228,7 @@ save_bash_input (fd, new_fd)
if (nfd == -1)
{
if (fcntl (fd, F_GETFD, 0) == 0)
- sys_error ("cannot allocate new file descriptor for bash input from fd %d", fd);
+ sys_error (_("cannot allocate new file descriptor for bash input from fd %d"), fd);
return -1;
}
@@ -234,7 +236,7 @@ save_bash_input (fd, new_fd)
{
/* 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);
+ internal_error (_("save_bash_input: buffer already exists for new fd %d"), nfd);
free_buffered_stream (buffers[nfd]);
}
@@ -276,8 +278,13 @@ int
check_bash_input (fd)
int fd;
{
- if (fd > 0 && fd_is_bash_input (fd))
- return ((save_bash_input (fd, -1) == -1) ? -1 : 0);
+ 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 --git a/jobs.c b/jobs.c
index 2bcb3ac9..8418267b 100644
--- a/jobs.c
+++ b/jobs.c
@@ -3,7 +3,7 @@
/* This file works with both POSIX and BSD systems. It implements job
control. */
-/* Copyright (C) 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1989-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -39,7 +39,10 @@
# include <sys/resource.h>
#endif /* !_POSIX_VERSION && HAVE_SYS_RESOURCE_H && HAVE_WAIT3 && !RLIMTYPE */
-#include <sys/file.h>
+#if defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+#endif
+
#include "filecntl.h"
#include <sys/ioctl.h>
#include <sys/param.h>
@@ -72,6 +75,7 @@
#endif /* !STRUCT_WINSIZE_IN_SYS_IOCTL */
#include "bashansi.h"
+#include "bashintl.h"
#include "shell.h"
#include "jobs.h"
#include "flags.h"
@@ -127,6 +131,8 @@ extern int errno;
/* Some systems let waitpid(2) tell callers about stopped children. */
#if !defined (WCONTINUED)
# define WCONTINUED 0
+#endif
+#if !defined (WIFCONTINUED)
# define WIFCONTINUED(s) (0)
#endif
@@ -142,7 +148,8 @@ extern void rl_set_screen_size __P((int, int));
/* Variables used here but defined in other files. */
extern int subshell_environment, line_number;
extern int posixly_correct, shell_level;
-extern int interrupt_immediately, last_command_exit_value;
+extern int interrupt_immediately;
+extern int last_command_exit_value, last_command_exit_signal;
extern int loop_level, breaking;
extern int sourcelevel;
extern sh_builtin_func_t *this_shell_builtin;
@@ -223,6 +230,7 @@ static PROCESS *find_pipeline __P((pid_t, int, int *));
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));
static pid_t find_last_pid __P((int, int));
@@ -235,7 +243,9 @@ static int most_recent_job_in_state __P((int, JOB_STATE));
static int find_job __P((pid_t, int));
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));
static WAIT raw_job_exit_status __P((int));
@@ -466,6 +476,7 @@ stop_pipeline (async, deferred)
}
/* Scan from the last slot backward, looking for the next free one. */
+ /* XXX - revisit this interactive assumption */
if (interactive)
{
for (i = job_slots; i; i--)
@@ -680,7 +691,7 @@ delete_job (job_index, warn_stopped)
return;
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);
+ internal_warning (_("deleting stopped job %d with process group %ld"), job_index+1, (long)jobs[job_index]->pgrp);
temp = jobs[job_index];
if (job_index == current_job || job_index == previous_job)
@@ -988,12 +999,27 @@ describe_pid (pid)
if (job != NO_JOB)
printf ("[%d] %ld\n", job + 1, (long)pid);
else
- programming_error ("describe_pid: %ld: no such pid", (long)pid);
+ programming_error (_("describe_pid: %ld: no such pid"), (long)pid);
UNBLOCK_CHILD (oset);
}
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;
PROCESS *p;
@@ -1019,9 +1045,9 @@ printable_job_status (j, p, format)
else
{
if (WIFSTOPPED (p->status))
- temp = strsignal (WSTOPSIG (p->status));
+ temp = j_strsignal (WSTOPSIG (p->status));
else if (WIFSIGNALED (p->status))
- temp = strsignal (WTERMSIG (p->status));
+ temp = j_strsignal (WTERMSIG (p->status));
else if (WIFEXITED (p->status))
{
temp = retcode_name_buffer;
@@ -1333,22 +1359,19 @@ make_child (command, async_p)
shells. */
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);
+
+ /* 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);
- }
+ if (pipeline_pgrp == mypid)
+ pipe_read (pgrp_pipe);
#endif
}
else /* Without job control... */
@@ -1607,7 +1630,7 @@ wait_for_single_pid (pid)
if (child == 0)
{
- internal_error ("wait: pid %ld is not a child of this shell", (long)pid);
+ internal_error (_("wait: pid %ld is not a child of this shell"), (long)pid);
return (127);
}
@@ -1725,6 +1748,13 @@ wait_sigint_handler (sig)
}
static int
+process_exit_signal (status)
+ WAIT status;
+{
+ return (WIFSIGNALED (status) ? WTERMSIG (status) : 0);
+}
+
+static int
process_exit_status (status)
WAIT status;
{
@@ -1743,6 +1773,16 @@ raw_job_exit_status (job)
int job;
{
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)
;
return (p->status);
@@ -1758,6 +1798,13 @@ job_exit_status (job)
return (process_exit_status (raw_job_exit_status (job)));
}
+static int
+job_exit_signal (job)
+ int job;
+{
+ return (process_exit_signal (raw_job_exit_status (job)));
+}
+
#define FIND_CHILD(pid, child) \
do \
{ \
@@ -1766,7 +1813,7 @@ job_exit_status (job)
{ \
give_terminal_to (shell_pgrp, 0); \
UNBLOCK_CHILD (oset); \
- internal_error ("wait_for: No record of process %ld", (long)pid); \
+ internal_error (_("wait_for: No record of process %ld"), (long)pid); \
restore_sigint_handler (); \
return (termination_state = 127); \
} \
@@ -1885,11 +1932,12 @@ wait_for (pid)
/* 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);
+ 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))
{
@@ -1949,7 +1997,7 @@ if (job == NO_JOB)
/* 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)
+ if (check_window_size && (job == current_job || IS_FOREGROUND (job)))
get_new_window_size (0);
}
else
@@ -2012,7 +2060,7 @@ wait_for_job (job)
BLOCK_CHILD(set, oset);
if (JOBSTATE (job) == JSTOPPED)
- internal_warning ("wait_for_job: job %d is stopped", job+1);
+ internal_warning (_("wait_for_job: job %d is stopped"), job+1);
pid = find_last_pid (job, 0);
UNBLOCK_CHILD(oset);
@@ -2234,7 +2282,7 @@ start_job (job, foreground)
if (DEADJOB (job))
{
- internal_error ("%s: job has terminated", this_command_name);
+ internal_error (_("%s: job has terminated"), this_command_name);
UNBLOCK_CHILD (oset);
return (-1);
}
@@ -2243,7 +2291,7 @@ start_job (job, foreground)
if (foreground == 0 && already_running)
{
- internal_error ("%s: bg background job?", this_command_name);
+ internal_error (_("%s: job %d already in background"), this_command_name, job + 1);
UNBLOCK_CHILD (oset);
return (-1);
}
@@ -2733,6 +2781,7 @@ run_sigchld_trap (nchild)
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);
unwind_protect_int (jobs_list_frozen);
@@ -2742,8 +2791,8 @@ run_sigchld_trap (nchild)
/* We have to add the commands this way because they will be run
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);
+ add_unwind_protect (xfree, trap_command);
+ add_unwind_protect (maybe_set_sigchld_trap, trap_command);
subst_assign_varlist = (WORD_LIST *)NULL;
the_pipeline = (PROCESS *)NULL;
@@ -2753,7 +2802,7 @@ run_sigchld_trap (nchild)
for (i = 0; i < nchild; i++)
{
interrupt_immediately = 1;
- parse_and_execute (savestring (trap_command), "trap", SEVAL_NOHIST);
+ parse_and_execute (savestring (trap_command), "trap", SEVAL_NOHIST|SEVAL_RESETLINE);
}
run_unwind_frame ("SIGCHLD trap");
@@ -2800,11 +2849,21 @@ notify_of_job_status ()
((DEADJOB (job) && IS_FOREGROUND (job) == 0) || STOPPED (job)))
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
startup_state == 2, we were started to run `-c command', so
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,
hang onto the job corresponding to the last asynchronous
@@ -2828,7 +2887,8 @@ notify_of_job_status ()
#endif
signal_is_trapped (termsig) == 0)
{
- fprintf (stderr, "%s: line %d: ", get_name_for_error (), line_number);
+ /* 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);
}
else if (IS_FOREGROUND (job))
@@ -2839,7 +2899,7 @@ notify_of_job_status ()
if (termsig && WIFSIGNALED (s) && termsig != SIGINT && termsig != SIGPIPE)
#endif
{
- fprintf (stderr, "%s", strsignal (termsig));
+ fprintf (stderr, "%s", j_strsignal (termsig));
if (WIFCORED (s))
fprintf (stderr, " (core dumped)");
@@ -2975,7 +3035,7 @@ initialize_job_control (force)
}
}
if (job_control == 0)
- internal_error ("no job control in this shell");
+ internal_error (_("no job control in this shell"));
}
if (shell_tty != fileno (stderr))
@@ -3374,6 +3434,12 @@ set_job_control (arg)
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 --git a/jobs.h b/jobs.h
index 1e21f8cb..bcfaf18c 100644
--- a/jobs.h
+++ b/jobs.h
@@ -1,6 +1,6 @@
/* jobs.h -- structures and stuff used by the jobs.c file. */
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -95,6 +95,7 @@ typedef struct job {
#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. */
#define NO_PID (pid_t)-1
diff --git a/lib/glob/glob.c b/lib/glob/glob.c
index 27099f76..a62054e8 100644
--- a/lib/glob/glob.c
+++ b/lib/glob/glob.c
@@ -62,6 +62,10 @@
# endif /* __STDC__ */
#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));
@@ -118,7 +122,6 @@ glob_pattern_p (pattern)
const char *pattern;
{
#if HANDLE_MULTIBYTE
- mbstate_t ps;
size_t n;
wchar_t *wpattern;
int r;
@@ -127,15 +130,14 @@ glob_pattern_p (pattern)
return (internal_glob_pattern_p (pattern));
/* Convert strings to wide chars, and call the multibyte version. */
- memset (&ps, '\0', sizeof (ps));
- n = xmbsrtowcs (NULL, (const char **)&pattern, 0, &ps);
+ 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));
- 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
return (internal_glob_pattern_p (pattern));
@@ -174,50 +176,36 @@ static int
mbskipname (pat, dname)
char *pat, *dname;
{
- char *pat_bak, *dn_bak;
+ int ret;
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);
+ 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)
{
- 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 `..' */
if (noglob_dot_filenames == 0 && pat_wc[0] != L'.' &&
(pat_wc[0] != L'\\' || pat_wc[1] != L'.') &&
(dn_wc[0] == L'.' &&
(dn_wc[1] == L'\0' || (dn_wc[1] == L'.' && dn_wc[2] == L'\0'))))
- return 1;
+ ret = 1;
/* If a leading dot must be explicity matched, check to see if the
pattern and dirname both have one. */
else if (noglob_dot_filenames && dn_wc[0] == L'.' &&
pat_wc[0] != L'.' &&
(pat_wc[0] != L'\\' || pat_wc[1] != L'.'))
- return 1;
+ ret = 1;
}
- return 0;
+ FREE (pat_wc);
+ FREE (dn_wc);
+
+ return ret;
}
#endif /* HANDLE_MULTIBYTE */
@@ -235,7 +223,7 @@ udequote_pathname (pathname)
pathname[j++] = pathname[i++];
- if (!pathname[i - 1])
+ if (pathname[i - 1] == 0)
break;
}
pathname[j] = '\0';
@@ -250,22 +238,16 @@ wdequote_pathname (pathname)
mbstate_t ps;
size_t len, n;
wchar_t *wpathname;
- char *pathname_bak;
int i, j;
+ wchar_t *orig_wpathname;
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);
+ n = xdupmbstowcs (&wpathname, NULL, pathname);
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);
+ orig_wpathname = wpathname;
for (i = j = 0; wpathname && wpathname[i]; )
{
@@ -274,7 +256,7 @@ wdequote_pathname (pathname)
wpathname[j++] = wpathname[i++];
- if (!wpathname[i - 1])
+ if (wpathname[i - 1] == L'\0')
break;
}
wpathname[j] = L'\0';
@@ -283,6 +265,9 @@ wdequote_pathname (pathname)
memset (&ps, '\0', sizeof(mbstate_t));
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);
}
static void
@@ -373,6 +358,9 @@ glob_vector (pat, dir, flags)
return ((char **) &glob_error_return);
nextlink = (struct globval *)alloca (sizeof (struct globval));
+ if (nextlink == NULL)
+ return ((char **) NULL);
+
nextlink->next = (struct globval *)0;
nextname = (char *) malloc (1);
if (nextname == 0)
@@ -418,10 +406,15 @@ glob_vector (pat, dir, flags)
{
free (nextname);
nextlink = (struct globval *)alloca (sizeof (struct globval));
- nextlink->next = (struct globval *)0;
- lastlink = nextlink;
- nextlink->name = npat;
- count = 1;
+ if (nextlink)
+ {
+ nextlink->next = (struct globval *)0;
+ lastlink = nextlink;
+ nextlink->name = npat;
+ count = 1;
+ }
+ else
+ lose = 1;
}
else
{
@@ -480,6 +473,11 @@ glob_vector (pat, dir, flags)
if (REAL_DIR_ENTRY (dp) == 0)
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))
continue;
@@ -490,14 +488,14 @@ glob_vector (pat, dir, flags)
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)
+ nextlink = (struct globval *) alloca (sizeof (struct globval));
+ if (nextlink == 0 || nextname == 0)
{
lose = 1;
break;
}
+ nextlink->next = lastlink;
lastlink = nextlink;
nextlink->name = nextname;
bcopy (dp->d_name, nextname, D_NAMLEN (dp) + 1);
@@ -631,6 +629,7 @@ glob_filename (pathname, flags)
unsigned int result_size;
char *directory_name, *filename;
unsigned int directory_len;
+ int free_dirname; /* flag */
result = (char **) malloc (sizeof (char *));
result_size = 1;
@@ -639,6 +638,8 @@ glob_filename (pathname, flags)
result[0] = NULL;
+ directory_name = NULL;
+
/* Find the filename. */
filename = strrchr (pathname, '/');
if (filename == NULL)
@@ -646,15 +647,20 @@ glob_filename (pathname, flags)
filename = pathname;
directory_name = "";
directory_len = 0;
+ free_dirname = 0;
}
else
{
directory_len = (filename - pathname) + 1;
- directory_name = (char *) alloca (directory_len + 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;
}
/* If directory_name contains globbing characters, then we
@@ -669,6 +675,12 @@ glob_filename (pathname, flags)
directories = glob_filename (directory_name, flags & ~GX_MARKDIRS);
+ if (free_dirname)
+ {
+ free (directory_name);
+ directory_name = NULL;
+ }
+
if (directories == NULL)
goto memory_error;
else if (directories == (char **)&glob_error_return)
@@ -746,6 +758,8 @@ glob_filename (pathname, flags)
if (result[0] == NULL)
goto memory_error;
bcopy (directory_name, result[0], directory_len + 1);
+ if (free_dirname)
+ free (directory_name);
result[1] = NULL;
return (result);
}
@@ -770,9 +784,16 @@ glob_filename (pathname, flags)
flags & ~GX_MARKDIRS);
if (temp_results == NULL || temp_results == (char **)&glob_error_return)
- return (temp_results);
+ {
+ if (free_dirname)
+ free (directory_name);
+ return (temp_results);
+ }
- return (glob_dir_to_array (directory_name, temp_results, flags));
+ result = glob_dir_to_array (directory_name, temp_results, flags);
+ if (free_dirname)
+ free (directory_name);
+ return (result);
}
/* We get to memory_error if the program has run out of memory, or
@@ -786,6 +807,9 @@ glob_filename (pathname, flags)
free ((char *) result);
}
+ if (free_dirname && directory_name)
+ free (directory_name);
+
QUIT;
return (NULL);
diff --git a/lib/glob/sm_loop.c b/lib/glob/sm_loop.c
index 3760fb2f..a8b70f73 100644
--- a/lib/glob/sm_loop.c
+++ b/lib/glob/sm_loop.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -16,14 +16,15 @@
with Bash; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
-static int FCT __P((CHAR *, CHAR *, int));
+int FCT __P((CHAR *, CHAR *, int));
+
static int GMATCH __P((CHAR *, CHAR *, CHAR *, CHAR *, int));
static CHAR *PARSE_COLLSYM __P((CHAR *, INT *));
static CHAR *BRACKMATCH __P((CHAR *, U_CHAR, int));
static int EXTMATCH __P((INT, CHAR *, CHAR *, CHAR *, CHAR *, int));
static CHAR *PATSCAN __P((CHAR *, CHAR *, INT));
-static int
+int
FCT (pattern, string, flags)
CHAR *pattern;
CHAR *string;
@@ -134,6 +135,19 @@ fprintf(stderr, "gmatch: pattern = %s; pe = %s\n", pattern, pe);
if ((flags & FNM_PATHNAME) && sc == L('/'))
/* 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('?'))
{
if (sc == L('\0'))
diff --git a/lib/glob/smatch.c b/lib/glob/smatch.c
index 8c54702b..d0b7403d 100644
--- a/lib/glob/smatch.c
+++ b/lib/glob/smatch.c
@@ -362,44 +362,25 @@ xstrmatch (pattern, string, flags)
{
#if HANDLE_MULTIBYTE
int ret;
- mbstate_t ps;
size_t n;
- char *pattern_bak;
wchar_t *wpattern, *wstring;
if (MB_CUR_MAX == 1)
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);
+ n = xdupmbstowcs (&wpattern, NULL, pattern);
if (n == (size_t)-1 || n == (size_t)-2)
- {
- free (pattern_bak);
- return (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags));
- }
+ 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);
+ n = xdupmbstowcs (&wstring, NULL, string);
if (n == (size_t)-1 || n == (size_t)-2)
{
free (wpattern);
- ret = internal_strmatch (pattern_bak, string, flags);
- free (pattern_bak);
- return ret;
+ return (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags));
}
- 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);
diff --git a/lib/glob/strmatch.c b/lib/glob/strmatch.c
index b72fb7db..4d9c68d0 100644
--- a/lib/glob/strmatch.c
+++ b/lib/glob/strmatch.c
@@ -24,13 +24,9 @@
#include "stdc.h"
#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
+#if defined (HAVE_MULTIBYTE)
+extern int internal_wstrmatch __P((wchar_t *, wchar_t *, int));
#endif
int
@@ -45,6 +41,20 @@ strmatch (pattern, string, flags)
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
main (c, v)
int c;
diff --git a/lib/glob/strmatch.h b/lib/glob/strmatch.h
index d31e5929..74714446 100644
--- a/lib/glob/strmatch.h
+++ b/lib/glob/strmatch.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,11 +19,7 @@ not, write to the Free Software Foundation, Inc.,
#ifndef _STRMATCH_H
#define _STRMATCH_H 1
-#ifdef HAVE_LIBC_FNM_EXTMATCH
-
-#include <fnmatch.h>
-
-#else /* !HAVE_LIBC_FNM_EXTMATCH */
+#include <config.h>
#include "stdc.h"
@@ -59,6 +55,8 @@ not, write to the Free Software Foundation, Inc.,
returning zero if it matches, FNM_NOMATCH if not. */
extern int strmatch __P((char *, char *, int));
-#endif /* !HAVE_LIBC_FNM_EXTMATCH */
+#if HANDLE_MULTIBYTE
+extern int wcsmatch __P((wchar_t *, wchar_t *, int));
+#endif
#endif /* _STRMATCH_H */
diff --git a/lib/glob/xmbsrtowcs.c b/lib/glob/xmbsrtowcs.c
index abd2093b..f1703bcc 100644
--- a/lib/glob/xmbsrtowcs.c
+++ b/lib/glob/xmbsrtowcs.c
@@ -54,27 +54,25 @@ xmbsrtowcs (dest, src, len, pstate)
ps = &local_state;
}
- n = strlen(*src) + 1;
+ n = strlen(*src);
if (dest == NULL)
{
wchar_t *wsbuf;
- char *mbsbuf, *mbsbuf_top;
+ const char *mbs;
mbstate_t psbuf;
wsbuf = (wchar_t *) malloc ((n + 1) * sizeof(wchar_t));
- mbsbuf_top = mbsbuf = (char *) malloc (n + 1);
- memcpy(mbsbuf, *src, n + 1);
+ mbs = *src;
psbuf = *ps;
- wclength = mbsrtowcs (wsbuf, (const char **)&mbsbuf, n, &psbuf);
+ wclength = mbsrtowcs (wsbuf, &mbs, n, &psbuf);
free (wsbuf);
- free (mbsbuf_top);
return wclength;
}
- for(wclength = 0; wclength < len; wclength++, dest++)
+ for (wclength = 0; wclength < len; wclength++, dest++)
{
if(mbsinit(ps))
{
@@ -113,4 +111,135 @@ xmbsrtowcs (dest, src, len, pstate)
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 --git a/lib/intl/ChangeLog b/lib/intl/ChangeLog
new file mode 100644
index 00000000..eed2d21a
--- /dev/null
+++ b/lib/intl/ChangeLog
@@ -0,0 +1,4 @@
+2003-05-22 GNU <bug-gnu-gettext@gnu.org>
+
+ * Version 0.12.1 released.
+
diff --git a/lib/intl/Makefile.in b/lib/intl/Makefile.in
new file mode 100644
index 00000000..70bafc9c
--- /dev/null
+++ b/lib/intl/Makefile.in
@@ -0,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 --git a/lib/intl/VERSION b/lib/intl/VERSION
new file mode 100644
index 00000000..13031835
--- /dev/null
+++ b/lib/intl/VERSION
@@ -0,0 +1 @@
+GNU gettext library from gettext-0.12.1
diff --git a/lib/intl/bindtextdom.c b/lib/intl/bindtextdom.c
new file mode 100644
index 00000000..250f5e86
--- /dev/null
+++ b/lib/intl/bindtextdom.c
@@ -0,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 <config.h>
+#endif
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+#include "gettextP.h"
+
+#ifdef _LIBC
+/* We have to handle multi-threaded applications. */
+# include <bits/libc-lock.h>
+#else
+/* Provide dummy implementation if this is outside glibc. */
+# define __libc_rwlock_define(CLASS, NAME)
+# define __libc_rwlock_wrlock(NAME)
+# define __libc_rwlock_unlock(NAME)
+#endif
+
+/* 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 <stddef.h>. */
+#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 --git a/lib/intl/config.charset b/lib/intl/config.charset
new file mode 100755
index 00000000..32becece
--- /dev/null
+++ b/lib/intl/config.charset
@@ -0,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 <st001906@hrz1.hrz.tu-darmstadt.de>"
+ echo "# and Bruno Haible <bruno@clisp.org>."
+ 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 --git a/lib/intl/dcgettext.c b/lib/intl/dcgettext.c
new file mode 100644
index 00000000..ca6a1c82
--- /dev/null
+++ b/lib/intl/dcgettext.c
@@ -0,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 <config.h>
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#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 --git a/lib/intl/dcigettext.c b/lib/intl/dcigettext.c
new file mode 100644
index 00000000..f6edb95c
--- /dev/null
+++ b/lib/intl/dcigettext.c
@@ -0,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 <string.h> to provide a prototype for mempcpy().
+ This must come before <config.h> because <config.h> may include
+ <features.h>, and once <features.h> has been included, it's too late. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+# define HAVE_ALLOCA 1
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# if defined HAVE_ALLOCA_H || defined _LIBC
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
+
+#include <errno.h>
+#ifndef errno
+extern int errno;
+#endif
+#ifndef __set_errno
+# define __set_errno(val) errno = (val)
+#endif
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if defined HAVE_UNISTD_H || defined _LIBC
+# include <unistd.h>
+#endif
+
+#include <locale.h>
+
+#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 <signal.h>
+#endif
+
+#if defined HAVE_SYS_PARAM_H || defined _LIBC
+# include <sys/param.h>
+#endif
+
+#include "gettextP.h"
+#include "plural-exp.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+#include "hash-string.h"
+
+/* Thread safetyness. */
+#ifdef _LIBC
+# include <bits/libc-lock.h>
+#else
+/* Provide dummy implementation if this is outside glibc. */
+# define __libc_lock_define_initialized(CLASS, NAME)
+# define __libc_lock_lock(NAME)
+# define __libc_lock_unlock(NAME)
+# define __libc_rwlock_define_initialized(CLASS, NAME)
+# define __libc_rwlock_rdlock(NAME)
+# define __libc_rwlock_unlock(NAME)
+#endif
+
+/* 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 <stddef.h>. */
+#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 <limits.h>
+#endif
+
+#ifndef _POSIX_PATH_MAX
+# define _POSIX_PATH_MAX 255
+#endif
+
+#if !defined PATH_MAX && defined _PC_PATH_MAX
+# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
+#endif
+
+/* Don't include sys/param.h if it already has been. */
+#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
+# include <sys/param.h>
+#endif
+
+#if !defined PATH_MAX && defined MAXPATHLEN
+# define PATH_MAX MAXPATHLEN
+#endif
+
+#ifndef PATH_MAX
+# define PATH_MAX _POSIX_PATH_MAX
+#endif
+
+/* 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 <search.h>
+
+static void *root;
+
+# ifdef _LIBC
+# define tsearch __tsearch
+# endif
+
+/* Function to compare two entries in the table of known translations. */
+static int transcmp 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 --git a/lib/intl/dcngettext.c b/lib/intl/dcngettext.c
new file mode 100644
index 00000000..3a3404e2
--- /dev/null
+++ b/lib/intl/dcngettext.c
@@ -0,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 <config.h>
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#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 --git a/lib/intl/dgettext.c b/lib/intl/dgettext.c
new file mode 100644
index 00000000..cf5b4037
--- /dev/null
+++ b/lib/intl/dgettext.c
@@ -0,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 <config.h>
+#endif
+
+#include <locale.h>
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#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 --git a/lib/intl/dngettext.c b/lib/intl/dngettext.c
new file mode 100644
index 00000000..67fd030f
--- /dev/null
+++ b/lib/intl/dngettext.c
@@ -0,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 <config.h>
+#endif
+
+#include <locale.h>
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#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 --git a/lib/intl/eval-plural.h b/lib/intl/eval-plural.h
new file mode 100644
index 00000000..19c7ca6a
--- /dev/null
+++ b/lib/intl/eval-plural.h
@@ -0,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 --git a/lib/intl/explodename.c b/lib/intl/explodename.c
new file mode 100644
index 00000000..2985064c
--- /dev/null
+++ b/lib/intl/explodename.c
@@ -0,0 +1,192 @@
+/* Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU 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 <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+
+#include "loadinfo.h"
+
+/* On some strange systems still no definition of NULL is found. Sigh! */
+#ifndef NULL
+# if defined __STDC__ && __STDC__
+# define NULL ((void *) 0)
+# else
+# define NULL 0
+# endif
+#endif
+
+/* @@ end of prolog @@ */
+
+char *
+_nl_find_language (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 --git a/lib/intl/finddomain.c b/lib/intl/finddomain.c
new file mode 100644
index 00000000..d2427644
--- /dev/null
+++ b/lib/intl/finddomain.c
@@ -0,0 +1,195 @@
+/* Handle list of needed message catalogs
+ Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@gnu.org>, 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 <config.h>
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if defined HAVE_UNISTD_H || defined _LIBC
+# include <unistd.h>
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#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 --git a/lib/intl/gettext.c b/lib/intl/gettext.c
new file mode 100644
index 00000000..43d689f5
--- /dev/null
+++ b/lib/intl/gettext.c
@@ -0,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 <config.h>
+#endif
+
+#ifdef _LIBC
+# define __need_NULL
+# include <stddef.h>
+#else
+# include <stdlib.h> /* Just for NULL. */
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#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 --git a/lib/intl/gettextP.h b/lib/intl/gettextP.h
new file mode 100644
index 00000000..f1748a35
--- /dev/null
+++ b/lib/intl/gettextP.h
@@ -0,0 +1,224 @@
+/* Header describing internals of libintl library.
+ Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@cygnus.com>, 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 <stddef.h> /* Get size_t. */
+
+#ifdef _LIBC
+# include "../iconv/gconv_int.h"
+#else
+# if HAVE_ICONV
+# include <iconv.h>
+# 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 <byteswap.h>
+# 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 --git a/lib/intl/gmo.h b/lib/intl/gmo.h
new file mode 100644
index 00000000..d1fe4d6b
--- /dev/null
+++ b/lib/intl/gmo.h
@@ -0,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 <limits.h>
+
+/* @@ 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 <limits.h>) have 64+-bit integral types. */
+
+#ifndef UINT_MAX
+# define UINT_MAX UINT_MAX_32_BITS
+#endif
+
+#if UINT_MAX == UINT_MAX_32_BITS
+typedef unsigned nls_uint32;
+#else
+# if USHRT_MAX == UINT_MAX_32_BITS
+typedef unsigned short nls_uint32;
+# else
+# if ULONG_MAX == UINT_MAX_32_BITS
+typedef unsigned long nls_uint32;
+# else
+ /* The following line is intended to throw an error. Using #error is
+ not portable enough. */
+ "Cannot determine unsigned 32-bit data type."
+# endif
+# endif
+#endif
+
+
+/* Header for binary .mo file format. */
+struct mo_file_header
+{
+ /* The magic number. */
+ nls_uint32 magic;
+ /* The revision number of the file format. */
+ nls_uint32 revision;
+
+ /* The 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 --git a/lib/intl/hash-string.h b/lib/intl/hash-string.h
new file mode 100644
index 00000000..b267a877
--- /dev/null
+++ b/lib/intl/hash-string.h
@@ -0,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 --git a/lib/intl/intl-compat.c b/lib/intl/intl-compat.c
new file mode 100644
index 00000000..36b7af0f
--- /dev/null
+++ b/lib/intl/intl-compat.c
@@ -0,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 <config.h>
+#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 <libintl.h> 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 --git a/lib/intl/l10nflist.c b/lib/intl/l10nflist.c
new file mode 100644
index 00000000..ec8713f8
--- /dev/null
+++ b/lib/intl/l10nflist.c
@@ -0,0 +1,453 @@
+/* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU 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 <string.h> to provide a prototype for stpcpy().
+ This must come before <config.h> because <config.h> may include
+ <features.h>, and once <features.h> has been included, it's too late. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <string.h>
+
+#if defined _LIBC || defined HAVE_ARGZ_H
+# include <argz.h>
+#endif
+#include <ctype.h>
+#include <sys/types.h>
+#include <stdlib.h>
+
+#include "loadinfo.h"
+
+/* On some strange systems still no definition of NULL is found. Sigh! */
+#ifndef NULL
+# if defined __STDC__ && __STDC__
+# define NULL ((void *) 0)
+# else
+# define NULL 0
+# endif
+#endif
+
+/* @@ end of prolog @@ */
+
+#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 --git a/lib/intl/libgnuintl.h.in b/lib/intl/libgnuintl.h.in
new file mode 100644
index 00000000..f596cfcb
--- /dev/null
+++ b/lib/intl/libgnuintl.h.in
@@ -0,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 <locale.h>
+
+/* 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, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5)
+ then includes <libintl.h> (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 --git a/lib/intl/loadinfo.h b/lib/intl/loadinfo.h
new file mode 100644
index 00000000..1d3ba616
--- /dev/null
+++ b/lib/intl/loadinfo.h
@@ -0,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 <drepper@cygnus.com>, 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 --git a/lib/intl/loadmsgcat.c b/lib/intl/loadmsgcat.c
new file mode 100644
index 00000000..8509bd34
--- /dev/null
+++ b/lib/intl/loadmsgcat.c
@@ -0,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 <string.h> to provide a prototype for mempcpy().
+ This must come before <config.h> because <config.h> may include
+ <features.h>, and once <features.h> has been included, it's too late. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#ifdef __GNUC__
+# undef alloca
+# define alloca __builtin_alloca
+# define HAVE_ALLOCA 1
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# if defined HAVE_ALLOCA_H || defined _LIBC
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+
+#if defined HAVE_UNISTD_H || defined _LIBC
+# include <unistd.h>
+#endif
+
+#ifdef _LIBC
+# include <langinfo.h>
+# include <locale.h>
+#endif
+
+#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
+ || (defined _LIBC && defined _POSIX_MAPPED_FILES)
+# include <sys/mman.h>
+# undef HAVE_MMAP
+# define HAVE_MMAP 1
+#else
+# undef HAVE_MMAP
+#endif
+
+#if defined HAVE_STDINT_H_WITH_UINTMAX || defined _LIBC
+# include <stdint.h>
+#endif
+#if defined HAVE_INTTYPES_H || defined _LIBC
+# include <inttypes.h>
+#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 <inttypes.h>.
+ 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 <fcntl.h>. */
+#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 --git a/lib/intl/localcharset.c b/lib/intl/localcharset.c
new file mode 100644
index 00000000..d04d0536
--- /dev/null
+++ b/lib/intl/localcharset.c
@@ -0,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 <bruno@clisp.org>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* Specification. */
+#include "localcharset.h"
+
+#if HAVE_STDDEF_H
+# include <stddef.h>
+#endif
+
+#include <stdio.h>
+#if HAVE_STRING_H
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+#if HAVE_STDLIB_H
+# include <stdlib.h>
+#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 <langinfo.h>
+# else
+# if HAVE_SETLOCALE
+# include <locale.h>
+# endif
+# endif
+#elif defined WIN32
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+#if defined OS2
+# define INCL_DOS
+# include <os2.h>
+#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 --git a/lib/intl/localcharset.h b/lib/intl/localcharset.h
new file mode 100644
index 00000000..3b137e73
--- /dev/null
+++ b/lib/intl/localcharset.h
@@ -0,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 --git a/lib/intl/locale.alias b/lib/intl/locale.alias
new file mode 100644
index 00000000..bd7b9b31
--- /dev/null
+++ b/lib/intl/locale.alias
@@ -0,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 --git a/lib/intl/localealias.c b/lib/intl/localealias.c
new file mode 100644
index 00000000..7c4ce58f
--- /dev/null
+++ b/lib/intl/localealias.c
@@ -0,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 <string.h> to provide a prototype for mempcpy().
+ This must come before <config.h> because <config.h> may include
+ <features.h>, and once <features.h> has been included, it's too late. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <stdio.h>
+#if defined _LIBC || defined HAVE___FSETLOCKING
+# include <stdio_ext.h>
+#endif
+#include <sys/types.h>
+
+#ifdef __GNUC__
+# undef alloca
+# define alloca __builtin_alloca
+# define HAVE_ALLOCA 1
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# if defined HAVE_ALLOCA_H || defined _LIBC
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+
+#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 <bits/libc-lock.h>
+
+__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 --git a/lib/intl/localename.c b/lib/intl/localename.c
new file mode 100644
index 00000000..faacecd5
--- /dev/null
+++ b/lib/intl/localename.c
@@ -0,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 <drepper@gnu.org>, 1995. */
+/* Win32 code written by Tor Lillqvist <tml@iki.fi>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <locale.h>
+
+#if defined _WIN32 || defined __WIN32__
+# undef WIN32 /* avoid warning on mingw32 */
+# define WIN32
+#endif
+
+#ifdef WIN32
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+/* 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 --git a/lib/intl/log.c b/lib/intl/log.c
new file mode 100644
index 00000000..9c84791b
--- /dev/null
+++ b/lib/intl/log.c
@@ -0,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 <bruno@clisp.org>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* 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 --git a/lib/intl/ngettext.c b/lib/intl/ngettext.c
new file mode 100644
index 00000000..17a27f4a
--- /dev/null
+++ b/lib/intl/ngettext.c
@@ -0,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 <config.h>
+#endif
+
+#ifdef _LIBC
+# define __need_NULL
+# include <stddef.h>
+#else
+# include <stdlib.h> /* Just for NULL. */
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+#include <locale.h>
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define NGETTEXT __ngettext
+# define DCNGETTEXT __dcngettext
+#else
+# define NGETTEXT 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 --git a/lib/intl/os2compat.c b/lib/intl/os2compat.c
new file mode 100644
index 00000000..c8dc33e7
--- /dev/null
+++ b/lib/intl/os2compat.c
@@ -0,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 <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <sys/param.h>
+
+/* 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 --git a/lib/intl/os2compat.h b/lib/intl/os2compat.h
new file mode 100644
index 00000000..4f74e8c0
--- /dev/null
+++ b/lib/intl/os2compat.h
@@ -0,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 --git a/lib/intl/osdep.c b/lib/intl/osdep.c
new file mode 100644
index 00000000..b3725983
--- /dev/null
+++ b/lib/intl/osdep.c
@@ -0,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 --git a/lib/intl/plural-exp.c b/lib/intl/plural-exp.c
new file mode 100644
index 00000000..c937c011
--- /dev/null
+++ b/lib/intl/plural-exp.c
@@ -0,0 +1,156 @@
+/* Expression parsing for plural form selection.
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@cygnus.com>, 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 <config.h>
+#endif
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+
+#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 --git a/lib/intl/plural-exp.h b/lib/intl/plural-exp.h
new file mode 100644
index 00000000..9e5d1658
--- /dev/null
+++ b/lib/intl/plural-exp.h
@@ -0,0 +1,126 @@
+/* Expression parsing and evaluation for plural form selection.
+ Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@cygnus.com>, 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 --git a/lib/intl/plural.c b/lib/intl/plural.c
new file mode 100644
index 00000000..3a4fa20c
--- /dev/null
+++ b/lib/intl/plural.c
@@ -0,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 <drepper@cygnus.com>, 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 <config.h>
+ because <config.h> may include arbitrary system headers. */
+#if defined _AIX && !defined __GNUC__
+ #pragma alloca
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stddef.h>
+#include <stdlib.h>
+#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 <stdlib.h> /* 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 <stddef.h> /* 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 <stdio.h> /* 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 --git a/lib/intl/plural.y b/lib/intl/plural.y
new file mode 100644
index 00000000..616b7c11
--- /dev/null
+++ b/lib/intl/plural.y
@@ -0,0 +1,409 @@
+%{
+/* Expression parsing for plural form selection.
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@cygnus.com>, 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 <config.h>
+ because <config.h> may include arbitrary system headers. */
+#if defined _AIX && !defined __GNUC__
+ #pragma alloca
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stddef.h>
+#include <stdlib.h>
+#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 <op> EQUOP2 CMPOP2 ADDOP2 MULOP2
+%token <num> NUMBER
+%type <exp> 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 --git a/lib/intl/ref-add.sin b/lib/intl/ref-add.sin
new file mode 100644
index 00000000..167374e3
--- /dev/null
+++ b/lib/intl/ref-add.sin
@@ -0,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 <haible@clisp.cons.org>.
+#
+/^# Packages using this file: / {
+ s/# Packages using this file://
+ ta
+ :a
+ s/ @PACKAGE@ / @PACKAGE@ /
+ tb
+ s/ $/ @PACKAGE@ /
+ :b
+ s/^/# Packages using this file:/
+}
diff --git a/lib/intl/ref-del.sin b/lib/intl/ref-del.sin
new file mode 100644
index 00000000..613cf37f
--- /dev/null
+++ b/lib/intl/ref-del.sin
@@ -0,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 <haible@clisp.cons.org>.
+#
+/^# Packages using this file: / {
+ s/# Packages using this file://
+ s/ @PACKAGE@ / /
+ s/^/# Packages using this file:/
+}
diff --git a/lib/intl/relocatable.c b/lib/intl/relocatable.c
new file mode 100644
index 00000000..16f79a52
--- /dev/null
+++ b/lib/intl/relocatable.c
@@ -0,0 +1,439 @@
+/* Provide relocatable packages.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 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 <stdio.h> to provide a prototype for getline().
+ This must come before <config.h> because <config.h> may include
+ <features.h>, and once <features.h> has been included, it's too late. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+/* Specification. */
+#include "relocatable.h"
+
+#if ENABLE_RELOCATABLE
+
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef NO_XMALLOC
+# define xmalloc malloc
+#else
+# include "xmalloc.h"
+#endif
+
+#if DEPENDS_ON_LIBCHARSET
+# include <libcharset.h>
+#endif
+#if DEPENDS_ON_LIBICONV && HAVE_ICONV
+# include <iconv.h>
+#endif
+#if DEPENDS_ON_LIBINTL && ENABLE_NLS
+# include <libintl.h>
+#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 --git a/lib/intl/relocatable.h b/lib/intl/relocatable.h
new file mode 100644
index 00000000..d141200a
--- /dev/null
+++ b/lib/intl/relocatable.h
@@ -0,0 +1,67 @@
+/* Provide relocatable packages.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 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 --git a/lib/intl/textdomain.c b/lib/intl/textdomain.c
new file mode 100644
index 00000000..f259c696
--- /dev/null
+++ b/lib/intl/textdomain.c
@@ -0,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 <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+#include "gettextP.h"
+
+#ifdef _LIBC
+/* We have to handle multi-threaded applications. */
+# include <bits/libc-lock.h>
+#else
+/* Provide dummy implementation if this is outside glibc. */
+# define __libc_rwlock_define(CLASS, NAME)
+# define __libc_rwlock_wrlock(NAME)
+# define __libc_rwlock_unlock(NAME)
+#endif
+
+/* 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 --git a/lib/malloc/Makefile.in b/lib/malloc/Makefile.in
index 91549c9c..d013dc79 100644
--- a/lib/malloc/Makefile.in
+++ b/lib/malloc/Makefile.in
@@ -46,9 +46,16 @@ LDFLAGS = @LDFLAGS@
DEFS = @DEFS@
LOCAL_DEFS = @LOCAL_DEFS@
+LIBBUILD = ${BUILD_DIR}/lib
+
BASHINCDIR = ${topdir}/include
-INCLUDES = -I. -I../.. -I$(topdir) -I$(BASHINCDIR) -I$(topdir)/lib
+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) \
$(CFLAGS) $(MALLOC_CFLAGS) $(CPPFLAGS)
@@ -116,6 +123,12 @@ trace.o: ${srcdir}/imalloc.h
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
stub.o: stub.c
malloc.o: malloc.c
diff --git a/lib/malloc/getpagesize.h b/lib/malloc/getpagesize.h
index 0bc5ef91..835f5da7 100644
--- a/lib/malloc/getpagesize.h
+++ b/lib/malloc/getpagesize.h
@@ -1,5 +1,5 @@
/* Emulation of getpagesize() for systems that need it.
- Copyright (C) 1991 Free Software Foundation, Inc.
+ Copyright (C) 1991-2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/malloc/imalloc.h b/lib/malloc/imalloc.h
index 3920ce99..72ba65a9 100644
--- a/lib/malloc/imalloc.h
+++ b/lib/malloc/imalloc.h
@@ -1,6 +1,6 @@
/* imalloc.h -- internal malloc definitions shared by source files. */
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -159,4 +159,10 @@ do { \
memcpy ((dest), (src), (nbytes)) \
} while(0)
+#if defined (SHELL)
+# include "bashintl.h"
+#else
+# define _(x) x
+#endif
+
#endif /* _IMALLOC_H */
diff --git a/lib/malloc/malloc.c b/lib/malloc/malloc.c
index 0b4c8470..60cbfabd 100644
--- a/lib/malloc/malloc.c
+++ b/lib/malloc/malloc.c
@@ -1,6 +1,6 @@
/* malloc.c - dynamic memory allocation for bash. */
-/* Copyright (C) 1985, 1987, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1985-2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -236,7 +236,7 @@ static unsigned long binsizes[NBUCKETS] = {
8192UL, 16384UL, 32768UL, 65536UL, 131072UL, 262144UL, 524288UL,
1048576UL, 2097152UL, 4194304UL, 8388608UL, 16777216UL, 33554432UL,
67108864UL, 134217728UL, 268435456UL, 536870912UL, 1073741824UL,
- 2147483648UL, 4294967296UL-1
+ 2147483648UL, 4294967295UL
};
/* binsizes[x] == (1 << ((x) + 3)) */
@@ -291,8 +291,11 @@ extern void mtrace_free __P((PTR_T, int, const char *, int));
#if !defined (botch)
static void
botch (s, file, line)
+ const char *s;
+ const char *file;
+ int line;
{
- fprintf (stderr, "malloc: failed assertion: %s\n", s);
+ fprintf (stderr, _("malloc: failed assertion: %s\n"), s);
(void)fflush (stderr);
abort ();
}
@@ -308,7 +311,7 @@ xbotch (mem, e, s, file, line)
const char *file;
int line;
{
- fprintf (stderr, "\r\nmalloc: %s:%d: assertion botched\r\n",
+ fprintf (stderr, _("\r\nmalloc: %s:%d: assertion botched\r\n"),
file ? file : "unknown", line);
#ifdef MALLOC_REGISTER
if (mem != NULL && malloc_register)
@@ -734,7 +737,7 @@ internal_malloc (n, file, line, flags) /* get a block */
/* If not for this check, we would gobble a clobbered free chain ptr
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);
+ 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. */
p->mh_alloc = ISALLOC;
@@ -811,10 +814,10 @@ internal_free (mem, file, line, flags)
{
if (p->mh_alloc == ISFREE)
xbotch (mem, ERR_DUPFREE,
- "free: called with already freed block argument", file, line);
+ _("free: called with already freed block argument"), file, line);
else
xbotch (mem, ERR_UNALLOC,
- "free: called with unallocated block argument", file, line);
+ _("free: called with unallocated block argument"), file, line);
}
ASSERT (p->mh_magic2 == MAGIC2);
@@ -833,13 +836,13 @@ internal_free (mem, file, line, flags)
if (IN_BUCKET(nbytes, nunits) == 0)
xbotch (mem, ERR_UNDERFLOW,
- "free: underflow detected; mh_nbytes out of range", file, line);
+ _("free: underflow detected; mh_nbytes out of range"), file, line);
ap += p->mh_nbytes;
z = mg.s;
*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);
+ xbotch (mem, ERR_ASSERT_FAILED, _("free: start and end chunk sizes differ"), file, line);
#if 1
if (nunits >= LESSCORE_MIN && ((char *)p + binsize(nunits) == memtop))
@@ -879,6 +882,7 @@ internal_free (mem, file, line, flags)
busy[nunits] = 0;
free_return:
+ ; /* Empty statement in case this is the end of the function */
#ifdef MALLOC_STATS
_mstats.nmalloc[nunits]--;
@@ -935,7 +939,7 @@ internal_realloc (mem, n, file, line, flags)
if (p->mh_alloc != ISALLOC)
xbotch (mem, ERR_UNALLOC,
- "realloc: called with unallocated block argument", file, line);
+ _("realloc: called with unallocated block argument"), file, line);
ASSERT (p->mh_magic2 == MAGIC2);
nbytes = ALLOCATED_BYTES(p->mh_nbytes);
@@ -950,13 +954,13 @@ internal_realloc (mem, n, file, line, flags)
original number of bytes requested. */
if (IN_BUCKET(nbytes, nunits) == 0)
xbotch (mem, ERR_UNDERFLOW,
- "realloc: underflow detected; mh_nbytes out of range", file, line);
+ _("realloc: underflow detected; mh_nbytes out of range"), file, line);
m = (char *)mem + (tocopy = p->mh_nbytes);
z = mg.s;
*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);
+ xbotch (mem, ERR_ASSERT_FAILED, _("realloc: start and end chunk sizes differ"), file, line);
#ifdef MALLOC_WATCH
if (_malloc_nwatch > 0)
diff --git a/lib/malloc/mstats.h b/lib/malloc/mstats.h
index d2376355..31537444 100644
--- a/lib/malloc/mstats.h
+++ b/lib/malloc/mstats.h
@@ -1,6 +1,6 @@
/* mstats.h - definitions for malloc statistics */
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/malloc/shmalloc.h b/lib/malloc/shmalloc.h
index 85cb5cef..812bb419 100644
--- a/lib/malloc/shmalloc.h
+++ b/lib/malloc/shmalloc.h
@@ -1,6 +1,6 @@
/* Functions (currently) for use by the shell to do malloc debugging and
tracking. */
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -53,6 +53,7 @@ extern PTR_T sh_valloc __P((size_t, const char *, int));
/* trace.c */
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 */
extern void mregister_dump_table __P((void));
diff --git a/lib/malloc/stats.c b/lib/malloc/stats.c
index 52b23aef..18c3cef5 100644
--- a/lib/malloc/stats.c
+++ b/lib/malloc/stats.c
@@ -1,6 +1,6 @@
/* stats.c - malloc statistics */
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -35,6 +35,8 @@ extern int malloc_free_blocks __P((int));
extern struct _malstats _mstats;
+extern FILE *_imalloc_fopen __P((char *, char *, char *, char *, size_t));
+
struct bucket_stats
malloc_bucket_stats (size)
int size;
@@ -129,14 +131,37 @@ fprint_malloc_stats (s, fp)
_print_malloc_stats (s, fp);
}
-#define TRACEROOT "/var/tmp/maltrace/trace."
-static char mallbuf[1024];
+#define TRACEROOT "/var/tmp/maltrace/stats."
void
trace_malloc_stats (s, fn)
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;
FILE *fp;
@@ -144,8 +169,8 @@ trace_malloc_stats (s, fn)
l = (long)getpid ();
if (fn == 0)
{
- sprintf (defname, "%s%ld", TRACEROOT, l);
- fp = fopen(defname, "w");
+ sprintf (defbuf, "%s%ld", def, l);
+ fp = fopen(defbuf, "w");
}
else
{
@@ -171,14 +196,7 @@ trace_malloc_stats (s, fn)
*p = '\0';
fp = fopen (fname, "w");
}
-
- if (fp)
- {
- setvbuf (fp, mallbuf, _IOFBF, sizeof (mallbuf));
- _print_malloc_stats (s, fp);
- fflush(fp);
- fclose(fp);
- }
-}
-#endif /* MALLOC_STATS */
+ return fp;
+}
+#endif /* MALLOC_STATS || MALLOC_TRACE */
diff --git a/lib/malloc/stub.c b/lib/malloc/stub.c
index 94693d8e..770e3f93 100644
--- a/lib/malloc/stub.c
+++ b/lib/malloc/stub.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
diff --git a/lib/malloc/table.c b/lib/malloc/table.c
index 051b5738..ee37b3a7 100644
--- a/lib/malloc/table.c
+++ b/lib/malloc/table.c
@@ -1,6 +1,6 @@
/* table.c - bookkeeping functions for allocated memory */
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -172,14 +172,14 @@ mregister_alloc (tag, mem, size, file, line)
if (tentry == 0)
{
/* oops. table is full. punt. */
- fprintf (stderr, "register_alloc: alloc table is full with FIND_ALLOC?\n");
+ fprintf (stderr, _("register_alloc: alloc table is full with FIND_ALLOC?\n"));
return;
}
if (tentry->flags & MT_ALLOC)
{
/* oops. bad bookkeeping. ignore for now */
- fprintf (stderr, "register_alloc: %p already in table as allocated?\n", mem);
+ fprintf (stderr, _("register_alloc: %p already in table as allocated?\n"), mem);
}
tentry->mem = mem;
@@ -215,7 +215,7 @@ mregister_free (mem, size, file, line)
if (tentry->flags & MT_FREE)
{
/* oops. bad bookkeeping. ignore for now */
- fprintf (stderr, "register_free: %p already in table as free?\n", mem);
+ fprintf (stderr, _("register_free: %p already in table as free?\n"), mem);
}
tentry->flags = MT_FREE;
diff --git a/lib/malloc/table.h b/lib/malloc/table.h
index 9b2cddd6..0d22376b 100644
--- a/lib/malloc/table.h
+++ b/lib/malloc/table.h
@@ -1,6 +1,6 @@
/* table.h - definitions for tables for keeping track of allocated memory */
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/malloc/trace.c b/lib/malloc/trace.c
index ddd62f0e..9dc34df2 100644
--- a/lib/malloc/trace.c
+++ b/lib/malloc/trace.c
@@ -1,6 +1,6 @@
/* trace.c - tracing functions for malloc */
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -29,6 +29,8 @@ extern int malloc_trace;
static int _mtrace_verbose = 0;
+extern FILE *_imalloc_fopen __P((char *, char *, char *, char *, size_t));
+
#ifdef MALLOC_TRACE
FILE *_mtrace_fp = NULL;
@@ -101,3 +103,20 @@ malloc_trace_bin (n)
_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 --git a/lib/malloc/watch.c b/lib/malloc/watch.c
index 6594a3f8..11ab744d 100644
--- a/lib/malloc/watch.c
+++ b/lib/malloc/watch.c
@@ -1,6 +1,6 @@
/* watch.c - watchpoint functions for malloc */
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -43,17 +43,17 @@ watch_warn (addr, file, line, type, data)
char *tag;
if (type == W_ALLOC)
- tag = "allocated";
+ tag = _("allocated");
else if (type == W_FREE)
- tag = "freed";
+ tag = _("freed");
else if (type == W_REALLOC)
- tag = "requesting resize";
+ tag = _("requesting resize");
else if (type == W_RESIZED)
- tag = "just resized";
+ tag = _("just resized");
else
- tag = "bug: unknown operation";
+ tag = _("bug: unknown operation");
- fprintf (stderr, "malloc: watch alert: %p %s ", addr, tag);
+ fprintf (stderr, _("malloc: watch alert: %p %s "), addr, tag);
if (data != (unsigned long)-1)
fprintf (stderr, "(size %lu) ", data);
fprintf (stderr, "from '%s:%d'\n", file ? file : "unknown", line);
diff --git a/lib/malloc/watch.h b/lib/malloc/watch.h
index d66d80e6..757bbd2f 100644
--- a/lib/malloc/watch.h
+++ b/lib/malloc/watch.h
@@ -1,6 +1,6 @@
/* watch.h - definitions for tables for keeping track of allocated memory */
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/malloc/xmalloc.c b/lib/malloc/xmalloc.c
index b037222a..ab7c91ad 100644
--- a/lib/malloc/xmalloc.c
+++ b/lib/malloc/xmalloc.c
@@ -1,6 +1,6 @@
/* xmalloc.c -- safe versions of malloc and realloc */
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2003 Free Software Foundation, Inc.
This file is part of GNU Readline, a library for reading lines
of text with interactive input and history editing.
diff --git a/lib/readline/Makefile.in b/lib/readline/Makefile.in
index 2caa69a3..a1183043 100644
--- a/lib/readline/Makefile.in
+++ b/lib/readline/Makefile.in
@@ -20,6 +20,14 @@
# along with this program; if not, write to the Free Software
# 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@
topdir = @top_srcdir@
@@ -345,7 +353,7 @@ search.o: search.c
shell.o: shell.c
signals.o: signals.c
terminal.o: terminal.c
-text.o: terminal.c
+text.o: text.c
tilde.o: tilde.c
undo.o: undo.c
util.o: util.c
diff --git a/lib/readline/bind.c b/lib/readline/bind.c
index 65ef401e..15d0e4e3 100644
--- a/lib/readline/bind.c
+++ b/lib/readline/bind.c
@@ -19,8 +19,13 @@
is generally kept in a file called COPYING or LICENSE. If you do not
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 <floss.h>
+#endif
+
#if defined (HAVE_CONFIG_H)
# include <config.h>
#endif
@@ -148,6 +153,34 @@ rl_bind_key_in_map (key, function, map)
return (result);
}
+/* 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. */
int
@@ -200,9 +233,30 @@ rl_unbind_command_in_map (command, map)
}
/* 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;
rl_command_func_t *function;
@@ -211,6 +265,40 @@ rl_set_key (keyseq, function, map)
return (rl_generic_bind (ISFUNC, keyseq, (char *)function, map));
}
+/* 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
necessary. The initial place to do bindings is in MAP. */
@@ -311,7 +399,7 @@ rl_generic_bind (type, keyseq, data, map)
mapped to something, `abc' to be mapped to something else,
and the function bound to `a' to be executed when the user
types `abx', leaving `bx' in the input queue. */
- if (k.function /* && k.type == ISFUNC */)
+ if (k.function && ((k.type == ISFUNC && k.function != rl_do_lowercase_version) || k.type == ISMACR))
{
map[ANYOTHERKEY] = k;
k.function = 0;
@@ -912,9 +1000,15 @@ parser_else (args)
return 0;
}
+#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;
@@ -1161,7 +1255,7 @@ rl_parse_and_bind (string)
}
/* If this is a new-style key-binding, then do the binding with
- rl_set_key (). Otherwise, let the older code deal with it. */
+ rl_bind_keyseq (). Otherwise, let the older code deal with it. */
if (*string == '"')
{
char *seq;
@@ -1200,7 +1294,7 @@ rl_parse_and_bind (string)
rl_macro_bind (seq, &funname[1], _rl_keymap);
}
else
- rl_set_key (seq, rl_named_function (funname), _rl_keymap);
+ rl_bind_keyseq (seq, rl_named_function (funname));
free (seq);
return 0;
@@ -1281,6 +1375,7 @@ static struct {
{ "prefer-visible-bell", &_rl_prefer_visible_bell, V_SPECIAL },
{ "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 },
#endif /* VISIBLE_STATS */
@@ -1650,7 +1745,7 @@ rl_get_keymap_name_from_edit_mode ()
/* Each of the following functions produces information about the
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 (). */
+ be read back in (i.e., passed to rl_parse_and_bind ()). */
/* Print the names of functions known to Readline. */
void
@@ -2112,28 +2207,6 @@ rl_dump_variables (count, key)
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);
- }
-}
-
/* Return non-zero if any members of ARRAY are a substring in STRING. */
static int
substring_member_of_array (string, array)
diff --git a/lib/readline/callback.c b/lib/readline/callback.c
index a8f4323c..5b05ea5c 100644
--- a/lib/readline/callback.c
+++ b/lib/readline/callback.c
@@ -131,7 +131,7 @@ rl_callback_read_char ()
if (in_handler == 0 && rl_linefunc)
_rl_callback_newline ();
}
- if (rl_pending_input)
+ if (rl_pending_input || _rl_pushed_input_available ())
eof = readline_internal_char ();
else
break;
diff --git a/lib/readline/chardefs.h b/lib/readline/chardefs.h
index a537be22..cb04c982 100644
--- a/lib/readline/chardefs.h
+++ b/lib/readline/chardefs.h
@@ -77,7 +77,11 @@
# define isxdigit(c) (isdigit((c)) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F'))
#endif
-#define NON_NEGATIVE(c) ((unsigned char)(c) == (c))
+#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. */
#undef ISPRINT
diff --git a/lib/readline/complete.c b/lib/readline/complete.c
index 21a9d708..d212f618 100644
--- a/lib/readline/complete.c
+++ b/lib/readline/complete.c
@@ -1,6 +1,6 @@
/* complete.c -- filename completion for readline. */
-/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2004 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -28,7 +28,7 @@
#include <sys/types.h>
#include <fcntl.h>
#if defined (HAVE_SYS_FILE_H)
-#include <sys/file.h>
+# include <sys/file.h>
#endif
#if defined (HAVE_UNISTD_H)
@@ -99,12 +99,16 @@ rl_compdisp_func_t *rl_completion_display_matches_hook = (rl_compdisp_func_t *)N
static int stat_char PARAMS((char *));
#endif
+static int path_isdir PARAMS((const char *));
+
static char *rl_quote_filename PARAMS((char *, int, char *));
static void set_completion_defaults PARAMS((int));
static int get_y_or_n PARAMS((int));
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 *));
static char **gen_completion_matches PARAMS((char *, int, int, rl_compentry_func_t *, int, int));
@@ -130,6 +134,10 @@ static char *make_quoted_replacement PARAMS((char *, int, char *));
/* If non-zero, non-unique completions always show the list of matches. */
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;
@@ -214,7 +222,12 @@ const char *rl_basic_quote_characters = "\"'";
/* The list of characters that signal a break between words for
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;
+/*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.
Completion occurs on the entire substring, and within the substring
@@ -282,6 +295,19 @@ int rl_completion_suppress_append = 0;
default is a space. */
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
mark-directories variable (which is user-settable). This exists so
@@ -320,6 +346,8 @@ rl_complete (ignore, invoking_key)
return (rl_complete_internal ('?'));
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));
}
@@ -352,6 +380,8 @@ rl_completion_mode (cfunc)
return '?';
else if (_rl_complete_show_all)
return '!';
+ else if (_rl_complete_show_unmodified)
+ return '@';
else
return TAB;
}
@@ -372,7 +402,7 @@ set_completion_defaults (what_to_do)
rl_filename_completion_desired = 0;
rl_filename_quoting_desired = 1;
rl_completion_type = what_to_do;
- rl_completion_suppress_append = 0;
+ rl_completion_suppress_append = rl_completion_suppress_quote = 0;
/* The completion entry function may optionally change this. */
rl_completion_mark_symlink_dirs = _rl_complete_mark_symlink_dirs;
@@ -423,6 +453,15 @@ _rl_internal_pager (lines)
return 0;
}
+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.
`@' for symbolic links
@@ -520,53 +559,140 @@ printable_part (pathname)
return ++temp;
}
+/* 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. */
-#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
+ int printed_len, extension_char, slen, tlen;
char *s, c, *new_full_pathname;
- int extension_char, slen, tlen;
- for (s = to_print; *s; s++)
- {
- PUTX (*s);
- }
+ extension_char = 0;
+ printed_len = fnprint (to_print);
- if (rl_filename_completion_desired && rl_visible_stats)
+#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
path passed. In this case, we try to expand the directory
@@ -593,7 +719,13 @@ print_filename (to_print, full_pathname)
new_full_pathname[slen] = '/';
strcpy (new_full_pathname + slen + 1, to_print);
- extension_char = stat_char (new_full_pathname);
+#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);
to_print[-1] = c;
@@ -601,7 +733,13 @@ print_filename (to_print, full_pathname)
else
{
s = tilde_expand (full_pathname);
- extension_char = stat_char (s);
+#if defined (VISIBLE_STATS)
+ if (rl_visible_stats)
+ extension_char = stat_char (s);
+ else
+#endif
+ if (path_isdir (s))
+ extension_char = '/';
}
free (s);
@@ -611,7 +749,7 @@ print_filename (to_print, full_pathname)
printed_len++;
}
}
-#endif /* VISIBLE_STATS */
+
return printed_len;
}
@@ -651,19 +789,32 @@ _rl_find_completion_word (fp, dp)
int *fp, *dp;
{
int scan, end, found_quote, delimiter, pass_next, isbrk;
- char quote_char;
+ char quote_char, *brkchars;
end = rl_point;
found_quote = delimiter = 0;
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)
{
/* We have a list of characters which can be used in pairs to
quote substrings for the completer. Try to find the start
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)
{
@@ -721,7 +872,7 @@ _rl_find_completion_word (fp, dp)
{
scan = rl_line_buffer[rl_point];
- if (strchr (rl_completer_word_break_characters, scan) == 0)
+ if (strchr (brkchars, scan) == 0)
continue;
/* Call the application-specific function to tell us whether
@@ -749,9 +900,9 @@ _rl_find_completion_word (fp, dp)
if (rl_char_is_quoted_p)
isbrk = (found_quote == 0 ||
(*rl_char_is_quoted_p) (rl_line_buffer, rl_point) == 0) &&
- strchr (rl_completer_word_break_characters, scan) != 0;
+ strchr (brkchars, scan) != 0;
else
- isbrk = strchr (rl_completer_word_break_characters, scan) != 0;
+ isbrk = strchr (brkchars, scan) != 0;
if (isbrk)
{
@@ -786,6 +937,9 @@ gen_completion_matches (text, start, end, our_func, found_quote, quote_char)
{
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
variable rl_attempted_completion_function. */
@@ -889,6 +1043,7 @@ compute_lcd_of_matches (match_list, matches, text)
{
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;
mbstate_t ps1, ps2;
@@ -980,6 +1135,26 @@ compute_lcd_of_matches (match_list, matches, text)
the user typed in the face of multiple matches differing in case. */
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);
@@ -999,6 +1174,8 @@ compute_lcd_of_matches (match_list, matches, text)
else
/* otherwise, just use the text the user typed. */
strncpy (match_list[0], text, low);
+
+ FREE (dtext);
}
else
strncpy (match_list[0], match_list[1], low);
@@ -1203,7 +1380,7 @@ display_matches (matches)
for (max = 0, i = 1; matches[i]; i++)
{
temp = printable_part (matches[i]);
- len = strlen (temp);
+ len = fnwidth (temp);
if (len > max)
max = len;
@@ -1338,7 +1515,8 @@ append_to_match (text, delimiter, quote_char, nontrivial_match)
struct stat finfo;
temp_string_index = 0;
- if (quote_char && rl_point && rl_line_buffer[rl_point - 1] != quote_char)
+ 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;
if (delimiter)
@@ -1449,7 +1627,9 @@ _rl_free_match_list (matches)
TAB means do standard completion.
`*' means insert all of the possible completions.
`!' means to do standard completion, and list all possible completions if
- there is more than one. */
+ 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)
int what_to_do;
@@ -1468,7 +1648,6 @@ rl_complete_internal (what_to_do)
our_func = rl_completion_entry_function
? rl_completion_entry_function
: rl_filename_completion_function;
-
/* We now look backwards for the start of a filename/variable word. */
end = rl_point;
found_quote = delimiter = 0;
@@ -1516,6 +1695,7 @@ rl_complete_internal (what_to_do)
{
case TAB:
case '!':
+ case '@':
/* Insert the first match with proper quoting. */
if (*matches[0])
insert_match (matches[0], start, matches[1] ? MULT_MATCH : SINGLE_MATCH, &quote_char);
@@ -1535,6 +1715,12 @@ rl_complete_internal (what_to_do)
display_matches (matches);
break;
}
+ else if (what_to_do == '@')
+ {
+ if (nontrivial_lcd == 0)
+ display_matches (matches);
+ break;
+ }
else if (rl_editing_mode != vi_mode)
rl_ding (); /* There are other matches remaining. */
}
diff --git a/lib/readline/display.c b/lib/readline/display.c
index 5150ea6a..0ff428e4 100644
--- a/lib/readline/display.c
+++ b/lib/readline/display.c
@@ -1,6 +1,6 @@
/* display.c -- readline redisplay facility. */
-/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2004 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -70,7 +70,7 @@ static void insert_some_chars PARAMS((char *, int, int));
static void cr PARAMS((void));
#if defined (HANDLE_MULTIBYTE)
-static int _rl_col_width PARAMS((char *, int, int));
+static int _rl_col_width PARAMS((const char *, int, int));
static int *_rl_wrapped_line;
#else
# define _rl_col_width(l, s, e) (((e) <= (s)) ? 0 : (e) - (s))
@@ -178,12 +178,15 @@ static int prompt_invis_chars_first_line;
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
a placeholder for expansion. LIP, if non-null is a place to store the
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 first prompt line. The previous are used as byte counts -- indexes
+ into a character buffer. */
/* Current implementation:
\001 (^A) start non-visible characters
@@ -193,19 +196,25 @@ static int prompt_last_screen_line;
\002 are assumed to be `visible'. */
static char *
-expand_prompt (pmt, lp, lip, niflp)
+expand_prompt (pmt, lp, lip, niflp, vlp)
char *pmt;
- int *lp, *lip, *niflp;
+ int *lp, *lip, *niflp, *vlp;
{
char *r, *ret, *p;
- int l, rl, last, ignoring, ninvis, invfl;
+ int l, rl, last, ignoring, ninvis, invfl, ind, pind, physchars;
/* Short-circuit if we can. */
- if (strchr (pmt, RL_PROMPT_START_IGNORE) == 0)
+ 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;
}
@@ -214,7 +223,7 @@ expand_prompt (pmt, lp, lip, niflp)
invfl = 0; /* invisible chars in first line of prompt */
- for (rl = ignoring = last = ninvis = 0, p = pmt; p && *p; p++)
+ for (rl = ignoring = last = ninvis = physchars = 0, p = pmt; p && *p; p++)
{
/* This code strips the invisible character string markers
RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE */
@@ -231,13 +240,35 @@ expand_prompt (pmt, lp, lip, niflp)
}
else
{
- *r++ = *p;
- if (!ignoring)
- rl++;
+#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
- ninvis++;
- if (rl == _rl_screenwidth)
+#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++;
}
}
@@ -251,6 +282,8 @@ expand_prompt (pmt, lp, lip, niflp)
*lip = last;
if (niflp)
*niflp = invfl;
+ if (vlp)
+ *vlp = physchars;
return ret;
}
@@ -262,7 +295,7 @@ _rl_strip_prompt (pmt)
{
char *ret;
- ret = expand_prompt (pmt, (int *)NULL, (int *)NULL, (int *)NULL);
+ ret = expand_prompt (pmt, (int *)NULL, (int *)NULL, (int *)NULL, (int *)NULL);
return ret;
}
@@ -306,7 +339,8 @@ rl_expand_prompt (prompt)
/* The prompt is only one logical line, though it might wrap. */
local_prompt = expand_prompt (prompt, &prompt_visible_length,
&prompt_last_invisible,
- &prompt_invis_chars_first_line);
+ &prompt_invis_chars_first_line,
+ &prompt_physical_chars);
local_prompt_prefix = (char *)0;
return (prompt_visible_length);
}
@@ -316,13 +350,15 @@ rl_expand_prompt (prompt)
t = ++p;
local_prompt = expand_prompt (p, &prompt_visible_length,
&prompt_last_invisible,
- &prompt_invis_chars_first_line);
+ (int *)NULL,
+ (int *)NULL);
c = *t; *t = '\0';
/* The portion of the prompt string up to and including the
final newline is now null-terminated. */
local_prompt_prefix = expand_prompt (prompt, &prompt_prefix_length,
(int *)NULL,
- &prompt_invis_chars_first_line);
+ &prompt_invis_chars_first_line,
+ &prompt_physical_chars);
*t = c;
return (prompt_prefix_length);
}
@@ -381,7 +417,7 @@ rl_redisplay ()
register int in, out, c, linenum, cursor_linenum;
register char *line;
int c_pos, inv_botlin, lb_botlin, lb_linenum;
- int newlines, lpos, temp;
+ int newlines, lpos, temp, modmark;
char *prompt_this_line;
#if defined (HANDLE_MULTIBYTE)
wchar_t wc;
@@ -411,10 +447,12 @@ rl_redisplay ()
/* 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;
}
/* If someone thought that the redisplay was handled, but the currently
@@ -468,7 +506,7 @@ rl_redisplay ()
}
}
- pmtlen = strlen (prompt_this_line);
+ prompt_physical_chars = pmtlen = strlen (prompt_this_line);
temp = pmtlen + out + 2;
if (temp >= line_size)
{
@@ -527,7 +565,12 @@ rl_redisplay ()
/* 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);
#endif
@@ -546,15 +589,13 @@ rl_redisplay ()
prompt_invis_chars_first_line variable could be made into an array
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? */
+ prompts that exceed two physical lines?
+ Additional logic fix from Edward Catmur <ed@catmur.co.uk> */
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);
-
+ ((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;
}
@@ -586,7 +627,7 @@ rl_redisplay ()
#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
{
- if (wc_bytes == (size_t)-1 || wc_bytes == (size_t)-2)
+ if (MB_INVALIDCH (wc_bytes))
{
/* Byte sequence is invalid or shortened. Assume that the
first byte represents a character. */
@@ -595,12 +636,12 @@ rl_redisplay ()
wc_width = 1;
memset (&ps, 0, sizeof (mbstate_t));
}
- else if (wc_bytes == (size_t)0)
+ else if (MB_NULLWCH (wc_bytes))
break; /* Found '\0' */
else
{
temp = wcwidth (wc);
- wc_width = (temp < 0) ? 1 : temp;
+ wc_width = (temp >= 0) ? temp : 1;
}
}
#endif
@@ -867,7 +908,7 @@ rl_redisplay ()
#endif
_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);
+ _rl_last_c_pos = _rl_col_width (local_prompt, 0, nleft);
else
_rl_last_c_pos = nleft;
}
@@ -1069,12 +1110,12 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
memset (&ps, 0, sizeof (mbstate_t));
ret = mbrtowc (&wc, new, MB_CUR_MAX, &ps);
- if (ret == (size_t)-1 || ret == (size_t)-2)
+ if (MB_INVALIDCH (ret))
{
tempwidth = 1;
ret = 1;
}
- else if (ret == 0)
+ else if (MB_NULLWCH (ret))
tempwidth = 0;
else
tempwidth = wcwidth (wc);
@@ -1091,7 +1132,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
ret = mbrtowc (&wc, old, MB_CUR_MAX, &ps);
if (ret != 0 && bytes != 0)
{
- if (ret == (size_t)-1 || ret == (size_t)-2)
+ if (MB_INVALIDCH (ret))
memmove (old+bytes, old+1, strlen (old+1));
else
memmove (old+bytes, old+ret, strlen (old+ret));
@@ -1126,18 +1167,37 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
#if defined (HANDLE_MULTIBYTE)
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); )
+ /* 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)
{
- 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;
+ 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;
+ }
+ }
}
}
else
@@ -1169,8 +1229,11 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
memset (&ps_old, 0, sizeof (mbstate_t));
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)
break;
@@ -1324,7 +1387,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
insert_some_chars (nfd, lendiff, col_lendiff);
_rl_last_c_pos += col_lendiff;
}
- else if (*ols == 0)
+ else if (*ols == 0 && lendiff > 0)
{
/* At the end of a line the characters do not have to
be "inserted". They can just be placed on the screen. */
@@ -1347,10 +1410,14 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
if ((temp - lendiff) > 0)
{
_rl_output_some_chars (nfd + lendiff, temp - lendiff);
-#if 0
- _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-lendiff) - col_lendiff;
-#else
+#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
+ _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-lendiff);
#endif
}
}
@@ -1426,12 +1493,13 @@ rl_on_new_line ()
/* 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. */
+ 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;
+ char *prompt_last_line, *lprompt;
/* Initialize visible_line and invisible_line to ensure that they can hold
the already-displayed prompt. */
@@ -1440,8 +1508,9 @@ rl_on_new_line_with_prompt ()
/* Make sure the line structures hold the already-displayed prompt for
redisplay. */
- strcpy (visible_line, rl_prompt);
- strcpy (invisible_line, rl_prompt);
+ lprompt = local_prompt ? local_prompt : rl_prompt;
+ strcpy (visible_line, lprompt);
+ strcpy (invisible_line, lprompt);
/* If the prompt contains newlines, take the last tail. */
prompt_last_line = strrchr (rl_prompt, '\n');
@@ -1476,6 +1545,8 @@ rl_on_new_line_with_prompt ()
vis_lbreaks[newlines] = l;
visible_wrap_offset = 0;
+ rl_display_prompt = rl_prompt; /* XXX - make sure it's set */
+
return 0;
}
@@ -1510,8 +1581,15 @@ _rl_move_cursor_relative (new, data)
#if defined (HANDLE_MULTIBYTE)
/* If we have multibyte characters, NEW is indexed by the buffer point in
a multibyte string, but _rl_last_c_pos is the display position. In
- this case, NEW's display position is not obvious. */
- if ((MB_CUR_MAX == 1 || rl_byte_oriented ) && _rl_last_c_pos == new) return;
+ this case, NEW's display position is not obvious and must be
+ calculated. */
+ if (MB_CUR_MAX == 1 || rl_byte_oriented)
+ {
+ if (_rl_last_c_pos == new)
+ return;
+ }
+ else if (_rl_last_c_pos == _rl_col_width (data, 0, new))
+ return;
#else
if (_rl_last_c_pos == new) return;
#endif
@@ -1594,11 +1672,7 @@ _rl_move_cursor_relative (new, data)
#endif
{
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- {
- tputs (_rl_term_cr, 1, _rl_output_character_function);
- for (i = 0; i < new; i++)
- putc (data[i], rl_outstream);
- }
+ _rl_backspace (_rl_last_c_pos - _rl_col_width (data, 0, new));
else
_rl_backspace (_rl_last_c_pos - new);
}
@@ -1764,10 +1838,14 @@ rl_reset_line_state ()
return 0;
}
+/* 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
rl_save_prompt ()
@@ -1776,9 +1854,12 @@ rl_save_prompt ()
saved_local_prefix = local_prompt_prefix;
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;
}
void
@@ -1791,6 +1872,8 @@ rl_restore_prompt ()
local_prompt_prefix = saved_local_prefix;
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;
}
char *
@@ -1823,6 +1906,7 @@ _rl_make_prompt_for_search (pchar)
prompt_last_invisible = saved_last_invisible;
prompt_visible_length = saved_visible_length + 1;
}
+
return pmt;
}
@@ -1999,7 +2083,7 @@ redraw_prompt (t)
char *t;
{
char *oldp, *oldl, *oldlprefix;
- int oldlen, oldlast, oldplen, oldninvis;
+ int oldlen, oldlast, oldplen, oldninvis, oldphyschars;
/* Geez, I should make this a struct. */
oldp = rl_display_prompt;
@@ -2009,11 +2093,13 @@ redraw_prompt (t)
oldplen = prompt_prefix_length;
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_invis_chars_first_line,
+ &prompt_physical_chars);
local_prompt_prefix = (char *)NULL;
rl_forced_update_display ();
@@ -2024,6 +2110,7 @@ redraw_prompt (t)
prompt_prefix_length = oldplen;
prompt_last_invisible = oldlast;
prompt_invis_chars_first_line = oldninvis;
+ prompt_physical_chars = oldphyschars;
}
/* Redisplay the current line after a SIGWINCH is received. */
@@ -2117,7 +2204,7 @@ _rl_current_display_line ()
scan from the beginning of the string to take the state into account. */
static int
_rl_col_width (str, start, end)
- char *str;
+ const char *str;
int start, end;
{
wchar_t wc;
@@ -2133,7 +2220,7 @@ _rl_col_width (str, start, end)
while (point < start)
{
tmp = mbrlen (str + point, max, &ps);
- if ((size_t)tmp == (size_t)-1 || (size_t)tmp == (size_t)-2)
+ if (MB_INVALIDCH ((size_t)tmp))
{
/* In this case, the bytes are invalid or too short to compose a
multibyte character, so we assume that the first byte represents
@@ -2145,8 +2232,8 @@ _rl_col_width (str, start, end)
effect of mbstate is undefined. */
memset (&ps, 0, sizeof (mbstate_t));
}
- else if (tmp == 0)
- break; /* Found '\0' */
+ else if (MB_NULLWCH (tmp))
+ break; /* Found '\0' */
else
{
point += tmp;
@@ -2162,7 +2249,7 @@ _rl_col_width (str, start, end)
while (point < end)
{
tmp = mbrtowc (&wc, str + point, max, &ps);
- if ((size_t)tmp == (size_t)-1 || (size_t)tmp == (size_t)-2)
+ if (MB_INVALIDCH ((size_t)tmp))
{
/* In this case, the bytes are invalid or too short to compose a
multibyte character, so we assume that the first byte represents
@@ -2177,8 +2264,8 @@ _rl_col_width (str, start, end)
effect of mbstate is undefined. */
memset (&ps, 0, sizeof (mbstate_t));
}
- else if (tmp == 0)
- break; /* Found '\0' */
+ else if (MB_NULLWCH (tmp))
+ break; /* Found '\0' */
else
{
point += tmp;
@@ -2193,4 +2280,3 @@ _rl_col_width (str, start, end)
return width;
}
#endif /* HANDLE_MULTIBYTE */
-
diff --git a/lib/readline/doc/Makefile b/lib/readline/doc/Makefile
index 32f22280..817c2af6 100644
--- a/lib/readline/doc/Makefile
+++ b/lib/readline/doc/Makefile
@@ -49,11 +49,11 @@ QUIETPS = #set this to -q to shut up dvips
PSDPI = 300 # I don't have any 600-dpi printers
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
+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
NROFF = groff -Tascii
@@ -66,7 +66,7 @@ INFOOBJ = readline.info history.info rluserman.info
PSOBJ = readline.ps history.ps rluserman.ps
HTMLOBJ = readline.html history.html rluserman.html
-INTERMEDIATE_OBJ = rlman.dvi hist.dvi rluserman.dvi
+INTERMEDIATE_OBJ = rlman.dvi
CREATED_DOCS = $(DVIOBJ) $(INFOOBJ) $(PSOBJ) $(HTMLOBJ)
@@ -76,24 +76,23 @@ all: info dvi html ps
nodvi: info html
readline.dvi: $(RLSRC)
- TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rlman.texinfo
+ TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rlman.texi
mv rlman.dvi readline.dvi
readline.info: $(RLSRC)
- $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rlman.texinfo
+ $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rlman.texi
rluserman.dvi: $(RLSRC)
- TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rluserman.texinfo
+ TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rluserman.texi
rluserman.info: $(RLSRC)
- $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rluserman.texinfo
+ $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rluserman.texi
history.dvi: ${HISTSRC}
- TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/hist.texinfo
- mv hist.dvi history.dvi
+ TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/history.texi
history.info: ${HISTSRC}
- $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/hist.texinfo
+ $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/history.texi
readline.ps: readline.dvi
$(RM) $@
@@ -108,17 +107,15 @@ history.ps: history.dvi
$(DVIPS) history.dvi
readline.html: ${RLSRC}
- $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rlman.texinfo
+ $(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.texinfo
+ $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rluserman.texi
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
+ $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/history.texi
info: $(INFOOBJ)
dvi: $(DVIOBJ)
diff --git a/lib/readline/doc/fdl.texi b/lib/readline/doc/fdl.texi
new file mode 100644
index 00000000..47ead9f0
--- /dev/null
+++ b/lib/readline/doc/fdl.texi
@@ -0,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 --git a/lib/readline/doc/hist.texinfo b/lib/readline/doc/hist.texinfo
deleted file mode 100644
index 63ceb16e..00000000
--- a/lib/readline/doc/hist.texinfo
+++ /dev/null
@@ -1,110 +0,0 @@
-\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
diff --git a/lib/readline/doc/history.texi b/lib/readline/doc/history.texi
new file mode 100644
index 00000000..f6a3d205
--- /dev/null
+++ b/lib/readline/doc/history.texi
@@ -0,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 --git a/lib/readline/doc/hstech.texinfo b/lib/readline/doc/hstech.texi
index 94944466..4fdda5f1 100644
--- a/lib/readline/doc/hstech.texinfo
+++ b/lib/readline/doc/hstech.texi
@@ -84,6 +84,7 @@ typedef void *histdata_t;
typedef struct _hist_entry @{
char *line;
+ char *timestamp;
histdata_t data;
@} HIST_ENTRY;
@end example
@@ -167,15 +168,27 @@ 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 you can dispose of the data. In the case
+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
@@ -227,6 +240,10 @@ 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
@@ -405,6 +422,12 @@ 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.
@@ -427,18 +450,18 @@ 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 {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.
diff --git a/lib/readline/doc/hsuser.texinfo b/lib/readline/doc/hsuser.texi
index 418bfa8e..6c891833 100644
--- a/lib/readline/doc/hsuser.texinfo
+++ b/lib/readline/doc/hsuser.texi
@@ -96,6 +96,9 @@ 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
@@ -172,6 +175,12 @@ history -ps @var{arg}
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
@@ -288,8 +297,15 @@ history list.
@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, @samp{=} or @samp{(}.
+the end of the line, or @samp{=}.
+@end ifclear
@item @code{!@var{n}}
Refer to command line @var{n}.
@@ -430,8 +446,12 @@ character on the input line.
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 --git a/lib/readline/doc/manvers.texinfo b/lib/readline/doc/manvers.texinfo
deleted file mode 100644
index 1206cf0f..00000000
--- a/lib/readline/doc/manvers.texinfo
+++ /dev/null
@@ -1,10 +0,0 @@
-@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
diff --git a/lib/readline/doc/rlman.texi b/lib/readline/doc/rlman.texi
new file mode 100644
index 00000000..f834b582
--- /dev/null
+++ b/lib/readline/doc/rlman.texi
@@ -0,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 --git a/lib/readline/doc/rlman.texinfo b/lib/readline/doc/rlman.texinfo
deleted file mode 100644
index 1ffebad0..00000000
--- a/lib/readline/doc/rlman.texinfo
+++ /dev/null
@@ -1,108 +0,0 @@
-\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
diff --git a/lib/readline/doc/rltech.texinfo b/lib/readline/doc/rltech.texi
index 037e824e..af9bc530 100644
--- a/lib/readline/doc/rltech.texinfo
+++ b/lib/readline/doc/rltech.texi
@@ -8,7 +8,7 @@ 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.
+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
@@ -578,11 +578,11 @@ 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.
+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
@@ -658,8 +658,21 @@ 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}.
+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)
@@ -680,10 +693,35 @@ Unbind all keys that execute @var{function} in @var{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)
+@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}. This makes new keymaps as
-necessary. The initial keymap in which to do bindings is @var{map}.
+@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)
@@ -895,6 +933,11 @@ 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)
@@ -996,9 +1039,15 @@ the state in which it was before the most recent call to
@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}.
+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)
@@ -1357,6 +1406,7 @@ Remove all of the Readline signal handlers installed by
@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
@@ -1417,6 +1467,8 @@ 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
@@ -1432,6 +1484,9 @@ This is a pointer to the generator function for
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
@@ -1446,7 +1501,9 @@ 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.
+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)
@@ -1473,7 +1530,8 @@ This calls @code{rl_complete_internal()} with an argument of @samp{*}.
@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.
+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
@@ -1495,7 +1553,7 @@ when there are no more matches.
@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
+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
@@ -1512,8 +1570,8 @@ for subsequent calls.
@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.
+@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
@@ -1618,6 +1676,15 @@ The list of characters that signal a break between words for
@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
@@ -1649,27 +1716,49 @@ 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
+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.
+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 completion functions can
-override the user's global preference (set via the
+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 completion function is called, so unless that function
-modifies the value, the user's preferences are honored.
+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
@@ -1679,12 +1768,13 @@ The default is 1.
@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.
+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
@@ -1692,8 +1782,9 @@ 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
+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
@@ -1709,6 +1800,9 @@ It should be set only by an application's completion function.
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
diff --git a/lib/readline/doc/rluser.texinfo b/lib/readline/doc/rluser.texi
index 94f851e6..6fa93507 100644
--- a/lib/readline/doc/rluser.texinfo
+++ b/lib/readline/doc/rluser.texi
@@ -10,7 +10,7 @@ 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.
+Copyright (C) 1988-2004 Free Software Foundation, Inc.
Authored by Brian Fox and Chet Ramey.
@@ -418,8 +418,8 @@ 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,
+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.
@@ -458,7 +458,7 @@ 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}
+same location on each history line retrieved with @code{previous-history}
or @code{next-history}.
@item horizontal-scroll-mode
@@ -552,6 +552,17 @@ 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
@@ -1115,6 +1126,11 @@ Word boundaries are the same as @code{backward-word}.
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.
@@ -1425,7 +1441,7 @@ argument is ignored.
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}
+@code{$VISUAL}, @code{$EDITOR}, and @code{emacs}
as the editor, in that order.
@end ifset
@@ -1568,13 +1584,21 @@ 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 generates no matches.
+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
@@ -1649,6 +1673,10 @@ beyond the simple generation of completions.
@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.
@@ -1658,7 +1686,7 @@ 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
+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}.
diff --git a/lib/readline/doc/rluserman.texi b/lib/readline/doc/rluserman.texi
new file mode 100644
index 00000000..8681a86c
--- /dev/null
+++ b/lib/readline/doc/rluserman.texi
@@ -0,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 --git a/lib/readline/doc/rluserman.texinfo b/lib/readline/doc/rluserman.texinfo
deleted file mode 100644
index 89abe31a..00000000
--- a/lib/readline/doc/rluserman.texinfo
+++ /dev/null
@@ -1,94 +0,0 @@
-\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
diff --git a/lib/readline/doc/version.texi b/lib/readline/doc/version.texi
new file mode 100644
index 00000000..0beb2760
--- /dev/null
+++ b/lib/readline/doc/version.texi
@@ -0,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 --git a/lib/readline/examples/histexamp.c b/lib/readline/examples/histexamp.c
index 45651dfb..e875e654 100644
--- a/lib/readline/examples/histexamp.c
+++ b/lib/readline/examples/histexamp.c
@@ -31,9 +31,10 @@ main (argc, argv)
char **argv;
{
char line[1024], *t;
- int len, done = 0;
+ int len, done;
line[0] = 0;
+ done = 0;
using_history ();
while (!done)
@@ -42,71 +43,80 @@ main (argc, argv)
fflush (stdout);
t = fgets (line, sizeof (line) - 1, stdin);
if (t && *t)
- {
- len = strlen (t);
- if (t[len - 1] == '\n')
- t[len - 1] = '\0';
- }
+ {
+ len = strlen (t);
+ if (t[len - 1] == '\n')
+ t[len - 1] = '\0';
+ }
if (!t)
- strcpy (line, "quit");
+ strcpy (line, "quit");
if (line[0])
- {
- char *expansion;
- int result;
+ {
+ char *expansion;
+ int result;
- using_history ();
+ using_history ();
- result = history_expand (line, &expansion);
- if (result)
- fprintf (stderr, "%s\n", expansion);
+ result = history_expand (line, &expansion);
+ if (result)
+ fprintf (stderr, "%s\n", expansion);
- if (result < 0 || result == 2)
- {
- free (expansion);
- continue;
- }
+ if (result < 0 || result == 2)
+ {
+ free (expansion);
+ continue;
+ }
- add_history (expansion);
- strncpy (line, expansion, sizeof (line) - 1);
- free (expansion);
- }
+ add_history (expansion);
+ strncpy (line, expansion, sizeof (line) - 1);
+ free (expansion);
+ }
if (strcmp (line, "quit") == 0)
- done = 1;
+ done = 1;
else if (strcmp (line, "save") == 0)
- write_history ("history_file");
+ write_history ("history_file");
else if (strcmp (line, "read") == 0)
- read_history ("history_file");
+ 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);
- }
+ {
+ 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");
- }
- }
+ {
+ 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 --git a/lib/readline/funmap.c b/lib/readline/funmap.c
index fe9a1da4..28c8cc67 100644
--- a/lib/readline/funmap.c
+++ b/lib/readline/funmap.c
@@ -131,6 +131,7 @@ static FUNMAP default_funmap[] = {
{ "tty-status", rl_tty_status },
{ "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 },
{ "upcase-word", rl_upcase_word },
diff --git a/lib/readline/histexpand.c b/lib/readline/histexpand.c
index 6c811961..2ab34cba 100644
--- a/lib/readline/histexpand.c
+++ b/lib/readline/histexpand.c
@@ -1,6 +1,6 @@
/* histexpand.c -- history expansion. */
-/* Copyright (C) 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1989-2004 Free Software Foundation, Inc.
This file contains the GNU History Library (the Library), a set of
routines for managing the text of previously typed lines.
@@ -52,6 +52,8 @@
#define HISTORY_WORD_DELIMITERS " \t\n;&()|<>"
#define HISTORY_QUOTE_CHARACTERS "\"'`"
+#define slashify_in_quotes "\\`\"$"
+
typedef int _hist_search_func_t PARAMS((const char *, int));
extern int rl_byte_oriented; /* declared in mbutil.c */
@@ -65,6 +67,8 @@ static int subst_rhs_len;
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 *));
@@ -211,8 +215,8 @@ get_history_event (string, caller_index, delimiting_quote)
memset (&ps, 0, sizeof (mbstate_t));
/* 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)
+ _rl_adjust_point ((char *)string, i, &ps);
+ if ((v = _rl_get_char_len ((char *)string + i, &ps)) > 1)
{
i += v - 1;
continue;
@@ -517,7 +521,7 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line)
char *current_line; /* for !# */
{
int i, n, starting_index;
- int substitute_globally, want_quotes, print_only;
+ int substitute_globally, subst_bywords, want_quotes, print_only;
char *event, *temp, *result, *tstr, *t, c, *word_spec;
int result_len;
#if defined (HANDLE_MULTIBYTE)
@@ -599,19 +603,25 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line)
FREE (word_spec);
/* Perhaps there are other modifiers involved. Do what they say. */
- want_quotes = substitute_globally = print_only = 0;
+ want_quotes = substitute_globally = subst_bywords = print_only = 0;
starting_index = i;
while (string[i] == ':')
{
c = string[i + 1];
- if (c == 'g')
+ if (c == 'g' || c == 'a')
{
substitute_globally = 1;
i++;
c = string[i + 1];
}
+ else if (c == 'G')
+ {
+ subst_bywords = 1;
+ i++;
+ c = string[i + 1];
+ }
switch (c)
{
@@ -683,7 +693,7 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line)
case 's':
{
char *new_event;
- int delimiter, failed, si, l_temp;
+ int delimiter, failed, si, l_temp, ws, we;
if (c == 's')
{
@@ -760,33 +770,67 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line)
}
/* Find the first occurrence of THIS in TEMP. */
- si = 0;
+ /* 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++)
- 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;
- }
+ {
+ /* 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)
{
@@ -879,7 +923,7 @@ history_expand (hstring, output)
char **output;
{
register int j;
- int i, r, l, passc, cc, modified, eindex, only_printing;
+ int i, r, l, passc, cc, modified, eindex, only_printing, dquote;
char *string;
/* The output string, and its length. */
@@ -942,7 +986,7 @@ history_expand (hstring, output)
/* `!' followed by one of the characters in history_no_expand_chars
is NOT an expansion. */
- for (i = 0; string[i]; i++)
+ for (i = dquote = 0; string[i]; i++)
{
#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
@@ -984,9 +1028,19 @@ history_expand (hstring, output)
else
break;
}
- /* XXX - at some point, might want to extend this to handle
- double quotes as well. */
- else if (history_quotes_inhibit_expansion && string[i] == '\'')
+ /* 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. */
i++;
@@ -999,6 +1053,7 @@ history_expand (hstring, output)
if (cc == '\'' || cc == history_expansion_char)
i++;
}
+
}
if (string[i] != history_expansion_char)
@@ -1010,7 +1065,7 @@ history_expand (hstring, output)
}
/* Extract and perform the substitution. */
- for (passc = i = j = 0; i < l; i++)
+ for (passc = dquote = i = j = 0; i < l; i++)
{
int tchar = string[i];
@@ -1061,11 +1116,16 @@ history_expand (hstring, output)
ADD_CHAR (tchar);
break;
+ case '"':
+ dquote = 1 - dquote;
+ ADD_CHAR (tchar);
+ break;
+
case '\'':
{
/* If history_quotes_inhibit_expansion is set, single quotes
inhibit history expansion. */
- if (history_quotes_inhibit_expansion)
+ if (dquote == 0 && history_quotes_inhibit_expansion)
{
int quote, slen;
@@ -1160,7 +1220,9 @@ history_expand (hstring, output)
if (only_printing)
{
+#if 0
add_history (result);
+#endif
return (2);
}
@@ -1223,7 +1285,10 @@ get_history_word_specifier (spec, from, caller_index)
if (spec[i] == '-')
first = 0;
else if (spec[i] == '^')
- first = 1;
+ {
+ first = 1;
+ i++;
+ }
else if (_rl_digit_p (spec[i]) && expecting_word_spec)
{
for (first = 0; _rl_digit_p (spec[i]); i++)
@@ -1338,7 +1403,103 @@ history_arg_extract (first, last, string)
return (result);
}
-#define slashify_in_quotes "\\`\"$"
+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
not -1 and INDP is not null, we also want the word surrounding index
@@ -1351,7 +1512,6 @@ history_tokenize_internal (string, wind, indp)
{
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., " "),
make sure we set *INDP to a reasonable value. */
@@ -1362,8 +1522,6 @@ history_tokenize_internal (string, wind, indp)
exactly where the shell would split them. */
for (i = result_index = size = 0, result = (char **)NULL; string[i]; )
{
- delimiter = 0;
-
/* Skip leading whitespace. */
for (; string[i] && whitespace (string[i]); i++)
;
@@ -1371,88 +1529,30 @@ history_tokenize_internal (string, wind, indp)
return (result);
start = i;
-
- if (member (string[i], "()\n"))
- {
- i++;
- goto got_token;
- }
- if (member (string[i], "<>;&|$"))
- {
- int peek = string[i + 1];
+ i = history_tokenize_word (string, start);
- 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 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)
{
- 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];
+ i++;
+ while (string[i] && member (string[i], history_word_delimiters))
+ i++;
}
- got_token:
-
/* If we are looking for the word in which the character at a
particular index falls, remember it. */
if (indp && wind != -1 && wind >= start && wind < i)
*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;
+
+ result[result_index++] = history_substring (string, start, i);
+ result[result_index] = (char *)NULL;
}
return (result);
diff --git a/lib/readline/histfile.c b/lib/readline/histfile.c
index 60a91251..717bbee6 100644
--- a/lib/readline/histfile.c
+++ b/lib/readline/histfile.c
@@ -1,6 +1,6 @@
/* histfile.c - functions to manipulate the history file. */
-/* Copyright (C) 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1989-2003 Free Software Foundation, Inc.
This file contains the GNU History Library (the Library), a set of
routines for managing the text of previously typed lines.
@@ -23,8 +23,13 @@
/* The goal is to make the implementation transparent, so that you
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 <floss.h>
+#endif
+
#if defined (HAVE_CONFIG_H)
# include <config.h>
#endif
@@ -32,7 +37,7 @@
#include <stdio.h>
#include <sys/types.h>
-#ifndef _MINIX
+#if ! defined (_MINIX) && defined (HAVE_SYS_FILE_H)
# include <sys/file.h>
#endif
#include "posixstat.h"
@@ -52,7 +57,7 @@
# undef HAVE_MMAP
#endif
-#ifdef HAVE_MMAP
+#ifdef HISTORY_USE_MMAP
# include <sys/mman.h>
# ifdef MAP_FILE
@@ -67,7 +72,7 @@
# define MAP_FAILED ((void *)-1)
# endif
-#endif /* HAVE_MMAP */
+#endif /* HISTORY_USE_MMAP */
/* If we're compiling for __EMX__ (OS/2) or __CYGWIN__ (cygwin32 environment
on win 95/98/nt), we want to open files with O_BINARY mode so that there
@@ -93,6 +98,13 @@ extern int errno;
#include "rlshell.h"
#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
filename to read_history (), or write_history (). */
@@ -151,13 +163,20 @@ read_history_range (filename, from, to)
const char *filename;
int from, to;
{
- register char *line_start, *line_end;
- char *input, *buffer, *bufend;
+ 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 = (char *)NULL;
+ buffer = last_ts = (char *)NULL;
input = history_filename (filename);
file = open (input, O_RDONLY|O_BINARY, 0666);
@@ -169,37 +188,42 @@ read_history_range (filename, from, to)
/* check for overflow on very large files */
if (file_size != finfo.st_size || file_size + 1 < file_size)
{
-#if defined (EFBIG)
- errno = EFBIG;
-#elif defined (EOVERFLOW)
- errno = EOVERFLOW;
-#endif
+ errno = overflow_errno;
goto error_and_exit;
}
-#ifdef HAVE_MMAP
+#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)
- goto error_and_exit;
+ {
+ errno = overflow_errno;
+ goto error_and_exit;
+ }
chars_read = file_size;
#else
buffer = (char *)malloc (file_size + 1);
if (buffer == 0)
- goto error_and_exit;
+ {
+ errno = overflow_errno;
+ goto error_and_exit;
+ }
chars_read = read (file, buffer, file_size);
#endif
if (chars_read < 0)
{
error_and_exit:
- chars_read = errno;
+ if (errno != 0)
+ chars_read = errno;
+ else
+ chars_read = EIO;
if (file >= 0)
close (file);
FREE (input);
-#ifndef HAVE_MMAP
+#ifndef HISTORY_USE_MMAP
FREE (buffer);
#endif
@@ -220,8 +244,12 @@ read_history_range (filename, from, to)
for (line_start = line_end = buffer; line_end < bufend && current_line < from; line_end++)
if (*line_end == '\n')
{
- current_line++;
- line_start = line_end + 1;
+ 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;
}
/* If there are lines left to gobble, then gobble them now. */
@@ -231,7 +259,22 @@ read_history_range (filename, from, to)
*line_end = '\0';
if (*line_start)
- add_history (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++;
@@ -242,7 +285,7 @@ read_history_range (filename, from, to)
}
FREE (input);
-#ifndef HAVE_MMAP
+#ifndef HISTORY_USE_MMAP
FREE (buffer);
#else
munmap (buffer, file_size);
@@ -259,7 +302,7 @@ history_truncate_file (fname, lines)
const char *fname;
int lines;
{
- char *buffer, *filename, *bp;
+ char *buffer, *filename, *bp, *bp1; /* bp1 == bp+1 */
int file, chars_read, rv;
struct stat finfo;
size_t file_size;
@@ -322,11 +365,14 @@ history_truncate_file (fname, lines)
}
/* Count backwards from the end of buffer until we have passed
- LINES lines. */
- for (bp = buffer + chars_read - 1; lines && bp > buffer; bp--)
+ 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')
+ if (*bp == '\n' && HIST_TIMESTAMP_START(bp1) == 0)
lines--;
+ bp1 = bp;
}
/* If this is the first line, then the file contains exactly the
@@ -335,11 +381,14 @@ history_truncate_file (fname, lines)
the current value of i and 0. Otherwise, write from the start of
this line until the end of the buffer. */
for ( ; bp > buffer; bp--)
- if (*bp == '\n')
- {
- bp++;
- break;
- }
+ {
+ 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
truncate to. */
@@ -374,9 +423,9 @@ history_do_write (filename, nelements, overwrite)
register int i;
char *output;
int file, mode, rv;
+#ifdef HISTORY_USE_MMAP
size_t cursize;
-#ifdef HAVE_MMAP
mode = overwrite ? O_RDWR|O_CREAT|O_TRUNC|O_BINARY : O_RDWR|O_APPEND|O_BINARY;
#else
mode = overwrite ? O_WRONLY|O_CREAT|O_TRUNC|O_BINARY : O_WRONLY|O_APPEND|O_BINARY;
@@ -390,7 +439,7 @@ history_do_write (filename, nelements, overwrite)
return (errno);
}
-#ifdef HAVE_MMAP
+#ifdef HISTORY_USE_MMAP
cursize = overwrite ? 0 : lseek (file, 0, SEEK_END);
#endif
@@ -408,10 +457,18 @@ history_do_write (filename, nelements, overwrite)
the_history = history_list ();
/* 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);
+#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 HAVE_MMAP
+#ifdef HISTORY_USE_MMAP
if (ftruncate (file, buffer_size+cursize) == -1)
goto mmap_error;
buffer = (char *)mmap (0, buffer_size, PROT_READ|PROT_WRITE, MAP_WFLAGS, file, cursize);
@@ -436,12 +493,18 @@ mmap_error:
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);
buffer[j++] = '\n';
}
-#ifdef HAVE_MMAP
+#ifdef HISTORY_USE_MMAP
if (msync (buffer, buffer_size, 0) != 0 || munmap (buffer, buffer_size) != 0)
rv = errno;
#else
diff --git a/lib/readline/history.c b/lib/readline/history.c
index 4242f33e..d99b76e8 100644
--- a/lib/readline/history.c
+++ b/lib/readline/history.c
@@ -1,6 +1,6 @@
-/* History.c -- standalone history library */
+/* history.c -- standalone history library */
-/* Copyright (C) 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1989-2003 Free Software Foundation, Inc.
This file contains the GNU History Library (the Library), a set of
routines for managing the text of previously typed lines.
@@ -52,6 +52,8 @@
/* The number of slots to increase the_history by. */
#define DEFAULT_HISTORY_GROW_SIZE 50
+static char *hist_inittime PARAMS((void));
+
/* **************************************************************** */
/* */
/* History Functions */
@@ -123,14 +125,15 @@ using_history ()
}
/* Return the number of bytes that the primary history entries are using.
- This just adds up the lengths of the_history->lines. */
+ This just adds up the lengths of the_history->lines and the associated
+ timestamps. */
int
history_total_bytes ()
{
register int i, result;
for (i = result = 0; the_history && the_history[i]; i++)
- result += strlen (the_history[i]->line);
+ result += HISTENT_BYTES (the_history[i]);
return (result);
}
@@ -206,6 +209,40 @@ history_get (offset)
: the_history[local_index];
}
+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. */
void
@@ -225,10 +262,7 @@ add_history (string)
/* If there is something in the slot, then remove it. */
if (the_history[0])
- {
- free (the_history[0]->line);
- free (the_history[0]);
- }
+ (void) free_history_entry (the_history[0]);
/* Copy the rest of the entries, moving down one slot. */
for (i = 0; i < history_length; i++)
@@ -260,10 +294,41 @@ add_history (string)
temp->line = savestring (string);
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
invalid WHICH, a NULL pointer is returned. */
@@ -283,6 +348,7 @@ replace_history_entry (which, line, data)
temp->line = savestring (line);
temp->data = data;
+ temp->timestamp = savestring (old_value->timestamp);
the_history[which] = temp;
return (old_value);
@@ -327,10 +393,7 @@ stifle_history (max)
{
/* 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]);
- }
+ free_history_entry (the_history[i]);
history_base = i;
for (j = 0, i = history_length - max; j < max; i++, j++)
@@ -372,8 +435,7 @@ clear_history ()
/* This loses because we cannot free the data. */
for (i = 0; i < history_length; i++)
{
- free (the_history[i]->line);
- free (the_history[i]);
+ free_history_entry (the_history[i]);
the_history[i] = (HIST_ENTRY *)NULL;
}
diff --git a/lib/readline/history.h b/lib/readline/history.h
index 58b5de46..14ca2a99 100644
--- a/lib/readline/history.h
+++ b/lib/readline/history.h
@@ -1,5 +1,5 @@
-/* History.h -- the names of functions that you can call in history. */
-/* Copyright (C) 1989, 1992 Free Software Foundation, Inc.
+/* 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
routines for managing the text of previously typed lines.
@@ -26,6 +26,8 @@
extern "C" {
#endif
+#include <time.h> /* XXX - for history timestamp code */
+
#if defined READLINE_LIBRARY
# include "rlstdc.h"
# include "rltypedefs.h"
@@ -43,9 +45,13 @@ typedef char *histdata_t;
/* The structure used to store a history entry. */
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 {
HIST_ENTRY **entries; /* Pointer to the entries themselves. */
@@ -76,11 +82,19 @@ extern void history_set_history_state PARAMS((HISTORY_STATE *));
The associated data field (if any) is set to NULL. */
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
elements are numbered from 0. */
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
invalid WHICH, a NULL pointer is returned. */
@@ -119,6 +133,10 @@ extern HIST_ENTRY *current_history PARAMS((void));
array. OFFSET is relative to history_base. */
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. */
extern int history_total_bytes PARAMS((void));
@@ -231,6 +249,8 @@ extern char *history_no_expand_chars;
extern char *history_search_delimiter_chars;
extern int history_quotes_inhibit_expansion;
+extern int history_write_timestamps;
+
/* Backwards compatibility */
extern int max_input_history;
diff --git a/lib/readline/histsearch.c b/lib/readline/histsearch.c
index d94fd6cd..1cc5875a 100644
--- a/lib/readline/histsearch.c
+++ b/lib/readline/histsearch.c
@@ -77,11 +77,11 @@ history_search_internal (string, direction, anchored)
if (string == 0 || *string == '\0')
return (-1);
- if (!history_length || ((i == history_length) && !reverse))
+ if (!history_length || ((i >= history_length) && !reverse))
return (-1);
- if (reverse && (i == history_length))
- i--;
+ if (reverse && (i >= history_length))
+ i = history_length - 1;
#define NEXT_LINE() do { if (reverse) i--; else i++; } while (0)
diff --git a/lib/readline/input.c b/lib/readline/input.c
index 841f05d1..044338e8 100644
--- a/lib/readline/input.c
+++ b/lib/readline/input.c
@@ -21,6 +21,10 @@
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
+#if defined (__TANDEM)
+# include <floss.h>
+#endif
+
#if defined (HAVE_CONFIG_H)
# include <config.h>
#endif
@@ -154,6 +158,12 @@ _rl_unget_char (key)
return (0);
}
+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
(0 if none available) and -1 on error (EIO). */
@@ -162,7 +172,7 @@ rl_gather_tyi ()
{
int tty;
register int tem, result;
- int chars_avail;
+ int chars_avail, k;
char input;
#if defined(HAVE_SELECT)
fd_set readfds, exceptfds;
@@ -202,6 +212,11 @@ rl_gather_tyi ()
fcntl (tty, F_SETFL, tem);
if (chars_avail == -1 && errno == EAGAIN)
return 0;
+ if (chars_avail == 0) /* EOF */
+ {
+ rl_stuff_char (EOF);
+ return (0);
+ }
}
#endif /* O_NDELAY */
@@ -225,7 +240,12 @@ rl_gather_tyi ()
if (result != -1)
{
while (chars_avail--)
- rl_stuff_char ((*rl_getc_function) (rl_instream));
+ {
+ k = (*rl_getc_function) (rl_instream);
+ rl_stuff_char (k);
+ if (k == NEWLINE || k == RETURN)
+ break;
+ }
}
else
{
diff --git a/lib/readline/keymaps.c b/lib/readline/keymaps.c
index 12506d3a..70d0cc08 100644
--- a/lib/readline/keymaps.c
+++ b/lib/readline/keymaps.c
@@ -64,11 +64,13 @@ rl_make_bare_keymap ()
keymap[i].function = (rl_command_func_t *)NULL;
}
+#if 0
for (i = 'A'; i < ('Z' + 1); i++)
{
keymap[i].type = ISFUNC;
keymap[i].function = rl_do_lowercase_version;
}
+#endif
return (keymap);
}
@@ -79,8 +81,9 @@ rl_copy_keymap (map)
Keymap map;
{
register int i;
- Keymap temp = rl_make_bare_keymap ();
+ Keymap temp;
+ temp = rl_make_bare_keymap ();
for (i = 0; i < KEYMAP_SIZE; i++)
{
temp[i].type = map[i].type;
@@ -109,12 +112,8 @@ rl_make_keymap ()
newmap[CTRL('H')].function = rl_rubout;
#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++)
+ /* 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 --git a/lib/readline/kill.c b/lib/readline/kill.c
index a616b920..1d3254c3 100644
--- a/lib/readline/kill.c
+++ b/lib/readline/kill.c
@@ -339,6 +339,47 @@ rl_unix_word_rubout (count, key)
if (rl_editing_mode == emacs_mode)
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 --git a/lib/readline/mbutil.c b/lib/readline/mbutil.c
index 50302f01..9a8f17c0 100644
--- a/lib/readline/mbutil.c
+++ b/lib/readline/mbutil.c
@@ -1,6 +1,6 @@
/* mbutil.c -- readline multibyte character utility functions */
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2004 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -92,12 +92,12 @@ _rl_find_next_mbchar_internal (string, seed, count, find_non_zero)
/* if this is true, means that seed was not pointed character
started byte. So correct the point and consume count */
if (seed < point)
- count --;
+ 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)
+ if (MB_INVALIDCH ((size_t)tmp))
{
/* invalid bytes. asume a byte represents a character */
point++;
@@ -105,9 +105,8 @@ _rl_find_next_mbchar_internal (string, seed, count, find_non_zero)
/* reset states. */
memset(&ps, 0, sizeof(mbstate_t));
}
- else if (tmp == (size_t)0)
- /* found '\0' char */
- break;
+ else if (MB_NULLWCH (tmp))
+ break; /* found wide '\0' */
else
{
/* valid bytes */
@@ -160,7 +159,7 @@ _rl_find_prev_mbchar_internal (string, seed, find_non_zero)
while (point < seed)
{
tmp = mbrtowc (&wc, string + point, length - point, &ps);
- if ((size_t)(tmp) == (size_t)-1 || (size_t)(tmp) == (size_t)-2)
+ if (MB_INVALIDCH ((size_t)tmp))
{
/* in this case, bytes are invalid or shorted to compose
multibyte char, so assume that the first byte represents
@@ -169,8 +168,12 @@ _rl_find_prev_mbchar_internal (string, seed, find_non_zero)
/* clear the state of the byte sequence, because
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 (tmp == 0)
+ else if (MB_NULLWCH (tmp))
break; /* Found '\0' char. Can this happen? */
else
{
@@ -205,14 +208,16 @@ _rl_get_char_len (src, ps)
if (tmp == (size_t)(-2))
{
/* shorted to compose multibyte char */
- memset (ps, 0, sizeof(mbstate_t));
+ if (ps)
+ memset (ps, 0, sizeof(mbstate_t));
return -2;
}
else if (tmp == (size_t)(-1))
{
/* invalid to compose multibyte char */
/* initialize the conversion state */
- memset (ps, 0, sizeof(mbstate_t));
+ if (ps)
+ memset (ps, 0, sizeof(mbstate_t));
return -1;
}
else if (tmp == (size_t)0)
@@ -225,9 +230,12 @@ _rl_get_char_len (src, ps)
return 1. Otherwise return 0. */
int
_rl_compare_chars (buf1, pos1, ps1, buf2, pos2, ps2)
- char *buf1, *buf2;
- mbstate_t *ps1, *ps2;
- int pos1, pos2;
+ char *buf1;
+ int pos1;
+ mbstate_t *ps1;
+ char *buf2;
+ int pos2;
+ mbstate_t *ps2;
{
int i, w1, w2;
@@ -268,7 +276,7 @@ _rl_adjust_point(string, point, ps)
while (pos < point)
{
tmp = mbrlen (string + pos, length - pos, ps);
- if((size_t)(tmp) == (size_t)-1 || (size_t)(tmp) == (size_t)-2)
+ if (MB_INVALIDCH ((size_t)tmp))
{
/* in this case, bytes are invalid or shorted to compose
multibyte char, so assume that the first byte represents
@@ -276,8 +284,11 @@ _rl_adjust_point(string, point, ps)
pos++;
/* clear the state of the byte sequence, because
in this case effect of mbstate is undefined */
- memset (ps, 0, sizeof (mbstate_t));
+ if (ps)
+ memset (ps, 0, sizeof (mbstate_t));
}
+ else if (MB_NULLWCH (tmp))
+ pos++;
else
pos += tmp;
}
diff --git a/lib/readline/misc.c b/lib/readline/misc.c
index f3775d30..ab1e1337 100644
--- a/lib/readline/misc.c
+++ b/lib/readline/misc.c
@@ -1,6 +1,6 @@
/* misc.c -- miscellaneous bindable readline functions. */
-/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2004 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -253,6 +253,8 @@ rl_maybe_unsave_line ()
{
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;
_rl_free_history_entry (_rl_saved_line_for_history);
@@ -274,6 +276,13 @@ rl_maybe_save_line ()
_rl_saved_line_for_history->line = savestring (rl_line_buffer);
_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;
}
@@ -298,7 +307,7 @@ _rl_history_set_point ()
rl_point = rl_end;
#if defined (VI_MODE)
- if (rl_editing_mode == vi_mode)
+ if (rl_editing_mode == vi_mode && _rl_keymap != vi_insertion_keymap)
rl_point = 0;
#endif /* VI_MODE */
@@ -311,6 +320,8 @@ rl_replace_from_history (entry, flags)
HIST_ENTRY *entry;
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;
rl_point = rl_end;
@@ -435,6 +446,7 @@ rl_get_previous_history (count, key)
rl_replace_from_history (temp, 0);
_rl_history_set_point ();
}
+
return 0;
}
diff --git a/lib/readline/nls.c b/lib/readline/nls.c
index 706c8195..bcee8756 100644
--- a/lib/readline/nls.c
+++ b/lib/readline/nls.c
@@ -75,6 +75,23 @@ static char *normalize_codeset PARAMS((char *));
static char *find_codeset PARAMS((char *, size_t *));
#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
1 if we set eight-bit mode. */
@@ -84,10 +101,21 @@ _rl_init_eightbit ()
/* If we have setlocale(3), just check the current LC_CTYPE category
value, and go into eight-bit mode if it's not C or POSIX. */
#if defined (HAVE_SETLOCALE)
- char *t;
+ char *lspec, *t;
/* Set the LC_CTYPE locale category from environment variables. */
- t = setlocale (LC_CTYPE, "");
+ 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))
{
_rl_meta_flag = 1;
@@ -105,9 +133,8 @@ _rl_init_eightbit ()
/* We don't have setlocale. Finesse it. Check the environment for the
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");
+ lspec = _rl_get_locale_var ("LC_CTYPE");
+
if (lspec == 0 || (t = normalize_codeset (lspec)) == 0)
return (0);
for (i = 0; t && legal_lang_values[i]; i++)
diff --git a/lib/readline/parens.c b/lib/readline/parens.c
index 54ef1f36..737f7675 100644
--- a/lib/readline/parens.c
+++ b/lib/readline/parens.c
@@ -21,6 +21,10 @@
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
+#if defined (__TANDEM)
+# include <floss.h>
+#endif
+
#include "rlconf.h"
#if defined (HAVE_CONFIG_H)
diff --git a/lib/readline/posixdir.h b/lib/readline/posixdir.h
index 505e2795..91f6d961 100644
--- a/lib/readline/posixdir.h
+++ b/lib/readline/posixdir.h
@@ -25,7 +25,11 @@
#if defined (HAVE_DIRENT_H)
# include <dirent.h>
-# define D_NAMLEN(d) (strlen ((d)->d_name))
+# 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)
# include <sys/ndir.h>
@@ -42,11 +46,11 @@
# define D_NAMLEN(d) ((d)->d_namlen)
#endif /* !HAVE_DIRENT_H */
-#if defined (STRUCT_DIRENT_HAS_D_INO) && !defined (STRUCT_DIRENT_HAS_D_FILENO)
+#if defined (HAVE_STRUCT_DIRENT_D_INO) && !defined (HAVE_STRUCT_DIRENT_D_FILENO)
# define d_fileno d_ino
#endif
-#if defined (_POSIX_SOURCE) && (!defined (STRUCT_DIRENT_HAS_D_INO) || defined (BROKEN_DIRENT_D_INO))
+#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. */
# define REAL_DIR_ENTRY(dp) 1
diff --git a/lib/readline/readline.c b/lib/readline/readline.c
index 28801f19..a70d80ff 100644
--- a/lib/readline/readline.c
+++ b/lib/readline/readline.c
@@ -68,11 +68,11 @@
#include "xmalloc.h"
#ifndef RL_LIBRARY_VERSION
-# define RL_LIBRARY_VERSION "4.3"
+# define RL_LIBRARY_VERSION "5.0"
#endif
#ifndef RL_READLINE_VERSION
-# define RL_READLINE_VERSION 0x0403
+# define RL_READLINE_VERSION 0x0500
#endif
extern void _rl_free_history_entry PARAMS((HIST_ENTRY *));
@@ -85,6 +85,7 @@ static void bind_arrow_keys_internal PARAMS((Keymap));
static void bind_arrow_keys PARAMS((void));
static void readline_default_bindings PARAMS((void));
+static void reset_default_bindings PARAMS((void));
/* **************************************************************** */
/* */
@@ -347,7 +348,7 @@ readline_internal_setup ()
#if defined (VI_MODE)
if (rl_editing_mode == vi_mode)
- rl_vi_insertion_mode (1, 0);
+ rl_vi_insertion_mode (1, 'i');
#endif /* VI_MODE */
if (rl_pre_input_hook)
@@ -650,7 +651,21 @@ _rl_dispatch_subseq (key, map, got_subseq)
the function. The recursive call to _rl_dispatch_subseq has
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));
+ {
+#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)
{
/* We didn't match (r is probably -1), so return something to
@@ -684,6 +699,7 @@ _rl_dispatch_subseq (key, map, got_subseq)
}
#if defined (VI_MODE)
if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap &&
+ key != ANYOTHERKEY &&
_rl_vi_textmod_command (key))
_rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign);
#endif
@@ -838,7 +854,7 @@ readline_initialize_everything ()
/* If the completion parser's default word break characters haven't
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;
+ rl_completer_word_break_characters = (char *)rl_basic_word_break_characters;
}
/* If this system allows us to look at the values of the regular
@@ -850,6 +866,15 @@ readline_default_bindings ()
rl_tty_set_default_bindings (_rl_keymap);
}
+/* 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
bind_arrow_keys_internal (map)
@@ -861,25 +886,25 @@ bind_arrow_keys_internal (map)
_rl_keymap = map;
#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);
+ 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_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_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 --git a/lib/readline/readline.h b/lib/readline/readline.h
index f11b3d03..222b317c 100644
--- a/lib/readline/readline.h
+++ b/lib/readline/readline.h
@@ -1,6 +1,6 @@
/* Readline.h -- the names of functions callable from within readline. */
-/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2004 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -40,9 +40,9 @@ extern "C" {
#endif
/* Hex-encoded Readline version number. */
-#define RL_READLINE_VERSION 0x0403 /* Readline 4.3 */
-#define RL_VERSION_MAJOR 4
-#define RL_VERSION_MINOR 3
+#define RL_READLINE_VERSION 0x0500 /* Readline 5.0 */
+#define RL_VERSION_MAJOR 5
+#define RL_VERSION_MINOR 0
/* Readline data structures. */
@@ -160,6 +160,7 @@ extern int rl_kill_line PARAMS((int, int));
extern int rl_backward_kill_line PARAMS((int, int));
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));
extern int rl_kill_region PARAMS((int, int));
@@ -258,6 +259,8 @@ extern int rl_vi_check PARAMS((void));
extern int rl_vi_domove PARAMS((int, int *));
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));
extern int rl_vi_bWord PARAMS((int, int));
@@ -290,12 +293,20 @@ extern int rl_bind_key PARAMS((int, rl_command_func_t *));
extern int rl_bind_key_in_map PARAMS((int, rl_command_func_t *, Keymap));
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_set_key PARAMS((const char *, rl_command_func_t *, 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));
@@ -358,7 +369,7 @@ extern int rl_clear_message PARAMS((void));
extern int rl_reset_line_state PARAMS((void));
extern int rl_crlf PARAMS((void));
-#if (defined (__STDC__) || defined (__cplusplus)) && defined (USE_VARARGS) && defined (PREFER_STDARG)
+#if defined (USE_VARARGS) && defined (PREFER_STDARG)
extern int rl_message (const char *, ...) __attribute__((__format__ (printf, 1, 2)));
#else
extern int rl_message ();
@@ -384,6 +395,7 @@ extern char *rl_copy_text PARAMS((int, int));
extern void rl_prep_terminal PARAMS((int));
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 *));
extern void rl_resize_terminal PARAMS((void));
@@ -603,7 +615,12 @@ extern const char *rl_basic_word_break_characters;
/* The list of characters that signal a break between words for
rl_complete_internal. The default list is the contents of
rl_basic_word_break_characters. */
-extern const char *rl_completer_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.
Completion occurs on the entire substring, and within the substring
@@ -687,6 +704,11 @@ extern int rl_attempted_completion_over;
functions. */
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'. */
extern int rl_completion_append_character;
@@ -695,10 +717,18 @@ extern int rl_completion_append_character;
rl_completion_append_character will not be appended. */
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;
+/* 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
symbolic links to directory names, subject to the value of the
@@ -749,6 +779,7 @@ extern int rl_inhibit_completion;
#define RL_STATE_SIGHANDLER 0x08000 /* in readline sighandler */
#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,6 +816,12 @@ struct readline_state {
int catchsigs;
int catchsigwinch;
+ /* search state */
+
+ /* completion state */
+
+ /* options state */
+
/* reserved for future expansion, so the struct size doesn't change */
char reserved[64];
};
diff --git a/lib/readline/rldefs.h b/lib/readline/rldefs.h
index 4a28bd1e..0d600407 100644
--- a/lib/readline/rldefs.h
+++ b/lib/readline/rldefs.h
@@ -77,7 +77,7 @@ extern int _rl_stricmp PARAMS((char *, char *));
extern int _rl_strnicmp PARAMS((char *, char *, int));
#endif
-#if defined (HAVE_STRPBRK)
+#if defined (HAVE_STRPBRK) && !defined (HAVE_MULTIBYTE)
# define _rl_strpbrk(a,b) strpbrk((a),(b))
#else
extern char *_rl_strpbrk PARAMS((const char *, const char *));
diff --git a/lib/readline/rlmbutil.h b/lib/readline/rlmbutil.h
index 27ca32bf..77cc026e 100644
--- a/lib/readline/rlmbutil.h
+++ b/lib/readline/rlmbutil.h
@@ -35,11 +35,18 @@
#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H)
# include <wchar.h>
# include <wctype.h>
-# if defined (HAVE_MBSRTOWCS) /* system is supposed to support XPG5 */
+# 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)
# define wcsrtombs(dest, src, len, ps) (wcsrtombs) (dest, src, len, 0)
@@ -90,6 +97,9 @@ extern int _rl_read_mbstring PARAMS((int, char *, int));
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 */
#undef MB_LEN_MAX
@@ -101,6 +111,9 @@ extern int _rl_is_mbchar_matched PARAMS((char *, int, int, char *, int));
#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 */
extern int rl_byte_oriented;
diff --git a/lib/readline/rlprivate.h b/lib/readline/rlprivate.h
index ccb91446..c3cee917 100644
--- a/lib/readline/rlprivate.h
+++ b/lib/readline/rlprivate.h
@@ -1,7 +1,7 @@
/* rlprivate.h -- functions and variables global to the readline library,
but not intended for use by applications. */
-/* Copyright (C) 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2004 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -103,7 +103,6 @@ extern int readline_internal_char PARAMS((void));
#endif /* READLINE_CALLBACKS */
/* bind.c */
-extern void _rl_bind_if_unbound PARAMS((const char *, rl_command_func_t *));
/* complete.c */
extern char _rl_find_completion_word PARAMS((int *, int *));
@@ -131,6 +130,7 @@ extern int _rl_input_available PARAMS((void));
extern int _rl_input_queued PARAMS((int));
extern void _rl_insert_typein PARAMS((int));
extern int _rl_unget_char PARAMS((int));
+extern int _rl_pushed_input_available PARAMS((void));
/* macro.c */
extern void _rl_with_macro_input PARAMS((char *));
@@ -219,6 +219,7 @@ extern const char *_rl_possible_meta_prefixes[];
/* 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;
extern int _rl_print_completions_horizontally;
@@ -281,4 +282,7 @@ extern int _rl_term_autowrap;
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 --git a/lib/readline/rlstdc.h b/lib/readline/rlstdc.h
index d6a22b37..847fa9c2 100644
--- a/lib/readline/rlstdc.h
+++ b/lib/readline/rlstdc.h
@@ -37,7 +37,7 @@
#endif
#ifndef __attribute__
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
# define __attribute__(x)
# endif
#endif
diff --git a/lib/readline/rltty.c b/lib/readline/rltty.c
index 755efeba..1a31f359 100644
--- a/lib/readline/rltty.c
+++ b/lib/readline/rltty.c
@@ -186,6 +186,8 @@ static int set_tty_settings PARAMS((int, TIOTYPE *));
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)
TIOTYPE *tiop;
@@ -400,6 +402,9 @@ static int set_tty_settings PARAMS((int, TIOTYPE *));
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)
#else
@@ -652,7 +657,10 @@ rl_prep_terminal (meta_flag)
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);
@@ -776,70 +784,97 @@ rl_stop_output (count, key)
/* */
/* **************************************************************** */
-/* 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);
+#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 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)
+#define RESET_SPECIAL(c) \
+ if (c != -1 && kmap[(unsigned char)c].type == ISFUNC)
+ kmap[(unsigned char)c].function = rl_insert;
- if (get_tty_settings (tty, &ttybuff) == 0)
+static void
+_rl_bind_tty_special_chars (kmap, ttybuff)
+ Keymap kmap;
+ TIOTYPE ttybuff;
+{
+ if (ttybuff.flags & SGTTY_SET)
{
- if (ttybuff.flags & SGTTY_SET)
- {
- SET_SPECIAL (ttybuff.sgttyb.sg_erase, rl_rubout);
- SET_SPECIAL (ttybuff.sgttyb.sg_kill, rl_unix_line_discard);
- }
+ 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 */
+ 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;
-#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)
+ uc = tiop->c_cc[sc];
+ if (uc != (unsigned char)_POSIX_VDISABLE && kmap[uc].type == ISFUNC)
+ kmap[uc].function = func;
+}
- if (get_tty_settings (tty, &ttybuff) == 0)
- {
- SET_SPECIAL (VERASE, rl_rubout);
- SET_SPECIAL (VKILL, rl_unix_line_discard);
+/* 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);
+ 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);
+ 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);
}
/* New public way to set the system default editing chars to their readline
@@ -851,6 +886,30 @@ rl_tty_set_default_bindings (kmap)
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 */
+}
+
#if defined (HANDLE_SIGNALS)
#if defined (NEW_TTY_DRIVER)
diff --git a/lib/readline/rltty.h b/lib/readline/rltty.h
index 029a3fbc..142e96b6 100644
--- a/lib/readline/rltty.h
+++ b/lib/readline/rltty.h
@@ -61,22 +61,22 @@
#endif /* !NEW_TTY_DRIVER && !_POSIX_VDISABLE */
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;
+ 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;
#endif /* _RLTTY_H_ */
diff --git a/lib/readline/rltypedefs.h b/lib/readline/rltypedefs.h
index f3280e9f..862bdb8e 100644
--- a/lib/readline/rltypedefs.h
+++ b/lib/readline/rltypedefs.h
@@ -1,6 +1,6 @@
/* rltypedefs.h -- Type declarations for readline functions. */
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2004 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -79,6 +79,12 @@ typedef void rl_voidfunc_t PARAMS((void));
typedef void rl_vintfunc_t PARAMS((int));
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 */
#ifdef __cplusplus
diff --git a/lib/readline/savestring.c b/lib/readline/savestring.c
index c7ebeb1e..820428d8 100644
--- a/lib/readline/savestring.c
+++ b/lib/readline/savestring.c
@@ -1,6 +1,6 @@
/* savestring.c */
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998,2003 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -19,6 +19,7 @@
is generally kept in a file called COPYING or LICENSE. If you do not
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 <config.h>
#ifdef HAVE_STRING_H
diff --git a/lib/readline/search.c b/lib/readline/search.c
index 7e0d60b5..ce7d54eb 100644
--- a/lib/readline/search.c
+++ b/lib/readline/search.c
@@ -82,8 +82,13 @@ static void
make_history_line_current (entry)
HIST_ENTRY *entry;
{
- rl_replace_line (entry->line, 0);
+#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)
_rl_free_history_entry (_rl_saved_line_for_history);
@@ -189,6 +194,11 @@ noninc_search (dir, pchar)
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. */
rl_line_buffer[0] = 0;
rl_end = rl_point = 0;
diff --git a/lib/readline/shell.c b/lib/readline/shell.c
index ad27cc14..a07e2b96 100644
--- a/lib/readline/shell.c
+++ b/lib/readline/shell.c
@@ -126,6 +126,7 @@ sh_set_lines_and_columns (lines, cols)
b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("LINES=") + 1);
sprintf (b, "LINES=%d", lines);
putenv (b);
+
b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("COLUMNS=") + 1);
sprintf (b, "COLUMNS=%d", cols);
putenv (b);
@@ -134,9 +135,12 @@ sh_set_lines_and_columns (lines, cols)
b = (char *)xmalloc (INT_STRLEN_BOUND (int) + 1);
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 --git a/lib/readline/signals.c b/lib/readline/signals.c
index 0a1468b6..8e9c0ae6 100644
--- a/lib/readline/signals.c
+++ b/lib/readline/signals.c
@@ -73,6 +73,10 @@ typedef struct { SigHandler *sa_handler; int sa_mask, sa_flags; } sighandler_cxt
# define sigemptyset(m)
#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 *));
@@ -85,6 +89,8 @@ int rl_catch_signals = 1;
/* If non-zero, readline will install a signal handler for SIGWINCH. */
#ifdef SIGWINCH
int rl_catch_sigwinch = 1;
+#else
+int rl_catch_sigwinch = 0; /* for the readline state struct in readline.c */
#endif
static int signals_set_flag;
@@ -233,7 +239,7 @@ rl_set_sighandler (sig, handler, ohandler)
struct sigaction act;
act.sa_handler = handler;
- act.sa_flags = 0; /* XXX - should we set SA_RESTART for SIGWINCH? */
+ act.sa_flags = (sig == SIGWINCH) ? SA_RESTART : 0;
sigemptyset (&act.sa_mask);
sigemptyset (&ohandler->sa_mask);
sigaction (sig, &act, &old_handler);
diff --git a/lib/readline/terminal.c b/lib/readline/terminal.c
index f3f5b6c4..b95aea89 100644
--- a/lib/readline/terminal.c
+++ b/lib/readline/terminal.c
@@ -347,11 +347,7 @@ get_term_capabilities (bp)
register int i;
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;
}
@@ -489,13 +485,13 @@ bind_termcap_arrow_keys (map)
xkeymap = _rl_keymap;
_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_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_if_unbound (_rl_term_kh, rl_beg_of_line); /* Home */
- _rl_bind_if_unbound (_rl_term_at7, rl_end_of_line); /* End */
+ 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 --git a/lib/readline/text.c b/lib/readline/text.c
index 2a7b724f..d917e99b 100644
--- a/lib/readline/text.c
+++ b/lib/readline/text.c
@@ -1,6 +1,6 @@
/* text.c -- text handling commands for readline. */
-/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2004 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -170,6 +170,9 @@ _rl_fix_point (fix_mark_too)
}
#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)
const char *text;
@@ -801,13 +804,10 @@ _rl_overwrite_char (count, c)
k = _rl_read_mbstring (c, mbkey, MB_LEN_MAX);
#endif
+ rl_begin_undo_group ();
+
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)
rl_insert_text (mbkey);
@@ -815,9 +815,12 @@ _rl_overwrite_char (count, c)
#endif
_rl_insert_char (1, c);
- rl_end_undo_group ();
+ if (rl_point < rl_end)
+ rl_delete (1, c);
}
+ rl_end_undo_group ();
+
return 0;
}
@@ -877,7 +880,8 @@ rl_newline (count, key)
if (rl_editing_mode == vi_mode)
{
_rl_vi_done_inserting ();
- _rl_vi_reset_last ();
+ if (_rl_vi_textmod_command (_rl_vi_last_command) == 0) /* XXX */
+ _rl_vi_reset_last ();
}
#endif /* VI_MODE */
@@ -935,9 +939,12 @@ _rl_overwrite_rubout (count, key)
rl_delete_text (opoint, rl_point);
/* Emacs puts point at the beginning of the sequence of spaces. */
- opoint = rl_point;
- _rl_insert_char (l, ' ');
- rl_point = opoint;
+ if (rl_point < rl_end)
+ {
+ opoint = rl_point;
+ _rl_insert_char (l, ' ');
+ rl_point = opoint;
+ }
rl_end_undo_group ();
diff --git a/lib/readline/util.c b/lib/readline/util.c
index c7bd360e..a632d811 100644
--- a/lib/readline/util.c
+++ b/lib/readline/util.c
@@ -250,7 +250,7 @@ _rl_strpbrk (string1, string2)
{
v = _rl_get_char_len (string1, &ps);
if (v > 1)
- string += v - 1; /* -1 to account for auto-increment in loop */
+ string1 += v - 1; /* -1 to account for auto-increment in loop */
}
#endif
}
diff --git a/lib/readline/vi_mode.c b/lib/readline/vi_mode.c
index 5d146b3f..74d8acbb 100644
--- a/lib/readline/vi_mode.c
+++ b/lib/readline/vi_mode.c
@@ -1,7 +1,7 @@
/* vi_mode.c -- A vi emulation mode for Bash.
Derived from code written by Jeff Sparkes (jsparkes@bnr.ca). */
-/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2004 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -63,6 +63,8 @@
#define member(c, s) ((c) ? (char *)strchr ((s), (c)) != (char *)NULL : 0)
#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;
@@ -83,7 +85,6 @@ static int vi_continued_command;
static char *vi_insert_buffer;
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;
static int _rl_vi_last_motion;
@@ -135,6 +136,16 @@ _rl_vi_set_last (key, repeat, sign)
_rl_vi_last_arg_sign = sign;
}
+/* 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
_rl_vi_textmod_command (c)
@@ -297,10 +308,8 @@ rl_vi_complete (ignore, key)
rl_complete (0, key);
if (key == '*' || key == '\\')
- {
- _rl_vi_set_last (key, 1, rl_arg_sign);
- rl_vi_insertion_mode (1, key);
- }
+ rl_vi_start_inserting (key, 1, rl_arg_sign);
+
return (0);
}
@@ -310,8 +319,7 @@ rl_vi_tilde_expand (ignore, key)
int ignore, key;
{
rl_tilde_expand (0, key);
- _rl_vi_set_last (key, 1, rl_arg_sign); /* XXX */
- rl_vi_insertion_mode (1, key);
+ rl_vi_start_inserting (key, 1, rl_arg_sign);
return (0);
}
@@ -429,7 +437,8 @@ rl_vi_eWord (count, ignore)
/* 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]));
+ while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point]))
+ rl_point++;
if (rl_point && rl_point < rl_end)
{
@@ -640,7 +649,7 @@ _rl_vi_done_inserting ()
}
else
{
- if (_rl_vi_last_key_before_insert == 'i' && rl_undo_list)
+ 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. */
else if (_rl_vi_last_key_before_insert == 'C')
@@ -680,7 +689,8 @@ _rl_vi_change_mbchar_case (count)
int count;
{
wchar_t wc;
- char mb[MB_LEN_MAX];
+ char mb[MB_LEN_MAX+1];
+ int mblen;
mbstate_t ps;
memset (&ps, 0, sizeof (mbstate_t));
@@ -703,7 +713,9 @@ _rl_vi_change_mbchar_case (count)
/* Vi is kind of strange here. */
if (wc)
{
- wctomb (mb, wc);
+ mblen = wcrtomb (mb, wc, &ps);
+ if (mblen >= 0)
+ mb[mblen] = '\0';
rl_begin_undo_group ();
rl_delete (1, 0);
rl_insert_text (mb);
@@ -722,12 +734,13 @@ int
rl_vi_change_case (count, ignore)
int count, ignore;
{
- char c = 0;
+ int c, p;
/* Don't try this on an empty line. */
if (rl_point >= rl_end)
return (0);
+ c = 0;
#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
return (_rl_vi_change_mbchar_case (count));
@@ -749,8 +762,11 @@ rl_vi_change_case (count, ignore)
/* Vi is kind of strange here. */
if (c)
{
+ p = rl_point;
rl_begin_undo_group ();
- rl_delete (1, c);
+ 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 ();
rl_vi_check ();
@@ -768,7 +784,9 @@ rl_vi_put (count, key)
if (!_rl_uppercase_p (key) && (rl_point + 1 <= rl_end))
rl_point = _rl_find_next_mbchar (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
- rl_yank (1, key);
+ while (count--)
+ rl_yank (1, key);
+
rl_backward_char (1, key);
return (0);
}
@@ -816,6 +834,7 @@ rl_vi_domove (key, nextkey)
{
save = rl_numeric_arg;
rl_numeric_arg = _rl_digit_value (c);
+ rl_explicit_arg = 1;
rl_digit_loop1 ();
rl_numeric_arg *= save;
RL_SETSTATE(RL_STATE_MOREINPUT);
@@ -1014,8 +1033,7 @@ rl_vi_change_to (count, key)
/* `C' does not save the text inserted for undoing or redoing. */
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);
+ rl_vi_start_inserting (key, rl_numeric_arg, rl_arg_sign);
}
return (0);
@@ -1264,14 +1282,14 @@ rl_vi_bracktype (c)
/* 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]
+ 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. */
int
rl_vi_change_char (count, key)
int count, key;
{
- int c;
+ int c, p;
if (vi_redoing)
c = _rl_vi_last_replacement;
@@ -1285,11 +1303,11 @@ rl_vi_change_char (count, key)
if (c == '\033' || c == CTRL ('C'))
return -1;
+ rl_begin_undo_group ();
while (count-- && rl_point < rl_end)
{
- rl_begin_undo_group ();
-
- rl_delete (1, c);
+ p = rl_point;
+ rl_vi_delete (1, c);
#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
while (_rl_insert_char (1, c))
@@ -1300,12 +1318,14 @@ rl_vi_change_char (count, key)
}
else
#endif
- _rl_insert_char (1, c);
- if (count == 0)
- rl_backward_char (1, c);
-
- rl_end_undo_group ();
+ {
+ if (rl_point < p) /* Did we retreat at EOL? */
+ rl_point++;
+ _rl_insert_char (1, c);
+ }
}
+ rl_end_undo_group ();
+
return (0);
}
@@ -1315,7 +1335,7 @@ rl_vi_subst (count, key)
{
/* 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 ' */
+ rl_stuff_char ((key == 'S') ? 'c' : 'l'); /* `S' == `cc', `s' == `cl' */
return (rl_vi_change_to (count, 'c'));
}
diff --git a/lib/sh/Makefile.in b/lib/sh/Makefile.in
index 468899d2..c375c1de 100644
--- a/lib/sh/Makefile.in
+++ b/lib/sh/Makefile.in
@@ -18,13 +18,28 @@
# along with this program; if not, write to the Free Software
# 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@
topdir = @top_srcdir@
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@
INSTALL_DATA = @INSTALL_DATA@
@@ -49,7 +64,7 @@ PROFILE_FLAGS = @PROFILE_FLAGS@
DEFS = @DEFS@
LOCAL_DEFS = @LOCAL_DEFS@
-INCLUDES = -I. -I../.. -I$(topdir) -I$(topdir)/lib -I$(BASHINCDIR) -I$(srcdir)
+INCLUDES = -I. -I../.. -I$(topdir) -I$(topdir)/lib -I$(BASHINCDIR) -I$(srcdir) $(INTL_INC)
CCFLAGS = ${PROFILE_FLAGS} ${INCLUDES} $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) \
$(CFLAGS) $(CPPFLAGS)
@@ -71,8 +86,8 @@ CSOURCES = clktck.c clock.c getcwd.c getenv.c oslib.c setlinebuf.c \
inet_aton.c netconn.c netopen.c strpbrk.c timeval.c makepath.c \
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 \
+ 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
# The header files for this library.
@@ -81,7 +96,7 @@ HSOURCES =
# The object files contained in $(LIBRARY_NAME)
LIBOBJS = @LIBOBJS@
OBJECTS = clktck.o clock.o getenv.o oslib.o setlinebuf.o \
- itos.o zread.o zwrite.o shtty.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 \
strtrans.o strindex.o snprintf.o mailstat.o fmtulong.o \
@@ -113,6 +128,9 @@ mostlyclean: clean
# 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
clock.o: clock.c
@@ -231,7 +249,8 @@ getenv.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topd
getenv.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
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
+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
inet_aton.o: ${BASHINCDIR}/stdc.h
@@ -243,7 +262,7 @@ itos.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir
itos.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
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
+itos.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h
makepath.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
makepath.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
@@ -252,7 +271,7 @@ makepath.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${to
makepath.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
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
+makepath.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h
netconn.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h
netconn.o: ${topdir}/bashtypes.h
@@ -264,7 +283,8 @@ netopen.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${top
netopen.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
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
+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
oslib.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
@@ -273,7 +293,7 @@ oslib.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdi
oslib.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
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: ${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
@@ -284,7 +304,7 @@ pathcanon.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${t
pathcanon.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
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: ${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
@@ -295,7 +315,7 @@ pathphys.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${to
pathphys.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
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: ${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
@@ -329,7 +349,7 @@ strerror.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${to
strerror.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
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
+strerror.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h
strindex.o: ${BASHINCDIR}/stdc.h ${topdir}/bashansi.h
strindex.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h
@@ -341,7 +361,7 @@ stringlist.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${
stringlist.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
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
+stringlist.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h
stringvec.o: ${topdir}/bashansi.h ${BASHINCDIR}/chartypes.h
stringvec.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
@@ -350,7 +370,7 @@ stringvec.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${t
stringvec.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
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
+stringvec.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h
strpbrk.o: ${BASHINCDIR}/stdc.h
@@ -385,7 +405,7 @@ strtrans.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${to
strtrans.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
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
+strtrans.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h
times.o: ${BASHINCDIR}/systimes.h
times.o: ${BASHINCDIR}/posixtime.h
@@ -410,18 +430,21 @@ fmtulong.o: ${BASHINCDIR}/ansi_stdlib.h
fmtulong.o: ${BASHINCDIR}/chartypes.h
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
fmtullong.o: ${BASHINCDIR}/ansi_stdlib.h
fmtullong.o: ${BASHINCDIR}/chartypes.h
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
fmtumax.o: ${BASHINCDIR}/ansi_stdlib.h
fmtumax.o: ${BASHINCDIR}/chartypes.h
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
xstrchr.o: ${BASHINCDIR}/ansi_stdlib.h
diff --git a/lib/sh/fmtulong.c b/lib/sh/fmtulong.c
index dc313be9..43fdffda 100644
--- a/lib/sh/fmtulong.c
+++ b/lib/sh/fmtulong.c
@@ -38,9 +38,14 @@
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
#include <chartypes.h>
#include <errno.h>
+#include <bashintl.h>
+
#include "stdc.h"
#include <typemax.h>
@@ -93,7 +98,7 @@ fmtulong (ui, base, buf, len, flags)
if (base < 2 || base > 64)
{
#if 1
- strncpy (buf, "invalid base", len - 1);
+ strncpy (buf, _("invalid base"), len - 1);
buf[len] = '\0';
errno = EINVAL;
return (p = buf);
diff --git a/lib/sh/getcwd.c b/lib/sh/getcwd.c
index 0c8b1da8..cd724f6f 100644
--- a/lib/sh/getcwd.c
+++ b/lib/sh/getcwd.c
@@ -22,6 +22,10 @@
#if !defined (HAVE_GETCWD)
+#if !defined (__GNUC__) && !defined (HAVE_ALLOCA_H) && defined (_AIX)
+ #pragma alloca
+#endif /* _AIX && RISC6000 && !__GNUC__ */
+
#include <bashtypes.h>
#include <errno.h>
diff --git a/lib/sh/getenv.c b/lib/sh/getenv.c
index 028afb15..a7dfb186 100644
--- a/lib/sh/getenv.c
+++ b/lib/sh/getenv.c
@@ -115,7 +115,7 @@ putenv (str)
return -1;
}
- offset = assignment (str);
+ offset = assignment (str, 0);
if (str[offset] != '=')
{
errno = EINVAL;
@@ -169,7 +169,7 @@ setenv (name, value, rewrite)
}
var = 0;
- v = value;
+ v = (char *)value; /* some compilers need explicit cast */
/* XXX - should we worry about readonly here? */
if (rewrite == 0)
var = find_variable (name);
diff --git a/lib/sh/mailstat.c b/lib/sh/mailstat.c
index 8005252a..03782e78 100644
--- a/lib/sh/mailstat.c
+++ b/lib/sh/mailstat.c
@@ -149,7 +149,7 @@ mailstat(path, st)
closedir(dd);
}
- if (atime)
+/* if (atime) */ /* Set atime even if cur/ is empty */
st_ret.st_atime = atime;
if (mtime)
st_ret.st_mtime = mtime;
diff --git a/lib/sh/netconn.c b/lib/sh/netconn.c
index f412cb02..d05aef55 100644
--- a/lib/sh/netconn.c
+++ b/lib/sh/netconn.c
@@ -22,7 +22,7 @@
#include <config.h>
#include <bashtypes.h>
-#ifndef _MINIX
+#if ! defined(_MINIX) && defined (HAVE_SYS_FILE_H)
# include <sys/file.h>
#endif
#include <posixstat.h>
diff --git a/lib/sh/netopen.c b/lib/sh/netopen.c
index 4197db1b..aaf0c475 100644
--- a/lib/sh/netopen.c
+++ b/lib/sh/netopen.c
@@ -51,6 +51,8 @@
#endif
#include <bashansi.h>
+#include <bashintl.h>
+
#include <errno.h>
#include <shell.h>
@@ -153,14 +155,14 @@ _netopen4(host, serv, typ)
if (_getaddr(host, &ina) == 0)
{
- internal_error ("%s: host unknown", host);
+ internal_error (_("%s: host unknown"), host);
errno = EINVAL;
return -1;
}
if (_getserv(serv, typ, &p) == 0)
{
- internal_error("%s: invalid service", serv);
+ internal_error(_("%s: invalid service"), serv);
errno = EINVAL;
return -1;
}
@@ -291,7 +293,7 @@ netopen (path)
t = strchr (s, '/');
if (t == 0)
{
- internal_error ("%s: bad network path specification", path);
+ internal_error (_("%s: bad network path specification"), path);
return -1;
}
*t++ = '\0';
@@ -331,7 +333,7 @@ int
netopen (path)
char *path;
{
- internal_error ("network operations not supported");
+ internal_error (_("network operations not supported"));
return -1;
}
diff --git a/lib/sh/pathcanon.c b/lib/sh/pathcanon.c
index d74f99c0..88929540 100644
--- a/lib/sh/pathcanon.c
+++ b/lib/sh/pathcanon.c
@@ -34,9 +34,14 @@
#include <bashansi.h>
#include <stdio.h>
#include <chartypes.h>
+#include <errno.h>
#include "shell.h"
+#if !defined (errno)
+extern int errno;
+#endif
+
#if defined (__CYGWIN__)
#include <sys/cygwin.h>
@@ -70,9 +75,10 @@ static int
_path_isdir (path)
char *path;
{
- int l;
+ 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__)
if (l == 0)
diff --git a/lib/sh/pathphys.c b/lib/sh/pathphys.c
index df692043..4d6304ce 100644
--- a/lib/sh/pathphys.c
+++ b/lib/sh/pathphys.c
@@ -68,7 +68,7 @@ _path_readlink (path, buf, bufsiz)
/*
* Return PATH with all symlinks expanded in newly-allocated memory.
- * This always gets a full pathname.
+ * This always gets an absolute pathname.
*/
char *
@@ -80,11 +80,26 @@ sh_physpath (path, flags)
char *result, *p, *q, *qsave, *qbase, *workpath;
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);
- workpath = (char *)xmalloc (PATH_MAX + 1);
- strcpy (workpath, path);
+ /* 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. */
@@ -133,7 +148,19 @@ sh_physpath (path, flags)
if (q != qbase)
*q++ = DIRSEP;
while (*p && (ISDIRSEP(*p) == 0))
- *q++ = *p++;
+ {
+ if (q - result >= PATH_MAX)
+ {
+#ifdef ENAMETOOLONG
+ errno = ENAMETOOLONG;
+#else
+ errno = EINVAL;
+#endif
+ goto error;
+ }
+
+ *q++ = *p++;
+ }
*q = '\0';
@@ -151,6 +178,8 @@ sh_physpath (path, flags)
{
#ifdef ELOOP
errno = ELOOP;
+#else
+ errno = EINVAL;
#endif
error:
free (result);
@@ -160,6 +189,17 @@ error:
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
buffer and appending the rest of `workpath'. Reset p to point
to the start of the rest of the path. If the link value is an
diff --git a/lib/sh/shmatch.c b/lib/sh/shmatch.c
new file mode 100644
index 00000000..18292ae2
--- /dev/null
+++ b/lib/sh/shmatch.c
@@ -0,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 <config.h>
+#endif
+
+#if defined (HAVE_POSIX_REGEXP)
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include "bashansi.h"
+
+#include <stdio.h>
+#include <regex.h>
+
+#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 (&regex, 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 (&regex, 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 (&regex);
+
+ return result;
+}
+
+#endif /* HAVE_POSIX_REGEXP */
diff --git a/lib/sh/shquote.c b/lib/sh/shquote.c
index 713f4819..aac2d349 100644
--- a/lib/sh/shquote.c
+++ b/lib/sh/shquote.c
@@ -83,6 +83,8 @@ sh_double_quote (string)
{
if (sh_syntaxtab[c] & CBSDQUOTE)
*r++ = '\\';
+ else if (c == CTLESC || c == CTLNUL)
+ *r++ = CTLESC; /* could be '\\'? */
*r++ = c;
}
@@ -94,7 +96,8 @@ sh_double_quote (string)
}
/* Remove backslashes that are quoting characters that are special between
- double quotes. Return a new string. */
+ double quotes. Return a new string. XXX - should this handle CTLESC
+ and CTLNUL? */
char *
sh_un_double_quote (string)
char *string;
@@ -158,6 +161,11 @@ sh_backslash_quote (string)
*r++ = c;
break;
#endif
+ case CTLESC: case CTLNUL: /* internal quoting characters */
+ *r++ = CTLESC; /* could be '\\'? */
+ *r++ = c;
+ break;
+
case '#': /* comment char */
if (s == string)
*r++ = '\\';
@@ -188,6 +196,9 @@ sh_backslash_quote_for_double_quotes (string)
{
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 --git a/lib/sh/snprintf.c b/lib/sh/snprintf.c
index 7669576c..b79b41fb 100644
--- a/lib/sh/snprintf.c
+++ b/lib/sh/snprintf.c
@@ -45,10 +45,11 @@
/*
* 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
+ * * *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
*/
#define FLOATING_POINT
diff --git a/lib/sh/strftime.c b/lib/sh/strftime.c
index 253d1df4..4cb542f5 100644
--- a/lib/sh/strftime.c
+++ b/lib/sh/strftime.c
@@ -95,7 +95,7 @@ static int iso8601wknum(const struct tm *timeptr);
#if !defined(OS2) && !defined(MSDOS) && defined(HAVE_TZNAME)
extern char *tzname[2];
extern int daylight;
-#if defined(SOLARIS) || defined(mips)
+#if defined(SOLARIS) || defined(mips) || defined (M_UNIX)
extern long int timezone, altzone;
#else
extern int timezone, altzone;
diff --git a/lib/sh/strstr.c b/lib/sh/strstr.c
new file mode 100644
index 00000000..c41e9034
--- /dev/null
+++ b/lib/sh/strstr.c
@@ -0,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 <config.h>
+#endif
+
+#if defined _LIBC || defined HAVE_STRING_H
+# include <string.h>
+#endif
+#include <sys/types.h>
+
+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 --git a/lib/sh/strtrans.c b/lib/sh/strtrans.c
index 741927c6..e264e3db 100644
--- a/lib/sh/strtrans.c
+++ b/lib/sh/strtrans.c
@@ -92,10 +92,27 @@ ansicstr (string, len, flags, sawc, rlen)
c &= 0xFF;
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 */
- if (temp == 2)
+ else if (temp == 2)
{
*r++ = '\\';
c = 'x';
@@ -104,7 +121,7 @@ ansicstr (string, len, flags, sawc, rlen)
break;
case '\\':
break;
- case '\'':
+ case '\'': case '"': case '?':
if (flags & 1)
*r++ = '\\';
break;
diff --git a/lib/sh/tmpfile.c b/lib/sh/tmpfile.c
index e28f94d0..fb7b732d 100644
--- a/lib/sh/tmpfile.c
+++ b/lib/sh/tmpfile.c
@@ -62,20 +62,20 @@ get_sys_tmpdir ()
#ifdef P_tmpdir
sys_tmpdir = P_tmpdir;
- if (stat (sys_tmpdir, &sb) == 0)
+ if (file_iswdir (sys_tmpdir))
return sys_tmpdir;
#endif
sys_tmpdir = "/tmp";
- if (stat (sys_tmpdir, &sb) == 0)
+ if (file_iswdir (sys_tmpdir))
return sys_tmpdir;
sys_tmpdir = "/var/tmp";
- if (stat (sys_tmpdir, &sb) == 0)
+ if (file_iswdir (sys_tmpdir))
return sys_tmpdir;
sys_tmpdir = "/usr/tmp";
- if (stat (sys_tmpdir, &sb) == 0)
+ if (file_iswdir (sys_tmpdir))
return sys_tmpdir;
sys_tmpdir = DEFAULT_TMPDIR;
diff --git a/lib/termcap/termcap.c b/lib/termcap/termcap.c
index eaf94713..780b15ce 100644
--- a/lib/termcap/termcap.c
+++ b/lib/termcap/termcap.c
@@ -21,8 +21,8 @@ Free Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#include <config.h>
/* Get the O_* definitions for open et al. */
-#ifndef _MINIX
-#include <sys/file.h>
+#if !defined (_MINIX) && defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
#endif
#include <fcntl.h>
diff --git a/locale.c b/locale.c
index 1805b2fb..0c4772a9 100644
--- a/locale.c
+++ b/locale.c
@@ -1,6 +1,6 @@
/* locale.c - Miscellaneous internationalization functions. */
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -47,6 +47,16 @@ static char *default_dir;
categories */
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(). */
void
@@ -57,20 +67,29 @@ set_default_locale ()
if (default_locale)
default_locale = savestring (default_locale);
#endif /* HAVE_SETLOCALE */
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
}
-/* 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
+/* 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
set_default_locale_vars ()
{
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);
+ {
+ setlocale (LC_CTYPE, lc_all);
+ locale_setblanks ();
+ }
+# endif
# if defined (LC_COLLATE)
val = get_string_value ("LC_COLLATE");
@@ -97,7 +116,10 @@ set_default_locale_vars ()
{
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
}
val = get_string_value ("TEXTDOMAINDIR");
@@ -105,7 +127,8 @@ set_default_locale_vars ()
{
FREE (default_dir);
default_dir = savestring (val);
- bindtextdomain (default_domain, default_dir);
+ if (default_domain && *default_domain)
+ bindtextdomain (default_domain, default_dir);
}
}
@@ -115,18 +138,24 @@ int
set_locale_var (var, value)
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);
}
else if (var[0] == 'T') /* TEXTDOMAINDIR */
{
FREE (default_dir);
default_dir = value ? savestring (value) : (char *)NULL;
- bindtextdomain (default_domain, default_dir);
+ if (default_domain && *default_domain)
+ bindtextdomain (default_domain, default_dir);
return (1);
}
@@ -137,15 +166,15 @@ set_locale_var (var, value)
FREE (lc_all);
if (value)
lc_all = savestring (value);
- else if (default_locale)
- lc_all = savestring (default_locale);
else
{
lc_all = (char *)xmalloc (1);
lc_all[0] = '\0';
}
#if defined (HAVE_SETLOCALE)
- return (setlocale (LC_ALL, lc_all) != 0);
+ r = *lc_all ? (setlocale (LC_ALL, lc_all) != 0) : reset_locale_vars ();
+ locale_setblanks ();
+ return r;
#else
return (1);
#endif
@@ -154,28 +183,34 @@ set_locale_var (var, value)
#if defined (HAVE_SETLOCALE)
else if (var[3] == 'C' && var[4] == 'T') /* LC_CTYPE */
{
+# if defined (LC_CTYPE)
if (lc_all == 0 || *lc_all == '\0')
- return (setlocale (LC_CTYPE, value ? value : "") != 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 */
{
# if defined (LC_COLLATE)
if (lc_all == 0 || *lc_all == '\0')
- return (setlocale (LC_COLLATE, value ? value : "") != 0);
+ return (setlocale (LC_COLLATE, get_locale_var ("LC_COLLATE")) != 0);
# endif /* LC_COLLATE */
}
else if (var[3] == 'M' && var[4] == 'E') /* LC_MESSAGES */
{
# if defined (LC_MESSAGES)
if (lc_all == 0 || *lc_all == '\0')
- return (setlocale (LC_MESSAGES, value ? value : "") != 0);
+ return (setlocale (LC_MESSAGES, get_locale_var ("LC_MESSAGES")) != 0);
# endif /* LC_MESSAGES */
}
else if (var[3] == 'N' && var[4] == 'U') /* LC_NUMERIC */
{
# if defined (LC_NUMERIC)
if (lc_all == 0 || *lc_all == '\0')
- return (setlocale (LC_NUMERIC, value ? value : "") != 0);
+ return (setlocale (LC_NUMERIC, get_locale_var ("LC_NUMERIC")) != 0);
# endif /* LC_NUMERIC */
}
#endif /* HAVE_SETLOCALE */
@@ -183,17 +218,28 @@ set_locale_var (var, value)
return (0);
}
-/* 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. */
+/* 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;
{
- return ((lc_all == 0 || *lc_all == 0) ? setlocale (LC_ALL, value?value:"") != NULL : 0);
+ 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) */
+/* 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)
char *var;
@@ -202,14 +248,50 @@ get_locale_var (var)
locale = lc_all;
- if (locale == 0)
+ if (locale == 0 || *locale == 0)
locale = get_string_value (var);
- if (locale == 0)
- locale = default_locale;
+ 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()
is not available, the passed string is returned unchanged. The
@@ -220,10 +302,8 @@ localetrans (string, len, lenp)
int len, *lenp;
{
char *locale, *t;
-#if defined (HAVE_GETTEXT)
char *translated;
int tlen;
-#endif
/* Don't try to translate null strings. */
if (string == 0 || *string == 0)
@@ -238,10 +318,8 @@ localetrans (string, len, lenp)
/* If we don't have setlocale() or the current locale is `C' or `POSIX',
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);
strcpy (t, string);
@@ -250,9 +328,12 @@ localetrans (string, len, lenp)
return (t);
}
-#if defined (HAVE_GETTEXT)
/* Now try to translate it. */
- translated = gettext (string);
+ if (default_domain && *default_domain)
+ translated = dgettext (default_domain, string);
+ else
+ translated = string;
+
if (translated == string) /* gettext returns its argument if untranslatable */
{
t = (char *)xmalloc (len + 1);
@@ -269,7 +350,6 @@ localetrans (string, len, lenp)
*lenp = tlen;
}
return (t);
-#endif /* HAVE_GETTEXT */
}
/* Change a bash string into a string suitable for inclusion in a `po' file.
@@ -339,11 +419,12 @@ localeexpand (string, start, end, lineno, lenp)
temp[tlen] = '\0';
/* 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 <NL>
- into `\n"<NL>"'. 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. */
+ 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 <NL> into `\n"<NL>"'. 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)
{
if (dump_po_strings)
@@ -378,3 +459,21 @@ localeexpand (string, start, end, lineno, lenp)
return (temp);
}
}
+
+/* Set every character in the <blank> 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 --git a/mailcheck.c b/mailcheck.c
index 5cc2fc22..f23a7f85 100644
--- a/mailcheck.c
+++ b/mailcheck.c
@@ -31,6 +31,7 @@ Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#endif
#include "posixtime.h"
#include "bashansi.h"
+#include "bashintl.h"
#include "shell.h"
#include "execute_cmd.h"
@@ -289,6 +290,7 @@ parse_mailpath_spec (str)
char *
make_default_mailpath ()
{
+#if defined (DEFAULT_MAIL_DIRECTORY)
char *mp;
get_current_user_info ();
@@ -297,6 +299,9 @@ make_default_mailpath ()
mp[sizeof(DEFAULT_MAIL_DIRECTORY) - 1] = '/';
strcpy (mp + sizeof (DEFAULT_MAIL_DIRECTORY), current_user.user_name);
return (mp);
+#else
+ return ((char *)NULL);
+#endif
}
/* Remember the dates of the files specified by MAILPATH, or if there is
@@ -321,8 +326,11 @@ remember_mail_dates ()
if (mailpaths == 0)
{
mailpaths = make_default_mailpath ();
- add_mail_file (mailpaths, (char *)NULL);
- free (mailpaths);
+ if (mailpaths)
+ {
+ add_mail_file (mailpaths, (char *)NULL);
+ free (mailpaths);
+ }
return;
}
@@ -371,7 +379,7 @@ check_mail ()
int file_is_bigger;
use_user_notification = mailfiles[i]->msg != (char *)NULL;
- message = mailfiles[i]->msg ? mailfiles[i]->msg : "You have mail in $_";
+ message = mailfiles[i]->msg ? mailfiles[i]->msg : _("You have mail in $_");
bind_variable ("_", current_mail_file);
@@ -390,13 +398,13 @@ check_mail ()
the access time to be equal to the modification time when
the mail in the file is manipulated, check the size also. If
the file has not grown, continue. */
- if ((atime >= mtime) || !file_is_bigger)
+ if ((atime >= mtime) && !file_is_bigger)
continue;
/* If the mod time is later than the access time and the file
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 $_";
+ message = _("You have new mail in $_");
#undef atime
#undef mtime
@@ -412,7 +420,7 @@ check_mail ()
if (mail_warning && file_access_date_changed (i))
{
update_mail_file (i);
- printf ("The mail in %s has been read\n", current_mail_file);
+ printf (_("The mail in %s has been read\n"), current_mail_file);
}
}
diff --git a/make_cmd.c b/make_cmd.c
index 1362e798..479d9c3e 100644
--- a/make_cmd.c
+++ b/make_cmd.c
@@ -1,7 +1,7 @@
/* make_cmd.c -- Functions for making instances of the various
parser constructs. */
-/* Copyright (C) 1989-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1989-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -23,7 +23,7 @@ Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#include <stdio.h>
#include "bashtypes.h"
-#ifndef _MINIX
+#if !defined (_MINIX) && defined (HAVE_SYS_FILE_H)
# include <sys/file.h>
#endif
#include "filecntl.h"
@@ -32,6 +32,8 @@ Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
# include <unistd.h>
#endif
+#include "bashintl.h"
+
#include "syntax.h"
#include "command.h"
#include "general.h"
@@ -61,7 +63,7 @@ sh_obj_cache_t wlcache = {0, 0, 0};
#define WDCACHESIZE 60
#define WLCACHESIZE 60
-static COMMAND *make_for_or_select __P((enum command_type, WORD_DESC *, WORD_LIST *, COMMAND *));
+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 *));
#endif
@@ -199,39 +201,43 @@ command_connect (com1, com2, connector)
}
static COMMAND *
-make_for_or_select (type, name, map_list, action)
+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;
temp = (FOR_COM *)xmalloc (sizeof (FOR_COM));
temp->flags = 0;
temp->name = name;
+ temp->line = lineno;
temp->map_list = map_list;
temp->action = action;
return (make_command (type, (SIMPLE_COM *)temp));
}
COMMAND *
-make_for_command (name, map_list, action)
+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));
+ return (make_for_or_select (cm_for, name, map_list, action, lineno));
}
COMMAND *
-make_select_command (name, map_list, action)
+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));
+ return (make_for_or_select (cm_select, name, map_list, action, lineno));
#else
last_command_exit_value = 2;
return ((COMMAND *)NULL);
@@ -244,14 +250,21 @@ make_arith_for_expr (s)
char *s;
{
WORD_LIST *result;
+ WORD_DESC *wd;
if (s == 0 || *s == '\0')
return ((WORD_LIST *)NULL);
- result = make_word_list (make_word (s), (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)
WORD_LIST *exprs;
@@ -302,10 +315,10 @@ make_arith_for_command (exprs, action, lineno)
if (nsemi != 3)
{
if (nsemi < 3)
- parser_error (lineno, "syntax error: arithmetic expression required");
+ parser_error (lineno, _("syntax error: arithmetic expression required"));
else
- parser_error (lineno, "syntax error: `;' unexpected");
- parser_error (lineno, "syntax error: `((%s))'", exprs->word->word);
+ parser_error (lineno, _("syntax error: `;' unexpected"));
+ parser_error (lineno, _("syntax error: `((%s))'"), exprs->word->word);
last_command_exit_value = 2;
return ((COMMAND *)NULL);
}
@@ -318,8 +331,10 @@ make_arith_for_command (exprs, action, lineno)
temp->step = step ? step : make_arith_for_expr ("1");
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);
#endif /* ARITH_FOR_COMMAND */
@@ -337,7 +352,7 @@ make_group_command (command)
}
COMMAND *
-make_case_command (word, clauses)
+make_case_command (word, clauses, lineno)
WORD_DESC *word;
PATTERN_LIST *clauses;
{
@@ -345,6 +360,7 @@ make_case_command (word, clauses)
temp = (CASE_COM *)xmalloc (sizeof (CASE_COM));
temp->flags = 0;
+ temp->line = lineno;
temp->word = word;
temp->clauses = REVERSE_LIST (clauses, PATTERN_LIST *);
return (make_command (cm_case, (SIMPLE_COM *)temp));
@@ -511,7 +527,7 @@ make_simple_command (element, command)
if (element.word)
command->value.Simple->words = make_word_list (element.word, command->value.Simple->words);
- else
+ else if (element.redirect)
{
REDIRECT *r = element.redirect;
/* Due to the way <> is implemented, there may be more than a single
@@ -541,7 +557,7 @@ make_here_document (temp)
if (temp->instruction != r_deblank_reading_until &&
temp->instruction != r_reading_until)
{
- internal_error ("make_here_document: bad instruction type %d", temp->instruction);
+ internal_error (_("make_here_document: bad instruction type %d"), temp->instruction);
return;
}
@@ -711,7 +727,7 @@ make_redirection (source, instruction, dest_and_filename)
break;
default:
- programming_error ("make_redirection: redirection instruction `%d' out of range", instruction);
+ programming_error (_("make_redirection: redirection instruction `%d' out of range"), instruction);
abort ();
break;
}
@@ -725,6 +741,11 @@ make_function_def (name, command, lineno, lstart)
int lineno, lstart;
{
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));
temp->command = command;
@@ -732,6 +753,17 @@ make_function_def (name, command, lineno, lstart)
temp->line = lineno;
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 --git a/make_cmd.h b/make_cmd.h
index 7fb5697d..286cc0d2 100644
--- a/make_cmd.h
+++ b/make_cmd.h
@@ -36,9 +36,9 @@ extern WORD_LIST *make_word_list __P((WORD_DESC *, WORD_LIST *));
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_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 *));
+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 *));
extern COMMAND *make_while_command __P((COMMAND *, COMMAND *));
@@ -52,7 +52,7 @@ extern COMMAND *clean_simple_command __P((COMMAND *));
extern COMMAND *make_arith_command __P((WORD_LIST *));
-extern COMMAND *make_select_command __P((WORD_DESC *, WORD_LIST *, COMMAND *));
+extern COMMAND *make_select_command __P((WORD_DESC *, WORD_LIST *, COMMAND *, int));
#if defined (COND_COMMAND)
extern COND_COM *make_cond_node __P((int, WORD_DESC *, COND_COM *, COND_COM *));
diff --git a/mksyntax.c b/mksyntax.c
index 2aed86c3..d3660d33 100644
--- a/mksyntax.c
+++ b/mksyntax.c
@@ -2,7 +2,7 @@
* mksyntax.c - construct shell syntax table for fast char attribute lookup.
*/
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2002 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -78,6 +78,7 @@ char preamble[] = "\
\n";
char includes[] = "\
+#include \"config.h\"\n\
#include \"stdc.h\"\n\
#include \"syntax.h\"\n\n";
@@ -128,8 +129,13 @@ cdesc (i)
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;
case '\n': xbuf[1] = 'n'; break;
@@ -270,7 +276,8 @@ dump_lsyntax (fp)
{
int i;
- fprintf (fp, "const int sh_syntaxtab[%d] = {\n", SYNSIZE);
+ fprintf (fp, "int sh_syntabsiz = %d;\n", SYNSIZE);
+ fprintf (fp, "int sh_syntaxtab[%d] = {\n", SYNSIZE);
for (i = 0; i < SYNSIZE; i++)
{
diff --git a/nojobs.c b/nojobs.c
index 77632835..df543ac8 100644
--- a/nojobs.c
+++ b/nojobs.c
@@ -52,6 +52,8 @@
# endif /* HAVE_SYS_PTEM_H && TIOCGWINSZ && SIGWINCH */
#endif /* !STRUCT_WINSIZE_IN_SYS_IOCTL */
+#include "bashintl.h"
+
#include "shell.h"
#include "jobs.h"
@@ -63,9 +65,9 @@
# define killpg(pg, sig) kill(-(pg),(sig))
#endif /* USG || _POSIX_VERSION */
-#if !defined (HAVE_SIGINTERRUPT)
+#if !defined (HAVE_SIGINTERRUPT) && !defined (HAVE_POSIX_SIGNALS)
# define siginterrupt(sig, code)
-#endif /* !HAVE_SIGINTERRUPT */
+#endif /* !HAVE_SIGINTERRUPT && !HAVE_POSIX_SIGNALS */
#if defined (HAVE_WAITPID)
# define WAITPID(pid, statusp, options) waitpid (pid, statusp, options)
@@ -86,7 +88,7 @@ extern void rl_set_screen_size __P((int, int));
extern int interactive, interactive_shell, login_shell;
extern int subshell_environment;
-extern int last_command_exit_value;
+extern int last_command_exit_value, last_command_exit_signal;
extern int interrupt_immediately;
extern sh_builtin_func_t *this_shell_builtin;
#if defined (HAVE_POSIX_SIGNALS)
@@ -120,6 +122,7 @@ struct proc_status {
#define PROC_RUNNING 0x01
#define PROC_NOTIFIED 0x02
#define PROC_ASYNC 0x04
+#define PROC_SIGNALED 0x10
/* Return values from find_status_by_pid */
#define PROC_BAD -1
@@ -136,20 +139,28 @@ static int find_proc_slot __P((void));
static int find_index_by_pid __P((pid_t));
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));
static void get_new_window_size __P((int));
static sighandler sigwinch_sighandler __P((int));
static sighandler wait_sigint_handler __P((int));
+static char *j_strsignal __P((int));
#if defined (HAVE_WAITPID)
static void reap_zombie_children __P((void));
#endif
+#if !defined (HAVE_SIGINTERRUPT) && defined (HAVE_POSIX_SIGNALS)
+static int siginterrupt __P((int, int));
+#endif
+
static void restore_sigint_handler __P((void));
/* Allocate new, or grow existing PID_LIST. */
@@ -225,6 +236,35 @@ process_exit_status (status)
return (WEXITSTATUS (status));
}
+/* 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
set_pid_status (pid, status)
@@ -239,6 +279,8 @@ set_pid_status (pid, status)
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. */
if ((pid_list[slot].flags & PROC_ASYNC) == 0)
@@ -275,6 +317,20 @@ unset_pid_flags (pid, flags)
pid_list[slot].flags &= ~flags;
}
+/* 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)
pid_t pid;
@@ -444,15 +500,33 @@ initialize_job_signals ()
static void
reap_zombie_children ()
{
-#if defined (WNOHANG)
+# if defined (WNOHANG)
pid_t pid;
WAIT status;
while ((pid = waitpid (-1, (int *)&status, WNOHANG)) > 0)
set_pid_status (pid, status);
-#endif
+# endif /* WNOHANG */
}
-#endif /* WAITPID && 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.
COMMAND is just for remembering the name of the command; we don't do
@@ -565,18 +639,22 @@ wait_for_single_pid (pid)
{
pid_t got_pid;
WAIT status;
- int pstatus;
+ int pstatus, flags;
pstatus = find_status_by_pid (pid);
if (pstatus == PROC_BAD)
{
- internal_error ("wait: pid %ld is not a child of this shell", (long)pid);
+ internal_error (_("wait: pid %ld is not a child of this shell"), (long)pid);
return (127);
}
if (pstatus != PROC_STILL_ALIVE)
- return (pstatus);
+ {
+ if (pstatus > 128)
+ last_command_exit_signal = find_termsig_by_pid (pid);
+ return (pstatus);
+ }
siginterrupt (SIGINT, 1);
while ((got_pid = WAITPID (pid, &status, 0)) != pid)
@@ -688,6 +766,22 @@ wait_sigint_handler (sig)
SIGRETURN (0);
}
+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. */
int
@@ -704,7 +798,11 @@ wait_for (pid)
return (0);
if (pstatus != PROC_STILL_ALIVE)
- return (pstatus);
+ {
+ 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
a child to exit. The loop below does some of this, but not all. */
@@ -762,6 +860,7 @@ wait_for (pid)
/* Default return value. */
/* ``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)
if ((WIFSTOPPED (status) == 0) && WIFSIGNALED (status) &&
@@ -771,7 +870,7 @@ wait_for (pid)
(WTERMSIG (status) != SIGINT) && (WTERMSIG (status) != SIGPIPE))
#endif
{
- fprintf (stderr, "%s", strsignal (WTERMSIG (status)));
+ fprintf (stderr, "%s", j_strsignal (WTERMSIG (status)));
if (WIFCORED (status))
fprintf (stderr, " (core dumped)");
fprintf (stderr, "\n");
diff --git a/parse.y b/parse.y
index 0f6d930a..363430e5 100644
--- a/parse.y
+++ b/parse.y
@@ -1,6 +1,6 @@
/* Yacc grammar for bash. */
-/* Copyright (C) 1989-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1989-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -40,6 +40,8 @@
#include "memalloc.h"
+#include "bashintl.h"
+
#define NEED_STRFTIME_DECL /* used in externs.h */
#include "shell.h"
@@ -69,6 +71,8 @@
#if defined (ALIAS)
# include "alias.h"
+#else
+typedef void *alias_t;
#endif /* ALIAS */
#if defined (PROMPT_STRING_DECODE)
@@ -171,7 +175,7 @@ static char *parse_compound_assignment __P((int *));
#endif
#if defined (DPAREN_ARITHMETIC) || defined (ARITH_FOR_COMMAND)
static int parse_dparen __P((int));
-static int parse_arith_cmd __P((char **));
+static int parse_arith_cmd __P((char **, int));
#endif
#if defined (COND_COMMAND)
static void cond_error __P((void));
@@ -239,6 +243,11 @@ int expand_aliases = 0;
decode_prompt_string. */
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. */
static char *current_decoded_prompt;
@@ -270,6 +279,20 @@ static int function_bstart;
/* The line number in a script at which an arithmetic for command starts. */
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;
%}
@@ -315,6 +338,7 @@ static REDIRECTEE redir;
%type <word_list> word_list pattern
%type <pattern> pattern_list case_clause_sequence case_clause
%type <number> timespec
+%type <number> list_terminator
%start inputunit
@@ -601,65 +625,116 @@ shell_command: for_command
;
for_command: FOR WORD newline_list DO compound_list DONE
- { $$ = make_for_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $5); }
+ {
+ $$ = 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); }
+ {
+ $$ = 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); }
+ {
+ $$ = 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); }
+ {
+ $$ = 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); }
+ {
+ $$ = 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); }
+ {
+ $$ = 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); }
+ {
+ $$ = 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); }
+ {
+ $$ = 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); }
+ {
+ $$ = 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); }
+ {
+ $$ = 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); }
+ {
+ $$ = 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); }
+ {
+ $$ = 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);
+ $$ = 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);
+ $$ = 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);
+ $$ = 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);
+ $$ = 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);
+ $$ = 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);
+ $$ = 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); }
+ {
+ $$ = 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); }
+ {
+ $$ = 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); }
+ {
+ $$ = make_case_command ($2, $5, word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
;
function_def: WORD '(' ')' newline_list function_body
@@ -824,8 +899,11 @@ simple_list_terminator: '\n'
;
list_terminator:'\n'
+ { $$ = '\n'; }
| ';'
+ { $$ = ';'; }
| yacc_EOF
+ { $$ = yacc_EOF; }
;
newline_list:
@@ -901,6 +979,24 @@ pipeline_command: pipeline
$3->flags |= $2|CMD_INVERT_RETURN;
$$ = $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';
+ }
+
;
pipeline:
@@ -918,23 +1014,36 @@ timespec: TIME
%%
/* 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 */
+#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
amount to grow them by. */
#define TOKEN_DEFAULT_INITIAL_SIZE 496
#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;
@@ -948,13 +1057,6 @@ static int token_before_that;
/* The token read prior to token_before_that. */
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;
@@ -1399,10 +1501,6 @@ restore_token_state (ts)
#if defined (ALIAS) || defined (DPAREN_ARITHMETIC)
-#if !defined (ALIAS)
-typedef void *alias_t;
-#endif
-
#define END_OF_ALIAS 0
/*
@@ -1462,7 +1560,9 @@ push_string (s, expand, ap)
shell_input_line_size = strlen (s);
shell_input_line_index = 0;
shell_input_line_terminator = '\0';
- parser_state &= ~PST_ALEXPNEXT;
+#if 0
+ parser_state &= ~PST_ALEXPNEXT; /* XXX */
+#endif
set_line_mbstate ();
}
@@ -1523,6 +1623,14 @@ free_string_list ()
#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
is non-zero, we remove unquoted \<newline> pairs. This is used by
@@ -1536,9 +1644,9 @@ read_a_line (remove_quoted_newline)
int indx = 0, c, peekc, pass_next;
#if defined (READLINE)
- if (interactive && bash_input.type != st_string && no_line_editing)
+ if (no_line_editing && SHOULD_PROMPT ())
#else
- if (interactive && bash_input.type != st_string)
+ if (SHOULD_PROMPT ())
#endif
print_prompt ();
@@ -1587,7 +1695,10 @@ read_a_line (remove_quoted_newline)
{
peekc = yy_getc ();
if (peekc == '\n')
- continue; /* Make the unquoted \<newline> pair disappear. */
+ {
+ line_number++;
+ continue; /* Make the unquoted \<newline> pair disappear. */
+ }
else
{
yy_ungetc (peekc);
@@ -1616,7 +1727,8 @@ read_secondary_line (remove_quoted_newline)
int remove_quoted_newline;
{
prompt_string_pointer = &ps2_prompt;
- prompt_again ();
+ if (SHOULD_PROMPT())
+ prompt_again ();
return (read_a_line (remove_quoted_newline));
}
@@ -1778,20 +1890,27 @@ shell_getc (remove_quoted_newline)
i = 0;
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
of a trap, when the trap is called from flush_child. This call
had better not cause jobs to disappear from the job table in
that case, or we will have big trouble. */
- notify_and_cleanup ();
+ notify_and_cleanup ();
#else /* !JOB_CONTROL */
- cleanup_dead_jobs ();
+ cleanup_dead_jobs ();
#endif /* !JOB_CONTROL */
+ }
#if defined (READLINE)
- if (interactive && bash_input.type != st_string && no_line_editing)
+ if (no_line_editing && SHOULD_PROMPT())
#else
- if (interactive && bash_input.type != st_string)
+ if (SHOULD_PROMPT())
#endif
print_prompt ();
@@ -1911,7 +2030,8 @@ shell_getc (remove_quoted_newline)
{
shell_input_line_size = 0;
prompt_string_pointer = &current_prompt_string;
- prompt_again ();
+ if (SHOULD_PROMPT ())
+ prompt_again ();
goto restart_read;
}
@@ -1937,7 +2057,8 @@ shell_getc (remove_quoted_newline)
if MBTEST(uc == '\\' && remove_quoted_newline && shell_input_line[shell_input_line_index] == '\n')
{
- prompt_again ();
+ if (SHOULD_PROMPT ())
+ prompt_again ();
line_number++;
goto restart_read;
}
@@ -1950,19 +2071,10 @@ shell_getc (remove_quoted_newline)
to. */
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 = ' ';
- }
+ pop_string ();
+ uc = shell_input_line[shell_input_line_index];
+ if (uc)
+ shell_input_line_index++;
}
#endif /* ALIAS || DPAREN_ARITHMETIC */
@@ -2016,25 +2128,17 @@ void
execute_prompt_command (command)
char *command;
{
- sh_builtin_func_t *temp_last, *temp_this;
char *last_lastarg;
- int temp_exit_value, temp_eof_encountered;
+ sh_parser_state_t ps;
- temp_last = last_shell_builtin;
- temp_this = this_shell_builtin;
- temp_exit_value = last_command_exit_value;
- temp_eof_encountered = eof_encountered;
+ save_parser_state (&ps);
last_lastarg = get_string_value ("_");
if (last_lastarg)
last_lastarg = savestring (last_lastarg);
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;
-
+ restore_parser_state (&ps);
bind_variable ("_", last_lastarg);
FREE (last_lastarg);
@@ -2074,7 +2178,7 @@ yylex ()
/* 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)
+ if (token_to_read == 0 && SHOULD_PROMPT ())
prompt_again ();
}
@@ -2108,8 +2212,8 @@ static int open_brace_count;
(((token) == ASSIGNMENT_WORD) || \
((token) != SEMI_SEMI && reserved_word_acceptable(token)))
-#define assignment_acceptable(token) command_token_position(token) && \
- ((parser_state & PST_CASEPAT) == 0)
+#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
value if it is. */
@@ -2124,7 +2228,7 @@ static int open_brace_count;
{ \
if ((parser_state & PST_CASEPAT) && (word_token_alist[i].token != ESAC)) \
break; \
- if (word_token_alist[i].token == TIME) \
+ if (word_token_alist[i].token == TIME && time_command_acceptable () == 0) \
break; \
if (word_token_alist[i].token == ESAC) \
parser_state &= ~(PST_CASEPAT|PST_CASESTMT); \
@@ -2157,6 +2261,23 @@ static int open_brace_count;
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)
char *tokstr;
@@ -2173,7 +2294,12 @@ alias_expand_token (tokstr)
if (ap && (ap->flags & AL_BEINGEXPANDED))
return (NO_EXPANSION);
- expanded = ap ? savestring (ap->value) : (char *)NULL;
+ /* 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)
{
push_string (expanded, ap->flags & AL_EXPANDNEXT, ap);
@@ -2317,10 +2443,12 @@ special_case_tokens (tokstr)
return (TIMEOPT);
#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) /* [[ */
if ((parser_state & PST_CONDEXPR) && tokstr[0] == ']' && tokstr[1] == ']' && tokstr[2] == '\0')
@@ -2565,6 +2693,7 @@ read_token (command)
*/
#define P_FIRSTCLOSE 0x01
#define P_ALLOWESC 0x02
+#define P_DQUOTE 0x04
static char matched_pair_error;
static char *
@@ -2576,11 +2705,14 @@ parse_matched_pair (qc, open, close, lenp, flags)
int count, ch, was_dollar;
int pass_next_character, nestlen, ttranslen, start_lineno;
char *ret, *nestret, *ttrans;
- int retind, retsize;
+ 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;
@@ -2591,14 +2723,13 @@ parse_matched_pair (qc, open, close, lenp, flags)
if (ch == EOF)
{
free (ret);
- parser_error (start_lineno, "unexpected EOF while looking for matching `%c'", close);
+ parser_error (start_lineno, _("unexpected EOF while looking for matching `%c'"), close);
EOF_Reached = 1; /* XXX */
return (&matched_pair_error);
}
/* Possible reprompting. */
- if (ch == '\n' && interactive &&
- (bash_input.type == st_stdin || bash_input.type == st_stream))
+ if (ch == '\n' && SHOULD_PROMPT ())
prompt_again ();
if (pass_next_character) /* last char was backslash */
@@ -2654,16 +2785,16 @@ parse_matched_pair (qc, open, close, lenp, flags)
/* '', ``, or "" inside $(...) or other grouping construct. */
push_delimiter (dstack, ch);
if MBTEST(was_dollar && ch == '\'') /* $'...' inside group */
- nestret = parse_matched_pair (ch, ch, ch, &nestlen, P_ALLOWESC);
+ nestret = parse_matched_pair (ch, ch, ch, &nestlen, P_ALLOWESC|rflags);
else
- nestret = parse_matched_pair (ch, ch, ch, &nestlen, 0);
+ nestret = parse_matched_pair (ch, ch, ch, &nestlen, rflags);
pop_delimiter (dstack);
if (nestret == &matched_pair_error)
{
free (ret);
return &matched_pair_error;
}
- if MBTEST(was_dollar && ch == '\'')
+ if MBTEST(was_dollar && ch == '\'' && (extended_quote || (rflags & P_DQUOTE) == 0))
{
/* Translate $'...' here. */
ttrans = ansiexpand (nestret, 0, nestlen - 1, &ttranslen);
@@ -2673,7 +2804,7 @@ parse_matched_pair (qc, open, close, lenp, flags)
nestlen = strlen (nestret);
retind -= 2; /* back up before the $' */
}
- else if MBTEST(was_dollar && ch == '"')
+ else if MBTEST(was_dollar && ch == '"' && (extended_quote || (rflags & P_DQUOTE) == 0))
{
/* Locale expand $"..." here. */
ttrans = localeexpand (nestret, 0, nestlen - 1, start_lineno, &ttranslen);
@@ -2702,7 +2833,7 @@ parse_matched_pair (qc, open, close, lenp, flags)
/* XXX - sh and ksh93 don't do this - XXX */
else if MBTEST(open == '"' && ch == '`')
{
- nestret = parse_matched_pair (0, '`', '`', &nestlen, 0);
+ nestret = parse_matched_pair (0, '`', '`', &nestlen, rflags);
if (nestret == &matched_pair_error)
{
free (ret);
@@ -2722,11 +2853,11 @@ parse_matched_pair (qc, open, close, lenp, flags)
if (open == ch) /* undo previous increment */
count--;
if (ch == '(') /* ) */
- nestret = parse_matched_pair (0, '(', ')', &nestlen, 0);
+ nestret = parse_matched_pair (0, '(', ')', &nestlen, rflags);
else if (ch == '{') /* } */
- nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE);
+ nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|rflags);
else if (ch == '[') /* ] */
- nestret = parse_matched_pair (0, '[', ']', &nestlen, 0);
+ nestret = parse_matched_pair (0, '[', ']', &nestlen, rflags);
if (nestret == &matched_pair_error)
{
free (ret);
@@ -2766,19 +2897,12 @@ parse_dparen (c)
if (last_read_token == FOR)
{
arith_for_lineno = line_number;
- cmdtyp = parse_arith_cmd (&wval);
+ cmdtyp = parse_arith_cmd (&wval, 0);
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);
+ wd = make_word (wval);
yylval.word_list = make_word_list (wd, (WORD_LIST *)NULL);
free (wval);
- free (wv2);
return (ARITH_FOR_EXPRS);
}
else
@@ -2790,11 +2914,19 @@ parse_dparen (c)
if (reserved_word_acceptable (last_read_token))
{
sline = line_number;
- cmdtyp = parse_arith_cmd (&wval);
+#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 */
return (ARITH_CMD);
@@ -2820,8 +2952,9 @@ parse_dparen (c)
allocated buffer and make *ep point to that buffer. Return -1 on an
error, for example EOF. */
static int
-parse_arith_cmd (ep)
+parse_arith_cmd (ep, adddq)
char **ep;
+ int adddq;
{
int exp_lineno, rval, c;
char *ttok, *tokstr;
@@ -2840,20 +2973,28 @@ parse_arith_cmd (ep)
tokstr = (char *)xmalloc (ttoklen + 4);
- /* (( ... )) -> "..." */
- tokstr[0] = (rval == 1) ? '"' : '(';
- strncpy (tokstr + 1, ttok, ttoklen - 1); /* don't copy the final `)' */
- if (rval == 1)
+ /* 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
+ 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);
return rval;
@@ -2867,16 +3008,16 @@ cond_error ()
char *etext;
if (EOF_Reached && cond_token != COND_ERROR) /* [[ */
- parser_error (cond_lineno, "unexpected EOF while looking for `]]'");
+ 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);
+ 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");
+ parser_error (cond_lineno, _("syntax error in conditional expression"));
}
}
@@ -2919,7 +3060,7 @@ cond_skip_newlines ()
{
while ((cond_token = read_token (READ)) == '\n')
{
- if (interactive && (bash_input.type == st_stdin || bash_input.type == st_stream))
+ if (SHOULD_PROMPT ())
prompt_again ();
}
return (cond_token);
@@ -2954,11 +3095,11 @@ cond_term ()
dispose_cond_node (term); /* ( */
if (etext = error_token_from_token (cond_token))
{
- parser_error (lineno, "unexpected token `%s', expected `)'", etext);
+ parser_error (lineno, _("unexpected token `%s', expected `)'"), etext);
free (etext);
}
else
- parser_error (lineno, "expected `)'");
+ parser_error (lineno, _("expected `)'"));
COND_RETURN_ERROR ();
}
term = make_cond_node (COND_EXPR, (WORD_DESC *)NULL, term, (COND_COM *)NULL);
@@ -2986,11 +3127,11 @@ cond_term ()
dispose_word (op);
if (etext = error_token_from_token (tok))
{
- parser_error (line_number, "unexpected argument `%s' to conditional unary operator", etext);
+ 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");
+ parser_error (line_number, _("unexpected argument to conditional unary operator"));
COND_RETURN_ERROR ();
}
@@ -3005,6 +3146,10 @@ cond_term ()
tok = read_token (READ);
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); /* ( */
/* There should be a check before blindly accepting the `)' that we have
@@ -3023,11 +3168,11 @@ cond_term ()
{
if (etext = error_token_from_token (tok))
{
- parser_error (line_number, "unexpected token `%s', conditional binary operator expected", etext);
+ parser_error (line_number, _("unexpected token `%s', conditional binary operator expected"), etext);
free (etext);
}
else
- parser_error (line_number, "conditional binary operator expected");
+ parser_error (line_number, _("conditional binary operator expected"));
dispose_cond_node (tleft);
COND_RETURN_ERROR ();
}
@@ -3043,11 +3188,11 @@ cond_term ()
{
if (etext = error_token_from_token (tok))
{
- parser_error (line_number, "unexpected argument `%s' to conditional binary operator", etext);
+ 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");
+ parser_error (line_number, _("unexpected argument to conditional binary operator"));
dispose_cond_node (tleft);
dispose_word (op);
COND_RETURN_ERROR ();
@@ -3058,14 +3203,14 @@ cond_term ()
else
{
if (tok < 256)
- parser_error (line_number, "unexpected token `%c' in conditional command", tok);
+ 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);
+ 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);
+ parser_error (line_number, _("unexpected token %d in conditional command"), tok);
COND_RETURN_ERROR ();
}
return (term);
@@ -3096,7 +3241,7 @@ token_is_assignment (t, i)
c = t[i]; c1 = t[i+1];
t[i] = '='; t[i+1] = '\0';
- r = assignment (t);
+ r = assignment (t, (parser_state & PST_COMPASSIGN) != 0);
t[i] = c; t[i+1] = c1;
return r;
}
@@ -3420,8 +3565,7 @@ read_token_word (character)
TOKEN_DEFAULT_GROW_SIZE);
next_character:
- if (character == '\n' && interactive &&
- (bash_input.type == st_stdin || bash_input.type == st_stream))
+ if (character == '\n' && SHOULD_PROMPT ())
prompt_again ();
/* We want to remove quoted newlines (that is, a \<newline> pair)
@@ -3490,11 +3634,11 @@ got_token:
/* A word is an assignment if it appears at the beginning of a
simple command, or after another assignment word. This is
context-dependent, so it cannot be handled in the grammar. */
- if (assignment (token))
+ 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))
+ if (assignment_acceptable (last_read_token) || (parser_state & PST_COMPASSIGN) != 0)
the_word->flags |= W_NOSPLIT;
}
@@ -3503,10 +3647,19 @@ got_token:
result = ((the_word->flags & (W_ASSIGNMENT|W_NOSPLIT)) == (W_ASSIGNMENT|W_NOSPLIT))
? ASSIGNMENT_WORD : WORD;
- if (last_read_token == FUNCTION)
+ 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;
}
return (result);
@@ -3664,7 +3817,7 @@ prompt_again ()
{
char *temp_prompt;
- if (!interactive) /* XXX */
+ if (interactive == 0 || expanding_alias()) /* XXX */
return;
ps1_prompt = get_string_value ("PS1");
@@ -3857,7 +4010,11 @@ decode_prompt_string (string)
else if (c == 'A')
n = strftime (timebuf, sizeof (timebuf), "%H:%M", tm);
- timebuf[sizeof(timebuf) - 1] = '\0';
+ if (n == 0)
+ timebuf[0] = '\0';
+ else
+ timebuf[sizeof(timebuf) - 1] = '\0';
+
temp = savestring (timebuf);
goto add_string;
@@ -3882,7 +4039,11 @@ decode_prompt_string (string)
n = strftime (timebuf, sizeof (timebuf), timefmt, tm);
free (timefmt);
- timebuf[sizeof(timebuf) - 1] = '\0';
+ 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
second argument of Q_DOUBLE_QUOTES if we use this
@@ -3917,7 +4078,7 @@ decode_prompt_string (string)
case 'W':
{
/* Use the value of PWD because it is much more efficient. */
- char t_string[PATH_MAX];
+ char t_string[PATH_MAX], *t;
int tlen;
temp = get_string_value ("PWD");
@@ -3941,7 +4102,8 @@ decode_prompt_string (string)
#define ROOT_PATH(x) ((x)[0] == '/' && (x)[1] == 0)
#define DOUBLE_SLASH_ROOT(x) ((x)[0] == '/' && (x)[1] == '/' && (x)[2] == 0)
- if (c == 'W')
+ /* 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)
{
@@ -4020,6 +4182,11 @@ decode_prompt_string (string)
#if defined (READLINE)
case '[':
case ']':
+ if (no_line_editing)
+ {
+ string++;
+ break;
+ }
temp = (char *)xmalloc (3);
temp[0] = '\001';
temp[1] = (c == '[') ? RL_PROMPT_START_IGNORE : RL_PROMPT_END_IGNORE;
@@ -4239,7 +4406,7 @@ report_syntax_error (message)
parser's complaining about by looking at current_token. */
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);
+ parser_error (line_number, _("syntax error near unexpected token `%s'"), msg);
free (msg);
if (interactive == 0)
@@ -4257,7 +4424,7 @@ report_syntax_error (message)
msg = error_token_from_text ();
if (msg)
{
- parser_error (line_number, "syntax error near `%s'", msg);
+ parser_error (line_number, _("syntax error near `%s'"), msg);
free (msg);
}
@@ -4267,7 +4434,7 @@ report_syntax_error (message)
}
else
{
- msg = EOF_Reached ? "syntax error: unexpected end of file" : "syntax error";
+ 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
only for error reporting. Other mechanisms are used to
@@ -4329,7 +4496,7 @@ handle_eof_input_unit ()
{
if (eof_encountered < eof_encountered_limit)
{
- fprintf (stderr, "Use \"%s\" to leave the shell.\n",
+ fprintf (stderr, _("Use \"%s\" to leave the shell.\n"),
login_shell ? "logout" : "exit");
eof_encountered++;
/* Reset the parsing state. */
@@ -4366,8 +4533,9 @@ static WORD_LIST parse_string_error;
/* Take a string and run it through the shell parser, returning the
resultant word list. Used by compound array assignment. */
WORD_LIST *
-parse_string_to_word_list (s, whom)
+parse_string_to_word_list (s, flags, whom)
char *s;
+ int flags;
const char *whom;
{
WORD_LIST *wl;
@@ -4399,6 +4567,10 @@ parse_string_to_word_list (s, whom)
with_input_from_string (s, whom);
wl = (WORD_LIST *)NULL;
+
+ if (flags & 1)
+ parser_state |= PST_COMPASSIGN;
+
while ((tok = read_token (READ)) != yacc_EOF)
{
if (tok == '\n' && *bash_input.location.string == '\0')
@@ -4436,6 +4608,9 @@ parse_string_to_word_list (s, whom)
current_command_line_count = orig_line_count;
shell_input_line_terminator = orig_input_terminator;
+ if (flags & 1)
+ parser_state &= ~PST_COMPASSIGN;
+
if (wl == &parse_string_error)
{
last_command_exit_value = EXECUTION_FAILURE;
@@ -4466,15 +4641,21 @@ parse_compound_assignment (retlenp)
token_buffer_size = 0;
wl = (WORD_LIST *)NULL; /* ( */
+ parser_state |= PST_COMPASSIGN;
+
while ((tok = read_token (READ)) != ')')
{
if (tok == '\n') /* Allow newlines in compound assignments */
- continue;
+ {
+ 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 `)'");
+ parser_error (orig_line_number, _("unexpected EOF while looking for matching `)'"));
else
yyerror ((char *)NULL); /* does the right thing */
if (wl)
@@ -4489,6 +4670,8 @@ parse_compound_assignment (retlenp)
token = saved_token;
token_buffer_size = orig_token_size;
+ parser_state &= ~PST_COMPASSIGN;
+
if (wl == &parse_string_error)
{
last_command_exit_value = EXECUTION_FAILURE;
@@ -4516,6 +4699,105 @@ parse_compound_assignment (retlenp)
/************************************************
* *
+ * 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 *
* *
************************************************/
@@ -4524,7 +4806,7 @@ parse_compound_assignment (retlenp)
static void
set_line_mbstate ()
{
- int i, previ, len;
+ int i, previ, len, c;
mbstate_t mbs, prevs;
size_t mbclen;
@@ -4539,7 +4821,8 @@ set_line_mbstate ()
{
mbs = prevs;
- if (shell_input_line[i] == EOF)
+ c = shell_input_line[i];
+ if (c == EOF)
{
int j;
for (j = i; j < len; j++)
@@ -4563,7 +4846,11 @@ set_line_mbstate ()
}
else
{
- /* mbrlen doesn't return any other values */
+ /* 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;
}
shell_input_line_property[i] = mbclen;
diff --git a/parser-built b/parser-built
index 565b0399..35272273 100644
--- a/parser-built
+++ b/parser-built
@@ -1,7 +1,3 @@
-#ifndef BISON_Y_TAB_H
-# define BISON_Y_TAB_H
-
-#ifndef YYSTYPE
typedef union {
WORD_DESC *word; /* the word that we read. */
int number; /* the number that we read. */
@@ -10,51 +6,47 @@ typedef union {
REDIRECT *redirect;
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
+} 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;
-
-#endif /* not BISON_Y_TAB_H */
diff --git a/pathnames.h b/pathnames.h.in
index 27817afa..2ced60cd 100644
--- a/pathnames.h
+++ b/pathnames.h.in
@@ -27,4 +27,7 @@
/* 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 --git a/pcomplete.c b/pcomplete.c
index 18113512..7f5ac54c 100644
--- a/pcomplete.c
+++ b/pcomplete.c
@@ -1,7 +1,7 @@
/* pcomplete.c - functions to generate lists of matches for programmable
completion. */
-/* Copyright (C) 1999-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -40,6 +40,7 @@
#include <stdio.h>
#include "bashansi.h"
+#include "bashintl.h"
#include "shell.h"
#include "pcomplete.h"
@@ -371,6 +372,11 @@ init_itemlist_from_varlist (itp, svfunc)
register int i, n;
vlist = (*svfunc) ();
+ if (vlist == 0)
+ {
+ itp->slist = (STRINGLIST *)NULL;
+ return;
+ }
for (n = 0; vlist[n]; n++)
;
sl = strlist_create (n+1);
@@ -628,7 +634,8 @@ it_init_shopts (itp)
/* Generate a list of all matches for TEXT using the STRINGLIST in itp->slist
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. */
+ new one before trying the match. TEXT is dequoted before attempting a
+ match. */
static STRINGLIST *
gen_matches_from_itemlist (itp, text)
ITEMLIST *itp;
@@ -636,6 +643,7 @@ gen_matches_from_itemlist (itp, text)
{
STRINGLIST *ret, *sl;
int tlen, i, n;
+ char *ntxt;
if ((itp->flags & (LIST_DIRTY|LIST_DYNAMIC)) ||
(itp->flags & LIST_INITIALIZED) == 0)
@@ -649,13 +657,18 @@ gen_matches_from_itemlist (itp, text)
return ((STRINGLIST *)NULL);
ret = strlist_create (itp->slist->list_len+1);
sl = itp->slist;
- tlen = STRLEN (text);
+
+ ntxt = bash_dequote_text (text);
+ tlen = STRLEN (ntxt);
+
for (i = n = 0; i < sl->list_len; i++)
{
- if (tlen == 0 || STREQN (sl->list[i], text, tlen))
+ 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;
}
@@ -675,7 +688,15 @@ pcomp_filename_completion_function (text, state)
/* remove backslashes quoting special characters in filenames. */
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);
}
else
@@ -792,7 +813,8 @@ gen_wordlist_matches (cs, text)
{
WORD_LIST *l, *l2;
STRINGLIST *sl;
- int nw, tlen;
+ int nw, tlen, qc;
+ char *ntxt; /* dequoted TEXT to use in comparisons */
if (cs->words == 0 || cs->words[0] == '\0')
return ((STRINGLIST *)NULL);
@@ -810,15 +832,18 @@ gen_wordlist_matches (cs, text)
nw = list_length (l2);
sl = strlist_create (nw + 1);
- tlen = STRLEN (text);
+
+ ntxt = bash_dequote_text (text);
+ tlen = STRLEN (ntxt);
for (nw = 0, l = l2; l; l = l->next)
{
- if (tlen == 0 || STREQN (l->word->word, text, tlen))
+ 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;
}
@@ -968,7 +993,7 @@ gen_shell_function_matches (cs, text, line, ind, lwords, nw, cw)
f = find_function (funcname);
if (f == 0)
{
- internal_error ("completion: function `%s' not found", funcname);
+ internal_error (_("completion: function `%s' not found"), funcname);
rl_ding ();
rl_on_new_line ();
return ((STRINGLIST *)NULL);
@@ -1132,6 +1157,7 @@ gen_compspec_completions (cs, cmd, word, start, end)
char *line;
int llen, nw, cw;
WORD_LIST *lwords;
+ COMPSPEC *tcs;
#ifdef DEBUG
debug_printf ("gen_compspec_completions (%s, %s, %d, %d)", cmd, word, start, end);
@@ -1286,12 +1312,19 @@ gen_compspec_completions (cs, cmd, word, start, end)
names. */
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);
+ 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);
}
return (ret);
@@ -1326,6 +1359,8 @@ programmable_completions (cmd, word, start, end, foundp)
return ((char **)NULL);
}
+ 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. */
if (foundp)
@@ -1333,6 +1368,8 @@ programmable_completions (cmd, word, start, end, foundp)
ret = gen_compspec_completions (cs, cmd, word, start, end);
+ compspec_dispose (cs);
+
if (ret)
{
rmatches = ret->list;
diff --git a/pcomplete.h b/pcomplete.h
index 9353fe1e..0b05ef81 100644
--- a/pcomplete.h
+++ b/pcomplete.h
@@ -71,6 +71,8 @@ typedef struct compspec {
#define COPT_FILENAMES (1<<2)
#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
completions. */
diff --git a/pcomplib.c b/pcomplib.c
index aa08fa5d..8db32959 100644
--- a/pcomplib.c
+++ b/pcomplib.c
@@ -32,6 +32,8 @@
# include <unistd.h>
#endif
+#include "bashintl.h"
+
#include "shell.h"
#include "pcomplete.h"
@@ -174,18 +176,19 @@ progcomp_insert (cmd, cs)
register BUCKET_CONTENTS *item;
if (cs == NULL)
- programming_error ("progcomp_insert: %s: NULL COMPSPEC", cmd);
+ 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)
free_progcomp (item->data);
else
item->key = savestring (cmd);
item->data = cs;
- cs->refcount++;
+
return 1;
}
diff --git a/po/LINGUAS b/po/LINGUAS
new file mode 100644
index 00000000..3595cc0f
--- /dev/null
+++ b/po/LINGUAS
@@ -0,0 +1,2 @@
+# Set of available languages.
+en@quot en@boldquot
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
new file mode 100644
index 00000000..c28f1ce4
--- /dev/null
+++ b/po/Makefile.in.in
@@ -0,0 +1,357 @@
+# Makefile for PO directory in any package using GNU gettext.
+# Copyright (C) 1995-1997, 2000-2003 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+#
+# 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 --git a/po/Makevars b/po/Makevars
new file mode 100644
index 00000000..84b2d956
--- /dev/null
+++ b/po/Makevars
@@ -0,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 --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 00000000..a59a0965
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,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 --git a/po/Rules-builtins b/po/Rules-builtins
new file mode 100644
index 00000000..57df81c9
--- /dev/null
+++ b/po/Rules-builtins
@@ -0,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 --git a/po/Rules-quot b/po/Rules-quot
new file mode 100644
index 00000000..5f46d237
--- /dev/null
+++ b/po/Rules-quot
@@ -0,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 --git a/po/bash.pot b/po/bash.pot
new file mode 100644
index 00000000..3340d22c
--- /dev/null
+++ b/po/bash.pot
@@ -0,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 <EMAIL@ADDRESS>, 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 <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 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 "<no current directory>"
+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 <signal.h>"
+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 --git a/po/boldquot.sed b/po/boldquot.sed
new file mode 100644
index 00000000..4b937aa5
--- /dev/null
+++ b/po/boldquot.sed
@@ -0,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 --git a/po/builtins.pot b/po/builtins.pot
new file mode 100644
index 00000000..e30179c3
--- /dev/null
+++ b/po/builtins.pot
@@ -0,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 <signal.h>"
+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 --git a/po/en@boldquot.gmo b/po/en@boldquot.gmo
new file mode 100644
index 00000000..6a9c77ba
--- /dev/null
+++ b/po/en@boldquot.gmo
Binary files differ
diff --git a/po/en@boldquot.header b/po/en@boldquot.header
new file mode 100644
index 00000000..fedb6a06
--- /dev/null
+++ b/po/en@boldquot.header
@@ -0,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 --git a/po/en@boldquot.po b/po/en@boldquot.po
new file mode 100644
index 00000000..652c51b0
--- /dev/null
+++ b/po/en@boldquot.po
@@ -0,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 "<no current directory>"
+msgstr "<no current directory>"
+
+#: 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 <signal.h>"
+msgstr ""
+"each signal number. Each SIGNAL_SPEC is either a signal name in <signal.h>"
+
+#: 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 --git a/po/en@quot.gmo b/po/en@quot.gmo
new file mode 100644
index 00000000..62cf0807
--- /dev/null
+++ b/po/en@quot.gmo
Binary files differ
diff --git a/po/en@quot.header b/po/en@quot.header
new file mode 100644
index 00000000..a9647fc3
--- /dev/null
+++ b/po/en@quot.header
@@ -0,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 --git a/po/en@quot.po b/po/en@quot.po
new file mode 100644
index 00000000..a560bf6c
--- /dev/null
+++ b/po/en@quot.po
@@ -0,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 "<no current directory>"
+msgstr "<no current directory>"
+
+#: 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 <signal.h>"
+msgstr ""
+"each signal number. Each SIGNAL_SPEC is either a signal name in <signal.h>"
+
+#: 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 --git a/po/insert-header.sin b/po/insert-header.sin
new file mode 100644
index 00000000..b26de01f
--- /dev/null
+++ b/po/insert-header.sin
@@ -0,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 --git a/po/quot.sed b/po/quot.sed
new file mode 100644
index 00000000..0122c463
--- /dev/null
+++ b/po/quot.sed
@@ -0,0 +1,6 @@
+s/"\([^"]*\)"/“\1â€/g
+s/`\([^`']*\)'/‘\1’/g
+s/ '\([^`']*\)' / ‘\1’ /g
+s/ '\([^`']*\)'$/ ‘\1’/g
+s/^'\([^`']*\)' /‘\1’ /g
+s/“â€/""/g
diff --git a/po/remove-potcdate.sin b/po/remove-potcdate.sin
new file mode 100644
index 00000000..2436c49e
--- /dev/null
+++ b/po/remove-potcdate.sin
@@ -0,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 --git a/print_cmd.c b/print_cmd.c
index 9429472e..c8c77577 100644
--- a/print_cmd.c
+++ b/print_cmd.c
@@ -1,5 +1,6 @@
/* print_command -- A way to make readable commands from a command tree. */
-/* Copyright (C) 1989 Free Software Foundation, Inc.
+
+/* Copyright (C) 1989-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -35,6 +36,7 @@ Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#endif
#include "bashansi.h"
+#include "bashintl.h"
#include "shell.h"
#include "flags.h"
@@ -87,12 +89,8 @@ static void print_while_command __P((WHILE_COM *));
static void print_until_command __P((WHILE_COM *));
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 *));
@@ -197,7 +195,7 @@ make_command_string_internal (command)
#if defined (DPAREN_ARITHMETIC)
case cm_arith:
- print_arith_command (command->value.Arith);
+ print_arith_command (command->value.Arith->exp);
break;
#endif
@@ -260,7 +258,7 @@ make_command_string_internal (command)
break;
default:
- cprintf ("print_command: bad connector `%d'",
+ cprintf (_("print_command: bad connector `%d'"),
command->value.Connection->connector);
break;
}
@@ -335,6 +333,9 @@ indirection_level_string ()
ps4 = decode_prompt_string (ps4);
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;
@@ -346,15 +347,49 @@ indirection_level_string ()
return (indirection_string);
}
+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)
+xtrace_print_word_list (list, xtflags)
WORD_LIST *list;
+ int xtflags;
{
WORD_LIST *w;
char *t, *x;
- fprintf (stderr, "%s", indirection_level_string ());
+ if (xtflags)
+ fprintf (stderr, "%s", indirection_level_string ());
+
for (w = list; w; w = w->next)
{
t = w->word->word;
@@ -386,12 +421,29 @@ command_print_word_list (list, separator)
_print_word_list (list, separator, cprintf);
}
-static void
-print_for_command (for_command)
+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");
indentation += indentation_amount;
@@ -406,13 +458,13 @@ static void
print_arith_for_command (arith_for_command)
ARITH_FOR_COM *arith_for_command;
{
- cprintf ("for (( ");
+ cprintf ("for ((");
command_print_word_list (arith_for_command->init, " ");
cprintf (" ; ");
command_print_word_list (arith_for_command->test, " ");
cprintf (" ; ");
command_print_word_list (arith_for_command->step, " ");
- cprintf (" ))");
+ cprintf ("))");
newline ("do\n");
indentation += indentation_amount;
make_command_string_internal (arith_for_command->action);
@@ -423,12 +475,29 @@ print_arith_for_command (arith_for_command)
#endif /* ARITH_FOR_COMMAND */
#if defined (SELECT_COMMAND)
-static void
-print_select_command (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");
indentation += indentation_amount;
@@ -476,11 +545,27 @@ print_group_command (group_command)
group_command_nesting--;
}
+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;
{
- cprintf ("case %s in ", case_command->word->word);
+ print_case_command_head (case_command);
+
if (case_command->clauses)
print_case_clauses (case_command->clauses);
newline ("esac");
@@ -562,13 +647,13 @@ print_if_command (if_command)
}
#if defined (DPAREN_ARITHMETIC)
-static void
-print_arith_command (arith_command)
- ARITH_COM *arith_command;
+void
+print_arith_command (arith_cmd_list)
+ WORD_LIST *arith_cmd_list;
{
- cprintf ("(( ");
- command_print_word_list (arith_command->exp, " ");
- cprintf (" ))");
+ cprintf ("((");
+ command_print_word_list (arith_cmd_list, " ");
+ cprintf ("))");
}
#endif
@@ -618,7 +703,7 @@ print_cond_node (cond)
}
}
-static void
+void
print_cond_command (cond)
COND_COM *cond;
{
@@ -722,6 +807,13 @@ print_redirection_list (redirects)
else
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);
@@ -1116,7 +1208,7 @@ cprintf (control, va_alist)
break;
default:
- programming_error ("cprintf: bad `%%' argument (%c)", c);
+ programming_error (_("cprintf: `%c': invalid format character"), c);
/*NOTREACHED*/
}
}
diff --git a/redir.c b/redir.c
index e4200110..228d67eb 100644
--- a/redir.c
+++ b/redir.c
@@ -25,7 +25,7 @@
#include <stdio.h>
#include "bashtypes.h"
-#ifndef _MINIX
+#if !defined (_MINIX) && defined (HAVE_SYS_FILE_H)
# include <sys/file.h>
#endif
#include "filecntl.h"
@@ -42,6 +42,7 @@ extern int errno;
#endif
#include "bashansi.h"
+#include "bashintl.h"
#include "memalloc.h"
#include "shell.h"
@@ -53,6 +54,8 @@ extern int errno;
# include "input.h"
#endif
+int expanding_redir;
+
extern int posixly_correct;
extern REDIRECT *redirection_undo_list;
extern REDIRECT *exec_redirection_undo_list;
@@ -63,7 +66,7 @@ static void add_exec_redirect __P((REDIRECT *));
static int add_undo_redirect __P((int));
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 do_redirection_internal __P((REDIRECT *, int));
static int write_here_document __P((int, WORD_DESC *));
static int write_here_string __P((int, WORD_DESC *));
@@ -93,7 +96,7 @@ redirection_error (temp, error)
if (temp->redirector < 0)
/* This can happen when read_token_word encounters overflow, like in
exec 4294967297>x */
- filename = "file descriptor out of range";
+ filename = _("file descriptor out of range");
#ifdef EBADF
else if (temp->redirector >= 0 && errno == EBADF)
{
@@ -135,21 +138,21 @@ redirection_error (temp, error)
switch (error)
{
case AMBIGUOUS_REDIRECT:
- internal_error ("%s: ambiguous redirect", filename);
+ internal_error (_("%s: ambiguous redirect"), filename);
break;
case NOCLOBBER_REDIRECT:
- internal_error ("%s: cannot overwrite existing file", filename);
+ internal_error (_("%s: cannot overwrite existing file"), filename);
break;
#if defined (RESTRICTED_SHELL)
case RESTRICTED_REDIRECT:
- internal_error ("%s: restricted: cannot redirect output", filename);
+ 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));
+ internal_error (_("cannot create temp file for here document: %s"), strerror (heredoc_errno));
break;
default:
@@ -160,21 +163,21 @@ redirection_error (temp, error)
FREE (allocname);
}
-/* 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. */
+/* 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, for_real, internal, set_clexec)
+do_redirections (list, flags)
REDIRECT *list;
- int for_real, internal, set_clexec;
+ int flags;
{
int error;
REDIRECT *temp;
- if (internal)
+ if (flags & RX_UNDOABLE)
{
if (redirection_undo_list)
{
@@ -187,7 +190,7 @@ do_redirections (list, for_real, internal, set_clexec)
for (temp = list; temp; temp = temp->next)
{
- error = do_redirection_internal (temp, for_real, internal, set_clexec);
+ error = do_redirection_internal (temp, flags);
if (error)
{
redirection_error (temp, error);
@@ -238,7 +241,9 @@ redirection_expand (word)
w->flags |= W_NOSPLIT;
tlist1 = make_word_list (w, (WORD_LIST *)NULL);
+ expanding_redir = 1;
tlist2 = expand_words_no_vars (tlist1);
+ expanding_redir = 0;
dispose_words (tlist1);
if (!tlist2 || tlist2->next)
@@ -263,7 +268,7 @@ write_here_string (fd, redirectee)
int herelen, n, e;
herestr = expand_string_to_string (redirectee->word, 0);
- herelen = strlen (herestr);
+ herelen = STRLEN (herestr);
n = write (fd, herestr, herelen);
if (n == herelen)
@@ -272,7 +277,7 @@ write_here_string (fd, redirectee)
herelen = 1;
}
e = errno;
- free (herestr);
+ FREE (herestr);
if (n != herelen)
{
if (e == 0)
@@ -501,7 +506,7 @@ redir_special_open (spec, filename, flags, mode, ri)
#if defined (HAVE_NETWORK)
fd = netopen (filename);
#else
- internal_warning ("/dev/(tcp|udp)/host/port not supported without networking");
+ internal_warning (_("/dev/(tcp|udp)/host/port not supported without networking"));
fd = open (filename, flags, mode);
#endif
break;
@@ -600,14 +605,15 @@ redir_open (filename, flags, mode, ri)
/* 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. */
+ 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, for_real, remembering, set_clexec)
+do_redirection_internal (redirect, flags)
REDIRECT *redirect;
- int for_real, remembering, set_clexec;
+ int flags;
{
WORD_DESC *redirectee;
int redir_fd, fd, redirector, r, oflags;
@@ -739,9 +745,9 @@ do_redirection_internal (redirect, for_real, remembering, set_clexec)
if (fd < 0)
return (errno);
- if (for_real)
+ if (flags & RX_ACTIVE)
{
- if (remembering)
+ if (flags & RX_UNDOABLE)
{
/* Only setup to undo it if the thing to undo is active. */
if ((fd != redirector) && (fcntl (redirector, F_GETFD, 0) != -1))
@@ -775,7 +781,7 @@ do_redirection_internal (redirect, for_real, remembering, set_clexec)
* both sh and ksh leave the file descriptors open across execs.
* The Posix standard mentions only the exec builtin.
*/
- if (set_clexec && (redirector > 2))
+ if ((flags & RX_CLEXEC) && (redirector > 2))
SET_CLOSE_ON_EXEC (redirector);
}
@@ -793,9 +799,9 @@ do_redirection_internal (redirect, for_real, remembering, set_clexec)
redirection here. */
if (ri == r_err_and_out)
{
- if (for_real)
+ if (flags & RX_ACTIVE)
{
- if (remembering)
+ if (flags & RX_UNDOABLE)
add_undo_redirect (2);
if (dup2 (1, 2) < 0)
return (errno);
@@ -818,9 +824,9 @@ do_redirection_internal (redirect, for_real, remembering, set_clexec)
return (HEREDOC_REDIRECT);
}
- if (for_real)
+ if (flags & RX_ACTIVE)
{
- if (remembering)
+ if (flags & RX_UNDOABLE)
{
/* Only setup to undo it if the thing to undo is active. */
if ((fd != redirector) && (fcntl (redirector, F_GETFD, 0) != -1))
@@ -843,7 +849,7 @@ do_redirection_internal (redirect, for_real, remembering, set_clexec)
duplicate_buffered_stream (fd, redirector);
#endif
- if (set_clexec && (redirector > 2))
+ if ((flags & RX_CLEXEC) && (redirector > 2))
SET_CLOSE_ON_EXEC (redirector);
}
@@ -860,9 +866,9 @@ do_redirection_internal (redirect, for_real, remembering, set_clexec)
case r_duplicating_output:
case r_move_input:
case r_move_output:
- if (for_real && (redir_fd != redirector))
+ if ((flags & RX_ACTIVE) && (redir_fd != redirector))
{
- if (remembering)
+ if (flags & RX_UNDOABLE)
{
/* Only setup to undo it if the thing to undo is active. */
if (fcntl (redirector, F_GETFD, 0) != -1)
@@ -890,7 +896,7 @@ do_redirection_internal (redirect, for_real, remembering, set_clexec)
unless closed by something like `exec 2<&-'. */
/* if ((already_set || set_unconditionally) && (ok_to_set))
set_it () */
- if (((fcntl (redir_fd, F_GETFD, 0) == 1) || set_clexec) &&
+ if (((fcntl (redir_fd, F_GETFD, 0) == 1) || (flags & RX_CLEXEC)) &&
(redirector > 2))
SET_CLOSE_ON_EXEC (redirector);
@@ -901,9 +907,9 @@ do_redirection_internal (redirect, for_real, remembering, set_clexec)
break;
case r_close_this:
- if (for_real)
+ if (flags & RX_ACTIVE)
{
- if (remembering && (fcntl (redirector, F_GETFD, 0) != -1))
+ if ((flags & RX_UNDOABLE) && (fcntl (redirector, F_GETFD, 0) != -1))
add_undo_redirect (redirector);
#if defined (BUFFERED_INPUT)
@@ -940,7 +946,7 @@ add_undo_redirect (fd)
if (new_fd < 0)
{
- sys_error ("redirection error: cannot duplicate fd");
+ sys_error (_("redirection error: cannot duplicate fd"));
return (-1);
}
diff --git a/redir.h b/redir.h
index 7b13a4a9..acb91e7c 100644
--- a/redir.h
+++ b/redir.h
@@ -23,8 +23,13 @@
#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, int, int));
+extern int do_redirections __P((REDIRECT *, int));
extern char *redirection_expand __P((WORD_DESC *));
extern int stdin_redirects __P((REDIRECT *));
diff --git a/shell.c b/shell.c
index a4298e7c..2e17baac 100644
--- a/shell.c
+++ b/shell.c
@@ -1,6 +1,6 @@
/* shell.c -- GNU's idea of the POSIX shell specification. */
-/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -27,7 +27,7 @@
#include "config.h"
#include "bashtypes.h"
-#ifndef _MINIX
+#if !defined (_MINIX) && defined (HAVE_SYS_FILE_H)
# include <sys/file.h>
#endif
#include "posixstat.h"
@@ -43,6 +43,8 @@
# include <unistd.h>
#endif
+#include "bashintl.h"
+
#define NEED_SH_SETLINEBUF_DECL /* used in externs.h */
#include "shell.h"
@@ -192,11 +194,13 @@ static int do_version; /* Display interesting version info. */
static int make_login_shell; /* Make this shell be a `-bash' shell. */
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. */
int dump_translatable_strings; /* Dump strings in $"...", don't execute. */
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. */
#define Int 1
@@ -208,6 +212,9 @@ struct {
char **char_value;
} 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 },
{ "help", Int, &want_initial_help, (char **)0x0 },
@@ -217,6 +224,7 @@ struct {
{ "noprofile", Int, &no_profile, (char **)0x0 },
{ "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)
{ "restricted", Int, &restricted, (char **)0x0 },
@@ -245,10 +253,12 @@ int default_buffered_input = -1;
int read_from_stdin; /* -s flag supplied */
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 char *local_pending_command;
static FILE *default_input;
@@ -259,6 +269,8 @@ static int parse_long_options __P((char **, int, int));
static int parse_shell_options __P((char **, int, int));
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));
@@ -287,11 +299,11 @@ _cygwin32_check_tmp ()
struct stat sb;
if (stat ("/tmp", &sb) < 0)
- internal_warning ("could not find /tmp, please create!");
+ 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");
+ internal_warning (_("/tmp must be a valid directory name"));
}
}
#endif /* __CYGWIN__ */
@@ -374,7 +386,7 @@ main (argc, argv, env)
/* Initialize `local' variables for all `invocations' of main (). */
arg_index = 1;
- local_pending_command = (char *)NULL;
+ command_execution_string = (char *)NULL;
want_pending_command = locally_skip_execution = read_from_stdin = 0;
default_input = stdin;
#if defined (BUFFERED_INPUT)
@@ -447,11 +459,11 @@ main (argc, argv, env)
following args are $0...$n respectively. */
if (want_pending_command)
{
- local_pending_command = argv[arg_index];
- if (local_pending_command == 0)
+ command_execution_string = argv[arg_index];
+ if (command_execution_string == 0)
{
- report_error ("-c: option requires an argument");
- exit (EX_USAGE);
+ report_error (_("%s: option requires an argument"), "-c");
+ exit (EX_BADUSAGE);
}
arg_index++;
}
@@ -465,16 +477,16 @@ main (argc, argv, env)
no -c command
no arguments remaining or the -s flag given
standard input is a terminal
- standard output is a terminal
+ standard error 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 ... */
+ (!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 (stdout)))) /* output is a terminal. */
+ isatty (fileno (stderr)))) /* error output is a terminal. */
init_interactive ();
else
init_noninteractive ();
@@ -515,14 +527,18 @@ main (argc, argv, env)
if (interactive_shell)
{
- char *term;
+ char *term, *emacs;
- term = getenv ("TERM");
+ term = get_string_value ("TERM");
no_line_editing |= term && (STREQ (term, "emacs"));
- term = getenv ("EMACS");
- running_under_emacs = term ? ((strmatch ("*term*", term, 0) == 0) ? 2 : 1)
+ emacs = get_string_value ("EMACS");
+ running_under_emacs = emacs ? ((strmatch ("*term*", emacs, 0) == 0) ? 2 : 1)
: 0;
- no_line_editing |= term && term[0] == 't' && term[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
}
top_level_arg_index = arg_index;
@@ -534,7 +550,7 @@ main (argc, argv, env)
code = setjmp (top_level);
if (code)
{
- if (code == EXITPROG)
+ if (code == EXITPROG || code == ERREXIT)
exit_shell (last_command_exit_value);
else
{
@@ -614,16 +630,20 @@ main (argc, argv, env)
exit_shell (last_command_exit_value);
}
- if (local_pending_command)
+ 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 (local_pending_command);
+ run_one_command (command_execution_string);
exit_shell (last_command_exit_value);
#else /* ONESHOT */
- with_input_from_string (local_pending_command, "-c");
+ with_input_from_string (command_execution_string, "-c");
goto read_and_execute;
#endif /* !ONESHOT */
}
@@ -648,6 +668,10 @@ main (argc, argv, env)
/* 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)
{
@@ -710,8 +734,8 @@ parse_long_options (argv, arg_start, arg_end)
*long_args[i].int_value = 1;
else if (argv[++arg_index] == 0)
{
- report_error ("%s: option requires an argument", long_args[i].name);
- exit (EX_USAGE);
+ report_error (_("%s: option requires an argument"), long_args[i].name);
+ exit (EX_BADUSAGE);
}
else
*long_args[i].char_value = argv[arg_index];
@@ -723,9 +747,9 @@ parse_long_options (argv, arg_start, arg_end)
{
if (longarg)
{
- report_error ("%s: invalid option", argv[arg_index]);
+ report_error (_("%s: invalid option"), argv[arg_index]);
show_shell_usage (stderr, 0);
- exit (EX_USAGE);
+ exit (EX_BADUSAGE);
}
break; /* No such argument. Maybe flag arg. */
}
@@ -786,7 +810,7 @@ parse_shell_options (argv, arg_start, arg_end)
break;
}
if (set_minus_o_option (on_or_off, o_option) != EXECUTION_SUCCESS)
- exit (EX_USAGE);
+ exit (EX_BADUSAGE);
next_arg++;
break;
@@ -812,9 +836,9 @@ parse_shell_options (argv, arg_start, arg_end)
default:
if (change_flag (arg_character, on_or_off) == FLAG_ERROR)
{
- report_error ("%c%c: invalid option", on_or_off, arg_character);
+ report_error (_("%c%c: invalid option"), on_or_off, arg_character);
show_shell_usage (stderr, 0);
- exit (EX_USAGE);
+ exit (EX_BADUSAGE);
}
}
}
@@ -929,7 +953,7 @@ run_startup_files ()
/* 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)
+ act_like_sh == 0 && command_execution_string)
{
#ifdef SSH_SOURCE_BASHRC
run_by_ssh = (find_variable ("SSH_CLIENT") != (SHELL_VAR *)0) ||
@@ -1082,6 +1106,8 @@ maybe_make_restricted (name)
char *temp;
temp = base_pathname (name);
+ if (*temp == '-')
+ temp++;
if (restricted || (STREQ (temp, RESTRICTED_SHELL_NAME)))
{
set_var_read_only ("PATH");
@@ -1133,7 +1159,7 @@ run_wordexp (words)
char *words;
{
int code, nw, nb;
- WORD_LIST *wl, *result;
+ WORD_LIST *wl, *tl, *result;
code = setjmp (top_level);
@@ -1144,6 +1170,7 @@ run_wordexp (words)
/* Some kind of throw to top_level has occured. */
case FORCE_EOF:
return last_command_exit_value = 127;
+ case ERREXIT:
case EXITPROG:
return last_command_exit_value;
case DISCARD:
@@ -1167,6 +1194,9 @@ run_wordexp (words)
if (global_command->type != cm_simple)
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;
}
else
@@ -1217,6 +1247,7 @@ run_one_command (command)
/* Some kind of throw to top_level has occured. */
case FORCE_EOF:
return last_command_exit_value = 127;
+ case ERREXIT:
case EXITPROG:
return last_command_exit_value;
case DISCARD:
@@ -1250,9 +1281,13 @@ bind_args (argv, arg_start, arg_end, start_index)
FREE (dollar_vars[0]);
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);
+ {
+ remember_args (args, 1);
+ push_args (args); /* BASH_ARGV and BASH_ARGC */
+ }
dispose_words (args);
}
@@ -1264,6 +1299,23 @@ void
unbind_args ()
{
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
}
static int
@@ -1271,13 +1323,15 @@ open_shell_script (script_name)
char *script_name;
{
int fd, e, fd_is_tty;
- char *filename, *path_filename;
+ 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
- free (dollar_vars[0]);
- dollar_vars[0] = savestring (script_name);
filename = savestring (script_name);
fd = open (filename, O_RDONLY);
@@ -1304,6 +1358,24 @@ open_shell_script (script_name)
exit ((e == ENOENT) ? EX_NOTFOUND : EX_NOINPUT);
}
+ 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);
#else
@@ -1321,7 +1393,7 @@ open_shell_script (script_name)
{
e = errno;
if ((fstat (fd, &sb) == 0) && S_ISDIR (sb.st_mode))
- internal_error ("%s: is a directory", filename);
+ internal_error (_("%s: is a directory"), filename);
else
{
errno = e;
@@ -1516,7 +1588,8 @@ get_current_user_info ()
}
else
{
- current_user.user_name = savestring ("I have no name!");
+ 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 ("/");
}
@@ -1650,14 +1723,14 @@ show_shell_usage (fp, extra)
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",
+ 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);
+ 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);
+ 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++)
if (STREQ (shell_builtins[i].name, "set"))
@@ -1672,15 +1745,15 @@ show_shell_usage (fp, extra)
t = xstrchr (s, ']');
if (t)
*t = '\0';
- fprintf (fp, "\t-%s or -o option\n", s);
+ fprintf (fp, _("\t-%s or -o option\n"), s);
free (set_opts);
}
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");
+ 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"));
}
}
@@ -1706,7 +1779,7 @@ run_shopt_alist ()
for (i = 0; i < shopt_ind; i++)
if (shopt_setopt (shopt_alist[i].word, (shopt_alist[i].token == '-')) != EXECUTION_SUCCESS)
- exit (EX_USAGE);
+ exit (EX_BADUSAGE);
free (shopt_alist);
shopt_alist = 0;
shopt_ind = shopt_len = 0;
diff --git a/shell.h b/shell.h
index 0cc3a927..ec086885 100644
--- a/shell.h
+++ b/shell.h
@@ -1,6 +1,6 @@
/* shell.h -- The data structures used by the shell */
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2002 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -40,7 +40,6 @@
#include "sig.h"
#include "pathnames.h"
#include "externs.h"
-#include "version.h"
extern int EOF_Reached;
@@ -71,20 +70,22 @@ extern int EOF_Reached;
#define EX_EXPFAIL 261 /* word expansion failed */
/* Flag values that control parameter pattern substitution. */
-#define MATCH_ANY 0x0
-#define MATCH_BEG 0x1
-#define MATCH_END 0x2
+#define MATCH_ANY 0x000
+#define MATCH_BEG 0x001
+#define MATCH_END 0x002
-#define MATCH_TYPEMASK 0x3
+#define MATCH_TYPEMASK 0x003
-#define MATCH_GLOBREP 0x10
-#define MATCH_QUOTED 0x20
+#define MATCH_GLOBREP 0x010
+#define MATCH_QUOTED 0x020
+#define MATCH_STARSUB 0x040
/* Some needed external declarations. */
extern char **shell_environment;
extern WORD_LIST *rest_of_args;
/* Generalized global variables. */
+extern int debugging_mode;
extern int executing, login_shell;
extern int interactive, interactive_shell;
extern int startup_state;
@@ -119,3 +120,44 @@ extern struct user_info current_user;
#else
# 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 --git a/sig.c b/sig.c
index 21a57ae1..0771f14b 100644
--- a/sig.c
+++ b/sig.c
@@ -32,6 +32,8 @@
#include <stdio.h>
#include <signal.h>
+#include "bashintl.h"
+
#include "shell.h"
#if defined (JOB_CONTROL)
#include "jobs.h"
@@ -51,6 +53,7 @@
#endif
extern int last_command_exit_value;
+extern int last_command_exit_signal;
extern int return_catch_flag;
extern int loop_level, continuing, breaking;
extern int parse_and_execute_level, shell_initialized;
@@ -343,6 +346,8 @@ throw_to_top_level ()
if (interrupt_state)
return;
+ last_command_exit_signal = (last_command_exit_value > 128) ?
+ (last_command_exit_value - 128) : 0;
last_command_exit_value |= 128;
/* Run any traps set on SIGINT. */
@@ -477,7 +482,7 @@ sigprocmask (operation, newset, oldset)
break;
default:
- internal_error ("Bad code in sig.c: sigprocmask");
+ internal_error (_("sigprocmask: %d: invalid operation"), operation);
}
if (oldset)
diff --git a/subst.c b/subst.c
index 9ebc465a..fcc024bf 100644
--- a/subst.c
+++ b/subst.c
@@ -4,7 +4,7 @@
/* ``Have a little faith, there's magic in the night. You ain't a
beauty, but, hey, you're alright.'' */
-/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -37,6 +37,7 @@
#include "bashansi.h"
#include "posixstat.h"
+#include "bashintl.h"
#include "shell.h"
#include "flags.h"
@@ -69,6 +70,8 @@ extern int errno;
#define VT_ARRAYVAR 2
#define VT_ARRAYMEMBER 3
+#define VT_STARSUB 128 /* $* or ${array[*]} -- used to split */
+
/* Flags for quoted_strchr */
#define ST_BACKSL 0x01
#define ST_CTLESC 0x02
@@ -79,6 +82,9 @@ extern int errno;
#define EX_NOALLOC 0x01 /* just skip; don't return substring */
#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 '{'
#define RBRACE '}'
@@ -121,8 +127,9 @@ unsigned char ifs_cmap[UCHAR_MAX + 1];
unsigned char ifs_firstc;
/* Extern functions and variables from different files. */
-extern int last_command_exit_value;
+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;
extern pid_t dollar_dollar_pid;
@@ -130,11 +137,16 @@ extern int posixly_correct;
extern char *this_command_name;
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
a null file. */
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
output of expand_word_list_internal) are the result of globbing
@@ -199,8 +211,23 @@ static char *extract_dollar_brace_string __P((char *, int *, int, int));
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 *));
static char *getpattern __P((char *, int, int));
@@ -221,8 +248,10 @@ static arrayind_t array_length_reference __P((char *));
#endif
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));
+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 *));
@@ -231,7 +260,8 @@ static intmax_t parameter_brace_expand_length __P((char *));
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 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));
static char *pos_params_pat_subst __P((char *, char *, char *, int));
@@ -245,6 +275,8 @@ static WORD_LIST *expand_word_internal __P((WORD_DESC *, int, int, int *, int *)
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));
#ifdef BRACE_EXPANSION
@@ -647,6 +679,8 @@ add_one_character:
${ ... } pair through according to the Posix.2 specification. */
if (c == '$' && ((string[i + 1] == LPAREN) || (string[i + 1] == LBRACE)))
{
+ int free_ret = 1;
+
si = i + 2;
if (string[i + 1] == LPAREN)
ret = extract_delimited_string (string, &si, "$(", "(", ")", 0); /*)*/
@@ -656,12 +690,28 @@ add_one_character:
temp[j++] = '$';
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];
+ temp[j] = string[si];
- i = si + 1;
- free (ret);
+ if (string[si])
+ {
+ j++;
+ i = si + 1;
+ }
+ else
+ i = si;
+
+ if (free_ret)
+ free (ret);
continue;
}
@@ -989,11 +1039,19 @@ extract_delimited_string (string, sindex, opener, alt_opener, closer, flags)
ADVANCE_CHAR (string, slen, i);
}
- if (c == 0 && nesting_level && no_longjmp_on_fatal_error == 0)
+ if (c == 0 && nesting_level)
{
- report_error ("bad substitution: no `%s' in %s", closer, string);
- last_command_exit_value = EXECUTION_FAILURE;
- jump_to_top_level (DISCARD);
+ 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;
+ }
}
si = i - *sindex - len_closer + 1;
@@ -1102,11 +1160,19 @@ extract_dollar_brace_string (string, sindex, quoted, flags)
ADVANCE_CHAR (string, slen, i);
}
- if (c == 0 && nesting_level && no_longjmp_on_fatal_error == 0)
+ if (c == 0 && nesting_level)
{
- report_error ("bad substitution: no ending `}' in %s", string);
- last_command_exit_value = EXECUTION_FAILURE;
- jump_to_top_level (DISCARD);
+ 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);
+ }
}
result = (flags & EX_NOALLOC) ? (char *)NULL : substring (string, *sindex, i);
@@ -1137,9 +1203,9 @@ de_backslash (string)
prev_i = i;
ADVANCE_CHAR (string, slen, i);
if (j < prev_i)
- do string[j++] = string[prev_i++]; while (prev_i < i);
+ do string[j++] = string[prev_i++]; while (prev_i < i);
else
- j = i;
+ j = i;
}
string[j] = '\0';
@@ -1357,7 +1423,8 @@ skip_to_delim (string, start, delims)
/* 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
+ 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
DELIMS delimit separate fields. */
@@ -1369,7 +1436,7 @@ split_at_delims (string, slen, delims, sentinel, nwp, cwp)
int sentinel;
int *nwp, *cwp;
{
- int ts, te, i, nw, cw;
+ int ts, te, i, nw, cw, ifs_split;
char *token, *d, *d2;
WORD_LIST *ret, *tl;
@@ -1383,6 +1450,7 @@ split_at_delims (string, slen, delims, sentinel, nwp, cwp)
}
d = (delims == 0) ? ifs_value : delims;
+ ifs_split = delims == 0;
/* Make d2 the non-whitespace characters in delims */
d2 = 0;
@@ -1399,7 +1467,9 @@ split_at_delims (string, slen, delims, sentinel, nwp, cwp)
ret = (WORD_LIST *)NULL;
- for (i = 0; member (string[i], d) && spctabnl(string[i]); i++)
+ /* 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')
return (ret);
@@ -1417,8 +1487,14 @@ split_at_delims (string, slen, delims, sentinel, nwp, cwp)
if (ts == te && d2 && member (string[ts], d2))
{
te = ts + 1;
- while (member (string[te], d2))
- te++;
+ /* 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++;
}
token = substring (string, ts, te);
@@ -1449,8 +1525,8 @@ split_at_delims (string, slen, delims, sentinel, nwp, cwp)
if (string[te] == 0)
break;
- i = te /* + member (string[te], d) */;
- while (member (string[i], d) && spctabnl(string[i]))
+ i = te;
+ while (member (string[i], d) && (ifs_split || spctabnl(string[i])))
i++;
if (string[i])
@@ -1493,7 +1569,7 @@ assignment_name (string)
int offset;
char *temp;
- offset = assignment (string);
+ offset = assignment (string, 0);
if (offset == 0)
return (char *)NULL;
temp = substring (string, 0, offset);
@@ -1521,6 +1597,10 @@ string_list_internal (list, sep)
if (list == 0)
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);
result_size = 0;
@@ -1638,11 +1718,10 @@ string_list_dollar_at (list, quoted)
/* This performs word splitting and quoted null character removal on
STRING. */
-#if 0
-#define issep(c) ((separators)[1] ? (member ((c), separators)) : (c) == (separators)[0])
-#else
-#define issep(c) ((separators)[1] ? isifs(c) : (c) == (separators)[0])
-#endif
+#define issep(c) \
+ (((separators)[0]) ? ((separators)[1] ? isifs(c) \
+ : (c) == (separators)[0]) \
+ : 0)
WORD_LIST *
list_string (string, separators, quoted)
@@ -1917,10 +1996,11 @@ do_assignment_internal (string, expand)
SHELL_VAR *entry;
#if defined (ARRAY_VARS)
char *t;
- int ni, assign_list = 0;
+ int ni;
#endif
+ int assign_list = 0;
- offset = assignment (string);
+ offset = assignment (string, 0);
name = savestring (string);
value = (char *)NULL;
@@ -1961,14 +2041,7 @@ do_assignment_internal (string, expand)
}
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);
- }
+ xtrace_print_assignment (name, value, assign_list, 1);
#define ASSIGN_RETURN(r) do { FREE (value); free (name); return (r); } while (0)
@@ -1977,7 +2050,7 @@ do_assignment_internal (string, expand)
{
if (assign_list)
{
- report_error ("%s: cannot assign list to array member", name);
+ report_error (_("%s: cannot assign list to array member"), name);
ASSIGN_RETURN (0);
}
entry = assign_array_element (name, value);
@@ -2124,7 +2197,18 @@ pos_params (string, start, end, quoted)
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);
if (t != params)
@@ -2313,14 +2397,13 @@ call_expand_word_internal (w, q, i, c, e)
result = expand_word_internal (w, q, i, c, e);
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,
but that doesn't result in a memory leak because we're going
to exit in most cases). */
w->word = (char *)NULL;
last_command_exit_value = EXECUTION_FAILURE;
- jump_to_top_level ((result == &expand_word_error) ? DISCARD : FORCE_EOF);
+ exp_jump_to_top_level ((result == &expand_word_error) ? DISCARD : FORCE_EOF);
/* NOTREACHED */
}
else
@@ -2753,13 +2836,17 @@ remove_quoted_nulls (string)
while (i < slen)
{
if (string[i] == CTLESC)
- {
- i++; j++;
- if (i == slen)
- break;
- }
+ {
+ /* 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++;
+ i++;
prev_i = i;
ADVANCE_CHAR (string, slen, i);
@@ -2793,6 +2880,33 @@ word_list_remove_quoted_nulls (list)
/* */
/* **************************************************************** */
+#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:
RP_LONG_LEFT remove longest matching portion at start of PARAM
@@ -2807,7 +2921,7 @@ word_list_remove_quoted_nulls (list)
#define RP_SHORT_RIGHT 4
static char *
-remove_pattern (param, pattern, op)
+remove_upattern (param, pattern, op)
char *param, *pattern;
int op;
{
@@ -2815,11 +2929,6 @@ remove_pattern (param, pattern, op)
register char *end;
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;
@@ -2835,6 +2944,7 @@ remove_pattern (param, pattern, op)
return (savestring (p));
}
*p = c;
+
}
break;
@@ -2877,9 +2987,144 @@ remove_pattern (param, pattern, op)
}
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(). */
static int
@@ -2917,19 +3162,17 @@ match_pattern_char (pat, string)
MATCH_BEG and MATCH_END anchor the match at the beginning and end
of the string, respectively. The longest match is returned. */
static int
-match_pattern (string, pat, mtype, sp, ep)
+match_upattern (string, pat, mtype, sp, ep)
char *string, *pat;
int mtype;
char **sp, **ep;
{
- int c;
+ int c, len;
register char *p, *p1;
char *end;
- if (string == 0 || *string == 0 || pat == 0 || *pat == 0)
- return (0);
-
- end = string + STRLEN (string);
+ len = STRLEN (string);
+ end = string + len;
switch (mtype)
{
@@ -2952,11 +3195,13 @@ match_pattern (string, pat, mtype, sp, ep)
}
}
}
+
return (0);
case MATCH_BEG:
if (match_pattern_char (pat, string) == 0)
return (0);
+
for (p = end; p >= string; p--)
{
c = *p; *p = '\0';
@@ -2969,21 +3214,179 @@ match_pattern (string, pat, mtype, sp, ep)
}
*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;
- }
+ {
+ if (strmatch (pat, p, FNMATCH_EXTFLAG) == 0)
+ {
+ *sp = p;
+ *ep = end;
+ return 1;
+ }
+
+ }
+
+ return (0);
+ }
+
+ return (0);
+}
+
+#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,13 +3481,17 @@ list_remove_pattern (list, pattern, patspec, itype, quoted)
{
tword = remove_pattern (l->word->word, pattern, patspec);
w = make_bare_word (tword);
- free (tword);
+ FREE (tword);
new = make_word_list (w, new);
}
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,7 +3549,7 @@ parameter_brace_remove_pattern (varname, value, patstr, rtype, quoted)
char *varname, *value, *patstr;
int rtype, quoted;
{
- int vtype, patspec;
+ int vtype, patspec, starsub;
char *temp1, *val, *pattern;
SHELL_VAR *v;
@@ -3151,10 +3558,13 @@ parameter_brace_remove_pattern (varname, value, patstr, rtype, quoted)
this_command_name = varname;
- vtype = get_var_and_type (varname, value, &v, &val);
+ 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)
patstr++;
@@ -3467,7 +3877,7 @@ process_substitute (string, open_for_read_in_child)
#else /* HAVE_DEV_FD */
if (pipe (fildes) < 0)
{
- sys_error ("cannot make pipe for process substitution");
+ sys_error (_("cannot make pipe for process substitution"));
return ((char *)NULL);
}
/* If OPEN_FOR_READ_IN_CHILD == 1, we want to use the write end of
@@ -3483,7 +3893,7 @@ process_substitute (string, open_for_read_in_child)
if (!pathname)
{
- sys_error ("cannot make pipe for process substitution");
+ sys_error (_("cannot make pipe for process substitution"));
return ((char *)NULL);
}
@@ -3499,6 +3909,7 @@ process_substitute (string, open_for_read_in_child)
if (pid == 0)
{
reset_terminating_signals (); /* XXX */
+ free_pushed_string_input ();
/* Cancel traps, in trap.c. */
restore_original_signals ();
setup_async_signals ();
@@ -3513,7 +3924,7 @@ process_substitute (string, open_for_read_in_child)
if (pid < 0)
{
- sys_error ("cannot make child for process substitution");
+ sys_error (_("cannot make child for process substitution"));
free (pathname);
#if defined (HAVE_DEV_FD)
close (parent_pipe_fd);
@@ -3556,15 +3967,19 @@ process_substitute (string, open_for_read_in_child)
fd = open (pathname, open_for_read_in_child ? O_RDONLY|O_NONBLOCK : O_WRONLY);
if (fd < 0)
{
- sys_error ("cannot open named pipe %s for %s", pathname,
- open_for_read_in_child ? "reading" : "writing");
+ /* 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);
}
if (open_for_read_in_child)
{
if (sh_unset_nodelay_mode (fd) < 0)
{
- sys_error ("cannout reset nodelay mode for fd %d", fd);
+ sys_error (_("cannout reset nodelay mode for fd %d"), fd);
exit (127);
}
}
@@ -3574,7 +3989,7 @@ process_substitute (string, open_for_read_in_child)
if (dup2 (fd, open_for_read_in_child ? 0 : 1) < 0)
{
- sys_error ("cannot duplicate named pipe %s as fd %d", pathname,
+ sys_error (_("cannot duplicate named pipe %s as fd %d"), pathname,
open_for_read_in_child ? 0 : 1);
exit (127);
}
@@ -3716,7 +4131,7 @@ command_substitute (string, quoted)
{
pid_t pid, old_pid, old_pipeline_pgrp;
char *istring;
- int result, fildes[2], function_value;
+ int result, fildes[2], function_value, pflags, rc;
istring = (char *)NULL;
@@ -3743,10 +4158,13 @@ command_substitute (string, quoted)
if (subst_assign_varlist == 0 || garglist == 0)
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");
+ sys_error (_("cannot make pipe for command substitution"));
goto error_exit;
}
@@ -3775,7 +4193,7 @@ command_substitute (string, quoted)
if (pid < 0)
{
- sys_error ("cannot make child for command substitution");
+ sys_error (_("cannot make child for command substitution"));
error_exit:
FREE (istring);
@@ -3788,9 +4206,11 @@ command_substitute (string, quoted)
{
set_sigint_handler (); /* XXX */
+ free_pushed_string_input ();
+
if (dup2 (fildes[1], 1) < 0)
{
- sys_error ("command_substitute: cannot duplicate pipe as fd 1");
+ sys_error (_("command_substitute: cannot duplicate pipe as fd 1"));
exit (EXECUTION_FAILURE);
}
@@ -3836,14 +4256,24 @@ command_substitute (string, quoted)
else
function_value = 0;
- if (result == EXITPROG)
- exit (last_command_exit_value);
+ if (result == ERREXIT)
+ rc = last_command_exit_value;
+ else if (result == EXITPROG)
+ rc = last_command_exit_value;
else if (result)
- exit (EXECUTION_FAILURE);
+ rc = EXECUTION_FAILURE;
else if (function_value)
- exit (return_catch_value);
+ rc = return_catch_value;
else
- exit (parse_and_execute (string, "command substitution", SEVAL_NOHIST));
+ {
+ 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,7 +4296,7 @@ command_substitute (string, quoted)
/* If last_command_exit_value > 128, then the substituted command
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))
+ if (last_command_exit_value == (128 + SIGINT) && last_command_exit_signal == SIGINT)
kill (getpid (), SIGINT);
/* wait_for gives the terminal back to shell_pgrp. If some other
@@ -3965,6 +4395,65 @@ valid_brace_expansion_word (name, var_is_special)
return 0;
}
+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.
VAR_IS_SPECIAL is non-zero if NAME is one of the special variables in
@@ -3985,7 +4474,12 @@ parameter_brace_expand_word (name, var_is_special, quoted)
if (legal_number (name, &arg_index))
{
tt = get_dollar_var_value (arg_index);
- temp = tt ? quote_escapes (tt) : (char *)NULL;
+ if (tt)
+ temp = (*tt && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)))
+ ? quote_string (tt)
+ : quote_escapes (tt);
+ else
+ temp = (char *)NULL;
FREE (tt);
}
else if (var_is_special) /* ${@} */
@@ -4004,7 +4498,9 @@ parameter_brace_expand_word (name, var_is_special, quoted)
{
temp = array_value (name, quoted, &atype);
if (atype == 0 && temp)
- temp = quote_escapes (temp);
+ temp = (*temp && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)))
+ ? quote_string (temp)
+ : quote_escapes (temp);
}
#endif
else if (var = find_variable (name))
@@ -4018,7 +4514,9 @@ parameter_brace_expand_word (name, var_is_special, quoted)
#endif
if (temp)
- temp = quote_escapes (temp);
+ temp = (*temp && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)))
+ ? quote_string (temp)
+ : quote_escapes (temp);
}
else
temp = (char *)NULL;
@@ -4032,13 +4530,24 @@ parameter_brace_expand_word (name, var_is_special, quoted)
/* Expand an indirect reference to a variable: ${!NAME} expands to the
value of the variable whose name is the value of NAME. */
static char *
-parameter_brace_expand_indir (name, var_is_special, quoted)
+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);
temp = parameter_brace_expand_word (t, SPECIAL_VAR(t, 0), quoted);
@@ -4088,11 +4597,16 @@ parameter_brace_expand_rhs (name, value, c, quoted, qdollaratp, hasdollarat)
if (l)
{
/* The expansion of TEMP returned something. We need to treat things
- slightly differently if HASDOL is non-zero. */
- temp = string_list (l);
+ 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 ((hasdol && quoted) || l->next)
+ if (qdollaratp && ((hasdol && quoted) || l->next))
*qdollaratp = 1;
dispose_words (l);
}
@@ -4116,6 +4630,11 @@ parameter_brace_expand_rhs (name, value, c, quoted, qdollaratp, hasdollarat)
t = temp ? savestring (temp) : savestring ("");
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);
return (temp);
@@ -4149,7 +4668,7 @@ parameter_brace_expand_error (name, value)
dispose_words (l);
}
else
- report_error ("%s: parameter null or not set", name);
+ report_error (_("%s: parameter null or not set"), name);
/* Free the data we have allocated during this expansion, since we
are about to longjmp out. */
@@ -4360,7 +4879,8 @@ verify_substring_values (value, substr, vtype, e1p, e2p)
#if defined (ARRAY_VARS)
case VT_ARRAYVAR:
a = (ARRAY *)value;
- len = array_num_elements (a) + 1;
+ /* For arrays, the first value deals with array indices. */
+ len = array_max_index (a); /* arrays index from 0 to n - 1 */
break;
#endif
}
@@ -4374,6 +4894,12 @@ verify_substring_values (value, substr, vtype, e1p, e2p)
if (*e1p >= len || *e1p < 0)
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)
{
t++;
@@ -4387,12 +4913,20 @@ verify_substring_values (value, substr, vtype, e1p, e2p)
return (0);
if (*e2p < 0)
{
- internal_error ("%s: substring expression < 0", t);
+ internal_error (_("%s: substring expression < 0"), t);
return (0);
}
- *e2p += *e1p; /* want E2 chars starting at E1 */
- if (*e2p > len)
- *e2p = len;
+#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
*e2p = len;
@@ -4407,8 +4941,9 @@ verify_substring_values (value, substr, vtype, e1p, e2p)
characters in the value are quoted with CTLESC and takes appropriate
steps. For convenience, *VALP is set to the dequoted VALUE. */
static int
-get_var_and_type (varname, value, varp, valp)
+get_var_and_type (varname, value, quoted, varp, valp)
char *varname, *value;
+ int quoted;
SHELL_VAR **varp;
char **valp;
{
@@ -4420,6 +4955,8 @@ get_var_and_type (varname, value, varp, valp)
/* 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;
#if defined (ARRAY_VARS)
@@ -4431,6 +4968,8 @@ get_var_and_type (varname, value, varp, valp)
if (ALL_ELEMENT_SUB (temp[0]) && temp[1] == ']')
{
vtype = VT_ARRAYVAR;
+ if (temp[0] == '*')
+ vtype |= VT_STARSUB;
*valp = (char *)array_cell (v);
}
else
@@ -4451,7 +4990,21 @@ get_var_and_type (varname, value, varp, valp)
}
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,6 +5015,35 @@ get_var_and_type (varname, value, varp, valp)
/* */
/******************************************************/
+#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
VARNAME. If VARNAME is an array variable, use the array elements. */
@@ -4472,7 +5054,7 @@ parameter_brace_substring (varname, value, substr, quoted)
int quoted;
{
intmax_t e1, e2;
- int vtype, r;
+ int vtype, r, starsub;
char *temp, *val, *tt;
SHELL_VAR *v;
@@ -4481,10 +5063,13 @@ parameter_brace_substring (varname, value, substr, quoted)
this_command_name = varname;
- vtype = get_var_and_type (varname, value, &v, &val);
+ 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)
return ((r == 0) ? &expand_param_error : (char *)NULL);
@@ -4493,7 +5078,13 @@ parameter_brace_substring (varname, value, substr, quoted)
{
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);
if (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))
@@ -4514,7 +5105,10 @@ parameter_brace_substring (varname, value, substr, quoted)
break;
#if defined (ARRAY_VARS)
case VT_ARRAYVAR:
- tt = array_subrange (array_cell (v), e1, e2, quoted);
+ /* 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)
{
temp = tt ? quote_escapes (tt) : (char *)NULL;
@@ -4597,11 +5191,13 @@ pat_subst (string, pat, rep, mflags)
strncpy (ret + rptr, rep, replen);
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;
+
+ if (s == e)
+ e++, str++; /* avoid infinite recursion on zero-length match */
}
/* Now copy the unmatched portion of the input string */
@@ -4639,7 +5235,10 @@ pos_params_pat_subst (string, pat, rep, mflags)
FREE (ret);
}
- ret = string_list ((mflags & MATCH_QUOTED) ? quote_list (save) : save);
+ 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);
return (ret);
@@ -4654,7 +5253,7 @@ parameter_brace_patsub (varname, value, patsub, quoted)
char *varname, *value, *patsub;
int quoted;
{
- int vtype, mflags;
+ int vtype, mflags, starsub;
char *val, *temp, *pat, *rep, *p, *lpatsub, *tt;
SHELL_VAR *v;
@@ -4663,10 +5262,13 @@ parameter_brace_patsub (varname, value, patsub, quoted)
this_command_name = varname;
- vtype = get_var_and_type (varname, value, &v, &val);
+ 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,6 +5283,9 @@ parameter_brace_patsub (varname, value, patsub, quoted)
if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
mflags |= MATCH_QUOTED;
+ if (starsub)
+ mflags |= MATCH_STARSUB;
+
if (rep = quoted_strchr (lpatsub, '/', ST_BACKSL))
*rep++ = '\0';
else
@@ -4689,10 +5294,16 @@ parameter_brace_patsub (varname, value, patsub, quoted)
if (rep && *rep == '\0')
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,7 +5522,7 @@ parameter_brace_expand (string, indexp, quoted, quoted_dollar_atp, contains_doll
*contains_dollar_at = 1;
}
- /* Process ${PREFIX*} expansion. */
+ /* Process ${!PREFIX*} expansion. */
if (want_indir && string[sindex - 1] == RBRACE &&
(string[sindex - 2] == '*' || string[sindex - 2] == '@') &&
legal_variable_starter ((unsigned char) name[1]))
@@ -4940,6 +5551,36 @@ parameter_brace_expand (string, indexp, quoted, quoted_dollar_atp, contains_doll
*indexp = sindex;
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. */
if (valid_brace_expansion_word (want_indir ? name + 1 : name,
@@ -4950,29 +5591,13 @@ parameter_brace_expand (string, indexp, quoted, quoted_dollar_atp, contains_doll
}
if (want_indir)
- temp = parameter_brace_expand_indir (name + 1, var_is_special, quoted);
+ 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);
#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;
- }
- }
+ chk_atstar (name, quoted, quoted_dollar_atp, contains_dollar_at);
#endif
var_is_set = temp != (char *)0;
@@ -5018,7 +5643,7 @@ parameter_brace_expand (string, indexp, quoted, quoted_dollar_atp, contains_doll
default:
case '\0':
bad_substitution:
- report_error ("%s: bad substitution", string ? string : "??");
+ report_error (_("%s: bad substitution"), string ? string : "??");
FREE (value);
FREE (temp);
free (name);
@@ -5092,7 +5717,7 @@ parameter_brace_expand (string, indexp, quoted, quoted_dollar_atp, contains_doll
temp = (char *)NULL;
if (c == '=' && var_is_special)
{
- report_error ("$%s: cannot assign in this way", name);
+ report_error (_("$%s: cannot assign in this way"), name);
free (name);
free (value);
return &expand_param_error;
@@ -5172,7 +5797,16 @@ param_expand (string, sindex, quoted, expanded_something,
last_command_exit_value = EXECUTION_FAILURE;
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;
/* $$ -- pid of the invoking shell. */
@@ -5235,7 +5869,11 @@ param_expand (string, sindex, quoted, expanded_something,
quote the whole string, including the separators. If IFS
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);
temp = temp1;
@@ -5357,7 +5995,11 @@ arithsub:
}
comsub:
- temp1 = command_substitute (temp, quoted);
+ 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;
break;
@@ -5405,11 +6047,22 @@ comsub:
{
temp = array_reference (array_cell (var), 0);
if (temp)
- temp = quote_escapes (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 = quote_escapes (value_cell (var));
+ {
+ temp = value_cell (var);
+
+ temp = (*temp && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ ? quote_string (temp)
+ : quote_escapes (temp);
+ }
+
free (temp1);
goto return0;
@@ -5417,6 +6070,7 @@ comsub:
temp = (char *)NULL;
+unbound_variable:
if (unbound_vars_is_error)
err_unboundvar (temp1);
else
@@ -5546,26 +6200,7 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin
#if HANDLE_MULTIBYTE
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;
+ SADD_MBQCHAR_BODY(temp, string, sindex, string_size);
}
else
#endif
@@ -5624,7 +6259,8 @@ add_string:
has_dollar_at = 0;
temp = param_expand (string, &sindex, quoted, expanded_something,
&has_dollar_at, &quoted_dollar_at,
- &had_quoted_null, 0);
+ &had_quoted_null,
+ (word->flags & W_NOCOMSUB) ? PF_NOCOMSUB : 0);
if (temp == &expand_param_error || temp == &expand_param_fatal)
{
@@ -5640,14 +6276,20 @@ add_string:
case '`': /* Backquoted command substitution. */
{
- sindex++;
+ t_index = sindex++;
if (expanded_something)
*expanded_something = 1;
temp = string_extract (string, &sindex, "`", 0);
- de_backslash (temp);
- temp1 = command_substitute (temp, quoted);
+ 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;
goto dollar_add_string;
@@ -5806,7 +6448,9 @@ add_twochars:
/* HOWEVER, this fails if the string contains a literal
CTLNUL or CTLNUL is contained in the (non-null) expansion
of some variable. I'm not sure what to do about this
- yet. */
+ 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 */
#endif
@@ -5896,31 +6540,12 @@ add_twochars:
else
{
#if HANDLE_MULTIBYTE
- /* XXX - I'd like to use SCOPY_CHAR_I here. */
+ if (MB_CUR_MAX > 1)
+ sindex--;
+
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;
+ SADD_MBQCHAR_BODY(temp, string, sindex, string_size);
}
else
#endif
@@ -6225,6 +6850,18 @@ word_list_split (list)
* *
**************************************************/
+/* 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. */
#define PREPEND_LIST(nlist, elist) \
@@ -6408,7 +7045,7 @@ glob_expand_word_list (tlist, eflags)
or directory". However, I would like to report errors
like "Read failed". */
- if (GLOB_FAILED (glob_array))
+ if (glob_array == 0 || GLOB_FAILED (glob_array))
{
glob_array = (char **)xmalloc (sizeof (char *));
glob_array[0] = (char *)NULL;
@@ -6436,6 +7073,11 @@ glob_expand_word_list (tlist, eflags)
output_list = (WORD_LIST *)list_append (glob_list, output_list);
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)
{
/* Failed glob expressions are left unchanged. */
@@ -6586,9 +7228,9 @@ shell_expand_word_list (tlist, eflags)
last_command_exit_value = EXECUTION_FAILURE;
if (expanded == &expand_word_error)
- jump_to_top_level (DISCARD);
+ exp_jump_to_top_level (DISCARD);
else
- jump_to_top_level (FORCE_EOF);
+ exp_jump_to_top_level (FORCE_EOF);
}
/* Don't split words marked W_NOSPLIT. */
@@ -6662,9 +7304,9 @@ expand_word_list_internal (list, eflags)
{
last_command_exit_value = EXECUTION_FAILURE;
if (interactive_shell == 0 && posixly_correct)
- jump_to_top_level (FORCE_EOF);
+ exp_jump_to_top_level (FORCE_EOF);
else
- jump_to_top_level (DISCARD);
+ exp_jump_to_top_level (DISCARD);
}
}
dispose_words (subst_assign_varlist);
@@ -6709,6 +7351,7 @@ expand_word_list_internal (list, eflags)
that the variable and environment assignments affect the shell's
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,13 +7359,18 @@ expand_word_list_internal (list, eflags)
tint = (*assign_func) (temp_list->word->word);
/* Variable assignment errors in non-interactive shells running
in Posix.2 mode cause the shell to exit. */
- if (tint == 0 && assign_func == do_assignment)
+ if (tint == 0)
{
- last_command_exit_value = EXECUTION_FAILURE;
- if (interactive_shell == 0 && posixly_correct)
- jump_to_top_level (FORCE_EOF);
+ 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
- jump_to_top_level (DISCARD);
+ tempenv_assign_error++;
}
}
diff --git a/support/Makefile.in b/support/Makefile.in
index e437c695..9aacc2f5 100644
--- a/support/Makefile.in
+++ b/support/Makefile.in
@@ -36,6 +36,7 @@ BUILD_DIR = @BUILD_DIR@
RM = rm -f
SHELL = @MAKE_SHELL@
CC = @CC@
+CC_FOR_BUILD = @CC_FOR_BUILD@
EXEEXT = @EXEEXT@
@@ -75,9 +76,12 @@ OBJ1 = man2html.o
all: man2html$(EXEEXT)
man2html$(EXEEXT): $(OBJ1)
- $(CC) $(CCFLAGS) $(OBJ1) -o $@ ${LIBS}
+ $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) $(OBJ1) -o $@ ${LIBS}
clean:
- rm man2html
+ $(RM) man2html$(EXEEXT)
+
+distclean maintainer-clean mostly-clean: clean
+ $(RM) $(OBJ1)
man2html.o: man2html.c
diff --git a/support/bashbug.sh b/support/bashbug.sh
index ceb4afaf..8c4e1ecd 100644
--- a/support/bashbug.sh
+++ b/support/bashbug.sh
@@ -4,10 +4,10 @@
#
# 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.
+# chet@cwru.edu and, optionally, to bash-testers@cwru.edu.
# Other versions send mail to bug-bash@gnu.org.
#
-# Copyright (C) 1996-2002 Free Software Foundation, Inc.
+# Copyright (C) 1996-2004 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -39,35 +39,19 @@ MACHTYPE="!MACHTYPE!"
PATH=/bin:/usr/bin:/usr/local/bin:$PATH
export PATH
-# If the OS supplies a program to make temp files with semi-random names,
-# use it.
+# Check if TMPDIR is set, default to /tmp
: ${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
+#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}"
@@ -116,10 +100,10 @@ case "$N" in
*) n= c='\c' ;;
esac
-BASHTESTERS="bash-testers@po.cwru.edu"
+BASHTESTERS="bash-testers@cwru.edu"
case "$RELSTATUS" in
-alpha*|beta*|devel*|rc*) BUGBASH=chet@po.cwru.edu ;;
+alpha*|beta*|devel*|rc*) BUGBASH=chet@cwru.edu ;;
*) BUGBASH=bug-bash@gnu.org ;;
esac
@@ -166,8 +150,8 @@ fi
: ${USER=${LOGNAME-`whoami`}}
-trap 'rm -f "$TEMPFILE1" "$TEMPFILE2"; exit 1' 1 2 3 13 15
-trap 'rm -f "$TEMPFILE1" "$TEMPFILE2"' 0
+trap 'rm -rf "$TEMPDIR"; exit 1' 1 2 3 13 15
+trap 'rm -rf "$TEMPDIR"' 0
UN=
if (uname) >/dev/null 2>&1; then
@@ -187,9 +171,6 @@ fi
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" <<EOF
From: ${USER}
To: ${BUGADDR}
@@ -219,9 +200,6 @@ Fix:
fix for the problem, don't include this section.]
EOF
-# this is still raceable unless (hopefully) we used mktemp(1) or tempfile(1)
-$rm_tmp2 && rm -f "$TEMPFILE2"
-
cp "$TEMPFILE1" "$TEMPFILE2"
chmod u+w "$TEMPFILE1"
@@ -272,7 +250,7 @@ while [ $edstat -ne 0 ]; do
done
-trap 'rm -f "$TEMPFILE1" "$TEMPFILE2"; exit 1' 2 # restore trap on SIGINT
+trap 'rm -rf "$TEMPDIR"; exit 1' 2 # restore trap on SIGINT
if cmp -s "$TEMPFILE1" "$TEMPFILE2"
then
diff --git a/support/config.guess b/support/config.guess
index 56681081..9a8a4995 100755
--- a/support/config.guess
+++ b/support/config.guess
@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002 Free Software Foundation, Inc.
-timestamp='2002-03-20'
+timestamp='2002-11-30'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -88,40 +88,47 @@ if test $# != 0; then
exit 1
fi
+trap 'exit 1' 1 2 15
-dummy=dummy-$$
-trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
-# CC_FOR_BUILD -- compiler used by this script.
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
# use `HOST_CC' if defined, but it is deprecated.
-set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int dummy(){}" > $dummy.c ;
+# This shell variable is my proudest work .. or something. --bje
+
+set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
+(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)
+ || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
+dummy=$tmpdir/dummy ;
+files="$dummy.c $dummy.o $dummy.rel $dummy" ;
+trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
for c in cc gcc c89 c99 ; do
- ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
- if test $? = 0 ; then
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
CC_FOR_BUILD="$c"; break ;
fi ;
done ;
- rm -f $dummy.c $dummy.o $dummy.rel ;
+ rm -f $files ;
if test x"$CC_FOR_BUILD" = x ; then
CC_FOR_BUILD=no_compiler_found ;
fi
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac'
+esac ;
+unset files'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
PATH=$PATH:/.attbin ; export PATH
-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
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
@@ -130,61 +137,6 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
- # 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
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
@@ -200,6 +152,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
/usr/sbin/$sysctl 2>/dev/null || echo unknown)`
case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
@@ -225,7 +178,18 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
;;
esac
# The OS release
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
@@ -264,9 +228,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
sun3:OpenBSD:*:*)
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}
exit 0 ;;
@@ -281,6 +242,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
+ eval $set_cc_for_build
cat <<EOF >$dummy.s
.data
\$Lformat:
@@ -306,10 +268,9 @@ main:
jsr \$26,exit
.end main
EOF
- eval $set_cc_for_build
- $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+ $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null
if test "$?" = 0 ; then
- case `./$dummy` in
+ case `$dummy` in
0-0)
UNAME_MACHINE="alpha"
;;
@@ -331,9 +292,12 @@ EOF
2-1307)
UNAME_MACHINE="alphaev68"
;;
+ 3-1307)
+ UNAME_MACHINE="alphaev7"
+ ;;
esac
fi
- rm -f $dummy.s $dummy
+ rm -f $dummy.s $dummy && rmdir $tmpdir
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit 0 ;;
Alpha\ *:Windows_NT*:*)
@@ -374,6 +338,10 @@ EOF
NILE*:*:*:dcosx)
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/[^.]*//'`
exit 0 ;;
@@ -480,15 +448,21 @@ EOF
exit (-1);
}
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
+ $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 ;;
Motorola:PowerMAX_OS:*:*)
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
exit 0 ;;
@@ -561,8 +535,8 @@ EOF
exit(0);
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
+ $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
echo rs6000-ibm-aix3.2.4
@@ -660,9 +634,9 @@ EOF
exit (0);
}
EOF
- (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
+ (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
+ rm -f $dummy.c $dummy && rmdir $tmpdir
fi ;;
esac
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@@ -698,8 +672,8 @@ EOF
exit (0);
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
+ $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 ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@@ -781,8 +755,23 @@ EOF
*:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit 0 ;;
+ amd64:FreeBSD:*:*)
+ echo x86_64-unknown-freebsd
+ exit 0 ;;
*:FreeBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ # Determine whether the default compiler uses glibc.
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #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*:*)
echo ${UNAME_MACHINE}-pc-cygwin
@@ -794,13 +783,16 @@ EOF
echo ${UNAME_MACHINE}-pc-pw32
exit 0 ;;
x86:Interix*:3*)
- echo i386-pc-interix3
+ 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*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
# UNAME_MACHINE based on the output of uname instead of i386?
- echo i386-pc-interix
+ echo i586-pc-interix
exit 0 ;;
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
@@ -843,8 +835,28 @@ EOF
#endif
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
+ 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:*:*)
echo powerpc-unknown-linux-gnu
@@ -906,7 +918,7 @@ EOF
;;
a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit 0 ;;
+ exit 0 ;;
coff-i386)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
exit 0 ;;
@@ -939,7 +951,7 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
- rm -f $dummy.c
+ 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
;;
@@ -957,6 +969,23 @@ EOF
# Use sysv4.2uw... so that sysv4* matches it.
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$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
@@ -978,22 +1007,19 @@ EOF
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
elif /bin/uname -X 2>/dev/null >/dev/null ; then
- UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
- (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
- (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+ UNAME_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|egrep '^Machine.*Pent ?II' >/dev/null) \
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
&& UNAME_MACHINE=i686
- (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
&& UNAME_MACHINE=i686
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
else
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit 0 ;;
- i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit 0 ;;
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
@@ -1017,9 +1043,15 @@ EOF
# "miniframe"
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 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.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 \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1036,9 +1068,6 @@ EOF
mc68030:UNIX_System_V:4.*:*)
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}
exit 0 ;;
@@ -1110,6 +1139,9 @@ EOF
SX-5:SUPER-UX:*:*)
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}
exit 0 ;;
@@ -1130,7 +1162,7 @@ EOF
*:QNX:*:4*)
echo i386-pc-qnx
exit 0 ;;
- NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
+ NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;;
*:NonStop-UX:*:*)
@@ -1153,11 +1185,6 @@ EOF
fi
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
exit 0 ;;
@@ -1176,12 +1203,6 @@ EOF
*:ITS:*:*)
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
#echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1302,8 +1323,8 @@ main ()
}
EOF
-$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
-rm -f $dummy.c $dummy
+$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,17 +1356,6 @@ then
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 <<EOF
$0: unable to guess system type
diff --git a/support/config.rpath b/support/config.rpath
new file mode 100755
index 00000000..fa24bfc2
--- /dev/null
+++ b/support/config.rpath
@@ -0,0 +1,548 @@
+#! /bin/sh
+# Output a system dependent set of variables, describing how to set the
+# run time search path of shared libraries in an executable.
+#
+# Copyright 1996-2003 Free Software Foundation, Inc.
+# Taken from GNU libtool, 2001
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+#
+# 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 <kc5tja@dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we can use
+ # them.
+ ld_shlibs=no
+ ;;
+ beos*)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ :
+ 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=/' <<EOF
+
+# How to pass a linker flag through the compiler.
+wl="$escaped_wl"
+
+# Static library suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally "so").
+shlibext="$shlibext"
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator="$hardcode_libdir_separator"
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct="$hardcode_direct"
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L="$hardcode_minus_L"
+
+EOF
diff --git a/support/config.sub b/support/config.sub
index 538dc098..aefb7e15 100644..100755
--- a/support/config.sub
+++ b/support/config.sub
@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002 Free Software Foundation, Inc.
-timestamp='2002-03-07'
+timestamp='2002-11-30'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -118,7 +118,7 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
+ nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -229,24 +229,34 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
- | c4x | clipper \
- | d10v | d30v | dsp16xx \
- | fr30 \
+ | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
+ | ip2k \
| m32r | m68000 | m68k | m88k | mcore \
- | mips | mips16 | mips64 | mips64el | mips64orion | mips64orionel \
- | mips64vr4100 | mips64vr4100el | mips64vr4300 \
- | mips64vr4300el | mips64vr5000 | mips64vr5000el \
- | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
- | mipsisa32 | mipsisa64 \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64vr | mips64vrel \
+ | mips64orion | mips64orionel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| ns16k | ns32k \
| openrisc | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | sh | sh[34] | sh[34]eb | shbe | shle | sh64 \
+ | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
| strongarm \
| tahoe | thumb | tic80 | tron \
@@ -267,7 +277,7 @@ case $basic_machine in
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
- i*86 | x86_64)
+ i*86 | x86_64 | amd64)
basic_machine=$basic_machine-pc
;;
# Object if more than one company name word.
@@ -281,34 +291,46 @@ case $basic_machine in
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
- | arm-* | armbe-* | armle-* | armv*-* \
+ | amd64-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \
| bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c54x-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \
| clipper-* | cydra-* \
- | d10v-* | d30v-* \
+ | d10v-* | d30v-* | dlx-* \
| elxsi-* \
- | f30[01]-* | f700-* | fr30-* | fx80-* \
+ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* \
| m32r-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | mcore-* \
- | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
- | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
- | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
- | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39 | mipstx39el \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
- | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* | sh64-* \
+ | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
- | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
+ | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
@@ -316,14 +338,6 @@ case $basic_machine in
| ymp-* \
| z8k-*)
;;
-
- # NOTE -- BEGIN cases added for Bash -- NOTE
- butterfly-bbn* | cadmus-* | ews*-nec | masscomp-masscomp \
- | tandem-* | symmetric-* | drs6000-icl | *-*ardent | concurrent-* \
- | ksr1-* | esa-ibm | fxc-alliant | *370-amdahl | sx[45]*-nec )
- ;;
- # NOTE -- END cases added for Bash -- NOTE
-
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
@@ -457,7 +471,7 @@ case $basic_machine in
basic_machine=elxsi-elxsi
os=-bsd
;;
- encore | umax | mmax | multimax) # bash
+ encore | umax | mmax)
basic_machine=ns32k-encore
;;
es1800 | OSE68k | ose68k | ose | OSE)
@@ -498,9 +512,6 @@ case $basic_machine in
basic_machine=m88k-harris
os=-sysv3
;;
- hbullx20-bull)
- basic_machine=m68k-bull # bash
- ;;
hp300-*)
basic_machine=m68k-hp
;;
@@ -552,9 +563,6 @@ case $basic_machine in
basic_machine=hppa1.1-hp
os=-proelf
;;
- ibm032-*)
- basic_machine=ibmrt-ibm # bash
- ;;
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
@@ -575,14 +583,6 @@ case $basic_machine in
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
- i386-go32)
- basic_machine=i386-pc # bash
- os=-go32
- ;;
- i386-mingw32)
- basic_machine=i386-pc # bash
- os=-mingw32
- ;;
i386mach)
basic_machine=i386-mach
os=-mach
@@ -605,12 +605,9 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
- luna88k-omron* | m88k-omron*) # bash
+ m88k-omron*)
basic_machine=m88k-omron
;;
- magicstation*)
- basic_machine=magicstation-unknown # bash
- ;;
magnum | m3230)
basic_machine=mips-mips
os=-sysv
@@ -723,10 +720,6 @@ case $basic_machine in
nsr-tandem)
basic_machine=nsr-tandem
;;
- odt | odt3 | odt4) # SCO Open Desktop
- basic_machine=i386-pc # bash
- os=-sco3.2v4
- ;;
op50n-* | op60c-*)
basic_machine=hppa1.1-oki
os=-proelf
@@ -739,10 +732,6 @@ case $basic_machine in
basic_machine=m68000-ericsson
os=-ose
;;
- osr5 | sco5) # SCO Open Server
- basic_machine=i386-pc # bash
- os=-sco3.2v5
- ;;
os68k)
basic_machine=m68k-none
os=-os68k
@@ -761,13 +750,13 @@ case $basic_machine in
pbb)
basic_machine=m68k-tti
;;
- pc532 | pc532-*)
+ pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
- pentiumpro | p6 | 6x86 | athlon)
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
basic_machine=i686-pc
;;
pentiumii | pentium2)
@@ -788,22 +777,22 @@ case $basic_machine in
power) basic_machine=power-ibm
;;
ppc) basic_machine=powerpc-unknown
- ;;
+ ;;
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
- ;;
+ ;;
ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64) basic_machine=powerpc64-unknown
- ;;
+ ;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
basic_machine=powerpc64le-unknown
- ;;
+ ;;
ppc64le-* | powerpc64little-*)
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
@@ -834,6 +823,12 @@ case $basic_machine in
basic_machine=a29k-amd
os=-udi
;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
sequent)
basic_machine=i386-sequent
;;
@@ -899,7 +894,7 @@ case $basic_machine in
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
;;
- sv1)
+ sv1)
basic_machine=sv1-cray
os=-unicos
;;
@@ -919,6 +914,10 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
+ tic4x | c4x*)
+ basic_machine=tic4x-unknown
+ os=-coff
+ ;;
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
@@ -944,14 +943,6 @@ case $basic_machine in
basic_machine=a29k-nyu
os=-sym1
;;
- uw2 | unixware | unixware2) # bash
- basic_machine=i386-pc
- os=-sysv4.2uw2.1
- ;;
- uw7 | unixware7) # bash
- basic_machine=i386-pc
- os=-sysv5uw7
- ;;
v810 | necv810)
basic_machine=v810-nec
os=-none
@@ -965,8 +956,8 @@ case $basic_machine in
os=-vms
;;
vpp*|vx|vx-*)
- basic_machine=f301-fujitsu
- ;;
+ basic_machine=f301-fujitsu
+ ;;
vxworks960)
basic_machine=i960-wrs
os=-vxworks
@@ -987,11 +978,7 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
- windows32)
- basic_machine=i386-pc
- os=-windows32-msvcrt
- ;;
- xps | xps100)
+ xps | xps100)
basic_machine=xps100-honeywell
;;
ymp)
@@ -1037,7 +1024,7 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
- sh3 | sh4 | sh3eb | sh4eb)
+ sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)
basic_machine=sh-unknown
;;
sh64)
@@ -1046,7 +1033,7 @@ case $basic_machine in
sparc | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
- cydra)
+ cydra)
basic_machine=cydra-cydrome
;;
orion)
@@ -1061,10 +1048,6 @@ case $basic_machine in
pmac | pmac-mpw)
basic_machine=powerpc-apple
;;
- c4x*)
- basic_machine=c4x-none
- os=-coff
- ;;
*-unknown)
# Make sure to match an already-canonicalized machine name.
;;
@@ -1103,9 +1086,6 @@ case $os in
-svr4*)
os=-sysv4
;;
- -unixware7*) # bash
- os=-sysv5uw7
- ;;
-unixware*)
os=-sysv4.2uw
;;
@@ -1130,17 +1110,14 @@ case $os in
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova*)
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
- # NOTE -- BEGIN CASES ADDED FOR Bash -- NOTE
- -powerux* | -superux*)
- ;;
- # NOTE -- END CASES ADDED FOR Bash -- NOTE
-qnx*)
case $basic_machine in
x86-* | i*86-*)
@@ -1150,8 +1127,10 @@ case $os in
;;
esac
;;
+ -nto-qnx*)
+ ;;
-nto*)
- os=-nto-qnx
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
@@ -1203,7 +1182,7 @@ case $os in
os=-rtmk-nova
;;
-ns2 )
- os=-nextstep2
+ os=-nextstep2
;;
-nsk*)
os=-nsk
@@ -1230,9 +1209,6 @@ case $os in
-sysvr4)
os=-sysv4
;;
- -sysvr5) # bash
- os=-sysv5
- ;;
# This must come after -sysvr4.
-sysv*)
;;
@@ -1245,8 +1221,8 @@ case $os in
-xenix)
os=-xenix
;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- os=-mint
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
;;
-none)
;;
@@ -1283,7 +1259,7 @@ case $basic_machine in
pdp10-*)
os=-tops20
;;
- pdp11-*)
+ pdp11-*)
os=-none
;;
*-dec | vax-*)
@@ -1376,19 +1352,19 @@ case $basic_machine in
*-next)
os=-nextstep3
;;
- *-gould)
+ *-gould)
os=-sysv
;;
- *-highlevel)
+ *-highlevel)
os=-bsd
;;
*-encore)
os=-bsd
;;
- *-sgi)
+ *-sgi)
os=-irix
;;
- *-siemens)
+ *-siemens)
os=-sysv4
;;
*-masscomp)
@@ -1427,9 +1403,6 @@ case $basic_machine in
-sunos*)
vendor=sun
;;
- -lynxos*) # bash
- vendor=lynx
- ;;
-aix*)
vendor=ibm
;;
@@ -1463,7 +1436,7 @@ case $basic_machine in
-ptx*)
vendor=sequent
;;
- -vxsim* | -vxworks*)
+ -vxsim* | -vxworks* | -windiss*)
vendor=wrs
;;
-aux*)
diff --git a/support/mkinstalldirs b/support/mkinstalldirs
new file mode 100755
index 00000000..d2d5f21b
--- /dev/null
+++ b/support/mkinstalldirs
@@ -0,0 +1,111 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# 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 --git a/support/mksignames.c b/support/mksignames.c
index 798a9a40..c395e339 100644
--- a/support/mksignames.c
+++ b/support/mksignames.c
@@ -1,7 +1,7 @@
/* signames.c -- Create and write `signames.h', which contains an array of
signal names. */
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -39,10 +39,11 @@
* EXIT == 0
* DEBUG == NSIG
* ERR == NSIG+1
+ * RETURN == NSIG+2
*/
-#define LASTSIG NSIG+1
+#define LASTSIG NSIG+2
-char *signal_names[2 * NSIG + 3];
+char *signal_names[2 * (LASTSIG)];
#define signal_names_size (sizeof(signal_names)/sizeof(signal_names[0]))
@@ -369,6 +370,7 @@ initialize_signames ()
signal_names[NSIG] = "DEBUG";
signal_names[NSIG+1] = "ERR";
+ signal_names[NSIG+2] = "RETURN";
}
void
@@ -382,7 +384,7 @@ write_signames (stream)
fprintf (stream, " Do not edit. Edit support/mksignames.c instead. */\n\n");
fprintf (stream,
"/* A translation list so we can be polite to our users. */\n");
- fprintf (stream, "char *signal_names[NSIG + 3] = {\n");
+ fprintf (stream, "char *signal_names[NSIG + 4] = {\n");
for (i = 0; i <= LASTSIG; i++)
fprintf (stream, " \"%s\",\n", signal_names[i]);
diff --git a/support/mkversion.sh b/support/mkversion.sh
index 509a4548..a42eb780 100755
--- a/support/mkversion.sh
+++ b/support/mkversion.sh
@@ -147,10 +147,10 @@ echo "/* A version string for use by sccs and the what command. */"
echo "#define SCCSVERSION \"@(#)Bash version ${sccs_string}\""
# 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));'
+#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
# Make sure we can write to .build
diff --git a/support/shobj-conf b/support/shobj-conf
index 6bd7fb12..4c137170 100755
--- a/support/shobj-conf
+++ b/support/shobj-conf
@@ -97,7 +97,7 @@ sunos5*|solaris2*)
;;
# All versions of Linux or the semi-mythical GNU Hurd.
-linux*|gnu*)
+linux*-*|gnu*-*|k*bsd*-gnu-*)
SHOBJ_CFLAGS=-fPIC
SHOBJ_LD='${CC}'
SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
@@ -138,17 +138,23 @@ darwin*|macosx*)
SHOBJ_STATUS=unsupported
SHLIB_STATUS=supported
- SHOBJ_CFLAGS='-dynamic -fno-common'
+ SHOBJ_CFLAGS='-fno-common'
- SHOBJ_LD=/usr/bin/libtool
+ SHOBJ_LD='${CC}'
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'
+ 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='-lSystem'
+ SHLIB_LIBS='-lncurses' # see if -lcurses works on MacOS X 10.1
;;
openbsd*)
@@ -296,6 +302,8 @@ hpux10*-*gcc*)
# must use gcc; the bundled cc cannot compile PIC code
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'
SHLIB_XLDFLAGS='-Wl,+h,$@ -Wl,+b,$(libdir)'
diff --git a/support/texi2dvi b/support/texi2dvi
index 5439e081..010b586b 100755
--- a/support/texi2dvi
+++ b/support/texi2dvi
@@ -1,8 +1,9 @@
#! /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 $
+# $Id: texi2dvi,v 1.14 2003/02/05 00:42:33 karl Exp $
#
-# Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
+# 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
# it under the terms of the GNU General Public License as published by
@@ -26,12 +27,12 @@
# the `--debug' option when making a bug report.
# This string is expanded by rcs automatically when this file is checked out.
-rcs_revision='$Revision: 0.43 $'
+rcs_revision='$Revision: 1.14 $'
rcs_version=`set - $rcs_revision; echo $2`
program=`echo $0 | sed -e 's!.*/!!'`
-version="texi2dvi (GNU Texinfo 4.0) $rcs_version
+version="texi2dvi (GNU Texinfo 4.5) $rcs_version
-Copyright (C) 1999 Free Software Foundation, Inc.
+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.
For more information about these matters, see the files named COPYING."
@@ -46,46 +47,52 @@ is used to determine its language (LaTeX or Texinfo).
Makeinfo is used to perform Texinfo macro expansion before running TeX
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.
+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,
TEX (or PDFTEX), and TEXINDEX environment variables are used to run
those commands, if they are set.
Email bug reports to <bug-texinfo@gnu.org>,
-general questions and discussion to <help-texinfo@gnu.org>."
+general questions and discussion to <help-texinfo@gnu.org>.
+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.
-escape='\'
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=
-miincludes= # makeinfo include path
textra=
tmpdir=${TMPDIR:-/tmp}/t2d$$ # avoid collisions on 8.3 filesystems.
-txincludes= # TEXINPUTS extensions
+txincludes= # TEXINPUTS extensions, with trailing colon
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
orig_pwd=`pwd`
@@ -98,6 +105,12 @@ else
path_sep=":"
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"
# Unfortunately makeindex does not read TEXINPUTS.
@@ -136,14 +149,21 @@ while test x"$1" != x"$arg_sep"; do
-q | -s | --q* | --s*) quiet=t; batch=eval;;
-c | --c*) clean=t;;
-D | --d*) debug=t;;
- -e | --e*) expand=t;;
+ -e | -E | --e*) expand=t;;
-h | --h*) echo "$usage"; exit 0;;
-I | --I*)
shift
miincludes="$miincludes -I $1"
- txincludes="$txincludes$path_sep$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\\
$1";;
@@ -168,11 +188,20 @@ done
shift
# Interpret remaining command line args as filenames.
-if test $# = 0; then
+case $# in
+ 0)
echo "$0: Missing file arguments." >&2
echo "$0: Try \`--help' for more information." >&2
exit 2
-fi
+ ;;
+ 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.
if test -z "$debug"; then
@@ -205,14 +234,23 @@ cat <<EOF >$comment_iftex_sed
s/^@c texi2dvi//
}
}
-/^@html/,/^@end html/d
-/^@ifhtml/,/^@end ifhtml/d
-/^@ifnottex/,/^@end ifnottex/d
+/^@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
- d
+ 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'.
uncomment_iftex_sed=$utildir/uncomment.sed
@@ -230,7 +268,7 @@ cat <<\EOF >$get_xref_files
# Get list of xref files (indexes, tables and lists).
# 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.
+# 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.
test -s "$this_file" || continue
@@ -273,7 +311,7 @@ for command_line_filename in ${1+"$@"}; do
# 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 \
+ echo "$command_line_filename" | $EGREP '^(/|[A-z]:/)' >/dev/null \
|| command_line_filename="./$command_line_filename"
# See if the file exists. If it doesn't we're in trouble since, even
@@ -314,22 +352,67 @@ for command_line_filename in ${1+"$@"}; do
# Make all those directories and give up if we can't succeed.
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,
+ # 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=".$path_sep$orig_pwd$path_sep$filename_dir$path_sep$txincludes$path_sep"
+ 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.
# Otherwise, guess from the file extension.
if test -n "$set_language"; then
language=$set_language
- elif sed 1q "$command_line_filename" | fgrep 'input texinfo' >/dev/null; then
+ elif sed 1q "$command_line_filename" | grep 'input texinfo' >/dev/null; then
language=texinfo
else
language=
@@ -373,9 +456,9 @@ for command_line_filename in ${1+"$@"}; do
txiversion_tex=txiversion.tex
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'`
+ 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
makeinfo=
@@ -467,10 +550,14 @@ for command_line_filename in ${1+"$@"}; do
# 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?.
+ # before .aux and .?o?. But don't really do <anything>o<anything>
+ # -- don't match whitespace as <anything>.
+ # 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!./$filename_noext\.[^ ]o[^ ]!!g;
s/^[ ]*//;s/[ ]*$//"`
# Run texindex (or makeindex) on current index files. If they
# already exist, and after running TeX a first time the index
@@ -489,8 +576,8 @@ for command_line_filename in ${1+"$@"}; do
# Prevent $ESCAPE from being interpreted by the shell if it happens
# to be `/'.
$batch tex_args="\\${escape}nonstopmode\ \\${escape}input"
- $verbose "Running $cmd ..."
cmd="$tex $tex_args $filename_input"
+ $verbose "Running $cmd ..."
if $cmd >&5; then :; else
echo "$0: $tex exited with bad status, quitting." >&2
echo "$0: see $filename_noext.log for errors." >&2
@@ -508,7 +595,7 @@ for command_line_filename in ${1+"$@"}; do
# subdirs, since texi2dvi does not try to compare xref files in
# 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
+ if grep "Rerun to get" "$filename_noext.log" >/dev/null 2>&1; then
finished=
fi
@@ -550,8 +637,13 @@ for command_line_filename in ${1+"$@"}; do
# - the next file is processed in correct conditions
# - 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"
+ 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
fi
diff --git a/support/xenix-link.sh b/support/xenix-link.sh
index 58e84194..ed22a08c 100755
--- a/support/xenix-link.sh
+++ b/support/xenix-link.sh
@@ -36,7 +36,7 @@ rm -f bash
if [ -z "$CC" ]
then
- if [ -f /unix -a ! -f /xenix ]
+ if [ -f /unix ] && [ ! -f /xenix ]
then
CC="cc -xenix"
else
diff --git a/syntax.h b/syntax.h
index b14427a3..8bf15485 100644
--- a/syntax.h
+++ b/syntax.h
@@ -64,12 +64,15 @@
#define CSUBSTOP 0x1000 /* values of OP for ${word[:]OPstuff} */
/* Defines for use by the rest of the shell. */
-extern const int sh_syntaxtab[];
+extern int sh_syntaxtab[];
+extern int sh_syntabsiz;
#define shellmeta(c) (sh_syntaxtab[(unsigned char)(c)] & CSHMETA)
#define shellbreak(c) (sh_syntaxtab[(unsigned char)(c)] & CSHBRK)
#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,4 +95,8 @@ extern const int sh_syntaxtab[];
#define CTLESC '\001'
#define CTLNUL '\177'
+#if !defined (HAVE_ISBLANK) && !defined (isblank)
+# define isblank(x) ((x) == ' ' || (x) == '\t')
+#endif
+
#endif /* _SYNTAX_H_ */
diff --git a/test.c b/test.c
index 449c5d3b..faa7c39d 100644
--- a/test.c
+++ b/test.c
@@ -45,12 +45,14 @@
extern int errno;
#endif /* !errno */
-#if !defined (_POSIX_VERSION)
+#if !defined (_POSIX_VERSION) && defined (HAVE_SYS_FILE_H)
# include <sys/file.h>
#endif /* !_POSIX_VERSION */
#include "posixstat.h"
#include "filecntl.h"
+#include "bashintl.h"
+
#include "shell.h"
#include "pathexp.h"
#include "test.h"
@@ -149,7 +151,7 @@ test_syntax_error (format, arg)
static void
beyond ()
{
- test_syntax_error ("argument expected", (char *)NULL);
+ test_syntax_error (_("argument expected"), (char *)NULL);
}
/* Syntax error for when an integer argument was expected, but
@@ -158,7 +160,7 @@ static void
integer_expected_error (pch)
char *pch;
{
- test_syntax_error ("%s: integer expression expected", pch);
+ test_syntax_error (_("%s: integer expression expected"), pch);
}
/* A wrapper for stat () which disallows pathnames that are empty strings
@@ -351,14 +353,14 @@ term ()
}
/* A paren-bracketed argument. */
- if (argv[pos][0] == '(' && argv[pos][1] == '\0')
+ 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]);
+ 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);
}
@@ -373,7 +375,7 @@ term ()
if (test_unop (argv[pos]))
value = unary_operator ();
else
- test_syntax_error ("%s: unary operator expected", argv[pos]);
+ test_syntax_error (_("%s: unary operator expected"), argv[pos]);
}
else
{
@@ -538,7 +540,7 @@ binary_operator ()
if ((w[0] != '-' || w[3] != '\0') || test_binop (w) == 0)
{
- test_syntax_error ("%s: binary operator expected", w);
+ test_syntax_error (_("%s: binary operator expected"), w);
/* NOTREACHED */
return (FALSE);
}
@@ -782,10 +784,10 @@ two_arguments ()
if (test_unop (argv[pos]))
return (unary_operator ());
else
- test_syntax_error ("%s: unary operator expected", argv[pos]);
+ test_syntax_error (_("%s: unary operator expected"), argv[pos]);
}
else
- test_syntax_error ("%s: unary operator expected", argv[pos]);
+ test_syntax_error (_("%s: unary operator expected"), argv[pos]);
return (0);
}
@@ -825,7 +827,7 @@ three_arguments ()
pos = argc;
}
else
- test_syntax_error ("%s: binary operator expected", argv[pos+1]);
+ test_syntax_error (_("%s: binary operator expected"), argv[pos+1]);
return (value);
}
@@ -900,7 +902,7 @@ test_command (margc, margv)
--margc;
if (margv[margc] && (margv[margc][0] != ']' || margv[margc][1]))
- test_syntax_error ("missing `]'", (char *)NULL);
+ test_syntax_error (_("missing `]'"), (char *)NULL);
if (margc < 2)
test_exit (SHELL_BOOLEAN (FALSE));
@@ -916,7 +918,7 @@ test_command (margc, margv)
value = posixtest ();
if (pos != argc)
- test_syntax_error ("too many arguments", (char *)NULL);
+ test_syntax_error (_("too many arguments"), (char *)NULL);
test_exit (SHELL_BOOLEAN (value));
}
diff --git a/tests/alias.right b/tests/alias.right
new file mode 100644
index 00000000..53111beb
--- /dev/null
+++ b/tests/alias.right
@@ -0,0 +1,4 @@
+alias: 0
+alias: 0
+./alias.tests: line 25: qfoo: command not found
+quux
diff --git a/tests/alias.tests b/tests/alias.tests
new file mode 100644
index 00000000..9cfec16b
--- /dev/null
+++ b/tests/alias.tests
@@ -0,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 --git a/tests/arith-for.right b/tests/arith-for.right
index 0c05d981..c74baa48 100644
--- a/tests/arith-for.right
+++ b/tests/arith-for.right
@@ -14,39 +14,39 @@ fx is a function
fx ()
{
i=0;
- for (( 1 ; i < 3 ; i++ ))
+ for ((1 ; i < 3 ; i++ ))
do
echo $i;
done;
- for (( i=0 ; 1 ; i++ ))
+ for ((i=0 ; 1 ; i++ ))
do
- if (( " i >= 3 " )); then
+ if (( i >= 3 )); then
break;
fi;
echo $i;
done;
- for (( i=0 ; i<3 ; 1 ))
+ for ((i=0 ; i<3 ; 1))
do
echo $i;
- (( " i++ " ));
+ (( i++ ));
done;
i=0;
- for (( 1 ; 1 ; 1 ))
+ for ((1 ; 1 ; 1))
do
- if (( " i > 2 " )); then
+ if (( i > 2 )); then
break;
fi;
echo $i;
- (( " i++ " ));
+ (( i++ ));
done;
i=0;
- for (( 1 ; 1 ; 1 ))
+ for ((1 ; 1 ; 1))
do
- if (( " i > 2 " )); then
+ if (( i > 2 )); then
break;
fi;
echo $i;
- (( " i++ " ));
+ (( i++ ));
done
}
0
diff --git a/tests/arith.right b/tests/arith.right
index 6d82f1ac..1365786f 100644
--- a/tests/arith.right
+++ b/tests/arith.right
@@ -79,7 +79,7 @@
36
62
63
-./arith.tests: line 143: 3425#56: illegal arithmetic base (error token is "3425#56")
+./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 ")
./arith.tests: line 150: 2#44: value too great for base (error token is "2#44")
@@ -87,8 +87,8 @@
./arith.tests: line 152: let: jv += $iv: syntax error: operand expected (error token is "$iv")
./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")
+./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
ghi
@@ -140,13 +140,64 @@ ok
-7
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 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")
+./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
42
42
42
42
+./arith.tests: line 284: b[c]d: syntax error in expression (error token is "d")
diff --git a/tests/arith.tests b/tests/arith.tests
index ccc6e5d8..33622e76 100644
--- a/tests/arith.tests
+++ b/tests/arith.tests
@@ -254,6 +254,9 @@ echo $(( -7 ))
echo $(( ++7 ))
echo $(( --7 ))
+${THIS_SH} ./arith1.sub
+${THIS_SH} ./arith2.sub
+
x=4
y=7
@@ -276,3 +279,6 @@ echo $(( 8#$(printf "%o\n" $n) ))
printf "%u\n" $n
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 --git a/tests/arith1.sub b/tests/arith1.sub
new file mode 100644
index 00000000..43cae806
--- /dev/null
+++ b/tests/arith1.sub
@@ -0,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 --git a/tests/arith2.sub b/tests/arith2.sub
new file mode 100644
index 00000000..7eac9523
--- /dev/null
+++ b/tests/arith2.sub
@@ -0,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 --git a/tests/array.right b/tests/array.right
index bda49d86..f0c456e5 100644
--- a/tests/array.right
+++ b/tests/array.right
@@ -6,7 +6,12 @@ abcde
abcde
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='()'
declare -ar c='()'
@@ -29,7 +34,12 @@ declare -ar c='()'
readonly -a a='([1]="" [2]="bdef" [5]="hello world" [6]="test expression")'
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")'
declare -ar c='()'
@@ -47,7 +57,12 @@ declare -a f='([0]="" [1]="bdef" [2]="hello world" [3]="test" [4]="ninth element
./array.tests: line 109: []=abcde: bad array subscript
./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")'
declare -ar c='()'
@@ -59,7 +74,12 @@ this of
this is a test of read using arrays
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")'
declare -ar c='()'
@@ -127,3 +147,34 @@ abc case if then else 5
case 4
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 --git a/tests/array.tests b/tests/array.tests
index afa7556a..db02c895 100644
--- a/tests/array.tests
+++ b/tests/array.tests
@@ -289,3 +289,46 @@ echo ${foo[0]} ${#foo[0]}
echo ${foo[1]} ${#foo[1]}
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 --git a/tests/braces-tests b/tests/braces-tests
deleted file mode 100644
index d31a5e3d..00000000
--- a/tests/braces-tests
+++ /dev/null
@@ -1,24 +0,0 @@
-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)
diff --git a/tests/braces.right b/tests/braces.right
index d35e08d0..006f2c2d 100644
--- a/tests/braces.right
+++ b/tests/braces.right
@@ -17,3 +17,22 @@ abcd{efgh
foo 1 2 bar
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 --git a/tests/braces.tests b/tests/braces.tests
new file mode 100644
index 00000000..b9ae1806
--- /dev/null
+++ b/tests/braces.tests
@@ -0,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 --git a/tests/builtins.right b/tests/builtins.right
index 9d7bb0ee..f686606b 100644
--- a/tests/builtins.right
+++ b/tests/builtins.right
@@ -1,5 +1,3 @@
-alias: 0
-alias: 0
a
end-1
a
@@ -118,15 +116,15 @@ AVAR
foo
declare -x foo=""
declare -x FOO="\$\$"
-./builtins.tests: line 219: declare: FOO: not found
+./builtins.tests: line 207: declare: FOO: not found
declare -x FOO="\$\$"
ok
ok
-./builtins.tests: line 251: kill: 4096: invalid signal specification
+./builtins.tests: line 239: kill: 4096: invalid signal specification
1
a\n\n\nb
a
b
-./builtins.tests: line 260: exit: status: numeric argument required
+./builtins.tests: line 248: exit: status: numeric argument required
diff --git a/tests/builtins.tests b/tests/builtins.tests
index 979a4de0..3c286338 100644
--- a/tests/builtins.tests
+++ b/tests/builtins.tests
@@ -4,18 +4,6 @@ set +o posix
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
echo end-1
diff --git a/tests/cond.right b/tests/cond.right
index 58972ff1..06f36a9a 100644
--- a/tests/cond.right
+++ b/tests/cond.right
@@ -33,3 +33,5 @@ returns: 0
returns: 1
returns: 0
ok
+ok 42
+ok 43
diff --git a/tests/cond.tests b/tests/cond.tests
index acaa5272..3abfa9d7 100755
--- a/tests/cond.tests
+++ b/tests/cond.tests
@@ -153,3 +153,7 @@ PAT=
if [[ $STR = $PAT ]]; then
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 --git a/tests/cprint.right b/tests/cprint.right
index 6b711b8c..5dd629d1 100644
--- a/tests/cprint.right
+++ b/tests/cprint.right
@@ -14,7 +14,7 @@ tf ()
echo a
};
i=0;
- while (( " i < 3 " )); do
+ while (( i < 3 )); do
test -r /dev/fd/$i;
i=$(( i + 1 ));
done;
@@ -26,7 +26,7 @@ tf ()
if [[ -r /dev/fd/0 && -w /dev/fd/1 ]]; then
echo ok >/dev/null;
else
- if (( " 7 > 40 " )); then
+ if (( 7 > 40 )); then
echo oops;
else
echo done;
diff --git a/tests/dbg-support.right b/tests/dbg-support.right
new file mode 100644
index 00000000..eb7d3c3a
--- /dev/null
+++ b/tests/dbg-support.right
@@ -0,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 --git a/tests/dbg-support.sub b/tests/dbg-support.sub
new file mode 100644
index 00000000..f68f8d9b
--- /dev/null
+++ b/tests/dbg-support.sub
@@ -0,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 --git a/tests/dbg-support.tests b/tests/dbg-support.tests
new file mode 100755
index 00000000..27825d6a
--- /dev/null
+++ b/tests/dbg-support.tests
@@ -0,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 --git a/tests/dbg-support2.right b/tests/dbg-support2.right
new file mode 100644
index 00000000..c9d884e6
--- /dev/null
+++ b/tests/dbg-support2.right
@@ -0,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 --git a/tests/dbg-support2.tests b/tests/dbg-support2.tests
new file mode 100755
index 00000000..fdc0f31e
--- /dev/null
+++ b/tests/dbg-support2.tests
@@ -0,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 --git a/tests/dollar-at-star b/tests/dollar-at-star
index 1a754d8c..d8329b11 100755
--- a/tests/dollar-at-star
+++ b/tests/dollar-at-star
@@ -207,4 +207,16 @@ case "$@" in
*) echo bad 4;;
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 --git a/tests/dollar-at1.sub b/tests/dollar-at1.sub
new file mode 100644
index 00000000..6d407863
--- /dev/null
+++ b/tests/dollar-at1.sub
@@ -0,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 --git a/tests/dollar-at2.sub b/tests/dollar-at2.sub
new file mode 100644
index 00000000..c079a295
--- /dev/null
+++ b/tests/dollar-at2.sub
@@ -0,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 --git a/tests/dollar-star1.sub b/tests/dollar-star1.sub
new file mode 100644
index 00000000..63a9ef86
--- /dev/null
+++ b/tests/dollar-star1.sub
@@ -0,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 --git a/tests/dollar.right b/tests/dollar.right
index 345775be..7b0f511c 100644
--- a/tests/dollar.right
+++ b/tests/dollar.right
@@ -95,3 +95,33 @@ ok 1
ok 2
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] = <echo 1 ; echo 1>
+argv[1] = <echo 1 2 ; echo 1>
+argv[2] = <2>
+argv[1] = <echo 1 ; echo 1>
+argv[1] = <echo 1 2 ; echo 1>
+argv[2] = <2>
diff --git a/tests/errors.right b/tests/errors.right
index e2e8ad04..1f3487be 100644
--- a/tests/errors.right
+++ b/tests/errors.right
@@ -1,7 +1,7 @@
./errors.tests: line 17: alias: -x: invalid option
alias: usage: alias [-p] [name[=value] ... ]
./errors.tests: line 18: unalias: -x: invalid option
-unalias: usage: unalias [-a] [name ...]
+unalias: usage: unalias [-a] name [name ...]
./errors.tests: line 19: alias: hoowah: not found
./errors.tests: line 20: unalias: hoowah: not found
./errors.tests: line 23: `1': not a valid identifier
@@ -15,7 +15,7 @@ unset: usage: unset [-f] [-v] [name ...]
./errors.tests: line 52: unset: `/bin/sh': not a valid identifier
./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] ...
+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
./errors.tests: line 65: declare: cannot use `-f' to make functions
@@ -53,20 +53,20 @@ umask: usage: umask [-p] [-S] [mode]
./errors.tests: line 159: declare: VAR: readonly variable
./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: 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
./errors.tests: line 174: cd: OLDPWD not set
./errors.tests: line 175: cd: /bin/sh: Not a directory
./errors.tests: line 177: cd: /tmp/cd-notthere: No such file or directory
./errors.tests: line 180: .: filename argument required
-.: usage: . filename
+.: usage: . filename [arguments]
./errors.tests: line 181: source: filename argument required
-source: usage: source filename
+source: usage: source filename [arguments]
./errors.tests: line 184: .: -i: invalid option
-.: usage: . filename
+.: usage: . filename [arguments]
./errors.tests: line 187: set: -q: invalid option
set: usage: set [--abefhkmnptuvxBCHP] [-o option] [arg ...]
./errors.tests: line 190: enable: sh: not a shell builtin
@@ -76,16 +76,16 @@ set: usage: set [--abefhkmnptuvxBCHP] [-o option] [arg ...]
./errors.tests: line 199: read: `/bin/sh': not a valid identifier
./errors.tests: line 202: VAR: readonly variable
./errors.tests: line 205: readonly: -x: invalid option
-readonly: usage: readonly [-anf] [name[=value] ...] or readonly -p
+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 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 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 [arg] [signal_spec ...] or trap -l
+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
./errors.tests: line 233: continue: 0: loop count out of range
diff --git a/tests/exec.right b/tests/exec.right
index 0121ed4b..fbd26248 100644
--- a/tests/exec.right
+++ b/tests/exec.right
@@ -6,15 +6,15 @@ after exec1.sub with args: 0
after exec1.sub without args: 0
./execscript: line 20: notthere: command not found
127
-notthere: notthere: No such file or directory
+/tmp/bash: notthere: No such file or directory
127
/bin/sh: /bin/sh: cannot execute binary file
126
-./execscript: line 32: /: is a directory
+./execscript: line 39: /: is a directory
126
/: /: cannot execute binary file
126
-./execscript: line 39: .: /: is a directory
+./execscript: line 46: .: /: is a directory
1
127
0
@@ -22,11 +22,11 @@ this is bashenv
./exec3.sub: line 3: /tmp/bash-notthere: No such file or directory
./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
+./execscript: line 68: notthere: No such file or directory
127
-./execscript: line 64: notthere: No such file or directory
+./execscript: line 71: notthere: No such file or directory
127
-./execscript: line 67: notthere: No such file or directory
+./execscript: line 74: notthere: No such file or directory
127
this is sh
this is sh
@@ -50,3 +50,4 @@ this is ohio-state
1
0
1
+testb
diff --git a/tests/exec7.sub b/tests/exec7.sub
new file mode 100644
index 00000000..ea2fd066
--- /dev/null
+++ b/tests/exec7.sub
@@ -0,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 --git a/tests/execscript b/tests/execscript
index 7eab4af0..61722f2e 100644
--- a/tests/execscript
+++ b/tests/execscript
@@ -1,7 +1,7 @@
export LC_ALL=C
export LANG=C
-if (( $UID == 0 )); then
+if [ $UID -eq 0 ]; then
echo "execscript: the test suite should not be run as root" >&2
fi
@@ -21,8 +21,15 @@ notthere
echo $?
# this is iffy, since the error messages may vary from system to system
-${THIS_SH} notthere
+# 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
${THIS_SH} /bin/sh
@@ -94,3 +101,6 @@ ${THIS_SH} -c 'cat </dev/null | cat >/dev/null' >&-
# values
${THIS_SH} ./exec6.sub
+
+# checks for properly deciding what constitutes an executable file
+${THIS_SH} ./exec7.sub
diff --git a/tests/extglob.right b/tests/extglob.right
index c205a4f1..154a969a 100644
--- a/tests/extglob.right
+++ b/tests/extglob.right
@@ -67,6 +67,7 @@ ok 38
ok 39
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
a b a,b a-b a.b a:b a;b a_b
diff --git a/tests/extglob.tests b/tests/extglob.tests
index b1295c07..1a123d8b 100644
--- a/tests/extglob.tests
+++ b/tests/extglob.tests
@@ -321,6 +321,12 @@ ab**) echo ok 41;;
*) echo bad 41;;
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
builtin cd /
diff --git a/tests/glob-test b/tests/glob-test
index dfb987ec..d4357083 100644
--- a/tests/glob-test
+++ b/tests/glob-test
@@ -35,6 +35,16 @@ recho a* X*
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 '<bdir/>'
recho b*/
diff --git a/tests/glob.right b/tests/glob.right
index 08f1778c..46ac4d3d 100644
--- a/tests/glob.right
+++ b/tests/glob.right
@@ -12,6 +12,8 @@ argv[1] = <a>
argv[2] = <abc>
argv[3] = <abd>
argv[4] = <abe>
+tmp/l1 tmp/l2 tmp/*4 tmp/l3
+./glob-test: line 44: no match: tmp/*4
argv[1] = <bdir/>
argv[1] = <*>
argv[1] = <a*>
diff --git a/tests/herestr.right b/tests/herestr.right
index c20c0a56..2659aace 100644
--- a/tests/herestr.right
+++ b/tests/herestr.right
@@ -24,3 +24,5 @@ f3 ()
echo $(echo hi)
echo ho
echo off to work we go
+declare -a uu='([0]="" [1]="kghfjk" [2]="jkfzuk" [3]="i\
+")'
diff --git a/tests/herestr.tests b/tests/herestr.tests
index 4f3ac682..f77b229f 100644
--- a/tests/herestr.tests
+++ b/tests/herestr.tests
@@ -34,3 +34,6 @@ cat <<< 'echo $(echo hi)'
cat <<< "echo ho"
cat <<< "echo $(echo off to work we go)"
+
+IFS="/" read -r -d $'\000' -a uu <<< /kghfjk/jkfzuk/i
+declare -p uu
diff --git a/tests/histexp.right b/tests/histexp.right
index ff6453e5..193e9d4f 100644
--- a/tests/histexp.right
+++ b/tests/histexp.right
@@ -88,6 +88,7 @@ echo 'xwhix.h'
xwhix.h
echo 'xwhix.h'
xwhix.h
+ 7 set -H
8 echo line 2 for history
9 echo a b c d e
10 echo line 2 for history
@@ -117,9 +118,8 @@ xwhix.h
34 echo bar.c bar.o bar.html bar.h
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'
+ 37 echo 'xwhix'
+ 38 echo 'xwhix.h'
!!
!!
echo '!!' \!\!
diff --git a/tests/jobs.right b/tests/jobs.right
index 12bf8a34..3ec1bbed 100644
--- a/tests/jobs.right
+++ b/tests/jobs.right
@@ -1,4 +1,4 @@
-./jobs2.sub: line 9: fg: job %1 started without job control
+./jobs2.sub: line 9: fg: job 1 started without job control
fg: 1
Waiting for job 0
job 0 returns 0
@@ -16,20 +16,28 @@ Waiting for job 6
job 6 returns 0
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
-./jobs.tests: line 15: wait: no job control
-./jobs.tests: line 20: fg: no job control
+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 33: wait: `1-1': not a pid or valid job spec
-./jobs.tests: line 34: wait: `-4': not a pid or valid job spec
+./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
async list wait for child
forked
wait-when-no-children
wait-for-job
-./jobs.tests: line 56: wait: %2: no such job
+./jobs.tests: line 60: wait: %2: no such job
127
async list wait-for-job
forked
@@ -42,19 +50,19 @@ sleep 5
fg-bg 4
sleep 5
fg-bg 5
-./jobs.tests: line 83: fg: %2: no such job
-./jobs.tests: line 84: bg: bg background job?
+./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 91: fg: -s: invalid option
+./jobs.tests: line 95: fg: -s: invalid option
fg: usage: fg [job_spec]
-./jobs.tests: line 92: bg: -s: invalid option
+./jobs.tests: line 96: bg: -s: invalid option
bg: usage: bg [job_spec]
-./jobs.tests: line 97: disown: -s: invalid option
+./jobs.tests: line 101: 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
+./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 107: wait: pid 1 is not a child of this shell
+./jobs.tests: line 111: wait: pid 1 is not a child of this shell
127
3 -- 1 2 3 -- 1 - 2 - 3
[1] Running sleep 300 &
@@ -64,8 +72,8 @@ running jobs:
[1] Running sleep 300 &
[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
+./jobs.tests: line 127: kill: %4: no such job
+./jobs.tests: line 129: jobs: %4: no such job
current job:
[3]+ Running sleep 400 &
previous job:
diff --git a/tests/jobs.tests b/tests/jobs.tests
index d54c1e94..5866b0c3 100644
--- a/tests/jobs.tests
+++ b/tests/jobs.tests
@@ -8,10 +8,14 @@ ${THIS_SH} ./jobs2.sub
# before 2.03
${THIS_SH} ./jobs3.sub
+# test out behavior of using job control notation when job control is not
+# active
+${THIS_SH} ./jobs4.sub
+
jobs
echo $?
-# should be a job-control-not-enabled error
+# a no-such-job error, since we can use job control notation without job control
wait %1
# make sure we can't fg a job started when job control was not active
diff --git a/tests/jobs4.sub b/tests/jobs4.sub
new file mode 100644
index 00000000..51980d1a
--- /dev/null
+++ b/tests/jobs4.sub
@@ -0,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 --git a/tests/new-exp.right b/tests/new-exp.right
index 95f16d99..a2ad16f1 100644
--- a/tests/new-exp.right
+++ b/tests/new-exp.right
@@ -422,7 +422,15 @@ argv[1] = <_QUANTITY-_QUART-_QUEST-_QUILL-_QUOTA-_QUOTE>
./new-exp3.sub: line 19: ${!_Q* }: bad substitution
./new-exp3.sub: line 24: ${!1*}: bad substitution
./new-exp3.sub: line 26: ${!@*}: bad substitution
-./new-exp.tests: line 503: ${$(($#-1))}: 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] = <a>
argv[2] = <b>
argv[3] = <c>
@@ -439,7 +447,7 @@ argv[1] = <a>
argv[1] = <a>
argv[2] = <b>
argv[1] = <>
-./new-exp.tests: line 522: $(($# - 2)): substring expression < 0
+./new-exp.tests: line 525: $(($# - 2)): substring expression < 0
argv[1] = <bin>
argv[2] = <bin>
argv[3] = <ucb>
@@ -471,4 +479,4 @@ argv[1] = </full/path/to>
argv[1] = </>
argv[1] = <full/path/to/x16>
argv[1] = <x16>
-./new-exp.tests: line 542: ABXD: parameter unset
+./new-exp.tests: line 545: ABXD: parameter unset
diff --git a/tests/new-exp.tests b/tests/new-exp.tests
index 89b92136..5d806d6c 100644
--- a/tests/new-exp.tests
+++ b/tests/new-exp.tests
@@ -498,6 +498,9 @@ recho "${RECEIVED:$((${#RECEIVED}-1)):1}"
# tests of new prefix expansion ${!prefix*}
${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=""
echo ${c//${$(($#-1))}/x/}
diff --git a/tests/new-exp4.sub b/tests/new-exp4.sub
new file mode 100644
index 00000000..45439a06
--- /dev/null
+++ b/tests/new-exp4.sub
@@ -0,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 --git a/tests/nquote4.right b/tests/nquote4.right
new file mode 100644
index 00000000..1f7ae170
--- /dev/null
+++ b/tests/nquote4.right
@@ -0,0 +1,18 @@
+argv[1] = <ab>
+argv[1] = <abAcd>
+argv[1] = <abAcd>
+argv[1] = <ab^Dcd>
+argv[1] = <abLd>
+argv[1] = <abÞ>
+argv[1] = <abÞ>
+argv[1] = <abÍe>
+argv[1] = <ab^Lde>
+argv[1] = <¼X>
+argv[1] = <«cX>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <gX>
+argv[1] = <Ab>
+argv[1] = <>
+argv[1] = <^Abcd>
+argv[1] = <Þ>
diff --git a/tests/nquote4.tests b/tests/nquote4.tests
new file mode 100644
index 00000000..ed734677
--- /dev/null
+++ b/tests/nquote4.tests
@@ -0,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 --git a/tests/printf.right b/tests/printf.right
index d6011f4d..4d1647dd 100644
--- a/tests/printf.right
+++ b/tests/printf.right
Binary files differ
diff --git a/tests/printf.tests b/tests/printf.tests
index 5f6d8aa2..d9bc30c1 100644
--- a/tests/printf.tests
+++ b/tests/printf.tests
@@ -222,3 +222,19 @@ printf $format 0
# 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 --git a/tests/read.right b/tests/read.right
index dcc869d9..c388294a 100644
--- a/tests/read.right
+++ b/tests/read.right
@@ -49,3 +49,15 @@ while read -u 3 var
do
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 --git a/tests/read.tests b/tests/read.tests
index e8b7e8f8..f9c78c5a 100644
--- a/tests/read.tests
+++ b/tests/read.tests
@@ -90,3 +90,6 @@ ${THIS_SH} ./read3.sub
# 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 --git a/tests/read2.sub b/tests/read2.sub
index 1e632c35..176cf863 100644
--- a/tests/read2.sub
+++ b/tests/read2.sub
@@ -1,6 +1,6 @@
a=4
-read -t 2 a
+read -t 2 a < /dev/tty
echo $?
echo $a
@@ -10,7 +10,7 @@ echo $?
echo $a
-read -t -3 a
+read -t -3 a < /dev/tty
echo $?
echo $a
diff --git a/tests/read5.sub b/tests/read5.sub
new file mode 100644
index 00000000..58b992dc
--- /dev/null
+++ b/tests/read5.sub
@@ -0,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 --git a/tests/redir.right b/tests/redir.right
index 283bdcdb..54b05f8d 100644
--- a/tests/redir.right
+++ b/tests/redir.right
@@ -88,3 +88,9 @@ f ()
after read
./redir5.sub: line 27: read: read error: 0: Bad file descriptor
# tests of ksh93-like dup-and-close redirection operators
+/
+/
+/
+0
+0
+0
diff --git a/tests/redir.tests b/tests/redir.tests
index e80b7309..19cf9a1e 100644
--- a/tests/redir.tests
+++ b/tests/redir.tests
@@ -153,3 +153,6 @@ cat < redir1.*
# 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 --git a/tests/redir6.sub b/tests/redir6.sub
new file mode 100644
index 00000000..60cc68b0
--- /dev/null
+++ b/tests/redir6.sub
@@ -0,0 +1,8 @@
+cd /
+pwd
+help >&-
+pwd
+pwd
+echo $?
+echo $?
+echo $?
diff --git a/tests/run-alias b/tests/run-alias
new file mode 100644
index 00000000..6a20b06e
--- /dev/null
+++ b/tests/run-alias
@@ -0,0 +1,2 @@
+${THIS_SH} ./alias.tests > /tmp/xx 2>&1
+diff /tmp/xx alias.right && rm -f /tmp/xx
diff --git a/tests/run-braces b/tests/run-braces
index 564a96f3..53d4f1b7 100644
--- a/tests/run-braces
+++ b/tests/run-braces
@@ -1,2 +1,2 @@
-${THIS_SH} ./braces-tests > /tmp/xx
+${THIS_SH} ./braces.tests > /tmp/xx
diff /tmp/xx braces.right && rm -f /tmp/xx
diff --git a/tests/run-dbg-support b/tests/run-dbg-support
new file mode 100755
index 00000000..9e9c649c
--- /dev/null
+++ b/tests/run-dbg-support
@@ -0,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 --git a/tests/run-dbg-support2 b/tests/run-dbg-support2
new file mode 100755
index 00000000..f62583f8
--- /dev/null
+++ b/tests/run-dbg-support2
@@ -0,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 --git a/tests/run-execscript b/tests/run-execscript
index 042880c8..f97ab21b 100644
--- a/tests/run-execscript
+++ b/tests/run-execscript
@@ -3,5 +3,7 @@ echo "warning: produce diff output." >&2
echo "warning: if the text of the error messages concerning \`notthere' or" >&2
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 --git a/tests/run-glob-test b/tests/run-glob-test
index a01047ff..659112a3 100644
--- a/tests/run-glob-test
+++ b/tests/run-glob-test
@@ -1,4 +1,4 @@
PATH=$PATH:`pwd`
export PATH
-${THIS_SH} ./glob-test | grep -v '^expect' > /tmp/xx
+${THIS_SH} ./glob-test 2>&1 | grep -v '^expect' > /tmp/xx
diff /tmp/xx glob.right && rm -f /tmp/xx
diff --git a/tests/run-jobs b/tests/run-jobs
index e53ecd58..bfd4fa03 100644
--- a/tests/run-jobs
+++ b/tests/run-jobs
@@ -1,5 +1,7 @@
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 /tmp/xx jobs.right && rm -f /tmp/xx
diff --git a/tests/run-nquote4 b/tests/run-nquote4
new file mode 100644
index 00000000..006872c8
--- /dev/null
+++ b/tests/run-nquote4
@@ -0,0 +1,2 @@
+${THIS_SH} ./nquote.tests 2>&1 | grep -v '^expect' > /tmp/xx
+diff /tmp/xx nquote.right && rm -f /tmp/xx
diff --git a/tests/run-read b/tests/run-read
index 35c94e40..b7a42681 100644
--- a/tests/run-read
+++ b/tests/run-read
@@ -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 --git a/tests/run-set-x b/tests/run-set-x
new file mode 100755
index 00000000..b999e698
--- /dev/null
+++ b/tests/run-set-x
@@ -0,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 --git a/tests/run-test b/tests/run-test
index 32fbde7a..b2482c3f 100644
--- a/tests/run-test
+++ b/tests/run-test
@@ -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 --git a/tests/set-x.right b/tests/set-x.right
new file mode 100644
index 00000000..fc55bd88
--- /dev/null
+++ b/tests/set-x.right
@@ -0,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 --git a/tests/set-x.tests b/tests/set-x.tests
new file mode 100755
index 00000000..323b772d
--- /dev/null
+++ b/tests/set-x.tests
@@ -0,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 --git a/tests/shopt.right b/tests/shopt.right
index 51218f65..605a8f01 100644
--- a/tests/shopt.right
+++ b/tests/shopt.right
@@ -9,7 +9,12 @@ shopt -s cmdhist
shopt -u dotglob
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
shopt -u histverify
@@ -36,6 +41,8 @@ shopt -s sourcepath
shopt -s cdspell
shopt -s cmdhist
shopt -s expand_aliases
+shopt -s extquote
+shopt -s force_fignore
shopt -s hostcomplete
shopt -s interactive_comments
shopt -s progcomp
@@ -47,7 +54,10 @@ shopt -u checkhash
shopt -u checkwinsize
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
shopt -u histverify
@@ -67,7 +77,10 @@ checkhash off
checkwinsize off
dotglob off
execfail off
+extdebug off
extglob off
+failglob off
+gnu_errfmt off
histreedit off
histappend off
histverify off
@@ -86,6 +99,8 @@ set +o allexport
set -o braceexpand
set -o emacs
set +o errexit
+set +o errtrace
+set +o functrace
set -o hashall
set -o histexpand
set -o history
@@ -101,6 +116,7 @@ set +o notify
set +o nounset
set +o onecmd
set +o physical
+set +o pipefail
set +o posix
set -o privileged
set +o verbose
@@ -111,6 +127,8 @@ allexport off
braceexpand on
emacs on
errexit off
+errtrace off
+functrace off
hashall on
histexpand on
history on
@@ -126,6 +144,7 @@ notify off
nounset off
onecmd off
physical off
+pipefail off
posix off
privileged on
verbose off
@@ -136,6 +155,8 @@ set +o allexport
set -o braceexpand
set -o emacs
set +o errexit
+set +o errtrace
+set +o functrace
set -o hashall
set -o histexpand
set -o history
@@ -151,6 +172,7 @@ set +o notify
set +o nounset
set +o onecmd
set +o physical
+set +o pipefail
set +o posix
set -o privileged
set +o verbose
@@ -171,6 +193,8 @@ set -o privileged
--
set +o allexport
set +o errexit
+set +o errtrace
+set +o functrace
set +o ignoreeof
set +o keyword
set +o noclobber
@@ -181,6 +205,7 @@ set +o notify
set +o nounset
set +o onecmd
set +o physical
+set +o pipefail
set +o posix
set +o verbose
set +o vi
@@ -188,6 +213,8 @@ set +o xtrace
--
allexport off
errexit off
+errtrace off
+functrace off
ignoreeof off
keyword off
noclobber off
@@ -198,6 +225,7 @@ notify off
nounset off
onecmd off
physical off
+pipefail off
posix off
verbose off
vi off
diff --git a/tests/test.tests b/tests/test.tests
index d84af1bd..a915c4e4 100644
--- a/tests/test.tests
+++ b/tests/test.tests
@@ -99,7 +99,7 @@ t -s run-all
echo 't -t 20'
t -t 20
echo 't -t 0'
-t -t 0
+t -t 0 < /dev/tty
echo 't -u noexist'
t -u noexist
@@ -355,7 +355,7 @@ case "${THIS_SH}" in
esac
if ln -s ${SHNAME} /tmp/test.symlink 2>/dev/null; then
- chgrp ${GROUPS[0]} /tmp/test.symlink
+ chgrp ${GROUPS[0]} /tmp/test.symlink 2>/dev/null
echo 't -h /tmp/test.symlink'
t -h /tmp/test.symlink
# some systems don't let you remove this
diff --git a/tests/trap.right b/tests/trap.right
index 6c179d0a..72f3b6d2 100644
--- a/tests/trap.right
+++ b/tests/trap.right
@@ -29,6 +29,7 @@ trap -- 'echo [$LINENO] debug' DEBUG
[28] debug
./trap.tests[33] debug
./trap.tests[34] debug
+func2[30] debug
func2[31] debug
func2debug line
./trap.tests[36] debug
diff --git a/tests/trap.tests b/tests/trap.tests
index 3e2d00dd..9aac7254 100644
--- a/tests/trap.tests
+++ b/tests/trap.tests
@@ -81,6 +81,6 @@ trap -p SIGCHLD
# 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 - SIGINT QUIT TERM
trap
diff --git a/tests/type.right b/tests/type.right
index 30f433ab..853c33bb 100644
--- a/tests/type.right
+++ b/tests/type.right
@@ -4,7 +4,6 @@ type: usage: type [-afptP] name [name ...]
./type.tests: line 13: command: notthere: not found
function
keyword
-alias
builtin
file
file
@@ -16,7 +15,6 @@ func ()
}
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
func
@@ -27,6 +25,12 @@ func ()
}
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'
alias m='more'
@@ -35,8 +39,8 @@ builtin
builtin is a shell builtin
/bin/sh
/bin/sh is /bin/sh
-./type.tests: line 51: type: func: not found
-./type.tests: line 53: type: m: not found
+./type.tests: line 64: type: func: not found
+./type.tests: line 66: type: m: not found
/bin/sh
/tmp/bash
bash is hashed (/tmp/bash)
diff --git a/tests/type.tests b/tests/type.tests
index 706e3be3..7307c869 100644
--- a/tests/type.tests
+++ b/tests/type.tests
@@ -19,7 +19,6 @@ func() { echo this is func; }
type -t func
type -t while
-type -t m
type -t builtin
type -t /bin/sh
type -t ${THIS_SH}
@@ -29,7 +28,6 @@ type func
# the following two should produce identical output
type while
type -a while
-type m
type builtin
type /bin/sh
@@ -37,11 +35,26 @@ command -v func
command -V func
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
command -v /bin/sh
diff --git a/tests/varenv.right b/tests/varenv.right
index 563411d3..c458b184 100644
--- a/tests/varenv.right
+++ b/tests/varenv.right
@@ -30,7 +30,7 @@ unset
declare -x ivar="42"
hB
braceexpand:hashall:interactive-comments
-hPB
+hBP
braceexpand:hashall:interactive-comments:physical
declare -r SHELLOPTS="braceexpand:hashall:interactive-comments:physical"
abcde
diff --git a/trap.c b/trap.c
index c40baf81..3641caf3 100644
--- a/trap.c
+++ b/trap.c
@@ -1,7 +1,7 @@
/* trap.c -- Not the trap command, but useful functions for manipulating
those objects. The trap command is in builtins/trap.def. */
-/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -31,9 +31,12 @@
#include <stdio.h>
#include <errno.h>
+#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"
#include "builtins.h"
@@ -54,7 +57,7 @@ extern int errno;
#define SIG_CHANGED 0x20 /* Trap value changed in trap handler. */
#define SIG_IGNORED 0x40 /* The signal is currently being ignored. */
-#define SPECIAL_TRAP(s) ((s) == EXIT_TRAP || (s) == DEBUG_TRAP || (s) == ERROR_TRAP)
+#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
shell will do with a signal. DEBUG_TRAP == NSIG; some code below
@@ -66,7 +69,7 @@ static void change_signal __P((int, char *));
static void get_original_signal __P((int));
-static void _run_trap_internal __P((int, char *));
+static int _run_trap_internal __P((int, char *));
static void reset_signal __P((int));
static void restore_signal __P((int));
@@ -77,8 +80,11 @@ extern int interrupt_immediately;
extern int last_command_exit_value;
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. */
SigHandler *original_signals[NSIG];
@@ -99,10 +105,8 @@ int pending_traps[NSIG];
trap command (e.g., when `return' is executed in the trap command). */
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;
+/* 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 */
int wait_signal_received;
@@ -115,8 +119,8 @@ initialize_traps ()
{
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;
+ 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;
for (i = 1; i < NSIG; i++)
@@ -186,9 +190,10 @@ signal_name (sig)
char *ret;
/* 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";
+ ret = (sig >= BASH_NSIG || sig < 0 || signal_names[sig] == NULL)
+ ? _("invalid signal number")
+ : signal_names[sig];
+
return ret;
}
@@ -197,10 +202,12 @@ signal_name (sig)
then (int)2 is returned. Return NO_SIG if STRING doesn't
contain a valid signal descriptor. */
int
-decode_signal (string)
+decode_signal (string, flags)
char *string;
+ int flags;
{
intmax_t sig;
+ char *name;
if (legal_number (string, &sig))
return ((sig >= 0 && sig < NSIG) ? (int)sig : NO_SIG);
@@ -208,11 +215,32 @@ decode_signal (string)
/* A leading `SIG' may be omitted. */
for (sig = 0; sig < BASH_NSIG; sig++)
{
- if (signal_names[sig] == 0 || signal_names[sig][0] == '\0')
+ name = signal_names[sig];
+ if (name == 0 || name[0] == '\0')
continue;
- if (strcasecmp (string, signal_names[sig]) == 0 ||
- (STREQN (signal_names[sig], "SIG", 3) &&
- strcasecmp (string, &(signal_names[sig])[3]) == 0))
+
+ /* 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);
}
@@ -278,11 +306,11 @@ run_pending_traps ()
Unless we catch this, the subshell will dump core when
trap_list[SIGTERM] == DEFAULT_SIG, because DEFAULT_SIG is
usually 0x0. */
- internal_warning ("run_pending_traps: bad value in trap_list[%d]: %p",
+ 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));
+ internal_warning (_("run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"), sig, signal_name (sig));
kill (getpid (), sig);
}
}
@@ -318,7 +346,7 @@ trap_handler (sig)
if ((sig >= NSIG) ||
(trap_list[sig] == (char *)DEFAULT_SIG) ||
(trap_list[sig] == (char *)IGNORE_SIG))
- programming_error ("trap_handler: bad signal %d", sig);
+ programming_error (_("trap_handler: bad signal %d"), sig);
else
{
oerrno = errno;
@@ -381,6 +409,13 @@ set_error_trap (command)
set_signal (ERROR_TRAP, command);
}
+void
+set_return_trap (command)
+ char *command;
+{
+ set_signal (RETURN_TRAP, command);
+}
+
#ifdef INCLUDE_UNUSED
void
set_sigint_trap (command)
@@ -541,7 +576,8 @@ restore_default_signal (sig)
{
if (SPECIAL_TRAP (sig))
{
- if ((sig != DEBUG_TRAP && sig != ERROR_TRAP) || (sigmodes[sig] & SIG_INPROGRESS) == 0)
+ if ((sig != DEBUG_TRAP && sig != ERROR_TRAP && sig != RETURN_TRAP) ||
+ (sigmodes[sig] & SIG_INPROGRESS) == 0)
free_trap_command (sig);
trap_list[sig] = (char *)NULL;
sigmodes[sig] &= ~SIG_TRAPPED;
@@ -609,9 +645,10 @@ int
run_exit_trap ()
{
char *trap_command;
- int code, old_exit_value;
+ int code, function_code, retval;
- old_exit_value = last_command_exit_value;
+ 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
currently running in the trap handler (call to exit in the list of
@@ -623,20 +660,34 @@ run_exit_trap ()
sigmodes[EXIT_TRAP] &= ~SIG_TRAPPED;
sigmodes[EXIT_TRAP] |= SIG_INPROGRESS;
+ retval = trap_saved_exit_value;
+ running_trap = 1;
+
code = setjmp (top_level);
- if (code == 0)
+ /* 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)
- return (last_command_exit_value);
+ retval = last_command_exit_value;
+ else if (function_code != 0)
+ retval = return_catch_value;
else
- return (old_exit_value);
+ retval = trap_saved_exit_value;
+
+ running_trap = 0;
+ return retval;
}
- return (old_exit_value);
+ return (trap_saved_exit_value);
}
void
@@ -647,15 +698,18 @@ run_trap_cleanup (sig)
}
/* Run a trap command for SIG. SIG is one of the signals the shell treats
- specially. */
-static void
+ specially. Returns the exit status of the executed trap command list. */
+static int
_run_trap_internal (sig, tag)
int sig;
char *tag;
{
char *trap_command, *old_trap;
- int old_exit_value, *token_state;
+ 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. */
if ((sigmodes[sig] & SIG_TRAPPED) && ((sigmodes[sig] & SIG_IGNORED) == 0) &&
@@ -668,43 +722,99 @@ _run_trap_internal (sig, tag)
trap_command = savestring (old_trap);
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;
+ trap_saved_exit_value = last_command_exit_value;
token_state = save_token_state ();
- parse_and_execute (trap_command, tag, SEVAL_NONINT|SEVAL_NOHIST);
+
+ /* 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);
- last_command_exit_value = old_exit_value;
+ trap_exit_value = last_command_exit_value;
+ last_command_exit_value = trap_saved_exit_value;
running_trap = 0;
sigmodes[sig] &= ~SIG_INPROGRESS;
if (sigmodes[sig] & SIG_CHANGED)
{
- free (old_trap);
+#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;
}
-void
+int
run_debug_trap ()
{
- if ((sigmodes[DEBUG_TRAP] & SIG_TRAPPED) && ((sigmodes[DEBUG_TRAP] & SIG_INPROGRESS) == 0))
- _run_trap_internal (DEBUG_TRAP, "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;
}
void
run_error_trap ()
{
- if ((sigmodes[ERROR_TRAP] & SIG_TRAPPED) && (sigmodes[ERROR_TRAP] & SIG_INPROGRESS) == 0)
+ 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. */
void
@@ -727,7 +837,7 @@ free_trap_strings ()
trap_list[i] = (char *)DEFAULT_SIG;
sigmodes[i] &= ~SIG_TRAPPED;
}
- trap_list[DEBUG_TRAP] = trap_list[EXIT_TRAP] = trap_list[ERROR_TRAP] = (char *)NULL;
+ trap_list[DEBUG_TRAP] = trap_list[EXIT_TRAP] = trap_list[ERROR_TRAP] = trap_list[RETURN_TRAP] = (char *)NULL;
}
#endif
@@ -764,6 +874,7 @@ reset_or_restore_signal_handlers (reset)
trap_list[EXIT_TRAP] = (char *)NULL;
sigmodes[EXIT_TRAP] &= ~SIG_TRAPPED;
}
+
for (i = 1; i < NSIG; i++)
{
if (sigmodes[i] & SIG_TRAPPED)
@@ -778,9 +889,22 @@ reset_or_restore_signal_handlers (reset)
}
/* Command substitution and other child processes don't inherit the
- debug or error traps. */
- sigmodes[DEBUG_TRAP] &= ~SIG_TRAPPED;
- sigmodes[ERROR_TRAP] &= ~SIG_TRAPPED;
+ 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
}
/* Reset trapped signals to their original values, but don't free the
diff --git a/trap.h b/trap.h
index 3380e0a6..f47fd8e6 100644
--- a/trap.h
+++ b/trap.h
@@ -33,18 +33,23 @@
#endif /* !NSIG */
#define NO_SIG -1
-#define DEFAULT_SIG SIG_DFL
-#define IGNORE_SIG SIG_IGN
+#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
+#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+2
+#define BASH_NSIG NSIG+3
-#define signal_object_p(x) (decode_signal (x) != NO_SIG)
+/* 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) \
(signal_is_trapped (s) && signal_is_ignored (s) == 0) ? trap_list[s] \
@@ -54,26 +59,34 @@ extern char *trap_list[];
/* 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 void run_debug_trap __P((void));
+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));
extern void restore_original_signals __P((void));
extern char *signal_name __P((int));
-extern int decode_signal __P((char *));
+extern int decode_signal __P((char *, int));
extern void run_interrupt_trap __P((void));
extern int maybe_call_trap_handler __P((int));
extern int signal_is_trapped __P((int));
diff --git a/variables.c b/variables.c
index 1f9180e8..dc876de6 100644
--- a/variables.c
+++ b/variables.c
@@ -1,6 +1,6 @@
/* variables.c -- Functions for hacking shell variables. */
-/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -36,6 +36,7 @@
#include "chartypes.h"
#include <pwd.h>
#include "bashansi.h"
+#include "bashintl.h"
#include "shell.h"
#include "flags.h"
@@ -72,17 +73,24 @@
/* Variables used here and defined in other files. */
extern int posixly_correct;
extern int line_number;
-extern int subshell_environment, indirection_level;
+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;
extern char *primary_prompt, *secondary_prompt;
extern char *current_host_name;
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. */
VAR_CONTEXT *global_variables = (VAR_CONTEXT *)NULL;
@@ -94,6 +102,12 @@ VAR_CONTEXT *shell_variables = (VAR_CONTEXT *)NULL;
the environment. */
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. */
int variable_context = 0;
@@ -102,6 +116,10 @@ int variable_context = 0;
for a single command. */
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. */
char *dollar_vars[10];
@@ -139,6 +157,11 @@ static SHELL_VAR *null_assign __P((SHELL_VAR *, char *, arrayind_t));
#if defined (ARRAY_VARS)
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));
static SHELL_VAR *get_seconds __P((SHELL_VAR *));
@@ -152,6 +175,9 @@ static SHELL_VAR *get_random __P((SHELL_VAR *));
static SHELL_VAR *assign_lineno __P((SHELL_VAR *, char *, arrayind_t));
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 *));
#endif
@@ -159,12 +185,10 @@ static SHELL_VAR *get_histcmd __P((SHELL_VAR *));
#if defined (PUSHD_AND_POPD) && defined (ARRAY_VARS)
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
static SHELL_VAR *get_funcname __P((SHELL_VAR *));
@@ -239,6 +263,11 @@ initialize_shell_variables (env, privmode)
if (shell_functions == 0)
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++]; )
{
char_index = 0;
@@ -282,7 +311,7 @@ initialize_shell_variables (env, privmode)
array_needs_making = 1;
}
else
- report_error ("error importing function definition for `%s'", name);
+ report_error (_("error importing function definition for `%s'"), name);
/* ( */
if (name[char_index - 1] == ')' && name[char_index - 2] == '\0')
@@ -408,6 +437,9 @@ initialize_shell_variables (env, privmode)
make_vers_array ();
#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. */
temp_var = find_variable ("POSIXLY_CORRECT");
@@ -639,7 +671,7 @@ adjust_shell_level (change)
shell_level = 0;
else if (shell_level > 1000)
{
- internal_warning ("shell level (%d) too high, resetting to 1", shell_level);
+ internal_warning (_("shell level (%d) too high, resetting to 1"), shell_level);
shell_level = 1;
}
@@ -986,6 +1018,38 @@ null_array_assign (self, value, ind)
}
#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
value of the last assignment. */
@@ -1132,6 +1196,44 @@ get_lineno (var)
return (var);
}
+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 *
get_histcmd (var)
@@ -1146,8 +1248,49 @@ get_histcmd (var)
}
#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 *
+static SHELL_VAR *
assign_dirstack (self, value, ind)
SHELL_VAR *self;
char *value;
@@ -1171,18 +1314,6 @@ get_dirstack (self)
var_setarray (self, a);
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 */
#if defined (ARRAY_VARS)
@@ -1206,25 +1337,15 @@ get_groupset (self)
}
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 */
+/* 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)
{
@@ -1232,6 +1353,7 @@ get_funcname (self)
t = savestring (this_shell_function->name);
var_setvalue (self, t);
}
+#endif
return (self);
}
@@ -1259,7 +1381,11 @@ init_funcname_var ()
v = find_variable ("FUNCNAME");
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;
}
@@ -1271,6 +1397,9 @@ initialize_dynamic_variables ()
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);
@@ -1278,12 +1407,23 @@ initialize_dynamic_variables ()
INIT_DYNAMIC_VAR ("HISTCMD", (char *)NULL, get_histcmd, (sh_var_assign_func_t *)NULL);
#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_dirstack_var ();
+ v = init_dynamic_array_var ("DIRSTACK", get_dirstack, assign_dirstack, 0);
#endif /* PUSHD_AND_POPD && ARRAY_VARS */
#if defined (ARRAY_VARS)
- v = init_groups_var ();
+ 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
v = init_funcname_var ();
@@ -1334,11 +1474,12 @@ var_lookup (name, vcontext)
*/
SHELL_VAR *
-find_variable_internal (name, search_tempenv)
+find_variable_internal (name, force_tempenv)
const char *name;
- int search_tempenv;
+ int force_tempenv;
{
SHELL_VAR *var;
+ int search_tempenv;
var = (SHELL_VAR *)NULL;
@@ -1347,7 +1488,9 @@ find_variable_internal (name, search_tempenv)
to get the `exported' value of $foo. This happens if we are executing
a function or builtin, or if we are looking up a variable in a
"subshell environment". */
- if ((search_tempenv || subshell_environment) && temporary_env)
+ search_tempenv = force_tempenv || (expanding_redir == 0 && subshell_environment);
+
+ if (search_tempenv && temporary_env)
var = hash_lookup (name, temporary_env);
if (var == 0)
@@ -1364,7 +1507,7 @@ SHELL_VAR *
find_variable (name)
const char *name;
{
- return (find_variable_internal (name, this_shell_builtin != 0));
+ return (find_variable_internal (name, (expanding_redir == 0 && this_shell_builtin != 0)));
}
/* Look up the function entry whose name matches STRING.
@@ -1376,6 +1519,15 @@ find_function (name)
return (hash_lookup (name, shell_functions));
}
+/* 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. */
char *
@@ -1459,7 +1611,7 @@ make_local_variable (name)
if (vc == 0)
{
- internal_error ("make_local_variable: no function context at current scope found");
+ internal_error (_("make_local_variable: no function context at current scope"));
return ((SHELL_VAR *)NULL);
}
else if (vc->table == 0)
@@ -1515,8 +1667,9 @@ make_local_array_variable (name)
ARRAY *array;
var = make_local_variable (name);
- if (var == 0)
+ if (var == 0 || array_p (var))
return var;
+
array = array_create ();
FREE (value_cell(var));
@@ -1788,7 +1941,11 @@ bind_int_variable (lhs, rhs)
isint = isarr = 0;
#if defined (ARRAY_VARS)
+# if 0
if (t = xstrchr (lhs, '[')) /*]*/
+# else
+ if (valid_array_reference (lhs))
+# endif
{
isarr = 1;
v = array_variable_part (lhs, (char **)0, (int *)0);
@@ -1873,6 +2030,35 @@ bind_function (name, value)
return (entry);
}
+/* 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
responsible for moving the main temporary env to one of the other
@@ -1885,7 +2071,7 @@ assign_in_env (string)
char *name, *temp, *value;
SHELL_VAR *var;
- offset = assignment (string);
+ offset = assignment (string, 0);
name = savestring (string);
value = (char *)NULL;
@@ -1937,13 +2123,11 @@ assign_in_env (string)
setifs (var);
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);
- }
+ /* 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;
}
@@ -2062,6 +2246,28 @@ unbind_func (name)
return 0;
}
+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
shell_variables or shell_functions).
@@ -2096,6 +2302,11 @@ makunbound (name, vc)
We also need to add it back into the correct hash table. */
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));
var_setvalue (old_var, (char *)NULL);
@@ -2502,7 +2713,7 @@ all_local_variables ()
if (vc == 0)
{
- internal_error ("all_local_variables: no function context at current scope found");
+ internal_error (_("all_local_variables: no function context at current scope"));
return (SHELL_VAR **)NULL;
}
if (vc->table == 0 || HASH_ENTRIES (vc->table) == 0 || vc_haslocals (vc) == 0)
@@ -2716,7 +2927,7 @@ valid_exportstr (v)
s = v->exportstr;
if (legal_variable_starter ((unsigned char)*s) == 0)
{
- internal_error ("invalid character %d in exportstr for %s", *s, v->name);
+ internal_error (_("invalid character %d in exportstr for %s"), *s, v->name);
return (0);
}
for (s = v->exportstr + 1; s && *s; s++)
@@ -2725,13 +2936,13 @@ valid_exportstr (v)
break;
if (legal_variable_char ((unsigned char)*s) == 0)
{
- internal_error ("invalid character %d in exportstr for %s", *s, v->name);
+ internal_error (_("invalid character %d in exportstr for %s"), *s, v->name);
return (0);
}
}
if (*s != '=')
{
- internal_error ("no `=' in exportstr for %s", v->name);
+ internal_error (_("no `=' in exportstr for %s"), v->name);
return (0);
}
return (1);
@@ -2857,7 +3068,7 @@ add_or_supercede_exported_var (assign, do_alloc)
register int i;
int equal_offset;
- equal_offset = assignment (assign);
+ equal_offset = assignment (assign, 0);
if (equal_offset == 0)
return (export_env);
@@ -3156,7 +3367,7 @@ pop_var_context ()
vcxt = shell_variables;
if (vc_isfuncenv (vcxt) == 0)
{
- internal_error ("pop_var_context: head of shell_variables not a function context");
+ internal_error (_("pop_var_context: head of shell_variables not a function context"));
return;
}
@@ -3169,7 +3380,7 @@ pop_var_context ()
dispose_var_context (vcxt);
}
else
- internal_error ("pop_var_context: no global_variables context");
+ internal_error (_("pop_var_context: no global_variables context"));
}
/* Delete the HASH_TABLEs for all variable contexts beginning at VCXT, and
@@ -3235,7 +3446,7 @@ pop_scope (is_special)
vcxt = shell_variables;
if (vc_istempscope (vcxt) == 0)
{
- internal_error ("pop_scope: head of shell_variables not a temporary environment scope");
+ internal_error (_("pop_scope: head of shell_variables not a temporary environment scope"));
return;
}
@@ -3334,6 +3545,56 @@ dispose_saved_dollar_vars ()
dollar_arg_stack[dollar_arg_stack_index] = (WORD_LIST *)NULL;
}
+/* 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 */
+}
+
/*************************************************
* *
* Functions to manage special variables *
@@ -3369,6 +3630,7 @@ static struct name_and_function special_vars[] = {
{ "HISTFILESIZE", sv_histsize },
{ "HISTIGNORE", sv_histignore },
{ "HISTSIZE", sv_histsize },
+ { "HISTTIMEFORMAT", sv_histtimefmt },
#endif
#if defined (READLINE)
@@ -3598,18 +3860,28 @@ sv_history_control (name)
char *name;
{
char *temp;
+ char *val;
+ int tptr;
history_control = 0;
temp = get_string_value (name);
- if (temp && *temp && STREQN (temp, "ignore", 6))
+ if (temp == 0 || *temp == 0)
+ return;
+
+ tptr = 0;
+ while (val = extract_colon_unit (temp, &tptr))
{
- 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;
+ 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);
}
}
@@ -3640,6 +3912,16 @@ sv_histchars (name)
}
}
#endif /* BANG_HISTORY */
+
+void
+sv_histtimefmt (name)
+ char *name;
+{
+ SHELL_VAR *v;
+
+ v = find_variable (name);
+ history_write_timestamps = (v != 0);
+}
#endif /* HISTORY */
#if defined (HAVE_TZSET) && defined (PROMPT_STRING_DECODE)
diff --git a/variables.h b/variables.h
index 213f6ff7..cd11fd97 100644
--- a/variables.h
+++ b/variables.h
@@ -71,7 +71,11 @@ union _value {
ARRAY *a; /* array */
HASH_TABLE *h; /* associative array */
double d; /* floating point number */
- void *v; /* opaque data for future use */
+#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 */
};
typedef struct variable {
@@ -214,6 +218,7 @@ extern void make_funcname_visible __P((int));
extern SHELL_VAR *var_lookup __P((const char *, VAR_CONTEXT *));
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));
extern SHELL_VAR *find_tempenv_variable __P((const char *));
@@ -222,6 +227,8 @@ extern SHELL_VAR *make_local_variable __P((const char *));
extern SHELL_VAR *bind_variable __P((const char *, char *));
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 *));
@@ -252,6 +259,7 @@ extern SHELL_VAR *bind_var_to_int __P((char *, intmax_t));
extern int assign_in_env __P((const char *));
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 *));
extern void delete_all_variables __P((HASH_TABLE *));
@@ -270,6 +278,9 @@ extern void push_dollar_vars __P((void));
extern void pop_dollar_vars __P((void));
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 *));
extern void dispose_variable __P((SHELL_VAR *));
@@ -326,6 +337,7 @@ extern void sv_opterr __P((char *));
extern void sv_locale __P((char *));
#if defined (READLINE)
+extern void sv_comp_wordbreaks __P((char *));
extern void sv_terminal __P((char *));
extern void sv_hostfile __P((char *));
#endif
@@ -341,6 +353,7 @@ extern void sv_history_control __P((char *));
# if defined (BANG_HISTORY)
extern void sv_histchars __P((char *));
# endif
+extern void sv_histtimefmt __P((char *));
#endif /* HISTORY */
#endif /* !_VARIABLES_H_ */
diff --git a/version.c b/version.c
index 9ff00e5d..bad76b01 100644
--- a/version.c
+++ b/version.c
@@ -28,6 +28,8 @@
#include "patchlevel.h"
#include "conftypes.h"
+#include "bashintl.h"
+
extern char *shell_name;
/* Defines from version.h */
@@ -43,6 +45,10 @@ const char *sccs_version = SCCSVERSION;
/* 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 *
shell_version_string ()
@@ -52,9 +58,17 @@ shell_version_string ()
if (tt[0] == '\0')
{
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;
}
@@ -65,5 +79,5 @@ show_shell_version (extended)
{
printf ("GNU bash, version %s (%s)\n", shell_version_string (), MACHTYPE);
if (extended)
- printf ("Copyright (C) 2002 Free Software Foundation, Inc.\n");
+ printf (_("Copyright (C) 2004 Free Software Foundation, Inc.\n"));
}
diff --git a/xmalloc.c b/xmalloc.c
index c2011f9c..93d19281 100644
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -38,6 +38,8 @@
#include "error.h"
+#include "bashintl.h"
+
#if !defined (PTR_T)
# if defined (__STDC__)
# define PTR_T void *
@@ -88,9 +90,9 @@ xmalloc (bytes)
{
#if defined (HAVE_SBRK)
allocated = findbrk ();
- fatal_error ("xmalloc: cannot allocate %lu bytes (%lu bytes allocated)", (unsigned long)bytes, (unsigned long)allocated);
+ 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);
+ fatal_error (_("xmalloc: cannot allocate %lu bytes"), (unsigned long)bytes);
#endif /* !HAVE_SBRK */
}
@@ -110,9 +112,9 @@ xrealloc (pointer, bytes)
{
#if defined (HAVE_SBRK)
allocated = findbrk ();
- fatal_error ("xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)", (unsigned long)bytes, (unsigned long)allocated);
+ 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);
+ fatal_error (_("xrealloc: cannot allocate %lu bytes"), (unsigned long)bytes);
#endif /* !HAVE_SBRK */
}
@@ -146,9 +148,9 @@ sh_xmalloc (bytes, file, line)
{
#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);
+ 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);
+ fatal_error (_("xmalloc: %s:%d: cannot allocate %lu bytes"), file, line, (unsigned long)bytes);
#endif /* !HAVE_SBRK */
}
@@ -170,9 +172,9 @@ sh_xrealloc (pointer, bytes, file, line)
{
#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);
+ 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);
+ fatal_error (_("xrealloc: %s:%d: cannot allocate %lu bytes"), file, line, (unsigned long)bytes);
#endif /* !HAVE_SBRK */
}
diff --git a/y.tab.c b/y.tab.c
index c3ff7797..bff19c4e 100644
--- a/y.tab.c
+++ b/y.tab.c
@@ -1,50 +1,51 @@
-/* A Bison parser, made from /usr/homes/chet/src/bash/src/parse.y
- by GNU bison 1.34. */
+
+/* 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 "/usr/homes/chet/src/bash/src/parse.y"
+#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"
@@ -67,6 +68,8 @@
#include "memalloc.h"
+#include "bashintl.h"
+
#define NEED_STRFTIME_DECL /* used in externs.h */
#include "shell.h"
@@ -96,6 +99,8 @@
#if defined (ALIAS)
# include "alias.h"
+#else
+typedef void *alias_t;
#endif /* ALIAS */
#if defined (PROMPT_STRING_DECODE)
@@ -198,7 +203,7 @@ static char *parse_compound_assignment __P((int *));
#endif
#if defined (DPAREN_ARITHMETIC) || defined (ARITH_FOR_COMMAND)
static int parse_dparen __P((int));
-static int parse_arith_cmd __P((char **));
+static int parse_arith_cmd __P((char **, int));
#endif
#if defined (COND_COMMAND)
static void cond_error __P((void));
@@ -266,6 +271,11 @@ int expand_aliases = 0;
decode_prompt_string. */
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. */
static char *current_decoded_prompt;
@@ -297,10 +307,23 @@ static int function_bstart;
/* The line number in a script at which an arithmetic for command starts. */
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 276 "/usr/homes/chet/src/bash/src/parse.y"
-#ifndef YYSTYPE
+#line 299 "/Users/chet/src/bash/src/parse.y"
typedef union {
WORD_DESC *word; /* the word that we read. */
int number; /* the number that we read. */
@@ -309,454 +332,428 @@ typedef union {
REDIRECT *redirect;
ELEMENT element;
PATTERN_LIST *pattern;
-} yystype;
-# define YYSTYPE yystype
+} YYSTYPE;
+#include <stdio.h>
+
+#ifndef __cplusplus
+#ifndef __STDC__
+#define const
#endif
-#ifndef YYDEBUG
-# define YYDEBUG 0
#endif
-#define YYFINAL 301
+#define YYFINAL 302
#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
+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
+#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, 88, 46, 84, 88,
- 0, 60, 0, 22, 0, 22, 23, 0
+
+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
-/* 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
+#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) || 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
+#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
-/* 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
+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
};
-/* 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
+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
};
-/* 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 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[] =
-{
- 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 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[] =
-{
- 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 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, 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
+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 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
+#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, 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
+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/local/share/bison/bison.simple"
+#line 3 "/usr/share/bison.simple"
+/* This file comes from bison-1.28. */
/* Skeleton output parser for bison,
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
- Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -778,109 +775,63 @@ static const short yycheck[] =
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 <stdlib.h> /* 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
-};
+/* 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. */
-/* 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
+#ifndef YYSTACK_USE_ALLOCA
+#ifdef alloca
+#define YYSTACK_USE_ALLOCA
+#else /* alloca not defined */
+#ifdef __GNUC__
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
+#else /* not GNU C. */
+#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
+#define YYSTACK_USE_ALLOCA
+#include <alloca.h>
+#else /* not sparc */
+/* We think this test detects Watcom and Microsoft C. */
+/* This used to test MSDOS, but that is a bad idea
+ since that symbol is in the user namespace. */
+#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
+#if 0 /* No need for malloc.h, which pollutes the namespace;
+ instead, just don't use alloca. */
+#include <malloc.h>
#endif
-#if ! defined (YYSIZE_T)
-# if defined (__STDC__) || defined (__cplusplus)
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
-# endif
+#else /* not MSDOS, or __TURBOC__ */
+#if defined(_AIX)
+/* I don't know what this was needed for, but it pollutes the namespace.
+ So I turned it off. rms, 2 May 1997. */
+/* #include <malloc.h> */
+ #pragma alloca
+#define YYSTACK_USE_ALLOCA
+#else /* not MSDOS, or __TURBOC__, or _AIX */
+#if 0
+#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
+ and on HPUX 10. Eventually we can turn this on. */
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
+#endif /* __hpux */
#endif
-#if ! defined (YYSIZE_T)
-# define YYSIZE_T unsigned int
+#endif /* not _AIX */
+#endif /* not MSDOS, or __TURBOC__ */
+#endif /* not sparc */
+#endif /* not GNU C */
+#endif /* alloca not defined */
+#endif /* YYSTACK_USE_ALLOCA not defined */
+
+#ifdef YYSTACK_USE_ALLOCA
+#define YYSTACK_ALLOC alloca
+#else
+#define YYSTACK_ALLOC malloc
#endif
+/* Note: there must be only one dollar sign in this file.
+ It is replaced by the list of actions, each action
+ as one case of the switch. */
+
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY -2
@@ -888,188 +839,131 @@ union yyalloc
#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.
+/* 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) \
+#define YYBACKUP(token, value) \
do \
if (yychar == YYEMPTY && yylen == 1) \
- { \
- yychar = (Token); \
- yylval = (Value); \
+ { yychar = (token), yylval = (value); \
yychar1 = YYTRANSLATE (yychar); \
YYPOPSTACK; \
goto yybackup; \
} \
else \
- { \
- yyerror ("syntax error: cannot back up"); \
- YYERROR; \
- } \
+ { yyerror ("syntax error: cannot back up"); YYERROR; } \
while (0)
#define YYTERROR 1
#define YYERRCODE 256
+#ifndef YYPURE
+#define YYLEX yylex()
+#endif
-/* YYLLOC_DEFAULT -- Compute the default location (before the actions
- are run).
+#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 */
- 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 YYPURE
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N) \
- Current.last_line = Rhs[N].last_line; \
- Current.last_column = Rhs[N].last_column;
+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 */
-/* YYLEX -- calling `yylex' with the right arguments. */
+#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 */
-#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 <stdio.h> /* 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
+#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. */
+/* 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
+#undef YYMAXDEPTH
#endif
#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
+#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++ */
+/* 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
-# 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
+__yy_memcpy (to, from, count)
+ char *to;
+ char *from;
+ unsigned int count;
{
- register const char *yyf = yyfrom;
- register char *yyt = yyto;
- register YYSIZE_T yyi = yycount;
+ register char *f = from;
+ register char *t = to;
+ register int i = count;
- while (yyi-- != 0)
- *yyt++ = *yyf++;
+ while (i-- > 0)
+ *t++ = *f++;
}
-# endif
-#endif
-#ifdef YYERROR_VERBOSE
+#else /* __cplusplus */
-# 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
+/* 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 *yyd = yydest;
- register const char *yys = yysrc;
+ register char *t = to;
+ register char *f = from;
+ register int i = count;
- while ((*yyd++ = *yys++) != '\0')
- continue;
-
- return yyd - 1;
+ while (i-- > 0)
+ *t++ = *f++;
}
-# endif
-# endif
+
+#endif
#endif
-#line 319 "/usr/local/share/bison/bison.simple"
-
+#line 217 "/usr/share/bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
@@ -1078,121 +972,76 @@ yystpcpy (yydest, yysrc)
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 */
+#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
+#ifdef YYPARSE_PARAM
int yyparse (void *);
-# else
+#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(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;
+ int yyerrstatus; /* number of tokens to shift before error messages enabled */
+ int yychar1 = 0; /* lookahead token as an internal (translated) token number */
-#if YYLSP_NEEDED
- /* The location stack. */
- YYLTYPE yylsa[YYINITDEPTH];
+ 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;
-#endif
-#if YYLSP_NEEDED
-# define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
+#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
#else
-# define YYPOPSTACK (yyvsp--, yyssp--)
+#define YYPOPSTACK (yyvsp--, yyssp--)
#endif
- YYSIZE_T yystacksize = YYINITDEPTH;
+ int yystacksize = YYINITDEPTH;
+ int yyfree_stacks = 0;
-
- /* The variables used to return semantic value and location from the
- action routines. */
- YYSTYPE yyval;
-#if YYLSP_NEEDED
- YYLTYPE yyloc;
+#ifdef YYPURE
+ int yychar;
+ YYSTYPE yylval;
+ int yynerrs;
+#ifdef YYLSP_NEEDED
+ YYLTYPE yylloc;
+#endif
#endif
- /* When reducing, the number of symbols on the RHS of the reduced
- rule. */
+ YYSTYPE yyval; /* the variable used to return */
+ /* semantic values from the action */
+ /* routines */
+
int yylen;
- YYDPRINTF ((stderr, "Starting parse\n"));
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Starting parse\n");
+#endif
yystate = 0;
yyerrstatus = 0;
@@ -1204,106 +1053,110 @@ yyparse (YYPARSE_PARAM_ARG)
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
- yyssp = yyss;
+ yyssp = yyss - 1;
yyvsp = yyvs;
-#if YYLSP_NEEDED
+#ifdef 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++;
+/* 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:
- yysetstate:
- *yyssp = yystate;
+ *++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. */
- YYSIZE_T yysize = yyssp - yyss + 1;
+ int size = 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;
- }
+ /* 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)
- goto yyoverflowlab;
+ {
+ 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;
-
- {
- 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);
- }
+#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 + yysize - 1;
- yyvsp = yyvs + yysize - 1;
-#if YYLSP_NEEDED
- yylsp = yyls + yysize - 1;
+ yyssp = yyss + size - 1;
+ yyvsp = yyvs + size - 1;
+#ifdef YYLSP_NEEDED
+ yylsp = yyls + size - 1;
#endif
- YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Stack size increased to %d\n", yystacksize);
+#endif
if (yyssp >= yyss + yystacksize - 1)
YYABORT;
}
- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Entering state %d\n", yystate);
+#endif
goto yybackup;
-
-
-/*-----------.
-| yybackup. |
-`-----------*/
-yybackup:
+ yybackup:
/* Do appropriate processing given the current state. */
/* Read a lookahead token if we need one and don't already have one. */
@@ -1322,7 +1175,10 @@ yybackup:
if (yychar == YYEMPTY)
{
- YYDPRINTF ((stderr, "Reading a token: "));
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Reading a token: ");
+#endif
yychar = YYLEX;
}
@@ -1333,25 +1189,25 @@ yybackup:
yychar1 = 0;
yychar = YYEOF; /* Don't call YYLEX any more */
- YYDPRINTF ((stderr, "Now at end of input.\n"));
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Now at end of input.\n");
+#endif
}
else
{
- yychar1 = YYTRANSLATE (yychar);
+ 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 != 0
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
+ 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
- YYFPRINTF (stderr, ")\n");
+#endif
+ fprintf (stderr, ")\n");
}
#endif
}
@@ -1383,82 +1239,60 @@ yybackup:
YYACCEPT;
/* Shift the lookahead token. */
- YYDPRINTF ((stderr, "Shifting token %d (%s), ",
- yychar, yytname[yychar1]));
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
+#endif
/* Discard the token being shifted unless it is eof. */
if (yychar != YYEOF)
yychar = YYEMPTY;
*++yyvsp = yylval;
-#if YYLSP_NEEDED
+#ifdef YYLSP_NEEDED
*++yylsp = yylloc;
#endif
- /* Count tokens shifted since error; after three, turn off error
- status. */
- if (yyerrstatus)
- yyerrstatus--;
+ /* 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. |
-`-----------------------------------------------------------*/
+/* Do the default action for the current state. */
yydefault:
+
yyn = yydefact[yystate];
if (yyn == 0)
goto yyerrlab;
- goto yyreduce;
-
-/*-----------------------------.
-| yyreduce -- Do a reduction. |
-`-----------------------------*/
+/* Do a reduction. yyn is the number of a rule to reduce with. */
yyreduce:
- /* yyn is the number of a rule to reduce with. */
yylen = yyr2[yyn];
+ if (yylen > 0)
+ yyval = yyvsp[1-yylen]; /* implement default value of the action */
- /* 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 != 0
if (yydebug)
{
- int yyi;
+ int i;
- YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
- yyn, yyrline[yyn]);
+ fprintf (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]]);
+ 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 327 "/usr/homes/chet/src/bash/src/parse.y"
+#line 351 "/Users/chet/src/bash/src/parse.y"
{
/* Case of regular command. Discard the error
safety net,and return the command just parsed. */
@@ -1466,19 +1300,19 @@ case 1:
eof_encountered = 0;
/* discard_parser_constructs (0); */
YYACCEPT;
- }
- break;
+ ;
+ break;}
case 2:
-#line 336 "/usr/homes/chet/src/bash/src/parse.y"
+#line 360 "/Users/chet/src/bash/src/parse.y"
{
/* Case of regular command, but not a very
interesting one. Return a NULL command. */
global_command = (COMMAND *)NULL;
YYACCEPT;
- }
- break;
+ ;
+ break;}
case 3:
-#line 343 "/usr/homes/chet/src/bash/src/parse.y"
+#line 367 "/Users/chet/src/bash/src/parse.y"
{
/* Error during parsing. Return NULL command. */
global_command = (COMMAND *)NULL;
@@ -1492,255 +1326,255 @@ case 3:
{
YYABORT;
}
- }
- break;
+ ;
+ break;}
case 4:
-#line 358 "/usr/homes/chet/src/bash/src/parse.y"
+#line 382 "/Users/chet/src/bash/src/parse.y"
{
/* Case of EOF seen by itself. Do ignoreeof or
not. */
global_command = (COMMAND *)NULL;
handle_eof_input_unit ();
YYACCEPT;
- }
- break;
+ ;
+ 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;
+#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 370 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.word_list = make_word_list (yyvsp[0].word, yyvsp[-1].word_list); }
- break;
+#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 374 "/usr/homes/chet/src/bash/src/parse.y"
+#line 398 "/Users/chet/src/bash/src/parse.y"
{
redir.filename = yyvsp[0].word;
yyval.redirect = make_redirection (1, r_output_direction, redir);
- }
- break;
+ ;
+ break;}
case 8:
-#line 379 "/usr/homes/chet/src/bash/src/parse.y"
+#line 403 "/Users/chet/src/bash/src/parse.y"
{
redir.filename = yyvsp[0].word;
yyval.redirect = make_redirection (0, r_input_direction, redir);
- }
- break;
+ ;
+ break;}
case 9:
-#line 384 "/usr/homes/chet/src/bash/src/parse.y"
+#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;
+ ;
+ break;}
case 10:
-#line 389 "/usr/homes/chet/src/bash/src/parse.y"
+#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;
+ ;
+ break;}
case 11:
-#line 394 "/usr/homes/chet/src/bash/src/parse.y"
+#line 418 "/Users/chet/src/bash/src/parse.y"
{
redir.filename = yyvsp[0].word;
yyval.redirect = make_redirection (1, r_appending_to, redir);
- }
- break;
+ ;
+ break;}
case 12:
-#line 399 "/usr/homes/chet/src/bash/src/parse.y"
+#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;
+ ;
+ break;}
case 13:
-#line 404 "/usr/homes/chet/src/bash/src/parse.y"
+#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;
+ ;
+ break;}
case 14:
-#line 410 "/usr/homes/chet/src/bash/src/parse.y"
+#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;
+ ;
+ break;}
case 15:
-#line 416 "/usr/homes/chet/src/bash/src/parse.y"
+#line 440 "/Users/chet/src/bash/src/parse.y"
{
redir.filename = yyvsp[0].word;
yyval.redirect = make_redirection (0, r_reading_string, redir);
- }
- break;
+ ;
+ break;}
case 16:
-#line 421 "/usr/homes/chet/src/bash/src/parse.y"
+#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;
+ ;
+ break;}
case 17:
-#line 426 "/usr/homes/chet/src/bash/src/parse.y"
+#line 450 "/Users/chet/src/bash/src/parse.y"
{
redir.dest = yyvsp[0].number;
yyval.redirect = make_redirection (0, r_duplicating_input, redir);
- }
- break;
+ ;
+ break;}
case 18:
-#line 431 "/usr/homes/chet/src/bash/src/parse.y"
+#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;
+ ;
+ break;}
case 19:
-#line 436 "/usr/homes/chet/src/bash/src/parse.y"
+#line 460 "/Users/chet/src/bash/src/parse.y"
{
redir.dest = yyvsp[0].number;
yyval.redirect = make_redirection (1, r_duplicating_output, redir);
- }
- break;
+ ;
+ break;}
case 20:
-#line 441 "/usr/homes/chet/src/bash/src/parse.y"
+#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;
+ ;
+ break;}
case 21:
-#line 446 "/usr/homes/chet/src/bash/src/parse.y"
+#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;
+ ;
+ break;}
case 22:
-#line 451 "/usr/homes/chet/src/bash/src/parse.y"
+#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;
+ ;
+ break;}
case 23:
-#line 456 "/usr/homes/chet/src/bash/src/parse.y"
+#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;
+ ;
+ break;}
case 24:
-#line 461 "/usr/homes/chet/src/bash/src/parse.y"
+#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;
+ ;
+ break;}
case 25:
-#line 466 "/usr/homes/chet/src/bash/src/parse.y"
+#line 490 "/Users/chet/src/bash/src/parse.y"
{
redir.filename = yyvsp[0].word;
yyval.redirect = make_redirection
(0, r_deblank_reading_until, redir);
redir_stack[need_here_doc++] = yyval.redirect;
- }
- break;
+ ;
+ break;}
case 26:
-#line 473 "/usr/homes/chet/src/bash/src/parse.y"
+#line 497 "/Users/chet/src/bash/src/parse.y"
{
redir.filename = yyvsp[0].word;
yyval.redirect = make_redirection
(yyvsp[-2].number, r_deblank_reading_until, redir);
redir_stack[need_here_doc++] = yyval.redirect;
- }
- break;
+ ;
+ break;}
case 27:
-#line 480 "/usr/homes/chet/src/bash/src/parse.y"
+#line 504 "/Users/chet/src/bash/src/parse.y"
{
redir.dest = 0;
yyval.redirect = make_redirection (1, r_close_this, redir);
- }
- break;
+ ;
+ break;}
case 28:
-#line 485 "/usr/homes/chet/src/bash/src/parse.y"
+#line 509 "/Users/chet/src/bash/src/parse.y"
{
redir.dest = 0;
yyval.redirect = make_redirection (yyvsp[-2].number, r_close_this, redir);
- }
- break;
+ ;
+ break;}
case 29:
-#line 490 "/usr/homes/chet/src/bash/src/parse.y"
+#line 514 "/Users/chet/src/bash/src/parse.y"
{
redir.dest = 0;
yyval.redirect = make_redirection (0, r_close_this, redir);
- }
- break;
+ ;
+ break;}
case 30:
-#line 495 "/usr/homes/chet/src/bash/src/parse.y"
+#line 519 "/Users/chet/src/bash/src/parse.y"
{
redir.dest = 0;
yyval.redirect = make_redirection (yyvsp[-2].number, r_close_this, redir);
- }
- break;
+ ;
+ break;}
case 31:
-#line 500 "/usr/homes/chet/src/bash/src/parse.y"
+#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;
+ ;
+ break;}
case 32:
-#line 505 "/usr/homes/chet/src/bash/src/parse.y"
+#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;
+ ;
+ break;}
case 33:
-#line 510 "/usr/homes/chet/src/bash/src/parse.y"
+#line 534 "/Users/chet/src/bash/src/parse.y"
{
redir.filename = yyvsp[0].word;
yyval.redirect = make_redirection (0, r_input_output, redir);
- }
- break;
+ ;
+ break;}
case 34:
-#line 515 "/usr/homes/chet/src/bash/src/parse.y"
+#line 539 "/Users/chet/src/bash/src/parse.y"
{
redir.filename = yyvsp[0].word;
yyval.redirect = make_redirection (1, r_output_force, redir);
- }
- break;
+ ;
+ break;}
case 35:
-#line 520 "/usr/homes/chet/src/bash/src/parse.y"
+#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;
+ ;
+ break;}
case 36:
-#line 527 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.element.word = yyvsp[0].word; yyval.element.redirect = 0; }
- break;
+#line 551 "/Users/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;
+#line 553 "/Users/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;
+#line 555 "/Users/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"
+#line 559 "/Users/chet/src/bash/src/parse.y"
{
yyval.redirect = yyvsp[0].redirect;
- }
- break;
+ ;
+ break;}
case 40:
-#line 539 "/usr/homes/chet/src/bash/src/parse.y"
+#line 563 "/Users/chet/src/bash/src/parse.y"
{
register REDIRECT *t;
@@ -1748,26 +1582,26 @@ case 40:
;
t->next = yyvsp[0].redirect;
yyval.redirect = yyvsp[-1].redirect;
- }
- break;
+ ;
+ break;}
case 41:
-#line 550 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.command = make_simple_command (yyvsp[0].element, (COMMAND *)NULL); }
- break;
+#line 574 "/Users/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;
+#line 576 "/Users/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;
+#line 580 "/Users/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;
+#line 582 "/Users/chet/src/bash/src/parse.y"
+{ yyval.command = yyvsp[0].command; ;
+ break;}
case 45:
-#line 560 "/usr/homes/chet/src/bash/src/parse.y"
+#line 584 "/Users/chet/src/bash/src/parse.y"
{
COMMAND *tc;
@@ -1782,170 +1616,221 @@ case 45:
else
tc->redirects = yyvsp[0].redirect;
yyval.command = yyvsp[-1].command;
- }
- break;
+ ;
+ break;}
case 46:
-#line 576 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.command = yyvsp[0].command; }
- break;
+#line 600 "/Users/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;
+#line 604 "/Users/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;
+#line 606 "/Users/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;
+#line 608 "/Users/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;
+#line 610 "/Users/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;
+#line 612 "/Users/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;
+#line 614 "/Users/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;
+#line 616 "/Users/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;
+#line 618 "/Users/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;
+#line 620 "/Users/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;
+#line 622 "/Users/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;
+#line 624 "/Users/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;
+#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 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;
+#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 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;
+#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 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;
+#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 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;
+#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 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;
+#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 616 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.command = make_for_command (yyvsp[-7].word, (WORD_LIST *)NULL, yyvsp[-1].command); }
- break;
+#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 618 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.command = make_for_command (yyvsp[-7].word, (WORD_LIST *)NULL, yyvsp[-1].command); }
- break;
+#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 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;
+#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 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;
+#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 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;
+#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 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;
+#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 632 "/usr/homes/chet/src/bash/src/parse.y"
+#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);
- }
- break;
+ 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 636 "/usr/homes/chet/src/bash/src/parse.y"
+#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);
- }
- break;
+ 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 640 "/usr/homes/chet/src/bash/src/parse.y"
+#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);
- }
- break;
+ 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 644 "/usr/homes/chet/src/bash/src/parse.y"
+#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);
- }
- break;
+ 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 648 "/usr/homes/chet/src/bash/src/parse.y"
+#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);
- }
- break;
+ 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 652 "/usr/homes/chet/src/bash/src/parse.y"
+#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);
- }
- break;
+ 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 658 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.command = make_case_command (yyvsp[-4].word, (PATTERN_LIST *)NULL); }
- break;
+#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 660 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.command = make_case_command (yyvsp[-5].word, yyvsp[-2].pattern); }
- break;
+#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 662 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.command = make_case_command (yyvsp[-4].word, yyvsp[-1].pattern); }
- break;
+#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 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;
+#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 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;
+#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 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;
+#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 677 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.command = yyvsp[0].command; }
- break;
+#line 752 "/Users/chet/src/bash/src/parse.y"
+{ yyval.command = yyvsp[0].command; ;
+ break;}
case 83:
-#line 679 "/usr/homes/chet/src/bash/src/parse.y"
+#line 754 "/Users/chet/src/bash/src/parse.y"
{
COMMAND *tc;
@@ -1973,145 +1858,157 @@ case 83:
else
tc->redirects = yyvsp[0].redirect;
yyval.command = yyvsp[-1].command;
- }
- break;
+ ;
+ break;}
case 84:
-#line 710 "/usr/homes/chet/src/bash/src/parse.y"
+#line 785 "/Users/chet/src/bash/src/parse.y"
{
yyval.command = make_subshell_command (yyvsp[-1].command);
yyval.command->flags |= CMD_WANT_SUBSHELL;
- }
- break;
+ ;
+ 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;
+#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 719 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.command = make_if_command (yyvsp[-5].command, yyvsp[-3].command, yyvsp[-1].command); }
- break;
+#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 721 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.command = make_if_command (yyvsp[-4].command, yyvsp[-2].command, yyvsp[-1].command); }
- break;
+#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 726 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.command = make_group_command (yyvsp[-1].command); }
- break;
+#line 801 "/Users/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;
+#line 805 "/Users/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;
+#line 809 "/Users/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;
+#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 740 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.command = make_if_command (yyvsp[-4].command, yyvsp[-2].command, yyvsp[0].command); }
- break;
+#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 742 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.command = make_if_command (yyvsp[-3].command, yyvsp[-1].command, yyvsp[0].command); }
- break;
+#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 747 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyvsp[0].pattern->next = yyvsp[-1].pattern; yyval.pattern = yyvsp[0].pattern; }
- break;
+#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 751 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.pattern = make_pattern_list (yyvsp[-2].word_list, yyvsp[0].command); }
- break;
+#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 753 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.pattern = make_pattern_list (yyvsp[-2].word_list, (COMMAND *)NULL); }
- break;
+#line 828 "/Users/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;
+#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 757 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.pattern = make_pattern_list (yyvsp[-2].word_list, (COMMAND *)NULL); }
- break;
+#line 832 "/Users/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;
+#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 766 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.word_list = make_word_list (yyvsp[0].word, (WORD_LIST *)NULL); }
- break;
+#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 768 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.word_list = make_word_list (yyvsp[0].word, yyvsp[-2].word_list); }
- break;
+#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 777 "/usr/homes/chet/src/bash/src/parse.y"
+#line 852 "/Users/chet/src/bash/src/parse.y"
{
yyval.command = yyvsp[0].command;
if (need_here_doc)
gather_here_documents ();
- }
- break;
+ ;
+ break;}
case 106:
-#line 786 "/usr/homes/chet/src/bash/src/parse.y"
+#line 861 "/Users/chet/src/bash/src/parse.y"
{
yyval.command = yyvsp[0].command;
- }
- break;
+ ;
+ break;}
case 108:
-#line 793 "/usr/homes/chet/src/bash/src/parse.y"
+#line 868 "/Users/chet/src/bash/src/parse.y"
{
if (yyvsp[-2].command->type == cm_connection)
yyval.command = connect_async_list (yyvsp[-2].command, (COMMAND *)NULL, '&');
else
yyval.command = command_connect (yyvsp[-2].command, (COMMAND *)NULL, '&');
- }
- break;
+ ;
+ 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;
+#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 806 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, OR_OR); }
- break;
+#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 808 "/usr/homes/chet/src/bash/src/parse.y"
+#line 883 "/Users/chet/src/bash/src/parse.y"
{
if (yyvsp[-3].command->type == cm_connection)
yyval.command = connect_async_list (yyvsp[-3].command, yyvsp[0].command, '&');
else
yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, '&');
- }
- break;
+ ;
+ break;}
case 113:
-#line 815 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, ';'); }
- break;
+#line 890 "/Users/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;
+#line 892 "/Users/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;
+#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 842 "/usr/homes/chet/src/bash/src/parse.y"
+#line 920 "/Users/chet/src/bash/src/parse.y"
{
yyval.command = yyvsp[0].command;
if (need_here_doc)
gather_here_documents ();
- }
- break;
+ ;
+ break;}
case 124:
-#line 848 "/usr/homes/chet/src/bash/src/parse.y"
+#line 926 "/Users/chet/src/bash/src/parse.y"
{
if (yyvsp[-1].command->type == cm_connection)
yyval.command = connect_async_list (yyvsp[-1].command, (COMMAND *)NULL, '&');
@@ -2119,119 +2016,152 @@ case 124:
yyval.command = command_connect (yyvsp[-1].command, (COMMAND *)NULL, '&');
if (need_here_doc)
gather_here_documents ();
- }
- break;
+ ;
+ break;}
case 125:
-#line 857 "/usr/homes/chet/src/bash/src/parse.y"
+#line 935 "/Users/chet/src/bash/src/parse.y"
{
yyval.command = yyvsp[-1].command;
if (need_here_doc)
gather_here_documents ();
- }
- break;
+ ;
+ 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;
+#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 867 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, OR_OR); }
- break;
+#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 869 "/usr/homes/chet/src/bash/src/parse.y"
+#line 947 "/Users/chet/src/bash/src/parse.y"
{
if (yyvsp[-2].command->type == cm_connection)
yyval.command = connect_async_list (yyvsp[-2].command, yyvsp[0].command, '&');
else
yyval.command = command_connect (yyvsp[-2].command, yyvsp[0].command, '&');
- }
- break;
+ ;
+ break;}
case 129:
-#line 876 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.command = command_connect (yyvsp[-2].command, yyvsp[0].command, ';'); }
- break;
+#line 954 "/Users/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;
+#line 957 "/Users/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;
+#line 961 "/Users/chet/src/bash/src/parse.y"
+{ yyval.command = yyvsp[0].command; ;
+ break;}
case 132:
-#line 885 "/usr/homes/chet/src/bash/src/parse.y"
+#line 963 "/Users/chet/src/bash/src/parse.y"
{
yyvsp[0].command->flags |= CMD_INVERT_RETURN;
yyval.command = yyvsp[0].command;
- }
- break;
+ ;
+ break;}
case 133:
-#line 890 "/usr/homes/chet/src/bash/src/parse.y"
+#line 968 "/Users/chet/src/bash/src/parse.y"
{
yyvsp[0].command->flags |= yyvsp[-1].number;
yyval.command = yyvsp[0].command;
- }
- break;
+ ;
+ break;}
case 134:
-#line 895 "/usr/homes/chet/src/bash/src/parse.y"
+#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;
+ ;
+ break;}
case 135:
-#line 900 "/usr/homes/chet/src/bash/src/parse.y"
+#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;
+ ;
+ break;}
case 136:
-#line 908 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, '|'); }
- break;
+#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 910 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.command = yyvsp[0].command; }
- break;
+#line 1004 "/Users/chet/src/bash/src/parse.y"
+{ yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, '|'); ;
+ break;}
case 138:
-#line 914 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.number = CMD_TIME_PIPELINE; }
- break;
+#line 1006 "/Users/chet/src/bash/src/parse.y"
+{ yyval.command = yyvsp[0].command; ;
+ break;}
case 139:
-#line 916 "/usr/homes/chet/src/bash/src/parse.y"
-{ yyval.number = CMD_TIME_PIPELINE|CMD_TIME_POSIX; }
- break;
+#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;}
}
-
-#line 705 "/usr/local/share/bison/bison.simple"
-
+ /* the action file gets copied in in place of this dollarsign */
+#line 543 "/usr/share/bison.simple"
yyvsp -= yylen;
yyssp -= yylen;
-#if YYLSP_NEEDED
+#ifdef YYLSP_NEEDED
yylsp -= yylen;
#endif
-#if YYDEBUG
+#if YYDEBUG != 0
if (yydebug)
{
- short *yyssp1 = yyss - 1;
- YYFPRINTF (stderr, "state stack now");
- while (yyssp1 != yyssp)
- YYFPRINTF (stderr, " %d", *++yyssp1);
- YYFPRINTF (stderr, "\n");
+ short *ssp1 = yyss - 1;
+ fprintf (stderr, "state stack now");
+ while (ssp1 != yyssp)
+ fprintf (stderr, " %d", *++ssp1);
+ fprintf (stderr, "\n");
}
#endif
*++yyvsp = yyval;
-#if YYLSP_NEEDED
- *++yylsp = yyloc;
+
+#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. */
+ /* 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];
@@ -2243,13 +2173,10 @@ case 139:
goto yynewstate;
+yyerrlab: /* here on detecting error */
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
-yyerrlab:
- /* If not already recovering from an error, report this error. */
- if (!yyerrstatus)
+ if (! yyerrstatus)
+ /* If not already recovering from an error, report this error. */
{
++yynerrs;
@@ -2258,121 +2185,102 @@ yyerrlab:
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)
+ 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)
{
- char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
- yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
+ strcpy(msg, "parse error");
- if (yycount < 5)
+ if (count < 5)
{
- yycount = 0;
- for (yyx = yyn < 0 ? -yyn : 0;
- yyx < (int) (sizeof (yytname) / sizeof (char *));
- yyx++)
- if (yycheck[yyx + yyn] == yyx)
+ count = 0;
+ for (x = (yyn < 0 ? -yyn : 0);
+ x < (sizeof(yytname) / sizeof(char *)); x++)
+ if (yycheck[x + yyn] == x)
{
- const char *yyq = ! yycount ? ", expecting " : " or ";
- yyp = yystpcpy (yyp, yyq);
- yyp = yystpcpy (yyp, yytname[yyx]);
- yycount++;
+ strcat(msg, count == 0 ? ", expecting `" : " or `");
+ strcat(msg, yytname[x]);
+ strcat(msg, "'");
+ count++;
}
}
- yyerror (yymsg);
- YYSTACK_FREE (yymsg);
+ yyerror(msg);
+ free(msg);
}
else
- yyerror ("parse error; also virtual memory exhausted");
+ yyerror ("parse error; also virtual memory exceeded");
}
else
-#endif /* defined (YYERROR_VERBOSE) */
- yyerror ("parse error");
+#endif /* YYERROR_VERBOSE */
+ yyerror("parse error");
}
- goto yyerrlab1;
+ goto yyerrlab1;
+yyerrlab1: /* here on error raised explicitly by an action */
-/*--------------------------------------------------.
-| 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. */
+ /* 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]));
+
+#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. */
+ /* 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 -- 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;
+ 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 */
-/*---------------------------------------------------------------.
-| yyerrpop -- pop the current state because it cannot handle the |
-| error token |
-`---------------------------------------------------------------*/
-yyerrpop:
- if (yyssp == yyss)
- YYABORT;
+ if (yyssp == yyss) YYABORT;
yyvsp--;
yystate = *--yyssp;
-#if YYLSP_NEEDED
+#ifdef YYLSP_NEEDED
yylsp--;
#endif
-#if YYDEBUG
+#if YYDEBUG != 0
if (yydebug)
{
- short *yyssp1 = yyss - 1;
- YYFPRINTF (stderr, "Error: state stack now");
- while (yyssp1 != yyssp)
- YYFPRINTF (stderr, " %d", *++yyssp1);
- YYFPRINTF (stderr, "\n");
+ short *ssp1 = yyss - 1;
+ fprintf (stderr, "Error: state stack now");
+ while (ssp1 != yyssp)
+ fprintf (stderr, " %d", *++ssp1);
+ fprintf (stderr, "\n");
}
#endif
-/*--------------.
-| yyerrhandle. |
-`--------------*/
yyerrhandle:
+
yyn = yypact[yystate];
if (yyn == YYFLAG)
goto yyerrdefault;
@@ -2395,67 +2303,77 @@ yyerrhandle:
if (yyn == YYFINAL)
YYACCEPT;
- YYDPRINTF ((stderr, "Shifting error token, "));
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Shifting error token, ");
+#endif
*++yyvsp = yylval;
-#if YYLSP_NEEDED
+#ifdef YYLSP_NEEDED
*++yylsp = yylloc;
#endif
yystate = yyn;
goto yynewstate;
+ yyacceptlab:
+ /* YYACCEPT comes here. */
+ if (yyfree_stacks)
+ {
+ free (yyss);
+ free (yyvs);
+#ifdef YYLSP_NEEDED
+ free (yyls);
+#endif
+ }
+ return 0;
-/*-------------------------------------.
-| 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);
+ yyabortlab:
+ /* YYABORT comes here. */
+ if (yyfree_stacks)
+ {
+ free (yyss);
+ free (yyvs);
+#ifdef YYLSP_NEEDED
+ free (yyls);
#endif
- return yyresult;
+ }
+ return 1;
}
-#line 918 "/usr/homes/chet/src/bash/src/parse.y"
+#line 1014 "/Users/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 */
+#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
amount to grow them by. */
#define TOKEN_DEFAULT_INITIAL_SIZE 496
#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;
@@ -2469,13 +2387,6 @@ static int token_before_that;
/* The token read prior to token_before_that. */
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;
@@ -2920,10 +2831,6 @@ restore_token_state (ts)
#if defined (ALIAS) || defined (DPAREN_ARITHMETIC)
-#if !defined (ALIAS)
-typedef void *alias_t;
-#endif
-
#define END_OF_ALIAS 0
/*
@@ -2983,7 +2890,9 @@ push_string (s, expand, ap)
shell_input_line_size = strlen (s);
shell_input_line_index = 0;
shell_input_line_terminator = '\0';
- parser_state &= ~PST_ALEXPNEXT;
+#if 0
+ parser_state &= ~PST_ALEXPNEXT; /* XXX */
+#endif
set_line_mbstate ();
}
@@ -3044,6 +2953,14 @@ free_string_list ()
#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
is non-zero, we remove unquoted \<newline> pairs. This is used by
@@ -3057,9 +2974,9 @@ read_a_line (remove_quoted_newline)
int indx = 0, c, peekc, pass_next;
#if defined (READLINE)
- if (interactive && bash_input.type != st_string && no_line_editing)
+ if (no_line_editing && SHOULD_PROMPT ())
#else
- if (interactive && bash_input.type != st_string)
+ if (SHOULD_PROMPT ())
#endif
print_prompt ();
@@ -3108,7 +3025,10 @@ read_a_line (remove_quoted_newline)
{
peekc = yy_getc ();
if (peekc == '\n')
- continue; /* Make the unquoted \<newline> pair disappear. */
+ {
+ line_number++;
+ continue; /* Make the unquoted \<newline> pair disappear. */
+ }
else
{
yy_ungetc (peekc);
@@ -3137,7 +3057,8 @@ read_secondary_line (remove_quoted_newline)
int remove_quoted_newline;
{
prompt_string_pointer = &ps2_prompt;
- prompt_again ();
+ if (SHOULD_PROMPT())
+ prompt_again ();
return (read_a_line (remove_quoted_newline));
}
@@ -3299,20 +3220,27 @@ shell_getc (remove_quoted_newline)
i = 0;
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
of a trap, when the trap is called from flush_child. This call
had better not cause jobs to disappear from the job table in
that case, or we will have big trouble. */
- notify_and_cleanup ();
+ notify_and_cleanup ();
#else /* !JOB_CONTROL */
- cleanup_dead_jobs ();
+ cleanup_dead_jobs ();
#endif /* !JOB_CONTROL */
+ }
#if defined (READLINE)
- if (interactive && bash_input.type != st_string && no_line_editing)
+ if (no_line_editing && SHOULD_PROMPT())
#else
- if (interactive && bash_input.type != st_string)
+ if (SHOULD_PROMPT())
#endif
print_prompt ();
@@ -3432,7 +3360,8 @@ shell_getc (remove_quoted_newline)
{
shell_input_line_size = 0;
prompt_string_pointer = &current_prompt_string;
- prompt_again ();
+ if (SHOULD_PROMPT ())
+ prompt_again ();
goto restart_read;
}
@@ -3458,7 +3387,8 @@ shell_getc (remove_quoted_newline)
if MBTEST(uc == '\\' && remove_quoted_newline && shell_input_line[shell_input_line_index] == '\n')
{
- prompt_again ();
+ if (SHOULD_PROMPT ())
+ prompt_again ();
line_number++;
goto restart_read;
}
@@ -3471,19 +3401,10 @@ shell_getc (remove_quoted_newline)
to. */
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 = ' ';
- }
+ pop_string ();
+ uc = shell_input_line[shell_input_line_index];
+ if (uc)
+ shell_input_line_index++;
}
#endif /* ALIAS || DPAREN_ARITHMETIC */
@@ -3537,25 +3458,17 @@ void
execute_prompt_command (command)
char *command;
{
- sh_builtin_func_t *temp_last, *temp_this;
char *last_lastarg;
- int temp_exit_value, temp_eof_encountered;
+ sh_parser_state_t ps;
- temp_last = last_shell_builtin;
- temp_this = this_shell_builtin;
- temp_exit_value = last_command_exit_value;
- temp_eof_encountered = eof_encountered;
+ save_parser_state (&ps);
last_lastarg = get_string_value ("_");
if (last_lastarg)
last_lastarg = savestring (last_lastarg);
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;
-
+ restore_parser_state (&ps);
bind_variable ("_", last_lastarg);
FREE (last_lastarg);
@@ -3595,7 +3508,7 @@ yylex ()
/* 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)
+ if (token_to_read == 0 && SHOULD_PROMPT ())
prompt_again ();
}
@@ -3629,8 +3542,8 @@ static int open_brace_count;
(((token) == ASSIGNMENT_WORD) || \
((token) != SEMI_SEMI && reserved_word_acceptable(token)))
-#define assignment_acceptable(token) command_token_position(token) && \
- ((parser_state & PST_CASEPAT) == 0)
+#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
value if it is. */
@@ -3645,7 +3558,7 @@ static int open_brace_count;
{ \
if ((parser_state & PST_CASEPAT) && (word_token_alist[i].token != ESAC)) \
break; \
- if (word_token_alist[i].token == TIME) \
+ if (word_token_alist[i].token == TIME && time_command_acceptable () == 0) \
break; \
if (word_token_alist[i].token == ESAC) \
parser_state &= ~(PST_CASEPAT|PST_CASESTMT); \
@@ -3678,6 +3591,23 @@ static int open_brace_count;
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)
char *tokstr;
@@ -3694,7 +3624,12 @@ alias_expand_token (tokstr)
if (ap && (ap->flags & AL_BEINGEXPANDED))
return (NO_EXPANSION);
- expanded = ap ? savestring (ap->value) : (char *)NULL;
+ /* 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)
{
push_string (expanded, ap->flags & AL_EXPANDNEXT, ap);
@@ -3838,10 +3773,12 @@ special_case_tokens (tokstr)
return (TIMEOPT);
#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) /* [[ */
if ((parser_state & PST_CONDEXPR) && tokstr[0] == ']' && tokstr[1] == ']' && tokstr[2] == '\0')
@@ -4086,6 +4023,7 @@ read_token (command)
*/
#define P_FIRSTCLOSE 0x01
#define P_ALLOWESC 0x02
+#define P_DQUOTE 0x04
static char matched_pair_error;
static char *
@@ -4097,11 +4035,14 @@ parse_matched_pair (qc, open, close, lenp, flags)
int count, ch, was_dollar;
int pass_next_character, nestlen, ttranslen, start_lineno;
char *ret, *nestret, *ttrans;
- int retind, retsize;
+ 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;
@@ -4112,14 +4053,13 @@ parse_matched_pair (qc, open, close, lenp, flags)
if (ch == EOF)
{
free (ret);
- parser_error (start_lineno, "unexpected EOF while looking for matching `%c'", close);
+ parser_error (start_lineno, _("unexpected EOF while looking for matching `%c'"), close);
EOF_Reached = 1; /* XXX */
return (&matched_pair_error);
}
/* Possible reprompting. */
- if (ch == '\n' && interactive &&
- (bash_input.type == st_stdin || bash_input.type == st_stream))
+ if (ch == '\n' && SHOULD_PROMPT ())
prompt_again ();
if (pass_next_character) /* last char was backslash */
@@ -4175,16 +4115,16 @@ parse_matched_pair (qc, open, close, lenp, flags)
/* '', ``, or "" inside $(...) or other grouping construct. */
push_delimiter (dstack, ch);
if MBTEST(was_dollar && ch == '\'') /* $'...' inside group */
- nestret = parse_matched_pair (ch, ch, ch, &nestlen, P_ALLOWESC);
+ nestret = parse_matched_pair (ch, ch, ch, &nestlen, P_ALLOWESC|rflags);
else
- nestret = parse_matched_pair (ch, ch, ch, &nestlen, 0);
+ nestret = parse_matched_pair (ch, ch, ch, &nestlen, rflags);
pop_delimiter (dstack);
if (nestret == &matched_pair_error)
{
free (ret);
return &matched_pair_error;
}
- if MBTEST(was_dollar && ch == '\'')
+ if MBTEST(was_dollar && ch == '\'' && (extended_quote || (rflags & P_DQUOTE) == 0))
{
/* Translate $'...' here. */
ttrans = ansiexpand (nestret, 0, nestlen - 1, &ttranslen);
@@ -4194,7 +4134,7 @@ parse_matched_pair (qc, open, close, lenp, flags)
nestlen = strlen (nestret);
retind -= 2; /* back up before the $' */
}
- else if MBTEST(was_dollar && ch == '"')
+ else if MBTEST(was_dollar && ch == '"' && (extended_quote || (rflags & P_DQUOTE) == 0))
{
/* Locale expand $"..." here. */
ttrans = localeexpand (nestret, 0, nestlen - 1, start_lineno, &ttranslen);
@@ -4223,7 +4163,7 @@ parse_matched_pair (qc, open, close, lenp, flags)
/* XXX - sh and ksh93 don't do this - XXX */
else if MBTEST(open == '"' && ch == '`')
{
- nestret = parse_matched_pair (0, '`', '`', &nestlen, 0);
+ nestret = parse_matched_pair (0, '`', '`', &nestlen, rflags);
if (nestret == &matched_pair_error)
{
free (ret);
@@ -4243,11 +4183,11 @@ parse_matched_pair (qc, open, close, lenp, flags)
if (open == ch) /* undo previous increment */
count--;
if (ch == '(') /* ) */
- nestret = parse_matched_pair (0, '(', ')', &nestlen, 0);
+ nestret = parse_matched_pair (0, '(', ')', &nestlen, rflags);
else if (ch == '{') /* } */
- nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE);
+ nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|rflags);
else if (ch == '[') /* ] */
- nestret = parse_matched_pair (0, '[', ']', &nestlen, 0);
+ nestret = parse_matched_pair (0, '[', ']', &nestlen, rflags);
if (nestret == &matched_pair_error)
{
free (ret);
@@ -4287,19 +4227,12 @@ parse_dparen (c)
if (last_read_token == FOR)
{
arith_for_lineno = line_number;
- cmdtyp = parse_arith_cmd (&wval);
+ cmdtyp = parse_arith_cmd (&wval, 0);
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);
+ wd = make_word (wval);
yylval.word_list = make_word_list (wd, (WORD_LIST *)NULL);
free (wval);
- free (wv2);
return (ARITH_FOR_EXPRS);
}
else
@@ -4311,11 +4244,19 @@ parse_dparen (c)
if (reserved_word_acceptable (last_read_token))
{
sline = line_number;
- cmdtyp = parse_arith_cmd (&wval);
+#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 */
return (ARITH_CMD);
@@ -4341,8 +4282,9 @@ parse_dparen (c)
allocated buffer and make *ep point to that buffer. Return -1 on an
error, for example EOF. */
static int
-parse_arith_cmd (ep)
+parse_arith_cmd (ep, adddq)
char **ep;
+ int adddq;
{
int exp_lineno, rval, c;
char *ttok, *tokstr;
@@ -4361,20 +4303,28 @@ parse_arith_cmd (ep)
tokstr = (char *)xmalloc (ttoklen + 4);
- /* (( ... )) -> "..." */
- tokstr[0] = (rval == 1) ? '"' : '(';
- strncpy (tokstr + 1, ttok, ttoklen - 1); /* don't copy the final `)' */
- if (rval == 1)
+ /* 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
+ 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);
return rval;
@@ -4388,16 +4338,16 @@ cond_error ()
char *etext;
if (EOF_Reached && cond_token != COND_ERROR) /* [[ */
- parser_error (cond_lineno, "unexpected EOF while looking for `]]'");
+ 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);
+ 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");
+ parser_error (cond_lineno, _("syntax error in conditional expression"));
}
}
@@ -4440,7 +4390,7 @@ cond_skip_newlines ()
{
while ((cond_token = read_token (READ)) == '\n')
{
- if (interactive && (bash_input.type == st_stdin || bash_input.type == st_stream))
+ if (SHOULD_PROMPT ())
prompt_again ();
}
return (cond_token);
@@ -4475,11 +4425,11 @@ cond_term ()
dispose_cond_node (term); /* ( */
if (etext = error_token_from_token (cond_token))
{
- parser_error (lineno, "unexpected token `%s', expected `)'", etext);
+ parser_error (lineno, _("unexpected token `%s', expected `)'"), etext);
free (etext);
}
else
- parser_error (lineno, "expected `)'");
+ parser_error (lineno, _("expected `)'"));
COND_RETURN_ERROR ();
}
term = make_cond_node (COND_EXPR, (WORD_DESC *)NULL, term, (COND_COM *)NULL);
@@ -4507,11 +4457,11 @@ cond_term ()
dispose_word (op);
if (etext = error_token_from_token (tok))
{
- parser_error (line_number, "unexpected argument `%s' to conditional unary operator", etext);
+ 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");
+ parser_error (line_number, _("unexpected argument to conditional unary operator"));
COND_RETURN_ERROR ();
}
@@ -4526,6 +4476,10 @@ cond_term ()
tok = read_token (READ);
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); /* ( */
/* There should be a check before blindly accepting the `)' that we have
@@ -4544,11 +4498,11 @@ cond_term ()
{
if (etext = error_token_from_token (tok))
{
- parser_error (line_number, "unexpected token `%s', conditional binary operator expected", etext);
+ parser_error (line_number, _("unexpected token `%s', conditional binary operator expected"), etext);
free (etext);
}
else
- parser_error (line_number, "conditional binary operator expected");
+ parser_error (line_number, _("conditional binary operator expected"));
dispose_cond_node (tleft);
COND_RETURN_ERROR ();
}
@@ -4564,11 +4518,11 @@ cond_term ()
{
if (etext = error_token_from_token (tok))
{
- parser_error (line_number, "unexpected argument `%s' to conditional binary operator", etext);
+ 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");
+ parser_error (line_number, _("unexpected argument to conditional binary operator"));
dispose_cond_node (tleft);
dispose_word (op);
COND_RETURN_ERROR ();
@@ -4579,14 +4533,14 @@ cond_term ()
else
{
if (tok < 256)
- parser_error (line_number, "unexpected token `%c' in conditional command", tok);
+ 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);
+ 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);
+ parser_error (line_number, _("unexpected token %d in conditional command"), tok);
COND_RETURN_ERROR ();
}
return (term);
@@ -4617,7 +4571,7 @@ token_is_assignment (t, i)
c = t[i]; c1 = t[i+1];
t[i] = '='; t[i+1] = '\0';
- r = assignment (t);
+ r = assignment (t, (parser_state & PST_COMPASSIGN) != 0);
t[i] = c; t[i+1] = c1;
return r;
}
@@ -4941,8 +4895,7 @@ read_token_word (character)
TOKEN_DEFAULT_GROW_SIZE);
next_character:
- if (character == '\n' && interactive &&
- (bash_input.type == st_stdin || bash_input.type == st_stream))
+ if (character == '\n' && SHOULD_PROMPT ())
prompt_again ();
/* We want to remove quoted newlines (that is, a \<newline> pair)
@@ -5011,11 +4964,11 @@ got_token:
/* A word is an assignment if it appears at the beginning of a
simple command, or after another assignment word. This is
context-dependent, so it cannot be handled in the grammar. */
- if (assignment (token))
+ 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))
+ if (assignment_acceptable (last_read_token) || (parser_state & PST_COMPASSIGN) != 0)
the_word->flags |= W_NOSPLIT;
}
@@ -5024,10 +4977,19 @@ got_token:
result = ((the_word->flags & (W_ASSIGNMENT|W_NOSPLIT)) == (W_ASSIGNMENT|W_NOSPLIT))
? ASSIGNMENT_WORD : WORD;
- if (last_read_token == FUNCTION)
+ 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;
}
return (result);
@@ -5185,7 +5147,7 @@ prompt_again ()
{
char *temp_prompt;
- if (!interactive) /* XXX */
+ if (interactive == 0 || expanding_alias()) /* XXX */
return;
ps1_prompt = get_string_value ("PS1");
@@ -5378,7 +5340,11 @@ decode_prompt_string (string)
else if (c == 'A')
n = strftime (timebuf, sizeof (timebuf), "%H:%M", tm);
- timebuf[sizeof(timebuf) - 1] = '\0';
+ if (n == 0)
+ timebuf[0] = '\0';
+ else
+ timebuf[sizeof(timebuf) - 1] = '\0';
+
temp = savestring (timebuf);
goto add_string;
@@ -5403,7 +5369,11 @@ decode_prompt_string (string)
n = strftime (timebuf, sizeof (timebuf), timefmt, tm);
free (timefmt);
- timebuf[sizeof(timebuf) - 1] = '\0';
+ 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
second argument of Q_DOUBLE_QUOTES if we use this
@@ -5438,7 +5408,7 @@ decode_prompt_string (string)
case 'W':
{
/* Use the value of PWD because it is much more efficient. */
- char t_string[PATH_MAX];
+ char t_string[PATH_MAX], *t;
int tlen;
temp = get_string_value ("PWD");
@@ -5462,7 +5432,8 @@ decode_prompt_string (string)
#define ROOT_PATH(x) ((x)[0] == '/' && (x)[1] == 0)
#define DOUBLE_SLASH_ROOT(x) ((x)[0] == '/' && (x)[1] == '/' && (x)[2] == 0)
- if (c == 'W')
+ /* 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)
{
@@ -5541,6 +5512,11 @@ decode_prompt_string (string)
#if defined (READLINE)
case '[':
case ']':
+ if (no_line_editing)
+ {
+ string++;
+ break;
+ }
temp = (char *)xmalloc (3);
temp[0] = '\001';
temp[1] = (c == '[') ? RL_PROMPT_START_IGNORE : RL_PROMPT_END_IGNORE;
@@ -5760,7 +5736,7 @@ report_syntax_error (message)
parser's complaining about by looking at current_token. */
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);
+ parser_error (line_number, _("syntax error near unexpected token `%s'"), msg);
free (msg);
if (interactive == 0)
@@ -5778,7 +5754,7 @@ report_syntax_error (message)
msg = error_token_from_text ();
if (msg)
{
- parser_error (line_number, "syntax error near `%s'", msg);
+ parser_error (line_number, _("syntax error near `%s'"), msg);
free (msg);
}
@@ -5788,7 +5764,7 @@ report_syntax_error (message)
}
else
{
- msg = EOF_Reached ? "syntax error: unexpected end of file" : "syntax error";
+ 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
only for error reporting. Other mechanisms are used to
@@ -5850,7 +5826,7 @@ handle_eof_input_unit ()
{
if (eof_encountered < eof_encountered_limit)
{
- fprintf (stderr, "Use \"%s\" to leave the shell.\n",
+ fprintf (stderr, _("Use \"%s\" to leave the shell.\n"),
login_shell ? "logout" : "exit");
eof_encountered++;
/* Reset the parsing state. */
@@ -5887,8 +5863,9 @@ static WORD_LIST parse_string_error;
/* Take a string and run it through the shell parser, returning the
resultant word list. Used by compound array assignment. */
WORD_LIST *
-parse_string_to_word_list (s, whom)
+parse_string_to_word_list (s, flags, whom)
char *s;
+ int flags;
const char *whom;
{
WORD_LIST *wl;
@@ -5920,6 +5897,10 @@ parse_string_to_word_list (s, whom)
with_input_from_string (s, whom);
wl = (WORD_LIST *)NULL;
+
+ if (flags & 1)
+ parser_state |= PST_COMPASSIGN;
+
while ((tok = read_token (READ)) != yacc_EOF)
{
if (tok == '\n' && *bash_input.location.string == '\0')
@@ -5957,6 +5938,9 @@ parse_string_to_word_list (s, whom)
current_command_line_count = orig_line_count;
shell_input_line_terminator = orig_input_terminator;
+ if (flags & 1)
+ parser_state &= ~PST_COMPASSIGN;
+
if (wl == &parse_string_error)
{
last_command_exit_value = EXECUTION_FAILURE;
@@ -5987,15 +5971,21 @@ parse_compound_assignment (retlenp)
token_buffer_size = 0;
wl = (WORD_LIST *)NULL; /* ( */
+ parser_state |= PST_COMPASSIGN;
+
while ((tok = read_token (READ)) != ')')
{
if (tok == '\n') /* Allow newlines in compound assignments */
- continue;
+ {
+ 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 `)'");
+ parser_error (orig_line_number, _("unexpected EOF while looking for matching `)'"));
else
yyerror ((char *)NULL); /* does the right thing */
if (wl)
@@ -6010,6 +6000,8 @@ parse_compound_assignment (retlenp)
token = saved_token;
token_buffer_size = orig_token_size;
+ parser_state &= ~PST_COMPASSIGN;
+
if (wl == &parse_string_error)
{
last_command_exit_value = EXECUTION_FAILURE;
@@ -6037,6 +6029,105 @@ parse_compound_assignment (retlenp)
/************************************************
* *
+ * 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 *
* *
************************************************/
@@ -6045,7 +6136,7 @@ parse_compound_assignment (retlenp)
static void
set_line_mbstate ()
{
- int i, previ, len;
+ int i, previ, len, c;
mbstate_t mbs, prevs;
size_t mbclen;
@@ -6060,7 +6151,8 @@ set_line_mbstate ()
{
mbs = prevs;
- if (shell_input_line[i] == EOF)
+ c = shell_input_line[i];
+ if (c == EOF)
{
int j;
for (j = i; j < len; j++)
@@ -6084,7 +6176,11 @@ set_line_mbstate ()
}
else
{
- /* mbrlen doesn't return any other values */
+ /* 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;
}
shell_input_line_property[i] = mbclen;
diff --git a/y.tab.h b/y.tab.h
index 565b0399..35272273 100644
--- a/y.tab.h
+++ b/y.tab.h
@@ -1,7 +1,3 @@
-#ifndef BISON_Y_TAB_H
-# define BISON_Y_TAB_H
-
-#ifndef YYSTYPE
typedef union {
WORD_DESC *word; /* the word that we read. */
int number; /* the number that we read. */
@@ -10,51 +6,47 @@ typedef union {
REDIRECT *redirect;
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
+} 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;
-
-#endif /* not BISON_Y_TAB_H */