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

  1. /***
  2. *oscalls.h - contains declarations of Operating System types and constants.
  3. *
  4. *       Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. *       Declares types and constants that are defined by the target OS.
  8. *
  9. *       [Internal]
  10. *
  11. ****/
  12.  
  13. #if _MSC_VER > 1000
  14. #pragma once
  15. #endif  /* _MSC_VER > 1000 */
  16.  
  17. #ifndef _INC_OSCALLS
  18. #define _INC_OSCALLS
  19.  
  20. #ifndef _CRTBLD
  21. /*
  22.  * This is an internal C runtime header file. It is used when building
  23.  * the C runtimes only. It is not to be used as a public header file.
  24.  */
  25. #error ERROR: Use of C runtime library internal header file.
  26. #endif  /* _CRTBLD */
  27.  
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif  /* __cplusplus */
  31.  
  32. #ifdef _WIN32
  33.  
  34. #ifdef NULL
  35. #undef  NULL
  36. #endif  /* NULL */
  37.  
  38. #if defined (_DEBUG) && defined (_WIN32)
  39.  
  40. void DbgBreakPoint(void);
  41. int DbgPrint(char *Format, ...);
  42.  
  43. #endif  /* defined (_DEBUG) && defined (_WIN32) */
  44.  
  45. #define NOMINMAX
  46.  
  47. #include <windows.h>
  48.  
  49. #undef  NULL
  50. #ifndef NULL
  51. #ifdef __cplusplus
  52. #define NULL    0
  53. #else  /* __cplusplus */
  54. #define NULL    ((void *)0)
  55. #endif  /* __cplusplus */
  56. #endif  /* NULL */
  57.  
  58. /* File time and date types */
  59.  
  60. typedef struct _FTIME {         /* ftime */
  61.     unsigned short twosecs : 5;
  62.     unsigned short minutes : 6;
  63.     unsigned short hours   : 5;
  64. } FTIME;
  65. typedef FTIME   *PFTIME;
  66.  
  67. typedef struct _FDATE {         /* fdate */
  68.     unsigned short day     : 5;
  69.     unsigned short month   : 4;
  70.     unsigned short year    : 7;
  71. } FDATE;
  72. typedef FDATE   *PFDATE;
  73.  
  74. #else  /* _WIN32 */
  75.  
  76.  
  77. #ifdef _MAC
  78.  
  79. #else  /* _MAC */
  80.  
  81. #error ERROR - ONLY WIN32, POSIX, OR MAC TARGET SUPPORTED!
  82.  
  83. #endif  /* _MAC */
  84.  
  85.  
  86. #endif  /* _WIN32 */
  87.  
  88. #ifdef __cplusplus
  89. }
  90. #endif  /* __cplusplus */
  91.  
  92. #endif  /* _INC_OSCALLS */
  93.