61 lines
2.0 KiB
Diff
61 lines
2.0 KiB
Diff
|
--- psutils/epsffit.c.orig Wed Mar 12 00:52:52 1997
|
||
|
+++ psutils/epsffit.c Wed Jun 4 11:02:36 1997
|
||
|
@@ -42,12 +42,12 @@
|
||
|
void main(int argc, char **argv)
|
||
|
{
|
||
|
int bbfound = 0; /* %%BoundingBox: found */
|
||
|
- int urx, ury, llx, lly;
|
||
|
+ int urx = 0, ury = 0, llx = 0, lly = 0;
|
||
|
int furx, fury, fllx, flly;
|
||
|
int showpage = 0, centre = 0, rotate = 0, aspect = 0, maximise = 0;
|
||
|
char buf[BUFSIZ];
|
||
|
- FILE *input;
|
||
|
- FILE *output;
|
||
|
+ FILE *input = stdin;
|
||
|
+ FILE *output = stdout;
|
||
|
|
||
|
program = *argv++; argc--;
|
||
|
|
||
|
@@ -163,9 +163,14 @@
|
||
|
yoffset -= lly * yscale;
|
||
|
}
|
||
|
fputs("%%EndComments\n", output);
|
||
|
- if (showpage)
|
||
|
- fputs("save /showpage{}def /copypage{}def /erasepage{}def\n", output);
|
||
|
- else
|
||
|
+ if (showpage) {
|
||
|
+ fputs("/startEpsffit {\n", output);
|
||
|
+ fputs(" /EpsffitSave {save} def\n", output);
|
||
|
+ fputs(" userdict 200 dict begin\n", output);
|
||
|
+ fputs(" /showpage{}def /copypage{}def /erasepage{}def\n", output);
|
||
|
+ fputs("}def\n", output);
|
||
|
+ fputs("startEpsffit\n", output);
|
||
|
+ } else
|
||
|
fputs("%%BeginProcSet: epsffit 1 0\n", output);
|
||
|
fputs("gsave\n", output);
|
||
|
fprintf(output, "%.3f %.3f translate\n", xoffset, yoffset);
|
||
|
@@ -181,7 +186,7 @@
|
||
|
if (bbfound) {
|
||
|
fputs("grestore\n", output);
|
||
|
if (showpage)
|
||
|
- fputs("restore showpage\n", output); /* just in case */
|
||
|
+ fputs("end EpsffitSave restore showpage\n", output); /* just in case */
|
||
|
} else
|
||
|
message(FATAL, "no %%%%BoundingBox:\n");
|
||
|
|
||
|
--- psutils/psnup.c.orig Wed Mar 12 00:53:02 1997
|
||
|
+++ psutils/psnup.c Wed Jun 4 11:02:36 1997
|
||
|
@@ -68,10 +68,10 @@
|
||
|
|
||
|
void main(int argc, char *argv[])
|
||
|
{
|
||
|
- int horiz, vert, rotate, column, flip, leftright, topbottom;
|
||
|
+ int horiz = 0, vert = 0, rotate = 0, column, flip, leftright, topbottom;
|
||
|
int nup = 1;
|
||
|
double draw = 0; /* draw page borders */
|
||
|
- double scale; /* page scale */
|
||
|
+ double scale = 0; /* page scale */
|
||
|
double uscale = 0; /* user supplied scale */
|
||
|
double ppwid, pphgt; /* paper dimensions */
|
||
|
double margin, border; /* paper & page margins */
|