Path: 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 [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 Software Consultant / Dynasoft Systems