Xenix clear screen function..

Stacey Campbell staceyc at sco.COM
Tue Feb 13 04:19:46 AEST 1990


In article <5677 at holston.UUCP> barton at holston.UUCP (Barton A. Fisk) writes:
>On the ansi console it's easier to just enter echo "\f\c". This
>can be put into a script called clear in /usr/bin and
>should clear the screen and move the cursor home.

A more portable version of clear can be implemented with the following
very short C program.

#include <curses.h>

main()

{
	initscr();
	wclear(stdscr);
	wrefresh(stdscr);
	endwin();
}

Compile under Xenix with;

cc clear.c -o clear -lcurses -ltermlib

Many curses implementations will find a way to clear the screen even
if that particular capability is not directly supported by the terminal.
-- 
Stacey Campbell                                             _--_|\
{uunet,ucscc,decwrl,att,microsoft,wyse}!sco!staceyc        /      \
staceyc at sco.com                                            \_.--._/
                                                                 v



More information about the Comp.unix.xenix mailing list