Sujet : Re: Buffer contents well-defined after fgets() reaches EOF ?
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.cDate : 16. Feb 2025, 04:33:17
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vorma3$ebsd$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 15.02.2025 19:29, Michael S wrote:
One obvious possibility is to return # of characters read instead of
pointer. Then 0 can mean EOF and negative values can mean I/O errors.
But that is also not sufficiently boring.
But isn't that the (already existing) interface that 'fread()' had
been designed for?
Janis