mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-24 22:37:59 +02:00
commit bash-20150220 snapshot
This commit is contained in:
@@ -7999,3 +7999,41 @@ include/posixjmp.h
|
||||
lib/readline/util.c
|
||||
- change calls to longjmp to use _rl_longjmp
|
||||
|
||||
2/18
|
||||
----
|
||||
variables.c
|
||||
- bind_int_variable: make sure `v' is non-null before making it visible
|
||||
|
||||
2/19
|
||||
----
|
||||
arrayfunc.c
|
||||
- assign_array_var_from_word_list: after assignment, mark variable as no
|
||||
longer invisible
|
||||
- assign_array_var_from_string: after assignment, mark variable as no
|
||||
longer invisible
|
||||
|
||||
builtins/declare.def
|
||||
- declare_internal: add warning if an attempt is made to use a quoted
|
||||
compound assignment as an argument to declare (declare -a foo='( 1 2 )');
|
||||
backwards compatible with bash-4.3. Still a tentative change
|
||||
|
||||
2/20
|
||||
----
|
||||
lib/glob/smatch.c
|
||||
- is_wcclass: check malloc() return value, return -1 if it fails
|
||||
Report from Tobias Stoeckmann <tobias@stoeckmann.org>
|
||||
|
||||
lib/sh/shmatch.c
|
||||
- sh_regmatch: check malloc() return value, handle NULL value if it
|
||||
fails. Report from Tobias Stoeckmann <tobias@stoeckmann.org>
|
||||
|
||||
2/22
|
||||
----
|
||||
lib/readline/doc/rltech.texi
|
||||
- rl_callback_handler_install: note that the handler function should
|
||||
free the line it receives, as with readline. Suggested by
|
||||
Ulf Magnusson <ulfalizer@gmail.com>
|
||||
- Readline Signal Handling: note that application needs to clean up
|
||||
readline's terminal state if it wants to handle a signal before
|
||||
the line handler restores it. Suggested by Ulf Magnusson
|
||||
<ulfalizer@gmail.com>
|
||||
|
||||
@@ -407,6 +407,9 @@ assign_array_var_from_word_list (var, list, flags)
|
||||
(*var->assign_func) (var, l->word->word, i, 0);
|
||||
else
|
||||
array_insert (a, i, l->word->word);
|
||||
|
||||
VUNSETATTR (var, att_invisible); /* no longer invisible */
|
||||
|
||||
return var;
|
||||
}
|
||||
|
||||
@@ -639,6 +642,10 @@ assign_array_var_from_string (var, value, flags)
|
||||
|
||||
if (nlist)
|
||||
dispose_words (nlist);
|
||||
|
||||
if (var)
|
||||
VUNSETATTR (var, att_invisible); /* no longer invisible */
|
||||
|
||||
return (var);
|
||||
}
|
||||
|
||||
|
||||
@@ -567,11 +567,13 @@ declare_internal (list, local_var)
|
||||
int vlen;
|
||||
vlen = STRLEN (value);
|
||||
/*itrace("declare_builtin: name = %s value = %s flags = %d", name, value, wflags);*/
|
||||
#if 0 /* bash-4.4 */
|
||||
if (value[0] == '(' && value[vlen-1] == ')' && (shell_compatibility_level <= 43 || (wflags & W_COMPASSIGN)))
|
||||
#else
|
||||
if (array_exists == 0 && value[0] == '(' && value[vlen-1] == ')')
|
||||
#endif
|
||||
if (shell_compatibility_level > 43 && (wflags & W_COMPASSIGN) == 0 &&
|
||||
value[0] == '(' && value[vlen-1] == ')')
|
||||
{
|
||||
internal_warning (_("%s: quoted compound array assignment deprecated"), list->word->word);
|
||||
compound_array_assign = 1;
|
||||
}
|
||||
else if (value[0] == '(' && value[vlen-1] == ')' && (shell_compatibility_level < 44 || (wflags & W_COMPASSIGN)))
|
||||
compound_array_assign = 1;
|
||||
else
|
||||
simple_array_assign = 1;
|
||||
|
||||
@@ -334,6 +334,8 @@ is_wcclass (wc, name)
|
||||
|
||||
memset (&state, '\0', sizeof (mbstate_t));
|
||||
mbs = (char *) malloc (wcslen(name) * MB_CUR_MAX + 1);
|
||||
if (mbs == 0)
|
||||
return -1;
|
||||
mbslength = wcsrtombs (mbs, (const wchar_t **)&name, (wcslen(name) * MB_CUR_MAX + 1), &state);
|
||||
|
||||
if (mbslength == (size_t)-1 || mbslength == (size_t)-2)
|
||||
|
||||
@@ -1307,6 +1307,8 @@ expanded value of @var{prompt}. Save the value of @var{lhandler} to
|
||||
use as a handler function to call when a complete line of input has been
|
||||
entered.
|
||||
The handler function receives the text of the line as an argument.
|
||||
As with @code{readline()}, the handler function should @code{free} the
|
||||
line when it it finished with it.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void rl_callback_read_char (void)
|
||||
@@ -1532,7 +1534,14 @@ resetting the terminal to its original state. If the application's signal
|
||||
handler does more than update its idea of the terminal size and return (for
|
||||
example, a @code{longjmp} back to a main processing loop), it @emph{must}
|
||||
call @code{rl_cleanup_after_signal()} (described below), to restore the
|
||||
terminal state.
|
||||
terminal state.
|
||||
|
||||
When an application is using the callback interface
|
||||
(@pxref{Alternate Interface}), Readline installs signal handlers only for
|
||||
the duration of the call to @code{rl_callback_read_char}. Applications
|
||||
using the callback interface should be prepared to clean up Readline's
|
||||
state if they wish to handle the signal before the line handler completes
|
||||
and restores the terminal state.
|
||||
|
||||
Readline provides two variables that allow application writers to
|
||||
control whether or not it will catch certain signals and act on them
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
@ignore
|
||||
Copyright (C) 1988-2014 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2015 Free Software Foundation, Inc.
|
||||
@end ignore
|
||||
|
||||
@set EDITION 6.3
|
||||
@set VERSION 6.3
|
||||
@set UPDATED 21 November 2014
|
||||
@set UPDATED-MONTH November 2014
|
||||
@set EDITION 6.4
|
||||
@set VERSION 6.4
|
||||
@set UPDATED 22 February 2015
|
||||
@set UPDATED-MONTH February 2015
|
||||
|
||||
@set LASTCHANGE Fri Nov 21 08:07:14 EST 2014
|
||||
@set LASTCHANGE Sun Feb 22 20:32:36 EST 2015
|
||||
|
||||
+4
-3
@@ -2,7 +2,7 @@
|
||||
* shmatch.c -- shell interface to posix regular expression matching.
|
||||
*/
|
||||
|
||||
/* Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2003-2015 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -79,7 +79,8 @@ sh_regmatch (string, pattern, flags)
|
||||
matches = NULL;
|
||||
#endif
|
||||
|
||||
if (regexec (®ex, string, regex.re_nsub + 1, matches, 0))
|
||||
/* man regexec: NULL PMATCH ignored if NMATCH == 0 */
|
||||
if (regexec (®ex, string, matches ? regex.re_nsub + 1 : 0, matches, 0))
|
||||
result = EXECUTION_FAILURE;
|
||||
else
|
||||
result = EXECUTION_SUCCESS; /* match */
|
||||
@@ -95,7 +96,7 @@ sh_regmatch (string, pattern, flags)
|
||||
rematch = make_new_array_variable ("BASH_REMATCH");
|
||||
amatch = array_cell (rematch);
|
||||
|
||||
if ((flags & SHMAT_SUBEXP) && result == EXECUTION_SUCCESS && subexp_str)
|
||||
if (matches && (flags & SHMAT_SUBEXP) && result == EXECUTION_SUCCESS && subexp_str)
|
||||
{
|
||||
for (subexp_ind = 0; subexp_ind <= regex.re_nsub; subexp_ind++)
|
||||
{
|
||||
|
||||
+6
-4
@@ -2872,10 +2872,12 @@ bind_int_variable (lhs, rhs)
|
||||
#endif
|
||||
v = bind_variable (lhs, rhs, 0);
|
||||
|
||||
if (v && isint)
|
||||
VSETATTR (v, att_integer);
|
||||
|
||||
VUNSETATTR (v, att_invisible);
|
||||
if (v)
|
||||
{
|
||||
if (isint)
|
||||
VSETATTR (v, att_integer);
|
||||
VUNSETATTR (v, att_invisible);
|
||||
}
|
||||
|
||||
return (v);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user