Compare commits
200 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
d61c474922 | ||
|
a70c402edd | ||
|
14bd3ebe38 | ||
|
d24aadea6e | ||
|
92552fba1e | ||
|
f35503ceee | ||
|
c755f33188 | ||
|
51b02415a0 | ||
|
0c1e7532d2 | ||
|
5a5e48476c | ||
|
b3e2cfe5e0 | ||
|
2e84257b37 | ||
|
4257a957f7 | ||
|
02461c194f | ||
|
9156a8754c | ||
|
561959feca | ||
|
ba097d7d21 | ||
|
130b322cda | ||
|
51650e03ec | ||
|
d12a8ce983 | ||
|
2c5f5bee43 | ||
|
865c7ebf9b | ||
|
a5134c5ade | ||
|
e9e47e765b | ||
|
e680683871 | ||
|
d7e1d637e5 | ||
|
4a93f4fa87 | ||
|
a1afccab2e | ||
|
59db7de965 | ||
|
2656f78197 | ||
|
972caf59ac | ||
|
15621b2b5a | ||
|
fd5bf36ff0 | ||
|
3016e15a0a | ||
|
a82e34fd34 | ||
|
0bb2e4c55a | ||
|
6df2cffe50 | ||
|
b76f8755c2 | ||
|
12d81d66b1 | ||
|
b62d20303f | ||
|
d22b996f9e | ||
|
85995c54ff | ||
|
41ce9923c6 | ||
|
47b08ccdb4 | ||
|
f8f891f65a | ||
|
8a86623f3f | ||
|
7e0d0560ab | ||
|
75f99711b7 | ||
|
b0a02a722b | ||
|
9f0b67fe7c | ||
|
3116a3c29a | ||
|
3f2c793a48 | ||
|
733f9f4f59 | ||
|
d6a8216e11 | ||
|
6fd98b0a31 | ||
|
6a01a7c271 | ||
|
1762de5bb7 | ||
|
05c0279c51 | ||
|
22dff3b597 | ||
|
dd8785b474 | ||
|
84e3fdeb18 | ||
|
0e32b81991 | ||
|
70fe506577 | ||
|
1fa2af9aa9 | ||
|
2cf528ec0f | ||
|
d121f06743 | ||
|
d05124d3e5 | ||
|
08d24bfef6 | ||
|
2050c98074 | ||
|
89ab42c26f | ||
|
3e4c6fe3b7 | ||
|
f08a51a880 | ||
|
58606b2428 | ||
|
a671dd4185 | ||
|
89d528c749 | ||
|
c09a9fe907 | ||
|
8d8748a20b | ||
|
f96f06c143 | ||
|
1b697da225 | ||
|
ff17cad90e | ||
|
bd2db7c620 | ||
|
6ab0d7dace | ||
|
fc314e5732 | ||
|
1555141555 | ||
|
0c939a784d | ||
|
06f2d18d9f | ||
|
5c25057eb1 | ||
|
da5847e794 | ||
|
f7888265f7 | ||
|
36419052f9 | ||
|
20e71695f9 | ||
|
b5ff478a7d | ||
|
09a3e2a37b | ||
|
f2d513ae8b | ||
|
b524225de7 | ||
|
ff495ba08e | ||
|
9446583888 | ||
|
043d60f302 | ||
|
b7c1eb3c1e | ||
|
07ece8cc04 | ||
|
d2691e1748 | ||
|
9adfd97848 | ||
|
3259141cf0 | ||
|
d7fa87e26a | ||
|
3da9d92cb8 | ||
|
2265fe0750 | ||
|
ee8eec74b1 | ||
|
566900fdec | ||
|
bb877a03dc | ||
|
baa88bc29f | ||
|
aaa2f40d15 | ||
|
42590c5c21 | ||
|
6e08ee84ce | ||
|
f21c6e9eb1 | ||
|
d2ff86e758 | ||
|
b8ce1a7b91 | ||
|
89e8e44b4d | ||
|
78127402c2 | ||
|
26861b1b4f | ||
|
93c8b75925 | ||
|
f8f327274e | ||
|
a68fa66733 | ||
|
1d190d27f5 | ||
|
8fb25e0ad2 | ||
|
da3a5d39ba | ||
|
e1f8bc1189 | ||
|
389a5d8f2d | ||
|
48b7127ce2 | ||
|
20d7c68a42 | ||
|
447cd5b79f | ||
|
12518b6b76 | ||
|
245be3029b | ||
|
05c310554c | ||
|
65276dde90 | ||
|
7cc772ff32 | ||
|
407204b668 | ||
|
66c3749723 | ||
|
6c921dfc73 | ||
|
45109fe931 | ||
|
47113264a3 | ||
|
06055cd6f7 | ||
|
ef16ab3992 | ||
|
20bfe6e080 | ||
|
57f3798439 | ||
|
970da03f19 | ||
|
74e57dbfa3 | ||
|
a4a834a987 | ||
|
2ac9b5fd68 | ||
|
0a08c4e277 | ||
|
c14c331cad | ||
|
0dfb5c0456 | ||
|
b2727e93a1 | ||
|
faa929d18b | ||
|
c0ac82aa41 | ||
|
8e258de719 | ||
|
a1de13651f | ||
|
41ce6ddc0a | ||
|
244cfbf7d1 | ||
|
8590f53889 | ||
|
9693b90353 | ||
|
d177acaf0f | ||
|
cdd169a7b6 | ||
|
acf8e9f01e | ||
|
6d266b1e63 | ||
|
1d8d9b49a6 | ||
|
310a76fc37 | ||
|
923b7d4a06 | ||
|
0057c84fd1 | ||
|
55e8fbca58 | ||
|
bda1546e93 | ||
|
b7ad57d64e | ||
|
1c8db13590 | ||
|
a309054d1b | ||
|
b0b63e57dc | ||
|
1c615e73d9 | ||
|
e82d38730b | ||
|
acc3e0ee06 | ||
|
d4867991c3 | ||
|
26d7b7a3d0 | ||
|
f17ffe4c87 | ||
|
d6f6040e9f | ||
|
407e0cf741 | ||
|
aa4475c8c7 | ||
|
55552e4126 | ||
|
d6620b3695 | ||
|
495e977fdd | ||
|
28df9c5785 | ||
|
4deb15317f | ||
|
e7b0486879 | ||
|
af6faed769 | ||
|
c259c84e9e | ||
|
31aefac56c | ||
|
5357184847 | ||
|
f6e2595ab3 | ||
|
181cea6580 | ||
|
cd9372848f | ||
|
4cf804b4e9 | ||
|
4581572020 | ||
|
084d933387 | ||
|
9ba9caf316 |
16
.cvsignore
16
.cvsignore
@ -1,16 +0,0 @@
|
||||
CIDFnmap-cjk-20030115.tar.gz
|
||||
acro5-cmaps-2001.tar.gz
|
||||
adobe-cmaps-200202.tar.gz
|
||||
eplaseren-1.0.2-550.tgz
|
||||
epson740.tgz
|
||||
gdevmd2k-0.2a.tar.gz
|
||||
ghostscript-7.05.tar.bz2
|
||||
gnu-drivers.tar.gz
|
||||
gs550j1.tar.gz
|
||||
gs6.51-cjk-M2-R3.tar.gz
|
||||
gs704-j-vlib.zip
|
||||
hpijs-1.3.tar.gz
|
||||
jpegsrc.v6b.tar.gz
|
||||
lexmarkgs990908.tar.gz
|
||||
lxm3200-0.4.1-gs5.50-src.tar.gz
|
||||
pcl3-3.3.tar.gz
|
28
.gitignore
vendored
Normal file
28
.gitignore
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
acro5-cmaps-2001.tar.gz
|
||||
adobe-cmaps-200202.tar.gz
|
||||
eplaser-3.1.4-705.tgz
|
||||
epson740.tgz
|
||||
gdevmd2k-0.2a.tar.gz
|
||||
ghostscript-7.07.tar.bz2
|
||||
gs550j1.tar.gz
|
||||
gs6.51-cjk-M2-R3.tar.gz
|
||||
gs704-j-vlib.zip
|
||||
lexmarkgs990908.tar.gz
|
||||
lxm3200-tweaked-20030501.tar.gz
|
||||
pcl3-3.3.tar.gz
|
||||
espgs-8.15rc3-source.tar.bz2
|
||||
adobe-cmaps-200204.tar.gz
|
||||
espgs-8.15rc4-source.tar.bz2
|
||||
espgs-8.15.1-source.tar.bz2
|
||||
adobe-cmaps-200406.tar.gz
|
||||
espgs-8.15.2-source.tar.bz2
|
||||
espgs-8.15.3-source.tar.bz2
|
||||
espgs-8.15.4-source.tar.bz2
|
||||
ghostscript-8.60-r8117.tar.bz2
|
||||
ghostscript-8.60.tar.bz2
|
||||
ghostscript-8.61.tar.bz2
|
||||
ghostscript-8.62.tar.bz2
|
||||
ghostscript-8.63.tar.bz2
|
||||
ghostscript-8.64.tar.bz2
|
||||
ghostscript-8.70.tar.xz
|
||||
ghostscript-8.71.tar.xz
|
9
CIDFnmap
Normal file
9
CIDFnmap
Normal file
@ -0,0 +1,9 @@
|
||||
%!
|
||||
% following lines are for CJK fonts.
|
||||
(CIDFnmap.ja) .runlibfileifexists
|
||||
(CIDFnmap.ko) .runlibfileifexists
|
||||
(CIDFnmap.zh_CN) .runlibfileifexists
|
||||
(CIDFnmap.zh_TW) .runlibfileifexists
|
||||
% must be at the bottom of line to allow people overriding everything.
|
||||
(CIDFnmap.local) .runlibfileifexists
|
||||
|
6
Makefile
6
Makefile
@ -1,6 +0,0 @@
|
||||
# Makefile for source rpm: ghostscript
|
||||
# $Id$
|
||||
NAME := ghostscript
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
include ../common/Makefile.common
|
10
cidfmap
Normal file
10
cidfmap
Normal file
@ -0,0 +1,10 @@
|
||||
%!
|
||||
% Don't change following line. We should ensure that the original one is surely loaded.
|
||||
(cidfmap.GS) .runlibfile
|
||||
% following lines are for CJK fonts.
|
||||
(cidfmap.ja) .runlibfileifexists
|
||||
(cidfmap.ko) .runlibfileifexists
|
||||
(cidfmap.zh_CN) .runlibfileifexists
|
||||
(cidfmap.zh_TW) .runlibfileifexists
|
||||
% must be at the bottom of line to allow people overriding everything.
|
||||
(cidfmap.local) .runlibfileifexists
|
1414
ghostscript--P-.patch
Normal file
1414
ghostscript--P-.patch
Normal file
File diff suppressed because it is too large
Load Diff
17
ghostscript-CVE-2009-4270.patch
Normal file
17
ghostscript-CVE-2009-4270.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-debug ghostscript-8.70/cups/gdevcups.c
|
||||
--- ghostscript-8.70/cups/gdevcups.c.gdevcups-debug 2009-05-20 23:30:48.000000000 +0100
|
||||
+++ ghostscript-8.70/cups/gdevcups.c 2009-11-24 17:16:11.929250977 +0000
|
||||
@@ -2816,11 +2816,11 @@ cups_put_params(gx_device *pdev, /*
|
||||
} \
|
||||
else if (code == 0) \
|
||||
{ \
|
||||
- dprintf2("DEBUG: Setting %s to \"%s\"...\n", sname, \
|
||||
- (char *)stringval.data); \
|
||||
strncpy(cups->header.name, (const char *)stringval.data, \
|
||||
stringval.size); \
|
||||
cups->header.name[stringval.size] = '\0'; \
|
||||
+ dprintf2("DEBUG: Setting %s to \"%s\"...\n", sname, \
|
||||
+ cups->header.name); \
|
||||
}
|
||||
|
||||
#define intoption(name, sname, type) \
|
124
ghostscript-CVE-2010-1628.patch
Normal file
124
ghostscript-CVE-2010-1628.patch
Normal file
@ -0,0 +1,124 @@
|
||||
diff -up ghostscript-8.70/psi/ialloc.c.CVE-2010-1628 ghostscript-8.70/psi/ialloc.c
|
||||
--- ghostscript-8.70/psi/ialloc.c.CVE-2010-1628 2008-08-28 23:48:19.000000000 +0100
|
||||
+++ ghostscript-8.70/psi/ialloc.c 2010-07-16 12:15:45.230948203 +0100
|
||||
@@ -185,7 +185,14 @@ gs_alloc_ref_array(gs_ref_memory_t * mem
|
||||
*/
|
||||
chunk_t *pcc = mem->pcc;
|
||||
ref *end;
|
||||
+ alloc_change_t *cp = 0;
|
||||
+ int code = 0;
|
||||
|
||||
+ if ((gs_memory_t *)mem != mem->stable_memory) {
|
||||
+ code = alloc_save_change_alloc(mem, "gs_alloc_ref_array", &cp);
|
||||
+ if (code < 0)
|
||||
+ return code;
|
||||
+ }
|
||||
obj = gs_alloc_struct_array((gs_memory_t *) mem, num_refs + 1,
|
||||
ref, &st_refs, cname);
|
||||
if (obj == 0)
|
||||
@@ -210,14 +217,10 @@ gs_alloc_ref_array(gs_ref_memory_t * mem
|
||||
chunk_locate_ptr(obj, &cl);
|
||||
cl.cp->has_refs = true;
|
||||
}
|
||||
- if ((gs_memory_t *)mem != mem->stable_memory) {
|
||||
- ref_packed **ppr = 0;
|
||||
- int code = alloc_save_change_alloc(mem, "gs_alloc_ref_array", &ppr);
|
||||
- if (code < 0)
|
||||
- return code;
|
||||
- if (ppr)
|
||||
- *ppr = (ref_packed *)obj;
|
||||
- }
|
||||
+ if (cp) {
|
||||
+ mem->changes = cp;
|
||||
+ cp->where = (ref_packed *)obj;
|
||||
+ }
|
||||
}
|
||||
make_array(parr, attrs | mem->space, num_refs, obj);
|
||||
return 0;
|
||||
diff -up ghostscript-8.70/psi/idosave.h.CVE-2010-1628 ghostscript-8.70/psi/idosave.h
|
||||
--- ghostscript-8.70/psi/idosave.h.CVE-2010-1628 2008-08-28 23:48:19.000000000 +0100
|
||||
+++ ghostscript-8.70/psi/idosave.h 2010-07-16 12:15:45.238073609 +0100
|
||||
@@ -18,6 +18,22 @@
|
||||
# define idosave_INCLUDED
|
||||
|
||||
/*
|
||||
+ * Structure for saved change chain for save/restore. Because of the
|
||||
+ * garbage collector, we need to distinguish the cases where the change
|
||||
+ * is in a static object, a dynamic ref, or a dynamic struct.
|
||||
+ */
|
||||
+typedef struct alloc_change_s alloc_change_t;
|
||||
+struct alloc_change_s {
|
||||
+ alloc_change_t *next;
|
||||
+ ref_packed *where;
|
||||
+ ref contents;
|
||||
+#define AC_OFFSET_STATIC (-2) /* static object */
|
||||
+#define AC_OFFSET_REF (-1) /* dynamic ref */
|
||||
+#define AC_OFFSET_ALLOCATED (-3) /* a newly allocated ref array */
|
||||
+ short offset; /* if >= 0, offset within struct */
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
* Save a change that must be undone by restore. We have to pass the
|
||||
* pointer to the containing object to alloc_save_change for two reasons:
|
||||
*
|
||||
@@ -29,6 +45,7 @@
|
||||
* relocate the pointer to it from the change record during garbage
|
||||
* collection.
|
||||
*/
|
||||
+
|
||||
int alloc_save_change(gs_dual_memory_t *dmem, const ref *pcont,
|
||||
ref_packed *ptr, client_name_t cname);
|
||||
int alloc_save_change_in(gs_ref_memory_t *mem, const ref *pcont,
|
||||
@@ -36,6 +53,6 @@ int alloc_save_change_in(gs_ref_memory_t
|
||||
/* Remove an AC_OFFSET_ALLOCATED element. */
|
||||
void alloc_save_remove(gs_ref_memory_t *mem, ref_packed *obj, client_name_t cname);
|
||||
/* Allocate a structure for recording an allocation event. */
|
||||
-int alloc_save_change_alloc(gs_ref_memory_t *mem, client_name_t cname, ref_packed ***ppr);
|
||||
+int alloc_save_change_alloc(gs_ref_memory_t *mem, client_name_t cname, alloc_change_t **pcp);
|
||||
|
||||
#endif /* idosave_INCLUDED */
|
||||
diff -up ghostscript-8.70/psi/isave.c.CVE-2010-1628 ghostscript-8.70/psi/isave.c
|
||||
--- ghostscript-8.70/psi/isave.c.CVE-2010-1628 2008-08-28 23:48:19.000000000 +0100
|
||||
+++ ghostscript-8.70/psi/isave.c 2010-07-16 12:15:45.245073557 +0100
|
||||
@@ -156,22 +156,6 @@ print_save(const char *str, uint spacen,
|
||||
/* A link to igcref.c . */
|
||||
ptr_proc_reloc(igc_reloc_ref_ptr_nocheck, ref_packed);
|
||||
|
||||
-/*
|
||||
- * Structure for saved change chain for save/restore. Because of the
|
||||
- * garbage collector, we need to distinguish the cases where the change
|
||||
- * is in a static object, a dynamic ref, or a dynamic struct.
|
||||
- */
|
||||
-typedef struct alloc_change_s alloc_change_t;
|
||||
-struct alloc_change_s {
|
||||
- alloc_change_t *next;
|
||||
- ref_packed *where;
|
||||
- ref contents;
|
||||
-#define AC_OFFSET_STATIC (-2) /* static object */
|
||||
-#define AC_OFFSET_REF (-1) /* dynamic ref */
|
||||
-#define AC_OFFSET_ALLOCATED (-3) /* a newly allocated ref array */
|
||||
- short offset; /* if >= 0, offset within struct */
|
||||
-};
|
||||
-
|
||||
static
|
||||
CLEAR_MARKS_PROC(change_clear_marks)
|
||||
{
|
||||
@@ -519,7 +503,7 @@ alloc_save_change(gs_dual_memory_t * dme
|
||||
|
||||
/* Allocate a structure for recording an allocation event. */
|
||||
int
|
||||
-alloc_save_change_alloc(gs_ref_memory_t *mem, client_name_t cname, ref_packed ***ppr)
|
||||
+alloc_save_change_alloc(gs_ref_memory_t *mem, client_name_t cname, alloc_change_t **pcp)
|
||||
{
|
||||
register alloc_change_t *cp;
|
||||
|
||||
@@ -533,8 +517,7 @@ alloc_save_change_alloc(gs_ref_memory_t
|
||||
cp->where = 0;
|
||||
cp->offset = AC_OFFSET_ALLOCATED;
|
||||
make_null(&cp->contents);
|
||||
- mem->changes = cp;
|
||||
- *ppr = &cp->where;
|
||||
+ *pcp = cp;
|
||||
return 1;
|
||||
}
|
||||
|
9
ghostscript-Fontmap.local.patch
Normal file
9
ghostscript-Fontmap.local.patch
Normal file
@ -0,0 +1,9 @@
|
||||
diff -up ghostscript-8.71/Resource/Init/Fontmap.Fontmap.local ghostscript-8.71/Resource/Init/Fontmap
|
||||
--- ghostscript-8.71/Resource/Init/Fontmap.Fontmap.local 2008-08-08 05:22:38.000000000 +0100
|
||||
+++ ghostscript-8.71/Resource/Init/Fontmap 2010-09-03 11:53:47.273865979 +0100
|
||||
@@ -2,3 +2,5 @@
|
||||
% See Fontmap.GS for the syntax of real Fontmap files.
|
||||
%% Replace 1 (Fontmap.GS)
|
||||
(Fontmap.GS) .runlibfile
|
||||
+% must be at the bottom of line to allow people overriding everything.
|
||||
+(Fontmap.local) .runlibfileifexists
|
704
ghostscript-SEARCH_HERE_FIRST.patch
Normal file
704
ghostscript-SEARCH_HERE_FIRST.patch
Normal file
@ -0,0 +1,704 @@
|
||||
diff -up ghostscript-8.71/base/bcwin32.mak.SEARCH_HERE_FIRST ghostscript-8.71/base/bcwin32.mak
|
||||
--- ghostscript-8.71/base/bcwin32.mak.SEARCH_HERE_FIRST 2009-11-05 22:24:30.000000000 +0000
|
||||
+++ ghostscript-8.71/base/bcwin32.mak 2010-08-26 14:42:24.564965845 +0100
|
||||
@@ -78,13 +78,10 @@ GS_LIB_DEFAULT=$(GSROOTDIR)/Resource/Ini
|
||||
|
||||
# Define whether or not searching for initialization files should always
|
||||
# look in the current directory first. This leads to well-known security
|
||||
-# and confusion problems, but users insist on it.
|
||||
-# NOTE: this also affects searching for files named on the command line:
|
||||
-# see the "File searching" section of Use.htm for full details.
|
||||
-# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
|
||||
+# and confusion problems, but may be convenient sometimes.
|
||||
|
||||
!ifndef SEARCH_HERE_FIRST
|
||||
-SEARCH_HERE_FIRST=1
|
||||
+SEARCH_HERE_FIRST=0
|
||||
!endif
|
||||
|
||||
# Define the name of the interpreter initialization file.
|
||||
diff -up ghostscript-8.71/base/macos-mcp.mak.SEARCH_HERE_FIRST ghostscript-8.71/base/macos-mcp.mak
|
||||
--- ghostscript-8.71/base/macos-mcp.mak.SEARCH_HERE_FIRST 2009-11-05 22:24:30.000000000 +0000
|
||||
+++ ghostscript-8.71/base/macos-mcp.mak 2010-08-26 14:42:24.565965206 +0100
|
||||
@@ -53,12 +53,9 @@ GS_DOCDIR=:doc
|
||||
|
||||
# Define whether or not searching for initialization files should always
|
||||
# look in the current directory first. This leads to well-known security
|
||||
-# and confusion problems, but users insist on it.
|
||||
-# NOTE: this also affects searching for files named on the command line:
|
||||
-# see the "File searching" section of Use.htm for full details.
|
||||
-# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
|
||||
+# and confusion problems, but may be convenient sometimes.
|
||||
|
||||
-SEARCH_HERE_FIRST=1
|
||||
+SEARCH_HERE_FIRST=0
|
||||
|
||||
# Define the name of the interpreter initialization file.
|
||||
# (There is no reason to change this.)
|
||||
diff -up ghostscript-8.71/base/macosx.mak.SEARCH_HERE_FIRST ghostscript-8.71/base/macosx.mak
|
||||
--- ghostscript-8.71/base/macosx.mak.SEARCH_HERE_FIRST 2008-10-02 20:33:22.000000000 +0100
|
||||
+++ ghostscript-8.71/base/macosx.mak 2010-08-26 14:42:24.567964998 +0100
|
||||
@@ -78,12 +78,9 @@ GS_LIB_DEFAULT=$(gsdatadir)/Resource/Ini
|
||||
|
||||
# Define whether or not searching for initialization files should always
|
||||
# look in the current directory first. This leads to well-known security
|
||||
-# and confusion problems, but users insist on it.
|
||||
-# NOTE: this also affects searching for files named on the command line:
|
||||
-# see the "File searching" section of Use.htm for full details.
|
||||
-# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
|
||||
+# and confusion problems, but may be convenient sometimes.
|
||||
|
||||
-SEARCH_HERE_FIRST=1
|
||||
+SEARCH_HERE_FIRST=0
|
||||
|
||||
# Define the name of the interpreter initialization file.
|
||||
# (There is no reason to change this.)
|
||||
diff -up ghostscript-8.71/base/Makefile.in.SEARCH_HERE_FIRST ghostscript-8.71/base/Makefile.in
|
||||
--- ghostscript-8.71/base/Makefile.in.SEARCH_HERE_FIRST 2009-12-18 07:04:10.000000000 +0000
|
||||
+++ ghostscript-8.71/base/Makefile.in 2010-08-26 14:42:24.568840684 +0100
|
||||
@@ -96,12 +96,9 @@ GS_CACHE_DIR="~/.ghostscript/cache/"
|
||||
|
||||
# Define whether or not searching for initialization files should always
|
||||
# look in the current directory first. This leads to well-known security
|
||||
-# and confusion problems, but users insist on it.
|
||||
-# NOTE: this also affects searching for files named on the command line:
|
||||
-# see the "File searching" section of Use.htm for full details.
|
||||
-# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
|
||||
+# and confusion problems, but may be convenient sometimes.
|
||||
|
||||
-SEARCH_HERE_FIRST=1
|
||||
+SEARCH_HERE_FIRST=0
|
||||
|
||||
# Define the name of the interpreter initialization file.
|
||||
# (There is no reason to change this.)
|
||||
diff -up ghostscript-8.71/base/msvclib.mak.SEARCH_HERE_FIRST ghostscript-8.71/base/msvclib.mak
|
||||
--- ghostscript-8.71/base/msvclib.mak.SEARCH_HERE_FIRST 2010-01-07 10:53:36.000000000 +0000
|
||||
+++ ghostscript-8.71/base/msvclib.mak 2010-08-26 14:42:24.570840275 +0100
|
||||
@@ -49,13 +49,10 @@ GS_LIB_DEFAULT=$(GSROOTDIR)/Resource/Ini
|
||||
|
||||
# Define whether or not searching for initialization files should always
|
||||
# look in the current directory first. This leads to well-known security
|
||||
-# and confusion problems, but users insist on it.
|
||||
-# NOTE: this also affects searching for files named on the command line:
|
||||
-# see the "File searching" section of Use.htm for full details.
|
||||
-# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
|
||||
+# and confusion problems, but may be convenient sometimes.
|
||||
|
||||
!ifndef SEARCH_HERE_FIRST
|
||||
-SEARCH_HERE_FIRST=1
|
||||
+SEARCH_HERE_FIRST=0
|
||||
!endif
|
||||
|
||||
# Define the name of the interpreter initialization file.
|
||||
diff -up ghostscript-8.71/base/openvms.mak.SEARCH_HERE_FIRST ghostscript-8.71/base/openvms.mak
|
||||
--- ghostscript-8.71/base/openvms.mak.SEARCH_HERE_FIRST 2009-11-05 22:24:30.000000000 +0000
|
||||
+++ ghostscript-8.71/base/openvms.mak 2010-08-26 14:42:24.571840163 +0100
|
||||
@@ -68,12 +68,9 @@ GS_LIB_DEFAULT=GS_ROOT:[RESOURCE.INIT],G
|
||||
|
||||
# Define whether or not searching for initialization files should always
|
||||
# look in the current directory first. This leads to well-known security
|
||||
-# and confusion problems, but users insist on it.
|
||||
-# NOTE: this also affects searching for files named on the command line:
|
||||
-# see the "File searching" section of Use.htm for full details.
|
||||
-# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
|
||||
+# and confusion problems, but may be convenient sometimes.
|
||||
|
||||
-SEARCH_HERE_FIRST=1
|
||||
+SEARCH_HERE_FIRST=0
|
||||
|
||||
# Define the name of the interpreter initialization file.
|
||||
# (There is no reason to change this.)
|
||||
diff -up ghostscript-8.71/base/openvms.mmk.SEARCH_HERE_FIRST ghostscript-8.71/base/openvms.mmk
|
||||
--- ghostscript-8.71/base/openvms.mmk.SEARCH_HERE_FIRST 2009-01-08 09:17:18.000000000 +0000
|
||||
+++ ghostscript-8.71/base/openvms.mmk 2010-08-26 14:42:24.572840641 +0100
|
||||
@@ -73,12 +73,9 @@ GS_LIB_DEFAULT=GS_LIB
|
||||
|
||||
# Define whether or not searching for initialization files should always
|
||||
# look in the current directory first. This leads to well-known security
|
||||
-# and confusion problems, but users insist on it.
|
||||
-# NOTE: this also affects searching for files named on the command line:
|
||||
-# see the "File searching" section of Use.htm for full details.
|
||||
-# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
|
||||
+# and confusion problems, but may be convenient sometimes.
|
||||
|
||||
-SEARCH_HERE_FIRST=1
|
||||
+SEARCH_HERE_FIRST=0
|
||||
|
||||
# Define the name of the interpreter initialization file.
|
||||
# (There is no reason to change this.)
|
||||
diff -up ghostscript-8.71/base/ugcclib.mak.SEARCH_HERE_FIRST ghostscript-8.71/base/ugcclib.mak
|
||||
--- ghostscript-8.71/base/ugcclib.mak.SEARCH_HERE_FIRST 2008-11-05 20:41:22.000000000 +0000
|
||||
+++ ghostscript-8.71/base/ugcclib.mak 2010-08-26 14:42:24.573840607 +0100
|
||||
@@ -30,7 +30,7 @@ gsdir = /usr/local/share/ghostscript
|
||||
gsdatadir = $(gsdir)/$(GS_DOT_VERSION)
|
||||
GS_DOCDIR=$(gsdatadir)/doc
|
||||
GS_LIB_DEFAULT=$(gsdatadir)/Resource/Init:$(gsdatadir)/lib:$(gsdatadir)/Resource/Font
|
||||
-SEARCH_HERE_FIRST=1
|
||||
+SEARCH_HERE_FIRST=0
|
||||
GS_INIT=gs_init.ps
|
||||
|
||||
#GENOPT=-DDEBUG
|
||||
diff -up ghostscript-8.71/base/unixansi.mak.SEARCH_HERE_FIRST ghostscript-8.71/base/unixansi.mak
|
||||
--- ghostscript-8.71/base/unixansi.mak.SEARCH_HERE_FIRST 2009-11-05 22:24:30.000000000 +0000
|
||||
+++ ghostscript-8.71/base/unixansi.mak 2010-08-26 14:42:24.575840435 +0100
|
||||
@@ -73,12 +73,9 @@ GS_LIB_DEFAULT=$(gsdatadir)/Resource/Ini
|
||||
|
||||
# Define whether or not searching for initialization files should always
|
||||
# look in the current directory first. This leads to well-known security
|
||||
-# and confusion problems, but users insist on it.
|
||||
-# NOTE: this also affects searching for files named on the command line:
|
||||
-# see the "File searching" section of Use.htm for full details.
|
||||
-# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
|
||||
+# and confusion problems, but may be convenient sometimes.
|
||||
|
||||
-SEARCH_HERE_FIRST=1
|
||||
+SEARCH_HERE_FIRST=0
|
||||
|
||||
# Define the name of the interpreter initialization file.
|
||||
# (There is no reason to change this.)
|
||||
diff -up ghostscript-8.71/base/unix-gcc.mak.SEARCH_HERE_FIRST ghostscript-8.71/base/unix-gcc.mak
|
||||
--- ghostscript-8.71/base/unix-gcc.mak.SEARCH_HERE_FIRST 2009-11-11 15:50:28.000000000 +0000
|
||||
+++ ghostscript-8.71/base/unix-gcc.mak 2010-08-26 14:42:24.576840199 +0100
|
||||
@@ -77,12 +77,9 @@ GS_LIB_DEFAULT=$(gsdatadir)/Resource/Ini
|
||||
|
||||
# Define whether or not searching for initialization files should always
|
||||
# look in the current directory first. This leads to well-known security
|
||||
-# and confusion problems, but users insist on it.
|
||||
-# NOTE: this also affects searching for files named on the command line:
|
||||
-# see the "File searching" section of Use.htm for full details.
|
||||
-# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
|
||||
+# and confusion problems, but may be convenient sometimes.
|
||||
|
||||
-SEARCH_HERE_FIRST=1
|
||||
+SEARCH_HERE_FIRST=0
|
||||
|
||||
# Define the name of the interpreter initialization file.
|
||||
# (There is no reason to change this.)
|
||||
diff -up ghostscript-8.71/base/watclib.mak.SEARCH_HERE_FIRST ghostscript-8.71/base/watclib.mak
|
||||
--- ghostscript-8.71/base/watclib.mak.SEARCH_HERE_FIRST 2009-01-08 09:17:18.000000000 +0000
|
||||
+++ ghostscript-8.71/base/watclib.mak 2010-08-26 14:42:24.577840314 +0100
|
||||
@@ -20,7 +20,7 @@ AROOTDIR=c:/gs
|
||||
GSROOTDIR=$(AROOTDIR)/gs$(GS_DOT_VERSION)
|
||||
GS_DOCDIR=$(GSROOTDIR)/doc
|
||||
GS_LIB_DEFAULT=$(GSROOTDIR)/Resource/Init\;$(GSROOTDIR)/lib\;$(GSROOTDIR)/Resource/Font\;$(AROOTDIR)/fonts
|
||||
-SEARCH_HERE_FIRST=1
|
||||
+SEARCH_HERE_FIRST=0
|
||||
GS_INIT=gs_init.ps
|
||||
|
||||
!ifndef DEBUG
|
||||
diff -up ghostscript-8.71/base/watcw32.mak.SEARCH_HERE_FIRST ghostscript-8.71/base/watcw32.mak
|
||||
--- ghostscript-8.71/base/watcw32.mak.SEARCH_HERE_FIRST 2009-11-05 22:24:30.000000000 +0000
|
||||
+++ ghostscript-8.71/base/watcw32.mak 2010-08-26 14:42:24.578840893 +0100
|
||||
@@ -54,11 +54,8 @@ GS_LIB_DEFAULT=$(GSROOTDIR)/Resource/Ini
|
||||
# Define whether or not searching for initialization files should always
|
||||
# look in the current directory first. This leads to well-known security
|
||||
# and confusion problems, but users insist on it.
|
||||
-# NOTE: this also affects searching for files named on the command line:
|
||||
-# see the "File searching" section of Use.htm for full details.
|
||||
-# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
|
||||
|
||||
-SEARCH_HERE_FIRST=1
|
||||
+SEARCH_HERE_FIRST=0
|
||||
|
||||
# Define the name of the interpreter initialization file.
|
||||
# (There is no reason to change this.)
|
||||
diff -up ghostscript-8.71/doc/Use.htm.SEARCH_HERE_FIRST ghostscript-8.71/doc/Use.htm
|
||||
--- ghostscript-8.71/doc/Use.htm.SEARCH_HERE_FIRST 2010-02-10 18:17:48.000000000 +0000
|
||||
+++ ghostscript-8.71/doc/Use.htm 2010-08-26 14:42:24.583840122 +0100
|
||||
@@ -823,8 +823,8 @@ file name specifies an absolute path.
|
||||
using the name given. Otherwise it tries directories in this order:
|
||||
|
||||
<ol>
|
||||
-<li>The current directory (unless disabled by the
|
||||
-<a href="#P-_switch"><code>-P-</code> switch</a>);
|
||||
+<li>The current directory if enabled by the
|
||||
+<a href="#P-_switch"><code>-P</code> switch</a>;
|
||||
|
||||
<li>The directories specified by <a href="#I_switch"><code>-I</code>
|
||||
switches</a> in the command line, if any;
|
||||
@@ -847,13 +847,10 @@ into the executable ;
|
||||
directory or a list of directories separated by a character appropriate for
|
||||
the operating system ("<code>:</code>" on Unix systems,
|
||||
"<code>,</code>" on VMS systems, and
|
||||
-"<code>;</code>" on MS Windows systems). We think that trying
|
||||
-the current directory first is a very bad idea -- it opens serious security
|
||||
-loopholes and can lead to very confusing errors if one has more than one
|
||||
-version of Ghostscript in one's environment -- but when we attempted to
|
||||
-change it, users insisted that we change it back. You can disable looking
|
||||
-in the current directory first by using the
|
||||
-<a href="#P_switch"><code>-P-</code> switch</a>.
|
||||
+"<code>;</code>" on MS Windows systems).
|
||||
+By default, Ghostscript no longer searches the current directory first
|
||||
+but provides <a href="#P_switch"><code>-P</code> switch</a> for a degree
|
||||
+of backward compatibility.
|
||||
|
||||
<p>
|
||||
Note that Ghostscript does not use this file searching algorithm for the
|
||||
@@ -2061,14 +2058,14 @@ for library files.
|
||||
<dl>
|
||||
<dt><a name="P_switch"></a><code>-P</code>
|
||||
<dd>Makes Ghostscript look first in the current directory for library
|
||||
-files. This is currently the default.
|
||||
+files.
|
||||
</dl>
|
||||
|
||||
<dl>
|
||||
<dt><a name="P-_switch"></a><code>-P-</code>
|
||||
<dd>Makes Ghostscript <b><em>not</em></b> look first in the current
|
||||
directory for library files (unless, of course, the first explicitly
|
||||
-supplied directory is "<code>.</code>").
|
||||
+supplied directory is "<code>.</code>"). This is now the default.
|
||||
</dl>
|
||||
|
||||
<h4><a name="Parameters"></a>Setting parameters</h4>
|
||||
diff -up ghostscript-8.71/man/gs.1.SEARCH_HERE_FIRST ghostscript-8.71/man/gs.1
|
||||
--- ghostscript-8.71/man/gs.1.SEARCH_HERE_FIRST 2010-02-10 18:17:48.000000000 +0000
|
||||
+++ ghostscript-8.71/man/gs.1 2010-08-26 14:42:24.586965259 +0100
|
||||
@@ -208,6 +208,12 @@ whereas \fB\-sname=35\fR is equivalent t
|
||||
.br
|
||||
/name (35) def
|
||||
.TP
|
||||
+.B \-P
|
||||
+Makes Ghostscript to look first in the current directory for library files.
|
||||
+By default, Ghostscript no longer looks in the current directory,
|
||||
+unless, of course, the first explicitly supplied directory is "." in \fB-I\fR.
|
||||
+See also the \fBINITIALIZATION FILES\fR section below, and bundled
|
||||
+\fBUse.htm\fR for detailed discussion on search paths and how Ghostcript finds files.
|
||||
.B \-q
|
||||
Quiet startup: suppress normal startup messages, and also do the
|
||||
equivalent of \fB\-dQUIET\fR.
|
||||
diff -up ghostscript-8.71/psi/msvc32.mak.SEARCH_HERE_FIRST ghostscript-8.71/psi/msvc32.mak
|
||||
--- ghostscript-8.71/psi/msvc32.mak.SEARCH_HERE_FIRST 2010-02-02 18:14:37.000000000 +0000
|
||||
+++ ghostscript-8.71/psi/msvc32.mak 2010-08-26 14:42:24.588840343 +0100
|
||||
@@ -100,13 +100,10 @@ GS_LIB_DEFAULT=$(GSROOTDIR)/Resource/Ini
|
||||
|
||||
# Define whether or not searching for initialization files should always
|
||||
# look in the current directory first. This leads to well-known security
|
||||
-# and confusion problems, but users insist on it.
|
||||
-# NOTE: this also affects searching for files named on the command line:
|
||||
-# see the "File searching" section of Use.htm for full details.
|
||||
-# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
|
||||
+# and confusion problems, but may be convenient sometimes.
|
||||
|
||||
!ifndef SEARCH_HERE_FIRST
|
||||
-SEARCH_HERE_FIRST=1
|
||||
+SEARCH_HERE_FIRST=0
|
||||
!endif
|
||||
|
||||
# Define the name of the interpreter initialization file.
|
||||
diff -up ghostscript-8.71/psi/os2.mak.SEARCH_HERE_FIRST ghostscript-8.71/psi/os2.mak
|
||||
--- ghostscript-8.71/psi/os2.mak.SEARCH_HERE_FIRST 2009-11-05 22:24:30.000000000 +0000
|
||||
+++ ghostscript-8.71/psi/os2.mak 2010-08-26 14:42:24.590840867 +0100
|
||||
@@ -54,12 +54,9 @@ GS_LIB_DEFAULT=$(GSROOTDIR)/Resource/Ini
|
||||
|
||||
# Define whether or not searching for initialization files should always
|
||||
# look in the current directory first. This leads to well-known security
|
||||
-# and confusion problems, but users insist on it.
|
||||
-# NOTE: this also affects searching for files named on the command line:
|
||||
-# see the "File searching" section of Use.htm for full details.
|
||||
-# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
|
||||
+# and confusion problems, but may be convenient sometimes.
|
||||
|
||||
-SEARCH_HERE_FIRST=1
|
||||
+SEARCH_HERE_FIRST=0
|
||||
|
||||
# Define the name of the interpreter initialization file.
|
||||
# (There is no reason to change this.)
|
||||
diff -up ghostscript-8.71/psi/zfile.c.SEARCH_HERE_FIRST ghostscript-8.71/psi/zfile.c
|
||||
--- ghostscript-8.71/psi/zfile.c.SEARCH_HERE_FIRST 2009-10-04 13:42:07.000000000 +0100
|
||||
+++ ghostscript-8.71/psi/zfile.c 2010-08-26 14:42:24.593842556 +0100
|
||||
@@ -486,8 +486,13 @@ zstatus(i_ctx_t *i_ctx_p)
|
||||
struct stat fstat;
|
||||
int code = parse_file_name(op, &pname, i_ctx_p->LockFilePermissions);
|
||||
|
||||
- if (code < 0)
|
||||
+ if (code < 0) {
|
||||
+ if (code == e_undefinedfilename) {
|
||||
+ make_bool(op, 0);
|
||||
+ code = 0;
|
||||
+ }
|
||||
return code;
|
||||
+ }
|
||||
code = gs_terminate_file_name(&pname, imemory, "status");
|
||||
if (code < 0)
|
||||
return code;
|
||||
@@ -903,6 +908,91 @@ check_file_permissions_aux(i_ctx_t *i_ct
|
||||
}
|
||||
|
||||
|
||||
+/* return zero for success, -ve for error, +1 for continue */
|
||||
+static int
|
||||
+lib_file_open_search_with_no_combine(gs_file_path_ptr lib_path, const gs_memory_t *mem, i_ctx_t *i_ctx_p,
|
||||
+ const char *fname, uint flen, char *buffer, int blen, uint *pclen, ref *pfile,
|
||||
+ gx_io_device *iodev, bool starting_arg_file, char *fmode)
|
||||
+{
|
||||
+ stream *s;
|
||||
+ uint blen1 = blen;
|
||||
+ if (gp_file_name_reduce(fname, flen, buffer, &blen1) != gp_combine_success)
|
||||
+ goto skip;
|
||||
+ if (iodev_os_open_file(iodev, (const char *)buffer, blen1,
|
||||
+ (const char *)fmode, &s, (gs_memory_t *)mem) == 0) {
|
||||
+ if (starting_arg_file ||
|
||||
+ check_file_permissions_aux(i_ctx_p, buffer, blen1) >= 0) {
|
||||
+ *pclen = blen1;
|
||||
+ make_stream_file(pfile, s, "r");
|
||||
+ return 0;
|
||||
+ }
|
||||
+ sclose(s);
|
||||
+ return_error(e_invalidfileaccess);
|
||||
+ }
|
||||
+ skip:;
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+/* return zero for success, -ve for error, +1 for continue */
|
||||
+static int
|
||||
+lib_file_open_search_with_combine(gs_file_path_ptr lib_path, const gs_memory_t *mem, i_ctx_t *i_ctx_p,
|
||||
+ const char *fname, uint flen, char *buffer, int blen, uint *pclen, ref *pfile,
|
||||
+ gx_io_device *iodev, bool starting_arg_file, char *fmode)
|
||||
+{
|
||||
+ stream *s;
|
||||
+ const gs_file_path *pfpath = lib_path;
|
||||
+ uint pi;
|
||||
+
|
||||
+ for (pi = 0; pi < r_size(&pfpath->list); ++pi) {
|
||||
+ const ref *prdir = pfpath->list.value.refs + pi;
|
||||
+ const char *pstr = (const char *)prdir->value.const_bytes;
|
||||
+ uint plen = r_size(prdir), blen1 = blen;
|
||||
+ gs_parsed_file_name_t pname;
|
||||
+ gp_file_name_combine_result r;
|
||||
+
|
||||
+ /* We need to concatenate and parse the file name here
|
||||
+ * if this path has a %device% prefix. */
|
||||
+ if (pstr[0] == '%') {
|
||||
+ int code;
|
||||
+
|
||||
+ /* We concatenate directly since gp_file_name_combine_*
|
||||
+ * rules are not correct for other devices such as %rom% */
|
||||
+ code = gs_parse_file_name(&pname, pstr, plen);
|
||||
+ if (code < 0)
|
||||
+ continue;
|
||||
+ memcpy(buffer, pname.fname, pname.len);
|
||||
+ memcpy(buffer+pname.len, fname, flen);
|
||||
+ code = pname.iodev->procs.open_file(pname.iodev, buffer, pname.len + flen, fmode,
|
||||
+ &s, (gs_memory_t *)mem);
|
||||
+ if (code < 0)
|
||||
+ continue;
|
||||
+ make_stream_file(pfile, s, "r");
|
||||
+ /* fill in the buffer with the device concatenated */
|
||||
+ memcpy(buffer, pstr, plen);
|
||||
+ memcpy(buffer+plen, fname, flen);
|
||||
+ *pclen = plen + flen;
|
||||
+ return 0;
|
||||
+ } else {
|
||||
+ r = gp_file_name_combine(pstr, plen,
|
||||
+ fname, flen, false, buffer, &blen1);
|
||||
+ if (r != gp_combine_success)
|
||||
+ continue;
|
||||
+ if (iodev_os_open_file(iodev, (const char *)buffer, blen1, (const char *)fmode,
|
||||
+ &s, (gs_memory_t *)mem) == 0) {
|
||||
+ if (starting_arg_file ||
|
||||
+ check_file_permissions_aux(i_ctx_p, buffer, blen1) >= 0) {
|
||||
+ *pclen = blen1;
|
||||
+ make_stream_file(pfile, s, "r");
|
||||
+ return 0;
|
||||
+ }
|
||||
+ sclose(s);
|
||||
+ return_error(e_invalidfileaccess);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
/* Return a file object of of the file searched for using the search paths. */
|
||||
/* The fname cannot contain a device part (%...%) but the lib paths might. */
|
||||
/* The startup code calls this to open the initialization file gs_init.ps. */
|
||||
@@ -917,8 +1007,9 @@ lib_file_open(gs_file_path_ptr lib_path
|
||||
bool search_with_no_combine = false;
|
||||
bool search_with_combine = false;
|
||||
char fmode[4] = { 'r', 0, 0, 0 }; /* room for binary suffix */
|
||||
- stream *s;
|
||||
gx_io_device *iodev = iodev_default;
|
||||
+ gs_main_instance *minst = get_minst_from_memory(mem);
|
||||
+ int code;
|
||||
|
||||
/* when starting arg files (@ files) iodev_default is not yet set */
|
||||
if (iodev == 0)
|
||||
@@ -932,75 +1023,36 @@ lib_file_open(gs_file_path_ptr lib_path
|
||||
search_with_no_combine = starting_arg_file;
|
||||
search_with_combine = true;
|
||||
}
|
||||
- if (search_with_no_combine) {
|
||||
- uint blen1 = blen;
|
||||
-
|
||||
- if (gp_file_name_reduce(fname, flen, buffer, &blen1) != gp_combine_success)
|
||||
- goto skip;
|
||||
- if (iodev_os_open_file(iodev, (const char *)buffer, blen1,
|
||||
- (const char *)fmode, &s, (gs_memory_t *)mem) == 0) {
|
||||
- if (starting_arg_file ||
|
||||
- check_file_permissions_aux(i_ctx_p, buffer, blen1) >= 0) {
|
||||
- *pclen = blen1;
|
||||
- make_stream_file(pfile, s, "r");
|
||||
- return 0;
|
||||
- }
|
||||
- sclose(s);
|
||||
- return_error(e_invalidfileaccess);
|
||||
- }
|
||||
- skip:;
|
||||
- }
|
||||
- if (search_with_combine) {
|
||||
- const gs_file_path *pfpath = lib_path;
|
||||
- uint pi;
|
||||
-
|
||||
- for (pi = 0; pi < r_size(&pfpath->list); ++pi) {
|
||||
- const ref *prdir = pfpath->list.value.refs + pi;
|
||||
- const char *pstr = (const char *)prdir->value.const_bytes;
|
||||
- uint plen = r_size(prdir), blen1 = blen;
|
||||
- gs_parsed_file_name_t pname;
|
||||
- gp_file_name_combine_result r;
|
||||
-
|
||||
- /* We need to concatenate and parse the file name here
|
||||
- * if this path has a %device% prefix. */
|
||||
- if (pstr[0] == '%') {
|
||||
- int code;
|
||||
-
|
||||
- /* We concatenate directly since gp_file_name_combine_*
|
||||
- * rules are not correct for other devices such as %rom% */
|
||||
- code = gs_parse_file_name(&pname, pstr, plen);
|
||||
- if (code < 0)
|
||||
- continue;
|
||||
- memcpy(buffer, pname.fname, pname.len);
|
||||
- memcpy(buffer+pname.len, fname, flen);
|
||||
- code = pname.iodev->procs.open_file(pname.iodev, buffer, pname.len + flen, fmode,
|
||||
- &s, (gs_memory_t *)mem);
|
||||
- if (code < 0)
|
||||
- continue;
|
||||
- make_stream_file(pfile, s, "r");
|
||||
- /* fill in the buffer with the device concatenated */
|
||||
- memcpy(buffer, pstr, plen);
|
||||
- memcpy(buffer+plen, fname, flen);
|
||||
- *pclen = plen + flen;
|
||||
- return 0;
|
||||
- } else {
|
||||
- r = gp_file_name_combine(pstr, plen,
|
||||
- fname, flen, false, buffer, &blen1);
|
||||
- if (r != gp_combine_success)
|
||||
- continue;
|
||||
- if (iodev_os_open_file(iodev, (const char *)buffer, blen1, (const char *)fmode,
|
||||
- &s, (gs_memory_t *)mem) == 0) {
|
||||
- if (starting_arg_file ||
|
||||
- check_file_permissions_aux(i_ctx_p, buffer, blen1) >= 0) {
|
||||
- *pclen = blen1;
|
||||
- make_stream_file(pfile, s, "r");
|
||||
- return 0;
|
||||
- }
|
||||
- sclose(s);
|
||||
- return_error(e_invalidfileaccess);
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
+ if (minst->search_here_first) {
|
||||
+ if (search_with_no_combine) {
|
||||
+ code = lib_file_open_search_with_no_combine(lib_path, mem, i_ctx_p,
|
||||
+ fname, flen, buffer, blen, pclen, pfile,
|
||||
+ iodev, starting_arg_file, fmode);
|
||||
+ if (code <= 0) /* +ve means continue continue */
|
||||
+ return code;
|
||||
+ }
|
||||
+ if (search_with_combine) {
|
||||
+ code = lib_file_open_search_with_combine(lib_path, mem, i_ctx_p,
|
||||
+ fname, flen, buffer, blen, pclen, pfile,
|
||||
+ iodev, starting_arg_file, fmode);
|
||||
+ if (code <= 0) /* +ve means continue searching */
|
||||
+ return code;
|
||||
+ }
|
||||
+ } else {
|
||||
+ if (search_with_combine) {
|
||||
+ code = lib_file_open_search_with_combine(lib_path, mem, i_ctx_p,
|
||||
+ fname, flen, buffer, blen, pclen, pfile,
|
||||
+ iodev, starting_arg_file, fmode);
|
||||
+ if (code <= 0) /* +ve means continue searching */
|
||||
+ return code;
|
||||
+ }
|
||||
+ if (search_with_no_combine) {
|
||||
+ code = lib_file_open_search_with_no_combine(lib_path, mem, i_ctx_p,
|
||||
+ fname, flen, buffer, blen, pclen, pfile,
|
||||
+ iodev, starting_arg_file, fmode);
|
||||
+ if (code <= 0) /* +ve means continue searching */
|
||||
+ return code;
|
||||
+ }
|
||||
}
|
||||
return_error(e_undefinedfilename);
|
||||
}
|
||||
diff -up ghostscript-8.71/Resource/Init/gs_fonts.ps.SEARCH_HERE_FIRST ghostscript-8.71/Resource/Init/gs_fonts.ps
|
||||
--- ghostscript-8.71/Resource/Init/gs_fonts.ps.SEARCH_HERE_FIRST 2008-08-08 05:22:38.000000000 +0100
|
||||
+++ ghostscript-8.71/Resource/Init/gs_fonts.ps 2010-08-26 14:42:24.606840016 +0100
|
||||
@@ -939,7 +939,7 @@ $error /SubstituteFont { } put
|
||||
if
|
||||
}
|
||||
{ % Font file name
|
||||
- .loadfontloop { true exit } if
|
||||
+ //true .loadfontloop { //true exit } if
|
||||
}
|
||||
ifelse
|
||||
}
|
||||
@@ -982,39 +982,47 @@ $error /SubstituteFont { } put
|
||||
/.genericrfn where {
|
||||
pop
|
||||
pop dup .fonttempstring /FontResourceDir getsystemparam .genericrfn
|
||||
- .loadfontloop {
|
||||
+ //false .loadfontloop {
|
||||
//true
|
||||
} {
|
||||
- dup .nametostring .loadfontloop
|
||||
+ dup .nametostring
|
||||
+ //true .loadfontloop
|
||||
} ifelse
|
||||
} {
|
||||
- .loadfontloop
|
||||
+ //true .loadfontloop
|
||||
} ifelse
|
||||
} bind def
|
||||
-/.loadfontloop { % <fontname> <filename> .loadfontloop
|
||||
+/.loadfontloop { % <fontname> <filename> <libflag> .loadfontloop
|
||||
% <font> true
|
||||
% -or-
|
||||
% <fontname> false
|
||||
% See above regarding the use of 'loop'.
|
||||
{ % Is the font name a string?
|
||||
- dup type /stringtype ne
|
||||
- { QUIET not
|
||||
+ 1 index type /stringtype ne
|
||||
+ { pop
|
||||
+ QUIET not
|
||||
{ (Can't find font with non-string name: ) print dup =only (.) = flush
|
||||
}
|
||||
- if pop false exit
|
||||
- }
|
||||
- if
|
||||
- % Can we open the file?
|
||||
- findlibfile not
|
||||
- { QUIET not
|
||||
+ if pop //false exit
|
||||
+ } if
|
||||
+
|
||||
+ % check <libflag>
|
||||
+ {
|
||||
+ findlibfile not
|
||||
+ } {
|
||||
+ dup (r) { file } stopped {
|
||||
+ pop pop //true
|
||||
+ } {
|
||||
+ //false
|
||||
+ } ifelse
|
||||
+ } ifelse {
|
||||
+ QUIET not
|
||||
{ (Can't find \(or can't open\) font file ) print dup print
|
||||
(.) = flush
|
||||
}
|
||||
if pop false exit
|
||||
- }
|
||||
- if
|
||||
-
|
||||
- % Stack: fontname fontfilename fontfile
|
||||
+ } if
|
||||
+ % Stack: fontname fontfilename fontfile
|
||||
DISKFONTS
|
||||
{ .currentglobal true .setglobal
|
||||
2 index (r) file
|
||||
diff -up ghostscript-8.71/Resource/Init/gs_res.ps.SEARCH_HERE_FIRST ghostscript-8.71/Resource/Init/gs_res.ps
|
||||
--- ghostscript-8.71/Resource/Init/gs_res.ps.SEARCH_HERE_FIRST 2010-01-31 20:30:13.000000000 +0000
|
||||
+++ ghostscript-8.71/Resource/Init/gs_res.ps 2010-08-26 14:43:57.159839992 +0100
|
||||
@@ -287,7 +287,8 @@ systemdict begin
|
||||
} {
|
||||
(Resource) search {
|
||||
exch concatstrings
|
||||
- exch 0 1 getinterval concatstrings exit
|
||||
+ exch pop
|
||||
+ .file_name_separator concatstrings exit
|
||||
} {
|
||||
pop
|
||||
} ifelse
|
||||
@@ -557,46 +558,29 @@ status {
|
||||
{ forall } 0 get
|
||||
currentdict end 2 .execn begin
|
||||
} bind
|
||||
-/.file_name_is_iodevice_or_absolute
|
||||
-{ {
|
||||
- dup length 0 gt {
|
||||
- dup 0 get (%) 0 get eq {
|
||||
- pop true exit
|
||||
- } if
|
||||
- } if
|
||||
- .file_name_is_absolute exit
|
||||
- } loop
|
||||
-} bind def
|
||||
-/ResourceFileName
|
||||
- { % /in (scr)
|
||||
- exch //.rfnstring cvs % (scr) (n)
|
||||
- /GenericResourcePathSep getsystemparam exch % (scr) (/) (n)
|
||||
- Category .namestring % (scr) (/) (n) (c)
|
||||
- 3 1 roll % (scr) (c) (/) (n)
|
||||
- concatstrings concatstrings % (scr) (c/n)
|
||||
- /GenericResourceDir getsystemparam //.file_name_is_iodevice_or_absolute exec not {
|
||||
- /GenericResourceDir getsystemparam exch concatstrings
|
||||
- findlibfile
|
||||
- { % (scr) (p/c/n) file
|
||||
- pop exch copy true % (p/c/n) true
|
||||
- } { % (scr) (c/n)
|
||||
- false % (scr) (c/n) false
|
||||
- } ifelse
|
||||
- } { % (scr) (c/n)
|
||||
- false % (scr) (c/n) false
|
||||
- } ifelse
|
||||
- not { % (scr) (c/n)
|
||||
- /GenericResourceDir getsystemparam % (scr) (c/n) (d/)
|
||||
- dup length exch % (scr) (c/n) Ld (d/)
|
||||
- 3 index copy pop % (scr') (c/n) Ld
|
||||
- 1 index length % (scr') (c/n) Ld Lcn
|
||||
- 3 index 3 copy pop % (scr') (c/n) Ld Lcn (scr') Ld Lcn
|
||||
- getinterval % (scr') (c/n) Ld Lcn (scr[Ld:Lcn])
|
||||
- 4 3 roll exch % (scr') Ld Lcn (c/n) (scr[Ld:Lcn])
|
||||
- copy pop % (scr'') Ld Lcn
|
||||
- add 0 exch getinterval % (scr''[0:Ld+Lcn])
|
||||
- } if
|
||||
- } bind
|
||||
+
|
||||
+/ResourceFileName { % /in (scr) --> (p/c/n)
|
||||
+ exch //.rfnstring cvs % (scr) (n)
|
||||
+ /GenericResourcePathSep getsystemparam exch % (scr) (/) (n)
|
||||
+ Category .namestring % (scr) (/) (n) (c)
|
||||
+ 3 1 roll % (scr) (c) (/) (n)
|
||||
+ concatstrings concatstrings % (scr) (c/n)
|
||||
+ /GenericResourceDir getsystemparam 1 index % (scr) (c/n) (p/) (c/n)
|
||||
+ concatstrings % (scr) (c/n) (p/c/n)
|
||||
+ dup status {
|
||||
+ pop pop pop pop exch pop % (scr) (p/c/n)
|
||||
+ } {
|
||||
+ exch % (scr) (p/c/n) (c/n)
|
||||
+ .libfile {
|
||||
+ dup .filename pop % (scr) (p/c/n) file (p/c/n')
|
||||
+ exch closefile % (scr) (p/c/n) (p/c/n')
|
||||
+ exch pop % (scr) (p/c/n')
|
||||
+ } {
|
||||
+ pop % (scr) (p/c/n)
|
||||
+ } ifelse
|
||||
+ } ifelse
|
||||
+ exch copy % (p/c/n)
|
||||
+} bind
|
||||
|
||||
% Additional entries
|
||||
|
||||
diff -up ghostscript-8.71/toolbin/msvcxml.bat.SEARCH_HERE_FIRST ghostscript-8.71/toolbin/msvcxml.bat
|
||||
--- ghostscript-8.71/toolbin/msvcxml.bat.SEARCH_HERE_FIRST 2009-01-26 17:16:47.000000000 +0000
|
||||
+++ ghostscript-8.71/toolbin/msvcxml.bat 2010-08-26 14:42:24.619840359 +0100
|
||||
@@ -1428,7 +1428,7 @@ echo ^<UserMacro Name="GS_DOCDIR" Valu
|
||||
echo ^<UserMacro Name="GS_INIT" Value="gs_init.ps" /^>
|
||||
echo ^<UserMacro Name="GS_LIB_DEFAULT" Value="$(GSROOTDIR)/lib;$(GSROOTDIR)/Resource/Font;$(AROOTDIR)/fonts" /^>
|
||||
echo ^<UserMacro Name="GS_REVISION" Value="$(GS_VERSION)" /^>
|
||||
-echo ^<UserMacro Name="SEARCH_HERE_FIRST" Value="1" /^>
|
||||
+echo ^<UserMacro Name="SEARCH_HERE_FIRST" Value="0" /^>
|
||||
echo ^</VisualStudioPropertySheet^>
|
||||
goto end
|
||||
|
12
ghostscript-bbox-close.patch
Normal file
12
ghostscript-bbox-close.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up ghostscript-8.71/base/gdevbbox.c.bbox-close ghostscript-8.71/base/gdevbbox.c
|
||||
--- ghostscript-8.71/base/gdevbbox.c.bbox-close 2010-01-19 15:48:57.000000000 +0000
|
||||
+++ ghostscript-8.71/base/gdevbbox.c 2010-09-02 13:03:37.742943978 +0100
|
||||
@@ -249,7 +249,7 @@ bbox_close_device(gx_device * dev)
|
||||
* This device was created as a wrapper for a compositor.
|
||||
* Just free the devices.
|
||||
*/
|
||||
- int code = (bdev->forward_open_close ? gs_closedevice(tdev) : 0);
|
||||
+ int code = (tdev && bdev->forward_open_close ? gs_closedevice(tdev) : 0);
|
||||
|
||||
gs_free_object(dev->memory, dev, "bbox_close_device(composite)");
|
||||
return code;
|
17
ghostscript-cups-filters.patch
Normal file
17
ghostscript-cups-filters.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff -up ghostscript-8.70/cups/cups.mak.cups-filters ghostscript-8.70/cups/cups.mak
|
||||
--- ghostscript-8.70/cups/cups.mak.cups-filters 2009-10-15 12:42:27.531402610 +0100
|
||||
+++ ghostscript-8.70/cups/cups.mak 2009-10-15 12:44:14.835402533 +0100
|
||||
@@ -63,10 +63,10 @@ install-cups: cups
|
||||
$(INSTALL_PROGRAM) $(PDFTORASTER_XE) $(DESTDIR)$(CUPSSERVERBIN)/filter; \
|
||||
fi
|
||||
$(INSTALL_PROGRAM) cups/pstopxl $(DESTDIR)$(CUPSSERVERBIN)/filter
|
||||
- -mkdir -p $(DESTDIR)$(CUPSSERVERROOT)
|
||||
- $(INSTALL_DATA) cups/pstoraster.convs $(DESTDIR)$(CUPSSERVERROOT)
|
||||
+ -mkdir -p $(DESTDIR)$(CUPSDATA)/mime
|
||||
+ $(INSTALL_DATA) cups/pstoraster.convs $(DESTDIR)$(CUPSDATA)/mime
|
||||
if [ "$(CUPSPDFTORASTER)" = "1" ]; then \
|
||||
- $(INSTALL_DATA) cups/pdftoraster.convs $(DESTDIR)$(CUPSSERVERROOT); \
|
||||
+ $(INSTALL_DATA) cups/pdftoraster.convs $(DESTDIR)$(CUPSDATA)/mime; \
|
||||
fi
|
||||
-mkdir -p $(DESTDIR)$(CUPSDATA)/model
|
||||
$(INSTALL_DATA) cups/pxlcolor.ppd $(DESTDIR)$(CUPSDATA)/model
|
78
ghostscript-cups-realloc-color-depth.patch
Normal file
78
ghostscript-cups-realloc-color-depth.patch
Normal file
@ -0,0 +1,78 @@
|
||||
diff -up ghostscript-8.71/cups/gdevcups.c.cups-realloc-color-depth ghostscript-8.71/cups/gdevcups.c
|
||||
--- ghostscript-8.71/cups/gdevcups.c.cups-realloc-color-depth 2010-03-15 14:38:08.155372454 +0000
|
||||
+++ ghostscript-8.71/cups/gdevcups.c 2010-03-15 14:38:12.208372310 +0000
|
||||
@@ -975,7 +975,8 @@ cups_map_cmyk(gx_device *pdev, /* I - D
|
||||
frac k, /* I - Black value */
|
||||
frac *out) /* O - Device colors */
|
||||
{
|
||||
- int c0, c1, c2, c3; /* Temporary color values */
|
||||
+ int c0 = 0, c1 = 0,
|
||||
+ c2 = 0, c3 = 0; /* Temporary color values */
|
||||
float rr, rg, rb, /* Real RGB colors */
|
||||
ciex, ciey, ciez, /* CIE XYZ colors */
|
||||
ciey_yn, /* Normalized luminance */
|
||||
@@ -2703,9 +2704,13 @@ cups_put_params(gx_device *pdev, /*
|
||||
int color_set; /* Were the color attrs set? */
|
||||
gdev_prn_space_params sp; /* Space parameter data */
|
||||
int width, /* New width of page */
|
||||
- height; /* New height of page */
|
||||
+ height, /* New height of page */
|
||||
+ colorspace, /* New color space */
|
||||
+ bitspercolor; /* New bits per color */
|
||||
static int width_old = 0, /* Previous width */
|
||||
- height_old = 0; /* Previous height */
|
||||
+ height_old = 0, /* Previous height */
|
||||
+ colorspace_old = 0,/* Previous color space */
|
||||
+ bitspercolor_old = 0;/* Previous bits per color */
|
||||
ppd_attr_t *backside = NULL,
|
||||
*backsiderequiresflippedmargins = NULL;
|
||||
float swap;
|
||||
@@ -2800,9 +2805,10 @@ cups_put_params(gx_device *pdev, /*
|
||||
else if (code == 0) \
|
||||
{ \
|
||||
dprintf1("DEBUG: Setting %s to", sname); \
|
||||
- for (i = 0; i < count; i ++) \
|
||||
- dprintf1(" %d", (unsigned)(arrayval.data[i])); \
|
||||
- cups->header.name[i] = (unsigned)arrayval.data[i]; \
|
||||
+ for (i = 0; i < count; i ++) { \
|
||||
+ dprintf1(" %d", (unsigned)(arrayval.data[i])); \
|
||||
+ cups->header.name[i] = (unsigned)(arrayval.data[i]); \
|
||||
+ } \
|
||||
dprintf("...\n"); \
|
||||
}
|
||||
|
||||
@@ -3243,23 +3249,31 @@ cups_put_params(gx_device *pdev, /*
|
||||
}
|
||||
#endif /* CUPS_RASTER_SYNCv1 */
|
||||
|
||||
+ colorspace = cups->header.cupsColorSpace;
|
||||
+ bitspercolor = cups->header.cupsBitsPerColor;
|
||||
+
|
||||
/*
|
||||
* Don't reallocate memory unless the device has been opened...
|
||||
* Also reallocate only if the size has actually changed...
|
||||
*/
|
||||
|
||||
- if (pdev->is_open && (width != width_old || height != height_old))
|
||||
+ if (pdev->is_open &&
|
||||
+ (width != width_old || height != height_old ||
|
||||
+ colorspace != colorspace_old || bitspercolor != bitspercolor_old))
|
||||
{
|
||||
|
||||
width_old = width;
|
||||
height_old = height;
|
||||
+ colorspace_old = colorspace;
|
||||
+ bitspercolor_old = bitspercolor;
|
||||
|
||||
/*
|
||||
* Device is open and size has changed, so reallocate...
|
||||
*/
|
||||
|
||||
- dprintf4("DEBUG2: Reallocating memory, [%.0f %.0f] = %dx%d pixels...\n",
|
||||
- pdev->MediaSize[0], pdev->MediaSize[1], width, height);
|
||||
+ dprintf6("DEBUG2: Reallocating memory, [%.0f %.0f] = %dx%d pixels, color space: %d, bits per color: %d...\n",
|
||||
+ pdev->MediaSize[0], pdev->MediaSize[1], width, height,
|
||||
+ colorspace, bitspercolor);
|
||||
|
||||
sp = ((gx_device_printer *)pdev)->space_params;
|
||||
|
50
ghostscript-epstopdf-failure.patch
Normal file
50
ghostscript-epstopdf-failure.patch
Normal file
@ -0,0 +1,50 @@
|
||||
diff -up ghostscript-8.71/base/seexec.c.epstopdf-failure ghostscript-8.71/base/seexec.c
|
||||
--- ghostscript-8.71/base/seexec.c.epstopdf-failure 2009-08-14 05:12:58.000000000 +0100
|
||||
+++ ghostscript-8.71/base/seexec.c 2010-08-26 14:53:05.662840885 +0100
|
||||
@@ -165,7 +165,11 @@ hp: r = *pr;
|
||||
r.limit = r.ptr + ss->hex_left;
|
||||
status = s_hex_process(&r, pw, &ss->odd,
|
||||
(ss->is_leading_space ? hex_ignore_leading_whitespace : hex_break_on_whitespace));
|
||||
- ss->is_leading_space = (status == 2);
|
||||
+ if (status == 2) {
|
||||
+ ss->is_leading_space = true;
|
||||
+ status = 1;
|
||||
+ } else
|
||||
+ ss->is_leading_space = false;
|
||||
pr->ptr = r.ptr;
|
||||
ss->hex_left -= r.ptr - start;
|
||||
/*
|
||||
diff -up ghostscript-8.71/base/sstring.c.epstopdf-failure ghostscript-8.71/base/sstring.c
|
||||
--- ghostscript-8.71/base/sstring.c.epstopdf-failure 2009-08-13 20:04:34.000000000 +0100
|
||||
+++ ghostscript-8.71/base/sstring.c 2010-08-26 14:53:05.663840592 +0100
|
||||
@@ -355,8 +355,12 @@ const stream_template s_PSSD_template =
|
||||
/* ------ Utilities ------ */
|
||||
|
||||
/*
|
||||
- * Convert hex data to binary. Return 1 if we filled the string, 0 if
|
||||
- * we ran out of input data before filling the string, or ERRC on error.
|
||||
+ * Convert hex data to binary.
|
||||
+ * Return 1 if we filled the string,
|
||||
+ * 0 if we ran out of input data before filling the string,
|
||||
+ * 2 if hex_break_on_whitespace is on and we encounrered
|
||||
+ * a white space.
|
||||
+ * ERRC on error.
|
||||
* The caller must set *odd_digit to -1 before the first call;
|
||||
* after each call, if an odd number of hex digits has been read (total),
|
||||
* *odd_digit is the odd digit value, otherwise *odd_digit = -1.
|
||||
diff -up ghostscript-8.71/psi/iscan.c.epstopdf-failure ghostscript-8.71/psi/iscan.c
|
||||
--- ghostscript-8.71/psi/iscan.c.epstopdf-failure 2009-11-11 13:52:23.000000000 +0000
|
||||
+++ ghostscript-8.71/psi/iscan.c 2010-08-26 14:53:05.665840572 +0100
|
||||
@@ -329,9 +329,9 @@ scan_handle_refill(i_ctx_t *i_ctx_p, sca
|
||||
rstate, 1, cont);
|
||||
}
|
||||
}
|
||||
- /* No more data available, but no exception. How can this be? */
|
||||
- lprintf("Can't refill scanner input buffer!");
|
||||
- return_error(e_Fatal);
|
||||
+ /* No more data available, but no exception. */
|
||||
+ /* A filter is consuming headers but returns nothing. */
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/*
|
33
ghostscript-fPIC.patch
Normal file
33
ghostscript-fPIC.patch
Normal file
@ -0,0 +1,33 @@
|
||||
diff -up ghostscript-8.64/base/devs.mak.fPIC ghostscript-8.64/base/devs.mak
|
||||
--- ghostscript-8.64/base/devs.mak.fPIC 2008-11-07 18:49:34.000000000 +0000
|
||||
+++ ghostscript-8.64/base/devs.mak 2009-02-04 11:34:21.000000000 +0000
|
||||
@@ -456,7 +456,7 @@ $(GLOBJ)gdevx.$(OBJ) : $(GLSRC)gdevx.c $
|
||||
$(GLCCSHARED) $(XINCLUDE) $(GLO_)gdevx.$(OBJ) $(C_) $(GLSRC)gdevx.c
|
||||
|
||||
$(GLOBJ)gdevxcmp.$(OBJ) : $(GLSRC)gdevxcmp.c $(GDEVX) $(math__h)
|
||||
- $(GLCC) $(XINCLUDE) $(GLO_)gdevxcmp.$(OBJ) $(C_) $(GLSRC)gdevxcmp.c
|
||||
+ $(GLCCSHARED) $(XINCLUDE) $(GLO_)gdevxcmp.$(OBJ) $(C_) $(GLSRC)gdevxcmp.c
|
||||
|
||||
$(GLOBJ)gdevxini.$(OBJ) : $(GLSRC)gdevxini.c $(GDEVX) $(memory__h)\
|
||||
$(gserrors_h) $(gsparamx_h) $(gxdevmem_h) $(gdevbbox_h)
|
||||
diff -up ghostscript-8.64/base/lib.mak.fPIC ghostscript-8.64/base/lib.mak
|
||||
--- ghostscript-8.64/base/lib.mak.fPIC 2009-01-08 09:17:18.000000000 +0000
|
||||
+++ ghostscript-8.64/base/lib.mak 2009-02-04 11:34:21.000000000 +0000
|
||||
@@ -894,7 +894,7 @@ $(GLOBJ)gsparam.$(OBJ) : $(GLSRC)gsparam
|
||||
$(GLOBJ)gsparamx.$(OBJ) : $(GLSRC)gsparamx.c $(string__h)\
|
||||
$(gserror_h) $(gserrors_h) $(gsmemory_h) $(gsparam_h) $(gsparamx_h)\
|
||||
$(gstypes_h)
|
||||
- $(GLCC) $(GLO_)gsparamx.$(OBJ) $(C_) $(GLSRC)gsparamx.c
|
||||
+ $(GLCCSHARED) $(GLO_)gsparamx.$(OBJ) $(C_) $(GLSRC)gsparamx.c
|
||||
|
||||
# Future replacement for gsparams.c
|
||||
$(GLOBJ)gsparam2.$(OBJ) : $(GLSRC)gsparam2.c $(GXERR) $(memory__h)\
|
||||
@@ -1085,7 +1085,7 @@ $(GLOBJ)gdevnfwd.$(OBJ) : $(GLSRC)gdevnf
|
||||
|
||||
# Provide a mapping between StandardEncoding and ISOLatin1Encoding.
|
||||
$(GLOBJ)gdevemap.$(OBJ) : $(GLSRC)gdevemap.c $(AK) $(std_h)
|
||||
- $(GLCC) $(GLO_)gdevemap.$(OBJ) $(C_) $(GLSRC)gdevemap.c
|
||||
+ $(GLCCSHARED) $(GLO_)gdevemap.$(OBJ) $(C_) $(GLSRC)gdevemap.c
|
||||
|
||||
###### Create a pseudo-"feature" for the entire graphics library.
|
||||
|
31
ghostscript-gdevcups-ripcache.patch
Normal file
31
ghostscript-gdevcups-ripcache.patch
Normal file
@ -0,0 +1,31 @@
|
||||
diff -up ghostscript-8.71/cups/gdevcups.c.gdevcups-ripcache ghostscript-8.71/cups/gdevcups.c
|
||||
--- ghostscript-8.71/cups/gdevcups.c.gdevcups-ripcache 2010-09-02 14:38:53.886818591 +0100
|
||||
+++ ghostscript-8.71/cups/gdevcups.c 2010-09-02 14:40:49.925943426 +0100
|
||||
@@ -915,8 +915,7 @@ cups_get_space_params(const gx_device_pr
|
||||
switch (sscanf(cache_env, "%f%254s", &cache_size, cache_units))
|
||||
{
|
||||
case 0 :
|
||||
- cache_size = 8 * 1024 * 1024;
|
||||
- break;
|
||||
+ return;
|
||||
case 1 :
|
||||
cache_size *= 4 * CUPS_TILE_SIZE * CUPS_TILE_SIZE;
|
||||
break;
|
||||
@@ -933,12 +932,15 @@ cups_get_space_params(const gx_device_pr
|
||||
}
|
||||
}
|
||||
else
|
||||
- cache_size = 8 * 1024 * 1024;
|
||||
+ return;
|
||||
+
|
||||
+ if (cache_size == 0)
|
||||
+ return;
|
||||
|
||||
dprintf1("DEBUG2: cache_size = %.0f\n", cache_size);
|
||||
|
||||
space_params->MaxBitmap = (int)cache_size;
|
||||
- space_params->BufferSpace = (int)cache_size / 10;
|
||||
+ space_params->BufferSpace = (int)cache_size;
|
||||
}
|
||||
|
||||
|
90
ghostscript-iname-segfault.patch
Normal file
90
ghostscript-iname-segfault.patch
Normal file
@ -0,0 +1,90 @@
|
||||
diff -up ghostscript-8.71/psi/iname.c.iname-segfault ghostscript-8.71/psi/iname.c
|
||||
--- ghostscript-8.71/psi/iname.c.iname-segfault 2008-10-21 17:26:09.000000000 +0100
|
||||
+++ ghostscript-8.71/psi/iname.c 2010-09-02 12:13:02.833819490 +0100
|
||||
@@ -47,8 +47,8 @@ gs_private_st_composite(st_name_table, n
|
||||
|
||||
/* Forward references */
|
||||
static int name_alloc_sub(name_table *);
|
||||
-static void name_free_sub(name_table *, uint);
|
||||
-static void name_scan_sub(name_table *, uint, bool);
|
||||
+static void name_free_sub(name_table *, uint, bool);
|
||||
+static void name_scan_sub(name_table *, uint, bool, bool);
|
||||
|
||||
/* Debugging printout */
|
||||
#ifdef DEBUG
|
||||
@@ -99,7 +99,7 @@ names_init(ulong count, gs_ref_memory_t
|
||||
|
||||
if (code < 0) {
|
||||
while (nt->sub_next > 0)
|
||||
- name_free_sub(nt, --(nt->sub_next));
|
||||
+ name_free_sub(nt, --(nt->sub_next), false);
|
||||
gs_free_object(mem, nt, "name_init(nt)");
|
||||
return 0;
|
||||
}
|
||||
@@ -413,16 +413,7 @@ names_trace_finish(name_table * nt, gc_s
|
||||
if (sub != 0) {
|
||||
int save_count = nt->sub_count;
|
||||
|
||||
- name_scan_sub(nt, i, true);
|
||||
- if (save_count != nt->sub_count) {
|
||||
- /* name_scan_sub has released the i-th entry. */
|
||||
- continue;
|
||||
- }
|
||||
- if (nt->sub[i].names == 0 && gcst != 0) {
|
||||
- /* Mark the just-freed sub-table as unmarked. */
|
||||
- o_set_unmarked((obj_header_t *)sub - 1);
|
||||
- o_set_unmarked((obj_header_t *)ssub - 1);
|
||||
- }
|
||||
+ name_scan_sub(nt, i, true, true && (gcst != 0));
|
||||
}
|
||||
}
|
||||
nt->sub_next = 0;
|
||||
@@ -506,7 +497,7 @@ name_alloc_sub(name_table * nt)
|
||||
/* Add the newly allocated entries to the free list. */
|
||||
/* Note that the free list will only be properly sorted if */
|
||||
/* it was empty initially. */
|
||||
- name_scan_sub(nt, sub_index, false);
|
||||
+ name_scan_sub(nt, sub_index, false, false);
|
||||
#ifdef DEBUG
|
||||
if (gs_debug_c('n')) { /* Print the lengths of the hash chains. */
|
||||
int i0;
|
||||
@@ -535,8 +526,20 @@ name_alloc_sub(name_table * nt)
|
||||
|
||||
/* Free a sub-table. */
|
||||
static void
|
||||
-name_free_sub(name_table * nt, uint sub_index)
|
||||
+name_free_sub(name_table * nt, uint sub_index, bool unmark)
|
||||
{
|
||||
+ /* If the subtable is in a previous save level, gs_free_object()
|
||||
+ * may not actually free the memory, in case that happens, we need
|
||||
+ * to explicitly remove the gc mark.
|
||||
+ */
|
||||
+ if (unmark) {
|
||||
+ name_sub_table *sub = nt->sub[sub_index].names;
|
||||
+ name_string_sub_table_t *ssub = nt->sub[sub_index].strings;
|
||||
+
|
||||
+ o_set_unmarked((obj_header_t *)sub - 1);
|
||||
+ o_set_unmarked((obj_header_t *)ssub - 1);
|
||||
+ }
|
||||
+
|
||||
gs_free_object(nt->memory, nt->sub[sub_index].strings,
|
||||
"name_free_sub(string sub-table)");
|
||||
gs_free_object(nt->memory, nt->sub[sub_index].names,
|
||||
@@ -550,7 +553,7 @@ name_free_sub(name_table * nt, uint sub_
|
||||
/* will stay sorted. If all entries are unmarked and free_empty is true, */
|
||||
/* free the sub-table. */
|
||||
static void
|
||||
-name_scan_sub(name_table * nt, uint sub_index, bool free_empty)
|
||||
+name_scan_sub(name_table * nt, uint sub_index, bool free_empty, bool unmark)
|
||||
{
|
||||
name_string_sub_table_t *ssub = nt->sub[sub_index].strings;
|
||||
uint free = nt->free;
|
||||
@@ -579,7 +582,7 @@ name_scan_sub(name_table * nt, uint sub_
|
||||
nt->free = free;
|
||||
else {
|
||||
/* No marked entries, free the sub-table. */
|
||||
- name_free_sub(nt, sub_index);
|
||||
+ name_free_sub(nt, sub_index, unmark);
|
||||
if (sub_index == nt->sub_count - 1) {
|
||||
/* Back up over a final run of deleted sub-tables. */
|
||||
do {
|
25
ghostscript-jbig2-image-refcount.patch
Normal file
25
ghostscript-jbig2-image-refcount.patch
Normal file
@ -0,0 +1,25 @@
|
||||
diff -up ghostscript-8.71/jbig2dec/jbig2_image.c.jbig2-image-refcount ghostscript-8.71/jbig2dec/jbig2_image.c
|
||||
--- ghostscript-8.71/jbig2dec/jbig2_image.c.jbig2-image-refcount 2010-08-05 14:55:56.417043303 +0100
|
||||
+++ ghostscript-8.71/jbig2dec/jbig2_image.c 2010-08-05 14:56:46.796169065 +0100
|
||||
@@ -60,15 +60,18 @@ Jbig2Image* jbig2_image_new(Jbig2Ctx *ct
|
||||
/* clone an image pointer by bumping its reference count */
|
||||
Jbig2Image* jbig2_image_clone(Jbig2Ctx *ctx, Jbig2Image *image)
|
||||
{
|
||||
- image->refcount++;
|
||||
+ if (image)
|
||||
+ image->refcount++;
|
||||
return image;
|
||||
}
|
||||
|
||||
/* release an image pointer, freeing it it appropriate */
|
||||
void jbig2_image_release(Jbig2Ctx *ctx, Jbig2Image *image)
|
||||
{
|
||||
- image->refcount--;
|
||||
- if (!image->refcount) jbig2_image_free(ctx, image);
|
||||
+ if (image) {
|
||||
+ image->refcount--;
|
||||
+ if (!image->refcount) jbig2_image_free(ctx, image);
|
||||
+ }
|
||||
}
|
||||
|
||||
/* free a Jbig2Image structure and its associated memory */
|
44
ghostscript-jbig2dec-nullderef.patch
Normal file
44
ghostscript-jbig2dec-nullderef.patch
Normal file
@ -0,0 +1,44 @@
|
||||
diff -up ghostscript-8.71/jbig2dec/jbig2_symbol_dict.c.jbig2dec-nullderef ghostscript-8.71/jbig2dec/jbig2_symbol_dict.c
|
||||
--- ghostscript-8.71/jbig2dec/jbig2_symbol_dict.c.jbig2dec-nullderef 2009-05-29 07:48:44.000000000 +0100
|
||||
+++ ghostscript-8.71/jbig2dec/jbig2_symbol_dict.c 2010-02-17 12:06:42.040614797 +0000
|
||||
@@ -367,6 +367,11 @@ jbig2_decode_symbol_dict(Jbig2Ctx *ctx,
|
||||
memcpy(region_params.gbat, params->sdat, sdat_bytes);
|
||||
|
||||
image = jbig2_image_new(ctx, SYMWIDTH, HCHEIGHT);
|
||||
+ if (image == NULL) {
|
||||
+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number,
|
||||
+ "failed to allocate image storage");
|
||||
+ return NULL;
|
||||
+ }
|
||||
|
||||
code = jbig2_decode_generic_region(ctx, segment, ®ion_params,
|
||||
as, image, GB_stats);
|
||||
@@ -517,6 +522,11 @@ jbig2_decode_symbol_dict(Jbig2Ctx *ctx,
|
||||
ID, RDX, RDY);
|
||||
|
||||
image = jbig2_image_new(ctx, SYMWIDTH, HCHEIGHT);
|
||||
+ if (image == NULL) {
|
||||
+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number,
|
||||
+ "failed to allocate image storage");
|
||||
+ return NULL;
|
||||
+ }
|
||||
|
||||
/* Table 18 */
|
||||
rparams.GRTEMPLATE = params->SDRTEMPLATE;
|
||||
@@ -635,6 +645,16 @@ jbig2_decode_symbol_dict(Jbig2Ctx *ctx,
|
||||
for (j = HCFIRSTSYM; j < NSYMSDECODED; j++) {
|
||||
Jbig2Image *glyph;
|
||||
glyph = jbig2_image_new(ctx, SDNEWSYMWIDTHS[j], HCHEIGHT);
|
||||
+ if (glyph == NULL) {
|
||||
+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number,
|
||||
+ "error allocating image storage for glyph");
|
||||
+ while (--j >= HCFIRSTSYM) {
|
||||
+ jbig2_image_release(ctx, SDNEWSYMS->glyphs[j]);
|
||||
+ SDNEWSYMS->glyphs[j] = NULL;
|
||||
+ }
|
||||
+ jbig2_image_release(ctx, image);
|
||||
+ return NULL;
|
||||
+ }
|
||||
jbig2_image_compose(ctx, glyph, image,
|
||||
-x, 0, JBIG2_COMPOSE_REPLACE);
|
||||
x += SDNEWSYMWIDTHS[j];
|
24
ghostscript-ldflags.patch
Normal file
24
ghostscript-ldflags.patch
Normal file
@ -0,0 +1,24 @@
|
||||
--- ghostscript-8.71/base/unix-dll.mak 2009-10-19 21:24:53.000000000 +0100
|
||||
+++ ghostscript-8.71/base/unix-dll.mak.ldflags 2010-02-19 10:07:06.645044318 +0000
|
||||
@@ -88,8 +88,9 @@ $(GSSOX_XE): $(GS_SO) $(PSSRC)$(SOC_LOAD
|
||||
|
||||
# ------------------------- Recursive make targets ------------------------- #
|
||||
|
||||
-SODEFS=LDFLAGS='$(LDFLAGS) $(LDFLAGS_SO)'\
|
||||
+SODEFS=\
|
||||
GS_XE=$(BINDIR)/$(SOBINRELDIR)/$(GS_SONAME_MAJOR_MINOR)\
|
||||
+ GS_XE_LDFLAGS='$(LDFLAGS_SO)'\
|
||||
STDIO_IMPLEMENTATION=c\
|
||||
DISPLAY_DEV=$(DD)$(SOOBJRELDIR)/display.dev\
|
||||
BINDIR=$(BINDIR)/$(SOBINRELDIR)\
|
||||
--- ghostscript-8.71/base/unixlink.mak 2008-02-29 08:13:08.000000000 +0000
|
||||
+++ ghostscript-8.71/base/unixlink.mak.ldflags 2010-02-19 10:07:06.646044276 +0000
|
||||
@@ -50,7 +50,7 @@ $(GS_A): $(obj_tr) $(ECHOGS_XE) $(INT_AR
|
||||
# which has limited environment space.
|
||||
ldt_tr=$(PSOBJ)ldt.tr
|
||||
$(GS_XE): $(ld_tr) $(ECHOGS_XE) $(XE_ALL) $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ)
|
||||
- $(ECHOGS_XE) -w $(ldt_tr) -n - $(CCLD) $(LDFLAGS) -o $(GS_XE)
|
||||
+ $(ECHOGS_XE) -w $(ldt_tr) -n - $(CCLD) $(GS_XE_LDFLAGS) $(LDFLAGS) -o $(GS_XE)
|
||||
$(ECHOGS_XE) -a $(ldt_tr) -n -s $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ) $(PSOBJ)gs.$(OBJ) -s
|
||||
cat $(ld_tr) >>$(ldt_tr)
|
||||
$(ECHOGS_XE) -a $(ldt_tr) -s - $(EXTRALIBS) $(STDLIBS)
|
14
ghostscript-multilib.patch
Normal file
14
ghostscript-multilib.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff -up ghostscript-8.61/ijs/Makefile.am.multilib ghostscript-8.61/ijs/Makefile.am
|
||||
diff -up ghostscript-8.61/ijs/ijs-config.in.multilib ghostscript-8.61/ijs/ijs-config.in
|
||||
--- ghostscript-8.61/ijs/ijs-config.in.multilib 2002-01-31 19:09:46.000000000 +0000
|
||||
+++ ghostscript-8.61/ijs/ijs-config.in 2007-11-23 09:19:18.000000000 +0000
|
||||
@@ -43,8 +43,7 @@ while test $# -gt 0; do
|
||||
echo $includes
|
||||
;;
|
||||
--libs)
|
||||
- libdirs=-L@libdir@
|
||||
- echo $libdirs -lijs
|
||||
+ echo -lijs
|
||||
;;
|
||||
*)
|
||||
echo "${usage}" 1>&2
|
12
ghostscript-noopt.patch
Normal file
12
ghostscript-noopt.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up ghostscript-8.64/psi/int.mak.noopt ghostscript-8.64/psi/int.mak
|
||||
--- ghostscript-8.64/psi/int.mak.noopt 2008-12-26 07:25:31.000000000 +0000
|
||||
+++ ghostscript-8.64/psi/int.mak 2009-02-04 11:33:48.000000000 +0000
|
||||
@@ -111,7 +111,7 @@ $(PSOBJ)igc.$(OBJ) : $(PSSRC)igc.c $(GH)
|
||||
$(PSOBJ)igcref.$(OBJ) : $(PSSRC)igcref.c $(GH) $(memory__h)\
|
||||
$(gsexit_h) $(gsstruct_h)\
|
||||
$(iastate_h) $(idebug_h) $(igc_h) $(iname_h) $(ipacked_h) $(store_h)
|
||||
- $(PSCC) $(PSO_)igcref.$(OBJ) $(C_) $(PSSRC)igcref.c
|
||||
+ $(PSCC) -O0 $(PSO_)igcref.$(OBJ) $(C_) $(PSSRC)igcref.c
|
||||
|
||||
$(PSOBJ)igcstr.$(OBJ) : $(PSSRC)igcstr.c $(GH) $(memory__h)\
|
||||
$(gsmdebug_h) $(gsstruct_h) $(iastate_h) $(igcstr_h)
|
12
ghostscript-pdf2dsc.patch
Normal file
12
ghostscript-pdf2dsc.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up ghostscript-8.71/lib/pdf2dsc.ps.pdf2dsc ghostscript-8.71/lib/pdf2dsc.ps
|
||||
--- ghostscript-8.71/lib/pdf2dsc.ps.pdf2dsc 2010-02-20 15:50:51.287734970 +0000
|
||||
+++ ghostscript-8.71/lib/pdf2dsc.ps 2010-02-20 15:51:02.902609964 +0000
|
||||
@@ -116,7 +116,7 @@ systemdict /.setsafe known { .setsafe }
|
||||
DSCfile PDFname write==only
|
||||
( \(r\) file { DELAYSAFER { .setsafe } if } stopped pop\n) puts
|
||||
( pdfopen begin\n) puts
|
||||
- ( copy_trailer_attrs\n) puts
|
||||
+ ( process_trailer_attrs\n) puts
|
||||
(%%EndSetup\n) puts
|
||||
|
||||
/.hasPageLabels false def % see "Page Labels" in the PDF Reference
|
39
ghostscript-pdftoraster-exit.patch
Normal file
39
ghostscript-pdftoraster-exit.patch
Normal file
@ -0,0 +1,39 @@
|
||||
diff -up ghostscript-8.70/cups/pdftoraster.c.pdftoraster-exit ghostscript-8.70/cups/pdftoraster.c
|
||||
--- ghostscript-8.70/cups/pdftoraster.c.pdftoraster-exit 2008-10-17 23:58:21.000000000 +0100
|
||||
+++ ghostscript-8.70/cups/pdftoraster.c 2010-01-25 10:15:42.269209639 +0000
|
||||
@@ -35,6 +35,8 @@ MIT Open Source License - http://www.o
|
||||
#include <stdarg.h>
|
||||
#include <fcntl.h>
|
||||
#include <cups/raster.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/wait.h>
|
||||
|
||||
#define MAX_CHECK_COMMENT_LINES 20
|
||||
#ifndef GS
|
||||
@@ -123,6 +125,7 @@ int main(int argc, char *argv[], char *e
|
||||
const char* apos;
|
||||
int fds[2];
|
||||
int pid;
|
||||
+ int status;
|
||||
|
||||
parseOpts(argc, argv);
|
||||
|
||||
@@ -502,8 +505,17 @@ int main(int argc, char *argv[], char *e
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
+ close (fds[1]);
|
||||
}
|
||||
|
||||
- exit(0);
|
||||
+ if (waitpid (pid, &status, 0) == -1) {
|
||||
+ perror (GS);
|
||||
+ exit (1);
|
||||
+ }
|
||||
+
|
||||
+ if (WIFEXITED (status))
|
||||
+ exit(WEXITSTATUS (status));
|
||||
+ else
|
||||
+ exit(1);
|
||||
}
|
||||
|
12
ghostscript-pksmraw.patch
Normal file
12
ghostscript-pksmraw.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up ghostscript-8.64/base/gxclrast.c.pksmraw ghostscript-8.64/base/gxclrast.c
|
||||
--- ghostscript-8.64/base/gxclrast.c.pksmraw 2008-12-13 20:05:37.000000000 +0000
|
||||
+++ ghostscript-8.64/base/gxclrast.c 2009-02-04 11:36:25.000000000 +0000
|
||||
@@ -2685,8 +2685,6 @@ static int apply_create_compositor(gx_de
|
||||
rc_increment(tdev);
|
||||
*ptarget = tdev;
|
||||
}
|
||||
- if (code < 0)
|
||||
- return code;
|
||||
|
||||
/* Perform any updates for the clist device required */
|
||||
code = pcomp->type->procs.clist_compositor_read_update(pcomp,
|
52
ghostscript-runlibfileifexists.patch
Normal file
52
ghostscript-runlibfileifexists.patch
Normal file
@ -0,0 +1,52 @@
|
||||
diff -up ghostscript-8.71/Resource/Init/gs_fonts.ps.runlibfileifexists ghostscript-8.71/Resource/Init/gs_fonts.ps
|
||||
--- ghostscript-8.71/Resource/Init/gs_fonts.ps.runlibfileifexists 2010-09-13 15:00:22.566812041 +0100
|
||||
+++ ghostscript-8.71/Resource/Init/gs_fonts.ps 2010-09-13 15:03:24.520814577 +0100
|
||||
@@ -96,10 +96,19 @@ userdict /Fontmap .FontDirectory maxleng
|
||||
% stack: dict file fontname filename|aliasname
|
||||
1 index type /stringtype eq
|
||||
1 index type /nametype eq and 1 index xcheck and
|
||||
- 1 index /run eq 2 index /.runlibfile eq or and {
|
||||
+ 1 index /run eq 2 index /.runlibfile eq 3 index /.runlibfileifexists eq or or and {
|
||||
% This is an inclusion entry.
|
||||
- pop findlibfile { exch pop } { file } ifelse
|
||||
- 2 index exch .readFontmap pop
|
||||
+ 0 index /.runlibfileifexists eq {
|
||||
+ pop findlibfile {
|
||||
+ exch pop
|
||||
+ 2 index exch .readFontmap pop
|
||||
+ } {
|
||||
+ pop
|
||||
+ } ifelse
|
||||
+ } {
|
||||
+ pop findlibfile { exch pop } { file } ifelse
|
||||
+ 2 index exch .readFontmap pop
|
||||
+ } ifelse
|
||||
} {
|
||||
% This is a real entry.
|
||||
% Read and pop tokens until a semicolon.
|
||||
diff -up ghostscript-8.64/Resource/Init/gs_init.ps.runlibfileifexists ghostscript-8.64/Resource/Init/gs_init.ps
|
||||
--- ghostscript-8.64/Resource/Init/gs_init.ps.runlibfileifexists 2009-01-08 09:17:18.000000000 +0000
|
||||
+++ ghostscript-8.64/Resource/Init/gs_init.ps 2009-02-04 11:35:19.000000000 +0000
|
||||
@@ -672,6 +672,14 @@ systemdict /internaldict dup .makeintern
|
||||
{ /undefinedfilename signalerror }
|
||||
ifelse
|
||||
} bind def
|
||||
+/runlibfileifexists
|
||||
+ { % We don't want to bind 'run' into this procedure,
|
||||
+ % since run may get redefined.
|
||||
+ findlibfile
|
||||
+ { exch pop /run .systemvar exec }
|
||||
+ { pop }
|
||||
+ ifelse
|
||||
+ } bind def
|
||||
/selectdevice
|
||||
{ finddevice setdevice .setdefaultscreen } bind def
|
||||
/signalerror % <object> <errorname> signalerror -
|
||||
@@ -840,6 +848,7 @@ userdict /.currentresourcefile //null pu
|
||||
} bind def
|
||||
% Temporarily substitute it for the real runlibfile.
|
||||
/.runlibfile /runlibfile load def
|
||||
+/.runlibfileifexists /runlibfileifexists load def
|
||||
/runlibfile /runlibfile0 load def
|
||||
|
||||
% Create the error handling machinery.
|
31
ghostscript-scripts.patch
Normal file
31
ghostscript-scripts.patch
Normal file
@ -0,0 +1,31 @@
|
||||
diff -up ghostscript-8.64/lib/dvipdf.scripts ghostscript-8.64/lib/dvipdf
|
||||
--- ghostscript-8.64/lib/dvipdf.scripts 2009-01-10 22:11:18.000000000 +0000
|
||||
+++ ghostscript-8.64/lib/dvipdf 2009-02-04 11:32:31.000000000 +0000
|
||||
@@ -44,4 +44,4 @@ fi
|
||||
|
||||
# We have to include the options twice because -I only takes effect if it
|
||||
# appears before other options.
|
||||
-exec dvips -Ppdf $DVIPSOPTIONS -q -f "$infile" | $GS_EXECUTABLE $OPTIONS -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sstdout=%stderr -sOutputFile="$outfile" $OPTIONS -c .setpdfwrite -
|
||||
+exec dvips -R -Ppdf $DVIPSOPTIONS -q -f "$infile" | $GS_EXECUTABLE $OPTIONS -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sstdout=%stderr -sOutputFile="$outfile" $OPTIONS -c .setpdfwrite -
|
||||
diff -up ghostscript-8.64/lib/pv.sh.scripts ghostscript-8.64/lib/pv.sh
|
||||
--- ghostscript-8.64/lib/pv.sh.scripts 2007-07-05 11:41:52.000000000 +0100
|
||||
+++ ghostscript-8.64/lib/pv.sh 2009-02-04 11:31:32.000000000 +0000
|
||||
@@ -31,7 +31,7 @@ fi
|
||||
GS_EXECUTABLE=gs
|
||||
|
||||
TEMPDIR=.
|
||||
-PAGE=$1
|
||||
+PAGE="$1"
|
||||
shift
|
||||
FILE="$1"
|
||||
shift
|
||||
@@ -44,7 +44,7 @@ else
|
||||
tmpfile="$TEMPDIR/$FILE.$$.pv"
|
||||
fi
|
||||
trap "rm -rf $tmpfile" 0 1 2 15
|
||||
-#dvips -D$RESOLUTION -p $PAGE -n 1 "$FILE" "$@" -o $tmpfile
|
||||
-dvips -p $PAGE -n 1 "$FILE" "$@" -o $tmpfile
|
||||
+#dvips -R -D$RESOLUTION -p $PAGE -n 1 "$FILE" "$@" -o $tmpfile
|
||||
+dvips -R -p $PAGE -n 1 "$FILE" "$@" -o $tmpfile
|
||||
$GS_EXECUTABLE $tmpfile
|
||||
exit 0
|
26
ghostscript-system-jasper.patch
Normal file
26
ghostscript-system-jasper.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff -up ghostscript-8.64/base/sjpx.c.system-jasper ghostscript-8.64/base/sjpx.c
|
||||
--- ghostscript-8.64/base/sjpx.c.system-jasper 2008-08-21 00:22:49.000000000 +0100
|
||||
+++ ghostscript-8.64/base/sjpx.c 2009-02-04 11:35:56.000000000 +0000
|
||||
@@ -34,14 +34,6 @@ static void s_jpxd_set_defaults(stream_s
|
||||
private_st_jpxd_state(); /* creates a gc object for our state,
|
||||
defined in sjpx.h */
|
||||
|
||||
-/* error reporting callback for the jpx library */
|
||||
-static void
|
||||
-s_jpx_jas_error_cb(jas_error_t err, char *msg)
|
||||
-{
|
||||
- dprintf2("jasper (code %d) %s", (int)err, msg);
|
||||
-}
|
||||
-
|
||||
-
|
||||
/* initialize the steam.
|
||||
this involves allocating the stream and image structures, and
|
||||
initializing the decoder.
|
||||
@@ -59,7 +51,6 @@ s_jpxd_init(stream_state * ss)
|
||||
}
|
||||
|
||||
status = jas_init();
|
||||
- jas_set_error_cb(s_jpx_jas_error_cb);
|
||||
#ifdef JPX_DEBUG
|
||||
/* raise the error reporting threshold from the default (0) */
|
||||
jas_setdbglevel(1);
|
13
ghostscript-tif-fail-close.patch
Normal file
13
ghostscript-tif-fail-close.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff -up ghostscript-8.71/base/gdevtfax.c.tif-fail-close ghostscript-8.71/base/gdevtfax.c
|
||||
--- ghostscript-8.71/base/gdevtfax.c.tif-fail-close 2010-03-12 10:57:43.514750465 +0000
|
||||
+++ ghostscript-8.71/base/gdevtfax.c 2010-03-12 10:58:38.253627230 +0000
|
||||
@@ -97,7 +97,8 @@ tfax_close(gx_device * pdev)
|
||||
{
|
||||
gx_device_tfax *const tfdev = (gx_device_tfax *)pdev;
|
||||
|
||||
- TIFFCleanup(tfdev->tif);
|
||||
+ if (tfdev->tif)
|
||||
+ TIFFCleanup(tfdev->tif);
|
||||
|
||||
return gdev_prn_close(pdev);
|
||||
}
|
12
ghostscript-tiff-default-strip-size.patch
Normal file
12
ghostscript-tiff-default-strip-size.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up ghostscript-8.71/base/gdevtifs.h.tiff-default-strip-size ghostscript-8.71/base/gdevtifs.h
|
||||
--- ghostscript-8.71/base/gdevtifs.h.tiff-default-strip-size 2010-02-04 17:47:57.000000000 +0000
|
||||
+++ ghostscript-8.71/base/gdevtifs.h 2010-03-16 09:58:29.269600052 +0000
|
||||
@@ -50,7 +50,7 @@ int tiff_print_page(gx_device_printer *d
|
||||
* Sets the compression tag for TIFF and updates the rows_per_strip tag to
|
||||
* reflect max_strip_size under the new compression scheme.
|
||||
*/
|
||||
-#define TIFF_DEFAULT_STRIP_SIZE 8192
|
||||
+#define TIFF_DEFAULT_STRIP_SIZE 1048576
|
||||
|
||||
int tiff_set_compression(gx_device_printer *pdev,
|
||||
TIFF *tif,
|
59
ghostscript-tiff-fixes.patch
Normal file
59
ghostscript-tiff-fixes.patch
Normal file
@ -0,0 +1,59 @@
|
||||
diff -up ghostscript-8.71/base/gdevtfnx.c.tiff-fixes ghostscript-8.71/base/gdevtfnx.c
|
||||
--- ghostscript-8.71/base/gdevtfnx.c.tiff-fixes 2010-02-04 17:47:57.000000000 +0000
|
||||
+++ ghostscript-8.71/base/gdevtfnx.c 2010-03-16 10:04:00.686600827 +0000
|
||||
@@ -105,6 +105,8 @@ tiff12_print_page(gx_device_printer * pd
|
||||
TIFFSetField(tfdev->tif, TIFFTAG_BITSPERSAMPLE, 4);
|
||||
tiff_set_rgb_fields(tfdev);
|
||||
|
||||
+ TIFFCheckpointDirectory(tfdev->tif);
|
||||
+
|
||||
/* Write the page data. */
|
||||
{
|
||||
int y;
|
||||
diff -up ghostscript-8.71/base/gdevtifs.c.tiff-fixes ghostscript-8.71/base/gdevtifs.c
|
||||
--- ghostscript-8.71/base/gdevtifs.c.tiff-fixes 2010-02-04 17:47:57.000000000 +0000
|
||||
+++ ghostscript-8.71/base/gdevtifs.c 2010-03-16 10:04:00.689600292 +0000
|
||||
@@ -243,8 +243,8 @@ int tiff_set_fields_for_printer(gx_devic
|
||||
TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
|
||||
|
||||
TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH);
|
||||
- TIFFSetField(tif, TIFFTAG_XRESOLUTION, pdev->x_pixels_per_inch);
|
||||
- TIFFSetField(tif, TIFFTAG_YRESOLUTION, pdev->y_pixels_per_inch);
|
||||
+ TIFFSetField(tif, TIFFTAG_XRESOLUTION, (float)pdev->x_pixels_per_inch);
|
||||
+ TIFFSetField(tif, TIFFTAG_YRESOLUTION, (float)pdev->y_pixels_per_inch);
|
||||
|
||||
{
|
||||
char revs[10];
|
||||
@@ -293,6 +293,8 @@ tiff_print_page(gx_device_printer *dev,
|
||||
if (data == NULL)
|
||||
return_error(gs_error_VMerror);
|
||||
|
||||
+ TIFFCheckpointDirectory(tif);
|
||||
+
|
||||
memset(data, 0, max_size);
|
||||
for (row = 0; row < dev->height; row++) {
|
||||
code = gdev_prn_copy_scan_lines(dev, row, data, size);
|
||||
diff -up ghostscript-8.71/base/gdevtsep.c.tiff-fixes ghostscript-8.71/base/gdevtsep.c
|
||||
--- ghostscript-8.71/base/gdevtsep.c.tiff-fixes 2010-02-04 17:47:57.000000000 +0000
|
||||
+++ ghostscript-8.71/base/gdevtsep.c 2010-03-16 10:04:00.700601143 +0000
|
||||
@@ -1438,6 +1438,10 @@ tiffsep_print_page(gx_device_printer * p
|
||||
return_error(gs_error_VMerror);
|
||||
}
|
||||
|
||||
+ for (comp_num = 0; comp_num < num_comp; comp_num++ )
|
||||
+ TIFFCheckpointDirectory(tfdev->tiff[comp_num]);
|
||||
+ TIFFCheckpointDirectory(tfdev->tiff_comp);
|
||||
+
|
||||
/* Write the page data. */
|
||||
for (y = 0; y < pdev->height; ++y) {
|
||||
code = gdev_prn_get_bits(pdev, y, line, &row);
|
||||
@@ -1603,6 +1607,9 @@ tiffsep1_print_page(gx_device_printer *
|
||||
if (line == NULL || unpacked == NULL || dithered_line == NULL)
|
||||
return_error(gs_error_VMerror);
|
||||
|
||||
+ for (comp_num = 0; comp_num < num_comp; comp_num++ )
|
||||
+ TIFFCheckpointDirectory(tfdev->tiff[comp_num]);
|
||||
+
|
||||
/* Loop for the lines */
|
||||
for (y = 0; y < pdev->height; ++y) {
|
||||
code = gdev_prn_get_bits(pdev, y, line, &row);
|
36
ghostscript-vsnprintf.patch
Normal file
36
ghostscript-vsnprintf.patch
Normal file
@ -0,0 +1,36 @@
|
||||
diff -up ghostscript-8.71/base/gsmisc.c.vsnprintf ghostscript-8.71/base/gsmisc.c
|
||||
--- ghostscript-8.71/base/gsmisc.c.vsnprintf 2010-01-05 00:52:07.000000000 +0000
|
||||
+++ ghostscript-8.71/base/gsmisc.c 2010-02-17 11:30:13.777615156 +0000
|
||||
@@ -235,7 +235,7 @@ int gs_throw_imp(const char *func, const
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
- vsprintf(msg, fmt, ap);
|
||||
+ vsnprintf(msg, sizeof (msg), fmt, ap);
|
||||
msg[sizeof(msg) - 1] = 0;
|
||||
va_end(ap);
|
||||
|
||||
diff -up ghostscript-8.71/base/gxttfb.c.vsnprintf ghostscript-8.71/base/gxttfb.c
|
||||
--- ghostscript-8.71/base/gxttfb.c.vsnprintf 2009-12-06 19:12:08.000000000 +0000
|
||||
+++ ghostscript-8.71/base/gxttfb.c 2010-02-17 11:30:13.778616076 +0000
|
||||
@@ -246,7 +246,7 @@ static int DebugPrint(ttfFont *ttf, cons
|
||||
|
||||
if (gs_debug_c('Y')) {
|
||||
va_start(args, fmt);
|
||||
- count = vsprintf(buf, fmt, args);
|
||||
+ count = vsnprintf(buf, sizeof (buf), fmt, args);
|
||||
/* NB: moved debug output from stdout to stderr
|
||||
*/
|
||||
errwrite(buf, count);
|
||||
diff -up ghostscript-8.71/base/rinkj/rinkj-byte-stream.c.vsnprintf ghostscript-8.71/base/rinkj/rinkj-byte-stream.c
|
||||
--- ghostscript-8.71/base/rinkj/rinkj-byte-stream.c.vsnprintf 2008-04-04 02:02:16.000000000 +0100
|
||||
+++ ghostscript-8.71/base/rinkj/rinkj-byte-stream.c 2010-02-17 11:30:13.791615392 +0000
|
||||
@@ -43,7 +43,7 @@ rinkj_byte_stream_printf (RinkjByteStrea
|
||||
va_list ap;
|
||||
|
||||
va_start (ap, fmt);
|
||||
- len = vsprintf (str, fmt, ap);
|
||||
+ len = vsnprintf (str, sizeof (str), fmt, ap);
|
||||
va_end (ap);
|
||||
return rinkj_byte_stream_write (bs, str, len);
|
||||
}
|
1307
ghostscript.spec
1307
ghostscript.spec
File diff suppressed because it is too large
Load Diff
17
sources
17
sources
@ -1,16 +1,3 @@
|
||||
75fbe1a1c474d67fbc71cc4b1dbfb833 CIDFnmap-cjk-20030115.tar.gz
|
||||
2fbae60417d42779f6488ab897dcaaf6 acro5-cmaps-2001.tar.gz
|
||||
e8fbffadb8d70ce5f92708a699ae7765 adobe-cmaps-200202.tar.gz
|
||||
911c7865a83a69135417989dee53f8fc eplaseren-1.0.2-550.tgz
|
||||
2c6ebfe51cab34ee61e3dd524c8640cc epson740.tgz
|
||||
5ed2b4218b8f77cb411f3d2e4509ed24 gdevmd2k-0.2a.tar.gz
|
||||
821caada7e265ea5b698a78e6b029734 ghostscript-7.05.tar.bz2
|
||||
9b25d4dd54d3297f33a8f7609fba70dd gnu-drivers.tar.gz
|
||||
d202cd105c496b7f0eb5221316fb7b7f gs550j1.tar.gz
|
||||
6f8e90effe12527a4c3b36ea4ce47b3c gs6.51-cjk-M2-R3.tar.gz
|
||||
b32da7d61421384a0874037576033861 gs704-j-vlib.zip
|
||||
9d0b79d0fae39f3efc5b8db60f51a8fa hpijs-1.3.tar.gz
|
||||
dbd5f3b47ed13132f04c685d608a7547 jpegsrc.v6b.tar.gz
|
||||
aea08da4e37ab68ed6f1dc451f24b30b lexmarkgs990908.tar.gz
|
||||
ec11b9ef72ecaabb61eeba27e93f9f2b lxm3200-0.4.1-gs5.50-src.tar.gz
|
||||
34e664c2a98b847598f8441f8cac7ab6 pcl3-3.3.tar.gz
|
||||
dfc93dd2aaaf2b86d2fd55f654c13261 adobe-cmaps-200406.tar.gz
|
||||
5005d68f7395c2bfc4b05c1a60d9b6ba ghostscript-8.71.tar.xz
|
||||
|
Loading…
Reference in New Issue
Block a user