home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / mac / programm / 20409 < prev    next >
Encoding:
Text File  |  1992-12-29  |  1.2 KB  |  39 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!mcsun!sunic!kth.se!hemul.nada.kth.se!d88-jwa
  3. From: d88-jwa@hemul.nada.kth.se (Jon WΣtte)
  4. Subject: Re: Getting Size of Large Files
  5. Message-ID: <1992Dec29.234156.4349@kth.se>
  6. Sender: usenet@kth.se (Usenet)
  7. Nntp-Posting-Host: hemul.nada.kth.se
  8. Organization: Royal Institute of Technology, Stockholm, Sweden
  9. References: <ofDwLZCSMUI3IEX0Ef@transarc.com>
  10. Date: Tue, 29 Dec 1992 23:41:56 GMT
  11. Lines: 26
  12.  
  13. In <ofDwLZCSMUI3IEX0Ef@transarc.com> Barry_Wolman@transarc.com writes:
  14.  
  15. >calling PBGetEOF.  I reviewed the code and checked Think Reference; I
  16. >can't understand why the code works for small files and fails for
  17.  
  18. You called PBOpen as well. WHy not at least use PBHOpen?
  19. Or better yet, HOpen and GetEOF as high-level parts?
  20.  
  21.  
  22.     SFGetFile...
  23.     GetWDInfo ( reply . vRefNum , & vRefNum , & dirID , & junk ) ;
  24.     HOpen ( vRefNum , dirID , reply . fName , fsRdPerm , & refNum ) ;
  25.     GetEOF ( refNum , & len ) ;
  26.  
  27. With error checking of course. The use FSRead; and why read LINES
  28. when you can read and spool BLOCKS of data? The printer doesn't
  29. care, and it's faster and more efficient.
  30.  
  31. Cheers,
  32.  
  33.                             / h+
  34.  
  35. -- 
  36.  -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
  37.  
  38.  -- I don't fear death, it's dying that scares me.
  39.