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
Index: T u

⟦33dbe3104⟧ TextFile

    Length: 1674 (0x68a)
    Types: TextFile
    Names: »usr/spool/lp/model/1640 «

Derivation

└─⟦307897ef0⟧ Bits:30004042/core1.imd SW95705I 386/ix Multi-user Release 1.2
    └─⟦this⟧ »usr/spool/lp/model/1640 « 

TextFile

#ident "@(#)lp:model/1640	1.2"
# lp interface for DASI 1640 terminal
#
#	All output is passed through the /usr/bin/450 filter
#	unless the -f option is given (if processed already by
#	450 driving table or filter).
#	If the filter is not executable, then this interface will disable
#	the lp printer which it was called to service.
#

x="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
printer=`basename $0`
filter=/usr/bin/450
pitch=10
for i in $5
do
	case "$i" in
	12 | -12)
		pitch=12
		;;
	f | -f)
		filter=/bin/cat
		;;
	esac
done

if [ -n "$filter" -a ! -x $filter ]
then
	disable -r"can't execute $filter filter" $printer
	exit 1
fi
stty 1200 tabs cread opost onlcr ixon ixany ff1 cr2 nl0 0<&1

case $pitch in
10)
	echo "\00334\033\037\015\c"
	;;
12)
	echo "\00334\033\037\013\c"
	;;
esac

tabs -T450
(
echo "\014\c"
echo "$x\n$x\n$x\n$x\n"
banner "$2"
echo "\n"
user=`grep "^$2:" /etc/passwd | line | cut -d: -f5`
if [ -n "$user" ]
then
	echo "User: $user\n"
else
	echo "\n"
fi
echo "Request id: $1    Printer: $printer\n"
date
echo "\n"
if [ -n "$3" ]
then
	banner $3
fi
echo "\014\c"
copies=$4
shift; shift; shift; shift; shift
files="$*"
i=1
while [ $i -le $copies ]
do
	for file in $files
	do
		cat "$file" 2>&1
		echo "\014\c"
	done
	i=`expr $i + 1`
done
echo "$x\n$x\n$x\n$x\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
echo "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n$x\n$x\n$x\n$x"
echo "$x\n$x\n$x\n$x\n"
) | $filter
errcode=$?
echo "\00334\033\037\013\c"
if [ $errcode -ne 0 ]
then
	disable -r"error code $errcode from $filter filter" $printer
	exit 1
fi
exit 0