home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / c / 20310 < prev    next >
Encoding:
Text File  |  1993-01-28  |  1.3 KB  |  33 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!taumet!steve
  3. From: steve@taumet.com (Steve Clamage)
  4. Subject: Re: How do you read binary data piped into stdin?
  5. Message-ID: <1993Jan28.162546.27128@taumet.com>
  6. Organization: TauMetric Corporation
  7. References: <N0gRXB1w165w@eastwind.mcds.com> <1993Jan26.012308.19664@netcom.com> <930126.062840.1v1.rusnews.w165w@cybrspc.uucp>
  8. Date: Thu, 28 Jan 1993 16:25:46 GMT
  9. Lines: 22
  10.  
  11. roy%cybrspc@cs.umn.edu (roy) writes:
  12.  
  13. >pdh@netcom.com (Phil Howard ) writes:
  14.  
  15. >> Unfortunately, standard C lacks a facility to change the mode of an open
  16. >> file.  This would be what you need, and I have had situations where I need
  17. >> this as well.
  18.  
  19. >What about setmode()?  My FM says the call is available on Unix systems.
  20. >Is the FM lying to me?  (I s'pose it wouldn't be the first time)
  21.  
  22. Note that Phil said "standard C".  Individual implementations may
  23. provide many functions not part of Standard C.  (I prefer to capitalize
  24. it when referring to the ANSI/ISO Standard.)
  25.  
  26. It is not possible on many systems to change the mode of an open file
  27. from text to binary.  Unix makes no distinction between text and binary
  28. files, and could perhaps accomplish this trick easily.  On the other
  29. hand, the versions of Unix I use do not have a function called setmode().
  30. -- 
  31.  
  32. Steve Clamage, TauMetric Corp, steve@taumet.com
  33.