From f7980492855125213e8f00794f280c12e74657ea Mon Sep 17 00:00:00 2001 From: stefanjones Date: Fri, 11 Jun 2004 00:14:33 +0000 Subject: [PATCH] 2004-06-10 Stefan Jones * include/ngspice.h: Print perror to the Tk console --- ChangeLog | 3 +++ src/include/ngspice.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 39fbd5ae1..2a98512fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2004-06-10 Stefan Jones + * include/ngspice.h: + Print perror to the Tk console + * src/tclspice.c: test for FILE in tcl_printf being stdout/stderr Could be more than one fd for stdout/stderr diff --git a/src/include/ngspice.h b/src/include/ngspice.h index 308d1c607..519a928c4 100644 --- a/src/include/ngspice.h +++ b/src/include/ngspice.h @@ -183,6 +183,9 @@ extern int tcl_fprintf(FILE *f, const char *format, ...); #undef fprintf #define fprintf tcl_fprintf +#undef perror +#define perror(string) fprintf(stderr,"%s: %s\n",string,sys_errlist[errno]) + #endif #ifdef __MINGW32__