diff options
author | Stu Grossman <grossman@cygnus> | 1992-09-15 05:04:08 +0000 |
---|---|---|
committer | Stu Grossman <grossman@cygnus> | 1992-09-15 05:04:08 +0000 |
commit | 3e3b0eb9d9bd49c08edbe181864a20282034c64d (patch) | |
tree | 174319bc3feb6a10f38cf836bc22dd27c9ebe6e7 | |
parent | 5ca812d4fe087713bf7e177dcc6f553f590edfdf (diff) | |
download | gdb-3e3b0eb9d9bd49c08edbe181864a20282034c64d.zip gdb-3e3b0eb9d9bd49c08edbe181864a20282034c64d.tar.gz gdb-3e3b0eb9d9bd49c08edbe181864a20282034c64d.tar.bz2 |
* utils.c (query): Remove test for energize from top. Now
handled in input_from_terminal_p().
-rw-r--r-- | gdb/ChangeLog | 3 | ||||
-rw-r--r-- | gdb/utils.c | 44 |
2 files changed, 34 insertions, 13 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f849f44..e180fd0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ Mon Sep 14 19:20:43 1992 Stu Grossman (grossman at cygnus.com) + * utils.c (query): Remove test for energize from top. Now + handled in input_from_terminal_p(). + * energize.c (send_location): New routine to consolidate all places where we must notify kernel of where the given pc is. (cplus_demangle): Put single-quotes around demangled names. diff --git a/gdb/utils.c b/gdb/utils.c index b99e4f9..4682d1d 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -703,21 +703,32 @@ query (va_alist) fflush (stdout); va_start (args); ctlstr = va_arg (args, char *); + energize_query (ctlstr, args); vfprintf_filtered (stdout, ctlstr, args); - va_end (args); printf_filtered ("(y or n) "); - fflush (stdout); - answer = fgetc (stdin); - clearerr (stdin); /* in case of C-d */ - if (answer == EOF) /* C-d */ - return 1; - if (answer != '\n') /* Eat rest of input line, to EOF or newline */ - do - { - ans2 = fgetc (stdin); - clearerr (stdin); - } - while (ans2 != EOF && ans2 != '\n'); + if (energize) + { + char *buf; + + buf = energize_command_line_input(0, 0); + answer = buf ? *buf : 'Y'; + energize_acknowledge_query(buf); + } + else + { + fflush (stdout); + answer = fgetc (stdin); + clearerr (stdin); /* in case of C-d */ + if (answer == EOF) /* C-d */ + return 1; + if (answer != '\n') /* Eat rest of input line, to EOF or newline */ + do + { + ans2 = fgetc (stdin); + clearerr (stdin); + } + while (ans2 != EOF && ans2 != '\n'); + } if (answer >= 'a') answer -= 040; if (answer == 'Y') @@ -725,6 +736,7 @@ query (va_alist) if (answer == 'N') return 0; printf_filtered ("Please answer y or n.\n"); + va_end (args); } } @@ -991,6 +1003,12 @@ fputs_filtered (linebuffer, stream) if (linebuffer == 0) return; + if (energize) + { + energize_fputs(linebuffer); + return; + } + /* Don't do any filtering if it is disabled. */ if (stream != stdout || (lines_per_page == UINT_MAX && chars_per_line == UINT_MAX)) |