Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!phigate!prle!prles2!nvpna1!huisken From: huisken@nvpna1.prl.philips.nl (Jos Huisken) Newsgroups: comp.sys.apollo Subject: Simple replacement /com/vt100 Message-ID: Date: 4 Dec 90 12:00:48 GMT References: <1990Nov29.115537.7574@swift.cs.tcd.ie> <1990Nov30.172831.16283@alphalpha.com> Sender: news@prles2.prl.philips.nl Lines: 63 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 'vt.c' <<'END_OF_FILE' X#include X#include 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