/[packages]/cauldron/ghostscript/current/SOURCES/ghostscript-iccprofiles-initdir.patch
ViewVC logotype

Contents of /cauldron/ghostscript/current/SOURCES/ghostscript-iccprofiles-initdir.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 289699 - (show annotations) (download)
Fri Sep 7 23:51:02 2012 UTC (8 years, 5 months ago) by luigiwalser
File size: 1341 byte(s)
integrate changes from mdv
1 --- ghostscript-9.06/base/gsicc_manage.c.0028~ 2012-08-08 10:01:36.000000000 +0200
2 +++ ghostscript-9.06/base/gsicc_manage.c 2012-08-12 19:20:56.447641534 +0200
3 @@ -18,6 +18,7 @@
4 #include "std.h"
5 #include "stdpre.h"
6 #include "gstypes.h"
7 +#include "gxiodev.h"
8 #include "gsmemory.h"
9 #include "gsstruct.h"
10 #include "scommon.h"
11 @@ -2163,6 +2164,8 @@ gs_setdefaultgrayicc(const gs_state * pg
12 return code;
13 }
14
15 +extern_gx_io_device_table();
16 +
17 void
18 gs_currenticcdirectory(const gs_state * pgs, gs_param_string * pval)
19 {
20 @@ -2170,8 +2173,19 @@ gs_currenticcdirectory(const gs_state *
21 const gs_lib_ctx_t *lib_ctx = pgs->memory->gs_lib_ctx;
22
23 if (lib_ctx->profiledir == NULL) {
24 - pval->data = (const byte *)rfs;
25 - pval->size = strlen(rfs);
26 + int have_rom_device = 0;
27 + int i;
28 + for(i = 0; i < gx_io_device_table_count; i++) {
29 + const gx_io_device *iodev = gx_io_device_table[i];
30 + const char *dname = iodev->dname;
31 +
32 + if (dname && strlen(dname) == 5 && !memcpy("%rom%", dname, 5)) {
33 + have_rom_device = 1;
34 + break;
35 + }
36 + }
37 + pval->data = (const byte *) (have_rom_device ? rfs : "");
38 + pval->size = strlen(pval->data);
39 pval->persistent = true;
40 } else {
41 pval->data = (const byte *)(lib_ctx->profiledir);

  ViewVC Help
Powered by ViewVC 1.1.28