Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/chinese/gb2ps/files/patch-gbchar.c
16461 views
1
--- gbchar.c.orig 1992-08-23 11:37:58.000000000 +0800
2
+++ gbchar.c 2013-09-26 20:54:32.000000000 +0800
3
@@ -26,6 +26,7 @@ int commandcounter=0;
4
int rotate_flag=FALSE;
5
int setgray=0;
6
7
+void
8
ASCshow() {
9
if (ascflag) {
10
if (!Analyse_flag) fprintf(out,") S\n");
11
@@ -33,6 +34,7 @@ ASCshow() {
12
}
13
}
14
15
+void
16
newline ()
17
{
18
charcount=0; H=_LM;
19
@@ -82,6 +84,7 @@ newline ()
20
}
21
}
22
23
+void
24
put_ASC(c)
25
int c;
26
{
27
@@ -126,6 +129,7 @@ int c;
28
newline ();
29
}
30
31
+void
32
put_CH(ch1,ch2)
33
int ch1,ch2;
34
{
35
@@ -217,6 +221,7 @@ int ch1,ch2;
36
return ch2;
37
}
38
39
+void
40
putString(st)
41
char* st;
42
{
43
@@ -238,6 +243,7 @@ char* st;
44
45
/*===========================================================================*/
46
47
+void
48
DefCHdict() {
49
long i,j,k=0;
50
char st1[10];
51
@@ -249,7 +255,7 @@ DefCHdict() {
52
if (CHcode[i][j]>=CHAR_LIMIT) k++;
53
}
54
55
- fprintf(out,"/CHdict %d dict def\nCHdict begin\n",k+400);
56
+ fprintf(out,"/CHdict %ld dict def\nCHdict begin\n",k+400);
57
58
for (i=0;i<94*94;i++)
59
for (j=0;j<6;j++) {
60
@@ -257,7 +263,7 @@ DefCHdict() {
61
fseek(CHFONT[j].fp,offset_CH+i*size_of_CH,0);
62
fgets(line,size_of_CH,CHFONT[j].fp);
63
sscanf(line,"%s %s",st1,st2);
64
- fprintf(out,"/C%1d%s {H {<%s>} I G} def \n",j,st1,st2);
65
+ fprintf(out,"/C%1ld%s {H {<%s>} I G} def \n",j,st1,st2);
66
}
67
}
68
}
69
@@ -265,7 +271,8 @@ DefCHdict() {
70
71
/*AnalyseDoc: analyse the input document.*/
72
73
-int AnalyseDoc() {
74
+void
75
+AnalyseDoc() {
76
int ch=0,ch1,ch2,i,j;
77
78
for (i=0;i<94*94;i++)
79
@@ -326,13 +333,14 @@ int readchar() {
80
c=fgetc(in);
81
}
82
83
- if (CH_mode)
84
- if (((c&0x7f)>=0x21)&&((c&0x7f)<=0x7e))
85
+ if (CH_mode) {
86
+ if (((c&0x7f)>=0x21)&&((c&0x7f)<=0x7e)) {
87
return c|0x80;
88
- else {
89
+ } else {
90
CH_mode=FALSE;
91
return c;
92
}
93
+ }
94
95
if (!format_flag) return c;
96
97
98