termios.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. #ifndef _ASM_POWERPC_TERMIOS_H
  2. #define _ASM_POWERPC_TERMIOS_H
  3. /*
  4. * Liberally adapted from alpha/termios.h. In particular, the c_cc[]
  5. * fields have been reordered so that termio & termios share the
  6. * common subset in the same order (for brain dead programs that don't
  7. * know or care about the differences).
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License
  11. * as published by the Free Software Foundation; either version
  12. * 2 of the License, or (at your option) any later version.
  13. */
  14. #include <asm/ioctls.h>
  15. #include <asm/termbits.h>
  16. struct sgttyb {
  17. char sg_ispeed;
  18. char sg_ospeed;
  19. char sg_erase;
  20. char sg_kill;
  21. short sg_flags;
  22. };
  23. struct tchars {
  24. char t_intrc;
  25. char t_quitc;
  26. char t_startc;
  27. char t_stopc;
  28. char t_eofc;
  29. char t_brkc;
  30. };
  31. struct ltchars {
  32. char t_suspc;
  33. char t_dsuspc;
  34. char t_rprntc;
  35. char t_flushc;
  36. char t_werasc;
  37. char t_lnextc;
  38. };
  39. struct winsize {
  40. unsigned short ws_row;
  41. unsigned short ws_col;
  42. unsigned short ws_xpixel;
  43. unsigned short ws_ypixel;
  44. };
  45. #define NCC 10
  46. struct termio {
  47. unsigned short c_iflag; /* input mode flags */
  48. unsigned short c_oflag; /* output mode flags */
  49. unsigned short c_cflag; /* control mode flags */
  50. unsigned short c_lflag; /* local mode flags */
  51. unsigned char c_line; /* line discipline */
  52. unsigned char c_cc[NCC]; /* control characters */
  53. };
  54. /* c_cc characters */
  55. #define _VINTR 0
  56. #define _VQUIT 1
  57. #define _VERASE 2
  58. #define _VKILL 3
  59. #define _VEOF 4
  60. #define _VMIN 5
  61. #define _VEOL 6
  62. #define _VTIME 7
  63. #define _VEOL2 8
  64. #define _VSWTC 9
  65. #ifdef __KERNEL__
  66. /* ^C ^\ del ^U ^D 1 0 0 0 0 ^W ^R ^Z ^Q ^S ^V ^U */
  67. #define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025"
  68. #endif
  69. #ifdef __KERNEL__
  70. #include <asm-generic/termios-base.h>
  71. #endif /* __KERNEL__ */
  72. #endif /* _ASM_POWERPC_TERMIOS_H */