1. I/O Redirection

Tim,

> As I said, I want to write a program which writes to the screen.
> I know that if output is not redirected using fileno 1 (which is
> the file number for standard output) will write to the screen. What I
> am trying to do is to write to the screen EVEN IF output is
> redirected. I am trying to do this by use open() to open a fileno
> on device "CON".

Try this :-

   puts(1,"Standard Output \n")
   puts(2,"Standard Error  \n")

The error channel always prints to screen even if Standard Output is
re-directed, it is a lot easier than poking the video memory.

Regards - Peter

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu