Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site 3comvax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!pyramid!hplabs!oliveb!3comvax!mykes From: mykes@3comvax.UUCP (Mike Schwartz) Newsgroups: net.micro.amiga Subject: Re: Creating NEWCLI Message-ID: <444@3comvax.UUCP> Date: Tue, 11-Mar-86 00:47:26 EST Article-I.D.: 3comvax.444 Posted: Tue Mar 11 00:47:26 1986 Date-Received: Wed, 12-Mar-86 22:45:37 EST References: <357@gargoyle.UUCP> Reply-To: mykes@3comvax.UUCP (Mike Schwartz) Distribution: net Organization: 3Com Corp; Mountain View, CA Lines: 57 In article <357@gargoyle.UUCP> ed@gargoyle.UUCP (Ed Friedman) writes: >Has anyone successfully created a window with a CLI in it? According to the >manuals, you are supposed to use execute with an empty string, a file handle >referring to a new window, and 0 for the output. > > I tried the following: > >nullstring[0] = '\0'; >execute(nullstring, &W, 0); > >where W is the pointer to the window I just opened. The results were that the >screen went all black, and the program acted as if it were dead (or not having >access to i/o). I then changed the execute command to be: > >execute(nullstring, W, 0); > >and this caused the machine to crash. > > My question is: just what is meant by a file handle to a new window? >What am I doing wrong? Also, the reason I am doing all of this is to allow >users of my program access to multitasking even though my program uses a >customscreen. My solution is to create a dummy window with a NEWCLI in it. >Is there some better solution to this problem? > > Thanks in advance, > Ed Friedman This is something that I too wish to do, and I am sure that Matt Dillon would to (for his shell program). What Ed is doing wrong is that he is passing the address of an intuition window structure to Execute() which is expecting a pointer to a FileHandle structure... I looked at the possibility of building my own FileHandle structure, but the AmigaDos documentation I have is thin in this area, and the folks at Commodore Amiga seem reluctant to open this messy can of worms to the public - I don't blame them. I discussed this problem with Neil Kadin (sorry if I misspelled it) at Amiga, and we talked about using sprintf() to create a special Open() string that would supplement the "raw:n/n/n/n/title" string. What he suggested was that Amiga might add the following capability: . sprintf(string, "win=%x", &My_Intuition_Window); . Open(string, MODE... I personally would rather see a custom BuildFileHandle() function of some sort. One other item of interest to this newsgroup is that they (Amiga) have considered adding a preference-like item to allow 640 x 400 workbench screens! I like the idea, because I think all those tiny little icons and huge CLI (would you believe 40+ lines of 78 chars?) windows would be fine looking. BTW, I am using a 640x400 terminal program that I am working on, and Unix looks real nice with 48 lines of text on the screen. I use black text on white background (looks like a mac, except higher resolution). I reduce the flicker to a quite tolerable (to my taste) level by turning down the bright and contrast on my Amiga monitor. My terminal program uses the console.device driver, so full 48 line ansi escape sequences work fine, and nroff or troff or whatever the unix manual program uses, uses underlining etc. real nicely.