[comp.unix.questions] Clear screen

trw@aplcen.apl.jhu.edu (Weil timothy) (06/15/90)

as a sort of newcomer to UNIX system programming I've
got a real basic question -

   what is a simple 'C' Unix system call for clearing
   the terminal.  my guess is that it's buried somewhere
   in curses.h...
 
thanks

tif@doorstop.austin.ibm.com (/32767) (06/16/90)

In article <5683@aplcen.apl.jhu.edu> trw@aplcen.apl.jhu.edu (Weil timothy) writes:
>   what is a simple 'C' Unix system call for clearing
>   the terminal.  my guess is that it's buried somewhere
>   in curses.h...

No (correct) answer will consist of just a system call but
If that's all you intend to do (and you're not doing it every 2 seconds):

	system("tput clear");	/* this assumes a terminfo system */

Anything else doesn't fit the description of "simple".

Paul Chamberlain | I do NOT represent IBM	  tif@doorstop, sc30661@ausvm6
512/838-7008	 | ...!cs.utexas.edu!ibmaus!auschs!doorstop.austin.ibm.com!tif