home *** CD-ROM | disk | FTP | other *** search
/ Atari FTP / ATARI_FTP_0693.zip / ATARI_FTP_0693 / Mint / mntinc25.zoo / ostruct.h < prev    next >
C/C++ Source or Header  |  1992-09-05  |  5KB  |  201 lines

  1. #ifndef _OSTRUCT_H
  2. #define _OSTRUCT_H
  3.  
  4. #ifndef _COMPILER_H
  5. #include <compiler.h>
  6. #endif
  7.  
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11.  
  12. /*
  13.  * General OS specific codes here
  14.  *
  15.  */
  16.  
  17. /*
  18.  * GEMDOS defines and structures
  19.  */
  20.  
  21. /* Structure used by Dfree() */
  22. typedef struct {
  23.     long b_free;    /* number of free clusters */
  24.     long b_total;    /* total number of clusters */
  25.     long b_secsiz;    /* number of bytes per sector */
  26.     long b_clsiz;    /* number of sectors per cluster */
  27. } _DISKINFO;
  28.  
  29. /* Structure returned by Fdatime() */
  30. typedef struct {
  31.   short time;
  32.   short date;
  33. } _DOSTIME;
  34.  
  35. /* Structure used by Cconrs */
  36. typedef struct
  37. {
  38.         unsigned char maxlen;
  39.         unsigned char actuallen;
  40.         char    buffer[255];
  41. } _CCONLINE;
  42.  
  43. #ifdef __TURBOC__
  44. #define LINE _CCONLINE
  45. #endif
  46.  
  47. /* Structure used by Fgetdta(), Fsetdta(), Fsfirst(), Fsnext() */
  48. typedef struct _dta {
  49.     char         dta_buf[21];    /* reserved */
  50.     char            dta_attribute;    /* file attribute */
  51.     unsigned short  dta_time;        /* file time stamp */
  52.     unsigned short  dta_date;        /* file date stamp */
  53.     long            dta_size;        /* file size */
  54.     char            dta_name[14];    /* file name */
  55. } _DTA;
  56.  
  57. /* Codes used with Fsfirst() */
  58.  
  59. #define        FA_RDONLY           0x01
  60. #define        FA_HIDDEN           0x02
  61. #define        FA_SYSTEM           0x04
  62. #define        FA_LABEL            0x08
  63. #define        FA_DIR              0x10
  64. #define        FA_CHANGED          0x20
  65.  
  66. /* Codes used with Pexec */
  67.  
  68. #define        PE_LOADGO           0           /* load & go */
  69. #define        PE_LOAD             3           /* just load */
  70. #define        PE_GO               4           /* just go */
  71. #define        PE_CBASEPAGE        5           /* just create basepage */
  72. /* Tos 1.4: like 4, but memory ownership changed to child, and freed
  73.    on exit
  74.  */
  75. #define        PE_GO_FREE          6           /* just go, then free */
  76.  
  77. #ifdef __MINT__
  78. /* ers: what exactly does mode 7 do ??? */
  79. #  define    PE_ASYNC_LOADGO       100           /* load and asynchronously go */
  80. #  define       PE_ASYNC_GO       104           /* asynchronously go         */
  81. #  define       PE_ASYNC_GO_FREE   106           /* asynchronously go and free */
  82. #  define       PE_OVERLAY       200           /* load and overlay         */
  83. #endif
  84.  
  85. /*
  86.  * BIOS defines and structures
  87.  */
  88.  
  89. /* Device codes for Bconin(), Bconout(), Bcostat(), Bconstat() */
  90. #define _PRT    0
  91. #define _AUX    1
  92. #define _CON    2
  93. #define _MIDI   3
  94. #define _IKBD   4
  95. #define _RAWCON 5
  96.  
  97. /* Structure returned by Getbpb() */
  98. typedef struct {
  99.   short recsiz;         /* bytes per sector */
  100.   short clsiz;          /* sectors per cluster */
  101.   short clsizb;         /* bytes per cluster */
  102.   short rdlen;          /* root directory size */
  103.   short fsiz;           /* size of file allocation table */
  104.   short fatrec;         /* startsector of second FAT */
  105.   short datrec;         /* first data sector */
  106.   short numcl;          /* total number of clusters */
  107.   short bflags;         /* some flags */
  108. } _BPB;
  109.  
  110. /* Structures used by Getmpb() */
  111.  
  112. /* Memory descriptor */
  113. typedef struct _md {
  114.     struct _md    *md_next;    /* next descriptor in the chain */
  115.     long     md_start;    /* starting address of block */
  116.     long     md_length;    /* length of the block */
  117.     long     md_owner;    /* owner's process descriptor */
  118. } _MD;
  119.  
  120. /* Memory parameter block */
  121. typedef struct {
  122.     _MD *mp_free;        /* free memory chunks */
  123.     _MD *mp_used;        /* used memory descriptors */
  124.     _MD *mp_rover;        /* rover memory descriptor */
  125. } _MPB;
  126.  
  127.  
  128. /*
  129.  * XBIOS defines and structures
  130.  */
  131.  
  132. /* Codes used with Cursconf() */
  133. #define CURS_HIDE       0
  134. #define CURS_SHOW       1
  135. #define CURS_BLINK      2
  136. #define CURS_NOBLINK    3
  137. #define CURS_SETRATE    4
  138. #define CURS_GETRATE    5
  139.  
  140. /* Structure returned by Iorec() */
  141. typedef struct {
  142.     char    *ibuf;
  143.     short   ibufsiz;
  144.     short   ibufhd;
  145.     short   ibuftl;
  146.     short   ibuflow;
  147.     short   ibufhi;
  148. } _IOREC;
  149.  
  150. /* Structure used by Initmouse() */
  151. typedef struct {
  152.     char    topmode;
  153.     char    buttons;
  154.     char    xparam;
  155.     char    yparam;
  156. } _PARAM;
  157.  
  158. /* Structure returned by Kbdvbase() */
  159. typedef struct {
  160.     void    (*midivec)    __PROTO((void));
  161.     void    (*vkbderr)    __PROTO((void));
  162.     void    (*vmiderr)    __PROTO((void));
  163.     void    (*statvec)    __PROTO((void *));
  164.     void    (*mousevec)    __PROTO((void *));
  165.     void    (*clockvec)    __PROTO((void *));
  166.     void    (*joyvec)    __PROTO((void *));
  167.     long    (*midisys)    __PROTO((void));
  168.     long    (*ikbdsys)    __PROTO((void));
  169.     char    kbstate;
  170. } _KBDVECS;
  171.  
  172. /* Structure returned by Keytbl() */
  173. typedef struct {
  174.     void *unshift;    /* pointer to unshifted keys */
  175.     void *shift;    /* pointer to shifted keys */
  176.     void *caps;        /* pointer to capslock keys */
  177. } _KEYTAB;
  178.  
  179. /* Structure used by Prtblk() */
  180. typedef struct
  181. {
  182.         void    *pb_scrptr;
  183.         int     pb_offset;
  184.         int     pb_width;
  185.         int     pb_height;
  186.         int     pb_left;
  187.         int     pb_right;
  188.         int     pb_screz;
  189.         int     pb_prrez;
  190.         void    *pb_colptr;
  191.         int     pb_prtype;
  192.         int     pb_prport;
  193.         void    *pb_mask;
  194. } _PBDEF;
  195.  
  196. #ifdef __cplusplus
  197. }
  198. #endif
  199.  
  200. #endif /* _OSTRUCT_H */
  201.