home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / os2 / programm / 3773 < prev    next >
Encoding:
Text File  |  1992-07-25  |  1.3 KB  |  38 lines

  1. Newsgroups: comp.os.os2.programmer
  2. Path: sparky!uunet!wupost!gumby!destroyer!ubc-cs!unixg.ubc.ca!ochealth
  3. From: ochealth@unixg.ubc.ca (ochealth)
  4. Subject: fopen(f,"r") vs fopen(f,"rb") what's the diff?
  5. Message-ID: <1992Jul25.175848.29166@unixg.ubc.ca>
  6. Sender: news@unixg.ubc.ca (Usenet News Maintenance)
  7. Nntp-Posting-Host: unixg.ubc.ca
  8. Organization: University of British Columbia, Vancouver, B.C., Canada
  9. References: <=!jmdvp.feustel@netcom.com> <92Jul25.163359.18069@acs.ucalgary.ca>
  10. Date: Sat, 25 Jul 1992 17:58:48 GMT
  11. Lines: 25
  12.  
  13.  
  14.  
  15. A number of UNIX programs I have ported to OS/2 using emx or gcc
  16. choke on binary files, unless I modify them.
  17.  
  18. for example:
  19. f = fopen(name,"r") must be changed to f=fopen(name,"rb")
  20. etc.
  21.  
  22. I was wondering just what happens when you don't open as binary.
  23. Will it return EOF when it sees ^Z or what?
  24.  
  25. This is sort of troubling to me, since EMX is desing to make porting UNIX easier
  26.  
  27. Was fopen changed to make it more compatible with OS/2 or what. From what I've
  28. read "r" and "rb" are handled the same in UNIX.
  29.  
  30. jpm
  31.  
  32.  
  33. -- 
  34. ______________________________________________________________________________
  35. jpm: ochealth@unixg.ubc.ca         
  36.                            Happily using OS/2 2.0 because MS Windows isN'T ___
  37.                                                       Insert VapourFeature ^^^
  38.