summaryrefslogtreecommitdiff
path: root/print/ghostscript-gpl/files/patch-src-gdevdmpr.c
diff options
context:
space:
mode:
Diffstat (limited to 'print/ghostscript-gpl/files/patch-src-gdevdmpr.c')
-rw-r--r--print/ghostscript-gpl/files/patch-src-gdevdmpr.c78
1 files changed, 74 insertions, 4 deletions
diff --git a/print/ghostscript-gpl/files/patch-src-gdevdmpr.c b/print/ghostscript-gpl/files/patch-src-gdevdmpr.c
index 2da080e7d34e..4e2b27f4fca4 100644
--- a/print/ghostscript-gpl/files/patch-src-gdevdmpr.c
+++ b/print/ghostscript-gpl/files/patch-src-gdevdmpr.c
@@ -1,5 +1,5 @@
--- src/gdevdmpr.c.orig Tue May 13 20:43:37 1997
-+++ src/gdevdmpr.c Thu Jun 9 02:52:25 2005
++++ src/gdevdmpr.c Sat Mar 24 15:41:48 2007
@@ -41,7 +41,7 @@
/* include library header. */
#include "dviprlib.h"
@@ -27,7 +27,77 @@
/* The device descriptor */
gx_device_procs prn_dmprt_procs = {
-@@ -833,6 +833,7 @@
+@@ -405,7 +405,9 @@
+ if (pddev->dmprt.max_height>0 && pddev->dmprt.max_height<pddev->height)
+ pddev->height = pddev->dmprt.max_height;
+
++#if 0
+ dviprt_setmessagestream(pddev->dmprt.debug_f ? stderr : NULL);
++#endif
+
+ return code;
+ }
+@@ -425,7 +427,9 @@
+ if (code < 0) return code;
+ if (code == 0) pddev->dmprt.debug_f = vbool;
+
++#if 0
+ dviprt_setmessagestream(pddev->dmprt.debug_f ? stderr : NULL);
++#endif
+
+ code = param_read_bool(plist, "Verbose", &vbool);
+ if (code < 0) return code;
+@@ -475,14 +479,14 @@
+ code = param_read_string(plist, "FileName", &vstr);
+ if (code < 0) return code;
+ if (code == 0) {
+- char *filename = gs_malloc(vstr.size + 1, 1,
++ char *filename = gs_malloc(pdev->memory, vstr.size + 1, 1,
+ "gdev_dmprt_put_props(filename)");
+ int ccode;
+ if (filename == 0) return e_VMerror;
+ strncpy(filename, (const char*)vstr.data, vstr.size);
+ filename[vstr.size] = '\0';
+ ccode = gdev_dmprt_get_printer_props(pddev,filename);
+- gs_free(filename, vstr.size+1, 1, "gdev_dmprt_put_props(filename)");
++ gs_free(pdev->memory, filename, vstr.size+1, 1, "gdev_dmprt_put_props(filename)");
+ if (ccode < 0) return ccode;
+ }
+
+@@ -686,7 +690,7 @@
+ byte *in;
+
+ /* get work buffer */
+- in = (byte *)gs_malloc(1, i_buf_size ,"gdev_dmprt_print_page(in)");
++ in = (byte *)gs_malloc(pdev->memory, 1, i_buf_size ,"gdev_dmprt_print_page(in)");
+ if ( in == 0 )
+ return e_VMerror;
+
+@@ -737,7 +741,7 @@
+ eprintf1(" %lu bytes\n",dviprt_getoutputbytes(pprint)-prev_bytes);
+ }
+ error_ex:
+- gs_free((char *)in, 1, i_buf_size,"gdev_dmprt_print_page(in)");
++ gs_free(pdev->memory, (char *)in, 1, i_buf_size,"gdev_dmprt_print_page(in)");
+
+ return code;
+ }
+@@ -797,7 +801,7 @@
+ dviprt_cfg_t cfg;
+ char *fname;
+
+- fname = gs_malloc(256,1,"dviprt_lib_fname");
++ fname = gs_malloc(pdev->memory, 256,1,"dviprt_lib_fname");
+ if (fname == NULL) return e_VMerror;
+
+ fp = gdev_dmprt_dviprt_lib_fopen(fnamebase,fname);
+@@ -828,11 +832,12 @@
+ cfg.integer[CFG_Y_DPI] > 0 ? cfg.integer[CFG_Y_DPI] : pddev->dmprt.orig_x_dpi;
+ }
+
+- gs_free(fname,256,1,"dviprt_lib_fname");
++ gs_free(pdev->memory, fname,256,1,"dviprt_lib_fname");
+
return code;
}
@@ -35,7 +105,7 @@
private FILE *
gdev_dmprt_dviprt_lib_fopen(const char *fnamebase,char *fname)
{
-@@ -845,9 +846,7 @@
+@@ -845,9 +850,7 @@
env = getenv("TEXCFG");
if (env) {
strcpy(fname,env);
@@ -46,7 +116,7 @@
fp = fopen(fname,gp_fmode_rb);
}
}
-@@ -867,4 +866,15 @@
+@@ -867,4 +870,15 @@
default:
return -1;
}