echo "converting $*.tcl to $*.c" echo "/* this file was machine generated from $*.tcl */" > $*.c echo "/* on `date` by $USER */" >> $*.c echo "" >> $*.c echo 'static char foo[] = {' >> $*.c sed -e '/^$$/d' \ -e '/^[ ]*#/d' \ -e 's/ / /g' \ -e 's/^ *//g' \ -e "s/\\(.\\)/'\\1',/g" \ -e 's/\\/\\\\/g' \ -e 's/$$/0x0a,/' \ $*.tcl >> $*".c" echo '0x0 };' >> $*.c echo "" >> $*.c echo "/* This indirection is needed to fool brain-damaged linkers */" >> $*.c echo "" >> $*.c echo "char *$*_tcl = foo;" >> $*.c