#!/bin/csh
foreach i ( $* )
set x=`echo $i | sed 's/$/.bk/'`
echo $x
mv $i $x
cat $x|sed "s/new WSDappDev/WSGIappDev/" | \
sed "s/new WSDmouse/WSGIappMouse/" | \
sed 's/result = (long)(arg1)->addProcedure(arg2,arg3,arg4);/result = (long)(arg1)->addProcedure(arg2,arg3,arg4);arg1->setUserData(\"pyobj\",(void*)obj0);Py_XINCREF(obj0);/' | \
sed "s/->execX/->exec/g" >! $i
rm -f $x
end
