home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 May / PCWorld_2002-05_cd.bin / Software / TemaCD / activetcltk / ActiveTcl8.3.4.1-8.win32-ix86.exe / ActiveTcl8.3.4.1-win32-ix86 / include / util / mtrf.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-22  |  908 b   |  47 lines

  1.  
  2. #ifndef MTRF_HEADER
  3. #define MTRF_HEADER
  4.  
  5. /* Header file: mtfr.h */
  6. #if defined(__STDC__) || defined(__GNUC__) || defined(sgi)
  7. #define PROTO(ARGS)    ARGS
  8. #else
  9. #define PROTO(ARGS)    ()
  10. #endif
  11.  
  12. char *mtrf_malloc PROTO((int bytes)) ;
  13. char *mtrf_realloc PROTO((char *ptr, int bytes)) ;
  14. int mtrf_free PROTO((char *p)) ;
  15. char *mtrf_strdup PROTO((char *p)) ;
  16. void mtrf_set_dealloc PROTO((int n)) ;
  17. void mtrf_set_verbose PROTO((int n)) ;
  18. int mtrf_get_dealloc PROTO((void)) ;
  19. int mtrf_get_verbose PROTO((void)) ;
  20.  
  21. #ifdef REDEFINE_ALLOCATION
  22. #ifdef malloc
  23. #       undef malloc
  24. #endif
  25. #define malloc(_a)          mtrf_malloc((_a))
  26.  
  27. #ifdef realloc
  28. #       undef realloc
  29. #endif
  30. #define realloc(_a,_b)      mtrf_realloc ((_a), (_b))
  31.  
  32. #ifdef free
  33. #       undef free
  34. #endif
  35. #define free(_a)            mtrf_free ((_a))
  36.  
  37. #ifdef strdup
  38. #       undef strdup
  39. #endif
  40. #define strdup(_a)          mtrf_strdup ((_a))
  41. #endif
  42.  
  43.  
  44.  
  45.  
  46. #endif
  47.