| 1 |
Description: - Fix the source code to building package. |
| 2 |
Author: Giovani Agusuto Ferreira <[email protected]> |
| 3 |
Last-Update: 2015-10-15 |
| 4 |
Index: e2ps-4.34/e2ps.c |
| 5 |
=================================================================== |
| 6 |
--- e2ps-4.34.orig/e2ps.c |
| 7 |
+++ e2ps-4.34/e2ps.c |
| 8 |
@@ -11,7 +11,7 @@ |
| 9 |
|
| 10 |
#include "e2ps.h" |
| 11 |
#include "wtkf.h" |
| 12 |
|
| 13 |
+#include <paper.h> |
| 14 |
|
| 15 |
/* Global variables */ |
| 16 |
uchar *gsCommand; /* own file name */ |
| 17 |
@@ -67,6 +67,7 @@ int main(int argc, char **argv) { |
| 18 |
long lFileSize; |
| 19 |
float fMaxWidth; |
| 20 |
float ftmp; |
| 21 |
+ const struct paper* paperinf; |
| 22 |
#ifdef TEKTRO |
| 23 |
uchar uCopy = 1; /* Number of paper */ |
| 24 |
uchar uDup = 0; /* Both side */ |
| 25 |
@@ -129,9 +130,26 @@ int main(int argc, char **argv) { |
| 26 |
gsBoldItalicKanjiFont = setstring(KANJI_BOLDITALIC); |
| 27 |
} |
| 28 |
giMaxLine = MAXLINE; |
| 29 |
|
| 30 |
+/* strcpy(sPaper, "A4"); |
| 31 |
giWidth = A4WIDTH; |
| 32 |
|
| 33 |
+ giHeight = A4HEIGHT; */ |
| 34 |
+ /* libpaperg */ |
| 35 |
+ if (systempapername() != 0){ |
| 36 |
+ strcpy(sPaper,systempapername()); |
| 37 |
+ if ((paperinf = paperinfo(sPaper)) == 0 && strcmp(sPaper, "a4") != 0 |
| 38 |
+ && strcmp(sPaper, "b4") != 0 && strcmp(sPaper, "letter") != 0 ) { |
| 39 |
+ fprintf(stderr, "%s: unknown paper name `%s'.\n", *argv, sPaper); |
| 40 |
+ exit(2); |
| 41 |
+ } else { |
| 42 |
+ giWidth = paperpswidth(paperinf); |
| 43 |
+ giHeight = paperpsheight(paperinf); |
| 44 |
+ } |
| 45 |
+ } |
| 46 |
+ else { |
| 47 |
+ strcpy(sPaper, "A4"); |
| 48 |
+ giWidth = A4WIDTH; |
| 49 |
+ giHeight = A4HEIGHT; |
| 50 |
+ } |
| 51 |
gfFontSize = FONTSIZE; |
| 52 |
gfTopMargin = TOP; |
| 53 |
gfBottomMargin = BOTTOM; |
| 54 |
Index: e2ps-4.34/ps-font.c |
| 55 |
=================================================================== |
| 56 |
--- e2ps-4.34.orig/ps-font.c |
| 57 |
+++ e2ps-4.34/ps-font.c |
| 58 |
@@ -11,46 +11,7 @@ |
| 59 |
#include "e2ps.h" |
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
+char *gsFonts = "Times-Roman Times-Italic Times-Bold Times-BoldItalic Helvetica Helvetica-Oblique Helvetica-Bold Helvetica-BoldOblique Courier Courier-Oblique Courier-Bold Courier-BoldOblique Symbol AvantGarde-Book AvantGarde_BookOblique AvantGarde_Demi AvantGarde_DemiOblique Bookman-Light Bookman-LightItalic Bookman-Demi Bookman-DemiItalic Helvetica-Narrow Helvetica-Narrow-Oblique Helvetica-Narrow-Bold Helvetica-Narrow-BoldObliqeu NewCenturySchlbl-Roman NewCenturySchlbl-Italic NewCenturySchlbl-Bold NewCenturySchlbl-BoldItalic Palatino-Roman Palatino-Italic Palatino-Bold Palatino-BoldItalic Zapfchancery-MediumItalic ZapfDingbats Ryumin-Light.Hiragana Ryumin-Light.Katakana Gothic-Meduim.Hiragana Gothic-Medium.Katakana"; |
| 103 |
|
| 104 |
|
| 105 |
/* Set PostScript Font Width */ |