clear for vax/vms
Lord Kahless
ccrdave at ucdavis.UUCP
Sat Jul 6 16:58:42 AEST 1985
Here is a dcl command file that clears the screen for a vt52 and
three variations of a vt100. I replaced the <ESC>'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.
More information about the Comp.sources.unix
mailing list