Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!fang!tarpit!bilver!alex From: alex@bilver.uucp (Alex Matulich) Newsgroups: comp.sys.amiga.programmer Subject: Consoles & RastPorts, and ne'er the twain shall meet Keywords: stdio Message-ID: <1991Apr29.221442.14665@bilver.uucp> Date: 29 Apr 91 22:14:42 GMT Distribution: na Organization: W. J. Vermillion - Winter Park, FL Lines: 27 Here are two Amiga programming problems that I would like to be able to solve, without resorting to assembly language if possible. I need a solution to just one of them, number 2 preferably! (1) I open a window using fopen("CON:", "wb"). A console window is opened, and a convenient file pointer is returned which I can use with functions like fprint(), fputs(), etc. Problem: How do I find a pointer to this window's Window structure, specifically the pointer to its RastPort? (2) I open a window using OpenWindow(), and a pointer to the Window structure is returned. I attach a console to this window using OpenConsole(). Problem: How do I get an fopen-compatible stdio pointer to the console, so that I can use fprint() with it? It seems to me, that if I can do (1) or (2) separately, there should be a way to combine the benifits of both. Can anybody help? Also, if anybody can explain how the AmigaDOS "More" program is able to intercept keystrokes from the CLI console before the CLI gets to them (without resorting to assembly if possible), you'd have my undying gratitude! -- _ |__ Alex Matulich /(+__> Unicorn Research Corp, 4621 N Landmark Dr, Orlando, FL 32817 //| \ UUCP: alex@bilver.uucp ...uunet!tarpit!bilver!alex ///__) bitnet: IN%"bilver!alex@uunet.uu.net"