commit bash-20190712 snapshot

This commit is contained in:
Chet Ramey
2019-07-15 09:15:15 -04:00
parent ea578790a9
commit e2169ae94e
30 changed files with 8890 additions and 8580 deletions
+6 -5
View File
@@ -576,11 +576,6 @@ rl_expand_prompt (char *prompt)
{
/* The prompt spans multiple lines. */
t = ++p;
local_prompt = expand_prompt (p, PMT_MULTILINE,
&prompt_visible_length,
&prompt_last_invisible,
&prompt_invis_chars_first_line,
&prompt_physical_chars);
c = *t; *t = '\0';
/* The portion of the prompt string up to and including the
final newline is now null-terminated. */
@@ -590,6 +585,12 @@ rl_expand_prompt (char *prompt)
(int *)NULL,
(int *)NULL);
*t = c;
local_prompt = expand_prompt (p, PMT_MULTILINE,
&prompt_visible_length,
&prompt_last_invisible,
&prompt_invis_chars_first_line,
&prompt_physical_chars);
local_prompt_len = local_prompt ? strlen (local_prompt) : 0;
return (prompt_prefix_length);
}
+7 -1
View File
@@ -49,6 +49,10 @@ extern int errno;
# define HUGE_VAL HUGE
#endif
#ifndef locale_decpoint
extern int locale_decpoint PARAMS((void));
#endif
/* Convert NPTR to a double. If ENDPTR is not NULL, a pointer to the
character after the last one used in the number is put in *ENDPTR. */
double
@@ -62,6 +66,7 @@ strtod (nptr, endptr)
/* The number so far. */
double num;
int radixchar;
int got_dot; /* Found a decimal point. */
int got_digit; /* Seen any digits. */
@@ -85,6 +90,7 @@ strtod (nptr, endptr)
if (*s == '-' || *s == '+')
++s;
radixchar = locale_decpoint ();
num = 0.0;
got_dot = 0;
got_digit = 0;
@@ -113,7 +119,7 @@ strtod (nptr, endptr)
if (got_dot)
--exponent;
}
else if (!got_dot && *s == '.')
else if (!got_dot && *s == radixchar)
/* Record that we have found the decimal point. */
got_dot = 1;
else
+10 -1
View File
@@ -97,19 +97,28 @@ utf8_mblen (s, n)
c1 = (unsigned char)s[1];
if (c < 0xe0)
{
if (n == 1)
return -2;
if (n >= 2 && (s[1] ^ 0x80) < 0x40)
return 2;
}
else if (c < 0xf0)
{
if (n <= 2)
return -2;
if (n >= 3
&& (s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40
&& (c >= 0xe1 || c1 >= 0xa0)
&& (c != 0xed || c1 < 0xa0))
return 3;
}
else if (c < 0xf8)
else if (c <= 0xf4)
{
if (n <= 3)
return -2;
if (n >= 4
&& (s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40
&& (s[3] ^ 0x80) < 0x40