Newsgroups: comp.sys.mac.programmer Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!stanford.edu!agate!root From: dburr@sandstorm.berkeley.edu (Donald Burr) Subject: Help using console routines in ThinkC Message-ID: <1991Apr26.101148.17606@agate.berkeley.edu> Sender: root@agate.berkeley.edu (Charlie Root) Organization: Open Computing Facility (OCF), UC Berkeley Date: Fri, 26 Apr 1991 10:11:48 GMT Lines: 25 I converted a Lex file to C source on UNIX, and ported it into a Mac environ- ment. I designed a front-end for it using Prototyper (Mac interface, and all that). Basically, I have it set up so that the Prototyper portion of the code has a "main()" routine that checks for OS events, does Mac-like things (menus, dialogs, etc.). then, if you choose a menu item, it should jump into the Lex portion (I renamed the 'main()' of the lex file to some- thing else (lex(), for example)) and I have it so that if the user selected that menu item, it just goes "lex()" and calls into the lex portion of the code. However, at present, it only takes input from the keyboard and dis- plays output to the screen (using the Think C standard "console"). Is there a way I can get the user to choose if he wants input from a file and where to direct output to (console or file)? Example code would be greatly appreciated! If you want to see a copy of what I've got so far, I can binhex and mail you copies of the source. I'm not that experience when it comes to Mac programming (i'm still sorta new at this), so please try not to get too technical. :) - don =============================================================================== Donald Burr, Univ. of California,Berkeley | America Online: DonaldBurr INTERNET: dburr@ocf.Berkeley.EDU |_Compu$erve:_72540,3071_____________ or: 72540.3071@compuserve.COM | "Send flames to /dev/null."