Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!zephyr.ens.tek.com!tektronix!percy!nosun!cvedc!gssc!gened From: gened@gssc.UUCP (Gene Daniel) Newsgroups: alt.sources Subject: Re: elvis on a PC - Quick-C Message-ID: <6315@gssc.UUCP> Date: 31 Aug 90 08:01:59 GMT References: <1990Aug28.211400.14555@cbnewsc.att.com> <24466@fmsrl7.UUCP> <6887@vax1.acs.udel.EDU> Distribution: usa Organization: Graphic Software Systems, Inc. Beaverton, Or. Lines: 43 In article <6887@vax1.acs.udel.EDU> bruschke@vax1.udel.edu (Michiel Bruschke) writes: > >In article 2160 of alt.sources Marvin Kraska writes: > >> However, I have noticed that on the PC, lost clusters are reported >>by "chkdsk" on the drive that the temporary file is placed. Sure >>enough, the recovered file is elvis's temp. I glanced at the tmp.c >>code, and didn't see anything obvious. > >I noticed exactly the same thing on my system. I compiled elvis >using Quick-C. Elvis copies the tmp file to the new file, but >then somehow improperly deletes the tmp files. It seems to do >this with all tmp files it opens, cut buffers as well as regular >tmp file. Will take a closer look at source to see if I can figure >it out (probably over weekend). > >So if you use elvis be sure to run chkdsk /f afterwards. > >Mike Bruschke I also found this. I found it both with MSC and with Zortech so it wasn't the compiler. Some time back I discovered that deleting an open file causes unallocated clusters. This is apparently the cause of the lost clusters from Elvis. I was able to fix it by placeing the following two lines just before the rename() call in the routine cutswitch() in the file cut.c: close(tmpfd); tmpfd = -1; The only other access to this file is after it is renamed to a cut buffer file and this is done through a dup'ed file descriptor. I have sent this information to Steve Kirkendall, the author of Elvis, so the "official" patch should soon be on it's way. I have been using Elvis with this fix and named cut buffers between files seem to be working alright and no more unallocated clusters. -- Gene Daniel | gened@gss.com Graphic Software Systems, Inc. | or P.O. Box 4900 | ..!tektronix!sequent!gssc!gened Beaverton, Oregon 97005-7161 |