Path: utzoo!attcan!ncrcan!brambo!camtwh!morgan From: morgan@camtwh.UUCP (Morgan W. Jones) Newsgroups: comp.sys.amiga.tech Subject: Re: Open a console window from Lattice Message-ID: <207@camtwh.UUCP> Date: 12 Dec 89 16:39:52 GMT References: <129043@sun.Eng.Sun.COM> <812@jc3b21.UUCP> Reply-To: morgan@camtwh.UUCP (Morgan Jones) Organization: Orama Incorporated, Toronto, Canada. Lines: 39 If anyone is interested, last weekend I sat down and hacked up a couple of routines (in Manx) to handle console stuff much like stdio stuff. I won't say it's great code, but it might be interesting for people who would like to get a complete example. Synopsis is as follows: #include "console.h" CON *OpenConsole(top,left,width,height,title,window_flags) int top,left,width,height; char *title; int window_flags; int ReadConsole(console,buf,len) CON *console; char *buf; int len; int WriteConsole(console,buf,len) CON *console; char *buf; int len; int CloseConsole(console) CON *console; NB: Yes, these routines do automatically create the window. I made these because I wanted to be able to run multiple console windows without screwing around with stuff. Next, I need to come up with a way to have to replies from CMD_READ routed to a different msgport (so that I can have N devices of differing types all sending input to a common port to be processed - this way I avoid having to poll everything and all of the devices are nicely abstracted). -- Morgan W. Jones (morgan@camtwh) Orama Incorporated, Toronto, Canada. (416) 369-5088