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