Lines 1-6
Link Here
|
1 |
--- ./src/gsint.h.orig Thu Jun 25 15:18:32 1998 |
1 |
diff -ruN src.orib/gsint.h src/gsint.h |
2 |
+++ ./src/gsint.h Mon Nov 27 22:18:18 2000 |
2 |
--- src.orib/gsint.h Thu May 13 12:41:04 2004 |
3 |
@@ -188,7 +188,9 @@ |
3 |
+++ src/gsint.h Thu May 13 12:58:29 2004 |
|
|
4 |
@@ -190,7 +190,9 @@ |
4 |
ENC_VMS, |
5 |
ENC_VMS, |
5 |
ENC_HP8, |
6 |
ENC_HP8, |
6 |
ENC_KOI8, |
7 |
ENC_KOI8, |
Lines 10-31
Link Here
|
10 |
+ ENC_UNICNS_UTF8, |
11 |
+ ENC_UNICNS_UTF8, |
11 |
} InputEncoding; |
12 |
} InputEncoding; |
12 |
|
13 |
|
13 |
typedef enum |
14 |
struct encoding_registry_st |
14 |
--- ./src/main.c.orig Thu Jun 25 16:26:00 1998 |
15 |
diff -ruN src.orib/main.c src/main.c |
15 |
+++ ./src/main.c Mon Nov 27 22:18:18 2000 |
16 |
--- src.orib/main.c Thu May 13 12:41:04 2004 |
16 |
@@ -864,7 +864,8 @@ |
17 |
+++ src/main.c Thu May 13 12:42:28 2004 |
17 |
{{"koi8", NULL, NULL}, ENC_KOI8, '\n', 8}, |
18 |
@@ -817,6 +817,8 @@ |
18 |
{{"ps", "PS", NULL}, ENC_PS, '\n', 8}, |
19 |
{{"koi8", NULL, NULL}, ENC_KOI8, '\n', 8}, |
19 |
{{"pslatin1", "ISOLatin1Encoding", NULL}, ENC_ISO_8859_1, '\n', 8}, |
20 |
{{"ps", "PS", NULL}, ENC_PS, '\n', 8}, |
20 |
- |
21 |
{{"pslatin1", "ISOLatin1Encoding", NULL}, ENC_ISO_8859_1, '\n', 8}, |
21 |
+ {{"big5", "Formal Chinese", NULL}, ENC_BIG5, '\n', 8}, |
22 |
+ {{"big5", "Formal Chinese", NULL}, ENC_BIG5, '\n', 8}, |
22 |
+ {{"UniCNS-UTF8", "Formal Chinese", NULL}, ENC_UNICNS_UTF8, '\n', 8}, |
23 |
+ {{"UniCNS-UTF8", "Formal Chinese", NULL}, ENC_UNICNS_UTF8, '\n', 8}, |
23 |
{{NULL, NULL, NULL}, 0, 0, 0}, |
24 |
|
24 |
}; |
25 |
{{NULL, NULL, NULL}, 0, 0, 0}, |
25 |
|
26 |
}; |
26 |
--- ./src/psgen.c.orig Thu Jun 25 15:18:54 1998 |
27 |
diff -ruN src.orib/psgen.c src/psgen.c |
27 |
+++ ./src/psgen.c Mon Nov 27 22:18:18 2000 |
28 |
--- src.orib/psgen.c Thu May 13 12:41:04 2004 |
28 |
@@ -303,15 +303,22 @@ |
29 |
+++ src/psgen.c Thu May 13 12:53:07 2004 |
|
|
30 |
@@ -323,15 +323,21 @@ |
29 |
if (!paste_file ("enscript", ".pro")) |
31 |
if (!paste_file ("enscript", ".pro")) |
30 |
FATAL ((stderr, _("couldn't find prolog \"%s\": %s\n"), "enscript.pro", |
32 |
FATAL ((stderr, _("couldn't find prolog \"%s\": %s\n"), "enscript.pro", |
31 |
strerror (errno))); |
33 |
strerror (errno))); |
Lines 49-82
Link Here
|
49 |
+ FATAL ((stderr, _("couldn't find encoding file \"%s.enc\": %s\n"), |
51 |
+ FATAL ((stderr, _("couldn't find encoding file \"%s.enc\": %s\n"), |
50 |
+ encoding_name, strerror (errno))); |
52 |
+ encoding_name, strerror (errno))); |
51 |
+ OUTPUT ((cofp, "%%%%EndResource\n")); |
53 |
+ OUTPUT ((cofp, "%%%%EndResource\n")); |
52 |
+ } |
54 |
+ } |
53 |
+ |
|
|
54 |
|
55 |
|
55 |
OUTPUT ((cofp, "%%%%EndProlog\n")); |
56 |
OUTPUT ((cofp, "%%%%EndProlog\n")); |
56 |
|
57 |
|
57 |
@@ -339,6 +346,7 @@ |
58 |
@@ -1129,7 +1135,12 @@ |
58 |
/* Select our fonts. */ |
|
|
59 |
|
60 |
/* Header font HF. */ |
61 |
+ |
62 |
OUTPUT ((cofp, "/%s /HF-gs-font MF\n", HFname)); |
63 |
OUTPUT ((cofp, |
64 |
"/HF /HF-gs-font findfont [HFpt_w 0 0 HFpt_h 0 0] makefont def\n")); |
65 |
@@ -1033,7 +1041,12 @@ |
66 |
/* Help macros. */ |
59 |
/* Help macros. */ |
67 |
|
60 |
|
68 |
/* Check if character <ch> fits to current line. */ |
61 |
/* Check if character <ch> fits to current line. */ |
69 |
-#define FITS_ON_LINE(ch) ((linepos + CHAR_WIDTH (ch) < linew) || col == 0) |
62 |
-#define FITS_ON_LINE(ch) ((linepos + CHAR_WIDTH (ch) < linew) || col == 0) |
70 |
+/* NO wraping for CJK at this moment. Added by C.S. Chin Sept.1 */ |
63 |
+/* NO wraping for CJK at this moment. Added by C.S. Chin Sept.1 */ |
71 |
+ |
64 |
+ |
72 |
+#define FITS_ON_LINE(ch) ( ( (encoding == ENC_BIG5 && b5firstc) ||\ |
65 |
+#define FITS_ON_LINE(ch) ( ( (encoding == ENC_BIG5 && b5firstc) ||\ |
73 |
+ (encoding == ENC_UNICNS_UTF8 && u8firstc) ) ?\ |
66 |
+ (encoding == ENC_UNICNS_UTF8 && u8firstc) ) ?\ |
74 |
+ (linepos + 2 * CHAR_WIDTH (ch) < linew) :\ |
67 |
+ (linepos + 2 * CHAR_WIDTH (ch) < linew) :\ |
75 |
+ (linepos + CHAR_WIDTH (ch) < linew || in_u8) ) |
68 |
+ (linepos + CHAR_WIDTH (ch) < linew || in_u8) ) |
76 |
|
69 |
|
77 |
/* Is line buffer empty? */ |
70 |
/* Is line buffer empty? */ |
78 |
#define BUFFER_EMPTY() (bufpos == 0) |
71 |
#define BUFFER_EMPTY() (bufpos == 0) |
79 |
@@ -1473,8 +1486,12 @@ |
72 |
@@ -1594,8 +1605,12 @@ |
80 |
static unsigned int buflen = 0; /* output buffer's length */ |
73 |
static unsigned int buflen = 0; /* output buffer's length */ |
81 |
unsigned int bufpos = 0; /* current position in output buffer */ |
74 |
unsigned int bufpos = 0; /* current position in output buffer */ |
82 |
int ch = 0; |
75 |
int ch = 0; |
Lines 89-95
Link Here
|
89 |
static int pending_token = tNONE; |
82 |
static int pending_token = tNONE; |
90 |
unsigned int original_col = col; |
83 |
unsigned int original_col = col; |
91 |
|
84 |
|
92 |
@@ -1624,6 +1641,39 @@ |
85 |
@@ -1745,6 +1760,39 @@ |
93 |
break; |
86 |
break; |
94 |
} |
87 |
} |
95 |
|
88 |
|
Lines 129-154
Link Here
|
129 |
/* Check normal characters. */ |
122 |
/* Check normal characters. */ |
130 |
if (EXISTS (ch)) |
123 |
if (EXISTS (ch)) |
131 |
{ |
124 |
{ |
132 |
@@ -1741,7 +1791,7 @@ |
125 |
diff -ruN src.orib/util.c src/util.c |
133 |
/* Got a string. */ |
126 |
--- src.orib/util.c Thu May 13 12:41:04 2004 |
134 |
|
127 |
+++ src/util.c Thu May 13 12:56:31 2004 |
135 |
/* Check for wrapped line. */ |
128 |
@@ -890,11 +890,18 @@ |
136 |
- if (done == DONE_WRAP) |
|
|
137 |
+ if (done == DONE_WRAP) |
138 |
{ |
139 |
/* This line is too long. */ |
140 |
ch = nl; |
141 |
--- ./src/util.c.orig Wed Jun 24 14:48:21 1998 |
142 |
+++ ./src/util.c Mon Nov 27 22:18:18 2000 |
143 |
@@ -774,6 +774,7 @@ |
144 |
if (!strhash_get (afm_cache, Fname, strlen (Fname), (void **) &font)) |
145 |
{ |
146 |
/* AFM file was not cached, open it from disk. */ |
147 |
+ |
148 |
error = afm_open_font (afm, AFM_I_COMPOSITES, Fname, &font); |
149 |
if (error != AFM_SUCCESS) |
150 |
{ |
151 |
@@ -782,11 +783,18 @@ |
152 |
* Do not report failures for "Courier*" fonts because |
129 |
* Do not report failures for "Courier*" fonts because |
153 |
* AFM library's default font will fix them. |
130 |
* AFM library's default font will fix them. |
154 |
*/ |
131 |
*/ |
Lines 172-187
Link Here
|
172 |
error = afm_open_default_font (afm, &font); |
149 |
error = afm_open_default_font (afm, &font); |
173 |
if (error != AFM_SUCCESS) |
150 |
if (error != AFM_SUCCESS) |
174 |
{ |
151 |
{ |
175 |
@@ -796,7 +804,7 @@ |
152 |
@@ -997,6 +1004,12 @@ |
176 |
buf)); |
|
|
177 |
} |
178 |
} |
179 |
- |
180 |
+ |
181 |
/* Apply encoding. */ |
182 |
switch (encoding) |
183 |
{ |
184 |
@@ -879,6 +887,12 @@ |
185 |
case ENC_PS: |
153 |
case ENC_PS: |
186 |
/* Let's use font's default encoding -- nothing here. */ |
154 |
/* Let's use font's default encoding -- nothing here. */ |
187 |
break; |
155 |
break; |
Lines 194-200
Link Here
|
194 |
} |
162 |
} |
195 |
|
163 |
|
196 |
/* Put it to the AFM cache. */ |
164 |
/* Put it to the AFM cache. */ |
197 |
@@ -888,20 +902,57 @@ |
165 |
@@ -1006,20 +1019,56 @@ |
198 |
|
166 |
|
199 |
font_info = (CachedFontInfo *) xcalloc (1, sizeof (*font_info)); |
167 |
font_info = (CachedFontInfo *) xcalloc (1, sizeof (*font_info)); |
200 |
/* Read character widths and types. */ |
168 |
/* Read character widths and types. */ |
Lines 227-233
Link Here
|
227 |
+ else |
195 |
+ else |
228 |
+ font_info->font_ctype[i] = '*'; |
196 |
+ font_info->font_ctype[i] = '*'; |
229 |
+ } |
197 |
+ } |
230 |
+ } else { |
198 |
+ } else { |
231 |
+ if (encoding == ENC_BIG5) |
199 |
+ if (encoding == ENC_BIG5) |
232 |
+ { |
200 |
+ { |
233 |
+ for (i = 0; i < 256; i++) |
201 |
+ for (i = 0; i < 256; i++) |
Lines 261-268
Link Here
|
261 |
+ } |
229 |
+ } |
262 |
+ } |
230 |
+ } |
263 |
+ } |
231 |
+ } |
264 |
+ } |
232 |
+ } |
265 |
+ |
|
|
266 |
|
233 |
|
267 |
font_info->font_is_fixed |
234 |
font_info->font_is_fixed |
268 |
= font->writing_direction_metrics[0].IsFixedPitch; |
235 |
= font->writing_direction_metrics[0].IsFixedPitch; |