home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / zip / gnu / mntlib16.lzh / MNTLIB16 / BINMODE.C < prev    next >
C/C++ Source or Header  |  1993-07-29  |  726b  |  28 lines

  1. /*
  2.  * added _binmode()
  3.  *    if called with TRUE, then subsequently all fopens have _IOBIN
  4.  *    by default  on open. This will make life much easier for
  5.  *    people who have been using the Gnu lib (any my job with the compiler
  6.  *    much easier too, dont't have to go hunting for fopens())
  7.  *                ++jrb;
  8.  */
  9.  
  10. /* moved to a separate module, so that people who want to can put
  11.  * __default_mode__ = _IOBIN in their main program without getting
  12.  * a link conflict; moreover, this allows stdin and stdout to be
  13.  * binary mode by default as well. ++ERS
  14.  */
  15.  
  16. #include <stdio.h>
  17.  
  18. int __default_mode__ = 0;
  19.  
  20. void _binmode(force)
  21. int force;
  22. {
  23.     if(force)
  24.     __default_mode__ = _IOBIN;
  25.     else
  26.     __default_mode__ = 0;
  27. }
  28.