annotate lib-src/pstogif @ 390:c6012109f545 r21-2-10

Import from CVS: tag r21-2-10
author cvs
date Mon, 13 Aug 2007 11:10:03 +0200
parents 8626e4521993
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
371
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
1 : # -*-Perl-*-
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
2 eval 'exec perl -w -S $0 ${1+"$@"}' # Portability kludge
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
3 if 0;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
4 #
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
5 # pstogif.pl v1.0, July 1994, by Nikos Drakos <nikos@cbl.leeds.ac.uk>
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
6 # Computer Based Learning Unit, University of Leeds.
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
7 #
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
8 # Accompanies LaTeX2HTML Version 96.1
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
9 #
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
10 # Script to convert an arbitrary PostScript image to a cropped GIF image
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
11 # suitable for incorporation into HTML documents as inlined images to be
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
12 # viewed with WWW browsers.
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
13 #
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
14 # This is based on the pstoepsi script
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
15 # by Doug Crabill dgc@cs.purdue.edu
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
16 #
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
17 # Please note the following:
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
18 # - The source PostScript file must end
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
19 # in a .ps extention. This is a GhostScript requirement, not mine...
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
20 # - The -density argument has no effect unless the
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
21 # color depth (set with the -depth argument) is equal to 1.
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
22 # - Valid arguments for -depth are 1,8, or 24.
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
23 #
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
24 # This software is provided as is without any guarantee.
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
25 #
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
26 # Nikos Drakos (ND), nikos@cbl.leeds.ac.uk
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
27 # Computer Based Learning Unit, University of Leeds.
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
28 #
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
29 # 15 Jan 96 HS Call ppmquant only if needed. Fixed bug relative to
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
30 # V 95.3 .
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
31 #
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
32 # 15 Dec 95 HS (Herbert Swan <dprhws.edp.Arco.com> Added support for
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
33 # the flip=option. This allows images to be oriented differently
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
34 # in the paper versus the electronic media
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
35 #
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
36 # 1 Nov 95 jmn - modified for use with gs ppm driver - from jhrg's patches
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
37 # note that ppmtops.ps and ppmtops3.ps are no longer needed
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
38 #
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
39 # 20 JUL 94 ND Converted to Perl and made several changes eg it now accepts
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
40 # parameters from environment variables or from command line or will use
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
41 # default ones.
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
42 #
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
43 # 1 APR 94 ND Changed the suffixes of multi-page files from xbm to gif (oops!)
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
44 #
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
45 #
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
46
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
47 #####################################################################
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
48 $| =1;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
49 &read_args;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
50
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
51 ### You may need to specify some pathnames here if you want to
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
52 ### run the script without LaTeX2HTML
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
53
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
54 # Ghostscript
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
55 $GS= $ENV{'GS'} || 'gs';
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
56
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
57 # Comes with LaTeX2HTML (For ghostscript versions greater than 3.0
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
58 # you need the newer pstoppm.ps)
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
59 #$PSTOPPM= $ENV{'PSTOPPM'} ||
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
60 # 'pstoppm.ps';
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
61
380
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 371
diff changeset
62 # Available in the PBMPLUS library
371
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
63 $PNMCROP=$ENV{'PNMCROP'} || 'pnmcrop' ;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
64
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
65 # Also in PBMPLUS
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
66 $PNMFLIP=$ENV{'PNMFLIP'} || 'pnmflip' ;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
67
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
68 # Also in PBMPPLUS
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
69 $PPMTOGIF=$ENV{'PPMTOGIF'} || 'ppmtogif' ;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
70
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
71 # Also in PBMPPLUS
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
72 $REDUCE_COLOR=$ENV{'PPMQUANT'} || 'ppmquant 256' ;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
73
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
74 $OUTFILE = $ENV{'OUTFILE'} || $out;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
75
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
76 # Valid choices for $COLOR_DEPTH are 1, 8 or 24.
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
77 $DEPTH = $ENV{'DEPTH'} || $depth || 24;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
78
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
79 #Default density is 72
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
80 $DENSITY = $ENV{'DENSITY'} || $density || 72;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
81
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
82 # Valid choices are any numbers greater than zero
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
83 # Useful choices are numbers between 0.1 - 5
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
84 # Large numbers may generate very large intermediate files
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
85 # and will take longer to process
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
86 $SCALE = $ENV{'SCALE'} || $scale; # No default value
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
87
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
88 $PAPERSIZE = $ENV{'PAPERSIZE'} || $papersize; # No default value;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
89
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
90 $DEBUG = $ENV{'DEBUG'} || $DEBUG || 0;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
91
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
92 ######################################################################
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
93
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
94 &main;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
95
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
96 sub read_args {
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
97 local($_);
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
98 local($color);
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
99 while ($ARGV[0] =~ /^-/) {
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
100 $_ = shift @ARGV;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
101 if (/^-h(elp)?$/) {
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
102 &usage; exit}
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
103 elsif (/^-out$/) {
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
104 $out = shift @ARGV;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
105 }
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
106 elsif (/^-(.*)$/) {
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
107 eval "\$$1 = shift \@ARGV"; # Create and set a flag $<name>
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
108 }
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
109 }
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
110 }
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
111
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
112 sub main {
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
113 local($base, $outfile, $i, $j);
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
114 $base = &test_args;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
115 $outfile = $OUTFILE || "$base.gif";
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
116 open(STDERR, ">/dev/null") unless $DEBUG;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
117 &convert($base);
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
118 if (-f "$base.ppm") {
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
119 &crop_scale_etc("$base.ppm", $outfile);
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
120 }
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
121 else {
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
122 foreach $i (<$base.[1-9]*ppm>) {
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
123 $j = $i;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
124 $j =~ s/\.(.*)ppm/$1.gif/;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
125 &crop_scale_etc($i, $j)}
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
126 }
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
127 &cleanup($base);
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
128 }
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
129
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
130 sub crop_scale_etc {
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
131 local($in, $out) = @_;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
132 local($tmp) = $in . ".tmp";
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
133 open(STDERR, ">/dev/null") unless $DEBUG;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
134
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
135 if ($flip) {
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
136 rename($tmp, $in) unless system("$PNMFLIP -$flip $in > $tmp");
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
137 }
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
138 system("$PNMCROP $in > $tmp");
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
139
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
140 if (system("$PPMTOGIF $tmp > $out")) {
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
141 print "Running ppmquant for $out\n";
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
142 system("$REDUCE_COLOR < $tmp|$PPMTOGIF - > $out");
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
143 }
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
144 unlink $tmp;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
145 print "Writing $out\n";
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
146 }
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
147
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
148 sub test_args {
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
149 local($file) = $ARGV[0];
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
150 if (! ($file =~ s/\.ps$//)) {
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
151 print "The name of the input file must end in '.ps'\n";
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
152 exit}
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
153 elsif (! ( -f "$file.ps")) {
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
154 print "Cannot find file $file.ps\n.";
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
155 exit}
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
156 elsif (! ($DEPTH =~ /^(1|8|24)$/)) {
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
157 print "The color depth must be 1 or 8 or 24. You specified $DEPTH\n";
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
158 exit
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
159 }
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
160 if (defined $SCALE) {
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
161 if ($SCALE > 0) {
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
162 $DENSITY = int($SCALE * $DENSITY)}
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
163 else {
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
164 print "Error: The scale must be greater than 0.\n" .
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
165 "You specified $SCALE\n";
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
166 exit}
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
167 }
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
168 $file;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
169 }
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
170
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
171 sub convert {
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
172 local($base) = @_;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
173 local($paperopt) = "-sPAPERSIZE=$PAPERSIZE" if $PAPERSIZE;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
174 local($ppmtype) = join('', "ppm",$DEPTH,"run");
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
175 local($density) = "-r$DENSITY" if ($DENSITY != 72);
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
176 open (GS, "|$GS -q -dNOPAUSE -dNO_PAUSE -sDEVICE=ppmraw $density -sOutputFile=$base.ppm $paperopt $base.ps");
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
177 close GS;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
178 }
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
179
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
180 sub cleanup {
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
181 local($base) = @_;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
182 unlink <$base[0-9.]*ppm>;
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
183 }
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
184
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
185 sub usage {
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
186 print "Usage: pstogif [-h(elp)] [-out <output file>] [-depth <color depth 1, 8 or 24>] [-flip <Flip_code>] [-density <pixel density>] <file>.ps\n\n";
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
187 }
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
188
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents:
diff changeset
189