Browse Source

src/sharedspice.c, add vfprintf to interface for transferring messages

pre-master-46
h_vogt 10 years ago
committed by rlar
parent
commit
0b92d8cfe1
  1. 5
      src/include/ngspice/ngspice.h
  2. 6
      src/sharedspice.c

5
src/include/ngspice/ngspice.h

@ -283,9 +283,11 @@ extern int tcl_fprintf(FILE *f, const char *format, ...);
#elif defined SHARED_MODULE
#include <errno.h>
#include <stdarg.h>
extern int sh_printf(const char *format, ...);
extern int sh_fprintf(FILE *fd, const char *format, ...);
extern int sh_vfprintf(FILE *fd, const char *format, va_list args);
extern int sh_fputs(const char *input, FILE *fd);
extern int sh_fputc(int input, FILE *fd);
extern int sh_putc(int input, FILE *fd);
@ -293,6 +295,9 @@ extern void SetAnalyse(char *analyse, int percent);
#define HAS_PROGREP
#undef vfprintf
#define vfprintf sh_vfprintf
#undef printf
#define printf sh_printf

6
src/sharedspice.c

@ -898,6 +898,12 @@ add_bkpt(void)
}
/* use the original vprintf() in the rest of this file
* instead of the redirected variant
*/
#undef vfprintf
/*------------------------------------------------------*/
/* Redefine the vfprintf() functions for callback */
/*------------------------------------------------------*/

Loading…
Cancel
Save