Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!nike!oliveb!glacier!navajo!rokicki From: rokicki@navajo.STANFORD.EDU (Tomas Rokicki) Newsgroups: net.micro.amiga Subject: Using standard input/output to new window Message-ID: <765@navajo.STANFORD.EDU> Date: Thu, 31-Jul-86 16:58:13 EDT Article-I.D.: navajo.765 Posted: Thu Jul 31 16:58:13 1986 Date-Received: Sat, 2-Aug-86 07:23:18 EDT Organization: Stanford University Lines: 28 Someone posted a question about using stdio functions to a new window. Well, this is a trick I use sometimes. ------cut here------ mywindow() { FILE *fopen() ; FILE *input, *output ; FILE temp ; output = fopen("con:170/50/300/100/Temporary Window", "w+") ; if (output == NULL) { error("Could not open temporary window.") ; return ; } input = &temp ; *input = *output ; /* * Do standard input/output here. */ fclose(input) ; fclose(output) ; } ------cut here------ This works with Manx; it may or may not work with Lattice. I use code much like this at the beginning of all of my programs to open a console window in case the code was called from the WorkBench rather than from the CLI. It's truly a hack, though.