winmessage
This commit is contained in:
parent
65b3fa2a4a
commit
eb378da811
|
|
@ -20,9 +20,10 @@ $Id$
|
||||||
#undef BOOLEAN
|
#undef BOOLEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
extern HANDLE outheap;
|
extern HANDLE outheap;
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
extern void winmessage(char* new_msg);
|
extern void winmessage(char* new_msg);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* 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.
|
||||||
|
|
@ -52,7 +53,9 @@ tmalloc(size_t num)
|
||||||
#endif
|
#endif
|
||||||
if (!s){
|
if (!s){
|
||||||
fprintf(stderr,"malloc: Internal Error: can't allocate %ld bytes. \n",(long)num);
|
fprintf(stderr,"malloc: Internal Error: can't allocate %ld bytes. \n",(long)num);
|
||||||
|
#ifdef HAS_WINDOWS
|
||||||
winmessage("Fatal error in SPICE");
|
winmessage("Fatal error in SPICE");
|
||||||
|
#endif
|
||||||
exit(EXIT_BAD);
|
exit(EXIT_BAD);
|
||||||
}
|
}
|
||||||
return(s);
|
return(s);
|
||||||
|
|
@ -136,7 +139,9 @@ trealloc(void *ptr, size_t num)
|
||||||
}
|
}
|
||||||
if (!s) {
|
if (!s) {
|
||||||
fprintf(stderr,"realloc: Internal Error: can't allocate %ld bytes.\n", (long)num);
|
fprintf(stderr,"realloc: Internal Error: can't allocate %ld bytes.\n", (long)num);
|
||||||
|
#ifdef HAS_WINDOWS
|
||||||
winmessage("Fatal error in SPICE");
|
winmessage("Fatal error in SPICE");
|
||||||
|
#endif
|
||||||
exit(EXIT_BAD);
|
exit(EXIT_BAD);
|
||||||
}
|
}
|
||||||
return(s);
|
return(s);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue