From f16cbece5a2c3e313088ed1175281511baaa8be4 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Sat, 24 Jul 2010 03:46:58 +0200 Subject: [PATCH] Rename Signal --> el_intr_pending. From Festival speech-tools. --- src/editline.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/editline.c b/src/editline.c index 71a99a3..2820fd5 100644 --- a/src/editline.c +++ b/src/editline.c @@ -96,7 +96,7 @@ static int Repeat; static int OldPoint; static int PushBack; static int Pushed; -static int Signal; +static int el_intr_pending; static el_keymap_t Map[]; static el_keymap_t MetaMap[]; static size_t Length; @@ -621,8 +621,8 @@ static el_status_t h_search(void) Prompt = old_prompt; Searching = 0; tty_puts(Prompt); - if (p == NULL && Signal > 0) { - Signal = 0; + if (p == NULL && el_intr_pending > 0) { + el_intr_pending = 0; clear_line(); return redisplay(); } @@ -902,16 +902,16 @@ static el_status_t tty_special(int c) if (c == rl_eof && rl_point == 0 && rl_end == 0) return CSeof; if (c == rl_intr) { - Signal = SIGINT; + el_intr_pending = SIGINT; return CSsignal; } if (c == rl_quit) { - Signal = SIGQUIT; + el_intr_pending = SIGQUIT; return CSeof; } #ifdef CONFIG_SIGSTOP if (c == rl_susp) { - Signal = SIGTSTP; + el_intr_pending = SIGTSTP; return CSsignal; } #endif @@ -927,7 +927,7 @@ static char *editinput(void) OldPoint = rl_point = rl_mark = rl_end = 0; rl_line_buffer[0] = '\0'; - Signal = -1; + el_intr_pending = -1; while ((c = tty_get()) != EOF) switch (tty_special(c)) { case CSdone: @@ -1028,7 +1028,6 @@ void rl_initialize(void) char *readline(const char *prompt) { char *line; - int s; /* Unless called by the user already. */ rl_initialize(); @@ -1082,9 +1081,9 @@ char *readline(const char *prompt) hist_add(line); } - if (Signal > 0) { - s = Signal; - Signal = 0; + if (el_intr_pending > 0) { + int s = el_intr_pending; + el_intr_pending = 0; kill(getpid(), s); }