mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-27 23:53:18 +02:00
commit bash-20060316 snapshot
This commit is contained in:
@@ -1,261 +1,3 @@
|
||||
This document details the changes between this version, bash-3.2-release,
|
||||
and the previous version, bash-3.2-beta.
|
||||
|
||||
1. Changes to Bash
|
||||
|
||||
a. Fixed a bug that caused the temporary environment passed to a command to
|
||||
affect the shell's environment under certain circumstances.
|
||||
|
||||
b. Fixed a bug in the printf builtin that caused the %q format specifier to
|
||||
ignore empty string arguments.
|
||||
|
||||
c. Improved multibyte character environment detection at configuration time.
|
||||
|
||||
d. Fixed a bug in the read builtin that left spurious escape characters in the
|
||||
input after processing backslashes when assigning to an array variable.
|
||||
|
||||
2. Changes to Readline
|
||||
|
||||
a. Fixed a redisplay bug that occurred in multibyte-capable locales when the
|
||||
prompt was one character longer than the screen width.
|
||||
------------------------------------------------------------------------------
|
||||
This document details the changes between this version, bash-3.2-beta,
|
||||
and the previous version, bash-3.2-alpha.
|
||||
|
||||
1. Changes to Bash
|
||||
|
||||
a. Changed the lexical analyzer to treat locale-specific blank characters as
|
||||
white space.
|
||||
|
||||
b. Fixed a bug in command printing to avoid confusion between redirections and
|
||||
process substitution.
|
||||
|
||||
c. Fixed problems with cross-compiling originating from inherited environment
|
||||
variables.
|
||||
|
||||
d. Added write error reporting to printf builtin.
|
||||
|
||||
e. Fixed a bug in the variable expansion code that could cause a core dump in
|
||||
a multi-byte locale.
|
||||
|
||||
f. Fixed a bug that caused substring expansion of a null string to return
|
||||
incorrect results.
|
||||
|
||||
g. BASH_COMMAND now retains its previous value while executing commands as the
|
||||
result of a trap, as the documentation states.
|
||||
|
||||
2. Changes to Readline
|
||||
|
||||
a. Fixed a bug with prompt redisplay in a multi-byte locale to avoid redrawing
|
||||
the prompt and input line multiple times.
|
||||
|
||||
b. Fixed history expansion to not be confused by here-string redirection.
|
||||
|
||||
c. Readline no longer treats read errors by converting them to newlines, as
|
||||
it does with EOF. This caused partial lines to be returned from readline().
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
This document details the changes between this version, bash-3.2-alpha,
|
||||
and the previous version, bash-3.1-release.
|
||||
|
||||
1. Changes to Bash
|
||||
|
||||
a. Fixed a source bug that caused the minimal configuration to not compile.
|
||||
|
||||
b. Fixed memory leaks in error handling for the `read' builtin.
|
||||
|
||||
c. Changed the [[ and (( compound commands to set PIPESTATUS with their exit
|
||||
status.
|
||||
|
||||
d. Fixed some parsing problems with compound array assignments.
|
||||
|
||||
e. Added additional configuration changes for: NetBSD (incomplete multibyte
|
||||
character support)
|
||||
|
||||
f. Fixed two bugs with local array variable creation when shadowing a variable
|
||||
of the same name from a previous context.
|
||||
|
||||
g. Fixed the `read' builtin to restore the correct set of completion functions
|
||||
if a timeout occurs.
|
||||
|
||||
h. Added code to defer the initialization of HISTSIZE (and its stifling of the
|
||||
history list) until the history file is loaded, allowing a startup file to
|
||||
override the default value.
|
||||
|
||||
i. Tightened up the arithmetic expression parsing to produce better error
|
||||
messages when presented with invalid operators.
|
||||
|
||||
j. Fixed the cross-compilation support to build the signal list at shell
|
||||
invocation rather than compile time if cross-compiling.
|
||||
|
||||
k. Fixed multibyte support for non-gcc compilers (or compilers that do not
|
||||
allow automatic array variable sizing based on a non-constant value).
|
||||
|
||||
l. Several fixes to the code that manages the list of terminated jobs and
|
||||
their exit statuses, and the list of active and recently-terminated jobs
|
||||
to avoid pid aliasing/wraparound and allocation errors.
|
||||
|
||||
m. Fixed a problem that allowed scripts to die due to SIGINT while waiting
|
||||
for children, even when started in the background or otherwise ignoring
|
||||
SIGINT.
|
||||
|
||||
n. Fixed a bug that caused shells invoked as -/bin/bash from not being
|
||||
recognized as login shells.
|
||||
|
||||
o. Fixed a problem that caused shells in the background to give the terminal
|
||||
to a process group other than the foreground shell process group.
|
||||
|
||||
p. Fixed a problem with extracting the `varname' in ${#varname}.
|
||||
|
||||
q. Fixed the code that handles SIGQUIT to not exit immediately -- thereby
|
||||
calling functions that may not be called in a signal handler context --
|
||||
but set a flag and exit afterward (like SIGINT).
|
||||
|
||||
r. Changed the brace expansion code to skip over braces that don't begin a
|
||||
valid matched brace expansion construct.
|
||||
|
||||
s. Fixed `typeset' and `declare' to not require that their shell function
|
||||
operands to be valid shell identifiers.
|
||||
|
||||
t. Changed `test' to use access(2) with a temporary uid/euid swap when testing
|
||||
file attributes and running setuid, and access(2) in most other cases.
|
||||
|
||||
u. Changed completion code to not attempt command name completion on a line
|
||||
consisting solely of whitespace when no_empty_command_completion is set.
|
||||
|
||||
v. The `hash' builtin now prints nothing in posix mode when the hash table is
|
||||
empty, and prints a message to that effect to stdout instead of stderr
|
||||
when not in posix mode.
|
||||
|
||||
w. Fixed a bug in the extended pattern matching code that caused it to fail to
|
||||
match periods with certain patterns.
|
||||
|
||||
x. Fixed a bug that caused the shell to dump core when performing filename
|
||||
generation in directories with thousands of files.
|
||||
|
||||
y. Returned to the original Bourne shell rules for parsing ``: no recursive
|
||||
parsing of embedded quoted strings or ${...} constructs.
|
||||
|
||||
z. The inheritence of the DEBUG, RETURN, and ERR traps is now dependent only
|
||||
on the settings of the `functrace' and `errtrace' shell options, rather
|
||||
than whether or not the shell is in debugging mode.
|
||||
|
||||
aa. Fixed a problem with $HOME being converted to ~ in the expansion of
|
||||
members of the DIRSTACK array.
|
||||
|
||||
bb. Fixed a problem with quoted arguments to arithmetic expansions in certain
|
||||
constructs.
|
||||
|
||||
cc. The command word completion code now no longer returns matching directories
|
||||
while searching $PATH.
|
||||
|
||||
dd. Fixed a bug with zero-padding and precision handling in snprintf()
|
||||
replacement.
|
||||
|
||||
ee. Fixed a bug that caused the command substitution code not to take embedded
|
||||
shell comments into account.
|
||||
|
||||
ff. Fixed a bug that caused $((...);(...)) to be misinterpreted as an
|
||||
arithmetic substitution.
|
||||
|
||||
gg. Fixed a bug in the prompt expansion code that inappropriately added a
|
||||
\001 before a \002 under certain circumstances.
|
||||
|
||||
hh. Fixed a bug that caused `unset LANG' to not properly reset the locale
|
||||
(previous versions would set the locale back to what it was when bash
|
||||
was started rather than the system's "native" locale).
|
||||
|
||||
ii. Fixed a bug that could cause file descriptors > 10 to not be closed even
|
||||
when closed explicitly by a script.
|
||||
|
||||
jj. Fixed a bug that caused single quotes to be stripped from ANSI-C quoting
|
||||
inside double-quoted command substitutions.
|
||||
|
||||
kk. Fixed a bug that could cause core dumps when `return' was executed as the
|
||||
last element of a pipeline inside a shell function.
|
||||
|
||||
ll. Fixed a bug that caused DEBUG trap strings to overwrite commands stored in
|
||||
the jobs list.
|
||||
|
||||
2. Changes to Readline
|
||||
|
||||
a. Fixed a problem that caused segmentation faults when using readline in
|
||||
callback mode and typing consecutive DEL characters on an empty line.
|
||||
|
||||
b. Fixed several redisplay problems with multibyte characters, all having to
|
||||
do with the different code paths and variable meanings between single-byte
|
||||
and multibyte character redisplay.
|
||||
|
||||
c. Fixed a problem with key sequence translation when presented with the
|
||||
sequence \M-\C-x.
|
||||
|
||||
d. Fixed a problem that prevented the `a' command in vi mode from being
|
||||
undone and redone properly.
|
||||
|
||||
e. Fixed a problem that prevented empty inserts in vi mode from being undone
|
||||
properly.
|
||||
|
||||
f. Fixed a problem that caused readline to initialize with an incorrect idea
|
||||
of whether or not the terminal can autowrap.
|
||||
|
||||
g. Fixed output of key bindings (like bash `bind -p') to honor the setting of
|
||||
convert-meta and use \e where appropriate.
|
||||
|
||||
h. Changed the default filename completion function to call the filename
|
||||
dequoting function if the directory completion hook isn't set. This means
|
||||
that any directory completion hooks need to dequote the directory name,
|
||||
since application-specific hooks need to know how the word was quoted,
|
||||
even if no other changes are made.
|
||||
|
||||
i. Fixed a bug with creating the prompt for a non-interactive search string
|
||||
when there are non-printing characters in the primary prompt.
|
||||
|
||||
j. Fixed a bug that caused prompts with invisible characters to be redrawn
|
||||
multiple times in a multibyte locale.
|
||||
|
||||
k. Fixed a bug that could cause the key sequence scanning code to return the
|
||||
wrong function.
|
||||
|
||||
l. Fixed a problem with the callback interface that caused it to fail when
|
||||
using multi-character keyboard macros.
|
||||
|
||||
m. Fixed a bug that could cause a core dump when an edited history entry was
|
||||
re-executed under certain conditions.
|
||||
|
||||
n. Fixed a bug that caused readline to reference freed memory when attmpting
|
||||
to display a portion of the prompt.
|
||||
|
||||
3. New Features in Bash
|
||||
|
||||
a. Changed the parameter pattern replacement functions to not anchor the
|
||||
pattern at the beginning of the string if doing global replacement - that
|
||||
combination doesn't make any sense.
|
||||
|
||||
b. When running in `word expansion only' mode (--wordexp option), inhibit
|
||||
process substitution.
|
||||
|
||||
c. Loadable builtins now work on MacOS X 10.[34].
|
||||
|
||||
d. Shells running in posix mode no longer set $HOME, as POSIX requires.
|
||||
|
||||
e. The code that checks for binary files being executed as shell scripts now
|
||||
checks only for NUL rather than any non-printing character.
|
||||
|
||||
f. Quoting the string argument to the [[ command's =~ operator now forces
|
||||
string matching, as with the other pattern-matching operators.
|
||||
|
||||
4. New Features in Readline
|
||||
|
||||
a. Calling applications can now set the keyboard timeout to 0, allowing
|
||||
poll-like behavior.
|
||||
|
||||
b. The value of SYS_INPUTRC (configurable at compilation time) is now used as
|
||||
the default last-ditch startup file.
|
||||
|
||||
c. The history file reading functions now allow windows-like \r\n line
|
||||
terminators.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
This document details the changes between this version, bash-3.1-release,
|
||||
and the previous version, bash-3.1-rc2.
|
||||
|
||||
@@ -306,7 +48,7 @@ and the previous version, bash-3.1-beta1.
|
||||
|
||||
1. Changes to Bash
|
||||
|
||||
a. Fixed a bug that could cause core dumps due to accessing the current
|
||||
a. Fixed a bug that could cause core dumps due of accessing the current
|
||||
pipeline while in the middle of modifying it.
|
||||
|
||||
b. Fixed a bug that caused pathnames with backslashes still quoting characters
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
This document details the incompatibilities between this version of bash,
|
||||
bash-3.2, and the previous widely-available versions, bash-1.14 (which is
|
||||
bash-3.1, and the previous widely-available versions, bash-1.14 (which is
|
||||
still the `standard' version for a few Linux distributions) and bash-2.x.
|
||||
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
|
||||
@@ -201,9 +201,7 @@ bash-2.0 were significant.)
|
||||
Bash-2.x does not support it.
|
||||
|
||||
15. Bash no longer auto-exports the HOME, PATH, SHELL, TERM, HOSTNAME,
|
||||
HOSTTYPE, MACHTYPE, or OSTYPE variables. If they appear in the initial
|
||||
environment, the export attribute will be set, but if bash provides a
|
||||
default value, they will remain local to the current shell.
|
||||
HOSTTYPE, MACHTYPE, or OSTYPE variables.
|
||||
|
||||
16. Bash no longer initializes the FUNCNAME, GROUPS, or DIRSTACK variables
|
||||
to have special behavior if they appear in the initial environment.
|
||||
@@ -258,18 +256,3 @@ bash-2.0 were significant.)
|
||||
|
||||
30. Beginning with bash-3.1, the combination of posix mode and enabling the
|
||||
`xpg_echo' option causes echo to ignore all options, not looking for `-n'
|
||||
|
||||
31. Beginning with bash-3.2, bash follows the Bourne-shell-style (and POSIX-
|
||||
style) rules for parsing the contents of old-style backquoted command
|
||||
substitutions. Previous versions of bash attempted to recursively parse
|
||||
embedded quoted strings and shell constructs; bash-3.2 uses strict POSIX
|
||||
rules to find the closing backquote and simply passes the contents of the
|
||||
command substitution to a subshell for parsing and execution.
|
||||
|
||||
32. Beginning with bash-3.2, bash uses access(2) when executing primaries for
|
||||
the test builtin and the [[ compound command, rather than looking at the
|
||||
file permission bits obtained with stat(2). This obeys restrictions of
|
||||
the file system (e.g., read-only or noexec mounts) not available via stat.
|
||||
|
||||
33. Beginning with bash-3.1/readline-5.1, the readline key binding code obeys
|
||||
the current setting of the `convert-meta' variable.
|
||||
|
||||
+4
-1231
File diff suppressed because it is too large
Load Diff
@@ -21,10 +21,6 @@
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/file.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
main()
|
||||
|
||||
@@ -422,11 +422,9 @@ lib/sh/times.c f
|
||||
lib/sh/timeval.c f
|
||||
lib/sh/tmpfile.c f
|
||||
lib/sh/vprint.c f
|
||||
lib/sh/wcsdup.c f
|
||||
lib/sh/winsize.c f
|
||||
lib/sh/xstrchr.c f
|
||||
lib/sh/zcatfd.c f
|
||||
lib/sh/zmapfd.c f
|
||||
lib/sh/zread.c f
|
||||
lib/sh/zwrite.c f
|
||||
lib/termcap/Makefile.in f
|
||||
@@ -471,8 +469,6 @@ po/en@quot.gmo f
|
||||
po/en@boldquot.gmo f
|
||||
po/ru.po f
|
||||
po/ru.gmo f
|
||||
po/sv.po f
|
||||
po/sv.gmo f
|
||||
po/insert-header.sin f
|
||||
po/quot.sed f
|
||||
po/remove-potcdate.sin f
|
||||
@@ -484,7 +480,6 @@ CWRU/misc/errlist.c f
|
||||
CWRU/misc/hpux10-dlfcn.h f
|
||||
CWRU/PLATFORMS f
|
||||
CWRU/README f
|
||||
CWRU/audit-patch f
|
||||
CWRU/changelog f
|
||||
CWRU/sh-redir-hack f
|
||||
CWRU/mh-folder-comp f
|
||||
@@ -660,7 +655,6 @@ examples/scripts/showperm.bash f
|
||||
examples/scripts/shprompt f
|
||||
examples/scripts/spin.bash f
|
||||
examples/scripts/timeout f
|
||||
examples/scripts/timeout2 f
|
||||
examples/scripts/vtree2 f
|
||||
examples/scripts/vtree3 f
|
||||
examples/scripts/vtree3a f
|
||||
@@ -685,7 +679,6 @@ examples/misc/aliasconv.sh f
|
||||
examples/misc/aliasconv.bash f
|
||||
examples/misc/cshtobash f
|
||||
tests/README f
|
||||
tests/COPYRIGHT f
|
||||
tests/alias.tests f
|
||||
tests/alias.right f
|
||||
tests/appendop.tests f
|
||||
@@ -715,12 +708,8 @@ tests/source2.sub f
|
||||
tests/source3.sub f
|
||||
tests/source4.sub f
|
||||
tests/source5.sub f
|
||||
tests/source6.sub f
|
||||
tests/comsub.tests f
|
||||
tests/comsub.right f
|
||||
tests/cond.tests f
|
||||
tests/cond.right f
|
||||
tests/cond-regexp.sub f
|
||||
tests/cprint.tests f
|
||||
tests/cprint.right f
|
||||
tests/dbg-support.right f
|
||||
@@ -811,7 +800,6 @@ tests/new-exp2.sub f
|
||||
tests/new-exp3.sub f
|
||||
tests/new-exp4.sub f
|
||||
tests/new-exp5.sub f
|
||||
tests/new-exp6.sub f
|
||||
tests/new-exp.right f
|
||||
tests/nquote.tests f
|
||||
tests/nquote.right f
|
||||
@@ -866,7 +854,6 @@ tests/run-array f
|
||||
tests/run-array2 f
|
||||
tests/run-braces f
|
||||
tests/run-builtins f
|
||||
tests/run-comsub f
|
||||
tests/run-cond f
|
||||
tests/run-cprint f
|
||||
tests/run-dbg-support f
|
||||
|
||||
+12
-27
@@ -31,15 +31,12 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
prefix = @prefix@
|
||||
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
datarootdir = @datarootdir@
|
||||
|
||||
bindir = @bindir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
includedir = @includedir@
|
||||
datadir = @datadir@
|
||||
localedir = @localedir@
|
||||
localedir = $(datadir)/locale
|
||||
|
||||
mandir = @mandir@
|
||||
manpfx = man
|
||||
@@ -81,8 +78,6 @@ INSTALLMODE2 = -m 0555
|
||||
|
||||
TESTSCRIPT = @TESTSCRIPT@
|
||||
|
||||
DEBUGGER_START_FILE = @DEBUGGER_START_FILE@
|
||||
|
||||
#If you have purify, and want to use it, uncomment this definition or
|
||||
# run the make as `make PURIFY=purify'
|
||||
# or run configure with the --with-purify argument.
|
||||
@@ -152,11 +147,8 @@ LDFLAGS_FOR_BUILD = $(LDFLAGS)
|
||||
|
||||
INCLUDES = -I. @RL_INCLUDE@ -I$(srcdir) -I$(BASHINCDIR) -I$(LIBSRC) $(INTL_INC)
|
||||
|
||||
# Maybe add: -Wextra
|
||||
GCC_LINT_FLAGS = -O -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wno-parentheses \
|
||||
-Wcast-align -Wstrict-prototypes -Wconversion -Wformat \
|
||||
-Wformat-nonliteral -Wmissing-braces -Wuninitialized \
|
||||
-Wmissing-declarations -Winline \
|
||||
GCC_LINT_FLAGS = -Wall -Wshadow -Wpointer-arith -Wcast-qual \
|
||||
-Wcast-align -Wstrict-prototypes -Wconversion \
|
||||
-Wmissing-prototypes -Wtraditional -Wredundant-decls -pedantic
|
||||
|
||||
GCC_LINT_CFLAGS = $(BASE_CCFLAGS) $(CPPFLAGS) $(GCC_LINT_FLAGS)
|
||||
@@ -209,8 +201,7 @@ SHLIB_SOURCE = ${SH_LIBSRC}/clktck.c ${SH_LIBSRC}/getcwd.c \
|
||||
${SH_LIBSRC}/memset.c ${SH_LIBSRC}/xstrchr.c \
|
||||
${SH_LIBSRC}/zcatfd.c ${SH_LIBSRC}/shmatch.c \
|
||||
${SH_LIBSRC}/strnlen.c ${SH_LIBSRC}/winsize.c \
|
||||
${SH_LIBSRC}/eaccess.c ${SH_LIBSRC}/wcsdup.c \
|
||||
${SH_LIBSRC}/zmapfd.c
|
||||
${SH_LIBSRC}/eaccess.c
|
||||
|
||||
SHLIB_LIB = -lsh
|
||||
SHLIB_LIBNAME = libsh.a
|
||||
@@ -508,7 +499,7 @@ CREATED_SUPPORT = signames.h recho$(EXEEXT) zecho$(EXEEXT) printenv$(EXEEXT) \
|
||||
tests/recho$(EXEEXT) tests/zecho$(EXEEXT) \
|
||||
tests/printenv$(EXEEXT) mksignames$(EXEEXT) lsignames.h \
|
||||
mksyntax${EXEEXT} syntax.c $(VERSPROG) $(VERSOBJ) \
|
||||
buildversion.o mksignames.o signames.o buildsignames.o
|
||||
buildversion.o mksignames.o signames.o
|
||||
CREATED_CONFIGURE = config.h config.cache config.status config.log \
|
||||
stamp-h po/POTFILES
|
||||
CREATED_MAKEFILES = Makefile builtins/Makefile doc/Makefile \
|
||||
@@ -620,7 +611,7 @@ ${INTL_LIBRARY}: config.h ${INTL_LIBDIR}/Makefile
|
||||
@(cd ${INTL_LIBDIR} && \
|
||||
$(MAKE) $(MFLAGS) all) || exit 1
|
||||
|
||||
${LIBINTL_H}: ${INTL_DEP}
|
||||
${LIBINTL_H}: ${INTL_LIBRARY}
|
||||
|
||||
signames.o: $(SUPPORT_SRC)signames.c
|
||||
$(RM) $@
|
||||
@@ -675,6 +666,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 ; \
|
||||
@@ -688,15 +682,6 @@ stamp-h: config.status $(srcdir)/config.h.in $(srcdir)/config-top.h $(srcdir)/co
|
||||
config.status: $(srcdir)/configure
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
pathnames.h: Makefile $(srcdir)/pathnames.h.in
|
||||
@sed -e 's|@DEBUGGER_START_FILE\@|${DEBUGGER_START_FILE}|g' $(srcdir)/pathnames.h.in > pathnames.tmp
|
||||
@if test -f $@; then \
|
||||
cmp -s pathnames.tmp $@ || mv pathnames.tmp $@; \
|
||||
else \
|
||||
mv pathnames.tmp $@; \
|
||||
fi
|
||||
@${RM} pathnames.tmp
|
||||
|
||||
# comment out for distribution
|
||||
$(srcdir)/configure: $(srcdir)/configure.in $(srcdir)/aclocal.m4 $(srcdir)/config.h.in
|
||||
cd $(srcdir) && autoconf
|
||||
@@ -719,10 +704,10 @@ info dvi ps: force
|
||||
|
||||
force:
|
||||
|
||||
TAGS: $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE)
|
||||
tags: $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE)
|
||||
etags $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE)
|
||||
|
||||
tags: $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE)
|
||||
TAGS: $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE)
|
||||
ctags -x $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) > $@
|
||||
|
||||
# Targets that actually do things not part of the build
|
||||
@@ -1402,7 +1387,7 @@ 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.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
|
||||
|
||||
@@ -1,38 +1,3 @@
|
||||
This is a terse description of the new features added to bash-3.2 since
|
||||
the release of bash-3.1. As always, the manual page (doc/bash.1) is
|
||||
the place to look for complete descriptions.
|
||||
|
||||
1. New Features in Bash
|
||||
|
||||
a. Changed the parameter pattern replacement functions to not anchor the
|
||||
pattern at the beginning of the string if doing global replacement - that
|
||||
combination doesn't make any sense.
|
||||
|
||||
b. When running in `word expansion only' mode (--wordexp option), inhibit
|
||||
process substitution.
|
||||
|
||||
c. Loadable builtins now work on MacOS X 10.[34].
|
||||
|
||||
d. Shells running in posix mode no longer set $HOME, as POSIX requires.
|
||||
|
||||
e. The code that checks for binary files being executed as shell scripts now
|
||||
checks only for NUL rather than any non-printing character.
|
||||
|
||||
f. Quoting the string argument to the [[ command's =~ operator now forces
|
||||
string matching, as with the other pattern-matching operators.
|
||||
|
||||
2. New Features in Readline
|
||||
|
||||
a. Calling applications can now set the keyboard timeout to 0, allowing
|
||||
poll-like behavior.
|
||||
|
||||
b. The value of SYS_INPUTRC (configurable at compilation time) is now used as
|
||||
the default last-ditch startup file.
|
||||
|
||||
c. The history file reading functions now allow windows-like \r\n line
|
||||
terminators.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
This is a terse description of the new features added to bash-3.1 since
|
||||
the release of bash-3.0. As always, the manual page (doc/bash.1) is
|
||||
the place to look for complete descriptions.
|
||||
|
||||
@@ -261,10 +261,6 @@ Platform-Specific Configuration and Operation Notes
|
||||
I have received word that adding -L/etc/lib (or the equivalent
|
||||
-Wl,-L/etc/lib) might also be necessary, in addition to the -R/etc/lib.
|
||||
|
||||
On later versions of Solaris, it may be necessary to add -lnsl before
|
||||
-ldl; statically-linked versions of bash using libnsl are not guaranteed
|
||||
to work correctly on future versions of Solaris.
|
||||
|
||||
12. Configuring bash to build it in a cross environment. Currently only
|
||||
two native versions can be compiled this way, cygwin32 and x86 BeOS.
|
||||
For BeOS, you would configure it like this:
|
||||
@@ -335,6 +331,3 @@ Platform-Specific Configuration and Operation Notes
|
||||
17. Do NOT use bison-1.75. It builds a non-working parser. The most
|
||||
obvious effect is that constructs like "for i; do echo $i; done" don't
|
||||
loop over the positional parameters.
|
||||
|
||||
18. I have received reports that using -O2 with the MIPSpro results in a
|
||||
binary that fails in strange ways. Using -O1 seems to work.
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
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 standard by changing the behavior to match that specified
|
||||
by POSIX in areas where the Bash default differs.
|
||||
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.
|
||||
@@ -29,13 +29,13 @@ The following list is what's changed when `POSIX mode' is in effect:
|
||||
5. Reserved words appearing in a context where reserved words are
|
||||
recognized do not undergo alias expansion.
|
||||
|
||||
6. The POSIX `PS1' and `PS2' expansions of `!' to the history number
|
||||
and `!!' to `!' are enabled, and parameter expansion is performed
|
||||
on the values of `PS1' and `PS2' regardless of the setting of the
|
||||
`promptvars' option.
|
||||
6. The POSIX 1003.2 `PS1' and `PS2' expansions of `!' to the history
|
||||
number and `!!' to `!' are enabled, and parameter expansion is
|
||||
performed on the values of `PS1' and `PS2' regardless of the
|
||||
setting of the `promptvars' option.
|
||||
|
||||
7. The POSIX startup files are executed (`$ENV') rather than the
|
||||
normal Bash files.
|
||||
7. The POSIX 1003.2 startup files are executed (`$ENV') rather than
|
||||
the normal Bash files.
|
||||
|
||||
8. Tilde expansion is only performed on assignments preceding a
|
||||
command name, rather than on all assignment statements on the line.
|
||||
@@ -66,12 +66,12 @@ The following list is what's changed when `POSIX mode' is in effect:
|
||||
may not start with a digit. Declaring a function with an invalid
|
||||
name causes a fatal syntax error in non-interactive shells.
|
||||
|
||||
17. POSIX special builtins are found before shell functions during
|
||||
command lookup.
|
||||
17. POSIX 1003.2 special builtins are found before shell functions
|
||||
during command lookup.
|
||||
|
||||
18. If a POSIX special builtin returns an error status, a
|
||||
18. If a POSIX 1003.2 special builtin returns an error status, a
|
||||
non-interactive shell exits. The fatal errors are those listed in
|
||||
the POSIX standard, and include things like passing incorrect
|
||||
the POSIX.2 standard, and include things like passing incorrect
|
||||
options, redirection errors, variable assignment errors for
|
||||
assignments preceding the command name, and so on.
|
||||
|
||||
@@ -92,15 +92,15 @@ The following list is what's changed when `POSIX mode' is in effect:
|
||||
|
||||
22. Process substitution is not available.
|
||||
|
||||
23. Assignment statements preceding POSIX special builtins persist in
|
||||
the shell environment after the builtin completes.
|
||||
23. Assignment statements preceding POSIX 1003.2 special builtins
|
||||
persist in the shell environment after the builtin completes.
|
||||
|
||||
24. Assignment statements preceding shell function calls persist in the
|
||||
shell environment after the function returns, as if a POSIX
|
||||
special builtin command had been executed.
|
||||
|
||||
25. The `export' and `readonly' builtin commands display their output
|
||||
in the format required by POSIX.
|
||||
in the format required by POSIX 1003.2.
|
||||
|
||||
26. The `trap' builtin displays signal names without the leading `SIG'.
|
||||
|
||||
@@ -162,8 +162,8 @@ The following list is what's changed when `POSIX mode' is in effect:
|
||||
displayed, after escape characters are converted.
|
||||
|
||||
|
||||
There is other POSIX behavior that Bash does not implement by default
|
||||
even when in POSIX mode. Specifically:
|
||||
There is other POSIX 1003.2 behavior that Bash does not implement by
|
||||
default even when in POSIX mode. Specifically:
|
||||
|
||||
1. The `fc' builtin checks `$EDITOR' as a program to edit history
|
||||
entries if `FCEDIT' is unset, rather than defaulting directly to
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Introduction
|
||||
============
|
||||
|
||||
This is GNU Bash, version 3.2. Bash is the GNU Project's Bourne
|
||||
This is GNU Bash, version 3.1. 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
|
||||
@@ -15,9 +15,9 @@ 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 previous widely-distributed versions, bash-1.14 and
|
||||
bash-2.05b. For details, see the file COMPAT. The NEWS file tersely
|
||||
lists features that are new in this release.
|
||||
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.
|
||||
|
||||
Bash is free software, distributed under the terms of the [GNU]
|
||||
General Public License, version 2. For more information, see the
|
||||
@@ -87,4 +87,4 @@ like this shell to be the best that we can make it.
|
||||
Enjoy!
|
||||
|
||||
Chet Ramey
|
||||
chet.ramey@case.edu
|
||||
chet@po.cwru.edu
|
||||
|
||||
Vendored
+25
-62
@@ -215,7 +215,7 @@ AC_CACHE_VAL(bash_cv_sys_siglist,
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#if !HAVE_DECL_SYS_SIGLIST
|
||||
#ifndef SYS_SIGLIST_DECLARED
|
||||
extern char *sys_siglist[];
|
||||
#endif
|
||||
main()
|
||||
@@ -685,7 +685,7 @@ fi
|
||||
])
|
||||
|
||||
AC_DEFUN(BASH_FUNC_GETCWD,
|
||||
[AC_MSG_CHECKING([if getcwd() will dynamically allocate memory with 0 size])
|
||||
[AC_MSG_CHECKING([if getcwd() will dynamically allocate memory])
|
||||
AC_CACHE_VAL(bash_cv_getcwd_malloc,
|
||||
[AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
@@ -1540,22 +1540,20 @@ fi
|
||||
AC_DEFUN(BASH_CHECK_DEV_FD,
|
||||
[AC_MSG_CHECKING(whether /dev/fd is available)
|
||||
AC_CACHE_VAL(bash_cv_dev_fd,
|
||||
[bash_cv_dev_fd=""
|
||||
if test -d /dev/fd && (exec test -r /dev/fd/0 < /dev/null) ; then
|
||||
[if test -d /dev/fd && test -r /dev/fd/0 < /dev/null; then
|
||||
# check for systems like FreeBSD 5 that only provide /dev/fd/[012]
|
||||
if (exec test -r /dev/fd/3 3</dev/null) ; then
|
||||
exec 3<&0
|
||||
if test -r /dev/fd/3; then
|
||||
bash_cv_dev_fd=standard
|
||||
else
|
||||
bash_cv_dev_fd=absent
|
||||
fi
|
||||
fi
|
||||
if test -z "$bash_cv_dev_fd" ; then
|
||||
if test -d /proc/self/fd && (exec test -r /proc/self/fd/0 < /dev/null) ; then
|
||||
bash_cv_dev_fd=whacky
|
||||
else
|
||||
bash_cv_dev_fd=absent
|
||||
fi
|
||||
fi
|
||||
exec 3<&-
|
||||
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
|
||||
fi
|
||||
])
|
||||
AC_MSG_RESULT($bash_cv_dev_fd)
|
||||
if test $bash_cv_dev_fd = "standard"; then
|
||||
@@ -1570,9 +1568,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 && (exec test -r /dev/stdin < /dev/null) ; then
|
||||
[if test -d /dev/fd && test -r /dev/stdin < /dev/null; then
|
||||
bash_cv_dev_stdin=present
|
||||
elif test -d /proc/self/fd && (exec test -r /dev/stdin < /dev/null) ; 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
|
||||
@@ -1678,22 +1676,24 @@ 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(wcrtomb, AC_DEFINE(HAVE_WCRTOMB))
|
||||
AC_CHECK_FUNC(wcscoll, AC_DEFINE(HAVE_WCSCOLL))
|
||||
AC_CHECK_FUNC(wcsdup, AC_DEFINE(HAVE_WCSDUP))
|
||||
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_CHECK_FUNC(wctype, AC_DEFINE(HAVE_WCTYPE))
|
||||
|
||||
dnl checks for both mbrtowc and mbstate_t
|
||||
AC_FUNC_MBRTOWC
|
||||
if test $ac_cv_func_mbrtowc = yes; then
|
||||
AC_CACHE_CHECK([for mbstate_t], bash_cv_have_mbstate_t,
|
||||
[AC_TRY_COMPILE([
|
||||
#include <wchar.h>], [
|
||||
mbstate_t ps;
|
||||
mbstate_t *psp;
|
||||
psp = (mbstate_t *)0;
|
||||
], bash_cv_have_mbstate_t=yes, bash_cv_have_mbstate_t=no)])
|
||||
if test $bash_cv_have_mbstate_t = yes; then
|
||||
AC_DEFINE(HAVE_MBSTATE_T)
|
||||
fi
|
||||
|
||||
AC_CHECK_FUNCS(iswlower iswupper towlower towupper iswctype)
|
||||
|
||||
AC_CACHE_CHECK([for nl_langinfo and CODESET], bash_cv_langinfo_codeset,
|
||||
[AC_TRY_LINK(
|
||||
[#include <langinfo.h>],
|
||||
@@ -1703,43 +1703,6 @@ if test $bash_cv_langinfo_codeset = yes; then
|
||||
AC_DEFINE(HAVE_LANGINFO_CODESET)
|
||||
fi
|
||||
|
||||
dnl check for wchar_t in <wchar.h>
|
||||
AC_CACHE_CHECK([for wchar_t in wchar.h], bash_cv_type_wchar_t,
|
||||
[AC_TRY_COMPILE(
|
||||
[#include <wchar.h>
|
||||
],
|
||||
[
|
||||
wchar_t foo;
|
||||
foo = 0;
|
||||
], bash_cv_type_wchar_t=yes, bash_cv_type_wchar_t=no)])
|
||||
if test $bash_cv_type_wchar_t = yes; then
|
||||
AC_DEFINE(HAVE_WCHAR_T, 1, [systems should define this type here])
|
||||
fi
|
||||
|
||||
dnl check for wctype_t in <wctype.h>
|
||||
AC_CACHE_CHECK([for wctype_t in wctype.h], bash_cv_type_wctype_t,
|
||||
[AC_TRY_COMPILE(
|
||||
[#include <wctype.h>],
|
||||
[
|
||||
wctype_t foo;
|
||||
foo = 0;
|
||||
], bash_cv_type_wctype_t=yes, bash_cv_type_wctype_t=no)])
|
||||
if test $bash_cv_type_wctype_t = yes; then
|
||||
AC_DEFINE(HAVE_WCTYPE_T, 1, [systems should define this type here])
|
||||
fi
|
||||
|
||||
dnl check for wint_t in <wctype.h>
|
||||
AC_CACHE_CHECK([for wint_t in wctype.h], bash_cv_type_wint_t,
|
||||
[AC_TRY_COMPILE(
|
||||
[#include <wctype.h>],
|
||||
[
|
||||
wint_t foo;
|
||||
foo = 0;
|
||||
], bash_cv_type_wint_t=yes, bash_cv_type_wint_t=no)])
|
||||
if test $bash_cv_type_wint_t = yes; then
|
||||
AC_DEFINE(HAVE_WINT_T, 1, [systems should define this type here])
|
||||
fi
|
||||
|
||||
])
|
||||
|
||||
dnl need: prefix exec_prefix libdir includedir CC TERMCAP_LIB
|
||||
@@ -2364,7 +2327,7 @@ AC_DEFUN([AM_INTL_SUBDIR],
|
||||
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 localeconv stpcpy \
|
||||
geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
|
||||
strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next \
|
||||
__fsetlocking])
|
||||
|
||||
|
||||
@@ -120,6 +120,7 @@ ARRAY *a;
|
||||
return(a1);
|
||||
}
|
||||
|
||||
#ifdef INCLUDE_UNUSED
|
||||
/*
|
||||
* Make and return a new array composed of the elements in array A from
|
||||
* S to E, inclusive.
|
||||
@@ -140,12 +141,13 @@ ARRAY_ELEMENT *s, *e;
|
||||
for (p = s, i = 0; p != e; p = element_forw(p), i++) {
|
||||
n = array_create_element (element_index(p), element_value(p));
|
||||
ADD_BEFORE(a->head, n);
|
||||
mi = element_index(n);
|
||||
mi = element_index(ae);
|
||||
}
|
||||
a->num_elements = i;
|
||||
a->max_index = mi;
|
||||
return a;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Walk the array, calling FUNC once for each element, with the array
|
||||
@@ -298,23 +300,6 @@ ARRAY *array;
|
||||
return array;
|
||||
}
|
||||
|
||||
ARRAY *
|
||||
array_quote_escapes(array)
|
||||
ARRAY *array;
|
||||
{
|
||||
ARRAY_ELEMENT *a;
|
||||
char *t;
|
||||
|
||||
if (array == 0 || array_head(array) == 0 || array_empty(array))
|
||||
return (ARRAY *)NULL;
|
||||
for (a = element_forw(array->head); a != array->head; a = element_forw(a)) {
|
||||
t = quote_escapes (a->value);
|
||||
FREE(a->value);
|
||||
a->value = t;
|
||||
}
|
||||
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.
|
||||
@@ -326,10 +311,9 @@ ARRAY *a;
|
||||
arrayind_t start, nelem;
|
||||
int starsub, quoted;
|
||||
{
|
||||
ARRAY *a2;
|
||||
ARRAY_ELEMENT *h, *p;
|
||||
arrayind_t i;
|
||||
char *ifs, sep[2], *t;
|
||||
char *ifs, sep[2];
|
||||
|
||||
p = a ? array_head (a) : 0;
|
||||
if (p == 0 || array_empty (a) || start > array_max_index(a))
|
||||
@@ -352,13 +336,6 @@ int starsub, quoted;
|
||||
for (i = 0, h = p; p != a->head && i < nelem; i++, p = element_forw(p))
|
||||
;
|
||||
|
||||
a2 = array_slice(a, h, p);
|
||||
|
||||
if (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))
|
||||
array_quote(a2);
|
||||
else
|
||||
array_quote_escapes(a2);
|
||||
|
||||
if (starsub && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))) {
|
||||
ifs = getifs();
|
||||
sep[0] = ifs ? *ifs : '\0';
|
||||
@@ -366,10 +343,7 @@ int starsub, quoted;
|
||||
sep[0] = ' ';
|
||||
sep[1] = '\0';
|
||||
|
||||
t = array_to_string (a2, sep, 0);
|
||||
array_dispose(a2);
|
||||
|
||||
return t;
|
||||
return (array_to_string_internal (h, p, sep, quoted));
|
||||
}
|
||||
|
||||
char *
|
||||
@@ -393,9 +367,7 @@ int mflags;
|
||||
}
|
||||
|
||||
if (mflags & MATCH_QUOTED)
|
||||
array_quote(a2);
|
||||
else
|
||||
array_quote_escapes(a2);
|
||||
array_quote (a2);
|
||||
if (mflags & MATCH_STARSUB) {
|
||||
ifs = getifs();
|
||||
sifs[0] = ifs ? *ifs : '\0';
|
||||
|
||||
@@ -55,7 +55,6 @@ 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 ARRAY *array_quote_escapes __P((ARRAY *));
|
||||
|
||||
extern char *array_subrange __P((ARRAY *, arrayind_t, arrayind_t, int, int));
|
||||
extern char *array_patsub __P((ARRAY *, char *, char *, int));
|
||||
|
||||
+27
-47
@@ -1,6 +1,6 @@
|
||||
/* arrayfunc.c -- High-level array functions used by other parts of the shell. */
|
||||
|
||||
/* Copyright (C) 2001-2006 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2001-2005 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -45,7 +45,7 @@ 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 */
|
||||
const char * const bash_badsub_errmsg = N_("bad array subscript");
|
||||
char *bash_badsub_errmsg = N_("bad array subscript");
|
||||
|
||||
/* **************************************************************** */
|
||||
/* */
|
||||
@@ -265,22 +265,32 @@ assign_array_var_from_word_list (var, list, flags)
|
||||
return var;
|
||||
}
|
||||
|
||||
WORD_LIST *
|
||||
expand_compound_array_assignment (value, flags)
|
||||
/* Perform a compound array assignment: VAR->name=( VALUE ). The
|
||||
VALUE has already had the parentheses stripped. */
|
||||
SHELL_VAR *
|
||||
assign_array_var_from_string (var, value, flags)
|
||||
SHELL_VAR *var;
|
||||
char *value;
|
||||
int flags;
|
||||
{
|
||||
ARRAY *a;
|
||||
WORD_LIST *list, *nlist;
|
||||
char *val;
|
||||
int ni;
|
||||
char *w, *val, *nval;
|
||||
int ni, len;
|
||||
arrayind_t ind, last_ind;
|
||||
|
||||
/* I don't believe this condition is ever true any more. */
|
||||
if (value == 0)
|
||||
return var;
|
||||
|
||||
/* If this is called from declare_builtin, value[0] == '(' and
|
||||
xstrchr(value, ')') != 0. In this case, we need to extract
|
||||
the value from between the parens before going on. */
|
||||
if (*value == '(') /*)*/
|
||||
{
|
||||
ni = 1;
|
||||
val = extract_array_assignment_list (value, &ni);
|
||||
if (val == 0)
|
||||
return (WORD_LIST *)NULL;
|
||||
return var;
|
||||
}
|
||||
else
|
||||
val = value;
|
||||
@@ -305,21 +315,6 @@ expand_compound_array_assignment (value, flags)
|
||||
if (val != value)
|
||||
free (val);
|
||||
|
||||
return nlist;
|
||||
}
|
||||
|
||||
void
|
||||
assign_compound_array_list (var, nlist, flags)
|
||||
SHELL_VAR *var;
|
||||
WORD_LIST *nlist;
|
||||
int flags;
|
||||
{
|
||||
ARRAY *a;
|
||||
WORD_LIST *list;
|
||||
char *w, *val, *nval;
|
||||
int len, iflags;
|
||||
arrayind_t ind, last_ind;
|
||||
|
||||
a = array_cell (var);
|
||||
|
||||
/* Now that we are ready to assign values to the array, kill the existing
|
||||
@@ -330,7 +325,6 @@ assign_compound_array_list (var, nlist, flags)
|
||||
|
||||
for (list = nlist; list; list = list->next)
|
||||
{
|
||||
iflags = flags;
|
||||
w = list->word->word;
|
||||
|
||||
/* We have a word of the form [ind]=value */
|
||||
@@ -338,8 +332,12 @@ assign_compound_array_list (var, nlist, flags)
|
||||
{
|
||||
len = skipsubscript (w, 0);
|
||||
|
||||
#if 1
|
||||
/* XXX - changes for `+=' */
|
||||
if (w[len] != ']' || (w[len+1] != '=' && (w[len+1] != '+' || w[len+2] != '=')))
|
||||
#else
|
||||
if (w[len] != ']' || w[len+1] != '=')
|
||||
#endif
|
||||
{
|
||||
nval = make_variable_value (var, w, flags);
|
||||
if (var->assign_func)
|
||||
@@ -370,10 +368,10 @@ assign_compound_array_list (var, nlist, flags)
|
||||
continue;
|
||||
}
|
||||
last_ind = ind;
|
||||
/* XXX - changes for `+=' -- just accept the syntax. ksh93 doesn't do this */
|
||||
/* XXX - changes for `+=' */
|
||||
if (w[len + 1] == '+' && w[len + 2] == '=')
|
||||
{
|
||||
iflags |= ASS_APPEND;
|
||||
flags |= ASS_APPEND;
|
||||
val = w + len + 3;
|
||||
}
|
||||
else
|
||||
@@ -387,29 +385,11 @@ assign_compound_array_list (var, nlist, flags)
|
||||
|
||||
if (integer_p (var))
|
||||
this_command_name = (char *)NULL; /* no command name for errors */
|
||||
bind_array_var_internal (var, ind, val, iflags);
|
||||
bind_array_var_internal (var, ind, val, flags);
|
||||
last_ind++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Perform a compound array assignment: VAR->name=( VALUE ). The
|
||||
VALUE has already had the parentheses stripped. */
|
||||
SHELL_VAR *
|
||||
assign_array_var_from_string (var, value, flags)
|
||||
SHELL_VAR *var;
|
||||
char *value;
|
||||
int flags;
|
||||
{
|
||||
WORD_LIST *nlist;
|
||||
|
||||
if (value == 0)
|
||||
return var;
|
||||
|
||||
nlist = expand_compound_array_assignment (value, flags);
|
||||
assign_compound_array_list (var, nlist, flags);
|
||||
|
||||
if (nlist)
|
||||
dispose_words (nlist);
|
||||
dispose_words (nlist);
|
||||
return (var);
|
||||
}
|
||||
|
||||
@@ -610,7 +590,7 @@ array_expand_index (s, len)
|
||||
exp = (char *)xmalloc (len);
|
||||
strncpy (exp, s, len - 1);
|
||||
exp[len - 1] = '\0';
|
||||
t = expand_arith_string (exp, 0);
|
||||
t = expand_arith_string (exp);
|
||||
this_command_name = (char *)NULL;
|
||||
val = evalexp (t, &expok);
|
||||
free (t);
|
||||
|
||||
@@ -34,9 +34,6 @@ extern SHELL_VAR *find_or_make_array_variable __P((char *, int));
|
||||
|
||||
extern SHELL_VAR *assign_array_from_string __P((char *, char *, int));
|
||||
extern SHELL_VAR *assign_array_var_from_word_list __P((SHELL_VAR *, WORD_LIST *, int));
|
||||
|
||||
extern WORD_LIST *expand_compound_array_assignment __P((char *, int));
|
||||
extern void assign_compound_array_list __P((SHELL_VAR *, WORD_LIST *, int));
|
||||
extern SHELL_VAR *assign_array_var_from_string __P((SHELL_VAR *, char *, int));
|
||||
|
||||
extern int unbind_array_element __P((SHELL_VAR *, char *));
|
||||
|
||||
+180
-595
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@
|
||||
@request = (
|
||||
bless( [
|
||||
'0',
|
||||
0,
|
||||
1,
|
||||
[
|
||||
'/usr/share/autoconf'
|
||||
],
|
||||
@@ -79,12 +79,12 @@
|
||||
'AC_FUNC_GETLOADAVG' => 1,
|
||||
'AH_OUTPUT' => 1,
|
||||
'AC_FUNC_FSEEKO' => 1,
|
||||
'AC_FUNC_MKTIME' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AC_FUNC_MKTIME' => 1,
|
||||
'AC_CONFIG_HEADERS' => 1,
|
||||
'AC_HEADER_SYS_WAIT' => 1,
|
||||
'AC_PROG_LN_S' => 1,
|
||||
'AC_FUNC_MEMCMP' => 1,
|
||||
'AC_PROG_LN_S' => 1,
|
||||
'm4_include' => 1,
|
||||
'AC_HEADER_DIRENT' => 1,
|
||||
'AC_CHECK_FUNCS' => 1
|
||||
|
||||
+677
-709
File diff suppressed because it is too large
Load Diff
+7035
-11451
File diff suppressed because it is too large
Load Diff
+12
-26
@@ -15,10 +15,7 @@
|
||||
'configure.in'
|
||||
],
|
||||
{
|
||||
'AM_PROG_F77_C_O' => 1,
|
||||
'_LT_AC_TAGCONFIG' => 1,
|
||||
'm4_pattern_forbid' => 1,
|
||||
'AC_CANONICAL_TARGET' => 1,
|
||||
'AC_CONFIG_LIBOBJ_DIR' => 1,
|
||||
'AC_C_VOLATILE' => 1,
|
||||
'AC_TYPE_OFF_T' => 1,
|
||||
@@ -26,16 +23,15 @@
|
||||
'AC_REPLACE_FNMATCH' => 1,
|
||||
'AC_PROG_LIBTOOL' => 1,
|
||||
'AC_FUNC_STAT' => 1,
|
||||
'AC_FUNC_WAIT3' => 1,
|
||||
'AC_HEADER_TIME' => 1,
|
||||
'AC_FUNC_WAIT3' => 1,
|
||||
'AC_FUNC_LSTAT' => 1,
|
||||
'AC_STRUCT_TM' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'AC_FUNC_GETMNTENT' => 1,
|
||||
'AC_TYPE_MODE_T' => 1,
|
||||
'AC_CHECK_HEADERS' => 1,
|
||||
'AC_FUNC_GETMNTENT' => 1,
|
||||
'AC_FUNC_STRTOD' => 1,
|
||||
'LT_CONFIG_LTDL_DIR' => 1,
|
||||
'AC_CHECK_HEADERS' => 1,
|
||||
'AC_FUNC_STRNLEN' => 1,
|
||||
'm4_sinclude' => 1,
|
||||
'AC_PROG_CXX' => 1,
|
||||
@@ -45,61 +41,52 @@
|
||||
'_m4_warn' => 1,
|
||||
'AC_HEADER_STDC' => 1,
|
||||
'AC_HEADER_MAJOR' => 1,
|
||||
'AM_PROG_CXX_C_O' => 1,
|
||||
'LT_INIT' => 1,
|
||||
'AC_FUNC_ERROR_AT_LINE' => 1,
|
||||
'AC_PROG_GCC_TRADITIONAL' => 1,
|
||||
'AC_LIBSOURCE' => 1,
|
||||
'AC_FUNC_MBRTOWC' => 1,
|
||||
'AC_STRUCT_ST_BLOCKS' => 1,
|
||||
'AC_TYPE_SIGNAL' => 1,
|
||||
'AC_CANONICAL_BUILD' => 1,
|
||||
'AM_PROG_FC_C_O' => 1,
|
||||
'AC_TYPE_UID_T' => 1,
|
||||
'AC_PROG_MAKE_SET' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'_AM_SUBST_NOTMAKE' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'AC_PROG_MAKE_SET' => 1,
|
||||
'sinclude' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'AC_DEFINE_TRACE_LITERAL' => 1,
|
||||
'AC_FUNC_STRERROR_R' => 1,
|
||||
'AC_PROG_CC' => 1,
|
||||
'AC_DECL_SYS_SIGLIST' => 1,
|
||||
'AC_FUNC_FORK' => 1,
|
||||
'AC_FUNC_STRCOLL' => 1,
|
||||
'AC_DECL_SYS_SIGLIST' => 1,
|
||||
'AC_FUNC_VPRINTF' => 1,
|
||||
'AC_FUNC_STRCOLL' => 1,
|
||||
'AC_PROG_YACC' => 1,
|
||||
'AC_SUBST_TRACE' => 1,
|
||||
'AC_INIT' => 1,
|
||||
'AC_STRUCT_TIMEZONE' => 1,
|
||||
'AC_FUNC_CHOWN' => 1,
|
||||
'AC_SUBST' => 1,
|
||||
'AC_FUNC_ALLOCA' => 1,
|
||||
'AC_FC_SRCEXT' => 1,
|
||||
'AC_CANONICAL_HOST' => 1,
|
||||
'AC_FUNC_GETPGRP' => 1,
|
||||
'AC_CANONICAL_HOST' => 1,
|
||||
'AC_PROG_RANLIB' => 1,
|
||||
'AC_FUNC_SETPGRP' => 1,
|
||||
'AM_INIT_AUTOMAKE' => 1,
|
||||
'AC_FUNC_SETPGRP' => 1,
|
||||
'AC_CONFIG_SUBDIRS' => 1,
|
||||
'AC_FUNC_MMAP' => 1,
|
||||
'AC_FUNC_REALLOC' => 1,
|
||||
'AC_TYPE_SIZE_T' => 1,
|
||||
'AC_CHECK_TYPES' => 1,
|
||||
'AC_CONFIG_LINKS' => 1,
|
||||
'AC_REQUIRE_AUX_FILE' => 1,
|
||||
'LT_SUPPORTED_TAG' => 1,
|
||||
'AC_CHECK_MEMBERS' => 1,
|
||||
'AM_MAINTAINER_MODE' => 1,
|
||||
'AC_FUNC_UTIME_NULL' => 1,
|
||||
'AC_FUNC_SELECT_ARGTYPES' => 1,
|
||||
'AC_HEADER_STAT' => 1,
|
||||
'AC_FUNC_STRFTIME' => 1,
|
||||
'AC_HEADER_STAT' => 1,
|
||||
'AC_PROG_CPP' => 1,
|
||||
'AC_C_INLINE' => 1,
|
||||
'AC_TYPE_PID_T' => 1,
|
||||
'AC_PROG_LEX' => 1,
|
||||
'AC_C_CONST' => 1,
|
||||
'AC_TYPE_PID_T' => 1,
|
||||
'AC_CONFIG_FILES' => 1,
|
||||
'include' => 1,
|
||||
'AC_FUNC_SETVBUF_REVERSED' => 1,
|
||||
@@ -110,7 +97,6 @@
|
||||
'AC_FUNC_MALLOC' => 1,
|
||||
'AC_FUNC_GETGROUPS' => 1,
|
||||
'AC_FUNC_GETLOADAVG' => 1,
|
||||
'AC_FC_FREEFORM' => 1,
|
||||
'AH_OUTPUT' => 1,
|
||||
'AC_FUNC_FSEEKO' => 1,
|
||||
'AM_PROG_CC_C_O' => 1,
|
||||
@@ -119,8 +105,8 @@
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AC_CONFIG_HEADERS' => 1,
|
||||
'AC_HEADER_SYS_WAIT' => 1,
|
||||
'AC_PROG_LN_S' => 1,
|
||||
'AC_FUNC_MEMCMP' => 1,
|
||||
'AC_PROG_LN_S' => 1,
|
||||
'm4_include' => 1,
|
||||
'AC_HEADER_DIRENT' => 1,
|
||||
'AC_CHECK_FUNCS' => 1
|
||||
|
||||
+1176
-1867
File diff suppressed because it is too large
Load Diff
Vendored
BIN
Binary file not shown.
@@ -0,0 +1 @@
|
||||
quit
|
||||
@@ -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.
|
||||
|
||||
@@ -0,0 +1,458 @@
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# Filename authors (first is original author)
|
||||
#
|
||||
README Brian Fox, Chet Ramey
|
||||
INSTALL Brian Fox, Chet Ramey
|
||||
COPYING Brian Fox, Chet Ramey
|
||||
MANIFEST Brian Fox, Chet Ramey
|
||||
configure Chet Ramey
|
||||
Makefile.in Brian Fox, Chet Ramey
|
||||
configure.in Chet Ramey
|
||||
aclocal.m4 Chet Ramey
|
||||
config.h.top Chet Ramey
|
||||
config.h.bot Chet Ramey
|
||||
config.h.in Chet Ramey
|
||||
array.c Chet Ramey
|
||||
print_cmd.c Brian Fox, Chet Ramey
|
||||
general.c Brian Fox, Chet Ramey
|
||||
variables.c Brian Fox, Chet Ramey
|
||||
make_cmd.c Brian Fox, Chet Ramey
|
||||
copy_cmd.c Brian Fox, Chet Ramey
|
||||
unwind_prot.c Brian Fox, Chet Ramey
|
||||
dispose_cmd.c Brian Fox, Chet Ramey
|
||||
getcwd.c Roland McGrath, Brian Fox, Chet Ramey
|
||||
bashhist.c Chet Ramey
|
||||
hash.c Brian Fox, Chet Ramey
|
||||
parse.y Brian Fox, Chet Ramey
|
||||
subst.c Brian Fox, Chet Ramey
|
||||
shell.c Brian Fox, Chet Ramey
|
||||
sig.c Chet Ramey
|
||||
trap.c Brian Fox, Chet Ramey
|
||||
siglist.c Brian Fox, Chet Ramey
|
||||
version.c Brian Fox, Chet Ramey
|
||||
flags.c Brian Fox, Chet Ramey
|
||||
jobs.c Brian Fox, Chet Ramey
|
||||
input.c Chet Ramey
|
||||
mailcheck.c Brian Fox, Chet Ramey
|
||||
pathexp.c Chet Ramey
|
||||
test.c Brian Fox, Chet Ramey
|
||||
expr.c Chet Ramey, Brian Fox
|
||||
alias.c Brian Fox, Chet Ramey
|
||||
execute_cmd.c Brian Fox, Chet Ramey
|
||||
bashline.c Brian Fox, Chet Ramey
|
||||
braces.c Brian Fox, Chet Ramey
|
||||
bracecomp.c Brian Fox, Chet Ramey, Tom Tromey
|
||||
nojobs.c Brian Fox, Chet Ramey
|
||||
vprint.c Chet Ramey
|
||||
oslib.c Chet Ramey
|
||||
error.c Brian Fox, Chet Ramey
|
||||
xmalloc.c Brian Fox, Chet Ramey
|
||||
alias.h Brian Fox, Chet Ramey
|
||||
array.h Chet Ramey
|
||||
builtins.h Brian Fox, Chet Ramey
|
||||
parser.h Brian Fox, Chet Ramey
|
||||
variables.h Brian Fox, Chet Ramey
|
||||
machines.h Brian Fox, Chet Ramey
|
||||
jobs.h Brian Fox, Chet Ramey
|
||||
maxpath.h Brian Fox, Chet Ramey
|
||||
pathexp.h Chet Ramey
|
||||
mailcheck.h Chet Ramey
|
||||
filecntl.h Brian Fox, Chet Ramey
|
||||
hash.h Brian Fox, Chet Ramey
|
||||
quit.h Brian Fox, Chet Ramey
|
||||
flags.h Brian Fox, Chet Ramey
|
||||
shell.h Brian Fox, Chet Ramey
|
||||
bashjmp.h Chet Ramey
|
||||
sig.h Chet Ramey
|
||||
trap.h Brian Fox, Chet Ramey
|
||||
general.h Brian Fox, Chet Ramey
|
||||
unwind_prot.h Brian Fox, Chet Ramey
|
||||
input.h Brian Fox, Chet Ramey
|
||||
error.h Brian Fox, Chet Ramey
|
||||
command.h Brian Fox, Chet Ramey
|
||||
externs.h Chet Ramey
|
||||
siglist.h Chet Ramey
|
||||
subst.h Brian Fox, Chet Ramey
|
||||
dispose_cmd.h Brian Fox, Chet Ramey
|
||||
bashansi.h Brian Fox, Chet Ramey
|
||||
make_cmd.h Brian Fox, Chet Ramey
|
||||
bashhist.h Chet Ramey
|
||||
bashline.h Chet Ramey
|
||||
execute_cmd.h Chet Ramey
|
||||
bashtypes.h Chet Ramey
|
||||
bashtty.h Chet Ramey
|
||||
pathnames.h Chet Ramey
|
||||
y.tab.c Brian Fox, Chet Ramey
|
||||
y.tab.h Brian Fox, Chet Ramey
|
||||
parser-built Brian Fox, Chet Ramey
|
||||
posixstat.h Brian Fox, Chet Ramey
|
||||
stdc.h Chet Ramey
|
||||
ansi_stdlib.h Brian Fox, Chet Ramey
|
||||
memalloc.h Chet Ramey
|
||||
builtins/ChangeLog Brian Fox, Chet Ramey
|
||||
builtins/Makefile.in Brian Fox, Chet Ramey
|
||||
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
|
||||
builtins/common.c Brian Fox, Chet Ramey
|
||||
builtins/declare.def Brian Fox, Chet Ramey
|
||||
builtins/echo.def Brian Fox, Chet Ramey
|
||||
builtins/enable.def Brian Fox, Chet Ramey
|
||||
builtins/eval.def Brian Fox, Chet Ramey
|
||||
builtins/exec.def Brian Fox, Chet Ramey
|
||||
builtins/exit.def Brian Fox, Chet Ramey
|
||||
builtins/fc.def Brian Fox, Chet Ramey
|
||||
builtins/fg_bg.def Brian Fox, Chet Ramey
|
||||
builtins/getopt.c Roland McGrath, Brian Fox, Chet Ramey
|
||||
builtins/getopt.h Roland McGrath, Brian Fox, Chet Ramey
|
||||
builtins/getopts.def Brian Fox, Chet Ramey
|
||||
builtins/hash.def Brian Fox, Chet Ramey
|
||||
builtins/hashcom.h Brian Fox, Chet Ramey
|
||||
builtins/help.def Brian Fox, Chet Ramey
|
||||
builtins/let.def Chet Ramey, Brian Fox
|
||||
builtins/history.def Brian Fox, Chet Ramey
|
||||
builtins/jobs.def Brian Fox, Chet Ramey
|
||||
builtins/kill.def Brian Fox, Chet Ramey
|
||||
builtins/mkbuiltins.c Brian Fox, Chet Ramey
|
||||
builtins/pushd.def Brian Fox, Chet Ramey
|
||||
builtins/read.def Brian Fox, Chet Ramey
|
||||
builtins/reserved.def Brian Fox, Chet Ramey
|
||||
builtins/return.def Brian Fox, Chet Ramey
|
||||
builtins/set.def Brian Fox, Chet Ramey
|
||||
builtins/setattr.def Brian Fox, Chet Ramey
|
||||
builtins/shift.def Brian Fox, Chet Ramey
|
||||
builtins/shopt.def Chet Ramey
|
||||
builtins/source.def Brian Fox, Chet Ramey
|
||||
builtins/suspend.def Brian Fox, Chet Ramey
|
||||
builtins/test.def Brian Fox, Chet Ramey
|
||||
builtins/times.def Brian Fox, Chet Ramey
|
||||
builtins/trap.def Brian Fox, Chet Ramey
|
||||
builtins/type.def Brian Fox, Chet Ramey
|
||||
builtins/ulimit.def Chet Ramey, Brian Fox
|
||||
builtins/umask.def Brian Fox, Chet Ramey
|
||||
builtins/wait.def Brian Fox, Chet Ramey
|
||||
builtins/psize.c Chet Ramey, Brian Fox
|
||||
builtins/psize.sh Chet Ramey, Brian Fox
|
||||
builtins/inlib.def Chet Ramey
|
||||
builtins/bashgetopt.c Chet Ramey
|
||||
builtins/common.h Chet Ramey
|
||||
builtins/bashgetopt.h Chet Ramey
|
||||
lib/doc-support/texindex.c bug-texinfo@prep.ai.mit.edu, Chet Ramey
|
||||
lib/doc-support/Makefile.in Chet Ramey
|
||||
lib/doc-support/getopt.h Roland McGrath
|
||||
lib/doc-support/getopt.c Roland McGrath
|
||||
lib/doc-support/getopt1.c Roland McGrath
|
||||
lib/glob/ChangeLog Brian Fox, Chet Ramey
|
||||
lib/glob/Makefile.in Brian Fox, Chet Ramey
|
||||
lib/glob/strmatch.c Roland McGrath, Brian Fox, Chet Ramey
|
||||
lib/glob/strmatch.h Roland McGrath, Brian Fox, Chet Ramey
|
||||
lib/glob/glob.c Richard Stallman, Roland McGrath, Brian Fox, Chet Ramey
|
||||
lib/glob/glob.h Chet Ramey
|
||||
lib/glob/ndir.h Doug Gwyn, Richard Stallman
|
||||
lib/glob/doc/Makefile.in Brian Fox, Chet Ramey
|
||||
lib/glob/doc/glob.texi Brian Fox, Chet Ramey
|
||||
lib/malloc/Makefile.in Chet Ramey
|
||||
lib/malloc/alloca.c Doug Gwyn, Richard Stallman, Brian Fox, Chet Ramey
|
||||
lib/malloc/getpagesize.h Brian Fox, Chet Ramey
|
||||
lib/malloc/malloc.c Chris Kingsley, Mike Muuss, Richard Stallman, Brian Fox, Chet Ramey
|
||||
lib/malloc/gmalloc.c Mike Haertel, Roland McGrath
|
||||
lib/malloc/stub.c Chet Ramey
|
||||
lib/malloc/i386-alloca.s Richard Stallman
|
||||
lib/malloc/x386-alloca.s Chip Salzenberg, Richard Stallman
|
||||
lib/malloc/xmalloc.c Brian Fox, Chet Ramey
|
||||
lib/posixheaders/posixstat.h Brian Fox, Chet Ramey
|
||||
lib/posixheaders/ansi_stdlib.h Brian Fox, Chet Ramey
|
||||
lib/posixheaders/stdc.h Chet Ramey
|
||||
lib/posixheaders/memalloc.h Chet Ramey
|
||||
lib/posixheaders/filecntl.h Brian Fox, Chet Ramey
|
||||
lib/readline/Makefile.in Brian Fox, Chet Ramey
|
||||
lib/readline/COPYING Brian Fox, Chet Ramey
|
||||
lib/readline/ChangeLog Brian Fox, Chet Ramey
|
||||
lib/readline/readline.c Brian Fox, Chet Ramey
|
||||
lib/readline/vi_mode.c Brian Fox, Chet Ramey
|
||||
lib/readline/emacs_keymap.c Brian Fox, Chet Ramey
|
||||
lib/readline/vi_keymap.c Brian Fox, Chet Ramey
|
||||
lib/readline/funmap.c Brian Fox, Chet Ramey
|
||||
lib/readline/keymaps.c Brian Fox, Chet Ramey
|
||||
lib/readline/xmalloc.c Brian Fox, Chet Ramey
|
||||
lib/readline/search.c Brian Fox, Chet Ramey
|
||||
lib/readline/isearch.c Brian Fox, Chet Ramey
|
||||
lib/readline/parens.c Brian Fox, Chet Ramey
|
||||
lib/readline/rltty.c Brian Fox, Chet Ramey
|
||||
lib/readline/complete.c Brian Fox, Chet Ramey
|
||||
lib/readline/bind.c Brian Fox, Chet Ramey
|
||||
lib/readline/display.c Brian Fox, Chet Ramey
|
||||
lib/readline/signals.c Brian Fox, Chet Ramey
|
||||
lib/readline/kill.c Brian Fox, Chet Ramey
|
||||
lib/readline/undo.c Brian Fox, Chet Ramey
|
||||
lib/readline/input.c Brian Fox, Chet Ramey
|
||||
lib/readline/macro.c Brian Fox, Chet Ramey
|
||||
lib/readline/util.c Brian Fox, Chet Ramey
|
||||
lib/readline/callback.c Chet Ramey
|
||||
lib/readline/readline.h Brian Fox, Chet Ramey
|
||||
lib/readline/chardefs.h Brian Fox, Chet Ramey
|
||||
lib/readline/keymaps.h Brian Fox, Chet Ramey
|
||||
lib/readline/rldefs.h Brian Fox, Chet Ramey
|
||||
lib/readline/posixstat.h Brian Fox, Chet Ramey
|
||||
lib/readline/ansi_stdlib.h Brian Fox, Chet Ramey
|
||||
lib/readline/memalloc.h Chet Ramey
|
||||
lib/readline/rlconf.h Chet Ramey
|
||||
lib/readline/rltty.h Chet Ramey
|
||||
lib/readline/history.c Brian Fox, Chet Ramey
|
||||
lib/readline/histexpand.c Brian Fox, Chet Ramey
|
||||
lib/readline/histfile.c Brian Fox, Chet Ramey
|
||||
lib/readline/histsearch.c Brian Fox, Chet Ramey
|
||||
lib/readline/history.h Brian Fox, Chet Ramey
|
||||
lib/readline/histlib.h Brian Fox, Chet Ramey
|
||||
lib/readline/tilde.c Brian Fox, Chet Ramey
|
||||
lib/readline/tilde.h Brian Fox, Chet Ramey
|
||||
lib/readline/doc/texindex.c bug-texinfo@prep.ai.mit.edu, Chet Ramey
|
||||
lib/readline/doc/Makefile Brian Fox, Chet Ramey
|
||||
lib/readline/doc/rlman.texinfo Brian Fox, Chet Ramey
|
||||
lib/readline/doc/rltech.texinfo Brian Fox, Chet Ramey
|
||||
lib/readline/doc/rluser.texinfo Brian Fox, Chet Ramey
|
||||
lib/readline/doc/hist.texinfo Brian Fox, Chet Ramey
|
||||
lib/readline/doc/hstech.texinfo Brian Fox, Chet Ramey
|
||||
lib/readline/doc/hsuser.texinfo Brian Fox, Chet Ramey
|
||||
lib/readline/examples/Makefile Brian Fox
|
||||
lib/readline/examples/fileman.c Brian Fox
|
||||
lib/readline/examples/manexamp.c Brian Fox
|
||||
lib/readline/examples/histexamp.c Brian Fox, Chet Ramey
|
||||
lib/readline/examples/rltest.c Brian Fox, Chet Ramey
|
||||
lib/readline/examples/Inputrc Brian Fox, Chet Ramey
|
||||
lib/termcap/Makefile.in David MacKenzie, Chet Ramey
|
||||
lib/termcap/termcap.c David MacKenzie
|
||||
lib/termcap/termcap.h David MacKenzie
|
||||
lib/termcap/tparam.c David MacKenzie
|
||||
lib/termcap/version.c David MacKenzie
|
||||
lib/termcap/grot/termcap.info David MacKenzie
|
||||
lib/termcap/grot/termcap.info-1 David MacKenzie
|
||||
lib/termcap/grot/termcap.info-2 David MacKenzie
|
||||
lib/termcap/grot/termcap.info-3 David MacKenzie
|
||||
lib/termcap/grot/termcap.info-4 David MacKenzie
|
||||
lib/termcap/grot/NEWS David MacKenzie
|
||||
lib/termcap/grot/INSTALL David MacKenzie
|
||||
lib/termcap/grot/ChangeLog David MacKenzie
|
||||
lib/termcap/grot/texinfo.tex David MacKenzie
|
||||
lib/termcap/grot/termcap.texi David MacKenzie
|
||||
lib/termcap/grot/Makefile.in David MacKenzie
|
||||
lib/termcap/grot/configure David MacKenzie
|
||||
lib/termcap/grot/configure.in David MacKenzie
|
||||
lib/termcap/grot/COPYING David MacKenzie
|
||||
lib/termcap/grot/README David MacKenzie
|
||||
lib/tilde/ChangeLog Brian Fox, Chet Ramey
|
||||
lib/tilde/Makefile.in Brian Fox, Chet Ramey
|
||||
lib/tilde/doc/tilde.texi Brian Fox, Chet Ramey
|
||||
lib/tilde/doc/Makefile Brian Fox, Chet Ramey
|
||||
lib/tilde/tilde.c Brian Fox, Chet Ramey
|
||||
lib/tilde/tilde.h Brian Fox, Chet Ramey
|
||||
lib/tilde/memalloc.h Brian Fox, Chet Ramey
|
||||
CWRU/misc/open-files.c Chet Ramey
|
||||
CWRU/misc/sigs.c Chet Ramey
|
||||
CWRU/misc/pid.c Chet Ramey
|
||||
CWRU/misc/sigstat.c Chet Ramey
|
||||
CWRU/misc/bison Chet Ramey
|
||||
CWRU/misc/aux-machine-desc Chet Ramey
|
||||
CWRU/PLATFORMS Chet Ramey
|
||||
CWRU/README Chet Ramey
|
||||
CWRU/CWRU.CHANGES.051093 Chet Ramey
|
||||
CWRU/POSIX.NOTES Chet Ramey
|
||||
CWRU/CWRU.CHANGES.071193 Chet Ramey
|
||||
CWRU/CWRU.CHANGES.090393 Chet Ramey
|
||||
doc/Makefile.in Brian Fox, Chet Ramey
|
||||
doc/bash.1 Chet Ramey
|
||||
doc/builtins.1 Chet Ramey
|
||||
doc/bash.ps Chet Ramey
|
||||
doc/bash.txt Chet Ramey
|
||||
doc/readline.3 Chet Ramey
|
||||
doc/readline.ps Chet Ramey
|
||||
doc/readline.txt Chet Ramey
|
||||
doc/texinfo.tex Richard Stallman
|
||||
doc/features.texi Brian Fox, Chet Ramey
|
||||
doc/features.ps Brian Fox, Chet Ramey
|
||||
doc/features.info Brian Fox, Chet Ramey
|
||||
doc/features.dvi Brian Fox, Chet Ramey
|
||||
doc/bash_builtins.1 Chet Ramey
|
||||
doc/bash_builtins.ps Chet Ramey
|
||||
doc/bash_builtins.txt Chet Ramey
|
||||
doc/bash_builtins.readme Chet Ramey
|
||||
doc/article.ms Chet Ramey
|
||||
doc/FAQ Chet Ramey
|
||||
support/cat-s Brian Fox, Chet Ramey
|
||||
support/mksysdefs Brian Fox, Chet Ramey
|
||||
support/mkversion.c Brian Fox, Chet Ramey
|
||||
support/mksignames.c Brian Fox, Chet Ramey
|
||||
support/getcppsyms.c Brian Fox, Chet Ramey
|
||||
support/cppmagic Brian Fox, Chet Ramey
|
||||
support/pagesize.sh Chet Ramey, Brian Fox
|
||||
support/pagesize.c Chet Ramey, Brian Fox
|
||||
support/bash.xbm Brian Fox
|
||||
support/FAQ Brian Fox
|
||||
support/PORTING Brian Fox
|
||||
support/mklinks Brian Fox
|
||||
support/fixlinks Chet Ramey
|
||||
support/mkdirs Chet Ramey
|
||||
support/clone-bash Chet Ramey
|
||||
support/bashbug.sh Chet Ramey
|
||||
support/mkmachtype Chet Ramey
|
||||
support/recho.c Chet Ramey
|
||||
support/config.guess Per Bothner, Chet Ramey
|
||||
support/config.sub Richard Stallman, Chet Ramey
|
||||
support/install.sh MIT X Consortium (X11R5)
|
||||
support/endian.c Chet Ramey
|
||||
support/printenv Chet Ramey
|
||||
examples/precedence-tester Brian Fox, Chet Ramey
|
||||
examples/functions/substr Brian Fox, Chet Ramey
|
||||
examples/functions/kshenv Chet Ramey
|
||||
examples/functions/autoload Chet Ramey
|
||||
examples/functions/csh-compat Brian Fox, Chet Ramey
|
||||
examples/functions/shcat Chet Ramey
|
||||
examples/functions/substr2 Chet Ramey
|
||||
examples/functions/term Chet Ramey
|
||||
examples/functions/whatis Chet Ramey
|
||||
examples/functions/whence Chet Ramey
|
||||
examples/functions/func Chet Ramey
|
||||
examples/functions/dirname Brian Fox, Noah Friedman
|
||||
examples/functions/basename Brian Fox, Noah Friedman
|
||||
examples/functions/exitstat Noah Friedman, Roland McGrath
|
||||
examples/functions/external Noah Friedman
|
||||
examples/functions/fact Brian Fox
|
||||
examples/functions/manpage Tom Tromey
|
||||
examples/functions/fstty Chet Ramey
|
||||
examples/functions/jj.bash Chet Ramey
|
||||
examples/functions/notify.bash Chet Ramey
|
||||
examples/scripts/shprompt Chet Ramey
|
||||
examples/scripts/adventure.sh Chet Ramey, Doug Gwyn
|
||||
examples/scripts/bcsh.sh Chris Robertson, Chet Ramey
|
||||
examples/startup-files/Bashrc Brian Fox
|
||||
examples/startup-files/Bash_aliases Brian Fox
|
||||
examples/startup-files/Bash_profile Brian Fox
|
||||
examples/startup-files/bash-profile Brian Fox
|
||||
examples/startup-files/bashrc Chet Ramey
|
||||
examples/suncmd.termcap Brian Fox, Chet Ramey
|
||||
examples/alias-conv.sh Brian Fox, Chet Ramey
|
||||
tests/README Chet Ramey
|
||||
tests/arith.tests Chet Ramey
|
||||
tests/arith.right Chet Ramey
|
||||
tests/array.tests Chet Ramey
|
||||
tests/array.right Chet Ramey
|
||||
tests/dollar-at.sh Chet Ramey
|
||||
tests/dollar-star.sh Chet Ramey
|
||||
tests/dollar.right Chet Ramey
|
||||
tests/exp-tests Chet Ramey
|
||||
tests/exp.right Chet Ramey
|
||||
tests/glob-test Chet Ramey
|
||||
tests/glob.right Chet Ramey
|
||||
tests/ifs-test-1.sh Chet Ramey
|
||||
tests/ifs-test-2.sh Chet Ramey
|
||||
tests/ifs-test-3.sh Chet Ramey
|
||||
tests/ifs.1.right Chet Ramey
|
||||
tests/ifs.2.right Chet Ramey
|
||||
tests/ifs.3.right Chet Ramey
|
||||
tests/input-line.sh Chet Ramey
|
||||
tests/input-line.sub Chet Ramey
|
||||
tests/input.right Chet Ramey
|
||||
tests/minus-e Chet Ramey
|
||||
tests/minus-e.right Chet Ramey
|
||||
tests/new-exp.tests Chet Ramey
|
||||
tests/new-exp.right Chet Ramey
|
||||
tests/prec.right Chet Ramey
|
||||
tests/precedence Chet Ramey
|
||||
tests/run-all Chet Ramey
|
||||
tests/run-dollars Chet Ramey
|
||||
tests/run-exp-tests Chet Ramey
|
||||
tests/run-glob-test Chet Ramey
|
||||
tests/run-ifs-tests Chet Ramey
|
||||
tests/run-input-test Chet Ramey
|
||||
tests/run-minus-e Chet Ramey
|
||||
tests/run-new-exp Chet Ramey
|
||||
tests/run-precedence Chet Ramey
|
||||
tests/run-set-e-test Chet Ramey
|
||||
tests/run-strip Chet Ramey
|
||||
tests/run-varenv Chet Ramey
|
||||
tests/set-e-test Chet Ramey
|
||||
tests/set-e.right Chet Ramey
|
||||
tests/strip.tests Chet Ramey
|
||||
tests/strip.right Chet Ramey
|
||||
tests/tilde-tests Chet Ramey
|
||||
tests/tilde.right Chet Ramey
|
||||
tests/varenv.right Chet Ramey
|
||||
tests/varenv.sh Chet Ramey
|
||||
tests/misc/chld-trap.sh Chet Ramey
|
||||
tests/misc/dot-test-1.sh Chet Ramey
|
||||
tests/misc/dot-test-1.sub Chet Ramey
|
||||
tests/misc/gotest Chet Ramey
|
||||
tests/misc/perf-script Chet Ramey
|
||||
tests/misc/redir.t1.sh Chet Ramey
|
||||
tests/misc/redir.t2.sh Chet Ramey
|
||||
tests/misc/redir.t3.sh Chet Ramey
|
||||
tests/misc/redir.t3.sub Chet Ramey
|
||||
tests/misc/redir.t4.sh Chet Ramey
|
||||
tests/misc/run.r1.sh Chet Ramey
|
||||
tests/misc/run.r2.sh Chet Ramey
|
||||
tests/misc/run.r3.sh Chet Ramey
|
||||
tests/misc/sigint.t1.sh Chet Ramey
|
||||
tests/misc/sigint.t2.sh Chet Ramey
|
||||
tests/misc/sigint.t3.sh Chet Ramey
|
||||
tests/misc/sigint.t4.sh Chet Ramey
|
||||
tests/misc/test-minus-e.1 Chet Ramey
|
||||
tests/misc/test-minus-e.2 Chet Ramey
|
||||
lib/sh/Makefile.in Chet Ramey
|
||||
lib/sh/clktck.c Chet Ramey
|
||||
lib/sh/clock.c Chet Ramey
|
||||
lib/sh/fmtullong.c Chet Ramey
|
||||
lib/sh/fmtulong.c Chet Ramey
|
||||
lib/sh/getcwd.c Chet Ramey, Roland McGrath
|
||||
lib/sh/getenv.c Chet Ramey, Brian Fox
|
||||
lib/sh/inet_aton.c Chet Ramey, Ulrich Drepper, Paul Vixie
|
||||
lib/sh/itos.c Chet Ramey
|
||||
lib/sh/mailstat.c Chet Ramey
|
||||
lib/sh/makepath.c Chet Ramey
|
||||
lib/sh/mktime.c Chet Ramey, Paul Eggert
|
||||
lib/sh/netconn.c Chet Ramey
|
||||
lib/sh/netopen.c Chet Ramey
|
||||
lib/sh/oslib.c Chet Ramey, Brian Fox
|
||||
lib/sh/pathcanon.c Chet Ramey
|
||||
lib/sh/pathphys.c Chet Ramey
|
||||
lib/sh/rename.c Chet Ramey
|
||||
lib/sh/setlinebuf.c Chet Ramey, Brian Fox
|
||||
lib/sh/shquote.c Chet Ramey
|
||||
lib/sh/shtty.c Chet Ramey
|
||||
lib/sh/snprintf.c Chet Ramey, Unknown
|
||||
lib/sh/spell.c Chet Ramey
|
||||
lib/sh/strcasecmp.c Chet Ramey, Brian Fox
|
||||
lib/sh/strerror.c Chet Ramey, Brian Fox
|
||||
lib/sh/strftime.c Arnold Robbins
|
||||
lib/sh/strindex.c Chet Ramey
|
||||
lib/sh/stringlist.c Chet Ramey
|
||||
lib/sh/stringvec.c Chet Ramey
|
||||
lib/sh/strpbrk.c Roland McGrath
|
||||
lib/sh/strtod.c Chet Ramey, Roland McGrath
|
||||
lib/sh/strtoimax.c Chet Ramey, Paul Eggert
|
||||
lib/sh/strtol.c Chet Ramey, Paul Eggert
|
||||
lib/sh/strtoll.c Chet Ramey, Paul Eggert
|
||||
lib/sh/strtoul.c Chet Ramey, Paul Eggert
|
||||
lib/sh/strtoull.c Chet Ramey, Paul Eggert
|
||||
lib/sh/strtoumax.c Chet Ramey, Paul Eggert
|
||||
lib/sh/strtrans.c Chet Ramey
|
||||
lib/sh/times.c Chet Ramey, Brian Fox
|
||||
lib/sh/timeval.c Chet Ramey
|
||||
lib/sh/tmpfile.c Chet Ramey
|
||||
lib/sh/vprint.c Chet Ramey, Brian Fox
|
||||
lib/sh/xstrchr.c Chet Ramey, Mitsuru Chinen
|
||||
lib/sh/zread.c Chet Ramey
|
||||
lib/sh/zwrite.c Chet Ramey
|
||||
|
||||
tests/posix-ifs.sh Glenn Fowler
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,258 @@
|
||||
This document details the incompatibilities between this version of bash,
|
||||
bash-3.1, and the previous widely-available versions, bash-1.14 (which is
|
||||
still the `standard' version for a few Linux distributions) and bash-2.x.
|
||||
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
|
||||
a variable whose name is the value of a second variable:
|
||||
|
||||
eval var2=$"$var1"
|
||||
|
||||
you will have to change to a different syntax.
|
||||
|
||||
This capability is directly supported by bash-2.0:
|
||||
|
||||
var2=${!var1}
|
||||
|
||||
This alternate syntax will work portably between bash-1.14 and bash-2.0:
|
||||
|
||||
eval var2=\$${var1}
|
||||
|
||||
2. One of the bugs fixed in the YACC grammar tightens up the rules
|
||||
concerning group commands ( {...} ). The `list' that composes the
|
||||
body of the group command must be terminated by a newline or
|
||||
semicolon. That's because the braces are reserved words, and are
|
||||
recognized as such only when a reserved word is legal. This means
|
||||
that while bash-1.14 accepted shell function definitions like this:
|
||||
|
||||
foo() { : }
|
||||
|
||||
bash-2.0 requires this:
|
||||
|
||||
foo() { :; }
|
||||
|
||||
This is also an issue for commands like this:
|
||||
|
||||
mkdir dir || { echo 'could not mkdir' ; exit 1; }
|
||||
|
||||
The syntax required by bash-2.0 is also accepted by bash-1.14.
|
||||
|
||||
3. The options to `bind' have changed to make them more consistent with
|
||||
the rest of the bash builtins. If you are using `bind -d' to list
|
||||
the readline key bindings in a form that can be re-read, use `bind -p'
|
||||
instead. If you were using `bind -v' to list the key bindings, use
|
||||
`bind -P' instead.
|
||||
|
||||
4. The `long' invocation options must now be prefixed by `--' instead
|
||||
of `-'. (The old form is still accepted, for the time being.)
|
||||
|
||||
5. There was a bug in the version of readline distributed with bash-1.14
|
||||
that caused it to write badly-formatted key bindings when using
|
||||
`bind -d'. The only key sequences that were affected are C-\ (which
|
||||
should appear as \C-\\ in a key binding) and C-" (which should appear
|
||||
as \C-\"). If these key sequences appear in your inputrc, as, for
|
||||
example,
|
||||
|
||||
"\C-\": self-insert
|
||||
|
||||
they will need to be changed to something like the following:
|
||||
|
||||
"\C-\\": self-insert
|
||||
|
||||
6. A number of people complained about having to use ESC to terminate an
|
||||
incremental search, and asked for an alternate mechanism. Bash-2.03
|
||||
uses the value of the settable readline variable `isearch-terminators'
|
||||
to decide which characters should terminate an incremental search. If
|
||||
that variable has not been set, ESC and Control-J will terminate a
|
||||
search.
|
||||
|
||||
7. Some variables have been removed: MAIL_WARNING, notify, history_control,
|
||||
command_oriented_history, glob_dot_filenames, allow_null_glob_expansion,
|
||||
nolinks, hostname_completion_file, noclobber, no_exit_on_failed_exec, and
|
||||
cdable_vars. Most of them are now implemented with the new `shopt'
|
||||
builtin; others were already implemented by `set'. Here is a list of
|
||||
correspondences:
|
||||
|
||||
MAIL_WARNING shopt mailwarn
|
||||
notify set -o notify
|
||||
history_control HISTCONTROL
|
||||
command_oriented_history shopt cmdhist
|
||||
glob_dot_filenames shopt dotglob
|
||||
allow_null_glob_expansion shopt nullglob
|
||||
nolinks set -o physical
|
||||
hostname_completion_file HOSTFILE
|
||||
noclobber set -o noclobber
|
||||
no_exit_on_failed_exec shopt execfail
|
||||
cdable_vars shopt cdable_vars
|
||||
|
||||
8. `ulimit' now sets both hard and soft limits and reports the soft limit
|
||||
by default (when neither -H nor -S is specified). This is compatible
|
||||
with versions of sh and ksh that implement `ulimit'. The bash-1.14
|
||||
behavior of, for example,
|
||||
|
||||
ulimit -c 0
|
||||
|
||||
can be obtained with
|
||||
|
||||
ulimit -S -c 0
|
||||
|
||||
It may be useful to define an alias:
|
||||
|
||||
alias ulimit="ulimit -S"
|
||||
|
||||
9. Bash-2.01 uses a new quoting syntax, $'...' to do ANSI-C string
|
||||
translation. Backslash-escaped characters in ... are expanded and
|
||||
replaced as specified by the ANSI C standard.
|
||||
|
||||
10. The sourcing of startup files has changed somewhat. This is explained
|
||||
more completely in the INVOCATION section of the manual page.
|
||||
|
||||
A non-interactive shell not named `sh' and not in posix mode reads
|
||||
and executes commands from the file named by $BASH_ENV. A
|
||||
non-interactive shell started by `su' and not in posix mode will read
|
||||
startup files. No other non-interactive shells read any startup files.
|
||||
|
||||
An interactive shell started in posix mode reads and executes commands
|
||||
from the file named by $ENV.
|
||||
|
||||
11. The <> redirection operator was changed to conform to the POSIX.2 spec.
|
||||
In the absence of any file descriptor specification preceding the `<>',
|
||||
file descriptor 0 is used. In bash-1.14, this was the behavior only
|
||||
when in POSIX mode. The bash-1.14 behavior may be obtained with
|
||||
|
||||
<>filename 1>&0
|
||||
|
||||
12. The `alias' builtin now checks for invalid options and takes a `-p'
|
||||
option to display output in POSIX mode. If you have old aliases beginning
|
||||
with `-' or `+', you will have to add the `--' to the alias command
|
||||
that declares them:
|
||||
|
||||
alias -x='chmod a-x' --> alias -- -x='chmod a-x'
|
||||
|
||||
13. The behavior of range specificiers within bracket matching expressions
|
||||
in the pattern matcher (e.g., [A-Z]) depends on the current locale,
|
||||
specifically the value of the LC_COLLATE environment variable. Setting
|
||||
this variable to C or POSIX will result in the traditional ASCII behavior
|
||||
for range comparisons. If the locale is set to something else, e.g.,
|
||||
en_US (specified by the LANG or LC_ALL variables), collation order is
|
||||
locale-dependent. For example, the en_US locale sorts the upper and
|
||||
lower case letters like this:
|
||||
|
||||
AaBb...Zz
|
||||
|
||||
so a range specification like [A-Z] will match every letter except `z'.
|
||||
Other locales collate like
|
||||
|
||||
aAbBcC...zZ
|
||||
|
||||
which means that [A-Z] matches every letter except `a'.
|
||||
|
||||
The portable way to specify upper case letters is [:upper:] instead of
|
||||
A-Z; lower case may be specified as [:lower:] instead of a-z.
|
||||
|
||||
Look at the manual pages for setlocale(3), strcoll(3), and, if it is
|
||||
present, locale(1).
|
||||
|
||||
You can find your current locale information by running locale(1):
|
||||
|
||||
caleb.ins.cwru.edu(2)$ locale
|
||||
LANG=en_US
|
||||
LC_CTYPE="en_US"
|
||||
LC_NUMERIC="en_US"
|
||||
LC_TIME="en_US"
|
||||
LC_COLLATE="en_US"
|
||||
LC_MONETARY="en_US"
|
||||
LC_MESSAGES="en_US"
|
||||
LC_ALL=en_US
|
||||
|
||||
My advice is to put
|
||||
|
||||
export LC_COLLATE=C
|
||||
|
||||
into /etc/profile and inspect any shell scripts run from cron for
|
||||
constructs like [A-Z]. This will prevent things like
|
||||
|
||||
rm [A-Z]*
|
||||
|
||||
from removing every file in the current directory except those beginning
|
||||
with `z' and still allow individual users to change the collation order.
|
||||
Users may put the above command into their own profiles as well, of course.
|
||||
|
||||
14. Bash versions up to 1.14.7 included an undocumented `-l' operator to
|
||||
the `test/[' builtin. It was a unary operator that expanded to the
|
||||
length of its string argument. This let you do things like
|
||||
|
||||
test -l $variable -lt 20
|
||||
|
||||
for example.
|
||||
|
||||
This was included for backwards compatibility with old versions of the
|
||||
Bourne shell, which did not provide an easy way to obtain the length of
|
||||
the value of a shell variable.
|
||||
|
||||
This operator is not part of the POSIX standard, because one can (and
|
||||
should) use ${#variable} to get the length of a variable's value.
|
||||
Bash-2.x does not support it.
|
||||
|
||||
15. Bash no longer auto-exports the HOME, PATH, SHELL, TERM, HOSTNAME,
|
||||
HOSTTYPE, MACHTYPE, or OSTYPE variables.
|
||||
|
||||
16. Bash no longer initializes the FUNCNAME, GROUPS, or DIRSTACK variables
|
||||
to have special behavior if they appear in the initial environment.
|
||||
|
||||
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.
|
||||
|
||||
19. As of bash-3.0, the pattern substitution operators no longer perform
|
||||
quote removal on the pattern before attempting the match. This is the
|
||||
way the pattern removal functions behave, and is more consistent.
|
||||
|
||||
20. After bash-3.0 was released, I reimplemented tilde expansion, incorporating
|
||||
it into the mainline word expansion code. This fixes the bug that caused
|
||||
the results of tilde expansion to be re-expanded. There is one
|
||||
incompatibility: a ${paramOPword} expansion within double quotes will not
|
||||
perform tilde expansion on WORD. This is consistent with the other
|
||||
expansions, and what POSIX specifies.
|
||||
|
||||
21. A number of variables have the integer attribute by default, so the +=
|
||||
assignment operator returns expected results: RANDOM, LINENO, MAILCHECK,
|
||||
HISTCMD, OPTIND.
|
||||
|
||||
22. Bash-3.x is much stricter about $LINENO correctly reflecting the line
|
||||
number in a script; assignments to LINENO have little effect.
|
||||
|
||||
23. By default, readline binds the terminal special characters to their
|
||||
readline equivalents. As of bash-3.1/readline-5.1, this is optional and
|
||||
controlled by the bind-tty-special-chars readline variable.
|
||||
|
||||
24. The \W prompt string expansion abbreviates $HOME as `~'. The previous
|
||||
behavior is available with ${PWD##/*/}.
|
||||
|
||||
25. The arithmetic exponentiation operator is right-associative as of bash-3.1.
|
||||
|
||||
26. The rules concerning valid alias names are stricter, as per POSIX.2.
|
||||
|
||||
27. The Readline key binding functions now obey the convert-meta setting active
|
||||
when the binding takes place, as the dispatch code does when characters
|
||||
are read and processed.
|
||||
|
||||
28. The historical behavior of `trap' reverting signal disposition to the
|
||||
original handling in the absence of a valid first argument is implemented
|
||||
only if the first argument is a valid signal number.
|
||||
|
||||
29. In versions of bash after 3.1, the ${parameter//pattern/replacement}
|
||||
expansion does not interpret `%' or `#' specially. Those anchors don't
|
||||
have any real meaning when replacing every match.
|
||||
|
||||
30. Beginning with bash-3.1, the combination of posix mode and enabling the
|
||||
`xpg_echo' option causes echo to ignore all options, not looking for `-n'
|
||||
@@ -0,0 +1,347 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
The Free Software Foundation has exempted Bash from the requirement of
|
||||
Paragraph 2c of the General Public License. This is to say, there is
|
||||
no requirement for Bash to print a notice when it is started
|
||||
interactively in the usual way. We made this exception because users
|
||||
and standards expect shells not to print such messages. This
|
||||
exception applies to any program that serves as a shell and that is
|
||||
based primarily on Bash as opposed to other GNU software.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) 19yy <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,111 @@
|
||||
From chet@cwns1.INS.CWRU.Edu Sun Aug 26 17:46:14 1990
|
||||
Flags: 50
|
||||
Received: from cwns1.INS.CWRU.Edu by cwjcc.INS.CWRU.Edu with SMTP (5.61+ida+/CWRU-1.3-decnet)
|
||||
id AA17813; Sun, 26 Aug 90 17:46:14 -0400 (from chet@cwns1.INS.CWRU.Edu for /usr/local/bin/m2mbox /usr/homes/chet/mbox)
|
||||
Received: by cwns1.INS.CWRU.Edu (5.61+ida+/CWRU-1.3-client)
|
||||
id AA00962; Sun, 26 Aug 90 17:46:31 -0400 (from chet for chet@cwjcc.INS.CWRU.Edu)
|
||||
Date: Sun, 26 Aug 90 17:01:56 -0400
|
||||
From: Chet Ramey <chet@cwns1.INS.CWRU.Edu>
|
||||
To: trent@jove.cs.pdx.edu
|
||||
Subject: Re: bash on triton
|
||||
Cc: chet@cwns1.INS.CWRU.Edu
|
||||
Reply-To: chet@po.CWRU.Edu
|
||||
In-Reply-To: Message from trent@jove.cs.pdx.edu of Fri, 24 Aug 90 16:07:19 PDT
|
||||
Message-Id: <9008262101.AA00902.SM@cwns1.INS.CWRU.Edu>
|
||||
Read-Receipt-To: chet@po.CWRU.Edu
|
||||
|
||||
> Actually, it just that PSU gets the short end of the stick compared to
|
||||
> the other state universities because we don't have a division I
|
||||
> football team (no :-).
|
||||
|
||||
Yeah, but didn't you guys produce Neil Lomax (lo these many years ago)? What
|
||||
have the other schools given the NFL lately?
|
||||
|
||||
> First thing I noticed is that this alias fails:
|
||||
> alias .root=/usr/local/.root
|
||||
> The error is:
|
||||
> alias: .root: not a valid shell identifier
|
||||
|
||||
This is correct according to Posix 1003.2a draft 5. An alias must obey this
|
||||
pseudo-regexp:
|
||||
[a-zA-Z_][a-zA-Z0-9_]*
|
||||
|
||||
(That is, only letters, digits, and underscores, and it may not begin with an
|
||||
underscore). This is in the latest version of the manual page, the one in
|
||||
the documentation directory.
|
||||
|
||||
> Also it crashes when PROMPT_COMMAND is set, thus:
|
||||
> bash$ PROMPT_COMMAND="A=`pwd`"
|
||||
> bash$ # just hit return
|
||||
> bash: free: Called with already freed block argument
|
||||
|
||||
I am sorting through this problem right now, and I've discovered a few things
|
||||
(none complimentary to Sun).
|
||||
|
||||
First of all, this crash happens because Sun's programmers are lazy. The Sun
|
||||
malloc allows you to free things multiple times, instead of doing the old
|
||||
|
||||
if (x)
|
||||
free(x);
|
||||
x = NULL;
|
||||
|
||||
trick. The Gnu malloc disallows that.
|
||||
|
||||
The root of this set of problems is that the Sun yyparse() is not reentrant
|
||||
(`impure'). First of all, /usr/lib/yaccpar has changed a number of things
|
||||
to be dynamically allocated that were once static arrays (the state stack
|
||||
and the value stack are the two major ones). Second, some things that used
|
||||
to be automatic variables to yyparse (like the state stack) are now
|
||||
globally static variables in /usr/lib/yaccpar. This means no more
|
||||
indirectly recursive calls to yyparse(). This is pure bogusness, and
|
||||
breaks backwards compatibility in a major way.
|
||||
|
||||
The first indirect call to yyparse() occurs when PROMPT_COMMAND is run
|
||||
through parse_and_execute() (parse.y, around line 1200). The next call to
|
||||
yyparse() in your example (hitting return) returns quickly, putting nothing
|
||||
onto the state stack. Of course, YYACCEPT doesn't check whether anything
|
||||
was put into the stack; it just goes ahead and frees it anyway.
|
||||
|
||||
The next problem arises when PROMPT_COMMAND contains a backquoted command,
|
||||
which is run through parse_and_execute() again. It doesn't matter that
|
||||
this parse_and_execute is in a subshell; the data structures being built by
|
||||
Sun's yacc come along for free when bash forks. The state stack gets all
|
||||
screwed up and a segmentation fault is the inevitable result. If Sun (and,
|
||||
I assume, AT&T, since the SCCS line at the top of /usr/lib/yaccpar
|
||||
indicates that it is derived from S5R3.1) wants to do this kind of shit,
|
||||
they should at least provide a convenience function to clear out the state
|
||||
stack.
|
||||
|
||||
Both of these problems are avoided by using bison. I have put bison on
|
||||
triton (you'll have to redo it if you want it; it looks for the parser
|
||||
skeletons in /home/chet/lib), and a bash compiled with a bison-generated
|
||||
parser does not crash given the above setting of PROMPT_COMMAND. That bash
|
||||
is in /home/chet/bin. I don't know how to solve these problems in a
|
||||
simple way by using the Sun yacc.
|
||||
|
||||
`Byacc' (Berkeley Yacc), the 4.4 BSD rewrite of Yacc by Bob Corbett (who
|
||||
wrote the original version of bison), should also be OK, though I haven't
|
||||
looked at it.
|
||||
|
||||
> That brings up something else: Triton is set up as a mail-less
|
||||
> machine (all mail is forwarded elsewhere). Do you want your mail
|
||||
> forwarded to CWSU?? Right now the bug reports Bash generates are
|
||||
> vanishing. (I don't touch sendmail, and, from what I'm told, I'm
|
||||
> better off that way :-)
|
||||
|
||||
(It's CWRU, by the way.)
|
||||
|
||||
Don't worry, I get them all. Look at the end of shell.c (make_bug_report)
|
||||
where it opens a pipe to `/bin/rmail chet@ins.cwru.edu'.
|
||||
|
||||
Let me know of any more problems you encounter.
|
||||
|
||||
Chet
|
||||
|
||||
|
||||
--
|
||||
Chet Ramey ``Levi Stubbs' tears run down
|
||||
Network Services Group his face...''
|
||||
Case Western Reserve University
|
||||
chet@ins.CWRU.Edu
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
From chet@odin.INS.CWRU.Edu Sat Apr 27 19:54:13 1991
|
||||
Flags: 50
|
||||
Received: from odin.INS.CWRU.Edu by usenet.INS.CWRU.Edu with SMTP (5.65b+ida+/CWRU-1.5-UUCPGW)
|
||||
id AA05700; Sat, 27 Apr 91 19:54:13 -0400 (from chet@odin.INS.CWRU.Edu for /usr/local/bin/m2mbox /usr/homes/chet/mbox)
|
||||
Received: by odin.INS.CWRU.Edu (5.65b+ida+/CWRU-1.4-ins)
|
||||
id AA17732; Sat, 27 Apr 91 19:54:06 -0400 (from chet for chet@usenet.INS.CWRU.Edu)
|
||||
Date: Sat, 27 Apr 91 19:31:16 -0400
|
||||
From: Chet Ramey <chet@odin.INS.CWRU.Edu>
|
||||
To: bfox@ai.mit.edu
|
||||
Subject: Re: [pedz@aixwiz.austin.ibm.com: fd 9 left open bug]
|
||||
Cc: chet@odin.INS.CWRU.Edu, pedz@aixwiz.austin.ibm.com
|
||||
Reply-To: chet@po.CWRU.Edu
|
||||
In-Reply-To: Message from bfox@bears.ece.ucsb.edu of Wed, 24 Apr 91 12:49:33 PDT
|
||||
Message-Id: <9104272331.AA17706.SM@odin.INS.CWRU.Edu>
|
||||
Read-Receipt-To: chet@po.CWRU.Edu
|
||||
|
||||
> Below is something I call Xemacs which goes across the net, sets up the
|
||||
> display variable and then kicks off emacs in such a way that rshd
|
||||
> terminates. The trick is that the shell must die and all file
|
||||
> descriptors going back to rshd must be closed. The same basic script
|
||||
> works with csh but I had to add in the "9>&-" part at the end to make
|
||||
> it work with bash. This is because somehow, file descriptor 9 is left
|
||||
> open and I guess it must be a dup of stdin, stdout, or stderr.
|
||||
|
||||
This is a bug alright, but it's a bug with rshd that's not fixed until
|
||||
4.3-reno.
|
||||
|
||||
rshd sets up a pipe (int pv[2]; if you have the source to the tahoe rshd)
|
||||
to the process it executes and uses it to manage error and control output
|
||||
from over the net. In the child process, it does a dup2(pv[1], 2), but
|
||||
never calls close(pv[1]). Adding that code to the 4.3-tahoe rshd makes it
|
||||
(and the Xemacs script) work right.
|
||||
|
||||
I don't know how to solve this cleanly in bash. Doing a blanket close of
|
||||
all open file descriptors < 2, < 20 is a no-no, especially when we're not
|
||||
interactive. csh `works' because it does the blanket close on startup, but
|
||||
csh can get away with doing that because it doesn't let you manipulate
|
||||
arbitrary file descriptors.
|
||||
|
||||
Chet
|
||||
|
||||
--
|
||||
Chet Ramey Internet: chet@po.CWRU.Edu
|
||||
Case Western Reserve University NeXT Mail: chet@macbeth.INS.CWRU.Edu
|
||||
|
||||
``Now, somehow we've brought our sins back physically -- and they're pissed.''
|
||||
@@ -0,0 +1,38 @@
|
||||
From chet Thu Aug 13 10:42:35 1992
|
||||
Flags: 50
|
||||
Received: by odin.INS.CWRU.Edu (5.65b+ida+/CWRU-1.5-ins)
|
||||
id AA07004; Thu, 13 Aug 92 10:42:35 -0400 (from chet for /usr/homes/chet/bin/mailfilter.sh /usr/homes/chet/mbox)
|
||||
Date: Thu, 13 Aug 1992 10:34:47 -0400
|
||||
From: Chet Ramey <chet@odin.INS.CWRU.Edu>
|
||||
To: przemek@rrdstrad.nist.gov
|
||||
Subject: Re: output of background jobs in BASH
|
||||
Cc: bug-bash@prep.ai.mit.edu, chet
|
||||
Reply-To: chet@po.CWRU.Edu
|
||||
In-Reply-To: Message from przemek@rrdstrad.nist.gov of 12 Aug 92 18:15:53 GMT
|
||||
Message-Id: <9208131434.AA00639.SM@odin.INS.CWRU.Edu>
|
||||
Read-Receipt-To: chet@po.CWRU.Edu
|
||||
|
||||
> I believe that this changed when I installed bash 1.12: when I put a job that
|
||||
> prints on stdout in background (^Z/bg or directly by &), the output comes out
|
||||
> staggered, as if the CR wasn't being added to the LF at the end of the lines.
|
||||
|
||||
This is a result of bash using the BSD-style tty driver on Ultrix. The BSD
|
||||
driver ties input and output carriage return translation together with the
|
||||
CRMOD bit. (The CRMOD bit causes CR->LF translation on input and LF->CRLF
|
||||
translation on output.) Unless the CRMOD bit is cleared, it is impossible
|
||||
to get a literal ^M in an input line. Unfortunately, one of the effects of
|
||||
clearing it is the loss of output processing you've observed.
|
||||
|
||||
The Ultrix Posix-style tty driver can't be used because it has serious
|
||||
problems with losing typeahead when ICANON is switched on and off. These
|
||||
characters seem to reappear later without warning, usually when a
|
||||
program that uses the BSD-style ioctls turns on CBREAK (e.g., `more').
|
||||
|
||||
Chet
|
||||
|
||||
--
|
||||
``The use of history as therapy means the corruption of history as history.''
|
||||
-- Arthur Schlesinger
|
||||
|
||||
Chet Ramey, Case Western Reserve University Internet: chet@po.CWRU.Edu
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
The HP/UX manual page for ulimit(2) reports that ulimit(1, 0L) will return
|
||||
the maximum file size in terms of 512-byte blocks. It lies, at least on
|
||||
HP/UX 6.5; the number of bytes is returned.
|
||||
@@ -0,0 +1,137 @@
|
||||
Article 7946 of comp.unix.sysv386:
|
||||
Newsgroups: comp.unix.sysv386
|
||||
Path: usenet.ins.cwru.edu!agate!stanford.edu!snorkelwacker.mit.edu!think.com!zaphod.mps.ohio-state.edu!rpi!batcomputer!cornell!rochester!lubkin
|
||||
From: lubkin@cs.rochester.edu (Saul Lubkin)
|
||||
Subject: Binary patch to os.o fixes POSIX panics using VP/ix with job controlled bash
|
||||
Message-ID: <1991Apr30.034006.24056@cs.rochester.edu>
|
||||
Organization: Computer Science Department University of Rochester
|
||||
Date: Tue, 30 Apr 1991 03:40:06 GMT
|
||||
|
||||
|
||||
Recently, Uwe Doering posted the following article:
|
||||
|
||||
Article 6891 of comp.unix.sysv386:
|
||||
Path: nancy!uunet!math.fu-berlin.de!fub!geminix.in-berlin.de!gemini
|
||||
From: gemini@geminix.in-berlin.de (Uwe Doering)
|
||||
Newsgroups: comp.unix.sysv386
|
||||
Subject: Re: NAMEI panic - trap "E", address and info follows (+ patch)
|
||||
Message-ID: <KYXPX2E@geminix.in-berlin.de>
|
||||
Date: 13 Apr 91 00:55:41 GMT
|
||||
References: <1991Apr10.040146.645@ddsw1.MCS.COM>
|
||||
Organization: Private UNIX Site
|
||||
Lines: 92
|
||||
|
||||
karl@ddsw1.MCS.COM (Karl Denninger) writes:
|
||||
|
||||
>Is anyone else having problems with a "namei" panic in ISC 2.2 (with NFS,
|
||||
>the NFS/lockd patches, and POSIX patches applied)?
|
||||
>
|
||||
>I have been getting these nearly daily. Trap type "E", address is d007962f.
|
||||
>That's right near the end of "namei"; here's the relavent line from a "nm"
|
||||
>on the kernel:
|
||||
>
|
||||
>namei |0xd007919c|extern| *struct( )|0x0608| |.text
|
||||
>
|
||||
>Needless to say, I am most displeased with the crashes!
|
||||
>
|
||||
>Near as I can determine, the hardware is fine.
|
||||
>
|
||||
>All pointers or ideas appreciated...
|
||||
|
||||
I found this bug a few days ago and was about to send a bug report
|
||||
to ISC. The problem is "simply" a NULL pointer reference in the
|
||||
namei() function. The machine I found this on runs ISC 2.21 with
|
||||
the security fix installed. I fixed this bug with a binary patch. It
|
||||
is for the module /etc/conf/pack.d/kernel/os.o. I disassembled the
|
||||
original and then the fixed version of os.o and ran a context diff
|
||||
over the output. Depending on what version of the kernel config kit
|
||||
you have the addresses might be off some bytes. You can apply this
|
||||
patch with every binary file editor.
|
||||
|
||||
***************
|
||||
*** 35349,35364 ****
|
||||
[%al,%al]
|
||||
cf71: 74 1e je 0x1e <cf91>
|
||||
[0xcf91]
|
||||
! cf73: 0f b7 07 movzwl (%edi),%eax
|
||||
[%edi,%eax]
|
||||
! cf76: 3d 11 00 00 00 cmpl $0x11,%eax
|
||||
[$0x11,%eax]
|
||||
! cf7b: 74 14 je 0x14 <cf91>
|
||||
[0xcf91]
|
||||
! cf7d: c7 45 e8 00 00 00 00 movl $0x0,0xe8(%ebp)
|
||||
! [$0x0,-24+%ebp]
|
||||
! cf84: eb 19 jmp 0x19 <cf9f>
|
||||
! [0xcf9f]
|
||||
cf86: 90 nop
|
||||
[]
|
||||
cf87: 90 nop
|
||||
--- 35349,35372 ----
|
||||
[%al,%al]
|
||||
cf71: 74 1e je 0x1e <cf91>
|
||||
[0xcf91]
|
||||
! cf73: 85 ff testl %edi,%edi
|
||||
! [%edi,%edi]
|
||||
! cf75: 74 1a je 0x1a <cf91>
|
||||
! [0xcf91]
|
||||
! cf77: 0f b7 07 movzwl (%edi),%eax
|
||||
[%edi,%eax]
|
||||
! cf7a: 3d 11 00 00 00 cmpl $0x11,%eax
|
||||
[$0x11,%eax]
|
||||
! cf7f: 74 10 je 0x10 <cf91>
|
||||
[0xcf91]
|
||||
! cf81: eb 15 jmp 0x15 <cf98>
|
||||
! [0xcf98]
|
||||
! cf83: 90 nop
|
||||
! []
|
||||
! cf84: 90 nop
|
||||
! []
|
||||
! cf85: 90 nop
|
||||
! []
|
||||
cf86: 90 nop
|
||||
[]
|
||||
cf87: 90 nop
|
||||
|
||||
I'm not absolutely sure whether the action that is now taken in case of
|
||||
a NULL pointer is the right one, but I haven't noticed any problems,
|
||||
and most important, there are no more kernel panics! At least not from
|
||||
that spot. :-) The action that is taken if the pointer in _not_ NULL
|
||||
hasn't changed (this is not very obvious from the patch, but look
|
||||
in the disassembler listing of your own kernel for more details).
|
||||
I use this modified kernel for over a week now and it works for
|
||||
me. Of course, as always, I can't give you any guaranty that this
|
||||
patch does something useful on your machine. :-)
|
||||
|
||||
Hope this helps you.
|
||||
|
||||
Uwe
|
||||
|
||||
PS: ISC, if you see this posting, could you drop me a note on whether
|
||||
you have put this on your to-do list? This would save me the time
|
||||
needed to file an official bug report.
|
||||
--
|
||||
Uwe Doering | INET : gemini@geminix.in-berlin.de
|
||||
Berlin |----------------------------------------------------------------
|
||||
Germany | UUCP : ...!unido!fub!geminix.in-berlin.de!gemini
|
||||
=======================================================================
|
||||
|
||||
|
||||
Here is a copy of my recent note to Uwe:
|
||||
|
||||
|
||||
I've applied the binary patch that you recently poosted to comp.unix.sysv386
|
||||
for os.o.
|
||||
|
||||
It works beautifully. Previously, I had compiled bash1.07CWRU, and it worked
|
||||
well (using POSIX job control), job control and all -- but running VP/ix under
|
||||
this bash caused a system panic. This evidently is the (now infamous) "POSIX
|
||||
namei bug". After rebuilding the kernel with a patched os.o, the problem
|
||||
simply disappeared. VP/ix, like everything else, now works fine under
|
||||
bash1.07CWRU.
|
||||
|
||||
|
||||
Yours sincerely,
|
||||
|
||||
Saul Lubkin
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
From chet@odin.INS.CWRU.Edu Thu Mar 7 19:16:25 1991
|
||||
Flags: 50
|
||||
Received: from odin.INS.CWRU.Edu by usenet.INS.CWRU.Edu with SMTP (5.61+ida+/CWRU-1.4-UUCPGW)
|
||||
id AA00967; Thu, 7 Mar 91 19:16:25 -0500 (from chet@odin.INS.CWRU.Edu for /usr/local/bin/m2mbox /usr/homes/chet/mbox)
|
||||
Received: by odin.INS.CWRU.Edu (5.65+ida+/CWRU-1.4-ins)
|
||||
id AA04437; Thu, 7 Mar 91 19:15:31 -0500 (from chet for chet@usenet.INS.CWRU.Edu)
|
||||
Date: Thu, 7 Mar 91 19:10:00 -0500
|
||||
From: Chet Ramey <chet@odin.INS.CWRU.Edu>
|
||||
To: jacob@blackbox.gore.com
|
||||
Subject: Re: Library function redefinition
|
||||
Cc: chet@odin.INS.CWRU.Edu, bfox@ai.mit.edu
|
||||
Reply-To: chet@po.CWRU.Edu
|
||||
In-Reply-To: Message from jacob@blackbox.gore.com of Sun, 3 Mar 91 19:18:54 MST
|
||||
Message-Id: <9103080010.AA04427.SM@odin.INS.CWRU.Edu>
|
||||
Read-Receipt-To: chet@po.CWRU.Edu
|
||||
|
||||
> Now that you're working on bash for NeXT, let me ask you if you've run into
|
||||
> this bug under 2.0: bash, as a login shell, hangs on rlogin into the NeXT.
|
||||
> But it works fine on telnet. On rlogin, I even get no output to stdout
|
||||
> from the 'tset' (or debugging 'echo's) in my startup files.
|
||||
|
||||
It's getting stuck in initialize_jobs (). There is a bug in the NeXT
|
||||
/usr/etc/rlogind that causes bash to be started with the terminal still
|
||||
belonging to the rlogind process, and its process group set to 0 (so
|
||||
that getpgrp() returns 0 (!)). It looks like there's a stray setpgrp(0, 0)
|
||||
in the rlogind code that NeXT is not handling like 4.3 BSD.
|
||||
|
||||
(Another bug that I've found with NeXT 2.0 is that Terminal starts up the
|
||||
shell underneath it with argc == 0 and argv[0] = "-". Not polite.
|
||||
`mount -vat nfs' seems to be broken too. Any more good ones I should look
|
||||
for?)
|
||||
|
||||
Here's a diff to jobs.c to work around it. Your line numbers will certainly
|
||||
vary (for all I know, the code might, too).
|
||||
|
||||
Chet
|
||||
|
||||
*** jobs.c~ Tue Mar 5 17:41:00 1991
|
||||
--- jobs.c Thu Mar 7 18:50:12 1991
|
||||
***************
|
||||
*** 1839,1842 ****
|
||||
--- 1839,1852 ----
|
||||
}
|
||||
|
||||
+ #if defined (NeXT)
|
||||
+ /* This is to compensate for a bug in the NeXT 2.0 /usr/etc/rlogind. */
|
||||
+ if (shell_pgrp == 0)
|
||||
+ {
|
||||
+ shell_pgrp = getpid ();
|
||||
+ setpgid (0, shell_pgrp);
|
||||
+ tcsetpgrp (shell_tty, shell_pgrp);
|
||||
+ }
|
||||
+ #endif /* NeXT */
|
||||
+
|
||||
while ((terminal_pgrp = tcgetpgrp (shell_tty)) != -1)
|
||||
{
|
||||
|
||||
--
|
||||
Chet Ramey ``Now, somehow we've brought our sins
|
||||
Network Services Group back physically -- and they're
|
||||
Case Western Reserve University pissed.''
|
||||
chet@ins.CWRU.Edu My opinions are just those, and mine alone.
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
From gnulists@ai.mit.edu Mon Feb 22 20:41:24 1993
|
||||
Flags: 50
|
||||
Received: from po.CWRU.Edu by odin.INS.CWRU.Edu with SMTP (5.65b+ida+/CWRU-1.5.4-ins)
|
||||
id AA17713; Mon, 22 Feb 93 20:41:24 -0500 (from gnulists@ai.mit.edu for /usr/homes/chet/bin/mailfilter.sh /usr/homes/chet/mbox)
|
||||
Return-Path: <gnulists@ai.mit.edu>
|
||||
Received: from life.ai.mit.edu by po.CWRU.Edu with SMTP (5.65b+ida+/CWRU-1.9)
|
||||
id AA29616; Mon, 22 Feb 93 20:41:17 -0500 (from gnulists@ai.mit.edu for chet@odin.INS.CWRU.Edu)
|
||||
Received: from raisin-nut (raisin-nut.ai.mit.edu) by life.ai.mit.edu (4.1/AI-4.10) id AA01858; Mon, 22 Feb 93 20:40:47 EST
|
||||
Received: by raisin-nut (4.1/AI-4.10) id AA06708; Mon, 22 Feb 93 20:40:46 EST
|
||||
Resent-Date: Mon, 22 Feb 1993 13:29:57 -0500
|
||||
Resent-Message-Id: <9302230140.AA06708@raisin-nut>
|
||||
Received: from odin.INS.CWRU.Edu by life.ai.mit.edu (4.1/AI-4.10) id AA19283; Mon, 22 Feb 93 13:36:48 EST
|
||||
Received: by odin.INS.CWRU.Edu (5.65b+ida+/CWRU-1.5.4-ins)
|
||||
id AA27765; Mon, 22 Feb 93 13:36:44 -0500 (from chet for bug-bash@prep.ai.mit.edu)
|
||||
Date: Mon, 22 Feb 1993 13:29:57 -0500
|
||||
From: Chet Ramey <chet@odin.ins.cwru.edu>
|
||||
Sender: gnulists@ai.mit.edu
|
||||
To: pat@bcserv.wustl.edu
|
||||
Subject: Re: bash for SCO Unix 3.2.2/4
|
||||
Cc: bug-bash@prep.ai.mit.edu, chet@odin.ins.cwru.edu
|
||||
Reply-To: chet@po.cwru.edu
|
||||
In-Reply-To: Message from pat@bcserv.wustl.edu of 22 Feb 93 06:23:34 GMT (id <pat.730362214@bcserv>)
|
||||
Message-Id: <9302221829.AA27553.SM@odin.INS.CWRU.Edu>
|
||||
Read-Receipt-To: chet@po.CWRU.Edu
|
||||
Mime-Version: 1.0
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Resent-From: bug-bash-request@prep.ai.mit.edu
|
||||
|
||||
> I've had no luck making either bash-1.11 or bash-1.12 for
|
||||
> SCO Unix v 3.2.2 or 3.2.4...
|
||||
>
|
||||
> bash-1.12 says (specifically) that it's making for 3.2.2, but
|
||||
> still has problems.
|
||||
>
|
||||
> It locks up after a few commnds...
|
||||
>
|
||||
> I don't have GCC right now, so I did have to tell it that I don't
|
||||
> have 'alloca' by undefining it in machines.h - if that could be a problem.
|
||||
|
||||
You can't run bash-1.12 on a 3.2.4 system if it's been compiled on a
|
||||
3.2.2 system. Bash contains a fix for the broken sigsuspend in 3.2.2
|
||||
that breaks bash on 3.2.4, because 3.2.4 has the bug fixed.
|
||||
|
||||
Bash 1.12 should build and run OK out of the box on 3.2.2. For 3.2.4
|
||||
you need to locate the code at around line 1250 of jobs.c and change
|
||||
#if !defined (SCO) to #if 1 so that sigsuspend is used. Then take out
|
||||
the SCO defines in flush_child().
|
||||
|
||||
Chet
|
||||
|
||||
--
|
||||
``The use of history as therapy means the corruption of history as history.''
|
||||
-- Arthur Schlesinger
|
||||
|
||||
Chet Ramey, Case Western Reserve University Internet: chet@po.CWRU.Edu
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From chet@odin.INS.CWRU.Edu Fri May 3 17:22:41 1991
|
||||
Flags: 50
|
||||
Received: from odin.INS.CWRU.Edu by usenet.INS.CWRU.Edu with SMTP (5.65b+ida+/CWRU-1.5-UUCPGW)
|
||||
id AA22515; Fri, 3 May 91 17:22:41 -0400 (from chet@odin.INS.CWRU.Edu for /usr/local/bin/m2mbox /usr/homes/chet/mbox)
|
||||
Received: by odin.INS.CWRU.Edu (5.65b+ida+/CWRU-1.4-ins)
|
||||
id AA07171; Fri, 3 May 91 17:22:21 -0400 (from chet for chet@usenet.INS.CWRU.Edu)
|
||||
Date: Fri, 3 May 91 17:18:03 -0400
|
||||
From: Chet Ramey <chet@odin.INS.CWRU.Edu>
|
||||
To: jp@lysator.liu.se
|
||||
Subject: fixed sequent bug
|
||||
Cc: chet@odin.INS.CWRU.Edu
|
||||
Reply-To: chet@po.CWRU.Edu
|
||||
Message-Id: <9105032118.AA07167.SM@odin.INS.CWRU.Edu>
|
||||
Read-Receipt-To: chet@po.CWRU.Edu
|
||||
|
||||
|
||||
I fixed it. Sequent's fcntl and dup2 are both messed up. They do not set
|
||||
the new descriptor to be open-on-exec. For dup2 it's OK; that's the way
|
||||
4.2 BSD did it. fcntl doing it is a bug, and a bad one.
|
||||
|
||||
Chet
|
||||
|
||||
--
|
||||
Chet Ramey Internet: chet@po.CWRU.Edu
|
||||
Case Western Reserve University NeXT Mail: chet@macbeth.INS.CWRU.Edu
|
||||
|
||||
``Now, somehow we've brought our sins back physically -- and they're pissed.''
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
From chet Mon Jul 27 14:54:45 1992
|
||||
Flags: 50
|
||||
Received: by odin.INS.CWRU.Edu (5.65b+ida+/CWRU-1.5-ins)
|
||||
id AA15494; Mon, 27 Jul 92 14:54:45 -0400 (from chet for /usr/homes/chet/bin/mailfilter.sh /usr/homes/chet/mbox)
|
||||
Date: Mon, 27 Jul 1992 14:29:55 -0400
|
||||
From: Chet Ramey <chet@odin.INS.CWRU.Edu>
|
||||
To: stud7b43@x400gate.bnr.ca
|
||||
Subject: Re: Bug in Bash 1.12.1
|
||||
Cc: bug-bash@ai.mit.edu, chet
|
||||
Reply-To: chet@po.CWRU.Edu
|
||||
In-Reply-To: Message from stud7b43@x400gate.bnr.ca of Mon, 27 Jul 1992 12:30:00 +0000
|
||||
Message-Id: <9207271829.AA14484.SM@odin.INS.CWRU.Edu>
|
||||
Read-Receipt-To: chet@po.CWRU.Edu
|
||||
|
||||
> I seem to have found a bug in Bash.
|
||||
>
|
||||
> How to cause the bug to appear:
|
||||
> 1) Start a long username-completion, e.g.
|
||||
> cat ~user<TAB>
|
||||
> Let it run for a while (don't know exactly how long...)
|
||||
> Before it's finished, hit ^C (or whatever the break character
|
||||
> is set to)
|
||||
> 2) As the next command, run a filename completion with a username in it, eg.
|
||||
> cat ~username/.log<TAB>
|
||||
>
|
||||
> Error message: "free: Called with already freed block argument
|
||||
|
||||
This is a bug in the Sun YP code that everyone seems to have picked up.
|
||||
|
||||
Sun keeps static state in the YP library code -- a pointer into the
|
||||
data returned from the server. When YP initializes itself (setpwent),
|
||||
it looks at this pointer and calls free on it if it's non-null. So far,
|
||||
so good.
|
||||
|
||||
If one of the YP functions is interrupted during getpwent (the exact function
|
||||
is interpretwithsave()), and returns NULL, the pointer is freed without being
|
||||
reset to NULL, and the function returns. The next time getpwent is called,
|
||||
it sees that this pointer is non-null, calls free, and the Gnu free()
|
||||
blows up because it's being asked to free freed memory.
|
||||
|
||||
The traditional Unix mallocs allow memory to be freed multiple times; that's
|
||||
probably why this has never been fixed. You can probably stop it by adding
|
||||
an #undef USE_GNU_MALLOC to the appropriate machine description in machines.h.
|
||||
|
||||
Chet
|
||||
|
||||
--
|
||||
``The use of history as therapy means the corruption of history as history.''
|
||||
-- Arthur Schlesinger
|
||||
|
||||
Chet Ramey, Case Western Reserve University Internet: chet@po.CWRU.Edu
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
From chet@odin.INS.CWRU.Edu Fri Dec 21 10:56:27 1990
|
||||
Flags: 50
|
||||
Received: from odin.INS.CWRU.Edu by usenet.INS.CWRU.Edu with SMTP (5.61+ida+/CWRU-1.3-UUCPGW)
|
||||
id AA27089; Fri, 21 Dec 90 10:56:27 -0500 (from chet@odin.INS.CWRU.Edu for /usr/local/bin/m2mbox.test /usr/homes/chet/mbox)
|
||||
Received: by odin.INS.CWRU.Edu (5.61+ida+/CWRU-1.4-ins)
|
||||
id AA17558; Fri, 21 Dec 90 10:56:18 -0500 (from chet for chet@usenet.INS.CWRU.Edu)
|
||||
Date: Fri, 21 Dec 90 10:36:58 -0500
|
||||
From: Chet Ramey <chet@odin.ins.cwru.edu>
|
||||
To: dbrooks@osf.org
|
||||
Subject: Re: bash and OSF/1
|
||||
Cc: chet@odin.INS.CWRU.Edu
|
||||
Reply-To: chet@po.CWRU.Edu
|
||||
In-Reply-To: Message from dbrooks@osf.org of Fri, 21 Dec 90 10:28:26 EST
|
||||
Message-Id: <9012211536.AA17531.SM@odin.ins.cwru.edu>
|
||||
Read-Receipt-To: chet@po.CWRU.Edu
|
||||
|
||||
> Michael Meissner has been suddenly asked to do Real Work (TM) so it's
|
||||
> unlikely he'll get to do anything with OSF/1 until the new year. We
|
||||
> talked about it, however, and there are a few issues.
|
||||
|
||||
Not (gasp) Real Work!
|
||||
|
||||
> The upshot of the above is: expect a block of #defines based on
|
||||
> __OSF1__, and expect it possibly not to work under all
|
||||
> implementations.
|
||||
|
||||
Works for me.
|
||||
|
||||
> I have two new bugs for you in 1.06.
|
||||
>
|
||||
> - Typeahead is very weird. Often, I will be in a state where a
|
||||
> command is busy, and I type a new one. The shell prompts and
|
||||
> nothing happens; I have to type the line again. Later, if I enter
|
||||
> an interactive command (such as "mail") the missing keystrokes get
|
||||
> delivered to it instead. This is on a pmax, Ultrix 3.1, with some
|
||||
> patches of my own and Michael's fignore patch (that may have caused
|
||||
> it; I haven't investigated yet. Just wanted to see if this rang a bell.)
|
||||
|
||||
Typeahead under Ultrix is wierd. This doesn't happen anywhere else. Here's
|
||||
what it does for me:
|
||||
|
||||
cwjcc$ sleep 4
|
||||
echo hi ; echo hi <----- typeahead while sleeping
|
||||
cwjcc$ <----- nothing comes out
|
||||
cwjcc$ more readline.c
|
||||
readline.c: No such file or directory
|
||||
cwjcc$ echo hi ; echo hi <----- now it does...
|
||||
hi
|
||||
hi
|
||||
|
||||
I'll look at it today.
|
||||
|
||||
> - The sequence
|
||||
> echo foo > /dev/tty
|
||||
> cat bar
|
||||
> produces:
|
||||
> cat: write error: Bad file number
|
||||
|
||||
This only happens under Ultrix, too. It's another consequence of Dec's
|
||||
dup2 fuckup (I am *really*pissed*off* about it; it's caused me to waste a
|
||||
lot of time already). File descriptor 1 is getting set to close-on-exec.
|
||||
I haven't decided whether to hack around it in the code or to just make
|
||||
Ultrix use the dup2 emulation in general.c.
|
||||
|
||||
Cheers,
|
||||
|
||||
Chet
|
||||
|
||||
--
|
||||
Chet Ramey ``I die, Horatio''
|
||||
Network Services Group, Case Western Reserve University
|
||||
chet@ins.CWRU.Edu
|
||||
My opinions are just those, and mine alone.
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
The version of bash in this directory has been compiled on the
|
||||
following systems:
|
||||
|
||||
By chet:
|
||||
|
||||
SunOS 4.1.4
|
||||
SunOS 5.5
|
||||
BSDI BSD/OS 2.1
|
||||
FreeBSD 2.2
|
||||
NetBSD 1.2
|
||||
AIX 4.2
|
||||
AIX 4.1.4
|
||||
HP/UX 9.05, 10.01, 10.10, 10.20
|
||||
Linux 2.0.29 (libc 5.3.12)
|
||||
Linux 2.0.4 (libc 5.3.12)
|
||||
|
||||
By other testers:
|
||||
|
||||
SCO ODT 2.0
|
||||
SCO 3.2v5.0, 3.2v4.2
|
||||
SunOS 5.3
|
||||
SunOS 5.5
|
||||
BSD/OS 2.1
|
||||
FreeBSD 2.2
|
||||
SunOS 4.1.3
|
||||
Irix 5.3
|
||||
Irix 6.2
|
||||
Linux 2.0 (unknown distribution)
|
||||
Digital OSF/1 3.2
|
||||
GNU Hurd 0.1
|
||||
SVR4.2
|
||||
@@ -0,0 +1,82 @@
|
||||
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.2 standard by changing the behavior to match that
|
||||
specified by Posix.2 in areas where the bash default differs.
|
||||
|
||||
The following list is what's changed when `posix mode' is in effect:
|
||||
|
||||
1. When a command in the hash table no longer exists, bash will re-search
|
||||
$PATH to find the new location. This is also available with
|
||||
`shopt -s checkhash'.
|
||||
|
||||
2. The >& redirection does not redirect stdout and stderr.
|
||||
|
||||
3. The message printed by the job control code and builtins when a job
|
||||
exits with a non-zero status is `Done(status)'.
|
||||
|
||||
4. Reserved words may not be aliased.
|
||||
|
||||
5. The Posix.2 PS1 and PS2 expansions of `!' -> history number and
|
||||
`!!' -> `!' are enabled, and parameter expansion is performed on
|
||||
the value regardless of the setting of the `promptvars' option.
|
||||
|
||||
6. Interactive comments are enabled by default. (Note that bash has
|
||||
them on by default anyway.)
|
||||
|
||||
7. The Posix.2 startup files are executed ($ENV) rather than the normal
|
||||
bash files.
|
||||
|
||||
8. Tilde expansion is only performed on assignments preceding a command
|
||||
name, rather than on all assignment statements on the line.
|
||||
|
||||
9. The default history file is ~/.sh_history (default value of $HISTFILE).
|
||||
|
||||
10. The output of `kill -l' prints all the signal names on a single line,
|
||||
separated by spaces.
|
||||
|
||||
11. Non-interactive shells exit if `file' in `. file' is not found.
|
||||
|
||||
12. Redirection operators do not perform pathname expansion on the word
|
||||
in the redirection unless the shell is interactive
|
||||
|
||||
13. Function names must be valid shell identifiers. That is, they may not
|
||||
contain characters other than letters, digits, and underscores, and
|
||||
may not start with a digit. Declaring a function with an illegal name
|
||||
causes a fatal syntax error in non-interactive shells.
|
||||
|
||||
14. Posix.2 `special' builtins are found before shell functions during command
|
||||
lookup.
|
||||
|
||||
15. If a Posix.2 special builtin returns an error status, a non-interactive
|
||||
shell exits. The fatal errors are those listed in the POSIX.2 standard,
|
||||
and include things like passing incorrect options, redirection errors,
|
||||
variable assignment errors for assignments preceding the command name,
|
||||
and so on.
|
||||
|
||||
16. The environment passed to executed commands is not sorted. Neither is
|
||||
the output of `set'. This is not strictly Posix.2 behavior, but sh
|
||||
does it this way. Ksh does not. It's not necessary to sort the
|
||||
environment; no program should rely on it being sorted.
|
||||
|
||||
17. If the `cd' builtin finds a directory to change to using $CDPATH, the
|
||||
value it assigns to $PWD does not contain any symbolic links, as if
|
||||
`cd -P' had been executed.
|
||||
|
||||
18. A non-interactive shell exits with an error status if a variable
|
||||
assignment error occurs when no command name follows the assignment
|
||||
statements. A variable assignment error occurs, for example, when
|
||||
trying to assign a value to a read-only variable.
|
||||
|
||||
19. A non-interactive shell exits with an error status if the iteration
|
||||
variable in a for statement or the selection variable in a select
|
||||
statement is a read-only variable.
|
||||
|
||||
20. Process substitution is not available.
|
||||
|
||||
21. Assignment statements preceding POSIX.2 `special' builtins persist in
|
||||
the shell environment after the builtin completes.
|
||||
|
||||
There is other Posix.2 behavior that bash does not implement. Specifically:
|
||||
|
||||
1. Assignment statements affect the execution environment of all builtins,
|
||||
not just special ones.
|
||||
@@ -0,0 +1,20 @@
|
||||
Contents of this directory:
|
||||
|
||||
changelog - my change log since the last release
|
||||
|
||||
POSIX.NOTES - list of what changes for `posix mode'
|
||||
|
||||
README - this file
|
||||
|
||||
misc - directory with some useful tools
|
||||
|
||||
The following are distributed `as-is'. They will not apply without some
|
||||
modification.
|
||||
|
||||
sh-redir-hack - diff to parse.y to get redirections before
|
||||
compound commands
|
||||
|
||||
empty-for-wordlist - diff to parse.y to allow an empty wordlist after
|
||||
the `in' keyword in a `for' statement
|
||||
|
||||
mh-folder-comp - diffs that reportedly add MH folder completion
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
CWRU.chlog
|
||||
@@ -0,0 +1,47 @@
|
||||
#Date: Mon, 14 Dec 1998 23:10:43 -0800
|
||||
#From: John Kinsella <jlk@digex.net>
|
||||
#To: chet@po.cwru.edu
|
||||
#Subject: Re: bash patch
|
||||
|
||||
diff -c bash-2.02.1-old/bashhist.c bash-2.02.1/bashhist.c
|
||||
*** bash-2.02.1-old/bashhist.c Fri Feb 27 09:34:33 1998
|
||||
--- bash-2.02.1/bashhist.c Mon Dec 14 22:39:23 1998
|
||||
***************
|
||||
*** 50,55 ****
|
||||
--- 50,65 ----
|
||||
# include "bashline.h"
|
||||
#endif
|
||||
|
||||
+ /* SYSLOG_HISTORY - define this if you want all commands entered into
|
||||
+ * the shell to be echoed to syslog.
|
||||
+ * (feature added by John Kinsella<jlk@digex.net>)
|
||||
+ */
|
||||
+ #define SYSLOG_HISTORY 1
|
||||
+
|
||||
+ #if defined (SYSLOG_HISTORY)
|
||||
+ # include <syslog.h>
|
||||
+ #endif
|
||||
+
|
||||
#if !defined (errno)
|
||||
extern int errno;
|
||||
#endif
|
||||
***************
|
||||
*** 566,571 ****
|
||||
--- 576,587 ----
|
||||
{
|
||||
hist_last_line_added = 1;
|
||||
add_history (line);
|
||||
+ /* next 3 lines added by John Kinsella<jlk@digex.net>
|
||||
+ * Sends history line to syslog.
|
||||
+ */
|
||||
+ #if defined( SYSLOG_HISTORY )
|
||||
+ syslog( LOG_INFO, "%d - %s", current_user.euid, line );
|
||||
+ #endif
|
||||
history_lines_this_session++;
|
||||
}
|
||||
using_history ();
|
||||
#
|
||||
#--
|
||||
#John Kinsella UNIX ISA
|
||||
#jlk@digex.net DIGEX West Coast Facility
|
||||
#voice 408-873-4278 pager 888-751-7595
|
||||
@@ -0,0 +1,449 @@
|
||||
From jwe@che.utexas.edu Wed Sep 21 17:23:40 1994
|
||||
Flags: 10
|
||||
Return-Path: jwe@che.utexas.edu
|
||||
Received: from po.CWRU.Edu (root@po.CWRU.Edu [129.22.4.2]) by odin.INS.CWRU.Edu with ESMTP (8.6.8.1+cwru/CWRU-2.1-ins)
|
||||
id RAA04010; Wed, 21 Sep 1994 17:23:39 -0400 (from jwe@che.utexas.edu for <chet@odin.INS.CWRU.Edu>)
|
||||
Received: from life.ai.mit.edu (life.ai.mit.edu [128.52.32.80]) by po.CWRU.Edu with SMTP (8.6.8.1+cwru/CWRU-2.2)
|
||||
id RAA02121; Wed, 21 Sep 1994 17:23:28 -0400 (from jwe@che.utexas.edu for <chet@po.cwru.edu>)
|
||||
Received: from schoch.che.utexas.edu by life.ai.mit.edu (4.1/AI-4.10) for chet@po.cwru.edu id AA09989; Wed, 21 Sep 94 17:23:17 EDT
|
||||
Received: from localhost (jwe@localhost) by schoch.che.utexas.edu (8.6.8.1/8.6) with SMTP id QAA05737; Wed, 21 Sep 1994 16:22:01 -0500
|
||||
Message-Id: <199409212122.QAA05737@schoch.che.utexas.edu>
|
||||
To: march@tudor.com
|
||||
Cc: bug-bash@prep.ai.mit.edu
|
||||
Subject: Re: Completion feature possible?
|
||||
In-Reply-To: Your message of 21 Sep 94 13:30:22 EDT
|
||||
Date: Wed, 21 Sep 94 16:22:00 EDT
|
||||
From: John Eaton <jwe@che.utexas.edu>
|
||||
|
||||
Gregory F. March <march@tudor.com> wrote:
|
||||
|
||||
: I was having a discussion about MH with one of my friends the other
|
||||
: day and I got to thinking that the +folder/subfolder scheme for naming
|
||||
: mail folders is a real pain because completion doesn't work on
|
||||
: them. Someone then mentioned that zsh (I think) has the ability to
|
||||
: specify how to complete (I guess where to look for the files) for
|
||||
: different prefixes. Bash right now knows about '@', '~', and '$' (any
|
||||
: others?). It would be really helpful if one could define something
|
||||
: like:
|
||||
:
|
||||
: completion '+' "$HOME/Mail"
|
||||
:
|
||||
: in a config file someplace. Would this be easy? Is there a list of
|
||||
: TODO item that someone might want to add this to?
|
||||
|
||||
It would be nice to have a general completion feature like this.
|
||||
|
||||
Until that happens, maybe you will find the following patch useful.
|
||||
It makes MH folder name completion work with bash. The diffs are
|
||||
relative to version 1.14.2.
|
||||
|
||||
I realize that changes to readline.c and and complete.c are not good
|
||||
since they add some MH-specific stuff to the readline code and not to
|
||||
bash, but when I first wrote this, I had no idea what else to do.
|
||||
|
||||
Chet, would you consider adding this if it were cleaned up a bit?
|
||||
Made optional with cpp conditionals?
|
||||
|
||||
This feature has been very useful to me for the last several years
|
||||
(since about 1.05 or 1.06, I think).
|
||||
|
||||
Thanks,
|
||||
|
||||
--
|
||||
John W. Eaton | 4.3BSD is not perfect. -- Leffler, et al. (1989).
|
||||
jwe@che.utexas.edu |
|
||||
|
||||
|
||||
-------------------------------cut here-------------------------------
|
||||
diff -rc bash-1.14.2/bashline.c bash-1.14.2.local/bashline.c
|
||||
*** bash-1.14.2/bashline.c Wed Aug 3 09:32:45 1994
|
||||
--- bash-1.14.2.local/bashline.c Wed Sep 21 15:39:04 1994
|
||||
***************
|
||||
*** 58,63 ****
|
||||
--- 58,64 ----
|
||||
static char *hostname_completion_function ();
|
||||
static char *command_word_completion_function ();
|
||||
static char *command_subst_completion_function ();
|
||||
+ static char *mh_folder_completion_function ();
|
||||
|
||||
static void snarf_hosts_from_file (), add_host_name ();
|
||||
static void sort_hostname_list ();
|
||||
***************
|
||||
*** 90,95 ****
|
||||
--- 91,98 ----
|
||||
bash_complete_username_internal (),
|
||||
bash_complete_hostname (), bash_possible_hostname_completions (),
|
||||
bash_complete_hostname_internal (),
|
||||
+ bash_complete_mh_folder (), bash_possible_mh_folder_completions (),
|
||||
+ bash_complete_mh_folder_internal (),
|
||||
bash_complete_variable (), bash_possible_variable_completions (),
|
||||
bash_complete_variable_internal (),
|
||||
bash_complete_command (), bash_possible_command_completions (),
|
||||
***************
|
||||
*** 134,140 ****
|
||||
rl_terminal_name = get_string_value ("TERM");
|
||||
rl_instream = stdin;
|
||||
rl_outstream = stderr;
|
||||
! rl_special_prefixes = "$@";
|
||||
|
||||
/* Allow conditional parsing of the ~/.inputrc file. */
|
||||
rl_readline_name = "Bash";
|
||||
--- 137,143 ----
|
||||
rl_terminal_name = get_string_value ("TERM");
|
||||
rl_instream = stdin;
|
||||
rl_outstream = stderr;
|
||||
! rl_special_prefixes = "$@+";
|
||||
|
||||
/* Allow conditional parsing of the ~/.inputrc file. */
|
||||
rl_readline_name = "Bash";
|
||||
***************
|
||||
*** 193,198 ****
|
||||
--- 196,207 ----
|
||||
rl_bind_key_in_map ('@', bash_possible_hostname_completions,
|
||||
emacs_ctlx_keymap);
|
||||
|
||||
+ rl_add_defun ("complete-mh-folder", bash_complete_mh_folder, META('+'));
|
||||
+ rl_add_defun ("possible-mh-folder-completions",
|
||||
+ bash_possible_mh_folder_completions, -1);
|
||||
+ rl_bind_key_in_map ('+', bash_possible_mh_folder_completions,
|
||||
+ emacs_ctlx_keymap);
|
||||
+
|
||||
rl_add_defun ("complete-variable", bash_complete_variable, -1);
|
||||
rl_bind_key_in_map ('$', bash_complete_variable, emacs_meta_keymap);
|
||||
rl_add_defun ("possible-variable-completions",
|
||||
***************
|
||||
*** 656,661 ****
|
||||
--- 665,677 ----
|
||||
if (!matches && *text == '@')
|
||||
matches = completion_matches (text, hostname_completion_function);
|
||||
|
||||
+ /* Another one. Why not? If the word starts in '+', then look for
|
||||
+ matching mh folders for completion first. */
|
||||
+ if (!matches && *text == '+')
|
||||
+ {
|
||||
+ matches = completion_matches (text, mh_folder_completion_function);
|
||||
+ }
|
||||
+
|
||||
/* And last, (but not least) if this word is in a command position, then
|
||||
complete over possible command names, including aliases, functions,
|
||||
and command names. */
|
||||
***************
|
||||
*** 1077,1082 ****
|
||||
--- 1093,1185 ----
|
||||
return ((char *)NULL);
|
||||
}
|
||||
|
||||
+ /* How about a completion function for mh folders? */
|
||||
+ static char *
|
||||
+ mh_folder_completion_function (text, state)
|
||||
+ int state;
|
||||
+ char *text;
|
||||
+ {
|
||||
+ extern int rl_filename_completion_desired;
|
||||
+
|
||||
+ extern char *get_mh_path ();
|
||||
+
|
||||
+ static char *mh_path = (char *)NULL;
|
||||
+ static int len;
|
||||
+ static int istate;
|
||||
+ static char *val;
|
||||
+ char *hint;
|
||||
+
|
||||
+ static char *mh_folder_hint = (char *)NULL;
|
||||
+
|
||||
+ /* If we don't have any state, make some. */
|
||||
+ if (!state)
|
||||
+ {
|
||||
+ val = (char *)NULL;
|
||||
+
|
||||
+ if (mh_path)
|
||||
+ free (mh_path);
|
||||
+
|
||||
+ mh_path = get_mh_path ();
|
||||
+ if (!mh_path && !(hint[1] == '/' || hint[1] == '.'))
|
||||
+ return ((char *)NULL);
|
||||
+
|
||||
+ len = strlen (mh_path);
|
||||
+ }
|
||||
+
|
||||
+ if (mh_folder_hint)
|
||||
+ free (mh_folder_hint);
|
||||
+
|
||||
+ hint = text;
|
||||
+ if (*hint == '+')
|
||||
+ hint++;
|
||||
+
|
||||
+ mh_folder_hint = (char *)xmalloc (2 + len + strlen (hint));
|
||||
+ if (*hint == '/' || *hint == '.') {
|
||||
+ len = -1;
|
||||
+ sprintf (mh_folder_hint, "%s", hint);
|
||||
+ } else
|
||||
+ sprintf (mh_folder_hint, "%s/%s", mh_path, hint);
|
||||
+
|
||||
+ istate = (val != (char *)NULL);
|
||||
+
|
||||
+ again:
|
||||
+ val = filename_completion_function (mh_folder_hint, istate);
|
||||
+ istate = 1;
|
||||
+
|
||||
+ if (!val)
|
||||
+ {
|
||||
+ return ((char *)NULL);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ char *ptr = val + len + 1, *temp;
|
||||
+ struct stat sb;
|
||||
+ int status = stat (val, &sb);
|
||||
+
|
||||
+ if (status != 0)
|
||||
+ return ((char *)NULL);
|
||||
+
|
||||
+ if ((sb.st_mode & S_IFDIR) == S_IFDIR)
|
||||
+ {
|
||||
+ temp = (char *)xmalloc (2 + strlen (ptr));
|
||||
+ *temp = '+';
|
||||
+ strcpy (temp + 1, ptr);
|
||||
+
|
||||
+ free (val);
|
||||
+ val = "";
|
||||
+
|
||||
+ rl_filename_completion_desired = 1;
|
||||
+
|
||||
+ return (temp);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ free (val);
|
||||
+ }
|
||||
+ goto again;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* History and alias expand the line. */
|
||||
static char *
|
||||
history_expand_line_internal (line)
|
||||
***************
|
||||
*** 1628,1633 ****
|
||||
--- 1731,1773 ----
|
||||
{
|
||||
bash_specific_completion
|
||||
(what_to_do, (Function *)username_completion_function);
|
||||
+ }
|
||||
+
|
||||
+ static void
|
||||
+ bash_complete_mh_folder (ignore, ignore2)
|
||||
+ int ignore, ignore2;
|
||||
+ {
|
||||
+ bash_complete_mh_folder_internal (TAB);
|
||||
+ }
|
||||
+
|
||||
+ static void
|
||||
+ bash_possible_mh_folder_completions (ignore, ignore2)
|
||||
+ int ignore, ignore2;
|
||||
+ {
|
||||
+ bash_complete_mh_folder_internal ('?');
|
||||
+ }
|
||||
+
|
||||
+ static void
|
||||
+ bash_complete_mh_folder_internal (what_to_do)
|
||||
+ int what_to_do;
|
||||
+ {
|
||||
+ Function *orig_func;
|
||||
+ CPPFunction *orig_attempt_func;
|
||||
+ char *orig_rl_completer_word_break_characters;
|
||||
+ extern char *rl_completer_word_break_characters;
|
||||
+
|
||||
+ orig_func = rl_completion_entry_function;
|
||||
+ orig_attempt_func = rl_attempted_completion_function;
|
||||
+ orig_rl_completer_word_break_characters = rl_completer_word_break_characters;
|
||||
+ rl_completion_entry_function = (Function *)mh_folder_completion_function;
|
||||
+ rl_attempted_completion_function = (CPPFunction *)NULL;
|
||||
+ rl_completer_word_break_characters = " \t\n\"\'";
|
||||
+
|
||||
+ rl_complete_internal (what_to_do);
|
||||
+
|
||||
+ rl_completion_entry_function = orig_func;
|
||||
+ rl_attempted_completion_function = orig_attempt_func;
|
||||
+ rl_completer_word_break_characters = orig_rl_completer_word_break_characters;
|
||||
}
|
||||
|
||||
static void
|
||||
Only in bash-1.14.2.local: bashline.c.orig
|
||||
diff -rc bash-1.14.2/lib/readline/complete.c bash-1.14.2.local/lib/readline/complete.c
|
||||
*** bash-1.14.2/lib/readline/complete.c Tue Jul 26 12:59:57 1994
|
||||
--- bash-1.14.2.local/lib/readline/complete.c Wed Sep 21 15:41:19 1994
|
||||
***************
|
||||
*** 733,751 ****
|
||||
if (rl_filename_completion_desired)
|
||||
{
|
||||
struct stat finfo;
|
||||
! char *filename = tilde_expand (matches[0]);
|
||||
|
||||
! if ((stat (filename, &finfo) == 0) && S_ISDIR (finfo.st_mode))
|
||||
{
|
||||
! if (rl_line_buffer[rl_point] != '/')
|
||||
! rl_insert_text ("/");
|
||||
}
|
||||
! else
|
||||
{
|
||||
! if (rl_point == rl_end)
|
||||
! rl_insert_text (temp_string);
|
||||
}
|
||||
- free (filename);
|
||||
}
|
||||
else
|
||||
{
|
||||
--- 733,768 ----
|
||||
if (rl_filename_completion_desired)
|
||||
{
|
||||
struct stat finfo;
|
||||
! char *tilde_expand ();
|
||||
! char *plus_expand ();
|
||||
! char *filename = (char *) NULL;
|
||||
|
||||
! switch (*matches[0])
|
||||
{
|
||||
! case '+':
|
||||
! filename = plus_expand (matches[0]);
|
||||
! break;
|
||||
! case '~':
|
||||
! default:
|
||||
! filename = tilde_expand (matches[0]);
|
||||
! break;
|
||||
}
|
||||
!
|
||||
! if (filename)
|
||||
{
|
||||
! if ((stat (filename, &finfo) == 0)
|
||||
! && S_ISDIR (finfo.st_mode))
|
||||
! {
|
||||
! if (rl_line_buffer[rl_point] != '/')
|
||||
! rl_insert_text ("/");
|
||||
! }
|
||||
! else
|
||||
! {
|
||||
! if (rl_point == rl_end)
|
||||
! rl_insert_text (temp_string);
|
||||
! }
|
||||
! free (filename);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Only in bash-1.14.2.local/lib/readline: diffs
|
||||
diff -rc bash-1.14.2/lib/readline/readline.c bash-1.14.2.local/lib/readline/readline.c
|
||||
*** bash-1.14.2/lib/readline/readline.c Fri Aug 12 12:47:46 1994
|
||||
--- bash-1.14.2.local/lib/readline/readline.c Wed Sep 21 15:36:07 1994
|
||||
***************
|
||||
*** 23,28 ****
|
||||
--- 23,29 ----
|
||||
#define READLINE_LIBRARY
|
||||
|
||||
#include <stdio.h>
|
||||
+ #include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#if !defined (NO_SYS_FILE)
|
||||
***************
|
||||
*** 3518,3523 ****
|
||||
--- 3519,3616 ----
|
||||
}
|
||||
|
||||
#endif /* TEST */
|
||||
+
|
||||
+ #define cr_whitespace(c) ((c) == '\r' || (c) == '\n' || whitespace(c))
|
||||
+
|
||||
+ char *
|
||||
+ get_mh_path ()
|
||||
+ {
|
||||
+ static FILE *fp = (FILE *)NULL;
|
||||
+ char buf[512]; /* XXX */
|
||||
+ char profile[512]; /* XXX */
|
||||
+ char *bp;
|
||||
+ char *temp_home;
|
||||
+ char *temp_path;
|
||||
+
|
||||
+ temp_home = (char *)getenv ("HOME");
|
||||
+ if (!temp_home)
|
||||
+ return ((char *)NULL);
|
||||
+
|
||||
+ strcpy (profile, temp_home);
|
||||
+ strcat (profile, "/.mh_profile");
|
||||
+
|
||||
+ if (fp)
|
||||
+ fclose (fp);
|
||||
+
|
||||
+ fp = fopen (profile, "r");
|
||||
+ if (fp == (FILE *)NULL)
|
||||
+ return ((char *)NULL);
|
||||
+
|
||||
+ while (fgets (buf, 512, fp) != (char *)NULL) /* XXX */
|
||||
+ {
|
||||
+ if ((bp = strstr (buf, "Path:")) != (char *)NULL)
|
||||
+ {
|
||||
+ bp += 5;
|
||||
+ while (whitespace (*bp))
|
||||
+ bp++;
|
||||
+
|
||||
+ if (*bp == '\0')
|
||||
+ return ((char *)NULL);
|
||||
+
|
||||
+ temp_path = (char *)xmalloc (3 + strlen (bp) + strlen (temp_home));
|
||||
+
|
||||
+ strcpy (temp_path, temp_home);
|
||||
+ strcat (temp_path, "/");
|
||||
+ strcat (temp_path, bp);
|
||||
+
|
||||
+ bp = temp_path;
|
||||
+
|
||||
+ while (!(cr_whitespace (*bp)))
|
||||
+ bp++;
|
||||
+
|
||||
+ *bp = '\0';
|
||||
+
|
||||
+ return temp_path;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return ((char *)NULL);
|
||||
+ }
|
||||
+
|
||||
+ /* Expand FILENAME if it begins with a plus. This always returns
|
||||
+ a new string. */
|
||||
+ char *
|
||||
+ plus_expand (filename)
|
||||
+ char *filename;
|
||||
+ {
|
||||
+ static char *dirname = (char *)NULL;
|
||||
+
|
||||
+ if (filename && *filename == '+')
|
||||
+ {
|
||||
+ char *mh_path = get_mh_path ();
|
||||
+
|
||||
+ if (filename[1] == '/' || filename[1] == '.')
|
||||
+ {
|
||||
+ dirname = (char *)xmalloc (1 + strlen (filename));
|
||||
+
|
||||
+ strcpy(dirname, filename+1);
|
||||
+
|
||||
+ return dirname;
|
||||
+ }
|
||||
+
|
||||
+ if (mh_path)
|
||||
+ {
|
||||
+ dirname = (char *)xmalloc (1 + strlen (filename) + strlen (mh_path));
|
||||
+
|
||||
+ strcpy (dirname, mh_path);
|
||||
+ strcat (dirname, "/");
|
||||
+ strcat (dirname, filename+1);
|
||||
+
|
||||
+ return dirname;
|
||||
+ }
|
||||
+ }
|
||||
+ return (char *)NULL;
|
||||
+ }
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# bison -- just call yacc
|
||||
#
|
||||
|
||||
# Copyright (C) 1996-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 USA.
|
||||
|
||||
if [ "$1" = '-y' ]; then
|
||||
shift
|
||||
fi
|
||||
|
||||
exec /usr/bin/yacc ${1+"$@"}
|
||||
@@ -0,0 +1,17 @@
|
||||
/* Copyright (C) 1999 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. */
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* If necessary, link with lib/sh/libsh.a
|
||||
*/
|
||||
|
||||
/* Copyright (C) 1998-2002 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. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
extern char *strerror();
|
||||
|
||||
extern int sys_nerr;
|
||||
|
||||
int
|
||||
main(c, v)
|
||||
int c;
|
||||
char **v;
|
||||
{
|
||||
int i, n;
|
||||
|
||||
if (c == 1) {
|
||||
for (i = 1; i < sys_nerr; i++)
|
||||
printf("%d --> %s\n", i, strerror(i));
|
||||
} else {
|
||||
for (i = 1; i < c; i++) {
|
||||
n = atoi(v[i]);
|
||||
printf("%d --> %s\n", n, strerror(n));
|
||||
}
|
||||
}
|
||||
exit (0);
|
||||
}
|
||||
|
||||
programming_error(a, b)
|
||||
char *a;
|
||||
int b;
|
||||
{
|
||||
}
|
||||
|
||||
fatal_error()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,254 @@
|
||||
/*
|
||||
* Copyright (c) 1989, 1991 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char sccsid[] = "@(#)getcwd.c 5.11 (Berkeley) 2/24/91";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#if defined (HAVE_DIRENT_H)
|
||||
#include <dirent.h>
|
||||
#else
|
||||
#include <sys/dir.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DIRENT_H
|
||||
# define dirent direct
|
||||
#endif
|
||||
|
||||
#define ISDOT(dp) \
|
||||
(dp->d_name[0] == '.' && (dp->d_name[1] == '\0' || \
|
||||
dp->d_name[1] == '.' && dp->d_name[2] == '\0'))
|
||||
|
||||
#ifndef dirfd
|
||||
# define dirfd(d) ((d)->dd_fd)
|
||||
#endif
|
||||
|
||||
char *
|
||||
getcwd(pt, size)
|
||||
char *pt;
|
||||
size_t size;
|
||||
{
|
||||
register struct dirent *dp;
|
||||
register DIR *dir;
|
||||
register dev_t dev;
|
||||
register ino_t ino;
|
||||
register int first;
|
||||
register char *bpt, *bup;
|
||||
struct stat s;
|
||||
dev_t root_dev;
|
||||
ino_t root_ino;
|
||||
size_t ptsize, upsize;
|
||||
int save_errno;
|
||||
char *ept, *eup, *up;
|
||||
|
||||
/*
|
||||
* If no buffer specified by the user, allocate one as necessary.
|
||||
* If a buffer is specified, the size has to be non-zero. The path
|
||||
* is built from the end of the buffer backwards.
|
||||
*/
|
||||
if (pt) {
|
||||
ptsize = 0;
|
||||
if (!size) {
|
||||
errno = EINVAL;
|
||||
return((char *)NULL);
|
||||
}
|
||||
ept = pt + size;
|
||||
} else {
|
||||
if (!(pt = (char *)malloc(ptsize = 1024 - 4)))
|
||||
return((char *)NULL);
|
||||
ept = pt + ptsize;
|
||||
}
|
||||
bpt = ept - 1;
|
||||
*bpt = '\0';
|
||||
|
||||
/*
|
||||
* Allocate bytes (1024 - malloc space) for the string of "../"'s.
|
||||
* Should always be enough (it's 340 levels). If it's not, allocate
|
||||
* as necessary. Special * case the first stat, it's ".", not "..".
|
||||
*/
|
||||
if (!(up = (char *)malloc(upsize = 1024 - 4)))
|
||||
goto err;
|
||||
eup = up + MAXPATHLEN;
|
||||
bup = up;
|
||||
up[0] = '.';
|
||||
up[1] = '\0';
|
||||
|
||||
/* Save root values, so know when to stop. */
|
||||
if (stat("/", &s))
|
||||
goto err;
|
||||
root_dev = s.st_dev;
|
||||
root_ino = s.st_ino;
|
||||
|
||||
errno = 0; /* XXX readdir has no error return. */
|
||||
|
||||
for (first = 1;; first = 0) {
|
||||
/* Stat the current level. */
|
||||
if (lstat(up, &s))
|
||||
goto err;
|
||||
|
||||
/* Save current node values. */
|
||||
ino = s.st_ino;
|
||||
dev = s.st_dev;
|
||||
|
||||
/* Check for reaching root. */
|
||||
if (root_dev == dev && root_ino == ino) {
|
||||
*--bpt = '/';
|
||||
/*
|
||||
* It's unclear that it's a requirement to copy the
|
||||
* path to the beginning of the buffer, but it's always
|
||||
* been that way and stuff would probably break.
|
||||
*/
|
||||
(void)bcopy(bpt, pt, ept - bpt);
|
||||
free(up);
|
||||
return(pt);
|
||||
}
|
||||
|
||||
/*
|
||||
* Build pointer to the parent directory, allocating memory
|
||||
* as necessary. Max length is 3 for "../", the largest
|
||||
* possible component name, plus a trailing NULL.
|
||||
*/
|
||||
if (bup + 3 + MAXNAMLEN + 1 >= eup) {
|
||||
if (!(up = (char *)realloc(up, upsize *= 2)))
|
||||
goto err;
|
||||
eup = up + upsize;
|
||||
}
|
||||
*bup++ = '.';
|
||||
*bup++ = '.';
|
||||
*bup = '\0';
|
||||
|
||||
/* Open and stat parent directory. */
|
||||
if (!(dir = opendir(up)) || fstat(dirfd(dir), &s))
|
||||
goto err;
|
||||
|
||||
/* Add trailing slash for next directory. */
|
||||
*bup++ = '/';
|
||||
|
||||
/*
|
||||
* If it's a mount point, have to stat each element because
|
||||
* the inode number in the directory is for the entry in the
|
||||
* parent directory, not the inode number of the mounted file.
|
||||
*/
|
||||
save_errno = 0;
|
||||
if (s.st_dev == dev) {
|
||||
for (;;) {
|
||||
if (!(dp = readdir(dir)))
|
||||
goto notfound;
|
||||
if (dp->d_fileno == ino)
|
||||
break;
|
||||
}
|
||||
} else
|
||||
for (;;) {
|
||||
if (!(dp = readdir(dir)))
|
||||
goto notfound;
|
||||
if (ISDOT(dp))
|
||||
continue;
|
||||
bcopy(dp->d_name, bup, dp->d_namlen + 1);
|
||||
|
||||
/* Save the first error for later. */
|
||||
if (lstat(up, &s)) {
|
||||
if (!save_errno)
|
||||
save_errno = errno;
|
||||
errno = 0;
|
||||
continue;
|
||||
}
|
||||
if (s.st_dev == dev && s.st_ino == ino)
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for length of the current name, preceding slash,
|
||||
* leading slash.
|
||||
*/
|
||||
if (bpt - pt <= dp->d_namlen + (first ? 1 : 2)) {
|
||||
size_t len, off;
|
||||
|
||||
if (!ptsize) {
|
||||
errno = ERANGE;
|
||||
goto err;
|
||||
}
|
||||
off = bpt - pt;
|
||||
len = ept - bpt;
|
||||
if (!(pt = (char *)realloc(pt, ptsize *= 2)))
|
||||
goto err;
|
||||
bpt = pt + off;
|
||||
ept = pt + ptsize;
|
||||
(void)bcopy(bpt, ept - len, len);
|
||||
bpt = ept - len;
|
||||
}
|
||||
if (!first)
|
||||
*--bpt = '/';
|
||||
bpt -= dp->d_namlen;
|
||||
bcopy(dp->d_name, bpt, dp->d_namlen);
|
||||
(void)closedir(dir);
|
||||
|
||||
/* Truncate any file name. */
|
||||
*bup = '\0';
|
||||
}
|
||||
|
||||
notfound:
|
||||
/*
|
||||
* If readdir set errno, use it, not any saved error; otherwise,
|
||||
* didn't find the current directory in its parent directory, set
|
||||
* errno to ENOENT.
|
||||
*/
|
||||
if (!errno)
|
||||
errno = save_errno ? save_errno : ENOENT;
|
||||
/* FALLTHROUGH */
|
||||
err:
|
||||
if (ptsize)
|
||||
free(pt);
|
||||
free(up);
|
||||
return((char *)NULL);
|
||||
}
|
||||
|
||||
char *
|
||||
getwd(buf)
|
||||
char *buf;
|
||||
{
|
||||
char *p;
|
||||
|
||||
if (p = getcwd(buf, MAXPATHLEN))
|
||||
return(p);
|
||||
(void)strcpy(buf, strerror(errno));
|
||||
return((char *)NULL);
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* HPUX 10.x stubs to implement dl* in terms of shl*
|
||||
*
|
||||
* Not needed for later versions; HPUX 11.x has dlopen() and friends.
|
||||
*
|
||||
* configure also needs to be faked out. You can create a dummy libdl.a
|
||||
* with stub entries for dlopen, dlclose, dlsym, and dlerror:
|
||||
*
|
||||
* int dlopen() { return(0);}
|
||||
* int dlclose() { return(0);}
|
||||
* int dlsym() { return(0);}
|
||||
* int dlerror() { return(0);}
|
||||
*
|
||||
* This has not been tested; I just read the manual page and coded this up.
|
||||
*
|
||||
* According to the ld manual page, you need to link bash with -dld and add
|
||||
* the -E flag to LOCAL_LDFLAGS.
|
||||
*/
|
||||
|
||||
/* Copyright (C) 1998-2002 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
Bash is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free
|
||||
Software Foundation; either version 2, or (at your option) any later
|
||||
version.
|
||||
|
||||
Bash is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with Bash; see the file COPYING. If not, write to the Free Software
|
||||
Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
|
||||
|
||||
#if !defined (__HPUX10_DLFCN_H__)
|
||||
|
||||
#define __HPUX10_DLFCN_H__
|
||||
|
||||
#include <dl.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#define RTLD_LAZY BIND_DEFERRED
|
||||
#define RTLD_NOW BIND_IMMEDIATE
|
||||
#define RTLD_GLOBAL DYNAMIC_PATH
|
||||
|
||||
char *bash_global_sym_addr;
|
||||
|
||||
#define dlopen(file,mode) (void *)shl_load((file), (mode), 0L)
|
||||
|
||||
#define dlclose(handle) shl_unload((shl_t)(handle))
|
||||
|
||||
#define dlsym(handle,name) (bash_global_sym_addr=0,shl_findsym((shl_t *)&(handle),name,TYPE_UNDEFINED,&bash_global_sym_addr), (void *)bash_global_sym_addr)
|
||||
|
||||
#define dlerror() strerror(errno)
|
||||
|
||||
#endif /* __HPUX10_DLFCN_H__ */
|
||||
@@ -0,0 +1,12 @@
|
||||
#include <stdio.h>
|
||||
|
||||
main()
|
||||
{
|
||||
if (sizeof(char *) == sizeof(long))
|
||||
printf("long\n");
|
||||
else if (sizeof(char *) == sizeof(short))
|
||||
printf("short\n");
|
||||
else
|
||||
printf("int\n");
|
||||
exit(0);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
main(c, v, e)
|
||||
int c;
|
||||
char **v, **e;
|
||||
{
|
||||
close(0);
|
||||
execv(v[1], v+1);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/* open-files -- report files a process has open */
|
||||
|
||||
/* Copyright (C) 1989-2002 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. */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/file.h>
|
||||
#include <stdio.h>
|
||||
|
||||
main()
|
||||
{
|
||||
register int i;
|
||||
|
||||
for (i = 0; i < getdtablesize(); i++) {
|
||||
if (fcntl(i, F_GETFD, 0) != -1)
|
||||
fprintf(stderr, "fd %d: open\n", i);
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
@@ -0,0 +1,239 @@
|
||||
/* $Header:cat.c 12.0$ */
|
||||
/* $ACIS:cat.c 12.0$ */
|
||||
/* $Source: /ibm/acis/usr/src/bin/RCS/cat.c,v $ */
|
||||
|
||||
#ifndef lint
|
||||
static char *rcsid = "$Header:cat.c 12.0$";
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980 Regents of the University of California.
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)cat.c 5.2 (Berkeley) 12/6/85";
|
||||
#endif not lint
|
||||
|
||||
/*
|
||||
* Concatenate files.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
/* #define OPTSIZE BUFSIZ /* define this only if not 4.2 BSD or beyond */
|
||||
|
||||
int bflg, eflg, nflg, sflg, tflg, uflg, vflg;
|
||||
int spaced, col, lno, inline, ibsize, obsize;
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
sigpipe()
|
||||
{
|
||||
write(2, "pcat: caught SIGPIPE\n", 21);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
main(argc, argv)
|
||||
char **argv;
|
||||
{
|
||||
int fflg = 0;
|
||||
register FILE *fi;
|
||||
register c;
|
||||
int dev, ino = -1;
|
||||
struct stat statb;
|
||||
int retval = 0;
|
||||
|
||||
signal(SIGPIPE, sigpipe);
|
||||
lno = 1;
|
||||
for( ; argc>1 && argv[1][0]=='-'; argc--,argv++) {
|
||||
switch(argv[1][1]) {
|
||||
case 0:
|
||||
break;
|
||||
case 'u':
|
||||
setbuf(stdout, (char *)NULL);
|
||||
uflg++;
|
||||
continue;
|
||||
case 'n':
|
||||
nflg++;
|
||||
continue;
|
||||
case 'b':
|
||||
bflg++;
|
||||
nflg++;
|
||||
continue;
|
||||
case 'v':
|
||||
vflg++;
|
||||
continue;
|
||||
case 's':
|
||||
sflg++;
|
||||
continue;
|
||||
case 'e':
|
||||
eflg++;
|
||||
vflg++;
|
||||
continue;
|
||||
case 't':
|
||||
tflg++;
|
||||
vflg++;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (fstat(fileno(stdout), &statb) == 0) {
|
||||
statb.st_mode &= S_IFMT;
|
||||
if (statb.st_mode!=S_IFCHR && statb.st_mode!=S_IFBLK) {
|
||||
dev = statb.st_dev;
|
||||
ino = statb.st_ino;
|
||||
}
|
||||
#ifndef OPTSIZE
|
||||
obsize = statb.st_blksize;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
obsize = 0;
|
||||
if (argc < 2) {
|
||||
argc = 2;
|
||||
fflg++;
|
||||
}
|
||||
while (--argc > 0) {
|
||||
if (fflg || (*++argv)[0]=='-' && (*argv)[1]=='\0')
|
||||
fi = stdin;
|
||||
else {
|
||||
if ((fi = fopen(*argv, "r")) == NULL) {
|
||||
perror(*argv);
|
||||
retval = 1;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (fstat(fileno(fi), &statb) == 0) {
|
||||
if ((statb.st_mode & S_IFMT) == S_IFREG &&
|
||||
statb.st_dev==dev && statb.st_ino==ino) {
|
||||
fprintf(stderr, "cat: input %s is output\n",
|
||||
fflg?"-": *argv);
|
||||
fclose(fi);
|
||||
retval = 1;
|
||||
continue;
|
||||
}
|
||||
#ifndef OPTSIZE
|
||||
ibsize = statb.st_blksize;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
ibsize = 0;
|
||||
if (nflg||sflg||vflg)
|
||||
copyopt(fi);
|
||||
else if (uflg) {
|
||||
while ((c = getc(fi)) != EOF)
|
||||
putchar(c);
|
||||
} else
|
||||
retval |= fastcat(fileno(fi)); /* no flags specified */
|
||||
if (fi!=stdin)
|
||||
fclose(fi);
|
||||
else
|
||||
clearerr(fi); /* reset sticky eof */
|
||||
if (ferror(stdout)) {
|
||||
fprintf(stderr, "cat: output write error\n");
|
||||
retval = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
exit(retval);
|
||||
}
|
||||
|
||||
copyopt(f)
|
||||
register FILE *f;
|
||||
{
|
||||
register int c;
|
||||
|
||||
top:
|
||||
c = getc(f);
|
||||
if (c == EOF)
|
||||
return;
|
||||
if (c == '\n') {
|
||||
if (inline == 0) {
|
||||
if (sflg && spaced)
|
||||
goto top;
|
||||
spaced = 1;
|
||||
}
|
||||
if (nflg && bflg==0 && inline == 0)
|
||||
printf("%6d\t", lno++);
|
||||
if (eflg)
|
||||
putchar('$');
|
||||
putchar('\n');
|
||||
inline = 0;
|
||||
goto top;
|
||||
}
|
||||
if (nflg && inline == 0)
|
||||
printf("%6d\t", lno++);
|
||||
inline = 1;
|
||||
if (vflg) {
|
||||
if (tflg==0 && c == '\t')
|
||||
putchar(c);
|
||||
else {
|
||||
if (c > 0177) {
|
||||
printf("M-");
|
||||
c &= 0177;
|
||||
}
|
||||
if (c < ' ')
|
||||
printf("^%c", c+'@');
|
||||
else if (c == 0177)
|
||||
printf("^?");
|
||||
else
|
||||
putchar(c);
|
||||
}
|
||||
} else
|
||||
putchar(c);
|
||||
spaced = 0;
|
||||
goto top;
|
||||
}
|
||||
|
||||
fastcat(fd)
|
||||
register int fd;
|
||||
{
|
||||
register int buffsize, n, nwritten, offset;
|
||||
register char *buff;
|
||||
struct stat statbuff;
|
||||
char *malloc();
|
||||
|
||||
#ifndef OPTSIZE
|
||||
if (obsize)
|
||||
buffsize = obsize; /* common case, use output blksize */
|
||||
else if (ibsize)
|
||||
buffsize = ibsize;
|
||||
else
|
||||
buffsize = BUFSIZ;
|
||||
#else
|
||||
buffsize = OPTSIZE;
|
||||
#endif
|
||||
|
||||
if ((buff = malloc(buffsize)) == NULL) {
|
||||
perror("cat: no memory");
|
||||
return (1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Note that on some systems (V7), very large writes to a pipe
|
||||
* return less than the requested size of the write.
|
||||
* In this case, multiple writes are required.
|
||||
*/
|
||||
while ((n = read(fd, buff, buffsize)) > 0) {
|
||||
offset = 0;
|
||||
do {
|
||||
nwritten = write(fileno(stdout), &buff[offset], n);
|
||||
if (nwritten <= 0) {
|
||||
perror("cat: write error");
|
||||
exit(2);
|
||||
}
|
||||
offset += nwritten;
|
||||
} while ((n -= nwritten) > 0);
|
||||
}
|
||||
|
||||
free(buff);
|
||||
if (n < 0) {
|
||||
perror("cat: read error");
|
||||
return (1);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
int pid;
|
||||
int pg1;
|
||||
|
||||
main()
|
||||
{
|
||||
pid = getpid();
|
||||
pg1 = getpgrp(0);
|
||||
|
||||
printf("pid = %d, pgrp = %d\n", pid, pg1);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
main()
|
||||
{
|
||||
fprintf(stderr, "%d\n", getpid());
|
||||
exit(0);
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/* sigs - print signal dispositions for a process */
|
||||
|
||||
/* Copyright (C) 1990-2002 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. */
|
||||
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
|
||||
extern char *sys_siglist[];
|
||||
|
||||
typedef void sighandler();
|
||||
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
register int i;
|
||||
sighandler *h;
|
||||
|
||||
for (i = 1; i < NSIG; i++) {
|
||||
h = signal(i, SIG_DFL);
|
||||
if (h != SIG_DFL) {
|
||||
if (h == SIG_IGN)
|
||||
fprintf(stderr, "%d: ignored (%s)\n", i, sys_siglist[i]);
|
||||
else
|
||||
fprintf(stderr, "%d: caught (%s)\n", i, sys_siglist[i]);
|
||||
}
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,226 @@
|
||||
/*
|
||||
* sigstat - print out useful information about signal arguments
|
||||
*
|
||||
* Chet Ramey
|
||||
* chet@po.cwru.edu
|
||||
*/
|
||||
|
||||
/* Copyright (C) 1991-2002 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. */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
|
||||
extern char *strrchr();
|
||||
static char *signames[NSIG];
|
||||
|
||||
char *progname;
|
||||
|
||||
void sigstat();
|
||||
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
register int i;
|
||||
char *t;
|
||||
|
||||
if (t = strrchr(argv[0], '/'))
|
||||
progname = ++t;
|
||||
else
|
||||
progname = argv[0];
|
||||
init_signames();
|
||||
if (argc == 1) {
|
||||
for (i = 1; i < NSIG; i++)
|
||||
sigstat(i);
|
||||
exit(0);
|
||||
}
|
||||
for (i = 1; i < argc; i++)
|
||||
sigstat(atoi(argv[i]));
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void
|
||||
sigstat(sig)
|
||||
int sig;
|
||||
{
|
||||
struct sigaction oact;
|
||||
char *signame;
|
||||
sigset_t set, oset;
|
||||
int blocked;
|
||||
|
||||
if (sig < 0 || sig >= NSIG) {
|
||||
fprintf(stderr, "%s: %d: signal out of range\n", progname, sig);
|
||||
return;
|
||||
}
|
||||
signame = signames[sig];
|
||||
sigemptyset(&oset);
|
||||
sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
|
||||
if (sigismember(&oset, sig))
|
||||
printf("%s: signal is blocked\n", signame);
|
||||
sigaction(sig, (struct sigaction *)NULL, &oact);
|
||||
if (oact.sa_handler == SIG_IGN)
|
||||
printf("%s: signal is ignored\n", signame);
|
||||
else if (oact.sa_handler == SIG_DFL)
|
||||
printf("%s: signal is defaulted\n", signame);
|
||||
else
|
||||
printf("%s: signal is trapped (?)\n", signame);
|
||||
}
|
||||
|
||||
init_signames()
|
||||
{
|
||||
register int i;
|
||||
bzero(signames, sizeof(signames));
|
||||
|
||||
#if defined (SIGHUP) /* hangup */
|
||||
signames[SIGHUP] = "SIGHUP";
|
||||
#endif
|
||||
#if defined (SIGINT) /* interrupt */
|
||||
signames[SIGINT] = "SIGINT";
|
||||
#endif
|
||||
#if defined (SIGQUIT) /* quit */
|
||||
signames[SIGQUIT] = "SIGQUIT";
|
||||
#endif
|
||||
#if defined (SIGILL) /* illegal instruction (not reset when caught) */
|
||||
signames[SIGILL] = "SIGILL";
|
||||
#endif
|
||||
#if defined (SIGTRAP) /* trace trap (not reset when caught) */
|
||||
signames[SIGTRAP] = "SIGTRAP";
|
||||
#endif
|
||||
#if defined (SIGABRT) /* */
|
||||
signames[SIGABRT] = "SIGABRT";
|
||||
#endif
|
||||
#if defined (SIGIOT) /* IOT instruction */
|
||||
signames[SIGIOT] = "SIGIOT";
|
||||
#endif
|
||||
#if defined (SIGEMT) /* EMT instruction */
|
||||
signames[SIGEMT] = "SIGEMT";
|
||||
#endif
|
||||
#if defined (SIGFPE) /* floating point exception */
|
||||
signames[SIGFPE] = "SIGFPE";
|
||||
#endif
|
||||
#if defined (SIGKILL) /* kill (cannot be caught or ignored) */
|
||||
signames[SIGKILL] = "SIGKILL";
|
||||
#endif
|
||||
#if defined (SIGBUS) /* bus error */
|
||||
signames[SIGBUS] = "SIGBUS";
|
||||
#endif
|
||||
#if defined (SIGSEGV) /* segmentation violation */
|
||||
signames[SIGSEGV] = "SIGSEGV";
|
||||
#endif
|
||||
#if defined (SIGSYS) /* bad argument to system call */
|
||||
signames[SIGSYS] = "SIGSYS";
|
||||
#endif
|
||||
#if defined (SIGPIPE) /* write on a pipe with no one to read it */
|
||||
signames[SIGPIPE] = "SIGPIPE";
|
||||
#endif
|
||||
#if defined (SIGALRM) /* alarm clock */
|
||||
signames[SIGALRM] = "SIGALRM";
|
||||
#endif
|
||||
#if defined (SIGTERM) /* software termination signal from kill */
|
||||
signames[SIGTERM] = "SIGTERM";
|
||||
#endif
|
||||
#if defined (SIGCLD) /* Like SIGCHLD. */
|
||||
signames[SIGCLD] = "SIGCLD";
|
||||
#endif
|
||||
#if defined (SIGPWR) /* Magic thing for some machines. */
|
||||
signames[SIGPWR] = "SIGPWR";
|
||||
#endif
|
||||
#if defined (SIGPOLL) /* For keyboard input? */
|
||||
signames[SIGPOLL] = "SIGPOLL";
|
||||
#endif
|
||||
#if defined (SIGURG) /* urgent condition on IO channel */
|
||||
signames[SIGURG] = "SIGURG";
|
||||
#endif
|
||||
#if defined (SIGSTOP) /* sendable stop signal not from tty */
|
||||
signames[SIGSTOP] = "SIGSTOP";
|
||||
#endif
|
||||
#if defined (SIGTSTP) /* stop signal from tty */
|
||||
signames[SIGTSTP] = "SIGTSTP";
|
||||
#endif
|
||||
#if defined (SIGCONT) /* continue a stopped process */
|
||||
signames[SIGCONT] = "SIGCONT";
|
||||
#endif
|
||||
#if defined (SIGCHLD) /* to parent on child stop or exit */
|
||||
signames[SIGCHLD] = "SIGCHLD";
|
||||
#endif
|
||||
#if defined (SIGTTIN) /* to readers pgrp upon background tty read */
|
||||
signames[SIGTTIN] = "SIGTTIN";
|
||||
#endif
|
||||
#if defined (SIGTTOU) /* like TTIN for output if (tp->t_local<OSTOP) */
|
||||
signames[SIGTTOU] = "SIGTTOU";
|
||||
#endif
|
||||
#if defined (SIGIO) /* input/output possible signal */
|
||||
signames[SIGIO] = "SIGIO";
|
||||
#endif
|
||||
#if defined (SIGXCPU) /* exceeded CPU time limit */
|
||||
signames[SIGXCPU] = "SIGXCPU";
|
||||
#endif
|
||||
#if defined (SIGXFSZ) /* exceeded file size limit */
|
||||
signames[SIGXFSZ] = "SIGXFSZ";
|
||||
#endif
|
||||
#if defined (SIGVTALRM) /* virtual time alarm */
|
||||
signames[SIGVTALRM] = "SIGVTALRM";
|
||||
#endif
|
||||
#if defined (SIGPROF) /* profiling time alarm */
|
||||
signames[SIGPROF] = "SIGPROF";
|
||||
#endif
|
||||
#if defined (SIGWINCH) /* window changed */
|
||||
signames[SIGWINCH] = "SIGWINCH";
|
||||
#endif
|
||||
#if defined (SIGLOST) /* resource lost (eg, record-lock lost) */
|
||||
signames[SIGLOST] = "SIGLOST";
|
||||
#endif
|
||||
#if defined (SIGUSR1) /* user defined signal 1 */
|
||||
signames[SIGUSR1] = "SIGUSR1";
|
||||
#endif
|
||||
#if defined (SIGUSR2) /* user defined signal 2 */
|
||||
signames[SIGUSR2] = "SIGUSR2";
|
||||
#endif
|
||||
#if defined (SIGMSG) /* HFT input data pending */
|
||||
signames[SIGMSG] = "SIGMSG";
|
||||
#endif
|
||||
#if defined (SIGPWR) /* power failure imminent (save your data) */
|
||||
signames[SIGPWR] = "SIGPWR";
|
||||
#endif
|
||||
#if defined (SIGDANGER) /* system crash imminent */
|
||||
signames[SIGDANGER] = "SIGDANGER";
|
||||
#endif
|
||||
#if defined (SIGMIGRATE) /* migrate process to another CPU */
|
||||
signames[SIGMIGRATE] = "SIGMIGRATE";
|
||||
#endif
|
||||
#if defined (SIGPRE) /* programming error */
|
||||
signames[SIGPRE] = "SIGPRE";
|
||||
#endif
|
||||
#if defined (SIGGRANT) /* HFT monitor mode granted */
|
||||
signames[SIGGRANT] = "SIGGRANT";
|
||||
#endif
|
||||
#if defined (SIGRETRACT) /* HFT monitor mode retracted */
|
||||
signames[SIGRETRACT] = "SIGRETRACT";
|
||||
#endif
|
||||
#if defined (SIGSOUND) /* HFT sound sequence has completed */
|
||||
signames[SIGSOUND] = "SIGSOUND";
|
||||
#endif
|
||||
|
||||
for (i = 0; i < NSIG; i++)
|
||||
if (signames[i] == (char *)NULL) {
|
||||
signames[i] = (char *)malloc (16);;
|
||||
sprintf (signames[i], "signal %d", i);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
#include <stdio.h>
|
||||
|
||||
main()
|
||||
{
|
||||
fprintf(stdout, "to stdout\n");
|
||||
fprintf(stderr, "to stderr\n");
|
||||
fprintf(stdout, "to stdout\n");
|
||||
fprintf(stderr, "to stderr\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
main(c, v)
|
||||
int c;
|
||||
char **v;
|
||||
{
|
||||
double dv, dv2;
|
||||
char *sv, *ep;
|
||||
int r;
|
||||
|
||||
sv = "4.2";
|
||||
dv = 4.2;
|
||||
|
||||
errno = 0;
|
||||
dv2 = strtod(sv, &ep);
|
||||
if (*ep)
|
||||
exit(1);
|
||||
else if (errno == ERANGE)
|
||||
exit(1);
|
||||
if (dv != dv2)
|
||||
exit(1);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,115 @@
|
||||
This file details the changes between the previous release of CWRU bash
|
||||
(3/10/93) and this release.
|
||||
|
||||
1. Bugs Fixed
|
||||
|
||||
New version of endian.c that handles 64-bit machines better
|
||||
|
||||
added code to make readline reset itself when $TERMINFO changes
|
||||
|
||||
fixed memory leaks in:
|
||||
builtins/exec.def
|
||||
lib/readline/history.c
|
||||
lib/readline/readline.c
|
||||
parse.y
|
||||
subst.c
|
||||
variables.c
|
||||
dispose_cmd.c
|
||||
mailcheck.c
|
||||
bashline.c
|
||||
execute_cmd.c
|
||||
shell.c
|
||||
|
||||
make sure that bash_symbolic_link_hook calls get_working_directory with a
|
||||
non-empty string argument
|
||||
|
||||
check the return value of getdtablesize() for bad values
|
||||
|
||||
make the job control tty handlers print error message only if the shell is
|
||||
currently interactive
|
||||
|
||||
process substitution no longer tries to close every file descriptor
|
||||
|
||||
fixed up the source to contain more extern function declarations rather than
|
||||
casting the return values
|
||||
|
||||
fixed up handling of embedded quoted strings by the parser so that $ is not
|
||||
a special character while parsing one
|
||||
|
||||
added escape handling to the read builtin so backslashes can escape $IFS
|
||||
characters
|
||||
|
||||
fixed the brace expansion code so that backslash can act as a delimiter and
|
||||
can escape `"' in a double-quoted string
|
||||
|
||||
the `<>' redirection needs to open the file O_RDWR|O_CREAT for Posix.2
|
||||
compatibility
|
||||
|
||||
fixed up the here document reading code so that it will remove backslash-
|
||||
quoted newlines if the document delimiter is not quoted
|
||||
|
||||
fixed up the unwind_protect_var code so that the same strategy is used
|
||||
for both saving and restoring variables
|
||||
|
||||
completion functions may now tell readline not to attempt filename completion
|
||||
by returning (char **) -1
|
||||
|
||||
improved the error message printed by get_working_directory
|
||||
|
||||
Compile for solaris if either USGr4 or __svr4__ is defined
|
||||
|
||||
bash does not perform a getwd() on startup unless the inherited value of
|
||||
$PWD is wrong or $PWD was not in the environment
|
||||
|
||||
fixed up the trap saving and restoring code so that savetrap=$(trap) works
|
||||
like Posix.2 says it should
|
||||
|
||||
non-interactive shells are now much better about cleaning up dead processes
|
||||
and jobs on both job control and non job control systems
|
||||
|
||||
fixed the code that saves and restores the dollar variables around a `.'
|
||||
script so that if the script changes the positional parameters, the old
|
||||
values are not restored
|
||||
|
||||
fixed the tokenizer so that it will not return ASSIGNMENT_WORD while
|
||||
parsing a case statement pattern list
|
||||
|
||||
redid the implementation of cprintf for systems without varargs
|
||||
|
||||
fixed up the variable expansion code so that illegal variable names in ${ }
|
||||
expansion now generate errors rather than produce incorrect results
|
||||
|
||||
fixed up some problems with default_buffered_input and the implicit redirection
|
||||
of fd 0 to /dev/null for asynchronous commands without job control
|
||||
|
||||
new function internal_error for shell internal error messages
|
||||
|
||||
changed the sigint signal handler in nojobs.c to do nothing when it's called,
|
||||
not even run a signal handler
|
||||
|
||||
made the command substitution code more careful about file descriptors when
|
||||
errors occur
|
||||
|
||||
2. New Features
|
||||
|
||||
SIGWINCH causes bash to reset the values of $LINES and $COLUMNS for both
|
||||
readline and non-readline systems
|
||||
|
||||
changed the code in readline that handled conditional parsing of `$if term='
|
||||
to test the terminal name given to $if against both the `long' and `short'
|
||||
(portion up to the first `-') forms of the terminal name
|
||||
|
||||
the completion code now single-quotes a match that contains a shell word
|
||||
break character
|
||||
|
||||
the readline code does not define USE_XON_XOFF. This causes output to be
|
||||
swallowed when using bash over a relatively slow line (like a modem line).
|
||||
|
||||
there is now a bindable readline function to do only history expansion;
|
||||
bound to M-^ (M-! was already taken)
|
||||
|
||||
ulimit now has a -u option to set and get the limit for the maximum number
|
||||
of user processes
|
||||
|
||||
config.h.mini is a `minimal' configuration file that compiles out just about
|
||||
everything
|
||||
@@ -0,0 +1,63 @@
|
||||
This file details the changes between the previous release of CWRU bash
|
||||
(5/10/93) and this release.
|
||||
|
||||
1. Bugs Fixed
|
||||
|
||||
commas within backquotes inside matching braces are now treated as
|
||||
quoted (e.g., echo {`echo foo:bar | sed s/:/,/`})
|
||||
|
||||
don't create the export env unless we are running a command with
|
||||
shell_execve (in execute_disk_command), and don't create it anew
|
||||
each time a child is forked
|
||||
|
||||
make execute_disk_command look in the temp environment for an
|
||||
assignment to PATH, and disable hash lookup for the command if
|
||||
such an assignment is present
|
||||
|
||||
fixed here documents so that backslash-quoted newlines are treated as
|
||||
Posix.2 specifies
|
||||
|
||||
removed a number of extraneous unwind-protects or moved them inside
|
||||
if statements
|
||||
|
||||
only call rl_reset_terminal in sv_term if we're actually using readline
|
||||
|
||||
only run traps on SIGCHLD if job_control != 0
|
||||
|
||||
fixed readline so it won't try to pass memory allocated with alloca() to
|
||||
a separate function
|
||||
|
||||
cleaned up the readline global function and variable namespace, and split
|
||||
some more code out from readline.c into separate files
|
||||
|
||||
added header files that declare extern functions rather than having those
|
||||
extern declarations littered throughout the code
|
||||
|
||||
readline now allows ^T to be undone
|
||||
|
||||
fixed readline so that characters whose screen representation is > 1
|
||||
character (e.g., \354) are erased correctly
|
||||
|
||||
the read builtin no longer attempts to split its input into words if
|
||||
$IFS is unset
|
||||
|
||||
changed the terminating signals that bash catches so they're reset to
|
||||
their original handlers when a child is forked
|
||||
|
||||
the Gnu malloc library code was upgraded to Gnu libc version 1.06
|
||||
|
||||
the Gnu termcap library code was upgraded to Gnu termcap version 1.02
|
||||
|
||||
the man page was updated to cover the bind -m option
|
||||
|
||||
2. New Features
|
||||
|
||||
Bash now notices if it's running setuid or setgid and disables $ENV
|
||||
processing and importing shell functions from the environment
|
||||
|
||||
New flag: -p/-o privileged, set if the shell is running setuid or setgid.
|
||||
Turning this off causes the effective uid and gid to be set to the
|
||||
real uid and gid
|
||||
|
||||
New machine descriptions for the Intel Paragon, Symmetric 375, NeXT 486,
|
||||
and HP running 4.4 BSD
|
||||
@@ -0,0 +1,140 @@
|
||||
This file details the changes between the previous release of CWRU bash
|
||||
(07/11/93) and this release.
|
||||
|
||||
1. Bugs Fixed
|
||||
|
||||
Readline's vi-mode once again has TAB bound to completion; entering `posix
|
||||
mode' changes it to self-insert
|
||||
|
||||
Bash now binds its special emacs-mode functions directly into
|
||||
emacs_meta_keymap so that eight-bit character handling does not interfere
|
||||
|
||||
Some source restructuring: more extern functions are defined in header files
|
||||
and not in C source files
|
||||
|
||||
The handling of `line number' inside functions is now more correct and
|
||||
closer to reality
|
||||
|
||||
Some functions of `general use' were moved to general.c (vfree,
|
||||
full_pathname)
|
||||
|
||||
A bug that caused some redirections to be applied twice was fixed in
|
||||
execute_command_internal (dispose of redirection_undo_list after copying it;
|
||||
ditto for exec_redirection_undo_list)
|
||||
|
||||
The exit status of a command that is not found is 126, as Posix.2 specifies
|
||||
|
||||
More speed improvements -- bash now runs as fast as the SunOS sh on
|
||||
Haertel's `shell benchmark'
|
||||
|
||||
Instead of returning pointers to -1, bash and the readline, history, and
|
||||
glob libraries now return pointers to special `error pointers', which the
|
||||
calling code checks for in place of -1
|
||||
|
||||
Fixed a problem with canonicalize_pathname which made it get
|
||||
confused with xxx/./yyy if yyy was `.' or `..'
|
||||
|
||||
Fixes to make bash recognize SVR4.2 and set USGr4_2 for SVR4.2 systems
|
||||
|
||||
Fixes to the HP/UX machine descriptions to make alloca work on HPUX_9
|
||||
and to avoid `M_MACHINE redefined' warnings
|
||||
|
||||
Fixes to the CRAY machine description
|
||||
|
||||
Fixes to the mailpath code to make it Posix.2-compliant -- backslash
|
||||
may now quote `%' and `?'
|
||||
|
||||
The namespace was further cleaned up, and more functions and variables
|
||||
were made static
|
||||
|
||||
On systems with S_IFSOCK or S_ISSOCK defined in sys/stat.h, bash checks
|
||||
whether fd 0 is a socket to decide whether or not it's being started by
|
||||
rshd and to run the startup files
|
||||
|
||||
Bash now gives the signal mask it inherits to its children -- previously,
|
||||
login shells cleared the signal mask
|
||||
|
||||
cpp-Makefile and subst.c both used the `USE_GLOB_LIBRARY' define, but
|
||||
with different meanings; subst.c now uses `USE_POSIX_GLOB_LIBRARY'
|
||||
|
||||
Fixed pattern substitution so that ${a%%$b}, where b was unset, no longer
|
||||
causes a core dump
|
||||
|
||||
Changed the `test_exit' define in test.c to no longer use `longjmp' as
|
||||
the rhs or a comma-ized expression; this causes core dumps on some
|
||||
optimizer/machine combinations
|
||||
|
||||
A speed hack in variables.c: if no local variables are defined for a level
|
||||
of shell context, kill_all_local_variables does not need to search the
|
||||
whole variable hash table when popping a context
|
||||
|
||||
Fixed the `bind' builtin so that -m now changes the keymap for all of the
|
||||
subsequent operations
|
||||
|
||||
Changed some more builtins to use internal_getopt: bind, command, export,
|
||||
readonly, declare, typeset
|
||||
|
||||
Fixed fc to use the Posix.2 format for listing commands in the
|
||||
history list
|
||||
|
||||
Changed bg to set `!', as Posix.2 specifies
|
||||
|
||||
Fixed ulimit.def to compile if RLIMIT_RSS is not defined,
|
||||
as some systems seem to have it
|
||||
|
||||
Replaced lib/malloc/alloca.c with the version from emacs 19. The old one
|
||||
lives in alloca.c.old
|
||||
|
||||
malloc.c now uses the ANSI C features to `stringize' macro arguments if
|
||||
__STDC__ is defined
|
||||
|
||||
Fixes to the GNU malloc library from glibc 1.06 and Mike Haertel
|
||||
|
||||
Fixes to readline key binding and lookup for Cray systems, which don't
|
||||
like the casting that readline does
|
||||
|
||||
Fixes to all readline library source files to clean up the code: make sure
|
||||
`int'-returning functions use `return x;' rather than `return;', declare all
|
||||
arguments, even the `int' ones, and make some functions void. Cleaned up
|
||||
the code formatting a little, too.
|
||||
|
||||
The readline completer now double-quotes filenames with special word-break
|
||||
characters, so that tilde expansion still works
|
||||
|
||||
^C now breaks out of keyboard macros
|
||||
|
||||
If being compiled as part of the shell, readline no longer attempts to
|
||||
handle SIGTTIN, SIGTTOU, or SIGTSTP
|
||||
|
||||
tilde_expansion_failure_hook is now a CPFunction rather than a Function,
|
||||
since that's how it's used
|
||||
|
||||
Readline vi-mode `change case' function now skips over characters which
|
||||
are neither upper nor lower case
|
||||
|
||||
Readline vi-mode now allows replacement to be redoable with `.'
|
||||
|
||||
2. New Features
|
||||
|
||||
A `strict Posix.2' mode, enabled with the -posix startup option or
|
||||
setting the POSIXLY_CORRECT variable (see CWRU/POSIX.NOTES for a
|
||||
description of the changed behavior)
|
||||
|
||||
`ONESHOT' is now an option in config.h
|
||||
|
||||
cpp-Makefile assumes that fixed header files are present if gcc is being
|
||||
used
|
||||
|
||||
The redirections attached to a function declaration are now part of that
|
||||
function, applied when the function is executed, as specified by Posix.2.
|
||||
This caused a change to parse.y that resulted in 66 shift/reduce
|
||||
conflicts(!)
|
||||
|
||||
All of the OP= functions that Posix.2 specifies are now implemented for
|
||||
both `let' and arithmetic substitution
|
||||
|
||||
The `command' builtin has acquired the Posix.2 `-v' and `-V' options
|
||||
(this shares code with the `type' builtin)
|
||||
|
||||
A new `bash_builtins' man page, like the `csh_builtins' page on some
|
||||
systems
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,584 @@
|
||||
|
||||
This documents the changes between the first `public' release of CWRU bash
|
||||
and this, its second release. It summarizes, without going into detail,
|
||||
the changes that have been made.
|
||||
|
||||
NEW FEATURES
|
||||
|
||||
o `getopts' builtin, as specified by Posix.2
|
||||
|
||||
o new configuration variable HAVE_UNISTD_H, used to include
|
||||
<unistd.h> and test for Posix features
|
||||
|
||||
o `ulimit' has new -p and -n options to report the pipe buffer size
|
||||
and number of available file descriptors, respectively
|
||||
|
||||
o allow SIGCHLD to be trapped and useful behavior to result if it is
|
||||
|
||||
o Posix termios and signal code for readline and the shell itself
|
||||
|
||||
o can optionally use the GNU termcap library
|
||||
|
||||
o new output for `times' builtin that looks like ksh:
|
||||
|
||||
shell-user shell-sys
|
||||
child-user child-sys
|
||||
|
||||
o `ulimit' limits now apply to both shell and its children
|
||||
|
||||
o new machines.h entries
|
||||
|
||||
o no longer does the costly `close file descriptors 3-NOFILE'
|
||||
each time it exec's a program -- now uses the close-on-exec
|
||||
flag for the files it fiddles with
|
||||
|
||||
NOTABLE BUG FIXES
|
||||
|
||||
o jobs.c only sets and gets the tty state in an interactive shell
|
||||
|
||||
o bash does better process group checking on Posix systems, eliminating
|
||||
some error messages
|
||||
|
||||
o fix for `infinite login' bug on System V machines when executing a
|
||||
script from a .bash_profile
|
||||
|
||||
o the `trap' command now behaves as 1003.2 specifies, as of draft 9
|
||||
|
||||
o restore original terminal process group upon exit, so as to not
|
||||
confuse a parent Bourne shell
|
||||
|
||||
o `bash file', where `file' is a binary file, now reports an error
|
||||
|
||||
o shells started with `-s' now execute the .bashrc file
|
||||
|
||||
|
||||
CHANGES (by date and files affected)
|
||||
9/20 - 9/30
|
||||
-----------
|
||||
|
||||
builtins.c, builtins.c.posix
|
||||
- added getopts help text
|
||||
- removed extra "let" from `let' error message
|
||||
- added correct extern definition for list_rest_of_args() to shift
|
||||
builtin
|
||||
|
||||
jobs.c, jobs.c.posix
|
||||
- removed bogus call to set_process_resource_limits() from
|
||||
make_child() as a consequence of redoing `ulimit'
|
||||
- initialize shell_tty to -1
|
||||
- only get or set the tty state after a command completes if the shell
|
||||
is interactive
|
||||
- use shell_tty in get_tty_state() and set_tty_state() instead of
|
||||
reopening /dev/tty every time
|
||||
|
||||
jobs.c.posix
|
||||
- do better pgrp checking in initialize_jobs() to avoid error message
|
||||
about not being able to setpgid(2) on startup
|
||||
- changed tcsetattr() error messages slightly
|
||||
|
||||
expr.c
|
||||
- avoid advancing beyond the end of the expression when reporting an
|
||||
error
|
||||
- NULL expressions now return 0 ($[], for example)
|
||||
|
||||
mailcheck.c
|
||||
- #ifdef redundant definition of NOW, which is also defined in
|
||||
general.h
|
||||
|
||||
variables.c
|
||||
- initialize $OPTIND and $OPTERR to 1 for getopts
|
||||
- add correct extern definition for itos()
|
||||
|
||||
subst.c
|
||||
- if $IFS is unset, it defaults to " \t\n"
|
||||
- add special variable hack functions for $OPTIND, $OPTERR
|
||||
|
||||
builtins.h
|
||||
- add definition for getopts_builtin()
|
||||
|
||||
getopts.c
|
||||
- new file, source for `getopts' builtin command
|
||||
|
||||
ulimit.c
|
||||
- remove the `struct ResourceLimit' stuff; limits now apply to both
|
||||
the shell and its children
|
||||
- took out set_process_resource_limits(), let ulimit(2) or
|
||||
setrlimit(2) do the work
|
||||
- changed error messages to use builtin_error() instead of
|
||||
report_error()
|
||||
- changed the block factor for RLIMIT_CPU from 1000 (milliseconds)
|
||||
to 1 (seconds)
|
||||
|
||||
|
||||
10/1
|
||||
----
|
||||
|
||||
builtins.c, builtins.c.posix
|
||||
- changed `test' help text for -ef option
|
||||
- made `trap -' reset all signals to their original values
|
||||
|
||||
machines.h
|
||||
- added a new configuration variable, HAVE_UNISTD_H, which should
|
||||
be defined if /usr/include/unistd.h exists
|
||||
|
||||
cpp-Makefile
|
||||
- make HAVE_UNISTD_H show though from machines.h to the bash code
|
||||
- add an explicit build line for ulimit.o so `psize.sh' is run
|
||||
each time ulimit.o is remade. This is kind of flaky.
|
||||
config.h
|
||||
- include <unistd.h> if HAVE_UNISTD_H is defined, use it to test
|
||||
for various Posix features (job control, signals, termios)
|
||||
|
||||
jobs.c, jobs.c.posix
|
||||
- restore original signals to child process in make_child()
|
||||
- keep count of number of children that exit or stop in flush_child(),
|
||||
and call a trap handler for SIGCHLD that many times. This allows
|
||||
SIGCHLD to be trapped without disaster occurring.
|
||||
|
||||
shell.c
|
||||
- If we're on a Posix system, initialize signals the Posix way
|
||||
- clear signal mask in initialize_signals() if on Posix system
|
||||
- set login_shell and make_login_shell to 0 upon entry to main(),
|
||||
solving the System V infinite login bug
|
||||
|
||||
trap.c
|
||||
- preserve value of $? when running traps
|
||||
- don't allow a signal ignored upon entry to the shell to be trapped
|
||||
or reset to the default
|
||||
- do not allow trapping SIGCHLD to change the signal handler, but
|
||||
save the commands to be executed. Run these commands from the
|
||||
SIGCHLD signal handler for each child that exits or stops
|
||||
- don't allow SIGCHLD signal handler to be overridden or have SIGCHLD
|
||||
ignored
|
||||
- new function added to restore all trapped signals to their original
|
||||
values
|
||||
|
||||
ulimit.c
|
||||
- add new -p option to report pipe buffer size. This is flaky on
|
||||
all non-Posix systems (those that do not define PIPE_BUF).
|
||||
|
||||
readline/readline.c
|
||||
- add Posix termios and signal code
|
||||
|
||||
10/2
|
||||
----
|
||||
|
||||
jobs.c, jobs.c.posix
|
||||
- only fetch terminal state in initialize_jobs() if the shell is
|
||||
interactive
|
||||
|
||||
10/3
|
||||
----
|
||||
|
||||
machines.h
|
||||
- new entry for Stardent
|
||||
- new variable USE_TERMCAP_EMULATION, for those systems that have the
|
||||
termcap(3) functions in the curses library, but have not linked
|
||||
/usr/lib/libtermcap.a to libcurses.a
|
||||
|
||||
cpp-Makefile
|
||||
- use USE_TERMCAP_EMULATION to set TERMCAP and TERMLIB
|
||||
|
||||
siglist.c, alias.h, general.c
|
||||
- declare the return values of xmalloc() and malloc() for the benefit
|
||||
of machines which cannot cope with simply casting the return value
|
||||
|
||||
shell.c, execute_cmd.c
|
||||
- change the re-execution of main() when executing a shell script to
|
||||
use setjmp/longjmp
|
||||
|
||||
builtins.c
|
||||
- add code to change the shell level in exec_builtin(), decrementing
|
||||
it before trying the execve(2) and incrementing it again if that
|
||||
fails
|
||||
|
||||
variables.c
|
||||
- new function adjust_shell_level() to change shell level by a
|
||||
specified increment
|
||||
- initialize `noclobber' in shell_initialize(), if we have inherited
|
||||
the `noclobber' variable from a parent shell
|
||||
|
||||
ulimit.c
|
||||
- add new option -n, which reports the max number of available file
|
||||
descriptors as reported by getdtablesize(). On SunOS 4.1, this
|
||||
can be set, too, with setrlimit(RLIM_NOFILE, ...).
|
||||
|
||||
10/4
|
||||
----
|
||||
|
||||
readline/readline.c
|
||||
- Ultrix turns off system call restart when executing in `Posix mode'
|
||||
(when sigaction(3) is used to set signal handling), so make it use
|
||||
the System V version of shell_getc()
|
||||
|
||||
jobs.c.posix
|
||||
- fix a bug in start_job() where `oset' was not initialized in the first
|
||||
call to sigprocmask(), yet was used in subsequent calls
|
||||
- remove the `shadow' instance of shell_tty_info in the code that sets
|
||||
the line discipline in initialize_jobs()
|
||||
|
||||
shell.c
|
||||
- if job control is being used, restore the tty pgrp to its original
|
||||
value so as to not screw the parent
|
||||
|
||||
builtins.c, builtins.c.posix
|
||||
- make the output of `times' look more like ksh
|
||||
|
||||
10/5
|
||||
----
|
||||
|
||||
jobs.c.posix
|
||||
- HP/UX no longer needs the signal handler for SIGCHLD reset via a
|
||||
call to signal() in flush_child() -- this breaks job control
|
||||
|
||||
machines.h
|
||||
- add HAVE_VPRINTF to HP/UX entry
|
||||
|
||||
siglist.c
|
||||
- include <stdio.h>, sprintf(3) requires it on some systems
|
||||
|
||||
10/8
|
||||
----
|
||||
|
||||
execute_cmd.c
|
||||
- make $LINENO in a function count the number of simple commands
|
||||
executed
|
||||
|
||||
10/9
|
||||
----
|
||||
|
||||
termcap, cpp-Makefile
|
||||
- new GNU termcap library, cribbed from Emacs. #define
|
||||
USE_GNU_TERMCAP in machines.h entry to use it. Small changes
|
||||
required to cpp-Makefile to make it work. This works on
|
||||
4.3 BSD, at least.
|
||||
|
||||
machines.h
|
||||
- add new entry for AIX/370
|
||||
|
||||
general.c
|
||||
- sysv_getc() is also needed for Ultrix machines running in Posix
|
||||
mode, so change the #ifdef accordingly (Ultrix passes the
|
||||
SV_INTERRUPT flag to sigvec(2) in sigaction(3)).
|
||||
|
||||
subst.c
|
||||
- use sysv_getc() for Ultrix machines running in Posix mode for
|
||||
command subsitution pipe reading
|
||||
|
||||
10/10
|
||||
-----
|
||||
|
||||
shell.c, execute_cmd.c
|
||||
- if the `file' portion of `bash file' is a binary file, report an
|
||||
error and do not attempt to execute it
|
||||
|
||||
jobs.c, jobs.c.posix
|
||||
- the code that does the guts of `kill' now sends the SIGCONT to a
|
||||
stopped job after it sends the specified signal, not before
|
||||
|
||||
10/11
|
||||
-----
|
||||
|
||||
parse.y
|
||||
- set +H also turned off putting commands into the history list
|
||||
|
||||
shell.c
|
||||
- make shells started with -s read .bashrc
|
||||
|
||||
|
||||
10/14
|
||||
-----
|
||||
|
||||
expr.c
|
||||
- changed calls to `report_error' to call `builtin_error'. I don't
|
||||
know if this is exactly right, but it seems to me that an error
|
||||
in an expression shouldn't kill the shell if -e is set.
|
||||
|
||||
fc.c
|
||||
- changed `report_error' to `builtin_error'
|
||||
|
||||
10/16
|
||||
-----
|
||||
|
||||
readline/vi_mode.c
|
||||
- repeat count to rl_vi_subst() was incorrectly being ignored
|
||||
- don't call rl_vi_change_case() on an empty line; two calls in
|
||||
a row can cause a seg fault
|
||||
|
||||
|
||||
10/17
|
||||
-----
|
||||
|
||||
execute_cmd.c
|
||||
- give builtins run in pipes a useful setting of top_level to
|
||||
longjmp(2) to on errors
|
||||
|
||||
|
||||
builtins.c, builtins.c.posix
|
||||
- replace some occurrences of longjmp (top_level, ...) with simple
|
||||
calls to return (EXECUTION_FAILURE)
|
||||
|
||||
10/18
|
||||
-----
|
||||
|
||||
readline/readline.c
|
||||
- Make O_NDELAY be the same as O_NONBLOCK on Posix systems
|
||||
- Don't use IXANY if it's not defined (some strict Posix systems do
|
||||
not define it)
|
||||
- Posix systems need NOFLSH for c_lflag to avoid flushing the input
|
||||
buffer after a SIGINT, SIGQUIT, or SIGSUSP. This is still wrong,
|
||||
though.
|
||||
|
||||
execute_cmd.c, test.c, general.h
|
||||
- use the Posix S_IS* macros to test file formats instead of explicitly
|
||||
masking with S_IFMT and testing the result. Macros are provided
|
||||
for those systems that do not have them (like 4.3 BSD).
|
||||
|
||||
parse.y
|
||||
- fix expansion of \W in the prompt string so that it works when
|
||||
you're in the root directory
|
||||
|
||||
machines.h
|
||||
- add machine description for concurrent in UCB universe
|
||||
|
||||
Makefile
|
||||
- make sure $(MFLAGS) is passed to the recursive make of bash-Makefile
|
||||
|
||||
10/22
|
||||
-----
|
||||
|
||||
jobs.c.posix
|
||||
- make sure the NOFLSH bit is turned on in the termios c_lflag word
|
||||
so that typeahead doesn't get flushed on receipt of signals. THIS
|
||||
HAS BEEN TAKEN OUT.
|
||||
|
||||
10/23
|
||||
-----
|
||||
|
||||
execute_cmd.c
|
||||
- change extract_colon_unit() to increment the path index past a
|
||||
colon when it is called, before it tries to get the next component
|
||||
from the path. Without doing this, `.' was always found as the
|
||||
second component in the path, whether it was actually there or not.
|
||||
|
||||
trap.c, shell.c
|
||||
- made SIGINT trap handling act the same as that of ksh and the BSD
|
||||
sh. As a side effect (really the reason for doing this in the
|
||||
first place), `read' is now interruptible.
|
||||
|
||||
Makefile
|
||||
- made the CPPFLAGS definition useful by passing it to cpp when
|
||||
making bash-Makefile from cpp-Makefile
|
||||
- made the `echo' line when creating bash-Makefile really echo by
|
||||
quoting the redirection to bash-Makefile
|
||||
|
||||
general.c
|
||||
- make fcntl.h be included only if NO_DUP2 is defined
|
||||
|
||||
10/24
|
||||
-----
|
||||
cpp-Makefile
|
||||
- make libreadline.a depend on the objects, not the sources. Without
|
||||
this, you could delete on of the .o files to try to force a library
|
||||
rebuild and have it not happen.
|
||||
|
||||
10/25
|
||||
-----
|
||||
|
||||
shell.c
|
||||
- make a flag of `-' signal the end of option arguments, like the
|
||||
4.3 BSD sh, and in accordance with the Posix command line syntax
|
||||
standard
|
||||
|
||||
shell.c, builtins.c, builtins.c.posix
|
||||
- shuffle some code around so -o option can be given on the command
|
||||
line -- there's no reason why it shouldn't be allowed.
|
||||
|
||||
variables.c, variables.h, execute_cmd.c, builtins.c, builtins.c.posix, shell.c,
|
||||
subst.c, bashline.c, hash.h, variables.h
|
||||
- change the implementation of shell function and variable storage to
|
||||
a hash table instead of a singly-linked list
|
||||
|
||||
make_cmd.c, shell.c
|
||||
- bug reports only get mailed out if MAIL_BUG_REPORTS is defined
|
||||
|
||||
10/29
|
||||
-----
|
||||
|
||||
bashline.c
|
||||
- some random cleanups from bfox
|
||||
- make sure alias expansion is attempted in shell_expand_line () only
|
||||
if ALIAS is defined
|
||||
|
||||
hash.c
|
||||
- add default case to make_hash_table to force the number of buckets
|
||||
in the table to be the default if 0 is passed as the number of
|
||||
buckets
|
||||
|
||||
variables.c
|
||||
- make initialize_shell_variables () call make_hash_table () with an
|
||||
argument of 0 again (see previous entry).
|
||||
|
||||
|
||||
variables.c, builtins.c, builtins.c.posix
|
||||
- cleanups because map_over(), all_vars(), all_shell_variables(), and
|
||||
all_shell_functions () can possibly return NULL lists, and such
|
||||
lists should not be sorted or freed
|
||||
|
||||
trap.c
|
||||
- make sure we declare `extern int last_command_exit_value' in
|
||||
run_interrupt_trap ().
|
||||
|
||||
variables.c
|
||||
- Don't override a HOSTTYPE variables that comes in from the
|
||||
environment
|
||||
|
||||
10/30
|
||||
-----
|
||||
|
||||
variables.c
|
||||
- Fix a bug in variables.c: make_var_array () where it called
|
||||
array_len on a NULL list
|
||||
|
||||
builtins.c, builtins.c.posix
|
||||
- Add a description of `-m' to the help for the `set' builtin
|
||||
command
|
||||
|
||||
11/1
|
||||
----
|
||||
|
||||
general.c
|
||||
- added a definition of bzero() for USG machines, because
|
||||
there is a reference to it in the new variable hashing code
|
||||
|
||||
11/2
|
||||
----
|
||||
|
||||
shell.c
|
||||
- set forced_interactive to 0 in shell_reinitialize(), otherwise
|
||||
shell scripts get marked as interactive
|
||||
|
||||
11/6
|
||||
----
|
||||
|
||||
execute_cmd.c
|
||||
- eliminated the costly loop from 3 to NOFILE closing all file
|
||||
descriptors each time we exec a command by setting all file
|
||||
descriptors > 2 opened as the result of a redirection and internal
|
||||
to the shell to be close-on-exec, as well as all file descriptors
|
||||
opened to save others in add_undo_redirect(). `internal to the
|
||||
shell' means that the redirections were attached to shell builtin.
|
||||
Other `internal' redirections include while, for, and until
|
||||
loops, and shell functions. I got scared after reading that
|
||||
s5r4 provides 2048 fd's per process -- 2045 (mostly useless)
|
||||
close() calls on *each executed program*? No way, no how.
|
||||
|
||||
This caused the other fixes for this file to be discovered.
|
||||
|
||||
Unfortunately (there always seems to be a catch), 4.3 BSD up to
|
||||
4.3-tahoe leaves a file descriptor open in setpwent() if you're
|
||||
using dbm password files. 4.3+NFS does this if you're not using
|
||||
YP. Arghhhhhhh... I haven't decided yet what to do about this;
|
||||
probably just set fd 3 to close-on-exec when the shell is
|
||||
initialized.
|
||||
|
||||
execute_cmd.c
|
||||
- removed the call to `add_undo_redirect()' when a file is being
|
||||
closed with the redirection operators [n]<&- and [n]>&-. The
|
||||
effect was to make those operators useless. Sad to say, I was
|
||||
probably the dummy who put it in there...
|
||||
|
||||
execute_cmd.c
|
||||
- when calling fcntl(redirector, F_GETFD, 0) in do_redirection() to
|
||||
find out if a file descriptor is active, do it only if redirector
|
||||
is not the same as `fd', which you've just opened. This has
|
||||
spectacularly bad consequences if you do something like
|
||||
|
||||
exec 3</dev/tty 4>/tmp/foo 5</dev/null
|
||||
|
||||
I'm probably to blame for this, too...
|
||||
|
||||
execute_cmd.c
|
||||
- when saving a file descriptor in add_undo_redirect, make sure we
|
||||
save the state of the close-on-exec flag, and restore it when
|
||||
dup2'ing the saved fd back to the orignal.
|
||||
|
||||
execute_cmd.c
|
||||
- when performing a redirection that causes us to open a file, make
|
||||
sure we at least add an undo record to close the file, even if
|
||||
the file descriptor is not already active
|
||||
|
||||
execute_cmd.c
|
||||
- when duplicating a file descriptor as the result of a redirection
|
||||
instruction, make sure to manually duplicate the state of the
|
||||
close-on-exec flag
|
||||
|
||||
11/13
|
||||
-----
|
||||
|
||||
execute_cmd.c
|
||||
- finally tracked down and stamped out the persistant bug that caused
|
||||
the shell to hang when doing a command like "history | more" when
|
||||
there was more than a pipeful of text to send to `more' and you quit
|
||||
out of `more'after the first screenful. An extra read end of the
|
||||
pipe was being left open in the shell started to run `history', the
|
||||
consequence being that that shell at the beginning of the pipeline
|
||||
would never get the SIGPIPE that would cause it to exit. The fix
|
||||
is kind of strange: pass around a file descriptor to close whenever
|
||||
a child process is created in either execute_command_internal or
|
||||
execute_simple_command. We just pass the file descriptor that we
|
||||
want closed to the instance of execute_command_internal that runs
|
||||
the first half of the pipeline, and it gets closed just like we
|
||||
want.
|
||||
|
||||
In the future, this can (and probably should) be made into a bitmap
|
||||
of file descriptors to close. It wouldn't have to be big, 16 should
|
||||
be enough given the ability to do close-on-exec.
|
||||
|
||||
builtins.c, builtins.c.posix
|
||||
- changed the one call to execute_command_internal to add the extra
|
||||
parameter needed by the above fix.
|
||||
|
||||
unwind_prot.c
|
||||
- make without_interrupts() block SIGINT on capable systems (Posix
|
||||
and systems with BSD sigs) instead of ignoring it, which causes
|
||||
interrupts to be dropped. Blocking is what you want, anyway.
|
||||
|
||||
execute_cmd.c
|
||||
- add an unwind_protect for the redirections for a function or
|
||||
builtin. To see why this is needed, define a function shcat:
|
||||
|
||||
shcat()
|
||||
{
|
||||
while read line
|
||||
do
|
||||
echo "$line"
|
||||
done
|
||||
}
|
||||
|
||||
Now execute "shcat < INSTALL" and try to interrupt it. Bash will
|
||||
keep reading the lines from INSTALL and trying to execute them
|
||||
until EOF, at which point the shell exits.
|
||||
|
||||
11/14
|
||||
-----
|
||||
|
||||
execute_cmd.c
|
||||
- a subshell spawned to execute a function or a builtin with a pipe
|
||||
or an asynchronous function or builtin should have login_shell and
|
||||
interactive set to 0. That way, if someone is stupid enough to
|
||||
pipe to `exit' from a login shell, the subshell won't try to exec
|
||||
.bash_logout.
|
||||
|
||||
11/16
|
||||
-----
|
||||
builtins.c, builtins.c.posix
|
||||
- exit status of `type' was wrong for executable files, hashed and
|
||||
unhashed
|
||||
|
||||
bashline.c
|
||||
- Made bash_complete_filename_internal take just about everything
|
||||
as a possible filename character. It still can't do completion
|
||||
of a filename containing blanks if you type one of the blanks,
|
||||
though -- it needs the blanks-as-word-separators logic to work
|
||||
at all.
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,234 @@
|
||||
This file documents changes to CWRU bash following its first network-wide
|
||||
release.
|
||||
|
||||
3/15
|
||||
----
|
||||
Makefile
|
||||
- change the declaration of $CPP_ARGS so that CPP_CC can have
|
||||
embedded blanks, by adding quotes
|
||||
|
||||
bashline.c
|
||||
- some cosmetic changes to the FIGNORE support functions
|
||||
|
||||
glob.c
|
||||
- don't define USGr3 if it's already defined
|
||||
|
||||
variables.c
|
||||
- a declaration for the argument to put_command_name_into_env was
|
||||
missing
|
||||
|
||||
builtins.c
|
||||
- only print the command name in builtin_error if this_command_name
|
||||
is non-null
|
||||
|
||||
expr.c
|
||||
- catch something % 0 as an error
|
||||
|
||||
subst.c
|
||||
- make sure this_command_name is set to NULL before calling evalexp,
|
||||
because evalexp uses builtin_error
|
||||
|
||||
3/18
|
||||
----
|
||||
|
||||
variables.c
|
||||
- changed getenv() to search the inherited environment if the hash
|
||||
table of shell variables does not exist or has not been created
|
||||
|
||||
3/19
|
||||
----
|
||||
|
||||
subst.c
|
||||
- when doing command substitution, strip only the trailing newlines.
|
||||
This is in accordance with Posix.2.
|
||||
|
||||
general.c
|
||||
- strip_trailing () has aquired a new flag telling whether to strip
|
||||
all white space or just trailing newlines.
|
||||
|
||||
variables.c
|
||||
- since some places in the code rely on bind_variable returning a
|
||||
valid value, the dynamic variable assignment functions have been
|
||||
changed to take a pointer to themselves as the first parameter:
|
||||
|
||||
return ((*(entry->assign_func)) (entry, value));
|
||||
|
||||
and then return that value after doing whatever they need to
|
||||
|
||||
3/30
|
||||
----
|
||||
|
||||
bashline.c
|
||||
- disabled builtin commands should not be returned to the readline
|
||||
completion functions as legal command alternatives
|
||||
|
||||
flags.c
|
||||
- do not redefine NULL; check only after including all needed
|
||||
.h files
|
||||
|
||||
nojobs.c
|
||||
- fix unconditional reference to status.w_*
|
||||
- fix typo after call to WIFCORED in wait_for
|
||||
|
||||
readline/readline.c
|
||||
- make sure all calls to BSD signal mechanism are protected by test
|
||||
for HAVE_BSD_SIGNALS define
|
||||
- make sure declaration of struct ltchars variable is protected by
|
||||
test for definition of TIOCGLTC
|
||||
- change #include file from sys/errno.h to errno.h
|
||||
- added a new function rl_stop_output (), the non-emacs version of
|
||||
^S, to go with rl_restart_output. Haven't done anything with it
|
||||
yet.
|
||||
- added Posix support in the form of tcflow() calls to
|
||||
rl_restart_output and rl_stop_output
|
||||
|
||||
readline/readline.h
|
||||
- change the declaration of rl_filename_completion_ignore_function
|
||||
to extern. It was coming up as multiply defined on some systems
|
||||
|
||||
siglist.c
|
||||
- change #include file from sys/signal.h to signal.h
|
||||
- some systems define _NSIG but not NSIG. Define NSIG in terms of
|
||||
_NSIG on those systems
|
||||
|
||||
ulimit.c
|
||||
- change #include file from sys/errno.h to errno.h
|
||||
|
||||
subst.c
|
||||
- string_extract_double_quoted() needs to ignore "" inside `` pair,
|
||||
but this code should be executed only if the ` is not backslash-
|
||||
escaped.
|
||||
- changed sv_uids() to give UID, EUID the integer attribute
|
||||
automatically
|
||||
|
||||
machines.h
|
||||
- check for the DG AViiON defining either __DGUX__ or DGUX, make
|
||||
sure DGUX is defined in any case
|
||||
|
||||
trap.c
|
||||
- change run_pending_traps to loop from 1 to NSIG instead of 0 to
|
||||
NSIG
|
||||
|
||||
execute_cmd.c
|
||||
- For a command run explicitly in a subshell via (), run_exit_trap ()
|
||||
needs to be called after that command has executed for /bin/sh
|
||||
compatibility
|
||||
|
||||
variables.c
|
||||
- make $PPID have the integer attribute when it is intialized
|
||||
|
||||
4/2
|
||||
---
|
||||
|
||||
subst.c
|
||||
- make string_extract_double_quoted handle backslash-escaped
|
||||
` correctly when parsing a `` pair
|
||||
|
||||
4/3
|
||||
---
|
||||
|
||||
jobs.c
|
||||
- make sure job_control is set to 1 before the first time
|
||||
give_terminal_to is called, so that it does its job and the
|
||||
process groups are correct.
|
||||
|
||||
subst.c
|
||||
- make string_extract_double_quoted() not turn \\ into \ inside
|
||||
quoted strings. The translations will be taken care of later.
|
||||
|
||||
nojobs.c
|
||||
- make sure we get the tty state in initialize_jobs(), and don't
|
||||
try to set it in set_tty_state until we know we have saved
|
||||
valid settings.
|
||||
|
||||
4/6
|
||||
---
|
||||
|
||||
shell.c, execute_cmd.c, shell.h
|
||||
- shell now exits with status 127 when asked to execute a binary
|
||||
file as a shell script
|
||||
|
||||
builtins.c
|
||||
- `local' is once again an error outside a function
|
||||
- `trap' now formats output differently when given no arguments;
|
||||
the new format is suitable for feeding back to the shell as
|
||||
input to `trap'
|
||||
- cleaned up a contradiction in the help text for the `export'
|
||||
builtin
|
||||
- `export' and `readonly' now accept a -p flag for Posix.2 compliance
|
||||
that acts the same as if no flags had been specified, and take a
|
||||
`--' option to disable further option processing
|
||||
- `unset' takes a `--' argument to disable further option
|
||||
processing
|
||||
- when given the -f flag, unset will now try to unset a variable
|
||||
if no function is found for the name supplied
|
||||
- `kill' now takes a -s signal argument as equivalent to -signal
|
||||
- `kill' takes a `--' argument to disable further option processing,
|
||||
since a negative number may be used to denote a process group
|
||||
- `kill -l' now takes arguments and lists the names for individual
|
||||
signals by number. If the number given as argument is > 128, it
|
||||
is assumed to be an exit status, and 128 is subtracted before
|
||||
further processing
|
||||
|
||||
builtins.c, variables.c
|
||||
- `set +' is no more; print_vars_no_values() is no longer needed
|
||||
|
||||
flags.c, builtins.c
|
||||
- `set -C' is now an alias for noclobber
|
||||
|
||||
trap.c
|
||||
- SIGNULL is no longer a valid name for signal 0
|
||||
|
||||
getopts.c, subst.c
|
||||
- resetopts () --> getopts_reset ()
|
||||
- rewrote getopt() per Brian's request
|
||||
|
||||
builtins.c
|
||||
- `return' is now valid when executing a file with the `.' builtin
|
||||
and causes the execution to be aborted
|
||||
|
||||
execute_cmd.c
|
||||
- file descriptors > 2 manipulated via `exec' are no longer set to
|
||||
close-on-exec
|
||||
|
||||
4/8
|
||||
---
|
||||
|
||||
cpp-Makefile
|
||||
- fixed the bad definition of RANLIB if RANLIB_LOCATION was defined
|
||||
- pass the correct definition of ranlib through to the make of
|
||||
readline
|
||||
|
||||
readline/readline.c
|
||||
- make sure some defaults for screen size are defined in the case
|
||||
of a dumb terminal
|
||||
|
||||
builtins.c
|
||||
- `return' now works for aborting files executed with the `.'
|
||||
builtin
|
||||
|
||||
parse.y
|
||||
- a `"' before a closing ) in a $( ) construct within double
|
||||
quotes is no longer an error
|
||||
|
||||
subst.c
|
||||
- string_extract_double_quoted now passes everything between $(
|
||||
and ) through verbatim, without scanning it for double quotes.
|
||||
This way, `echo "$(echo "*")"' will echo `*' like it should.
|
||||
|
||||
documentation/bash.1
|
||||
- updated to reflect the changes from Posix.2 draft 11.
|
||||
|
||||
4/10
|
||||
----
|
||||
|
||||
execute_cmd.c, builtins.c
|
||||
- changed some instances of absolute_pathname to absolute_program
|
||||
(like doing PATH, CDPATH searching, the `type' builtin, and
|
||||
filename hashing)
|
||||
|
||||
readline/readline.c
|
||||
- made rl_deprep_terminal do a little sanity checking on the
|
||||
values in otio that it is restoring
|
||||
|
||||
Minor update of tar files available for FTP from CWRU
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,671 @@
|
||||
[Beginning of work with version 1.11]
|
||||
|
||||
10/31
|
||||
-----
|
||||
Makefile
|
||||
- changed instances of $(AWK) to $(GAWK) -- political correctness from
|
||||
bfox
|
||||
|
||||
builtins.h, builtins/help.def, builtins/mkbuiltins.c
|
||||
- changed representation of long_doc from a single string to an
|
||||
array of strings
|
||||
|
||||
execute_cmd.c
|
||||
- only call __setostype() if on isc386 and _POSIX_SOURCE is
|
||||
defined
|
||||
|
||||
general.c
|
||||
- only define functions for index and rindex if index and rindex
|
||||
are not already cpp defines
|
||||
|
||||
jobs.c
|
||||
- #undef some things that clash between <sys/ioctl.h> and <termios.h>
|
||||
on Posix suns
|
||||
|
||||
machines.h
|
||||
- make isc386 machines links with the shared C library explicitly
|
||||
(-lc_s)
|
||||
- new entry for a MagicStation (?) from bfox
|
||||
|
||||
variables.c
|
||||
- use a cpp define _CONST_HACK to determine whether the parameter to
|
||||
getenv() is a char const * (yes for _STDC_, no otherwise)
|
||||
|
||||
builtins/type.def
|
||||
- make found_file local to the block that searches for executable
|
||||
disk files
|
||||
|
||||
11/4
|
||||
----
|
||||
execute_cmd.c
|
||||
- make execute_function_or_builtin use unwind protects to protect
|
||||
the `return catch' variables
|
||||
|
||||
support/getcppsyms.c
|
||||
- added definitions for M_UNIX, M_XENIX, and _AIX
|
||||
|
||||
11/5
|
||||
----
|
||||
bashline.c
|
||||
- fix a call to savestring in command_word_completion_function with
|
||||
a post-incremented int parameter, since savestring is a macro that
|
||||
evaluates its argument twice (builtin completion)
|
||||
|
||||
lib/glob/fnmatch.c
|
||||
- add `^' as a character that negates a character class ([])
|
||||
|
||||
11/6
|
||||
----
|
||||
subst.c
|
||||
- add a new variable last_command_subst_pid to keep track of the
|
||||
pid of the last child created for command substitution. Used
|
||||
to determine whether or not command substitution has taken
|
||||
place.
|
||||
|
||||
execute_cmd.c
|
||||
- made the exit status of a command that has only assignments and
|
||||
redirections obey the Posix spec
|
||||
|
||||
unwind_prot.c, trap.c
|
||||
- make sure all sigset_t variables are initialized with sigemptyset
|
||||
before use
|
||||
|
||||
lib/glob/fnmatch.c
|
||||
- fixed a couple of bugs with [] classes in fnmatch: not checking
|
||||
whether or not we've hit the ']' and not incrementing the string
|
||||
argument in the right place
|
||||
|
||||
11/7
|
||||
----
|
||||
braces.c
|
||||
- Make backquotes inhibit brace expansion -- defer it until the
|
||||
subshell runs
|
||||
- Ditto for $( )
|
||||
|
||||
subst.c
|
||||
- since braces.c now calls unquoted_member and unquoted_substring,
|
||||
they can no longer be static functions
|
||||
|
||||
config.h
|
||||
- two new configuration options: ALLOW_RIGID_POSIX_COMPLIANCE and
|
||||
DISABLED_BUILTINS
|
||||
|
||||
shell.c, jobs.c
|
||||
- define and use top_level_signal_mask, restored on longjmps to
|
||||
top_level by throw_to_top_level
|
||||
|
||||
builtins/builtin.def
|
||||
- use builtin_address to find the function (if so configured) so
|
||||
that `builtin foo' still works after `enable -n foo'
|
||||
|
||||
builtins/common.c
|
||||
- have both find_shell_builtin, which never finds disabled builtins,
|
||||
and builtin_address, which does
|
||||
|
||||
11/8
|
||||
----
|
||||
general.c
|
||||
- the getdtablesize emulation should ensure that _SC_OPEN_MAX is
|
||||
defined on Posix systems before trying to use it in a call to
|
||||
sysconf()
|
||||
|
||||
|
||||
11/10
|
||||
-----
|
||||
lib/glob/fnmatch.c
|
||||
- fixes from Roland McGrath for some of the more egregious bugs
|
||||
- naturally, Roland missed a few
|
||||
|
||||
lib/readline/readline.c
|
||||
- add missing calls to sigemptyset(), since Posix specifies that
|
||||
all sigset_t variables be initialized before use using it
|
||||
- only turn off ISTRIP and INPCK in the termio(s) code if the
|
||||
character size is 8 bits ((otio.c_cflag & CSIZE) == CS8)
|
||||
- Sequents running Dynix/ptx should include <sys/pte.h> rather
|
||||
that <sys/ptem.h>
|
||||
|
||||
builtins/type.def
|
||||
- change a call to printf to builtin_error when printing a
|
||||
diagnostic that something is not found
|
||||
|
||||
builtins/times.def
|
||||
- changed file inclusion code to include <sys/time.h> and
|
||||
<sys/resource.h> if HAVE_RESOURCE is defined, then to include
|
||||
<sys/times.h> if !HAVE_RESOURCE and RUSAGE_SELF is not defined.
|
||||
This catches systems with deficient <sys/resource.h> files
|
||||
|
||||
11/11
|
||||
-----
|
||||
lib/readline/readline.c
|
||||
- Don't try to dereference funmap in rl_named_function() if it's
|
||||
null (as it is before rl_initialize_funmap is called)
|
||||
|
||||
11/12
|
||||
-----
|
||||
lib/readline/readline.c
|
||||
- backed out of change of 11/11 to rl_named_function
|
||||
|
||||
bashline.c
|
||||
- add a state variable bash_readline_initialized to keep track of
|
||||
whether or not readline has been initialized with a call to
|
||||
initialize_readline()
|
||||
|
||||
builtins/bind.def
|
||||
- if readline has not been initialized the first time this is
|
||||
called, call initialize_readline
|
||||
|
||||
11/13
|
||||
-----
|
||||
execute_cmd.c
|
||||
- execute_subshell_builtin_or_function would only let the output
|
||||
of `jobs' be piped if pipe_in and pipe_out were both != NO_PIPE
|
||||
(?). Obviously a typo.
|
||||
|
||||
builtins/command.def
|
||||
- add an unwind_protect to dispose of the new command created
|
||||
by the call to make_bare_simple_command
|
||||
|
||||
builtins/jobs.def
|
||||
- add the `jobs -x command args' form from the System V.4 sh
|
||||
All job specs in `args' are replaced with the appropriate
|
||||
job's process group id and `command' is executed
|
||||
|
||||
builtins/getopt.c
|
||||
- if getopt() finds that optind > argc when it is called, it
|
||||
sets optind = argc and returns EOF
|
||||
|
||||
builtins/times.def
|
||||
- backed out of 11/10 change. Some systems, most notably
|
||||
HP/UX have all the correct includes and defines and simply
|
||||
do not implement getrusage(). At all.
|
||||
|
||||
subst.c
|
||||
- if sv_optind finds that OPTIND has been unset or set to an
|
||||
empty string, call getopts_reset (0). The Gnu getopt
|
||||
resets its internal state when optind == 0.
|
||||
- call getopts_reset(0) if OPTIND=1, because that's what the
|
||||
Posix spec says to use to reset
|
||||
|
||||
11/14
|
||||
-----
|
||||
builtins/alias.def
|
||||
- fixed a typo in the SHORT_DOC for the unalias builtin
|
||||
|
||||
builtins/shift.def
|
||||
- allowed the shift count to be 0
|
||||
|
||||
11/15
|
||||
-----
|
||||
lib/readline/readline.c
|
||||
- turn on 8 bit characters if NO_EIGHT_BIT_CHARACTERS is not
|
||||
defined and the Posix termios code path is being taken
|
||||
|
||||
[The following two entries describe what's needed for an initial
|
||||
implementation of the vi mode `.' command]
|
||||
|
||||
lib/readline/vi_mode.c
|
||||
- new variables:
|
||||
vi_last_command: last command that modified text in
|
||||
the buffer
|
||||
vi_last_repeat: the repeat count to vi_last_command
|
||||
vi_last_arg_sign: arg sign for vi_last_repeat
|
||||
vi_last_motion: the last motion qualifier for the
|
||||
text modification commands that use one
|
||||
vi_redoing: state variable, if 1 we're re-doing a
|
||||
command
|
||||
vi_textmod: list of commands that modify text
|
||||
(initially "_*\\AaIiCcDdPpYyRrSsXx~")
|
||||
|
||||
- new functions:
|
||||
rl_vi_redo: an initial implementation of the vi mode
|
||||
`.' command
|
||||
rl_vi_set_last: initialize the state of the new variables
|
||||
described above
|
||||
rl_vi_textmod_command: return true if command passed is
|
||||
a text modification command
|
||||
- changed rl_vi_domove to save the movement command information in
|
||||
vi_last_motion
|
||||
- changed rl_vi_movement_mode to call rl_vi_set_last to initialize
|
||||
the `last command' state
|
||||
|
||||
lib/readline/readline.c
|
||||
- changed rl_dispatch to save vi_last_command, vi_last_repeat,
|
||||
and vi_last_arg_sign
|
||||
- changed rl_newline to call vi_set_last
|
||||
|
||||
lib/readline/readline.h
|
||||
- new function rl_vi_redo
|
||||
|
||||
lib/readline/vi_keymap.c
|
||||
- bind rl_vi_redo to `.'
|
||||
|
||||
11/20
|
||||
-----
|
||||
posixstat.h
|
||||
- make isc386 defines for S_IFDIR and S_IFMT be used if they
|
||||
do not already appear, no matter whether or not gcc is being
|
||||
used for the compile
|
||||
|
||||
machines.h
|
||||
- new entry for Omron Luna 88k running Mach 2.5 (nice machines)
|
||||
|
||||
lib/readline/vi_mode.c
|
||||
- fixed a bug with rl_vi_domove and the last word on the line.
|
||||
If rl_point ended up > rl_end, it was being set to rl_end - 1
|
||||
rather than to rl_end.
|
||||
|
||||
cpp-Makefile
|
||||
- quote the values of RANLIB and AR passed to makes in
|
||||
subdirectories
|
||||
|
||||
shell.c
|
||||
- instead of making all Xenix systems swap the second and third
|
||||
arguments to setvbuf, make that behavior dependent on the
|
||||
definition of REVERSED_SETVBUF_ARGS
|
||||
|
||||
11/21
|
||||
-----
|
||||
lib/readline/readline.c
|
||||
- fixed an error in rl_forward that caused vi-mode to walk off
|
||||
the end of the line after executing `l' in command mode on an
|
||||
empty line
|
||||
|
||||
11/22
|
||||
-----
|
||||
support/getcppsyms.c
|
||||
- added the `luna88k' define
|
||||
|
||||
11/24
|
||||
-----
|
||||
execute_cmd.c
|
||||
- all calls to dup2 in do_redirection_internal should be checked
|
||||
for errors and the redirection should fail if the dup2 fails
|
||||
|
||||
shell.h, parse.y, execute_cmd.c, print_cmd.c, make_cmd.c
|
||||
- replaced the single redirection operator `r_duplicating' with
|
||||
r_duplicating_input and r_duplicating_output to avoid the
|
||||
read 1<&7 getting printed as read 1>&7 problem:
|
||||
foo()
|
||||
{
|
||||
exec 9</dev/tty
|
||||
read 1<&9
|
||||
exec 9<&-
|
||||
}
|
||||
is printed wrong when `type foo' is executed
|
||||
|
||||
shell.h
|
||||
- added two new redirection_operators, r_duplicating_input_word and
|
||||
r_duplicating_output_word to implement true sh semantics for
|
||||
[n]<&word and [n]>&word
|
||||
parse.y
|
||||
- eliminated the old yacc production for >& word, meaning put stdout
|
||||
and stderr into `word'
|
||||
- added productions for [n]<&word and [n]>&word that use the new
|
||||
redirection operators
|
||||
execute_cmd.c
|
||||
- the first thing done in do_redirection_internal is now a check for
|
||||
r_duplicating_input_word and r_duplicating_output_word. If the
|
||||
redirection is one of those two, `word' is expanded and a new
|
||||
redirection is made
|
||||
print_cmd.c
|
||||
- new code to print the [n]<&word and [n]>&word redirections
|
||||
(r_duplicating_input_word and r_duplicating_output_word)
|
||||
make_cmd.c
|
||||
- new code for make_redirection to handle r_duplicating_input_word
|
||||
and r_duplicating_output_word
|
||||
|
||||
documentation/bash.1
|
||||
- added documentation for the -x option to `jobs' + minor cleanups
|
||||
and corrections
|
||||
|
||||
11/25
|
||||
-----
|
||||
cpp-Makefile
|
||||
- added GCC_EXTRAS for gcc-specific compiler flags
|
||||
|
||||
execute_cmd.c
|
||||
- removed some unused functions (close_all_files) and variables
|
||||
(file_exists_p)
|
||||
|
||||
parse.y
|
||||
- added new command-oriented-style history: all lines of a multiple
|
||||
line command will be added to the same history line
|
||||
- new variable current_command_line_count to keep track of the
|
||||
number of lines in the current command. If > 1, a line is appended
|
||||
to the current history line to implement command-oriented history
|
||||
- new function bash_add_history
|
||||
|
||||
shell.c
|
||||
- added code to reset current_command_line_count to 0 before calling
|
||||
parse_command and yyparse
|
||||
|
||||
subst.c
|
||||
- the command-oriented history is controlled by the setting of the
|
||||
variable command_oriented_history
|
||||
|
||||
builtins/reserved.def
|
||||
- a new help topic: `variables', giving help on some common shell
|
||||
variables
|
||||
|
||||
11/26
|
||||
-----
|
||||
lib/glob/glob.c
|
||||
- if the filename portion of the pathname to be matched is null
|
||||
(e.g. a*/), do not call glob_vector to attempt to match each
|
||||
file in the expanded directories against the null string.
|
||||
|
||||
11/27
|
||||
-----
|
||||
lib/glob/glob.c
|
||||
- force globbing of directory names even if the metacharacters
|
||||
contained therein are protected by backslashes. The globbing
|
||||
strips the quotes correctly
|
||||
|
||||
shell.c
|
||||
- make sure current_command_line_count is declared everywhere
|
||||
it's used
|
||||
|
||||
parse.y
|
||||
- remove declaration of history_lines_this_session from
|
||||
pre_process_line
|
||||
- add extern declaration of history_lines_this_session to
|
||||
bash_add_history
|
||||
|
||||
12/2
|
||||
----
|
||||
trap.h
|
||||
- removed inclusion of <sys/types.h> because most files include it
|
||||
themselves, and this is dangerous on systems that do not protect
|
||||
against multiple inclusion of header files
|
||||
|
||||
trap.c
|
||||
- include <sys/types.h> before "trap.h" since it was the only file
|
||||
in the distribution not to do so
|
||||
|
||||
shell.c
|
||||
- Install the SIGINT sighandler the Posix way on machines with
|
||||
_POSIX_VERSION defined
|
||||
|
||||
12/3
|
||||
----
|
||||
dispose_cmd.c
|
||||
- make sure dispose_redirects properly handles r_duplicating_input_word
|
||||
and r_duplicating_output_word by freeing the `filename'
|
||||
|
||||
execute_cmd.c
|
||||
- fix do_redirection_internal to copy new_redirect->redirectee.filename
|
||||
using alloca() so no memory has to be freed at function exit
|
||||
|
||||
12/4
|
||||
----
|
||||
parse.y
|
||||
- expand \n in PS1 or PS2 into \r\n only if line editing is enabled
|
||||
|
||||
shell.c
|
||||
- define top_level_mask if _POSIX_VERSION defined
|
||||
|
||||
newversion.c
|
||||
- made it write a definition of SCCSVERSION to version.h -- an SCCS
|
||||
string so the `what' command will be useful
|
||||
|
||||
version.c
|
||||
- new variable `sccsversion' set to SCCSVERSION
|
||||
|
||||
12/5
|
||||
----
|
||||
builtins/fc.def
|
||||
- make fc_gethist check that the history list is non-null before
|
||||
trying to access its members
|
||||
|
||||
12/6
|
||||
----
|
||||
lib/readline/readline.c
|
||||
- changed the ISTRIP code (again) to force bash to disable ISTRIP
|
||||
only if the tty driver guarantees eight bits (cflag & CSIZE == CS8)
|
||||
|
||||
12/9
|
||||
----
|
||||
lib/readline/readline.c
|
||||
- tgetent returns 0 if it can't find the terminal name in /etc/termcap,
|
||||
so we failed if it returns <= 0, not < 0.
|
||||
|
||||
12/11
|
||||
-----
|
||||
machines.h
|
||||
- Sony machines running NEWS-OS 4.0 (V.4) should have strerror(),
|
||||
so define HAVE_STRERROR
|
||||
- Pyramids running BSD do not all have the vprintf family of functions,
|
||||
so remove the definition of HAVE_VPRINTF
|
||||
|
||||
12/12
|
||||
-----
|
||||
parse.y
|
||||
- make sure that shell_getc always checks that shell_input_line is
|
||||
valid before trying to reference shell_input_line[0]
|
||||
|
||||
12/13
|
||||
-----
|
||||
mailcheck.c
|
||||
- Since `dollar_underscore' saves the value of $_ in a local variable,
|
||||
it's possible that bind_variable can free and reallocate the cell
|
||||
for $_, leaving dollar_underscore pointing at freed storage. The
|
||||
fix is to copy it into freshly-allocated memory.
|
||||
- ensure that when saving and restoring dollar_underscore that we do
|
||||
not try to call strlen on a null string
|
||||
|
||||
12/15
|
||||
-----
|
||||
general.c, execute_cmd.c
|
||||
- moved the utility function `all_digits' from execute_cmd.c to
|
||||
general.c
|
||||
|
||||
builtins/kill.def
|
||||
- remove use of sscanf, used calls to all_digits and atoi instead
|
||||
|
||||
machines.h
|
||||
- if not using gcc, need to make SYSDEP_LDFLAGS = -Xp for Posix
|
||||
on isc386
|
||||
|
||||
12/16
|
||||
-----
|
||||
machines.h
|
||||
- isc386 has multiple groups
|
||||
|
||||
execute_cmd.c
|
||||
- add a QUIT to the while loop in find_user_command_in_path that
|
||||
searches the path, so users can interrupt a lengthy path search
|
||||
|
||||
12/17
|
||||
-----
|
||||
builtins/alias.def
|
||||
- added the Posix-specified -a option to unalias, made unalias obey
|
||||
the getopt argument syntax guidelines
|
||||
|
||||
builtins/jobs.def
|
||||
- made `jobs' handle the -- option to signal the end of arguments
|
||||
|
||||
flags.c
|
||||
- Posix.2a has specified that the -b flag stand for asynchronous
|
||||
notification, so move the definition of asynchronous_notification
|
||||
here and add a new entry to the `flags' struct if JOB_CONTROL is
|
||||
defined
|
||||
|
||||
flags.h
|
||||
- add an extern declaration of asynchronous_notification
|
||||
|
||||
jobs.c
|
||||
- change the definition of asynchronous_notification to extern, since
|
||||
it's now declared in flags.c
|
||||
|
||||
builtins/set.def
|
||||
- change documentation strings to add -b option, note that
|
||||
set -o notify is now the same as set -b
|
||||
- change the code to make set -o notify the same as set -b
|
||||
(list_long_opts(), take the special case out of set_minus_o_option)
|
||||
|
||||
12/19
|
||||
-----
|
||||
lib/readline/readline.c
|
||||
- added support for $LINES, $COLUMNS. The variables are read after
|
||||
the ioctl(TIOCGWINSZ) and before calls to tgetent
|
||||
|
||||
builtins/fc.def
|
||||
- made the fc output format correspond to that specified by Posix.2a
|
||||
("%d\t%s\n")
|
||||
|
||||
12/20
|
||||
-----
|
||||
execute_cmd.c
|
||||
- user_command_matches did not properly handle a null $PATH element,
|
||||
which should be the same as ".". Changed the code to mirror
|
||||
find_user_command_in_path ()
|
||||
|
||||
|
||||
12/23
|
||||
-----
|
||||
execute_cmd.c
|
||||
- added a new function get_next_path_element, which calls
|
||||
extract_colon_unit and interprets the result, translating
|
||||
"" to "."
|
||||
|
||||
builtins/cd.def
|
||||
- added description of -l option to dirs short_doc
|
||||
- fixed the bug that caused `dirs' to always print an extra
|
||||
trailing space
|
||||
|
||||
documentation/bash.1
|
||||
- added description of -l option to dirs
|
||||
|
||||
parse.y
|
||||
- added optional leading ( for case clause, as per Posix.2
|
||||
|
||||
12/30
|
||||
-----
|
||||
lib/readline/vi_mode.c
|
||||
- removed unused variable `added_blank'
|
||||
|
||||
bashline.c
|
||||
- added dynamic completion from bfox
|
||||
|
||||
execute_cmd.c
|
||||
- redirections must be performed in a child before execution of
|
||||
the command is attempted or aborted (because it's not found
|
||||
by a hash table or $PATH search), according to Posix.2
|
||||
|
||||
getcwd.c
|
||||
- new file, from the Gnu C library, for systems that don't do
|
||||
this right -- they use popen("/bin/pwd", "r") instead
|
||||
|
||||
12/31
|
||||
-----
|
||||
builtins/type.def
|
||||
- the type builtin would not report a name as not found if any name
|
||||
had previously been found because the flag variable used to report
|
||||
this (found_something) was not reset each time through the loop.
|
||||
Added a variable `found_any' to be global and reset found_something
|
||||
to 0 each time through the loop
|
||||
|
||||
1/4
|
||||
---
|
||||
builtins/jobs.def
|
||||
- make sure that the call to add_unwind_protect in
|
||||
execute_list_with_replacements is made after the new command
|
||||
struct is completely initialized
|
||||
|
||||
support/mksysdefs
|
||||
- look for /dev/fd, define HAVE_DEV_FD if present
|
||||
|
||||
cpp-Makefile
|
||||
- pass HAVE_DEV_FD through to make in SYSTEM_FLAGS
|
||||
|
||||
shell.c, execute_cmd.c
|
||||
- call unlink_fifo_list only if HAVE_DEV_FD is not defined and
|
||||
PROCESS_SUBSTITUTION is defined
|
||||
|
||||
subst.c
|
||||
- new function make_dev_fd_filename to return /dev/fd/xx, where
|
||||
xx corresponds to the parent end of the pipe
|
||||
- all the named pipe utility functions should be #if !defined
|
||||
(HAVE_DEV_FD)
|
||||
- change process_subsitute to do the following on systems with /dev/fd:
|
||||
1. Make a pipe in the parent
|
||||
2. if (open_for_read_in_child)
|
||||
parent_pipe_fd = fildes[1]
|
||||
child_pipe_fd = fildes[0]
|
||||
else
|
||||
parent_pipe_fd = fildes[0]
|
||||
child_pipe_fd = fildes[1]
|
||||
3. pathname = make_dev_fd_filename (parent_pipe_fd);
|
||||
4. fork
|
||||
5. In parent, close child_pipe_fd and return pathname
|
||||
6. In child, turn off job control, dup child_pipe_fd to
|
||||
either fd 0 or 1 depending on OPEN_FOR_READ_IN_CHILD,
|
||||
close parent_pipe_fd, parse and execute the string,
|
||||
and exit
|
||||
|
||||
shell.c
|
||||
- added call to unlink_fifo_list in reader_loop so that all fifos
|
||||
get closed, even after builtin commands are executed
|
||||
|
||||
1/6
|
||||
---
|
||||
machines.h, make_cmd.c, print_cmd.c, shell.c, cpp-Makefile
|
||||
- HAVE_VPRINTF --> HAVE_VFPRINTF
|
||||
|
||||
cpp-Makefile, machines.h, test.c
|
||||
- HAVE_MULTIPLE_GROUPS --> HAVE_GETGROUPS
|
||||
|
||||
cpp-Makefile, machines.h
|
||||
- HAVE_SIGLIST --> HAVE_SYS_SIGLIST
|
||||
|
||||
parse.y
|
||||
- add if_command production
|
||||
|
||||
builtins/echo.def
|
||||
- validate all arguments before using them so that -nanything != -n
|
||||
- document the -E option and its use
|
||||
|
||||
builtins/umask.def
|
||||
- allow other arguments to be used with -S
|
||||
|
||||
subst.c
|
||||
- make sure to close all files in the child created to run a
|
||||
process substutition to avoid holding write file descriptors
|
||||
to pipes that will cause the shell to hang
|
||||
|
||||
1/7
|
||||
---
|
||||
cpp-Makefile
|
||||
- fixed a typo: SEARCHLIB -> SEARCH_LIB
|
||||
|
||||
machines.h
|
||||
- new description for Amiga 3000 running System V.4
|
||||
|
||||
shell.c
|
||||
- default secondary prompt is now "> "
|
||||
|
||||
builtins/bashgetopt.c
|
||||
- more internal cleanups and bug fixes
|
||||
|
||||
support/mksysdefs
|
||||
- detect the amiga by the presence of /usr/amiga
|
||||
|
||||
1/9
|
||||
---
|
||||
general.c
|
||||
- canonicalize_pathname should remove ./ only if it's at the
|
||||
beginning of the pathname, or immediately preceded by a `/'
|
||||
|
||||
1/10
|
||||
----
|
||||
documentation/bash.1
|
||||
- clean up the documentation for test -t, since according to
|
||||
Posix, it always requires an argument
|
||||
|
||||
general.c
|
||||
- don't build index and rindex for DG machines
|
||||
|
||||
|
||||
machines.h
|
||||
- description for System V.4 on IBM 370 architecture
|
||||
- fixed up DG/UX machine description
|
||||
@@ -0,0 +1,251 @@
|
||||
[ Work begins after network release of version 1.11 ]
|
||||
|
||||
1/11
|
||||
----
|
||||
nojobs.c
|
||||
- Posix systems now reap zombie children and retry a fork() once if
|
||||
it fails
|
||||
- Posix systems should use waitpid() rather than wait() wherever
|
||||
possible
|
||||
- Posix systems do not need to validate a pid before calling waitpid()
|
||||
in wait_for_single_pid(); waitpid takes a pid argument
|
||||
|
||||
1/13
|
||||
----
|
||||
execute_cmd.c
|
||||
- get_next_path_element can return NULL, so the code that calls it
|
||||
must take that possibility into account
|
||||
|
||||
jobs.c
|
||||
- there was an extra parameter in the select() call
|
||||
|
||||
builtins/type.def
|
||||
- successful_finds needed to be initialized to 0
|
||||
|
||||
machines.h
|
||||
- fixed a typo (_D -> -D) in the DG/UX machine description
|
||||
|
||||
1/14
|
||||
----
|
||||
execute_cmd.c
|
||||
- fixed extract_colon_unit to return "" in the case of a trailing
|
||||
colon in the path
|
||||
|
||||
INSTALL
|
||||
- note that on SCO Xenix 386 one must use cc -E rather than /lib/cpp
|
||||
to process cpp-Makefile
|
||||
|
||||
cpp-Makefile
|
||||
- fixed the problem of a single quote in a makefile comment
|
||||
|
||||
machines.h
|
||||
- Xenix 386 machines need -DUSG in SYSDEP_CFLAGS
|
||||
|
||||
lib/readline/readline.c
|
||||
- changed the includes around so that the Xenix 386 support is
|
||||
in the same section as the USGr3 code, and the Xenix 286
|
||||
support is in the same section as the plain USG code
|
||||
|
||||
shell.c
|
||||
- split the `int code = setjmp (top_level)' statement in
|
||||
reader_loop into two statements -- some compilers don't like
|
||||
it
|
||||
|
||||
parse.y
|
||||
- changed the overloaded `yy_input_dev' to a `union STREAM',
|
||||
where a `union STREAM' is
|
||||
|
||||
typedef union STREAM {
|
||||
FILE *s_file;
|
||||
char *s_string;
|
||||
} STREAM;
|
||||
|
||||
and changed the parameter to init_yy_io and all the functions
|
||||
that call it to use a STREAM argument instead of casting back
|
||||
and forth between a (char *) and a (FILE *)
|
||||
|
||||
builtins/times.def
|
||||
- If hpux or USGr4, #undef HAVE_RESOURCE, rather than try to fit
|
||||
all the special cases onto a single line deciding whether or
|
||||
not to include <sys/resource.h>
|
||||
|
||||
1/15
|
||||
----
|
||||
bashline.c
|
||||
- changed the bindable name for the ksh-style ^O function from
|
||||
operate_and_get_next to operate-and-get-next
|
||||
|
||||
execute_cmd.c
|
||||
- some systems (e.g SGI) allow the result of alloca to be assigned
|
||||
only to a `simple' variable, so I introduced a dummy one instead
|
||||
of assigning to redirectee->word directly
|
||||
|
||||
shell.c
|
||||
- fixed a typo: PENDANTIC -> PEDANTIC
|
||||
|
||||
machines.h
|
||||
- took -DREVERESED_SETVBUF_ARGS out of the entries for Xenix 386
|
||||
|
||||
cpp-Makefile
|
||||
- added double quotes around the RHS of the assignment to
|
||||
SYSTEM_NAME to avoid further cpp processing if the system name
|
||||
happens to be a cpp define
|
||||
|
||||
bashline.c
|
||||
- added `search-forward', `search-backward' functions that perform
|
||||
non-incremental history searches using the vi-mode code
|
||||
|
||||
1/16
|
||||
----
|
||||
builtins/ulimit.def
|
||||
- fixed a typo in a comment
|
||||
- added parens around the object in an #if defined preprocessor
|
||||
statement
|
||||
|
||||
machines.h
|
||||
- the Xenix 386 machine descriptions need to #undef HAVE_GETWD
|
||||
|
||||
builtins/read.def
|
||||
- Fixed read to treat backslash as an escape character unless
|
||||
-r is given, as per Posix.2
|
||||
|
||||
lib/readline/readline.c
|
||||
- Fixed up the maze of dire[cn]t includes and defines so that
|
||||
they're correct for Xenix (finally)
|
||||
|
||||
lib/glob/glob.c
|
||||
- ditto. Now the defines/includes are correct for Xenix 386
|
||||
|
||||
execute_cmd.c
|
||||
- a loop of the form
|
||||
while : ; do echo -n 1; done
|
||||
can run a machine using Gwyn's alloca() emulation out of memory
|
||||
because alloca() keeps getting called at the same stack level
|
||||
and never frees anything up. Added a call to alloca(0) after
|
||||
the call to execute_simple_command in execute_command_internal
|
||||
- added Karl Kleinpaste's workaround for the AFS file creation
|
||||
bug, dependent on AFS_CREAT_BUG
|
||||
|
||||
parse.y
|
||||
- \s in a prompt string needs to decode to the shell basename, as
|
||||
per the documentation, rather than the full shell name
|
||||
|
||||
1/17
|
||||
----
|
||||
nojobs.c
|
||||
- fixed a typo in one of the WAITPID calls, thanks to Bruce Evans
|
||||
|
||||
[At this point, all of these fixes were sent along to bfox]
|
||||
|
||||
support/getcppsyms.c
|
||||
- now recognizes cpp symbol __hppa for use on HP precision
|
||||
architecture machines
|
||||
|
||||
machines.h
|
||||
- M_MACHINE is now `hppa' for HP Precision Architecture machines, so
|
||||
to make sure hpux is defined, it's now in SYSDEP_CFLAGS
|
||||
- Make sure that the RS6000/AIXv3 description defines M_OS as AIX,
|
||||
not "AIX". The quotes are added in cpp-Makefile
|
||||
|
||||
1/27
|
||||
----
|
||||
parser.h
|
||||
- new file, contains structures necessary to parse commands
|
||||
|
||||
input.h
|
||||
- new file, contains definitions and structures used to read input
|
||||
|
||||
bashline.c
|
||||
- removed the definitions for search-backward, search-forward
|
||||
|
||||
cpp-Makefile
|
||||
- removed the definition of DESTDIR; now passed down from Makefile
|
||||
|
||||
error.c, error.h
|
||||
- new files to isolate the error-handling functions
|
||||
|
||||
command.h
|
||||
- new file including structures used internally to represent
|
||||
commands
|
||||
|
||||
parse.y
|
||||
- include input.h, parser.h
|
||||
- changed all the code that deals with input streams to fit the
|
||||
new framework defined in input.h
|
||||
|
||||
make_cmd.c
|
||||
- moved the error reporting code to error.c
|
||||
- added cpp code to ensure that alloca is defined correctly
|
||||
|
||||
shell.h
|
||||
- removed the code that was moved to input.h, parser.h, command.h
|
||||
|
||||
builtins/common.c
|
||||
- moved a call to setjmp out of an if statement
|
||||
- changed the input code to work with the new input framework
|
||||
|
||||
builtins/getopt.c
|
||||
-include config.h if compiling for the shell
|
||||
|
||||
lib/readline/readline.c
|
||||
- change representation of characters > 127 to octal
|
||||
rather than M-c
|
||||
- changed representation of characters < ' ' to ^X rather
|
||||
than C-x
|
||||
- fixed a memory leak in parser_if () by freeing `tname'
|
||||
|
||||
machines.h
|
||||
- removed MIPS_CFLAGS from the ultrix Decstation entry, since the
|
||||
limit no longer needs increasing
|
||||
|
||||
variables.c
|
||||
- move the initialization of PWD before the environment is read, so
|
||||
an exported version of PWD takes precedence
|
||||
|
||||
readline.c, funmap.c, emacs_keymap.c
|
||||
- removed support for rl_arrow_keys -- it should now be done by the
|
||||
inputrc file
|
||||
|
||||
documentation/bash.1
|
||||
- only non-job-control shells start background jobs ignoring SIGINT
|
||||
and SIGQUIT
|
||||
|
||||
builtins/umask.def
|
||||
- don't print the octal representation of the umask if the symbolic
|
||||
representation has already been displayed
|
||||
- a bad option to umask should return EXECUTION_FAILURE, not -1
|
||||
|
||||
shell.c
|
||||
- new function, init_signal_handler (sig), to initialize the SIG
|
||||
signal hander, call it in main loop
|
||||
|
||||
nojobs.c
|
||||
- call init_signal_handler (SIGINT, sigint_sighandler) so the correct
|
||||
thing happens on Posix systems
|
||||
|
||||
general.c
|
||||
- updated the comment above the fallback implemenation of killpg()
|
||||
|
||||
machines.h
|
||||
- machine entry for the Unix PC
|
||||
- new variable HAVE_DIRENT
|
||||
|
||||
1/28
|
||||
----
|
||||
machines.h
|
||||
- SCO needs to #undef HAVE_GETCWD so that the getcwd() function
|
||||
supplied with bash is used
|
||||
|
||||
subst.c
|
||||
- USG machines should include <string.h>, others <strings.h>
|
||||
- sub_append_number should use itos() rather than xmalloc and
|
||||
sprintf
|
||||
|
||||
builtins/ulimit.def
|
||||
- changed the resource limit struct to one that has no explicit
|
||||
size to account for systems with differing numbers of resource
|
||||
limits
|
||||
|
||||
lib/readline/readline.c
|
||||
- there was an off-by-one error in the code that counts the number
|
||||
of items to list when doing completion listing
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,116 @@
|
||||
# Hey Emacs, this Makefile is in -*- makefile -*- mode!
|
||||
#
|
||||
# Makefile for Bash.
|
||||
# If your cpp doesn't like -P, just get rid of it (the -P, not cpp).
|
||||
# If you wish to use Gcc, then type `make CC=gcc CPPNAME='$(CC) -E''.
|
||||
# If you wish to use GNU's Make, then change `MAKE'.
|
||||
# If you don't like the destination, then change `bindir'.
|
||||
# The file that you most likely want to look at is cpp-Makefile.
|
||||
#
|
||||
# If you haven't read README, now might be a good time.
|
||||
|
||||
# Include some boilerplate Gnu makefile definitions.
|
||||
prefix = /usr/local
|
||||
exec_prefix = $(prefix)
|
||||
bindir = $(exec_prefix)/bin
|
||||
srcdir = .
|
||||
VPATH = $(srcdir)
|
||||
|
||||
# MAKE = make
|
||||
RM = rm -f
|
||||
SHELL = /bin/sh
|
||||
GAWK = awk
|
||||
# GAWK = gawk
|
||||
|
||||
# Force CPPNAME to be the name of your C preprocesor if Bash can't
|
||||
# find it. For instance, `CPPNAME=/usr/libexec/cpp' on 4.4 BSD.
|
||||
# If all else fails, set CPPNAME=$(CC) -E
|
||||
CPPNAME =
|
||||
CPP = `/bin/sh $(CPPMAGIC) $(GETCPPSYMS) "$(CPPNAME)"` -P
|
||||
|
||||
CPP_MAKEFILE = $(srcdir)/cpp-Makefile
|
||||
ANSI_MAKEFILE = ansi-Makefile
|
||||
|
||||
# CPPFLAGS = $(SYSTEM) $(CPP_DEFINES)
|
||||
CPPFLAGS = $(CPP_DEFINES) -I. -I$(srcdir)
|
||||
CPP_ARGS = -DCPP_CC="$(CC)"
|
||||
|
||||
SUPPORTDIR = ./support/
|
||||
SUPPORTSRC = $(srcdir)/support/
|
||||
|
||||
MKSYSDEFS = $(SUPPORTSRC)mksysdefs
|
||||
CPPMAGIC = $(SUPPORTSRC)cppmagic
|
||||
CAT_S = $(SUPPORTSRC)cat-s
|
||||
GETCPPSYMS = $(SUPPORTDIR)getcppsyms
|
||||
GETCPPSYMS_SRC = $(SUPPORTSRC)getcppsyms.c
|
||||
|
||||
# Here is a command which compresses runs of multiple blank lines to a
|
||||
# single blank line. "cat -s" works for BSD systems, but not for USG
|
||||
# systems. You can use an awk script if you like. If you have too
|
||||
# much trouble with this, just forget it. It is for making
|
||||
# bash-Makefile pretty and readable; something that isn't strictly
|
||||
# necessary.
|
||||
# SQUASH_BLANKS = cat -s
|
||||
#
|
||||
SQUASH_BLANKS = $(GAWK) -f $(CAT_S)
|
||||
|
||||
all: .notified bash-Makefile
|
||||
$(MAKE) -f bash-Makefile $(MFLAGS) $(MAKEARGS) srcdir=$(srcdir) \
|
||||
prefix=$(prefix)
|
||||
|
||||
bash-Makefile: $(CPP_MAKEFILE) Makefile machines.h sysdefs.h config.h
|
||||
@-if [ -f ansi-Makefile ]; then \
|
||||
echo "cp ansi-Makefile tmp-Makefile.c"; \
|
||||
cp ansi-Makefile tmp-Makefile.c; else \
|
||||
echo "cp $(CPP_MAKEFILE) tmp-Makefile.c"; \
|
||||
cp $(CPP_MAKEFILE) tmp-Makefile.c; \
|
||||
fi
|
||||
$(RM) $(GETCPPSYMS)
|
||||
$(SHELL) $(SUPPORTSRC)mkdirs support
|
||||
$(CC) -o $(GETCPPSYMS) $(GETCPPSYMS_SRC)
|
||||
rm -f bash-Makefile
|
||||
@$(SHELL) -c 'echo $(CPP) $(CPPFLAGS) $(CPP_ARGS) tmp-Makefile.c \| $(SQUASH_BLANKS) \> bash-Makefile'
|
||||
@$(SHELL) -c '$(CPP) $(CPPFLAGS) $(CPP_ARGS) tmp-Makefile.c | $(SQUASH_BLANKS) >bash-Makefile'
|
||||
rm -f tmp-Makefile.c
|
||||
@test -s bash-Makefile || { rm -f bash-Makefile ; exit 1; }
|
||||
|
||||
sysdefs.h: $(MKSYSDEFS)
|
||||
$(SHELL) $(MKSYSDEFS) -s $(srcdir)
|
||||
|
||||
# This is also performed by support/mksysdefs, but there's no way to change
|
||||
# it if cpp-Makefile is changed without changing anything else, since there
|
||||
# are no dependencies. This lets you run `make ansi-Makefile'.
|
||||
ansi-Makefile: $(CPP_MAKEFILE)
|
||||
grep -v '/\*\*/' $(CPP_MAKEFILE) > $@
|
||||
|
||||
# Subsequent lines contain targets that are correctly handled by an
|
||||
# existing bash-Makefile.
|
||||
|
||||
install uninstall newversion architecture: bash-Makefile
|
||||
$(MAKE) -f bash-Makefile $(MFLAGS) $(MAKEARGS) bindir=$(bindir) \
|
||||
prefix=$(prefix) $@
|
||||
|
||||
tests DEFINES tags documentation: bash-Makefile directory-frob
|
||||
$(MAKE) -f bash-Makefile $(MFLAGS) $(MAKEARGS) bindir=$(bindir) $@
|
||||
|
||||
clean distclean realclean: bash-Makefile directory-frob
|
||||
rm -f .notified
|
||||
$(MAKE) -f bash-Makefile $(MFLAGS) $(MAKEARGS) bindir=$(bindir) $@
|
||||
|
||||
directory-frob:
|
||||
|
||||
.NOEXPORT:
|
||||
|
||||
.notified:
|
||||
@echo ""
|
||||
@echo " You are about to make this version of GNU Bash for"
|
||||
@echo " this architecture for the first time. If you haven't"
|
||||
@echo " yet read the README file, you may want to do so. If"
|
||||
@echo " you wish to report a bug in Bash, or in the installation"
|
||||
@echo " procedure, please run the bashbug script and include:"
|
||||
@echo ""
|
||||
@echo " * a description of the bug,"
|
||||
@echo " * a recipe for recreating the bug reliably,"
|
||||
@echo " * a fix for the bug if you have one!"
|
||||
@echo ""
|
||||
@touch .notified
|
||||
@@ -0,0 +1,268 @@
|
||||
# This Makefile for building libbuiltins.a is in -*- text -*- for Emacs.
|
||||
#
|
||||
MKBUILTINS = mkbuiltins
|
||||
RANLIB = ranlib
|
||||
CFLAGS = -g -I.. -I.
|
||||
SHELL = /bin/sh
|
||||
# CC = cc
|
||||
AR = ar
|
||||
RM = rm -f
|
||||
CP = cp
|
||||
|
||||
srcdir = .
|
||||
VPATH = .:$(srcdir)
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .def .c .o
|
||||
# How to make a .o file from a .def file.
|
||||
.def.o:
|
||||
$(RM) $@
|
||||
./$(MKBUILTINS) $(DIRECTDEFINE) $<
|
||||
$(CC) -c $(CFLAGS) $(CPPFLAGS) $*.c || ( $(RM) $*.c ; exit 1 )
|
||||
$(RM) $*.c
|
||||
|
||||
# How to make a .c file from a .def file.
|
||||
.def.c:
|
||||
$(RM) $@
|
||||
./$(MKBUILTINS) $(DIRECTDEFINE) $<
|
||||
|
||||
# Here is a rule for making .o files from .c files that does not
|
||||
# force the type of the machine (like -M_MACHINE) into the flags.
|
||||
.c.o:
|
||||
$(RM) $@
|
||||
$(CC) -c $(CFLAGS) $(CPPFLAGS) $<
|
||||
|
||||
DEFS = $(srcdir)/alias.def $(srcdir)/bind.def $(srcdir)/break.def \
|
||||
$(srcdir)/builtin.def $(srcdir)/cd.def $(srcdir)/colon.def \
|
||||
$(srcdir)/command.def $(srcdir)/declare.def $(srcdir)/echo.def \
|
||||
$(srcdir)/enable.def $(srcdir)/eval.def $(srcdir)/getopts.def \
|
||||
$(srcdir)/exec.def $(srcdir)/exit.def $(srcdir)/fc.def \
|
||||
$(srcdir)/fg_bg.def $(srcdir)/hash.def $(srcdir)/help.def \
|
||||
$(srcdir)/history.def $(srcdir)/jobs.def $(srcdir)/kill.def \
|
||||
$(srcdir)/let.def $(srcdir)/read.def $(srcdir)/return.def \
|
||||
$(srcdir)/set.def $(srcdir)/setattr.def $(srcdir)/shift.def \
|
||||
$(srcdir)/source.def $(srcdir)/suspend.def $(srcdir)/test.def \
|
||||
$(srcdir)/times.def $(srcdir)/trap.def $(srcdir)/type.def \
|
||||
$(srcdir)/ulimit.def $(srcdir)/umask.def $(srcdir)/wait.def \
|
||||
$(srcdir)/reserved.def $(srcdir)/pushd.def $(srcdir)/shopt.def
|
||||
|
||||
STATIC_SOURCE = common.c getopt.c bashgetopt.c getopt.h
|
||||
|
||||
OFILES = builtins.o \
|
||||
alias.o bind.o break.o builtin.o cd.o colon.o command.o \
|
||||
common.o declare.o echo.o enable.o eval.o exec.o exit.o \
|
||||
fc.o fg_bg.o hash.o help.o history.o jobs.o kill.o let.o \
|
||||
pushd.o read.o return.o set.o setattr.o shift.o source.o \
|
||||
suspend.o test.o times.o trap.o type.o ulimit.o umask.o \
|
||||
wait.o getopts.o shopt.o getopt.o bashgetopt.o
|
||||
|
||||
THINGS_TO_TAR = $(DEFS) $(STATIC_SOURCE) Makefile ChangeLog
|
||||
|
||||
CREATED_FILES = builtext.h builtins.c psize.aux pipesize.h
|
||||
|
||||
all: $(MKBUILTINS) libbuiltins.a
|
||||
|
||||
libbuiltins.a: $(MKBUILTINS) $(OFILES)
|
||||
$(RM) $@
|
||||
$(AR) cq $@ $(OFILES)
|
||||
-$(RANLIB) $@
|
||||
|
||||
builtext.h builtins.c: $(MKBUILTINS) $(DEFS)
|
||||
$(RM) builtext.h builtins.c
|
||||
./$(MKBUILTINS) -externfile builtext.h -structfile builtins.c \
|
||||
-noproduction $(DIRECTDEFINE) $(DEFS)
|
||||
|
||||
mkbuiltins: $(srcdir)/mkbuiltins.c ../config.h
|
||||
$(CC) $(CFLAGS) -o $(MKBUILTINS) $(srcdir)/mkbuiltins.c
|
||||
|
||||
ulimit.o: ulimit.def pipesize.h
|
||||
|
||||
pipesize.h: psize.aux
|
||||
$(SHELL) $(srcdir)/psize.sh > pipesize.h
|
||||
|
||||
psize.aux: psize.c
|
||||
$(CC) $(CFLAGS) -o $@ $(srcdir)/psize.c
|
||||
|
||||
documentation: builtins.texi
|
||||
|
||||
$(OFILES): $(MKBUILTINS) ../config.h
|
||||
|
||||
builtins.texi: $(MKBUILTINS)
|
||||
./$(MKBUILTINS) -documentonly $(DEFS)
|
||||
|
||||
clean:
|
||||
$(RM) $(OFILES) $(CREATED_FILES) $(MKBUILTINS) libbuiltins.a
|
||||
|
||||
alias.o: alias.def
|
||||
bind.o: bind.def
|
||||
break.o: break.def
|
||||
builtin.o: builtin.def
|
||||
cd.o: cd.def
|
||||
colon.o: colon.def
|
||||
command.o: command.def
|
||||
declare.o: declare.def
|
||||
echo.o: echo.def
|
||||
enable.o: enable.def
|
||||
eval.o: eval.def
|
||||
exec.o: exec.def
|
||||
exit.o: exit.def
|
||||
fc.o: fc.def
|
||||
fg_bg.o: fg_bg.def
|
||||
hash.o: hash.def
|
||||
help.o: help.def
|
||||
history.o: history.def
|
||||
jobs.o: jobs.def
|
||||
kill.o: kill.def
|
||||
let.o: let.def
|
||||
pushd.o: pushd.def
|
||||
read.o: read.def
|
||||
return.o: return.def
|
||||
set.o: set.def
|
||||
setattr.o: setattr.def
|
||||
shift.o: shift.def
|
||||
source.o: source.def
|
||||
suspend.o: suspend.def
|
||||
test.o: test.def
|
||||
times.o: times.def
|
||||
trap.o: trap.def
|
||||
type.o: type.def
|
||||
umask.o: umask.def
|
||||
wait.o: wait.def
|
||||
getopts.o: getopts.def
|
||||
reserved.o: reserved.def
|
||||
|
||||
common.o: ../shell.h ../command.h ../config.h ../memalloc.h ../general.h
|
||||
common.o: ../variables.h ../input.h hashcom.h ../bashhist.h
|
||||
common.o: ../quit.h ../unwind_prot.h ../maxpath.h ../jobs.h ../builtins.h
|
||||
common.o: ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
common.o: ../execute_cmd.h ../error.h
|
||||
alias.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
alias.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
alias.o: ../shell.h ../unwind_prot.h ../variables.h common.h ../maxpath.h
|
||||
bind.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
bind.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
bind.o: ../maxpath.h ../bashline.h
|
||||
bind.o: ../shell.h ../unwind_prot.h ../variables.h bashgetopt.h
|
||||
break.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
break.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
break.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h
|
||||
builtin.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
builtin.o: ../quit.h common.h ../maxpath.h
|
||||
builtin.o: ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
builtin.o: ../shell.h ../unwind_prot.h ../variables.h
|
||||
cd.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
cd.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
cd.o: ../shell.h ../unwind_prot.h ../variables.h common.h ../maxpath.h
|
||||
command.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
command.o: ../quit.h bashgetopt.h ../maxpath.h
|
||||
command.o: ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
command.o: ../shell.h ../unwind_prot.h ../variables.h
|
||||
declare.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
declare.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
declare.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h
|
||||
echo.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
echo.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
echo.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h
|
||||
enable.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
enable.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
enable.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h
|
||||
eval.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
eval.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
eval.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h
|
||||
exec.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
exec.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
exec.o: ../shell.h ../unwind_prot.h ../variables.h common.h ../execute_cmd.h
|
||||
exec.o: ../maxpath.h ../flags.h
|
||||
exit.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
exit.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
exit.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h
|
||||
fc.o: ../builtins.h ../command.h bashgetopt.h ../bashhist.h
|
||||
fc.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
fc.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
fc.o: ../flags.h ../unwind_prot.h ../variables.h ../shell.h ../maxpath.h
|
||||
fg_bg.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
fg_bg.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
fg_bg.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h
|
||||
getopts.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
getopts.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
getopts.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h
|
||||
hash.o: ../builtins.h ../command.h ../quit.h ../execute_cmd.h
|
||||
hash.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
hash.o: ../shell.h ../unwind_prot.h ../variables.h common.h ../maxpath.h
|
||||
help.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
help.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
help.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h
|
||||
history.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
history.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
history.o: ../filecntl.h ../shell.h ../unwind_prot.h ../variables.h
|
||||
history.o: ../bashhist.h ../maxpath.h
|
||||
inlib.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
inlib.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h
|
||||
inlib.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
jobs.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
jobs.o: ../quit.h bashgetopt.h ../maxpath.h
|
||||
jobs.o: ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
jobs.o: ../shell.h ../unwind_prot.h ../variables.h
|
||||
kill.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
kill.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
kill.o: ../shell.h ../trap.h ../unwind_prot.h ../variables.h ../maxpath.h
|
||||
let.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
let.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
let.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h
|
||||
pushd.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
pushd.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
pushd.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h common.h
|
||||
read.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
read.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
read.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h
|
||||
return.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
return.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
return.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h
|
||||
set.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
set.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
set.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h
|
||||
setattr.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
setattr.o: ../quit.h common.h bashgetopt.h ../maxpath.h
|
||||
setattr.o: ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
setattr.o: ../shell.h ../unwind_prot.h ../variables.h
|
||||
shift.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
shift.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
shift.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h
|
||||
source.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
source.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
source.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h
|
||||
suspend.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
suspend.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
suspend.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h
|
||||
test.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
test.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
test.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h
|
||||
times.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
times.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
times.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h
|
||||
trap.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
trap.o: ../quit.h common.h ../maxpath.h
|
||||
trap.o: ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
trap.o: ../shell.h ../unwind_prot.h ../variables.h ../execute_cmd.h
|
||||
type.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
type.o: ../quit.h common.h ../maxpath.h
|
||||
type.o: ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
type.o: ../shell.h ../unwind_prot.h ../variables.h
|
||||
ulimit.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
ulimit.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
ulimit.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h
|
||||
umask.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
umask.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
umask.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h
|
||||
wait.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
wait.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
wait.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h
|
||||
shopt.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
|
||||
shopt.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
|
||||
shopt.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h
|
||||
shopt.o: common.h bashgetopt.h
|
||||
bashgetopt.o: ../bashansi.h ../ansi_stdlib.h
|
||||
mkbuiltins.o: ../bashansi.h ../ansi_stdlib.h
|
||||
fc.o: ../bashansi.h ../ansi_stdlib.h
|
||||
|
||||
#bind.o: $(RL_LIBSRC)chardefs.h $(RL_LIBSRC)readline.h $(RL_LIBSRC)keymaps.h
|
||||
@@ -0,0 +1,119 @@
|
||||
# This Makefile is for the Bash/documentation directory -*- text -*-.
|
||||
#
|
||||
CP = cp
|
||||
RM = rm -f
|
||||
|
||||
INSTALL_DATA = install -c -m 644
|
||||
|
||||
DOC_SUPPORT = ../lib/doc-support/
|
||||
TEXINDEX = $(DOC_SUPPORT)texindex
|
||||
TEXINDSRC = $(DOC_SUPPORT)texindex.c
|
||||
TEX = tex
|
||||
QUIETPS = #set this to -q to shut up dvips
|
||||
DVIPS = dvips -D 300 $(QUIETPS) -o $@ # tricky
|
||||
TEXINPUTS = ./../lib/readline/doc
|
||||
MAKEINFO = makeinfo
|
||||
|
||||
# Change to groff -Tascii if you don't have nroff
|
||||
NROFF = nroff
|
||||
|
||||
# This should be a program that converts troff to postscript
|
||||
GROFF = groff
|
||||
|
||||
HSUSER = ./../lib/readline/doc/hsuser.texinfo
|
||||
RLUSER = ./../lib/readline/doc/rluser.texinfo
|
||||
|
||||
.SUFFIXES: .0 .1 .3 .ms .ps .txt .dvi
|
||||
|
||||
.1.ps:
|
||||
$(RM) $@
|
||||
-${GROFF} -man $< > $@
|
||||
|
||||
.1.0:
|
||||
$(RM) $@
|
||||
-${NROFF} -man $< > $@
|
||||
|
||||
.ms.ps:
|
||||
$(RM) $@
|
||||
-${GROFF} -ms $< > $@
|
||||
|
||||
.ms.txt:
|
||||
$(RM) $@
|
||||
-${NROFF} -ms $< > $@
|
||||
|
||||
.3.ps:
|
||||
$(RM) $@
|
||||
-${GROFF} -man $< > $@
|
||||
|
||||
.3.0:
|
||||
$(RM) $@
|
||||
-${NROFF} -man $< > $@
|
||||
|
||||
all: ps info dvi text
|
||||
|
||||
ps: bash.ps builtins.ps readline.ps article.ps
|
||||
dvi: features.dvi features.ps
|
||||
info: features.info
|
||||
text: bash.0 builtins.0 readline.0
|
||||
|
||||
features.dvi: features.texi $(HSUSER) $(RLUSER)
|
||||
TEXINPUTS=.:$(TEXINPUTS):$$TEXINPUTS $(TEX) features.texi
|
||||
$(TEXINDEX) features.??
|
||||
TEXINPUTS=.:$(TEXINPUTS):$$TEXINPUTS $(TEX) features.texi
|
||||
|
||||
features.ps: features.dvi
|
||||
$(RM) $@
|
||||
$(DVIPS) features.dvi
|
||||
|
||||
features.info: features.texi $(HSUSER) $(RLUSER)
|
||||
$(MAKEINFO) --no-split -I$(TEXINPUTS) features.texi
|
||||
|
||||
bash.dvi: $(TEXINDEX) bash.texinfo $(HSUSER) $(RLUSER)
|
||||
TEXINPUTS=.:$(TEXINPUTS):$$TEXINPUTS $(TEX) bash.texinfo
|
||||
$(TEXINDEX) bash.??
|
||||
TEXINPUTS=.:$(TEXINPUTS):$$TEXINPUTS $(TEX) bash.texinfo
|
||||
|
||||
bashman.ps: bash.dvi
|
||||
rm -f $@
|
||||
$(DVIPS) bash.dvi
|
||||
|
||||
bash.txt: bash.1
|
||||
bash.ps: bash.1
|
||||
builtins.ps: builtins.1 bash.1
|
||||
builtins.txt: builtins.1 bash.1
|
||||
readline.txt: readline.3
|
||||
readline.ps: readline.3
|
||||
article.ps: article.ms
|
||||
|
||||
$(TEXINDEX): $(TEXINDSRC)
|
||||
(cd $(DOC_SUPPORT); $(MAKE) $(MFLAGS) texindex)
|
||||
|
||||
hsuser.texinfo: ../lib/readline/doc/hsuser.texinfo
|
||||
ln -s ../lib/readline/doc/hsuser.texinfo .
|
||||
|
||||
rluser.texinfo: ../lib/readline/doc/rluser.texinfo
|
||||
ln -s ../lib/readline/doc/rluser.texinfo .
|
||||
|
||||
clean:
|
||||
rm -f *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps *.pgs \
|
||||
*.fns *.kys *.tps *.vrs *.o core texindex rluser.texinfo hsuser.texinfo
|
||||
|
||||
distclean:
|
||||
rm -f *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps *.pgs \
|
||||
*.dvi *.info *.info-* *.fns *.kys *.tps *.vrs *.o core texindex \
|
||||
rluser.texinfo hsuser.texinfo
|
||||
|
||||
realclean: clean
|
||||
|
||||
install: all
|
||||
-[ -d $(mandir) ] || mkdir $(mandir)
|
||||
$(INSTALL_DATA) bash.1 $(mandir)
|
||||
sed 's:so bash.1:so man1/bash.1:' < builtins.1 > $(mandir)/bash_builtins.1
|
||||
-[ -d $(man3dir) ] || mkdir $(man3dir)
|
||||
$(INSTALL_DATA) readline.3 $(man3dir)
|
||||
-[ -d $(infodir) ] || mkdir $(infodir)
|
||||
$(INSTALL_DATA) features.info $(infodir)/bash.info
|
||||
|
||||
uninstall:
|
||||
$(RM) $(mandir)/bash.1 $(mandir)/bash_builtins.1
|
||||
$(RM) $(man3dir)/readline.3 $(infodir)/bash.info
|
||||
@@ -0,0 +1,92 @@
|
||||
## -*- text -*- ####################################################
|
||||
# #
|
||||
# Makefile for the GNU Glob Library. #
|
||||
# #
|
||||
####################################################################
|
||||
|
||||
# This Makefile is hand made from a template file, found in
|
||||
# ../template. Each library must provide several Makefile
|
||||
# targets: `all', `clean', `documentation', `install', and
|
||||
# `what-tar'. The `what-tar' target reports the names of the
|
||||
# files that need to be included in a tarfile to build the full
|
||||
# code and documentation for this library.
|
||||
|
||||
# Please note that the values for INCLUDES, CC, AR, RM, CP,
|
||||
# RANLIB, and selfdir are passed in from ../Makefile, and do
|
||||
# not need to be defined here.
|
||||
srcdir = .
|
||||
VPATH = .:$(srcdir)
|
||||
|
||||
# Here is a rule for making .o files from .c files that doesn't force
|
||||
# the type of the machine (like -sun3) into the flags.
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $(LOCAL_DEFINES) $(CPPFLAGS) $<
|
||||
|
||||
# LOCAL_DEFINES are flags that are specific to this library.
|
||||
# Define -DUSG if you are using a System V operating system.
|
||||
LOCAL_DEFINES = $(LOCAL_INCLUDES) #-DUSG
|
||||
|
||||
# For libraries which include headers from other libraries.
|
||||
LOCAL_INCLUDES = -I..
|
||||
|
||||
# The name of the library target.
|
||||
LIBRARY_NAME = libglob.a
|
||||
|
||||
# The C code source files for this library.
|
||||
CSOURCES = $(srcdir)glob.c $(srcdir)fnmatch.c
|
||||
|
||||
# The header files for this library.
|
||||
HSOURCES = $(srcdir)fnmatch.h
|
||||
|
||||
OBJECTS = glob.o fnmatch.o
|
||||
|
||||
# The texinfo files which document this library.
|
||||
DOCSOURCE = doc/glob.texi
|
||||
DOCOBJECT = doc/glob.dvi
|
||||
DOCSUPPORT = doc/Makefile
|
||||
DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
|
||||
|
||||
SUPPORT = Makefile ChangeLog $(DOCSUPPORT)
|
||||
|
||||
SOURCES = $(CSOURCES) $(HSOURCES) $(DOCSOURCE)
|
||||
|
||||
THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
|
||||
|
||||
######################################################################
|
||||
|
||||
all: $(LIBRARY_NAME)
|
||||
|
||||
$(LIBRARY_NAME): $(OBJECTS)
|
||||
$(RM) -f $@
|
||||
$(AR) cq $@ $(OBJECTS)
|
||||
-[ -n "$(RANLIB)" ] && $(RANLIB) $@
|
||||
|
||||
what-tar:
|
||||
@for file in $(THINGS_TO_TAR); do \
|
||||
echo $(selfdir)$$file; \
|
||||
done
|
||||
|
||||
documentation: force
|
||||
-(cd doc; $(MAKE) $(MFLAGS))
|
||||
force:
|
||||
|
||||
# The rule for 'includes' is written funny so that the if statement
|
||||
# always returns TRUE unless there really was an error installing the
|
||||
# include files.
|
||||
install:
|
||||
-$(MV) $(bindir)/$(LIBRARY_NAME) $(bindir)/$(LIBRARY_NAME)-old
|
||||
$(CP) $(LIBRARY_NAME) $(bindir)/$(LIBRARY_NAME)
|
||||
-[ -n "$(RANLIB)" ] && $(RANLIB) -t $(bindir)/$(LIBRARY_NAME)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS) $(LIBRARY_NAME)
|
||||
-(cd doc; $(MAKE) $(MFLAGS) clean)
|
||||
|
||||
|
||||
######################################################################
|
||||
# #
|
||||
# Dependencies for the object files which make up this library. #
|
||||
# #
|
||||
######################################################################
|
||||
|
||||
fnmatch.o: fnmatch.c fnmatch.h
|
||||
@@ -0,0 +1,33 @@
|
||||
# Skeleton Makefile for the GNU malloc code
|
||||
#
|
||||
# Maybe this should really create a library instead of just compiling
|
||||
# source files
|
||||
|
||||
srcdir = .
|
||||
VPATH = .:$(srcdir)
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
|
||||
|
||||
.s.o:
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
|
||||
|
||||
MALLOC_SOURCE = malloc.c
|
||||
|
||||
ALLOCA_SOURCE = alloca.c
|
||||
ALLOCA_OBJECT = alloca.o
|
||||
|
||||
libmalloc.a: malloc.o $(ALLOCA)
|
||||
rm -f $@
|
||||
ar cq $@ malloc.o $(ALLOCA)
|
||||
-[ -n "$(RANLIB)" ] && $(RANLIB) $@
|
||||
|
||||
malloc.o: malloc.c getpagesize.h
|
||||
|
||||
$(ALLOCA_OBJECT): $(ALLOCA_SOURCE)
|
||||
|
||||
alloca.o: $(ALLOCA_SOURCE)
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
|
||||
@- if [ "$(ALLOCA_OBJECT)" != alloca.o ]; then \
|
||||
mv $(ALLOCA_OBJECT) alloca.o >/dev/null 2>&1 ; \
|
||||
fi
|
||||
@@ -0,0 +1,154 @@
|
||||
## -*- text -*- ####################################################
|
||||
# #
|
||||
# Makefile for the GNU Readline and History Libraries. #
|
||||
# #
|
||||
####################################################################
|
||||
|
||||
srcdir = .
|
||||
VPATH = .:$(srcdir)
|
||||
|
||||
INSTALL = install -c
|
||||
INSTALL_PROGRAM = ${INSTALL}
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
|
||||
RANLIB = ranlib
|
||||
AR = ar
|
||||
RM = rm
|
||||
CP = cp
|
||||
MV = mv
|
||||
|
||||
# See the file STANDALONE for the -D defines that readline understands
|
||||
DEFS =
|
||||
# For libraries which include headers from other libraries.
|
||||
LOCAL_INCLUDES = -I. -I..
|
||||
|
||||
CPPFLAGS = $(DEFS) $(LOCAL_INCLUDES)
|
||||
|
||||
# Here is a rule for making .o files from .c files that doesn't force
|
||||
# the type of the machine (like -sun3) into the flags.
|
||||
.c.o:
|
||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
|
||||
|
||||
# The name of the main library target.
|
||||
LIBRARY_NAME = libreadline.a
|
||||
|
||||
# The C code source files for this library.
|
||||
CSOURCES = $(srcdir)readline.c $(srcdir)funmap.c $(srcdir)keymaps.c \
|
||||
$(srcdir)vi_mode.c $(srcdir)parens.c $(srcdir)rltty.c \
|
||||
$(srcdir)complete.c $(srcdir)bind.c $(srcdir)isearch.c \
|
||||
$(srcdir)display.c $(srcdir)signals.c $(srcdir)emacs_keymap.c \
|
||||
$(srcdir)vi_keymap.c $(srcdir)util.c $(srcdir)kill.c \
|
||||
$(srcdir)undo.c $(srcdir)macro.c $(srcdir)input.c \
|
||||
$(srcdir)callback.c $(srcdir)xmalloc.c \
|
||||
$(srcdir)history.c $(srcdir)histsearch.c $(srcdir)histexpand.c \
|
||||
$(srcdir)histfile.c \
|
||||
$(srcdir)tilde.c \
|
||||
|
||||
# The header files for this library.
|
||||
HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \
|
||||
posixstat.h tilde.h rlconf.h
|
||||
|
||||
HISTOBJ = history.o histexpand.o histfile.o histsearch.o
|
||||
TILDEOBJ= tilde.o
|
||||
OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \
|
||||
rltty.o complete.o bind.o isearch.o display.o signals.o \
|
||||
util.o kill.o undo.o macro.o input.o callback.o xmalloc.o \
|
||||
$(HISTOBJ) $(TILDEOBJ)
|
||||
|
||||
# The texinfo files which document this library.
|
||||
DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo
|
||||
DOCOBJECT = doc/readline.dvi
|
||||
DOCSUPPORT = doc/Makefile
|
||||
DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
|
||||
|
||||
SUPPORT = Makefile ChangeLog $(DOCSUPPORT) examples/[-a-z.]*
|
||||
|
||||
SOURCES = $(CSOURCES) $(HSOURCES) $(DOCSOURCE)
|
||||
|
||||
THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
|
||||
|
||||
INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h
|
||||
|
||||
##########################################################################
|
||||
|
||||
all: libreadline.a libhistory.a
|
||||
|
||||
libreadline.a: $(OBJECTS)
|
||||
$(RM) -f $@
|
||||
$(AR) cq $@ $(OBJECTS)
|
||||
-[ -n "$(RANLIB)" ] && $(RANLIB) $@
|
||||
|
||||
libhistory.a: $(HISTOBJ) xmalloc.o
|
||||
$(RM) -f $@
|
||||
$(AR) cq $@ $(HISTOBJ) xmalloc.o
|
||||
-[ -n "$(RANLIB)" ] && $(RANLIB) $@
|
||||
|
||||
documentation: force
|
||||
[ ! -d doc ] && mkdir doc
|
||||
(if [ -d doc ]; then cd doc; $(MAKE) $(MFLAGS); fi)
|
||||
|
||||
force:
|
||||
|
||||
# The rule for 'includes' is written funny so that the if statement
|
||||
# always returns TRUE unless there really was an error installing the
|
||||
# include files.
|
||||
install: installdirs libreadline.a
|
||||
for file in $(INSTALLED_HEADERS) ; do \
|
||||
$(INSTALL_DATA) $(srcdir)/$$file $(incdir)/readline ; \
|
||||
done
|
||||
${INSTALL_DATA} readline.h keymaps.h chardefs.h history.h \
|
||||
$(incdir)/readline
|
||||
-${MV} $(libdir)/libreadline.a $(libdir)/libreadline.old
|
||||
${INSTALL_DATA} libreadline.a $(bindir)/libreadline.a
|
||||
-[ -n "$(RANLIB)" ] && $(RANLIB) -t $(bindir)/libreadline.a
|
||||
|
||||
installdirs:
|
||||
-[ ! -d $(incdir)/readline ] && { \
|
||||
mkdir $(incdir)/readline && chmod 755 $(incdir)/readline; }
|
||||
-[ ! -d $(libdir) ] && mkdir $(libdir)
|
||||
|
||||
uninstall:
|
||||
cd $(incdir)/readline && ${RM} -f ${INSTALLED_HEADERS}
|
||||
cd $(libdir) && ${RM} -f libreadline.a libreadline.old
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS) *.a
|
||||
(if [ -d doc ]; then cd doc; $(MAKE) $(MFLAGS) $@; fi)
|
||||
|
||||
tags: force
|
||||
etags $(CSOURCES) $(HSOURCES)
|
||||
|
||||
TAGS: force
|
||||
ctags -x $(CSOURCES) $(HSOURCES) > $@
|
||||
|
||||
readline: readline.h rldefs.h chardefs.h
|
||||
readline: $(OBJECTS)
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
|
||||
$(LOCAL_INCLUDES) -DTEST -o readline readline.c vi_mode.o funmap.o \
|
||||
keymaps.o -ltermcap
|
||||
|
||||
realclean distclean mostlyclean: clean
|
||||
|
||||
# Dependencies
|
||||
readline.o: readline.c readline.h rldefs.h rlconf.h chardefs.h
|
||||
readline.o: keymaps.h history.h
|
||||
vi_mode.o: rldefs.h rlconf.h readline.h history.h
|
||||
funmap.o: funmap.c readline.h rlconf.h
|
||||
keymaps.o: keymaps.c emacs_keymap.c vi_keymap.c keymaps.h chardefs.h rlconf.h
|
||||
history.o: history.h histlib.h
|
||||
histexpand.o: history.h histlib.h
|
||||
histsearch.o: history.h histlib.h
|
||||
histfile.o: history.h histlib.h
|
||||
isearch.o: readline.h history.h
|
||||
search.o: readline.h history.h
|
||||
display.o: readline.h history.h rldefs.h rlconf.h
|
||||
complete.o: readline.h rldefs.h rlconf.h
|
||||
rltty.o: rldefs.h rlconf.h readline.h
|
||||
bind.o: rldefs.h rlconf.h readline.h history.h
|
||||
signals.o: rldefs.h rlconf.h readline.h history.h
|
||||
parens.o: readline.h
|
||||
kill.o: rldefs.h rlconf.h readline.h history.h
|
||||
macro.o: rldefs.h rlconf.h readline.h history.h
|
||||
undo.o: rldefs.h rlconf.h readline.h history.h
|
||||
input.o: rldefs.h rlconf.h readline.h history.h
|
||||
callback.o: rlconf.h rldefs.h readline.h
|
||||
@@ -0,0 +1,64 @@
|
||||
## -*- text -*- ####################################################
|
||||
# #
|
||||
# Makefile for termcap replacement libbrary. #
|
||||
# #
|
||||
####################################################################
|
||||
|
||||
# Here is a rule for making .o files from .c files that doesn't force
|
||||
# the type of the machine (like -sun3) into the flags.
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(LOCAL_INCLUDES) $(CPPFLAGS) $*.c
|
||||
|
||||
# Destination installation directory. The libraries are copied to DESTDIR
|
||||
# when you do a `make install'.
|
||||
DESTDIR = /usr/local/lib
|
||||
|
||||
DEBUG_FLAGS = -g
|
||||
#OPTIMIZE_FLAGS = -O
|
||||
LDFLAGS = $(DEBUG_FLAGS)
|
||||
CFLAGS = $(DEBUG_FLAGS) $(OPTIMIZE_FLAGS)
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
# A good alternative is gcc -traditional.
|
||||
#CC = gcc -traditional
|
||||
CC = cc
|
||||
RANLIB = /usr/bin/ranlib
|
||||
AR = ar
|
||||
RM = rm
|
||||
CP = cp
|
||||
|
||||
CSOURCES = termcap.c tparam.c
|
||||
|
||||
SOURCES = $(CSOURCES)
|
||||
|
||||
OBJECTS = termcap.o tparam.o
|
||||
|
||||
DOCUMENTATION = termcap.texinfo
|
||||
|
||||
THINGS_TO_TAR = $(SOURCES) $(DOCUMENTATION)
|
||||
|
||||
##########################################################################
|
||||
|
||||
all: libtermcap.a
|
||||
|
||||
libtermcap.a: $(OBJECTS)
|
||||
$(RM) -f $@
|
||||
$(AR) clq $@ $(OBJECTS)
|
||||
-[ -n "$(RANLIB)" ] && $(RANLIB) $@
|
||||
|
||||
termcap.tar: $(THINGS_TO_TAR)
|
||||
tar -cf $@ $(THINGS_TO_TAR)
|
||||
|
||||
termcap.tar.Z: termcap.tar
|
||||
compress -f termcap.tar
|
||||
|
||||
install: $(DESTDIR)/libtermcap.a
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a *.log *.cp *.tp *.vr *.fn *.aux *.pg *.toc
|
||||
|
||||
$(DESTDIR)/libtermcap.a: libtermcap.a
|
||||
-mv $(DESTDIR)/libtermcap.a $(DESTDIR)/libtermcap.old
|
||||
cp libtermcap.a $@
|
||||
-[ -n "$(RANLIB)" ] && $(RANLIB) -t $@
|
||||
@@ -0,0 +1,94 @@
|
||||
## -*- text -*- ####################################################
|
||||
# #
|
||||
# Makefile for the GNU Tilde Library. #
|
||||
# #
|
||||
####################################################################
|
||||
|
||||
# This Makefile is hand made from a template file, found in
|
||||
# ../template. Each library must provide several Makefile
|
||||
# targets: `all', `clean', `documentation', `install', and
|
||||
# `what-tar'. The `what-tar' target reports the names of the
|
||||
# files that need to be included in a tarfile to build the full
|
||||
# code and documentation for this library.
|
||||
|
||||
# Please note that the values for INCLUDES, CC, AR, RM, CP,
|
||||
# RANLIB, and selfdir are passed in from ../Makefile, and do
|
||||
# not need to be defined here.
|
||||
RM = rm
|
||||
|
||||
srcdir = .
|
||||
VPATH = .:$(srcdir)
|
||||
|
||||
# Here is a rule for making .o files from .c files that doesn't force
|
||||
# the type of the machine (like -sun3) into the flags.
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $(LOCAL_DEFINES) $(CPPFLAGS) $<
|
||||
|
||||
# LOCAL_DEFINES are flags that are specific to this library.
|
||||
# Define -DUSG if you are using a System V operating system.
|
||||
LOCAL_DEFINES = $(LOCAL_INCLUDES) #-DUSG
|
||||
|
||||
# For libraries which include headers from other libraries.
|
||||
LOCAL_INCLUDES = -I..
|
||||
|
||||
# The name of the library target.
|
||||
LIBRARY_NAME = libtilde.a
|
||||
|
||||
# The C code source files for this library.
|
||||
CSOURCES = $(srcdir)/tilde.c
|
||||
|
||||
# The header files for this library.
|
||||
HSOURCES = $(srcdir)/tilde.h
|
||||
|
||||
OBJECTS = tilde.o
|
||||
|
||||
# The texinfo files which document this library.
|
||||
DOCSOURCE = doc/tilde.texi
|
||||
DOCOBJECT = doc/tilde.dvi
|
||||
DOCSUPPORT = doc/Makefile
|
||||
DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
|
||||
|
||||
SUPPORT = Makefile ChangeLog $(DOCSUPPORT)
|
||||
|
||||
SOURCES = $(CSOURCES) $(HSOURCES) $(DOCSOURCE)
|
||||
|
||||
THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
|
||||
|
||||
######################################################################
|
||||
|
||||
all: $(LIBRARY_NAME)
|
||||
|
||||
$(LIBRARY_NAME): $(OBJECTS)
|
||||
$(RM) -f $@
|
||||
$(AR) cq $@ $(OBJECTS)
|
||||
-[ -n "$(RANLIB)" ] && $(RANLIB) $@
|
||||
|
||||
what-tar:
|
||||
@for file in $(THINGS_TO_TAR); do \
|
||||
echo $(selfdir)$$file; \
|
||||
done
|
||||
|
||||
documentation: force
|
||||
-(cd doc; $(MAKE) $(MFLAGS))
|
||||
force:
|
||||
|
||||
# The rule for 'includes' is written funny so that the if statement
|
||||
# always returns TRUE unless there really was an error installing the
|
||||
# include files.
|
||||
install:
|
||||
-$(MV) $(bindir)/$(LIBRARY_NAME) $(bindir)/$(LIBRARY_NAME)-old
|
||||
$(CP) $(LIBRARY_NAME) $(bindir)/$(LIBRARY_NAME)
|
||||
-[ -n "$(RANLIB)" ] && $(RANLIB) -t $(bindir)/$(LIBRARY_NAME)
|
||||
|
||||
clean:
|
||||
$(RM) -f $(OBJECTS) $(LIBRARY_NAME)
|
||||
-(cd doc; $(MAKE) $(MFLAGS) clean)
|
||||
|
||||
|
||||
######################################################################
|
||||
# #
|
||||
# Dependencies for the object files which make up this library. #
|
||||
# #
|
||||
######################################################################
|
||||
|
||||
tilde.o: tilde.h tilde.c
|
||||
@@ -0,0 +1,178 @@
|
||||
/* config.h -- Configuration file for bash. */
|
||||
|
||||
/* Copyright (C) 1987,1991 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
Bash is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 1, 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, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#if !defined (_CONFIG_H_)
|
||||
#define _CONFIG_H_
|
||||
|
||||
#if !defined (BUILDING_MAKEFILE)
|
||||
#include "memalloc.h"
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_UNISTD_H) && !defined (BUILDING_MAKEFILE)
|
||||
# ifdef CRAY
|
||||
# define word __word
|
||||
# endif
|
||||
#include <unistd.h>
|
||||
# ifdef CRAY
|
||||
# undef word
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Define JOB_CONTROL if your operating system supports
|
||||
BSD-like job control. */
|
||||
#define JOB_CONTROL
|
||||
|
||||
/* Note that vanilla System V machines don't support BSD job control,
|
||||
although some do support Posix job control. */
|
||||
#if defined (USG) || defined (MINIX) || defined (Minix)
|
||||
# if !defined (_POSIX_JOB_CONTROL)
|
||||
# undef JOB_CONTROL
|
||||
# endif /* !_POSIX_JOB_CONTROL */
|
||||
#endif /* USG || Minix || MINIX */
|
||||
|
||||
/* Define ALIAS if you want the alias features. */
|
||||
#define ALIAS
|
||||
|
||||
/* Define PUSHD_AND_POPD if you want those commands to be compiled in.
|
||||
(Also the `dirs' commands.) */
|
||||
#define PUSHD_AND_POPD
|
||||
|
||||
/* Define BRACE_EXPANSION if you want curly brace expansion a la Csh:
|
||||
foo{a,b} -> fooa foob. Even if this is compiled in (the default) you
|
||||
can turn it off at shell startup with `-nobraceexpansion', or during
|
||||
shell execution with `set +o braceexpand'. */
|
||||
#define BRACE_EXPANSION
|
||||
|
||||
/* Define READLINE to get the nifty/glitzy editing features.
|
||||
This is on by default. You can turn it off interactively
|
||||
with the -nolineediting flag. */
|
||||
#define READLINE
|
||||
|
||||
/* Define BANG_HISTORY if you want to have Csh style "!" history expansion.
|
||||
This is unrelated to READLINE. */
|
||||
#define BANG_HISTORY
|
||||
|
||||
/* Define HISTORY if you want to have access to previously typed commands.
|
||||
|
||||
If both HISTORY and READLINE are defined, you can get at the commands
|
||||
with line editing commands, and you can directly manipulate the history
|
||||
from the command line.
|
||||
|
||||
If only HISTORY is defined, the `fc' and `history' builtins are
|
||||
available. */
|
||||
#define HISTORY
|
||||
|
||||
#if defined (BANG_HISTORY) && !defined (HISTORY)
|
||||
/* BANG_HISTORY requires HISTORY. */
|
||||
# define HISTORY
|
||||
#endif /* BANG_HISTORY && !HISTORY */
|
||||
|
||||
#if defined (READLINE) && !defined (HISTORY)
|
||||
# define HISTORY
|
||||
#endif
|
||||
|
||||
/* Define this if you want completion that puts all alternatives into
|
||||
a brace expansion shell expression. */
|
||||
#if defined (BRACE_EXPANSION) && defined (READLINE)
|
||||
# define BRACE_COMPLETION
|
||||
#endif /* BRACE_EXPANSION */
|
||||
|
||||
/* The default value of the PATH variable. */
|
||||
#define DEFAULT_PATH_VALUE \
|
||||
"/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin:."
|
||||
|
||||
/* 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. */
|
||||
#define STANDARD_UTILS_PATH \
|
||||
"/bin:/usr/bin:/usr/ucb:/usr/sbin:/etc:/usr/etc"
|
||||
|
||||
/* Define V9_ECHO if you want to give the echo builtin backslash-escape
|
||||
interpretation using the -e option, in the style of the Bell Labs 9th
|
||||
Edition version of echo. */
|
||||
#define V9_ECHO
|
||||
|
||||
/* Define DEFAULT_ECHO_TO_USG if you want the echo builtin to interpret
|
||||
the backslash-escape characters by default, like the System V echo.
|
||||
This requires that V9_ECHO be defined. */
|
||||
/* #define DEFAULT_ECHO_TO_USG */
|
||||
#if !defined (V9_ECHO)
|
||||
# undef DEFAULT_ECHO_TO_USG
|
||||
#endif
|
||||
|
||||
/* Define CONTINUE_AFTER_KILL_ERROR if you want the kill command to
|
||||
continue processing arguments after one of them fails. */
|
||||
#define CONTINUE_AFTER_KILL_ERROR
|
||||
|
||||
/* Define BREAK_COMPLAINS if you want the non-standard, but useful
|
||||
error messages about `break' and `continue' out of context. */
|
||||
#define BREAK_COMPLAINS
|
||||
|
||||
/* Define HELP_BUILTIN if you want the `help' shell builtin and the long
|
||||
documentation strings compiled into the shell. */
|
||||
#define HELP_BUILTIN
|
||||
|
||||
/* Define RESTRICTED_SHELL if you want the generated shell to have the
|
||||
ability to be a restricted one. The shell thus generated can become
|
||||
restricted by being run with the name "rbash", or by setting the -r
|
||||
flag. */
|
||||
#define RESTRICTED_SHELL
|
||||
|
||||
/* If the shell is called by this name, it will become restricted. */
|
||||
#if defined (RESTRICTED_SHELL)
|
||||
#define RESTRICTED_SHELL_NAME "rbash"
|
||||
#endif
|
||||
|
||||
/* Define DISABLED_BUILTINS if you want "builtin foo" to always run the
|
||||
shell builtin "foo", even if it has been disabled with "enable -n foo". */
|
||||
/* #define DISABLED_BUILTINS */
|
||||
|
||||
/* Define PROCESS_SUBSTITUTION if you want the K*rn shell-like process
|
||||
substitution features "<(file)". */
|
||||
/* Right now, you cannot do this on machines without fully operational
|
||||
FIFO support. This currently include NeXT and Alliant. */
|
||||
#if !defined (MKFIFO_MISSING) || defined (HAVE_DEV_FD)
|
||||
# define PROCESS_SUBSTITUTION
|
||||
#endif /* !MKFIFO_MISSING */
|
||||
|
||||
/* Define PROMPT_STRING_DECODE if you want the backslash-escaped special
|
||||
characters in PS1 and PS2 expanded. Variable expansion will still be
|
||||
performed. */
|
||||
#define PROMPT_STRING_DECODE
|
||||
|
||||
/* Define BUFFERED_INPUT if you want the shell to do its own input
|
||||
buffering. */
|
||||
#define BUFFERED_INPUT
|
||||
|
||||
/* Define ONESHOT if you want sh -c 'command' to avoid forking to execute
|
||||
`command' whenever possible. */
|
||||
#define ONESHOT
|
||||
|
||||
/* Default primary and secondary prompt strings. */
|
||||
#define PPROMPT "\\s\\$ "
|
||||
#define SPROMPT "> "
|
||||
|
||||
/* Define SELECT_COMMAND if you want the Korn-shell style `select' command:
|
||||
select word in word_list; do command_list; done */
|
||||
#define SELECT_COMMAND
|
||||
|
||||
/* Define ARRAY_VARS if you want ksh-style one-dimensional array variables. */
|
||||
#define ARRAY_VARS
|
||||
|
||||
#endif /* !_CONFIG_H_ */
|
||||
@@ -0,0 +1,191 @@
|
||||
/* config.h -- Configuration file for bash. */
|
||||
|
||||
/* This is a `minimal' configuration file. It will create a shell without:
|
||||
job control
|
||||
aliases
|
||||
pushd and popd
|
||||
readline
|
||||
history
|
||||
restricted shell mode
|
||||
`disabled' builtins (builtin xxx finds xxx even after enable -n xxx)
|
||||
process substitution
|
||||
prompt string decoding (though variable expansion is still done)
|
||||
the `select' command
|
||||
the `help' builtin
|
||||
*/
|
||||
|
||||
/* Copyright (C) 1987,1991 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
Bash is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 1, 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, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#if !defined (_CONFIG_H_)
|
||||
#define _CONFIG_H_
|
||||
|
||||
#include "memalloc.h"
|
||||
|
||||
#if defined (HPUX) || defined (UNIXPC) || defined (Xenix)
|
||||
# if !defined (USG)
|
||||
# define USG
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_UNISTD_H) && !defined (BUILDING_MAKEFILE)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
/* Define JOB_CONTROL if your operating system supports
|
||||
BSD-like job control. */
|
||||
/* #define JOB_CONTROL */
|
||||
|
||||
/* Note that vanilla System V machines don't support BSD job control,
|
||||
although some do support Posix job control. */
|
||||
#if defined (USG) && !defined (_POSIX_JOB_CONTROL)
|
||||
# undef JOB_CONTROL
|
||||
#endif /* USG && !_POSIX_JOB_CONTROL */
|
||||
|
||||
/* Define ALIAS if you want the alias features. */
|
||||
/* #define ALIAS */
|
||||
|
||||
/* Define PUSHD_AND_POPD if you want those commands to be compiled in.
|
||||
(Also the `dirs' commands.) */
|
||||
/* #define PUSHD_AND_POPD */
|
||||
|
||||
/* Define BRACE_EXPANSION if you want curly brace expansion a la Csh:
|
||||
foo{a,b} -> fooa foob. Even if this is compiled in (the default) you
|
||||
can turn it off at shell startup with `-nobraceexpansion', or during
|
||||
shell execution with `set +o braceexpand'. */
|
||||
/* #define BRACE_EXPANSION */
|
||||
|
||||
/* Define READLINE to get the nifty/glitzy editing features.
|
||||
This is on by default. You can turn it off interactively
|
||||
with the -nolineediting flag. */
|
||||
/* #define READLINE */
|
||||
|
||||
/* Define BANG_HISTORY if you want to have Csh style "!" history expansion.
|
||||
This is unrelated to READLINE. */
|
||||
/* #define BANG_HISTORY */
|
||||
|
||||
/* Define HISTORY if you want to have access to previously typed commands.
|
||||
|
||||
If both HISTORY and READLINE are defined, you can get at the commands
|
||||
with line editing commands, and you can directly manipulate the history
|
||||
from the command line.
|
||||
|
||||
If only HISTORY is defined, the `fc' and `history' builtins are
|
||||
available. */
|
||||
/* #define HISTORY */
|
||||
|
||||
#if defined (BANG_HISTORY) && !defined (HISTORY)
|
||||
/* BANG_HISTORY requires HISTORY. */
|
||||
# define HISTORY
|
||||
#endif /* BANG_HISTORY && !HISTORY */
|
||||
|
||||
#if defined (READLINE) && !defined (HISTORY)
|
||||
# define HISTORY
|
||||
#endif
|
||||
|
||||
/* Define this if you want completion that puts all alternatives into
|
||||
a brace expansion shell expression. */
|
||||
#if defined (BRACE_EXPANSION) && defined (READLINE)
|
||||
# define BRACE_COMPLETION
|
||||
#endif /* BRACE_EXPANSION */
|
||||
|
||||
/* The default value of the PATH variable. */
|
||||
#define DEFAULT_PATH_VALUE \
|
||||
"/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin:."
|
||||
|
||||
/* 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. */
|
||||
#define STANDARD_UTILS_PATH \
|
||||
"/bin:/usr/bin:/usr/ucb:/usr/sbin:/etc:/usr/etc"
|
||||
|
||||
/* The default directory in which to look for mail files when
|
||||
checking mail. The trailing slash is required. */
|
||||
#if defined (USG)
|
||||
# define DEFAULT_MAIL_PATH "/usr/mail/"
|
||||
#else
|
||||
# define DEFAULT_MAIL_PATH "/usr/spool/mail/"
|
||||
#endif
|
||||
|
||||
/* Define V9_ECHO if you want to give the echo builtin backslash-escape
|
||||
interpretation using the -e option, in the style of the Bell Labs 9th
|
||||
Edition version of echo. */
|
||||
#define V9_ECHO
|
||||
|
||||
/* Define DEFAULT_ECHO_TO_USG if you want the echo builtin to interpret
|
||||
the backslash-escape characters by default, like the System V echo.
|
||||
This requires that V9_ECHO be defined. */
|
||||
/* #define DEFAULT_ECHO_TO_USG */
|
||||
#if !defined (V9_ECHO)
|
||||
# undef DEFAULT_ECHO_TO_USG
|
||||
#endif
|
||||
|
||||
/* Define CONTINUE_AFTER_KILL_ERROR if you want the kill command to
|
||||
continue processing arguments after one of them fails. */
|
||||
#define CONTINUE_AFTER_KILL_ERROR
|
||||
|
||||
/* Define BREAK_COMPLAINS if you want the non-standard, but useful
|
||||
error messages about `break' and `continue' out of context. */
|
||||
#define BREAK_COMPLAINS
|
||||
|
||||
/* Define HELP_BUILTIN if you want the `help' shell builtin and the long
|
||||
documentation strings compiled into the shell. */
|
||||
/* #define HELP_BUILTIN */
|
||||
|
||||
/* Define RESTRICTED_SHELL if you want the generated shell to have the
|
||||
ability to be a restricted one. The shell thus generated can become
|
||||
restricted by being run with the name "rbash", or by setting the -r
|
||||
flag. */
|
||||
/* #define RESTRICTED_SHELL */
|
||||
|
||||
/* Define DISABLED_BUILTINS if you want "builtin foo" to always run the
|
||||
shell builtin "foo", even if it has been disabled with "enable -n foo". */
|
||||
/* #define DISABLED_BUILTINS */
|
||||
|
||||
/* Define PROCESS_SUBSTITUTION if you want the K*rn shell-like process
|
||||
substitution features "<(file)". */
|
||||
/* Right now, you cannot do this on machines without fully operational
|
||||
FIFO support. This currently include NeXT and Alliant. */
|
||||
#if !defined (MKFIFO_MISSING)
|
||||
# define PROCESS_SUBSTITUTION
|
||||
#endif /* !MKFIFO_MISSING */
|
||||
|
||||
/* Define PROMPT_STRING_DECODE if you want the backslash-escaped special
|
||||
characters in PS1 and PS2 expanded. Variable expansion will still be
|
||||
performed. */
|
||||
/* #define PROMPT_STRING_DECODE */
|
||||
|
||||
/* Define BUFFERED_INPUT if you want the shell to do its own input
|
||||
buffering. */
|
||||
#define BUFFERED_INPUT
|
||||
|
||||
/* Define ONESHOT if you want sh -c 'command' to avoid forking to execute
|
||||
`command' whenever possible. */
|
||||
#define ONESHOT
|
||||
|
||||
/* Default primary and secondary prompt strings. */
|
||||
#define PPROMPT "\\s\\$ "
|
||||
#define SPROMPT "> "
|
||||
|
||||
/* Define SELECT_COMMAND if you want the Korn-shell style `select' command:
|
||||
select word in word_list; do command_list; done */
|
||||
/* #define SELECT_COMMAND */
|
||||
|
||||
/* Define ARRAY if you want ksh-style one-dimensional arrays. */
|
||||
/* #define ARRAY_VARS */
|
||||
|
||||
#endif /* !_CONFIG_H_ */
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This shell script does nothing since Bash doesn't require
|
||||
# configuration to be forced on it; it auto-configures. You can
|
||||
# change the location of the source directory with +srcdir.
|
||||
#
|
||||
echo "Bash is configured to auto configure."
|
||||
exit 0
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,16 @@
|
||||
# This awk script is called from within Makefile to strip multiple blank
|
||||
# lines from stdin.
|
||||
BEGIN { newlines = 0 }
|
||||
{
|
||||
if (NF == 0)
|
||||
newlines = 1;
|
||||
else
|
||||
{
|
||||
if (newlines)
|
||||
{
|
||||
printf "\n";
|
||||
newlines = 0;
|
||||
}
|
||||
print $0;
|
||||
}
|
||||
}
|
||||
Executable
+51
@@ -0,0 +1,51 @@
|
||||
#!/bin/sh
|
||||
# Return a full cpp specification, complete with system dependent flags.
|
||||
#
|
||||
# Syntax: cppmagic [ program-to-generate-flags [ guessed-cpp ]]
|
||||
#
|
||||
# If only one arg is present it is the name of a program to invoke
|
||||
# which should generate -Dfoo defines.
|
||||
#
|
||||
# If two args are present the second arg is the name of the C
|
||||
# preprocessor to use.
|
||||
#
|
||||
# Invoked with no args, provides a C preprocessor name and
|
||||
# -traditional flag if that is appropriate.
|
||||
#
|
||||
# ../Makefile calls this file thusly: "cppmagic getcppsyms".
|
||||
#
|
||||
# Typical output:
|
||||
#
|
||||
# /lib/cpp -Dunix -Dm68k
|
||||
#
|
||||
|
||||
Cpp=
|
||||
|
||||
if [ "$2" ]; then
|
||||
Cpp=$2
|
||||
else
|
||||
for cpp in /lib/cpp /usr/lib/cpp /usr/ccs/lib/cpp; do
|
||||
if [ -f $cpp ]; then
|
||||
Cpp=$cpp
|
||||
fi
|
||||
done
|
||||
if [ "$Cpp" = "" ]; then
|
||||
Cpp=cpp
|
||||
fi
|
||||
fi
|
||||
|
||||
TRADITIONAL=
|
||||
FLAGS=
|
||||
|
||||
# First flag might be `-traditional' if this is Gnu Cpp.
|
||||
unknown_flag=`$Cpp -traditional /dev/null 2>&1 |
|
||||
egrep 'known|recognized|valid|bad|legal'`
|
||||
if [ "$unknown_flag" = "" ]; then
|
||||
TRADITIONAL=-traditional
|
||||
fi
|
||||
|
||||
if [ "$1" ]; then
|
||||
FLAGS=`$1`
|
||||
fi
|
||||
|
||||
echo $Cpp $TRADITIONAL $FLAGS
|
||||
@@ -0,0 +1,427 @@
|
||||
/* getcppsyms.c - Find unique compiler symbols. */
|
||||
|
||||
/* Copyright (C) 1993 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, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
/* Some cpp's do not define any symbols, but instead let /bin/cc do it
|
||||
for them. For such machines, running this file may prove useful. It
|
||||
outputs the list of symbols which /bin/cc or /lib/cpp define and which
|
||||
we had the foresight to guess at. */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
#if defined (__BSD_4_4__)
|
||||
printf ("-D__BSD_4_4__");
|
||||
#endif /* __BSD_4_4__ */
|
||||
#if defined (CMU)
|
||||
printf (" -DCMU");
|
||||
#endif /* CMU */
|
||||
#if defined (_COFF)
|
||||
printf (" -D_COFF");
|
||||
#endif /* _COFF */
|
||||
#if defined (DGUX)
|
||||
printf (" -DDGUX");
|
||||
#endif /* DGUX */
|
||||
#if defined (GOULD_PN)
|
||||
printf (" -DGOULD_PN");
|
||||
#endif /* GOULD_PN */
|
||||
#if defined (MACH)
|
||||
printf (" -DMACH");
|
||||
#endif /* MACH */
|
||||
#if defined (MIPSEB)
|
||||
printf (" -DMIPSEB");
|
||||
#endif /* MIPSEB */
|
||||
#if defined (MIPSEL)
|
||||
printf (" -DMIPSEL");
|
||||
#endif /* MIPSEL */
|
||||
#if defined (MULTIMAX)
|
||||
printf (" -DMULTIMAX");
|
||||
#endif /* MULTIMAX */
|
||||
#if defined (M_UNIX)
|
||||
printf (" -DM_UNIX");
|
||||
#endif /* M_UNIX */
|
||||
#if defined (M_XENIX)
|
||||
printf (" -DM_XENIX");
|
||||
#endif /* M_XENIX */
|
||||
#if defined (_M_XENIX)
|
||||
printf (" -D_M_XENIX");
|
||||
#endif /* _M_XENIX */
|
||||
#if defined (NeXT)
|
||||
printf (" -DNeXT");
|
||||
#endif /* NeXT */
|
||||
#if defined (__PARAGON__)
|
||||
printf (" -D__PARAGON__");
|
||||
#endif /* __PARAGON__ */
|
||||
#if defined (_PGC_)
|
||||
printf (" -D_PGC_");
|
||||
#endif /* _PGC_ */
|
||||
#if defined (__PGC__)
|
||||
printf (" -D__PGC__");
|
||||
#endif /* __PGC__ */
|
||||
#if defined (RES)
|
||||
printf (" -DRES");
|
||||
#endif /* RES */
|
||||
#if defined (RISC6000)
|
||||
printf (" -DRISC6000");
|
||||
#endif /* RISC6000 */
|
||||
#if defined (RT)
|
||||
printf (" -DRT");
|
||||
#endif /* RT */
|
||||
#if defined (SYSTYPE_BSD)
|
||||
printf (" -DSYSTYPE_BSD");
|
||||
#endif /* SYSTYPE_BSD */
|
||||
#if defined (SYSTYPE_SYSV)
|
||||
printf (" -DSYSTYPE_SYSV");
|
||||
#endif /* SYSTYPE_SYSV */
|
||||
#if defined (Sun386i)
|
||||
printf (" -DSun386i");
|
||||
#endif /* Sun386i */
|
||||
#if defined (Tek4132)
|
||||
printf (" -DTek4132");
|
||||
#endif /* Tek4132 */
|
||||
#if defined (Tek4300)
|
||||
printf (" -DTek4300");
|
||||
#endif /* Tek4300 */
|
||||
#if defined (UMAXV)
|
||||
printf (" -DUMAXV");
|
||||
#endif /* UMAXV */
|
||||
#if defined (USGr4)
|
||||
printf (" -DUSGr4");
|
||||
#endif /* USGr4 */
|
||||
#if defined (USGr4_2)
|
||||
printf (" -DUSGr4_2");
|
||||
#endif /* USGr4_2 */
|
||||
#if defined (__SVR4_2__)
|
||||
printf (" -D__SVR4_2__");
|
||||
#endif /* __SVR4_2__ */
|
||||
#if defined (Xenix286)
|
||||
printf (" -DXenix286");
|
||||
#endif /* Xenix286 */
|
||||
#if defined (_AIX)
|
||||
printf (" -D_AIX");
|
||||
#endif /* _AIX */
|
||||
#if defined (_AIX370)
|
||||
printf (" -D_AIX370");
|
||||
#endif /* _AIX370 */
|
||||
#if defined (_IBMESA)
|
||||
printf (" -D_IBMESA");
|
||||
#endif /* _IBMESA */
|
||||
#if defined (__ibmesa)
|
||||
printf (" -D__ibmesa");
|
||||
#endif /* __ibmesa */
|
||||
#if defined (_U370)
|
||||
printf (" -D_U370");
|
||||
#endif /* _U370 */
|
||||
#if defined (_NLS)
|
||||
printf (" -D_NLS");
|
||||
#endif /* _NLS */
|
||||
#if defined (_CX_UX)
|
||||
printf (" -D_CX_UX");
|
||||
#endif /* _CX_UX */
|
||||
#if defined (_IBMR2)
|
||||
printf (" -D_IBMR2");
|
||||
#endif /* _IBMR2 */
|
||||
#if defined (_M88K)
|
||||
printf (" -D_M88K");
|
||||
#endif /* _M88K */
|
||||
#if defined (_M88KBCS_TARGET)
|
||||
printf (" -D_M88KBCS_TARGET");
|
||||
#endif /* _M88KBCS_TARGET */
|
||||
#if defined (__DGUX__)
|
||||
printf (" -D__DGUX__");
|
||||
#endif /* __DGUX__ */
|
||||
#if defined (__UMAXV__)
|
||||
printf (" -D__UMAXV__");
|
||||
#endif /* __UMAXV__ */
|
||||
#if defined (__m88k)
|
||||
printf (" -D__m88k");
|
||||
#endif /* __m88k */
|
||||
#if defined (__uxpm__)
|
||||
printf (" -DUSGr4 -Du370 -D__uxpm__");
|
||||
#endif /* __uxpm__ */
|
||||
#if defined (__uxps__)
|
||||
printf (" -D__svr4__ -D__uxps__");
|
||||
#endif /* __uxps__ */
|
||||
#if defined (alliant)
|
||||
printf (" -Dalliant");
|
||||
#endif /* alliant */
|
||||
#if defined (alpha)
|
||||
printf (" -Dalpha");
|
||||
#endif /* alpha */
|
||||
#if defined (__alpha)
|
||||
printf (" -D__alpha");
|
||||
#endif /* __alpha */
|
||||
#if defined (aix)
|
||||
printf (" -Daix");
|
||||
#endif /* aix */
|
||||
#if defined (aixpc)
|
||||
printf (" -Daixpc");
|
||||
#endif /* aixpc */
|
||||
#if defined (apollo)
|
||||
printf (" -Dapollo");
|
||||
#endif /* apollo */
|
||||
#if defined (ardent)
|
||||
printf (" -Dardent");
|
||||
#endif /* ardent */
|
||||
#if defined (att386)
|
||||
printf (" -Datt386");
|
||||
#endif /* att386 */
|
||||
#if defined (att3b)
|
||||
printf (" -Datt3b");
|
||||
#endif /* att3b */
|
||||
#if defined (bsd4_2)
|
||||
printf (" -Dbsd4_2");
|
||||
#endif /* bsd4_2 */
|
||||
#if defined (bsd4_3)
|
||||
printf (" -Dbsd4_3");
|
||||
#endif /* bsd4_3 */
|
||||
#if defined (__bsdi__)
|
||||
printf (" -D__bsdi__");
|
||||
#endif /* __bsdi__ */
|
||||
#if defined (bsdi)
|
||||
printf (" -Dbsdi");
|
||||
#endif /* bsdi */
|
||||
#if defined (__386BSD__)
|
||||
printf (" -D__386BSD__");
|
||||
#endif /* __386BSD__ */
|
||||
#if defined (cadmus)
|
||||
printf (" -Dcadmus");
|
||||
#endif /* cadmus */
|
||||
#if defined (clipper)
|
||||
printf (" -Dclipper");
|
||||
#endif /* clipper */
|
||||
#if defined (concurrent)
|
||||
printf (" -Dconcurrent");
|
||||
#endif /* concurrent */
|
||||
#if defined (convex) || defined (__convex__) || defined (__convexc__)
|
||||
# if !defined (__GNUC__)
|
||||
printf (" -pcc");
|
||||
# endif /* !__GNUC__ */
|
||||
printf (" -Dconvex");
|
||||
#endif /* convex */
|
||||
#if defined (dmert)
|
||||
printf (" -Ddmert");
|
||||
#endif /* dmert */
|
||||
#if defined (gcos)
|
||||
printf (" -Dgcos");
|
||||
#endif /* gcos */
|
||||
#if defined (gcx)
|
||||
printf (" -Dgcx");
|
||||
#endif /* gcx */
|
||||
#if defined (gould)
|
||||
printf (" -Dgould");
|
||||
#endif /* gould */
|
||||
#if defined (hbullx20)
|
||||
printf (" -Dhbullx20");
|
||||
#endif /* hbullx20 */
|
||||
#if defined (hcx)
|
||||
printf (" -Dhcx");
|
||||
#endif /* hcx */
|
||||
#if defined (host_mips)
|
||||
printf (" -Dhost_mips");
|
||||
#endif /* host_mips */
|
||||
#if defined (hp9000) || defined (__hp9000)
|
||||
printf (" -Dhp9000");
|
||||
#endif /* hp9000 || __hp9000 */
|
||||
#if defined (hp9000s200) || defined (__hp9000s200)
|
||||
printf (" -Dhp9000s200");
|
||||
#endif /* hp9000s200 || __hp9000s200 */
|
||||
#if defined (hp9000s300) || defined (__hp9000s300)
|
||||
printf (" -Dhp9000s300");
|
||||
#endif /* hp9000s300 || __hp9000s300 */
|
||||
#if defined (hp9000s500) || defined (__hp9000s500)
|
||||
printf (" -Dhp9000s500");
|
||||
#endif /* hp9000s500 || __hp9000s500 */
|
||||
#if defined (hp9000s700) || defined (__hp9000s700)
|
||||
printf (" -Dhp9000s700");
|
||||
#endif /* hp9000s700 || __hp9000s700 */
|
||||
#if defined (hp9000s800) || defined (__hp9000s800)
|
||||
printf (" -Dhp9000s800");
|
||||
#endif /* hp9000s800 || __hp9000s800 */
|
||||
#if defined (hppa) || defined (__hppa)
|
||||
printf (" -Dhppa");
|
||||
#endif /* hppa || __hppa */
|
||||
#if defined (hpux) || defined (__hpux)
|
||||
printf (" -Dhpux");
|
||||
#endif /* hpux */
|
||||
#if defined (__hp_osf)
|
||||
printf (" -D__hp_osf");
|
||||
#endif /* __hp_osf */
|
||||
#if defined (i386)
|
||||
printf (" -Di386");
|
||||
#endif /* i386 */
|
||||
#if defined (__i386__)
|
||||
printf (" -D__i386__");
|
||||
#endif
|
||||
#if defined (__i860)
|
||||
printf(" -D__i860");
|
||||
#endif /* __i860 */
|
||||
#if defined (__i860__)
|
||||
printf(" -D__i860__");
|
||||
#endif /* __i860__ */
|
||||
#if defined (ibm)
|
||||
printf (" -Dibm");
|
||||
#endif /* ibm */
|
||||
#if defined (ibm032)
|
||||
printf (" -Dibm032");
|
||||
#endif /* ibm032 */
|
||||
#if defined (ibmrt)
|
||||
printf (" -Dibmrt");
|
||||
#endif /* ibmrt */
|
||||
#if defined (interdata)
|
||||
printf (" -Dinterdata");
|
||||
#endif /* interdata */
|
||||
#if defined (is68k)
|
||||
printf (" -Dis68k");
|
||||
#endif /* is68k */
|
||||
#if defined (ksr1)
|
||||
printf (" -Dksr1");
|
||||
#endif /* ksr1 */
|
||||
#if defined (__ksr1__)
|
||||
printf (" -D__ksr1__");
|
||||
#endif /* __ksr1__ */
|
||||
#if defined (linux)
|
||||
printf (" -Dlinux");
|
||||
#endif /* linux */
|
||||
#if defined (__linux__)
|
||||
printf (" -D__linux__");
|
||||
#endif /* __linux__ */
|
||||
#if defined (luna88k)
|
||||
printf (" -Dluna88k");
|
||||
#endif /* luna88k */
|
||||
#if defined (m68k)
|
||||
printf (" -Dm68k");
|
||||
#endif /* m68k */
|
||||
#if defined (m88k)
|
||||
printf (" -Dm88k");
|
||||
#endif /* m88k */
|
||||
#if defined (mc68010)
|
||||
printf (" -Dmc68010");
|
||||
#endif /* mc68010 */
|
||||
#if defined (mc68020)
|
||||
printf (" -Dmc68020");
|
||||
#endif /* mc68020 */
|
||||
#if defined (mc68030)
|
||||
printf (" -Dmc68030");
|
||||
#endif /* mc68030 */
|
||||
#if defined (mc68040)
|
||||
printf (" -Dmc68040");
|
||||
#endif /* mc68040 */
|
||||
#if defined (mc68k32)
|
||||
printf (" -Dmc68k32");
|
||||
#endif /* mc68k32 */
|
||||
#if defined (mips)
|
||||
printf (" -Dmips");
|
||||
#endif /* mips */
|
||||
#if defined (n16)
|
||||
printf (" -Dn16");
|
||||
#endif /* n16 */
|
||||
#if defined (ns32000)
|
||||
printf (" -Dns32000");
|
||||
#endif /* ns32000 */
|
||||
#if defined (os)
|
||||
printf (" -Dos");
|
||||
#endif /* os */
|
||||
#if defined (osf)
|
||||
printf (" -Dosf");
|
||||
#endif /* osf */
|
||||
#if defined (__osf__)
|
||||
printf (" -D__osf__");
|
||||
#endif /* __osf__ */
|
||||
#if defined (__OSF1__)
|
||||
printf(" -D__OSF1__");
|
||||
#endif /* __OSF1__ */
|
||||
#if defined (pdp11)
|
||||
printf (" -Dpdp11");
|
||||
#endif /* pdp11 */
|
||||
#if defined (plexus)
|
||||
printf (" -Dplexus")
|
||||
#endif /* plexus */
|
||||
#if defined (pyr)
|
||||
printf (" -Dpyr");
|
||||
#endif /* pyr */
|
||||
#if defined (scs)
|
||||
printf (" -Dscs");
|
||||
#endif /* scs */
|
||||
#if defined (sequent)
|
||||
printf (" -Dsequent");
|
||||
#endif /* sequent */
|
||||
#if defined (sgi)
|
||||
printf (" -Dsgi");
|
||||
#endif /* sgi */
|
||||
#if defined (sony)
|
||||
printf (" -Dsony");
|
||||
#endif /* sony */
|
||||
#if defined (sparc)
|
||||
printf (" -Dsparc");
|
||||
#endif /* sparc */
|
||||
#if defined (stardent)
|
||||
printf (" -Dstardent");
|
||||
#endif /* stardent */
|
||||
#if defined (sun)
|
||||
printf (" -Dsun");
|
||||
#endif /* sun */
|
||||
#if defined (sun2)
|
||||
printf (" -Dsun2");
|
||||
#endif /* sun2 */
|
||||
#if defined (sun3)
|
||||
printf (" -Dsun3");
|
||||
#endif /* sun3 */
|
||||
#if defined (sun4)
|
||||
printf (" -Dsun4");
|
||||
#endif /* sun4 */
|
||||
#if defined (__svr4__)
|
||||
printf (" -D__svr4__");
|
||||
#endif /* __svr4__ */
|
||||
#if defined (tower32)
|
||||
printf (" -Dtower32");
|
||||
#endif /* tower32 */
|
||||
#if defined (tss)
|
||||
printf (" -Dtss");
|
||||
#endif /* tss */
|
||||
#if defined (u370)
|
||||
printf (" -Du370");
|
||||
#endif /* u370 */
|
||||
#if defined (u3b)
|
||||
printf (" -Du3b");
|
||||
#endif /* u3b */
|
||||
#if defined (u3b2)
|
||||
printf (" -Du3b2");
|
||||
#endif /* u3b2 */
|
||||
#if defined (u3b20d)
|
||||
printf (" -Du3b20d");
|
||||
#endif /* u3b20d */
|
||||
#if defined (u3b5)
|
||||
printf (" -Du3b5");
|
||||
#endif /* u3b5 */
|
||||
#if defined (ultrix)
|
||||
printf (" -Dultrix");
|
||||
#endif /* ultrix */
|
||||
#if defined (unix)
|
||||
printf (" -Dunix");
|
||||
#endif /* unix */
|
||||
#if defined (vax)
|
||||
printf (" -Dvax");
|
||||
#endif /* vax */
|
||||
|
||||
printf ("\n");
|
||||
exit (0);
|
||||
}
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Search $PATH for a file the same name as $1; return TRUE if found.
|
||||
#
|
||||
|
||||
command=$1
|
||||
[ -n "$command" ] || exit 1
|
||||
|
||||
set `echo $PATH | sed 's/^:/.:/
|
||||
s/::/:.:/g
|
||||
s/:$/:./
|
||||
s/:/ /g'`
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
[ -f $1/$command ] && exit 0 # test -x not universal
|
||||
shift
|
||||
done
|
||||
|
||||
exit 1
|
||||
+282
@@ -0,0 +1,282 @@
|
||||
#!/bin/sh
|
||||
# This script attempts to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#
|
||||
# This script attempts to guess a canonical system name similar to
|
||||
# config.sub. If it succeeds, it prints the system name on stdout, and
|
||||
# exits with 0. Otherwise, it exits with 1.
|
||||
#
|
||||
# The plan is that this can be called by configure scripts if you
|
||||
# don't specify an explicit system type (host/target name).
|
||||
#
|
||||
# Only a few systems have been added to this list; please add others
|
||||
# (but try to keep the structure clean).
|
||||
#
|
||||
|
||||
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
|
||||
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
|
||||
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
||||
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
||||
|
||||
# Note: order is significant - the case branches are not exclusive.
|
||||
|
||||
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
alpha:OSF1:1.*:*)
|
||||
# 1.2 uses "1.2" for uname -r.
|
||||
echo alpha-dec-osf${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
alpha:OSF1:V1.*:*)
|
||||
# 1.3 uses "V1.3" for uname -r.
|
||||
echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^V//'`
|
||||
exit 0 ;;
|
||||
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
||||
echo arm-acorn-riscix${UNAME_RELEASE}
|
||||
exit 0;;
|
||||
sun4*:SunOS:5.*:*)
|
||||
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
sun4*:SunOS:6*:*)
|
||||
# According to config.sub, this is the proper way to canonicalize
|
||||
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
|
||||
# it's likely to be more like Solaris than SunOS4.
|
||||
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
sun4*:SunOS:*:*)
|
||||
echo sparc-sun-sunos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3*:SunOS:*:*)
|
||||
echo m68k-sun-sunos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
RISC*:ULTRIX:*:*)
|
||||
echo mips-dec-ultrix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
VAX*:ULTRIX*:*:*)
|
||||
echo vax-dec-ultrix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mips:*:5*:RISCos)
|
||||
echo mips-mips-riscos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
m88k:*:4*:R4*)
|
||||
echo m88k-motorola-sysv4
|
||||
exit 0 ;;
|
||||
m88k:*:3*:R3*)
|
||||
echo m88k-motorola-sysv3
|
||||
exit 0 ;;
|
||||
AViiON:dgux:*:*)
|
||||
echo m88k-dg-dgux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
M88*:*:R3*:*)
|
||||
# Delta 88k system running SVR3
|
||||
echo m88k-motorola-sysv3
|
||||
exit 0 ;;
|
||||
*:IRIX:*:*)
|
||||
echo mips-sgi-irix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i[34]86:AIX:*:*)
|
||||
echo i386-ibm-aix
|
||||
exit 0 ;;
|
||||
*:AIX:2:3)
|
||||
echo rs6000-ibm-aix3.2
|
||||
exit 0 ;;
|
||||
*:AIX:*:*)
|
||||
echo rs6000-ibm-aix
|
||||
exit 0 ;;
|
||||
*:BOSX:*:*)
|
||||
echo rs6000-bull-bosx
|
||||
exit 0 ;;
|
||||
DPX/2?00:B.O.S.:*:*)
|
||||
echo m68k-bull-sysv3
|
||||
exit 0 ;;
|
||||
9000/31?:HP-UX:*:*)
|
||||
echo m68000-hp-hpux
|
||||
exit 0 ;;
|
||||
9000/[34]??:HP-UX:*:*)
|
||||
echo m68k-hp-hpux
|
||||
exit 0 ;;
|
||||
9000/[34]??:4.3bsd:1.*:*)
|
||||
echo m68k-hp-bsd
|
||||
exit 0 ;;
|
||||
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
|
||||
echo m68k-hp-bsd4.4
|
||||
exit 0 ;;
|
||||
9000/7??:HP-UX:*:* | 9000/8?7:HP-UX:*:* )
|
||||
echo hppa1.1-hp-hpux
|
||||
exit 0 ;;
|
||||
9000/8??:HP-UX:*:*)
|
||||
echo hppa1.0-hp-hpux
|
||||
exit 0 ;;
|
||||
3050*:HI-UX:*:*)
|
||||
sed 's/^ //' << EOF >dummy.c
|
||||
#include <unistd.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
long cpu = sysconf (_SC_CPU_VERSION);
|
||||
if (CPU_IS_HP_MC68K (cpu))
|
||||
puts ("m68k-hitachi-hiuxwe2");
|
||||
else if (CPU_IS_PA_RISC (cpu))
|
||||
{
|
||||
switch (cpu)
|
||||
{
|
||||
case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
|
||||
case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
|
||||
case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
|
||||
default: puts ("hppa-hitachi-hiuxwe2"); break;
|
||||
}
|
||||
}
|
||||
else puts ("unknown-hitachi-hiuxwe2");
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
echo unknown-hitachi-hiuxwe2
|
||||
exit 0 ;;
|
||||
9000/7??:4.3bsd:*:* | 9000/8?7:4.3bsd:*:* )
|
||||
echo hppa1.1-hp-bsd
|
||||
exit 0 ;;
|
||||
9000/8??:4.3bsd:*:*)
|
||||
echo hppa1.0-hp-bsd
|
||||
exit 0 ;;
|
||||
C1*:ConvexOS:*:*)
|
||||
echo c1-convex-bsd
|
||||
exit 0 ;;
|
||||
C2*:ConvexOS:*:*)
|
||||
echo c2-convex-bsd
|
||||
exit 0 ;;
|
||||
CRAY*X-MP:UNICOS:*:*)
|
||||
echo xmp-cray-unicos
|
||||
exit 0 ;;
|
||||
CRAY*Y-MP:UNICOS:*:*)
|
||||
echo ymp-cray-unicos
|
||||
exit 0 ;;
|
||||
CRAY-2:UNICOS:*:*)
|
||||
echo cray2-cray-unicos
|
||||
exit 0 ;;
|
||||
hp3[0-9][05]:NetBSD:*:*)
|
||||
echo m68k-hp-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i[34]86:NetBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
amiga:NetBSD:*:*)
|
||||
echo m68k-cbm-netbsd{$UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i[34]86:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux
|
||||
exit 0 ;;
|
||||
i[34]86:UNIX_SV:4.*:*)
|
||||
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
|
||||
echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
|
||||
else
|
||||
echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}
|
||||
fi
|
||||
exit 0 ;;
|
||||
i[34]86:*:3.2:*)
|
||||
if /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
|
||||
echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL
|
||||
else
|
||||
echo ${UNAME_MACHINE}-unknown-sysv3.2
|
||||
fi
|
||||
exit 0 ;;
|
||||
mini*:CTIX:SYS*5:*)
|
||||
# "miniframe"
|
||||
echo m68010-convergent-sysv
|
||||
exit 0 ;;
|
||||
M680[234]0:*:R3V[567]*:*)
|
||||
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
||||
3[34]??:*:4.0:*)
|
||||
uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||
&& echo i486-ncr-sysv4 && exit 0 ;;
|
||||
m680[234]0:LynxOS:2.2*:*)
|
||||
echo m68k-lynx-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i[34]86:LynxOS:2.2*:*)
|
||||
echo i386-lynx-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
TSUNAMI:LynxOS:2.2*:*)
|
||||
echo sparc-lynx-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
|
||||
|
||||
cat >dummy.c <<EOF
|
||||
main()
|
||||
{
|
||||
#if defined (sony)
|
||||
#if defined (MIPSEB)
|
||||
#else
|
||||
printf("m68k-sony-newsos\n"); exit(0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (__arm) && defined (__acorn) && defined (__unix)
|
||||
printf("arm-acorn-riscix"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined(hp300) && !defined(hpux)
|
||||
printf("m68k-hp-bsd\n"); exit(0);
|
||||
#endif
|
||||
|
||||
#if defined(NeXT)
|
||||
printf("m68k-next-bsd\n"); exit(0);
|
||||
#endif
|
||||
|
||||
#if defined (MULTIMAX) || defined (n16)
|
||||
#if defined (UMAXV)
|
||||
printf("ns32k-encore-sysv\n"); exit(0);
|
||||
#else
|
||||
#if defined (CMU)
|
||||
printf("ns32k-encore-mach\n"); exit(0);
|
||||
#else
|
||||
printf("ns32k-encore-bsd\n"); exit(0);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__386BSD__) || (defined(__bsdi__) && defined(__i386__))
|
||||
printf("i386-unknown-bsd\n"); exit(0);
|
||||
#endif
|
||||
|
||||
#if defined(sequent)
|
||||
#if defined(i386)
|
||||
printf("i386-sequent-dynix\n"); exit(0);
|
||||
#endif
|
||||
#if defined (ns32000)
|
||||
printf("ns32k-sequent-dynix\n"); exit(0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_SEQUENT_)
|
||||
printf("i386-sequent-ptx\n"); exit(0);
|
||||
#endif
|
||||
|
||||
exit (1);
|
||||
}
|
||||
EOF
|
||||
|
||||
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
|
||||
#echo '(Unable to guess system type)' 1>&2
|
||||
|
||||
exit 1
|
||||
+489
@@ -0,0 +1,489 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This file creates a file called "sysdefs.h" which contains CPP defines
|
||||
# helping to describe the operating system features. We just take guesses
|
||||
# by looking at random files.
|
||||
|
||||
# Removes any inherited definitions.
|
||||
SYSDEF=
|
||||
MAKE_ANSI=
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
-s) shift; srcdir=$1; shift ;;
|
||||
-i) shift; incdir="$1"; shift ;;
|
||||
-A) shift; MAKE_ANSI=true ;;
|
||||
*) break ;;
|
||||
esac
|
||||
done
|
||||
|
||||
sysdefs=${1-./sysdefs.h}
|
||||
: ${srcdir=.}
|
||||
|
||||
rm -f $sysdefs
|
||||
|
||||
echo "/* sysdefs.h -- #defines for your system created by $0." >>$sysdefs
|
||||
echo " Do NOT EDIT this file, since any changes will disappear." >>$sysdefs
|
||||
echo " Instead, edit $0, or config.h, or machines.h. */" >>$sysdefs
|
||||
echo "" >>$sysdefs
|
||||
echo "#if !defined (_SYSDEFS_H_)" >>$sysdefs
|
||||
echo "# define _SYSDEFS_H_" >>$sysdefs
|
||||
|
||||
# was if [ -f /usr/bin/uname ] || [ -f /bin/uname ]
|
||||
if ( uname >/dev/null 2>&1 ) 2>/dev/null
|
||||
then
|
||||
UNAME=`uname` # SunOS
|
||||
UNAME_R=`uname -r 2>/dev/null` # 4.1.2
|
||||
UNAME_M=`uname -m 2>/dev/null` # sun4m
|
||||
UNAME_V=`uname -v 2>/dev/null` # 13
|
||||
UNAME_S=`uname -s 2>/dev/null` # SunOS
|
||||
RELEASE=`expr "$UNAME_R" : '[^0-9]*\([0-9]*\)'` # 4
|
||||
case "$RELEASE" in
|
||||
"") RELEASE=0 ;;
|
||||
*) RELEASE=`expr "$RELEASE" + 0` ;;
|
||||
esac
|
||||
LEVEL=`expr "$UNAME_R" : '[^0-9]*[0-9]*.\([0-9]*\)'` # 1
|
||||
SUBLEVEL=`expr "$UNAME_R" : '[^0-9]*[0-9]*.[0-9]*.\([0-9]*\)'` # 2
|
||||
fi
|
||||
|
||||
# check for versions of SunOS and BSD/OS
|
||||
case "${UNAME}${RELEASE}" in
|
||||
SunOS4*) SYSDEF=SunOS4 ;;
|
||||
SunOS5*) SYSDEF=SunOS5 ;;
|
||||
BSD/OS2*) SYSDEF=BSDI2 ;;
|
||||
esac
|
||||
|
||||
# Test for NeXT
|
||||
if [ -d /NextLibrary ]; then
|
||||
MAKE_ANSI=true
|
||||
fi
|
||||
|
||||
# Intel Paragon
|
||||
case "$UNAME_M" in
|
||||
paragon) MAKE_ANSI=true ;;
|
||||
esac
|
||||
|
||||
# Test for shared libraries (this is pretty sVr4ish).
|
||||
if [ -f /usr/ccs/lib/libc.so ]; then
|
||||
SYSDEF=USGr4
|
||||
fi
|
||||
|
||||
# Some versions of i386 SVR4.2 make `uname' equivalent to `uname -n', which
|
||||
# is contrary to all other versions of uname
|
||||
if [ -n "$UNAME" ] && [ "$UNAME_S" != "$UNAME" ] && [ "$UNAME_S" = UNIX_SV ]; then
|
||||
UNAME=UNIX_SV
|
||||
fi
|
||||
|
||||
# another check for SVR4 on 386 or 486 machines
|
||||
case "${UNAME_M}:${UNAME}:${UNAME_R}" in
|
||||
i[34]86:UNIX_SV:4.*) SYSDEF=USGr4 ;;
|
||||
esac
|
||||
|
||||
# A check for Mips RISCos
|
||||
case "$UNAME_V" in
|
||||
UMIPS|RISCos) SYSDEF=RISCos_${RELEASE}_${LEVEL} ;;
|
||||
esac
|
||||
|
||||
# A check for Amdahl UTS
|
||||
case "$UNAME" in
|
||||
uts) SYSDEF=UTS ;;
|
||||
esac
|
||||
|
||||
# Look for an error message when trying to exec bison. If we find
|
||||
# what we're looking for, then we don't have it. If we get something
|
||||
# else (like an error message about no grammar file), then we have
|
||||
# it.
|
||||
YACC=yacc
|
||||
if ( cd /tmp ; bison /dev/null 2>&1 >/dev/null | grep 'no input grammar' >/dev/null 2>&1 ) 2>/dev/null; then
|
||||
YACC="bison -y"
|
||||
elif ( cd /tmp ; byacc /dev/null 2>&1 >/dev/null | grep 'unexpected ' >/dev/null 2>&1) 2>/dev/null; then
|
||||
YACC=byacc
|
||||
fi
|
||||
|
||||
# Try to locate ranlib. I think this is a bad idea.
|
||||
if sh ${srcdir}/support/inpath ranlib; then
|
||||
RANLIB_LOCATION=ranlib
|
||||
elif [ -f /usr/bin/ranlib ]; then
|
||||
RANLIB_LOCATION=/usr/bin/ranlib;
|
||||
elif [ -f /bin/ranlib ]; then
|
||||
RANLIB_LOCATION=/bin/ranlib;
|
||||
elif [ -f /usr/local/bin/ranlib ]; then
|
||||
RANLIB_LOCATION=/usr/local/bin/ranlib;
|
||||
elif [ -f /usr/gnu/bin/ranlib ]; then
|
||||
RANLIB_LOCATION=/usr/gnu/bin/ranlib
|
||||
elif [ -f /usr/local/gnubin/ranlib ]; then
|
||||
RANLIB_LOCATION=/usr/local/gnubin/ranlib;
|
||||
else
|
||||
RANLIB_LOCATION=: # XXX
|
||||
fi
|
||||
|
||||
if [ -n "${RANLIB_LOCATION}" ]; then
|
||||
echo "" >>$sysdefs
|
||||
echo "#if !defined (RANLIB_LOCATION)" >>$sysdefs
|
||||
echo "# define RANLIB_LOCATION ${RANLIB_LOCATION}" >>$sysdefs
|
||||
echo "#endif /* RANLIB_LOCATION */" >>$sysdefs
|
||||
fi
|
||||
|
||||
#
|
||||
# Is this a Xenix system?
|
||||
#
|
||||
if [ -f /xenix ]; then
|
||||
SYSDEF="Xenix"
|
||||
case "`/bin/uname -p`" in
|
||||
*286) SYSDEF="Xenix286" ;;
|
||||
*386) SYSDEF="Xenix386" ;;
|
||||
esac
|
||||
|
||||
# make sure that `i386' is defined for machines.h
|
||||
if [ "$SYSDEF" = "Xenix386" ]; then
|
||||
echo "" >>$sysdefs
|
||||
echo "#if !defined (i386)" >>$sysdefs
|
||||
echo "# define i386" >>$sysdefs
|
||||
echo "#endif /* !i386 */" >>$sysdefs
|
||||
fi
|
||||
|
||||
# Pass the release number of the OS through to the machine descriptions
|
||||
# in machines.h.
|
||||
if [ -f /etc/perms/soft ]; then
|
||||
rel=`grep rel= /etc/perms/soft`
|
||||
case "$rel" in
|
||||
*2.2.*) XREL=XENIX_22 ;;
|
||||
*2.3.*) XREL=XENIX_23 ;;
|
||||
*3.2.*) XREL=XENIX_32 ;;
|
||||
*) XREL= ;;
|
||||
esac
|
||||
|
||||
if [ "$XREL" ]; then
|
||||
echo "" >>$sysdefs
|
||||
echo "#if !defined ($XREL)" >>$sysdefs
|
||||
echo "# define $XREL" >>$sysdefs
|
||||
echo "#endif /* !$XREL */" >>$sysdefs
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Is this some kind of Sys Vish system?
|
||||
#
|
||||
if [ -f /unix ]; then
|
||||
if [ -d /generic ]; then # This is an AIX system.
|
||||
SYSDEF="aixpc"
|
||||
MAKE_ANSI=true
|
||||
elif [ -d /etc/conf/kconfig.d ] && [ -f /usr/include/sys/limits.h ]; then
|
||||
SYSDEF="isc386" # This is a 386 running ISC?
|
||||
ISCREL="ISC_$RELEASE"
|
||||
echo "#if !defined ($ISCREL)" >>$sysdefs
|
||||
echo "# define $ISCREL" >>$sysdefs
|
||||
echo "#endif /* $ISCREL */" >>$sysdefs
|
||||
elif [ -f /etc/xlc.cfg ]; then
|
||||
if fgrep _IBMR2 /etc/xlc.cfg >/dev/null 2>&1; then
|
||||
SYSDEF=RISC6000
|
||||
MAKE_ANSI=true
|
||||
fi
|
||||
elif [ -f /bin/4d -a -f /bin/uname ]; then
|
||||
case "$UNAME_R" in
|
||||
3.*) SYSDEF="Irix3" ;;
|
||||
4.*) SYSDEF="Irix4" ;;
|
||||
5.*) SYSDEF="Irix5" ;;
|
||||
6.*) SYSDEF="Irix6" ;;
|
||||
*) SYSDEF="Irix3" ;;
|
||||
esac
|
||||
elif [ -d /usr/amiga ]; then
|
||||
SYSDEF="amiga" # An Amiga running V.4.
|
||||
elif [ -f /bin/fxc.info ]; then
|
||||
SYSDEF="alliant"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Is this a Unicos system?
|
||||
if [ -f /unicos ]; then
|
||||
MAKE_ANSI=true
|
||||
UnicosMachine=
|
||||
|
||||
# Test for the variaous flavors of Cray machines.
|
||||
if [ -x /bin/cray1 ] && /bin/cray1 2>/dev/null; then
|
||||
UnicosMachine=Cray1
|
||||
fi
|
||||
|
||||
if [ -x /bin/cray2 ] && /bin/cray2 2>/dev/null; then
|
||||
UnicosMachine=Cray2
|
||||
fi
|
||||
|
||||
if [ -x /bin/crayxmp ] && /bin/crayxmp 2>/dev/null; then
|
||||
UnicosMachine=CrayXMP
|
||||
fi
|
||||
if [ -x /bin/crayymp ] && /bin/crayymp 2>/dev/null; then
|
||||
UnicosMachine=CrayYMP
|
||||
fi
|
||||
|
||||
if [ "$UnicosMachine" ]; then
|
||||
echo "#if !defined ($UnicosMachine)" >>$sysdefs
|
||||
echo "# define $UnicosMachine" >>$sysdefs
|
||||
echo "#endif /* !$UnicosMachine */" >>$sysdefs
|
||||
fi
|
||||
fi
|
||||
|
||||
# Is this (and what kind of) a HPUX system?
|
||||
if [ -f /hp-ux ]; then
|
||||
SYSDEF=HPUX_${RELEASE}
|
||||
if [ "$RELEASE" = 6 -a "$LEVEL" -lt 2 ]; then
|
||||
SYSDEF=HPUX_USG
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$SYSDEF" = "" ]; then
|
||||
case "$UNAME_M" in
|
||||
ESA) SYSDEF=AIXESA ;;
|
||||
XD88*) SYSDEF=XD88 ;;
|
||||
M88100) SYSDEF=M88100 ;; # Motorola Delta 88K
|
||||
esac
|
||||
fi
|
||||
|
||||
# What release of SCO Unix is this?
|
||||
if [ "$SYSDEF" = "" -a -f /bin/uname ]; then
|
||||
case `/bin/uname -X 2>/dev/null | grep '^Release' 2>/dev/null` in
|
||||
*3.2v4.*) SYSDEF=SCOv4 ;;
|
||||
*) SYSDEF=SCO ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
#
|
||||
# Default to cadmus for unknown SysVish systems
|
||||
#
|
||||
if [ -f /unix ] && [ "$SYSDEF" = "" ]; then
|
||||
SYSDEF="cadmus"
|
||||
fi
|
||||
|
||||
if [ "$SYSDEF" != "" ]; then
|
||||
echo "" >>$sysdefs
|
||||
echo "#if !defined ($SYSDEF)" >>$sysdefs
|
||||
echo "# define $SYSDEF" >>$sysdefs
|
||||
echo "#endif /* $SYSDEF */" >>$sysdefs
|
||||
fi
|
||||
|
||||
# Now look for certain include files in a list of directories
|
||||
# Poor substitute for autoconf
|
||||
|
||||
# Add any other directories where include files are found to this list or
|
||||
# create another case
|
||||
if [ -n "$incdir" ]; then
|
||||
dirlist="$incdir"
|
||||
else
|
||||
case "$SYSDEF" in
|
||||
RISCos*) dirlist="/bsd43/usr/include";;
|
||||
*) dirlist="/usr/include /usr/include/bsd /usr/include/ansi" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Code fragment to be executed to find a particular include file. Make sure
|
||||
# to set `file' to the pathname of the file you want, relative to /usr/include,
|
||||
# before calling `eval $findf'.
|
||||
findf="
|
||||
found='';
|
||||
for d in \$dirlist;
|
||||
do
|
||||
if test -f \$d/\$file;
|
||||
then
|
||||
found=yes;
|
||||
break;
|
||||
fi;
|
||||
done
|
||||
"
|
||||
|
||||
file=sys/stream.h
|
||||
eval $findf
|
||||
if [ -n "$found" ]; then
|
||||
echo "" >>$sysdefs
|
||||
echo "#if !defined (HAVE_SYS_STREAM_H)" >>$sysdefs
|
||||
echo "# define HAVE_SYS_STREAM_H" >>$sysdefs
|
||||
echo "#endif /* HAVE_SYS_STREAM_H */" >>$sysdefs
|
||||
fi
|
||||
|
||||
file=sys/ptem.h
|
||||
eval $findf
|
||||
if [ -n "$found" ]; then
|
||||
echo "" >>$sysdefs
|
||||
echo "#if !defined (HAVE_SYS_PTEM_H)" >>$sysdefs
|
||||
echo "# define HAVE_SYS_PTEM_H" >>$sysdefs
|
||||
echo "#endif /* HAVE_SYS_PTEM_H */" >>$sysdefs
|
||||
fi
|
||||
|
||||
file=sys/pte.h
|
||||
eval $findf
|
||||
if [ -n "$found" ]; then
|
||||
echo "" >>$sysdefs
|
||||
echo "#if !defined (HAVE_SYS_PTE_H)" >>$sysdefs
|
||||
echo "# define HAVE_SYS_PTE_H" >>$sysdefs
|
||||
echo "#endif /* HAVE_SYS_PTE_H */" >>$sysdefs
|
||||
fi
|
||||
|
||||
file=sys/wait.h
|
||||
eval $findf
|
||||
if [ -n "$found" ]; then
|
||||
echo "" >>$sysdefs
|
||||
echo "#if !defined (HAVE_SYS_WAIT_H)" >>$sysdefs
|
||||
echo "# define HAVE_SYS_WAIT_H" >>$sysdefs
|
||||
echo "#endif /* HAVE_SYS_WAIT_H */" >>$sysdefs
|
||||
fi
|
||||
|
||||
file=sys/resource.h
|
||||
eval $findf
|
||||
if [ -n "$found" ]; then
|
||||
echo "" >>$sysdefs
|
||||
echo "#if !defined (HAVE_RESOURCE)" >>$sysdefs
|
||||
echo "# define HAVE_RESOURCE" >>$sysdefs
|
||||
echo "#endif /* HAVE_RESOURCE */" >>$sysdefs
|
||||
fi
|
||||
|
||||
file=sys/param.h
|
||||
eval $findf
|
||||
if [ -n "$found" ]; then
|
||||
echo "" >>$sysdefs
|
||||
echo "#if !defined (HAVE_SYS_PARAM_H)" >>$sysdefs
|
||||
echo "# define HAVE_SYS_PARAM_H" >>$sysdefs
|
||||
echo "#endif /* HAVE_SYS_PARAM_H */" >>$sysdefs
|
||||
fi
|
||||
|
||||
file=unistd.h
|
||||
eval $findf
|
||||
if [ -n "$found" ]; then
|
||||
echo "" >>$sysdefs
|
||||
echo "#if !defined (HAVE_UNISTD_H)" >>$sysdefs
|
||||
echo "# define HAVE_UNISTD_H" >>$sysdefs
|
||||
echo "#endif /* HAVE_UNISTD_H */" >>$sysdefs
|
||||
fi
|
||||
|
||||
file=stdlib.h
|
||||
eval $findf
|
||||
if [ -n "$found" ]; then
|
||||
echo "" >>$sysdefs
|
||||
echo "#if !defined (HAVE_STDLIB_H)" >>$sysdefs
|
||||
echo "# define HAVE_STDLIB_H" >>$sysdefs
|
||||
echo "#endif /* HAVE_STDLIB_H */" >>$sysdefs
|
||||
fi
|
||||
|
||||
file=limits.h
|
||||
eval $findf
|
||||
if [ -n "$found" ]; then
|
||||
echo "" >>$sysdefs
|
||||
echo "#if !defined (HAVE_LIMITS_H)" >>$sysdefs
|
||||
echo "# define HAVE_LIMITS_H" >>$sysdefs
|
||||
echo "#endif /* HAVE_LIMITS_H */" >>$sysdefs
|
||||
fi
|
||||
|
||||
file=locale.h
|
||||
eval $findf
|
||||
if [ -n "$found" ]; then
|
||||
echo "" >>$sysdefs
|
||||
echo "#if !defined (HAVE_LOCALE_H)" >>$sysdefs
|
||||
echo "# define HAVE_LOCALE_H" >>$sysdefs
|
||||
echo "#endif /* HAVE_LOCALE_H */" >>$sysdefs
|
||||
fi
|
||||
|
||||
file=alloca.h
|
||||
eval $findf
|
||||
if [ -f /usr/include/alloca.h ]; then
|
||||
echo "" >>$sysdefs
|
||||
echo "#if !defined (HAVE_ALLOCA_H)" >>$sysdefs
|
||||
echo "# define HAVE_ALLOCA_H" >>$sysdefs
|
||||
echo "#endif /* HAVE_ALLOCA_H */" >>$sysdefs
|
||||
fi
|
||||
|
||||
file=dirent.h
|
||||
eval $findf
|
||||
if [ -n "$found" ]; then
|
||||
echo "" >>$sysdefs
|
||||
echo "#if !defined (HAVE_DIRENT_H)" >>$sysdefs
|
||||
echo "# define HAVE_DIRENT_H" >>$sysdefs
|
||||
echo "#endif /* HAVE_DIRENT_H */" >>$sysdefs
|
||||
fi
|
||||
|
||||
file=string.h
|
||||
eval $findf
|
||||
if [ -n "$found" ]; then
|
||||
echo "" >>$sysdefs
|
||||
echo "#if !defined (HAVE_STRING_H)" >>$sysdefs
|
||||
echo "# define HAVE_STRING_H" >>$sysdefs
|
||||
echo "#endif /* HAVE_STRING_H */" >>$sysdefs
|
||||
fi
|
||||
|
||||
file=varargs.h
|
||||
eval $findf
|
||||
if [ -n "$found" ]; then
|
||||
echo "" >>$sysdefs
|
||||
echo "#if !defined (HAVE_VARARGS_H)" >>$sysdefs
|
||||
echo "# define HAVE_VARARGS_H" >>$sysdefs
|
||||
echo "#endif /* HAVE_VARARGS_H */" >>$sysdefs
|
||||
fi
|
||||
|
||||
# Does the system have a /dev/fd directory?
|
||||
if [ -d /dev/fd ]; then
|
||||
echo "" >>$sysdefs
|
||||
echo "#if !defined (HAVE_DEV_FD)" >>$sysdefs
|
||||
echo "# define HAVE_DEV_FD" >>$sysdefs
|
||||
echo "#endif /* HAVE_DEV_FD */" >>$sysdefs
|
||||
fi
|
||||
|
||||
# Is this SVR4.2? It's subtly different from USGr4
|
||||
if [ "$UNAME" = "UNIX_SV" ] && [ "$UNAME_R" = "4.2" ]; then
|
||||
echo "" >>$sysdefs
|
||||
echo "#if !defined (USGr4_2)" >>$sysdefs
|
||||
echo "# define USGr4_2" >>$sysdefs
|
||||
echo "#endif /* USGr4_2 */" >>$sysdefs
|
||||
fi
|
||||
|
||||
# Is this AIX PS/2 1.3? Yuck.
|
||||
if [ "$UNAME" = "AIX" ] && [ "$UNAME_V" = "1" ] && [ "$RELEASE" = "3" ]; then
|
||||
case "$UNAME_M" in
|
||||
i386|i486)
|
||||
echo "" >>$sysdefs
|
||||
echo "#if !defined (AIX_13)" >>$sysdefs
|
||||
echo "# define AIX_13" >>$sysdefs
|
||||
echo "#endif /* AIX_13 */" >>$sysdefs
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ -n "$YACC" ]; then
|
||||
echo "" >>$sysdefs
|
||||
echo "#if !defined (YACC_PROG)" >>$sysdefs
|
||||
echo "# define YACC_PROG $YACC" >>$sysdefs
|
||||
echo "#endif /* YACC_PROG */" >>$sysdefs
|
||||
fi
|
||||
|
||||
# Functions to test for a la autoconf
|
||||
# getwd
|
||||
# getcwd
|
||||
# strchr
|
||||
# strcasecmp
|
||||
# getgroups
|
||||
# setlinebuf
|
||||
# strerror
|
||||
# vfprintf
|
||||
# bcopy
|
||||
# getdtablesize
|
||||
# setdtablesize
|
||||
# alloca
|
||||
# gethostname
|
||||
# memmove (missing)
|
||||
# mkfifo (missing)
|
||||
#
|
||||
# Other things to test
|
||||
# opendir robustness
|
||||
# dup2 working
|
||||
# void sighandler
|
||||
# sys_siglist[]
|
||||
# uid_t, gid_t
|
||||
# have_getpw_decls
|
||||
# reversed setvbuf args
|
||||
# int getgroups
|
||||
|
||||
# If this system's cpp might not like `/**/#' in cpp-Makefile, make an
|
||||
# alternate ansi-style cpp-Makefile.
|
||||
if [ -n "$MAKE_ANSI" ]; then
|
||||
grep -v '/\*\*/' ${srcdir}/cpp-Makefile >ansi-Makefile
|
||||
fi
|
||||
|
||||
# These should be the last 2 lines in this file!
|
||||
echo "" >>$sysdefs
|
||||
echo "#endif /* _SYSDEFS_H_ */" >>$sysdefs
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# srcdir - print out the absolute pathname of the top of the bash source
|
||||
# tree. Used for getting the right value to makes in subdirectories
|
||||
#
|
||||
|
||||
case "$1" in
|
||||
'.'|./) pwd ;;
|
||||
./*|..*) echo `pwd`/"$1" ;;
|
||||
*) echo "$1" ;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,136 @@
|
||||
|
||||
This is a description of the changes made to bash for increased ksh
|
||||
compatibility.
|
||||
|
||||
1. $SECONDS
|
||||
|
||||
"Each time this parameter is referenced, the number of seconds
|
||||
since shell invocation is returned. If this parameter is assigned
|
||||
a value, then the value returned will be the value that was
|
||||
assigned plus the number of seconds since the assignment."
|
||||
|
||||
Files changed: variables.c
|
||||
variables.h
|
||||
subst.c
|
||||
general.c
|
||||
shell.c
|
||||
general.h
|
||||
|
||||
2. $TMOUT
|
||||
|
||||
"If set to a value greater than 0, the shell will terminate if a
|
||||
command is not entered within the prescribed number of seconds
|
||||
after issuing the PS1 prompt."
|
||||
|
||||
Files changed: shell.c (the implementation is not perfect)
|
||||
|
||||
3. $RANDOM
|
||||
|
||||
"Each time this parameter is referenced, a random integer is
|
||||
generated. The sequence of random numbers can be initialized
|
||||
by assigning a numeric value to RANDOM."
|
||||
|
||||
Files changed: subst.c
|
||||
variables.c
|
||||
|
||||
4. $REPLY
|
||||
|
||||
"This parameter is set by the `read' special command when no
|
||||
arguments are supplied."
|
||||
|
||||
Files changed: builtins.c
|
||||
|
||||
5. integer variables
|
||||
|
||||
`declare -i' (also export) makes a variable an integer (turns on
|
||||
the integer attribute). When assignment is made to a variable with
|
||||
the -i attribute, arithmetic expression evaluation is done on the
|
||||
value before it is assigned to the variable.
|
||||
|
||||
Files changed: variables.h
|
||||
variables.c
|
||||
builtins.c
|
||||
|
||||
6. Arithmetic expression evaluation.
|
||||
|
||||
Here is the comment at the beginning of the new file `expr.c':
|
||||
|
||||
|
||||
ksh-style expression evaluation.
|
||||
|
||||
All arithmetic is done as long integers with no checking for overflow
|
||||
(though division by 0 is caught and flagged as an error).
|
||||
|
||||
The following operators are handled, grouped into a set of levels in
|
||||
order of decreasing precedence.
|
||||
|
||||
"-" [level 0 (unary negation)]
|
||||
"!" [level 1]
|
||||
"*", "/", "%" [level 2]
|
||||
"+", "-" [level 3]
|
||||
"<=", ">=", "<", ">" [level 4]
|
||||
"==", "!=" [level 5]
|
||||
"=" [level 6 (assignment)]
|
||||
|
||||
(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
|
||||
that it is passed intact to the evaluator).
|
||||
|
||||
Sub-expressions within parentheses have a precedence level greater than
|
||||
all of the above levels and are evaluated first. Within a single prece-
|
||||
dence group, evaluation is left-to-right, except for the arithmetic
|
||||
assignment operator (`='), which is evaluated right-to-left (as in C).
|
||||
|
||||
The expression evaluator returns the value of the expression (assignment
|
||||
statements have as a value what is returned by the RHS). The `let'
|
||||
builtin, on the other hand, returns 0 if the last expression evaluates to
|
||||
a non-zero, and 1 otherwise.
|
||||
|
||||
Implementation is a recursive-descent parser.
|
||||
|
||||
Files added: expr.c
|
||||
|
||||
7. `let' builtin
|
||||
|
||||
Parameters may be assigned numeric values via the `let' builtin.
|
||||
Each of its arguments is an expression to be evaluated. `let'
|
||||
returns 0 if the value of the last expression is non-zero, and
|
||||
1 otherwise.
|
||||
|
||||
Note that the "((...))" form of this command has not yet been
|
||||
implemented; it requires changes to the parsing functions.
|
||||
|
||||
Files changed: builtins.c
|
||||
|
||||
8. $_
|
||||
|
||||
$_ is set to the last argument of the previous command line, after
|
||||
expansion. It is still used as before when checking for mail.
|
||||
Two new keybindings have been added to insert this into the current
|
||||
command line (M-_ and M-.).
|
||||
|
||||
Files changed: mailcheck.c
|
||||
execute_cmd.c
|
||||
bashline.c
|
||||
|
||||
9. `cd -'
|
||||
|
||||
Equivalent to 'cd $OLDPWD'
|
||||
|
||||
Files changed: builtins.c
|
||||
|
||||
10. "ulimit -a"
|
||||
|
||||
"List all of the current resource limits (BSD only)."
|
||||
|
||||
Files changed: builtins.c
|
||||
|
||||
11. ${#@} and ${#*}
|
||||
|
||||
These expand to the number of positional parameters.
|
||||
|
||||
Files changed: subst.c
|
||||
|
||||
Chet Ramey
|
||||
Information Network Services, Case Western Reserve University
|
||||
chet@ins.CWRU.Edu
|
||||
@@ -0,0 +1,140 @@
|
||||
This file details the changes between the previous release of CWRU bash
|
||||
(07/11/93) and this release.
|
||||
|
||||
1. Bugs Fixed
|
||||
|
||||
Readline's vi-mode once again has TAB bound to completion; entering `posix
|
||||
mode' changes it to self-insert
|
||||
|
||||
Bash now binds its special emacs-mode functions directly into
|
||||
emacs_meta_keymap so that eight-bit character handling does not interfere
|
||||
|
||||
Some source restructuring: more extern functions are defined in header files
|
||||
and not in C source files
|
||||
|
||||
The handling of `line number' inside functions is now more correct and
|
||||
closer to reality
|
||||
|
||||
Some functions of `general use' were moved to general.c (vfree,
|
||||
full_pathname)
|
||||
|
||||
A bug that caused some redirections to be applied twice was fixed in
|
||||
execute_command_internal (dispose of redirection_undo_list after copying it;
|
||||
ditto for exec_redirection_undo_list)
|
||||
|
||||
The exit status of a command that is not found is 126, as Posix.2 specifies
|
||||
|
||||
More speed improvements -- bash now runs as fast as the SunOS sh on
|
||||
Haertel's `shell benchmark'
|
||||
|
||||
Instead of returning pointers to -1, bash and the readline, history, and
|
||||
glob libraries now return pointers to special `error pointers', which the
|
||||
calling code checks for in place of -1
|
||||
|
||||
Fixed a problem with canonicalize_pathname which made it get
|
||||
confused with xxx/./yyy if yyy was `.' or `..'
|
||||
|
||||
Fixes to make bash recognize SVR4.2 and set USGr4_2 for SVR4.2 systems
|
||||
|
||||
Fixes to the HP/UX machine descriptions to make alloca work on HPUX_9
|
||||
and to avoid `M_MACHINE redefined' warnings
|
||||
|
||||
Fixes to the CRAY machine description
|
||||
|
||||
Fixes to the mailpath code to make it Posix.2-compliant -- backslash
|
||||
may now quote `%' and `?'
|
||||
|
||||
The namespace was further cleaned up, and more functions and variables
|
||||
were made static
|
||||
|
||||
On systems with S_IFSOCK or S_ISSOCK defined in sys/stat.h, bash checks
|
||||
whether fd 0 is a socket to decide whether or not it's being started by
|
||||
rshd and to run the startup files
|
||||
|
||||
Bash now gives the signal mask it inherits to its children -- previously,
|
||||
login shells cleared the signal mask
|
||||
|
||||
cpp-Makefile and subst.c both used the `USE_GLOB_LIBRARY' define, but
|
||||
with different meanings; subst.c now uses `USE_POSIX_GLOB_LIBRARY'
|
||||
|
||||
Fixed pattern substitution so that ${a%%$b}, where b was unset, no longer
|
||||
causes a core dump
|
||||
|
||||
Changed the `test_exit' define in test.c to no longer use `longjmp' as
|
||||
the rhs or a comma-ized expression; this causes core dumps on some
|
||||
optimizer/machine combinations
|
||||
|
||||
A speed hack in variables.c: if no local variables are defined for a level
|
||||
of shell context, kill_all_local_variables does not need to search the
|
||||
whole variable hash table when popping a context
|
||||
|
||||
Fixed the `bind' builtin so that -m now changes the keymap for all of the
|
||||
subsequent operations
|
||||
|
||||
Changed some more builtins to use internal_getopt: bind, command, export,
|
||||
readonly, declare, typeset
|
||||
|
||||
Fixed fc to use the Posix.2 format for listing commands in the
|
||||
history list
|
||||
|
||||
Changed bg to set `!', as Posix.2 specifies
|
||||
|
||||
Fixed ulimit.def to compile if RLIMIT_RSS is not defined,
|
||||
as some systems seem to have it
|
||||
|
||||
Replaced lib/malloc/alloca.c with the version from emacs 19. The old one
|
||||
lives in alloca.c.old
|
||||
|
||||
malloc.c now uses the ANSI C features to `stringize' macro arguments if
|
||||
__STDC__ is defined
|
||||
|
||||
Fixes to the GNU malloc library from glibc 1.06 and Mike Haertel
|
||||
|
||||
Fixes to readline key binding and lookup for Cray systems, which don't
|
||||
like the casting that readline does
|
||||
|
||||
Fixes to all readline library source files to clean up the code: make sure
|
||||
`int'-returning functions use `return x;' rather than `return;', declare all
|
||||
arguments, even the `int' ones, and make some functions void. Cleaned up
|
||||
the code formatting a little, too.
|
||||
|
||||
The readline completer now double-quotes filenames with special word-break
|
||||
characters, so that tilde expansion still works
|
||||
|
||||
^C now breaks out of keyboard macros
|
||||
|
||||
If being compiled as part of the shell, readline no longer attempts to
|
||||
handle SIGTTIN, SIGTTOU, or SIGTSTP
|
||||
|
||||
tilde_expansion_failure_hook is now a CPFunction rather than a Function,
|
||||
since that's how it's used
|
||||
|
||||
Readline vi-mode `change case' function now skips over characters which
|
||||
are neither upper nor lower case
|
||||
|
||||
Readline vi-mode now allows replacement to be redoable with `.'
|
||||
|
||||
2. New Features
|
||||
|
||||
A `strict Posix.2' mode, enabled with the -posix startup option or
|
||||
setting the POSIXLY_CORRECT variable (see CWRU/POSIX.NOTES for a
|
||||
description of the changed behavior)
|
||||
|
||||
`ONESHOT' is now an option in config.h
|
||||
|
||||
cpp-Makefile assumes that fixed header files are present if gcc is being
|
||||
used
|
||||
|
||||
The redirections attached to a function declaration are now part of that
|
||||
function, applied when the function is executed, as specified by Posix.2.
|
||||
This caused a change to parse.y that resulted in 66 shift/reduce
|
||||
conflicts(!)
|
||||
|
||||
All of the OP= functions that Posix.2 specifies are now implemented for
|
||||
both `let' and arithmetic substitution
|
||||
|
||||
The `command' builtin has acquired the Posix.2 `-v' and `-V' options
|
||||
(this shares code with the `type' builtin)
|
||||
|
||||
A new `bash_builtins' man page, like the `csh_builtins' page on some
|
||||
systems
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user