huisken@nvpna1.prl.philips.nl (Jos Huisken) (12/04/90)
This is my vt100 (actually vt132) emulator...
$ vt # just creates a terminal window
$ vt remote_machine # does rsh on that machine.
Making your own vi should be easy :-), just exec.
Regards Jos
#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of shell archive."
# Contents: vt.c
# Wrapped by huisken@mackerel on Tue Dec 4 13:06:06 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'vt.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vt.c'\"
else
echo shar: Extracting \"'vt.c'\" \(429 characters\)
sed "s/^X//" >'vt.c' <<'END_OF_FILE'
X#include <stdio.h>
X#include <curses.h>
X
extern char* getenv();
X
main(int argc, char *argv[])
X{
X char cm[60];
X char *term;
X
X if ( (argc == 2) && (*argv[1] == '?') )
X {
X fprintf(stderr,"Usage: %s [remote_machine]\n", argv[0]);
X exit(0);
X }
X
X initscr();
X
X term = getenv("TERM");
X if (strncmp(term,"apollo",6) == 0)
X sprintf(term,"vt132");
X
X if (argc == 1)
X execv(getenv("SHELL"),argv);
X else
X execv("/usr/ucb/rsh",&argv[1]);
X}
END_OF_FILE
if test 429 -ne `wc -c <'vt.c'`; then
echo shar: \"'vt.c'\" unpacked with wrong size!
fi
chmod +x 'vt.c'
# end of 'vt.c'
fi
echo shar: End of shell archive.
exit 0
__________________________________________________________________________
Jos A. Huisken WAY41 NET : huisken@apolloway.prl.philips.nl
Philips Research Laboratories, PHONE: +31-40-742824
Eindhoven, The Netherlands. SERI : NLHUISKN:NVPNASA