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

  1. Newsgroups: comp.std.c
  2. Path: sparky!uunet!ferkel.ucsb.edu!taco!gatech!darwin.sura.net!bogus.sura.net!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!decwrl!pa.dec.com!engage.pko.dec.com!nntpd.lkg.dec.com!jit345.bad.jit.dec.com!diamond
  3. From: diamond@jit345.bad.jit.dec.com (Norman Diamond)
  4. Subject: Re: binary data with stdin/stdout
  5. Message-ID: <1993Jan27.015633.21966@nntpd.lkg.dec.com>
  6. Sender: usenet@nntpd.lkg.dec.com (USENET News System)
  7. Reply-To: diamond@jit.dec.com (Norman Diamond)
  8. Organization: Digital Equipment Corporation Japan , Tokyo
  9. References: <ig25.728085496@fg70>
  10. Date: Wed, 27 Jan 1993 01:56:33 GMT
  11. Lines: 30
  12.  
  13. In article <ig25.728085496@fg70> ig25@fg70.rz.uni-karlsruhe.de (Thomas Koenig) writes:
  14. >Does the standard have anything to say about wether stdin and stdout
  15. >are opened to a file stream opened in binary mode?
  16.  
  17. Almost.  It says that they're text streams.  It doesn't require text streams
  18. to be different from binary streams, but of course on some implementations
  19. they are different.
  20.  
  21. >Would a program which wrote binary data to standard output, or read it
  22. >from standard input, be complying?
  23.  
  24. Under the weak definition of "conforming" (for programs) it could very well
  25. do so.  Under the strong definition of "strictly conforming" it is possible,
  26. but you'd have to be very restrictive in the data that you write, and in
  27. other operations that you do.  I'd have to guess your purpose and guess no.
  28.  
  29. >The reason for asking is that many programs which were developed for
  30. >UNIX, which do this, fail on systems where binary and text mode for file
  31. >streams are not identical.  I'd like to know wether they fail in a
  32. >standard - conforming or a non - standard - conforming way :-)
  33.  
  34. If the failure means that the output is different from what the output
  35. would be when they succeed, then obviously they're not strictly conforming.
  36. (Part of the definition of strictly conforming is that they do not produce 
  37. output dependent on any unspecified, undefined, or implementation-defined
  38. behavior.)
  39. --
  40. Norman Diamond                diamond@jit.dec.com
  41. If this were the company's opinion, I wouldn't be allowed to post it.
  42. Pardon me?  Or do I have to commit a crime first?
  43.