A Terminal Window replacement for SIOUX

Metrowerks Codewarrior is a great programming environment for the Macintosh. But its console package, SIOUX, lacks functionality common on even the ancient VT100.

Fortunately, the Metrowerks folks provided an interface by which one can replace SIOUX with another package. I've put together a SIOUX replacement which uses the Communications Toolbox's terminal emulation to create a VTxxx-compatible console package. The terminal-window code itself is based heavily on sample code by Craig Hotchkiss. The package is still rather rough, but since some people have asked for it, I present it here. I hope you find it useful, and I welcome any suggestions you have for making it more so.


Click the link to download termconsole.sea.hqx (55K), which contains all the files you should need, including a demo project with a simple main program. This project is for the PowerPC; if you're using a 68K Mac, simply add the same files to a 68K project.

Options and Usage

You can use it in the default configuration simply by reading or writing to one of the standard ANSI streams (just as with SIOUX). However, you can also change several options by changing global variables before you initiate any console input or output.

TermWinScrolls: If this short variable is set to 1 (or any nonzero value), the terminal will have scroll bars. Scroll bars now work without crashing your computer (whew!). However, the size of the virtual document is not large; you probably won't use the scroll bars unless you shrink the window.

gConsoleQuickInput: If this is set to a nonzero value, then input routines which request a single character may receive it as soon as a key is pressed, instead of waiting for the user to press Return. This is a very useful feature, but the default behavior is the old terminal standard. Set it as you wish.

gConsoleSleep: This global variable determines how much time the console window gives other processes while waiting for an event. The default value is 5, which means that it will yield to other processes for 5/60ths of a second before demanding attention again.

Known Bugs / Limitations

Questions? Comments

Please feel free to write to me with any feedback. This package is provided as-is, with no expressed or implied warrantee, and you use it at your own risk. But if you do have any trouble, let me know and I'll do whatever I can to help.
Last Updated: 9/21/97 . . . . . . . Joe Strout