2012-08-09 13:30:22 +00:00
|
|
|
diff -up ghostscript-9.06/base/gsicc_manage.c.iccprofiles-initdir ghostscript-9.06/base/gsicc_manage.c
|
|
|
|
--- ghostscript-9.06/base/gsicc_manage.c.iccprofiles-initdir 2012-08-09 13:58:22.102364807 +0100
|
|
|
|
+++ ghostscript-9.06/base/gsicc_manage.c 2012-08-09 14:09:24.495864641 +0100
|
|
|
|
@@ -38,6 +38,7 @@
|
|
|
|
#include "gsicc_create.h"
|
|
|
|
#include "gpmisc.h"
|
|
|
|
#include "gxdevice.h"
|
|
|
|
+#include "gxiodev.h"
|
2010-09-23 10:57:49 +00:00
|
|
|
|
2012-08-09 13:30:22 +00:00
|
|
|
#define ICC_HEADER_SIZE 128
|
|
|
|
|
|
|
|
@@ -2176,8 +2177,21 @@ gs_currenticcdirectory(const gs_state *
|
|
|
|
const gs_lib_ctx_t *lib_ctx = pgs->memory->gs_lib_ctx;
|
2011-08-09 14:42:00 +00:00
|
|
|
|
|
|
|
if (lib_ctx->profiledir == NULL) {
|
|
|
|
- pval->data = (const byte *)rfs;
|
|
|
|
- pval->size = strlen(rfs);
|
|
|
|
+ int have_rom_device = 0;
|
|
|
|
+ int i;
|
2010-09-23 10:57:49 +00:00
|
|
|
+
|
2011-08-09 14:42:00 +00:00
|
|
|
+ for (i = 0; i < gx_io_device_table_count; i++) {
|
2012-08-09 13:30:22 +00:00
|
|
|
+ const gx_io_device *iodev = lib_ctx->io_device_table[i];
|
2011-08-09 14:42:00 +00:00
|
|
|
+ const char *dname = iodev->dname;
|
2010-09-23 10:57:49 +00:00
|
|
|
+
|
2012-08-09 13:30:22 +00:00
|
|
|
+ if (dname && strlen(dname) == 5 && !memcmp("%rom%", dname, 5)) {
|
2011-08-09 14:42:00 +00:00
|
|
|
+ have_rom_device = 1;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
2012-08-09 13:30:22 +00:00
|
|
|
+ pval->data = (const byte *)(have_rom_device ? rfs : "");
|
|
|
|
+ pval->size = strlen((const char *)pval->data);
|
|
|
|
pval->persistent = true;
|
2011-08-09 14:42:00 +00:00
|
|
|
} else {
|
|
|
|
pval->data = (const byte *)(lib_ctx->profiledir);
|