mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-28 07:59:50 +02:00
commit bash-20060307 snapshot
This commit is contained in:
@@ -13150,3 +13150,44 @@ parse.y
|
||||
${...} constructs inside ``
|
||||
- in parse_matched_pair, remove special code that recursively parses
|
||||
quoted strings inside `` constructs. For Bourne shell compatibility
|
||||
|
||||
3/6
|
||||
---
|
||||
builtins/pushd.def
|
||||
- let get_directory_stack take take an `int flags' argument and convert
|
||||
$HOME to ~ if flags&1 is non-zero
|
||||
|
||||
builtins/common.h
|
||||
- change extern declaration for get_directory_stack
|
||||
|
||||
variables.c
|
||||
- call get_directory_stack with an arg of 0 to inhibit converting
|
||||
$HOME to ~ in the result. Fixes cd ${DIRSTACK[1]} problem
|
||||
reported by Len Lattanzi <llattanzi@apple.com> (cd fails because
|
||||
the tildes won't be expanded after variable expansion)
|
||||
|
||||
jobs.c
|
||||
- changed hangup_all_jobs slightly so stopped jobs marked J_NOHUP
|
||||
won't get a SIGCONT
|
||||
|
||||
general.c
|
||||
- changed check_binary_file() to check for a NUL byte instead of a
|
||||
non-printable character. Might at some point want to check
|
||||
entire (possibly multibyte) characters instead of just bytes. Hint
|
||||
from ksh via David Korn
|
||||
|
||||
3/7
|
||||
---
|
||||
builtins/reserved.def
|
||||
- changed runs of spaces to tabs in variables help text to make
|
||||
indentation better when displayed
|
||||
|
||||
builtins/mkbuiltins.c
|
||||
- changes to avoid the annoying extra space that keeps gettext from
|
||||
being passed an empty string
|
||||
|
||||
3/9
|
||||
---
|
||||
lib/glob/glob.c
|
||||
- make sure globbing is interrupted if the shell receives a terminating
|
||||
signal
|
||||
|
||||
+39
-5
@@ -13140,14 +13140,48 @@ lib/glob/glob.c
|
||||
3/5
|
||||
---
|
||||
trap.c
|
||||
- change `||' to `&&' and make the DEBUG, ERR, and RETURN traps
|
||||
inherited when the appropriate shell options are set, not just when
|
||||
the shell is in debugging mode and the appropriate options are set.
|
||||
This matches the documentation.
|
||||
Reported by Philip Susi <psusi@cfl.rr.com>
|
||||
- inheritance of the DEBUG, RETURN, and ERR traps is now dependent
|
||||
only on the `functrace' and `errtrace' shell options, as the
|
||||
documentation says, rather than on whether or not the shell is in
|
||||
debugging mode. Reported by Philip Susi <psusi@cfl.rr.com>
|
||||
|
||||
parse.y
|
||||
- in parse_matched_pair, don't recursively parse ${...} or other
|
||||
${...} constructs inside ``
|
||||
- in parse_matched_pair, remove special code that recursively parses
|
||||
quoted strings inside `` constructs. For Bourne shell compatibility
|
||||
|
||||
3/6
|
||||
---
|
||||
builtins/pushd.def
|
||||
- let get_directory_stack take take an `int flags' argument and convert
|
||||
$HOME to ~ if flags&1 is non-zero
|
||||
|
||||
builtins/common.h
|
||||
- change extern declaration for get_directory_stack
|
||||
|
||||
variables.c
|
||||
- call get_directory_stack with an arg of 0 to inhibit converting
|
||||
$HOME to ~ in the result. Fixes cd ${DIRSTACK[1]} problem
|
||||
reported by Len Lattanzi <llattanzi@apple.com> (cd fails because
|
||||
the tildes won't be expanded after variable expansion)
|
||||
|
||||
jobs.c
|
||||
- changed hangup_all_jobs slightly so stopped jobs marked J_NOHUP
|
||||
won't get a SIGCONT
|
||||
|
||||
general.c
|
||||
- changed check_binary_file() to check for a NUL byte instead of a
|
||||
non-printable character. Might at some point want to check
|
||||
entire (possibly multibyte) characters instead of just bytes. Hint
|
||||
from ksh via David Korn
|
||||
|
||||
3/7
|
||||
---
|
||||
builtins/reserved.def
|
||||
- changed runs of spaces to tabs in variables help text to make
|
||||
indentation better when displayed
|
||||
|
||||
builtins/mkbuiltins.c
|
||||
- changes to avoid the annoying extra space that keeps gettext from
|
||||
being passed an empty string
|
||||
|
||||
@@ -327,3 +327,7 @@ Platform-Specific Configuration and Operation Notes
|
||||
|
||||
16. Configure --disable-multibyte on NetBSD versions (1.4 through at least
|
||||
1.6.1) that include wctype.h but do not define wctype_t.
|
||||
|
||||
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.
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
||||
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE = @PACKAGE_NAME@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
|
||||
+1
-1
@@ -149,7 +149,7 @@ extern void set_var_attribute __P((char *, int, int));
|
||||
extern char *get_dirstack_from_string __P((char *));
|
||||
extern char *get_dirstack_element __P((intmax_t, int));
|
||||
extern void set_dirstack_element __P((intmax_t, int, char *));
|
||||
extern WORD_LIST *get_directory_stack __P((void));
|
||||
extern WORD_LIST *get_directory_stack __P((int));
|
||||
|
||||
/* Functions from evalstring.c */
|
||||
extern int parse_and_execute __P((char *, const char *, int));
|
||||
|
||||
+13
-3
@@ -1369,7 +1369,7 @@ write_documentation (stream, documentation, indentation, flags)
|
||||
register char *line;
|
||||
int string_array, texinfo, base_indent, last_cpp, filename_p;
|
||||
|
||||
if (!stream)
|
||||
if (stream == 0)
|
||||
return;
|
||||
|
||||
string_array = flags & STRING_ARRAY;
|
||||
@@ -1381,7 +1381,12 @@ write_documentation (stream, documentation, indentation, flags)
|
||||
if (single_longdoc_strings)
|
||||
{
|
||||
if (filename_p == 0)
|
||||
fprintf (stream, "N_(\" "); /* the empty string translates specially. */
|
||||
{
|
||||
if (documentation && documentation[0] && documentation[0][0])
|
||||
fprintf (stream, "N_(\"");
|
||||
else
|
||||
fprintf (stream, "N_(\" "); /* the empty string translates specially. */
|
||||
}
|
||||
else
|
||||
fprintf (stream, "\"");
|
||||
}
|
||||
@@ -1407,7 +1412,12 @@ write_documentation (stream, documentation, indentation, flags)
|
||||
if (string_array && single_longdoc_strings == 0)
|
||||
{
|
||||
if (filename_p == 0)
|
||||
fprintf (stream, " N_(\" "); /* the empty string translates specially. */
|
||||
{
|
||||
if (line[0])
|
||||
fprintf (stream, " N_(\"");
|
||||
else
|
||||
fprintf (stream, " N_(\" "); /* the empty string translates specially. */
|
||||
}
|
||||
else
|
||||
fprintf (stream, " \"");
|
||||
}
|
||||
|
||||
+4
-2
@@ -620,7 +620,8 @@ set_dirstack_element (ind, sign, value)
|
||||
}
|
||||
|
||||
WORD_LIST *
|
||||
get_directory_stack ()
|
||||
get_directory_stack (flags)
|
||||
int flags;
|
||||
{
|
||||
register int i;
|
||||
WORD_LIST *ret;
|
||||
@@ -628,7 +629,8 @@ get_directory_stack ()
|
||||
|
||||
for (ret = (WORD_LIST *)NULL, i = 0; i < directory_list_offset; i++)
|
||||
{
|
||||
d = polite_directory_format (pushd_directory_list[i]);
|
||||
d = (flags&1) ? polite_directory_format (pushd_directory_list[i])
|
||||
: pushd_directory_list[i];
|
||||
ret = make_word_list (make_word (d), ret);
|
||||
}
|
||||
/* Now the current directory. */
|
||||
|
||||
+17
-17
@@ -2,7 +2,7 @@ This file is reserved.def, in which the shell reserved words are defined.
|
||||
It has no direct C file production, but defines builtins for the Bash
|
||||
builtin help command.
|
||||
|
||||
Copyright (C) 1987-2005 Free Software Foundation, Inc.
|
||||
Copyright (C) 1987-2006 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -146,21 +146,21 @@ $END
|
||||
$BUILTIN variables
|
||||
$DOCNAME variable_help
|
||||
$SHORT_DOC variables - Some variable names and meanings
|
||||
BASH_VERSION Version information for this Bash.
|
||||
CDPATH A colon-separated list of directories to search
|
||||
BASH_VERSION Version information for this Bash.
|
||||
CDPATH A colon-separated list of directories to search
|
||||
for directries given as arguments to `cd'.
|
||||
GLOBIGNORE A colon-separated list of patterns describing filenames to
|
||||
be ignored by pathname expansion.
|
||||
#if defined (HISTORY)
|
||||
HISTFILE The name of the file where your command history is stored.
|
||||
HISTFILESIZE The maximum number of lines this file can contain.
|
||||
HISTSIZE The maximum number of history lines that a running
|
||||
HISTFILE The name of the file where your command history is stored.
|
||||
HISTFILESIZE The maximum number of lines this file can contain.
|
||||
HISTSIZE The maximum number of history lines that a running
|
||||
shell can access.
|
||||
#endif /* HISTORY */
|
||||
HOME The complete pathname to your login directory.
|
||||
HOME The complete pathname to your login directory.
|
||||
HOSTNAME The name of the current host.
|
||||
HOSTTYPE The type of CPU this version of Bash is running under.
|
||||
IGNOREEOF Controls the action of the shell on receipt of an EOF
|
||||
HOSTTYPE The type of CPU this version of Bash is running under.
|
||||
IGNOREEOF Controls the action of the shell on receipt of an EOF
|
||||
character as the sole input. If set, then the value
|
||||
of it is the number of EOF characters that can be seen
|
||||
in a row on an empty line before the shell will exit
|
||||
@@ -169,19 +169,19 @@ MACHTYPE A string describing the current system Bash is running on.
|
||||
MAILCHECK How often, in seconds, Bash checks for new mail.
|
||||
MAILPATH A colon-separated list of filenames which Bash checks
|
||||
for new mail.
|
||||
OSTYPE The version of Unix this version of Bash is running on.
|
||||
PATH A colon-separated list of directories to search when
|
||||
OSTYPE The version of Unix this version of Bash is running on.
|
||||
PATH A colon-separated list of directories to search when
|
||||
looking for commands.
|
||||
PROMPT_COMMAND A command to be executed before the printing of each
|
||||
PROMPT_COMMAND A command to be executed before the printing of each
|
||||
primary prompt.
|
||||
PS1 The primary prompt string.
|
||||
PS2 The secondary prompt string.
|
||||
PS1 The primary prompt string.
|
||||
PS2 The secondary prompt string.
|
||||
PWD The full pathname of the current directory.
|
||||
SHELLOPTS A colon-separated list of enabled shell options.
|
||||
TERM The name of the current terminal type.
|
||||
TERM The name of the current terminal type.
|
||||
TIMEFORMAT The output format for timing statistics displayed by the
|
||||
`time' reserved word.
|
||||
auto_resume Non-null means a command word appearing on a line by
|
||||
auto_resume Non-null means a command word appearing on a line by
|
||||
itself is first looked for in the list of currently
|
||||
stopped jobs. If found there, that job is foregrounded.
|
||||
A value of `exact' means that the command word must
|
||||
@@ -191,7 +191,7 @@ auto_resume Non-null means a command word appearing on a line by
|
||||
the command must be a prefix of a stopped job.
|
||||
#if defined (HISTORY)
|
||||
# if defined (BANG_HISTORY)
|
||||
histchars Characters controlling history expansion and quick
|
||||
histchars Characters controlling history expansion and quick
|
||||
substitution. The first character is the history
|
||||
substitution character, usually `!'. The second is
|
||||
the `quick substitution' character, usually `^'. The
|
||||
|
||||
@@ -477,8 +477,13 @@ check_binary_file (sample, sample_len)
|
||||
if (c == '\n')
|
||||
return (0);
|
||||
|
||||
#if 0
|
||||
if (ISSPACE (c) == 0 && ISPRINT (c) == 0)
|
||||
#else
|
||||
if (c == '\0')
|
||||
#endif
|
||||
return (1);
|
||||
|
||||
}
|
||||
|
||||
return (0);
|
||||
|
||||
@@ -1230,8 +1230,9 @@ hangup_all_jobs ()
|
||||
{
|
||||
if (jobs[i])
|
||||
{
|
||||
if ((jobs[i]->flags & J_NOHUP) == 0)
|
||||
killpg (jobs[i]->pgrp, SIGHUP);
|
||||
if (jobs[i]->flags & J_NOHUP)
|
||||
continue;
|
||||
killpg (jobs[i]->pgrp, SIGHUP);
|
||||
if (STOPPED (i))
|
||||
killpg (jobs[i]->pgrp, SIGCONT);
|
||||
}
|
||||
|
||||
+1
-1
@@ -470,7 +470,7 @@ glob_vector (pat, dir, flags)
|
||||
while (1)
|
||||
{
|
||||
/* Make globbing interruptible in the shell. */
|
||||
if (interrupt_state)
|
||||
if (interrupt_state || terminating_signal)
|
||||
{
|
||||
lose = 1;
|
||||
break;
|
||||
|
||||
@@ -508,10 +508,7 @@ glob_vector (pat, dir, flags)
|
||||
{
|
||||
nextlink = (struct globval *) malloc (sizeof (struct globval));
|
||||
if (firstmalloc == 0)
|
||||
{
|
||||
firstmalloc = nextlink;
|
||||
itrace("glob_vector: switching from alloca to malloc for nextlink: count = %d", count);
|
||||
}
|
||||
}
|
||||
nextname = (char *) malloc (D_NAMLEN (dp) + 1);
|
||||
if (nextlink == 0 || nextname == 0)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
BUILD_DIR=/usr/local/build/bash/bash-current
|
||||
BUILD_DIR=/usr/local/build/chet/bash/bash-current
|
||||
THIS_SH=$BUILD_DIR/bash
|
||||
PATH=$PATH:$BUILD_DIR
|
||||
|
||||
|
||||
+1
-1
@@ -1359,7 +1359,7 @@ get_dirstack (self)
|
||||
ARRAY *a;
|
||||
WORD_LIST *l;
|
||||
|
||||
l = get_directory_stack ();
|
||||
l = get_directory_stack (0);
|
||||
a = array_from_word_list (l);
|
||||
array_dispose (array_cell (self));
|
||||
dispose_words (l);
|
||||
|
||||
Reference in New Issue
Block a user