Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!cwruecmp!pm From: pm@cwruecmp.UUCP (Prabhaker Mateti) Newsgroups: net.micro.atari16 Subject: Fforce() Message-ID: <1639@cwruecmp.UUCP> Date: Tue, 21-Oct-86 16:50:51 EDT Article-I.D.: cwruecmp.1639 Posted: Tue Oct 21 16:50:51 1986 Date-Received: Wed, 22-Oct-86 05:24:58 EDT Reply-To: pm@cwruecmp.UUCP (Prabhaker Mateti) Organization: CWRU Dept. of Computer Engineering, Cleveland OH Lines: 20 /* In a program I am writing, I need to redirect input/output. E.g., to redirect input from a file, I do Fforce(0, fd), but then I can't close the fd and reuse that handle. The following code demonstrates this. Any body has a clue as to what is wrong here?? */ #include main() { int fi, ff, fc, i; for (i=0; i < 81; i++) { fi = Fopen ("in", 0); ff = Fforce(0, fi); fc = Fclose(fi); printf("fi ff fc %d %d %d \n", fi, ff, fc); } }