termios.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #ifndef _TERMIOS_H
  2. #define _TERMIOS_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <features.h>
  7. #define __NEED_pid_t
  8. #include <bits/alltypes.h>
  9. typedef unsigned char cc_t;
  10. typedef unsigned int speed_t;
  11. typedef unsigned int tcflag_t;
  12. struct winsize {
  13. unsigned short ws_row;
  14. unsigned short ws_col;
  15. unsigned short ws_xpixel;
  16. unsigned short ws_ypixel;
  17. };
  18. #define NCCS 32
  19. #include <bits/termios.h>
  20. speed_t cfgetospeed (const struct termios *);
  21. speed_t cfgetispeed (const struct termios *);
  22. int cfsetospeed (struct termios *, speed_t);
  23. int cfsetispeed (struct termios *, speed_t);
  24. int tcgetattr (int, struct termios *);
  25. int tcsetattr (int, int, const struct termios *);
  26. int tcgetwinsize (int, struct winsize *);
  27. int tcsetwinsize (int, const struct winsize *);
  28. int tcsendbreak (int, int);
  29. int tcdrain (int);
  30. int tcflush (int, int);
  31. int tcflow (int, int);
  32. pid_t tcgetsid (int);
  33. #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
  34. void cfmakeraw(struct termios *);
  35. int cfsetspeed(struct termios *, speed_t);
  36. #endif
  37. #ifdef __cplusplus
  38. }
  39. #endif
  40. #endif