summaryrefslogtreecommitdiff
path: root/print/ghostscript-gpl/files
diff options
context:
space:
mode:
authorYing-Chieh Liao <ijliao@FreeBSD.org>2002-04-27 18:21:21 +0000
committerYing-Chieh Liao <ijliao@FreeBSD.org>2002-04-27 18:21:21 +0000
commit86c37e0bf7207d64ddf53feb9a9d82023d3794b0 (patch)
treecb1df2eb1fc82bc43280020f1efb6f9b91ab9cf5 /print/ghostscript-gpl/files
parentUpdate to 1.9 (diff)
- Update Gimp-Print driver to version 4.2.1
- Fix build on -current - Fix checksum of gdevdj9.c.gz (again) - Get much improved ps2epsi stuff from ghostscript-gnu version PR: 37500 Submitted by: Ports Fury
Notes
Notes: svn path=/head/; revision=58241
Diffstat (limited to 'print/ghostscript-gpl/files')
-rw-r--r--print/ghostscript-gpl/files/patch-eplaser:gdevescv.c18
-rw-r--r--print/ghostscript-gpl/files/patch-eplaser:gdevesmv.c18
-rw-r--r--print/ghostscript-gpl/files/patch-lib:ps2epsi27
-rw-r--r--print/ghostscript-gpl/files/patch-lib:ps2epsi.ps202
-rw-r--r--print/ghostscript-gpl/files/patch-src:dviprlib.c20
5 files changed, 257 insertions, 28 deletions
diff --git a/print/ghostscript-gpl/files/patch-eplaser:gdevescv.c b/print/ghostscript-gpl/files/patch-eplaser:gdevescv.c
index b1b6fc57f0c0..dbc3f4a109a9 100644
--- a/print/ghostscript-gpl/files/patch-eplaser:gdevescv.c
+++ b/print/ghostscript-gpl/files/patch-eplaser:gdevescv.c
@@ -1,6 +1,16 @@
--- eplaser/gdevescv.c.orig Fri Dec 21 15:50:22 2001
-+++ eplaser/gdevescv.c Fri Mar 15 04:27:39 2002
-@@ -1760,13 +1760,13 @@
++++ eplaser/gdevescv.c Sat Apr 27 13:45:53 2002
+@@ -37,8 +37,7 @@
+
+ */
+
+-#include <stdlib.h>
+-#include <unistd.h>
++#include <string.h>
+
+ #include "math_.h"
+ #include "gx.h"
+@@ -1760,13 +1759,13 @@
/* Process the next piece of an image. */
private int
@@ -16,7 +26,7 @@
gx_device *dev = info->dev;
#endif
gx_device_vector *const vdev = (gx_device_vector *) dev;
-@@ -1784,7 +1784,7 @@
+@@ -1784,7 +1783,7 @@
{
@@ -25,7 +35,7 @@
if (height == 260)
height = 1;
#endif
-@@ -1922,13 +1922,13 @@
+@@ -1922,13 +1921,13 @@
private int
diff --git a/print/ghostscript-gpl/files/patch-eplaser:gdevesmv.c b/print/ghostscript-gpl/files/patch-eplaser:gdevesmv.c
index 8764eb63292f..bce92ff8358c 100644
--- a/print/ghostscript-gpl/files/patch-eplaser:gdevesmv.c
+++ b/print/ghostscript-gpl/files/patch-eplaser:gdevesmv.c
@@ -1,6 +1,16 @@
--- eplaser/gdevesmv.c.orig Fri Dec 14 10:50:14 2001
-+++ eplaser/gdevesmv.c Fri Mar 15 04:28:41 2002
-@@ -1799,13 +1799,13 @@
++++ eplaser/gdevesmv.c Sat Apr 27 13:46:31 2002
+@@ -34,8 +34,7 @@
+
+ */
+
+-#include <stdlib.h>
+-#include <unistd.h>
++#include <string.h>
+
+ #include "math_.h"
+ #include "gx.h"
+@@ -1799,13 +1798,13 @@
/* Process the next piece of an image. */
private int
@@ -16,7 +26,7 @@
gx_device *dev = info->dev;
#endif
gx_device_vector *const vdev = (gx_device_vector *) dev;
-@@ -1823,7 +1823,7 @@
+@@ -1823,7 +1822,7 @@
{
@@ -25,7 +35,7 @@
if (height == 260)
height = 1;
#endif
-@@ -1980,13 +1980,13 @@
+@@ -1980,13 +1979,13 @@
private int
diff --git a/print/ghostscript-gpl/files/patch-lib:ps2epsi b/print/ghostscript-gpl/files/patch-lib:ps2epsi
new file mode 100644
index 000000000000..06389642bb93
--- /dev/null
+++ b/print/ghostscript-gpl/files/patch-lib:ps2epsi
@@ -0,0 +1,27 @@
+--- lib/ps2epsi.orig Sat Jun 23 01:09:22 2001
++++ lib/ps2epsi Tue Apr 23 05:18:24 2002
+@@ -1,5 +1,5 @@
+ #!/bin/sh
+-# $Id: ps2epsi,v 1.7 2001/06/22 16:09:22 lpd Exp $
++# $Id: ps2epsi,v 1.7.2.1 2002/04/22 20:18:24 giles Exp $
+
+ tmpfile=/tmp/ps2epsi$$
+
+@@ -58,7 +58,8 @@
+ cat << BEGINEPS
+ save countdictstack mark newpath /showpage {} def /setpagedevice {pop} def
+ %%EndProlog
+-%%Page 1 1
++%%Page: 1 1
++%%BeginDocument: ${infile}
+ BEGINEPS
+
+ cat "${infile}" |
+@@ -66,6 +67,7 @@
+ -e '/^%%[A-Za-z][A-Za-z]*[^!-~]*$/d' -e '/^%%[A-Za-z][A-Za-z]*: /d'
+
+ cat << ENDEPS
++%%EndDocument
+ %%Trailer
+ cleartomark countdictstack exch sub { end } repeat restore
+ %%EOF
diff --git a/print/ghostscript-gpl/files/patch-lib:ps2epsi.ps b/print/ghostscript-gpl/files/patch-lib:ps2epsi.ps
index 8e150354428c..19ccc7d0b022 100644
--- a/print/ghostscript-gpl/files/patch-lib:ps2epsi.ps
+++ b/print/ghostscript-gpl/files/patch-lib:ps2epsi.ps
@@ -1,11 +1,203 @@
---- lib/ps2epsi.ps.orig Tue Jun 5 15:31:41 2001
-+++ lib/ps2epsi.ps Sat Apr 20 15:57:44 2002
-@@ -52,7 +52,7 @@
+--- lib/ps2epsi.ps.orig Wed Apr 4 13:45:42 2001
++++ lib/ps2epsi.ps Tue Apr 23 05:30:39 2002
+@@ -1,27 +1,31 @@
+-% Copyright (C) 1990, 2000 Aladdin Enterprises. All rights reserved.
++% Copyright (C) 1990-2002 artofcode LLC. All rights reserved.
+ %
+-% This file is part of AFPL Ghostscript.
++% This software is provided AS-IS with no warranty, either express or
++% implied.
+ %
+-% AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author or
+-% distributor accepts any responsibility for the consequences of using it, or
+-% for whether it serves any particular purpose or works at all, unless he or
+-% she says so in writing. Refer to the Aladdin Free Public License (the
+-% "License") for full details.
++% This software is distributed under license and may not be copied,
++% modified or distributed except as expressly authorized under the terms
++% of the license contained in the file LICENSE in this distribution.
+ %
+-% Every copy of AFPL Ghostscript must include a copy of the License, normally
+-% in a plain ASCII text file named PUBLIC. The License grants you the right
+-% to copy, modify and redistribute AFPL Ghostscript, but only under certain
+-% conditions described in the License. Among other things, the License
+-% requires that the copyright notice and this notice be preserved on all
+-% copies.
++% For more information about licensing, please refer to
++% http://www.ghostscript.com/licensing/. For information on
++% commercial licensing, go to http://www.artifex.com/licensing/ or
++% contact Artifex Software, Inc., 101 Lucas Valley Road #110,
++% San Rafael, CA 94903, U.S.A., +1(415)492-9861.
+
+-% $Id: ps2epsi.ps,v 1.5 2001/04/04 04:45:42 alexcher Exp $
++% $Id: ps2epsi.ps,v 1.5.2.3 2002/04/22 20:30:39 giles Exp $
+ % Convert an arbitrary PostScript file to an EPSI file.
+ %
+ % Please do not contact these users if you have questions. They no longer
+ % have the time, interest, or current expertise to keep this code working.
+ % If you find bugs, please send proposed fixes to bug-gs@aladdin.com.
+ %
++% Bug fix 2002-04-20 by rayjj: Bounding box was incorrect since it depended
++% on the dither pattern and gray shade at the boundary. Changed to use
++% 8-bit grayscale preview image to allow correct bounding box (at the
++% expense of a 8x larger preview image). Also moved .setsafe until after
++% the device and file operations are complete (but still before the input
++% file is processed.
+ % Bug fix 2000-04-11 by lpd: if a font didn't have a FontName (which is the
+ % case for bitmap fonts produced by recent versions of dvips), setfont
+ % caused an error.
+@@ -51,7 +55,6 @@
/ps2epsi
{ % Open the file
outfile (w) file /epsifile exch def
- //systemdict /.setsafe known { .setsafe } if
-+% //systemdict /.setsafe known { .setsafe } if
% Get the device parameters
- currentdevice getdeviceprops .dicttomark
+ currentdevice getdeviceprops .dicttomark
/HWSize get aload pop
+@@ -59,17 +62,23 @@
+ /devwidth exch def
+ matrix defaultmatrix
+ /devmatrix exch def
+- % Make a corresponding memory device
+- devmatrix devwidth devheight <ff 00>
++ % Make a corresponding 8-bit deep memory device
++ devmatrix devwidth devheight
++ 256 string 0 1 255 { 1 index exch dup 255 exch sub put } for
+ makeimagedevice
+ /arraydevice exch def
+- arraydevice setdevice % (does an erasepage)
+- /rowwidth devwidth 7 add 8 idiv def
++ arraydevice
++ % Turn on anti-aliasing
++ mark /TextAlphaBits 4 /GraphicsAlphaBits 4 6 -1 roll
++ putdeviceprops
++ setdevice % (does an erasepage)
++ /rowwidth devwidth def
+ /row rowwidth string def
+ /zerorow rowwidth string def % all zero
+ % Replace the definition of showpage
+ userdict /showpage { ps2edict begin epsipage end } bind put
+ userdict /setfont { ps2edict begin epsisetfont end } bind put
++ //systemdict /.setsafe known { .setsafe } if
+ } bind def
+
+ /epsifontdict 100 dict def
+@@ -125,8 +134,8 @@
+
+ % Initialise limit variables
+ /loopcount rowwidth 1 sub def
+- /lm loopcount def /lmb 0 def
+- /rm 0 def /rmb 0 def
++ /lm loopcount def
++ /rm 0 def
+
+ % Find left and right boundaries of image
+ tm 1 bm
+@@ -135,47 +144,29 @@
+ % Scan from left to find first non-zero element
+ % We save first the element, then the index
+ -1 0 1 loopcount
+- { dup row exch get dup 0 ne { exch exit }{ pop pop } ifelse
++ { dup row exch get 0 ne { exch pop exit }{ pop } ifelse
+ } for
+ % If we found -1, row is blank ..
+ dup -1 ne
+ { % Find the leftmost index
+ dup lm lt
+ % If the new index is less, we save index and element
+- { /lm exch def /lmb exch def }
+- % If the index is equal, we or the bits together
+- { lm eq { lmb or /lmb exch def }{ pop } ifelse
+- } ifelse
++ { /lm exch def } { pop } ifelse
+ % Now find the rightmost index
+ loopcount -1 0
+- { dup row exch get dup 0 ne { exch exit }{ pop pop } ifelse
++ { dup row exch get 0 ne { exit }{ pop } ifelse
+ } for
+ dup rm gt
+ % If the new index is greater, we save index and element
+- { /rm exch def /rmb exch def }
+- % If the index is equal, or the bits
+- { rm eq { rmb or /rmb exch def } { pop } ifelse
+- } ifelse
++ { /rm exch def } { pop } ifelse
+ } if
+- pop
+ } for
+
+- % Now we find the real left & right bit positions
+- 256 0 1 7
+- { exch 2 div dup lmb le { pop exit }{ exch pop } ifelse
+- } for
+- /lmb exch def
+-
+- 1 7 -1 0
+- { exch dup dup rmb and eq { pop exit }{ 2 mul exch pop } ifelse
+- } for
+- /rmb exch def
+-
+ % Calculate the bounding box values.
+ % Note that these must be corrected to produce closed-open intervals.
+- /llx lm 8 mul lmb add def
++ /llx lm def
+ /lly devheight bm sub 1 sub def
+- /urx rm 8 mul rmb add 1 add def
++ /urx rm 1 add def
+ /ury devheight tm sub def
+
+ % Write out the magic string and bounding box information
+@@ -206,38 +197,31 @@
+ epsifile lly write==only epsifile ( ) writestring
+ epsifile urx write==only epsifile ( ) writestring
+ epsifile ury write==
+- epsifile (%%BeginPreview: ) writestring
+- epsifile urx llx sub write==only epsifile ( ) writestring
+- epsifile bm tm sub 1 add write==only epsifile ( 1 ) writestring
+- epsifile bm tm sub 1 add write==
+- epsifile flushfile
+
+ % Define character and bit widths for the output line buffer:
+ /cwidth rm lm sub 1 add def
+- /bwidth cwidth 8 mul def
+- /owidth urx llx sub 7 add 8 idiv def
+ /out cwidth string def
+
+- % Create a 1-bit-high device for bitblt to align with the bbox
+- gsave
+- matrix cwidth 8 mul 1 <00 ff> makeimagedevice setdevice
++ epsifile (%%BeginPreview: ) writestring
++ epsifile cwidth write==only epsifile ( ) writestring
++ epsifile bm tm sub 1 add write==only epsifile ( 8 ) writestring
++ epsifile bm tm sub 1 add
++ cwidth 39 add 40 idiv mul write==
++ epsifile flushfile
+
+- % 'image' a zero string to clear the line device
+- bwidth 1 1 matrix cwidth string image
++ gsave
+
+ tm 1 bm
+ { % Get a scan line interval from the array device
+ arraydevice exch row copyscanlines lm cwidth getinterval
+- lmb 0 gt
+- { % 'image' it into the line device with the lmb offset
+- bwidth 1 1 [1 0 0 1 lmb 0] 5 -1 roll image
+- % Now we get the modified scan line
+- currentdevice 0 out copyscanlines 0 owidth getinterval
+- } if
+- % Write out the hex data
+- epsifile (% ) writestring
+- epsifile exch writehexstring
+- epsifile (\n) writestring
++ % Write out the hex data as 40 bytes per line (82 chars)
++ 0 40 cwidth
++ { epsifile (% ) writestring
++ epsifile exch 2 index exch
++ dup cwidth exch sub 40 .min getinterval writehexstring
++ epsifile (\n) writestring
++ } for
++ pop
+ } for
+
+ epsifile (%%EndImage\n) writestring
diff --git a/print/ghostscript-gpl/files/patch-src:dviprlib.c b/print/ghostscript-gpl/files/patch-src:dviprlib.c
index 1fc25e484764..67662665f273 100644
--- a/print/ghostscript-gpl/files/patch-src:dviprlib.c
+++ b/print/ghostscript-gpl/files/patch-src:dviprlib.c
@@ -1,23 +1,13 @@
---- src/dviprlib.c.orig Tue May 13 00:14:09 1997
-+++ src/dviprlib.c Thu Apr 4 03:18:57 2002
-@@ -1433,7 +1433,8 @@
+--- src/dviprlib.c.orig Tue May 13 16:14:09 1997
++++ src/dviprlib.c Mon Apr 22 23:02:58 2002
+@@ -1433,7 +1433,9 @@
char *dviprt_prtcodename[] = { CFG_PRTCODE_NAME, NULL };
char *dviprt_encodename[] = { CFG_ENCODE_NAME, NULL };
-private FILE *dviprt_messagestream = stderr;
+private FILE *dviprt_messagestream;
-+private int dviprt_messagestream_init;
++private void dviprt_messagestream_construct (void) __attribute__((constructor));
++private void dviprt_messagestream_construct (void) { dviprt_messagestream = stderr; }
/*--- library functions ---*/
int
-@@ -1505,6 +1506,10 @@
- liblocal int
- dviprt_printmessage(char *str,int len)
- {
-+ if (!dviprt_messagestream_init) {
-+ dviprt_messagestream = stderr;
-+ dviprt_messagestream_init = 1;
-+ }
- if (dviprt_messagestream && str) {
- if (len >= 0) fwrite(str,len,1,dviprt_messagestream);
- else fputs(str,dviprt_messagestream);