%%Page: (1) 1 %%BeginPageSetup /pagesave save def %%EndPageSetup iso1dict begin (Test Files) 35.25 water gsave llx lly 12 add translate /v 0 store /x0 x v get 4.431713 add sx cw mul add store /y0 y v get bfs th add sub store x0 y0 moveto 0 T (#!/usr/local/bin/perl) c n 0 T () S (eval) K ( ') p (exec perl -S $0 "$@") str (') p n 0 T () S 8 T () S (if) K ( $running_under_some_shell;) p n 0 T () N (5) # () S (# includeres: include resources in PostScript file) c n 0 T (#) N 0 T (# Copyright \(C\) Angus J. C. Duggan 1991-1995) N 0 T (# See file LICENSE for details.) N 0 T () N (10) # () S ($prog = \($0 =~ ) p (s) K (=.*/==\);) p n 0 T () N 0 T (%extn = \(") S (font) str (", ") p (.pfa) str (", ") p (file) str (", ") p (.ps) str (", ") p (procset) str (", ") p (.ps) str (", ) p (# resource extns) c n 0 T () S () p 8 T ( ") S (pattern) str (", ") p (.pat) str (", ") p (form) str (", ") p (.frm) str (", ") p (encoding) str (", ") p (.enc) str ("\);) p n 0 T (%type = \(") S (%%BeginFile:) str (", ") p (file) str (", ") p (%%BeginProcSet:) str (", ") p (procset) str (",) p n (15) # () S 8 T ( ") S (%%BeginFont:) str (", ") p (font) str ("\); ) p (# resource types) c n 0 T () N 0 T () S (=head1 NAME) C n 0 T () N 0 T ( foo - script which blah ) N (20) # () N 0 T (=cut) N 0 T () N 0 T () N 0 T () S (sub) K ( ) p (filename) L ( {) p 16 T () S 24 T () S 32 T () S (# make filename for resource in @_) c n (25) # () S ( ) p (local) K (\($name\);) p n 0 T ( ) S (foreach) K ( \(@_\) {) p 24 T () S 32 T () S (# sanitise name) c n 0 T () S ( ) p (s) K (/[!\(\)\\$\\#*&\\\\\\|\\`\\'\\"\\~\\{\\}\\[\\]\\<\\>\\?]//g;) p n 0 T ( $name .= $_;) N 0 T ( }) N (30) # ( $name =~ ) S (s) K (@.*/@@;) p 24 T () S 32 T () S (# drop directories) c n 0 T () S ( ) p (die) K ( ") p (Filename not found for resource ) str (", ) p (join) K (\(") p ( ) str (", @_\), ") p (\\n) str (") p n 0 T ( ) S (if) K ( $name =~ /^$/;) p n 0 T ( $name;) N 0 T (}) N (35) # () N 0 T () S (while) K ( \(<>\) {) p n 0 T ( ) S (if) K ( \(/^%%IncludeResource:/ || /^%%IncludeFont:/ || /^%%IncludeProcSet:/\) {) p n 0 T ( ) S (local) K (\($comment, @res\) = ) p (split) K (\(/\\s+/\);) p n 0 T ( ) S (local) K (\($type\) = ) p (defined) K (\($type{$comment}\) ? $type{$comment} : ) p (shift) K (\(@res\);) p n (40) # ( ) S (local) K (\($name\) = ) p (&filename) l (\(@res\);) p n 0 T ( ) S (local) K (\($inc\) = ") p (/inf/soft/infthes/demaille/include/psutils) str ("; ) p (# system include directory) c n 0 T () S ( ) p (if) K ( \() p (open) K (\(RES, $name\) || ) p (open) K (\(RES, ") p ($name$extn{$type}) str ("\) ||) p n 0 T () S 8 T ( ) S (open) K (\(RES, ") p ($inc/$name) str ("\) || ) p (open) K (\(RES, ") p ($inc/$name$extn{$type}) str ("\)\) {) p n 0 T () S 8 T ( ) S (while) K ( \(\) {) p n (45) # () S 8 T ( ) S (print) K ( $_;) p n 0 T () S 8 T ( }) N 0 T () S 8 T ( ) S (close) K (\(RES\);) p n 0 T ( } ) S (else) K ( {) p n 0 T () S 8 T ( ) S (print) K ( ") p (%%IncludeResource: ) str (", ) p (join) K (\(") p ( ) str (", $type, @res\), ") p (\\n) str (";) p n (50) # () S 8 T ( ) S (print) K ( STDERR ") p (Resource $name not found\\n) str (";) p n 0 T ( }) N 0 T ( } ) S (else) K ( {) p n 0 T ( ) S (print) K ( $_;) p n 0 T ( }) N (55) # (}) N 0 T () N 0 T () S (=head1 SEE ALSO) C n 0 T () N 0 T (blah blah. This is pod documentation.) N (60) # (blah blah) N (includeres) (right) (1) title border grestore (The room for the header) rhead (Printed by Somebody from a machine) (Right) (1) footer end % of iso1dict pagesave restore showpage %%Trailer end %%EOF