commit bash-20150306 snapshot

This commit is contained in:
Chet Ramey
2015-03-09 11:12:00 -04:00
parent 8a0829e94a
commit 2171061f5f
22 changed files with 470 additions and 377 deletions
+10 -2
View File
@@ -755,7 +755,7 @@ rl_redisplay ()
contents of the command line? */
while (lpos >= _rl_screenwidth)
{
int z;
int z, p;
/* fix from Darin Johnson <darin@acuson.com> for prompt string with
invisible characters that is longer than the screen width. The
prompt_invis_chars_first_line variable could be made into an array
@@ -777,7 +777,15 @@ rl_redisplay ()
break;
}
else if (z == _rl_screenwidth)
break;
{
/* If we are in the middle or at the end of a multibyte
character, we want to move to the start, then find out
where it ends so we know where to insert the newline.
If this isn't a multibyte character, its the same as num++ */
p = _rl_find_prev_mbchar (local_prompt, num, MB_FIND_ANY);
num = _rl_find_next_mbchar (local_prompt, p, 1, MB_FIND_ANY);
break;
}
num++;
}
temp = num;
+17 -3
View File
@@ -215,13 +215,23 @@ _rl_handle_signal (sig)
rl_free_line_state ();
/* FALLTHROUGH */
case SIGTERM:
case SIGHUP:
#if defined (SIGTSTP)
case SIGTSTP:
case SIGTTOU:
case SIGTTIN:
# if defined (HAVE_POSIX_SIGNALS)
/* Block SIGTTOU so we can restore the terminal settings to something
sane without stopping on SIGTTOU if we have been placed into the
background. Even trying to get the current terminal pgrp with
tcgetpgrp() will generate SIGTTOU, so we don't bother. Don't bother
doing this if we've been stopped on SIGTTOU; it's aready too late. */
sigemptyset (&set);
sigaddset (&set, SIGTTOU);
sigprocmask (SIG_BLOCK, &set, (sigset_t *)NULL);
# endif
case SIGTTOU:
#endif /* SIGTSTP */
case SIGTERM:
case SIGHUP:
#if defined (SIGALRM)
case SIGALRM:
#endif
@@ -232,6 +242,10 @@ _rl_handle_signal (sig)
rl_cleanup_after_signal ();
#if defined (HAVE_POSIX_SIGNALS)
/* Unblock SIGTTOU blocked above */
if (sig == SIGTTIN || sig == SIGTSTP)
sigprocmask (SIG_UNBLOCK, &set, (sigset_t *)NULL);
sigemptyset (&set);
sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &set);
sigdelset (&set, sig);
+1 -1
View File
@@ -253,7 +253,7 @@ sh_backslash_quote (string, table, flags)
continue;
}
#endif
if (backslash_table[c] == 1)
if (backslash_table[(unsigned char)c] == 1)
*r++ = '\\';
else if (c == '#' && s == string) /* comment char */
*r++ = '\\';