DataMuseum.dk

Presents historical artifacts from the history of:

Regnecentalen RC-900

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Regnecentalen RC-900

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦282346085⟧ TextFile

    Length: 1445 (0x5a5)
    Types: TextFile
    Notes: UNIX file
    Names: »uinfo«

Derivation

└─⟦bee8f15db⟧ Bits:30004169/disk2.imd Uniplex II+ V.6 release 1.0 (dansk)
└─⟦bee8f15db⟧ UNIX Filesystem
    └─⟦this⟧ »up/new/usr/UAP/install.cmds/uinfo« 

TextFile


: 'uinfo - report if UNIPLEX details

Notes:
-----
Expects "Uredirect" set and exported
Expects PATH to contain "syscomp"
'

USAGE='
Usage:  uinfo [-t]

-t  - just report the one word TERMINFO or TERMCAP depending on which
      terminal database UNIPLEX uses on this system
'

: 'Remove any possible local TERMINFO'

TERMINFO=/usr/lib/terminfo
export TERMINFO

: 'Check we have unique TERMINFO name'

TERM=uTeRm.$$
export TERM
if test -f $TERMINFO/u/$TERM; then
   echo "ERROR: Terminal \"$TERM\" defined in \"$TERMINFO\"."\
        "Cannot proceed"
   exit 1
fi

: 'Now create valid TERMCAP for our unique TERM!'

HOME=/tmp/uinfo.d$$
mkdir $HOME $HOME/UAP
trap "cd /;rm -fr $HOME; exit" 1 2 3 15
TERMCAP=$HOME/termcap
export HOME TERMCAP

echo "$TERM:"'\
        :ms:co#80:li#24:bs:am:\
        :cm=\E[%i%2;%2H:nd=2\E[C:up=2\E[A:\
        :cs=\E[%i%d;%dr:sf=\ED:sr=\EM:\
        :al=\E[L:dl=\E[M:\
        :cl=50\E[;H\E[2J:\
        :ce=3\E[K:cd=50\E[J:\
        :kb=^H:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kh=\E[H:' >$TERMCAP


: Now try to syscomp - if it works we are TERMCAP, if it fails,
: TERMINFO

cd $Uredirect/UAP
cp uniplex.cmd Tcap $HOME/UAP/.
cd $HOME/UAP
rm -fr commands termdef
syscomp $TERM >/dev/null 2>&1

if test -f termdef/$TERM; then
   TYPE=TERMCAP
else
   TYPE=TERMINFO
fi

case "$1" in
  -t) echo $TYPE;;
   *) echo "Uniplex binaries use $TYPE"\
           "terminal database on this system";;
esac
cd /
rm -fr $HOME
exit 0