From 82b79c281ce9a23de048126c36466ef4017133a884e2900eba8bd4572449f1f0 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 7 May 2018 10:32:51 +0000 Subject: [PATCH] Update to fig2dev-3.2.7a OBS-URL: https://build.opensuse.org/package/show/Publishing/transfig?expand=0&rev=47 --- fig2dev-3.2.6-fig2mpdf-doc.patch | 34 +- fig2dev-3.2.6-fig2mpdf.patch | 151 +-- fig2dev-3.2.6-genps_oldpatterns.patch | 1623 ------------------------- fig2dev-3.2.6a-RGBFILE.patch | 13 +- fig2dev-3.2.6a-input-sanitizing.patch | 41 - fig2dev-3.2.6a-style-overflow.patch | 47 - fig2dev-3.2.6a.tar.xz | 3 - fig2dev-3.2.7a.tar.xz | 3 + transfig-3.2.6.dif | 128 +- transfig-fix-afl.patch | 73 +- transfig.3.2.5d-mediaboxrealnb.dif | 21 +- transfig.changes | 56 + transfig.spec | 8 +- 13 files changed, 261 insertions(+), 1940 deletions(-) delete mode 100644 fig2dev-3.2.6-genps_oldpatterns.patch delete mode 100644 fig2dev-3.2.6a-input-sanitizing.patch delete mode 100644 fig2dev-3.2.6a-style-overflow.patch delete mode 100644 fig2dev-3.2.6a.tar.xz create mode 100644 fig2dev-3.2.7a.tar.xz diff --git a/fig2dev-3.2.6-fig2mpdf-doc.patch b/fig2dev-3.2.6-fig2mpdf-doc.patch index 5aeaa94..fd8b2b5 100644 --- a/fig2dev-3.2.6-fig2mpdf-doc.patch +++ b/fig2dev-3.2.6-fig2mpdf-doc.patch @@ -13,7 +13,7 @@ Description: fig2mpdf 1.2 documentation + pdflatex sample-presentation + +clean: -+ rm -f overlay-sample-?.pdf ++ rm -f overlay-sample-?.pdf + rm -f *.aux *.log *.nav *.out *.snm *.toc sample-presentation.pdf --- /dev/null +++ b/fig2mpdf/doc/XFig-LaTeX-together.jpg.uue @@ -1874,12 +1874,12 @@ Description: fig2mpdf 1.2 documentation +a.hmenulink:link, a.hmenulink:visited +{ + display: block; -+ color: white; background-color: #d92819; ++ color: white; background-color: #d92819; + width: 130px; line-height: 20px; font-size: 11px; -+ margin-left: 0px; margin-right: 0px; margin-bottom: 0px; margin-top: 0px; ++ margin-left: 0px; margin-right: 0px; margin-bottom: 0px; margin-top: 0px; + font-style: normal; -+ -+ text-align: center; ++ ++ text-align: center; +} +a.hmenulink:link:hover, a.hmenulink:visited:hover +{ @@ -1908,13 +1908,13 @@ Description: fig2mpdf 1.2 documentation +/* border: thin dashed black;*/ + color: #ffffff; + background-color: #ae1e12; -+ font-size: 8pt; ++ font-size: 8pt; + margin-left: 5px; +} + + +div#tmain { -+ font-size: 10pt; ++ font-size: 10pt; + text-align: justify; + font-family: arial,helvetica,sans-serif; +} @@ -1940,7 +1940,7 @@ Description: fig2mpdf 1.2 documentation + color: #000000; + text-align: justify; + font-family: arial,helvetica,sans-serif; -+ padding: 1px; ++ padding: 1px; + margin-left: 15px; +} + @@ -1953,7 +1953,7 @@ Description: fig2mpdf 1.2 documentation +#sidebar { + color: #ffffff; + background-color: #ae1e12; -+ font-size: 8pt; ++ font-size: 8pt; + margin-left: 0px; +/* min-height: 625px*/ +} @@ -2098,7 +2098,7 @@ Description: fig2mpdf 1.2 documentation + + +

-+ ++ + +

Overlay techniques for presentations with xfig

+ @@ -2106,13 +2106,13 @@ Description: fig2mpdf 1.2 documentation +it's really common to do beamer presentations instead of using the good +old foil hardware. In contrast to PowerPoint presentations you can run +PDF presentations, probably created with the beamer package and -+pdflatex, on nearly every computer of the world. ++pdflatex, on nearly every computer of the world. +

+ +

With beamer presentations you can insert effects for example +to lead the attention to a specific part of an figure e.g. if you are +presenting a system in your figure and you are just talking about a -+part of this system. ++part of this system. + +The pdflatex-beamer user has +to produce a set of figures who are overlayed step by step by using @@ -2136,7 +2136,7 @@ Description: fig2mpdf 1.2 documentation + + +

-+ ++ + + + @@ -3196,7 +3196,7 @@ Description: fig2mpdf 1.2 documentation +Landscape +Center +Metric -+A4 ++A4 +100.00 +Single +-2 @@ -4744,7 +4744,7 @@ Description: fig2mpdf 1.2 documentation + pdfkeywords={multiinclude, figures, fig2mpdf, multilayer, graphics}, + colorlinks, + linkcolor=black, -+ urlcolor=black, ++ urlcolor=black, + citecolor=black, + pdfpagemode={None}, % only text is shown + pdfstartview={FitH}, % View->FinInWindow @@ -4771,8 +4771,8 @@ Description: fig2mpdf 1.2 documentation + \item<+-|alert@+> Normal working in state A + \item<+-|alert@+> An alarm occured (e.g. temperature too high) + \item<+-|alert@+> Alarm behavour executed in State B -+ \item<+-|alert@+> Got all clear signal -+ \item<+-> Returned back to normal working state ++ \item<+-|alert@+> Got all clear signal ++ \item<+-> Returned back to normal working state + \end{itemize} + \end{column} +\end{columns} diff --git a/fig2dev-3.2.6-fig2mpdf.patch b/fig2dev-3.2.6-fig2mpdf.patch index 8940f12..ea3eebc 100644 --- a/fig2dev-3.2.6-fig2mpdf.patch +++ b/fig2dev-3.2.6-fig2mpdf.patch @@ -3,27 +3,35 @@ Description: creating multilayered or singlelayer PDF or EPS figures for including into LaTeX documents. Origin: http://p3f.gmxhome.de/fig2mpdf/fig2mpdf.html +--- + fig2dev/dev/genpstex.c | 331 ++++++++++++++++++++++++ + fig2dev/drivers.h | 4 + fig2dev/fig2dev.c | 23 + + fig2mpdf/copyright.txt | 25 + + fig2mpdf/fig2mpdf | 653 +++++++++++++++++++++++++++++++++++++++++++++++++ + fig2mpdf/fig2mpdf.1 | 208 +++++++++++++++ + man/fig2dev.1.in | 69 +++++ + 7 files changed, 1311 insertions(+), 2 deletions(-) - - - - - -diff --git a/fig2dev-3.2.6a/fig2dev/dev/genpstex.c b/fig2dev-3.2.6a/fig2dev/dev/genpstex.c --- a/fig2dev-3.2.6a/fig2dev/dev/genpstex.c -+++ b/fig2dev-3.2.6a/fig2dev/dev/genpstex.c -@@ -49,6 +49,7 @@ ++++ b/fig2dev-3.2.6a/fig2dev/dev/genpstex.c 2018-05-07 10:01:03.485164209 +0000 +@@ -48,9 +48,12 @@ + #include + #include + #include ++#include #include "fig2dev.h" #include "object.h" /* does #include */ +#include "texfonts.h" ++#include "setfigfont.h" extern double rad2deg; -@@ -76,7 +77,307 @@ extern int genpdf_end(void); /* genpdf - extern void genps_grid(float major, float minor); +@@ -79,6 +82,308 @@ extern void genps_grid(float major, floa static char pstex_file[1000] = ""; + +static int iObjectsRead = 0; +static int iTextRead = 0; +static int iObjectsFileNumber = 0; @@ -37,7 +45,7 @@ diff --git a/fig2dev-3.2.6a/fig2dev/dev/genpstex.c b/fig2dev-3.2.6a/fig2dev/dev/ +#ifdef never +static double unitlength; +static double dash_mag = 1.0; -+ ++ +static int (*translate_coordinates)() = NULL; +static int (*translate_coordinates_d)() = NULL; +#else @@ -59,7 +67,7 @@ diff --git a/fig2dev-3.2.6a/fig2dev/dev/genpstex.c b/fig2dev-3.2.6a/fig2dev/dev/ + +/************************************************************************* + *************************************************************************/ -+static ++static int +translate2(xp, yp) + int *xp, *yp; +{ @@ -67,7 +75,7 @@ diff --git a/fig2dev-3.2.6a/fig2dev/dev/genpstex.c b/fig2dev-3.2.6a/fig2dev/dev/ + *yp = (double)(TOP - *yp -1); + } + -+static ++static int +translate1_d(xp, yp) + double *xp, *yp; +{ @@ -75,7 +83,7 @@ diff --git a/fig2dev-3.2.6a/fig2dev/dev/genpstex.c b/fig2dev-3.2.6a/fig2dev/dev/ + *yp = *yp + 1.0; + } + -+static ++static int +translate2_d(xp, yp) + double *xp, *yp; +{ @@ -85,8 +93,8 @@ diff --git a/fig2dev-3.2.6a/fig2dev/dev/genpstex.c b/fig2dev-3.2.6a/fig2dev/dev/ + +/************************************************************************* + *************************************************************************/ -+void genpstex_p_option(opt, optarg) -+char opt, *optarg; ++void ++genpstex_p_option(char opt, char *optarg) +{ + if (opt == 'p') + { @@ -125,7 +133,7 @@ diff --git a/fig2dev-3.2.6a/fig2dev/dev/genpstex.c b/fig2dev-3.2.6a/fig2dev/dev/ + } + fstat(fileno(ptCreateFile), & tStat); + fchmod (fileno(ptCreateFile), tStat.st_mode | ((tStat.st_mode & (S_IRUSR | S_IRGRP | S_IROTH)) >> 2)); -+ fprintf(ptCreateFile, "#!/bin/bash\n\n", szFileName); ++ fprintf(ptCreateFile, "#!/bin/bash\n\n"); + + fprintf(ptCreateFile, "while getopts \"r\" Option\n"); + fprintf(ptCreateFile, "do\n"); @@ -208,7 +216,7 @@ diff --git a/fig2dev-3.2.6a/fig2dev/dev/genpstex.c b/fig2dev-3.2.6a/fig2dev/dev/ + /* all ok */ + return 0; +} - ++ + +/************************************************************************* + *************************************************************************/ @@ -226,8 +234,8 @@ diff --git a/fig2dev-3.2.6a/fig2dev/dev/genpstex.c b/fig2dev-3.2.6a/fig2dev/dev/ + fprintf(ptCreateFile, "if [ \"$iOptRemove\" == \"\" ]; then\n"); + if (iPdfOutputs) + { -+ fprintf(ptCreateFile, " %s -L pstex -D +%d:%d %s", prog, depth, iStartDepth, from, szFileName); -+ fprintf(ptCreateFile, " | epstopdf -f > %s.pdf\n", szFileName, szFileName); ++ fprintf(ptCreateFile, " %s -L pstex -D +%d:%d %s", prog, depth, iStartDepth, from); ++ fprintf(ptCreateFile, " | epstopdf -f > %s.pdf\n", szFileName); + } + else + fprintf(ptCreateFile, "%s -L pstex -D +%d:%d %s %s.eps\n", prog, depth, iStartDepth, from, szFileName); @@ -325,17 +333,18 @@ diff --git a/fig2dev-3.2.6a/fig2dev/dev/genpstex.c b/fig2dev-3.2.6a/fig2dev/dev/ + +/************************************************************************* + *************************************************************************/ ++ void genpstex_t_option(char opt, char *optarg) { -@@ -130,6 +431,32 @@ genpstex_option(char opt, char *optarg) +@@ -132,6 +437,32 @@ genpstex_option(char opt, char *optarg) genlatex_option(opt, optarg); } +struct driver dev_pstex_p = { -+ genpstex_p_option, ++ genpstex_p_option, + genpstex_p_start, -+ gendev_null, ++ (void(*)(float,float))gendev_null, + genpstex_p_arc, + genpstex_p_ellipse, + genpstex_p_line, @@ -346,9 +355,9 @@ diff --git a/fig2dev-3.2.6a/fig2dev/dev/genpstex.c b/fig2dev-3.2.6a/fig2dev/dev/ +}; + +struct driver dev_pdftex_p = { -+ genpstex_p_option, ++ genpstex_p_option, + genpdftex_p_start, -+ gendev_null, ++ (void(*)(float,float))gendev_null, + genpstex_p_arc, + genpstex_p_ellipse, + genpstex_p_line, @@ -361,10 +370,9 @@ diff --git a/fig2dev-3.2.6a/fig2dev/dev/genpstex.c b/fig2dev-3.2.6a/fig2dev/dev/ struct driver dev_pstex_t = { genpstex_t_option, genpstex_t_start, -diff --git a/fig2dev-3.2.6a/fig2dev/drivers.h b/fig2dev-3.2.6a/fig2dev/drivers.h --- a/fig2dev-3.2.6a/fig2dev/drivers.h -+++ b/fig2dev-3.2.6a/fig2dev/drivers.h -@@ -32,8 +32,10 @@ extern struct driver dev_eps; ++++ b/fig2dev-3.2.6a/fig2dev/drivers.h 2018-05-07 10:00:19.621980757 +0000 +@@ -33,8 +33,10 @@ extern struct driver dev_eps; extern struct driver dev_pdf; extern struct driver dev_pdftex; extern struct driver dev_pdftex_t; @@ -391,29 +399,33 @@ diff --git a/fig2dev-3.2.6a/fig2dev/drivers.h b/fig2dev-3.2.6a/fig2dev/drivers.h {"pstricks", &dev_pstricks}, {"ptk", &dev_ptk}, {"shape", &dev_shape}, -diff --git a/fig2dev-3.2.6a/fig2dev/fig2dev.c b/fig2dev-3.2.6a/fig2dev/fig2dev.c --- a/fig2dev-3.2.6a/fig2dev/fig2dev.c -+++ b/fig2dev-3.2.6a/fig2dev/fig2dev.c -@@ -691,6 +691,18 @@ help_msg(void) - #endif /* NFSS */ - puts(" -p name name of the PostScript file to be overlaid"); ++++ b/fig2dev-3.2.6a/fig2dev/fig2dev.c 2018-05-07 10:00:19.621980757 +0000 +@@ -823,6 +823,23 @@ help_msg(void) + ); + } -+ puts("PSTEX_P and PDFTEX_P Options:\n"); -+ puts(" -p name basename of the files to be created\n"); ++ if (dev == NULL || !strcmp(lang, "pstex_p") || ++ !strcmp(lang, "pdftex_p")) { ++ puts( ++"PSTEX_P and PDFTEX_P Options:\n" ++" -p name basename of the files to be created\n" +#ifdef NFSS -+ puts(" -F don't set font family/series/shape, so you can"); -+ puts(" set it from latex"); ++" -F don't set font family/series/shape, so you can\n" ++" set it from latex\n" +#endif /* NFSS */ -+ puts(" -d dmag set separate magnification for length of line dashes to dmag\n"); -+ puts(" -E num set encoding for text translation (0 = no translation,"); -+ puts(" 1 = ISO-8859-1, 2 = ISO-8859-2)"); -+ puts(" -l lwidth set threshold between thin and thick lines to lwidth\n"); -+ puts(" -v verbose mode\n"); ++" -d dmag set separate magnification for length of line dashes to dmag\n" ++" -E num set encoding for text translation (0 no translation,\n" ++" 1 ISO-8859-1, 2 ISO-8859-2)\n" ++" -l lwidth set threshold between thin and thick lines to lwidth\n" ++" -v verbose mode\n" ++ ); ++ } + - puts("SHAPE (ShapePar driver) Options:"); - puts(" -n name Set basename of the macro"); - puts(" (e.g. \"face\" gives faceshape and facepar)"); -@@ -830,6 +842,12 @@ gendev_objects(F_compound *objects, stru + if (dev == NULL || !strcmp(lang, "shape")) { + puts( + "SHAPE (ShapePar driver) Options:\n" +@@ -1008,6 +1025,12 @@ gendev_objects(F_compound *objects, stru int rec_comp(struct obj_rec *r1, struct obj_rec *r2) { @@ -426,9 +438,8 @@ diff --git a/fig2dev-3.2.6a/fig2dev/fig2dev.c b/fig2dev-3.2.6a/fig2dev/fig2dev.c return (r2->depth - r1->depth); } -diff --git a/fig2dev-3.2.6a/fig2mpdf/copyright.txt b/fig2dev-3.2.6a/fig2mpdf/copyright.txt --- a/fig2dev-3.2.6a/fig2mpdf/copyright.txt -+++ b/fig2dev-3.2.6a/fig2mpdf/copyright.txt ++++ b/fig2dev-3.2.6a/fig2mpdf/copyright.txt 2018-05-07 10:00:19.625980684 +0000 @@ -0,0 +1,25 @@ +The following files contain copyright and license info for +the code they contain: @@ -455,9 +466,8 @@ diff --git a/fig2dev-3.2.6a/fig2mpdf/copyright.txt b/fig2dev-3.2.6a/fig2mpdf/cop + + (Author's note: the license is in the file gpl.txt, which is included + in the archive.) -diff --git a/fig2dev-3.2.6a/fig2mpdf/fig2mpdf.1 b/fig2dev-3.2.6a/fig2mpdf/fig2mpdf.1 --- a/fig2dev-3.2.6a/fig2mpdf/fig2mpdf.1 -+++ b/fig2dev-3.2.6a/fig2mpdf/fig2mpdf.1 ++++ b/fig2dev-3.2.6a/fig2mpdf/fig2mpdf.1 2018-05-07 10:00:19.625980684 +0000 @@ -0,0 +1,208 @@ +.TH fig2mpdf 1 "Jun 2006" "" "Including xfig figures into LaTeX documents" +.SH NAME @@ -667,9 +677,8 @@ diff --git a/fig2dev-3.2.6a/fig2mpdf/fig2mpdf.1 b/fig2dev-3.2.6a/fig2mpdf/fig2mp +.IR pdflatex(1) +.IR latex(1) +.IR dvips(1) -diff --git a/fig2dev-3.2.6a/fig2mpdf/fig2mpdf b/fig2dev-3.2.6a/fig2mpdf/fig2mpdf --- a/fig2dev-3.2.6a/fig2mpdf/fig2mpdf -+++ b/fig2dev-3.2.6a/fig2mpdf/fig2mpdf ++++ b/fig2dev-3.2.6a/fig2mpdf/fig2mpdf 2018-05-07 10:00:19.625980684 +0000 @@ -0,0 +1,653 @@ +#!/bin/sh + @@ -1324,23 +1333,22 @@ diff --git a/fig2dev-3.2.6a/fig2mpdf/fig2mpdf b/fig2dev-3.2.6a/fig2mpdf/fig2mpdf +} +' -- $* + -diff --git a/fig2dev-3.2.6a/man/fig2dev.1.in b/fig2dev-3.2.6a/man/fig2dev.1.in --- a/fig2dev-3.2.6a/man/fig2dev.1.in -+++ b/fig2dev-3.2.6a/man/fig2dev.1.in ++++ b/fig2dev-3.2.6a/man/fig2dev.1.in 2018-05-07 10:15:07.453476364 +0000 @@ -64,8 +64,8 @@ Set the output graphics language. Valid languages are \fBbox, cgm, dxf, epic, eepic, eepicemu, emf, eps, gbx (Gerber beta driver), gif, ibmgl, jpeg, latex, map (HTML image map), mf (MetaFont), --mp (MetaPost), mmp (Multi-MetaPost), pcx, pdf, pdftex, pdftex_t, pic, +-mp (MetaPost), pcx, pdf, pdftex, pdftex_t, pic, -pict2e, pictex, png, ppm, ps, pstex, pstex_t, pstricks, ptk (Perl/tk), -+mp (MetaPost), mmp (Multi-MetaPost), pcx, pdf, pdftex, pdftex_t, pdftex_p, pic, ++mp (MetaPost), pcx, pdf, pdftex, pdftex_t, pdftex_p, pic, +pict2e, pictex, png, ppm, ps, pstex, pstex_t, pstex_p, pstricks, ptk (Perl/tk), - shape (LaTeX shaped paragraphs), sld (AutoCad slide format), svg (beta - driver), textyl, tiff, tikz, tk (tcl/tk), tpic, xbm and xpm\fR. + shape (LaTeX shaped paragraphs), sld (AutoCad slide format), svg, + textyl, tiff, tikz, tk (tcl/tk), tpic, xbm and xpm\fR. -@@ -1149,6 +1149,61 @@ PostScript file generated using - .B pstex. - (see above) +@@ -1165,6 +1165,61 @@ text flagged as "TeX Text". + The pstex and pdftex drivers accept the same options that the EPS driver + accepts. +.SH PSTEX_P and PDFTEX_P OPTIONS +The \fBpstex_p\fR language has the same intention as @@ -1398,23 +1406,22 @@ diff --git a/fig2dev-3.2.6a/man/fig2dev.1.in b/fig2dev-3.2.6a/man/fig2dev.1.in +document (like "\fB\\sfshape \\input picture.eepic\fR"). + .TP - .B \-E num - Set encoding for latex text translation -@@ -1542,6 +1597,13 @@ which aren't scaled at all. - .PP - Rotated text is only supported in the IBM-GL (HP/GL) and PostScript (including eps) - languages. -+.PP + .B \-n name + Set the Title part of the PostScript output to +@@ -1588,6 +1643,12 @@ The string \fIfont\fR can be one of + + + .SH BUGS and RESTRICTIONS +In \fBpdftex_p\fR language \fIfig2dev\fR can not determine the exact sizes of +the special texts set by pdflatex afterwards. If these texts are bigger than +expected the calculated bounding box might be too small so that some texts passes +over the figure boundaries. If this happen you have to put an invisible +rectangle (line width 0) around the text or the entire figure. -+ - .SH COPYRIGHT - Copyright (c) 1991 Micah Beck ++.PP + Please send bug reports, fixes, new features etc. to: .br -@@ -1624,3 +1686,7 @@ Michael Schrick (m_schrick@hotmail.com) + \&@PACKAGE_BUGREPORT@ +@@ -1677,3 +1738,7 @@ Michael Schrick (m_schrick@hotmail.com) The GBX (Gerber) driver was written by .br Edward Grace (ej.grace@imperial.ac.uk). diff --git a/fig2dev-3.2.6-genps_oldpatterns.patch b/fig2dev-3.2.6-genps_oldpatterns.patch deleted file mode 100644 index 77aee48..0000000 --- a/fig2dev-3.2.6-genps_oldpatterns.patch +++ /dev/null @@ -1,1623 +0,0 @@ -Author: Roland Rosenfeld -Description: Reinvent the old genps.oldpatterns.[ch] (removed from 3.2.5a), - because the new version does not write the patterns correctly into PS and EPS - files (Bug #348034). -Bug-Debian: http://bugs.debian.org/348034 - - - - - -diff --git a/fig2dev-3.2.6a/fig2dev/dev/genps.c b/fig2dev-3.2.6a/fig2dev/dev/genps.c ---- a/fig2dev-3.2.6a/fig2dev/dev/genps.c -+++ b/fig2dev-3.2.6a/fig2dev/dev/genps.c -@@ -140,7 +140,6 @@ static void convert_xpm_colors(unsigned - static void genps_itp_spline(F_spline *s); - static void genps_ctl_spline(F_spline *s); - --static int removestr(char *buf, char *str, int *len); - #define SHADEVAL(F) 1.0*(F)/(NUMSHADES-1) - #define TINTVAL(F) 1.0*(F-NUMSHADES+1)/NUMTINTS - -@@ -204,6 +203,31 @@ char *fill_def[NUMPATTERNS] = { - FILL_PAT21,FILL_PAT22, - }; - -+int patmat[NUMPATTERNS][2] = { -+ {16, -8}, -+ {16, -8}, -+ {16, -8}, -+ {16, -16}, -+ {16, -16}, -+ {16, -16}, -+ {16, 16}, -+ {16, -16}, -+ {16, -8}, -+ { 8, -16}, -+ {16, -16}, -+ {24, -24}, -+ {24, -24}, -+ {24, -24}, -+ {24, -24}, -+ {16, -8}, -+ { 8, -8}, -+ {16, -16}, -+ {30, -18}, -+ {16, -16}, -+ {16, -8}, -+ { 8, -16}, -+ }; -+ - static double scalex, scaley; - static double origx, origy; - static double userorigx, userorigy; -@@ -786,6 +810,10 @@ genps_start(F_compound *objects) - /* (rotation and y flipping is done in %%BeginPageSetup area */ - if (pats_used) { - int i; -+ fprintf(tfp, "\n%s%s%s", FILL_PROLOG1,FILL_PROLOG2,FILL_PROLOG3); -+ fprintf(tfp, "\n%s%s%s", FILL_PROLOG4,FILL_PROLOG5,FILL_PROLOG6); -+ fprintf(tfp, "\n%s%s%s", FILL_PROLOG7,FILL_PROLOG8,FILL_PROLOG9); -+ fprintf(tfp, "\n%s%s", FILL_PROLOG10,FILL_PROLOG11); - /* only define the patterns that are used */ - for (i=0; i 0) { -- /* remove any %EOF or %%EOF in file */ -- while (removestr(buf,"\n%EOF\n",&len) != 0) -- ; -- while (removestr(buf,"\n%%EOF\n",&len) != 0) -- ; - write(fileno(tfp),buf,len); - } - close_picfile(picf,filtype); -@@ -2422,27 +2423,22 @@ fill_area(int fill, int pen_color, int f - else { - /* one of the patterns */ - int patnum = fill-NUMSHADES-NUMTINTS+1; -- char colorspace[13], pencolor[25], fillcolor[25]; - - if (grayonly) { - float grayfill, graypen; - grayfill = rgb2luminance(fill_r, fill_g, fill_b); - graypen = rgb2luminance(pen_r, pen_g, pen_b); -- sprintf(colorspace, "/DeviceGray"); -- sprintf(fillcolor, "%.2f", grayfill); -- sprintf(pencolor, "%.2f", graypen); -+ fprintf(tfp, "gs /PC [[%.2f %.2f %.2f] [%.2f %.2f %.2f]] def\n", -+ grayfill, grayfill, grayfill, graypen, graypen, graypen); - } else { -- sprintf(colorspace, "/DeviceRGB"); -- sprintf(fillcolor, "%.2f %.2f %.2f", fill_r, fill_g, fill_b); -- sprintf(pencolor, "%.2f %.2f %.2f", pen_r, pen_g, pen_b); -+ fprintf(tfp, "gs /PC [[%.2f %.2f %.2f] [%.2f %.2f %.2f]] def\n", -+ fill_r, fill_g, fill_b, pen_r, pen_g, pen_b); - } - -- fprintf(tfp, "\n%% Fill with pattern background color\n"); -- fprintf(tfp, "gs %s setcolorspace %s setcolor fill gr\n", -- colorspace, fillcolor); -- fprintf(tfp, "\n%% Fill with pattern pen color\n"); -- fprintf(tfp, "gs %s setcolorspace %s P%d setpattern fill gr\n\n", -- colorspace, pencolor, patnum); -+ fprintf(tfp, "%.2f %.2f sc P%d [%d 0 0 %d %.2f %.2f] PATmp PATsp ef gr PATusp ", -+ THICK_SCALE, THICK_SCALE, patnum, -+ patmat[patnum-1][0],patmat[patnum-1][1], -+ (float)ulx/THICK_SCALE, (float)uly/THICK_SCALE); - } - } - -diff --git a/fig2dev-3.2.6a/fig2dev/dev/psprolog.h b/fig2dev-3.2.6a/fig2dev/dev/psprolog.h ---- a/fig2dev-3.2.6a/fig2dev/dev/psprolog.h -+++ b/fig2dev-3.2.6a/fig2dev/dev/psprolog.h -@@ -39,553 +39,1003 @@ $F2psDict /mtrx matrix put\n\ - 4 -2 roll mul srgb} bind def\n\ - " - -+ -+#define FILL_PROLOG1 "\ -+% This junk string is used by the show operators\n\ -+/PATsstr 1 string def\n\ -+/PATawidthshow { % cx cy cchar rx ry string\n\ -+ % Loop over each character in the string\n\ -+ { % cx cy cchar rx ry char\n\ -+ % Show the character\n\ -+ dup % cx cy cchar rx ry char char\n\ -+ PATsstr dup 0 4 -1 roll put % cx cy cchar rx ry char (char)\n\ -+ false charpath % cx cy cchar rx ry char\n\ -+ /clip load PATdraw\n\ -+ % Move past the character (charpath modified the\n\ -+ % current point)\n\ -+ currentpoint % cx cy cchar rx ry char x y\n\ -+ newpath\n\ -+ moveto % cx cy cchar rx ry char\n\ -+ % Reposition by cx,cy if the character in the string is cchar\n\ -+ 3 index eq { % cx cy cchar rx ry\n\ -+ 4 index 4 index rmoveto\n\ -+ } if\n\ -+ % Reposition all characters by rx ry\n\ -+ 2 copy rmoveto % cx cy cchar rx ry\n\ -+ } forall\n\ -+ pop pop pop pop pop % -\n\ -+ currentpoint\n\ -+ newpath\n\ -+ moveto\n\ -+} bind def\n\ -+" -+#define FILL_PROLOG2 "\ -+/PATcg {\n\ -+ 7 dict dup begin\n\ -+ /lw currentlinewidth def\n\ -+ /lc currentlinecap def\n\ -+ /lj currentlinejoin def\n\ -+ /ml currentmiterlimit def\n\ -+ /ds [ currentdash ] def\n\ -+ /cc [ currentrgbcolor ] def\n\ -+ /cm matrix currentmatrix def\n\ -+ end\n\ -+} bind def\n\ -+% PATdraw - calculates the boundaries of the object and\n\ -+% fills it with the current pattern\n\ -+/PATdraw { % proc\n\ -+ save exch\n\ -+ PATpcalc % proc nw nh px py\n\ -+ 5 -1 roll exec % nw nh px py\n\ -+ newpath\n\ -+ PATfill % -\n\ -+ restore\n\ -+} bind def\n\ -+" -+#define FILL_PROLOG3 "\ -+% PATfill - performs the tiling for the shape\n\ -+/PATfill { % nw nh px py PATfill -\n\ -+ PATDict /CurrentPattern get dup begin\n\ -+ setfont\n\ -+ % Set the coordinate system to Pattern Space\n\ -+ PatternGState PATsg\n\ -+ % Set the color for uncolored pattezns\n\ -+ PaintType 2 eq { PATDict /PColor get PATsc } if\n\ -+ % Create the string for showing\n\ -+ 3 index string % nw nh px py str\n\ -+ % Loop for each of the pattern sources\n\ -+ 0 1 Multi 1 sub { % nw nh px py str source\n\ -+ % Move to the starting location\n\ -+ 3 index 3 index % nw nh px py str source px py\n\ -+ moveto % nw nh px py str source\n\ -+ % For multiple sources, set the appropriate color\n\ -+ Multi 1 ne { dup PC exch get PATsc } if\n\ -+ % Set the appropriate string for the source\n\ -+ 0 1 7 index 1 sub { 2 index exch 2 index put } for pop\n\ -+ % Loop over the number of vertical cells\n\ -+ 3 index % nw nh px py str nh\n\ -+ { % nw nh px py str\n\ -+ currentpoint % nw nh px py str cx cy\n\ -+ 2 index oldshow % nw nh px py str cx cy\n\ -+ YStep add moveto % nw nh px py str\n\ -+ } repeat % nw nh px py str\n\ -+ } for\n\ -+ 5 { pop } repeat\n\ -+ end\n\ -+} bind def\n\ -+" -+#define FILL_PROLOG4 "\ -+% PATkshow - kshow with the current pattezn\n\ -+/PATkshow { % proc string\n\ -+ exch bind % string proc\n\ -+ 1 index 0 get % string proc char\n\ -+ % Loop over all but the last character in the string\n\ -+ 0 1 4 index length 2 sub {\n\ -+ % string proc char idx\n\ -+ % Find the n+1th character in the string\n\ -+ 3 index exch 1 add get % string proc char char+1\n\ -+ exch 2 copy % strinq proc char+1 char char+1 char\n\ -+ % Now show the nth character\n\ -+ PATsstr dup 0 4 -1 roll put % string proc chr+1 chr chr+1 (chr)\n\ -+ false charpath % string proc char+1 char char+1\n\ -+ /clip load PATdraw\n\ -+ % Move past the character (charpath modified the current point)\n\ -+ currentpoint newpath moveto\n\ -+ % Execute the user proc (should consume char and char+1)\n\ -+ mark 3 1 roll % string proc char+1 mark char char+1\n\ -+ 4 index exec % string proc char+1 mark...\n\ -+ cleartomark % string proc char+1\n\ -+ } for\n\ -+ % Now display the last character\n\ -+ PATsstr dup 0 4 -1 roll put % string proc (char+1)\n\ -+ false charpath % string proc\n\ -+ /clip load PATdraw\n\ -+ neewath\n\ -+ pop pop % -\n\ -+} bind def\n\ -+" -+#define FILL_PROLOG5 "\ -+% PATmp - the makepattern equivalent\n\ -+/PATmp { % patdict patmtx PATmp patinstance\n\ -+ exch dup length 7 add % We will add 6 new entries plus 1 FID\n\ -+ dict copy % Create a new dictionary\n\ -+ begin\n\ -+ % Matrix to install when painting the pattern\n\ -+ TilingType PATtcalc\n\ -+ /PatternGState PATcg def\n\ -+ PatternGState /cm 3 -1 roll put\n\ -+ % Check for multi pattern sources (Level 1 fast color patterns)\n\ -+ currentdict /Multi known not { /Multi 1 def } if\n\ -+ % Font dictionary definitions\n\ -+ /FontType 3 def\n\ -+ % Create a dummy encoding vector\n\ -+ /Encoding 256 array def\n\ -+ 3 string 0 1 255 {\n\ -+ Encoding exch dup 3 index cvs cvn put } for pop\n\ -+ /FontMatrix matrix def\n\ -+ /FontBBox BBox def\n\ -+ /BuildChar {\n\ -+ mark 3 1 roll % mark dict char\n\ -+ exch begin\n\ -+ Multi 1 ne {PaintData exch get}{pop} ifelse % mark [paintdata]\n\ -+ PaintType 2 eq Multi 1 ne or\n\ -+ { XStep 0 FontBBox aload pop setcachedevice }\n\ -+ { XStep 0 setcharwidth } ifelse\n\ -+ currentdict % mark [paintdata] dict\n\ -+ /PaintProc load % mark [paintdata] dict paintproc\n\ -+ end\n\ -+ gsave\n\ -+ false PATredef exec true PATredef\n\ -+ grestore\n\ -+ cleartomark % -\n\ -+ } bind def\n\ -+ currentdict\n\ -+ end % newdict\n\ -+ /foo exch % /foo newlict\n\ -+ definefont % newfont\n\ -+} bind def\n\ -+" -+#define FILL_PROLOG6 "\ -+% PATpcalc - calculates the starting point and width/height\n\ -+% of the tile fill for the shape\n\ -+/PATpcalc { % - PATpcalc nw nh px py\n\ -+ PATDict /CurrentPattern get begin\n\ -+ gsave\n\ -+ % Set up the coordinate system to Pattern Space\n\ -+ % and lock down pattern\n\ -+ PatternGState /cm get setmatrix\n\ -+ BBox aload pop pop pop translate\n\ -+ % Determine the bounding box of the shape\n\ -+ pathbbox % llx lly urx ury\n\ -+ grestore\n\ -+ % Determine (nw, nh) the # of cells to paint width and height\n\ -+ PatHeight div ceiling % llx lly urx qh\n\ -+ 4 1 roll % qh llx lly urx\n\ -+ PatWidth div ceiling % qh llx lly qw\n\ -+ 4 1 roll % qw qh llx lly\n\ -+ PatHeight div floor % qw qh llx ph\n\ -+ 4 1 roll % ph qw qh llx\n\ -+ PatWidth div floor % ph qw qh pw\n\ -+ 4 1 roll % pw ph qw qh\n\ -+ 2 index sub cvi abs % pw ph qs qh-ph\n\ -+ exch 3 index sub cvi abs exch % pw ph nw=qw-pw nh=qh-ph\n\ -+ % Determine the starting point of the pattern fill\n\ -+ %(px, py)\n\ -+ 4 2 roll % nw nh pw ph\n\ -+ PatHeight mul % nw nh pw py\n\ -+ exch % nw nh py pw\n\ -+ PatWidth mul exch % nw nh px py\n\ -+ end\n\ -+} bind def\n\ -+" -+#define FILL_PROLOG7 "\ -+% Save the original routines so that we can use them later on\n\ -+/oldfill /fill load def\n\ -+/oldeofill /eofill load def\n\ -+/oldstroke /stroke load def\n\ -+/oldshow /show load def\n\ -+/oldashow /ashow load def\n\ -+/oldwidthshow /widthshow load def\n\ -+/oldawidthshow /awidthshow load def\n\ -+/oldkshow /kshow load def\n\ -+\n\ -+% These defs are necessary so that subsequent procs don't bind in\n\ -+% the originals\n\ -+/fill { oldfill } bind def\n\ -+/eofill { oldeofill } bind def\n\ -+/stroke { oldstroke } bind def\n\ -+/show { oldshow } bind def\n\ -+/ashow { oldashow } bind def\n\ -+/widthshow { oldwidthshow } bind def\n\ -+/awidthshow { oldawidthshow } bind def\n\ -+/kshow { oldkshow } bind def\n\ -+" -+#define FILL_PROLOG8 "\ -+/PATredef {\n\ -+ MyAppDict begin\n\ -+ {\n\ -+ /fill { /clip load PATdraw newpath } bind def\n\ -+ /eofill { /eoclip load PATdraw newpath } bind def\n\ -+ /stroke { PATstroke } bind def\n\ -+ /show { 0 0 null 0 0 6 -1 roll PATawidthshow } bind def\n\ -+ /ashow { 0 0 null 6 3 roll PATawidthshow }\n\ -+ bind def\n\ -+ /widthshow { 0 0 3 -1 roll PATawidthshow }\n\ -+ bind def\n\ -+ /awidthshow { PATawidthshow } bind def\n\ -+ /kshow { PATkshow } bind def\n\ -+ } {\n\ -+ /fill { oldfill } bind def\n\ -+ /eofill { oldeofill } bind def\n\ -+ /stroke { oldstroke } bind def\n\ -+ /show { oldshow } bind def\n\ -+ /ashow { oldashow } bind def\n\ -+ /widthshow { oldwidthshow } bind def\n\ -+ /awidthshow { oldawidthshow } bind def\n\ -+ /kshow { oldkshow } bind def\n\ -+ } ifelse\n\ -+ end\n\ -+} bind def\n\ -+false PATredef\n\ -+" -+#define FILL_PROLOG9 "\ -+% Conditionally define setcmykcolor if not available\n\ -+/setcmykcolor where { pop } {\n\ -+ /setcmykcolor {\n\ -+ 1 sub 4 1 roll\n\ -+ 3 {\n\ -+ 3 index add neg dup 0 lt { pop 0 } if 3 1 roll\n\ -+ } repeat\n\ -+ setrgbcolor - pop\n\ -+ } bind def\n\ -+} ifelse\n\ -+/PATsc { % colorarray\n\ -+ aload length % c1 ... cn length\n\ -+ dup 1 eq { pop setgray } { 3 eq { setrgbcolor } { setcmykcolor\n\ -+ } ifelse } ifelse\n\ -+} bind def\n\ -+/PATsg { % dict\n\ -+ begin\n\ -+ lw setlinewidth\n\ -+ lc setlinecap\n\ -+ lj setlinejoin\n\ -+ ml setmiterlimit\n\ -+ ds aload pop setdash\n\ -+ cc aload pop setrgbcolor\n\ -+ cm setmatrix\n\ -+ end\n\ -+} bind def\n\ -+" -+#define FILL_PROLOG10 "\ -+/PATDict 3 dict def\n\ -+/PATsp {\n\ -+ true PATredef\n\ -+ PATDict begin\n\ -+ /CurrentPattern exch def\n\ -+ % If it's an uncolored pattern, save the color\n\ -+ CurrentPattern /PaintType get 2 eq {\n\ -+ /PColor exch def\n\ -+ } if\n\ -+ /CColor [ currentrgbcolor ] def\n\ -+ end\n\ -+} bind def\n\ -+% PATstroke - stroke with the current pattern\n\ -+/PATstroke {\n\ -+ countdictstack\n\ -+ save\n\ -+ mark\n\ -+ {\n\ -+ currentpoint strokepath moveto\n\ -+ PATpcalc % proc nw nh px py\n\ -+ clip newpath PATfill\n\ -+ } stopped {\n\ -+ (*** PATstroke Warning: Path is too complex, stroking\n\ -+ with gray) =\n\ -+ cleartomark\n\ -+ restore\n\ -+ countdictstack exch sub dup 0 gt\n\ -+ { { end } repeat } { pop } ifelse\n\ -+ gsave 0.5 setgray oldstroke grestore\n\ -+ } { pop restore pop } ifelse\n\ -+ newpath\n\ -+} bind def\n\ -+" -+#define FILL_PROLOG11 "\ -+/PATtcalc { % modmtx tilingtype PATtcalc tilematrix\n\ -+ % Note: tiling types 2 and 3 are not supported\n\ -+ gsave\n\ -+ exch concat % tilingtype\n\ -+ matrix currentmatrix exch % cmtx tilingtype\n\ -+ % Tiling type 1 and 3: constant spacing\n\ -+ 2 ne {\n\ -+ % Distort the pattern so that it occupies\n\ -+ % an integral number of device pixels\n\ -+ dup 4 get exch dup 5 get exch % tx ty cmtx\n\ -+ XStep 0 dtransform\n\ -+ round exch round exch % tx ty cmtx dx.x dx.y\n\ -+ XStep div exch XStep div exch % tx ty cmtx a b\n\ -+ 0 YStep dtransform\n\ -+ round exch round exch % tx ty cmtx a b dy.x dy.y\n\ -+ YStep div exch YStep div exch % tx ty cmtx a b c d\n\ -+ 7 -3 roll astore % { a b c d tx ty }\n\ -+ } if\n\ -+ grestore\n\ -+} bind def\n\ -+/PATusp {\n\ -+ false PATredef\n\ -+ PATDict begin\n\ -+ CColor PATsc\n\ -+ end\n\ -+} bind def\n\ -+" - #define FILL_PAT01 "\ -+% this is the pattern fill program from the Second edition Reference Manual\n\ -+% with changes to call the above pattern fill\n\ - % left30\n\ --<<\n\ -- /PatternType 1\n\ -- /PaintType 2\n\ -- /TilingType 2\n\ -- /BBox [-2 -4 10 5]\n\ -- /XStep 8\n\ -- /YStep 4\n\ -- /PaintProc\n\ -- {\n\ -- pop\n\ -- newpath\n\ -- -2 5 moveto\n\ -- .7 setlinewidth\n\ -- 12 -6 rlineto\n\ -- stroke\n\ -- } bind\n\ --\n\ -->>\n\ --\n\ --matrix\n\ --makepattern\n\ -+11 dict begin\n\ -+/PaintType 1 def\n\ -+/PatternType 1 def\n\ -+/TilingType 1 def\n\ -+/BBox [0 0 1 1] def\n\ -+/XStep 1 def\n\ -+/YStep 1 def\n\ -+/PatWidth 1 def\n\ -+/PatHeight 1 def\n\ -+/Multi 2 def\n\ -+/PaintData [\n\ -+ { clippath } bind\n\ -+ { 32 16 true [ 32 0 0 -16 0 16 ]\n\ -+ {}\n\ -+ imagemask } bind\n\ -+] def\n\ -+/PaintProc {\n\ -+ pop\n\ -+ exec fill\n\ -+} def\n\ -+currentdict\n\ -+end\n\ - /P1 exch def\n\ - " - #define FILL_PAT02 "\ - % right30\n\ --<<\n\ -- /PatternType 1\n\ -- /PaintType 2\n\ -- /TilingType 2\n\ -- /BBox [-2 -4 10 5]\n\ -- /XStep 8\n\ -- /YStep 4\n\ -- /PaintProc\n\ -- {\n\ -- pop\n\ -- newpath\n\ -- .7 setlinewidth\n\ -- -2 -1 moveto\n\ -- 12 6 rlineto\n\ -- stroke\n\ -- } bind\n\ --\n\ -->>\n\ --\n\ --matrix\n\ --makepattern\n\ -+11 dict begin\n\ -+/PaintType 1 def\n\ -+/PatternType 1 def\n\ -+/TilingType 1 def\n\ -+/BBox [0 0 1 1] def\n\ -+/XStep 1 def\n\ -+/YStep 1 def\n\ -+/PatWidth 1 def\n\ -+/PatHeight 1 def\n\ -+/Multi 2 def\n\ -+/PaintData [\n\ -+ { clippath } bind\n\ -+ { 32 16 true [ 32 0 0 -16 0 16 ]\n\ -+ {<00030003000c000c0030003000c000c0030003000c000c00\n\ -+ 30003000c000c00000030003000c000c0030003000c000c0\n\ -+ 030003000c000c0030003000c000c000>}\n\ -+ imagemask } bind\n\ -+] def\n\ -+/PaintProc {\n\ -+ pop\n\ -+ exec fill\n\ -+} def\n\ -+currentdict\n\ -+end\n\ - /P2 exch def\n\ - " - #define FILL_PAT03 "\ - % crosshatch30\n\ --<<\n\ -- /PatternType 1\n\ -- /PaintType 2\n\ -- /TilingType 2\n\ -- /BBox [-2 -4 10 5]\n\ -- /XStep 8\n\ -- /YStep 4\n\ -- /PaintProc\n\ -- {\n\ -- pop\n\ -- newpath\n\ -- .7 setlinewidth\n\ -- -2 5 moveto\n\ -- 12 -6 rlineto\n\ -- stroke\n\ -- newpath\n\ -- .7 setlinewidth\n\ -- -2 -1 moveto\n\ -- 12 6 rlineto\n\ -- stroke\n\ -- } bind\n\ --\n\ -->>\n\ --\n\ --matrix\n\ --makepattern\n\ -+11 dict begin\n\ -+/PaintType 1 def\n\ -+/PatternType 1 def\n\ -+/TilingType 1 def\n\ -+/BBox [0 0 1 1] def\n\ -+/XStep 1 def\n\ -+/YStep 1 def\n\ -+/PatWidth 1 def\n\ -+/PatHeight 1 def\n\ -+/Multi 2 def\n\ -+/PaintData [\n\ -+ { clippath } bind\n\ -+ { 32 16 true [ 32 0 0 -16 0 16 ]\n\ -+ {<033003300c0c0c0c30033003c000c000300330030c0c0c0c\n\ -+ 0330033000c000c0033003300c0c0c0c30033003c000c000\n\ -+ 300330030c0c0c0c0330033000c000c0>}\n\ -+ imagemask } bind\n\ -+] def\n\ -+/PaintProc {\n\ -+ pop\n\ -+ exec fill\n\ -+} def\n\ -+currentdict\n\ -+end\n\ - /P3 exch def\n\ - " - #define FILL_PAT04 "\ - % left45\n\ --<<\n\ -- /PatternType 1\n\ -- /PaintType 2\n\ -- /TilingType 2\n\ -- /BBox [-1 -1 9 9]\n\ -- /XStep 8\n\ -- /YStep 8\n\ -- /PaintProc\n\ -- {\n\ -- pop\n\ -- newpath\n\ -- 1 setlinewidth\n\ -- -1 9 moveto\n\ -- 9 -1 lineto\n\ -- stroke\n\ -- } bind\n\ --\n\ -->>\n\ --\n\ --matrix\n\ --makepattern\n\ -+11 dict begin\n\ -+/PaintType 1 def\n\ -+/PatternType 1 def\n\ -+/TilingType 1 def\n\ -+/BBox [0 0 1 1] def\n\ -+/XStep 1 def\n\ -+/YStep 1 def\n\ -+/PatWidth 1 def\n\ -+/PatHeight 1 def\n\ -+/Multi 2 def\n\ -+/PaintData [\n\ -+ { clippath } bind\n\ -+ { 20 20 true [ 20 0 0 -20 0 20 ]\n\ -+ {<8020004010002008001004000802000401000200\n\ -+ 8001004000802000401080200040100020080010\n\ -+ 0400080200040100020080010040008020004010>}\n\ -+ imagemask } bind\n\ -+] def\n\ -+/PaintProc {\n\ -+ pop\n\ -+ exec fill\n\ -+} def\n\ -+currentdict\n\ -+end\n\ - /P4 exch def\n\ - " - #define FILL_PAT05 "\ - % right45\n\ --<<\n\ -- /PatternType 1\n\ -- /PaintType 2\n\ -- /TilingType 2\n\ -- /BBox [-1 -1 9 9]\n\ -- /XStep 8\n\ -- /YStep 8\n\ -- /PaintProc\n\ -- {\n\ -- pop\n\ -- newpath\n\ -- 1 setlinewidth\n\ -- -1 -1 moveto\n\ -- 9 9 lineto\n\ -- stroke\n\ -- } bind\n\ --\n\ -->>\n\ --\n\ --matrix\n\ --makepattern\n\ -+11 dict begin\n\ -+/PaintType 1 def\n\ -+/PatternType 1 def\n\ -+/TilingType 1 def\n\ -+/BBox [0 0 1 1] def\n\ -+/XStep 1 def\n\ -+/YStep 1 def\n\ -+/PatWidth 1 def\n\ -+/PatHeight 1 def\n\ -+/Multi 2 def\n\ -+/PaintData [\n\ -+ { clippath } bind\n\ -+ { 20 20 true [ 20 0 0 -20 0 20 ]\n\ -+ {<0040100080200100400200800401000802001004\n\ -+ 0020080040100080200000401000802001004002\n\ -+ 0080040100080200100400200800401000802000>}\n\ -+ imagemask } bind\n\ -+] def\n\ -+/PaintProc {\n\ -+ pop\n\ -+ exec fill\n\ -+} def\n\ -+currentdict\n\ -+end\n\ - /P5 exch def\n\ - " - #define FILL_PAT06 "\ - % crosshatch45\n\ --<<\n\ -- /PatternType 1\n\ -- /PaintType 2\n\ -- /TilingType 2\n\ -- /BBox [-1 -1 9 9] \n\ -- /XStep 8\n\ -- /YStep 8\n\ -- /PaintProc\n\ -- {\n\ -- pop\n\ -- newpath\n\ -- 1 setlinewidth\n\ -- -1 9 moveto\n\ -- 9 -1 lineto\n\ -- stroke\n\ -- -1 -1 moveto\n\ -- 9 9 lineto\n\ -- stroke\n\ -- } bind\n\ --\n\ -->>\n\ --\n\ --matrix\n\ --makepattern\n\ -+11 dict begin\n\ -+/PaintType 1 def\n\ -+/PatternType 1 def\n\ -+/TilingType 1 def\n\ -+/BBox [0 0 1 1] def\n\ -+/XStep 1 def\n\ -+/YStep 1 def\n\ -+/PatWidth 1 def\n\ -+/PatHeight 1 def\n\ -+/Multi 2 def\n\ -+/PaintData [\n\ -+ { clippath } bind\n\ -+ { 20 20 true [ 20 0 0 -20 0 20 ]\n\ -+ {<8020004050102088201104400a02800401000a02\n\ -+ 8011044020882040501080200040501020882011\n\ -+ 04400a02800401000a0280110440208820405010>}\n\ -+ imagemask } bind\n\ -+] def\n\ -+/PaintProc {\n\ -+ pop\n\ -+ exec fill\n\ -+} def\n\ -+currentdict\n\ -+end\n\ - /P6 exch def\n\ - " - #define FILL_PAT07 "\ - % bricks\n\ --<<\n\ -- /PatternType 1\n\ -- /PaintType 2\n\ -- /TilingType 2\n\ -- /BBox [-1 0 17 17] % At least linewidth bigger than Xstep and Ystep\n\ -- /XStep 16 % These numbers mimic old Xfig bitmaps\n\ -- /YStep 16\n\ -- /PaintProc\n\ -- {\n\ -- pop\n\ -- 1 setlinewidth 0 setlinecap\n\ -- newpath 0 0 moveto 0 8 lineto stroke\n\ -- newpath 8 8 moveto 8 16 lineto stroke\n\ -- newpath 0 8 moveto 16 8 lineto stroke\n\ -- newpath 0 16 moveto 16 16 lineto stroke\n\ -- } bind\n\ --\n\ -->>\n\ --\n\ --matrix\n\ --makepattern\n\ -+11 dict begin\n\ -+/PaintType 1 def\n\ -+/PatternType 1 def\n\ -+/TilingType 1 def\n\ -+/BBox [0 0 1 1] def\n\ -+/XStep 1 def\n\ -+/YStep 1 def\n\ -+/PatWidth 1 def\n\ -+/PatHeight 1 def\n\ -+/Multi 2 def\n\ -+/PaintData [\n\ -+ { clippath } bind\n\ -+ { 16 16 true [ 16 0 0 -16 0 16 ]\n\ -+ {<008000800080008000800080\n\ -+ 0080ffff8000800080008000\n\ -+ 800080008000ffff>}\n\ -+ imagemask } bind\n\ -+] def\n\ -+/PaintProc {\n\ -+ pop\n\ -+ exec fill\n\ -+} def\n\ -+currentdict\n\ -+end\n\ - /P7 exch def\n\ - " - #define FILL_PAT08 "\ - % vertical bricks\n\ --<<\n\ -- /PatternType 1\n\ -- /PaintType 2\n\ -- /TilingType 2\n\ -- /BBox [0 -1 17 17] % At least linewidth bigger than Xstep and Ystep\n\ -- /XStep 16\n\ -- /YStep 16\n\ -- /PaintProc\n\ -- {\n\ -- pop\n\ -- 1 setlinewidth 0 setlinecap\n\ -- newpath 0 0 moveto 8 0 lineto stroke\n\ -- newpath 8 8 moveto 16 8 lineto stroke\n\ -- newpath 8 0 moveto 8 16 lineto stroke\n\ -- newpath 16 0 moveto 16 16 lineto stroke\n\ -- } bind\n\ --\n\ -->>\n\ --\n\ --matrix\n\ --makepattern\n\ -+11 dict begin\n\ -+/PaintType 1 def\n\ -+/PatternType 1 def\n\ -+/TilingType 1 def\n\ -+/BBox [0 0 1 1] def\n\ -+/XStep 1 def\n\ -+/YStep 1 def\n\ -+/PatWidth 1 def\n\ -+/PatHeight 1 def\n\ -+/Multi 2 def\n\ -+/PaintData [\n\ -+ { clippath } bind\n\ -+ { 16 16 true [ 16 0 0 -16 0 16 ]\n\ -+ { }\n\ -+ imagemask } bind\n\ -+] def\n\ -+/PaintProc {\n\ -+ pop\n\ -+ exec fill\n\ -+} def\n\ -+currentdict\n\ -+end\n\ - /P8 exch def\n\ - " - #define FILL_PAT09 "\ - % horizontal lines\n\ --<<\n\ -- /PatternType 1\n\ -- /PaintType 2\n\ -- /TilingType 2\n\ -- /BBox [0 0 4 4] % At least linewidth bigger than Xstep and Ystep\n\ -- /XStep 4\n\ -- /YStep 4\n\ -- /PaintProc\n\ -- {\n\ -- pop\n\ -- 1 setlinewidth 0 setlinecap\n\ -- newpath 0 3.5 moveto 4 3.5 lineto stroke\n\ -- } bind\n\ --\n\ -->>\n\ --\n\ --matrix\n\ --makepattern\n\ -+11 dict begin\n\ -+/PaintType 1 def\n\ -+/PatternType 1 def\n\ -+/TilingType 1 def\n\ -+/BBox [0 0 1 1] def\n\ -+/XStep 1 def\n\ -+/YStep 1 def\n\ -+/PatWidth 1 def\n\ -+/PatHeight 1 def\n\ -+/Multi 2 def\n\ -+/PaintData [\n\ -+ { clippath } bind\n\ -+ { 16 8 true [ 16 0 0 -8 0 8 ]\n\ -+ {< ffff000000000000ffff000000000000>}\n\ -+ imagemask } bind\n\ -+] def\n\ -+/PaintProc {\n\ -+ pop\n\ -+ exec fill\n\ -+} def\n\ -+currentdict\n\ -+end\n\ - /P9 exch def\n\ - " - #define FILL_PAT10 "\ - % vertical lines\n\ --<<\n\ -- /PatternType 1\n\ -- /PaintType 2\n\ -- /TilingType 2\n\ -- /BBox [0 0 4 4]\n\ -- /XStep 4\n\ -- /YStep 4\n\ -- /PaintProc\n\ -- {\n\ -- pop\n\ -- 1 setlinewidth 0 setlinecap\n\ -- newpath 3.5 0 moveto 3.5 4 lineto stroke\n\ -- } bind\n\ --\n\ -->>\n\ --\n\ --matrix\n\ --makepattern\n\ -+11 dict begin\n\ -+/PaintType 1 def\n\ -+/PatternType 1 def\n\ -+/TilingType 1 def\n\ -+/BBox [0 0 1 1] def\n\ -+/XStep 1 def\n\ -+/YStep 1 def\n\ -+/PatWidth 1 def\n\ -+/PatHeight 1 def\n\ -+/Multi 2 def\n\ -+/PaintData [\n\ -+ { clippath } bind\n\ -+ { 8 16 true [ 8 0 0 -16 0 16 ]\n\ -+ {<11111111111111111111111111111111>}\n\ -+ imagemask } bind\n\ -+] def\n\ -+/PaintProc {\n\ -+ pop\n\ -+ exec fill\n\ -+} def\n\ -+currentdict\n\ -+end\n\ - /P10 exch def\n\ - " - #define FILL_PAT11 "\ - % crosshatch lines\n\ --<<\n\ -- /PatternType 1\n\ -- /PaintType 2\n\ -- /TilingType 2\n\ -- /BBox [0 0 4 4]\n\ -- /XStep 4\n\ -- /YStep 4\n\ -- /PaintProc\n\ -- {\n\ -- pop\n\ -- 1 setlinewidth 0 setlinecap\n\ -- newpath 3.5 0 moveto 3.5 4 lineto stroke\n\ -- newpath 0 3.5 moveto 4 3.5 lineto stroke\n\ -- } bind\n\ --\n\ -->>\n\ --\n\ --matrix\n\ --makepattern\n\ -+11 dict begin\n\ -+/PaintType 1 def\n\ -+/PatternType 1 def\n\ -+/TilingType 1 def\n\ -+/BBox [0 0 1 1] def\n\ -+/XStep 1 def\n\ -+/YStep 1 def\n\ -+/PatWidth 1 def\n\ -+/PatHeight 1 def\n\ -+/Multi 2 def\n\ -+/PaintData [\n\ -+ { clippath } bind\n\ -+ { 16 16 true [ 16 0 0 -16 0 16 ]\n\ -+ {}\n\ -+ imagemask } bind\n\ -+] def\n\ -+/PaintProc {\n\ -+ pop\n\ -+ exec fill\n\ -+} def\n\ -+currentdict\n\ -+end\n\ - /P11 exch def\n\ - " - #define FILL_PAT12 "\ - % left-shingles\n\ --<<\n\ -- /PatternType 1\n\ -- /PaintType 2\n\ -- /TilingType 2\n\ -- /BBox [0 0 25 24]\n\ -- /XStep 24\n\ -- /YStep 24\n\ -- /PaintProc\n\ -- {\n\ -- pop\n\ -- 1 setlinewidth 0 setlinecap\n\ -- newpath 0 0.5 moveto 24 0.5 lineto stroke\n\ -- newpath 0 8.5 moveto 24 8.5 lineto stroke\n\ -- newpath 0 16.5 moveto 24 16.5 lineto stroke\n\ -- newpath 4 8.5 moveto 8 16.5 lineto stroke\n\ -- newpath 12 0.5 moveto 16 8.5 lineto stroke\n\ -- newpath 20 16.5 moveto 24 24.5 lineto stroke\n\ -- } bind\n\ --\n\ -->>\n\ --\n\ --matrix\n\ --makepattern\n\ -+11 dict begin\n\ -+/PaintType 1 def\n\ -+/PatternType 1 def\n\ -+/TilingType 1 def\n\ -+/BBox [0 0 1 1] def\n\ -+/XStep 1 def\n\ -+/YStep 1 def\n\ -+/PatWidth 1 def\n\ -+/PatHeight 1 def\n\ -+/Multi 2 def\n\ -+/PaintData [\n\ -+ { clippath } bind\n\ -+ { 48 48 true [ 48 0 0 -48 0 48 ]\n\ -+ {<000000000001000000000001000000000002000000000002\n\ -+ 000000000004000000000004000000000008000000000008\n\ -+ 000000000010000000000010000000000020000000000020\n\ -+ 000000000040000000000040000000000080ffffffffffff\n\ -+ 000000010000000000010000000000020000000000020000\n\ -+ 000000040000000000040000000000080000000000080000\n\ -+ 000000100000000000100000000000200000000000200000\n\ -+ 000000400000000000400000000000800000ffffffffffff\n\ -+ 000100000000000100000000000200000000000200000000\n\ -+ 000400000000000400000000000800000000000800000000\n\ -+ 001000000000001000000000002000000000002000000000\n\ -+ 004000000000004000000000008000000000ffffffffffff>}\n\ -+ imagemask } bind\n\ -+] def\n\ -+/PaintProc {\n\ -+ pop\n\ -+ exec fill\n\ -+} def\n\ -+currentdict\n\ -+end\n\ - /P12 exch def\n\ - " - #define FILL_PAT13 "\ - % right-shingles\n\ --<<\n\ -- /PatternType 1\n\ -- /PaintType 2\n\ -- /TilingType 2\n\ -- /BBox [0 0 25 24]\n\ -- /XStep 24\n\ -- /YStep 24\n\ -- /PaintProc\n\ -- {\n\ -- pop\n\ -- 1 setlinewidth 0 setlinecap\n\ -- newpath 0 0.5 moveto 24 0.5 lineto stroke\n\ -- newpath 0 8.5 moveto 24 8.5 lineto stroke\n\ -- newpath 0 16.5 moveto 24 16.5 lineto stroke\n\ -- newpath 4 24.5 moveto 8 16.5 lineto stroke\n\ -- newpath 16 0.5 moveto 12 8.5 lineto stroke\n\ -- newpath 20 16.5 moveto 24 8.5 lineto stroke\n\ -- } bind\n\ --\n\ -->>\n\ --\n\ --matrix\n\ --makepattern\n\ -+11 dict begin\n\ -+/PaintType 1 def\n\ -+/PatternType 1 def\n\ -+/TilingType 1 def\n\ -+/BBox [0 0 1 1] def\n\ -+/XStep 1 def\n\ -+/YStep 1 def\n\ -+/PatWidth 1 def\n\ -+/PatHeight 1 def\n\ -+/Multi 2 def\n\ -+/PaintData [\n\ -+ { clippath } bind\n\ -+ { 48 48 true [ 48 0 0 -48 0 48 ]\n\ -+ {<000000000080000000000080000000000040000000000040\n\ -+ 000000000020000000000020000000000010000000000010\n\ -+ 000000000008000000000008000000000004000000000004\n\ -+ 000000000002000000000002000000000001ffffffffffff\n\ -+ 008000000000008000000000004000000000004000000000\n\ -+ 002000000000002000000000001000000000001000000000\n\ -+ 000800000000000800000000000400000000000400000000\n\ -+ 000200000000000200000000000100000000ffffffffffff\n\ -+ 000000800000000000800000000000400000000000400000\n\ -+ 000000200000000000200000000000100000000000100000\n\ -+ 000000080000000000080000000000040000000000040000\n\ -+ 000000020000000000020000000000010000ffffffffffff>}\n\ -+ imagemask } bind\n\ -+] def\n\ -+/PaintProc {\n\ -+ pop\n\ -+ exec fill\n\ -+} def\n\ -+currentdict\n\ -+end\n\ - /P13 exch def\n\ - " - #define FILL_PAT14 "\ - % vertical left-shingles\n\ --<<\n\ -- /PatternType 1\n\ -- /PaintType 2\n\ -- /TilingType 2\n\ -- /BBox [0 0 25 25]\n\ -- /XStep 24\n\ -- /YStep 24\n\ -- /PaintProc\n\ -- {\n\ -- pop\n\ -- 1 setlinewidth 0 setlinecap\n\ -- newpath 0.5 0 moveto 0.5 24 lineto stroke\n\ -- newpath 8.5 0 moveto 8.5 24 lineto stroke\n\ -- newpath 16.5 0 moveto 16.5 24 lineto stroke\n\ -- newpath 24.5 4 moveto 16.5 8 lineto stroke\n\ -- newpath 0.5 16 moveto 8.5 12 lineto stroke\n\ -- newpath 16.5 20 moveto 8.5 24 lineto stroke\n\ -- } bind\n\ --\n\ -->>\n\ --\n\ --matrix\n\ --makepattern\n\ -+11 dict begin\n\ -+/PaintType 1 def\n\ -+/PatternType 1 def\n\ -+/TilingType 1 def\n\ -+/BBox [0 0 1 1] def\n\ -+/XStep 1 def\n\ -+/YStep 1 def\n\ -+/PatWidth 1 def\n\ -+/PatHeight 1 def\n\ -+/Multi 2 def\n\ -+/PaintData [\n\ -+ { clippath } bind\n\ -+ { 48 48 true [ 48 0 0 -48 0 48 ]\n\ -+ {<000100010001000100010001000100010001000100010001\n\ -+ 000100010001000100010001000100010001000100010001\n\ -+ 000180010001000160010001000118010001000106010001\n\ -+ 000101810001000100610001000100190001000100070001\n\ -+ 000100010001000100010001000100010001000100010001\n\ -+ 000100010001000100010001000100010001000100010001\n\ -+ 000100018001000100016001000100011801000100010601\n\ -+ 000100010181000100010061000100010019000100010007\n\ -+ 000100010001000100010001000100010001000100010001\n\ -+ 000100010001000100010001000100010001000100010001\n\ -+ 800100010001600100010001180100010001060100010001\n\ -+ 018100010001006100010001001900010001000700010001>}\n\ -+ imagemask } bind\n\ -+] def\n\ -+/PaintProc {\n\ -+ pop\n\ -+ exec fill\n\ -+} def\n\ -+currentdict\n\ -+end\n\ - /P14 exch def\n\ - " - #define FILL_PAT15 "\ - % vertical right-shingles\n\ --<<\n\ -- /PatternType 1\n\ -- /PaintType 2\n\ -- /TilingType 2\n\ -- /BBox [0 0 24 25]\n\ -- /XStep 24\n\ -- /YStep 24\n\ -- /PaintProc\n\ -- {\n\ -- pop\n\ -- 1 setlinewidth 0 setlinecap\n\ -- newpath 0.5 0 moveto 0.5 24 lineto stroke\n\ -- newpath 8.5 0 moveto 8.5 24 lineto stroke\n\ -- newpath 16.5 0 moveto 16.5 24 lineto stroke\n\ -- newpath 8.5 4 moveto 16.5 8 lineto stroke\n\ -- newpath 0.5 12 moveto 8.5 16 lineto stroke\n\ -- newpath 16.5 20 moveto 24.5 24 lineto stroke\n\ -- } bind\n\ --\n\ -->>\n\ --\n\ --matrix\n\ --makepattern\n\ -+11 dict begin\n\ -+/PaintType 1 def\n\ -+/PatternType 1 def\n\ -+/TilingType 1 def\n\ -+/BBox [0 0 1 1] def\n\ -+/XStep 1 def\n\ -+/YStep 1 def\n\ -+/PatWidth 1 def\n\ -+/PatHeight 1 def\n\ -+/Multi 2 def\n\ -+/PaintData [\n\ -+ { clippath } bind\n\ -+ { 48 48 true [ 48 0 0 -48 0 48 ]\n\ -+ {<000100010001000100010001000100010001000100010001\n\ -+ 000100010001000100010001000100010001000100010001\n\ -+ 000100010007000100010019000100010061000100010181\n\ -+ 000100010601000100011801000100016001000100018001\n\ -+ 000100010001000100010001000100010001000100010001\n\ -+ 000100010001000100010001000100010001000100010001\n\ -+ 000100070001000100190001000100610001000101810001\n\ -+ 000106010001000118010001000160010001000180010001\n\ -+ 000100010001000100010001000100010001000100010001\n\ -+ 000100010001000100010001000100010001000100010001\n\ -+ 000700010001001900010001006100010001018100010001\n\ -+ 060100010001180100010001600100010001800100010001>}\n\ -+ imagemask } bind\n\ -+] def\n\ -+/PaintProc {\n\ -+ pop\n\ -+ exec fill\n\ -+} def\n\ -+currentdict\n\ -+end\n\ - /P15 exch def\n\ - " - #define FILL_PAT16 "\ - % fishscales\n\ --<<\n\ -- /PatternType 1\n\ -- /PaintType 2\n\ -- /TilingType 2\n\ -- /BBox [0 -1 17 9]\n\ -- /XStep 16\n\ -- /YStep 8\n\ -- /PaintProc\n\ -- {\n\ -- pop\n\ -- 0.7 setlinewidth 0 setlinecap\n\ -- newpath 8 15 11 223 317 arc stroke\n\ -- newpath 0 11 11 223 317 arc stroke\n\ -- newpath 16 11 11 223 317 arc stroke\n\ -- } bind\n\ --\n\ -->>\n\ --\n\ --matrix\n\ --makepattern\n\ -+11 dict begin\n\ -+/PaintType 1 def\n\ -+/PatternType 1 def\n\ -+/TilingType 1 def\n\ -+/BBox [0 0 1 1] def\n\ -+/XStep 1 def\n\ -+/YStep 1 def\n\ -+/PatWidth 1 def\n\ -+/PatHeight 1 def\n\ -+/Multi 2 def\n\ -+/PaintData [\n\ -+ { clippath } bind\n\ -+ { 32 16 true [ 32 0 0 -16 0 16 ]\n\ -+ {<0007e000000c30000018180000700e0001c003800f0000f0\n\ -+ 7800001ec0000003600000063000000c180000180e000070\n\ -+ 038001c000f00f00001e78000003c000>}\n\ -+ imagemask } bind\n\ -+] def\n\ -+/PaintProc {\n\ -+ pop\n\ -+ exec fill\n\ -+} def\n\ -+currentdict\n\ -+end\n\ - /P16 exch def\n\ - " - #define FILL_PAT17 "\ - % small fishscales\n\ --<<\n\ -- /PatternType 1\n\ -- /PaintType 2\n\ -- /TilingType 2\n\ -- /BBox [0 -0.5 8 8.5]\n\ -- /XStep 8\n\ -- /YStep 8\n\ -- /PaintProc\n\ -- {\n\ -- pop\n\ -- 0.7 setlinewidth 0 setlinecap\n\ -- newpath 4 8 4 180 360 arc stroke\n\ -- newpath 0 4 4 180 360 arc stroke\n\ -- newpath 8 4 4 180 360 arc stroke\n\ -- } bind\n\ --\n\ -->>\n\ --\n\ --matrix\n\ --makepattern\n\ -+11 dict begin\n\ -+/PaintType 1 def\n\ -+/PatternType 1 def\n\ -+/TilingType 1 def\n\ -+/BBox [0 0 1 1] def\n\ -+/XStep 1 def\n\ -+/YStep 1 def\n\ -+/PatWidth 1 def\n\ -+/PatHeight 1 def\n\ -+/Multi 2 def\n\ -+/PaintData [\n\ -+ { clippath } bind\n\ -+ { 16 16 true [ 16 0 0 -16 0 16 ]\n\ -+ {<008000800080014001400220\n\ -+ 0c187007c001800080004001\n\ -+ 40012002180c0770>}\n\ -+ imagemask } bind\n\ -+] def\n\ -+/PaintProc {\n\ -+ pop\n\ -+ exec fill\n\ -+} def\n\ -+currentdict\n\ -+end\n\ - /P17 exch def\n\ - " - #define FILL_PAT18 "\ - % circles\n\ --<<\n\ -- /PatternType 1\n\ -- /PaintType 2\n\ -- /TilingType 2\n\ -- /BBox [-0.35 -0.35 16.35 16.35] % (0, 16) plus 1/2 linewidth\n\ -- /XStep 16\n\ -- /YStep 16\n\ -- /PaintProc\n\ -- {\n\ -- pop\n\ -- 0.7 setlinewidth 0 setlinecap\n\ -- newpath 8 8 8 0 360 arc stroke\n\ -- } bind\n\ --\n\ -->>\n\ --\n\ --matrix\n\ --makepattern\n\ -+11 dict begin\n\ -+/PaintType 1 def\n\ -+/PatternType 1 def\n\ -+/TilingType 1 def\n\ -+/BBox [0 0 1 1] def\n\ -+/XStep 1 def\n\ -+/YStep 1 def\n\ -+/PatWidth 1 def\n\ -+/PatHeight 1 def\n\ -+/Multi 2 def\n\ -+/PaintData [\n\ -+ { clippath } bind\n\ -+ { 48 48 true [ 48 0 0 -48 0 48 ]\n\ -+ {<000007f000000000780f000000038000e000000c00001800\n\ -+ 001000000400006000000300008000000080010000000040\n\ -+ 020000000020040000000010040000000010080000000008\n\ -+ 100000000004100000000004200000000002200000000002\n\ -+ 200000000002400000000001400000000001400000000001\n\ -+ 400000000001800000000000800000000000800000000000\n\ -+ 800000000000800000000000800000000000800000000000\n\ -+ 400000000001400000000001400000000001400000000001\n\ -+ 200000000002200000000002200000000002100000000004\n\ -+ 100000000004080000000008040000000010040000000010\n\ -+ 020000000020010000000040008000000080006000000300\n\ -+ 001000000400000c0000180000038000e0000000780f0000>}\n\ -+ imagemask } bind\n\ -+] def\n\ -+/PaintProc {\n\ -+ pop\n\ -+ exec fill\n\ -+} def\n\ -+currentdict\n\ -+end\n\ - /P18 exch def\n\ - " - #define FILL_PAT19 "\ - % hexagons\n\ --<<\n\ -- /PatternType 1\n\ -- /PaintType 2\n\ -- /TilingType 1\n\ -- /BBox [-0.5 -0.35 27 17]\n\ -- /XStep 26\n\ -- /YStep 16\n\ -- /PaintProc\n\ -- {\n\ -- pop\n\ -- 0.7 setlinewidth 0 setlinejoin newpath\n\ -- 4 0 moveto\n\ -- 9 0 rlineto % right\n\ -- 4 8 rlineto % up-right\n\ -- -4 8 rlineto % up-left\n\ -- -9 0 rmoveto % back\n\ -- -4 -8 rlineto % down-left\n\ -- 4 -8 rlineto 1 0 rlineto stroke % down-right\n\ -- newpath 17 8 moveto 9 0 rlineto stroke\n\ -- } bind\n\ --\n\ -->>\n\ --\n\ --matrix\n\ --makepattern\n\ -+11 dict begin\n\ -+/PaintType 1 def\n\ -+/PatternType 1 def\n\ -+/TilingType 1 def\n\ -+/BBox [0 0 1 1] def\n\ -+/XStep 1 def\n\ -+/YStep 1 def\n\ -+/PatWidth 1 def\n\ -+/PatHeight 1 def\n\ -+/Multi 2 def\n\ -+/PaintData [\n\ -+ { clippath } bind\n\ -+ { 60 36 true [ 60 0 0 -36 0 36 ]\n\ -+ {<008000040000000001000002000000000100000200000000\n\ -+ 020000010000000002000001000000000400000080000000\n\ -+ 040000008000000008000000400000000800000040000000\n\ -+ 100000002000000010000000200000002000000010000000\n\ -+ 200000001000000040000000080000004000000008000000\n\ -+ 800000000400000080000000040000000000000003fffff0\n\ -+ 800000000400000080000000040000004000000008000000\n\ -+ 400000000800000020000000100000002000000010000000\n\ -+ 100000002000000010000000200000000800000040000000\n\ -+ 080000004000000004000000800000000400000080000000\n\ -+ 020000010000000002000001000000000100000200000000\n\ -+ 0100000200000000008000040000000000fffffc00000000>}\n\ -+ imagemask } bind\n\ -+] def\n\ -+/PaintProc {\n\ -+ pop\n\ -+ exec fill\n\ -+} def\n\ -+currentdict\n\ -+end\n\ - /P19 exch def\n\ - " - #define FILL_PAT20 "\ - % octagons\n\ --<<\n\ -- /PatternType 1\n\ -- /PaintType 2\n\ -- /TilingType 2\n\ -- /BBox [0 0 16 16]\n\ -- /XStep 16\n\ -- /YStep 16\n\ -- /PaintProc\n\ -- {\n\ -- pop\n\ -- .8 setlinewidth 0 setlinejoin newpath\n\ -- 5 0 moveto 6 0 rlineto 5 5 rlineto 0 6 rlineto\n\ -- -5 5 rlineto -6 0 rlineto -5 -5 rlineto 0 -6 rlineto closepath stroke\n\ -- } bind\n\ --\n\ -->>\n\ --\n\ --matrix\n\ --makepattern\n\ -+11 dict begin\n\ -+/PaintType 1 def\n\ -+/PatternType 1 def\n\ -+/TilingType 1 def\n\ -+/BBox [0 0 1 1] def\n\ -+/XStep 1 def\n\ -+/YStep 1 def\n\ -+/PatWidth 1 def\n\ -+/PatHeight 1 def\n\ -+/Multi 2 def\n\ -+/PaintData [\n\ -+ { clippath } bind\n\ -+ { 32 32 true [ 32 0 0 -32 0 32 ]\n\ -+ {<003fff000040008000800040010000200200001004000008\n\ -+ 080000041000000220000001400000008000000080000000\n\ -+ 800000008000000080000000800000008000000080000000\n\ -+ 800000008000000080000000800000008000000080000000\n\ -+ 400000012000000210000004080000080400001002000020\n\ -+ 0100004000800080>}\n\ -+ imagemask } bind\n\ -+] def\n\ -+/PaintProc {\n\ -+ pop\n\ -+ exec fill\n\ -+} def\n\ -+currentdict\n\ -+end\n\ - /P20 exch def\n\ - " - #define FILL_PAT21 "\ - % horizontal sawtooth lines\n\ --<<\n\ -- /PatternType 1\n\ -- /PaintType 2\n\ -- /TilingType 1\n\ -- /BBox [0 0 8 8]\n\ -- /XStep 8\n\ -- /YStep 8\n\ -- /PaintProc\n\ -- {\n\ -- pop\n\ -- .8 setlinewidth 0 setlinejoin newpath\n\ -- -1 3 moveto 1 -1 rlineto 4 4 rlineto 4 -4 rlineto 1 1 rlineto stroke\n\ -- } bind\n\ --\n\ -->>\n\ --\n\ --matrix\n\ --makepattern\n\ -+11 dict begin\n\ -+/PaintType 1 def\n\ -+/PatternType 1 def\n\ -+/TilingType 1 def\n\ -+/BBox [0 0 1 1] def\n\ -+/XStep 1 def\n\ -+/YStep 1 def\n\ -+/PatWidth 1 def\n\ -+/PatHeight 1 def\n\ -+/Multi 2 def\n\ -+/PaintData [\n\ -+ { clippath } bind\n\ -+ { 32 16 true [ 32 0 0 -16 0 16 ]\n\ -+ {<000000000000000000000000000000000000000000000000\n\ -+ 000000000100010002800280044004400820082010101010\n\ -+ 20082008400440048002800200010001>}\n\ -+ imagemask } bind\n\ -+] def\n\ -+/PaintProc {\n\ -+ pop\n\ -+ exec fill\n\ -+} def\n\ -+currentdict\n\ -+end\n\ - /P21 exch def\n\ - " - #define FILL_PAT22 "\ - % vertical sawtooth lines\n\ --<<\n\ -- /PatternType 1\n\ -- /PaintType 2\n\ -- /TilingType 1\n\ -- /BBox [0 0 8.5 8]\n\ -- /XStep 8\n\ -- /YStep 8\n\ -- /PaintProc\n\ -- {\n\ -- pop\n\ -- .8 setlinewidth 0 setlinejoin newpath\n\ -- 3 -1 moveto -1 1 rlineto 4 4 rlineto -4 4 rlineto 1 1 rlineto stroke\n\ -- } bind\n\ --\n\ -->>\n\ --\n\ --matrix\n\ --makepattern\n\ -+11 dict begin\n\ -+/PaintType 1 def\n\ -+/PatternType 1 def\n\ -+/TilingType 1 def\n\ -+/BBox [0 0 1 1] def\n\ -+/XStep 1 def\n\ -+/YStep 1 def\n\ -+/PatWidth 1 def\n\ -+/PatHeight 1 def\n\ -+/Multi 2 def\n\ -+/PaintData [\n\ -+ { clippath } bind\n\ -+ { 16 32 true [ 16 0 0 -32 0 32 ]\n\ -+ {<400020001000080004000200010000800100020004000800\n\ -+ 100020004000800040002000100008000400020001000080\n\ -+ 01000200040008001000200040008000>}\n\ -+ imagemask } bind\n\ -+] def\n\ -+/PaintProc {\n\ -+ pop\n\ -+ exec fill\n\ -+} def\n\ -+currentdict\n\ -+end\n\ - /P22 exch def\n\ - " - diff --git a/fig2dev-3.2.6a-RGBFILE.patch b/fig2dev-3.2.6a-RGBFILE.patch index 90ec7c0..04885f7 100644 --- a/fig2dev-3.2.6a-RGBFILE.patch +++ b/fig2dev-3.2.6a-RGBFILE.patch @@ -1,18 +1,11 @@ From: Roland Rosenfeld Subject: rgb.txt can not be located via FIG2DEV_RGBFILE environment variable. - This allows to run the test suite without the package being installed before. + This allows one to run the test suite without the package being + installed before. --- a/fig2dev/colors.c +++ b/fig2dev/colors.c -@@ -27,6 +27,7 @@ - #include "pi.h" - - #include "fig2dev.h" -+#include - - struct color_db { - char *name; -@@ -108,10 +109,15 @@ read_colordb(void) +@@ -110,10 +110,15 @@ read_colordb(void) char s[100], s1[100], *c1, *c2; unsigned short r,g,b; struct color_db *col; diff --git a/fig2dev-3.2.6a-input-sanitizing.patch b/fig2dev-3.2.6a-input-sanitizing.patch deleted file mode 100644 index 41d36b2..0000000 --- a/fig2dev-3.2.6a-input-sanitizing.patch +++ /dev/null @@ -1,41 +0,0 @@ -Description: Some input sanitizing when reading FIG files. -Bug-Debian: https://bugs.debian.org/881143 -Bug-Debian: https://bugs.debian.org/881144 -Author: Thomas Loimer - ---- a/fig2dev/read.c -+++ b/fig2dev/read.c -@@ -1329,8 +1329,14 @@ read_textobject(FILE *fp) - | PSFONT_TEXT; - - /* keep the font number reasonable */ -- if (t->font > MAXFONT(t)) -+ if (t->font > MAXFONT(t)) { - t->font = MAXFONT(t); -+ } else if (t->font < 0 ) { -+ if (psfont_text(t) && t->font < -1) -+ t->font = -1; -+ else -+ t->font = 0; -+ } - fix_and_note_color(&t->color); - t->comments = attach_comments(); /* attach any comments */ - return t; ---- a/fig2dev/read1_3.c -+++ b/fig2dev/read1_3.c -@@ -470,6 +470,15 @@ read_textobject(FILE *fp) - free((char*) t); - return(NULL); - } -+ /* keep the font number within valid range */ -+ if (t->font > MAXFONT(t)) { -+ t->font = MAXFONT(t); -+ } else if (t->font < 0 ) { -+ if (psfont_text(t) && t->font < -1) -+ t->font = -1; -+ else -+ t->font = 0; -+ } - (void)strcpy(t->cstring, buf); - if (t->size == 0) t->size = 18; - return(t); diff --git a/fig2dev-3.2.6a-style-overflow.patch b/fig2dev-3.2.6a-style-overflow.patch deleted file mode 100644 index e954cc7..0000000 --- a/fig2dev-3.2.6a-style-overflow.patch +++ /dev/null @@ -1,47 +0,0 @@ -Description: Sanitize input of fill patterns. -Bug-Debian: https://bugs.debian.org/881396 -Author: Thomas Loimer - ---- a/fig2dev/read.c -+++ b/fig2dev/read.c -@@ -71,6 +71,8 @@ static int save_comment(void); - - #define FILL_CONVERT(f) ((v2_flag || (f) < WHITE_FILL) \ - ? (v30_flag? f: (f-1)) : 20 - ((f)-1)*5) -+#define FILL_SANITIZE(f) ((f) < UNFILLED || (f) >= \ -+ NUMSHADES + NUMTINTS + NUMPATTERNS) ? UNFILLED : f - - /* input buffer size */ - #define BUF_SIZE 1024 -@@ -547,6 +549,7 @@ read_arcobject(FILE *fp) - } - a->thickness *= round(THICK_SCALE); - a->fill_style = FILL_CONVERT(a->fill_style); -+ a->fill_style = FILL_SANITIZE(a->fill_style); - NOTE_FILL(a); - fix_and_note_color(&a->pen_color); - if (fa) { -@@ -730,6 +733,7 @@ read_ellipseobject(void) - fix_and_note_color(&e->pen_color); - e->thickness *= round(THICK_SCALE); - e->fill_style = FILL_CONVERT(e->fill_style); -+ e->fill_style = FILL_SANITIZE(e->fill_style); - NOTE_FILL(e); - e->comments = attach_comments(); /* attach any comments */ - return e; -@@ -895,6 +899,7 @@ read_lineobject(FILE *fp) - l->radius *= round(THICK_SCALE); - l->thickness *= round(THICK_SCALE); - l->fill_style = FILL_CONVERT(l->fill_style); -+ l->fill_style = FILL_SANITIZE(l->fill_style); - NOTE_FILL(l); - fix_and_note_color(&l->pen_color); - if (fa) { -@@ -1051,6 +1056,7 @@ read_splineobject(FILE *fp) - } - s->thickness *= round(THICK_SCALE); - s->fill_style = FILL_CONVERT(s->fill_style); -+ s->fill_style = FILL_SANITIZE(s->fill_style); - NOTE_FILL(s); - fix_and_note_color(&s->pen_color); - if (fa) { diff --git a/fig2dev-3.2.6a.tar.xz b/fig2dev-3.2.6a.tar.xz deleted file mode 100644 index 732d96f..0000000 --- a/fig2dev-3.2.6a.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5e61a3d9a4f83db4b3199ee82dd54bb65b544369f1e8e38a2606c44cf71667a7 -size 507820 diff --git a/fig2dev-3.2.7a.tar.xz b/fig2dev-3.2.7a.tar.xz new file mode 100644 index 0000000..8af3318 --- /dev/null +++ b/fig2dev-3.2.7a.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bda219a15efcdb829e6cc913a4174f5a4ded084bf91565c783733b34a89bfb28 +size 507288 diff --git a/transfig-3.2.6.dif b/transfig-3.2.6.dif index 85b4560..5d7dbd1 100644 --- a/transfig-3.2.6.dif +++ b/transfig-3.2.6.dif @@ -1,80 +1,83 @@ --- - fig2dev/dev/genps.c | 26 +++++++++++++++++++++++--- + fig2dev/dev/genps.c | 29 ++++++++++++++++++++++++----- fig2dev/dev/genpstex.c | 8 ++++++-- fig2dev/fig2ps2tex.csh | 2 +- - fig2dev/getopt.c | 10 ++++++++++ + fig2dev/getopt.c | 9 +++++++++ transfig/transfig.c | 2 ++ - 5 files changed, 42 insertions(+), 6 deletions(-) + 5 files changed, 42 insertions(+), 8 deletions(-) --- fig2dev/dev/genps.c -+++ fig2dev/dev/genps.c 2017-02-02 13:47:11.888588548 +0000 -@@ -56,6 +56,7 @@ ++++ fig2dev/dev/genps.c 2018-05-07 08:16:40.161130640 +0000 +@@ -59,6 +59,7 @@ #include #endif #include +#include - #include "bool.h" #include "pi.h" -@@ -801,8 +802,9 @@ genps_start(F_compound *objects) + #include "fig2dev.h" /* includes "bool.h" */ +@@ -842,8 +843,9 @@ genps_start(F_compound *objects) fprintf(tfp, "%s\n", SPLINE_PS); #ifdef I18N if (support_i18n && iso_text_exist(objects)) { -- char *libdir, *locale; -+ char *libdir, *locale, *codeset; - char localefile[512], str[512]; -+ size_t llen; - FILE *fp; - libdir = getenv("FIG2DEV_LIBDIR"); +- char *libdir, *locale; ++ char *libdir, *locale, *codeset; + char localefile[512], str[512]; ++ size_t llen; + FILE *fp; + libdir = getenv("FIG2DEV_LIBDIR"); #ifdef I18N_DATADIR -@@ -810,16 +812,34 @@ genps_start(F_compound *objects) - libdir = I18N_DATADIR; +@@ -851,18 +853,35 @@ genps_start(F_compound *objects) + libdir = I18N_DATADIR; #endif - locale = setlocale(LC_CTYPE, NULL); -+ llen = strcspn(locale, ".@"); -+ codeset = nl_langinfo(CODESET); - if (locale == NULL) { - fprintf(stderr, "fig2dev: LANG not defined; assuming C locale\n"); - locale = "C"; - } -- sprintf(localefile, "%s/%s.ps", libdir, locale); -+ snprintf(localefile, sizeof(localefile)-1, "%s/%s.ps", libdir, locale); - /* get filename like ``/usr/local/lib/fig2dev/japanese.ps'' */ - fp = fopen(localefile, "rb"); - if (fp == NULL) { - fprintf(stderr, "fig2dev: can't open file: %s\n", localefile); -- } else { -+ } -+ if (fp == NULL && strlen(locale) != llen) { -+ locale[llen] = '\0'; -+ /* get filename like ``/usr/local/lib/fig2dev/de_DE.ps'' */ -+ snprintf(localefile, sizeof(localefile)-1, "%s/%s.ps", libdir, locale); -+ fp = fopen(localefile, "rb"); -+ if (fp == NULL) -+ fprintf(stderr, "fig2dev: B can't open file: %s\n", localefile); -+ } -+ if (fp == NULL && codeset) { -+ /* get filename like ``/usr/local/lib/fig2dev/ISO-8859-9.ps'' */ -+ snprintf(localefile, sizeof(localefile)-1, "%s/%s.ps", libdir, codeset); -+ fp = fopen(localefile, "rb"); -+ if (fp == NULL) -+ fprintf(stderr, "fig2dev: C can't open file: %s\n", localefile); -+ } -+ if (fp) { - while (fgets(str, sizeof(str), fp)) { - if (strstr(str, "CompositeRoman")) enable_composite_font = true; - fputs(str, tfp); + locale = setlocale(LC_CTYPE, NULL); ++ llen = strcspn(locale, ".@"); ++ codeset = nl_langinfo(CODESET); + if (locale == NULL) { + fprintf(stderr, + "fig2dev: LANG not defined; assuming C locale\n"); + locale = "C"; + } +- sprintf(localefile, "%s/%s.ps", libdir, locale); ++ snprintf(localefile, sizeof(localefile)-1, "%s/%s.ps", libdir, locale); + /* get filename like ``/usr/local/lib/fig2dev/japanese.ps'' */ + fp = fopen(localefile, "rb"); + if (fp == NULL) { +- fprintf(stderr, "fig2dev: can not open file: %s\n", +- localefile); +- } else { ++ fprintf(stderr, "fig2dev: can not open file: %s\n", localefile); ++ } ++ if (fp == NULL && strlen(locale) != llen) { ++ locale[llen] = '\0'; ++ /* get filename like ``/usr/local/lib/fig2dev/de_DE.ps'' */ ++ snprintf(localefile, sizeof(localefile)-1, "%s/%s.ps", libdir, locale); ++ fp = fopen(localefile, "rb"); ++ if (fp == NULL) ++ fprintf(stderr, "fig2dev: B can't open file: %s\n", localefile); ++ } ++ if (fp == NULL && codeset) { ++ /* get filename like ``/usr/local/lib/fig2dev/ISO-8859-9.ps'' */ ++ snprintf(localefile, sizeof(localefile)-1, "%s/%s.ps", libdir, codeset); ++ fp = fopen(localefile, "rb"); ++ if (fp == NULL) ++ fprintf(stderr, "fig2dev: C can't open file: %s\n", localefile); ++ } ++ if (fp) { + while (fgets(str, sizeof(str), fp)) { + if (strstr(str, "CompositeRoman")) + enable_composite_font = true; --- fig2dev/dev/genpstex.c -+++ fig2dev/dev/genpstex.c 2017-02-02 13:47:38.580050694 +0000 -@@ -44,6 +44,7 @@ ++++ fig2dev/dev/genpstex.c 2018-05-07 08:10:27.872048970 +0000 +@@ -47,6 +47,7 @@ #include #include #include +#include - #include "bool.h" #include "fig2dev.h" -@@ -61,10 +62,13 @@ extern void + #include "object.h" /* does #include */ +@@ -63,10 +64,13 @@ extern void genps_spline(F_spline *s), genlatex_option(char opt, char *optarg), genlatex_text(F_text *t), @@ -91,19 +94,19 @@ extern void genpdf_option(char opt, char *optarg); /* genpdf.c */ extern void genpdf_start(F_compound *objects); /* genpdf.c */ --- fig2dev/fig2ps2tex.csh -+++ fig2dev/fig2ps2tex.csh 2017-02-02 13:43:20.089154382 +0000 -@@ -21,7 +21,7 @@ - # ++++ fig2dev/fig2ps2tex.csh 2018-05-07 08:11:38.206742453 +0000 +@@ -22,7 +22,7 @@ # 2016-07-07 Thomas Loimer # * use here-document, instead of echo + # - -+set echo_style=bsd ++set echo_style = bsd set bbox = `grep "^%%BoundingBox:" $1` set xsp = `echo "3k $bbox[4] $bbox[2] - 72 / p" | dc` --- fig2dev/getopt.c -+++ fig2dev/getopt.c 2017-02-02 13:43:20.089154382 +0000 -@@ -45,6 +45,7 @@ static char sccsfid[] = "@(#) getopt.c 5 ++++ fig2dev/getopt.c 2018-05-07 08:13:44.400397232 +0000 +@@ -48,6 +48,7 @@ static char sccsfid[] = "@(#) getopt.c 5 #define EMSG "" #define ENDARGS "--" @@ -111,9 +114,9 @@ /* * get option letter from argument vector */ -@@ -89,3 +90,12 @@ fig_getopt(int nargc, char **nargv, char +@@ -94,3 +95,11 @@ fig_getopt(int nargc, char **nargv, char } - return(optc); /* dump back option letter */ + return optc; /* dump back option letter */ } +#else +#include @@ -123,9 +126,8 @@ + return getopt(nargc, nargv, ostr); +} +#endif -+ --- transfig/transfig.c -+++ transfig/transfig.c 2017-02-02 13:43:20.089154382 +0000 ++++ transfig/transfig.c 2018-05-07 08:01:42.105796359 +0000 @@ -26,6 +26,8 @@ #include diff --git a/transfig-fix-afl.patch b/transfig-fix-afl.patch index 7ea52c6..22fee79 100644 --- a/transfig-fix-afl.patch +++ b/transfig-fix-afl.patch @@ -1,53 +1,32 @@ -Index: transfig.3.2.5e/fig2dev/read1_3.c -=================================================================== --- - fig2dev-3.2.6a/fig2dev/alloc.h | 20 ++++++++++---------- - fig2dev-3.2.6a/fig2dev/read1_3.c | 2 ++ - 2 files changed, 12 insertions(+), 10 deletions(-) + fig2dev-3.2.7a/fig2dev/alloc.h | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) ---- fig2dev-3.2.6a/fig2dev/alloc.h -+++ fig2dev-3.2.6a/fig2dev/alloc.h 2017-02-02 13:53:24.529089166 +0000 -@@ -13,15 +13,15 @@ - * notice remain intact. +--- fig2dev-3.2.7a/fig2dev/alloc.h ++++ fig2dev-3.2.7a/fig2dev/alloc.h 2018-05-07 08:49:32.048501663 +0000 +@@ -16,15 +16,15 @@ + * */ --#define Line_malloc(z) z = (F_line*)malloc(LINOBJ_SIZE) --#define Pic_malloc(z) z = (F_pic*)malloc(PIC_SIZE) --#define Spline_malloc(z) z = (F_spline*)malloc(SPLOBJ_SIZE) --#define Ellipse_malloc(z) z = (F_ellipse*)malloc(ELLOBJ_SIZE) --#define Arc_malloc(z) z = (F_arc*)malloc(ARCOBJ_SIZE) --#define Compound_malloc(z) z = (F_compound*)malloc(COMOBJ_SIZE) --#define Text_malloc(z) z = (F_text*)malloc(TEXOBJ_SIZE) --#define Point_malloc(z) z = (F_point*)malloc(POINT_SIZE) --#define Control_malloc(z) z = (F_control*)malloc(CONTROL_SIZE) --#define Arrow_malloc(z) z = (F_arrow*)malloc(ARROW_SIZE) -+#define Line_malloc(z) z = (F_line*)calloc(LINOBJ_SIZE,1) -+#define Pic_malloc(z) z = (F_pic*)calloc(PIC_SIZE,1) -+#define Spline_malloc(z) z = (F_spline*)calloc(SPLOBJ_SIZE,1) -+#define Ellipse_malloc(z) z = (F_ellipse*)calloc(ELLOBJ_SIZE,1) -+#define Arc_malloc(z) z = (F_arc*)calloc(ARCOBJ_SIZE,1) -+#define Compound_malloc(z) z = (F_compound*)calloc(COMOBJ_SIZE,1) -+#define Text_malloc(z) z = (F_text*)calloc(TEXOBJ_SIZE,1) -+#define Point_malloc(z) z = (F_point*)calloc(POINT_SIZE,1) -+#define Control_malloc(z) z = (F_control*)calloc(CONTROL_SIZE,1) -+#define Arrow_malloc(z) z = (F_arrow*)calloc(ARROW_SIZE,1) +-#define Line_malloc(z) z = malloc(LINOBJ_SIZE) +-#define Pic_malloc(z) z = malloc(PIC_SIZE) +-#define Spline_malloc(z) z = malloc(SPLOBJ_SIZE) +-#define Ellipse_malloc(z) z = malloc(ELLOBJ_SIZE) +-#define Arc_malloc(z) z = malloc(ARCOBJ_SIZE) +-#define Compound_malloc(z) z = malloc(COMOBJ_SIZE) +-#define Text_malloc(z) z = malloc(TEXOBJ_SIZE) +-#define Point_malloc(z) z = malloc(POINT_SIZE) +-#define Control_malloc(z) z = malloc(CONTROL_SIZE) +-#define Arrow_malloc(z) z = malloc(ARROW_SIZE) ++#define Line_malloc(z) z = calloc(LINOBJ_SIZE,1) ++#define Pic_malloc(z) z = calloc(PIC_SIZE,1) ++#define Spline_malloc(z) z = calloc(SPLOBJ_SIZE,1) ++#define Ellipse_malloc(z) z = calloc(ELLOBJ_SIZE,1) ++#define Arc_malloc(z) z = calloc(ARCOBJ_SIZE,1) ++#define Compound_malloc(z) z = calloc(COMOBJ_SIZE,1) ++#define Text_malloc(z) z = calloc(TEXOBJ_SIZE,1) ++#define Point_malloc(z) z = calloc(POINT_SIZE,1) ++#define Control_malloc(z) z = calloc(CONTROL_SIZE,1) ++#define Arrow_malloc(z) z = calloc(ARROW_SIZE,1) extern char Err_mem[]; ---- fig2dev-3.2.6a/fig2dev/read1_3.c -+++ fig2dev-3.2.6a/fig2dev/read1_3.c 2017-02-02 13:53:24.529089166 +0000 -@@ -343,6 +343,7 @@ read_lineobject(FILE *fp) - l->back_arrow = NULL; - l->next = NULL; - l->points = Point_malloc(p); -+ l->points->next = NULL; - n = fscanf(fp, " %d %d %d %lf %d %d %d %d %d %d", &t, - &l->style, &l->thickness, &l->style_val, - &f, &b, &h, &w, &p->x, &p->y); -@@ -401,6 +402,7 @@ read_splineobject(FILE *fp) - s->controls = NULL; - s->next = NULL; - s->points = Point_malloc(p); -+ s->points->next = NULL; - n = fscanf(fp, " %d %d %d %lf %d %d %d %d %d %d", - &t, &s->style, &s->thickness, &s->style_val, - &f, &b, diff --git a/transfig.3.2.5d-mediaboxrealnb.dif b/transfig.3.2.5d-mediaboxrealnb.dif index 2842f41..739c069 100644 --- a/transfig.3.2.5d-mediaboxrealnb.dif +++ b/transfig.3.2.5d-mediaboxrealnb.dif @@ -3,21 +3,22 @@ 1 file changed, 8 insertions(+), 2 deletions(-) --- fig2dev/dev/readeps.c -+++ fig2dev/dev/readeps.c 2017-02-02 13:52:46.733848874 +0000 -@@ -75,16 +75,22 @@ read_eps_pdf(FILE *file, int filetype, F - while (fgets(buf, 512, file) != NULL) { ++++ fig2dev/dev/readeps.c 2018-05-07 08:45:37.772825723 +0000 +@@ -83,9 +83,11 @@ read_eps_pdf(FILE *file, int filetype, F + while (fgets(buf, BUFSIZ, file) != NULL) { /* look for /MediaBox for pdf file */ if (pdf_flag) { + char *s; + for(s=buf; (s=strchr(s,'/')); s++) { - if (!strncmp(buf, "/MediaBox", 8)) { /* look for the MediaBox spec */ -- c = strchr(buf,'[')+1; -- if (c && sscanf(c,"%d %d %d %d",llx,lly,&urx,&ury) < 4) { -+ c = strchr(s,'['); -+ if (c && sscanf(c+1,"%d %d %d %d",llx,lly,&urx,&ury) < 4) { + if (!strncmp(buf, "/MediaBox", 9)) { /* look for the MediaBox spec */ +- c = strchr(buf, '[') + 1; +- if (c && sscanf(c, "%d %d %d %d", llx, lly, &urx, &ury) < 4) ++ c = strchr(s, '['); ++ if (c && sscanf(c+1, "%d %d %d %d", llx, lly, &urx, &ury) < 4) + { *llx = *lly = 0; urx = paperdef[0].width*72; - ury = paperdef[0].height*72; +@@ -93,7 +95,11 @@ read_eps_pdf(FILE *file, int filetype, F put_msg("Bad MediaBox in imported PDF file %s, assuming %s size", pic->file, metric? "A4" : "Letter" ); } @@ -28,4 +29,4 @@ + } /* look for bounding box for EPS file */ } else if (!nested && !strncmp(buf, "%%BoundingBox:", 14)) { - c=buf+14; + c = buf + 14; diff --git a/transfig.changes b/transfig.changes index 3ef6b23..860e71e 100644 --- a/transfig.changes +++ b/transfig.changes @@ -1,3 +1,59 @@ +------------------------------------------------------------------- +Mon May 7 10:28:07 UTC 2018 - werner@suse.de + +- Update to fig2dev version 3.2.7a (Patchlevel 7a (April 2018)) + o Language previous option current option + ------------------------------------------------------------ + cgm -b dummy -a + epic -A scale -d scale + eepic -A scale -d scale + eepicemu -A scale -d scale + gbx -i on|off -v + ibmgl -m mag,xoff,yoff -m mag -x xoff -y yoff + mp -I file -d file + ps -S dummy -o + o Print language-specific help text by using fig2dev -L lang -h. + o Add option -M, multipage, for MetaPost output language. + o Add option -P, pagemode, and -z to choose a pagesize for pdf output. + o Add option -W (scaling of figures not possible) for tikz. + o Add option -b, border width, for LaTeX output language. + o Add option -f for pstex_t and pdftex_t output language. + o Add uk_UA and ru_RU encodings for PostScript output. Ticket #12. + o Fix regression whereupon flipped ellipses were not read. Ticket #23. + o Distribute i18n files ru_RU.CP1251.ps and uk_UA.KOI8-U.ps. + o Make test "survive debian bug #890016" succeed on 32 bit systems. + o Distribute the X bitmaps files within fig2dev, no need to install + these files. The files were needed for Tk and Perl/Tk output. + o Add option -w, wrap (create stand-alone perl file) for Perl/Tk output. + o Update help text: Output help for dxf and textyl output language, + add description of -g option for Tk/Tcl and Perl/Tk output, allow -f + option for pstex_t and pdftex_t output language. + o Sanitize input. Do not segfault on malformed input files. Fixes debian + bugs 881143, 881144, 881396, 890015, 890016, 882021 and also 882022. + o Do not put an %%Orientation: comment into PostScript output. Some + viewers would rotate the resulting file, others not. + o Fix build on NetBSD, which has a _setmode() function different from + _setmode() on Windows. Ticket #17. Also, avoid alloca(). Ticket #16. + o tikz output: Omit the semicolon after \pgftext[..]{...};. + o Define PostScript patterns with larger tiles, may render better. #13 + o Fix build in case libXpm is missing. Ticket #15. + o Use netpbm programs instead of ghostscript, to produce smaller files. + o Correctly embed eps files with binary preview (epsi, typically + found on Microsoft systems). Also, allow to embed ps-files. Fixes + debian bug 248807, ticket #8. + o For compilation, do not depend on PATH_MAX being defined. +- Remove patches now upstream + fig2dev-3.2.6-genps_oldpatterns.patch + fig2dev-3.2.6a-input-sanitizing.patch + fig2dev-3.2.6a-style-overflow.patch +- Modify patches + fig2dev-3.2.6-fig2mpdf-doc.patch + fig2dev-3.2.6-fig2mpdf.patch + fig2dev-3.2.6a-RGBFILE.patch + transfig-3.2.6.dif + transfig-fix-afl.patch + transfig.3.2.5d-mediaboxrealnb.dif + ------------------------------------------------------------------- Fri Mar 2 15:40:14 UTC 2018 - crrodriguez@opensuse.org diff --git a/transfig.spec b/transfig.spec index e9b2c76..5590c22 100644 --- a/transfig.spec +++ b/transfig.spec @@ -45,7 +45,7 @@ Requires: ghostscript-fonts-std Requires: ghostscript-library Requires: netpbm Requires: texlive-epstopdf -Version: 3.2.6a +Version: 3.2.7a Release: 0 Summary: Graphic Converter #Source: http://sourceforge.net/projects/mcj/files/fig2dev-%{version}.tar.xz/download#/fig2dev-%{version}.tar.xz @@ -56,13 +56,10 @@ Patch0: transfig-3.2.6.dif Patch2: transfig.3.2.5-binderman.dif Patch3: transfig.3.2.5d-mediaboxrealnb.dif Patch4: transfig-fix-afl.patch -Patch42: fig2dev-3.2.6-genps_oldpatterns.patch Patch43: fig2dev-3.2.6-fig2mpdf.patch Patch44: fig2dev-3.2.6-fig2mpdf-doc.patch Patch45: fig2dev-3.2.6a-RGBFILE.patch Patch46: fig2dev-3.2.6a-man-typo.patch -Patch47: fig2dev-3.2.6a-input-sanitizing.patch -Patch48: fig2dev-3.2.6a-style-overflow.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %{expand: %%global _exec_prefix %(type -p pkg-config &>/dev/null && pkg-config --variable prefix x11 || echo /usr/X11R6)} %if "%_exec_prefix" == "/usr/X11R6" @@ -103,13 +100,10 @@ find -type f | xargs -r chmod a-x,go-w %patch2 -p0 -b .bm %patch3 -p0 -b .mbox %patch4 -p1 -b .afl -%patch42 -p2 -b .oldp %patch43 -p2 -b .mpdf %patch44 -p1 -b .mpdfdoc %patch45 -p1 -b .p45 %patch46 -p1 -b .p46 -%patch47 -p1 -b .p47 -%patch48 -p1 -b .p48 %build CC=gcc