Article View: net.micro.atari16
Article #2486Fforce()
From: Prabhaker Mateti
Date: Tue, 21 Oct 1986 20:50
Date: Tue, 21 Oct 1986 20:50
20 lines
971 bytes
971 bytes
/*
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 <osbind.h>
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);
}
}
Technical Details
Message-ID:
<1639@cwruecmp.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbatt!cwruecmp!pmShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!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