| Deutsch English Français Italiano |
|
<20250214092336.406@kylheku.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Kaz Kylheku <643-408-1753@kylheku.com> Newsgroups: comp.lang.c Subject: Re: Buffer contents well-defined after fgets() reaches EOF ? Date: Fri, 14 Feb 2025 17:28:30 -0000 (UTC) Organization: A noiseless patient Spider Lines: 21 Message-ID: <20250214092336.406@kylheku.com> References: <vo9g74$fu8u$1@dont-email.me> <vo9hlo$g0to$1@dont-email.me> <vo9khf$ggd4$1@dont-email.me> <vobf3h$sefh$2@dont-email.me> <vobjdt$t5ka$1@dont-email.me> <vobkd5$t7np$1@dont-email.me> <20250210124911.00006b31@yahoo.com> <86ldu9zxkb.fsf@linuxsc.com> <20250214165108.00002984@yahoo.com> <_1JrP.36407$be92.13211@fx16.iad> <20250214172358.0000739b@yahoo.com> Injection-Date: Fri, 14 Feb 2025 18:28:30 +0100 (CET) Injection-Info: dont-email.me; posting-host="b960314c7548392824ffd13fb26f077d"; logging-data="3743958"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Tviq/kvEx8y07vocoCWvg5kTwFNWk55M=" User-Agent: slrn/pre1.0.4-9 (Linux) Cancel-Lock: sha1:+SPW8AwQPnIOXt94y7gcreVfXyQ= Bytes: 1890 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/txr Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal Mastodon: @Kazinator@mstdn.ca