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

@@ -1,6 +1,9 @@
#ifndef _ERR_HANDLING_H_
#define _ERR_HANDLING_H_
#ifdef FORTIFY
#include "fortify.h"
#endif
#include <stdio.h>
#include <sys/errno.h>
@@ -71,6 +74,8 @@ Global Variables (read only)
#define ERR_MSG(R) { ErrMsg(R); goto OnError; }
#define ERR_COD(R) { ErrCod(R); goto OnError; }
#define NEW(PTR) ERR_SP(PTR=my_malloc(sizeof(*PTR),#PTR))
void ErrTxt(char *text, int systemError);
void ErrMsg(char *msg);
void ErrCod(int code);
@@ -79,6 +84,8 @@ void ERR_EXIT(char *text);
void ErrLog(char *text);
void ErrSetOutRtn(void (*rtn)(), void *arg);
void ErrSetOutFile(FILE *file);
void *my_malloc(size_t size, const char *text);
void my_free(void *ptr);
extern int ErrCode;
extern char *ErrMessage;