Skip to content
Tcl Source Code View Ticket
Login

View Ticket

You can set mark/space parity on OSes that don't support it

Closed / Fixed219079ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:10:23
OriginalBugID: 5089 Bug
Version: 8.3
SubmitDate: '2000-04-14'
LastModified: '2000-04-14'
Severity: LOW
Status: Released
Submitter: hobbs
ChangedBy: hobbs
OS: All Unix
FixedDate: '2000-04-14'
FixedInVersion: 8.3.1
ClosedDate: '2000-10-25'


From: Daniel O'Connor



Hi,

While investigating using mark and space parity in an application I

noticed that if your OS doesn't support mark/space parity it

(tclUnixChan.c) will still let you set it.



Attached is a patch which causes the fconfigure -mode command to

generate an error if you use mark/space parity and it isn't supported.



I created it from Tcl8.0.5, but it applies with a 9 line offset to

8.2.3.



--- tclUnixChan.c.origThu Feb 17 12:05:58 2000

+++ tclUnixChan.cThu Feb 17 11:58:30 2000

@@ -1123,10 +1123,18 @@

 }

 return TCL_ERROR;

     }

+#ifdef PAREXT

     if (strchr("noems", parity) == NULL) {

+#else

+    if (strchr("noe", parity) == NULL) {

+#endif

 if (interp != NULL) {

     Tcl_AppendResult(interp, bad,

+#ifdef PAREXT

     " parity: should be n, o, e, m, or s", NULL);

+#else

+    " parity: should be n, o, or e", NULL);

+#endif

 }

 return TCL_ERROR;

     }





Patched in 8.3.1.
welch Closed ticket [219079ffff]. [History diff]2000-10-26 08:34:54
dgp Ticket [219079ffff]: 3 changes [History diff]2001-04-03 06:28:50
Log in (anonymous is fine) to add a comment.