summaryrefslogtreecommitdiff
path: root/print/ghostscript7/files/patch-lips:gdevl4v.c
diff options
context:
space:
mode:
authorKirill Ponomarev <krion@FreeBSD.org>2004-03-26 14:43:45 +0000
committerKirill Ponomarev <krion@FreeBSD.org>2004-03-26 14:43:45 +0000
commitc7d0e51fb86bef0bfd5fd36d792de2716c7a7cdf (patch)
tree486b7d7ea03b89593c87e589169e0c1b52a061e4 /print/ghostscript7/files/patch-lips:gdevl4v.c
parent- Support WITHOUT_NLS (diff)
- Improve papersize handling of LIPS driver
PR: ports/64766 Submitted by: Ports Fury
Notes
Notes: svn path=/head/; revision=105337
Diffstat (limited to 'print/ghostscript7/files/patch-lips:gdevl4v.c')
-rw-r--r--print/ghostscript7/files/patch-lips:gdevl4v.c46
1 files changed, 39 insertions, 7 deletions
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;