Sujet : Re: Buffer contents well-defined after fgets() reaches EOF ?
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.lang.cDate : 14. Feb 2025, 18:28:30
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20250214092336.406@kylheku.com>
References : 1 2 3 4 5 6 7 8 9 10 11
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2025-02-14, Michael S <
already5chosen@yahoo.com> wrote:
On Fri, 14 Feb 2025 15:10:50 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
>
>
If you're reading non-string data use read/pread/mmap.
>
>
I don't know about you, but in decades of practice I didn't yet
encounter a situation when I can trust a file input with 100%
certainty.
With a little care, you can cheerfully process through a binary
executables with fgets, if you open the stream in binary mode (or on
Unixes where you don't have to).
-- TXR Programming Language: http://nongnu.org/txrCygnal: Cygwin Native Application Library: http://kylheku.com/cygnalMastodon: @Kazinator@mstdn.ca