home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dokpr1.zip / mmemory.h < prev    next >
C/C++ Source or Header  |  1995-10-13  |  2KB  |  62 lines

  1. /**************************************************************************
  2.  *                                                                        *
  3.  *                                                                        *
  4.  *          This code is copyright (c) 1991, 1992, 1994, 1995             *
  5.  *                     Athena Design, Inc.                                *
  6.  *                                                                        *
  7.  *                                                                        *
  8.  *                ALL RIGHTS RESERVED                                     *
  9.  *                                                                        *
  10.  *                                                                        *
  11.  *                                                                        *
  12.  *                                                                        *
  13.  *                                                                        *
  14.  **************************************************************************/
  15.  
  16. #ifndef _MH_memory
  17.  
  18. #define _MH_memory
  19.  
  20. #ifdef __cplusplus
  21. extern "C"
  22. {
  23. #endif
  24.  
  25. #ifndef NULL
  26. #define NULL ( 0)
  27. //ifndef NULL
  28. #endif
  29.  
  30. // uncomment this define to turn on Mesa's memory debugging feature
  31. // #define MESADEBUGMEMORYMODE
  32.  
  33. extern void MFree(void *);
  34. extern char *MRealloc(void *,int);
  35.  
  36. extern void MFree(void *);
  37. extern char *MRealloc(void *,int);
  38.  
  39. #ifdef MESADEBUGMEMORYMODE
  40. #define MMalloc(a) _MMalloc(a,__FILE__,__LINE__)
  41. #define copyOfString(a) _copyOfString(a,__FILE__,__LINE__)
  42.  
  43. extern char *_MMalloc(int,const char *,int);
  44. extern char *_copyOfString(const char *,const char *,int);
  45. #else
  46. extern char *MMalloc(int);
  47. extern char *copyOfString(const char *);
  48. extern char *_MMalloc(int,const char *,int);
  49. extern char *_copyOfString(const char *,const char *,int);
  50. #endif
  51.  
  52. extern void MInitMemory();
  53. extern void MFreeMemory();
  54.  
  55. #ifdef __cplusplus
  56. }
  57. #endif
  58.  
  59. #endif
  60.  
  61.  
  62.