home *** CD-ROM | disk | FTP | other *** search
- /* qalloc.h
-
- Copyright (c) QCAD Systems, Inc. 1990. All rights reserved.
-
- Related to memory allocation, freeing, malloc space, etc.
- Strategy depends heavily on whether a UNIX or IBM-DOS system is being
- used.
-
- */
-
- #ifndef QALLOC_H
- #define QALLOC_H
-
- #ifdef MSDOS
- #include <malloc.h>
- extern void memory_failure(void);
- extern char * our_malloc(int);
- extern char * our_realloc(char *, int);
- extern char * our_strdup(char *);
- extern void our_free(char *);
- extern void mem_avail(char []);
- extern void heapcheck(char []);
- #endif
- #ifdef TCC
- /* Turbo */
- #include <alloc.h>
- # define memory_failure()
- # define our_malloc(size) malloc(size)
- # define our_realloc(pntr,nsize) (pntr ? realloc(pntr,nsize) \
- : malloc(nsize))
- # define our_free(thing) free(thing)
- # define our_strdup(str) strdup(str)
- # define mem_avail(msg)
- # define heapcheck(msg)
- #endif
- #ifdef UNIX
- /* Unix */
- #include <malloc.h>
- # define memory_failure()
- # define our_malloc(size) malloc(size)
- # define our_realloc(pntr,nsize) (pntr ? realloc(pntr,nsize) \
- : malloc(nsize))
- # define our_free(thing) free(thing)
- # define our_strdup(str) strdup(str)
- # define mem_avail(msg)
- # define heapcheck(msg)
- #endif
- #endif
-