home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / sd386v50.zip / sd386src.zip / BASE.H < prev    next >
C/C++ Source or Header  |  1995-10-18  |  8KB  |  134 lines

  1. /*****************************************************************************/
  2. /* File:                                             IBM INTERNAL USE ONLY   */
  3. /*   base.h                                                                  */
  4. /*                                                                           */
  5. /* Description:                                                              */
  6. /*   base definitions                                                        */
  7. /*                                                                           */
  8. /* History:                                                                  */
  9. /*                                                                           */
  10. /*   02/08/91 Creation of 32-bit SD86, from 16-bit version.                  */
  11. /*                                                                           */
  12. /*...Release 1.00                                                            */
  13. /*...                                                                        */
  14. /*... 02/08/91  100   made changes for 32-bit compilation.                   */
  15. /*...                                                                        */
  16. /*...Release 1.00 (After pre-release 1.08)                                   */
  17. /*...                                                                        */
  18. /*... 02/12/92  521   Joe       Port to C-Set/2.                             */
  19. /*...                           ( some macros moved to dfile.h )             */
  20. /*...                                                                        */
  21. /*...Release 1.01 (04/03/92)                                                 */
  22. /*...                                                                        */
  23. /*... 05/08/92  701   Srinivas  Cua Interface.                               */
  24. /*... 09/21/92  706   Joe       Fix for 32-16 C-Set/2 call unwind.           */
  25. /*...                                                                        */
  26. /*...Release 1.02 (10/22/92)                                                 */
  27. /*...                                                                        */
  28. /*... 03/03/93  813   Joe       Revised types handling for HL03.             */
  29. /*****************************************************************************/
  30.  
  31. /*****************************************************************************/
  32. /*                             DATA TYPES                                    */
  33. /*****************************************************************************/
  34. #ifdef INCL_BASE                                                        /*813*/
  35. typedef unsigned char   uchar;
  36. typedef unsigned int    uint;
  37. typedef unsigned long   ulong;
  38. typedef unsigned short  ushort;
  39. typedef unsigned short  twoc;           /* two characters                    */
  40. typedef unsigned int    fourc;          /* four characters                   */
  41.  
  42. typedef uint (* _System UINTFUNC)(uint,...);  /*                          521*/
  43.  
  44. typedef uchar varstr[1];                /* Length byte, bytes of data        */
  45. typedef uchar STRING[10];               /* string of 10 chars             701*/
  46.  
  47. typedef unsigned short OFFSET;                                          /*226*/
  48. typedef unsigned int SELECTOR;
  49.  
  50. /*****************************************************************************/
  51. /*                         MISCELLANEOUS CONSTANTS                           */
  52. /*****************************************************************************/
  53.  
  54. #define   YES    1
  55. #define   NO     0
  56. #undef    NULL
  57. #define   NULL   0
  58. /*****************************************************************************/
  59. /* SD386, in order to try to eliminate the confusion over the definition,    */
  60. /* has commented all definitions in the c and os2 header files and provided  */
  61. /* its own definition.                                                       */
  62. /*****************************************************************************/
  63.  
  64. #define MAXUINT    ((uint)-1)
  65. #define MAXINT     MAXUINT/2
  66. #define MAXSEGSIZE 65536L
  67. #define MAXPER   150         /* max # of screen rows which can be handled 518*/
  68. #define PROMAX 255
  69. #define MAXCOLS 255                     /* max # of chars used / line of text*/
  70. #define MAXSYM  255                     /* max # of chars for a symbol    809*/
  71. #define MAXAFRAMES 100                  /* max # of active stack frames   706*/
  72. #define MAXTRDS 20                      /* max # of active threads           */
  73. #define MAXEXECS 20                     /* max # of active exec'ed processes */
  74. #define MAXEXEMID 500                   /* max module id for the EXE file    */
  75.  
  76. /*****************************************************************************/
  77. /* Views                                                                     */
  78. /*****************************************************************************/
  79.  
  80. #define  SOURCEVIEW            1                                        /*701*/
  81. #define  ASSEMBLYVIEW          2                                        /*701*/
  82. #define  DATAVIEW              3                                        /*701*/
  83. #define  ACTBARVIEW            4        /* event occurred on action bar   701*/
  84. #define  DATAVIEWASM           5                                        /*701*/
  85. #define  DATAVIEWSRC           6                                        /*701*/
  86. #define  EXPANDDATA            7       /* 701                              */
  87. #define  BROWSEFILE            8       /* 701                              */
  88. #define  BROWSEMSHFILE         9                                        /*701*/
  89. /*****************************************************************************/
  90. /* areas in the storage window.                                           701*/
  91. /*****************************************************************************/
  92. #define  EDITAREA              1        /* edit area in data window.      701*/
  93. #define  STORAGEAREA           2        /* storage area in data window.   701*/
  94. #define  ASCIIAREA             3        /* ascii area in data window.     701*/
  95.  
  96. /*****************************************************************************/
  97. /* This is a return code used in mouse support to return back to the callr701*/
  98. /* for an update of the field being edited in the storage or ascii area.  701*/
  99. /*****************************************************************************/
  100. #define RECIRCULATE 2                   /*                                701*/
  101.  
  102. #define  SHRINKUPARROWCOL     73
  103. #define  EXPANDDNARROWCOL     75
  104.  
  105. /*****************************************************************************/
  106. /* This is the maximum name length for symbols and types subsections.     813*/
  107. /*  255 for the name + 2 for the length prefix + 1 for \0 terminator.     813*/
  108. /*****************************************************************************/
  109. #define  MAXNAMELEN  258
  110.  
  111. #endif                                                                  /*813*/
  112. /*****************************************************************************/
  113. /*                         POINTER MANIPULATION MACROS                       */
  114. /*****************************************************************************/
  115. #ifdef INCL_MACROS                                                      /*813*/
  116.  
  117. #define HiFlat(p)           (*( (USHORT *)(void*)&(p) + 1 ))
  118. #define LoFlat(p)           (*( (USHORT *)&(p) ))
  119.  
  120. #define Sel2Flat(s)         (((ULONG)(((USHORT)s)>>3))<<16)
  121. #define Flat2Sel(p)         ((SEL)((HiFlat(p)<<3) | 7))
  122. #define OffOf(p)            (*( (UINT *)&(p) ))
  123. #define SelOf(p)            (*( (UINT *)(void*)&(p) + 1 ))
  124.  
  125. /*****************************************************************************/
  126. /*                           BIT MANIPULATION MACROS                         */
  127. /*****************************************************************************/
  128.  
  129. #define SetBitOff(v,b) ((v) &= ~(b))
  130. #define SetBit(X,N) ((X) |= (1UL<<(N)))
  131. #define ResetBit(X,N) ((X) &= ~(1UL<<(N)))
  132. #define TestBit(X,N) ((X) & (1UL<<(N)))
  133. #endif                                                                  /*813*/
  134.