diff options
author | Jim Ingham <jingham@apple.com> | 1999-01-28 03:50:17 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 1999-01-28 03:50:17 +0000 |
commit | c98fe0c11974772749686145f3172dc8c9004909 (patch) | |
tree | b6b38dae1565e217e00060554dd6ea1f5d4cfee6 /gdb/utils.c | |
parent | 988e60c43b3af56544d2181a5e3146a7787cf7bc (diff) | |
download | gdb-c98fe0c11974772749686145f3172dc8c9004909.zip gdb-c98fe0c11974772749686145f3172dc8c9004909.tar.gz gdb-c98fe0c11974772749686145f3172dc8c9004909.tar.bz2 |
This is the merge of the Itcl3.0 gdbtk development branch into the
trunk. To build it, you will have to do update -dP in the itcl
directory, and update tcl, tk, tix and libgui as well.
Diffstat (limited to 'gdb/utils.c')
-rw-r--r-- | gdb/utils.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gdb/utils.c b/gdb/utils.c index fa2cb22..81c4452 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -51,6 +51,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* readline defines this. */ #undef savestring +void (*error_begin_hook) PARAMS ((void)); + /* Prototypes for local functions */ static void vfprintf_maybe_filtered PARAMS ((GDB_FILE *, const char *, @@ -397,6 +399,9 @@ warning (va_alist) void error_begin () { + if (error_begin_hook) + error_begin_hook (); + target_terminal_ours (); wrap_here (""); /* Force out any buffered output */ gdb_flush (gdb_stdout); @@ -984,9 +989,13 @@ print_spaces (n, file) { if (file->ts_streamtype == astring) { + char *p; + gdb_file_adjust_strbuf (n, file); - while (n-- > 0) - strcat(file->ts_strbuf, " "); + p = file->ts_strbuf + strlen (file->ts_strbuf); + + memset (p, ' ', n); + p[n] = '\000'; } else { |