Article View: comp.std.c
Article #1442Re: fwrite(buf, 0, 42, stream) == ?
From: Doug Gwyn
Date: Wed, 27 Jun 1990 11:42
Date: Wed, 27 Jun 1990 11:42
8 lines
943 bytes
943 bytes
In article <6818@scolex.sco.COM> seanf@sco.COM (Sean Fagan) writes: >How many bytes get written for a 0-sized object? There are no 0-sized objects. Therefore the implementation may do what it wants in this case. I would suggest returning 0, which is not only a technically correct answer (any nonnegative integer from 0 through the number of records requested would be correct), but is also most useful in detecting this misusage during software development.
Technical Details
Message-ID:
<13245@smoke.BRL.MIL>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwynReferences:
<25096@mimsy.umd.edu> <25105@mimsy.umd.edu> <6818@scolex.sco.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: fwrite(buf, 0, 42, stream) == ? Message-ID: <13245@smoke.BRL.MIL> Date: 27 Jun 90 11:42:52 GMT References: <25096@mimsy.umd.edu> <25105@mimsy.umd.edu> <6818@scolex.sco.COM> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 8