Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!elroy.jpl.nasa.gov!sdd.hp.com!wuarchive!udel!rochester!miller From: miller@cs.rochester.edu Newsgroups: comp.sys.mac.programmer Subject: MPW 3.1 C stdio question(s) Message-ID: <1991Mar1.030623.9398@cs.rochester.edu> Date: 1 Mar 91 03:06:23 GMT Sender: miller@cs.rochester.edu (Brad Miller) Organization: University of Rochester Computer Science Department Lines: 42 Hi, I'm trying to get a couple of UNIX-type programs up under the MPW shell. Nothing *too* bizzare, but I can't seem to get much working... in particular I need to do raw i/o to the console, and send control information as well (e.g. clear to end of line, move cursor, etc.). Similar to the CONSOLE library in THINK C, or the CURSES package in unix. But I'm stuck. Not only isn't there any console control defined in the C or MPW manuals (if there is, please point me to it!), but something simple like main (){ setbuf(stdin, NULL); setbuf(stdout, NULL); while (getchar() != NULL){ putchar('x'); } } compiled and linked to be a tool, I'd expect on running it that every char I type would cause an x to be printed, but actually the input is echoed and nothing is printed until I do command-ret. when I get a single 'x'. Is there any way to get unbuffered, no echo, no editing input from the worksheet? (or stdin whatever it turns out to be?) Is there any way to control the worksheet from a tool, e.g. clearing the screen, getting the size of the screen, etc. I'd like to get this tool up (for personal use) asap, rather than have to learn how to do everything via mac windows and a large port... Thanks for any help, (probably a mailed response would be best; I can summarize) <>. Regards, Brad Miller miller@cs.rochester.edu