[comp.unix.ultrix] Ultrix 1.2 vs the "sc" PD spreadsheet

grr@cbmvax.UUCP (George Robbins) (02/10/88)

The /usr/include/curses.h header file for Ultrix 1.2 contains a kludge
that is supposed to correct a problem with CRMOD action in curses.
It's not clear exactly what the situation is, but the "fix" keeps sc
from working correctly.  I don't know whether the problem exists with
other releases of Ultrix.

The symptom is a "diagonal" display when you invoke the sc program.

The fix is to include the following lines a the end of sc.h:

#ifdef ultrix
#undef nl
#undef nonl
#define nl()	 (_tty.sg_flags |= CRMOD,_pfast = _rawmode,stty(_tty_ch, &_tty))
#define nonl()	 (_tty.sg_flags &= ~CRMOD, _pfast = TRUE, stty(_tty_ch, &_tty))
#endif


By the way, the "sc" program, recently re-released in comp.sources.unix
seems to be a nice little tool.  While not exactly Lotus 123, it is good
enough to maintain the MS-DOS free zone in my office.  The internal file
format is ascii and seem simple enough that other programs, awk scripts,
etc. can easily generate "spreadsheets" for display/analysis with sc.