for f in `find . \( -name "*.h" -o -name "*.cpp" \)`; do
  perl -i -pe 's/const (\w+)\* previous\)/const \1\* previous, const \1\* history\)/' "$f"
  perl -i -pe 's/const (\w+)\*\)/const \1\*, const \1\*\)/' "$f"
done
