home *** CD-ROM | disk | FTP | other *** search
/ Executor 2.0 / executorv2.0.iso / pc / dos / extra / docs / maillist / text / archive.96 / text4306.txt < prev    next >
Encoding:
Text File  |  1996-07-25  |  3.4 KB  |  76 lines

  1.     id m0u5KhV-0007rTa; Fri, 5 Apr 96 16:13 MST
  2. Sender: owner-executor
  3. Received: from ardi.com by ftp.ardi.com
  4.     (Smail3.1.29.1 #3) id m0u5Kgm-0007rQn; Fri, 5 Apr 96 16:13 MST
  5. Path: sloth.swcp.com!tesuque.cs.sandia.gov!ferrari.mst6.lanl.gov!nntp-server.caltech.edu!fnnews.fnal.gov!uwm.edu!lll-winken.llnl.gov!hookup!news.mathworks.com!tank.news.pipex.net!pipex!blackbush.xlink.net!news.uni-mainz.de!news.th-darmstadt.de!hp62.rbg.informatik.th-darmstadt.de!alexlehm
  6. From: alexlehm@rbg.informatik.th-darmstadt.de (Alexander Lehmann)
  7. Newsgroups: comp.emulators.mac.executor
  8. Subject: Re: disk images
  9. Date: 3 Apr 1996 18:26:33 GMT
  10. Organization: Technische Hochschule Darmstadt
  11. Lines: 54
  12. Message-ID: <4jufsp$v3j@rs18.hrz.th-darmstadt.de>
  13. References: <199604031539.KAA00688@franklin-fddi.cris.com>
  14. NNTP-Posting-Host: hp62.rbg.informatik.th-darmstadt.de
  15. X-Newsreader: TIN [version 1.2 PL2]
  16. To: executor@ardi.com
  17. X-MailNews-Gateway: From newsgroup comp.emulators.mac.executor
  18. Sender: owner-executor@ardi.com
  19. Precedence: bulk
  20.  
  21. John Hess (johnhess@cris.com) wrote:
  22. : :At 04:14 PM 4/2/96 -0500, Matt `The Man` Galgoci wrote:
  23. : :Hi-
  24. : :    I realize that in order to use a disk image as a hfv, the first 
  25. : :84 bytes must be stripped off the beginning and the image renamed using 
  26. : :*.hfv convention.  Right now, with DOS, I'm not aware of any methods 
  27. : :that I can use to do this.  (Yes, I do know how to rename files :-))
  28. : :Could a Hex editor be used? How about any of the Norton Utilities?
  29.  
  30. : My question is, how do I get the file to copy back to the DOS area so I CAN 
  31. : edit it after I un-hqx/sit/sea it? 
  32. Any file that is on a HFV volume can be copied back to a DOS volume if it
  33. is renamed to 7.3 chars, the 8th is taken up by the % sign that is prepended
  34. to the name to get a 2nd filename for the resource fork. Or you could
  35. encode the file in MacBinary format, copy it to a DOS volume and then
  36. decode it with a DOS macbin program (from e.g. SimTel), this will probably
  37. extract only the data fork and choose a name that is valid in DOS.
  38.  
  39.  
  40. : If you have the actual image file in 
  41. : DOS, you should be able to strip the first 84 bits with the following BASIC 
  42. : code.  Note that it is written free-hand on line.  As always when mucking 
  43. : about with a file you want to keep, save it somewhere else before mucking 
  44. : about with it.
  45.  
  46. : 10  Open "filename.ext" for input as #1 
  47. : 20  Open "newname.ext" for output as #2
  48. : 30  x=1
  49. : 40  while not eof(1)
  50. : 50  a$=input$(1,1)
  51. : 60  if x > 84 then print #2,a$
  52. : 70  x=x+1
  53. : 80  a$=""
  54. : 90  wend
  55.  
  56. Hm, this probably doesn't work, since DOS distinguishes between text and
  57. binary files and the basic runtime will remove all CRs (0x0d) from the file
  58. and even worse, the file with be considered finished at the first ^Z (0x1a)(*).
  59. I have no idea if there is something like a binary open mode in BASIC, I would
  60. suggest writing a C or Pascal program. Or you could use dd or tail if you
  61. have access to a unix system (maybe there is a dd format for DOS somewhere).
  62.  
  63.  
  64. bye, Alexander
  65.  
  66.  
  67. (*) At least I think that is what is does, pretty long since I wrote BASIC
  68. programs at all.
  69.  
  70. --
  71. Alexander Lehmann,                                  |  "On the Internet,
  72. alex@hal.rhein-main.de  (plain, MIME, NeXT)         |   nobody knows
  73. alexlehm@rbg.informatik.th-darmstadt.de (plain)     |   you're a dog."
  74. <URL:http://www.student.informatik.th-darmstadt.de/~alexlehm/>
  75.  
  76.