From: John Gilmore Date: Fri, 16 Aug 1991 01:49:30 +0000 (+0000) Subject: * main.c: Remove unused terminating_signals and catch_termination(). X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=351b221dedb9ea0a4f570f762b6f46d4dc1794fa;p=deliverable%2Fbinutils-gdb.git * main.c: Remove unused terminating_signals and catch_termination(). (long_options): Terminate with a zero element. [Bugfix from Atsuo Kawaguchi .] (gdb_readline): Make call-compatible with readline. (init_signals): Improve comments re vfork vs. signal. * utils.c (prompt_for_continue): Use new gdb_readline(). If we prompt for continuation, we don't let CR repeat the previous command, once we get back to a prompt. It's too easy to keep hitting CR, expecting "--more--" prompts, and have some long command start repeating on you. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 37f238125b..cf5b54d3c4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,17 @@ +Thu Aug 15 18:43:57 1991 John Gilmore (gnu at cygint.cygnus.com) + + * main.c: Remove unused terminating_signals and catch_termination(). + (long_options): Terminate with a zero element. + [Bugfix from Atsuo Kawaguchi .] + (gdb_readline): Make call-compatible with readline. + (init_signals): Improve comments re vfork vs. signal. + + * utils.c (prompt_for_continue): Use new gdb_readline(). + If we prompt for continuation, we don't let CR repeat the previous + command, once we get back to a prompt. It's too easy to keep + hitting CR, expecting "--more--" prompts, and have some long + command start repeating on you. + Tue Aug 13 16:17:56 1991 John Gilmore (gnu at cygint.cygnus.com) * blockframe.c (frameless_look_for_prologue): Speed up by diff --git a/gdb/utils.c b/gdb/utils.c index 28c3c87007..5fe3b1ebc1 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -3,19 +3,19 @@ This file is part of GDB. -GDB is free software; you can redistribute it and/or modify +This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 1, or (at your option) -any later version. +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. -GDB is distributed in the hope that it will be useful, +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with GDB; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include @@ -59,7 +59,7 @@ extern char *realloc(); void vprintf (format, ap) char *format; - va_alist ap; + va_list ap; { vfprintf (stdout, format, ap); } @@ -718,10 +718,15 @@ set_width_command (args, from_tty, c) static void prompt_for_continue () { + char *ignore; + immediate_quit++; - gdb_readline ("---Type to continue---", 0); + ignore = gdb_readline ("---Type to continue---"); + if (ignore) + free (ignore); chars_printed = lines_printed = 0; immediate_quit--; + dont_repeat (); /* Forget prev cmd -- CR won't repeat it. */ } /* Reinitialize filter; ie. tell it to reset to original values. */