diff options
author | jmz <jmz@FreeBSD.org> | 1995-02-22 09:01:31 +0800 |
---|---|---|
committer | jmz <jmz@FreeBSD.org> | 1995-02-22 09:01:31 +0800 |
commit | 11143a6142bcf692ab925bdb45e714235ccf2193 (patch) | |
tree | ac31fe682b118461fe5f230228697e5e1f9cfa41 /print | |
parent | 5eafa30168afcea582af3e5ae959a67e18517486 (diff) | |
download | freebsd-ports-gnome-11143a6142bcf692ab925bdb45e714235ccf2193.tar.gz freebsd-ports-gnome-11143a6142bcf692ab925bdb45e714235ccf2193.tar.zst freebsd-ports-gnome-11143a6142bcf692ab925bdb45e714235ccf2193.zip |
A cleaner patch for USA paper sizes
Submitted by: Julian Elischer <julian@freefall.cdrom.com>
Diffstat (limited to 'print')
-rw-r--r-- | print/a2ps43-letter/files/patch-aa | 14 | ||||
-rw-r--r-- | print/a2ps43-letter/files/patch-ab | 89 |
2 files changed, 103 insertions, 0 deletions
diff --git a/print/a2ps43-letter/files/patch-aa b/print/a2ps43-letter/files/patch-aa new file mode 100644 index 000000000000..816678edba77 --- /dev/null +++ b/print/a2ps43-letter/files/patch-aa @@ -0,0 +1,14 @@ +*** a2ps.1.orig Tue Feb 15 01:15:16 1994 +--- a2ps.1 Tue Feb 21 16:56:19 1995 +*************** +*** 155,160 **** +--- 155,163 ---- + is the number of copies desired of each file named. By default, you get + only one copy. + .TP 0.6i ++ .B -a ++ Use the American paper size (8.5" x 11") as the basis for all calculations. ++ .TP 0.6i + .B -d + Print the current date and time at the bottom of the page. This option + is affected by the no surrounding border and the no header options. diff --git a/print/a2ps43-letter/files/patch-ab b/print/a2ps43-letter/files/patch-ab new file mode 100644 index 000000000000..75d6ca852483 --- /dev/null +++ b/print/a2ps43-letter/files/patch-ab @@ -0,0 +1,89 @@ +*** a2ps.c.orig Tue Feb 15 01:14:59 1994 +--- a2ps.c Tue Feb 21 16:56:19 1995 +*************** +*** 166,175 **** +--- 166,177 ---- + */ + #ifndef WIDTH + #define WIDTH 8.27 ++ #define USA_WIDTH 8.5 + #endif + + #ifndef HEIGHT + #define HEIGHT 11.64 ++ #define USA_HEIGHT 11.0 + #endif + + #ifndef MARGIN +*************** +*** 362,367 **** +--- 364,371 ---- + /* + * Sheet dimensions + */ ++ double paper_height = HEIGHT; /* Paper height */ ++ double paper_width = WIDTH; /* Paper width */ + double page_height = HEIGHT; /* Paper height */ + double page_width = WIDTH; /* Paper width */ + +*************** +*** 382,387 **** +--- 386,392 ---- + fprintf(stderr,"pos. = -#num\t\tnumber of copies to print\n"); + fprintf(stderr," -1\t\tone page per sheet\n"); + fprintf(stderr," -2\t\tTWIN PAGES per sheet\n"); ++ fprintf(stderr," -a\t\tUse USA paper size (8.5 x 11)\n"); + fprintf(stderr," -d\t-nd\tprint (DON'T PRINT) current date at the bottom\n"); + fprintf(stderr," -Fnum\t\tfont size, num is a float number\n"); + fprintf(stderr," -Hstr\t\tuse str like header title for subsequent files\n"); +*************** +*** 464,469 **** +--- 469,478 ---- + usage(EXIT_FAILURE); + interpret = TRUE; + break; ++ case 'a': /* American paper sizes */ ++ paper_height = USA_HEIGHT; ++ paper_width = USA_WIDTH; ++ break; + case 'n': + if (arg[2] == NUL) + return; +*************** +*** 1471,1478 **** + printf("\n%% Initialize page description variables.\n"); + printf("/x0 0 def\n"); + printf("/y0 0 def\n"); +! printf("/sh %g inch def\n", (double)HEIGHT); +! printf("/sw %g inch def\n", (double)WIDTH); + printf("/margin %g inch def\n", (double)MARGIN); + printf("/rm margin 3 div def\n"); + printf("/lm margin 2 mul 3 div def\n"); +--- 1480,1487 ---- + printf("\n%% Initialize page description variables.\n"); + printf("/x0 0 def\n"); + printf("/y0 0 def\n"); +! printf("/sh %g inch def\n", (double)paper_height); +! printf("/sw %g inch def\n", (double)paper_width); + printf("/margin %g inch def\n", (double)MARGIN); + printf("/rm margin 3 div def\n"); + printf("/lm margin 2 mul 3 div def\n"); +*************** +*** 1794,1801 **** + /* Initialize variables not depending of positional options */ + landscape = twinpages = -1; /* To force format switching */ + fontsize = -1.0; /* To force fontsize switching */ +! page_height = (double)(HEIGHT - MARGIN) * PIXELS_INCH; +! page_width = (double)(WIDTH - MARGIN) * PIXELS_INCH; + + /* Postcript prologue printing */ + print_prologue(); +--- 1803,1810 ---- + /* Initialize variables not depending of positional options */ + landscape = twinpages = -1; /* To force format switching */ + fontsize = -1.0; /* To force fontsize switching */ +! page_height = (double)(paper_height - MARGIN) * PIXELS_INCH; +! page_width = (double)(paper_width - MARGIN) * PIXELS_INCH; + + /* Postcript prologue printing */ + print_prologue(); |