Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site ucdavis.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!ucbvax!ucdavis!ccrdave
From: ccrdave@ucdavis.UUCP (Lord Kahless)
Newsgroups: net.sources
Subject: Re: clear for vax/vms
Message-ID: <334@ucdavis.UUCP>
Date: Sat, 6-Jul-85 02:58:42 EDT
Article-I.D.: ucdavis.334
Posted: Sat Jul  6 02:58:42 1985
Date-Received: Mon, 8-Jul-85 00:38:26 EDT
References: <820@gloria.UUCP> <460@grkermi.UUCP> <301@eneevax.UUCP>
Distribution: net
Organization: University of California, Davis
Lines: 31

Here is a dcl command file that clears the screen for a vt52 and
three variations of a vt100.  I replaced the 's by ^[ in the
file, so if you change them back, it will work.  This is part of
my login.com .... 

I'd have posted earlier if I hadn't thought that everyone had one
of these in their login.com...

$! get your terminal type
$ SET TERM/inquire
$! find out what the terminal type is...
$ lsn = f$logical("sys$command")
$! clear and post a message...
$ if f$getdvi(LSN,"DEVTYPE") .eqs. "110" THEN WRITE SYS$OUTPUT -
 "^[[;H^[[2J"
$ if f$getdvi(LSN,"DEVTYPE") .eqs. "98" THEN WRITE SYS$OUTPUT -
 "^[[;H^[[2J"
$ if f$getdvi(LSN,"DEVTYPE") .eqs. "96" THEN WRITE SYS$OUTPUT -
 "^[[;H^[[2J"
$! The ^[-^[0 sets some options on a common vt52 emulator around
$! u.c. davis, the Microterm Mime 2a. You can set options such as
$! nowrapmargin or nokeyclick if you choose in such a .com file
$ if f$getdvi(LSN,"DEVTYPE") .eqs. "64" THEN WRITE SYS$OUTPUT -
 "^[H^[J^[-^[0"

The C curses package isn't necessary.  You should remember that usually
a user on VMS is using either a vt100 or vt52 family terminal.  If you
use getenv ("TERM") in C, you can deduce the device type.  If it's a
vt52, write out the four character vt52 clear, else if it is a vt100
family terminal (100,101,102, 125, gigi, 200...) write out the vt100
family clear, which is the same on a Wyse 75 as it is on a vt241.