diff options
author | hobbs <hobbs@noemail.net> | 2000-04-15 17:34:23 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2000-04-15 17:34:23 (GMT) |
commit | 61c708675e166e8b23acd404204f6e2f0a346220 (patch) | |
tree | d05c7b287a2f75af4d1e2e5e3cfbfefaf0cc86ca /unix | |
parent | c72673212071d589c64c9cab284174d7108c9f3e (diff) | |
download | tcl-61c708675e166e8b23acd404204f6e2f0a346220.zip tcl-61c708675e166e8b23acd404204f6e2f0a346220.tar.gz tcl-61c708675e166e8b23acd404204f6e2f0a346220.tar.bz2 |
* unix/tclUnixChan.c (TtyParseMode): Only allow setting mark/space
parity on platforms that support it [Bug: 5089]
FossilOrigin-Name: 64dd87f4a7a03359e960cb857660fbcf574a0f76
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tclUnixChan.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c index 31204cb..b0a57f5 100644 --- a/unix/tclUnixChan.c +++ b/unix/tclUnixChan.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixChan.c,v 1.14 2000/03/27 18:34:32 ericm Exp $ + * RCS: @(#) $Id: tclUnixChan.c,v 1.15 2000/04/15 17:34:23 hobbs Exp $ */ #include "tclInt.h" /* Internal definitions for Tcl. */ @@ -1132,10 +1132,25 @@ TtyParseMode(interp, mode, speedPtr, parityPtr, dataPtr, stopPtr) } return TCL_ERROR; } - if (strchr("noems", parity) == NULL) { + /* + * Only allow setting mark/space parity on platforms that support it + * [Bug: 5089] + */ + if (strchr( +#if defined(PAREXT) || defined(USE_TERMIO) + "noems", +#else + "noe", +#endif + parity) == NULL) { if (interp != NULL) { Tcl_AppendResult(interp, bad, - " parity: should be n, o, e, m, or s", NULL); +#if defined(PAREXT) || defined(USE_TERMIO) + " parity: should be n, o, e, m, or s", +#else + " parity: should be n, o, or e", +#endif + NULL); } return TCL_ERROR; } |