From 0f445e6cd220589a18daaf571fb2ad2b0014209b Mon Sep 17 00:00:00 2001 From: Chet Ramey Date: Sat, 3 Dec 2011 13:47:46 -0500 Subject: [PATCH] commit bash-20050623 snapshot --- CWRU/CWRU.chlog | 16 ++++++++++++++++ bashhist.c | 2 ++ bashline.c | 8 +++++++- doc/bash.1 | 2 +- doc/bashref.texi | 41 +++-------------------------------------- doc/version.texi | 2 +- variables.c | 4 ++++ 7 files changed, 34 insertions(+), 41 deletions(-) diff --git a/CWRU/CWRU.chlog b/CWRU/CWRU.chlog index 5c758cf81..845f09fad 100644 --- a/CWRU/CWRU.chlog +++ b/CWRU/CWRU.chlog @@ -11609,3 +11609,19 @@ jobs.c - add a run-time check for WCONTINUED being defined in header files but rejected with EINVAL by waitpid(). Fix from Maciej Rozycki + + 6/20 + ---- +bashhist.c + - make sure calls to sv_histchars are protected by #ifdef BANG_HISTORY + - ditto for calls to history_expand_line_internal + + 6/23 + ---- +doc/bashref.texi + - remove extra blank lines in @menu constructs + +variables.c + - assign export_env to environ (extern char **) every time it changes + (mostly in add_to_export_env define), so maybe getenv will work on + systems that don't allow it to be replaced diff --git a/bashhist.c b/bashhist.c index a271567cf..73637dc14 100644 --- a/bashhist.c +++ b/bashhist.c @@ -217,7 +217,9 @@ bash_initialize_history () history_quotes_inhibit_expansion = 1; history_search_delimiter_chars = ";&()|<>"; history_inhibit_expansion_function = bash_history_inhibit_expansion; +#if defined (BANG_HISTORY) sv_histchars ("histchars"); +#endif } void diff --git a/bashline.c b/bashline.c index 8fed8a363..ebe2304d9 100644 --- a/bashline.c +++ b/bashline.c @@ -1905,7 +1905,7 @@ tcsh_magic_space (count, ignore) else return (1); } -#endif +#endif /* BANG_HISTORY */ /* History and alias expand the line. */ static int @@ -1914,7 +1914,10 @@ history_and_alias_expand_line (count, ignore) { char *new_line; + new_line = 0; +#if defined (BANG_HISTORY) new_line = history_expand_line_internal (rl_line_buffer); +#endif #if defined (ALIAS) if (new_line) @@ -1950,7 +1953,10 @@ shell_expand_line (count, ignore) char *new_line; WORD_LIST *expanded_string; + new_line = 0; +#if defined (BANG_HISTORY) new_line = history_expand_line_internal (rl_line_buffer); +#endif #if defined (ALIAS) if (new_line) diff --git a/doc/bash.1 b/doc/bash.1 index 1c6562ac0..8c9f6045f 100644 --- a/doc/bash.1 +++ b/doc/bash.1 @@ -7456,7 +7456,7 @@ input is not read within \fItimeout\fP seconds. This option has no effect if \fBread\fP is not reading input from the terminal or a pipe. .TP -.B \-u \fIfd\FP +.B \-u \fIfd\fP Read input from file descriptor \fIfd\fP. .PD .PP diff --git a/doc/bashref.texi b/doc/bashref.texi index c74c2b827..401bc6682 100644 --- a/doc/bashref.texi +++ b/doc/bashref.texi @@ -94,46 +94,28 @@ reference on shell behavior. @menu * Introduction:: An introduction to the shell. - * Definitions:: Some definitions used in the rest of this manual. - * Basic Shell Features:: The shell "building blocks". - * Shell Builtin Commands:: Commands that are a part of the shell. - * Shell Variables:: Variables used or set by Bash. - * Bash Features:: Features found only in Bash. - -* Job Control:: A chapter describing what job control is - and how Bash allows you to use it. - -* Using History Interactively:: Chapter dealing with history expansion - rules. - +* Job Control:: What job control is and how Bash allows you + to use it. +* Using History Interactively:: Command History Expansion * Command Line Editing:: Chapter describing the command line editing features. - * Installing Bash:: How to build and install Bash on your system. - * Reporting Bugs:: How to report bugs in Bash. - * Major Differences From The Bourne Shell:: A terse list of the differences between Bash and historical versions of /bin/sh. - * Copying This Manual:: Copying this manual. - * Builtin Index:: Index of Bash builtin commands. - * Reserved Word Index:: Index of Bash reserved words. - * Variable Index:: Quick reference helps you find the variable you want. - * Function Index:: Index of bindable Readline functions. - * Concept Index:: General index for concepts described in this manual. @end menu @@ -143,7 +125,6 @@ reference on shell behavior. @chapter Introduction @menu * What is Bash?:: A short description of Bash. - * What is a shell?:: A brief introduction to shells. @end menu @@ -371,9 +352,7 @@ and to named files, and how the shell executes commands. @section Shell Syntax @menu * Shell Operation:: The basic operation of the shell. - * Quoting:: How to remove the special meaning from characters. - * Comments:: How to specify comments. @end menu @@ -444,7 +423,6 @@ status (@pxref{Exit Status}). * Double Quotes:: How to suppress most of the interpretation of a sequence of characters. * ANSI-C Quoting:: How to expand ANSI-C sequences in quoted strings. - * Locale Translation:: How to translate strings into different languages. @end menu @@ -2227,21 +2205,15 @@ is not specified. If the file does not exist, it is created. @menu * Simple Command Expansion:: How Bash expands simple commands before executing them. - * Command Search and Execution:: How Bash finds commands and runs them. - * Command Execution Environment:: The environment in which Bash executes commands that are not shell builtins. - * Environment:: The environment given to a command. - * Exit Status:: The status returned by commands and how Bash interprets it. - * Signals:: What happens when Bash or a command it runs receives a signal. - @end menu @node Simple Command Expansion @@ -6414,23 +6386,16 @@ Other independent ports exist for @menu * Basic Installation:: Installation instructions. - * Compilers and Options:: How to set special options for various systems. - * Compiling For Multiple Architectures:: How to compile Bash for more than one kind of system from the same source tree. - * Installation Names:: How to set the various paths used by the installation. - * Specifying the System Type:: How to configure Bash for a particular system. - * Sharing Defaults:: How to share default configuration values among GNU programs. - * Operation Controls:: Options recognized by the configuration program. - * Optional Features:: How to enable and disable optional features when building Bash. @end menu diff --git a/doc/version.texi b/doc/version.texi index 84ff83a4b..292eee56c 100644 --- a/doc/version.texi +++ b/doc/version.texi @@ -2,7 +2,7 @@ Copyright (C) 1988-2005 Free Software Foundation, Inc. @end ignore -@set LASTCHANGE Sat Apr 30 19:08:57 EDT 2005 +@set LASTCHANGE Thu Jun 23 09:48:04 EDT 2005 @set EDITION 3.1-devel @set VERSION 3.1-devel diff --git a/variables.c b/variables.c index 375556c1c..2a58a14f8 100644 --- a/variables.c +++ b/variables.c @@ -70,6 +70,8 @@ #define ifsname(s) ((s)[0] == 'I' && (s)[1] == 'F' && (s)[2] == 'S' && (s)[3] == '\0') +extern char **environ; + /* Variables used here and defined in other files. */ extern int posixly_correct; extern int line_number; @@ -3134,6 +3136,7 @@ do \ { \ export_env_size += 16; \ export_env = strvec_resize (export_env, export_env_size); \ + environ = export_env; \ } \ export_env[export_env_index++] = (do_alloc) ? savestring (envstr) : envstr; \ export_env[export_env_index] = (char *)NULL; \ @@ -3243,6 +3246,7 @@ maybe_make_export_env () { export_env_size = new_size; export_env = strvec_resize (export_env, export_env_size); + environ = export_env; } export_env[export_env_index = 0] = (char *)NULL; -- 2.47.3