commit bash-20150710 snapshot

This commit is contained in:
Chet Ramey
2015-07-29 16:15:40 -04:00
parent 118fb67074
commit bce12dd773
32 changed files with 8864 additions and 6050 deletions
+4
View File
@@ -323,6 +323,10 @@ vvvv. Fixed a bug that caused the completion code to read past the end of the
wwww. Fixed a bug that caused case statements within loops contained in a
command substitution to be parsed incorrectly.
xxxx. Fixed a bug that could cause SIGCHLD handling to be delayed after
running `wait' with no arguments and interrupting it with ^C without
a trap handler installed.
2. Changes to Readline
a. A bug that caused vi-mode `.' to be unable to redo `c', `d', and `y'
+4
View File
@@ -323,6 +323,10 @@ vvvv. Fixed a bug that caused the completion code to read past the end of the
wwww. Fixed a bug that caused case statements within loops contained in a
command substitution to be parsed incorrectly.
xxxx. Fixed a bug that could cause SIGCHLD handling to be delayed after
running `wait' with no arguments and interrupting it with ^C without
a trap handler installed.
2. Changes to Readline
a. A bug that caused vi-mode `.' to be unable to redo `c', `d', and `y'
+66
View File
@@ -8939,4 +8939,70 @@ sig.h
alias.c
- ALIAS_HASH_BUCKETS: table size increased to 64
7/7
---
{jobs,nojobs}.c
- wait_sigint_cleanup: new function, to be called by longjmp targets
for wait_intr_buf. Performs any necessary cleanup of internal waitchld
state before going back to top level
jobs.h
- wait_sigint_cleanup: new extern declaration
builtins/wait.def
- wait_builtin: call wait_sigint_cleanup after longjmp back to
wait_intr_buf on interrupt
[bash-4.4-alpha frozen]
7/7
---
bashline.c
- attempt_shell_completion: when skipping assignment statements, don't
skip past rl_point to find the word on which to perform programmable
completion. Fixes bug reported by Hanno Böck <hanno@hboeck.de>
7/10
----
pcomplib.c
- compspec_copy: set the refcount on the copy to 1, since it's a freshly
allocated copy and there are no other pointers to it. Fixes memory
leak from gen_progcomp_completions
lib/readline/complete.c
- printable_part: if the pathname passed is just `/', just return it
instead of potentially reading before the `/'. Fixes bug reported
by Hanno Böck <hanno@hboeck.de>
7/11
----
support/man2html.c
- change calls to malloc to use xmalloc; provide standard xmalloc
definition. Report from Bill Parker <wp02855@gmail.com>
builtins/wait.def
- wait_intr_flag: set to denote validity of wait_intr_buf as target
for longjmp; reset by WAIT_RETURN macro; should always be 0 when
wait_builtin returns
quit.h
- CHECK_WAIT_INTR: now also checks wait_intr_flag to ensure valid state
of wait_intr_buf before sh_longjmp
{jobs,nojobs}.c
- wait_intr_flag: extern declaration for use by CHECK_WAIT_INTR
sig.c
- wait_intr_flag: set back to 0 every place the shell resets state after
a jump to top_level
- sigint_sighandler: only set wait_signal_received if wait_intr_flag
indicates that the wait builtin has correctly set wait_intr_buf.
Final fix for bug reported by Ondrej Oprala <ooprala@redhat.com>
subst.c
- parameter_brace_expand: fix so that ${!vvv@} is not interpreted as
introducing a `@' operator, but instead retains its meaning as all
variables whose name begins with vvv. Fixes bug reported by
konsolebox <konsolebox@gmail.com>
+128
View File
@@ -2,6 +2,134 @@ This is a terse description of the new features added to bash-4.4 since
the release of bash-4.3. As always, the manual page (doc/bash.1) is
the place to look for complete descriptions.
1. New Features in Bash
a. There is now a settable configuration #define that will cause the shell
to exit if the shell is running setuid without the -p option and setuid
to the real uid fails.
b. Command and process substitutions now turn off the `-v' option when
executing, as other shells seem to do.
c. The default value for the `checkhash' shell option may now be set at
compile time with a #define.
d. The `mapfile' builtin now has a -d option to use an arbitrary character
as the record delimiter, and a -t option to strip the delimiter as
supplied with -d.
e. The maximum number of nested recursive calls to `eval' is now settable in
config-top.h; the default is no limit.
f. The `-p' option to declare and similar builtins will display attributes for
named variables even when those variables have not been assigned values
(which are technically unset).
g. The maximum number of nested recursive calls to `source' is now settable
in config-top.h; the default is no limit.
h. All builtin commands recognize the `--help' option and print a usage
summary.
i. Bash does not allow function names containing `/' and `=' to be exported.
j. The `ulimit' builtin has new -k (kqueues) and -P (pseudoterminals) options.
k. The shell now allows `time ; othercommand' to time null commands.
l. There is a new `--enable-function-import' configuration option to allow
importing shell functions from the environment; import is enabled by
default.
m. `printf -v var ""' will now set `var' to the empty string, as if `var=""'
had been executed.
n. GLOBIGNORE, the pattern substitution word expansion, and programmable
completion match filtering now honor the value of the `nocasematch' option.
o. There is a new ${parameter@spec} family of operators to transform the
value of `parameter'.
p. Bash no longer attempts to perform compound assignment if a variable on the
rhs of an assignment statement argument to `declare' has the form of a
compound assignment (e.g., w='(word)' ; declare foo=$w); compound
assignments are accepted if the variable was already declared as an array,
but with a warning.
q. The declare builtin no longer displays array variables using the compound
assignment syntax with quotes; that will generate warnings when re-used as
input, and isn't necessary.
r. Executing the rhs of && and || will no longer cause the shell to fork if
it's not necessary.
s. The `local' builtin takes a new argument: `-', which will cause it to save
and the single-letter shell options and restore their previous values at
function return.
t. `complete' and `compgen' have a new `-o nosort' option, which forces
readline to not sort the completion matches.
u. Bash now allows waiting for the most recent process substitution, since it
appears as $!.
v. The `unset' builtin now unsets a scalar variable if it is subscripted with
a `0', analogous to the ${var[0]} expansion.
w. `set -i' is no longer valid, as in other shells.
x. BASH_SUBSHELL is now updated for process substitution and group commands
in pipelines, and is available with the same value when running any exit
trap.
y. Bash now checks $INSIDE_EMACS as well as $EMACS when deciding whether or
not bash is being run in a GNU Emacs shell window.
z. Bash now treats SIGINT received when running a non-builtin command in a
loop the way it has traditionally treated running a builtin command:
running any trap handler and breaking out of the loop.
aa. New variable: EXECIGNORE; a colon-separate list of patterns that will
cause matching filenames to be ignored when searching for commands.
bb. Aliases whose value ends in a shell metacharacter now expand in a way to
allow them to be `pasted' to the next token, which can potentially change
the meaning of a command (e.g., turning `&' into `&&').
2. New Features in Readline
a. The history truncation code now uses the same error recovery mechansim as
the history writing code, and restores the old version of the history file
on error. The error recovery mechanism handles symlinked history files.
b. There is a new bindable variable, `enable-bracketed-paste', which enables
support for a terminal's bracketed paste mode.
c. The editing mode indicators can now be strings and are user-settable
(new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string'
variables). Mode strings can contain invisible character sequences.
Setting mode strings to null strings restores the defaults.
d. Prompt expansion adds the mode string to the last line of a multi-line
prompt (one with embedded newlines).
e. There is a new bindable variable, `colored-completion-prefix', which, if
set, causes the common prefix of a set of possible completions to be
displayed in color.
f. There is a new bindable command `vi-yank-pop', a vi-mode version of emacs-
mode yank-pop.
g. The redisplay code underwent several efficiency improvements for multibyte
locales.
h. The insert-char function attempts to batch-insert all pending typeahead
that maps to self-insert, as long as it is coming from the terminal.
i. rl_callback_sigcleanup: a new application function that can clean up and
unset any state set by readline's callback mode. Intended to be used
after a signal.
-------------------------------------------------------------------------------
This is a terse description of the new features added to bash-4.3 since
the release of bash-4.2. As always, the manual page (doc/bash.1) is
+7
View File
@@ -1523,6 +1523,7 @@ attempt_shell_completion (text, start, end)
os = start;
n = 0;
was_assignment = 0;
s = find_cmd_start (os);
e = find_cmd_end (end);
do
@@ -1533,6 +1534,12 @@ attempt_shell_completion (text, start, end)
s1 = s = e1;
break;
}
/* Or past point if point is within an assignment statement */
else if (was_assignment && s > rl_point)
{
s1 = s = e1;
break;
}
/* Skip over assignment statements preceding a command name. If we
don't find a command name at all, we can perform command name
completion. If we find a partial command name, we should perform
+5
View File
@@ -76,6 +76,7 @@ extern int wait_signal_received;
extern int last_command_exit_signal;
procenv_t wait_intr_buf;
int wait_intr_flag;
/* Wait for the pid in LIST to stop or die. If no arguments are given, then
wait for all of the active background processes of the shell and return
@@ -87,6 +88,7 @@ procenv_t wait_intr_buf;
{ \
interrupt_immediately = old_interrupt_immediately;\
wait_signal_received = 0; \
wait_intr_flag = 0; \
return (s);\
} \
while (0)
@@ -131,11 +133,14 @@ wait_builtin (list)
We handle SIGINT here; it's the only one that needs to be treated
specially (I think), since it's handled specially in {no,}jobs.c. */
wait_intr_flag = 1;
code = setjmp_sigs (wait_intr_buf);
if (code)
{
last_command_exit_signal = wait_signal_received;
status = 128 + wait_signal_received;
wait_sigint_cleanup ();
WAIT_RETURN (status);
}
+2412
View File
File diff suppressed because it is too large Load Diff
+1752 -1736
View File
File diff suppressed because it is too large Load Diff
+35 -10
View File
@@ -3,7 +3,7 @@
</HEAD>
<BODY><TABLE WIDTH=100%>
<TR>
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2015 April 6<TH ALIGN=RIGHT width=33%>BASH(1)
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2015 June 11<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<BR><A HREF="#index">Index</A>
@@ -2536,6 +2536,17 @@ Similar to
</FONT>
used when the shell is invoked in POSIX mode.
<DT><B>EXECIGNORE</B>
<DD>
A colon-separated list of extended glob patterns (see <B>Pattern Matching</B>)
defining the list of filenames to be ignored by command search.
Files whose full pathnames match one of these patterns are not considered
executable files for the purposes of completion and command execution.
This does not affect the behavior of the <B>[</B>, <B>test</B>, and <B>[[</B>
commands.
Use this variable to ignore shared library files that have the executable
bit set, but are not executable files.
<DT><B>FCEDIT</B>
<DD>
@@ -8923,7 +8934,8 @@ No effect; the command does nothing beyond expanding
<I>arguments</I>
and performing any specified
redirections. A zero exit code is returned.
redirections.
The return status is zero.
<DT><B> . </B> <I>filename</I> [<I>arguments</I>]<DD>
<DT><B>source</B> <I>filename</I> [<I>arguments</I>]<DD>
@@ -8970,6 +8982,12 @@ is not searched.
If any <I>arguments</I> are supplied, they become the positional
parameters when <I>filename</I> is executed. Otherwise the positional
parameters are unchanged.
If the <B>-T</B> option is enabled, <B>source</B> inherits any trap on
<B>DEBUG</B>; if it is not, any <B>DEBUG</B> trap string is saved and
restored around the call to <B>source</B>, and <B>source</B> unsets the
<B>DEBUG</B> trap while it executes.
If <B>-T</B> is not set, and the sourced file changes
the <B>DEBUG</B> trap, the new value is retained when <B>source</B> completes.
The return status is the status of the last command exited within
the script (0 if no commands are executed), and false if
<I>filename</I>
@@ -10525,8 +10543,9 @@ Delete the history entry at position <I>offset</I>.
<DT><B>-a</B>
<DD>
Append the ``new'' history lines (history lines entered since the
beginning of the current <B>bash</B> session) to the history file.
Append the ``new'' history lines to the history file.
These are history lines entered since the beginning of the current
<B>bash</B> session, but not already appended to the history file.
<DT><B>-n</B>
<DD>
@@ -11194,8 +11213,8 @@ are supplied, the line read is assigned to the variable
<FONT SIZE=-1><B>REPLY</B>.
</FONT>
The return code is zero, unless end-of-file is encountered, <B>read</B>
times out (in which case the return code is greater than 128),
The exit status is zero, unless end-of-file is encountered, <B>read</B>
times out (in which case the status is greater than 128),
a variable assignment error (such as assigning to a readonly variable) occurs,
or an invalid file descriptor is supplied as the argument to <B>-u</B>.
</DL>
@@ -12921,7 +12940,6 @@ which is in seconds;
<B>-p</B>,
which is in units of 512-byte blocks;
and
<B>-P</B>,
<B>-T</B>,
@@ -12935,7 +12953,14 @@ and
and
<B>-u</B>,
which are unscaled values.
which are unscaled values;
and, when in Posix mode,
<B>-c</B>
and
<B>-f</B>,
which are in 512-byte increments.
The return status is 0 unless an invalid option or argument is supplied,
or an error occurs while setting a new limit.
</DL>
@@ -13352,7 +13377,7 @@ There may be only one active coprocess at a time.
<HR>
<TABLE WIDTH=100%>
<TR>
<TH ALIGN=LEFT width=33%>GNU Bash 4.4<TH ALIGN=CENTER width=33%>2015 April 6<TH ALIGN=RIGHT width=33%>BASH(1)
<TH ALIGN=LEFT width=33%>GNU Bash 4.4<TH ALIGN=CENTER width=33%>2015 June 11<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<HR>
@@ -13458,6 +13483,6 @@ There may be only one active coprocess at a time.
</DL>
<HR>
This document was created by man2html from bash.1.<BR>
Time: 06 April 2015 13:59:15 EDT
Time: 10 July 2015 10:23:17 EDT
</BODY>
</HTML>
BIN
View File
Binary file not shown.
+826 -800
View File
File diff suppressed because it is too large Load Diff
+185 -166
View File
@@ -2,9 +2,9 @@ This is bashref.info, produced by makeinfo version 5.2 from
bashref.texi.
This text is a brief description of the features that are present in the
Bash shell (version 4.4, 6 April 2015).
Bash shell (version 4.4, 11 June 2015).
This is Edition 4.4, last updated 6 April 2015, of 'The GNU Bash
This is Edition 4.4, last updated 11 June 2015, of 'The GNU Bash
Reference Manual', for 'Bash', Version 4.4.
Copyright (C) 1988-2014 Free Software Foundation, Inc.
@@ -27,10 +27,10 @@ Bash Features
*************
This text is a brief description of the features that are present in the
Bash shell (version 4.4, 6 April 2015). The Bash home page is
Bash shell (version 4.4, 11 June 2015). The Bash home page is
<http://www.gnu.org/software/bash/>.
This is Edition 4.4, last updated 6 April 2015, of 'The GNU Bash
This is Edition 4.4, last updated 11 June 2015, of 'The GNU Bash
Reference Manual', for 'Bash', Version 4.4.
Bash contains features that appear in other popular shells, and some
@@ -2797,10 +2797,15 @@ standard.
the current directory is searched if FILENAME is not found in
'$PATH'. If any ARGUMENTS are supplied, they become the positional
parameters when FILENAME is executed. Otherwise the positional
parameters are unchanged. The return status is the exit status of
the last command executed, or zero if no commands are executed. If
FILENAME is not found, or cannot be read, the return status is
non-zero. This builtin is equivalent to 'source'.
parameters are unchanged. If the '-T' option is enabled, 'source'
inherits any trap on 'DEBUG'; if it is not, any 'DEBUG' trap string
is saved and restored around the call to 'source', and 'source'
unsets the 'DEBUG' trap while it executes. If '-T' is not set, and
the sourced file changes the 'DEBUG' trap, the new value is
retained when 'source' completes. The return status is the exit
status of the last command executed, or zero if no commands are
executed. If FILENAME is not found, or cannot be read, the return
status is non-zero. This builtin is equivalent to 'source'.
'break'
break [N]
@@ -3670,10 +3675,10 @@ standard.
Splitting::). The backslash character '\' may be used to remove
any special meaning for the next character read and for line
continuation. If no names are supplied, the line read is assigned
to the variable 'REPLY'. The return code is zero, unless
to the variable 'REPLY'. The exit status is zero, unless
end-of-file is encountered, 'read' times out (in which case the
return code is greater than 128), a variable assignment error (such
as assigning to a readonly variable) occurs, or an invalid file
status is greater than 128), a variable assignment error (such as
assigning to a readonly variable) occurs, or an invalid file
descriptor is supplied as the argument to '-u'.
Options, if supplied, have the following meanings:
@@ -3887,8 +3892,10 @@ standard.
limits, if neither '-H' nor '-S' is supplied, both the hard and
soft limits are set. If no option is given, then '-f' is assumed.
Values are in 1024-byte increments, except for '-t', which is in
seconds; '-p', which is in units of 512-byte blocks; and '-P',
'-T', '-b', '-k', '-n' and '-u', which are unscaled values.
seconds; '-p', which is in units of 512-byte blocks; '-P', '-T',
'-b', '-k', '-n' and '-u', which are unscaled values; and, when in
POSIX Mode (*note Bash POSIX Mode::), '-c' and '-f', which are in
512-byte increments.
The return status is zero unless an invalid option or argument is
supplied, or an error occurs while setting a new limit.
@@ -4879,6 +4886,16 @@ Variables::).
The numeric effective user id of the current user. This variable
is readonly.
'EXECIGNORE'
A colon-separated list of extended glob patterns (*note Pattern
Matching::) defining the list of filenames to be ignored by command
search. Files whose full pathnames match one of these patterns are
not considered executable files for the purposes of completion and
command execution. This does not affect the behavior of the '[',
'test', and '[[' commands. Use this variable to ignore shared
library files that have the executable bit set, but are not
executable files.
'FCEDIT'
The editor used as a default by the '-e' option to the 'fc' builtin
command.
@@ -8900,8 +8917,9 @@ history file.
specified as it appears when the history is displayed.
'-a'
Append the new history lines (history lines entered since the
beginning of the current Bash session) to the history file.
Append the new history lines to the history file. These are
history lines entered since the beginning of the current Bash
session, but not already appended to the history file.
'-n'
Append the history lines not already read from the history
@@ -10521,17 +10539,17 @@ D.1 Index of Shell Builtin Commands
* :: Bourne Shell Builtins.
(line 11)
* [: Bourne Shell Builtins.
(line 263)
(line 268)
* alias: Bash Builtins. (line 11)
* bg: Job Control Builtins.
(line 7)
* bind: Bash Builtins. (line 21)
* break: Bourne Shell Builtins.
(line 31)
(line 36)
* builtin: Bash Builtins. (line 101)
* caller: Bash Builtins. (line 110)
* cd: Bourne Shell Builtins.
(line 39)
(line 44)
* command: Bash Builtins. (line 127)
* compgen: Programmable Completion Builtins.
(line 12)
@@ -10540,7 +10558,7 @@ D.1 Index of Shell Builtin Commands
* compopt: Programmable Completion Builtins.
(line 229)
* continue: Bourne Shell Builtins.
(line 80)
(line 85)
* declare: Bash Builtins. (line 147)
* dirs: Directory Stack Builtins.
(line 7)
@@ -10549,21 +10567,21 @@ D.1 Index of Shell Builtin Commands
* echo: Bash Builtins. (line 244)
* enable: Bash Builtins. (line 293)
* eval: Bourne Shell Builtins.
(line 89)
(line 94)
* exec: Bourne Shell Builtins.
(line 97)
(line 102)
* exit: Bourne Shell Builtins.
(line 114)
(line 119)
* export: Bourne Shell Builtins.
(line 121)
(line 126)
* fc: Bash History Builtins.
(line 10)
* fg: Job Control Builtins.
(line 17)
* getopts: Bourne Shell Builtins.
(line 137)
(line 142)
* hash: Bourne Shell Builtins.
(line 180)
(line 185)
* help: Bash Builtins. (line 322)
* history: Bash History Builtins.
(line 40)
@@ -10581,34 +10599,34 @@ D.1 Index of Shell Builtin Commands
* pushd: Directory Stack Builtins.
(line 54)
* pwd: Bourne Shell Builtins.
(line 200)
(line 205)
* read: Bash Builtins. (line 458)
* readarray: Bash Builtins. (line 548)
* readonly: Bourne Shell Builtins.
(line 210)
(line 215)
* return: Bourne Shell Builtins.
(line 229)
(line 234)
* set: The Set Builtin. (line 11)
* shift: Bourne Shell Builtins.
(line 250)
(line 255)
* shopt: The Shopt Builtin. (line 9)
* source: Bash Builtins. (line 557)
* suspend: Job Control Builtins.
(line 100)
* test: Bourne Shell Builtins.
(line 263)
(line 268)
* times: Bourne Shell Builtins.
(line 338)
(line 343)
* trap: Bourne Shell Builtins.
(line 344)
(line 349)
* type: Bash Builtins. (line 562)
* typeset: Bash Builtins. (line 594)
* ulimit: Bash Builtins. (line 600)
* umask: Bourne Shell Builtins.
(line 393)
* unalias: Bash Builtins. (line 697)
(line 398)
* unalias: Bash Builtins. (line 699)
* unset: Bourne Shell Builtins.
(line 411)
(line 416)
* wait: Job Control Builtins.
(line 75)
@@ -10754,59 +10772,60 @@ D.3 Parameter and Variable Index
(line 148)
* ENV: Bash Variables. (line 242)
* EUID: Bash Variables. (line 246)
* EXECIGNORE: Bash Variables. (line 250)
* expand-tilde: Readline Init File Syntax.
(line 159)
* FCEDIT: Bash Variables. (line 250)
* FIGNORE: Bash Variables. (line 254)
* FUNCNAME: Bash Variables. (line 260)
* FUNCNEST: Bash Variables. (line 278)
* GLOBIGNORE: Bash Variables. (line 283)
* GROUPS: Bash Variables. (line 289)
* histchars: Bash Variables. (line 295)
* HISTCMD: Bash Variables. (line 310)
* HISTCONTROL: Bash Variables. (line 315)
* HISTFILE: Bash Variables. (line 331)
* HISTFILESIZE: Bash Variables. (line 335)
* HISTIGNORE: Bash Variables. (line 346)
* FCEDIT: Bash Variables. (line 260)
* FIGNORE: Bash Variables. (line 264)
* FUNCNAME: Bash Variables. (line 270)
* FUNCNEST: Bash Variables. (line 288)
* GLOBIGNORE: Bash Variables. (line 293)
* GROUPS: Bash Variables. (line 299)
* histchars: Bash Variables. (line 305)
* HISTCMD: Bash Variables. (line 320)
* HISTCONTROL: Bash Variables. (line 325)
* HISTFILE: Bash Variables. (line 341)
* HISTFILESIZE: Bash Variables. (line 345)
* HISTIGNORE: Bash Variables. (line 356)
* history-preserve-point: Readline Init File Syntax.
(line 163)
* history-size: Readline Init File Syntax.
(line 169)
* HISTSIZE: Bash Variables. (line 365)
* HISTTIMEFORMAT: Bash Variables. (line 372)
* HISTSIZE: Bash Variables. (line 375)
* HISTTIMEFORMAT: Bash Variables. (line 382)
* HOME: Bourne Shell Variables.
(line 13)
* horizontal-scroll-mode: Readline Init File Syntax.
(line 176)
* HOSTFILE: Bash Variables. (line 380)
* HOSTNAME: Bash Variables. (line 391)
* HOSTTYPE: Bash Variables. (line 394)
* HOSTFILE: Bash Variables. (line 390)
* HOSTNAME: Bash Variables. (line 401)
* HOSTTYPE: Bash Variables. (line 404)
* IFS: Bourne Shell Variables.
(line 18)
* IGNOREEOF: Bash Variables. (line 397)
* IGNOREEOF: Bash Variables. (line 407)
* input-meta: Readline Init File Syntax.
(line 183)
* INPUTRC: Bash Variables. (line 407)
* INPUTRC: Bash Variables. (line 417)
* isearch-terminators: Readline Init File Syntax.
(line 190)
* keymap: Readline Init File Syntax.
(line 197)
* LANG: Bash Variables. (line 411)
* LC_ALL: Bash Variables. (line 415)
* LC_COLLATE: Bash Variables. (line 419)
* LC_CTYPE: Bash Variables. (line 426)
* LANG: Bash Variables. (line 421)
* LC_ALL: Bash Variables. (line 425)
* LC_COLLATE: Bash Variables. (line 429)
* LC_CTYPE: Bash Variables. (line 436)
* LC_MESSAGES: Locale Translation. (line 11)
* LC_MESSAGES <1>: Bash Variables. (line 431)
* LC_NUMERIC: Bash Variables. (line 435)
* LINENO: Bash Variables. (line 439)
* LINES: Bash Variables. (line 443)
* MACHTYPE: Bash Variables. (line 449)
* LC_MESSAGES <1>: Bash Variables. (line 441)
* LC_NUMERIC: Bash Variables. (line 445)
* LINENO: Bash Variables. (line 449)
* LINES: Bash Variables. (line 453)
* MACHTYPE: Bash Variables. (line 459)
* MAIL: Bourne Shell Variables.
(line 22)
* MAILCHECK: Bash Variables. (line 453)
* MAILCHECK: Bash Variables. (line 463)
* MAILPATH: Bourne Shell Variables.
(line 27)
* MAPFILE: Bash Variables. (line 461)
* MAPFILE: Bash Variables. (line 471)
* mark-modified-lines: Readline Init File Syntax.
(line 226)
* mark-symlinked-directories: Readline Init File Syntax.
@@ -10817,41 +10836,41 @@ D.3 Parameter and Variable Index
(line 243)
* meta-flag: Readline Init File Syntax.
(line 183)
* OLDPWD: Bash Variables. (line 465)
* OLDPWD: Bash Variables. (line 475)
* OPTARG: Bourne Shell Variables.
(line 34)
* OPTERR: Bash Variables. (line 468)
* OPTERR: Bash Variables. (line 478)
* OPTIND: Bourne Shell Variables.
(line 38)
* OSTYPE: Bash Variables. (line 472)
* OSTYPE: Bash Variables. (line 482)
* output-meta: Readline Init File Syntax.
(line 248)
* page-completions: Readline Init File Syntax.
(line 253)
* PATH: Bourne Shell Variables.
(line 42)
* PIPESTATUS: Bash Variables. (line 475)
* POSIXLY_CORRECT: Bash Variables. (line 480)
* PPID: Bash Variables. (line 489)
* PROMPT_COMMAND: Bash Variables. (line 493)
* PROMPT_DIRTRIM: Bash Variables. (line 497)
* PIPESTATUS: Bash Variables. (line 485)
* POSIXLY_CORRECT: Bash Variables. (line 490)
* PPID: Bash Variables. (line 499)
* PROMPT_COMMAND: Bash Variables. (line 503)
* PROMPT_DIRTRIM: Bash Variables. (line 507)
* PS1: Bourne Shell Variables.
(line 48)
* PS2: Bourne Shell Variables.
(line 53)
* PS3: Bash Variables. (line 503)
* PS4: Bash Variables. (line 508)
* PWD: Bash Variables. (line 514)
* RANDOM: Bash Variables. (line 517)
* READLINE_LINE: Bash Variables. (line 522)
* READLINE_POINT: Bash Variables. (line 526)
* REPLY: Bash Variables. (line 530)
* PS3: Bash Variables. (line 513)
* PS4: Bash Variables. (line 518)
* PWD: Bash Variables. (line 524)
* RANDOM: Bash Variables. (line 527)
* READLINE_LINE: Bash Variables. (line 532)
* READLINE_POINT: Bash Variables. (line 536)
* REPLY: Bash Variables. (line 540)
* revert-all-at-newline: Readline Init File Syntax.
(line 263)
* SECONDS: Bash Variables. (line 533)
* SHELL: Bash Variables. (line 539)
* SHELLOPTS: Bash Variables. (line 544)
* SHLVL: Bash Variables. (line 553)
* SECONDS: Bash Variables. (line 543)
* SHELL: Bash Variables. (line 549)
* SHELLOPTS: Bash Variables. (line 554)
* SHLVL: Bash Variables. (line 563)
* show-all-if-ambiguous: Readline Init File Syntax.
(line 269)
* show-all-if-unmodified: Readline Init File Syntax.
@@ -10862,10 +10881,10 @@ D.3 Parameter and Variable Index
(line 290)
* TEXTDOMAIN: Locale Translation. (line 11)
* TEXTDOMAINDIR: Locale Translation. (line 11)
* TIMEFORMAT: Bash Variables. (line 558)
* TMOUT: Bash Variables. (line 596)
* TMPDIR: Bash Variables. (line 608)
* UID: Bash Variables. (line 612)
* TIMEFORMAT: Bash Variables. (line 568)
* TMOUT: Bash Variables. (line 606)
* TMPDIR: Bash Variables. (line 618)
* UID: Bash Variables. (line 622)
* vi-cmd-mode-string: Readline Init File Syntax.
(line 303)
* vi-ins-mode-string: Readline Init File Syntax.
@@ -11284,83 +11303,83 @@ Node: Signals113494
Node: Shell Scripts115461
Node: Shell Builtin Commands117976
Node: Bourne Shell Builtins120000
Node: Bash Builtins140242
Node: Modifying Shell Behavior168735
Node: The Set Builtin169080
Node: The Shopt Builtin179493
Node: Special Builtins194122
Node: Shell Variables195101
Node: Bourne Shell Variables195538
Node: Bash Variables197569
Node: Bash Features224441
Node: Invoking Bash225340
Node: Bash Startup Files231289
Node: Interactive Shells236392
Node: What is an Interactive Shell?236802
Node: Is this Shell Interactive?237451
Node: Interactive Shell Behavior238266
Node: Bash Conditional Expressions241565
Node: Shell Arithmetic245566
Node: Aliases248343
Node: Arrays250891
Node: The Directory Stack255975
Node: Directory Stack Builtins256692
Node: Controlling the Prompt259651
Node: The Restricted Shell262397
Node: Bash POSIX Mode264222
Node: Job Control273816
Node: Job Control Basics274276
Node: Job Control Builtins278995
Node: Job Control Variables283466
Node: Command Line Editing284622
Node: Introduction and Notation286293
Node: Readline Interaction287916
Node: Readline Bare Essentials289107
Node: Readline Movement Commands290890
Node: Readline Killing Commands291850
Node: Readline Arguments293768
Node: Searching294812
Node: Readline Init File296998
Node: Readline Init File Syntax298145
Node: Conditional Init Constructs317870
Node: Sample Init File320395
Node: Bindable Readline Commands323512
Node: Commands For Moving324716
Node: Commands For History325859
Node: Commands For Text330148
Node: Commands For Killing333537
Node: Numeric Arguments336018
Node: Commands For Completion337157
Node: Keyboard Macros341348
Node: Miscellaneous Commands342035
Node: Readline vi Mode347839
Node: Programmable Completion348746
Node: Programmable Completion Builtins356207
Node: A Programmable Completion Example366093
Node: Using History Interactively371345
Node: Bash History Facilities372029
Node: Bash History Builtins375028
Node: History Interaction378959
Node: Event Designators381665
Node: Word Designators382884
Node: Modifiers384521
Node: Installing Bash385923
Node: Basic Installation387060
Node: Compilers and Options389751
Node: Compiling For Multiple Architectures390492
Node: Installation Names392155
Node: Specifying the System Type392973
Node: Sharing Defaults393689
Node: Operation Controls394362
Node: Optional Features395320
Node: Reporting Bugs405577
Node: Major Differences From The Bourne Shell406771
Node: GNU Free Documentation License423623
Node: Indexes448800
Node: Builtin Index449254
Node: Reserved Word Index456081
Node: Variable Index458529
Node: Function Index473696
Node: Concept Index486916
Node: Bash Builtins140602
Node: Modifying Shell Behavior169196
Node: The Set Builtin169541
Node: The Shopt Builtin179954
Node: Special Builtins194583
Node: Shell Variables195562
Node: Bourne Shell Variables195999
Node: Bash Variables198030
Node: Bash Features225430
Node: Invoking Bash226329
Node: Bash Startup Files232278
Node: Interactive Shells237381
Node: What is an Interactive Shell?237791
Node: Is this Shell Interactive?238440
Node: Interactive Shell Behavior239255
Node: Bash Conditional Expressions242554
Node: Shell Arithmetic246555
Node: Aliases249332
Node: Arrays251880
Node: The Directory Stack256964
Node: Directory Stack Builtins257681
Node: Controlling the Prompt260640
Node: The Restricted Shell263386
Node: Bash POSIX Mode265211
Node: Job Control274805
Node: Job Control Basics275265
Node: Job Control Builtins279984
Node: Job Control Variables284455
Node: Command Line Editing285611
Node: Introduction and Notation287282
Node: Readline Interaction288905
Node: Readline Bare Essentials290096
Node: Readline Movement Commands291879
Node: Readline Killing Commands292839
Node: Readline Arguments294757
Node: Searching295801
Node: Readline Init File297987
Node: Readline Init File Syntax299134
Node: Conditional Init Constructs318859
Node: Sample Init File321384
Node: Bindable Readline Commands324501
Node: Commands For Moving325705
Node: Commands For History326848
Node: Commands For Text331137
Node: Commands For Killing334526
Node: Numeric Arguments337007
Node: Commands For Completion338146
Node: Keyboard Macros342337
Node: Miscellaneous Commands343024
Node: Readline vi Mode348828
Node: Programmable Completion349735
Node: Programmable Completion Builtins357196
Node: A Programmable Completion Example367082
Node: Using History Interactively372334
Node: Bash History Facilities373018
Node: Bash History Builtins376017
Node: History Interaction380014
Node: Event Designators382720
Node: Word Designators383939
Node: Modifiers385576
Node: Installing Bash386978
Node: Basic Installation388115
Node: Compilers and Options390806
Node: Compiling For Multiple Architectures391547
Node: Installation Names393210
Node: Specifying the System Type394028
Node: Sharing Defaults394744
Node: Operation Controls395417
Node: Optional Features396375
Node: Reporting Bugs406632
Node: Major Differences From The Bourne Shell407826
Node: GNU Free Documentation License424678
Node: Indexes449855
Node: Builtin Index450309
Node: Reserved Word Index457136
Node: Variable Index459584
Node: Function Index474824
Node: Concept Index488044

End Tag Table
+13 -34
View File
@@ -1,8 +1,10 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014/MacPorts 2014_9) (preloaded format=pdftex 2014.11.4) 17 JUN 2015 11:42
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014/MacPorts 2014_9) (preloaded format=etex 2014.11.4) 10 JUL 2015 10:23
entering extended mode
restricted \write18 enabled.
file:line:error style messages enabled.
%&-line parsing enabled.
**/usr/homes/chet/src/bash/src/doc/bashref.texi
**\catcode126=12 \def\normaltilde{~}\catcode126=13 \let~\normaltilde \input /u
sr/homes/chet/src/bash/src/doc/bashref.texi
(/usr/homes/chet/src/bash/src/doc/bashref.texi (./texinfo.tex
Loading texinfo [version 2013-09-11.11]:
\bindingoffset=\dimen16
@@ -179,13 +181,11 @@ texinfo.tex: doing @include of version.texi
\openout9 = `bashref.rw'.
{/opt/local/var/db/texmf/fonts/map/pdftex/updmap/pdftex.map}] [2] (./bashref.to
c [-1] [-2] [-3]) [-4] (./bashref.toc)
(./bashref.toc) Chapter 1
] [2] (./bashref.toc [-1] [-2] [-3])
[-4] Chapter 1
\openout0 = `bashref.toc'.
Chapter 2 [1] [2] [3] Chapter 3 [4] [5] [6] [7]
[8] [9] [10]
Chapter 2 [1] [2] [3] Chapter 3 [4] [5] [6] [7] [8] [9] [10]
Overfull \hbox (38.26587pt too wide) in paragraph at lines 866--866
[]@texttt case @textttsl word @texttt in [ [(] @textttsl pat-tern @texttt [| @
textttsl pattern@texttt ][]) @textttsl command-list @texttt ;;][] esac[]
@@ -380,33 +380,12 @@ texinfo.tex: doing @include of fdl.texi
Appendix D [160] (./bashref.bts) [161] (./bashref.rws) (./bashref.vrs [162]
[163]) (./bashref.fns [164] [165]) (./bashref.cps [166] [167]) [168] )
Here is how much of TeX's memory you used:
2745 strings out of 497110
37296 string characters out of 6206875
151703 words of memory out of 5000000
3523 multiletter control sequences out of 15000+600000
2209 strings out of 497120
30319 string characters out of 6207257
78069 words of memory out of 5000000
3358 multiletter control sequences out of 15000+600000
32896 words of font info for 113 fonts, out of 8000000 for 9000
51 hyphenation exceptions out of 8191
16i,6n,16p,319b,967s stack positions out of 5000i,500n,10000p,200000b,80000s
{/opt/loc
al/share/texmf-texlive/fonts/enc/dvips/cm-super/cm-super-t1.enc}</opt/local/sha
re/texmf-texlive/fonts/type1/public/amsfonts/cm/cmbx12.pfb></opt/local/share/te
xmf-texlive/fonts/type1/public/amsfonts/cm/cmcsc10.pfb></opt/local/share/texmf-
texlive/fonts/type1/public/amsfonts/cm/cmmi10.pfb></opt/local/share/texmf-texli
ve/fonts/type1/public/amsfonts/cm/cmmi12.pfb></opt/local/share/texmf-texlive/fo
nts/type1/public/amsfonts/cm/cmmi9.pfb></opt/local/share/texmf-texlive/fonts/ty
pe1/public/amsfonts/cm/cmr10.pfb></opt/local/share/texmf-texlive/fonts/type1/pu
blic/amsfonts/cm/cmr9.pfb></opt/local/share/texmf-texlive/fonts/type1/public/am
sfonts/cm/cmsl10.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfont
s/cm/cmsltt10.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/c
m/cmsy10.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmt
i10.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmtt10.p
fb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmtt12.pfb></
opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmtt9.pfb></opt/lo
cal/share/texmf-texlive/fonts/type1/public/cm-super/sfrm1095.pfb>
Output written on bashref.pdf (174 pages, 728609 bytes).
PDF statistics:
2546 PDF objects out of 2984 (max. 8388607)
2328 compressed objects within 24 object streams
300 named destinations out of 1000 (max. 500000)
1125 words of extra memory for PDF output out of 10000 (max. 10000000)
16i,6n,16p,394b,683s stack positions out of 5000i,500n,10000p,200000b,80000s
Output written on bashref.dvi (174 pages, 735276 bytes).
+797 -768
View File
File diff suppressed because it is too large Load Diff
+374 -367
View File
File diff suppressed because it is too large Load Diff
+2154 -2136
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -1,9 +1,9 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.22.2
%%CreationDate: Mon Apr 6 13:59:04 2015
%%Creator: groff version 1.22.3
%%CreationDate: Fri Jul 10 10:23:01 2015
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%DocumentSuppliedResources: procset grops 1.22 2
%%DocumentSuppliedResources: procset grops 1.22 3
%%Pages: 1
%%PageOrder: Ascend
%%DocumentMedia: Default 612 792 0 () ()
@@ -13,7 +13,7 @@
%%PageMedia: Default
%%EndDefaults
%%BeginProlog
%%BeginResource: procset grops 1.22 2
%%BeginResource: procset grops 1.22 3
%!PS-Adobe-3.0 Resource-ProcSet
/setpacking where{
pop
+13
View File
@@ -165,6 +165,7 @@ extern sh_builtin_func_t *this_shell_builtin;
extern char *shell_name, *this_command_name;
extern sigset_t top_level_mask;
extern procenv_t wait_intr_buf;
extern int wait_intr_flag;
extern int wait_signal_received;
extern WORD_LIST *subst_assign_varlist;
@@ -2301,6 +2302,14 @@ static int wait_sigint_received;
static int child_caught_sigint;
static int waiting_for_child;
/* Clean up state after longjmp to wait_intr_buf */
void
wait_sigint_cleanup ()
{
queue_sigchld = 0;
waiting_for_child = 0;
}
static void
restore_sigint_handler ()
{
@@ -3317,6 +3326,10 @@ waitchld (wpid, block)
#if 0
if (wpid != -1 && block)
itrace("waitchld: blocking waitpid returns %d", pid);
#endif
#if 0
if (wpid != -1)
itrace("waitchld: %s waitpid returns %d", block?"blocking":"non-blocking", pid);
#endif
/* WCONTINUED may be rejected by waitpid as invalid even when defined */
if (wcontinued && pid < 0 && errno == EINVAL)
+2
View File
@@ -221,6 +221,8 @@ extern int wait_for __P((pid_t));
extern int wait_for_job __P((int));
extern int wait_for_any_job __P((void));
extern void wait_sigint_cleanup __P((void));
extern void notify_and_cleanup __P((void));
extern void reap_dead_jobs __P((void));
extern int start_job __P((int, int));
+2
View File
@@ -726,6 +726,8 @@ printable_part (pathname)
if (temp == 0 || *temp == '\0')
return (pathname);
else if (temp[1] == 0 && temp == pathname)
return (pathname);
/* If the basename is NULL, we might have a pathname like '/usr/src/'.
Look for a previous slash and, if one is found, return the portion
following that slash. If there's no previous slash, just return the
+8
View File
@@ -81,11 +81,14 @@ extern sh_builtin_func_t *this_shell_builtin;
extern sigset_t top_level_mask;
#endif
extern procenv_t wait_intr_buf;
extern int wait_intr_flag;
extern int wait_signal_received;
volatile pid_t last_made_pid = NO_PID;
volatile pid_t last_asynchronous_pid = NO_PID;
static int queue_sigchld, waiting_for_child; /* dummy declarations */
/* Call this when you start making children. */
int already_making_children = 0;
@@ -704,6 +707,11 @@ wait_for_background_pids ()
cleanup_dead_jobs ();
}
void
wait_sigint_cleanup ()
{
}
/* Make OLD_SIGINT_HANDLER the SIGINT signal handler. */
#define INVALID_SIGNAL_HANDLER (SigHandler *)wait_for_background_pids
static SigHandler *old_sigint_handler = INVALID_SIGNAL_HANDLER;
+1 -1
View File
@@ -96,7 +96,7 @@ compspec_copy (cs)
new = (COMPSPEC *)xmalloc (sizeof (COMPSPEC));
new->refcount = cs->refcount;
new->refcount = 1; /* was cs->refcount, but this is a fresh copy */
new->actions = cs->actions;
new->options = cs->options;
+1 -1
View File
@@ -63,7 +63,7 @@ extern volatile sig_atomic_t terminating_signal;
#define CHECK_WAIT_INTR \
do { \
if (wait_signal_received && this_shell_builtin && (this_shell_builtin == wait_builtin)) \
if (wait_intr_flag && wait_signal_received && this_shell_builtin && (this_shell_builtin == wait_builtin)) \
sh_longjmp (wait_intr_buf, 1); \
} while (0)
+6 -4
View File
@@ -67,6 +67,7 @@ extern int history_lines_this_session;
#endif
extern int no_line_editing;
extern int wait_signal_received;
extern int wait_intr_flag;
extern sh_builtin_func_t *this_shell_builtin;
extern void initialize_siglist ();
@@ -389,7 +390,7 @@ top_level_cleanup ()
run_unwind_protects ();
loop_level = continuing = breaking = funcnest = 0;
executing_list = comsub_ignore_return = return_catch_flag = 0;
executing_list = comsub_ignore_return = return_catch_flag = wait_intr_flag = 0;
}
/* What to do when we've been interrupted, and it is safe to handle it. */
@@ -447,7 +448,7 @@ throw_to_top_level ()
run_unwind_protects ();
loop_level = continuing = breaking = funcnest = 0;
executing_list = comsub_ignore_return = return_catch_flag = 0;
executing_list = comsub_ignore_return = return_catch_flag = wait_intr_flag = 0;
if (interactive && print_newline)
{
@@ -589,7 +590,7 @@ termsig_handler (sig)
/* Reset execution context */
loop_level = continuing = breaking = funcnest = 0;
executing_list = comsub_ignore_return = return_catch_flag = 0;
executing_list = comsub_ignore_return = return_catch_flag = wait_intr_flag = 0;
run_exit_trap (); /* XXX - run exit trap possibly in signal context? */
set_signal_handler (sig, SIG_DFL);
@@ -615,7 +616,8 @@ sigint_sighandler (sig)
if (this_shell_builtin && this_shell_builtin == wait_builtin)
{
last_command_exit_value = 128 + sig;
wait_signal_received = sig;
if (wait_intr_flag)
wait_signal_received = sig;
SIGRETURN (0);
}
+7
View File
@@ -7592,6 +7592,13 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta
name[1] = '\0';
t_index++;
}
else if (*name == '!' && t_index > sindex && string[t_index] == '@' && string[t_index+1] == '}')
{
name = (char *)xrealloc (name, t_index - sindex + 2);
name[t_index - sindex] = '@';
name[t_index - sindex + 1] = '\0';
t_index++;
}
ret = 0;
tflag = 0;
+29 -15
View File
@@ -169,6 +169,19 @@ stralloc(int len)
return new;
}
void *
xmalloc (size_t size)
{
void *ret;
ret = malloc (size);
if (ret == 0) {
fprintf(stderr, "man2html: out of memory");
exit(EXIT_FAILURE);
}
return ret;
}
/*
* Some systems don't have strdup so lets use our own - which can also
* check for out of memory.
@@ -1252,9 +1265,9 @@ scan_format(char *c, TABLEROW ** result, int *maxcol)
if (*result) {
clear_table(*result);
}
layout = currow = (TABLEROW *) malloc(sizeof(TABLEROW));
layout = currow = (TABLEROW *) xmalloc(sizeof(TABLEROW));
currow->next = currow->prev = NULL;
currow->first = curfield = (TABLEITEM *) malloc(sizeof(TABLEITEM));
currow->first = curfield = (TABLEITEM *) xmalloc(sizeof(TABLEITEM));
*curfield = emptyfield;
while (*c && *c != '.') {
switch (*c) {
@@ -1273,7 +1286,7 @@ scan_format(char *c, TABLEROW ** result, int *maxcol)
case '^':
case '_':
if (curfield->align) {
curfield->next = (TABLEITEM *) malloc(sizeof(TABLEITEM));
curfield->next = (TABLEITEM *) xmalloc(sizeof(TABLEITEM));
curfield = curfield->next;
*curfield = emptyfield;
}
@@ -1353,11 +1366,11 @@ scan_format(char *c, TABLEROW ** result, int *maxcol)
break;
case ',':
case '\n':
currow->next = (TABLEROW *) malloc(sizeof(TABLEROW));
currow->next = (TABLEROW *) xmalloc(sizeof(TABLEROW));
currow->next->prev = currow;
currow = currow->next;
currow->next = NULL;
curfield = currow->first = (TABLEITEM *) malloc(sizeof(TABLEITEM));
curfield = currow->first = (TABLEITEM *) xmalloc(sizeof(TABLEITEM));
*curfield = emptyfield;
c++;
break;
@@ -1396,20 +1409,20 @@ next_row(TABLEROW * tr)
} else {
TABLEITEM *ti, *ti2;
tr->next = (TABLEROW *) malloc(sizeof(TABLEROW));
tr->next = (TABLEROW *) xmalloc(sizeof(TABLEROW));
tr->next->prev = tr;
ti = tr->first;
tr = tr->next;
tr->next = NULL;
if (ti)
tr->first = ti2 = (TABLEITEM *) malloc(sizeof(TABLEITEM));
tr->first = ti2 = (TABLEITEM *) xmalloc(sizeof(TABLEITEM));
else
tr->first = ti2 = NULL;
while (ti != ti2) {
*ti2 = *ti;
ti2->contents = NULL;
if ((ti = ti->next)) {
ti2->next = (TABLEITEM *) malloc(sizeof(TABLEITEM));
ti2->next = (TABLEITEM *) xmalloc(sizeof(TABLEITEM));
}
ti2 = ti2->next;
}
@@ -1500,17 +1513,17 @@ scan_table(char *c)
if ((*c == '_' || *c == '=') && (c[1] == itemsep || c[1] == '\n')) {
if (c[-1] == '\n' && c[1] == '\n') {
if (currow->prev) {
currow->prev->next = (TABLEROW *) malloc(sizeof(TABLEROW));
currow->prev->next = (TABLEROW *) xmalloc(sizeof(TABLEROW));
currow->prev->next->next = currow;
currow->prev->next->prev = currow->prev;
currow->prev = currow->prev->next;
} else {
currow->prev = layout = (TABLEROW *) malloc(sizeof(TABLEROW));
currow->prev = layout = (TABLEROW *) xmalloc(sizeof(TABLEROW));
currow->prev->prev = NULL;
currow->prev->next = currow;
}
curfield = currow->prev->first =
(TABLEITEM *) malloc(sizeof(TABLEITEM));
(TABLEITEM *) xmalloc(sizeof(TABLEITEM));
*curfield = emptyfield;
curfield->align = *c;
curfield->colspan = maxcol;
@@ -2245,7 +2258,7 @@ scan_request(char *c)
while (de && de->nr != i)
de = de->next;
if (!de) {
de = (STRDEF *) malloc(sizeof(STRDEF));
de = (STRDEF *) xmalloc(sizeof(STRDEF));
de->nr = i;
de->slen = 0;
de->next = strdef;
@@ -2294,7 +2307,7 @@ scan_request(char *c)
if (!de) {
char *h;
de = (STRDEF *) malloc(sizeof(STRDEF));
de = (STRDEF *) xmalloc(sizeof(STRDEF));
de->nr = i;
de->slen = 0;
de->next = strdef;
@@ -2987,7 +3000,7 @@ scan_request(char *c)
while (intd && intd->nr != i)
intd = intd->next;
if (!intd) {
intd = (INTDEF *) malloc(sizeof(INTDEF));
intd = (INTDEF *) xmalloc(sizeof(INTDEF));
intd->nr = i;
intd->val = 0;
intd->incr = 0;
@@ -3060,7 +3073,7 @@ scan_request(char *c)
free(de->st);
de->st = h;
} else {
de = (STRDEF *) malloc(sizeof(STRDEF));
de = (STRDEF *) xmalloc(sizeof(STRDEF));
de->nr = i;
de->next = defdef;
de->st = h;
@@ -3973,6 +3986,7 @@ scan_troff_mandoc(char *c, int san, char **result)
return ret;
}
int
main(int argc, char **argv)
{
FILE *f;
+1 -1
View File
@@ -1,4 +1,4 @@
BUILD_DIR=/usr/local/build/chet/bash/bash-current
BUILD_DIR=/usr/local/build/bash/bash-current
THIS_SH=$BUILD_DIR/bash
PATH=$PATH:$BUILD_DIR
+2 -3
View File
@@ -29,10 +29,9 @@ read LINE <&${REFLECT[0]}
echo $LINE
exec 2>$TMPOUT # catch stray job termination messages
kill $REFLECT_PID
{ sleep 1; kill $REFLECT_PID; } &
wait $REFLECT_PID >$TMPOUT 2>&1 || echo "coproc.tests: REFLECT: status $?"
grep -q 'Terminated.*coproc.*REFLECT' < $TMPOUT || {
grep 'Terminated.*coproc.*REFLECT' < $TMPOUT >/dev/null 2>&1 || {
echo "coproc.tests: wait for REFLECT failed" >&2
}
rm -f $TMPOUT
+21 -3
View File
@@ -434,10 +434,28 @@ argv[3] = <_QUEST>
argv[4] = <_QUILL>
argv[5] = <_QUOTA>
argv[6] = <_QUOTE>
argv[1] = <_QUANTITY>
argv[2] = <_QUART>
argv[3] = <_QUEST>
argv[4] = <_QUILL>
argv[5] = <_QUOTA>
argv[6] = <_QUOTE>
argv[1] = <_QUANTITY-_QUART-_QUEST-_QUILL-_QUOTA-_QUOTE>
./new-exp3.sub: line 19: ${!_Q* }: bad substitution
./new-exp3.sub: line 24: ${!1*}: bad substitution
./new-exp3.sub: line 26: ${!@*}: bad substitution
argv[1] = <_QUANTITY>
argv[2] = <_QUART>
argv[3] = <_QUEST>
argv[4] = <_QUILL>
argv[5] = <_QUOTA>
argv[6] = <_QUOTE>
argv[1] = <_QUANTITY>
argv[2] = <_QUART>
argv[3] = <_QUEST>
argv[4] = <_QUILL>
argv[5] = <_QUOTA>
argv[6] = <_QUOTE>
./new-exp3.sub: line 23: ${!_Q* }: bad substitution
./new-exp3.sub: line 28: ${!1*}: bad substitution
./new-exp3.sub: line 30: ${!@*}: bad substitution
Case01---3---A:B:C---
Case02---1---A B C::---
Case03---3---A:B:C---
+4
View File
@@ -8,12 +8,16 @@ _QUEST=
_QUART=
recho ${!_Q*}
recho ${!_Q@} # compatibility
IFS="-$IFS"
recho ${!_Q*}
recho "${!_Q*}"
recho ${!_Q@}
recho "${!_Q@}"
recho ${!_Y*}
recho "${!_Q* }"
-1
View File
@@ -100,5 +100,4 @@ trap -- 'echo caught a child death' SIGCHLD
trap -- 'echo exiting' EXIT
trap -- 'echo aborting' SIGABRT
trap -- 'echo caught a child death' SIGCHLD
trap -- '' SIGUSR2
exiting
+1
View File
@@ -62,6 +62,7 @@ echo $?
# hmmm...should this set the handling to SIG_IGN for children, too?
trap '' USR2
./trap1.sub
trap - USR2
# test ERR trap
./trap2.sub