home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / msdos / programm / 8919 < prev    next >
Encoding:
Internet Message Format  |  1992-08-31  |  1.3 KB

  1. Path: sparky!uunet!gatech!purdue!mentor.cc.purdue.edu!noose.ecn.purdue.edu!samsung!balrog!ctron.com
  2. From: dj@ctron.com (DJ Delorie)
  3. Newsgroups: comp.os.msdos.programmer
  4. Subject: Re: gcc (djgpp) default file mode (text vs binary) question?
  5. Message-ID: <4915@balrog.ctron.com>
  6. Date: 31 Aug 92 23:43:15 GMT
  7. References: <BtJuws.ACx@acsu.buffalo.edu>
  8. Sender: usenet@balrog.ctron.com
  9. Reply-To: dj@ctron.com
  10. Organization: None whatsoever
  11. Lines: 21
  12.  
  13. In article <BtJuws.ACx@acsu.buffalo.edu>, bandu@acsu.buffalo.edu (Jagath Samarabandu) writes:
  14. > I'm trying to port a bunch of unix image processing programs using djgpp and
  15. > have trouble setting the default file mode to binary. 
  16. > The file 'libc.doc' that comes with the distribution says I can set the global
  17. > variable _ftype to O_TEXT or O_BINARY and it should set the default file type.
  18. > But this doesn't seem to work. 
  19.  
  20. At least in the latest version (1.08), you can call setmode() on a
  21. file.  This is required for stdin/stdout/stderr, which are already
  22. opened by the time you call main().  Also, it's always safe to use
  23. "rb" or "wb" when you can.
  24.  
  25. > PS: Hats off to those who toiled to port gcc (djgpp). It even beats the pants
  26. > off of Borland C++ 3.1 for my application (both code size and speed).
  27.  
  28. Thanks!
  29.  
  30. DJ
  31. dj@ctron.com
  32. Life is a banana.
  33.