home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / crt / src / memory.h < prev    next >
C/C++ Source or Header  |  1998-06-17  |  3KB  |  109 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  /* _MSC_VER > 1000 */
  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  /* !defined (_WIN32) && !defined (_MAC) */
  25.  
  26. #ifndef _CRTBLD
  27. /* This version of the header files is NOT for user programs.
  28.  * It is intended for use when building the C runtimes ONLY.
  29.  * The version intended for public use will not have this message.
  30.  */
  31. #error ERROR: Use of C runtime library internal header file.
  32. #endif  /* _CRTBLD */
  33.  
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif  /* __cplusplus */
  37.  
  38. #ifndef _INTERNAL_IFSTRIP_
  39. #include <cruntime.h>
  40. #endif  /* _INTERNAL_IFSTRIP_ */
  41.  
  42.  
  43. /* Define _CRTIMP */
  44.  
  45. #ifndef _CRTIMP
  46. #ifdef CRTDLL
  47. #define _CRTIMP __declspec(dllexport)
  48. #else  /* CRTDLL */
  49. #ifdef _DLL
  50. #define _CRTIMP __declspec(dllimport)
  51. #else  /* _DLL */
  52. #define _CRTIMP
  53. #endif  /* _DLL */
  54. #endif  /* CRTDLL */
  55. #endif  /* _CRTIMP */
  56.  
  57.  
  58. /* Define __cdecl for non-Microsoft compilers */
  59.  
  60. #if (!defined (_MSC_VER) && !defined (__cdecl))
  61. #define __cdecl
  62. #endif  /* (!defined (_MSC_VER) && !defined (__cdecl)) */
  63.  
  64. /* Define _CRTAPI1 (for compatibility with the NT SDK) */
  65.  
  66. #ifndef _CRTAPI1
  67. #if _MSC_VER >= 800 && _M_IX86 >= 300
  68. #define _CRTAPI1 __cdecl
  69. #else  /* _MSC_VER >= 800 && _M_IX86 >= 300 */
  70. #define _CRTAPI1
  71. #endif  /* _MSC_VER >= 800 && _M_IX86 >= 300 */
  72. #endif  /* _CRTAPI1 */
  73.  
  74.  
  75. #ifndef _SIZE_T_DEFINED
  76. typedef unsigned int size_t;
  77. #define _SIZE_T_DEFINED
  78. #endif  /* _SIZE_T_DEFINED */
  79.  
  80. /* Function prototypes */
  81.  
  82. _CRTIMP void *  __cdecl _memccpy(void *, const void *, int, unsigned int);
  83. _CRTIMP void *  __cdecl memchr(const void *, int, size_t);
  84. _CRTIMP int     __cdecl _memicmp(const void *, const void *, unsigned int);
  85. #ifdef _M_MRX000
  86. _CRTIMP int     __cdecl memcmp(const void *, const void *, size_t);
  87. _CRTIMP void *  __cdecl memcpy(void *, const void *, size_t);
  88. _CRTIMP void *  __cdecl memset(void *, int, size_t);
  89. #else  /* _M_MRX000 */
  90.         int     __cdecl memcmp(const void *, const void *, size_t);
  91.         void *  __cdecl memcpy(void *, const void *, size_t);
  92.         void *  __cdecl memset(void *, int, size_t);
  93. #endif  /* _M_MRX000 */
  94.  
  95. #if !__STDC__
  96.  
  97. /* Non-ANSI names for compatibility */
  98.  
  99. _CRTIMP void * __cdecl memccpy(void *, const void *, int, unsigned int);
  100. _CRTIMP int __cdecl memicmp(const void *, const void *, unsigned int);
  101.  
  102. #endif  /* !__STDC__ */
  103.  
  104. #ifdef __cplusplus
  105. }
  106. #endif  /* __cplusplus */
  107.  
  108. #endif  /* _INC_MEMORY */
  109.