andrew@kcl-cs.UUCP (06/13/86)
Hi, I have just written a small program which redirects stdin to a file using the 'freopen' call. Well it works fine. But how do I get stdin back after finishing writing to the file. Normally one would write: freopen("/dev/tty","r",stdin); ^^^^^^^^ on a UNIX machine, but what is the 'filename' for stdin, stdout, stderr, on the ATARI ? Thanks in advance, Andrew Smith.
andrew@kcl-cs.UUCP (Andrew Smith) (06/16/86)
In article <695@neon.kcl-cs.UUCP> andrew@kcl-cs.UUCP () writes: > > freopen("/dev/tty","r",stdin); > ^^^^^^^^ > >on a UNIX machine, but what is the 'filename' for stdin, stdout, stderr, >on the ATARI ? > I have been playing around with different filenames and have found that "CON:" seems to cause 'freopen' not to return an error. But upon reading 'stdin' the character '^J' (10) is always returned. Do I need to do anything else or may there be a bug in the LATTICE 'C' library ? Thanks in advance, Andrew Smith. ..!mcvax!ukc!kcl-cs!andrew