chiark / gitweb /
properly return from short circuit interrupt
[trains.git] / spice / snarf-diodes.pl
1 #!/usr/bin/perl -n
2 # This script snarfs the BZX84C models from
3 #  http://www.diodes.com/spicemodels/index.php?language=en
4 # which is checked in here as diodes.com-spice.txt, and turns
5 # them into what is now known here as bzx55.mod.
6 #
7 # Justification: Farnell catalogue claims that the BZX84C (SMD)
8 # are equivalents for the `popular' BZX55.
9
10 BEGIN { print "*BZX55 - GENERATED FILE DO NOT EDIT*\n" or die $! }
11 s/\r?\n/\n/;
12 next unless m/^\*SRC=BZX84C\d+V?\d+\;/..m/.ENDS/;
13 s/^(\.subckt)\sdi_bzx84(c\w*)\s/$1 bzx55\-\L$2 /i;
14 print or die $!;