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