home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / os2 / programm / 3724 < prev    next >
Encoding:
Text File  |  1992-07-22  |  1.4 KB  |  35 lines

  1. Newsgroups: comp.os.os2.programmer
  2. Path: sparky!uunet!psinntp!panix!os2man
  3. From: os2man@panix.com (Larry Salomon Jr.)
  4. Subject: Re: Need help changing stdout to binary mode...
  5. Message-ID: <1992Jul22.015830.16904@panix.com>
  6. Date: Wed, 22 Jul 1992 01:58:30 GMT
  7. References: <1992Jul18.045746.3964@beaver.cs.washington.edu> <1992Jul20.182736.27933@cgrg.ohio-state.edu>
  8. Organization: PANIX Public Access Unix, NYC
  9. Lines: 24
  10.  
  11. In <1992Jul20.182736.27933@cgrg.ohio-state.edu> bpowell@osc.edu (Brian Powell) writes:
  12.  
  13. >andrewb@lynx.cs.washington.edu (Andrew Berg) writes:
  14. >: rommel@jonas.bofe.sub.org (Kai Uwe Rommel) writes:
  15. >: : To get a binary version of stdout, you could use
  16. >: : 
  17. >: :     FILE *stdout2 = fdopen(1, "wb");
  18. >: : 
  19. >: : The file handle 1 is stdout. C Set/2 does also (like many other
  20. >: 
  21. >: What is the handle number on stdin?  My guess is 2, but I'm hesetant to try 
  22. >: it having had problems with indiscreetly trying things like that in the past.
  23.  
  24. >Handle 0 is stdin, at least under UNIX.  I assume it is the same under
  25. >OS/2 since the stdout == 1 is the same.  Handle number 2 is stderr...
  26.  
  27. This is correct.  0 is stdin, 1 is stdout, and 2 is stderr.  I know this is
  28. documented somewhere, but I can't remember where (maybe DosRead, DosWrite,
  29. or DosPutMessage).
  30. -- 
  31. Cheers,
  32. Q
  33. -----------------------------------------------------------------------
  34. "If you still choose not to decide,   | "My other account is in the
  35.