Print this page
1060 termios missing cfmakeraw
Reviewed by: Cyril Plisko <cyril.plisko@mountall.com>
Reviewed by: Albert Lee <trisk@opensolaris.org>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/termios.h
+++ new/usr/src/uts/common/sys/termios.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
22 22 /* All Rights Reserved */
23 23
24 24
25 25 /*
26 26 * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
27 27 */
28 28
29 29 #ifndef _SYS_TERMIOS_H
30 30 #define _SYS_TERMIOS_H
31 31
32 32 #include <sys/feature_tests.h>
33 33
34 34 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
35 35 #include <sys/ttydev.h>
36 36 #include <sys/time.h>
37 37 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
38 38
39 39 #include <sys/types.h>
40 40
41 41 #ifdef __cplusplus
42 42 extern "C" {
43 43 #endif
44 44
45 45 /*
46 46 * _POSIX_VDISABLE has been defined in <sys/termios.h> since the
47 47 * introduction of the header. The POSIX standard, IEEE Std.
48 48 * 1003.1-1988 also required the existence of _POSIX_VDISABLE in
49 49 * this header. Subsequent versions of the IEEE Standard as well
50 50 * as the X/Open specifications required that _POSIX_VDISABLE be
51 51 * defined in <unistd.h> while still allowing for it's existence
52 52 * here. With the introduction of XPG6, _POSIX_VDISABLE can only
53 53 * be defined in <unistd.h>.
54 54 */
55 55 #if !defined(_XPG6) || defined(__EXTENSIONS__)
56 56 #ifndef _POSIX_VDISABLE
57 57 #define _POSIX_VDISABLE 0 /* Disable special character functions */
58 58 #endif
59 59 #endif /* !defined(_XPG6) || defined(__EXTENSIONS__) */
60 60
61 61 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
62 62 #define CTRL(c) ((c)&037)
63 63 #define IBSHIFT 16
64 64 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
65 65
66 66 /* required by termio.h and VCEOF/VCEOL */
67 67 #define _NCC 8
68 68 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
69 69 #define NCC _NCC
70 70 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
71 71
72 72 /* some defines required by POSIX */
73 73 #define NCCS 19
74 74
75 75 /*
76 76 * types defined by POSIX. These are better off in types.h, but
77 77 * the standard says that they have to be in termios.h.
78 78 */
79 79 typedef unsigned int tcflag_t;
80 80 typedef unsigned char cc_t;
81 81 typedef unsigned int speed_t;
82 82
83 83 /*
84 84 * Ioctl control packet
85 85 */
86 86 struct termios {
87 87 tcflag_t c_iflag; /* input modes */
88 88 tcflag_t c_oflag; /* output modes */
89 89 tcflag_t c_cflag; /* control modes */
90 90 tcflag_t c_lflag; /* line discipline modes */
91 91 cc_t c_cc[NCCS]; /* control chars */
92 92 };
93 93
94 94 /*
95 95 * POSIX termios functions
96 96 * These functions get mapped into ioctls.
↓ open down ↓ |
96 lines elided |
↑ open up ↑ |
97 97 */
98 98
99 99 #ifndef _KERNEL
100 100
101 101 #if defined(__STDC__)
102 102
103 103 extern speed_t cfgetospeed(const struct termios *);
104 104 extern int cfsetospeed(struct termios *, speed_t);
105 105 extern speed_t cfgetispeed(const struct termios *);
106 106 extern int cfsetispeed(struct termios *, speed_t);
107 +extern void cfmakeraw(struct termios *);
107 108 extern int tcgetattr(int, struct termios *);
108 109 extern int tcsetattr(int, int, const struct termios *);
109 110 extern int tcsendbreak(int, int);
110 111 extern int tcdrain(int);
111 112 extern int tcflush(int, int);
112 113 extern int tcflow(int, int);
113 114
114 115 #else
115 116
116 117 extern speed_t cfgetospeed();
117 118 extern int cfsetospeed();
118 119 extern speed_t cfgetispeed();
119 120 extern int cfsetispeed();
121 +extern void cfmakeraw();
120 122 extern int tcgetattr();
121 123 extern int tcsetattr();
122 124 extern int tcsendbreak();
123 125 extern int tcdrain();
124 126 extern int tcflush();
125 127 extern int tcflow();
126 128
127 129 #endif /* __STDC__ */
128 130
129 131 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
130 132
131 133 #if defined(__STDC__)
132 134 extern pid_t tcgetsid(int);
133 135 #else
134 136 extern pid_t tcgetsid();
135 137 #endif /* __STDC__ */
136 138
137 139 #endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) ... */
138 140
139 141 #endif
140 142
141 143 /* control characters */
142 144 #define VINTR 0
143 145 #define VQUIT 1
144 146 #define VERASE 2
145 147 #define VKILL 3
146 148 #define VEOF 4
147 149 #define VEOL 5
148 150 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
149 151 #define VEOL2 6
150 152 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
151 153 #define VMIN 4
152 154 #define VTIME 5
153 155 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
154 156 #define VSWTCH 7
155 157 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
156 158 #define VSTART 8
157 159 #define VSTOP 9
158 160 #define VSUSP 10
159 161 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
160 162 #define VDSUSP 11
161 163 #define VREPRINT 12
162 164 #define VDISCARD 13
163 165 #define VWERASE 14
164 166 #define VLNEXT 15
165 167 /* 16 thru 19 reserved for future use */
166 168
167 169 /*
168 170 * control characters form Xenix termio.h
169 171 */
170 172 #define VCEOF NCC /* RESERVED true EOF char (V7 compatability) */
171 173 #define VCEOL (NCC + 1) /* RESERVED true EOL char */
172 174
173 175 #define CNUL 0
174 176 #define CDEL 0177
175 177
176 178 /* S5 default control chars */
177 179 /* CINTR, CERASE and CKILL modified to SunOS traditional values */
178 180 #define CESC '\\'
179 181 #define CINTR CTRL('c')
180 182 #define CQUIT 034 /* FS, cntl | */
181 183 #define CERASE 0177 /* DEL */
182 184 #define CKILL CTRL('u')
183 185 #define CEOT 04
184 186 #define CEOL 0
185 187 #define CEOL2 0
186 188 #define CEOF 04 /* cntl d */
187 189 #define CSTART 021 /* cntl q */
188 190 #define CSTOP 023 /* cntl s */
189 191 #define CSWTCH 032 /* cntl z */
190 192 #define CNSWTCH 0
191 193 #define CSUSP CTRL('z')
192 194 #define CDSUSP CTRL('y')
193 195 #define CRPRNT CTRL('r')
194 196 #define CFLUSH CTRL('o')
195 197 #define CWERASE CTRL('w')
196 198 #define CLNEXT CTRL('v')
197 199 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
198 200
199 201
200 202 /* input modes */
201 203 #define IGNBRK 0000001
202 204 #define BRKINT 0000002
203 205 #define IGNPAR 0000004
204 206 #define PARMRK 0000010
205 207 #define INPCK 0000020
206 208 #define ISTRIP 0000040
207 209 #define INLCR 0000100
208 210 #define IGNCR 0000200
209 211 #define ICRNL 0000400
210 212 #if !defined(_POSIX_C_SOURCE) || \
211 213 (defined(_XOPEN_SOURCE) && !defined(_XPG6)) || \
212 214 defined(__EXTENSIONS__)
213 215 #define IUCLC 0001000
214 216 #endif /* !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)... */
215 217 #define IXON 0002000
216 218 #if !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
217 219 defined(__EXTENSIONS__)
218 220 #define IXANY 0004000
219 221 #endif /* !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)... */
220 222 #define IXOFF 0010000
221 223 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
222 224 #define IMAXBEL 0020000
223 225 #define DOSMODE 0100000 /* for 386 compatibility */
224 226 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
225 227
226 228 /* output modes */
227 229 #define OPOST 0000001
228 230 #if !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
229 231 defined(__EXTENSIONS__)
230 232 #if !defined(_XPG6) || defined(__EXTENSIONS__)
231 233 #define OLCUC 0000002
232 234 #endif
233 235 #define ONLCR 0000004
234 236 #define OCRNL 0000010
235 237 #define ONOCR 0000020
236 238 #define ONLRET 0000040
237 239 #define OFILL 0000100
238 240 #define OFDEL 0000200
239 241 #define NLDLY 0000400
240 242 #define NL0 0
241 243 #define NL1 0000400
242 244 #define CRDLY 0003000
243 245 #define CR0 0
244 246 #define CR1 0001000
245 247 #define CR2 0002000
246 248 #define CR3 0003000
247 249 #define TABDLY 0014000
248 250 #define TAB0 0
249 251 #define TAB1 0004000
250 252 #define TAB2 0010000
251 253 #define TAB3 0014000
252 254 #endif /* !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)... */
253 255 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
254 256 #define XTABS 0014000
255 257 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
256 258 #if !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
257 259 defined(__EXTENSIONS__)
258 260 #define BSDLY 0020000
259 261 #define BS0 0
260 262 #define BS1 0020000
261 263 #define VTDLY 0040000
262 264 #define VT0 0
263 265 #define VT1 0040000
264 266 #define FFDLY 0100000
265 267 #define FF0 0
266 268 #define FF1 0100000
267 269 #endif /* !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)... */
268 270 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
269 271 #define PAGEOUT 0200000
270 272 #define WRAP 0400000
271 273
272 274 /* control modes */
273 275 #define CBAUD 0000017
274 276 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
275 277 #define CSIZE 0000060
276 278 #define CS5 0
277 279 #define CS6 0000020
278 280 #define CS7 0000040
279 281 #define CS8 0000060
280 282 #define CSTOPB 0000100
281 283 #define CREAD 0000200
282 284 #define PARENB 0000400
283 285 #define PARODD 0001000
284 286 #define HUPCL 0002000
285 287 #define CLOCAL 0004000
286 288 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
287 289 #define RCV1EN 0010000
288 290 #define XMT1EN 0020000
289 291 #define LOBLK 0040000
290 292 #define XCLUDE 0100000 /* *V7* exclusive use coming fron XENIX */
291 293 #define CRTSXOFF 010000000000
292 294 #define CRTSCTS 020000000000
293 295 #define CIBAUD 03600000
294 296 #define PAREXT 04000000
295 297 #define CBAUDEXT 010000000
296 298 #define CIBAUDEXT 020000000
297 299
298 300 /*
299 301 * 4.4BSD hardware flow control flags
300 302 */
301 303 #define CRTS_IFLOW 010000000000
302 304 #define CCTS_OFLOW 020000000000
303 305
304 306 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
305 307
306 308 /* line discipline 0 modes */
307 309 #define ISIG 0000001
308 310 #define ICANON 0000002
309 311 #if !defined(_POSIX_C_SOURCE) || \
310 312 (defined(_XOPEN_SOURCE) && !defined(_XPG6)) || \
311 313 defined(__EXTENSIONS__)
312 314 #define XCASE 0000004
313 315 #endif /* !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)... */
314 316 #define ECHO 0000010
315 317 #define ECHOE 0000020
316 318 #define ECHOK 0000040
317 319 #define ECHONL 0000100
318 320 #define NOFLSH 0000200
319 321 #define TOSTOP 0000400
320 322 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
321 323 #define ECHOCTL 0001000
322 324 #define ECHOPRT 0002000
323 325 #define ECHOKE 0004000
324 326 #define DEFECHO 0010000
325 327 #define FLUSHO 0020000
326 328 #define PENDIN 0040000
327 329 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
328 330
329 331 #define IEXTEN 0100000 /* POSIX flag - enable POSIX extensions */
330 332 #define _TIOC ('T'<<8)
331 333
332 334 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
333 335
334 336 #define TIOC _TIOC
335 337
336 338 #define TCGETA (_TIOC|1)
337 339 #define TCSETA (_TIOC|2)
338 340 #define TCSETAW (_TIOC|3)
339 341 #define TCSETAF (_TIOC|4)
340 342 #define TCSBRK (_TIOC|5)
341 343 #define TCXONC (_TIOC|6)
342 344 #define TCFLSH (_TIOC|7)
343 345
344 346 /* Slots reserved for 386/XENIX compatibility - keyboard control */
345 347
346 348 #define TIOCKBON (_TIOC|8)
347 349 #define TIOCKBOF (_TIOC|9)
348 350 #define KBENABLED (_TIOC|10)
349 351
350 352 #ifndef IOCTYPE
351 353 #define IOCTYPE 0xff00
352 354 #endif
353 355
354 356 #define TCDSET (_TIOC|32)
355 357 #define RTS_TOG (_TIOC|33) /* 386 - "RTS" toggle define 8A1 protocol */
356 358
357 359 #define TIOCGWINSZ (_TIOC|104)
358 360 #define TIOCSWINSZ (_TIOC|103)
359 361
360 362 /*
361 363 * Softcarrier ioctls
362 364 */
363 365 #define TIOCGSOFTCAR (_TIOC|105)
364 366 #define TIOCSSOFTCAR (_TIOC|106)
365 367
366 368
367 369 /* termios ioctls */
368 370
369 371 #define TCGETS (_TIOC|13)
370 372 #define TCSETS (_TIOC|14)
371 373 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
372 374 #define TCSANOW (_TIOC|14) /* same as TCSETS */
373 375 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
374 376 #define TCSETSW (_TIOC|15)
375 377 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
376 378 #define TCSADRAIN (_TIOC|15) /* same as TCSETSW */
377 379 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
378 380 #define TCSETSF (_TIOC|16)
379 381
380 382 /*
381 383 * NTP PPS ioctls
382 384 */
383 385 #define TIOCGPPS (_TIOC|125)
384 386 #define TIOCSPPS (_TIOC|126)
385 387 #define TIOCGPPSEV (_TIOC|127)
386 388
387 389 /* Argument filled in by TIOCGPPSEV */
388 390 struct ppsclockev {
389 391 struct timeval tv;
390 392 uint_t serial;
391 393 };
392 394
393 395 #if defined(_SYSCALL32)
394 396 struct ppsclockev32 {
395 397 struct timeval32 tv;
396 398 uint32_t serial;
397 399 };
398 400 #endif /* _SYSCALL32 */
399 401
400 402 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
401 403
402 404 #define TCSAFLUSH (_TIOC|16) /* same as TCSETSF */
403 405
404 406 /* termios option flags */
405 407
406 408 #define TCIFLUSH 0 /* flush data received but not read */
407 409 #define TCOFLUSH 1 /* flush data written but not transmitted */
408 410 #define TCIOFLUSH 2 /* flush both data both input and output queues */
409 411
410 412 #define TCOOFF 0 /* suspend output */
411 413 #define TCOON 1 /* restart suspended output */
412 414 #define TCIOFF 2 /* suspend input */
413 415 #define TCION 3 /* restart suspended input */
414 416
415 417 /* TIOC ioctls for BSD, ptys, job control and modem control */
416 418
417 419 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
418 420 #define tIOC ('t'<<8)
419 421 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
420 422
421 423 /* Slots for 386/XENIX compatibility */
422 424 /* BSD includes these ioctls in ttold.h */
423 425
424 426 #ifndef _SYS_TTOLD_H
425 427
426 428 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
427 429 #define TIOCGETD (tIOC|0)
428 430 #define TIOCSETD (tIOC|1)
429 431 #define TIOCHPCL (tIOC|2)
430 432 #define TIOCGETP (tIOC|8)
431 433 #define TIOCSETP (tIOC|9)
432 434 #define TIOCSETN (tIOC|10)
433 435 #define TIOCEXCL (tIOC|13)
434 436 #define TIOCNXCL (tIOC|14)
435 437 #define TIOCFLUSH (tIOC|16)
436 438 #define TIOCSETC (tIOC|17)
437 439 #define TIOCGETC (tIOC|18)
438 440 /*
439 441 * BSD ioctls that are not the same as XENIX are included here.
440 442 * There are also some relevant ioctls from SUN/BSD sys/ttycom.h
441 443 * BSD pty ioctls like TIOCPKT are not supported in SVR4.
442 444 */
443 445
444 446 #define TIOCLBIS (tIOC|127) /* bis local mode bits */
445 447 #define TIOCLBIC (tIOC|126) /* bic local mode bits */
446 448 #define TIOCLSET (tIOC|125) /* set entire local mode word */
447 449 #define TIOCLGET (tIOC|124) /* get local modes */
448 450 #define TIOCSBRK (tIOC|123) /* set break bit */
449 451 #define TIOCCBRK (tIOC|122) /* clear break bit */
450 452 #define TIOCSDTR (tIOC|121) /* set data terminal ready */
451 453 #define TIOCCDTR (tIOC|120) /* clear data terminal ready */
452 454 #define TIOCSLTC (tIOC|117) /* set local special chars */
453 455 #define TIOCGLTC (tIOC|116) /* get local special chars */
454 456 #define TIOCOUTQ (tIOC|115) /* driver output queue size */
455 457 #define TIOCNOTTY (tIOC|113) /* void tty association */
456 458 #define TIOCSCTTY (tIOC|132) /* get a ctty */
457 459 #define TIOCSTOP (tIOC|111) /* stop output, like ^S */
458 460 #define TIOCSTART (tIOC|110) /* start output, like ^Q */
459 461 #define TIOCSILOOP (tIOC|109) /* private to Sun; do not use */
460 462 #define TIOCCILOOP (tIOC|108) /* private to Sun; do not use */
461 463
462 464 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
463 465
464 466 #endif /* end _SYS_TTOLD_H */
465 467
466 468 /* POSIX job control ioctls */
467 469
468 470 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
469 471 #define TIOCGPGRP (tIOC|20) /* get pgrp of tty */
470 472 #define TIOCSPGRP (tIOC|21) /* set pgrp of tty */
471 473 #define TIOCGSID (tIOC|22) /* get session id on ctty */
472 474
473 475 /* Miscellaneous */
474 476 #define TIOCSTI (tIOC|23) /* simulate terminal input */
475 477
476 478 /* Modem control */
477 479 #define TIOCMSET (tIOC|26) /* set all modem bits */
478 480 #define TIOCMBIS (tIOC|27) /* bis modem bits */
479 481 #define TIOCMBIC (tIOC|28) /* bic modem bits */
480 482 #define TIOCMGET (tIOC|29) /* get all modem bits */
481 483 #define TIOCM_LE 0001 /* line enable */
482 484 #define TIOCM_DTR 0002 /* data terminal ready */
483 485 #define TIOCM_RTS 0004 /* request to send */
484 486 #define TIOCM_ST 0010 /* secondary transmit */
485 487 #define TIOCM_SR 0020 /* secondary receive */
486 488 #define TIOCM_CTS 0040 /* clear to send */
487 489 #define TIOCM_CAR 0100 /* carrier detect */
488 490 #define TIOCM_CD TIOCM_CAR
489 491 #define TIOCM_RNG 0200 /* ring */
490 492 #define TIOCM_RI TIOCM_RNG
491 493 #define TIOCM_DSR 0400 /* data set ready */
492 494
493 495 /* pseudo-tty */
494 496
495 497 #define TIOCREMOTE (tIOC|30) /* remote input editing */
496 498 #define TIOCSIGNAL (tIOC|31) /* pty: send signal to slave */
497 499
498 500
499 501 /* Some more 386 xenix stuff */
500 502
501 503 #define LDIOC ('D'<<8)
502 504
503 505 #define LDOPEN (LDIOC|0)
504 506 #define LDCLOSE (LDIOC|1)
505 507 #define LDCHG (LDIOC|2)
506 508 #define LDGETT (LDIOC|8)
507 509 #define LDSETT (LDIOC|9)
508 510
509 511 /* Slots for 386 compatibility */
510 512
511 513 #define LDSMAP (LDIOC|110)
512 514 #define LDGMAP (LDIOC|111)
513 515 #define LDNMAP (LDIOC|112)
514 516 #define LDEMAP (LDIOC|113)
515 517 #define LDDMAP (LDIOC|114)
516 518
517 519 /*
518 520 * These are retained for 386/XENIX compatibility.
519 521 */
520 522
521 523 #define DIOC ('d'<<8)
522 524 #define DIOCGETP (DIOC|8) /* V7 */
523 525 #define DIOCSETP (DIOC|9) /* V7 */
524 526
525 527 /*
526 528 * Returns a non-zero value if there
527 529 * are characters in the input queue.
528 530 *
529 531 * XXX - somebody is confused here. V7 had no such "ioctl", although XENIX may
530 532 * have added it; 4BSD had FIONREAD, which returned the number of characters
531 533 * waiting, and was supposed to work on all descriptors (i.e., every driver
532 534 * should make a stab at implementing it).
533 535 */
534 536 #define FIORDCHK (('f'<<8)|3) /* V7 */
535 537 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
536 538
537 539 /*
538 540 * Speeds
539 541 */
540 542 #define B0 0
541 543 #define B50 1
542 544 #define B75 2
543 545 #define B110 3
544 546 #define B134 4
545 547 #define B150 5
546 548 #define B200 6
547 549 #define B300 7
548 550 #define B600 8
549 551 #define B1200 9
550 552 #define B1800 10
551 553 #define B2400 11
552 554 #define B4800 12
553 555 #define B9600 13
554 556 #define B19200 14
555 557 #define B38400 15
556 558 #define B57600 16
557 559 #define B76800 17
558 560 #define B115200 18
559 561 #define B153600 19
560 562 #define B230400 20
561 563 #define B307200 21
562 564 #define B460800 22
563 565 #define B921600 23
564 566
565 567 #ifndef _SYS_TTOLD_H
566 568
567 569 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
568 570 /* Windowing structure to support JWINSIZE/TIOCSWINSZ/TIOCGWINSZ */
569 571 struct winsize {
570 572 unsigned short ws_row; /* rows, in characters */
571 573 unsigned short ws_col; /* columns, in character */
572 574 unsigned short ws_xpixel; /* horizontal size, pixels */
573 575 unsigned short ws_ypixel; /* vertical size, pixels */
574 576 };
575 577 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
576 578
577 579 #endif /* end _SYS_TTOLD_H */
578 580
579 581 #ifdef __cplusplus
580 582 }
581 583 #endif
582 584
583 585 #endif /* _SYS_TERMIOS_H */
↓ open down ↓ |
454 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX