Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1216)

Side by Side Diff: Modules/termios.c

Issue 7695: missing termios constants
Patch Set: Created 2 years, 2 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* termiosmodule.c -- POSIX terminal I/O module implementation. */ 1 /* termiosmodule.c -- POSIX terminal I/O module implementation. */
2 2
3 #include "Python.h" 3 #include "Python.h"
4 4
5 /* Apparently, on SGI, termios.h won't define CTRL if _XOPEN_SOURCE 5 /* Apparently, on SGI, termios.h won't define CTRL if _XOPEN_SOURCE
6 is defined, so we define it here. */ 6 is defined, so we define it here. */
7 #if defined(__sgi) 7 #if defined(__sgi)
8 #define CTRL(c) ((c)&037) 8 #define CTRL(c) ((c)&037)
9 #endif 9 #endif
10 10
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 {"VEOF", VEOF}, 580 {"VEOF", VEOF},
581 {"VTIME", VTIME}, 581 {"VTIME", VTIME},
582 {"VMIN", VMIN}, 582 {"VMIN", VMIN},
583 #ifdef VSWTC 583 #ifdef VSWTC
584 /* The #defines above ensure that if either is defined, both are, 584 /* The #defines above ensure that if either is defined, both are,
585 * but both may be omitted by the system headers. ;-( */ 585 * but both may be omitted by the system headers. ;-( */
586 {"VSWTC", VSWTC}, 586 {"VSWTC", VSWTC},
587 {"VSWTCH", VSWTCH}, 587 {"VSWTCH", VSWTCH},
588 #endif 588 #endif
589 {"VSTART", VSTART}, 589 {"VSTART", VSTART},
590 #ifdef VSTATUS
591 {"VSTATUS", VSTATUS},
592 #endif
590 {"VSTOP", VSTOP}, 593 {"VSTOP", VSTOP},
591 {"VSUSP", VSUSP}, 594 {"VSUSP", VSUSP},
595 #ifdef VDSUSP
596 {"VDSUSP", VDSUSP},
597 #endif
592 {"VEOL", VEOL}, 598 {"VEOL", VEOL},
593 #ifdef VREPRINT 599 #ifdef VREPRINT
594 {"VREPRINT", VREPRINT}, 600 {"VREPRINT", VREPRINT},
595 #endif 601 #endif
596 #ifdef VDISCARD 602 #ifdef VDISCARD
597 {"VDISCARD", VDISCARD}, 603 {"VDISCARD", VDISCARD},
598 #endif 604 #endif
599 #ifdef VWERASE 605 #ifdef VWERASE
600 {"VWERASE", VWERASE}, 606 {"VWERASE", VWERASE},
601 #endif 607 #endif
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 {"TIOCSSOFTCAR", TIOCSSOFTCAR}, 932 {"TIOCSSOFTCAR", TIOCSSOFTCAR},
927 #endif 933 #endif
928 #ifdef TIOCSTI 934 #ifdef TIOCSTI
929 {"TIOCSTI", TIOCSTI}, 935 {"TIOCSTI", TIOCSTI},
930 #endif 936 #endif
931 #ifdef TIOCSWINSZ 937 #ifdef TIOCSWINSZ
932 {"TIOCSWINSZ", TIOCSWINSZ}, 938 {"TIOCSWINSZ", TIOCSWINSZ},
933 #endif 939 #endif
934 #ifdef TIOCTTYGSTRUCT 940 #ifdef TIOCTTYGSTRUCT
935 {"TIOCTTYGSTRUCT", TIOCTTYGSTRUCT}, 941 {"TIOCTTYGSTRUCT", TIOCTTYGSTRUCT},
942 #endif
943 #ifdef _POSIX_VDISABLE
944 {"_POSIX_VDISABLE", _POSIX_VDISABLE},
936 #endif 945 #endif
937 946
938 /* sentinel */ 947 /* sentinel */
939 {NULL, 0} 948 {NULL, 0}
940 }; 949 };
941 950
942 951
943 static struct PyModuleDef termiosmodule = { 952 static struct PyModuleDef termiosmodule = {
944 PyModuleDef_HEAD_INIT, 953 PyModuleDef_HEAD_INIT,
945 "termios", 954 "termios",
(...skipping 21 matching lines...) Expand all
967 } 976 }
968 Py_INCREF(TermiosError); 977 Py_INCREF(TermiosError);
969 PyModule_AddObject(m, "error", TermiosError); 978 PyModule_AddObject(m, "error", TermiosError);
970 979
971 while (constant->name != NULL) { 980 while (constant->name != NULL) {
972 PyModule_AddIntConstant(m, constant->name, constant->value); 981 PyModule_AddIntConstant(m, constant->name, constant->value);
973 ++constant; 982 ++constant;
974 } 983 }
975 return m; 984 return m;
976 } 985 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7