home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / msdos / lynx / source / doslynx / inc / capalloc.h next >
Encoding:
C/C++ Source or Header  |  1994-10-25  |  1.3 KB  |  64 lines

  1. #ifndef __CAPTUREALLOCATION_H
  2. /*
  3.  *    Avoid include redundancy
  4.  */
  5. #define __CAPTUREALLOCATION_H
  6.  
  7. #ifdef __cplusplus
  8. extern "C"    {
  9. #endif /* __cplusplus */
  10.  
  11. /*
  12.  *    Copyright (c) 1994, University of Kansas, All Rights Reserved
  13.  *
  14.  *    Include File:    capalloc.h
  15.  *    Purpose:    Provide a mechanism to take over the standard C
  16.  *            dynamic memory allocation functions and channel
  17.  *            them all through the common C++ new operator for
  18.  *            enhanced memory management through the new operator
  19.  *            and the set_new_handler C++ function.
  20.  *    Remarks/Portability/Dependencies/Restrictions:
  21.  *        All functions should be callable by both C and C++ code.
  22.  *    Revision History:
  23.  *        02-25-94    created
  24.  */
  25.  
  26. /*
  27.  *    Required includes
  28.  */
  29. #include<stddef.h>
  30.  
  31. /*
  32.  *    Constant defines
  33.  */
  34. #define malloc capmalloc
  35. #define calloc capcalloc
  36. #define realloc caprealloc
  37. #define free capfree
  38.  
  39. /*
  40.  *    Data structures
  41.  */
  42.  
  43. /*
  44.  *    Global variable declarations
  45.  */
  46.  
  47. /*
  48.  *    Macros
  49.  */
  50.  
  51. /*
  52.  *    Function declarations
  53.  */
  54. extern void *capmalloc(size_t size);
  55. extern void *capcalloc(size_t nitems, size_t size);
  56. extern void *caprealloc(void *block, size_t size);
  57. extern void capfree(void *block);
  58.  
  59. #ifdef __cplusplus
  60. }; /* extern "C" */
  61. #endif /* __cplusplus */
  62.  
  63. #endif /* __CAPTUREALLOCATION_H */
  64.