File: fix-source

package info (click to toggle)
e2ps 4.34-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 464 kB
  • sloc: ansic: 11,698; makefile: 103
file content (105 lines) | stat: -rw-r--r-- 3,269 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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
103
104
105
Description: - Fix the source code to building package.
Author: Giovani Agusuto Ferreira <giovani@riseup.net>
Last-Update: 2015-10-15
Index: e2ps-4.34/e2ps.c
===================================================================
--- e2ps-4.34.orig/e2ps.c
+++ e2ps-4.34/e2ps.c
@@ -11,7 +11,7 @@
 
 #include	"e2ps.h"
 #include	"wtkf.h"
-
+#include  <paper.h>
 
 /* Global variables */
 uchar	*gsCommand;		/* own file name */
@@ -67,6 +67,7 @@ int main(int argc, char **argv) {
   long		lFileSize;
   float		fMaxWidth;
   float		ftmp;
+  const struct paper* paperinf;
 #ifdef	TEKTRO
   uchar		uCopy = 1;	/* Number of paper */
   uchar		uDup = 0;	/* Both side */
@@ -129,9 +130,26 @@ int main(int argc, char **argv) {
     gsBoldItalicKanjiFont = setstring(KANJI_BOLDITALIC);
   }
   giMaxLine		= MAXLINE;
-  strcpy(sPaper, "A4");
+/*  strcpy(sPaper, "A4");
   giWidth		= A4WIDTH;
-  giHeight		= A4HEIGHT;
+  giHeight		= A4HEIGHT; */
+  /* libpaperg */
+  if (systempapername() != 0){
+  strcpy(sPaper,systempapername());
+    if ((paperinf = paperinfo(sPaper)) == 0 && strcmp(sPaper, "a4") != 0 
+       && strcmp(sPaper, "b4") != 0 && strcmp(sPaper, "letter") != 0 ) {
+       fprintf(stderr, "%s: unknown paper name `%s'.\n", *argv, sPaper);
+       exit(2);
+    } else {
+       giWidth = paperpswidth(paperinf);
+       giHeight = paperpsheight(paperinf);
+    }
+  }
+  else {
+     strcpy(sPaper, "A4");
+     giWidth		= A4WIDTH;
+     giHeight		= A4HEIGHT;
+  }
   gfFontSize		= FONTSIZE;
   gfTopMargin		= TOP;
   gfBottomMargin	= BOTTOM;
Index: e2ps-4.34/ps-font.c
===================================================================
--- e2ps-4.34.orig/ps-font.c
+++ e2ps-4.34/ps-font.c
@@ -11,46 +11,7 @@
 #include	"e2ps.h"
 
 
-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
-";
+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";
 
 
 /* Set PostScript Font Width */