🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #420

Re: Need help changing stdout to binary mode...

#420
From: Larry Salomon Jr.
Date: Wed, 22 Jul 1992 01:58
24 lines
1457 bytes
In <1992Jul20.182736.27933@cgrg.ohio-state.edu> bpowell@osc.edu (Brian Powell) writes:

>andrewb@lynx.cs.washington.edu (Andrew Berg) writes:
>: rommel@jonas.bofe.sub.org (Kai Uwe Rommel) writes:
>: : To get a binary version of stdout, you could use
>: : 
>: : 	FILE *stdout2 = fdopen(1, "wb");
>: : 
>: : The file handle 1 is stdout. C Set/2 does also (like many other
>: 
>: What is the handle number on stdin?  My guess is 2, but I'm hesetant to try 
>: it having had problems with indiscreetly trying things like that in the past.

>Handle 0 is stdin, at least under UNIX.  I assume it is the same under
>OS/2 since the stdout == 1 is the same.  Handle number 2 is stderr...

This is correct.  0 is stdin, 1 is stdout, and 2 is stderr.  I know this is
documented somewhere, but I can't remember where (maybe DosRead, DosWrite,
or DosPutMessage).
-- 
Cheers,
Q
-----------------------------------------------------------------------
"If you still choose not to decide,   | "My other account is in the
Technical Details
Message-ID: <1992Jul22.015830.16904@panix.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!psinntp!panix!os2man
References: <1992Jul18.045746.3964@beaver.cs.washington.edu> <1992Jul20.182736.27933@cgrg.ohio-state.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!psinntp!panix!os2man
From: os2man@panix.com (Larry Salomon Jr.)
Subject: Re: Need help changing stdout to binary mode...
Message-ID: <1992Jul22.015830.16904@panix.com>
Date: Wed, 22 Jul 1992 01:58:30 GMT
References: <1992Jul18.045746.3964@beaver.cs.washington.edu> <1992Jul20.182736.27933@cgrg.ohio-state.edu>
Organization: PANIX Public Access Unix, NYC
Lines: 24