GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — cpython/Modules/termios.c at v3.15.0 · python/cpython Expand file tree/ Copy pathtermios.cMore file actions 1405 lines (1271 loc) · 30 KB / Copy pathtermios.cFile metadata and controls1405 lines (1271 loc) · 30 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 /* termios.c -- POSIX terminal I/O module implementation. */ // Need limited C API version 3.13 for PyLong_AsInt() // in code generated by Argument Clinic. #include "pyconfig.h" // Py_GIL_DISABLED #ifndef Py_GIL_DISABLED # define Py_LIMITED_API 0x030d0000 #endif #include "Python.h" #include <string.h> // memset() #include <sys/ioctl.h> #include <termios.h> #include <unistd.h> // _POSIX_VDISABLE // On QNX 6, struct termio must be declared by including sys/termio.h // if TCGETA, TCSETA, TCSETAW, or TCSETAF are used. sys/termio.h must // be included before termios.h or it will generate an error. #if defined(HAVE_SYS_TERMIO_H) && !defined(__hpux) # include <sys/termio.h> #endif // Apparently, on SGI, termios.h won't define CTRL if _XOPEN_SOURCE // is defined, so we define it here. #if defined(__sgi) # define CTRL(c) ((c)&037) #endif // We could do better. Check bpo-32660 #if defined(__sun) # include <sys/filio.h> # include <sys/sockio.h> #endif /* HP-UX requires that this be included to pick up MDCD, MCTS, MDSR, * MDTR, MRI, and MRTS (apparently used internally by some things * defined as macros; these are not used here directly). */ #ifdef HAVE_SYS_MODEM_H # include <sys/modem.h> #endif /* HP-UX requires that this be included to pick up TIOCGPGRP and friends */ #ifdef HAVE_SYS_BSDTTY_H # include <sys/bsdtty.h> #endif /*[clinic input] module termios [clinic start generated code]*/ /*[clinic end generated code: output=da39a3ee5e6b4b0d input=01105c85d0ca7252]*/ #include "clinic/termios.c.h" PyDoc_STRVAR(termios__doc__, "This module provides an interface to the Posix calls for tty I/O control.\n\ For a complete description of these calls, see the Posix or Unix manual\n\ pages. It is only available for those Unix versions that support Posix\n\ termios style tty I/O control.\n\ \n\ All functions in this module take a file descriptor fd as their first\n\ argument. This can be an integer file descriptor, such as returned by\n\ sys.stdin.fileno(), or a file object, such as sys.stdin itself."); typedef struct { PyObject *TermiosError; } termiosmodulestate; static inline termiosmodulestate* get_termios_state(PyObject *module) { void *state = PyModule_GetState(module); assert(state != NULL); return (termiosmodulestate *)state; } static struct PyModuleDef termiosmodule; /*[clinic input] termios.tcgetattr fd: fildes / Get the tty attributes for file descriptor fd. Returns a list [iflag, oflag, cflag, lflag, ispeed, ospeed, cc] where cc is a list of the tty special characters (each a string of length 1, except the items with indices VMIN and VTIME, which are integers when these fields are defined). The interpretation of the flags and the speeds as well as the indexing in the cc array must be done using the symbolic constants defined in this module. [clinic start generated code]*/ static PyObject * termios_tcgetattr_impl(PyObject *module, int fd) /*[clinic end generated code: output=2b3da39db870e629 input=54dad9779ebe74b1]*/ { termiosmodulestate *state = PyModule_GetState(module); struct termios mode; int r; /* Alpine Linux can leave some fields uninitialized. */ memset(&mode, 0, sizeof(mode)); Py_BEGIN_ALLOW_THREADS r = tcgetattr(fd, &mode); Py_END_ALLOW_THREADS if (r == -1) { return PyErr_SetFromErrno(state->TermiosError); } speed_t ispeed = cfgetispeed(&mode); speed_t ospeed = cfgetospeed(&mode); PyObject *cc = PyList_New(NCCS); if (cc == NULL) { return NULL; } PyObject *v; int i; for (i = 0; i < NCCS; i++) { char ch = (char)mode.c_cc[i]; v = PyBytes_FromStringAndSize(&ch, 1); if (v == NULL) goto err; PyList_SetItem(cc, i, v); } /* Convert the MIN and TIME slots to integer. On some systems, the MIN and TIME slots are the same as the EOF and EOL slots. So we only do this in noncanonical input mode. */ if ((mode.c_lflag & ICANON) == 0) { v = PyLong_FromLong((long)mode.c_cc[VMIN]); if (v == NULL) { goto err; } if (PyList_SetItem(cc, VMIN, v) < 0) { goto err; } v = PyLong_FromLong((long)mode.c_cc[VTIME]); if (v == NULL) { goto err; } if (PyList_SetItem(cc, VTIME, v) < 0) { goto err; } } if (!(v = PyList_New(7))) { goto err; } #define ADD_LONG_ITEM(index, val) \ do { \ PyObject *l = PyLong_FromLong((long)val); \ if (l == NULL) { \ Py_DECREF(v); \ goto err; \ } \ PyList_SetItem(v, index, l); \ } while (0) ADD_LONG_ITEM(0, mode.c_iflag); ADD_LONG_ITEM(1, mode.c_oflag); ADD_LONG_ITEM(2, mode.c_cflag); ADD_LONG_ITEM(3, mode.c_lflag); ADD_LONG_ITEM(4, ispeed); ADD_LONG_ITEM(5, ospeed); #undef ADD_LONG_ITEM PyList_SetItem(v, 6, cc); return v; err: Py_DECREF(cc); return NULL; } /*[clinic input] termios.tcsetattr fd: fildes when: int attributes as term: object / Set the tty attributes for file descriptor fd. The attributes to be set are taken from the attributes argument, which is a list like the one returned by tcgetattr(). The when argument determines when the attributes are changed: termios.TCSANOW to change immediately, termios.TCSADRAIN to change after transmitting all queued output, or termios.TCSAFLUSH to change after transmitting all queued output and discarding all queued input. [clinic start generated code]*/ static PyObject * termios_tcsetattr_impl(PyObject *module, int fd, int when, PyObject *term) /*[clinic end generated code: output=bcd2b0a7b98a4bf5 input=5dafabdd5a08f018]*/ { if (!PyList_Check(term) || PyList_Size(term) != 7) { PyErr_SetString(PyExc_TypeError, "tcsetattr, arg 3: must be 7 element list"); return NULL; } /* Get the old mode, in case there are any hidden fields... */ termiosmodulestate *state = PyModule_GetState(module); struct termios mode; int r; Py_BEGIN_ALLOW_THREADS r = tcgetattr(fd, &mode); Py_END_ALLOW_THREADS if (r == -1) { return PyErr_SetFromErrno(state->TermiosError); } speed_t ispeed, ospeed; #define SET_FROM_LIST(TYPE, VAR, LIST, N) do { \ PyObject *item = PyList_GetItem(LIST, N); \ long num = PyLong_AsLong(item); \ if (num == -1 && PyErr_Occurred()) { \ return NULL; \ } \ VAR = (TYPE)num; \ } while (0) SET_FROM_LIST(tcflag_t, mode.c_iflag, term, 0); SET_FROM_LIST(tcflag_t, mode.c_oflag, term, 1); SET_FROM_LIST(tcflag_t, mode.c_cflag, term, 2); SET_FROM_LIST(tcflag_t, mode.c_lflag, term, 3); SET_FROM_LIST(speed_t, ispeed, term, 4); SET_FROM_LIST(speed_t, ospeed, term, 5); #undef SET_FROM_LIST PyObject *cc = PyList_GetItem(term, 6); if (!PyList_Check(cc) || PyList_Size(cc) != NCCS) { PyErr_Format(PyExc_TypeError, "tcsetattr: attributes[6] must be %d element list", NCCS); return NULL; } int i; PyObject *v; for (i = 0; i < NCCS; i++) { v = PyList_GetItem(cc, i); if (PyBytes_Check(v) && PyBytes_Size(v) == 1) mode.c_cc[i] = (cc_t) * PyBytes_AsString(v); else if (PyLong_Check(v)) { long num = PyLong_AsLong(v); if (num == -1 && PyErr_Occurred()) { return NULL; } mode.c_cc[i] = (cc_t)num; } else { PyErr_SetString(PyExc_TypeError, "tcsetattr: elements of attributes must be bytes objects of length 1 or integers"); return NULL; } } if (cfsetispeed(&mode, (speed_t) ispeed) == -1) return PyErr_SetFromErrno(state->TermiosError); if (cfsetospeed(&mode, (speed_t) ospeed) == -1) return PyErr_SetFromErrno(state->TermiosError); Py_BEGIN_ALLOW_THREADS r = tcsetattr(fd, when, &mode); Py_END_ALLOW_THREADS if (r == -1) return PyErr_SetFromErrno(state->TermiosError); Py_RETURN_NONE; } /*[clinic input] termios.tcsendbreak fd: fildes duration: int / Send a break on file descriptor fd. A zero duration sends a break for 0.25-0.5 seconds; a nonzero duration has a system dependent meaning. [clinic start generated code]*/ static PyObject * termios_tcsendbreak_impl(PyObject *module, int fd, int duration) /*[clinic end generated code: output=5945f589b5d3ac66 input=dc2f32417691f8ed]*/ { termiosmodulestate *state = PyModule_GetState(module); int r; Py_BEGIN_ALLOW_THREADS r = tcsendbreak(fd, duration); Py_END_ALLOW_THREADS if (r == -1) { return PyErr_SetFromErrno(state->TermiosError); } Py_RETURN_NONE; } /*[clinic input] @permit_long_summary termios.tcdrain fd: fildes / Wait until all output written to file descriptor fd has been transmitted. [clinic start generated code]*/ static PyObject * termios_tcdrain_impl(PyObject *module, int fd) /*[clinic end generated code: output=5fd86944c6255955 input=d1557e60b5ec66c5]*/ { termiosmodulestate *state = PyModule_GetState(module); int r; Py_BEGIN_ALLOW_THREADS r = tcdrain(fd); Py_END_ALLOW_THREADS if (r == -1) { return PyErr_SetFromErrno(state->TermiosError); } Py_RETURN_NONE; } /*[clinic input] termios.tcflush fd: fildes queue: int / Discard queued data on file descriptor fd. The queue selector specifies which queue: termios.TCIFLUSH for the input queue, termios.TCOFLUSH for the output queue, or termios.TCIOFLUSH for both queues. [clinic start generated code]*/ static PyObject * termios_tcflush_impl(PyObject *module, int fd, int queue) /*[clinic end generated code: output=2424f80312ec2f21 input=0f7d08122ddc07b5]*/ { termiosmodulestate *state = PyModule_GetState(module); int r; Py_BEGIN_ALLOW_THREADS r = tcflush(fd, queue); Py_END_ALLOW_THREADS if (r == -1) { return PyErr_SetFromErrno(state->TermiosError); } Py_RETURN_NONE; } /*[clinic input] termios.tcflow fd: fildes action: int / Suspend or resume input or output on file descriptor fd. The action argument can be termios.TCOOFF to suspend output, termios.TCOON to restart output, termios.TCIOFF to suspend input, or termios.TCION to restart input. [clinic start generated code]*/ static PyObject * termios_tcflow_impl(PyObject *module, int fd, int action) /*[clinic end generated code: output=afd10928e6ea66eb input=c6aff0640b6efd9c]*/ { termiosmodulestate *state = PyModule_GetState(module); int r; Py_BEGIN_ALLOW_THREADS r = tcflow(fd, action); Py_END_ALLOW_THREADS if (r == -1) { return PyErr_SetFromErrno(state->TermiosError); } Py_RETURN_NONE; } /*[clinic input] termios.tcgetwinsize fd: fildes / Get the tty winsize for file descriptor fd. Returns a tuple (ws_row, ws_col). [clinic start generated code]*/ static PyObject * termios_tcgetwinsize_impl(PyObject *module, int fd) /*[clinic end generated code: output=31825977d5325fb6 input=5706c379d7fd984d]*/ { #if defined(TIOCGWINSZ) termiosmodulestate *state = PyModule_GetState(module); struct winsize w; int r; Py_BEGIN_ALLOW_THREADS r = ioctl(fd, TIOCGWINSZ, &w); Py_END_ALLOW_THREADS if (r == -1) { return PyErr_SetFromErrno(state->TermiosError); } PyObject *v; if (!(v = PyTuple_New(2))) { return NULL; } PyTuple_SetItem(v, 0, PyLong_FromLong((long)w.ws_row)); PyTuple_SetItem(v, 1, PyLong_FromLong((long)w.ws_col)); if (PyErr_Occurred()) { Py_DECREF(v); return NULL; } return v; #elif defined(TIOCGSIZE) termiosmodulestate *state = PyModule_GetState(module); struct ttysize s; int r; Py_BEGIN_ALLOW_THREADS r = ioctl(fd, TIOCGSIZE, &s); Py_END_ALLOW_THREADS if (r == -1) { return PyErr_SetFromErrno(state->TermiosError); } PyObject *v; if (!(v = PyTuple_New(2))) { return NULL; } PyTuple_SetItem(v, 0, PyLong_FromLong((long)s.ts_lines)); PyTuple_SetItem(v, 1, PyLong_FromLong((long)s.ts_cols)); if (PyErr_Occurred()) { Py_DECREF(v); return NULL; } return v; #else PyErr_SetString(PyExc_NotImplementedError, "requires termios.TIOCGWINSZ and/or termios.TIOCGSIZE"); return NULL; #endif /* defined(TIOCGWINSZ) */ } /*[clinic input] termios.tcsetwinsize fd: fildes winsize as winsz: object / Set the tty winsize for file descriptor fd. The winsize to be set is taken from the winsize argument, which is a two-item tuple (ws_row, ws_col) like the one returned by tcgetwinsize(). [clinic start generated code]*/ static PyObject * termios_tcsetwinsize_impl(PyObject *module, int fd, PyObject *winsz) /*[clinic end generated code: output=2ac3c9bb6eda83e1 input=efc9beb16d06382a]*/ { if (!PySequence_Check(winsz) || PySequence_Size(winsz) != 2) { PyErr_SetString(PyExc_TypeError, "tcsetwinsize, arg 2: must be a two-item sequence"); return NULL; } PyObject *tmp_item; long winsz_0, winsz_1; tmp_item = PySequence_GetItem(winsz, 0); if (tmp_item == NULL) { return NULL; } winsz_0 = PyLong_AsLong(tmp_item); Py_DECREF(tmp_item); if (winsz_0 == -1 && PyErr_Occurred()) { return NULL; } tmp_item = PySequence_GetItem(winsz, 1); if (tmp_item == NULL) { return NULL; } winsz_1 = PyLong_AsLong(tmp_item); Py_DECREF(tmp_item); if (winsz_1 == -1 && PyErr_Occurred()) { return NULL; } termiosmodulestate *state = PyModule_GetState(module); #if defined(TIOCGWINSZ) && defined(TIOCSWINSZ) struct winsize w; /* Get the old winsize because it might have more fields such as xpixel, ypixel. */ if (ioctl(fd, TIOCGWINSZ, &w) == -1) { return PyErr_SetFromErrno(state->TermiosError); } w.ws_row = (unsigned short) winsz_0; w.ws_col = (unsigned short) winsz_1; if ((((long)w.ws_row) != winsz_0) || (((long)w.ws_col) != winsz_1)) { PyErr_SetString(PyExc_OverflowError, "winsize value(s) out of range."); return NULL; } int r; Py_BEGIN_ALLOW_THREADS r = ioctl(fd, TIOCSWINSZ, &w); Py_END_ALLOW_THREADS if (r == -1) { return PyErr_SetFromErrno(state->TermiosError); } Py_RETURN_NONE; #elif defined(TIOCGSIZE) && defined(TIOCSSIZE) struct ttysize s; int r; /* Get the old ttysize because it might have more fields. */ Py_BEGIN_ALLOW_THREADS r = ioctl(fd, TIOCGSIZE, &s); Py_END_ALLOW_THREADS if (r == -1) { return PyErr_SetFromErrno(state->TermiosError); } s.ts_lines = (int) winsz_0; s.ts_cols = (int) winsz_1; if ((((long)s.ts_lines) != winsz_0) || (((long)s.ts_cols) != winsz_1)) { PyErr_SetString(PyExc_OverflowError, "winsize value(s) out of range."); return NULL; } Py_BEGIN_ALLOW_THREADS r = ioctl(fd, TIOCSSIZE, &s); Py_END_ALLOW_THREADS if (r == -1) { return PyErr_SetFromErrno(state->TermiosError); } Py_RETURN_NONE; #else PyErr_SetString(PyExc_NotImplementedError, "requires termios.TIOCGWINSZ, termios.TIOCSWINSZ and/or termios.TIOCGSIZE, termios.TIOCSSIZE"); return NULL; #endif /* defined(TIOCGWINSZ) && defined(TIOCSWINSZ) */ } static PyMethodDef termios_methods[] = { TERMIOS_TCGETATTR_METHODDEF TERMIOS_TCSETATTR_METHODDEF TERMIOS_TCSENDBREAK_METHODDEF TERMIOS_TCDRAIN_METHODDEF TERMIOS_TCFLUSH_METHODDEF TERMIOS_TCFLOW_METHODDEF TERMIOS_TCGETWINSIZE_METHODDEF TERMIOS_TCSETWINSIZE_METHODDEF {NULL, NULL} }; #if defined(VSWTCH) && !defined(VSWTC) #define VSWTC VSWTCH #endif #if defined(VSWTC) && !defined(VSWTCH) #define VSWTCH VSWTC #endif static struct constant { char *name; long value; } termios_constants[] = { /* cfgetospeed(), cfsetospeed() constants */ {"B0", B0}, {"B50", B50}, {"B75", B75}, {"B110", B110}, {"B134", B134}, {"B150", B150}, {"B200", B200}, {"B300", B300}, {"B600", B600}, {"B1200", B1200}, {"B1800", B1800}, {"B2400", B2400}, {"B4800", B4800}, {"B9600", B9600}, {"B19200", B19200}, {"B38400", B38400}, #ifdef B57600 {"B57600", B57600}, #endif #ifdef B115200 {"B115200", B115200}, #endif #ifdef B230400 {"B230400", B230400}, #endif #ifdef B460800 {"B460800", B460800}, #endif #ifdef B500000 {"B500000", B500000}, #endif #ifdef B576000 {"B576000", B576000}, #endif #ifdef B921600 {"B921600", B921600}, #endif #ifdef B1000000 {"B1000000", B1000000}, #endif #ifdef B1152000 {"B1152000", B1152000}, #endif #ifdef B1500000 {"B1500000", B1500000}, #endif #ifdef B2000000 {"B2000000", B2000000}, #endif #ifdef B2500000 {"B2500000", B2500000}, #endif #ifdef B3000000 {"B3000000", B3000000}, #endif #ifdef B3500000 {"B3500000", B3500000}, #endif #ifdef B4000000 {"B4000000", B4000000}, #endif #ifdef CBAUDEX {"CBAUDEX", CBAUDEX}, #endif /* tcsetattr() constants */ {"TCSANOW", TCSANOW}, {"TCSADRAIN", TCSADRAIN}, {"TCSAFLUSH", TCSAFLUSH}, #ifdef TCSASOFT {"TCSASOFT", TCSASOFT}, #endif /* tcflush() constants */ {"TCIFLUSH", TCIFLUSH}, {"TCOFLUSH", TCOFLUSH}, {"TCIOFLUSH", TCIOFLUSH}, /* tcflow() constants */ {"TCOOFF", TCOOFF}, {"TCOON", TCOON}, {"TCIOFF", TCIOFF}, {"TCION", TCION}, /* struct termios.c_iflag constants */ {"IGNBRK", IGNBRK}, {"BRKINT", BRKINT}, {"IGNPAR", IGNPAR}, {"PARMRK", PARMRK}, {"INPCK", INPCK}, {"ISTRIP", ISTRIP}, {"INLCR", INLCR}, {"IGNCR", IGNCR}, {"ICRNL", ICRNL}, #ifdef IUCLC {"IUCLC", IUCLC}, #endif {"IXON", IXON}, {"IXANY", IXANY}, {"IXOFF", IXOFF}, #ifdef IMAXBEL {"IMAXBEL", IMAXBEL}, #endif #ifdef IUTF8 {"IUTF8", IUTF8}, #endif /* struct termios.c_oflag constants */ {"OPOST", OPOST}, #ifdef OLCUC {"OLCUC", OLCUC}, #endif #ifdef ONLCR {"ONLCR", ONLCR}, #endif #ifdef OCRNL {"OCRNL", OCRNL}, #endif #ifdef ONOCR {"ONOCR", ONOCR}, #endif #ifdef ONLRET {"ONLRET", ONLRET}, #endif #ifdef OFILL {"OFILL", OFILL}, #endif #ifdef OFDEL {"OFDEL", OFDEL}, #endif #ifdef OXTABS {"OXTABS", OXTABS}, #endif #ifdef ONOEOT {"ONOEOT", ONOEOT}, #endif #ifdef NLDLY {"NLDLY", NLDLY}, #endif #ifdef CRDLY {"CRDLY", CRDLY}, #endif #ifdef TABDLY {"TABDLY", TABDLY}, #endif #ifdef BSDLY {"BSDLY", BSDLY}, #endif #ifdef VTDLY {"VTDLY", VTDLY}, #endif #ifdef FFDLY {"FFDLY", FFDLY}, #endif /* struct termios.c_oflag-related values (delay mask) */ #ifdef NL0 {"NL0", NL0}, #endif #ifdef NL1 {"NL1", NL1}, #endif #ifdef NL2 {"NL2", NL2}, #endif #ifdef NL3 {"NL3", NL3}, #endif #ifdef CR0 {"CR0", CR0}, #endif #ifdef CR1 {"CR1", CR1}, #endif #ifdef CR2 {"CR2", CR2}, #endif #ifdef CR3 {"CR3", CR3}, #endif #ifdef TAB0 {"TAB0", TAB0}, #endif #ifdef TAB1 {"TAB1", TAB1}, #endif #ifdef TAB2 {"TAB2", TAB2}, #endif #ifdef TAB3 {"TAB3", TAB3}, #endif #ifdef XTABS {"XTABS", XTABS}, #endif #ifdef BS0 {"BS0", BS0}, #endif #ifdef BS1 {"BS1", BS1}, #endif #ifdef VT0 {"VT0", VT0}, #endif #ifdef VT1 {"VT1", VT1}, #endif #ifdef FF0 {"FF0", FF0}, #endif #ifdef FF1 {"FF1", FF1}, #endif /* struct termios.c_cflag constants */ #ifdef CIGNORE {"CIGNORE", CIGNORE}, #endif {"CSIZE", CSIZE}, {"CSTOPB", CSTOPB}, {"CREAD", CREAD}, {"PARENB", PARENB}, {"PARODD", PARODD}, {"HUPCL", HUPCL}, {"CLOCAL", CLOCAL}, #ifdef CIBAUD {"CIBAUD", CIBAUD}, #endif #ifdef CRTSCTS {"CRTSCTS", (long)CRTSCTS}, #endif #ifdef CRTS_IFLOW {"CRTS_IFLOW", CRTS_IFLOW}, #endif #ifdef CDTR_IFLOW {"CDTR_IFLOW", CDTR_IFLOW}, #endif #ifdef CDSR_OFLOW {"CDSR_OFLOW", CDSR_OFLOW}, #endif #ifdef CCTS_OFLOW {"CCTS_OFLOW", CCTS_OFLOW}, #endif #ifdef CCAR_OFLOW {"CCAR_OFLOW", CCAR_OFLOW}, #endif #ifdef MDMBUF {"MDMBUF", MDMBUF}, #endif /* struct termios.c_cflag-related values (character size) */ {"CS5", CS5}, {"CS6", CS6}, {"CS7", CS7}, {"CS8", CS8}, /* struct termios.c_lflag constants */ #ifdef ALTWERASE {"ALTWERASE", ALTWERASE}, #endif {"ISIG", ISIG}, {"ICANON", ICANON}, #ifdef XCASE {"XCASE", XCASE}, #endif {"ECHO", ECHO}, {"ECHOE", ECHOE}, {"ECHOK", ECHOK}, {"ECHONL", ECHONL}, #ifdef ECHOCTL {"ECHOCTL", ECHOCTL}, #endif #ifdef ECHOPRT {"ECHOPRT", ECHOPRT}, #endif #ifdef ECHOKE {"ECHOKE", ECHOKE}, #endif #ifdef FLUSHO {"FLUSHO", FLUSHO}, #endif #ifdef NOKERNINFO {"NOKERNINFO", NOKERNINFO}, #endif {"NOFLSH", NOFLSH}, {"TOSTOP", TOSTOP}, #ifdef PENDIN {"PENDIN", PENDIN}, #endif {"IEXTEN", IEXTEN}, #ifdef EXTPROC {"EXTPROC", EXTPROC}, #endif /* indexes into the control chars array returned by tcgetattr() */ {"VINTR", VINTR}, {"VQUIT", VQUIT}, {"VERASE", VERASE}, {"VKILL", VKILL}, {"VEOF", VEOF}, {"VTIME", VTIME}, #ifdef VSTATUS {"VSTATUS", VSTATUS}, #endif {"VMIN", VMIN}, #ifdef VSWTC /* The #defines above ensure that if either is defined, both are, * but both may be omitted by the system headers. ;-( */ {"VSWTC", VSWTC}, {"VSWTCH", VSWTCH}, #endif {"VSTART", VSTART}, {"VSTOP", VSTOP}, {"VSUSP", VSUSP}, #ifdef VDSUSP {"VDSUSP", VDSUSP}, #endif {"VEOL", VEOL}, #ifdef VREPRINT {"VREPRINT", VREPRINT}, #endif #ifdef VDISCARD {"VDISCARD", VDISCARD}, #endif #ifdef VWERASE {"VWERASE", VWERASE}, #endif #ifdef VLNEXT {"VLNEXT", VLNEXT}, #endif #ifdef VEOL2 {"VEOL2", VEOL2}, #endif #ifdef B7200 {"B7200", B7200}, #endif #ifdef B14400 {"B14400", B14400}, #endif #ifdef B28800 {"B28800", B28800}, #endif #ifdef B76800 {"B76800", B76800}, #endif #ifdef B460800 {"B460800", B460800}, #endif #ifdef B500000 {"B500000", B500000}, #endif #ifdef B576000 { "B576000", B576000}, #endif #ifdef B921600 { "B921600", B921600}, #endif #ifdef B1000000 { "B1000000", B1000000}, #endif #ifdef B1152000 { "B1152000", B1152000}, #endif #ifdef B1500000 { "B1500000", B1500000}, #endif #ifdef B2000000 { "B2000000", B2000000}, #endif #ifdef B2500000 { "B2500000", B2500000}, #endif #ifdef B3000000 { "B3000000", B3000000}, #endif #ifdef B3500000 { "B3500000", B3500000}, #endif #ifdef B4000000 { "B4000000", B4000000}, #endif #ifdef CBAUD {"CBAUD", CBAUD}, |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |