Article View: comp.sys.atari.st
Article #39762Re: Another redirection question
From: John Stanley
Date: Thu, 21 Dec 1989 00:12
Date: Thu, 21 Dec 1989 00:12
21 lines
1370 bytes
1370 bytes
[piet@cs.ruu.nl (Piet van Oostrum) writes...]
> In article <1787@ncrcce.StPaul.NCR.COM>, rogers@ncrcce (Bob Rogers) writes:
> `I've tried a similar technique using the ST's "con:" device in place of
> `/dev/tty but to no avail. Can anyone offer a solution?
>
> Fforce (0, -1) or Fforce (0, Fopen ("con:", 0));
The first one should work, but the 2nd one has a few problems. Better to
use Fforce(0, (int)Fopen("con:", 0)); if you have to use this method. The
example Piet gave will (on many compilers) push a long onto the stack where
Fforce expects an int... Fopen "really" returns a long for some librarys..
In actual practice, I'd avoid using the 2nd form altogether since it
uses up a file handle that isn't going to be freeded until the program
exits. Do a bunch of these calls and you'd suddenly discover your
program couldn't open any more files...
---
John Stanley <john@dynasoft.UUCP>
Software Consultant / Dynasoft Systems
Technical Details
Message-ID:
<1989Dec21.001227.10622@stag.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!uwm.edu!uwvax!umn-d-ub!umn-cs!nis!pwcs!stag!daemonShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!uwm.edu!uwvax!umn-d-ub!umn-cs!nis!pwcs!stag!daemon From: john@dynasoft.UUCP (John Stanley) Newsgroups: comp.sys.atari.st Subject: Re: Another redirection question Message-ID: <1989Dec21.001227.10622@stag.UUCP> Date: 21 Dec 89 00:12:27 GMT Sender: daemon@stag.UUCP (The devil himself) Organization: Mindtools ST Access Group Lines: 21