/[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 389214 - (show annotations) (download)
Thu Jan 17 21:30:27 2013 UTC (11 years, 3 months ago) by pterjan
File size: 1204 byte(s)
oops
1 diff -up ghostscript-9.06/base/gsicc_manage.c.iccprofiles-initdir ghostscript-9.06/base/gsicc_manage.c
2 --- ghostscript-9.06/base/gsicc_manage.c.iccprofiles-initdir 2012-08-09 13:58:22.102364807 +0100
3 +++ ghostscript-9.06/base/gsicc_manage.c 2012-08-09 14:09:24.495864641 +0100
4 @@ -38,6 +38,7 @@
5 #include "gsicc_create.h"
6 #include "gpmisc.h"
7 #include "gxdevice.h"
8 +#include "gxiodev.h"
9
10 #define ICC_HEADER_SIZE 128
11
12 @@ -2176,8 +2177,21 @@ gs_currenticcdirectory(const gs_state *
13 const gs_lib_ctx_t *lib_ctx = pgs->memory->gs_lib_ctx;
14
15 if (lib_ctx->profiledir == NULL) {
16 - pval->data = (const byte *)rfs;
17 - pval->size = strlen(rfs);
18 + int have_rom_device = 0;
19 + int i;
20 +
21 + for (i = 0; i < gx_io_device_table_count; i++) {
22 + const gx_io_device *iodev = lib_ctx->io_device_table[i];
23 + const char *dname = iodev->dname;
24 +
25 + if (dname && strlen(dname) == 5 && !memcmp("%rom%", dname, 5)) {
26 + have_rom_device = 1;
27 + break;
28 + }
29 + }
30 +
31 + pval->data = (const byte *)(have_rom_device ? rfs : "");
32 + pval->size = strlen((const char *)pval->data);
33 pval->persistent = true;
34 } else {
35 pval->data = (const byte *)(lib_ctx->profiledir);

  ViewVC Help
Powered by ViewVC 1.1.30