Xref: utzoo comp.sys.ibm.pc.programmer:617 alt.msdos.programmer:1428 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!pt.cs.cmu.edu!b.gp.cs.cmu.edu!Ralf.Brown@B.GP.CS.CMU.EDU From: Ralf.Brown@B.GP.CS.CMU.EDU Newsgroups: comp.sys.ibm.pc.programmer,alt.msdos.programmer Subject: Re: Problem with disk full in programs compiled with Turbo-C Message-ID: <260f7d78@ralf> Date: 27 Mar 90 13:49:28 GMT Sender: ralf@b.gp.cs.cmu.edu Organization: Carnegie Mellon University School of Computer Science Lines: 28 In-Reply-To: <5705@ncsugn.ncsu.edu> In article <5705@ncsugn.ncsu.edu>, emigh@ncsugn.ncsu.edu (Ted H. Emigh) wrote: }I am using Turbo-C (Version 2.0), and am having trouble determining if the }disk is full. I have tried the obvious (at least to me obvious): }1) Code fragment: } result=fprintf(...) } if(result==EOF) { do something} } } result always returns the number of characters -- even if the disk } is full. There is disk activity, but nothing is written (obviously). } }2) Code fragment: } harderr(hardware_handler); } } This routine is never called for disk full. It functions OK for write- } protect and disk not ready, but not for disk full. Try fprintf(file,...) ; if (ferror(file)) { do something } -- UUCP: {ucbvax,harvard}!cs.cmu.edu!ralf -=- 412-268-3053 (school) -=- FAX: ask ARPA: ralf@cs.cmu.edu BIT: ralf%cs.cmu.edu@CMUCCVMA FIDO: Ralf Brown 1:129/46 "How to Prove It" by Dana Angluin Disclaimer? I claimed something? 16. proof by cosmology: The negation of the proposition is unimaginable or meaningless. Popular for proofs of the existence of God.