[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Support for A0
From: |
Ludovic Courtès |
Subject: |
Support for A0 |
Date: |
Mon, 06 Nov 2006 14:30:55 +0100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
Hi,
Some time ago, I had tried to get support for paper sizes as large as A0
but failed.
The current `MAX_FULL_LENGTH' (2^23 - 1 units, that is, 148m) is long
enough for A0, but `MAX_SHORT_LENGTH' has to be increased (its current
value is 32767, i.e., only 58cm, while A0 is 84.1cm x 118.9cm). Thus, I
increased it to 2^17 - 1 (i.e., 2.3m), which means that we can still add
up a number of `SHORT_LENGTH' into a `SHORT_LENGTH' (since
`SHORT_LENGTH' is typically 32-bit on 32-bit platforms).
However, there may be other issues since with this change (see patch
below) Lout ended up not using the whole paper width.
Since you're planning to make a release (for the EPS issue), I thought
you might want to look at this too.
Thanks,
Ludovic.
--- orig/externs.h
+++ mod/externs.h
@@ -264,8 +264,19 @@
/* */
/*****************************************************************************/
-#define MAX_FULL_LENGTH 8388607 /* 2**23 - 1, about 148 metres */
-#define MAX_SHORT_LENGTH 32767
+#if 0 /* __GNUC__ */
+# define FULL_LENGTH_IS_LLONG
+# define MAX_FULL_LENGTH (9223372036854775807LL >> 7LL)
+#else
+# define MAX_FULL_LENGTH 8388607 /* 2**23 - 1, about 148 metres */
+#endif
+
+#ifdef FULL_LENGTH_IS_LLONG
+# define MAX_SHORT_LENGTH 2147483647L
+#else
+# define MAX_SHORT_LENGTH 131071 /* 2**17 - 1, about 2.3 meters */
+#endif
+
#define MAX_FILES 65535
#define MAX_LINE 2048
#define MAX_WORD 2048
@@ -317,7 +328,11 @@
/* */
/*****************************************************************************/
-typedef int FULL_LENGTH;
+#ifdef FULL_LENGTH_IS_LLONG
+typedef long long FULL_LENGTH;
+#else
+typedef long FULL_LENGTH;
+#endif
/*****************************************************************************/
@@ -326,7 +341,11 @@
/* */
/*****************************************************************************/
-typedef short int SHORT_LENGTH;
+#ifdef FULL_LENGTH_IS_LLONG
+typedef long SHORT_LENGTH;
+#else
+typedef int SHORT_LENGTH;
+#endif
/*****************************************************************************/
--- orig/include/dsf
+++ mod/include/dsf
@@ -742,6 +742,8 @@
Legal @Yield 612p
Statement @Yield 396p
Executive @Yield 540p
+ A0 @Yield 2380p
+ A1 @Yield 1684p
A2 @Yield 1190p
A3 @Yield 842p
A4 @Yield 595p
@@ -764,6 +766,8 @@
Legal @Yield 1008p
Statement @Yield 612p
Executive @Yield 720p
+ A0 @Yield 3368p
+ A1 @Yield 2380p
A2 @Yield 1684p
A3 @Yield 1190p
A4 @Yield 842p
--- orig/z15.c
+++ mod/z15.c
@@ -449,7 +449,8 @@
void Constrained(OBJECT x, CONSTRAINT *xc, int dim, OBJECT *why)
{ OBJECT y, link, lp, rp, z, tlink, g; CONSTRAINT yc, hc, vc;
- BOOLEAN ratm; FULL_LENGTH xback, xfwd; int tb, tf, tbf, tbc, tfc;
+ BOOLEAN ratm; FULL_LENGTH xback, xfwd;
+ FULL_LENGTH tb, tf, tbf, tbc, tfc;
SetLengthDim(dim);
debug2(DSC, DD, "[ Constrained(%s, xc, %s, why), x =",
Image(type(x)), dimen(dim));
- Support for A0,
Ludovic Courtès <=