]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
commit bash-20060307 snapshot
authorChet Ramey <chet.ramey@case.edu>
Sun, 4 Dec 2011 03:46:14 +0000 (22:46 -0500)
committerChet Ramey <chet.ramey@case.edu>
Sun, 4 Dec 2011 03:46:14 +0000 (22:46 -0500)
14 files changed:
CWRU/CWRU.chlog
CWRU/CWRU.chlog~
NOTES
builtins/Makefile.in
builtins/common.h
builtins/mkbuiltins.c
builtins/pushd.def
builtins/reserved.def
general.c
jobs.c
lib/glob/glob.c
lib/glob/glob.c~
tests/RUN-ONE-TEST
variables.c

index 7e2b422007c4448600b628c89a026a5f8d217ac4..a2ba866eb5ad22e3b5257c5f60514ca2cc641382 100644 (file)
@@ -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
index 68a4e8f699d5f9a510d111593e8656f927195ac3..cd1ee9716a45d97d6f9588bb055ea0bf45d5e42d 100644 (file)
@@ -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
diff --git a/NOTES b/NOTES
index d6e3d813b9040de485dcb1dfbc3fce8f99d9db79..c523752fe72e726c77461bcd780538440018443e 100644 (file)
--- a/NOTES
+++ b/NOTES
@@ -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.
index 486ec6543c91e05f66bfc5c1ee0b8141b286d589..e027f7aaabb76db43ddb8ff711d59b879f7845a1 100644 (file)
@@ -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@
index df303252941d96cd9474ebb6293f8e5af1a7f64f..1233d667a589d7dc5da9155330637be49f86ec1a 100644 (file)
@@ -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));
index 1e7665bcf5857b1fddc93d53966c4389d979ef94..ff0bdc090e44ba036b26dfff3692b34f2d0a6465 100644 (file)
@@ -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, "  \"");
        }
index 19a3ed466cc01dd87c5e4989966bb6dc7721cc8d..86c0bddb50dae47dc0de0974af829a97d1698f43 100644 (file)
@@ -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. */
index 5482f5f362d049af80778bca5dab8a96c892d674..e968ec7cf52931a49c3aa66528401d52f81d6b4b 100644 (file)
@@ -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
index 20160fe96c6c39f72f7d380d8b47ac015c173ffb..20dbd4443ca4be0fa19dd6211f104432ea1b169a 100644 (file)
--- a/general.c
+++ b/general.c
@@ -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);
diff --git a/jobs.c b/jobs.c
index 0e43e9746e9ce7e87dadc8b83fedce9dd0eb76bc..37cb85f4fe0f85cac6810bb0b7f3565227f6cb7a 100644 (file)
--- a/jobs.c
+++ b/jobs.c
@@ -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);
        }
index 5395bcbb288dc537bb8d0d744f50e571e5f7e461..5c564f660b280bfc1158231d009883311d0532b8 100644 (file)
@@ -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;
index f048f99abae38c8c7e0364fd41bd61d68c2a4739..5395bcbb288dc537bb8d0d744f50e571e5f7e461 100644 (file)
@@ -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)
index 72ec06a2c1fd8dde92acea5e8ac773e35f1d061b..3efcf32d68e9722024b6ca9d67f9e81b2aa5ac04 100755 (executable)
@@ -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
 
index e8018f823b46d04f4b980ef371a0c860d500ca59..f9b9de79e31a82dab3044bcd410140bef7743cf8 100644 (file)
@@ -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);