This file is indexed.

/usr/share/pcb/m4/plcc.inc is in pcb-common 20110918-9.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
#
#                             COPYRIGHT
# 
#   PCB, interactive printed circuit board design
#   Copyright (C) 1994,1995,1996 Thomas Nau
# 
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 2 of the License, or
#   (at your option) any later version.
# 
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
# 
#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# 
#   Contact addresses for paper mail and Email:
#   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
#   Thomas.Nau@rz.uni-ulm.de
# 
#   RCS: $Id$
#
# PLCC packages
#

# -------------------------------------------------------------------
# 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; PUSHOUT=5 PUSHIN=40
#
# modified 22-Dec-1999 Larry Doolittle <LRDoolittle@lbl.gov>
# put back the 10 mils on the outside; PUSHOUT=5, PUSHIN=50
#
# One last tweak 12-Jan-2000 LRD, now that the shop complained I
# didn't leave them any room to solder (looks like the 22-Dec
# change was backwards);  PUSHOUT=20, PUSHIN=40
#
# $1: canonical name
# $2: name on PCB
# $3: value
# $4: number of pins
# $5: additional border (will be ignored)
#
define(`PKG_PLCC',
	`define(`NUMPINS', `$4')
	ifelse(eval(NUMPINS == 32),1,`define(`QUARTER',7)',`define(`QUARTER', `eval($4 /4)')')
	define(`OFFSET', `eval((QUARTER +1) /2)')
	define(`WIDTH', `eval((QUARTER-1) *50 +2*75)')
	ifelse(eval(NUMPINS == 32),1,`define(`SIDE',`eval((NUMPINS-2*QUARTER)/2)')', `define(`SIDE',QUARTER)')
	define(`HEIGHT', `eval((SIDE-1)* 50 + 2*75)')
	define(`CENTER', `eval(WIDTH / 2)')
	define(`PUSHOUT', 20)    # was 15
	define(`PUSHIN', 40)     # was 50
Element(0x00 "$1" "`$2'" "$3" 100 CENTER 0 100 0x00)
(
	# top left half
define(`X', CENTER)
define(`Y', 0)
define(`count', 1)
forloop(`i', 1, OFFSET,
	`PAD(X, eval(Y-PUSHOUT), X, eval(Y+PUSHIN), 20, count)' `define(`count', incr(count))'
	`define(`X', eval(X-50))'
	)


	# left row
define(`X', 0)
define(`Y', 75)
define(`count', `eval(OFFSET+1)')
forloop(`i', 1, SIDE,
	`PAD(eval(X-PUSHOUT), Y, eval(X+PUSHIN), Y, 20, count)' `define(`count', incr(count))'
	`define(`Y', eval(Y+50))'
	)

	# bottom row
define(`X', 75)
define(`Y', HEIGHT)
forloop(`i', 1, QUARTER,
	`PAD(X, eval(Y+PUSHOUT), X, eval(Y-PUSHIN), 20, count)' `define(`count', incr(count))'
	`define(`X', eval(X+50))'
)

	# right row
define(`X', WIDTH)
define(`Y', eval(HEIGHT-75))
forloop(`i', 1, SIDE,
	`PAD(eval(X+PUSHOUT), Y, eval(X-PUSHIN), Y, 20, count)' `define(`count', incr(count))'
	`define(`Y', eval(Y-50))'
)

	# top right row
define(`X', eval(WIDTH-75))
define(`Y', 0)
forloop(`i', 1, eval(OFFSET-1),
	`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))'
)

#	ElementLine(50 0 WIDTH 0 20)
#	ElementLine(WIDTH 0 WIDTH WIDTH 20)
#	ElementLine(WIDTH WIDTH 0 WIDTH 20)
#	ElementLine(0 WIDTH 0 50 20)
#	ElementLine(0 50 50 0 20)

# Modified by Thomas Olson to eliminate silkscreen blobbing over pads.
# Approach one: eliminate ElementLine transgression over pads. leave corners
# only.

define(`OLWIDTH', eval(WIDTH-50))
define(`OLHEIGHT', eval(HEIGHT-50))
	
	ElementLine(OLWIDTH 0 WIDTH 0 10)
	ElementLine(WIDTH 0 WIDTH 50 10)
	ElementLine(WIDTH OLHEIGHT WIDTH HEIGHT 10)
	ElementLine(WIDTH HEIGHT OLWIDTH HEIGHT 10)
	ElementLine(50 HEIGHT 0 HEIGHT 10)
	ElementLine(0 HEIGHT 0 OLHEIGHT 10)
	ElementLine(0 50 50 0 10)

# Approach two: move outline to edge of pads.
# The outline should be 15 off. But since the pad algorithm
# is not making the square pads correctly I give it a total of 30
# to clear the pads.

# Try 40 mils, and parameterize it.  1/12/00 LRD
define(`NOSMUDGE', 40)
define(`OLWIDTH', eval(WIDTH+NOSMUDGE))
define(`OLHEIGHT', eval(HEIGHT+NOSMUDGE))

	ElementLine(50 -NOSMUDGE OLWIDTH -NOSMUDGE 10)
	ElementLine(OLWIDTH -NOSMUDGE OLWIDTH OLHEIGHT 10)
	ElementLine(OLWIDTH OLHEIGHT -NOSMUDGE OLHEIGHT 10)
	ElementLine(-NOSMUDGE OLHEIGHT -NOSMUDGE 50 10)
	ElementLine(-NOSMUDGE 50 50 -NOSMUDGE 10)

	ElementArc(CENTER 100 20 20 0 360 10)

	Mark(0 0)
)')

# -------------------------------------------------------------------
# the definition of a plcc package with through-hole socket
#
# for example, Assmann A-CCS##-{Z,G} series
# or mil-max 940-XX-XXX-24-000000 series.
#
# mil-max specifies 0.035" drill hole and 0.062" pad.
# Assman says 0.0315" hole.  Also the mil-max outside
# dimensions are ever so slightly larger than Assmann so
# use those.  See for example
# http://www.milmax.com/images/products/pdf/092.PDF
#
# modified for correct pin numbering by Holm Tiffe
# $1: canonical name
# $2: name on PCB
# $3: value
# $4: number of pins
# $5: additional border
#
define(`PKG_PLCC_SOCKET',
	`define(`QUARTER', `eval($4 /4)')
	define(`OFFSET', eval((QUARTER +1) / 2))
	define(`BORDER', `$5')
	define(`WIDTH', `eval((OFFSET+1) *100 +2*BORDER)')
	define(`CENTER', `eval(WIDTH / 2)')
	define(`NUMPINS', `$4')
	define(`PADSIZE', `62')
	define(`DRILL', `35')
Element(0x00 "$1" "`$2'" "$3" eval(BORDER+200) CENTER 0 100 0x00)

# PLCC - 44 is a  special case, pad 1 in inner row

ifelse(eval(NUMPINS == 44 || NUMPINS == 28 || NUMPINS == 32), 1, `(

define(`X',eval(CENTER+50))
define(`Y',eval(BORDER+100))
define(`count',1)

ifelse(eval(NUMPINS == 44),1,`define(`ltr',3)',`define(`ltr',2)')
ifelse(eval(NUMPINS == 32),1,`define(`QUARTER',9)')

# top left row
forloop(`i', 1, ltr,
	`PIN(X, Y, PADSIZE, DRILL, count)' `define(`count', incr(count))'
	`PIN(eval(X-100), eval(Y-100), PADSIZE, DRILL, count)' `define(`count', incr(count))'
	`define(`X', eval(X-100))'
)

#left row
define(`X',eval(X-100))
forloop(`i', 1, eval((QUARTER-1)/2),
	`PIN(X, Y, PADSIZE, DRILL, count)' `define(`count', incr(count))'
	`PIN(eval(X+100), Y, PADSIZE, DRILL, count)' `define(`count', incr(count))'
	`define(`Y', eval(Y+100))'
)
PIN(X, Y, PADSIZE, DRILL, count)
define(`count', incr(count))

# bottom row
define(`X',eval(X+100))
define(`Y',eval(Y+100))
forloop(`i', 1, eval(ltr*2-1),
	`PIN(X, Y, PADSIZE, DRILL, count)' `define(`count', incr(count))'
	`PIN(X, eval(Y-100), PADSIZE, DRILL, count)' `define(`count', incr(count))'
	`define(`X', eval(X+100))'
)
PIN(X, Y, PADSIZE, DRILL, count)
define(`count', incr(count))

# right row
define(`X',eval(X+100))
define(`Y',eval(Y-100))
forloop(`i', 1, eval((QUARTER-1)/2),
	`PIN(X, Y, PADSIZE, DRILL, count)' `define(`count', incr(count))'
	`PIN(eval(X-100), Y, PADSIZE, DRILL, count)' `define(`count', incr(count))'
	`define(`Y', eval(Y-100))'
)
PIN(X, Y, PADSIZE, DRILL, count)
define(`count', incr(count))

# top rigth row
define(`X',eval(X-100))
define(`Y',eval(Y-100))
forloop(`i', 1, eval(ltr-1),
	`PIN(X, Y, PADSIZE, DRILL, count)' `define(`count', incr(count))'
	`PIN(X, eval(Y+100), PADSIZE, DRILL, count)' `define(`count', incr(count))'
	`define(`X', eval(X-100))'
)
PIN(X, Y, PADSIZE, DRILL, count)

ifelse(eval(NUMPINS == 32),1,`define(`HEIGHT',eval(WIDTH+100))',`define(`HEIGHT',WIDTH)')
	ElementLine(0 0 WIDTH 0 20)
	ElementLine(WIDTH 0 WIDTH HEIGHT 20)
	ElementLine(WIDTH HEIGHT 0 HEIGHT 20)
	ElementLine(0 HEIGHT 0 0 20)
	ElementLine(0 100 100 0 10)
	ElementLine(eval(CENTER-50) 0 CENTER 50 10)
	ElementLine(CENTER 50 eval(CENTER+50) 0 10)

	Mark(CENTER BORDER)


#------------------------------------------------------------------------
# all other sockets, currently 20,52,68 and 84 pins

)', `(

# the default case, Pad 1 is on outer top row, in the middle


#top left row

define(`X',CENTER)
define(`Y',BORDER)
define(`count',1)
forloop(`i', 1, eval((QUARTER-1)/4),
	`PIN(X, Y, PADSIZE, DRILL, count)' `define(`count', incr(count))'
	`PIN(X, eval(Y+100), PADSIZE, DRILL, count)' `define(`count', incr(count))'
	`define(`X',eval(X-100))'
)
PIN(X, Y, PADSIZE, DRILL, count)
define(`count', incr(count))

# left row
define(`Y',eval(BORDER+100))
define(`X',BORDER)
forloop(`i', 1, eval((QUARTER-1)/2),
	`PIN(X, Y, PADSIZE, DRILL, count)' `define(`count', incr(count))'
	`PIN(eval(X+100), Y, PADSIZE, DRILL, count)' `define(`count', incr(count))'
	`define(`Y',eval(Y+100))'
)
PIN(X, Y, PADSIZE, DRILL, count)
define(`count', incr(count))

# bottom row
define(`X',eval(BORDER+100))
define(`Y',eval(WIDTH-BORDER))
forloop(`i', 1, eval((QUARTER-1)/2),
	`PIN(X, Y, PADSIZE, DRILL, count)' `define(`count', incr(count))'
	`PIN(X, eval(Y-100), PADSIZE, DRILL, count)' `define(`count', incr(count))'
	`define(`X',eval(X+100))'
)
PIN(X, Y, PADSIZE, DRILL, count)
define(`count', incr(count))

# right row
define(`X',eval(WIDTH-BORDER))
define(`Y',eval(WIDTH-BORDER-100))
forloop(`i', 1, eval((QUARTER-1)/2),
	`PIN(X, Y, PADSIZE, DRILL, count)' `define(`count', incr(count))'
	`PIN(eval(X-100), Y, PADSIZE, DRILL, count)' `define(`count', incr(count))'
	`define(`Y',eval(Y-100))'
)
PIN(X, Y, PADSIZE, DRILL, count)
define(`count', incr(count))

#top right row

define(`X',eval(WIDTH-BORDER-100))
define(`Y',BORDER)
forloop(`i', 1, eval((QUARTER-1)/4),
	`PIN(X, Y, PADSIZE, DRILL, count)' `define(`count', incr(count))'
	`PIN(X, eval(Y+100), PADSIZE, DRILL, count)' `define(`count', incr(count))'
	`define(`X',eval(X-100))'
)

	ElementLine(0 0 WIDTH 0 20)
	ElementLine(WIDTH 0 WIDTH WIDTH 20)
	ElementLine(WIDTH WIDTH 0 WIDTH 20)
	ElementLine(0 WIDTH 0 0 20)
	ElementLine(0 100 100 0 10)
	ElementLine(eval(CENTER-50) 0 CENTER 50 10)
	ElementLine(CENTER 50 eval(CENTER+50) 0 10)

	Mark(CENTER BORDER)

)')')