home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / memory.h < prev    next >
C/C++ Source or Header  |  1998-06-16  |  2KB  |  95 lines

  1. /***
  2. *memory.h - declarations for buffer (memory) manipulation routines
  3. *
  4. *       Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. *       This include file contains the function declarations for the
  8. *       buffer (memory) manipulation routines.
  9. *       [System V]
  10. *
  11. *       [Public]
  12. *
  13. ****/
  14.  
  15. #if     _MSC_VER > 1000
  16. #pragma once
  17. #endif
  18.  
  19. #ifndef _INC_MEMORY
  20. #define _INC_MEMORY
  21.  
  22. #if     !defined(_WIN32) && !defined(_MAC)
  23. #error ERROR: Only Mac or Win32 targets supported!
  24. #endif
  25.  
  26.  
  27. #ifdef  __cplusplus
  28. extern "C" {
  29. #endif
  30.  
  31.  
  32.  
  33. /* Define _CRTIMP */
  34.  
  35. #ifndef _CRTIMP
  36. #ifdef  _DLL
  37. #define _CRTIMP __declspec(dllimport)
  38. #else   /* ndef _DLL */
  39. #define _CRTIMP
  40. #endif  /* _DLL */
  41. #endif  /* _CRTIMP */
  42.  
  43.  
  44. /* Define __cdecl for non-Microsoft compilers */
  45.  
  46. #if     ( !defined(_MSC_VER) && !defined(__cdecl) )
  47. #define __cdecl
  48. #endif
  49.  
  50. /* Define _CRTAPI1 (for compatibility with the NT SDK) */
  51.  
  52. #ifndef _CRTAPI1
  53. #if    _MSC_VER >= 800 && _M_IX86 >= 300
  54. #define _CRTAPI1 __cdecl
  55. #else
  56. #define _CRTAPI1
  57. #endif
  58. #endif
  59.  
  60.  
  61. #ifndef _SIZE_T_DEFINED
  62. typedef unsigned int size_t;
  63. #define _SIZE_T_DEFINED
  64. #endif
  65.  
  66. /* Function prototypes */
  67.  
  68. _CRTIMP void *  __cdecl _memccpy(void *, const void *, int, unsigned int);
  69. _CRTIMP void *  __cdecl memchr(const void *, int, size_t);
  70. _CRTIMP int     __cdecl _memicmp(const void *, const void *, unsigned int);
  71. #ifdef  _M_MRX000
  72. _CRTIMP int     __cdecl memcmp(const void *, const void *, size_t);
  73. _CRTIMP void *  __cdecl memcpy(void *, const void *, size_t);
  74. _CRTIMP void *  __cdecl memset(void *, int, size_t);
  75. #else
  76.         int     __cdecl memcmp(const void *, const void *, size_t);
  77.         void *  __cdecl memcpy(void *, const void *, size_t);
  78.         void *  __cdecl memset(void *, int, size_t);
  79. #endif
  80.  
  81. #if     !__STDC__
  82.  
  83. /* Non-ANSI names for compatibility */
  84.  
  85. _CRTIMP void * __cdecl memccpy(void *, const void *, int, unsigned int);
  86. _CRTIMP int __cdecl memicmp(const void *, const void *, unsigned int);
  87.  
  88. #endif  /* __STDC__ */
  89.  
  90. #ifdef  __cplusplus
  91. }
  92. #endif
  93.  
  94. #endif  /* _INC_MEMORY */
  95.