Path: csiph.com!aioe.org!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Line read from csv file with fgets has two characters before the terminating one Date: Sun, 18 Dec 2016 13:14:50 -0800 Organization: None to speak of Lines: 29 Message-ID: References: <457d2715-2a7a-4131-8083-637dc0919fb3@googlegroups.com> <616cc4c3-d560-4146-8f03-93e76bedf1fd@googlegroups.com> <94c39458-6789-4eaa-b773-36bc4d2d9976@googlegroups.com> <87lgvg39i4.fsf@bsb.me.uk> <87shpn25ea.fsf@bsb.me.uk> <87a8bvz2x3.fsf@bsb.me.uk> <0a145a31-756c-447f-8e57-7c2a26db8a5c@googlegroups.com> <8bfd0f69-2de1-42fe-881a-af1ec36bbe34@googlegroups.com> <7c524c43-bb03-49dc-8548-6873c6d1fd84@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="173a546d4d1f0d58aa934fc8ea84b0b1"; logging-data="5245"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/za4xu5WcLiqOkSHgFI/w6" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:j4gLCk/Hw8Nne9IqW0ULC6QSha4= sha1:khj4yYSyBF8lDaZQF9dEk3nj4m0= Xref: csiph.com comp.lang.c:99842 supercat@casperkitty.com writes: > On Saturday, December 17, 2016 at 4:51:59 PM UTC-6, Malcolm McLean wrote: >> Because you can't then hook up a C program to modem and telephone >> wire. C stdio is built for a line-oriented world. not a raster >> graphics world. > > The C89 Standard recognized two categories of C implementations--those > which are required to have certain features including input and output > streams, and those which aren't required to have such features. Given > that there are many features that are common to most, though not all, > of the platforms that are used to run hosted implementations, it would > seem helpful to subdivide the category of hosted implementations into > a couple subcategories--one of which includes such features and one of > which doesn't. > > Unfortunately, I think the maintainers of the C Standard would rather > pretend that the world only needs two kinds of C implementations to > satisfy the needs of all programs for which any kind of portability > would be desirable, than recognize that many programs need features > which are present on most but not all platforms. I believe the maintainers of the C standard are aware of the existence of POSIX. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"