From 390ca26a02a472a772cb52cec7474199d39f6293 Mon Sep 17 00:00:00 2001 From: Keith Seitz Date: Tue, 31 Mar 1998 23:42:51 +0000 Subject: [PATCH] * gdbtk.c (gdb_loadfile): Don't use the return result from sprintf, whi ch returns a char * under SunOS4. --- gdb/ChangeLog-gdbtk | 5 +++++ gdb/gdbtk.c | 20 ++++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog-gdbtk b/gdb/ChangeLog-gdbtk index 44c7e9de48c..eb38db36955 100644 --- a/gdb/ChangeLog-gdbtk +++ b/gdb/ChangeLog-gdbtk @@ -1,3 +1,8 @@ +Tue Mar 31 15:42:06 1998 Keith Seitz + + * gdbtk.c (gdb_loadfile): Don't use the return result from sprintf, which + returns a char * under SunOS4. + Tue Mar 31 17:18:43 1998 Ian Lance Taylor * configure.in: Add $(LIBIDETCL) as well as $(LIBIDE) if diff --git a/gdb/gdbtk.c b/gdb/gdbtk.c index 5737fbdb9e1..b3d110f364a 100644 --- a/gdb/gdbtk.c +++ b/gdb/gdbtk.c @@ -3201,16 +3201,28 @@ gdb_loadfile (clientData, interp, objc, objv) if (linenumbers) { if (ltable[ln >> 3] & (1 << (ln % 8))) - a[0]->length = sprintf (buf,"%s insert end {-\t%d} break_tag", widget, ln); + { + sprintf (buf,"%s insert end {-\t%d} break_tag", widget, ln); + a[0]->length = strlen (buf); + } else - a[0]->length = sprintf (buf,"%s insert end { \t%d} \"\"", widget, ln); + { + sprintf (buf,"%s insert end { \t%d} \"\"", widget, ln); + a[0]->length = strlen (buf); + } } else { if (ltable[ln >> 3] & (1 << (ln % 8))) - a[0]->length = sprintf (buf,"%s insert end {-\t} break_tag", widget); + { + sprintf (buf,"%s insert end {-\t} break_tag", widget); + a[0]->length = strlen (buf); + } else - a[0]->length = sprintf (buf,"%s insert end { \t} \"\"", widget); + { + sprintf (buf,"%s insert end { \t} \"\"", widget); + a[0]->length = strlen (buf); + } } b[0]->length = strlen(b[0]->bytes); Tcl_SetListObj(a[1],2,b); -- 2.30.2