diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-03-21 17:47:33 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-03-21 17:47:33 (GMT) |
commit | 34ecddb6102a17c7771e30f8b9bb559adc312ea3 (patch) | |
tree | ab88382a12a3563458bf2249b250dff9115f0212 /generic/tclIO.c | |
parent | 9291cbb6cff77ebc2cf69a3dd043e3c6e903a9e1 (diff) | |
download | tcl-34ecddb6102a17c7771e30f8b9bb559adc312ea3.zip tcl-34ecddb6102a17c7771e30f8b9bb559adc312ea3.tar.gz tcl-34ecddb6102a17c7771e30f8b9bb559adc312ea3.tar.bz2 |
exchange profile <-> eofchar output in "fconfigure". Fix some testcases, which depend on profile
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r-- | generic/tclIO.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index d013679..877e670 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -8005,6 +8005,20 @@ Tcl_GetChannelOption( return TCL_OK; } } + if (len == 0 || HaveOpt(2, "-eofchar")) { + char buf[4] = ""; + if (len == 0) { + Tcl_DStringAppendElement(dsPtr, "-eofchar"); + } + if ((flags & TCL_READABLE) && (statePtr->inEofChar != 0)) { + sprintf(buf, "%c", statePtr->inEofChar); + } + if (len > 0) { + Tcl_DStringAppend(dsPtr, buf, TCL_INDEX_NONE); + return TCL_OK; + } + Tcl_DStringAppendElement(dsPtr, buf); + } if (len == 0 || HaveOpt(1, "-profile")) { int profile; const char *profileName; @@ -8022,20 +8036,6 @@ Tcl_GetChannelOption( return TCL_OK; } } - if (len == 0 || HaveOpt(2, "-eofchar")) { - char buf[4] = ""; - if (len == 0) { - Tcl_DStringAppendElement(dsPtr, "-eofchar"); - } - if ((flags & TCL_READABLE) && (statePtr->inEofChar != 0)) { - sprintf(buf, "%c", statePtr->inEofChar); - } - if (len > 0) { - Tcl_DStringAppend(dsPtr, buf, TCL_INDEX_NONE); - return TCL_OK; - } - Tcl_DStringAppendElement(dsPtr, buf); - } if (len == 0 || HaveOpt(1, "-translation")) { if (len == 0) { Tcl_DStringAppendElement(dsPtr, "-translation"); |