On 2008-04-18, Terry <cong818@[EMAIL PROTECTED]
> wrote:
> I want to reopen stdout, so that I can change stream orientation on
> stdout using fwide().
> Can this be done using only C library routines?
Not clear what you want. There's freopen function that allows to reopen
any stream, including stdout.
What is your situation exactly? You've already determined the
orientation and now want to change it, but don't know where to the
stdout is directed? On linux one can use fdopen to attach new stream to
a file descriptor. One would have to use dup and dup2 to preserve the
descriptor and then assign to stdout the stream returned from fdopen.
There might be some better way. Also, this way is not ****table.
--
Minds, like parachutes, function best when open
--
comp.lang.c.moderated - moderation address: clcm@[EMAIL PROTECTED]
-- you must
have an appropriate newsgroups line in your header for your mail to be
seen,
or the newsgroup name in square brackets in the subject line. Sorry.


|