[comp.sys.mac.programmer] raw console i/o in THINK 4.0

gary@sun.soe.clarkson.edu (Gary Levin) (08/29/89)

Under LSC 3.0 I used ``getch'' to read a character at a time,
no processing, no echo.  I want to do the same thing under 4.0, but
``csetmode(C_RAW, stdin)'' has two drawbacks:
    (1) It is a no-wait ``getchar'', which means that I need to busy
    wait.  Not a serious problem.

    (2) There is no cursor visible.  

If I use C_CBREAK, I get a cursor, and the system waits for a
character, but I also get echo, which is not what I want.

Is there a way to CBREAK/NO_ECHO?  This is closest to the 3.0 version.
Is there a way to turn on the cursor in RAW mode?  I can busy wait.

====

Side bar:  It would have been helpful if a list of changes had been
included in the documentation.  The introduction of <string.h> caused
some trouble, as did the change of malloc from malloc(int) to
malloc(long).  Still and all, I am fairly happy.
--
Gary Levin/Dept of Math & CS/Clarkson Univ/Potsdam, NY 13676/(315) 268-2384
BitNet: gary@clutx   Internet: gary@clutx.clarkson.edu