chiark / gitweb /
all layers, feature V in layersel
authorian <ian>
Mon, 2 Feb 2004 00:45:10 +0000 (00:45 +0000)
committerian <ian>
Mon, 2 Feb 2004 00:45:10 +0000 (00:45 +0000)
.cvsignore
layout/informat.txt
layout/layout
pcb/Makefile
pic.make
spice/Makefile

index 258a92a56234a327efd24b6364c0135aa3935fe4..c7c524fe0a83d93d1f3e4a474012184e45911c67 100644 (file)
@@ -5,3 +5,4 @@ u
 testjoin
 *.ps
 *.d4
+*.new
index 80bf23c3338a73b18684bc286ee1e26e874f882b..fb1c959ca7910f0e8eaa2eb2dbf9436437484174 100644 (file)
@@ -157,15 +157,18 @@ Command-line options
  specified -l layer.  Then all -e/-E options are scanned, in order,
  and each one that matches modifies the drawing element set.
 
- <layersel> is GN[D][C].  It matches `layer KL' iff the glob pattern G
- (which may be empty) matches the whole of K, and layer restriction
- N[D]C matches L.  C is several identical `=', `+' or `-'; D+ matches
- L iff L>=D; D++ iff L>D; D+++ iff L>D+1 and so on; D- matches L iff
- L<=D; D-- iff L<D; etc.; D= matches L iff L==D; D== iff D-1<=L<=D+1;
- D=== iff D-2<=L<=D+2; etc.  If D is omitted the current layer (from
- the most recent -l option) is used.  N may be empty or `~'; the
- latter simply inverts the sense of the match.  If C is omitted then
- `=' is assumed.
+ <layersel> is GN[D][C][V].  It matches `layer KL' iff the glob
+ pattern G (which may be empty) matches the whole of K, and layer
+ restriction N[D]C matches L.  C is several identical `=', `+' or `-';
+ D+ matches L iff L>=D; D++ iff L>D; D+++ iff L>D+1 and so on; D-
+ matches L iff L<=D; D-- iff L<D; etc.; D= matches L iff L==D; D== iff
+ D-1<=L<=D+1; D=== iff D-2<=L<=D+2; etc.  If D is omitted the current
+ layer (from the most recent -l option) is used.  N may be empty or
+ `~'; the latter simply inverts the sense of the match.  If C is
+ omitted then `=' is assumed.
+
+ If V is present then C must be exactly one character and it is as if
+ V (must be an integer) copies of C were specified.
 
 
 Special comments in PostScript:
index 381bdf5df286529f3e006a83d2d611981d3ee5d5..91f743729b490b2d3c34c547e90bdd584900f8d7 100755 (executable)
@@ -1002,20 +1002,24 @@ while (@ARGV && $ARGV[0] =~ m/^\-/) {
        elsif (s/^q//) { $quiet=1; }
        elsif (s/^(e)
               ((?:[a-z]|\*|\?|\[[a-z][-a-z]*\])*?)
-              (\~?) (\d*) (\=*|\-+|\++)
+              (\~?) (\d*) (\=*|\-+|\++) (\d*)
               ([a-z]+)//ix) {
-           my ($ee,$g,$n,$d,$c,$cc) = ($1,$2,$3,$4,$5,$6);
+           my ($ee,$g,$n,$d,$c,$v,$cc) = ($1,$2,$3,$4,$5,$6,$7);
            my ($eo, $invert, $lfn, $ccc, $sense,$limit);
            $g =~ s/[?*]/\\$&/g;
            $d= $output_layer if !length $d;
            $invert= length $n;
+           $c= '=' if !length $c;
+           if (length $v) {
+               die '-[eE]GN[D]CCV not allowed' if length $c > 1;
+               $c= $c x $v;
+           }
            if ($c =~ m/^[-+]/) {
                $sense= ($c.'1') + 0;
                $limit= ($sense * $d) + length($c) - 1;
                $lfn= sub { $_[0] * $sense >= $limit xor $invert };
            } else {
                $limit= length($c) - 1;
-               $limit=0 if $limit<0;
                $lfn= sub { abs($_[0] - $d) <= $limit xor $invert };
            }
            $ccc= '';
index 41e08b29ee91c1815e0297f33e800322a0759d86..42b6e058173fdb077e1f78d504b1d0da7faec7a5 100644 (file)
@@ -12,6 +12,9 @@ o=>$@.new && mv -f $@.new $@
 %.d4:          %.m4 $(M4INCS)
                m4 -s <$< $o
 
+%-a.ps:                %.d4 layout
+               ./layout <$< -E10=100ArC $o
+
 ours-l%.ps:    ours.d4 layout
                ./layout <$< $(LAYOUTOPTS) $o
 
index 41e08b29ee91c1815e0297f33e800322a0759d86..42b6e058173fdb077e1f78d504b1d0da7faec7a5 100644 (file)
--- a/pic.make
+++ b/pic.make
@@ -12,6 +12,9 @@ o=>$@.new && mv -f $@.new $@
 %.d4:          %.m4 $(M4INCS)
                m4 -s <$< $o
 
+%-a.ps:                %.d4 layout
+               ./layout <$< -E10=100ArC $o
+
 ours-l%.ps:    ours.d4 layout
                ./layout <$< $(LAYOUTOPTS) $o
 
index 41e08b29ee91c1815e0297f33e800322a0759d86..42b6e058173fdb077e1f78d504b1d0da7faec7a5 100644 (file)
@@ -12,6 +12,9 @@ o=>$@.new && mv -f $@.new $@
 %.d4:          %.m4 $(M4INCS)
                m4 -s <$< $o
 
+%-a.ps:                %.d4 layout
+               ./layout <$< -E10=100ArC $o
+
 ours-l%.ps:    ours.d4 layout
                ./layout <$< $(LAYOUTOPTS) $o