Rename Signal --> el_intr_pending. From Festival speech-tools.

This commit is contained in:
Joachim Nilsson 2010-07-24 03:46:58 +02:00
parent be921400bb
commit f16cbece5a

View File

@ -96,7 +96,7 @@ static int Repeat;
static int OldPoint; static int OldPoint;
static int PushBack; static int PushBack;
static int Pushed; static int Pushed;
static int Signal; static int el_intr_pending;
static el_keymap_t Map[]; static el_keymap_t Map[];
static el_keymap_t MetaMap[]; static el_keymap_t MetaMap[];
static size_t Length; static size_t Length;
@ -621,8 +621,8 @@ static el_status_t h_search(void)
Prompt = old_prompt; Prompt = old_prompt;
Searching = 0; Searching = 0;
tty_puts(Prompt); tty_puts(Prompt);
if (p == NULL && Signal > 0) { if (p == NULL && el_intr_pending > 0) {
Signal = 0; el_intr_pending = 0;
clear_line(); clear_line();
return redisplay(); return redisplay();
} }
@ -902,16 +902,16 @@ static el_status_t tty_special(int c)
if (c == rl_eof && rl_point == 0 && rl_end == 0) if (c == rl_eof && rl_point == 0 && rl_end == 0)
return CSeof; return CSeof;
if (c == rl_intr) { if (c == rl_intr) {
Signal = SIGINT; el_intr_pending = SIGINT;
return CSsignal; return CSsignal;
} }
if (c == rl_quit) { if (c == rl_quit) {
Signal = SIGQUIT; el_intr_pending = SIGQUIT;
return CSeof; return CSeof;
} }
#ifdef CONFIG_SIGSTOP #ifdef CONFIG_SIGSTOP
if (c == rl_susp) { if (c == rl_susp) {
Signal = SIGTSTP; el_intr_pending = SIGTSTP;
return CSsignal; return CSsignal;
} }
#endif #endif
@ -927,7 +927,7 @@ static char *editinput(void)
OldPoint = rl_point = rl_mark = rl_end = 0; OldPoint = rl_point = rl_mark = rl_end = 0;
rl_line_buffer[0] = '\0'; rl_line_buffer[0] = '\0';
Signal = -1; el_intr_pending = -1;
while ((c = tty_get()) != EOF) while ((c = tty_get()) != EOF)
switch (tty_special(c)) { switch (tty_special(c)) {
case CSdone: case CSdone:
@ -1028,7 +1028,6 @@ void rl_initialize(void)
char *readline(const char *prompt) char *readline(const char *prompt)
{ {
char *line; char *line;
int s;
/* Unless called by the user already. */ /* Unless called by the user already. */
rl_initialize(); rl_initialize();
@ -1082,9 +1081,9 @@ char *readline(const char *prompt)
hist_add(line); hist_add(line);
} }
if (Signal > 0) { if (el_intr_pending > 0) {
s = Signal; int s = el_intr_pending;
Signal = 0; el_intr_pending = 0;
kill(getpid(), s); kill(getpid(), s);
} }