summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2022-07-31 06:32:22 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2022-07-31 06:32:22 (GMT)
commitd2518017c7f55b82f10c7ee1e77cbe27218cc857 (patch)
tree6ed28530bb059df23572a55b298e9cbe740a6a27 /generic/tclIO.c
parent3674905dbda8443171db562a6c69bf50228f18fb (diff)
parent13384df4afe1602c77e79a0661eb8f70419f1697 (diff)
downloadtcl-d2518017c7f55b82f10c7ee1e77cbe27218cc857.zip
tcl-d2518017c7f55b82f10c7ee1e77cbe27218cc857.tar.gz
tcl-d2518017c7f55b82f10c7ee1e77cbe27218cc857.tar.bz2
Merged trunk.
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r--generic/tclIO.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index b1286de..80780d7 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -4717,7 +4717,6 @@ Tcl_GetsObj(
eol = dst;
skip = 1;
if (GotFlag(statePtr, INPUT_SAW_CR)) {
- ResetFlag(statePtr, INPUT_SAW_CR);
if ((eol < dstEnd) && (*eol == '\n')) {
/*
* Skip the raw bytes that make up the '\n'.
@@ -4767,8 +4766,10 @@ Tcl_GetsObj(
skip++;
}
eol--;
+ ResetFlag(statePtr, INPUT_SAW_CR);
goto gotEOL;
} else if (*eol == '\n') {
+ ResetFlag(statePtr, INPUT_SAW_CR);
goto gotEOL;
}
}
@@ -4797,7 +4798,7 @@ Tcl_GetsObj(
Tcl_SetObjLength(objPtr, oldLength);
CommonGetsCleanup(chanPtr);
copiedTotal = -1;
- ResetFlag(statePtr, CHANNEL_BLOCKED);
+ ResetFlag(statePtr, CHANNEL_BLOCKED|INPUT_SAW_CR);
goto done;
}
goto gotEOL;