west@calgary.UUCP (Darrin West) (10/23/86)
I am attempting to port to my brother's Amiga a spline editor I wrote in an undergraduate course. It made use of the ability of Unix to open a device as a file (i.e. one's terminal), and then do all line drawing and keyboard/mouse input with escape sequences written with fprint etc. In certain place (the AmigaDOS manual??) there are references to "devices" called "con:" and "raw:". They work from CLI as advertised, but a simple C program to test for necessary properties does not react as expected. Essentially I open a "raw:xx/yy/mx/my/window_name" window as a file, with "w+", so that I can send it (as described in the ROM Kernel manual) an escape sequence to tell Intuition (I am assuming) to send mouse and keyboard input back to this file as extended streams of data. (Am I correct in assuming it is actually human readable strings? eg. 0 as opposed to ^@ <- that is a null byte!) I then do a seek(0), which is regularly needed to switch from write to read, then I read and echo every character (barring escapes, so that I dont foul up the other window) back to stdout (CLI). I see an occaisional charater that looks very much like it was part of the mouse event string, but nothing concrete or repeatable. I want a SIMPLE method of reconnecting stdin and stdout to a different window than the parent window!!!! Am I possibly doing something wrong with my I/O calls, misinterpreting the ROM Kernel Manual's description of the neccessary steps to achieve this end, or worse yet mis-using the "con:" "raw:" facility completely and MUST return to messing with interupt driven message parsing. I have a feeling that there is some command I must give to Intuition to tell it not to keep grabbing the mouse events (although I thought the "\084etc." jazz would do that). I would gladly trade some speed of I/O for a simple interface, as the bulk of the work in my spline editor is calculating the points on the curves. I have access to all (I hope) the manuals, so a pointer to the appropriate sections would be acceptable (given that you are sure your solution is functional; I spent a lot of time on this). Darrin. -- Mechanic to autophile: "It hesitates on acceleration? Maybe it's the fact that your drive-shaft is still back at the corner." Darrin West Master's Unit (read: student) Department of Computer Science University of Calgary Calgary, Alberta. ..![ubc-vision,ihnp4]!alberta!calgary!west Brain fault (cortex dumped)