Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
1.9 KiB

  1. /*
  2. ** nsctypes.h - Local Standard Data Types
  3. **
  4. ** Portions Copyright (C) 1996-1998 National Semiconductor Corp.
  5. ** All rights reserved.
  6. ** Copyright (C) 1996-1998 Microsoft Corporation. All Rights Reserved.
  7. **
  8. ** $Id$
  9. **
  10. ** $Log$
  11. **
  12. **
  13. */
  14. #ifndef _nsctypes_h_
  15. #define _nsctypes_h_ 1
  16. #ifdef __BORLANDC__
  17. #define MSDOS 1
  18. #endif
  19. #ifdef sparc
  20. #define _FAR_
  21. #define cdecl
  22. #endif
  23. #ifdef NDIS_NT
  24. #define _FAR_
  25. #endif
  26. #ifdef NDIS50_MINIPORT
  27. #define _FAR_
  28. #endif
  29. #ifdef SCO_UNIX
  30. #define _FAR_
  31. #endif
  32. #ifdef MSDOS
  33. #define _FAR_ __far
  34. #endif
  35. #ifdef ODI32
  36. #define _FAR_
  37. #endif
  38. #ifdef CHICAGO
  39. #define _FAR_
  40. #endif
  41. #ifdef DOS_32
  42. #ifdef _FAR_
  43. #undef _FAR_
  44. #endif
  45. #define _FAR_
  46. #endif
  47. #ifndef NDIS50_MINIPORT
  48. #ifndef FALSE
  49. #define FALSE 0
  50. #endif
  51. #ifndef TRUE
  52. #define TRUE (!FALSE)
  53. #endif
  54. #endif
  55. #ifndef NULL
  56. #define NULL 0
  57. #endif
  58. #ifndef min
  59. #define min(a,b) ((a)<(b)?(a):(b))
  60. #endif
  61. #ifndef max
  62. #define max(a,b) ((a)>(b)?(a):(b))
  63. #endif
  64. typedef unsigned long uint32;
  65. typedef unsigned short uint16;
  66. typedef unsigned char uchar;
  67. typedef long int32;
  68. typedef short int16;
  69. typedef int bool;
  70. typedef uint32 _FAR_ *uint32P;
  71. typedef uint16 _FAR_ *uint16P;
  72. typedef uchar _FAR_ *ucharP;
  73. typedef char _FAR_ *charP;
  74. typedef void _FAR_ *PVOID;
  75. /* macro useful for converting structure field names to
  76. ** byte offsets */
  77. #define FieldOffset(s,x) ((int)&(((s *)0)->x))
  78. #ifndef CHICAGO
  79. #ifndef GUI_BUILD
  80. #define LOBYTE(w) ((uchar)(w))
  81. #define HIBYTE(w) ((uchar)((uint16)(w) >> 8))
  82. #define LOWORD(l) ((uint16)(uint32)(l))
  83. #define HIWORD(l) ((uint16)(((uint32)(l)) >> 16))
  84. #endif /* GUI_BUILD */
  85. #endif /* CHICAGO */
  86. #define MAKEUINT16( msb, lsb ) (((uint16)msb << 8) + lsb)
  87. #define MAKEUINT32(hi, lo) ((uint32)(((uint16)(lo)) | (((uint32)((uint16)(hi))) << 16)))
  88. #define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
  89. #endif