no curses; smaller code

Richard Goerwitz goer at sophist.uucp
Sun Feb 4 16:22:07 AEST 1990


Occasionally I find myself having to do something trivial
to the screen, but because I'm accustomed to using cur-
ses, this typically increases the size of the executable
by a good 25k.  Below is a typical piece of code (nor-
mally I'd use tput clear to clear the screen - it's just an
example).  If someone could show me how to do this using
lower level functions, I'd appreciate it:

#include <tcap.h>

main()
{
  initscr();
  clear();
  refresh();
  endwin();
  exit();
}



   -Richard L. Goerwitz              goer%sophist at uchicago.bitnet
   goer at sophist.uchicago.edu         rutgers!oddjob!gide!sophist!goer



More information about the Comp.unix.questions mailing list