memory bug corrected

This commit is contained in:
cvs
2000-04-07 14:24:01 +00:00
parent 9c9a2d45a5
commit c70f0b7cb8
12 changed files with 45 additions and 25 deletions

View File

@@ -15,6 +15,18 @@ char *ErrMessage=NULL;
void (*outrtn)()=NULL;
void *outarg;
void *my_malloc(size_t size, const char *text) {
void *ptr;
ptr=calloc(1,size);
/* printf("new %s %X %d\n", text, ptr, size); */
return(ptr);
}
void my_free(void *ptr) {
/* printf("my_free %X\n", ptr); */
free(ptr);
}
void ErrTxt(char *text, int systemError)
{
if (systemError) { sp=0; ErrCode=errno; ErrMessage=strerror(errno); }