mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-13 07:00:49 +02:00
commit bash-20161104 snapshot
This commit is contained in:
@@ -103,6 +103,9 @@ fprintf(stderr, "gmatch: pattern = %s; pe = %s\n", pattern, pe);
|
||||
break;
|
||||
|
||||
case L('\\'): /* backslash escape removes special meaning */
|
||||
if (p == pe && sc == '\\' && (n+1 == se))
|
||||
break;
|
||||
|
||||
if (p == pe)
|
||||
return FNM_NOMATCH;
|
||||
|
||||
|
||||
+5
-1
@@ -81,7 +81,7 @@
|
||||
#else
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/* Define getpagesize () if the system does not. */
|
||||
@@ -246,6 +246,10 @@ static const unsigned long binsizes[NBUCKETS] = {
|
||||
/* binsizes[x] == (1 << ((x) + 3)) */
|
||||
#define binsize(x) binsizes[(x)]
|
||||
|
||||
#if !defined (errno)
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
/* Declarations for internal functions */
|
||||
static PTR_T internal_malloc __P((size_t, const char *, int, int));
|
||||
static PTR_T internal_realloc __P((PTR_T, size_t, const char *, int, int));
|
||||
|
||||
+18
-1
@@ -100,7 +100,10 @@ _rl_with_macro_input (string)
|
||||
return;
|
||||
}
|
||||
|
||||
_rl_push_executing_macro ();
|
||||
#if 0
|
||||
if (rl_executing_macro) /* XXX - later */
|
||||
#endif
|
||||
_rl_push_executing_macro ();
|
||||
rl_executing_macro = string;
|
||||
executing_macro_index = 0;
|
||||
RL_SETSTATE(RL_STATE_MACROINPUT);
|
||||
@@ -128,10 +131,24 @@ _rl_next_macro_key ()
|
||||
_rl_pop_executing_macro ();
|
||||
return c;
|
||||
#else
|
||||
/* XXX - consider doing the same as the callback code, just not testing
|
||||
whether we're running in callback mode */
|
||||
return (rl_executing_macro[executing_macro_index++]);
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
_rl_peek_macro_key ()
|
||||
{
|
||||
if (rl_executing_macro == 0)
|
||||
return (0);
|
||||
if (rl_executing_macro[executing_macro_index] == 0 && (macro_list == 0 || macro_list->string == 0))
|
||||
return (0);
|
||||
if (rl_executing_macro[executing_macro_index] == 0 && macro_list && macro_list->string)
|
||||
return (macro_list->string[0]);
|
||||
return (rl_executing_macro[executing_macro_index]);
|
||||
}
|
||||
|
||||
int
|
||||
_rl_prev_macro_key ()
|
||||
{
|
||||
|
||||
@@ -920,6 +920,15 @@ _rl_dispatch_subseq (key, map, got_subseq)
|
||||
_rl_pushed_input_available () == 0 &&
|
||||
_rl_input_queued ((_rl_keyseq_timeout > 0) ? _rl_keyseq_timeout*1000 : 0) == 0)
|
||||
return (_rl_dispatch (ANYOTHERKEY, FUNCTION_TO_KEYMAP (map, key)));
|
||||
/* This is a very specific test. It can possibly be generalized in
|
||||
the future, but for now it handles a specific case of ESC being
|
||||
the last character in a keyboard macro. */
|
||||
if (rl_editing_mode == vi_mode && key == ESC && map == vi_insertion_keymap &&
|
||||
(RL_ISSTATE (RL_STATE_INPUTPENDING) == 0) &&
|
||||
(RL_ISSTATE (RL_STATE_MACROINPUT) && _rl_peek_macro_key () == 0) &&
|
||||
_rl_pushed_input_available () == 0 &&
|
||||
_rl_input_queued ((_rl_keyseq_timeout > 0) ? _rl_keyseq_timeout*1000 : 0) == 0)
|
||||
return (_rl_dispatch (ANYOTHERKEY, FUNCTION_TO_KEYMAP (map, key)));
|
||||
#endif
|
||||
|
||||
RESIZE_KEYSEQ_BUFFER ();
|
||||
|
||||
@@ -413,6 +413,7 @@ extern void rl_deprep_terminal PARAMS((void));
|
||||
extern void rl_tty_set_default_bindings PARAMS((Keymap));
|
||||
extern void rl_tty_unset_default_bindings PARAMS((Keymap));
|
||||
|
||||
extern int rl_tty_set_echoing PARAMS((int));
|
||||
extern int rl_reset_terminal PARAMS((const char *));
|
||||
extern void rl_resize_terminal PARAMS((void));
|
||||
extern void rl_set_screen_size PARAMS((int, int));
|
||||
|
||||
@@ -309,6 +309,7 @@ extern int _rl_search_getchar PARAMS((_rl_search_cxt *));
|
||||
|
||||
/* macro.c */
|
||||
extern void _rl_with_macro_input PARAMS((char *));
|
||||
extern int _rl_peek_macro_key PARAMS((void));
|
||||
extern int _rl_next_macro_key PARAMS((void));
|
||||
extern int _rl_prev_macro_key PARAMS((void));
|
||||
extern void _rl_push_executing_macro PARAMS((void));
|
||||
|
||||
Reference in New Issue
Block a user