From: ian Date: Mon, 2 Feb 2004 01:54:16 +0000 (+0000) Subject: layer defaults to * X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=a601a10b0bf8f383b4151c487ec1d05f32303e20;p=trains.git layer defaults to * --- diff --git a/layout/informat.txt b/layout/informat.txt index fb1c959..c70f3fa 100644 --- a/layout/informat.txt +++ b/layout/informat.txt @@ -115,7 +115,7 @@ Command-line options -D turn on debug (level 1) } currently only debug levels are -Dnnn set debug level to nnn } 0 (none) and 1 (some), default=0 - -lL output for layer L (default: 5) + -lL output for layer L (digits, or `*' for any) (default: *) -e[ARSCcLlMNOm]... Turn on and off drawing of elements in groups. diff --git a/layout/layout b/layout/layout index 91f7437..3667079 100755 --- a/layout/layout +++ b/layout/layout @@ -36,7 +36,7 @@ our $olu_textheight= 15; our $olu_textallowperc= $lmu_marktpt * 5.0/11; our $pi= atan2(0,-1); -our $output_layer= 5; +our $output_layer= '*'; sub allwidth2 ($) { my ($radius)= @_; @@ -734,11 +734,11 @@ sub cmd__runobj ($) { sub cmd_layer { my ($kl, $k,$l, $eo,$cc); - return if $ctx->{Draw} =~ m/X/; $kl= can(\&cva_identity); + return if $ctx->{Draw} =~ m/X/; $kl =~ m/^([A-Za-z_]*)(\d+)$/ or die "invalid layer spec"; ($k,$l)=($1,$2); - if ($l != $output_layer) { + if ($output_layer ne '*' && $l != $output_layer) { $ctx->{Draw} = ''; } elsif ($k eq '') { $ctx->{Draw}= 'RLMN'; @@ -751,7 +751,7 @@ sub cmd_layer { } foreach $eo (@eopts) { next unless $k =~ m/^$eo->{GlobRe}$/; - next unless &{ $eo->{LayerCheck} }($l); + next unless $output_layer eq '*' || &{ $eo->{LayerCheck} }($l); foreach $cc (split //, $eo->{DrawMods}) { $ctx->{Draw} =~ s/$cc//ig; $ctx->{Draw} .= $cc if $cc =~ m/[A-Z]/; diff --git a/pcb/Makefile b/pcb/Makefile index 8178c6a..2c6988f 100644 --- a/pcb/Makefile +++ b/pcb/Makefile @@ -17,7 +17,7 @@ o=>$@.new && mv -f $@.new $@ m4 -s <$< $o %-a.ps: %.d4 layout - ./layout <$< -E10=100$(E_TRACK) $o + ./layout <$< $(LAYOUTOPTS) $o ours-l%.ps: ours.d4 layout ./layout <$< $(LAYOUTOPTS) $o diff --git a/pic.make b/pic.make index 8178c6a..2c6988f 100644 --- a/pic.make +++ b/pic.make @@ -17,7 +17,7 @@ o=>$@.new && mv -f $@.new $@ m4 -s <$< $o %-a.ps: %.d4 layout - ./layout <$< -E10=100$(E_TRACK) $o + ./layout <$< $(LAYOUTOPTS) $o ours-l%.ps: ours.d4 layout ./layout <$< $(LAYOUTOPTS) $o diff --git a/spice/Makefile b/spice/Makefile index 8178c6a..2c6988f 100644 --- a/spice/Makefile +++ b/spice/Makefile @@ -17,7 +17,7 @@ o=>$@.new && mv -f $@.new $@ m4 -s <$< $o %-a.ps: %.d4 layout - ./layout <$< -E10=100$(E_TRACK) $o + ./layout <$< $(LAYOUTOPTS) $o ours-l%.ps: ours.d4 layout ./layout <$< $(LAYOUTOPTS) $o