TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: CAMERON CLARK
from: JERRY COFFIN
date: 1997-05-14 10:14:00
subject: Rating of C++

On (07 May 97) Cameron Clark wrote to Jerry Coffin...
 CC>     I tried writing my own conio.h on a UNIX system (solaris?) and a
 CC>     few of the macros like addstr() where not available in the
 CC>     curses.h on this rag/tag system.
 CC>     I might have to just dig up some vt100 codes to move cursor and
 CC>     change attributes - I hate the curses.h library and often find
 CC>     myself having to hangup because keyboard input has been taken    
 CC>     control of an not released by my program.
 CC>     The only things I need to change are gotoxy(), cputs, and some   
 CC>     kind of mimic for textcolor textbackgroung for hilights, oh yeah
 CC>     and the biggy getch() - I need just a key at a time and function
 CC>     keys to return a null first and then a key code.
There's a getch() replacement in Snippets that should be portable to
Solaris or just about any other POSIX system.  It'll read one key press
at a time, though it won't convert function keys to create input like
DOS function keys.  I'd consider rewriting things a bit to use a data
file specifying the string created by each function key, and simply
matching the actual input with a string to find the correct key.
You might also want to take a look at the termio and/or termios
libraries.  (termios is the POSIX one...) which provide reasonably
terminal independent access to things like highlighting and cursor
positioning.  Given the relatively low-level calls you're using, termios
is likely closer to what you want than curses.
    Later,
    Jerry.
... The Universe is a figment of its own imagination.
--- PPoint 1.90
---------------
* Origin: Point Pointedly Pointless (1:128/166.5)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.