public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* For review: delete varargs code from gdbtk
@ 1999-08-07 18:48 Andrew Cagney
  1999-08-08 11:54 ` James Ingham
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Cagney @ 1999-08-07 18:48 UTC (permalink / raw)
  To: Insight (GDB GUI)

Hello,

The attached patch eleminates varargs code from GDBtk.

Comments,
		Andrew
Index: 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 ----

^ permalink raw reply	[flat|nested] 2+ messages in thread

* For review: delete varargs code from gdbtk
  1999-08-07 18:48 For review: delete varargs code from gdbtk Andrew Cagney
@ 1999-08-08 11:54 ` James Ingham
  0 siblings, 0 replies; 2+ messages in thread
From: James Ingham @ 1999-08-08 11:54 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Insight (GDB GUI)

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 ----

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-08-08 11:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-07 18:48 For review: delete varargs code from gdbtk Andrew Cagney
1999-08-08 11:54 ` James Ingham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).