DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

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

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T g

⟦7875b6cbb⟧ TextFile

    Length: 1514 (0x5ea)
    Types: TextFile
    Names: »genclass.extnsn«

Derivation

└─⟦a05ed705a⟧ Bits:30007078 DKUUG GNU 2/12/89
    └─⟦cc8755de2⟧ »./libg++-1.36.1.tar.Z« 
        └─⟦23757c458⟧ 
            └─⟦this⟧ »libg++/proto-kit/genclass.extnsn« 

TextFile

#!/bin/sh
# shell script for generating classes from prototypes
#
# usage: genclass protodir cdir extension [-2] type1 {ref, val} 
#			[type2 {ref, val}] proto 

#
# modified by Carl Staelin to generate a single file (either the .h or
# the .cc file, but not both in the same pass).  This is useful when
# there are user prototypes which are volatile, and whose implementations
# are being debugged (less code is recompiled if the .h file is touched)

# search in standard g++ prototype directory & in current

#PROTODIR=/usr/local/lib/g++-proto
PROTODIR=$1; shift;
CURRENTDIR=`pwd`
#OUTDIR=`pwd`
OUTDIR=$1; shift;
EXTNSN=$1; shift;

#debug
#echo protodir is $PROTODIR
#echo outdir   is $OUTDIR

N=""
T2=""
T2ACC=""

case $1 in
 -2) N="2"; shift;;
  *) ;;
esac

T1=$1

case $2 in
 ref) T1ACC="\&";;
 val) T1ACC=" ";;
 *)   echo "Must specify type1 access: ref or val"; exit 1;;
esac

case $N in
 2) T2=$3;
    case $4 in
     ref) T2ACC="\&";;
     val) T2ACC=" ";;
     *)   echo "Must specify type2 access: ref or val"; exit 1;;
    esac;
    CLASS=$5;;
 *) CLASS=$3;;
esac

# .h and .cc parts done separately in case only a .h

SRC=$CLASS.$EXTNSN.proto
OUT=$OUTDIR/$T1$T2$CLASS.$EXTNSN

#debug
#echo h source file is $SRC
#echo h outfile is $OUT

if   test -f $CURRENTDIR/$SRC
then SRC=$CURRENTDIR/$SRC
elif test -f $PROTODIR/$SRC
then SRC=$PROTODIR/$SRC
else echo "genclass: $SRC: no such file"; exit 1;
fi

sed < $SRC > $OUT -e "s/<T>/$T1/g" -e "s/<T&>/$T1$T1ACC/g" -e "s/<U>/$T2/g" -e "s/<U&>/$T2$T2ACC/g"