Article View: comp.std.c
Article #1445Re: fwrite(buf, 0, 42, stream) == ?
From: Karl Heuer
Date: Wed, 27 Jun 1990 21:04
Date: Wed, 27 Jun 1990 21:04
17 lines
1356 bytes
1356 bytes
In article <6818@scolex.sco.COM> seanf@sco.COM (Sean Fagan) writes: >In article <25105@mimsy.umd.edu> chris@mimsy.umd.edu (Chris Torek) writes: >>making fwrite(, 0, n) return n is inexpensive > >But is it *right*? > >How many bytes get written for a 0-sized object? What does ANSI say about >it? Do all of the committee members agree? 8-) Since ANSI says there's no such thing as a zero-sized object, it would seem that any behavior is right--including a core dump. If the implementation chooses to provide ZSOs as an extension, then the implementors should decide on a reasonable behavior and document it. If they want to be consistent with other people providing similar extensions, then they should discuss it with the X3J11 ZSO POC, which happens to be Doug Gwyn. Karl W. Z. Heuer (karl@kelp.ima.isc.com or ima!kelp!karl), The Walking Lint
Technical Details
Message-ID:
<16979@haddock.ima.isc.com>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!snorkelwacker!spdcc!ima!haddock!karlReferences:
<Fkucoph@cs.psu.edu> <3159@disk.UUCP> <25096@mimsy.umd.edu> <25105@mimsy.umd.edu> <6818@scolex.sco.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!snorkelwacker!spdcc!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.std.c Subject: Re: fwrite(buf, 0, 42, stream) == ? Message-ID: <16979@haddock.ima.isc.com> Date: 27 Jun 90 21:04:55 GMT References: <Fkucoph@cs.psu.edu> <3159@disk.UUCP> <25096@mimsy.umd.edu> <25105@mimsy.umd.edu> <6818@scolex.sco.COM> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Cambridge, MA 02138-5302 Lines: 17