home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1765 < prev    next >
Internet Message Format  |  1990-12-28  |  2KB

  1. From: gened@gssc.UUCP (Gene Daniel)
  2. Newsgroups: alt.sources
  3. Subject: Re: elvis on a PC - Quick-C
  4. Message-ID: <6315@gssc.UUCP>
  5. Date: 31 Aug 90 08:01:59 GMT
  6.  
  7. In article <6887@vax1.acs.udel.EDU> bruschke@vax1.udel.edu (Michiel Bruschke) writes:
  8. >
  9. >In article 2160 of alt.sources Marvin Kraska writes:
  10. >
  11. >>    However, I have noticed that on the PC, lost clusters are reported
  12. >>by "chkdsk" on the drive that the temporary file is placed.  Sure
  13. >>enough, the recovered file is elvis's temp.  I glanced at the tmp.c
  14. >>code, and didn't see anything obvious. 
  15. >
  16. >I noticed exactly the same thing on my system. I compiled elvis
  17. >using Quick-C. Elvis copies the tmp file to the new file, but
  18. >then somehow improperly deletes the tmp files. It seems to do
  19. >this with all tmp files it opens, cut buffers as well as regular
  20. >tmp file. Will take a closer look at source to see if I can figure 
  21. >it out (probably over weekend).
  22. >
  23. >So if you use elvis be sure to run chkdsk /f afterwards.
  24. >
  25. >Mike Bruschke
  26.  
  27. I also found this. I found it both with MSC and with Zortech so it wasn't
  28. the compiler.  Some time back I discovered that deleting an open file
  29. causes unallocated clusters. This is apparently the cause of the lost
  30. clusters from Elvis.
  31.  
  32. I was able to fix it by placeing the following two lines just before 
  33. the rename() call in the routine cutswitch() in the file cut.c:
  34.  
  35.         close(tmpfd);
  36.         tmpfd = -1;
  37.  
  38. The only other access to this file is after it is renamed to a cut
  39. buffer file and this is done through a dup'ed file descriptor. I have
  40. sent this information to Steve Kirkendall, the author of Elvis, so 
  41. the "official" patch should soon be on it's way. I have been using
  42. Elvis with this fix and named cut buffers between files seem to be
  43. working alright and no more unallocated clusters.
  44.  
  45. -- 
  46. Gene Daniel               | gened@gss.com
  47. Graphic Software Systems, Inc.     |       or
  48. P.O. Box 4900                      | ..!tektronix!sequent!gssc!gened
  49. Beaverton, Oregon 97005-7161       |
  50.