1*** zmedia2.c.org	Tue Sep 19 21:00:54 2000
2--- zmedia2.c	Sun Aug 19 12:16:35 2001
3***************
4*** 427,437 ****
5
6  	rx = ry, ry = temp;
7      }
8!     /* Adjust the medium size if flexible. */
9!     if (medium->p.x < MIN_MEDIA_SIZE && mx > rx)
10! 	mx = rx;
11!     if (medium->p.y < MIN_MEDIA_SIZE && my > ry)
12! 	my = ry;
13
14      /* Translate to align the centers. */
15      gs_make_translation(mx / 2, my / 2, pmat);
16--- 427,443 ----
17
18  	rx = ry, ry = temp;
19      }
20!     /* If 'medium' is flexible, adjust 'mx' and 'my' towards 'rx' and 'ry',
21!        respectively. Note that 'mx' and 'my' have just acquired the largest
22!        permissible value, medium->q. */
23!     if (medium->p.x < mx)	/* non-empty width range */
24!       if (rx < medium->p.x) mx = medium->p.x;	/* minimum */
25!       else if (mx > rx) mx = rx;	/* fits */
26!       /* else use medium->q.x, i.e., the maximum */
27!     if (medium->p.y < my)	/* non-empty height range */
28!       if (ry < medium->p.y) my = medium->p.y;	/* minimum */
29!       else if (my > ry) my = ry;	/* fits */
30!       /* else use medium->q.y, i.e., the maximum */
31
32      /* Translate to align the centers. */
33      gs_make_translation(mx / 2, my / 2, pmat);
34