8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# Copyright (c) P.J.Gawthrop, 1996.
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.39 2001/05/09 08:50:02 gawthrop
## Uses _art.fig to transmit the art work to the cbg.fig rep.
##
## Revision 1.38 2001/03/23 14:57:31 gawthrop
## Now puts space after header fields + writes _port.fig
##
## Revision 1.37 2000/09/14 08:43:32 peterg
|
>
>
>
>
>
|
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# Copyright (c) P.J.Gawthrop, 1996.
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.40 2001/06/11 19:43:50 gawthrop
## MTT is now much more sophisticated in generating lbl files
## Labels can contain maths
## Repetative components are now broken
##
## Revision 1.39 2001/05/09 08:50:02 gawthrop
## Uses _art.fig to transmit the art work to the cbg.fig rep.
##
## Revision 1.38 2001/03/23 14:57:31 gawthrop
## Now puts space after header fields + writes _port.fig
##
## Revision 1.37 2000/09/14 08:43:32 peterg
|
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
|
# The depth is field 4 (for strings)
depth = modulo10($4);
# It is terminated by \001 - so delete this termination
str = substr(str,1,length(str)-4);
# Zap maths
gsub(/[()-+*/]/,"",str);
# A component string contains only alphanumeric _ and :
isa_plain_component = match(str, component_regexp)==0;
# It must also be specified at depth 0 (modulo 10)
isa_plain_component = isa_plain_component && (depth==0);
# A port is a string within []
|
|
>
>
>
>
>
>
>
|
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
|
# The depth is field 4 (for strings)
depth = modulo10($4);
# It is terminated by \001 - so delete this termination
str = substr(str,1,length(str)-4);
# Zap maths
##gsub(/[()-+*/]/,"",str);
# Loose the cr stuff (if present)
if (depth==0) {
N=split(str,a,delimiter);
if (N==3)
str=sprintf("%s%s%s", a[1],delimiter,a[2]);
}
# A component string contains only alphanumeric _ and :
isa_plain_component = match(str, component_regexp)==0;
# It must also be specified at depth 0 (modulo 10)
isa_plain_component = isa_plain_component && (depth==0);
# A port is a string within []
|