#!/usr/bin/perl -wi.bak

use strict;

while(<>) {
    if (m/^footprint=/) {
	s/=q_mini_melf\.fp$/=nxp_sod80c_wave.fp/;
	s/=nxp_sod80c_hand\.fp$/=nxp_sod80c_wave.fp/;
    } elsif (m/^C/) {
    }
    print;
}

__END__

#xppower_il.fp
#to220.fp
#Hsuan_Mao_C3000_20.fp
stelvio_mrt9_p3.81_03.fp
armprg_sil.fp


    if (m/^footprint=/) {
	s/=panasonic_ellyt_6\.3x11\.2\.fp/=panasonic_ellyt_063x112c.fp/;
	s/=panasonic_ellyt_8x11\.5\.fp/=panasonic_ellyt_080x115c.fp/;
	s/=ellyt_r5x11\.fp/=panasonic_ellyt_063x112c.fp/;
	s/=te_lr0204_10\.fp/=te_lr0204_10d.fp/;
	s/=1n400x_10\.fp/=jedec_DO-41_10c.fp/;
	s/=crystal_txc_9b\.fp/=txc_hc49sd.fp/;
	s/=carlo_gavazzi_M25A001\.fp/=carlo_gavazzi_M25A001xx_d.fp/;
	s/=bi_hm15_2\.fp/=bi_hm15_2d.fp/;
	s/=HEADER20_2/=Hsuan_Mao_C3000_20.fp/;
	s/=tp_plainwire\.fp/=tp_plainwire_e.fp/;
	#s/=kingbrigth_L9294\.fp/=kingbright_L9294_nb.fp/;
	s/=kingbrigth_L9294\.fp/=kingbright_T-1_5mm_nb.fp/;
	s/=sil_02\.fp/=hdr064_01x02x.fp/;
	s/=dil_4/=DIP04x.fp/;
	s/=DIP8.fp/=jedec_DIP08x.fp/;
	s/=DIP14/=jedec_DIP14x.fp/;
	s/=DIP16/=jedec_DIP16x.fp/;
	s/=SOD80/=q_mini_melf.fp/;
	s/=q_mini_melf\.f$/=q_mini_melf.fp/;
	s/=m(\d{4})_a\.fp$/=ipc7351b_$1Br.fp/;
    } elsif (m/^C/) {
	s/ Cap_V-1.sym/ cap_v.sym/;
	s/_Cap_V-1.sym/ cap_v.sym/;
	s/ _Res_H-2.sym/ res_h.sym/;
	s/ _Res_V-2.sym/ res_v.sym/;
	s/ potmeter-1.sym/ res_var_h.sym/;
	s/ resistor-2.sym/ res_v.sym/;
	s/ diode.sym/ diode_normal_v.sym/;
	s/ diode_normal.sym/ diode_normal_v.sym/;
	s/ diode_schottky.sym/ diode_schottky_v.sym/;
	s/ ellyt.sym/ cappol_v.sym/;
	s/ diode_zener.sym/ diode_zener_v.sym/;
    }
