show error message in Windows before exiting
This commit is contained in:
parent
6c55df1cb5
commit
65b3fa2a4a
|
|
@ -18,6 +18,8 @@
|
||||||
|
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
||||||
|
extern void winmessage(char* new_msg);
|
||||||
|
|
||||||
#define Getmax(s,ls) (((unsigned char)(s[ls+1])) << 8) + (unsigned char)(s[ls+2])
|
#define Getmax(s,ls) (((unsigned char)(s[ls+1])) << 8) + (unsigned char)(s[ls+2])
|
||||||
|
|
||||||
/***** primitive input-output ***/
|
/***** primitive input-output ***/
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ Todo:
|
||||||
#include "ngspice.h"
|
#include "ngspice.h"
|
||||||
|
|
||||||
extern void txfree (void *ptr);
|
extern void txfree (void *ptr);
|
||||||
|
extern void winmessage(char* new_msg);
|
||||||
|
|
||||||
char *nupa_inst_name;
|
char *nupa_inst_name;
|
||||||
static tdico *inst_dico;
|
static tdico *inst_dico;
|
||||||
|
|
@ -664,6 +665,7 @@ nupa_copy (char *s, int linenum)
|
||||||
if (t == NULL)
|
if (t == NULL)
|
||||||
{
|
{
|
||||||
fputs ("Fatal: String malloc crash in nupa_copy()\n", stderr);
|
fputs ("Fatal: String malloc crash in nupa_copy()\n", stderr);
|
||||||
|
winmessage("Fatal error in SPICE");
|
||||||
exit (-1);
|
exit (-1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ $Id$
|
||||||
extern HANDLE outheap;
|
extern HANDLE outheap;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
extern void winmessage(char* new_msg);
|
||||||
|
|
||||||
/* Malloc num bytes and initialize to zero. Fatal error if the space can't
|
/* 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.
|
* be tmalloc'd. Return NULL for a request for 0 bytes.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue