summaryrefslogtreecommitdiff
path: root/print/ghostscript/patches/patch-av
diff options
context:
space:
mode:
Diffstat (limited to 'print/ghostscript/patches/patch-av')
-rw-r--r--print/ghostscript/patches/patch-av32
1 files changed, 32 insertions, 0 deletions
diff --git a/print/ghostscript/patches/patch-av b/print/ghostscript/patches/patch-av
new file mode 100644
index 00000000000..149f2fab635
--- /dev/null
+++ b/print/ghostscript/patches/patch-av
@@ -0,0 +1,32 @@
+$NetBSD: patch-av,v 1.1 2005/12/09 20:30:16 wiz Exp $
+
+--- src/zmedia2.c.orig Thu Mar 9 03:40:45 2000
++++ src/zmedia2.c Mon May 1 20:26:24 2000
+@@ -427,11 +427,27 @@
+
+ rx = ry, ry = temp;
+ }
++#if 0
++ /* Adapt hpdj's changes to zmedia2.c to apply to the latest
++ Ghostscript source. */
+ /* Adjust the medium size if flexible. */
+ if (medium->p.x < MIN_MEDIA_SIZE && mx > rx)
+ mx = rx;
+ if (medium->p.y < MIN_MEDIA_SIZE && my > ry)
+ my = ry;
++#else
++ /* If 'medium' is flexible, adjust 'mx' and 'my' towards 'rx' and 'ry',
++ respectively. Note that 'mx' and 'my' have just acquired the largest
++ permissible value, medium->q. */
++ if (medium->p.x < mx) /* non-empty width range */
++ if (rx < medium->p.x) mx = medium->p.x; /* minimum */
++ else if (mx > rx) mx = rx; /* fits */
++ /* else use medium->q.x, i.e., the maximum */
++ if (medium->p.y < my) /* non-empty height range */
++ if (ry < medium->p.y) my = medium->p.y; /* minimum */
++ else if (my > ry) my = ry; /* fits */
++ /* else use medium->q.y, i.e., the maximum */
++#endif
+
+ /* Translate to align the centers. */
+ gs_make_translation(mx / 2, my / 2, pmat);