diff options
author | Rong-En Fan <rafan@FreeBSD.org> | 2007-03-27 19:59:21 +0000 |
---|---|---|
committer | Rong-En Fan <rafan@FreeBSD.org> | 2007-03-27 19:59:21 +0000 |
commit | 20352fa29823ad73e4f06d086dc9598d1a274ab8 (patch) | |
tree | 8dca0c9c79381ab1af57f988e6007e2e7b2e40fa /print/ghostscript-gpl/files/patch-src-gdevdmpr.c | |
parent | Clean up CXXFLAGS. Fix compilation with gcc-4.1.x. (diff) |
- Update to 8.56
- Switch to GTK 2.x
- SWitch to ship-in jasper which contains some fixes for gs
PR: ports/110818
Submitted by: KATO Tsuguru <tkato432 at yahoo.com>
Notes
Notes:
svn path=/head/; revision=188581
Diffstat (limited to 'print/ghostscript-gpl/files/patch-src-gdevdmpr.c')
-rw-r--r-- | print/ghostscript-gpl/files/patch-src-gdevdmpr.c | 78 |
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; } |