home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / atari / st / tech / 6559 < prev    next >
Encoding:
Internet Message Format  |  1993-01-09  |  1.3 KB

  1. From: jensk@hpbbn.bbn.hp.com (Jens Kilian)
  2. Date: Fri, 8 Jan 1993 15:52:03 GMT
  3. Subject: Re: Porting UNIX Code to the ST
  4. Message-ID: <JENSK.93Jan8085203@hpbbrn.bbn.hp.com>
  5. Organization: HP
  6. Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!hpscit.sc.hp.com!hplextra!hpcss01!hpcc05!hpbbn!hpbeo20!jensk
  7. Newsgroups: comp.sys.atari.st.tech
  8. References: <1993Jan5.214420.8268@sae.com>
  9. Sender: news@hpbeo20.bbn.hp.com (News System)
  10. In-Reply-To: malay@sae.com's message of Tue, 5 Jan 1993 21:44:20 GMT
  11. Lines: 24
  12.  
  13. Three different solutions:
  14.  
  15. 1) setenv UNIXMODE b
  16.  
  17.    This will also work with the MiNT library, which supports the `b' flag.
  18.  
  19. 2) Recompile the program after adding a call to binmode() at the start of
  20.    main(). You may need to give binmode() a parameter (I may also have the name
  21.    wrong).
  22.  
  23. 3) If your program needs to do both binary and text I/O, recompile the program
  24.    after changing all the fopen's for the binary files:
  25.  
  26.     fopen(..., "r")   to   fopen(..., "rb")
  27.     fopen(..., "w")   to   fopen(..., "wb")
  28.  
  29. Good luck,
  30.  
  31.     Jens.
  32. --
  33. Internet: jensk@hpbeo82.bbn.hp.com    HPDESK : JENS_KILIAN%XU@HP1200
  34. MausNet:  Jens Kilian @ BB                     KILIAN_JENS/HP1200_XU@hpbbi4
  35. -------------------------------------------------------------------------------
  36. As the air to a bird, or the sea to a fish, so is contempt to the contemptible.
  37.