home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_122 / 2.ddi / RTLINSRC.ZIP / RULES.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  2.3 KB  |  77 lines

  1. /*------------------------------------------------------------------------
  2.  * filename - rules.h
  3.  *
  4.  *      Standard rules for C
  5.  *-----------------------------------------------------------------------*/
  6.  
  7. /*[]------------------------------------------------------------[]*/
  8. /*|                                                              |*/
  9. /*|     C/C++ Run Time Library - Version 4.0                     |*/
  10. /*|                                                              |*/
  11. /*|                                                              |*/
  12. /*|     Copyright (c) 1987, 1991 by Borland International        |*/
  13. /*|     All Rights Reserved.                                     |*/
  14. /*|                                                              |*/
  15. /*[]------------------------------------------------------------[]*/
  16.  
  17.  
  18. #ifdef __STDC__
  19. #define _Cdecl
  20. #else
  21. #define _Cdecl  cdecl
  22. #endif
  23.  
  24. #ifndef __PAS__
  25. #define _CType _Cdecl
  26. #else
  27. #define _CType pascal
  28. #endif
  29.  
  30. /*      Precise types for portability and clarity of intent.
  31.  
  32. - chars are for strings or text (16 bits for Oriental or video buffers)
  33. - ordinals are for indexes and offsets
  34. - cardinals count how many of something
  35. - integers can be negative
  36. - bitsets are for bits, unknown patterns, and binary trickery
  37. */
  38.  
  39. typedef enum { false, true }   booleanT;
  40. typedef unsigned char   boolean;
  41.  
  42. typedef signed   char   int8;
  43. typedef char            char8;
  44. typedef unsigned char   card8;
  45. typedef unsigned char   ord8;
  46. typedef unsigned char   bits8;
  47.  
  48. typedef short           int16;
  49. typedef unsigned short  char16;
  50. typedef unsigned short  card16;
  51. typedef unsigned short  ord16;
  52. typedef unsigned short  bits16;
  53.  
  54. typedef long            int32;
  55. typedef unsigned long   card32;
  56. typedef unsigned long   ord32;
  57. typedef unsigned long   bits32;
  58.  
  59. typedef short   status;                 /* >0 = OK, minus is error/failure  */
  60. typedef short   handle;                 /* 0..19 are files, -1 = failure    */
  61. typedef unsigned short  keyval;         /* key code, including special keys */
  62.  
  63.  
  64. #ifndef MIN
  65. #   define MIN(a,b)  ((a) < (b) ? (a) : (b))
  66. #endif
  67. #ifndef MAX
  68. #   define MAX(a,b)  ((a) > (b) ? (a) : (b))
  69. #endif
  70. #ifndef NULL
  71. #   define NULL ((void *)0)
  72. #endif
  73.  
  74. #define O_WP    "w+"
  75. #define O_WPB   "w+b"
  76. #define O_RPB   "r+b"
  77.