From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1014db,df854b5838c3e14 X-Google-Attributes: gid1014db,public X-Google-Thread: 109fba,df854b5838c3e14 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,df854b5838c3e14 X-Google-Attributes: gid103376,public X-Google-Thread: 10db24,fec75f150a0d78f5 X-Google-Attributes: gid10db24,public From: Tom Wheeley Subject: Re: ANSI C and POSIX (was Re: C/C++ knocks the crap out of Ada) Date: 1996/04/12 Message-ID: <829279436snz@tsys.demon.co.uk>#1/1 X-Deja-AN: 147151712 x-nntp-posting-host: tsys.demon.co.uk references: <4kets3$ic0@news-s01.ny.us.ibm.net> <829194658snz@tsys.demon.co.uk> x-sig-by: Tomsystems Quote v1.2. (c)1996 Tom Wheeley, tomw@tsys.demon.co.uk x-mail2news-path: tsys.demon.co.uk organization: City Zen FM reply-to: tomw@tsys.demon.co.uk newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.edu Date: 1996-04-12T00:00:00+00:00 List-Id: In article bobduff@world.std.com "Robert A Duff" writes: > > >Myself, I would see this auto-stop idea as a _feature_ of read(). features > >can only be relied upon portably if they are positively documented in POSIX. > >This feature is not therefore portable, as POSIX is muddy on the matter. > > > >I suppose in c.l.c speak, it would be called `implementation-defined'. > > If POSIX wants to make it implementation defined, or undefined, or > whatever, then it should say so explicitly. Making something undefined > by forgetting to define it is bad style. I didn't say it was right, I just said that's how it is. Although it seems that POSIX falls short of what is desired by many people, you cannot expect it to specify the definition for every possible case. As a programmer, you should know what to do if the spec does fall short, and that is to be conservative with what you give out, and liberal in what you receive; in the spirit of RFCs. imho, expecting read() to stop at the end of the file, despite asking it to read 1000 bytes is being liberal with what you give out. .splitbung -- * TQ 1.0 * The 'Just So Quotes'. "I'm a paranoid agnostic. I doubt the existence of God, but I'm sure there is some force, somewhere, working against me." --Marc Maron