home *** CD-ROM | disk | FTP | other *** search
/ Atari FTP / ATARI_FTP_0693.zip / ATARI_FTP_0693 / Mint / mntinc32.zoo / ioctl.h < prev    next >
C/C++ Source or Header  |  1993-06-17  |  3KB  |  175 lines

  1. #ifndef    _IOCTL_H
  2. #define _IOCTL_H
  3.  
  4. #ifndef _COMPILER_H
  5. #include <compiler.h>
  6. #endif
  7.  
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11.  
  12. #define TIOCGETP    (('T'<< 8) | 0)
  13. #define TIOCSETP    (('T'<< 8) | 1)
  14. #define TIOCSETN    TIOCSETP
  15. #define TIOCGETC    (('T'<< 8) | 2)
  16. #define TIOCSETC    (('T'<< 8) | 3)
  17. #define TIOCGLTC    (('T'<< 8) | 4)
  18. #define TIOCSLTC    (('T'<< 8) | 5)
  19. #define TIOCGWINSZ    (('T'<< 8) | 11)
  20. #define TIOCSWINSZ    (('T'<< 8) | 12)
  21.  
  22. #ifdef __MINT__
  23. #define FSTAT        (('F'<< 8) | 0)
  24. #define FIONREAD    (('F'<< 8) | 1)
  25. #define FIONWRITE    (('F'<< 8) | 2)
  26. #define FUTIME        (('F'<< 8) | 3)
  27. #define FTRUNCATE    (('F'<< 8) | 4)
  28. #define TIOCGPGRP    (('T'<< 8) | 6)
  29. #define TIOCSPGRP    (('T'<< 8) | 7)
  30. #define TIOCFLUSH    (('T'<< 8) | 8)
  31. #define TIOCSTOP    (('T'<< 8) | 9)
  32. #define TIOCSTART    (('T'<< 8) | 10)
  33. #define TIOCGXKEY    (('T'<< 8) | 13)
  34. #define TIOCSXKEY    (('T'<< 8) | 14)
  35.  
  36. #define TIOCIBAUD    (('T'<< 8) | 18)
  37. #define TIOCOBAUD    (('T'<< 8) | 19)
  38. #define TIOCCBRK    (('T'<< 8) | 20)
  39. #define TIOCSBRK    (('T'<< 8) | 21)
  40. #define TIOCGFLAGS    (('T'<< 8) | 22)
  41. #define TIOCSFLAGS    (('T'<< 8) | 23)
  42.  
  43. /* faked by the library */
  44. #define TIOCNOTTY    (('T'<<8) | 251)
  45.  
  46. /* not yet implemented in MiNT */
  47. #define TIOCGETD    (('T'<<8) | 252)
  48. #define TIOCSETD    (('T'<<8) | 253)
  49. #define TIOCLGET    (('T'<<8) | 254)
  50. #define TIOCLSET    (('T'<<8) | 255)
  51.  
  52. #define NTTYDISC    1
  53.  
  54. /* ioctl's to act on processes */
  55. #define PPROCADDR    (('P'<<8) | 1)
  56. #define PBASEADDR    (('P'<<8) | 2)
  57. #define PCTXTSIZE    (('P'<< 8) | 3)
  58. #define PSETFLAGS    (('P'<< 8) | 4)
  59. #define PGETFLAGS    (('P'<< 8) | 5)
  60.  
  61. /* shared memory ioctl's */
  62. #define SHMGETBLK    (('M'<< 8) | 0)
  63. #define SHMSETBLK    (('M'<< 8) | 1)
  64.  
  65. #endif /* __MINT__ */
  66.  
  67. struct tchars {
  68.     char    t_intrc;
  69.     char    t_quitc;
  70.     char    t_startc;
  71.     char    t_stopc;
  72.     char    t_eofc;
  73.     char    t_brkc;
  74. };
  75.  
  76. struct ltchars {
  77.     char    t_suspc;
  78.     char    t_dsuspc;
  79.     char    t_rprntc;
  80.     char    t_flushc;
  81.     char    t_werasc;
  82.     char    t_lnextc;
  83. };
  84.  
  85. #define    CRMOD        0x0001
  86. #define    CBREAK        0x0002
  87. #define    ECHO        0x0004
  88. #define    XTABS        0x0008
  89. #define    RAW        0x0010
  90. #define LCASE        0x0020        /* does nothing */
  91. #define TANDEM        0x1000
  92. #define EVENP        0x4000
  93. #define ODDP        0x8000
  94. #define ANYP        (0)
  95.  
  96. /* Only ones that are likely to be used are here */
  97. /* ok, but emacs thinks it knows their value */
  98. #define B0        0
  99. #define B50        1
  100. #define B75        2
  101. #define B110        3
  102. #define B135        4
  103. #define B150        5
  104. #define B200        6
  105. #define B300        7
  106. #define B600        8
  107. #define B1200        9
  108. #define B1800        10
  109. #define B2400        11
  110. #define B4800        12
  111. #define B9600        13
  112. #define B19200        14
  113. #define B38400        15
  114.  
  115.  
  116. /* The ones below aren't supported by the kernel, at least not yet */
  117. #define VTDELAY        0
  118. #define ALLDELAY    0
  119.  
  120. #ifdef __MINT__
  121.  
  122. #define TOSTOP        0x0100
  123. #define XKEY        0x0200
  124.  
  125. struct xkey {
  126.     short    xk_num;
  127.     char    xk_def[8];
  128. };
  129.  
  130. /* some fake defines for the line discipline stuff */
  131.  
  132. #define LCRTBS        0x01
  133. #define LCRTERA        0x02
  134. #define LCRTKIL        0x04
  135. #define LPRTERA        0x10
  136. #define LFLUSHO        0x20
  137. #define LLITOUT        0x100
  138.  
  139. #else
  140.  
  141. #define META        0x0100        /* extension: Alternate as meta key */
  142. #define PASS8        0x0100
  143.  
  144. #endif /* __MINT__ */
  145.  
  146. struct sgttyb {
  147.     char    sg_ispeed;
  148.     char    sg_ospeed;
  149.     char    sg_erase;
  150.     char    sg_kill;
  151.     short    sg_flags;
  152. };
  153.  
  154. struct winsize {
  155.     short    ws_row;
  156.     short    ws_col;
  157.     short    ws_xpixel;
  158.     short    ws_ypixel;
  159. };
  160.  
  161. struct _mutimbuf {
  162.     unsigned short actime, acdate;    /* GEMDOS format */
  163.     unsigned short modtime, moddate;
  164. };
  165.  
  166. __EXTERN int ioctl    __PROTO((int, int, void *));
  167. __EXTERN int stty    __PROTO((int, struct sgttyb *));
  168. __EXTERN int gtty    __PROTO((int, struct sgttyb *));
  169.  
  170. #ifdef __cplusplus
  171. }
  172. #endif
  173.  
  174. #endif    /* _IOCTL_H */
  175.