This is the mail archive of the
insight@sourceware.cygnus.com
mailing list for the Insight project.
For review: delete varargs code from gdbtk
- To: Andrew Cagney <ac131313@cygnus.com>
- Subject: For review: delete varargs code from gdbtk
- From: James Ingham <jingham@cygnus.com>
- Date: Sun, 8 Aug 1999 11:56:02 -0700 (PDT)
- Cc: "Insight (GDB GUI)" <insight@sourceware.cygnus.com>
- References: <37ACE1C9.427A2C5D@cygnus.com>
Andrew,
Go for it...
Jim
> Hello,
>
> The attached patch eleminates varargs code from GDBtk.
>
> Comments,
> AndrewIndex: gdbtk-cmds.c
> ===================================================================
> RCS file: /cvs/cvsfiles/devo/gdb/gdbtk-cmds.c,v
> retrieving revision 2.54
> diff -p -r2.54 gdbtk-cmds.c
> *** gdbtk-cmds.c 1999/08/03 00:33:48 2.54
> --- gdbtk-cmds.c 1999/08/08 01:41:50
> ***************
> *** 45,55 ****
> #include "guitcl.h"
> #include "gdbtk.h"
>
> - #ifdef ANSI_PROTOTYPES
> - #include <stdarg.h>
> - #else
> - #include <varargs.h>
> - #endif
> #include <signal.h>
> #include <fcntl.h>
> #include <unistd.h>
> --- 45,50 ----
> *************** wrapped_call (opaque_args)
> *** 535,560 ****
> */
>
> static void
> - #ifdef ANSI_PROTOTYPES
> sprintf_append_element_to_obj (Tcl_Obj * objp, char *format,...)
> - #else
> - sprintf_append_element_to_obj (va_alist)
> - va_dcl
> - #endif
> {
> va_list args;
> char buf[1024];
>
> - #ifdef ANSI_PROTOTYPES
> va_start (args, format);
> - #else
> - Tcl_Obj *objp;
> - char *format;
> -
> - va_start (args);
> - dsp = va_arg (args, Tcl_Obj *);
> - format = va_arg (args, char *);
> - #endif
>
> vsprintf (buf, format, args);
>
> --- 530,541 ----
> Index: gdbtk.c
> ===================================================================
> RCS file: /cvs/cvsfiles/devo/gdb/gdbtk.c,v
> retrieving revision 2.137
> diff -p -r2.137 gdbtk.c
> *** gdbtk.c 1999/07/16 20:38:21 2.137
> --- gdbtk.c 1999/08/08 01:41:51
> ***************
> *** 46,56 ****
> #include "guitcl.h"
> #include "gdbtk.h"
>
> - #ifdef ANSI_PROTOTYPES
> - #include <stdarg.h>
> - #else
> - #include <varargs.h>
> - #endif
> #include <signal.h>
> #include <fcntl.h>
> #include <unistd.h>
> --- 46,51 ----