]>
Commit | Line | Data |
---|---|---|
e2edb5ec AM |
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" | |
a959360d | 9 | |
e2edb5ec AM |
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; | |
a959360d AM |
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++) { | |
e2edb5ec | 22 | + const gx_io_device *iodev = lib_ctx->io_device_table[i]; |
a959360d AM |
23 | + const char *dname = iodev->dname; |
24 | + | |
e2edb5ec | 25 | + if (dname && strlen(dname) == 5 && !memcmp("%rom%", dname, 5)) { |
a959360d AM |
26 | + have_rom_device = 1; |
27 | + break; | |
28 | + } | |
29 | + } | |
30 | + | |
e2edb5ec AM |
31 | + pval->data = (const byte *)(have_rom_device ? rfs : ""); |
32 | + pval->size = strlen((const char *)pval->data); | |
33 | pval->persistent = true; | |
a959360d AM |
34 | } else { |
35 | pval->data = (const byte *)(lib_ctx->profiledir); |