This source file includes following definitions.
- trans_from_termio
- trans_to_termio
1
2 #ifndef _SPARC_TERMIOS_H
3 #define _SPARC_TERMIOS_H
4
5 #include <asm/ioctls.h>
6 #include <asm/termbits.h>
7
8 struct sgttyb {
9 char sg_ispeed;
10 char sg_ospeed;
11 char sg_erase;
12 char sg_kill;
13 short sg_flags;
14 };
15
16 struct tchars {
17 char t_intrc;
18 char t_quitc;
19 char t_startc;
20 char t_stopc;
21 char t_eofc;
22 char t_brkc;
23 };
24
25 struct ltchars {
26 char t_suspc;
27 char t_dsuspc;
28 char t_rprntc;
29 char t_flushc;
30 char t_werasc;
31 char t_lnextc;
32 };
33
34 struct sunos_ttysize {
35 int st_lines;
36 int st_columns;
37 };
38
39
40 #define TIOCPKT_DATA 0
41 #define TIOCPKT_FLUSHREAD 1
42 #define TIOCPKT_FLUSHWRITE 2
43 #define TIOCPKT_STOP 4
44 #define TIOCPKT_START 8
45 #define TIOCPKT_NOSTOP 16
46 #define TIOCPKT_DOSTOP 32
47
48 struct winsize {
49 unsigned short ws_row;
50 unsigned short ws_col;
51 unsigned short ws_xpixel;
52 unsigned short ws_ypixel;
53 };
54
55
56 #define N_TTY 0
57 #define N_SLIP 1
58 #define N_MOUSE 2
59 #define N_PPP 3
60
61 #ifdef __KERNEL__
62
63
64
65
66
67 #define INIT_C_CC "\003\034\177\025\001\000\000\000\021\023\032\031\022\025\027\026"
68
69
70
71
72 extern inline void trans_from_termio(struct termio * termio,
73 struct termios * termios)
74 {
75 #define SET_LOW_BITS(x,y) ((x) = (0xffff0000 & (x)) | (y))
76 SET_LOW_BITS(termios->c_iflag, termio->c_iflag);
77 SET_LOW_BITS(termios->c_oflag, termio->c_oflag);
78 SET_LOW_BITS(termios->c_cflag, termio->c_cflag);
79 SET_LOW_BITS(termios->c_lflag, termio->c_lflag);
80 #undef SET_LOW_BITS
81 memcpy(termios->c_cc, termio->c_cc, NCC);
82 }
83
84
85
86
87 extern inline void trans_to_termio(struct termios * termios,
88 struct termio * termio)
89 {
90 termio->c_iflag = termios->c_iflag;
91 termio->c_oflag = termios->c_oflag;
92 termio->c_cflag = termios->c_cflag;
93 termio->c_lflag = termios->c_lflag;
94 termio->c_line = termios->c_line;
95 memcpy(termio->c_cc, termios->c_cc, NCC);
96 }
97
98 #endif
99
100 #endif