home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / k95source / ckoker.h < prev    next >
C/C++ Source or Header  |  2020-01-01  |  2KB  |  69 lines

  1. /*
  2.   Author: Jeffrey E Altman <jaltman@secure-endpoints.com>,
  3.             Secure Endpoints Inc., New York City.
  4.  
  5.   Copyright (C) 1985, 2004, Trustees of Columbia University in the City of New
  6.   York.
  7. */
  8.  
  9. #ifndef CKOKER_H
  10. #define CKOKER_H
  11.  
  12. #include <stdlib.h>
  13. #include <string.h>
  14. typedef unsigned int size_t;
  15.  
  16. /* Like malloc, but calls fatal() if out of memory. */
  17. void   *kmalloc(size_t size);
  18.  
  19. /* Like realloc, but calls fatal() if out of memory. */
  20. void   *krealloc(void *ptr, size_t new_size);
  21.  
  22. /* Frees memory allocated using kmalloc or krealloc. */
  23. void    kfree(void *ptr);
  24.  
  25. /* Allocates memory using kmalloc, and copies the string into that memory. */
  26. char   *kstrdup(const char *str);
  27.  
  28. #define malloc(x) kmalloc(x)
  29. #define realloc(x,y) krealloc(x,y)
  30. #define free(x) kfree(x)
  31. #define strdup(x) kstrdup(x)
  32.  
  33. #ifdef NT
  34. #ifdef __STDC__
  35. #define stricmp _stricmp
  36. #define putenv _putenv
  37. #define sopen _sopen
  38. #define strupr _strupr
  39. #define close _close
  40. #define stat _stat
  41. #define fileno _fileno
  42. #define sys_errlist _sys_errlist
  43. #define unlink _unlink
  44. #define write _write
  45. #define creat _creat
  46. #define getpid _getpid
  47. #define utime _utime
  48. #define mktemp _mktemp
  49. #define strnicmp _strnicmp
  50. #define read _read
  51. #define open _open
  52. #define access _access
  53. #define wcsdup _wcsdup
  54. #define chmod _chmod
  55. #define fstat _fstat
  56. #define ftime _ftime
  57. #endif /* __STDC__ */
  58. #define isascii __isascii
  59. #endif /* NT */
  60.  
  61. #define NOJC
  62.  
  63. /* For OS/2 debugging... */
  64. #ifdef __IBMC__
  65. #ifdef __DEBUG
  66. #endif /* __DEBUG */
  67. #endif /* __IBMC__ */
  68. #endif /* CKOKER_H */
  69.