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