X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=perly.fixer;h=00f583c6755fd0022f4013228350805abc0e133c;hb=7013e6ae0ee41c19b7e4c3937d6f838af15b9af8;hp=daa558e84e4cd7d408634f3e280149e019a061a8;hpb=09bef84370e90d727656ea11ba5ee8be80e361d3;p=p5sagit%2Fp5-mst-13.2.git diff --git a/perly.fixer b/perly.fixer index daa558e..00f583c 100755 --- a/perly.fixer +++ b/perly.fixer @@ -19,6 +19,17 @@ input=$1 output=$2 tmp=/tmp/f$$ +inputh=`echo $input|sed 's:\.c$:.h:'` +if grep '^#ifdef PERL_CORE' $inputh; then + : never mind +else + echo "#ifdef PERL_CORE" > $tmp + sed -e 's:^typedef union {:#endif /* PERL_CORE */\ +\ +typedef union {:' $inputh >> $tmp + mv -f $tmp $inputh +fi + if grep 'yaccpar 1.8 (Berkeley)' $input >/dev/null 2>&1; then cp $input $output # Don't expect the diff to do everything -- do some by hand