#!/bin/sh

for file in $@
do
    echo $file
    sed \
	-e 's/package ptplot;/package pt.plot;/g' \
	-e 's/import ptplot/import pt.plot/g' \
	-e 's/package ptplot.demo;/package pt.plot.demo;/g' \
	-e 's/package ptplot.demo.audio;/package pt.plot.demo.audio;/g' \
	-e 's/pt.data.parser/pt.data.expr/g' \
	-e 's/pt.actors/pt.actor/g' \
	-e 's/package pt.actors;/package pt.actor;/g' \
	-e 's/pt.kernel.IllegalActionException/pt.kernel.util.IllegalActionException/g' \
	-e 's/pt.kernel.Nameable/pt.kernel.util.Nameable/g' \
	-e 's/pt.kernel.NoSuchItemException/pt.kernel.util.NoSuchItemException/g' \
	-e 's/Cpo/CPO/g' \
        $file > /tmp/fixfiles.tmp
    diff $file /tmp/fixfiles.tmp
    cp /tmp/fixfiles.tmp $file 

done

rm -f /tmp/fixfiles.tmp
