From 5e58f832a00d78f885039c4abde909f691fd4f0e Mon Sep 17 00:00:00 2001 From: krion Date: Fri, 26 Mar 2004 14:43:45 +0000 Subject: - Improve papersize handling of LIPS driver PR: ports/64766 Submitted by: Ports Fury --- print/ghostscript-gnu/files/patch-lips:gdevl4r.c | 64 ++++++++++++++++++++--- print/ghostscript-gnu/files/patch-lips:gdevl4v.c | 46 +++++++++++++--- print/ghostscript-gnu/files/patch-lips:gdevlips.c | 18 +++++++ print/ghostscript-gnu/files/patch-lips:gdevlips.h | 17 ++++++ print/ghostscript7/files/patch-lips:gdevl4r.c | 64 ++++++++++++++++++++--- print/ghostscript7/files/patch-lips:gdevl4v.c | 46 +++++++++++++--- print/ghostscript7/files/patch-lips:gdevlips.c | 18 +++++++ print/ghostscript7/files/patch-lips:gdevlips.h | 17 ++++++ 8 files changed, 262 insertions(+), 28 deletions(-) create mode 100644 print/ghostscript-gnu/files/patch-lips:gdevlips.c create mode 100644 print/ghostscript-gnu/files/patch-lips:gdevlips.h create mode 100644 print/ghostscript7/files/patch-lips:gdevlips.c create mode 100644 print/ghostscript7/files/patch-lips:gdevlips.h diff --git a/print/ghostscript-gnu/files/patch-lips:gdevl4r.c b/print/ghostscript-gnu/files/patch-lips:gdevl4r.c index 267f26ac8a13..353ec2399a84 100644 --- a/print/ghostscript-gnu/files/patch-lips:gdevl4r.c +++ b/print/ghostscript-gnu/files/patch-lips:gdevl4r.c @@ -1,5 +1,27 @@ --- lips/gdevl4r.c.orig Thu Nov 2 12:09:18 2000 -+++ lips/gdevl4r.c Fri Sep 12 09:22:08 2003 ++++ lips/gdevl4r.c Tue Jan 13 01:28:40 2004 +@@ -53,8 +53,8 @@ + #define lips_device(dtype, procs, dname, xdpi, ydpi, lm, bm, rm, tm, color_bits,\ + print_page_copies, image_out, cassetFeed, username)\ + { std_device_std_color_full_body(dtype, &procs, dname,\ +- (int)((long)(DEFAULT_WIDTH_10THS) * (xdpi) / 10),\ +- (int)((long)(DEFAULT_HEIGHT_10THS) * (ydpi) / 10),\ ++ (int)((long)((DEFAULT_WIDTH_10THS) * (xdpi)) / 10),\ ++ (int)((long)((DEFAULT_HEIGHT_10THS) * (ydpi)) / 10),\ + xdpi, ydpi, color_bits,\ + -(lm) * (xdpi), -(tm) * (ydpi),\ + (lm) * 72.0, (bm) * 72.0,\ +@@ -68,8 +68,8 @@ + #define lips4_device(dtype, procs, dname, xdpi, ydpi, lm, bm, rm, tm, color_bits,\ + print_page_copies, image_out, cassetFeed, username)\ + { std_device_std_color_full_body(dtype, &procs, dname,\ +- (int)((long)(DEFAULT_WIDTH_10THS) * (xdpi) / 10),\ +- (int)((long)(DEFAULT_HEIGHT_10THS) * (ydpi) / 10),\ ++ (int)((long)((DEFAULT_WIDTH_10THS) * (xdpi)) / 10),\ ++ (int)((long)((DEFAULT_HEIGHT_10THS) * (ydpi)) / 10),\ + xdpi, ydpi, color_bits,\ + -(lm) * (xdpi), -(tm) * (ydpi),\ + (lm) * 72.0, (bm) * 72.0,\ @@ -178,8 +178,13 @@ private int lips4c_output_page(gx_device_printer * pdev, FILE * prn_stream); private int lips_delta_encode(byte * inBuff, byte * prevBuff, byte * outBuff, byte * diffBuff, int Length); @@ -14,26 +36,47 @@ private int lips4type_print_page_copies(gx_device_printer * pdev, FILE * prn_stream, int num_copies, int ptype); private int -@@ -1065,11 +1070,11 @@ +@@ -1065,11 +1070,25 @@ if (paper_size == USER_SIZE) { fprintf(prn_stream, "%c2 I", LIPS_CSI); fprintf(prn_stream, "%c80;%d;%dp", LIPS_CSI, - width * 10, height * 10); -+ height * 10, width * 10); ++ /* modified by shige 06/27 2003 ++ width * 10, height * 10); */ ++ /* modified by shige 11/09 2003 ++ height * 10, width * 10); */ ++ (height * 10 > LIPS_HEIGHT_MAX_720)? ++ LIPS_HEIGHT_MAX_720 : (height * 10), ++ (width * 10 > LIPS_WIDTH_MAX_720)? ++ LIPS_WIDTH_MAX_720 : (width * 10)); } else if (paper_size == USER_SIZE + LANDSCAPE) { fprintf(prn_stream, "%c2 I", LIPS_CSI); fprintf(prn_stream, "%c81;%d;%dp", LIPS_CSI, - height * 10, width * 10); -+ width * 10, height * 10); ++ /* modified by shige 06/27 2003 ++ width * 10, height * 10); */ ++ /* modified by shige 11/09 2003 ++ width * 10, height * 10); */ ++ (width * 10 > LIPS_HEIGHT_MAX_720)? ++ LIPS_HEIGHT_MAX_720 : (width * 10), ++ (height * 10 > LIPS_WIDTH_MAX_720)? ++ LIPS_WIDTH_MAX_720 : (height * 10)); } else { fprintf(prn_stream, "%c%dp", LIPS_CSI, paper_size); } -@@ -1078,14 +1083,14 @@ +@@ -1078,14 +1097,28 @@ prev_paper_height != height) { fprintf(prn_stream, "%c2 I", LIPS_CSI); fprintf(prn_stream, "%c80;%d;%dp", LIPS_CSI, - width * 10, height * 10); -+ height * 10, width * 10); ++ /* modified by shige 06/27 2003 ++ width * 10, height * 10); */ ++ /* modified by shige 11/09 2003 ++ height * 10, width * 10); */ ++ (height * 10 > LIPS_HEIGHT_MAX_720)? ++ LIPS_HEIGHT_MAX_720 : (height * 10), ++ (width * 10 > LIPS_WIDTH_MAX_720)? ++ LIPS_WIDTH_MAX_720 : (width * 10)); } } else if (paper_size == USER_SIZE + LANDSCAPE) { if (prev_paper_width != width || @@ -41,7 +84,14 @@ fprintf(prn_stream, "%c2 I", LIPS_CSI); fprintf(prn_stream, "%c81;%d;%dp", LIPS_CSI, - height * 10, width * 10); -+ width * 10, height * 10); ++ /* modified by shige 06/27 2003 ++ height * 10, width * 10); */ ++ /* modified by shige 11/09 2003 ++ width * 10, height * 10); */ ++ (width * 10 > LIPS_HEIGHT_MAX_720)? ++ LIPS_HEIGHT_MAX_720 : (width * 10), ++ (height * 10 > LIPS_WIDTH_MAX_720)? ++ LIPS_WIDTH_MAX_720 : (height * 10)); } } /* desired number of copies */ diff --git a/print/ghostscript-gnu/files/patch-lips:gdevl4v.c b/print/ghostscript-gnu/files/patch-lips:gdevl4v.c index 93e0be613626..0d48309837d9 100644 --- a/print/ghostscript-gnu/files/patch-lips:gdevl4v.c +++ b/print/ghostscript-gnu/files/patch-lips:gdevl4v.c @@ -1,5 +1,5 @@ --- lips/gdevl4v.c.orig Thu Nov 2 12:09:18 2000 -+++ lips/gdevl4v.c Wed Dec 10 19:42:42 2003 ++++ lips/gdevl4v.c Tue Jan 13 01:30:38 2004 @@ -230,41 +230,66 @@ }; @@ -92,31 +92,63 @@ private int lips4v_setlinewidth(gx_device_vector * vdev, floatp width); private int lips4v_setlinecap(gx_device_vector * vdev, gs_line_cap cap); private int lips4v_setlinejoin(gx_device_vector * vdev, gs_line_join join); -@@ -758,10 +783,10 @@ +@@ -758,10 +783,26 @@ /* 用紙サイズ */ if (pdev->prev_paper_size != paper_size) { if (paper_size == USER_SIZE) { - sprintf(paper, "%c80;%d;%dp", LIPS_CSI, width * 10, height * 10); -+ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, height * 10, width * 10); ++ /* modified by shige 06/27 2003 ++ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, width * 10, height * 10); */ ++ /* modified by shige 11/09 2003 ++ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, height * 10, width * 10); */ ++ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, ++ (height * 10 > LIPS_HEIGHT_MAX_720)? ++ LIPS_HEIGHT_MAX_720 : (height * 10), ++ (width * 10 > LIPS_WIDTH_MAX_720)? ++ LIPS_WIDTH_MAX_720 : (width * 10)); lputs(s, paper); } else if (paper_size == USER_SIZE + LANDSCAPE) { - sprintf(paper, "%c81;%d;%dp", LIPS_CSI, height * 10, width * 10); -+ sprintf(paper, "%c81;%d;%dp", LIPS_CSI, width * 10, height * 10); ++ /* modified by shige 06/27 2003 ++ sprintf(paper, "%c81;%d;%dp", LIPS_CSI, height * 10, width * 10); */ ++ /* modified by shige 11/09 2003 ++ sprintf(paper, "%c81;%d;%dp", LIPS_CSI, width * 10, height * 10); */ ++ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, ++ (width * 10 > LIPS_HEIGHT_MAX_720)? ++ LIPS_HEIGHT_MAX_720 : (width * 10), ++ (height * 10 > LIPS_WIDTH_MAX_720)? ++ LIPS_WIDTH_MAX_720 : (height * 10)); lputs(s, paper); } else { sprintf(paper, "%c%dp", LIPS_CSI, paper_size); -@@ -770,12 +795,12 @@ +@@ -770,12 +811,28 @@ } else if (paper_size == USER_SIZE) { if (pdev->prev_paper_width != width || pdev->prev_paper_height != height) - sprintf(paper, "%c80;%d;%dp", LIPS_CSI, width * 10, height * 10); -+ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, height * 10, width * 10); ++ /* modified by shige 06/27 2003 ++ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, width * 10, height * 10); */ ++ /* modified by shige 11/09 2003 ++ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, height * 10, width * 10); */ ++ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, ++ (height * 10 > LIPS_HEIGHT_MAX_720)? ++ LIPS_HEIGHT_MAX_720 : (height * 10), ++ (width * 10 > LIPS_WIDTH_MAX_720)? ++ LIPS_WIDTH_MAX_720 : (width * 10)); lputs(s, paper); } else if (paper_size == USER_SIZE + LANDSCAPE) { if (pdev->prev_paper_width != width || pdev->prev_paper_height != height) - sprintf(paper, "%c81;%d;%dp", LIPS_CSI, height * 10, width * 10); -+ sprintf(paper, "%c81;%d;%dp", LIPS_CSI, width * 10, height * 10); ++ /* modified by shige 06/27 2003 ++ sprintf(paper, "%c81;%d;%dp", LIPS_CSI, height * 10, width * 10); */ ++ /* modified by shige 11/09 2003 ++ sprintf(paper, "%c81;%d;%dp", LIPS_CSI, width * 10, height * 10); */ ++ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, ++ (width * 10 > LIPS_HEIGHT_MAX_720)? ++ LIPS_HEIGHT_MAX_720 : (width * 10), ++ (height * 10 > LIPS_WIDTH_MAX_720)? ++ LIPS_WIDTH_MAX_720 : (height * 10)); lputs(s, paper); } pdev->prev_paper_size = paper_size; diff --git a/print/ghostscript-gnu/files/patch-lips:gdevlips.c b/print/ghostscript-gnu/files/patch-lips:gdevlips.c new file mode 100644 index 000000000000..143fed14f0a1 --- /dev/null +++ b/print/ghostscript-gnu/files/patch-lips:gdevlips.c @@ -0,0 +1,18 @@ +--- lips/gdevlips.c.orig Thu Nov 2 12:09:18 2000 ++++ lips/gdevlips.c Tue Jan 13 01:23:47 2004 +@@ -62,7 +62,15 @@ + height = tmp; + } + for (pt = lips_paper_table; pt->num_unit < 80; pt++) ++/* add by shige 11/06 2003 */ ++#ifdef USE_LIPS_SIZE_ERROR ++ if(pt->width+LIPS_SIZE_ERROR_VALUE>=width ++ && pt->width-LIPS_SIZE_ERROR_VALUE<=width ++ && pt->height+LIPS_SIZE_ERROR_VALUE>=height ++ && pt->height-LIPS_SIZE_ERROR_VALUE<=height) ++#else + if (pt->width == width && pt->height == height) ++#endif + break; + + return pt->num_unit + landscape; diff --git a/print/ghostscript-gnu/files/patch-lips:gdevlips.h b/print/ghostscript-gnu/files/patch-lips:gdevlips.h new file mode 100644 index 000000000000..eebce89cc054 --- /dev/null +++ b/print/ghostscript-gnu/files/patch-lips:gdevlips.h @@ -0,0 +1,17 @@ +--- lips/gdevlips.h.orig Thu Nov 2 12:09:18 2000 ++++ lips/gdevlips.h Tue Jan 13 01:23:47 2004 +@@ -188,6 +188,14 @@ + bool faceup;\ + char mediaType[LIPS_MEDIACHAR_MAX]; + ++/* added by shige 11/06 2003 */ ++#define USE_LIPS_SIZE_ERROR ++#define LIPS_SIZE_ERROR_VALUE 2 ++ ++/* added by shige 11/09 2003 */ ++#define LIPS_HEIGHT_MAX_720 11906 ++#define LIPS_WIDTH_MAX_720 8419 ++ + int lips_media_selection(int width, int height); + int lips_packbits_encode(byte * inBuff, byte * outBuff, int Length); + int lips_mode3format_encode(byte * inBuff, byte * outBuff, int Length); diff --git a/print/ghostscript7/files/patch-lips:gdevl4r.c b/print/ghostscript7/files/patch-lips:gdevl4r.c index 267f26ac8a13..353ec2399a84 100644 --- a/print/ghostscript7/files/patch-lips:gdevl4r.c +++ b/print/ghostscript7/files/patch-lips:gdevl4r.c @@ -1,5 +1,27 @@ --- lips/gdevl4r.c.orig Thu Nov 2 12:09:18 2000 -+++ lips/gdevl4r.c Fri Sep 12 09:22:08 2003 ++++ lips/gdevl4r.c Tue Jan 13 01:28:40 2004 +@@ -53,8 +53,8 @@ + #define lips_device(dtype, procs, dname, xdpi, ydpi, lm, bm, rm, tm, color_bits,\ + print_page_copies, image_out, cassetFeed, username)\ + { std_device_std_color_full_body(dtype, &procs, dname,\ +- (int)((long)(DEFAULT_WIDTH_10THS) * (xdpi) / 10),\ +- (int)((long)(DEFAULT_HEIGHT_10THS) * (ydpi) / 10),\ ++ (int)((long)((DEFAULT_WIDTH_10THS) * (xdpi)) / 10),\ ++ (int)((long)((DEFAULT_HEIGHT_10THS) * (ydpi)) / 10),\ + xdpi, ydpi, color_bits,\ + -(lm) * (xdpi), -(tm) * (ydpi),\ + (lm) * 72.0, (bm) * 72.0,\ +@@ -68,8 +68,8 @@ + #define lips4_device(dtype, procs, dname, xdpi, ydpi, lm, bm, rm, tm, color_bits,\ + print_page_copies, image_out, cassetFeed, username)\ + { std_device_std_color_full_body(dtype, &procs, dname,\ +- (int)((long)(DEFAULT_WIDTH_10THS) * (xdpi) / 10),\ +- (int)((long)(DEFAULT_HEIGHT_10THS) * (ydpi) / 10),\ ++ (int)((long)((DEFAULT_WIDTH_10THS) * (xdpi)) / 10),\ ++ (int)((long)((DEFAULT_HEIGHT_10THS) * (ydpi)) / 10),\ + xdpi, ydpi, color_bits,\ + -(lm) * (xdpi), -(tm) * (ydpi),\ + (lm) * 72.0, (bm) * 72.0,\ @@ -178,8 +178,13 @@ private int lips4c_output_page(gx_device_printer * pdev, FILE * prn_stream); private int lips_delta_encode(byte * inBuff, byte * prevBuff, byte * outBuff, byte * diffBuff, int Length); @@ -14,26 +36,47 @@ private int lips4type_print_page_copies(gx_device_printer * pdev, FILE * prn_stream, int num_copies, int ptype); private int -@@ -1065,11 +1070,11 @@ +@@ -1065,11 +1070,25 @@ if (paper_size == USER_SIZE) { fprintf(prn_stream, "%c2 I", LIPS_CSI); fprintf(prn_stream, "%c80;%d;%dp", LIPS_CSI, - width * 10, height * 10); -+ height * 10, width * 10); ++ /* modified by shige 06/27 2003 ++ width * 10, height * 10); */ ++ /* modified by shige 11/09 2003 ++ height * 10, width * 10); */ ++ (height * 10 > LIPS_HEIGHT_MAX_720)? ++ LIPS_HEIGHT_MAX_720 : (height * 10), ++ (width * 10 > LIPS_WIDTH_MAX_720)? ++ LIPS_WIDTH_MAX_720 : (width * 10)); } else if (paper_size == USER_SIZE + LANDSCAPE) { fprintf(prn_stream, "%c2 I", LIPS_CSI); fprintf(prn_stream, "%c81;%d;%dp", LIPS_CSI, - height * 10, width * 10); -+ width * 10, height * 10); ++ /* modified by shige 06/27 2003 ++ width * 10, height * 10); */ ++ /* modified by shige 11/09 2003 ++ width * 10, height * 10); */ ++ (width * 10 > LIPS_HEIGHT_MAX_720)? ++ LIPS_HEIGHT_MAX_720 : (width * 10), ++ (height * 10 > LIPS_WIDTH_MAX_720)? ++ LIPS_WIDTH_MAX_720 : (height * 10)); } else { fprintf(prn_stream, "%c%dp", LIPS_CSI, paper_size); } -@@ -1078,14 +1083,14 @@ +@@ -1078,14 +1097,28 @@ prev_paper_height != height) { fprintf(prn_stream, "%c2 I", LIPS_CSI); fprintf(prn_stream, "%c80;%d;%dp", LIPS_CSI, - width * 10, height * 10); -+ height * 10, width * 10); ++ /* modified by shige 06/27 2003 ++ width * 10, height * 10); */ ++ /* modified by shige 11/09 2003 ++ height * 10, width * 10); */ ++ (height * 10 > LIPS_HEIGHT_MAX_720)? ++ LIPS_HEIGHT_MAX_720 : (height * 10), ++ (width * 10 > LIPS_WIDTH_MAX_720)? ++ LIPS_WIDTH_MAX_720 : (width * 10)); } } else if (paper_size == USER_SIZE + LANDSCAPE) { if (prev_paper_width != width || @@ -41,7 +84,14 @@ fprintf(prn_stream, "%c2 I", LIPS_CSI); fprintf(prn_stream, "%c81;%d;%dp", LIPS_CSI, - height * 10, width * 10); -+ width * 10, height * 10); ++ /* modified by shige 06/27 2003 ++ height * 10, width * 10); */ ++ /* modified by shige 11/09 2003 ++ width * 10, height * 10); */ ++ (width * 10 > LIPS_HEIGHT_MAX_720)? ++ LIPS_HEIGHT_MAX_720 : (width * 10), ++ (height * 10 > LIPS_WIDTH_MAX_720)? ++ LIPS_WIDTH_MAX_720 : (height * 10)); } } /* desired number of copies */ diff --git a/print/ghostscript7/files/patch-lips:gdevl4v.c b/print/ghostscript7/files/patch-lips:gdevl4v.c index 93e0be613626..0d48309837d9 100644 --- a/print/ghostscript7/files/patch-lips:gdevl4v.c +++ b/print/ghostscript7/files/patch-lips:gdevl4v.c @@ -1,5 +1,5 @@ --- lips/gdevl4v.c.orig Thu Nov 2 12:09:18 2000 -+++ lips/gdevl4v.c Wed Dec 10 19:42:42 2003 ++++ lips/gdevl4v.c Tue Jan 13 01:30:38 2004 @@ -230,41 +230,66 @@ }; @@ -92,31 +92,63 @@ private int lips4v_setlinewidth(gx_device_vector * vdev, floatp width); private int lips4v_setlinecap(gx_device_vector * vdev, gs_line_cap cap); private int lips4v_setlinejoin(gx_device_vector * vdev, gs_line_join join); -@@ -758,10 +783,10 @@ +@@ -758,10 +783,26 @@ /* 用紙サイズ */ if (pdev->prev_paper_size != paper_size) { if (paper_size == USER_SIZE) { - sprintf(paper, "%c80;%d;%dp", LIPS_CSI, width * 10, height * 10); -+ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, height * 10, width * 10); ++ /* modified by shige 06/27 2003 ++ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, width * 10, height * 10); */ ++ /* modified by shige 11/09 2003 ++ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, height * 10, width * 10); */ ++ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, ++ (height * 10 > LIPS_HEIGHT_MAX_720)? ++ LIPS_HEIGHT_MAX_720 : (height * 10), ++ (width * 10 > LIPS_WIDTH_MAX_720)? ++ LIPS_WIDTH_MAX_720 : (width * 10)); lputs(s, paper); } else if (paper_size == USER_SIZE + LANDSCAPE) { - sprintf(paper, "%c81;%d;%dp", LIPS_CSI, height * 10, width * 10); -+ sprintf(paper, "%c81;%d;%dp", LIPS_CSI, width * 10, height * 10); ++ /* modified by shige 06/27 2003 ++ sprintf(paper, "%c81;%d;%dp", LIPS_CSI, height * 10, width * 10); */ ++ /* modified by shige 11/09 2003 ++ sprintf(paper, "%c81;%d;%dp", LIPS_CSI, width * 10, height * 10); */ ++ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, ++ (width * 10 > LIPS_HEIGHT_MAX_720)? ++ LIPS_HEIGHT_MAX_720 : (width * 10), ++ (height * 10 > LIPS_WIDTH_MAX_720)? ++ LIPS_WIDTH_MAX_720 : (height * 10)); lputs(s, paper); } else { sprintf(paper, "%c%dp", LIPS_CSI, paper_size); -@@ -770,12 +795,12 @@ +@@ -770,12 +811,28 @@ } else if (paper_size == USER_SIZE) { if (pdev->prev_paper_width != width || pdev->prev_paper_height != height) - sprintf(paper, "%c80;%d;%dp", LIPS_CSI, width * 10, height * 10); -+ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, height * 10, width * 10); ++ /* modified by shige 06/27 2003 ++ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, width * 10, height * 10); */ ++ /* modified by shige 11/09 2003 ++ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, height * 10, width * 10); */ ++ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, ++ (height * 10 > LIPS_HEIGHT_MAX_720)? ++ LIPS_HEIGHT_MAX_720 : (height * 10), ++ (width * 10 > LIPS_WIDTH_MAX_720)? ++ LIPS_WIDTH_MAX_720 : (width * 10)); lputs(s, paper); } else if (paper_size == USER_SIZE + LANDSCAPE) { if (pdev->prev_paper_width != width || pdev->prev_paper_height != height) - sprintf(paper, "%c81;%d;%dp", LIPS_CSI, height * 10, width * 10); -+ sprintf(paper, "%c81;%d;%dp", LIPS_CSI, width * 10, height * 10); ++ /* modified by shige 06/27 2003 ++ sprintf(paper, "%c81;%d;%dp", LIPS_CSI, height * 10, width * 10); */ ++ /* modified by shige 11/09 2003 ++ sprintf(paper, "%c81;%d;%dp", LIPS_CSI, width * 10, height * 10); */ ++ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, ++ (width * 10 > LIPS_HEIGHT_MAX_720)? ++ LIPS_HEIGHT_MAX_720 : (width * 10), ++ (height * 10 > LIPS_WIDTH_MAX_720)? ++ LIPS_WIDTH_MAX_720 : (height * 10)); lputs(s, paper); } pdev->prev_paper_size = paper_size; diff --git a/print/ghostscript7/files/patch-lips:gdevlips.c b/print/ghostscript7/files/patch-lips:gdevlips.c new file mode 100644 index 000000000000..143fed14f0a1 --- /dev/null +++ b/print/ghostscript7/files/patch-lips:gdevlips.c @@ -0,0 +1,18 @@ +--- lips/gdevlips.c.orig Thu Nov 2 12:09:18 2000 ++++ lips/gdevlips.c Tue Jan 13 01:23:47 2004 +@@ -62,7 +62,15 @@ + height = tmp; + } + for (pt = lips_paper_table; pt->num_unit < 80; pt++) ++/* add by shige 11/06 2003 */ ++#ifdef USE_LIPS_SIZE_ERROR ++ if(pt->width+LIPS_SIZE_ERROR_VALUE>=width ++ && pt->width-LIPS_SIZE_ERROR_VALUE<=width ++ && pt->height+LIPS_SIZE_ERROR_VALUE>=height ++ && pt->height-LIPS_SIZE_ERROR_VALUE<=height) ++#else + if (pt->width == width && pt->height == height) ++#endif + break; + + return pt->num_unit + landscape; diff --git a/print/ghostscript7/files/patch-lips:gdevlips.h b/print/ghostscript7/files/patch-lips:gdevlips.h new file mode 100644 index 000000000000..eebce89cc054 --- /dev/null +++ b/print/ghostscript7/files/patch-lips:gdevlips.h @@ -0,0 +1,17 @@ +--- lips/gdevlips.h.orig Thu Nov 2 12:09:18 2000 ++++ lips/gdevlips.h Tue Jan 13 01:23:47 2004 +@@ -188,6 +188,14 @@ + bool faceup;\ + char mediaType[LIPS_MEDIACHAR_MAX]; + ++/* added by shige 11/06 2003 */ ++#define USE_LIPS_SIZE_ERROR ++#define LIPS_SIZE_ERROR_VALUE 2 ++ ++/* added by shige 11/09 2003 */ ++#define LIPS_HEIGHT_MAX_720 11906 ++#define LIPS_WIDTH_MAX_720 8419 ++ + int lips_media_selection(int width, int height); + int lips_packbits_encode(byte * inBuff, byte * outBuff, int Length); + int lips_mode3format_encode(byte * inBuff, byte * outBuff, int Length); -- cgit * Fix function signature to match that of libpng 1.4. While the game seems todanfe2010-05-231-1/+4 * Chase audio/libmodplug update.ehaupt2010-04-241-1/+1 * Chase the ftp/curl shlib version bump.roam2010-04-031-2/+2 * - update to 1.4.1dinoex2010-03-281-2/+2 * - update to jpeg-8dinoex2010-02-051-1/+2 * Drop the patch that changed DarkPlaces' jpeg.h definitions to jpeg7's --danfe2009-10-092-59/+2 * Update to version 2.5.2.danfe2009-10-053-9/+19 * - Switch SourceForge ports to the new File Release System: categories startin...amdmi32009-08-221-1/+1 * - Belatedly update to version 2.5.1danfe2009-08-114-27/+106 * - Update X.org ports to 7.4+ (few ports are more recent than the katamari).flz2009-01-241-1/+1 * Bump the version of the curl shared library after the ftp/curl updateroam2009-01-231-1/+1 * - Fix buildgahr2008-09-111-1/+2 * - Make Nexuiz' lhnetaddress structure really compatible with FreeBSD'sdanfe2008-08-131-0/+6 * - Better separate extracting and patchingdanfe2008-06-191-2/+4 * - Update to version 2.4.2danfe2008-06-193-14/+12 * - Remove unneeded dependency from gtk12/gtk20 [1]miwi2008-04-201-4/+5 * Reformat for better readability.danfe2008-03-171-2/+3 * - Update to version 2.4danfe2008-03-173-12/+11 * - Chase devel/sdl12 shlib version bumpmiwi2008-03-131-1/+1 * - Chase increase of audio/libvorbis shlib version.miwi2007-07-281-0/+1 * - Update to version 2.3, the latest to datedanfe2007-06-134-16/+72 * - Welcome X.org 7.2 \o/.flz2007-05-201-1/+1