chiark / gitweb /
generates segment encoding (but wrong - needs debugging)
authorian <ian>
Fri, 22 Oct 2004 10:21:45 +0000 (10:21 +0000)
committerian <ian>
Fri, 22 Oct 2004 10:21:45 +0000 (10:21 +0000)
layout/Makefile
layout/layout
layout/segcmapassign

index a31aea4db88f17f18e0300e13dc59838b0368d9c..f63091b7788801c52bb2c90cbe6e723274d7b5b6 100644 (file)
@@ -38,13 +38,13 @@ o=>$@.new && mv -f $@.new $@
                ./layout -S1.0 <$< $(LAYOUTOPTS) '-e*A' '-ep=rm' $o
 
 ours-g%.ps:    ours.d4 ours-g%.segcmap layout
-               ./layout <$< -l$* $(LAYOUTOPTS_SEGS) -GRours-g$*.segcmap $o
+               ./layout <$< -l$* $(LAYOUTOPTS_SEGS) -GLours-g$*.segcmap $o
 
 ours-g%.segcmap: ours-g%.segcmapreq segcmapassign
                ./segcmapassign <$< $o
 
 ours-g%.segcmapreq: ours.d4 layout
-               ./layout <$< -l$* $(LAYOUTOPTS_SEGS) -GL $o
+               ./layout <$< -l$* $(LAYOUTOPTS_SEGS) -GR $o
 
 ours-l%.ps:    ours.d4 layout
                ./layout <$< -l$* $(LAYOUTOPTS) $(XLAYOUTOPTS_LAYER) $o
index e3e78c76c0711d0de4edcab184910799d4f8becc..c5e43b0de3e526b390a827babc95627d73e688a6 100755 (executable)
@@ -1,6 +1,9 @@
 #!/usr/bin/perl -w
 
 use POSIX;
+use IO::Handle;
+use IO::File;
+
 use strict;
 no strict 'subs';
 
@@ -47,15 +50,18 @@ while (@ARGV && $ARGV[0] =~ m/^\-/) {
        elsif (s/^l(\d+|\*)//) { $output_layer=$1; }
        elsif (s/^S([0-9.]+)$//) { $scale= $1 * 1.0; }
        elsif (s/^P(\d+)x(\d+)$//) { $page_x= $1; $page_y= $2; }
-       elsif (s/^GL//) { $subsegcmapreq=1; }
-       elsif (s/^GR(.*)$//) {
+       elsif (s/^GR//) { $subsegcmapreq=1; }
+       elsif (s/^GL(.*)$//) {
            my ($sscmfn) = $1;
            my ($sscmf);
            local ($_);
            $sscmf= new IO::File $sscmfn, 'r'
                or die "$sscmfn: cannot open: $!\n";
-           while (<$sscmf>) {
-               m,^\s*(\w+/(?:[a-z]+\d+))\s+(\S.*\S)\s*$,
+           for (;;) {
+               $!=0; $_= <$sscmf>; die $! unless defined $_;
+               last if m/^E/;
+               next unless m/^C/;
+               m,^C\s+(\w*/(?:[A-Za-z_]+\d+)?)\s+(\S.*\S)\s*$,
                    or die "$sscmfn:$.: syntax error in subseg cmap\n";
                $subsegcmap{$1}= $2;
            }
index 8ddf3cad14d65f4c685a7ee752afdbc95934b573..f25ec6defb10e3574f124e0e7e37ac3b2f21d92d 100755 (executable)
@@ -51,7 +51,7 @@ while (<>) {
     ($seg,$movfeat,$movconf)=($1,$2,$3);
     if (!length $seg) {
        printf("C /%s%s 0 0\n",
-              $seg, $movfeat, $movconf)
+              $movfeat, $movconf)
            or die $!;
        next;
     }