ngspice.h: add shared module

This commit is contained in:
h_vogt 2013-03-23 18:14:08 +01:00 committed by rlar
parent 62324299e1
commit 83d5606da4
1 changed files with 31 additions and 0 deletions

View File

@ -249,6 +249,37 @@ extern int tcl_fprintf(FILE *f, const char *format, ...);
#undef perror
#define perror(string) fprintf(stderr,"%s: %s\n",string,sys_errlist[errno])
#elif defined SHARED_MODULE
#include <errno.h>
extern int sh_printf(const char *format, ...);
extern int sh_fprintf(FILE *fd, const char *format, ...);
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);
extern void SetAnalyse(char *analyse, int percent);
#define HAS_PROGREP
#undef printf
#define printf sh_printf
#undef fprintf
#define fprintf sh_fprintf
#undef perror
#define perror(string) fprintf(stderr, "%s: %s\n", string, sys_errlist[errno])
#undef fputs
#define fputs sh_fputs
#undef fputc
#define fputc sh_fputc
#undef putc
#define putc sh_putc
#endif
/* macro to ignore unused variables and parameters */