These diffs are against stock pcb-1.6.3 from
   http://bach.ece.jhu.edu/~haceaton/pcb/pcb-1.6.3.tgz

I'm not done with the QFP code, and I may have made progress
since this snapshot.  If you want to join in the fun, e-mail me.
Harry, this means you too!

Changes:
   * modifications to SUB-D connectors, including basic dimensions!
   * SUB-D dimensions fixed from an earlier diff of mine, dated Dec 13.
   * slightly smaller pad dimensions on PLCC footprint
   * holes enlarged on DIN 41.651
   * add right angle BNC connector
   * add MTA-156 headers
   * add SMD 603, 805, and 1206 resistor, cap, polarized cap, and diode
   * add SOT-23, SOT-323, and an even smaller SOT used by NEC
   * separated MASKFRAME (new default: 0) from overloaded GROUNDPLANEFRAME
   * experimental QFP code based on a tcl interface with preview

January 7, 2000  Larry Doolittle  <LRDoolittle@lbl.gov>

diff -urN --exclude=Makefile pcb-1.6.3-orig/globalconst.h pcb-1.6.3/globalconst.h
--- pcb-1.6.3-orig/globalconst.h	Wed May 13 03:29:11 1998
+++ pcb-1.6.3/globalconst.h	Mon Dec 13 13:25:38 1999
@@ -52,6 +52,7 @@
  * frame between the groundplane and the copper
  */
 #define	GROUNDPLANEFRAME	15	/* unit == mil */
+#define MASKFRAME               0       /* unit == mil */
 
 /* ---------------------------------------------------------------------------
  * some limit specifications
diff -urN --exclude=Makefile pcb-1.6.3-orig/lib/QueryLibrary.sh.raw pcb-1.6.3/lib/QueryLibrary.sh.raw
--- pcb-1.6.3-orig/lib/QueryLibrary.sh.raw	Sat May 16 14:11:06 1998
+++ pcb-1.6.3/lib/QueryLibrary.sh.raw	Thu Dec 23 13:01:59 1999
@@ -52,7 +52,7 @@
 	name=$dir/$Library
 	if [ -r $name ]; then
 		echo "CreateObject(\`$Template', \`$Value', \`$Package')" |
-			$M4 -R $name -
+			PATH=${SearchPath}:$PATH $M4 -R $name -
 		exit
 	fi
 done
diff -urN --exclude=Makefile pcb-1.6.3-orig/lib/connector.inc pcb-1.6.3/lib/connector.inc
--- pcb-1.6.3-orig/lib/connector.inc	Sat May 16 14:11:08 1998
+++ pcb-1.6.3/lib/connector.inc	Fri Jan  7 10:50:29 2000
@@ -279,6 +279,8 @@
 # base definition (housing) for connector DIN 41.651 laying and standing
 # 05/96 Volker Bosch (bosch@iema.e-technik.uni-stuttgart.de)
 #
+# Changed hole size from 20 mils to 28 mils; 07/00 LRDoolittle@lbl.gov
+#
 # $1: canonical name
 # $2: name on PCB
 # $3: value
@@ -290,8 +292,8 @@
 Element(0x00 "$1" "$2" "$3" 400 250 3 200 0x00)
 (
 	forloop(`i', 1, eval($4 / 2),
-		`PIN(100,  eval(100*i +400), 60, 20, eval(2*i-1))
-		PIN(200, eval(100*i +400), 60, 20, eval(2*i))
+		`PIN(100,  eval(100*i +400), 60, 28, eval(2*i-1))
+		PIN(200, eval(100*i +400), 60, 28, eval(2*i))
 	')
 
 	# Befestigungsbohrung
@@ -329,8 +331,8 @@
 Element(0x00 "$1" "$2" "$3" 50 100 3 200 0x00)
 (
 	forloop(`i', 1, eval($4 / 2),
-		`PIN(200,  eval(100*i +400), 60, 20, eval(2*i-1))
-		PIN(300, eval(100*i +400), 60, 20, eval(2*i))
+		`PIN(200,  eval(100*i +400), 60, 28, eval(2*i-1))
+		PIN(300, eval(100*i +400), 60, 28, eval(2*i))
 	')
 	# aeusserer Rahmen
 	ElementLine(90 70 410 70 20)
@@ -366,6 +368,25 @@
 # base definition (housing) for SUB-D connectors, laying
 # 11/95 Volker Bosch (bosch@iema.e-technik.uni-stuttgart.de)
 # female package added 05/96 also by Volker Bosch
+# Pins reordered, 12/99 Larry Doolittle  <LRDoolittle@lbl.gov>
+
+# Connector dimensions changed!  No, these stupid things don't
+# line up neatly on a 50 mil grid.  Now corresponds to AMP's
+# Application Specification 114-40013 03-APR-97 Rev B, for
+# AMPLIMITE[TM] HD-20 Series 454 and 545.
+# Also pulled silkscreen lines away from pins by NOSMUDGE.
+# 12/99 Larry Doolittle  <LRDoolittle@lbl.gov>
+#
+# Parameterized silkscreen in terms of PANEL_DISTANCE, the distance
+# from the drilling holes to the intended edge of the board.
+# According to the drawing listed above, that should be 398 or 489
+# plus some unknown flange thickness.  For the part I have in my hand
+# (AMP 747846-4), it's about 365 mils.  The original version of this
+# macro had it hard coded at 460.  I also reduced size of pads and holes
+# to 60/35.  The drawing listed above recommends 47 mil holes, the part
+# in my hand has 28 mil pins.
+#
+# Status: Female tested, works great, 07-Jan-2000.
 #
 # $1: canonical name
 # $2: name on PCB
@@ -378,18 +399,15 @@
 	`define(`BASEX', 1000)
 	define(`BASEY', 1000)
 	define(`PY1', `eval(BASEY +270)')
-	define(`PY2', `eval(PY1 +($4-1)/2*100)')
+	define(`PY2', `eval(PY1 +($4-1)/2*108)')
 	define(`OFFSET', `eval(($4+1)/2)')
-Element(0x00 "$1" "$2" "$3" eval(BASEX-630) eval(PY1-70) 3 100 0x00)
+	define(`PANEL_DISTANCE', 365)
+Element(0x00 "$1" "$2" "$3" eval(BASEX-0) eval(PY2-0) 1 150 0x00)
 (
-	# Befestigungsbohrung
-	Pin(BASEX  BASEY 120 100 "C1" 0x01)
-	Pin(BASEX eval(PY2+270) 120 100 "C1" 0x01)
-
 	# Gehaeuse (schmaler Kasten incl. Bohrungen)
-	define(`X1', `eval(BASEX-460)')
+	define(`X1', `eval(BASEX-PANEL_DISTANCE)')
 	define(`Y1', `eval(PY1-390)')
-	define(`X2', `eval(BASEX-430)')
+	define(`X2', `eval(BASEX-PANEL_DISTANCE+30)')
 	define(`Y2', `eval(PY2+390)')
 	ElementLine(X1 Y1 X2 Y1 10)
 	ElementLine(X2 Y1 X2 Y2 10)
@@ -401,17 +419,19 @@
 	ElementLine(X1 eval(Y2-180) X2 eval(Y2-180) 10)
 
 	# Gehaeuse (aeusserer Kasten)
-	define(`X1', `eval(BASEX-730)')
-	define(`Y1', `eval(PY1-100)')
-	define(`X2', `eval(BASEX-460)')
-	define(`Y2', `eval(PY2+100)')
-	ElementLine(X1 Y1 X2 Y1 20)
-	ElementLine(X2 Y1 X2 Y2 10)
-	ElementLine(X2 Y2 X1 Y2 20)
-	ElementLine(X1 Y2 X1 Y1 20)
+	# This part of the connector normally hangs off the circuit board,
+	# so it is confusing to actually mark it on the silkscreen
+	# define(`X1', `eval(BASEX-PANEL_DISTANCE-260)')
+	# define(`Y1', `eval(PY1-100)')
+	# define(`X2', `eval(BASEX-PANEL_DISTANCE)')
+	# define(`Y2', `eval(PY2+100)')
+	# ElementLine(X1 Y1 X2 Y1 20)
+	# ElementLine(X2 Y1 X2 Y2 10)
+	# ElementLine(X2 Y2 X1 Y2 20)
+	# ElementLine(X1 Y2 X1 Y1 20)
 
 	# Gehaeuse (innerer Kasten)
-	define(`X1', `eval(BASEX-430)')
+	define(`X1', `eval(BASEX-PANEL_DISTANCE+30)')
 	define(`Y1', `eval(PY1-160)')
 	define(`X2', `eval(BASEX-230)')
 	define(`Y2', `eval(PY2+160)')
@@ -422,20 +442,34 @@
 
 	# Pins
 	SUBD_SUBFUNCTION
+
+	# Befestigungsbohrung
+	Pin(BASEX  BASEY 250 125 "C1" 0x01)
+	Pin(BASEX eval(PY2+270) 250 125 "C2" 0x01)
+
 )')
 
 define(`PKG_SUBD_MALE_LAY',
 	`define(`SUBD_SUBFUNCTION',
-		`forloop(`i', 1, eval($4/2),
-			`define(`Y', eval(PY1 +(i-1)*100))
-			PIN(eval(BASEX+50), Y, 60, 20, i)
-			ElementLine(eval(BASEX+50) Y X2 Y 20)
-			PIN(eval(BASEX-50), eval(Y+50), 60, 20, eval(i+OFFSET))
-			ElementLine(eval(BASEX-50) eval(Y+50) X2 eval(Y+50) 20)
+		`
+		define(`NOSMUDGE', 40)
+		# First row
+		forloop(`i', 1, eval($4/2),
+			`define(`Y', eval(PY1 +(i-1)*108))
+			PIN(eval(BASEX+56), Y, 60, 35, i)
+			ElementLine(eval(BASEX+56-NOSMUDGE) Y X2 Y 20)
 		')
-		PIN(eval(BASEX+50), PY2, 60, 20, OFFSET)
-		ElementLine(eval(BASEX+50) PY2 X2 PY2 20)
 
+		# Last pin in first row
+		PIN(eval(BASEX+56), PY2, 60, 35, OFFSET)
+		ElementLine(eval(BASEX+56-NOSMUDGE) PY2 X2 PY2 20)
+
+		# Second row
+		forloop(`i', 1, eval($4/2),
+			`define(`Y', eval(PY1 +(i-1)*108+54))
+			PIN(eval(BASEX-56), Y, 60, 35, eval(i+OFFSET))
+			ElementLine(eval(BASEX-56-NOSMUDGE) Y X2 Y 20)
+		')
 		# Plazierungsmarkierung == PIN 1
 		Mark(eval(BASEX +50) PY1)
 	')'
@@ -444,19 +478,94 @@
 
 define(`PKG_SUBD_FEMALE_LAY',
 	`define(`SUBD_SUBFUNCTION',
-		`forloop(`i', 1, eval($4/2),
-			`define(`Y', eval(PY1 +(i-1)*100))
-			PIN(eval(BASEX+50), Y, 60, 20, eval(OFFSET+1-i))
-			ElementLine(eval(BASEX+50) Y X2 Y 20)
-			PIN(eval(BASEX-50), eval(Y+50), 60, 20, eval($4+1-i))
-			ElementLine(eval(BASEX-50) eval(Y+50) X2 eval(Y+50) 20)
-		')
-		PIN(eval(BASEX+50), PY2, 60, 20, 1)
-		ElementLine(eval(BASEX+50) PY2 X2 PY2 20)
+		`
+		define(`NOSMUDGE', 40)
+		# Pin 1
+		PIN(eval(BASEX+56), PY2, 60, 35, 1)
+		ElementLine(eval(BASEX+56-NOSMUDGE) PY2 X2 PY2 20)
 
 		# Plazierungsmarkierung == PIN 1
-		Mark(eval(BASEX +50) PY1)
+		# Changed PY1 to PY2 13-Dec-1999 LRD
+		Mark(eval(BASEX +56) PY2)
+
+		# Remainder of the first row
+		forloop(`i', 1, eval($4/2),
+			`define(`Y', eval(PY1 +($4/2-i)*108))
+			PIN(eval(BASEX+56), Y, 60, 35, eval($4/2+i+2-OFFSET))
+			ElementLine(eval(BASEX+56-NOSMUDGE) Y X2 Y 20)
+		')
+
+		# Second row
+		forloop(`i', 1, eval($4/2),
+			`define(`Y', eval(PY1 +($4/2-i)*108+54))
+			PIN(eval(BASEX-56), Y, 60, 35, eval($4/2+i+1))
+			ElementLine(eval(BASEX-56-NOSMUDGE) Y X2 Y 20)
+		')
 	')'
 	`PKG_SUBD_LAY_BASE(`$1', `$2', `$3', `$4')'
 )
 
+# ---------------------------------------------------------------
+# definition for a right angle BNC connector,
+# such as Amphenol 31-5640-1010 or OUPIIN 8928
+# 12/99 Larry Doolittle <LRDoolittle@lbl.gov>
+#
+# $1: canonical name
+# $2: name on PCB
+# $3: value
+# $4: pins
+#
+# base is one of the pegs
+#
+define(`PKG_BNC_LAY',
+	`define(`BASEX', 200)
+	define(`BASEY', -200)
+Element(0x00 "$1" "$2" "$3" BASEX eval(BASEY+200) 3 100 0x00)
+(
+	define(`X1', `eval(BASEX-260)')
+	define(`Y1', `eval(BASEY-90)')
+	define(`X2', `eval(BASEX+290)')
+	define(`Y2', `eval(BASEY+490)')
+	ElementLine(X1 Y1 X2 Y1 10)
+	ElementLine(X2 Y1 X2 Y2 10)
+	ElementLine(X2 Y2 X1 Y2 10)
+	ElementLine(X1 Y2 X1 Y1 10)
+	PIN(eval(BASEX-200), eval(BASEY+200), 60, 20, 1)
+	PIN(eval(BASEX-200), eval(BASEY+100), 60, 20, 2)
+	PIN(eval(BASEX),     eval(BASEY),     100, 40, m1)
+	PIN(eval(BASEX),     eval(BASEY+400), 100, 40, m2)
+)')
+
+# ---------------------------------------------------------------
+# definition for MTA-156 header,
+# such as AMP 640445-x
+# 12/99 Larry Doolittle <LRDoolittle@lbl.gov>
+#
+# $1: canonical name
+# $2: name on PCB
+# $3: value
+# $4: pins
+#
+# base is pin 1 (although I don't claim to know which end is
+#                conventionally pin 1)
+#      0.156 pin pitch
+#      0.070 holes
+#      0.078 end clearance
+#      0.180 and 0.120 side clearance
+#      Available with 2 through 24 pins
+#
+define(`PKG_MTA_156',
+	`
+Element(0x00 "$1" "$2" "$3" 0  140 0 150 0x00)
+(
+	forloop(`i', 1, `$4',
+		`PIN(eval((i-1)*156), 0, 100, 70, `i')
+	')
+	define(`X1',-78)
+	define(`X2', `eval(`$4'*156-78)')
+	ElementLine(X1  120 X2  120 10) 
+	ElementLine(X2  120 X2 -180 10) 
+	ElementLine(X2 -180 X1 -180 10) 
+	ElementLine(X2  -80 X1  -80 10) 
+	ElementLine(X1 -180 X1  120 10)
+)')
diff -urN --exclude=Makefile pcb-1.6.3-orig/lib/connector.list pcb-1.6.3/lib/connector.list
--- pcb-1.6.3-orig/lib/connector.list	Sat May 16 14:11:08 1998
+++ pcb-1.6.3/lib/connector.list	Mon Dec 13 14:06:18 1999
@@ -80,3 +80,5 @@
 SUBD_15M:SUBD_MALE_LAY:15m
 SUBD_25F:SUBD_FEMALE_LAY:25f
 SUBD_25M:SUBD_MALE_LAY:25m
+BNC_rightangle:BNC_LAY:1
+MTA_156_2:MTA_156:2
diff -urN --exclude=Makefile pcb-1.6.3-orig/lib/connector.m4 pcb-1.6.3/lib/connector.m4
--- pcb-1.6.3-orig/lib/connector.m4	Sat May 16 14:11:09 1998
+++ pcb-1.6.3/lib/connector.m4	Mon Dec 13 14:06:18 1999
@@ -241,4 +241,9 @@
 define(`Description_SUBD_25M', `SUB-D male 25 pins')
 define(`Param1_SUBD_25M', 25)
 
+define(`Description_BNC_rightangle', `right angle BNC')
+
+define(`Description_MTA_156_2', `MTA-156 header')
+define(`Param1_MTA_156_2', 2)
+
 divert(0)dnl
diff -urN --exclude=Makefile pcb-1.6.3-orig/lib/generic.list pcb-1.6.3/lib/generic.list
--- pcb-1.6.3-orig/lib/generic.list	Sat May 16 14:11:11 1998
+++ pcb-1.6.3/lib/generic.list	Fri Jan  7 11:18:55 2000
@@ -57,6 +57,9 @@
 generic84_plcc:PLCC_SOCKET:PLCC 84 socket
 
 generic44_qfp:QFP:QFP 44
+generic44_qfp:OLD_QFP:QFP 44 OLD
+generic208_lqfp:208_LQFP:QFP 208
+menu_qfp:MENU_QFP:QFP menu
 
 generic20_zip:SD:ZIP 20
 generic24_zip:SD:ZIP 24
@@ -113,4 +116,29 @@
 generic_capacitor_radial_500:RADIAL_CAN:500
 generic_capacitor_radial_600:RADIAL_CAN:600
 
+smd_resistor_603:SMD_SIMPLE:603
+smd_resistor_805:SMD_SIMPLE:805
+smd_resistor_1206:SMD_SIMPLE:1206
+
+smd_capacitor_603:SMD_SIMPLE:603
+smd_capacitor_805:SMD_SIMPLE:805
+smd_capacitor_1206:SMD_SIMPLE:1206
+
+smd_capacitor_polarized_603:SMD_POLAR:603
+smd_capacitor_polarized_805:SMD_POLAR:805
+smd_capacitor_polarized_1206:SMD_POLAR:1206
+
+smd_EIA_A_capacitor:SMD_POLAR:EIA A
+smd_EIA_B_capacitor:SMD_POLAR:EIA B
+smd_EIA_C_capacitor:SMD_POLAR:EIA C
+smd_EIA_D_capacitor:SMD_POLAR:EIA D
+
+smd_diode_603:SMD_DIODE:603
+smd_diode_805:SMD_DIODE:805
+smd_diode_1206:SMD_DIODE:1206
+
 isa_eight_bit:ISA8:XT8BIT
+
+sot_23:SOT23:SOT-23
+sot_323:SOT323:SOT-323
+sot_nec19:NEC19:SOT-NE19
diff -urN --exclude=Makefile pcb-1.6.3-orig/lib/generic.m4 pcb-1.6.3/lib/generic.m4
--- pcb-1.6.3-orig/lib/generic.m4	Sat May 16 14:11:12 1998
+++ pcb-1.6.3/lib/generic.m4	Fri Jan  7 11:33:46 2000
@@ -120,6 +120,10 @@
 define(`Param1_generic44_qfp', 44)
 define(`Param2_generic44_qfp', 150)
 
+define(`Description_generic208_lqfp', ``generic'')
+
+define(`Description_menu_qfp', ``generic'')
+
 define(`Description_generic20_zip', ``generic'')
 define(`Param1_generic20_zip', 20)
 
@@ -229,5 +233,69 @@
 define(`Param1_generic_capacitor_radial_600', 600)
 
 define(`Description_isa_eight_bit', ``isa_eight_bit'')
+
+define(`Description_smd_resistor_603', ``chip_resistor'')
+define(`Param1_smd_resistor_603', 60)
+define(`Param2_smd_resistor_603', 30)
+
+define(`Description_smd_resistor_805', ``chip_resistor'')
+define(`Param1_smd_resistor_805', 80)
+define(`Param2_smd_resistor_805', 50)
+
+define(`Description_smd_resistor_1206', ``chip_resistor'')
+define(`Param1_smd_resistor_1206', 120)
+define(`Param2_smd_resistor_1206', 60)
+
+define(`Description_smd_capacitor_603', ``chip_capacitor'')
+define(`Param1_smd_capacitor_603', 60)
+define(`Param2_smd_capacitor_603', 30)
+
+define(`Description_smd_capacitor_805', ``chip_capacitor'')
+define(`Param1_smd_capacitor_805', 80)
+define(`Param2_smd_capacitor_805', 50)
+
+define(`Description_smd_capacitor_1206', ``chip_capacitor'')
+define(`Param1_smd_capacitor_1206', 120)
+define(`Param2_smd_capacitor_1206', 60)
+
+define(`Description_smd_capacitor_polarized_603', ``chip_capacitor_polarized'')
+define(`Param1_smd_capacitor_polarized_603', 60)
+define(`Param2_smd_capacitor_polarized_603', 30)
+
+define(`Description_smd_capacitor_polarized_805', ``chip_capacitor_polarized'')
+define(`Param1_smd_capacitor_polarized_805', 80)
+define(`Param2_smd_capacitor_polarized_805', 50)
+
+define(`Description_smd_capacitor_polarized_1206', ``chip_capacitor_polarized'')
+define(`Param1_smd_capacitor_polarized_1206', 120)
+define(`Param2_smd_capacitor_polarized_1206', 60)
+
+define(`Description_smd_EIA_A_capacitor', ``chip_capacitor_polarized'')
+define(`Param1_smd_EIA_A_capacitor', 120)
+define(`Param2_smd_EIA_A_capacitor', 50)
+
+define(`Description_smd_EIA_B_capacitor', ``chip_capacitor_polarized'')
+define(`Param1_smd_EIA_B_capacitor', 140)
+define(`Param2_smd_EIA_B_capacitor', 90)
+
+define(`Description_smd_EIA_C_capacitor', ``chip_capacitor_polarized'')
+define(`Param1_smd_EIA_C_capacitor', 240)
+define(`Param2_smd_EIA_C_capacitor', 90)
+
+define(`Description_smd_EIA_D_capacitor', ``chip_capacitor_polarized'')
+define(`Param1_smd_EIA_D_capacitor', 280)
+define(`Param2_smd_EIA_D_capacitor', 100)
+
+define(`Description_smd_diode_603', ``chip_diode'')
+define(`Param1_smd_diode_603', 60)
+define(`Param2_smd_diode_603', 30)
+
+define(`Description_smd_diode_805', ``chip_diode'')
+define(`Param1_smd_diode_805', 80)
+define(`Param2_smd_diode_805', 50)
+
+define(`Description_smd_diode_1206', ``chip_diode'')
+define(`Param1_smd_diode_1206', 120)
+define(`Param2_smd_diode_1206', 60)
 
 divert(0)
diff -urN --exclude=Makefile pcb-1.6.3-orig/lib/misc.inc pcb-1.6.3/lib/misc.inc
--- pcb-1.6.3-orig/lib/misc.inc	Sat May 16 14:11:18 1998
+++ pcb-1.6.3/lib/misc.inc	Thu Dec 16 11:09:33 1999
@@ -517,3 +517,75 @@
 	ElementArc(X3 Y R R 0 360 10)
 	Mark (X1 Y)
 )')
+
+# a core surface mount package
+# 12/99 Larry Doolittle <LRDoolittle@lbl.gov>
+#
+# $1: canonical name
+# $2: name on PCB
+# $3: value
+# $4: device length in MIL
+# $5: device width in MIL
+#
+# Note that the pad width, length, and separation are derived from
+# the given device dimensions.  I <LRDoolittle@lbl.gov> don't
+# claim to have followed any industry standards here, these sizes
+# are based on someone else's measurements:
+#  0603 is 30x40 mil pads on 60 mil pad ctr
+#  0805 is 44x60 mil pads on 80 mil pad ctr
+# on a PC motherboard.  If you know the "real" values, please educate
+# me and/or adjust this code.
+#
+define(`PKG_SMD_BASE',
+	`define(`T', `eval(`$4'/4+`$5'/2)')
+	define(`W', `eval(T/2+15)')
+	define(`X1', `0')
+	define(`X2',  ``$4'')
+	define(`Y',  `0')
+	define(`Y1',  `eval(Y-(`$5'-T)/2-10)')
+	define(`Y2',  `eval(Y+(`$5'-T)/2+10)')
+	# Silkscreen box coordinates
+	define(`X1L', `eval(X1-W)')
+	define(`X2L', `eval(X2+W)')
+	define(`Y1L', `eval(Y1-W)')
+	define(`Y2L', `eval(Y2+W)')
+Element(0x00 "$1" "$2" "$3" eval(10+T/2) eval(Y2L+15) 0 100 0x00)
+(
+	# PAD(X1, Y1, X1, Y2, T, 1)
+	# PAD(X2, Y1, X2, Y2, T, 2)
+	# Use Pad instead of PAD so both pads come out square
+	Pad(X1 Y1 X1 Y2 T "1" 0x100)
+	Pad(X2 Y1 X2 Y2 T "2" 0x100)
+	ElementLine(X1L Y1L X1L Y2L 8)
+	ElementLine(X1L Y2L X2L Y2L 8)
+	ElementLine(X2L Y2L X2L Y1L 8)
+	ElementLine(X2L Y1L X1L Y1L 8)
+	SMD_OUTLINE_EXTRA
+)')
+
+define(`PKG_SMD_SIMPLE',
+	`define(`SMD_OUTLINE_EXTRA', `')
+	PKG_SMD_BASE(`$1', `$2', `$3', `$4', `$5')
+')
+
+define(`PKG_SMD_DIODE',
+	`define(`SMD_OUTLINE_EXTRA',
+		`
+		define(`XBAR', `eval(X1L+10)')
+		ElementLine( XBAR Y1L XBAR Y2L 8 )
+	')
+	PKG_SMD_BASE(`$1', `$2', `$3', `$4', `$5')
+')
+
+define(`PKG_SMD_POLAR',
+	`define(`SMD_OUTLINE_EXTRA',
+		`
+		# crude plus sign
+		# ElementLine(      X1     eval(Y2L+20)       X1    eval(Y2L+70) 8)
+		# ElementLine( eval(X1-25) eval(Y2L+45) eval(X1+25) eval(Y2L+45) 8)
+		define(`XBAR', `eval(X1L+10)')
+		ElementLine( XBAR Y1L XBAR Y2L 8 )
+
+	')
+	PKG_SMD_BASE(`$1', `$2', `$3', `$4', `$5')
+')
diff -urN --exclude=Makefile pcb-1.6.3-orig/lib/plcc.inc pcb-1.6.3/lib/plcc.inc
--- pcb-1.6.3-orig/lib/plcc.inc	Sat May 16 14:11:19 1998
+++ pcb-1.6.3/lib/plcc.inc	Wed Dec 22 15:40:56 1999
@@ -31,6 +31,13 @@
 # ThanX to Johan Andersson (johan@homemail.com), modified by Thomas Nau
 # the definition of a plcc package
 # modified for correct pad numbering by Holm Tiffe
+#
+# modified 11-Dec-1999 Larry Doolittle <LRDoolittle@lbl.gov>
+# to shorten the pads by 10 mils
+#
+# modified 22-Dec-1999 Larry Doolittle <LRDoolittle@lbl.gov>
+# put back the 10 mils on the outside
+#
 # $1: canonical name
 # $2: name on PCB
 # $3: value
@@ -43,6 +50,8 @@
 	define(`WIDTH', `eval((QUARTER-1) *50 +2*75)')
 	define(`CENTER', `eval(WIDTH / 2)')
 	define(`NUMPINS', `$4')
+	define(`PUSHOUT', 5)     # was 15
+	define(`PUSHIN', 50)     # was 50
 Element(0x00 "$1" "$2" "$3" 100 CENTER 0 100 0x00)
 (
 	# top left half
@@ -50,7 +59,7 @@
 define(`Y', 0)
 define(`count', 1)
 forloop(`i', 1, OFFSET,
-	`PAD(X, eval(Y-15), X, eval(Y+50), 20, count)' `define(`count', incr(count))'
+	`PAD(X, eval(Y-PUSHOUT), X, eval(Y+PUSHIN), 20, count)' `define(`count', incr(count))'
 	`define(`X', eval(X-50))'
 	)
 
@@ -60,7 +69,7 @@
 define(`Y', 75)
 define(`count', `eval(OFFSET+1)')
 forloop(`i', 1, QUARTER,
-	`PAD(eval(X-15), Y, eval(X+50), Y, 20, count)' `define(`count', incr(count))'
+	`PAD(eval(X-PUSHOUT), Y, eval(X+PUSHIN), Y, 20, count)' `define(`count', incr(count))'
 	`define(`Y', eval(Y+50))'
 	)
 
@@ -68,7 +77,7 @@
 define(`X', 75)
 define(`Y', WIDTH)
 forloop(`i', 1, QUARTER,
-	`PAD(X, eval(Y+15), X, eval(Y-50), 20, count)' `define(`count', incr(count))'
+	`PAD(X, eval(Y+PUSHOUT), X, eval(Y-PUSHIN), 20, count)' `define(`count', incr(count))'
 	`define(`X', eval(X+50))'
 )
 
@@ -76,7 +85,7 @@
 define(`X', WIDTH)
 define(`Y', eval(WIDTH-75))
 forloop(`i', 1, QUARTER,
-	`PAD(eval(X+15), Y, eval(X-50), Y, 20, count)' `define(`count', incr(count))'
+	`PAD(eval(X+PUSHOUT), Y, eval(X-PUSHIN), Y, 20, count)' `define(`count', incr(count))'
 	`define(`Y', eval(Y-50))'
 )
 
@@ -84,7 +93,7 @@
 define(`X', eval(WIDTH-75))
 define(`Y', 0)
 forloop(`i', 1, eval(OFFSET-1),
-	`PAD(X, eval(Y-15), X, eval(Y+50), 20, count)' `define(`count', incr(count))'
+	`PAD(X, eval(Y-PUSHOUT), X, eval(Y+PUSHIN), 20, count)' `define(`count', incr(count))'
 	`ifelse(eval(count > NUMPINS), 1, `define(`count', 1)')'
 	`define(`X', eval(X-50))'
 )
diff -urN --exclude=Makefile pcb-1.6.3-orig/lib/qfp-ui pcb-1.6.3/lib/qfp-ui
--- pcb-1.6.3-orig/lib/qfp-ui	Wed Dec 31 16:00:00 1969
+++ pcb-1.6.3/lib/qfp-ui	Fri Jan  7 10:43:05 2000
@@ -0,0 +1,237 @@
+#!/usr/bin/wish -f
+
+# User Interface that generates custom QFP packages for pcb-1.6.3
+# Invoked from a line like
+#   esyscmd(qfp-ui $1 $2 $3)
+# within an m4 macro triggered by pcb-1.6.3
+# depends on having the Right [TM] m4 macro PKG_QFP in qfp.inc
+# Copyright 1999 Larry Doolittle  <LRDoolittle@lbl.gov>
+# 
+# Wish list:
+#   have someone else test it enough to know what needs fixing
+#   add a nice save/restore
+#   proper support for changing pin 1 location
+#   package outline in tcl preview image
+
+global description boardname partnum
+set description [ lindex $argv 0 ]
+set boardname   [ lindex $argv 1 ]
+set partnum     [ lindex $argv 2 ]
+
+# default values of the actual parameters that describe the QFP
+global pinone nX nY pitch pwidth plength lX lY
+set pinone  corner
+set nX      32
+set nY      32
+set pitch   8000
+set pwidth  10
+set plength 50
+set lX      1290
+set lY      1290
+
+# Define the native units for each dimension
+# dm is "decimicrons" :-) allows exact conversion from microns or mils
+foreach v {pwidth plength lX lY} {
+	global ${v}_native
+	set ${v}_native mil
+}
+global pitch_native
+set pitch_native dm
+
+set factor(inch)  254000
+set factor(mm)    10000
+set factor(mil)   254
+set factor(dm)    1
+
+proc m4define { name val } {
+	puts "define(`$name', $val)"
+}
+
+proc spit_output { } {
+	global description boardname partnum
+	global pkgname pinone nX nY pitch pwidth plength lX lY
+	m4define PITCH      $pitch
+	m4define PAD_LENGTH $plength
+	m4define PAD_WIDTH  $pwidth
+	m4define ISTART     1
+	m4define XPADS      $nX
+	m4define YPADS      $nY
+	m4define X_LENGTH   $lX
+	m4define Y_LENGTH   $lY
+	global argv
+	# set pincount [ expr 2*($nX+$nY) ]
+	# set partnum "QFP $pincount"
+	puts "PKG_GEN_QFP($description, $boardname, $partnum)"
+	exit
+}
+
+proc uconvert { v in out } {
+	# puts "$v $in converted to $out"
+	global factor
+	set answer [ expr ($v*$factor($in))/$factor($out) ]
+	# puts "   = $answer"
+	return $answer
+}
+
+proc qupdate { v unit } {
+	global $v ${v}_inch ${v}_mm ${v}_native
+	set screen "${v}_${unit}"
+	set newuser [ expr \$$screen ]
+	# compute the exact result in mils
+	set native [ expr \$${v}_native ]
+	# puts "$v $unit $newuser $native"
+	if { ! [catch { set new [ uconvert $newuser $unit $native ] } ] } {
+		line_update $v $new
+		draw_outline
+	}
+}
+
+proc line_update { v new } {
+	global $v ${v}_inch ${v}_mm ${v}_native
+	set native [ expr \$${v}_native ]
+	# puts "$v $new $native"
+	set new [ expr round($new) ]
+	set $v $new
+	set inch [ uconvert $new.0 $native inch ]
+	set mm   [ uconvert $new.0 $native mm   ]
+	set ${v}_inch [ format "%.3f" $inch]
+	set ${v}_mm   [ format "%.2f" $mm]
+}
+
+proc nupdate { v } {
+	global $v
+
+	if { ! [ catch { set new [ expr round(\$$v) ] } ] } {
+		set $v $new
+		draw_outline
+		part_update
+	}
+}
+
+# Trickery with the part number, make it follow the live pin count.
+# The magic value "menu" matches the third column of our entry in generic.list
+proc part_update { } {
+	global partnum nX nY
+	set pincount [ expr 2*($nX+$nY) ]
+	set newstring "QFP $pincount"
+	if { $partnum == "menu" } {
+		set partnum $newstring
+	} else {
+		regsub -all {QFP [0-9]+} $partnum $newstring partnum
+	}
+}
+
+proc adjustment { w number title varname } {
+	set f "$w.$varname"
+	frame $f
+	if {$number == ""} {
+		frame $f.number
+	} else {
+		entry $f.number -textvariable $number -width 4
+		bind $f.number <FocusOut> "nupdate $varname"
+		bind $f.number <Return>   "nupdate $varname"
+	}
+	label $f.label -text $title
+	global ${varname}_mm ${varname}_inch
+	entry $f.mm   -textvariable "${varname}_mm"   -width 8
+	entry $f.inch -textvariable "${varname}_inch" -width 8
+	pack  $f.inch $f.mm $f.label $f.number -side right
+	pack $f -side top -anchor e
+	bind $f.inch <FocusOut> "qupdate $varname inch"
+	bind $f.inch <Return>   "qupdate $varname inch"
+	bind $f.mm   <FocusOut> "qupdate $varname mm"
+	bind $f.mm   <Return>   "qupdate $varname mm"
+}
+
+proc draw_pad { x y wx wy } {
+	# in combination with 380x380 pixel canvas spec'd below,
+	# allows display of QFP up to 38 x 38.  I've never seen
+	# any exceed 36, so we should be safe.
+	set s 0.254
+	set c 190
+	set x1 [ expr round($c+$s*($x-0.5*$wx)) ]
+	set y1 [ expr round($c+$s*($y-0.5*$wy)) ]
+	set x2 [ expr round($x1+$s*$wx) ]
+	set y2 [ expr round($y1+$s*$wy) ]
+	# puts "rectangle $x1 $x2 $y1 $y2"
+	.c create rectangle $x1 $y1 $x2 $y2 \
+		-fill black -outline ""
+}
+
+proc draw_pad_line { n x y dx dy wx wy } {
+	# puts "$n $x $y $dx $dy $wx $wy"
+	for { set i 0} {$i<$n} {incr i} {
+		draw_pad [ expr $x+$i*$dx ]  [ expr $y+$i*$dy ] $wx $wy
+	}
+}
+
+proc draw_outline { } {
+	.c delete all
+	# use floating point mils for these calculations
+	global pitch nX nY lX lY plength pwidth
+	set p [expr $pitch.0/254 ]
+	set xmin [expr -0.5*$lX ]
+	set xmax [expr  0.5*$lX ]
+	set ymin [expr -0.5*$lY ]
+	set ymax [expr  0.5*$lY ]
+	set xstart [ expr -0.5*$p*($nX-1) ]
+	set ystart [ expr -0.5*$p*($nY-1) ]
+	draw_pad_line $nX $xstart $ymin $p 0 $pwidth $plength
+	draw_pad_line $nY $xmin $ystart 0 $p $plength $pwidth
+	draw_pad_line $nX $xstart $ymax $p 0 $pwidth $plength
+	draw_pad_line $nY $xmax $ystart 0 $p $plength $pwidth
+	# crude pin 1 marker
+	draw_pad [ expr $xmin+1.5*$plength ] $ystart $p $p
+}
+
+foreach v {pitch pwidth plength lX lY} {
+	line_update $v [ expr \$$v ]
+}
+
+proc infoline { w text var } {
+	set win $w.$var
+	global $var
+	frame $win
+	entry $win.var -textvariable $var
+	label $win.id  -text $text
+	pack $win.var $win.id -side right
+	pack $win -side top -anchor e
+}
+        
+
+# label .debug1 -text "$argv"
+# label .debug2 -text "$env(PATH)"
+# pack .debug1 .debug2
+
+frame .a
+frame .a.header
+label .a.header.inch -text "inch"  -width 8
+label .a.header.mm   -text "mm"    -width 8
+pack  .a.header.inch .a.header.mm -side right
+pack  .a.header -side top -anchor e
+adjustment .a ""   "Pitch"       pitch
+adjustment .a ""   "Pad Width"   pwidth
+adjustment .a ""   "Pad Length"  plength
+adjustment .a nX   "X length"    lX
+adjustment .a nY   "Y length"    lY
+pack .a -pady 5
+
+infoline "" "Description: "   description
+infoline "" "Name on board: " boardname
+infoline "" "Part Number: "   partnum
+
+frame .b
+button .b.done   -text "Done"   -command spit_output
+# pcb-1.6.3 gronks with no input from library, so we can't
+# give the user this option.
+# button .b.cancel -text "Cancel" -command exit
+pack .b.done -side right
+pack .b -pady 5
+
+canvas .c -width 380 -height 380
+pack .c
+label .whoami1 -text "Experimental QFP UI for pcb-1.6.3"
+label .whoami2 -text "by Larry Doolittle <LRDoolittle@lbl.gov>"
+pack .whoami1 .whoami2
+draw_outline
+part_update
diff -urN --exclude=Makefile pcb-1.6.3-orig/lib/qfp.inc pcb-1.6.3/lib/qfp.inc
--- pcb-1.6.3-orig/lib/qfp.inc	Sat May 16 14:11:19 1998
+++ pcb-1.6.3/lib/qfp.inc	Fri Jan  7 11:30:43 2000
@@ -41,7 +41,7 @@
 # $4: number of pins
 # $5: additional border (will be ignored)
 #
-define(`PKG_QFP',
+define(`PKG_OLD_QFP',
 	`define(`QUARTER', `eval($4 /4)')
 	define(`OFFSET', `eval((QUARTER +1) /2)')
 	define(`WIDTH', `eval((QUARTER-1) *31 +2*42)')
@@ -97,3 +97,156 @@
 )')
 
 # -------------------------------------------------------------------
+
+
+# Yet another QFP Package family -- untested (but looks pretty)
+# Concepts stolen from PLCC and older QFP macros above.
+# December 1999, Larry Doolittle <LRDoolittle@lbl.gov>
+# This is intended to be fully general, and replace all other QFP code.
+# It can handle square or rectangular packages of variable pitch.
+# It sings, it dances, it might even be made to handle PLCCs and
+# the Motorola package outlines with those cool-looking tabs on the
+# plastic.
+#
+# PKG_GEN_QFP is the general case, PKG_LQFP and PKG_QFP call it
+# with different setup.
+#   PITCH      pad center-to-center distance ***IN UNITS OF 0.1 MICROMETER***
+#             (weird, I know, but this sets 1 mil=254 units exactly, so
+#              pitches defined in either Imperial or Metric may be used)
+#   PAD_WIDTH  width of pad (mils)
+#   XPADS      Number of pads in X direction
+#   YPADS      Number of pads in Y direction
+#             (total number of pads is 2*(XPADS+YPADS) )
+#   X_LENGTH   X length in mils from end-to-end of the pads
+#   Y_LENGTH   Y length in mils from end-to-end of the pads
+#   ISTART    Where along the left row (YPADS long) to find pin 1.
+#             (generally ISTART=1 for pin 1 in the corner, but ISTART
+#              is 11 for some 84-pin square packages and 17 for some
+#              132-pin square packages)
+
+define(`PKG_GEN_QFP',
+	`
+	define(`PX', `eval((PITCH*(XPADS-1)+127)/254)')
+	define(`PY', `eval((PITCH*(YPADS-1)+127)/254)')
+	define(`PHW', `eval(PAD_WIDTH/2)')
+Element(0x00 "$1" "$2" "$3" 100 0 0 100 0x00)
+(
+	define(`count', 1)
+
+	# left row, going down
+	define(`X_OUTER', PHW)
+	define(`X_INNER', eval(PAD_LENGTH-PHW))
+	define(`Y0', `eval((Y_LENGTH-PY)/2)')
+	forloop(`i', ISTART, YPADS,
+		`define(`Y', eval(Y0+(PITCH*(i-1)+127)/254) )'
+		`PAD(X_OUTER, Y, X_INNER, Y, PAD_WIDTH, count)'
+		`define(`count',incr(count))'
+	)
+
+	# bottom row, going right
+	define(`Y_OUTER', eval(Y_LENGTH-PHW))
+	define(`Y_INNER', eval(Y_LENGTH+PHW-PAD_LENGTH))
+	define(`X0', `eval((X_LENGTH-PX)/2)')
+	forloop(`i', 1, XPADS,
+		`define(`X', eval(X0+(PITCH*(i-1)+127)/254) )'
+		`PAD(X, Y_OUTER, X, Y_INNER, PAD_WIDTH, count)'
+		`define(`count',incr(count))'
+	)
+
+	# right row, going up
+	define(`X_OUTER', eval(X_LENGTH-PHW))
+	define(`X_INNER', eval(X_LENGTH+PHW-PAD_LENGTH))
+	define(`Y0', `eval((Y_LENGTH+PY)/2)')
+	forloop(`i', 1, YPADS,
+		`define(`Y', eval(Y0-(PITCH*(i-1)+127)/254) )'
+		`PAD(X_OUTER, Y, X_INNER, Y, PAD_WIDTH, count)'
+		`define(`count',incr(count))'
+	)
+
+	# top row, going left
+	define(`Y_OUTER', PHW)
+	define(`Y_INNER', eval(PAD_LENGTH+PHW-PAD_WIDTH))
+	define(`X0', `eval((X_LENGTH+PX)/2)')
+	forloop(`i', 1, XPADS,
+		`define(`X', eval(X0-(PITCH*(i-1)+127)/254) )'
+		`PAD(X, Y_OUTER, X, Y_INNER, PAD_WIDTH, count)'
+		`define(`count',incr(count))'
+	)
+
+	# left row, going down again, maybe
+	define(`X_OUTER', PHW)
+	define(`X_INNER', eval(PAD_LENGTH-PHW))
+	define(`Y0', `eval((Y_LENGTH-PY)/2)')
+	ifelse(ISTART,1,,`forloop(`i', 1, eval(ISTART-1),
+		`define(`Y', eval(Y0+(PITCH*(i-1)+127)/254) )'
+		`PAD(X_OUTER, Y, X_INNER, Y, PAD_WIDTH, count)'
+		`define(`count',incr(count))'
+	)')
+
+	define(`NOSMUDGE', 10)
+	define(`SSO', eval(NOSMUDGE+PAD_LENGTH))
+	define(`PPX', eval(X_LENGTH-SSO))
+	define(`PPY', eval(Y_LENGTH-SSO))
+	ElementLine(SSO SSO PPX SSO 8)
+	ElementLine(PPX SSO PPX PPY 8)
+	ElementLine(PPX PPY SSO PPY 8)
+	ElementLine(SSO PPY SSO SSO 8)
+
+	# Pin 1 Indicator
+	define(`Y1', ifelse(ISTART,1,`eval(SSO+40)',
+	                             `eval(Y0+(PITCH*(ISTART-1)+127)/254)'))
+	ElementArc(eval(SSO+40) Y1 20 20 0 360 10)
+
+	# Moderately useful place for the Mark.  This way,
+	# if the pins can line up with the grid, they do.
+	Mark(eval((X_LENGTH-PX)/2) eval((Y_LENGTH-PY)/2))
+)')
+
+# PKG_QFP: square quad flat pack, 0.8 mm pitch, based on PKG_GEN_QFP above
+# $1: canonical name
+# $2: name on PCB
+# $3: value
+# $4: total number of pins (package is assumed square)
+# This configuration should correspond to the old PKG_QFP, renamed
+# PKG_OLD_QFP above for comparison.  The two implementations have,
+# among other things, different coordinate zeros.
+
+define(`PKG_QFP',
+	`define(`PITCH', 8000)
+	define(`PAD_WIDTH', 20)
+	define(`PAD_LENGTH', 90)
+	define(`XPADS', `eval($4 /4)')
+	define(`YPADS', `eval($4 /4)')
+	define(`X_LENGTH', `eval((PITCH*(XPADS-1)+127)/254+232)')
+	define(`Y_LENGTH', X_LENGTH)
+	define(`ISTART', 1)
+	PKG_GEN_QFP($1, $2, $3)'
+)
+
+# PKG_208_LQFP: leaded quad flat pack, 0.5 mm pitch, based on PKG_GEN_QFP above
+# $1: canonical name
+# $2: name on PCB
+# $3: value
+# This configuration based on a mechanical drawing of a
+# Cirrus Logic EP7211 in a 208-Pin LQFP
+
+define(`PKG_208_LQFP',
+	`define(`PITCH', 5000)
+	define(`PAD_LENGTH', 60)
+	define(`PAD_WIDTH', 10)
+	define(`XPADS', 52)
+	define(`YPADS', 52)
+	define(`X_LENGTH', 1220)
+	define(`Y_LENGTH', 1220)
+	define(`ISTART', 1)
+	PKG_GEN_QFP($1, $2, $3)'
+)
+
+# Interesting hack, this.  pcb -> sh -> m4 -> tcl
+# Refer to qfp-ui, a tcl program that should accompany this file.
+# Search path for this puppy comes from QueryLibrary.sh, which
+# I (LRD) patched to merge M4PATH into PATH
+define(`PKG_MENU_QFP',
+	`esyscmd(qfp-ui "$1" "$2" "$3")'
+)
+
diff -urN --exclude=Makefile pcb-1.6.3-orig/lib/to.inc pcb-1.6.3/lib/to.inc
--- pcb-1.6.3-orig/lib/to.inc	Sat May 16 14:11:22 1998
+++ pcb-1.6.3/lib/to.inc	Fri Jan  7 10:25:27 2000
@@ -353,3 +353,70 @@
 	Mark(100 200)
 )')
 
+# Small outline transistors, taken from some nice data sheets
+# by NEC/CEL for the NE688 series.
+# WX, WY are width of the pad footprint
+# DX, DY are center-to-center pad spacing
+# OX, OY are outline size for drawing
+# There is good reason to make OY match the size of plastic package,
+# but I suggest making OX small enough to not get ink on the pad,
+# even if that understates the size of the real package.
+# Jan 6, 2000  Larry Doolittle  <LRDoolittle@lbl.gov>
+# Status: Untested, but looks pretty :-)
+
+define(`PKG_BASE_SOT',
+`Element(0x00 "$1" "$2" "$3" 0 eval(DY+WY/2+10) 0 100 0x00)
+(
+	define(`WID', WY)
+	define(`RX',  `eval((WX-WID)/2)')
+	define(`X1', 0)
+	define(`Y1', DY)
+	define(`X2', 0)
+	define(`Y2', 0)
+	define(`X3', DX)
+	define(`Y3', `eval(DY/2)')
+	# Use Pad instead of PAD so all pads come out square
+	Pad(eval(X1-RX)  Y1  eval(X1+RX)  Y1  WID  "1"  0x100)
+	Pad(eval(X2-RX)  Y2  eval(X2+RX)  Y2  WID  "2"  0x100)
+	Pad(eval(X3-RX)  Y3  eval(X3+RX)  Y3  WID  "3"  0x100)
+
+	define(`LX', `eval((DX-OX)/2)')
+	define(`LY', `eval((DY-OY)/2)')
+	define(`MX', `eval((DX+OX)/2)')
+	define(`MY', `eval((DY+OY)/2)')
+	ElementLine(LX LY LX MY 6)
+	ElementLine(LX MY MX MY 6)
+	ElementLine(MX MY MX LY 6)
+	ElementLine(MX LY LX LY 6)
+
+)')
+
+define(`PKG_SOT23',`
+	define(`WX', 40)
+	define(`WY', 32)
+	define(`DX', 95)
+	define(`DY', 78)
+	define(`OX', 46)
+	define(`OY', 114)
+	PKG_BASE_SOT(`$1',`$2',`$3')
+')
+
+define(`PKG_SOT323',`
+	define(`WX', 32)
+	define(`WY', 24)
+	define(`DX', 67)
+	define(`DY', 51)
+	define(`OX', 26)
+	define(`OY', 79)
+	PKG_BASE_SOT(`$1',`$2',`$3')
+')
+
+define(`PKG_NEC19',`
+	define(`WX', 24)
+	define(`WY', 24)
+	define(`DX', 50)
+	define(`DY', 40)
+	define(`OX', 18)
+	define(`OY', 62)
+	PKG_BASE_SOT(`$1',`$2',`$3')
+')
diff -urN --exclude=Makefile pcb-1.6.3-orig/src/dev_ps.c pcb-1.6.3/src/dev_ps.c
--- pcb-1.6.3-orig/src/dev_ps.c	Wed May 13 03:29:43 1998
+++ pcb-1.6.3/src/dev_ps.c	Mon Dec 13 13:24:41 1999
@@ -920,7 +920,7 @@
 {
 	if (TEST_FLAG(SQUAREFLAG, Pad))
 	{
-		Dimension scrunch = Pad->Thickness/2 + GROUNDPLANEFRAME;
+		Dimension scrunch = Pad->Thickness/2 + MASKFRAME;
 	fprintf(PS_Flags.FP, "%d %d %d %d CLRB\n",
 		((Pad->Point1.X > Pad->Point2.X) ? Pad->Point2.X  : Pad->Point1.X) - scrunch,
 		((Pad->Point1.Y > Pad->Point2.Y) ? Pad->Point2.Y  : Pad->Point1.Y) - scrunch,
@@ -933,7 +933,7 @@
 		(int) Pad->Point1.Y,
 		(int) Pad->Point2.X,
 		(int) Pad->Point2.Y,
-		(int) Pad->Thickness + 2*GROUNDPLANEFRAME);
+		(int) Pad->Thickness + 2*MASKFRAME);
 }
 
 /* ----------------------------------------------------------------------
@@ -944,7 +944,7 @@
 	fprintf(PS_Flags.FP, "%d %d %d %s\n",
 		(int) Ptr->X,
 		(int) Ptr->Y,
-		(int) Ptr->Thickness + 2*GROUNDPLANEFRAME,
+		(int) Ptr->Thickness + 2*MASKFRAME,
 		TEST_FLAG(SQUAREFLAG, Ptr) ? "CLRPVSQ" : TEST_FLAG(OCTAGONFLAG, Ptr) ? "CLRPV" : "CLRPVR");
 }
 
diff -urN --exclude=Makefile pcb-1.6.3-orig/src/dev_rs274x.c pcb-1.6.3/src/dev_rs274x.c
--- pcb-1.6.3-orig/src/dev_rs274x.c	Wed May 13 03:29:43 1998
+++ pcb-1.6.3/src/dev_rs274x.c	Mon Dec 13 13:48:45 1999
@@ -365,6 +365,10 @@
 					TEST_FLAG(SQUAREFLAG, pin) ?
 						SQUARE : (TEST_FLAG(OCTAGONFLAG, pin) ? 
 						OCTAGON : ROUND));
+			findApertureCode(&GBX_Apertures, pin->Thickness + 2*MASKFRAME,
+					TEST_FLAG(SQUAREFLAG, pin) ?
+						SQUARE : (TEST_FLAG(OCTAGONFLAG, pin) ? 
+						OCTAGON : ROUND));
 				/* check if a thermal is being used */
 			if (TEST_FLAG(ALLTHERMFLAGS, pin))
 				findApertureCode(&GBX_Apertures, pin->Thickness,
@@ -404,6 +408,10 @@
 				TEST_FLAG(SQUAREFLAG, via) ?
 				SQUARE : (TEST_FLAG(OCTAGONFLAG, via) ?
 				OCTAGON : ROUND));
+		findApertureCode(&GBX_Apertures, via->Thickness + 2*MASKFRAME,
+				TEST_FLAG(SQUAREFLAG, via) ?
+				SQUARE : (TEST_FLAG(OCTAGONFLAG, via) ?
+				OCTAGON : ROUND));
 			/* check if a thermal is being used */
 		if (TEST_FLAG(ALLTHERMFLAGS, via))
 			findApertureCode(&GBX_Apertures, via->Thickness,
@@ -1174,7 +1182,7 @@
 	FILE *FP;
 	
 	FP = GBX_Flags.FP;
-	apCode = findApertureCode(&GBX_Apertures, Pad->Thickness +2*GROUNDPLANEFRAME,
+	apCode = findApertureCode(&GBX_Apertures, Pad->Thickness +2*MASKFRAME,
 	          (Pad->Flags & SQUAREFLAG) ? SQUARE : ROUND);
 	if (lastAperture != apCode)
 	{
@@ -1217,7 +1225,7 @@
 {
 	int apCode;
 	
-	apCode = findApertureCode(&GBX_Apertures, Pin->Thickness +2*GROUNDPLANEFRAME,
+	apCode = findApertureCode(&GBX_Apertures, Pin->Thickness +2*MASKFRAME,
 			TEST_FLAG(SQUAREFLAG, Pin) ? SQUARE :
 			(TEST_FLAG(OCTAGONFLAG, Pin) ? OCTAGON : ROUND));
 	if (lastAperture != apCode)
diff -urN --exclude=Makefile pcb-1.6.3-orig/src/rats.c pcb-1.6.3/src/rats.c
--- pcb-1.6.3-orig/src/rats.c	Wed May 13 03:29:56 1998
+++ pcb-1.6.3/src/rats.c	Mon Dec 13 14:11:27 1999
@@ -443,6 +443,9 @@
 		firstpoint->X, firstpoint->Y, secondpoint->X, secondpoint->Y, 
 		Settings.LineThickness, RATFLAG)) != NULL)
 	   {
+		/* printf("drawing ratline from %s-%s to %s-%s\n",
+			firstpoint->Element->Name[1].TextString, firstpoint->PinNum,
+			secondpoint->Element->Name[1].TextString, secondpoint->PinNum ); */
 		AddObjectToCreateUndoList(LINE_TYPE, CURRENT, line, line);
 		DrawLine(CURRENT, line, 0);
 		changed = True;
