This is specific to (at least) Windows; The read() function call stops reading from a file opened in text-mode if it encounters a Ctrl+Z character according to MSDN. MSDN states that the open() function call may be passed the extra flag _O_BINARY to circumvent this.
I haven't found a similar flag under linux (but I also haven't looked that deep), so either this must be fixed with compile-specific flags, or, as I'd approach it, use FILE commands (fopen, fread) and pass "rb" at fopen.
Question is, whether this quite cool and simple editor is still supported, given that this bug is some years old... :(
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=176465
Originator: NO
This is specific to (at least) Windows; The read() function call stops reading from a file opened in text-mode if it encounters a Ctrl+Z character according to MSDN. MSDN states that the open() function call may be passed the extra flag _O_BINARY to circumvent this.
I haven't found a similar flag under linux (but I also haven't looked that deep), so either this must be fixed with compile-specific flags, or, as I'd approach it, use FILE commands (fopen, fread) and pass "rb" at fopen.
Question is, whether this quite cool and simple editor is still supported, given that this bug is some years old... :(