home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / MSGDP206.SZH / OS2SUPP.H < prev    next >
Text File  |  1990-03-01  |  3KB  |  153 lines

  1. /*
  2.     Various standard defines used in OS2 interfacing
  3.  
  4. */
  5.  
  6. #ifndef OS2_SUPPORT
  7. #define OS2_SUPPORT
  8.  
  9. /* ----------- OS/2 library (readability) types ----------- */
  10.  
  11. typedef char CHAR;
  12. typedef short SHORT;
  13. typedef long LONG;
  14. typedef int INT;
  15. typedef unsigned short USHORT;
  16. typedef void VOID;
  17.  
  18. typedef unsigned char UCHAR;    /* uch */
  19. typedef unsigned long ULONG;    /* ul  */
  20. typedef unsigned int  UINT;     /* ui  */
  21. /* typedef UINT      unsigned; */    /* us  */
  22.  
  23. typedef unsigned char BYTE;     /* b   */
  24.  
  25. typedef BYTE   far *PBYTE;
  26. typedef BYTE       *NPBYTE;
  27.  
  28. typedef CHAR   far *PCHAR;
  29. typedef SHORT  far *PSHORT;
  30. typedef LONG   far *PLONG;
  31. typedef INT    far *PINT;
  32.  
  33. typedef UCHAR  far *PUCHAR;
  34. typedef USHORT far *PUSHORT;
  35. typedef ULONG  far *PULONG;
  36. typedef UINT   far *PUINT;
  37.  
  38. typedef VOID   far *PVOID;
  39.  
  40. typedef char far *PSZ;
  41. typedef char     *NPSZ;
  42.  
  43. typedef char far *PCH;
  44. typedef char     *NPCH;
  45.  
  46. /* ---------- Vio/VFOSSIL support types ------------ */
  47.  
  48. typedef struct {
  49.    int vfossil_size;
  50.    int vfossil_major;
  51.    int vfossil_revision;
  52.    int vfossil_highest;
  53. } VFOSSIL, *VFOSSILP;
  54.  
  55. typedef struct {
  56.    int     cur_start;
  57.    int     cur_end;
  58.    int     cur_wid;
  59.    int     cur_attr;
  60. } CURSOR, *CURSORP;
  61. typedef CURSOR far *PVIOCURSORINFO;
  62.  
  63. typedef struct _VIOCONFIGINFO { /* vioin */
  64.         USHORT    cb       ;
  65.         USHORT    adapter;
  66.         USHORT    display;
  67.         ULONG    cbMemory;
  68.         } VIOCONFIGINFO;
  69. typedef VIOCONFIGINFO far *PVIOCONFIGINFO;
  70.  
  71. /* structure for VioSet/GetMode() */
  72. typedef struct _VIOMODEINFO {    /* viomi */
  73.         USHORT cb;
  74.         UCHAR  fbType;
  75.         UCHAR  color;
  76.         USHORT col;
  77.         USHORT row;
  78.         USHORT hres;
  79.         USHORT vres;
  80.         UCHAR  fmt_ID;
  81.         UCHAR  attrib;
  82.         } VIOMODEINFO;
  83. typedef VIOMODEINFO far *PVIOMODEINFO;
  84.  
  85. /*----------- only include the rest of this for real OS/2 compiles ----------*/
  86.  
  87. #ifdef __OS2__
  88.  
  89. typedef struct _KBDKEYINFO {    /* kbci */
  90.         UCHAR     chChar;
  91.         UCHAR     chScan;
  92.         UCHAR     fbStatus;
  93.         UCHAR     bNlsShift;
  94.         USHORT     fsState;
  95.         ULONG     time;
  96.         }KBDKEYINFO;
  97. typedef KBDKEYINFO far *PKBDKEYINFO;
  98.  
  99. /* KBDINFO structure, for KbdSet/GetStatus */
  100. typedef struct _KBDINFO {        /* kbst */
  101.         USHORT cb;
  102.         USHORT fsMask;
  103.         USHORT chTurnAround;
  104.         USHORT fsInterim;
  105.         USHORT fsState;
  106.         }KBDINFO;
  107. typedef KBDINFO far *PKBDINFO;
  108.  
  109. #define KBD_BINARY     4
  110.  
  111. #define IO_WAIT     0
  112. #define IO_NOWAIT    1
  113.  
  114. /* File time and date types */
  115.  
  116. typedef struct _FTIME {         /* ftime */
  117.     unsigned twosecs : 5;
  118.     unsigned minutes : 6;
  119.     unsigned hours     : 5;
  120. } FTIME;
  121. typedef FTIME far *PFTIME;
  122.  
  123. typedef struct _FDATE {         /* fdate */
  124.     unsigned day     : 5;
  125.     unsigned month     : 4;
  126.     unsigned year     : 7;
  127. } FDATE;
  128. typedef FDATE far *PFDATE;
  129.  
  130. typedef struct _FILEFINDBUF {    /* findbuf */
  131.     FDATE  fdateCreation;
  132.     FTIME  ftimeCreation;
  133.     FDATE  fdateLastAccess;
  134.     FTIME  ftimeLastAccess;
  135.     FDATE  fdateLastWrite;
  136.     FTIME  ftimeLastWrite;
  137.     ULONG  cbFile;
  138.     ULONG  cbFileAlloc;
  139.     USHORT attrFile;
  140.     UCHAR  cchName;
  141.     CHAR   achName[13];
  142. } FILEFINDBUF;
  143. typedef FILEFINDBUF far *PFILEFINDBUF;
  144.  
  145. USHORT pascal far DosFindFirst (PSZ, PUSHORT, USHORT, PFILEFINDBUF, USHORT, PUSHORT, ULONG);
  146. USHORT pascal far DosFindNext (USHORT, PFILEFINDBUF, USHORT, PUSHORT);
  147. USHORT pascal far DosFindClose (USHORT);
  148.  
  149. #endif
  150.  
  151. #endif
  152.  
  153.