Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!ncar!oddjob!uwvax!rutgers!njin!princeton!siemens!drexel!rickers From: rickers@drexel.UUCP (Rick Wargo) Newsgroups: comp.unix.microport Subject: Ansi Terminfo Entry for AT386/Ansi monitor (actually a generator) Keywords: catie - Configure Ansi Terminfo Entries (and a reset term script) Message-ID: <649@drexel.UUCP> Date: 27 Jul 88 19:36:00 GMT Organization: Drexel University, Phila., Pa. Lines: 657 The following is a terminfo generator for ansi/AT386 monitors under Microport Sys V/386 (Sys V/AT). It allows you to select fore/back ground colors, cursors, and standout mode. It also is a fairly complete ansi entry, circumventing the bugs in the ansi driver. It works fine with vi, emacs, uemacs, jove, wanderer, less, more, and the like. I have found that a lot of ansi entrie out there don't do too well with gnu emacs and wanderer. This one does. And beware, the entry posted a few days ago by keith@uport contains a few problems. Enjoy it! Rickers ..!drexel!rickers ---- Cut Here and unpack ---- #!/bin/sh # shar: Shell Archiver (v1.22) # Packed Wed Jul 27 15:21:21 EDT 1988 by rickers # from directory /usr/rickers/uport/terminfo # # Run the following text with /bin/sh to create: # README # catie # rt # if test -f README; then echo "File README exists"; else echo "x - extracting README (Text)" sed 's/^X//' << 'SHAR_EOF' > README && X X catie -- Configure Ansi TermInfo Entries X X Author: Rick Wargo X Date: july 27, 1988 X X Copyright 1988 P & T Consultants, Inc. X Permission has been granted to use this software, as long as X no profits are made from it. The copyright notice and X author identification must retain intact. X XOkay.... here it is, finally. A shell script capable of configuring Xa terminfo entry based on what *you* want. I have seen bunches of terminfo Xentries for the ansi monitor for Microport Unix SysV, but none of them Xheld up to all of the big tests (gnu emacs, month, wanderer, less, ...). XCatie generates a terminfo entry that stands up against all of these, and Xalso allows you to configure some modes to suit your own taste. X XTo run, just type `catie' and read the directions it gives you. Catie tells Xyou how to install the terminfo entry for the ansi monitor. X XI have written this on Microport V/386 and have not tested it under Sys V/AT, Xalthough it should work. X XI plan to keep making the entry that is generated better and better, so if Xthere are any comments or suggestions, let me know. If there are any Xproblems, please let me know about them. X XI have include a small script I use to reset the terminal when things Xdon't seem to be working just right. The script is called `rt' and should Xbe placed in your path. When something is wrong, try typing: ^Jrt^J X(^J is a control-J) and that should get things back to normal. X X Enjoy, X Rickers X ..!drexel!rickers X SHAR_EOF chmod 0664 README || echo "restore of README fails" fi if test -f catie; then echo "File catie exists"; else echo "x - extracting catie (Text)" sed 's/^X//' << 'SHAR_EOF' > catie && X: catie -- configure ansi terminfo entry for ansi monitor X# X# File: catie X# Author: Rick Wargo X# Date: July 27, 1988 X# X# Firm: P & T Consultants, Inc. X# 80. W. Georgianna Dr. X# Richboro, PA 18954 X# (215) 895-1913 X# X# Copyright 1988 P & T Consultants, Inc. X# Permission has been granted to use this software, as long as X# no profits are made from it. The copyright notice and author X# identification must retain intact. X# X# X# Set up some variables so that we can use them in extracting the entry. X# Xnormal=0 Xbold=1 Xunderline=4 Xblink=5 Xreverse=7 Xinvisible=8 Xlowerchars=10 Xgraphcontrol=11 Xupperchars=12 Xcursor_underline=23 Xcursor_blinking_block=24 Xcursor_invisible=25 Xcursor_steady_block=26 Xcursor_reset=27 Xblack=30 Xred=31 Xgreen=32 Xbrown=33 Xblue=34 Xmagenta=35 Xcyan=36 Xwhite=37 Xmagenta_RED=38 Xmagenta_blue=39 Xblack_background=40 Xred_background=41 Xgreen_background=42 Xbrown_background=43 Xblue_background=44 Xmagenta_background=45 Xcyan_background=46 Xwhite_background=47 Xred_backBlink=48 Xblue_background=49 X# X# Variables to direct which way to go X# Xcolor_mono=color Xfore_color=${bold}${brown} Xback_color=${black_background} Xgraphics=yes Xnormal_cursor=${cursor_underline} Xvery_visible_cursor=${cursor_steady_block} Xstandout=${blue_background} Xif [ i386 ]; then X ansi=AT386 X lines=25 Xelse X ansi=ansi X lines=24 Xfi X# X# escape sequences X# Xsmso=`tput smso` Xif [ -z "$smso" ]; then X smso="\033[1;7;33;44m" Xfi Xrmso=`tput rmso` Xif [ -z "$rmso" ]; then X rmso="\033[0;40m" Xfi Xcuu1=`tput cuu1` Xif [ -z "$cuu1" ]; then X cuu1="\033[A" Xfi Xel=`tput el` Xif [ -z "$el" ]; then X el="\033[K" Xfi Xed=`tput ed` Xif [ -z "$ed" ]; then X ed="\033[J" Xfi Xclear=`tput clear` Xif [ -z "$clear" ]; then X clear="\033[H\033[J" Xfi X# X# Some utility routines X# XContinue(){ X echo "$smso[Press to continue]$rmso\c" X read line X echo "$cuu1$ed\c" X} X# X# Let's do it. X# X# setcolor -f white -b black Xecho "$clear\c" Xcat <\c" Xecho "\033[${cursor_reset};${very_visible_cursor}m\c" Xsleep 2 Xecho "\033[${cursor_reset};${normal_cursor}m" X# X# Okay, now extract the terminfo entry. X# Xecho "${clear}\c" Xcat< \c" Xread line Xsynonyms=${line} X Xfilename=${major}.ti Xecho "Extracting terminfo entry into ${filename}..." Xif [ -f "${filename}" ]; then X echo "catie: will not overwrite ${filename}, using ${major}.$$ instead." X filename=${major}.$$ X rm -f ${filename} Xfi X Xif [ -s "$synonyms" ]; then X header="${major}|${synonyms}" Xelse X header=${major} Xfi Xheader="${header}|catie generated terminfo entry (${color_mono})," X Xecho ${header} > ${filename} X Xif [ "$color_mono" = "color" ]; then X cat <> ${filename} X am, X mir, X xon, X cols#80, X it#8, X lines#${lines}, X vt#3, X acsc=0[a~fxgqh~jYk?lZm@nEqDtCu4vAwBx3~y, X bel=^G, X blink=\E[$blink}m, X bold=\E[${bold}m, X cbt=\E[Z, X civis=\E[${cursor_invisible};${cursor_reset}m, X clear=\E[H\E[J, X cnorm=\E[${normal_cursor};${cursor_reset}m, X cr=\r, X csr=\E[%i%p1%d;%p2%dr, X cub=\E[%p1%dD, X cub1=\b, X cud=\E[%p1%dB, X cud1=\n, X cuf=\E[%p1%dC, X cuf1=\E[C, X cup=\E[%i%p1%d;%p2%dH, X cuu=\E[%p1%dA, X cuu1=\E[A, X cvvis=\E[${very_visible_cursor}m, X dch=\E[%p1%dP, X dch1=\E[P, X dl=\E[%p1%dM, X dl1=\E[M, X ech=\E[%p1%dX, X ed=\E[J, X el=\E[K, X el1=\E[1K, X home=\E[H, X hpa=\E[%i%p1%dG, X ht=\t, X hts=\EH, X il=\E[%p1%dL, X il1=\E[L, X ind=\E[S, X indn=\E[%p1%dS, X invis=\E[${invisible}m, X is1=\E[=h, X is2=\E7\E[1;25r\E8\E>\E[?3l\E[?4l\E[?5l\E[?7l\E[?8l\E[0;10;${normal_cursor};${cursor_reset};${fore_color};${back_color}m, X kbs=\b, X kcub1=\E[D, X kcud1=\E[B, X kcuf1=\E[C, X kcuu1=\E[A, X kdch1=\E[P, X kdl1=\E[M, X kend=\E[Y, X kf1=\EOP, X kf2=\EOQ, X kf3=\EOR, X kf4=\EOS, X kf5=\EOT, X kf6=\EOU, X kf7=\EOV, X kf8=\EOW, X kf9=\EOX, X kf10=\EOY, X kf11=\EOp, X kf12=\EOq, X kf13=\EOr, X kf14=\EOs, X kf15=\EOt, X kf16=\EOu, X kf17=\EOv, X kf18=\EOw, X kf19=\EOx, X kf20=\EOy, X khome=\E[H, X kich1=\E[@, X kil1=\E[L, X knp=\E[V, X kpp=\E[U, X rc=\E8, X rev=\E[${reverse}m, X ri=\E[T, X rin=\E[%p1%dT, X rmacs=\E[${lowerchars}m, X rmam=\E[?7h, X rmir=\E[4l, X rmso=\E[${back_color}m, X rmul=\E[m, X sc=\E7, X sgr=\E[%?%p1%t${standout};%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p5%t8;%;%?%p6%t1;%;%?%p7%t8;%;m, X sgr0=\E[0;${fore_color};${back_color}m, X smacs=\E[${upperchars}m, X smam=\E[?7l, X smir=\E[4h, X smso=\E[${standout}m, X smul=\E[${underline}m, X tbc=\E[2g, X vpa=\E[%p1%dd, X .ich=\E[%p1@ (*** if not using enter/exit insert mode), X .ich1=\E[@ (*** if not using enter/exit insert mode), X .rep=%p1%c\E[%p2%{1}%-%db (*** buggy), X!Color! Xelse X cat <> ${filename} X am, X mir, X xon, X cols#80, X it#8, X lines#${lines}, X vt#3, X acsc=0[a~fxgqh~jYk?lZm@nEqDtCu4vAwBx3~y, X bel=^G, X blink=\E[${blink}m, X bold=\E[${bold}m, X cbt=\E[Z, X civis=\E[${cursor_invisible};${cursor_reset}m, X clear=\E[H\E[J, X cnorm=\E[${normal_cursor};${cursor_reset}m, X cr=\r, X csr=\E[%i%p1%d;%p2%dr, X cub1=\b, X cub=\E[%p1%dD, X cud1=\n, X cud=\E[%p1%dB, X cuf1=\E[C, X cuf=\E[%p1%dC, X cup=\E[%i%p1%d;%p2%dH, X cuu1=\E[A, X cuu=\E[%p1%dA, X cvvis=\E[${very_visible_cursor}m, X dch1=\E[P, X dch=\E[%p1%dP, X dl1=\E[M, X dl=\E[%p1%dM, X ech=\E[%p1%dX, X ed=\E[J, X el1=\E[1K, X el=\E[K, X home=\E[H, X hpa=\E[%i%p1%dG, X ht=\t, X hts=\EH, X il1=\E[L, X il=\E[%p1%dL, X ind=\E[S, X indn=\E[%p1%dS, X invis=\E[${invisible}m, X is1=\E[=h, X is2=\E7\E[1;25r\E8\E>\E[?3l\E[?4l\E[?5l\E[?7l\E[?8l\E[0;10;${normal_cursor};${cursor_reset}m, X kbs=\b, X kcub1=\E[D, X kcud1=\E[B, X kcuf1=\E[C, X kcuu1=\E[A, X kdch1=\E[P, X kdl1=\E[M, X kend=\E[Y, X kf1=\EOP, X kf2=\EOQ, X kf3=\EOR, X kf4=\EOS, X kf5=\EOT, X kf6=\EOU, X kf7=\EOV, X kf8=\EOW, X kf9=\EOX, X kf10=\EOY, X kf11=\EOp, X kf12=\EOq, X kf13=\EOr, X kf14=\EOs, X kf15=\EOt, X kf16=\EOu, X kf17=\EOv, X kf18=\EOw, X kf19=\EOx, X kf20=\EOy, X khome=\E[H, X kich1=\E[@, X kil1=\E[L, X knp=\E[V, X kpp=\E[U, X rc=\E8, X rev=\E[${reverse}m, X ri=\E[T, X rin=\E[%p1%dT, X rmacs=\E[${lowerchars}m, X rmam=\E[?7h, X rmir=\E[4l, X rmso=\E[m, X rmul=\E[m, X sc=\E7, X sgr0=\E[0m, X sgr=\E[%?%p1%t${standout};%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p5%t8;%;%?%p6%t1;%;%?%p7%t8;%;m, X smacs=\E[${upperchars}m, X smam=\E[?7l, X smir=\E[4h, X smso=\E[${standout}m, X smul=\E[${underline}m, X tbc=\E[2g, X vpa=\E[%p1%dd, X .ich=\E[%p1@ (*** if not using enter/exit insert mode), X .ich1=\E[@ (*** if not using enter/exit insert mode), X .rep=%p1%c\E[%p2%{1}%-%db (*** buggy), X!Mono! Xfi X Xcat < rt && X: Xstty sane Xcase $TERM in X ansi*|at386*|AT386*) X stty echoe erase  intr kill X ;; X tek*|4105*) X stty echoe erase intr kill X ;; X vt100*) X stty echoe erase intr kill X ;; X *) X stty echoe erase intr kill X ;; Xesac Xtput is2 Xtput rs2 SHAR_EOF chmod 0755 rt || echo "restore of rt fails" fi exit 0