/***************************************************************************/ /***** portable Virtual Device Interface ***********************************/ /***************************************************************************/ #include /***** initialization ******************************************************/ #define CURSnote "UNIX Curses pVDI v1.0" CURSinit (args) va_list args; { initscr (); noecho (); cbreak (); } CURSexit () { clear (); refresh (); endwin (); } /***** input ***************************************************************/ int CURSgetch () { return (getch ()); } /***** output **************************************************************/ CURSprint (fmt, args) char *fmt; va_list args; { char buf[BUFSIZ]; vsprintf (buf, fmt, args); addstr (buf); } CURSclear () { clear (); } CURSrefresh () { refresh (); } CURSmove (y, x) int y, x; { move (y, x); }