summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
Commit message (Collapse)AuthorAgeFilesLines
* Bug [9a978f8323]: crash reading large filesapnadkarni2023-03-011-11/+15
|
* Merge 8.7jan.nijtmans2023-02-281-1/+6
|\
| * Put back testcase io-52.20, and re-fix [4a7397e0b3]jan.nijtmans2023-02-281-1/+6
| |
* | Merge 8.7jan.nijtmans2023-02-281-1/+1
|\ \ | |/
| * Missing ')'jan.nijtmans2023-02-281-1/+1
| |
* | Merge 8.7jan.nijtmans2023-02-281-1/+5
|\ \ | |/
| * Restore previous behavior for non-blocking mode, as for this mode the ↵jan.nijtmans2023-02-281-1/+5
| | | | | | | | | | semantics of [read]/[gets] were not broken. This was the 'some agreement'. The change in line 8286 is necessary for both blocking and non-blocking mode: Whenver the encoding change we need to reset the CHANNEL_ENCODING_ERROR flag.
| * Reverted [d156af9fb76dd2f4] and removed tests io-52.20 io-75.6 io-75.7, as thispooryorick2023-02-281-2/+2
| | | | | | | | | | | | | | | | commit, intended to fix issue [b8f575aa2398b0e4], breaks the semantics of [read] and [gets]. Such a change would require an accepted TIP. See [b8f575aa2398b0e4] for further discussion. jn: @pouryorick See [b8f575aa2398b0e4] for the reason why this commit is not appropriate: It gets core-8-branch back in the buggy state it was, without even providing a real solution everyone agrees on. You shouldn't revert my patch just because I reverted yours. pooryorick: As I explained, the reason for this reversion is that it hard-codes an unapproved change in the semantics of [read] and [gets] into the test suite. Jan, your statement that it's a "revenge" reversion is false. I spent a month trying to find some alternative to this reversion before actually performing it. A commit that codifes in its tests changes in semantcs to [read]/[gets] simply shouldn't be on core-8-branch.
* | Reverted [d156af9fb76dd2f4] and removed tests io-52.20 io-75.6 io-75.7, as thispooryorick2023-02-281-2/+2
| | | | | | | | | | | | | | | | commit, intended to fix issue [b8f575aa2398b0e4], breaks the semantics of [read] and [gets]. Such a change would require an accepted TIP. See [b8f575aa2398b0e4] for further discussion. jn: @pouryorick See [b8f575aa2398b0e4] for the reason why this commit is not appropriate: It gets core-8-branch back in the buggy state it was, without even providing a real solution everyone agrees on. You shouldn't revert my patch just because I reverted yours. pooryorick: As I explained, the reason for this reversion is that it hard-codes an unapproved change in the semantics of [read] and [gets] into the test suite. Jan, your statement that it's a "revenge" reversion is false. I spent a month trying to find some alternative to this reversion before actually performing it. A commit that codifes in its tests changes in semantcs to [read]/[gets] simply shouldn't be on core-8-branch.
* | Fix [3d01d51bc4]: Tcl 9: Cannot write large strings to file. Also some ↵jan.nijtmans2023-02-271-50/+66
|\ \ | | | | | | | | | size_t -> Tcl_Size changes.
| * | Minor refactor, add testsapnadkarni2023-02-261-34/+25
| | |
| * | Fix large writes to file. Need to break into INT_MAX size chunks.apnadkarni2023-02-251-7/+32
|/ /
* | Merge 8.7jan.nijtmans2023-02-121-0/+8
|\ \ | |/
| * Proposed fix (and testcases) for [4a7397e0b3]: Tcl 9: fcopy with ↵jan.nijtmans2023-02-101-0/+8
| | | | | | | | -strictencoding 1 UTF-8 channels
| * SetFlag -> GotFlag (since SetFlag always returns 1, this is nonsence in an ↵jan.nijtmans2023-01-311-1/+1
| | | | | | | | if() statement). Also add test-case, showing that it was actually wrong, in behavior too.
* | Merge 8.7jan.nijtmans2023-01-241-2/+6
|\ \ | |/
| * First part of fix for [4a7397e0b3]. Not complete yet.jan.nijtmans2023-01-241-2/+6
| |\
| | * First part of fix for [4a7397e0b3]: Take flags into account when deciding to ↵jan.nijtmans2022-12-241-2/+6
| |/ |/| | | | | do a binary fcopy or not. TODO: Handle generating an exception
* | Merge 8.7jan.nijtmans2022-12-191-0/+2
|\ \ | |/
| * When changing the -nocomplainencoding or -strictencoding settings of a ↵jan.nijtmans2022-12-191-0/+2
| | | | | | | | channel, reset the CHANNEL_NEED_MORE_DATA and CHANNEL_ENCODING_ERROR flags, so we can continue reading the channel and find out what's going on.
* | Merge 8.7jan.nijtmans2022-12-151-1/+1
|\ \ | |/
| * Fix Tcl_BadChannelOption(), new -nocomplainencoding and -strictencoding ↵jan.nijtmans2022-12-151-1/+1
| | | | | | | | options were still missing (reported by Rolf Ade, thanks!)
* | Merge 8.7jan.nijtmans2022-12-091-2/+2
|\ \ | |/
| * Merge 8.7. Adapt testcase, showing that after an encoding error we can ↵jan.nijtmans2022-12-091-1/+1
| |\ | | | | | | | | | change encoding and continue reading
| * | Partial solution for [b8f575aa23]. Still missing: 1) testcases. 2) What if ↵jan.nijtmans2022-12-091-1/+1
| |/ | | | | | | both EOF and ENCODING_ERROR happens (because there is both an eofchar and an invalid byte in the stream)
* | Oops, that's the wrong one ...jan.nijtmans2022-12-021-2/+2
| |
* | Make options -nocomplain and -strictencoding truly independant. Leftover ↵jan.nijtmans2022-12-021-2/+0
| | | | | | | | from initial implementation. Noted by Rolf Ade (thanks!)
* | Merge 8.7jan.nijtmans2022-11-251-6/+26
|\ \ | |/
| * (partial) fix for [6978c01b65]jan.nijtmans2022-11-251-6/+26
| |\
| | * Make "read" throwing a "illegal byte sequence" exception. Doesn't work for ↵jan.nijtmans2022-11-231-6/+26
| | | | | | | | | | | | "gets" yet.
* | | Use Tcl_GetByteArrayFromObj(... in stead of Tcl_GetBytesFromObj(NULL,.... ↵jan.nijtmans2022-11-241-2/+6
| | | | | | | | | | | | Add some more error-checking for invalid byte-arrays
| | |
| \ \
*-. \ \ Fix [da63e4c1e]: Crash in Tcl_WriteChars(). Make everything compile (again) ↵jan.nijtmans2022-11-231-54/+61
|\ \ \ \ | | |/ / | | | | | | | | with a C++ compiler.
| | * | -1 -> TCL_INDEX_NONEjan.nijtmans2022-11-231-63/+63
| | |/
| * | Proposed fix for [da63e4c1e]. First version, not 100% as expected yet.jan.nijtmans2022-11-231-14/+21
|/ /
* | Merge 8.7jan.nijtmans2022-11-231-0/+1
|\ \ | |/
| * Change assert, since the new flag CHANNEL_ENCODING_ERROR could be set as welljan.nijtmans2022-11-231-0/+1
| |
* | Merge 8.7jan.nijtmans2022-11-231-1/+11
|\ \ | |/
| * indentingjan.nijtmans2022-11-201-3/+3
| |
| * Merge 8.7jan.nijtmans2022-11-201-7/+11
| |\
| | * Allow any single character for -eofchar, even if it's not a valid listjan.nijtmans2022-10-181-5/+10
| | |
| | * Minor change to -eofchar handlingjan.nijtmans2022-10-161-2/+1
| | |
| * | Making a start fixing [6978c01b65]: Channel encoding difference 8.6 <-> 9.0jan.nijtmans2022-10-111-1/+11
| |/
* | Merge trunk. Also update Tcl_ObjType.version to match TIP 644apnadkarni2022-11-091-87/+14
|\ \
| * | Simplify -eofchar parsing (just check for " {}" at the end, in stead of full ↵jan.nijtmans2022-10-291-23/+5
| | | | | | | | | | | | list parsing)
| * | TIP #646 correction: let "fconfigure $chan -eofchar" return a single ↵jan.nijtmans2022-10-281-8/+8
| | | | | | | | | | | | character, not a list element
| * | Allow any single character for -eofchar, even if it's not a valid listjan.nijtmans2022-10-181-4/+7
| | |
| * | Merge 9.0. More strict -eofchar parsingjan.nijtmans2022-10-171-1/+1
| |\ \
| * | | new TIP about -eofchar handlingjan.nijtmans2022-10-161-66/+8
| |/ /
* | | Merge 9.0apnadkarni2022-10-111-13/+21
|\ \ \ | |/ /
| * | Make TCL_ENCODING_STRICT and TCL_ENCODING_NOCOMPLAIN work independant from ↵jan.nijtmans2022-10-111-13/+21
| | | | | | | | | | | | each other (suggested by Harald Oehlmann)