mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-28 16:09:51 +02:00
commit bash-20170915 snapshot
This commit is contained in:
@@ -14301,3 +14301,11 @@ execute_cmd.c
|
||||
(source/eval/unset) not run by the command builtin
|
||||
(flags & CMD_COMMAND_BUILTIN == 0). Fixes bug reported by
|
||||
Martijn Dekker <martijn@inlv.org>
|
||||
|
||||
9/17
|
||||
----
|
||||
builtins/printf.def
|
||||
- asciicode: don't use mblen to check whether or not a character is a
|
||||
valid multibyte character; use mbtowc right away and then inspect
|
||||
the return value. Fixes bug reported by Stephane Chazelas
|
||||
<stephane.chazelas@gmail.com>
|
||||
|
||||
+6
-7
@@ -1245,18 +1245,17 @@ asciicode ()
|
||||
register intmax_t ch;
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
wchar_t wc;
|
||||
size_t mblength, slen;
|
||||
size_t slen;
|
||||
int mblength;
|
||||
#endif
|
||||
DECLARE_MBSTATE;
|
||||
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
slen = strlen (garglist->word->word+1);
|
||||
mblength = MBLEN (garglist->word->word+1, slen);
|
||||
if (mblength > 1)
|
||||
{
|
||||
mblength = mbtowc (&wc, garglist->word->word+1, slen);
|
||||
ch = wc; /* XXX */
|
||||
}
|
||||
wc = 0;
|
||||
mblength = mbtowc (&wc, garglist->word->word+1, slen);
|
||||
if (mblength > 0)
|
||||
ch = wc; /* XXX */
|
||||
else
|
||||
#endif
|
||||
ch = (unsigned char)garglist->word->word[1];
|
||||
|
||||
+3
-1
@@ -6945,7 +6945,9 @@ arguments to a previous command into the current input line, or
|
||||
fix errors in previous commands quickly.
|
||||
.PP
|
||||
History expansion is performed immediately after a complete line
|
||||
is read, before the shell breaks it into words.
|
||||
is read, before the shell breaks it into words, and is performed
|
||||
on each line individually without taking quoting on previous lines into
|
||||
account.
|
||||
It takes place in two parts.
|
||||
The first is to determine which line from the history list
|
||||
to use during substitution.
|
||||
|
||||
@@ -255,7 +255,9 @@ fix errors in previous commands quickly.
|
||||
|
||||
@ifset BashFeatures
|
||||
History expansion is performed immediately after a complete line
|
||||
is read, before the shell breaks it into words.
|
||||
is read, before the shell breaks it into words, and is performed
|
||||
on each line individually without taking quoting on previous lines into
|
||||
account.
|
||||
@end ifset
|
||||
|
||||
History expansion takes place in two parts. The first is to determine
|
||||
|
||||
@@ -230,8 +230,6 @@ ansic_quote (str, flags, rlen)
|
||||
*r++ = '$';
|
||||
*r++ = '\'';
|
||||
|
||||
s = str;
|
||||
|
||||
for (s = str; c = *s; s++)
|
||||
{
|
||||
b = l = 1; /* 1 == add backslash; 0 == no backslash */
|
||||
@@ -305,11 +303,9 @@ ansic_wshouldquote (string)
|
||||
{
|
||||
const wchar_t *wcs;
|
||||
wchar_t wcc;
|
||||
|
||||
wchar_t *wcstr = NULL;
|
||||
size_t slen;
|
||||
|
||||
|
||||
slen = mbstowcs (wcstr, string, 0);
|
||||
|
||||
if (slen == (size_t)-1)
|
||||
|
||||
Reference in New Issue
Block a user