home *** CD-ROM | disk | FTP | other *** search
/ The Education Master 1994 (4th Edition) / EDUCATIONS_MASTER_4TH_EDITION.bin / files / progmisc / qparser2 / lib / qalloc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-10-31  |  1.2 KB  |  50 lines

  1. /*  qalloc.h
  2.  
  3. Copyright (c) QCAD Systems, Inc. 1990.  All rights reserved.
  4.  
  5.     Related to memory allocation, freeing, malloc space, etc.
  6. Strategy depends heavily on whether a UNIX or IBM-DOS system is being
  7. used.
  8.  
  9.     */
  10.  
  11. #ifndef QALLOC_H
  12. #define QALLOC_H
  13.  
  14. #ifdef MSDOS
  15. #include <malloc.h>
  16. extern void memory_failure(void);
  17. extern char * our_malloc(int);
  18. extern char * our_realloc(char *, int);
  19. extern char * our_strdup(char *);
  20. extern void our_free(char *);
  21. extern void mem_avail(char []);
  22. extern void heapcheck(char []);
  23. #endif
  24. #ifdef TCC
  25. /* Turbo */
  26. #include <alloc.h>
  27. #  define memory_failure()
  28. #  define our_malloc(size) malloc(size)
  29. #  define our_realloc(pntr,nsize)  (pntr ? realloc(pntr,nsize) \
  30.    : malloc(nsize))
  31. #  define our_free(thing)  free(thing)
  32. #  define our_strdup(str)  strdup(str)
  33. #  define mem_avail(msg)
  34. #  define heapcheck(msg)
  35. #endif
  36. #ifdef UNIX
  37. /* Unix */
  38. #include <malloc.h>
  39. #  define memory_failure()
  40. #  define our_malloc(size) malloc(size)
  41. #  define our_realloc(pntr,nsize)  (pntr ? realloc(pntr,nsize) \
  42.    : malloc(nsize))
  43. #  define our_free(thing)  free(thing)
  44. #  define our_strdup(str)  strdup(str)
  45. #  define mem_avail(msg)
  46. #  define heapcheck(msg)
  47. #endif
  48. #endif
  49.  
  50.