#!/bin/sh
for n in `find . -name *.[chly]`
do
sed '
{
s/PIN_TYPES/PCB_TYPEMASK_PIN/g;
s/LOCK_TYPES/PCB_TYPEMASK_LOCK/g;
s/ALL_TYPES/PCB_TYPEMASK_ALL/g;

s/RATLINE_TYPE/PCB_TYPE_RATLINE/g;
s/ELEMENTNAME_TYPE/PCB_TYPE_ELEMENT_NAME/g;
s/POLYGONPOINT_TYPE/PCB_TYPE_POLYGON_POINT/g;
s/LINEPOINT_TYPE/PCB_TYPE_LINE_POINT/g;
s/ELEMENTLINE_TYPE/PCB_TYPE_ELEMENT_LINE/g;
s/ELEMENTARC_TYPE/PCB_TYPE_ELEMENT_ARC/g;

s/NO_TYPE/PCB_TYPE_NONE/g;
s/VIA_TYPE/PCB_TYPE_VIA/g;
s/ELEMENT_TYPE/PCB_TYPE_ELEMENT/g;
s/LINE_TYPE/PCB_TYPE_LINE/g;
s/POLYGON_TYPE/PCB_TYPE_POLYGON/g;
s/TEXT_TYPE/PCB_TYPE_TEXT/g;
s/PIN_TYPE/PCB_TYPE_PIN/g;
s/PAD_TYPE/PCB_TYPE_PAD/g;
s/ARC_TYPE/PCB_TYPE_ARC/g;
s/LOCKED_TYPE/PCB_TYPE_LOCKED/g;
s/NET_TYPE/PCB_TYPE_NET/g;
}
' -i $n
done
