This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

For review: Delete varargs code in tui directory


Hello,

The attached patch deletes the legach varargs code in the TUI sub
directory.
Disclaimer: I don't have a HP box to test this on :-(

	Andrew

Fri Aug 13 10:12:56 1999  Andrew Cagney  <cagney@b1.cygnus.com>

        * tui.c (strcat_to_buf_with_fmt): Delete legacy varargs code.
        * tuiIO.c (tui_vwgetch): Ditto.
        * tui.h: Ditto.
Index: gdb/tui/tui.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/tui/tui.c,v
retrieving revision 1.3
diff -p -r1.3 tui.c
*** tui.c	1999/07/07 23:52:45	1.3
--- tui.c	1999/08/13 00:15:45
*************** strcat_to_buf (buf, buflen, itemToAdd)
*** 602,632 ****
  
  /* VARARGS */
  void
- #ifdef ANSI_PROTOTYPES
  strcat_to_buf_with_fmt (
  			 char *buf,
  			 int bufLen,
  			 char *format,...)
- #else
- strcat_to_buf_with_fmt (va_alist)
-      va_dcl
- #endif
  {
    char *linebuffer;
    struct cleanup *old_cleanups;
    va_list args;
- #ifdef ANSI_PROTOTYPES
    va_start (args, format);
- #else
-   char *buf;
-   int bufLen;
-   char *format;
- 
-   va_start (args);
-   buf = va_arg (args, char *);
-   bufLen = va_arg (args, int);
-   format = va_arg (args, char *);
- #endif
    vasprintf (&linebuffer, format, args);
    old_cleanups = make_cleanup (free, linebuffer);
    strcat_to_buf (buf, bufLen, linebuffer);
--- 602,616 ----
Index: gdb/tui/tui.h
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/tui/tui.h,v
retrieving revision 1.4
diff -p -r1.4 tui.h
*** tui.h	1999/07/07 23:52:45	1.4
--- tui.h	1999/08/13 00:15:45
***************
*** 4,14 ****
  #define TUI_H
  #include <curses.h>
  
- #ifdef ANSI_PROTOTYPES
  #include <stdarg.h>
- #else
- #include <varargs.h>
- #endif
  
  #include "ansidecl.h"
  
--- 4,10 ----
Index: gdb/tui/tuiIO.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/tui/tuiIO.c,v
retrieving revision 1.3
diff -p -r1.3 tuiIO.c
*** tuiIO.c	1999/07/07 23:52:45	1.3
--- tuiIO.c	1999/08/13 00:15:47
***************
*** 13,23 ****
  #include "tuiCommand.h"
  #include "tuiWin.h"
  
- #ifdef ANSI_PROTOTYPES
  #include <stdarg.h>
- #else
- #include <varargs.h>
- #endif
  
  /* The Solaris header files seem to provide no declaration for this at
     all when __STDC__ is defined.  This shouldn't conflict with
--- 13,19 ----
*************** tui_tputs (str, affcnt, putfunc)
*** 262,273 ****
     **        Wrapper around wgetch with the window in a va_list
   */
  unsigned int
- #ifdef __STDC__
  tui_vwgetch (va_list args)
- #else
- tui_vwgetch (args)
-      va_list args;
- #endif
  {
    unsigned int ch;
    WINDOW *window;
--- 258,264 ----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]