code cleaned a little bit too much ;-)
authorborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 16 Aug 2006 18:14:24 +0000 (18:14 +0000)
committerborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 16 Aug 2006 18:14:24 +0000 (18:14 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4340 4a8a32a2-be11-0410-ad9d-d568d2c75423

sim/ucsim/cmd.src/newcmd.cc
sim/ucsim/cmd.src/newcmdcl.h

index 2ae219425d647edf1ba1f53e175d9807a2cd60d4..76e088c4bc6f30683de65c2800d968e57c145bba 100644 (file)
@@ -917,9 +917,8 @@ cl_commander::prompt(void)
  */
 
 int
-cl_commander::dd_printf(char *format, ...)
+cl_commander::dd_printf(char *format, va_list ap)
 {
-  va_list ap;
   int ret= 0;
   class cl_console *con;
 
@@ -937,13 +936,24 @@ cl_commander::dd_printf(char *format, ...)
     }
   if (con)
     {
-      va_start(ap, format);
       ret= con->cmd_do_print(format, ap);
-      va_end(ap);
     }
   return(ret);
 }
 
+int
+cl_commander::dd_printf(char *format, ...)
+{
+  va_list ap;
+  int ret= 0;
+
+  va_start(ap, format);
+  ret= dd_printf(format, ap);
+  va_end(ap);
+
+  return(ret);
+}
+
 /*
  * Printing to consoles which have CONS_DEBUG flag set
  */
index 6655260af40a8ca5998345ae1cf3efd6ba75c52b..e091fa54b76652ca6318b26b4548c97337e9f930 100644 (file)
@@ -211,10 +211,11 @@ public:
   void set_fd_set(void);
 
   void prompt(void);
-  int all_printf(char *format, ...);    // print to all consoles
-  int dd_printf(char *format, ...);     // print to actual_console
-  int debug(char *format, ...);         // print consoles with debug flag set
-  int debug(char *format, va_list ap);  // print consoles with debug flag set
+  int all_printf(char *format, ...);        // print to all consoles
+  int dd_printf(char *format, va_list ap);  // print to actual_console
+  int dd_printf(char *format, ...);         // print to actual_console
+  int debug(char *format, ...);             // print consoles with debug flag set
+  int debug(char *format, va_list ap);      // print consoles with debug flag set
   int flag_printf(int iflags, char *format, ...);
   int input_avail(void);
   int input_avail_on_frozen(void);