#! /bin/csh -f

set tmp = /tmp/$$
cp /dev/null $tmp
echo "Alignment" >> $tmp
echo "ColorIntensity" >> $tmp
echo "ColorOp" >> $tmp
echo "Coord" >> $tmp
echo "EventType" >> $tmp
echo "EventButton" >> $tmp
echo "GlyphBreakType" >> $tmp
echo "GlyphIndex" >> $tmp
echo "IntCoord" >> $tmp
grep "^class" {.,../IV-X11,../IV-look,{.,../IV-look}/2.6/InterViews}/*.h | \
    sed -e 's/.*class \([^ ;\*]*\).*$/\1/' | \
    sort | uniq | fgrep -v "(" | fgrep -v "String" >> $tmp
sed -e 's/\(.*\)/#define \1 _lib_iv(\1)/' < $tmp > "_defines.h"
sed -e 's/^/#undef /' < $tmp > "_undefs.h"
rm $tmp
