home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / c / 16028 < prev    next >
Encoding:
Text File  |  1992-11-05  |  1.4 KB  |  29 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!secapl!Cookie!frank
  3. From: frank@Cookie.secapl.com (Frank Adams)
  4. Subject: Re: Sizeof('\n')?
  5. Message-ID: <1992Nov05.173651.129559@Cookie.secapl.com>
  6. Date: Thu, 05 Nov 1992 17:36:51 GMT
  7. References: <1992Oct23.011501.8087@klaava.Helsinki.FI> <1992Oct28.220506.66033@Cookie.secapl.com> <1992Oct30.110753.5055@klaava.Helsinki.FI>
  8. Organization: Security APL, Inc.
  9. Lines: 18
  10.  
  11. In article <1992Oct30.110753.5055@klaava.Helsinki.FI> wirzeniu@klaava.Helsinki.FI (Lars Wirzenius) writes:
  12. >frank@Cookie.secapl.com (Frank Adams) writes:
  13. >>There is one case where changing the mode may be necessary: if you want to
  14. >>read stdio in binary mode.  I have written utility functions which do this
  15. >>(depending on what other arguments are present).
  16. >
  17. >I, too, used to struggle with reading and writing binary stdin/stdout
  18. >but I gave up in disgust in the end, since [...] I couldn't e.g. force
  19. >stdin/stdout to binary mode all the time, and when I could it depended
  20. >on the input, so I had to read potentially a lot from stdin before I
  21. >could make a decision, and buffer it so that I could re-process it
  22. >appropriately.
  23. >
  24. >(Well, actually I solved my problem by switching operating systems.  I
  25. >was trying to write [...] for MS-DOS [...])
  26.  
  27. I wrote the above-mentioned functions for MS-DOS using Borland's products
  28. (Turbo C/Borland C++), and had no such problems.
  29.