show error message in Windows before exiting

This commit is contained in:
h_vogt 2009-04-22 21:25:29 +00:00
parent 6c55df1cb5
commit 65b3fa2a4a
3 changed files with 5 additions and 0 deletions

View File

@ -18,6 +18,8 @@
#include "general.h"
extern void winmessage(char* new_msg);
#define Getmax(s,ls) (((unsigned char)(s[ls+1])) << 8) + (unsigned char)(s[ls+2])
/***** primitive input-output ***/

View File

@ -28,6 +28,7 @@ Todo:
#include "ngspice.h"
extern void txfree (void *ptr);
extern void winmessage(char* new_msg);
char *nupa_inst_name;
static tdico *inst_dico;
@ -664,6 +665,7 @@ nupa_copy (char *s, int linenum)
if (t == NULL)
{
fputs ("Fatal: String malloc crash in nupa_copy()\n", stderr);
winmessage("Fatal error in SPICE");
exit (-1);
}
else

View File

@ -22,6 +22,7 @@ $Id$
extern HANDLE outheap;
#endif
#endif
extern void winmessage(char* new_msg);
/* Malloc num bytes and initialize to zero. Fatal error if the space can't
* be tmalloc'd. Return NULL for a request for 0 bytes.