1 |
aballier 08/11/29 14:57:17 |
2 |
|
3 |
Modified: series |
4 |
Added: 180_all_gcc44.patch 190_all_xpdf_const_char.patch |
5 |
Log: |
6 |
Add patches for bug #247982 and bug #249224 |
7 |
|
8 |
Revision Changes Path |
9 |
1.6 src/patchsets/texlive/2008/texlive-core/series |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/texlive/2008/texlive-core/series?rev=1.6&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/texlive/2008/texlive-core/series?rev=1.6&content-type=text/plain |
13 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/texlive/2008/texlive-core/series?r1=1.5&r2=1.6 |
14 |
|
15 |
Index: series |
16 |
=================================================================== |
17 |
RCS file: /var/cvsroot/gentoo/src/patchsets/texlive/2008/texlive-core/series,v |
18 |
retrieving revision 1.5 |
19 |
retrieving revision 1.6 |
20 |
diff -u -r1.5 -r1.6 |
21 |
--- series 18 Oct 2008 07:46:42 -0000 1.5 |
22 |
+++ series 29 Nov 2008 14:57:17 -0000 1.6 |
23 |
@@ -2,5 +2,7 @@ |
24 |
110_all_icu_CVE-2007-4770.patch |
25 |
150_all_installedscripts.patch |
26 |
170_all_parmake.patch |
27 |
+180_all_gcc44.patch |
28 |
160_all_man5.patch |
29 |
160_all_cxxflags_for_cplusplus.patch |
30 |
+190_all_xpdf_const_char.patch |
31 |
|
32 |
|
33 |
|
34 |
1.1 src/patchsets/texlive/2008/texlive-core/180_all_gcc44.patch |
35 |
|
36 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/texlive/2008/texlive-core/180_all_gcc44.patch?rev=1.1&view=markup |
37 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/texlive/2008/texlive-core/180_all_gcc44.patch?rev=1.1&content-type=text/plain |
38 |
|
39 |
Index: 180_all_gcc44.patch |
40 |
=================================================================== |
41 |
Fix gcc 4.4 build |
42 |
By Ryan Hill <dirtyepic@g.o> |
43 |
https://bugs.gentoo.org/show_bug.cgi?id=249224 |
44 |
|
45 |
|
46 |
diff -Naur texlive-20080816-source-orig/libs/teckit/source/Compiler.cpp texlive-20080816-source/libs/teckit/source/Compiler.cpp |
47 |
--- texlive-20080816-source-orig/libs/teckit/source/Compiler.cpp 2008-04-25 08:56:15.000000000 -0600 |
48 |
+++ texlive-20080816-source/libs/teckit/source/Compiler.cpp 2008-11-28 22:27:07.000000000 -0600 |
49 |
@@ -33,6 +33,7 @@ |
50 |
#include <iomanip> |
51 |
#include <algorithm> |
52 |
#include <cstring> |
53 |
+#include <cstdio> |
54 |
|
55 |
#include "zlib.h" |
56 |
|
57 |
|
58 |
|
59 |
|
60 |
1.1 src/patchsets/texlive/2008/texlive-core/190_all_xpdf_const_char.patch |
61 |
|
62 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/texlive/2008/texlive-core/190_all_xpdf_const_char.patch?rev=1.1&view=markup |
63 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/texlive/2008/texlive-core/190_all_xpdf_const_char.patch?rev=1.1&content-type=text/plain |
64 |
|
65 |
Index: 190_all_xpdf_const_char.patch |
66 |
=================================================================== |
67 |
eliminate xpdf deprecated char* coversion warnings |
68 |
|
69 |
by Vladimir Rapatskiy <rapatsky@×××××.com> |
70 |
https://bugs.gentoo.org/show_bug.cgi?id=247982 |
71 |
|
72 |
diff -ur texlive-20080816-source/texk/web2c/pdftexdir.orig/epdf.h texlive-20080816-source/texk/web2c/pdftexdir/epdf.h |
73 |
--- texlive-20080816-source/texk/web2c/pdftexdir.orig/epdf.h 2008-11-21 19:40:30.000000000 +0300 |
74 |
+++ texlive-20080816-source/texk/web2c/pdftexdir/epdf.h 2008-11-21 19:51:16.000000000 +0300 |
75 |
@@ -78,7 +78,7 @@ |
76 |
extern char notdef[]; |
77 |
|
78 |
extern int is_subsetable(struct fm_entry *); |
79 |
- extern struct fm_entry *lookup_fontmap(char *); |
80 |
+ extern struct fm_entry *lookup_fontmap(const char *); |
81 |
extern integer get_fontfile(struct fm_entry *); |
82 |
extern integer get_fontname(struct fm_entry *); |
83 |
extern integer pdfnewobjnum(void); |
84 |
@@ -116,7 +116,7 @@ |
85 |
extern int get_fn_objnum(struct fd_entry *); |
86 |
|
87 |
/* write_enc.c */ |
88 |
- extern void epdf_write_enc(char **, integer); |
89 |
+ extern void epdf_write_enc(const char **, integer); |
90 |
|
91 |
/* utils.c */ |
92 |
extern char *convertStringToPDFString(char *in, int len); |
93 |
diff -ur texlive-20080816-source/texk/web2c/pdftexdir.orig/mapfile.c texlive-20080816-source/texk/web2c/pdftexdir/mapfile.c |
94 |
--- texlive-20080816-source/texk/web2c/pdftexdir.orig/mapfile.c 2008-11-21 19:40:30.000000000 +0300 |
95 |
+++ texlive-20080816-source/texk/web2c/pdftexdir/mapfile.c 2008-11-21 19:56:54.000000000 +0300 |
96 |
@@ -645,10 +645,11 @@ |
97 |
* used for Type1 font replacement when embedding of PDF files |
98 |
*/ |
99 |
|
100 |
-fm_entry *lookup_fontmap(char *ps_name) |
101 |
+fm_entry *lookup_fontmap(const char *ps_name) |
102 |
{ |
103 |
fm_entry *fm, *fm2, tmp; |
104 |
- char *a, *b, *c, *d, *e, *s; |
105 |
+ char *a, *b, *c, *d, *e; |
106 |
+ const char *s; |
107 |
int i, sl, ex; |
108 |
struct avl_traverser t, t2; |
109 |
if (tfm_tree == NULL) |
110 |
@@ -705,7 +706,7 @@ |
111 |
} |
112 |
} |
113 |
} |
114 |
- tmp.ps_name = s; |
115 |
+ tmp.ps_name = (char*)s; |
116 |
|
117 |
fm = (fm_entry *) avl_t_find(&t, ps_tree, &tmp); |
118 |
if (fm == NULL) |
119 |
diff -ur texlive-20080816-source/texk/web2c/pdftexdir.orig/pdftoepdf.cc texlive-20080816-source/texk/web2c/pdftexdir/pdftoepdf.cc |
120 |
--- texlive-20080816-source/texk/web2c/pdftexdir.orig/pdftoepdf.cc 2008-11-21 19:40:30.000000000 +0300 |
121 |
+++ texlive-20080816-source/texk/web2c/pdftexdir/pdftoepdf.cc 2008-11-21 19:57:43.000000000 +0300 |
122 |
@@ -281,7 +281,7 @@ |
123 |
|
124 |
static void copyObject(Object *); |
125 |
|
126 |
-static void copyName(char *s) |
127 |
+static void copyName(const char *s) |
128 |
{ |
129 |
pdf_puts("/"); |
130 |
for (; *s != 0; s++) { |
131 |
@@ -316,7 +316,7 @@ |
132 |
static void copyFontDict(Object * obj, InObj * r) |
133 |
{ |
134 |
int i, l; |
135 |
- char *key; |
136 |
+ const char *key; |
137 |
if (!obj->isDict()) |
138 |
pdftex_fail("PDF inclusion: invalid dict type <%s>", |
139 |
obj->getTypeName()); |
140 |
@@ -369,7 +369,7 @@ |
141 |
|
142 |
#define REPLACE_TYPE1C true |
143 |
|
144 |
-static void copyFont(char *tag, Object * fontRef) |
145 |
+static void copyFont(const char *tag, Object * fontRef) |
146 |
{ |
147 |
PdfObject fontdict, subtype, basefont, fontdescRef, fontdesc, charset, |
148 |
fontfile, ffsubtype, stemV; |
149 |
@@ -441,7 +441,7 @@ |
150 |
pdf_puts(">>\n"); |
151 |
} |
152 |
|
153 |
-static void copyOtherResources(Object * obj, char *key) |
154 |
+static void copyOtherResources(Object * obj, const char *key) |
155 |
{ |
156 |
// copies all other resources (write_epdf handles Fonts and ProcSets), |
157 |
// but gives a warning if an object is not a dictionary. |
158 |
@@ -626,7 +626,7 @@ |
159 |
static void writeEncodings() |
160 |
{ |
161 |
UsedEncoding *r, *n; |
162 |
- char *glyphNames[256], *s; |
163 |
+ const char *glyphNames[256], *s; |
164 |
int i; |
165 |
for (r = encodingList; r != 0; r = r->next) { |
166 |
for (i = 0; i < 256; i++) { |
167 |
@@ -809,7 +809,7 @@ |
168 |
PdfObject contents, obj1, obj2; |
169 |
PdfObject metadata, pieceinfo, separationInfo; |
170 |
Object info; |
171 |
- char *key; |
172 |
+ const char *key; |
173 |
char s[256]; |
174 |
int i, l; |
175 |
int rotate; |
176 |
diff -ur texlive-20080816-source/texk/web2c/pdftexdir.orig/ptexlib.h texlive-20080816-source/texk/web2c/pdftexdir/ptexlib.h |
177 |
--- texlive-20080816-source/texk/web2c/pdftexdir.orig/ptexlib.h 2008-11-21 19:40:30.000000000 +0300 |
178 |
+++ texlive-20080816-source/texk/web2c/pdftexdir/ptexlib.h 2008-11-21 19:44:10.000000000 +0300 |
179 |
@@ -172,7 +172,7 @@ |
180 |
extern void epdf_free(void); |
181 |
|
182 |
/* mapfile.c */ |
183 |
-extern fm_entry *lookup_fontmap(char *); |
184 |
+extern fm_entry *lookup_fontmap(const char *); |
185 |
extern boolean hasfmentry(internalfontnumber); |
186 |
extern void fm_free(void); |
187 |
extern void fm_read_info(void); |
188 |
diff -ur texlive-20080816-source/texk/web2c/pdftexdir.orig/writeenc.c texlive-20080816-source/texk/web2c/pdftexdir/writeenc.c |
189 |
--- texlive-20080816-source/texk/web2c/pdftexdir.orig/writeenc.c 2008-11-21 19:40:30.000000000 +0300 |
190 |
+++ texlive-20080816-source/texk/web2c/pdftexdir/writeenc.c 2008-11-21 19:51:40.000000000 +0300 |
191 |
@@ -111,7 +111,7 @@ |
192 |
pdfenddict(); |
193 |
} |
194 |
|
195 |
-void write_enc(char **glyph_names, struct avl_table *tx_tree, integer fe_objnum) |
196 |
+void write_enc(const char **glyph_names, struct avl_table *tx_tree, integer fe_objnum) |
197 |
{ |
198 |
int i_old, *p; |
199 |
struct avl_traverser t; |
200 |
diff -ur texlive-20080816-source/libs/xpdf.orig/fofi/FoFiBase.cc texlive-20080816-source/libs/xpdf/fofi/FoFiBase.cc |
201 |
--- texlive-20080816-source/libs/xpdf.orig/fofi/FoFiBase.cc 2006-01-16 03:09:26.000000000 +0300 |
202 |
+++ texlive-20080816-source/libs/xpdf/fofi/FoFiBase.cc 2008-11-21 17:12:15.000000000 +0300 |
203 |
@@ -20,7 +20,7 @@ |
204 |
// FoFiBase |
205 |
//------------------------------------------------------------------------ |
206 |
|
207 |
-FoFiBase::FoFiBase(char *fileA, int lenA, GBool freeFileDataA) { |
208 |
+FoFiBase::FoFiBase(const char *fileA, int lenA, GBool freeFileDataA) { |
209 |
fileData = file = (Guchar *)fileA; |
210 |
len = lenA; |
211 |
freeFileData = freeFileDataA; |
212 |
@@ -32,7 +32,7 @@ |
213 |
} |
214 |
} |
215 |
|
216 |
-char *FoFiBase::readFile(char *fileName, int *fileLen) { |
217 |
+const char *FoFiBase::readFile(const char *fileName, int *fileLen) { |
218 |
FILE *f; |
219 |
char *buf; |
220 |
int n; |
221 |
diff -ur texlive-20080816-source/libs/xpdf.orig/fofi/FoFiBase.h texlive-20080816-source/libs/xpdf/fofi/FoFiBase.h |
222 |
--- texlive-20080816-source/libs/xpdf.orig/fofi/FoFiBase.h 2006-01-16 03:09:26.000000000 +0300 |
223 |
+++ texlive-20080816-source/libs/xpdf/fofi/FoFiBase.h 2008-11-21 17:11:30.000000000 +0300 |
224 |
@@ -19,7 +19,7 @@ |
225 |
|
226 |
//------------------------------------------------------------------------ |
227 |
|
228 |
-typedef void (*FoFiOutputFunc)(void *stream, char *data, int len); |
229 |
+typedef void (*FoFiOutputFunc)(void *stream, const char *data, int len); |
230 |
|
231 |
//------------------------------------------------------------------------ |
232 |
// FoFiBase |
233 |
@@ -32,8 +32,8 @@ |
234 |
|
235 |
protected: |
236 |
|
237 |
- FoFiBase(char *fileA, int lenA, GBool freeFileDataA); |
238 |
- static char *readFile(char *fileName, int *fileLen); |
239 |
+ FoFiBase(const char *fileA, int lenA, GBool freeFileDataA); |
240 |
+ static const char *readFile(const char *fileName, int *fileLen); |
241 |
|
242 |
// S = signed / U = unsigned |
243 |
// 8/16/32/Var = word length, in bytes |
244 |
diff -ur texlive-20080816-source/libs/xpdf.orig/fofi/FoFiEncodings.cc texlive-20080816-source/libs/xpdf/fofi/FoFiEncodings.cc |
245 |
--- texlive-20080816-source/libs/xpdf.orig/fofi/FoFiEncodings.cc 2006-01-16 03:09:26.000000000 +0300 |
246 |
+++ texlive-20080816-source/libs/xpdf/fofi/FoFiEncodings.cc 2008-11-21 17:57:18.000000000 +0300 |
247 |
@@ -19,7 +19,7 @@ |
248 |
// Type 1 and 1C font data |
249 |
//------------------------------------------------------------------------ |
250 |
|
251 |
-char *fofiType1StandardEncoding[256] = { |
252 |
+const char *fofiType1StandardEncoding[256] = { |
253 |
NULL, |
254 |
NULL, |
255 |
NULL, |
256 |
@@ -278,7 +278,7 @@ |
257 |
NULL |
258 |
}; |
259 |
|
260 |
-char *fofiType1ExpertEncoding[256] = { |
261 |
+const char *fofiType1ExpertEncoding[256] = { |
262 |
NULL, |
263 |
NULL, |
264 |
NULL, |
265 |
@@ -541,7 +541,7 @@ |
266 |
// Type 1C font data |
267 |
//------------------------------------------------------------------------ |
268 |
|
269 |
-char *fofiType1CStdStrings[391] = { |
270 |
+const char *fofiType1CStdStrings[391] = { |
271 |
".notdef", |
272 |
"space", |
273 |
"exclam", |
274 |
diff -ur texlive-20080816-source/libs/xpdf.orig/fofi/FoFiEncodings.h texlive-20080816-source/libs/xpdf/fofi/FoFiEncodings.h |
275 |
--- texlive-20080816-source/libs/xpdf.orig/fofi/FoFiEncodings.h 2006-01-16 03:09:26.000000000 +0300 |
276 |
+++ texlive-20080816-source/libs/xpdf/fofi/FoFiEncodings.h 2008-11-21 17:56:55.000000000 +0300 |
277 |
@@ -21,14 +21,14 @@ |
278 |
// Type 1 and 1C font data |
279 |
//------------------------------------------------------------------------ |
280 |
|
281 |
-extern char *fofiType1StandardEncoding[256]; |
282 |
-extern char *fofiType1ExpertEncoding[256]; |
283 |
+extern const char *fofiType1StandardEncoding[256]; |
284 |
+extern const char *fofiType1ExpertEncoding[256]; |
285 |
|
286 |
//------------------------------------------------------------------------ |
287 |
// Type 1C font data |
288 |
//------------------------------------------------------------------------ |
289 |
|
290 |
-extern char *fofiType1CStdStrings[391]; |
291 |
+extern const char *fofiType1CStdStrings[391]; |
292 |
extern Gushort fofiType1CISOAdobeCharset[229]; |
293 |
extern Gushort fofiType1CExpertCharset[166]; |
294 |
extern Gushort fofiType1CExpertSubsetCharset[87]; |
295 |
diff -ur texlive-20080816-source/libs/xpdf.orig/fofi/FoFiTrueType.cc texlive-20080816-source/libs/xpdf/fofi/FoFiTrueType.cc |
296 |
--- texlive-20080816-source/libs/xpdf.orig/fofi/FoFiTrueType.cc 2007-07-12 01:13:59.000000000 +0400 |
297 |
+++ texlive-20080816-source/libs/xpdf/fofi/FoFiTrueType.cc 2008-11-21 17:36:50.000000000 +0300 |
298 |
@@ -143,7 +143,7 @@ |
299 |
//------------------------------------------------------------------------ |
300 |
|
301 |
struct T42Table { |
302 |
- char *tag; // 4-byte tag |
303 |
+ const char *tag; // 4-byte tag |
304 |
GBool required; // required by the TrueType spec? |
305 |
}; |
306 |
|
307 |
@@ -173,7 +173,7 @@ |
308 |
|
309 |
// Glyph names in some arbitrary standard order that Apple uses for |
310 |
// their TrueType fonts. |
311 |
-static char *macGlyphNames[258] = { |
312 |
+static const char *macGlyphNames[258] = { |
313 |
".notdef", "null", "CR", "space", |
314 |
"exclam", "quotedbl", "numbersign", "dollar", |
315 |
"percent", "ampersand", "quotesingle", "parenleft", |
316 |
@@ -245,7 +245,7 @@ |
317 |
// FoFiTrueType |
318 |
//------------------------------------------------------------------------ |
319 |
|
320 |
-FoFiTrueType *FoFiTrueType::make(char *fileA, int lenA) { |
321 |
+FoFiTrueType *FoFiTrueType::make(const char *fileA, int lenA) { |
322 |
FoFiTrueType *ff; |
323 |
|
324 |
ff = new FoFiTrueType(fileA, lenA, gFalse); |
325 |
@@ -256,9 +256,9 @@ |
326 |
return ff; |
327 |
} |
328 |
|
329 |
-FoFiTrueType *FoFiTrueType::load(char *fileName) { |
330 |
+FoFiTrueType *FoFiTrueType::load(const char *fileName) { |
331 |
FoFiTrueType *ff; |
332 |
- char *fileA; |
333 |
+ const char *fileA; |
334 |
int lenA; |
335 |
|
336 |
if (!(fileA = FoFiBase::readFile(fileName, &lenA))) { |
337 |
@@ -272,7 +272,7 @@ |
338 |
return ff; |
339 |
} |
340 |
|
341 |
-FoFiTrueType::FoFiTrueType(char *fileA, int lenA, GBool freeFileDataA): |
342 |
+FoFiTrueType::FoFiTrueType(const char *fileA, int lenA, GBool freeFileDataA): |
343 |
FoFiBase(fileA, lenA, freeFileDataA) |
344 |
{ |
345 |
tables = NULL; |
346 |
@@ -388,7 +388,7 @@ |
347 |
return gid; |
348 |
} |
349 |
|
350 |
-int FoFiTrueType::mapNameToGID(char *name) { |
351 |
+int FoFiTrueType::mapNameToGID(const char *name) { |
352 |
if (!nameToGID) { |
353 |
return 0; |
354 |
} |
355 |
@@ -408,7 +408,7 @@ |
356 |
if (!checkRegion(tables[i].offset, tables[i].len)) { |
357 |
return NULL; |
358 |
} |
359 |
- if (!(ff = FoFiType1C::make((char *)file + tables[i].offset, |
360 |
+ if (!(ff = FoFiType1C::make((const char *)file + tables[i].offset, |
361 |
tables[i].len))) { |
362 |
return NULL; |
363 |
} |
364 |
@@ -441,7 +441,7 @@ |
365 |
return 3; |
366 |
} |
367 |
|
368 |
-void FoFiTrueType::convertToType42(char *psName, char **encoding, |
369 |
+void FoFiTrueType::convertToType42(const char *psName, const char **encoding, |
370 |
Gushort *codeToGID, |
371 |
FoFiOutputFunc outputFunc, |
372 |
void *outputStream) { |
373 |
@@ -481,7 +481,7 @@ |
374 |
(*outputFunc)(outputStream, "FontName currentdict end definefont pop\n", 40); |
375 |
} |
376 |
|
377 |
-void FoFiTrueType::convertToType1(char *psName, char **newEncoding, |
378 |
+void FoFiTrueType::convertToType1(const char *psName, const char **newEncoding, |
379 |
GBool ascii, FoFiOutputFunc outputFunc, |
380 |
void *outputStream) { |
381 |
FoFiType1C *ff; |
382 |
@@ -494,7 +494,7 @@ |
383 |
if (!checkRegion(tables[i].offset, tables[i].len)) { |
384 |
return; |
385 |
} |
386 |
- if (!(ff = FoFiType1C::make((char *)file + tables[i].offset, |
387 |
+ if (!(ff = FoFiType1C::make((const char *)file + tables[i].offset, |
388 |
tables[i].len))) { |
389 |
return; |
390 |
} |
391 |
@@ -502,7 +502,7 @@ |
392 |
delete ff; |
393 |
} |
394 |
|
395 |
-void FoFiTrueType::convertToCIDType2(char *psName, |
396 |
+void FoFiTrueType::convertToCIDType2(const char *psName, |
397 |
Gushort *cidMap, int nCIDs, |
398 |
GBool needVerticalMetrics, |
399 |
FoFiOutputFunc outputFunc, |
400 |
@@ -632,7 +632,7 @@ |
401 |
56); |
402 |
} |
403 |
|
404 |
-void FoFiTrueType::convertToCIDType0(char *psName, |
405 |
+void FoFiTrueType::convertToCIDType0(const char *psName, |
406 |
FoFiOutputFunc outputFunc, |
407 |
void *outputStream) { |
408 |
FoFiType1C *ff; |
409 |
@@ -645,7 +645,7 @@ |
410 |
if (!checkRegion(tables[i].offset, tables[i].len)) { |
411 |
return; |
412 |
} |
413 |
- if (!(ff = FoFiType1C::make((char *)file + tables[i].offset, |
414 |
+ if (!(ff = FoFiType1C::make((const char *)file + tables[i].offset, |
415 |
tables[i].len))) { |
416 |
return; |
417 |
} |
418 |
@@ -653,7 +653,7 @@ |
419 |
delete ff; |
420 |
} |
421 |
|
422 |
-void FoFiTrueType::convertToType0(char *psName, Gushort *cidMap, int nCIDs, |
423 |
+void FoFiTrueType::convertToType0(const char *psName, Gushort *cidMap, int nCIDs, |
424 |
GBool needVerticalMetrics, |
425 |
FoFiOutputFunc outputFunc, |
426 |
void *outputStream) { |
427 |
@@ -736,7 +736,7 @@ |
428 |
(*outputFunc)(outputStream, "FontName currentdict end definefont pop\n", 40); |
429 |
} |
430 |
|
431 |
-void FoFiTrueType::convertToType0(char *psName, |
432 |
+void FoFiTrueType::convertToType0(const char *psName, |
433 |
FoFiOutputFunc outputFunc, |
434 |
void *outputStream) { |
435 |
FoFiType1C *ff; |
436 |
@@ -749,7 +749,7 @@ |
437 |
if (!checkRegion(tables[i].offset, tables[i].len)) { |
438 |
return; |
439 |
} |
440 |
- if (!(ff = FoFiType1C::make((char *)file + tables[i].offset, |
441 |
+ if (!(ff = FoFiType1C::make((const char *)file + tables[i].offset, |
442 |
tables[i].len))) { |
443 |
return; |
444 |
} |
445 |
@@ -758,7 +758,7 @@ |
446 |
} |
447 |
|
448 |
void FoFiTrueType::writeTTF(FoFiOutputFunc outputFunc, |
449 |
- void *outputStream, char *name, |
450 |
+ void *outputStream, const char *name, |
451 |
Gushort *codeToGID) { |
452 |
// this substitute cmap table maps char codes 0000-ffff directly to |
453 |
// glyphs 0000-ffff |
454 |
@@ -930,7 +930,7 @@ |
455 |
if (!missingCmap && !missingName && !missingPost && !missingOS2 && |
456 |
!unsortedLoca && !badCmapLen && !abbrevHMTX && nZeroLengthTables == 0 && |
457 |
!name && !codeToGID) { |
458 |
- (*outputFunc)(outputStream, (char *)file, len); |
459 |
+ (*outputFunc)(outputStream, (const char *)file, len); |
460 |
goto done1; |
461 |
} |
462 |
|
463 |
@@ -1279,14 +1279,14 @@ |
464 |
for (i = 0; i < nNewTables; ++i) { |
465 |
if (newTables[i].tag == headTag) { |
466 |
if (checkRegion(newTables[i].origOffset, newTables[i].len)) { |
467 |
- (*outputFunc)(outputStream, (char *)file + newTables[i].origOffset, 8); |
468 |
+ (*outputFunc)(outputStream, (const char *)file + newTables[i].origOffset, 8); |
469 |
checksumBuf[0] = fileChecksum >> 24; |
470 |
checksumBuf[1] = fileChecksum >> 16; |
471 |
checksumBuf[2] = fileChecksum >> 8; |
472 |
checksumBuf[3] = fileChecksum; |
473 |
(*outputFunc)(outputStream, checksumBuf, 4); |
474 |
(*outputFunc)(outputStream, |
475 |
- (char *)file + newTables[i].origOffset + 12, |
476 |
+ (const char *)file + newTables[i].origOffset + 12, |
477 |
newTables[i].len - 12); |
478 |
} else { |
479 |
for (j = 0; j < newTables[i].len; ++j) { |
480 |
@@ -1330,7 +1330,7 @@ |
481 |
if (n > 0) { |
482 |
k = locaTable[j].origOffset; |
483 |
if (checkRegion(pos + k, n)) { |
484 |
- (*outputFunc)(outputStream, (char *)file + pos + k, n); |
485 |
+ (*outputFunc)(outputStream, (const char *)file + pos + k, n); |
486 |
} else { |
487 |
for (k = 0; k < n; ++k) { |
488 |
(*outputFunc)(outputStream, "\0", 1); |
489 |
@@ -1343,7 +1343,7 @@ |
490 |
} |
491 |
} else { |
492 |
if (checkRegion(newTables[i].origOffset, newTables[i].len)) { |
493 |
- (*outputFunc)(outputStream, (char *)file + newTables[i].origOffset, |
494 |
+ (*outputFunc)(outputStream, (const char *)file + newTables[i].origOffset, |
495 |
newTables[i].len); |
496 |
} else { |
497 |
for (j = 0; j < newTables[i].len; ++j) { |
498 |
@@ -1366,10 +1366,10 @@ |
499 |
gfree(locaTable); |
500 |
} |
501 |
|
502 |
-void FoFiTrueType::cvtEncoding(char **encoding, |
503 |
+void FoFiTrueType::cvtEncoding(const char **encoding, |
504 |
FoFiOutputFunc outputFunc, |
505 |
void *outputStream) { |
506 |
- char *name; |
507 |
+ const char *name; |
508 |
GString *buf; |
509 |
int i; |
510 |
|
511 |
@@ -1395,11 +1395,11 @@ |
512 |
(*outputFunc)(outputStream, "readonly def\n", 13); |
513 |
} |
514 |
|
515 |
-void FoFiTrueType::cvtCharStrings(char **encoding, |
516 |
+void FoFiTrueType::cvtCharStrings(const char **encoding, |
517 |
Gushort *codeToGID, |
518 |
FoFiOutputFunc outputFunc, |
519 |
void *outputStream) { |
520 |
- char *name; |
521 |
+ const char *name; |
522 |
GString *buf; |
523 |
char buf2[16]; |
524 |
int i, k; |
525 |
@@ -1980,7 +1980,7 @@ |
526 |
if (!ok || !checkRegion(stringPos + 1, m)) { |
527 |
goto err; |
528 |
} |
529 |
- name = new GString((char *)&file[stringPos + 1], m); |
530 |
+ name = new GString((const char *)&file[stringPos + 1], m); |
531 |
nameToGID->removeInt(name); |
532 |
nameToGID->add(name, i); |
533 |
++stringIdx; |
534 |
@@ -2010,7 +2010,7 @@ |
535 |
} |
536 |
} |
537 |
|
538 |
-int FoFiTrueType::seekTable(char *tag) { |
539 |
+int FoFiTrueType::seekTable(const char *tag) { |
540 |
Guint tagI; |
541 |
int i; |
542 |
|
543 |
diff -ur texlive-20080816-source/libs/xpdf.orig/fofi/FoFiTrueType.h texlive-20080816-source/libs/xpdf/fofi/FoFiTrueType.h |
544 |
--- texlive-20080816-source/libs/xpdf.orig/fofi/FoFiTrueType.h 2007-07-12 01:13:59.000000000 +0400 |
545 |
+++ texlive-20080816-source/libs/xpdf/fofi/FoFiTrueType.h 2008-11-21 17:33:33.000000000 +0300 |
546 |
@@ -31,10 +31,10 @@ |
547 |
public: |
548 |
|
549 |
// Create a FoFiTrueType object from a memory buffer. |
550 |
- static FoFiTrueType *make(char *fileA, int lenA); |
551 |
+ static FoFiTrueType *make(const char *fileA, int lenA); |
552 |
|
553 |
// Create a FoFiTrueType object from a file on disk. |
554 |
- static FoFiTrueType *load(char *fileName); |
555 |
+ static FoFiTrueType *load(const char *fileName); |
556 |
|
557 |
virtual ~FoFiTrueType(); |
558 |
|
559 |
@@ -61,7 +61,7 @@ |
560 |
// Returns the GID corresponding to <name> according to the post |
561 |
// table. Returns 0 if there is no mapping for <name> or if the |
562 |
// font does not have a post table. |
563 |
- int mapNameToGID(char *name); |
564 |
+ int mapNameToGID(const char *name); |
565 |
|
566 |
// Return the mapping from CIDs to GIDs, and return the number of |
567 |
// CIDs in *<nCIDs>. This is only useful for CID fonts. (Only |
568 |
@@ -84,7 +84,7 @@ |
569 |
// If <encoding> is NULL, the encoding is unknown or undefined. The |
570 |
// <codeToGID> array specifies the mapping from char codes to GIDs. |
571 |
// (Not useful for OpenType CFF fonts.) |
572 |
- void convertToType42(char *psName, char **encoding, |
573 |
+ void convertToType42(const char *psName, const char **encoding, |
574 |
Gushort *codeToGID, |
575 |
FoFiOutputFunc outputFunc, void *outputStream); |
576 |
|
577 |
@@ -95,7 +95,7 @@ |
578 |
// otherwise it will be left as binary data. If <psName> is |
579 |
// non-NULL, it will be used as the PostScript font name. (Only |
580 |
// useful for OpenType CFF fonts.) |
581 |
- void convertToType1(char *psName, char **newEncoding, GBool ascii, |
582 |
+ void convertToType1(const char *psName, const char **newEncoding, GBool ascii, |
583 |
FoFiOutputFunc outputFunc, void *outputStream); |
584 |
|
585 |
// Convert to a Type 2 CIDFont, suitable for embedding in a |
586 |
@@ -103,14 +103,14 @@ |
587 |
// name (so we don't need to depend on the 'name' table in the |
588 |
// font). The <cidMap> array maps CIDs to GIDs; it has <nCIDs> |
589 |
// entries. (Not useful for OpenType CFF fonts.) |
590 |
- void convertToCIDType2(char *psName, Gushort *cidMap, int nCIDs, |
591 |
+ void convertToCIDType2(const char *psName, Gushort *cidMap, int nCIDs, |
592 |
GBool needVerticalMetrics, |
593 |
FoFiOutputFunc outputFunc, void *outputStream); |
594 |
|
595 |
// Convert to a Type 0 CIDFont, suitable for embedding in a |
596 |
// PostScript file. <psName> will be used as the PostScript font |
597 |
// name. (Only useful for OpenType CFF fonts.) |
598 |
- void convertToCIDType0(char *psName, |
599 |
+ void convertToCIDType0(const char *psName, |
600 |
FoFiOutputFunc outputFunc, void *outputStream); |
601 |
|
602 |
// Convert to a Type 0 (but non-CID) composite font, suitable for |
603 |
@@ -118,14 +118,14 @@ |
604 |
// PostScript font name (so we don't need to depend on the 'name' |
605 |
// table in the font). The <cidMap> array maps CIDs to GIDs; it has |
606 |
// <nCIDs> entries. (Not useful for OpenType CFF fonts.) |
607 |
- void convertToType0(char *psName, Gushort *cidMap, int nCIDs, |
608 |
+ void convertToType0(const char *psName, Gushort *cidMap, int nCIDs, |
609 |
GBool needVerticalMetrics, |
610 |
FoFiOutputFunc outputFunc, void *outputStream); |
611 |
|
612 |
// Convert to a Type 0 (but non-CID) composite font, suitable for |
613 |
// embedding in a PostScript file. <psName> will be used as the |
614 |
// PostScript font name. (Only useful for OpenType CFF fonts.) |
615 |
- void convertToType0(char *psName, |
616 |
+ void convertToType0(const char *psName, |
617 |
FoFiOutputFunc outputFunc, void *outputStream); |
618 |
|
619 |
// Write a clean TTF file, filling in missing tables and correcting |
620 |
@@ -135,15 +135,15 @@ |
621 |
// complete and correct, it will be written unmodified. (Not useful |
622 |
// for OpenType CFF fonts.) |
623 |
void writeTTF(FoFiOutputFunc outputFunc, void *outputStream, |
624 |
- char *name = NULL, Gushort *codeToGID = NULL); |
625 |
+ const char *name = NULL, Gushort *codeToGID = NULL); |
626 |
|
627 |
private: |
628 |
|
629 |
- FoFiTrueType(char *fileA, int lenA, GBool freeFileDataA); |
630 |
- void cvtEncoding(char **encoding, |
631 |
+ FoFiTrueType(const char *fileA, int lenA, GBool freeFileDataA); |
632 |
+ void cvtEncoding(const char **encoding, |
633 |
FoFiOutputFunc outputFunc, |
634 |
void *outputStream); |
635 |
- void cvtCharStrings(char **encoding, |
636 |
+ void cvtCharStrings(const char **encoding, |
637 |
Gushort *codeToGID, |
638 |
FoFiOutputFunc outputFunc, |
639 |
void *outputStream); |
640 |
@@ -156,7 +156,7 @@ |
641 |
Guint computeTableChecksum(Guchar *data, int length); |
642 |
void parse(); |
643 |
void readPostTable(); |
644 |
- int seekTable(char *tag); |
645 |
+ int seekTable(const char *tag); |
646 |
|
647 |
TrueTypeTable *tables; |
648 |
int nTables; |
649 |
diff -ur texlive-20080816-source/libs/xpdf.orig/fofi/FoFiType1.cc texlive-20080816-source/libs/xpdf/fofi/FoFiType1.cc |
650 |
--- texlive-20080816-source/libs/xpdf.orig/fofi/FoFiType1.cc 2007-07-12 01:13:59.000000000 +0400 |
651 |
+++ texlive-20080816-source/libs/xpdf/fofi/FoFiType1.cc 2008-11-21 18:08:22.000000000 +0300 |
652 |
@@ -22,12 +22,12 @@ |
653 |
// FoFiType1 |
654 |
//------------------------------------------------------------------------ |
655 |
|
656 |
-FoFiType1 *FoFiType1::make(char *fileA, int lenA) { |
657 |
+FoFiType1 *FoFiType1::make(const char *fileA, int lenA) { |
658 |
return new FoFiType1(fileA, lenA, gFalse); |
659 |
} |
660 |
|
661 |
-FoFiType1 *FoFiType1::load(char *fileName) { |
662 |
- char *fileA; |
663 |
+FoFiType1 *FoFiType1::load(const char *fileName) { |
664 |
+ const char *fileA; |
665 |
int lenA; |
666 |
|
667 |
if (!(fileA = FoFiBase::readFile(fileName, &lenA))) { |
668 |
@@ -36,7 +36,7 @@ |
669 |
return new FoFiType1(fileA, lenA, gTrue); |
670 |
} |
671 |
|
672 |
-FoFiType1::FoFiType1(char *fileA, int lenA, GBool freeFileDataA): |
673 |
+FoFiType1::FoFiType1(const char *fileA, int lenA, GBool freeFileDataA): |
674 |
FoFiBase(fileA, lenA, freeFileDataA) |
675 |
{ |
676 |
name = NULL; |
677 |
@@ -48,46 +48,46 @@ |
678 |
int i; |
679 |
|
680 |
if (name) { |
681 |
- gfree(name); |
682 |
+ gfree(const_cast<char*>(name)); |
683 |
} |
684 |
if (encoding && encoding != fofiType1StandardEncoding) { |
685 |
for (i = 0; i < 256; ++i) { |
686 |
- gfree(encoding[i]); |
687 |
+ gfree(const_cast<char*>(encoding[i])); |
688 |
} |
689 |
gfree(encoding); |
690 |
} |
691 |
} |
692 |
|
693 |
-char *FoFiType1::getName() { |
694 |
+const char *FoFiType1::getName() { |
695 |
if (!parsed) { |
696 |
parse(); |
697 |
} |
698 |
return name; |
699 |
} |
700 |
|
701 |
-char **FoFiType1::getEncoding() { |
702 |
+const char **FoFiType1::getEncoding() { |
703 |
if (!parsed) { |
704 |
parse(); |
705 |
} |
706 |
return encoding; |
707 |
} |
708 |
|
709 |
-void FoFiType1::writeEncoded(char **newEncoding, |
710 |
+void FoFiType1::writeEncoded(const char **newEncoding, |
711 |
FoFiOutputFunc outputFunc, void *outputStream) { |
712 |
char buf[512]; |
713 |
- char *line, *line2, *p; |
714 |
+ const char *line, *line2, *p; |
715 |
int i; |
716 |
|
717 |
// copy everything up to the encoding |
718 |
- for (line = (char *)file; |
719 |
+ for (line = (const char *)file; |
720 |
line && strncmp(line, "/Encoding", 9); |
721 |
line = getNextLine(line)) ; |
722 |
if (!line) { |
723 |
// no encoding - just copy the whole font file |
724 |
- (*outputFunc)(outputStream, (char *)file, len); |
725 |
+ (*outputFunc)(outputStream, (const char *)file, len); |
726 |
return; |
727 |
} |
728 |
- (*outputFunc)(outputStream, (char *)file, line - (char *)file); |
729 |
+ (*outputFunc)(outputStream, (const char *)file, line - (const char *)file); |
730 |
|
731 |
// write the new encoding |
732 |
(*outputFunc)(outputStream, "/Encoding 256 array\n", 20); |
733 |
@@ -150,12 +150,12 @@ |
734 |
|
735 |
// copy everything after the encoding |
736 |
if (line) { |
737 |
- (*outputFunc)(outputStream, line, ((char *)file + len) - line); |
738 |
+ (*outputFunc)(outputStream, line, ((const char *)file + len) - line); |
739 |
} |
740 |
} |
741 |
} |
742 |
|
743 |
-char *FoFiType1::getNextLine(char *line) { |
744 |
+const char *FoFiType1::getNextLine(const char *line) { |
745 |
while (line < (char *)file + len && *line != '\x0a' && *line != '\x0d') { |
746 |
++line; |
747 |
} |
748 |
@@ -172,7 +172,8 @@ |
749 |
} |
750 |
|
751 |
void FoFiType1::parse() { |
752 |
- char *line, *line1, *p, *p2; |
753 |
+ const char *line, *line1; |
754 |
+ char *p, *p2; |
755 |
char buf[256]; |
756 |
char c; |
757 |
int n, code, i, j; |
758 |
@@ -197,7 +198,7 @@ |
759 |
encoding = fofiType1StandardEncoding; |
760 |
} else if (!encoding && |
761 |
!strncmp(line, "/Encoding 256 array", 19)) { |
762 |
- encoding = (char **)gmallocn(256, sizeof(char *)); |
763 |
+ encoding = (const char **)gmallocn(256, sizeof(char *)); |
764 |
for (j = 0; j < 256; ++j) { |
765 |
encoding[j] = NULL; |
766 |
} |
767 |
diff -ur texlive-20080816-source/libs/xpdf.orig/fofi/FoFiType1C.cc texlive-20080816-source/libs/xpdf/fofi/FoFiType1C.cc |
768 |
--- texlive-20080816-source/libs/xpdf.orig/fofi/FoFiType1C.cc 2007-07-12 01:13:59.000000000 +0400 |
769 |
+++ texlive-20080816-source/libs/xpdf/fofi/FoFiType1C.cc 2008-11-21 18:10:14.000000000 +0300 |
770 |
@@ -28,7 +28,7 @@ |
771 |
// FoFiType1C |
772 |
//------------------------------------------------------------------------ |
773 |
|
774 |
-FoFiType1C *FoFiType1C::make(char *fileA, int lenA) { |
775 |
+FoFiType1C *FoFiType1C::make(const char *fileA, int lenA) { |
776 |
FoFiType1C *ff; |
777 |
|
778 |
ff = new FoFiType1C(fileA, lenA, gFalse); |
779 |
@@ -39,9 +39,9 @@ |
780 |
return ff; |
781 |
} |
782 |
|
783 |
-FoFiType1C *FoFiType1C::load(char *fileName) { |
784 |
+FoFiType1C *FoFiType1C::load(const char *fileName) { |
785 |
FoFiType1C *ff; |
786 |
- char *fileA; |
787 |
+ const char *fileA; |
788 |
int lenA; |
789 |
|
790 |
if (!(fileA = FoFiBase::readFile(fileName, &lenA))) { |
791 |
@@ -55,7 +55,7 @@ |
792 |
return ff; |
793 |
} |
794 |
|
795 |
-FoFiType1C::FoFiType1C(char *fileA, int lenA, GBool freeFileDataA): |
796 |
+FoFiType1C::FoFiType1C(const char *fileA, int lenA, GBool freeFileDataA): |
797 |
FoFiBase(fileA, lenA, freeFileDataA) |
798 |
{ |
799 |
name = NULL; |
800 |
@@ -75,7 +75,7 @@ |
801 |
encoding != fofiType1StandardEncoding && |
802 |
encoding != fofiType1ExpertEncoding) { |
803 |
for (i = 0; i < 256; ++i) { |
804 |
- gfree(encoding[i]); |
805 |
+ gfree(const_cast<char*>(encoding[i])); |
806 |
} |
807 |
gfree(encoding); |
808 |
} |
809 |
@@ -93,11 +93,11 @@ |
810 |
} |
811 |
} |
812 |
|
813 |
-char *FoFiType1C::getName() { |
814 |
- return name ? name->getCString() : (char *)NULL; |
815 |
+const char *FoFiType1C::getName() { |
816 |
+ return name ? name->getCString() : (const char *)NULL; |
817 |
} |
818 |
|
819 |
-char **FoFiType1C::getEncoding() { |
820 |
+const char **FoFiType1C::getEncoding() { |
821 |
return encoding; |
822 |
} |
823 |
|
824 |
@@ -129,7 +129,7 @@ |
825 |
return map; |
826 |
} |
827 |
|
828 |
-void FoFiType1C::convertToType1(char *psName, char **newEncoding, GBool ascii, |
829 |
+void FoFiType1C::convertToType1(const char *psName, const char **newEncoding, GBool ascii, |
830 |
FoFiOutputFunc outputFunc, |
831 |
void *outputStream) { |
832 |
int psNameLen; |
833 |
@@ -138,7 +138,7 @@ |
834 |
Type1CIndexVal val; |
835 |
GString *buf; |
836 |
char buf2[256]; |
837 |
- char **enc; |
838 |
+ const char **enc; |
839 |
GBool ok; |
840 |
int i; |
841 |
|
842 |
@@ -429,7 +429,7 @@ |
843 |
(*outputFunc)(outputStream, "cleartomark\n", 12); |
844 |
} |
845 |
|
846 |
-void FoFiType1C::convertToCIDType0(char *psName, |
847 |
+void FoFiType1C::convertToCIDType0(const char *psName, |
848 |
FoFiOutputFunc outputFunc, |
849 |
void *outputStream) { |
850 |
int *cidMap; |
851 |
@@ -755,7 +755,7 @@ |
852 |
gfree(cidMap); |
853 |
} |
854 |
|
855 |
-void FoFiType1C::convertToType0(char *psName, |
856 |
+void FoFiType1C::convertToType0(const char *psName, |
857 |
FoFiOutputFunc outputFunc, |
858 |
void *outputStream) { |
859 |
int *cidMap; |
860 |
@@ -1066,7 +1066,7 @@ |
861 |
gfree(cidMap); |
862 |
} |
863 |
|
864 |
-void FoFiType1C::eexecCvtGlyph(Type1CEexecBuf *eb, char *glyphName, |
865 |
+void FoFiType1C::eexecCvtGlyph(Type1CEexecBuf *eb, const char *glyphName, |
866 |
int offset, int nBytes, |
867 |
Type1CIndex *subrIdx, |
868 |
Type1CPrivateDict *pDict) { |
869 |
@@ -1789,10 +1789,10 @@ |
870 |
n = 5; |
871 |
} |
872 |
} |
873 |
- charBuf->append((char *)buf, n); |
874 |
+ charBuf->append((const char *)buf, n); |
875 |
} |
876 |
|
877 |
-void FoFiType1C::eexecWrite(Type1CEexecBuf *eb, char *s) { |
878 |
+void FoFiType1C::eexecWrite(Type1CEexecBuf *eb, const char *s) { |
879 |
Guchar *p; |
880 |
Guchar x; |
881 |
|
882 |
@@ -1808,7 +1808,7 @@ |
883 |
eb->line = 0; |
884 |
} |
885 |
} else { |
886 |
- (*eb->outputFunc)(eb->outputStream, (char *)&x, 1); |
887 |
+ (*eb->outputFunc)(eb->outputStream, (const char *)&x, 1); |
888 |
} |
889 |
} |
890 |
} |
891 |
@@ -1831,7 +1831,7 @@ |
892 |
eb->line = 0; |
893 |
} |
894 |
} else { |
895 |
- (*eb->outputFunc)(eb->outputStream, (char *)&x, 1); |
896 |
+ (*eb->outputFunc)(eb->outputStream, (const char *)&x, 1); |
897 |
} |
898 |
} |
899 |
} |
900 |
@@ -1866,7 +1866,7 @@ |
901 |
if (!parsedOk) { |
902 |
return gFalse; |
903 |
} |
904 |
- name = new GString((char *)&file[val.pos], val.len); |
905 |
+ name = new GString((const char *)&file[val.pos], val.len); |
906 |
|
907 |
// read the top dict for the first font |
908 |
readTopDict(); |
909 |
@@ -2267,7 +2267,7 @@ |
910 |
encoding = fofiType1ExpertEncoding; |
911 |
|
912 |
} else { |
913 |
- encoding = (char **)gmallocn(256, sizeof(char *)); |
914 |
+ encoding = (const char **)gmallocn(256, sizeof(char *)); |
915 |
for (i = 0; i < 256; ++i) { |
916 |
encoding[i] = NULL; |
917 |
} |
918 |
@@ -2290,7 +2290,7 @@ |
919 |
return; |
920 |
} |
921 |
if (encoding[c]) { |
922 |
- gfree(encoding[c]); |
923 |
+ gfree(const_cast<char*>(encoding[c])); |
924 |
} |
925 |
encoding[c] = copyString(getString(charset[i], buf, &parsedOk)); |
926 |
} |
927 |
@@ -2309,7 +2309,7 @@ |
928 |
for (j = 0; j <= nLeft && nCodes < nGlyphs; ++j) { |
929 |
if (c < 256) { |
930 |
if (encoding[c]) { |
931 |
- gfree(encoding[c]); |
932 |
+ gfree(const_cast<char*>(encoding[c])); |
933 |
} |
934 |
encoding[c] = copyString(getString(charset[nCodes], buf, |
935 |
&parsedOk)); |
936 |
@@ -2335,7 +2335,7 @@ |
937 |
return; |
938 |
} |
939 |
if (encoding[c]) { |
940 |
- gfree(encoding[c]); |
941 |
+ gfree(const_cast<char*>(encoding[c])); |
942 |
} |
943 |
encoding[c] = copyString(getString(sid, buf, &parsedOk)); |
944 |
} |
945 |
@@ -2593,7 +2593,7 @@ |
946 |
if ((n = val.len) > 255) { |
947 |
n = 255; |
948 |
} |
949 |
- strncpy(buf, (char *)&file[val.pos], n); |
950 |
+ strncpy(buf, (const char *)&file[val.pos], n); |
951 |
buf[n] = '\0'; |
952 |
} else { |
953 |
buf[0] = '\0'; |
954 |
diff -ur texlive-20080816-source/libs/xpdf.orig/fofi/FoFiType1C.h texlive-20080816-source/libs/xpdf/fofi/FoFiType1C.h |
955 |
--- texlive-20080816-source/libs/xpdf.orig/fofi/FoFiType1C.h 2007-07-12 01:13:59.000000000 +0400 |
956 |
+++ texlive-20080816-source/libs/xpdf/fofi/FoFiType1C.h 2008-11-21 18:10:41.000000000 +0300 |
957 |
@@ -135,19 +135,19 @@ |
958 |
public: |
959 |
|
960 |
// Create a FoFiType1C object from a memory buffer. |
961 |
- static FoFiType1C *make(char *fileA, int lenA); |
962 |
+ static FoFiType1C *make(const char *fileA, int lenA); |
963 |
|
964 |
// Create a FoFiType1C object from a file on disk. |
965 |
- static FoFiType1C *load(char *fileName); |
966 |
+ static FoFiType1C *load(const char *fileName); |
967 |
|
968 |
virtual ~FoFiType1C(); |
969 |
|
970 |
// Return the font name. |
971 |
- char *getName(); |
972 |
+ const char *getName(); |
973 |
|
974 |
// Return the encoding, as an array of 256 names (any of which may |
975 |
// be NULL). This is only useful with 8-bit fonts. |
976 |
- char **getEncoding(); |
977 |
+ const char **getEncoding(); |
978 |
|
979 |
// Return the mapping from CIDs to GIDs, and return the number of |
980 |
// CIDs in *<nCIDs>. This is only useful for CID fonts. |
981 |
@@ -159,25 +159,25 @@ |
982 |
// font. If <ascii> is true the eexec section will be hex-encoded, |
983 |
// otherwise it will be left as binary data. If <psName> is non-NULL, |
984 |
// it will be used as the PostScript font name. |
985 |
- void convertToType1(char *psName, char **newEncoding, GBool ascii, |
986 |
+ void convertToType1(const char *psName, const char **newEncoding, GBool ascii, |
987 |
FoFiOutputFunc outputFunc, void *outputStream); |
988 |
|
989 |
// Convert to a Type 0 CIDFont, suitable for embedding in a |
990 |
// PostScript file. <psName> will be used as the PostScript font |
991 |
// name. |
992 |
- void convertToCIDType0(char *psName, |
993 |
+ void convertToCIDType0(const char *psName, |
994 |
FoFiOutputFunc outputFunc, void *outputStream); |
995 |
|
996 |
// Convert to a Type 0 (but non-CID) composite font, suitable for |
997 |
// embedding in a PostScript file. <psName> will be used as the |
998 |
// PostScript font name. |
999 |
- void convertToType0(char *psName, |
1000 |
+ void convertToType0(const char *psName, |
1001 |
FoFiOutputFunc outputFunc, void *outputStream); |
1002 |
|
1003 |
private: |
1004 |
|
1005 |
- FoFiType1C(char *fileA, int lenA, GBool freeFileDataA); |
1006 |
- void eexecCvtGlyph(Type1CEexecBuf *eb, char *glyphName, |
1007 |
+ FoFiType1C(const char *fileA, int lenA, GBool freeFileDataA); |
1008 |
+ void eexecCvtGlyph(Type1CEexecBuf *eb, const char *glyphName, |
1009 |
int offset, int nBytes, |
1010 |
Type1CIndex *subrIdx, |
1011 |
Type1CPrivateDict *pDict); |
1012 |
@@ -187,7 +187,7 @@ |
1013 |
void cvtGlyphWidth(GBool useOp, GString *charBuf, |
1014 |
Type1CPrivateDict *pDict); |
1015 |
void cvtNum(double x, GBool isFP, GString *charBuf); |
1016 |
- void eexecWrite(Type1CEexecBuf *eb, char *s); |
1017 |
+ void eexecWrite(Type1CEexecBuf *eb, const char *s); |
1018 |
void eexecWriteCharstring(Type1CEexecBuf *eb, Guchar *s, int n); |
1019 |
GBool parse(); |
1020 |
void readTopDict(); |
1021 |
@@ -204,7 +204,7 @@ |
1022 |
char *getString(int sid, char *buf, GBool *ok); |
1023 |
|
1024 |
GString *name; |
1025 |
- char **encoding; |
1026 |
+ const char **encoding; |
1027 |
|
1028 |
Type1CIndex nameIdx; |
1029 |
Type1CIndex topDictIdx; |
1030 |
diff -ur texlive-20080816-source/libs/xpdf.orig/fofi/FoFiType1.h texlive-20080816-source/libs/xpdf/fofi/FoFiType1.h |
1031 |
--- texlive-20080816-source/libs/xpdf.orig/fofi/FoFiType1.h 2006-01-16 03:09:26.000000000 +0300 |
1032 |
+++ texlive-20080816-source/libs/xpdf/fofi/FoFiType1.h 2008-11-21 17:01:07.000000000 +0300 |
1033 |
@@ -26,33 +26,33 @@ |
1034 |
public: |
1035 |
|
1036 |
// Create a FoFiType1 object from a memory buffer. |
1037 |
- static FoFiType1 *make(char *fileA, int lenA); |
1038 |
+ static FoFiType1 *make(const char *fileA, int lenA); |
1039 |
|
1040 |
// Create a FoFiType1 object from a file on disk. |
1041 |
- static FoFiType1 *load(char *fileName); |
1042 |
+ static FoFiType1 *load(const char *fileName); |
1043 |
|
1044 |
virtual ~FoFiType1(); |
1045 |
|
1046 |
// Return the font name. |
1047 |
- char *getName(); |
1048 |
+ const char *getName(); |
1049 |
|
1050 |
// Return the encoding, as an array of 256 names (any of which may |
1051 |
// be NULL). |
1052 |
- char **getEncoding(); |
1053 |
+ const char **getEncoding(); |
1054 |
|
1055 |
// Write a version of the Type 1 font file with a new encoding. |
1056 |
- void writeEncoded(char **newEncoding, |
1057 |
+ void writeEncoded(const char **newEncoding, |
1058 |
FoFiOutputFunc outputFunc, void *outputStream); |
1059 |
|
1060 |
private: |
1061 |
|
1062 |
- FoFiType1(char *fileA, int lenA, GBool freeFileDataA); |
1063 |
+ FoFiType1(const char *fileA, int lenA, GBool freeFileDataA); |
1064 |
|
1065 |
- char *getNextLine(char *line); |
1066 |
+ const char *getNextLine(const char *line); |
1067 |
void parse(); |
1068 |
|
1069 |
- char *name; |
1070 |
- char **encoding; |
1071 |
+ const char *name; |
1072 |
+ const char **encoding; |
1073 |
GBool parsed; |
1074 |
}; |
1075 |
|
1076 |
diff -ur texlive-20080816-source/libs/xpdf.orig/goo/gfile.cc texlive-20080816-source/libs/xpdf/goo/gfile.cc |
1077 |
--- texlive-20080816-source/libs/xpdf.orig/goo/gfile.cc 2008-05-08 17:40:41.000000000 +0400 |
1078 |
+++ texlive-20080816-source/libs/xpdf/goo/gfile.cc 2008-11-21 16:55:23.000000000 +0300 |
1079 |
@@ -83,7 +83,7 @@ |
1080 |
|
1081 |
#elif defined(__EMX__) || defined(WIN32) |
1082 |
//---------- OS/2+EMX and Win32 ---------- |
1083 |
- char *s; |
1084 |
+ const char *s; |
1085 |
GString *ret; |
1086 |
|
1087 |
if ((s = getenv("HOME"))) |
1088 |
@@ -102,7 +102,7 @@ |
1089 |
|
1090 |
#else |
1091 |
//---------- Unix ---------- |
1092 |
- char *s; |
1093 |
+ const char *s; |
1094 |
struct passwd *pw; |
1095 |
GString *ret; |
1096 |
|
1097 |
@@ -140,7 +140,7 @@ |
1098 |
return new GString(); |
1099 |
} |
1100 |
|
1101 |
-GString *appendToPath(GString *path, char *fileName) { |
1102 |
+GString *appendToPath(GString *path, const char *fileName) { |
1103 |
#if defined(VMS) |
1104 |
//---------- VMS ---------- |
1105 |
//~ this should handle everything necessary for file |
1106 |
@@ -306,7 +306,7 @@ |
1107 |
#endif |
1108 |
} |
1109 |
|
1110 |
-GString *grabPath(char *fileName) { |
1111 |
+GString *grabPath(const char *fileName) { |
1112 |
#ifdef VMS |
1113 |
//---------- VMS ---------- |
1114 |
char *p; |
1115 |
@@ -355,7 +355,7 @@ |
1116 |
#endif |
1117 |
} |
1118 |
|
1119 |
-GBool isAbsolutePath(char *path) { |
1120 |
+GBool isAbsolutePath(const char *path) { |
1121 |
#ifdef VMS |
1122 |
//---------- VMS ---------- |
1123 |
return strchr(path, ':') || |
1124 |
@@ -461,7 +461,7 @@ |
1125 |
#endif |
1126 |
} |
1127 |
|
1128 |
-time_t getModTime(char *fileName) { |
1129 |
+time_t getModTime(const char *fileName) { |
1130 |
#ifdef WIN32 |
1131 |
//~ should implement this, but it's (currently) only used in xpdf |
1132 |
return 0; |
1133 |
@@ -476,10 +476,10 @@ |
1134 |
} |
1135 |
|
1136 |
#ifndef PDF_PARSER_ONLY |
1137 |
-GBool openTempFile(GString **name, FILE **f, char *mode, char *ext) { |
1138 |
+GBool openTempFile(GString **name, FILE **f, const char *mode, const char *ext) { |
1139 |
#if defined(WIN32) |
1140 |
//---------- Win32 ---------- |
1141 |
- char *tempDir; |
1142 |
+ const char *tempDir; |
1143 |
GString *s, *s2; |
1144 |
char buf[32]; |
1145 |
FILE *f2; |
1146 |
@@ -586,7 +586,7 @@ |
1147 |
} |
1148 |
#endif |
1149 |
|
1150 |
-GBool executeCommand(char *cmd) { |
1151 |
+GBool executeCommand(const char *cmd) { |
1152 |
#ifdef VMS |
1153 |
return system(cmd) ? gTrue : gFalse; |
1154 |
#else |
1155 |
@@ -627,7 +627,7 @@ |
1156 |
// GDir and GDirEntry |
1157 |
//------------------------------------------------------------------------ |
1158 |
|
1159 |
-GDirEntry::GDirEntry(char *dirPath, char *nameA, GBool doStat) { |
1160 |
+GDirEntry::GDirEntry(const char *dirPath, const char *nameA, GBool doStat) { |
1161 |
#ifdef VMS |
1162 |
char *p; |
1163 |
#elif defined(WIN32) |
1164 |
@@ -666,7 +666,7 @@ |
1165 |
delete name; |
1166 |
} |
1167 |
|
1168 |
-GDir::GDir(char *name, GBool doStatA) { |
1169 |
+GDir::GDir(const char *name, GBool doStatA) { |
1170 |
path = new GString(name); |
1171 |
doStat = doStatA; |
1172 |
#if defined(WIN32) |
1173 |
diff -ur texlive-20080816-source/libs/xpdf.orig/goo/gfile.h texlive-20080816-source/libs/xpdf/goo/gfile.h |
1174 |
--- texlive-20080816-source/libs/xpdf.orig/goo/gfile.h 2007-07-12 01:13:59.000000000 +0400 |
1175 |
+++ texlive-20080816-source/libs/xpdf/goo/gfile.h 2008-11-21 16:54:13.000000000 +0300 |
1176 |
@@ -60,14 +60,14 @@ |
1177 |
|
1178 |
// Append a file name to a path string. <path> may be an empty |
1179 |
// string, denoting the current directory). Returns <path>. |
1180 |
-extern GString *appendToPath(GString *path, char *fileName); |
1181 |
+extern GString *appendToPath(GString *path, const char *fileName); |
1182 |
|
1183 |
// Grab the path from the front of the file name. If there is no |
1184 |
// directory component in <fileName>, returns an empty string. |
1185 |
-extern GString *grabPath(char *fileName); |
1186 |
+extern GString *grabPath(const char *fileName); |
1187 |
|
1188 |
// Is this an absolute path or file name? |
1189 |
-extern GBool isAbsolutePath(char *path); |
1190 |
+extern GBool isAbsolutePath(const char *path); |
1191 |
|
1192 |
// Make this path absolute by prepending current directory (if path is |
1193 |
// relative) or prepending user's directory (if path starts with '~'). |
1194 |
@@ -75,7 +75,7 @@ |
1195 |
|
1196 |
// Get the modification time for <fileName>. Returns 0 if there is an |
1197 |
// error. |
1198 |
-extern time_t getModTime(char *fileName); |
1199 |
+extern time_t getModTime(const char *fileName); |
1200 |
|
1201 |
// Create a temporary file and open it for writing. If <ext> is not |
1202 |
// NULL, it will be used as the file name extension. Returns both the |
1203 |
@@ -83,10 +83,10 @@ |
1204 |
// should be done to the returned file pointer; the file may be |
1205 |
// reopened later for reading, but not for writing. The <mode> string |
1206 |
// should be "w" or "wb". Returns true on success. |
1207 |
-extern GBool openTempFile(GString **name, FILE **f, char *mode, char *ext); |
1208 |
+extern GBool openTempFile(GString **name, FILE **f, const char *mode, const char *ext); |
1209 |
|
1210 |
// Execute <command>. Returns true on success. |
1211 |
-extern GBool executeCommand(char *cmd); |
1212 |
+extern GBool executeCommand(const char *cmd); |
1213 |
|
1214 |
// Just like fgets, but handles Unix, Mac, and/or DOS end-of-line |
1215 |
// conventions. |
1216 |
@@ -99,7 +99,7 @@ |
1217 |
class GDirEntry { |
1218 |
public: |
1219 |
|
1220 |
- GDirEntry(char *dirPath, char *nameA, GBool doStat); |
1221 |
+ GDirEntry(const char *dirPath, const char *nameA, GBool doStat); |
1222 |
~GDirEntry(); |
1223 |
GString *getName() { return name; } |
1224 |
GBool isDir() { return dir; } |
1225 |
@@ -113,7 +113,7 @@ |
1226 |
class GDir { |
1227 |
public: |
1228 |
|
1229 |
- GDir(char *name, GBool doStatA = gTrue); |
1230 |
+ GDir(const char *name, GBool doStatA = gTrue); |
1231 |
~GDir(); |
1232 |
GDirEntry *getNextEntry(); |
1233 |
void rewind(); |
1234 |
diff -ur texlive-20080816-source/libs/xpdf.orig/goo/GHash.cc texlive-20080816-source/libs/xpdf/goo/GHash.cc |
1235 |
--- texlive-20080816-source/libs/xpdf.orig/goo/GHash.cc 2006-01-16 03:09:26.000000000 +0300 |
1236 |
+++ texlive-20080816-source/libs/xpdf/goo/GHash.cc 2008-11-21 18:02:24.000000000 +0300 |
1237 |
@@ -145,7 +145,7 @@ |
1238 |
return p->val.i; |
1239 |
} |
1240 |
|
1241 |
-void *GHash::lookup(char *key) { |
1242 |
+void *GHash::lookup(const char *key) { |
1243 |
GHashBucket *p; |
1244 |
int h; |
1245 |
|
1246 |
@@ -155,7 +155,7 @@ |
1247 |
return p->val.p; |
1248 |
} |
1249 |
|
1250 |
-int GHash::lookupInt(char *key) { |
1251 |
+int GHash::lookupInt(const char *key) { |
1252 |
GHashBucket *p; |
1253 |
int h; |
1254 |
|
1255 |
@@ -211,7 +211,7 @@ |
1256 |
return val; |
1257 |
} |
1258 |
|
1259 |
-void *GHash::remove(char *key) { |
1260 |
+void *GHash::remove(const char *key) { |
1261 |
GHashBucket *p; |
1262 |
GHashBucket **q; |
1263 |
void *val; |
1264 |
@@ -234,7 +234,7 @@ |
1265 |
return val; |
1266 |
} |
1267 |
|
1268 |
-int GHash::removeInt(char *key) { |
1269 |
+int GHash::removeInt(const char *key) { |
1270 |
GHashBucket *p; |
1271 |
GHashBucket **q; |
1272 |
int val; |
1273 |
@@ -344,7 +344,7 @@ |
1274 |
return NULL; |
1275 |
} |
1276 |
|
1277 |
-GHashBucket *GHash::find(char *key, int *h) { |
1278 |
+GHashBucket *GHash::find(const char *key, int *h) { |
1279 |
GHashBucket *p; |
1280 |
|
1281 |
*h = hash(key); |
1282 |
@@ -368,8 +368,8 @@ |
1283 |
return (int)(h % size); |
1284 |
} |
1285 |
|
1286 |
-int GHash::hash(char *key) { |
1287 |
- char *p; |
1288 |
+int GHash::hash(const char *key) { |
1289 |
+ const char *p; |
1290 |
unsigned int h; |
1291 |
|
1292 |
h = 0; |
1293 |
diff -ur texlive-20080816-source/libs/xpdf.orig/goo/GHash.h texlive-20080816-source/libs/xpdf/goo/GHash.h |
1294 |
--- texlive-20080816-source/libs/xpdf.orig/goo/GHash.h 2006-01-16 03:09:26.000000000 +0300 |
1295 |
+++ texlive-20080816-source/libs/xpdf/goo/GHash.h 2008-11-21 18:01:31.000000000 +0300 |
1296 |
@@ -34,12 +34,12 @@ |
1297 |
void replace(GString *key, int val); |
1298 |
void *lookup(GString *key); |
1299 |
int lookupInt(GString *key); |
1300 |
- void *lookup(char *key); |
1301 |
- int lookupInt(char *key); |
1302 |
+ void *lookup(const char *key); |
1303 |
+ int lookupInt(const char *key); |
1304 |
void *remove(GString *key); |
1305 |
int removeInt(GString *key); |
1306 |
- void *remove(char *key); |
1307 |
- int removeInt(char *key); |
1308 |
+ void *remove(const char *key); |
1309 |
+ int removeInt(const char *key); |
1310 |
int getLength() { return len; } |
1311 |
void startIter(GHashIter **iter); |
1312 |
GBool getNext(GHashIter **iter, GString **key, void **val); |
1313 |
@@ -50,9 +50,9 @@ |
1314 |
|
1315 |
void expand(); |
1316 |
GHashBucket *find(GString *key, int *h); |
1317 |
- GHashBucket *find(char *key, int *h); |
1318 |
+ GHashBucket *find(const char *key, int *h); |
1319 |
int hash(GString *key); |
1320 |
- int hash(char *key); |
1321 |
+ int hash(const char *key); |
1322 |
|
1323 |
GBool deleteKeys; // set if key strings should be deleted |
1324 |
int size; // number of buckets |
1325 |
diff -ur texlive-20080816-source/libs/xpdf.orig/goo/gmem.cc texlive-20080816-source/libs/xpdf/goo/gmem.cc |
1326 |
--- texlive-20080816-source/libs/xpdf.orig/goo/gmem.cc 2007-07-12 01:13:59.000000000 +0400 |
1327 |
+++ texlive-20080816-source/libs/xpdf/goo/gmem.cc 2008-11-21 16:34:54.000000000 +0300 |
1328 |
@@ -255,7 +255,7 @@ |
1329 |
} |
1330 |
#endif |
1331 |
|
1332 |
-char *copyString(char *s) { |
1333 |
+char *copyString(const char *s) { |
1334 |
char *s1; |
1335 |
|
1336 |
s1 = (char *)gmalloc(strlen(s) + 1); |
1337 |
diff -ur texlive-20080816-source/libs/xpdf.orig/goo/gmem.h texlive-20080816-source/libs/xpdf/goo/gmem.h |
1338 |
--- texlive-20080816-source/libs/xpdf.orig/goo/gmem.h 2007-07-12 01:13:59.000000000 +0400 |
1339 |
+++ texlive-20080816-source/libs/xpdf/goo/gmem.h 2008-11-21 16:34:49.000000000 +0300 |
1340 |
@@ -70,7 +70,7 @@ |
1341 |
/* |
1342 |
* Allocate memory and copy a string into it. |
1343 |
*/ |
1344 |
-extern char *copyString(char *s); |
1345 |
+extern char *copyString(const char *s); |
1346 |
|
1347 |
#ifdef __cplusplus |
1348 |
} |
1349 |
diff -ur texlive-20080816-source/libs/xpdf.orig/goo/GString.cc texlive-20080816-source/libs/xpdf/goo/GString.cc |
1350 |
--- texlive-20080816-source/libs/xpdf.orig/goo/GString.cc 2008-05-08 17:40:41.000000000 +0400 |
1351 |
+++ texlive-20080816-source/libs/xpdf/goo/GString.cc 2008-11-21 17:56:15.000000000 +0300 |
1352 |
@@ -101,7 +101,7 @@ |
1353 |
fmtSpace |
1354 |
}; |
1355 |
|
1356 |
-static char *formatStrings[] = { |
1357 |
+static const char *formatStrings[] = { |
1358 |
"d", "x", "o", "b", "ud", "ux", "uo", "ub", |
1359 |
"ld", "lx", "lo", "lb", "uld", "ulx", "ulo", "ulb", |
1360 |
"f", "g", |
1361 |
@@ -192,7 +192,7 @@ |
1362 |
return new GString(p, len); |
1363 |
} |
1364 |
|
1365 |
-GString *GString::format(char *fmt, ...) { |
1366 |
+GString *GString::format(const char *fmt, ...) { |
1367 |
va_list argList; |
1368 |
GString *s; |
1369 |
|
1370 |
@@ -203,7 +203,7 @@ |
1371 |
return s; |
1372 |
} |
1373 |
|
1374 |
-GString *GString::formatv(char *fmt, va_list argList) { |
1375 |
+GString *GString::formatv(const char *fmt, va_list argList) { |
1376 |
GString *s; |
1377 |
|
1378 |
s = new GString(); |
1379 |
@@ -254,7 +254,7 @@ |
1380 |
return this; |
1381 |
} |
1382 |
|
1383 |
-GString *GString::appendf(char *fmt, ...) { |
1384 |
+GString *GString::appendf(const char *fmt, ...) { |
1385 |
va_list argList; |
1386 |
|
1387 |
va_start(argList, fmt); |
1388 |
@@ -263,7 +263,7 @@ |
1389 |
return this; |
1390 |
} |
1391 |
|
1392 |
-GString *GString::appendfv(char *fmt, va_list argList) { |
1393 |
+GString *GString::appendfv(const char *fmt, va_list argList) { |
1394 |
GStringFormatArg *args; |
1395 |
int argsLen, argsSize; |
1396 |
GStringFormatArg arg; |
1397 |
@@ -272,7 +272,8 @@ |
1398 |
GStringFormatType ft; |
1399 |
char buf[65]; |
1400 |
int len, i; |
1401 |
- char *p0, *p1, *str; |
1402 |
+ const char *p0, *p1; |
1403 |
+ char *str; |
1404 |
|
1405 |
argsLen = 0; |
1406 |
argsSize = 8; |
1407 |
diff -ur texlive-20080816-source/libs/xpdf.orig/goo/GString.h texlive-20080816-source/libs/xpdf/goo/GString.h |
1408 |
--- texlive-20080816-source/libs/xpdf.orig/goo/GString.h 2007-07-12 01:13:59.000000000 +0400 |
1409 |
+++ texlive-20080816-source/libs/xpdf/goo/GString.h 2008-11-21 17:54:17.000000000 +0300 |
1410 |
@@ -67,8 +67,8 @@ |
1411 |
// t -- GString * |
1412 |
// w -- blank space; arg determines width |
1413 |
// To get literal curly braces, use {{ or }}. |
1414 |
- static GString *format(char *fmt, ...); |
1415 |
- static GString *formatv(char *fmt, va_list argList); |
1416 |
+ static GString *format(const char *fmt, ...); |
1417 |
+ static GString *formatv(const char *fmt, va_list argList); |
1418 |
|
1419 |
// Destructor. |
1420 |
~GString(); |
1421 |
@@ -95,8 +95,8 @@ |
1422 |
GString *append(const char *str, int lengthA); |
1423 |
|
1424 |
// Append a formatted string. |
1425 |
- GString *appendf(char *fmt, ...); |
1426 |
- GString *appendfv(char *fmt, va_list argList); |
1427 |
+ GString *appendf(const char *fmt, ...); |
1428 |
+ GString *appendfv(const char *fmt, va_list argList); |
1429 |
|
1430 |
// Insert a character or string. |
1431 |
GString *insert(int i, char c); |
1432 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/BuiltinFont.cc texlive-20080816-source/libs/xpdf/xpdf/BuiltinFont.cc |
1433 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/BuiltinFont.cc 2006-01-16 03:09:26.000000000 +0300 |
1434 |
+++ texlive-20080816-source/libs/xpdf/xpdf/BuiltinFont.cc 2008-11-21 13:56:48.000000000 +0300 |
1435 |
@@ -39,7 +39,7 @@ |
1436 |
gfree(tab); |
1437 |
} |
1438 |
|
1439 |
-GBool BuiltinFontWidths::getWidth(char *name, Gushort *width) { |
1440 |
+GBool BuiltinFontWidths::getWidth(const char *name, Gushort *width) { |
1441 |
int h; |
1442 |
BuiltinFontWidth *p; |
1443 |
|
1444 |
@@ -53,8 +53,8 @@ |
1445 |
return gFalse; |
1446 |
} |
1447 |
|
1448 |
-int BuiltinFontWidths::hash(char *name) { |
1449 |
- char *p; |
1450 |
+int BuiltinFontWidths::hash(const char *name) { |
1451 |
+ const char *p; |
1452 |
unsigned int h; |
1453 |
|
1454 |
h = 0; |
1455 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/BuiltinFont.h texlive-20080816-source/libs/xpdf/xpdf/BuiltinFont.h |
1456 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/BuiltinFont.h 2006-01-16 03:09:26.000000000 +0300 |
1457 |
+++ texlive-20080816-source/libs/xpdf/xpdf/BuiltinFont.h 2008-11-21 17:16:00.000000000 +0300 |
1458 |
@@ -23,8 +23,8 @@ |
1459 |
//------------------------------------------------------------------------ |
1460 |
|
1461 |
struct BuiltinFont { |
1462 |
- char *name; |
1463 |
- char **defaultBaseEnc; |
1464 |
+ const char *name; |
1465 |
+ const char **defaultBaseEnc; |
1466 |
short ascent; |
1467 |
short descent; |
1468 |
short bbox[4]; |
1469 |
@@ -34,7 +34,7 @@ |
1470 |
//------------------------------------------------------------------------ |
1471 |
|
1472 |
struct BuiltinFontWidth { |
1473 |
- char *name; |
1474 |
+ const char *name; |
1475 |
Gushort width; |
1476 |
BuiltinFontWidth *next; |
1477 |
}; |
1478 |
@@ -44,11 +44,11 @@ |
1479 |
|
1480 |
BuiltinFontWidths(BuiltinFontWidth *widths, int sizeA); |
1481 |
~BuiltinFontWidths(); |
1482 |
- GBool getWidth(char *name, Gushort *width); |
1483 |
+ GBool getWidth(const char *name, Gushort *width); |
1484 |
|
1485 |
private: |
1486 |
|
1487 |
- int hash(char *name); |
1488 |
+ int hash(const char *name); |
1489 |
|
1490 |
BuiltinFontWidth **tab; |
1491 |
int size; |
1492 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/CharCodeToUnicode.cc texlive-20080816-source/libs/xpdf/xpdf/CharCodeToUnicode.cc |
1493 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/CharCodeToUnicode.cc 2006-01-16 03:09:26.000000000 +0300 |
1494 |
+++ texlive-20080816-source/libs/xpdf/xpdf/CharCodeToUnicode.cc 2008-11-21 16:51:29.000000000 +0300 |
1495 |
@@ -189,7 +189,7 @@ |
1496 |
|
1497 |
CharCodeToUnicode *CharCodeToUnicode::parseCMap(GString *buf, int nBits) { |
1498 |
CharCodeToUnicode *ctu; |
1499 |
- char *p; |
1500 |
+ const char *p; |
1501 |
|
1502 |
ctu = new CharCodeToUnicode(NULL); |
1503 |
p = buf->getCString(); |
1504 |
@@ -198,7 +198,7 @@ |
1505 |
} |
1506 |
|
1507 |
void CharCodeToUnicode::mergeCMap(GString *buf, int nBits) { |
1508 |
- char *p; |
1509 |
+ const char *p; |
1510 |
|
1511 |
p = buf->getCString(); |
1512 |
parseCMap1(&getCharFromString, &p, nBits); |
1513 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/CMap.cc texlive-20080816-source/libs/xpdf/xpdf/CMap.cc |
1514 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/CMap.cc 2006-01-16 03:09:26.000000000 +0300 |
1515 |
+++ texlive-20080816-source/libs/xpdf/xpdf/CMap.cc 2008-11-21 17:42:34.000000000 +0300 |
1516 |
@@ -184,7 +184,7 @@ |
1517 |
#endif |
1518 |
} |
1519 |
|
1520 |
-void CMap::useCMap(CMapCache *cache, char *useName) { |
1521 |
+void CMap::useCMap(CMapCache *cache, const char *useName) { |
1522 |
GString *useNameStr; |
1523 |
CMap *subCMap; |
1524 |
|
1525 |
@@ -327,7 +327,7 @@ |
1526 |
return !collection->cmp(collectionA) && !cMapName->cmp(cMapNameA); |
1527 |
} |
1528 |
|
1529 |
-CID CMap::getCID(char *s, int len, int *nUsed) { |
1530 |
+CID CMap::getCID(const char *s, int len, int *nUsed) { |
1531 |
CMapVectorEntry *vec; |
1532 |
int n, i; |
1533 |
|
1534 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/CMap.h texlive-20080816-source/libs/xpdf/xpdf/CMap.h |
1535 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/CMap.h 2006-01-16 03:09:26.000000000 +0300 |
1536 |
+++ texlive-20080816-source/libs/xpdf/xpdf/CMap.h 2008-11-21 17:42:44.000000000 +0300 |
1537 |
@@ -51,7 +51,7 @@ |
1538 |
// Return the CID corresponding to the character code starting at |
1539 |
// <s>, which contains <len> bytes. Sets *<nUsed> to the number of |
1540 |
// bytes used by the char code. |
1541 |
- CID getCID(char *s, int len, int *nUsed); |
1542 |
+ CID getCID(const char *s, int len, int *nUsed); |
1543 |
|
1544 |
// Return the writing mode (0=horizontal, 1=vertical). |
1545 |
int getWMode() { return wMode; } |
1546 |
@@ -60,7 +60,7 @@ |
1547 |
|
1548 |
CMap(GString *collectionA, GString *cMapNameA); |
1549 |
CMap(GString *collectionA, GString *cMapNameA, int wModeA); |
1550 |
- void useCMap(CMapCache *cache, char *useName); |
1551 |
+ void useCMap(CMapCache *cache, const char *useName); |
1552 |
void copyVector(CMapVectorEntry *dest, CMapVectorEntry *src); |
1553 |
void addCodeSpace(CMapVectorEntry *vec, Guint start, Guint end, |
1554 |
Guint nBytes); |
1555 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/Dict.cc texlive-20080816-source/libs/xpdf/xpdf/Dict.cc |
1556 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/Dict.cc 2006-01-16 03:09:26.000000000 +0300 |
1557 |
+++ texlive-20080816-source/libs/xpdf/xpdf/Dict.cc 2008-11-21 16:51:02.000000000 +0300 |
1558 |
@@ -34,13 +34,13 @@ |
1559 |
int i; |
1560 |
|
1561 |
for (i = 0; i < length; ++i) { |
1562 |
- gfree(entries[i].key); |
1563 |
+ gfree(const_cast<char*>(entries[i].key)); |
1564 |
entries[i].val.free(); |
1565 |
} |
1566 |
gfree(entries); |
1567 |
} |
1568 |
|
1569 |
-void Dict::add(char *key, Object *val) { |
1570 |
+void Dict::add(const char *key, Object *val) { |
1571 |
if (length == size) { |
1572 |
if (length == 0) { |
1573 |
size = 8; |
1574 |
@@ -54,7 +54,7 @@ |
1575 |
++length; |
1576 |
} |
1577 |
|
1578 |
-inline DictEntry *Dict::find(char *key) { |
1579 |
+inline DictEntry *Dict::find(const char *key) { |
1580 |
int i; |
1581 |
|
1582 |
for (i = 0; i < length; ++i) { |
1583 |
@@ -64,25 +64,25 @@ |
1584 |
return NULL; |
1585 |
} |
1586 |
|
1587 |
-GBool Dict::is(char *type) { |
1588 |
+GBool Dict::is(const char *type) { |
1589 |
DictEntry *e; |
1590 |
|
1591 |
return (e = find("Type")) && e->val.isName(type); |
1592 |
} |
1593 |
|
1594 |
-Object *Dict::lookup(char *key, Object *obj) { |
1595 |
+Object *Dict::lookup(const char *key, Object *obj) { |
1596 |
DictEntry *e; |
1597 |
|
1598 |
return (e = find(key)) ? e->val.fetch(xref, obj) : obj->initNull(); |
1599 |
} |
1600 |
|
1601 |
-Object *Dict::lookupNF(char *key, Object *obj) { |
1602 |
+Object *Dict::lookupNF(const char *key, Object *obj) { |
1603 |
DictEntry *e; |
1604 |
|
1605 |
return (e = find(key)) ? e->val.copy(obj) : obj->initNull(); |
1606 |
} |
1607 |
|
1608 |
-char *Dict::getKey(int i) { |
1609 |
+const char *Dict::getKey(int i) { |
1610 |
return entries[i].key; |
1611 |
} |
1612 |
|
1613 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/Dict.h texlive-20080816-source/libs/xpdf/xpdf/Dict.h |
1614 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/Dict.h 2006-01-16 03:09:26.000000000 +0300 |
1615 |
+++ texlive-20080816-source/libs/xpdf/xpdf/Dict.h 2008-11-21 16:40:19.000000000 +0300 |
1616 |
@@ -22,7 +22,7 @@ |
1617 |
//------------------------------------------------------------------------ |
1618 |
|
1619 |
struct DictEntry { |
1620 |
- char *key; |
1621 |
+ const char *key; |
1622 |
Object val; |
1623 |
}; |
1624 |
|
1625 |
@@ -43,18 +43,18 @@ |
1626 |
int getLength() { return length; } |
1627 |
|
1628 |
// Add an entry. NB: does not copy key. |
1629 |
- void add(char *key, Object *val); |
1630 |
+ void add(const char *key, Object *val); |
1631 |
|
1632 |
// Check if dictionary is of specified type. |
1633 |
- GBool is(char *type); |
1634 |
+ GBool is(const char *type); |
1635 |
|
1636 |
// Look up an entry and return the value. Returns a null object |
1637 |
// if <key> is not in the dictionary. |
1638 |
- Object *lookup(char *key, Object *obj); |
1639 |
- Object *lookupNF(char *key, Object *obj); |
1640 |
+ Object *lookup(const char *key, Object *obj); |
1641 |
+ Object *lookupNF(const char *key, Object *obj); |
1642 |
|
1643 |
// Iterative accessors. |
1644 |
- char *getKey(int i); |
1645 |
+ const char *getKey(int i); |
1646 |
Object *getVal(int i, Object *obj); |
1647 |
Object *getValNF(int i, Object *obj); |
1648 |
|
1649 |
@@ -71,7 +71,7 @@ |
1650 |
int length; // number of entries in dictionary |
1651 |
int ref; // reference count |
1652 |
|
1653 |
- DictEntry *find(char *key); |
1654 |
+ DictEntry *find(const char *key); |
1655 |
}; |
1656 |
|
1657 |
#endif |
1658 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/Error.cc texlive-20080816-source/libs/xpdf/xpdf/Error.cc |
1659 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/Error.cc 2006-01-16 03:09:26.000000000 +0300 |
1660 |
+++ texlive-20080816-source/libs/xpdf/xpdf/Error.cc 2008-11-21 16:47:31.000000000 +0300 |
1661 |
@@ -18,7 +18,7 @@ |
1662 |
#include "GlobalParams.h" |
1663 |
#include "Error.h" |
1664 |
|
1665 |
-void CDECL error(int pos, char *msg, ...) { |
1666 |
+void CDECL error(int pos, const char *msg, ...) { |
1667 |
va_list args; |
1668 |
|
1669 |
// NB: this can be called before the globalParams object is created |
1670 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/Error.h texlive-20080816-source/libs/xpdf/xpdf/Error.h |
1671 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/Error.h 2006-01-16 03:09:26.000000000 +0300 |
1672 |
+++ texlive-20080816-source/libs/xpdf/xpdf/Error.h 2008-11-21 16:46:51.000000000 +0300 |
1673 |
@@ -18,6 +18,6 @@ |
1674 |
#include <stdio.h> |
1675 |
#include "config.h" |
1676 |
|
1677 |
-extern void CDECL error(int pos, char *msg, ...); |
1678 |
+extern void CDECL error(int pos, const char *msg, ...); |
1679 |
|
1680 |
#endif |
1681 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/FontEncodingTables.cc texlive-20080816-source/libs/xpdf/xpdf/FontEncodingTables.cc |
1682 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/FontEncodingTables.cc 2006-01-16 03:09:26.000000000 +0300 |
1683 |
+++ texlive-20080816-source/libs/xpdf/xpdf/FontEncodingTables.cc 2008-11-21 17:14:54.000000000 +0300 |
1684 |
@@ -10,7 +10,7 @@ |
1685 |
#include <stdlib.h> |
1686 |
#include "FontEncodingTables.h" |
1687 |
|
1688 |
-char *macRomanEncoding[256] = { |
1689 |
+const char *macRomanEncoding[256] = { |
1690 |
NULL, |
1691 |
NULL, |
1692 |
NULL, |
1693 |
@@ -269,7 +269,7 @@ |
1694 |
"caron" |
1695 |
}; |
1696 |
|
1697 |
-char *macExpertEncoding[256] = { |
1698 |
+const char *macExpertEncoding[256] = { |
1699 |
NULL, |
1700 |
NULL, |
1701 |
NULL, |
1702 |
@@ -528,7 +528,7 @@ |
1703 |
NULL |
1704 |
}; |
1705 |
|
1706 |
-char *winAnsiEncoding[256] = { |
1707 |
+const char *winAnsiEncoding[256] = { |
1708 |
NULL, |
1709 |
NULL, |
1710 |
NULL, |
1711 |
@@ -787,7 +787,7 @@ |
1712 |
"ydieresis" |
1713 |
}; |
1714 |
|
1715 |
-char *standardEncoding[256] = { |
1716 |
+const char *standardEncoding[256] = { |
1717 |
NULL, |
1718 |
NULL, |
1719 |
NULL, |
1720 |
@@ -1046,7 +1046,7 @@ |
1721 |
NULL |
1722 |
}; |
1723 |
|
1724 |
-char *expertEncoding[256] = { |
1725 |
+const char *expertEncoding[256] = { |
1726 |
NULL, |
1727 |
NULL, |
1728 |
NULL, |
1729 |
@@ -1305,7 +1305,7 @@ |
1730 |
"Ydieresissmall" |
1731 |
}; |
1732 |
|
1733 |
-char *symbolEncoding[256] = { |
1734 |
+const char *symbolEncoding[256] = { |
1735 |
NULL, |
1736 |
NULL, |
1737 |
NULL, |
1738 |
@@ -1564,7 +1564,7 @@ |
1739 |
NULL |
1740 |
}; |
1741 |
|
1742 |
-char *zapfDingbatsEncoding[256] = { |
1743 |
+const char *zapfDingbatsEncoding[256] = { |
1744 |
NULL, |
1745 |
NULL, |
1746 |
NULL, |
1747 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/FontEncodingTables.h texlive-20080816-source/libs/xpdf/xpdf/FontEncodingTables.h |
1748 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/FontEncodingTables.h 2006-01-16 03:09:26.000000000 +0300 |
1749 |
+++ texlive-20080816-source/libs/xpdf/xpdf/FontEncodingTables.h 2008-11-21 17:14:25.000000000 +0300 |
1750 |
@@ -9,12 +9,12 @@ |
1751 |
#ifndef FONTENCODINGTABLES_H |
1752 |
#define FONTENCODINGTABLES_H |
1753 |
|
1754 |
-extern char *macRomanEncoding[]; |
1755 |
-extern char *macExpertEncoding[]; |
1756 |
-extern char *winAnsiEncoding[]; |
1757 |
-extern char *standardEncoding[]; |
1758 |
-extern char *expertEncoding[]; |
1759 |
-extern char *symbolEncoding[]; |
1760 |
-extern char *zapfDingbatsEncoding[]; |
1761 |
+extern const char *macRomanEncoding[]; |
1762 |
+extern const char *macExpertEncoding[]; |
1763 |
+extern const char *winAnsiEncoding[]; |
1764 |
+extern const char *standardEncoding[]; |
1765 |
+extern const char *expertEncoding[]; |
1766 |
+extern const char *symbolEncoding[]; |
1767 |
+extern const char *zapfDingbatsEncoding[]; |
1768 |
|
1769 |
#endif |
1770 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/Function.cc texlive-20080816-source/libs/xpdf/xpdf/Function.cc |
1771 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/Function.cc 2007-07-12 01:13:59.000000000 +0400 |
1772 |
+++ texlive-20080816-source/libs/xpdf/xpdf/Function.cc 2008-11-21 17:03:35.000000000 +0300 |
1773 |
@@ -749,7 +749,7 @@ |
1774 |
// Note: 'if' and 'ifelse' are parsed separately. |
1775 |
// The rest are listed here in alphabetical order. |
1776 |
// The index in this table is equivalent to the entry in PSOp. |
1777 |
-char *psOpNames[] = { |
1778 |
+const char *psOpNames[] = { |
1779 |
"abs", |
1780 |
"add", |
1781 |
"and", |
1782 |
@@ -1086,7 +1086,7 @@ |
1783 |
|
1784 |
GBool PostScriptFunction::parseCode(Stream *str, int *codePtr) { |
1785 |
GString *tok; |
1786 |
- char *p; |
1787 |
+ const char *p; |
1788 |
GBool isReal; |
1789 |
int opPtr, elsePtr; |
1790 |
int a, b, mid, cmp; |
1791 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/GfxFont.cc texlive-20080816-source/libs/xpdf/xpdf/GfxFont.cc |
1792 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/GfxFont.cc 2007-07-12 01:13:59.000000000 +0400 |
1793 |
+++ texlive-20080816-source/libs/xpdf/xpdf/GfxFont.cc 2008-11-21 17:41:14.000000000 +0300 |
1794 |
@@ -33,8 +33,8 @@ |
1795 |
//------------------------------------------------------------------------ |
1796 |
|
1797 |
struct StdFontMapEntry { |
1798 |
- char *altName; |
1799 |
- char *properName; |
1800 |
+ const char *altName; |
1801 |
+ const char *properName; |
1802 |
}; |
1803 |
|
1804 |
// Acrobat 4.0 and earlier substituted Base14-compatible fonts without |
1805 |
@@ -100,7 +100,7 @@ |
1806 |
// GfxFont |
1807 |
//------------------------------------------------------------------------ |
1808 |
|
1809 |
-GfxFont *GfxFont::makeFont(XRef *xref, char *tagA, Ref idA, Dict *fontDict) { |
1810 |
+GfxFont *GfxFont::makeFont(XRef *xref, const char *tagA, Ref idA, Dict *fontDict) { |
1811 |
GString *nameA; |
1812 |
GfxFont *font; |
1813 |
Object obj1; |
1814 |
@@ -136,7 +136,7 @@ |
1815 |
return font; |
1816 |
} |
1817 |
|
1818 |
-GfxFont::GfxFont(char *tagA, Ref idA, GString *nameA) { |
1819 |
+GfxFont::GfxFont(const char *tagA, Ref idA, GString *nameA) { |
1820 |
ok = gFalse; |
1821 |
tag = new GString(tagA); |
1822 |
id = idA; |
1823 |
@@ -331,8 +331,8 @@ |
1824 |
} |
1825 |
|
1826 |
void GfxFont::findExtFontFile() { |
1827 |
- static char *type1Exts[] = { ".pfa", ".pfb", ".ps", "", NULL }; |
1828 |
- static char *ttExts[] = { ".ttf", NULL }; |
1829 |
+ static const char *type1Exts[] = { ".pfa", ".pfb", ".ps", "", NULL }; |
1830 |
+ static const char *ttExts[] = { ".ttf", NULL }; |
1831 |
|
1832 |
if (name) { |
1833 |
if (type == fontType1) { |
1834 |
@@ -343,7 +343,7 @@ |
1835 |
} |
1836 |
} |
1837 |
|
1838 |
-char *GfxFont::readExtFontFile(int *len) { |
1839 |
+const char *GfxFont::readExtFontFile(int *len) { |
1840 |
FILE *f; |
1841 |
char *buf; |
1842 |
|
1843 |
@@ -363,7 +363,7 @@ |
1844 |
return buf; |
1845 |
} |
1846 |
|
1847 |
-char *GfxFont::readEmbFontFile(XRef *xref, int *len) { |
1848 |
+const char *GfxFont::readEmbFontFile(XRef *xref, int *len) { |
1849 |
char *buf; |
1850 |
Object obj1, obj2; |
1851 |
Stream *str; |
1852 |
@@ -404,20 +404,20 @@ |
1853 |
// Gfx8BitFont |
1854 |
//------------------------------------------------------------------------ |
1855 |
|
1856 |
-Gfx8BitFont::Gfx8BitFont(XRef *xref, char *tagA, Ref idA, GString *nameA, |
1857 |
+Gfx8BitFont::Gfx8BitFont(XRef *xref, const char *tagA, Ref idA, GString *nameA, |
1858 |
GfxFontType typeA, Dict *fontDict): |
1859 |
GfxFont(tagA, idA, nameA) |
1860 |
{ |
1861 |
GString *name2; |
1862 |
BuiltinFont *builtinFont; |
1863 |
- char **baseEnc; |
1864 |
+ const char **baseEnc; |
1865 |
GBool baseEncFromFontFile; |
1866 |
- char *buf; |
1867 |
+ const char *buf; |
1868 |
int len; |
1869 |
FoFiType1 *ffT1; |
1870 |
FoFiType1C *ffT1C; |
1871 |
int code, code2; |
1872 |
- char *charName; |
1873 |
+ const char *charName; |
1874 |
GBool missing, hex; |
1875 |
Unicode toUnicode[256]; |
1876 |
CharCodeToUnicode *utu, *ctu2; |
1877 |
@@ -627,7 +627,7 @@ |
1878 |
} |
1879 |
} |
1880 |
if (buf) { |
1881 |
- gfree(buf); |
1882 |
+ gfree(const_cast<char*>(buf)); |
1883 |
} |
1884 |
|
1885 |
// get default base encoding |
1886 |
@@ -677,7 +677,7 @@ |
1887 |
} else if (obj3.isName()) { |
1888 |
if (code >= 0 && code < 256) { |
1889 |
if (encFree[code]) { |
1890 |
- gfree(enc[code]); |
1891 |
+ gfree(const_cast<char*>(enc[code])); |
1892 |
} |
1893 |
enc[code] = copyString(obj3.getName()); |
1894 |
encFree[code] = gTrue; |
1895 |
@@ -895,7 +895,7 @@ |
1896 |
|
1897 |
for (i = 0; i < 256; ++i) { |
1898 |
if (encFree[i] && enc[i]) { |
1899 |
- gfree(enc[i]); |
1900 |
+ gfree(const_cast<char*>(enc[i])); |
1901 |
} |
1902 |
} |
1903 |
ctu->decRefCnt(); |
1904 |
@@ -907,7 +907,7 @@ |
1905 |
} |
1906 |
} |
1907 |
|
1908 |
-int Gfx8BitFont::getNextChar(char *s, int len, CharCode *code, |
1909 |
+int Gfx8BitFont::getNextChar(const char *s, int len, CharCode *code, |
1910 |
Unicode *u, int uSize, int *uLen, |
1911 |
double *dx, double *dy, double *ox, double *oy) { |
1912 |
CharCode c; |
1913 |
@@ -929,7 +929,7 @@ |
1914 |
int cmapPlatform, cmapEncoding; |
1915 |
int unicodeCmap, macRomanCmap, msSymbolCmap, cmap; |
1916 |
GBool useMacRoman, useUnicode; |
1917 |
- char *charName; |
1918 |
+ const char *charName; |
1919 |
Unicode u; |
1920 |
int code, i, n; |
1921 |
|
1922 |
@@ -1074,7 +1074,7 @@ |
1923 |
((GfxFontCIDWidthExcepV *)w2)->first; |
1924 |
} |
1925 |
|
1926 |
-GfxCIDFont::GfxCIDFont(XRef *xref, char *tagA, Ref idA, GString *nameA, |
1927 |
+GfxCIDFont::GfxCIDFont(XRef *xref, const char *tagA, Ref idA, GString *nameA, |
1928 |
Dict *fontDict): |
1929 |
GfxFont(tagA, idA, nameA) |
1930 |
{ |
1931 |
@@ -1411,7 +1411,7 @@ |
1932 |
} |
1933 |
} |
1934 |
|
1935 |
-int GfxCIDFont::getNextChar(char *s, int len, CharCode *code, |
1936 |
+int GfxCIDFont::getNextChar(const char *s, int len, CharCode *code, |
1937 |
Unicode *u, int uSize, int *uLen, |
1938 |
double *dx, double *dy, double *ox, double *oy) { |
1939 |
CID cid; |
1940 |
@@ -1556,7 +1556,7 @@ |
1941 |
gfree(fonts); |
1942 |
} |
1943 |
|
1944 |
-GfxFont *GfxFontDict::lookup(char *tag) { |
1945 |
+GfxFont *GfxFontDict::lookup(const char *tag) { |
1946 |
int i; |
1947 |
|
1948 |
for (i = 0; i < numFonts; ++i) { |
1949 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/GfxFont.h texlive-20080816-source/libs/xpdf/xpdf/GfxFont.h |
1950 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/GfxFont.h 2007-07-12 01:13:59.000000000 +0400 |
1951 |
+++ texlive-20080816-source/libs/xpdf/xpdf/GfxFont.h 2008-11-21 17:38:32.000000000 +0300 |
1952 |
@@ -89,9 +89,9 @@ |
1953 |
public: |
1954 |
|
1955 |
// Build a GfxFont object. |
1956 |
- static GfxFont *makeFont(XRef *xref, char *tagA, Ref idA, Dict *fontDict); |
1957 |
+ static GfxFont *makeFont(XRef *xref, const char *tagA, Ref idA, Dict *fontDict); |
1958 |
|
1959 |
- GfxFont(char *tagA, Ref idA, GString *nameA); |
1960 |
+ GfxFont(const char *tagA, Ref idA, GString *nameA); |
1961 |
|
1962 |
virtual ~GfxFont(); |
1963 |
|
1964 |
@@ -104,7 +104,7 @@ |
1965 |
Ref *getID() { return &id; } |
1966 |
|
1967 |
// Does this font match the tag? |
1968 |
- GBool matches(char *tagA) { return !tag->cmp(tagA); } |
1969 |
+ GBool matches(const char *tagA) { return !tag->cmp(tagA); } |
1970 |
|
1971 |
// Get base font name. |
1972 |
GString *getName() { return name; } |
1973 |
@@ -152,8 +152,8 @@ |
1974 |
virtual int getWMode() { return 0; } |
1975 |
|
1976 |
// Read an external or embedded font file into a buffer. |
1977 |
- char *readExtFontFile(int *len); |
1978 |
- char *readEmbFontFile(XRef *xref, int *len); |
1979 |
+ const char *readExtFontFile(int *len); |
1980 |
+ const char *readEmbFontFile(XRef *xref, int *len); |
1981 |
|
1982 |
// Get the next char from a string <s> of <len> bytes, returning the |
1983 |
// char <code>, its Unicode mapping <u>, its displacement vector |
1984 |
@@ -161,7 +161,7 @@ |
1985 |
// is the number of entries available in <u>, and <uLen> is set to |
1986 |
// the number actually used. Returns the number of bytes used by |
1987 |
// the char code. |
1988 |
- virtual int getNextChar(char *s, int len, CharCode *code, |
1989 |
+ virtual int getNextChar(const char *s, int len, CharCode *code, |
1990 |
Unicode *u, int uSize, int *uLen, |
1991 |
double *dx, double *dy, double *ox, double *oy) = 0; |
1992 |
|
1993 |
@@ -196,23 +196,23 @@ |
1994 |
class Gfx8BitFont: public GfxFont { |
1995 |
public: |
1996 |
|
1997 |
- Gfx8BitFont(XRef *xref, char *tagA, Ref idA, GString *nameA, |
1998 |
+ Gfx8BitFont(XRef *xref, const char *tagA, Ref idA, GString *nameA, |
1999 |
GfxFontType typeA, Dict *fontDict); |
2000 |
|
2001 |
virtual ~Gfx8BitFont(); |
2002 |
|
2003 |
- virtual int getNextChar(char *s, int len, CharCode *code, |
2004 |
+ virtual int getNextChar(const char *s, int len, CharCode *code, |
2005 |
Unicode *u, int uSize, int *uLen, |
2006 |
double *dx, double *dy, double *ox, double *oy); |
2007 |
|
2008 |
// Return the encoding. |
2009 |
- char **getEncoding() { return enc; } |
2010 |
+ const char **getEncoding() { return enc; } |
2011 |
|
2012 |
// Return the Unicode map. |
2013 |
CharCodeToUnicode *getToUnicode(); |
2014 |
|
2015 |
// Return the character name associated with <code>. |
2016 |
- char *getCharName(int code) { return enc[code]; } |
2017 |
+ const char *getCharName(int code) { return enc[code]; } |
2018 |
|
2019 |
// Returns true if the PDF font specified an encoding. |
2020 |
GBool getHasEncoding() { return hasEncoding; } |
2021 |
@@ -238,7 +238,7 @@ |
2022 |
|
2023 |
private: |
2024 |
|
2025 |
- char *enc[256]; // char code --> char name |
2026 |
+ const char *enc[256]; // char code --> char name |
2027 |
char encFree[256]; // boolean for each char name: if set, |
2028 |
// the string is malloc'ed |
2029 |
CharCodeToUnicode *ctu; // char code --> Unicode |
2030 |
@@ -256,14 +256,14 @@ |
2031 |
class GfxCIDFont: public GfxFont { |
2032 |
public: |
2033 |
|
2034 |
- GfxCIDFont(XRef *xref, char *tagA, Ref idA, GString *nameA, |
2035 |
+ GfxCIDFont(XRef *xref, const char *tagA, Ref idA, GString *nameA, |
2036 |
Dict *fontDict); |
2037 |
|
2038 |
virtual ~GfxCIDFont(); |
2039 |
|
2040 |
virtual GBool isCIDFont() { return gTrue; } |
2041 |
|
2042 |
- virtual int getNextChar(char *s, int len, CharCode *code, |
2043 |
+ virtual int getNextChar(const char *s, int len, CharCode *code, |
2044 |
Unicode *u, int uSize, int *uLen, |
2045 |
double *dx, double *dy, double *ox, double *oy); |
2046 |
|
2047 |
@@ -305,7 +305,7 @@ |
2048 |
~GfxFontDict(); |
2049 |
|
2050 |
// Get the specified font. |
2051 |
- GfxFont *lookup(char *tag); |
2052 |
+ GfxFont *lookup(const char *tag); |
2053 |
|
2054 |
// Iterative access. |
2055 |
int getNumFonts() { return numFonts; } |
2056 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/GfxState.cc texlive-20080816-source/libs/xpdf/xpdf/GfxState.cc |
2057 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/GfxState.cc 2007-07-12 01:13:59.000000000 +0400 |
2058 |
+++ texlive-20080816-source/libs/xpdf/xpdf/GfxState.cc 2008-11-21 17:12:54.000000000 +0300 |
2059 |
@@ -35,7 +35,7 @@ |
2060 |
//------------------------------------------------------------------------ |
2061 |
|
2062 |
struct GfxBlendModeInfo { |
2063 |
- char *name; |
2064 |
+ const char *name; |
2065 |
GfxBlendMode mode; |
2066 |
}; |
2067 |
|
2068 |
@@ -66,7 +66,7 @@ |
2069 |
|
2070 |
// NB: This must match the GfxColorSpaceMode enum defined in |
2071 |
// GfxState.h |
2072 |
-static char *gfxColorSpaceModeNames[] = { |
2073 |
+static const char *gfxColorSpaceModeNames[] = { |
2074 |
"DeviceGray", |
2075 |
"CalGray", |
2076 |
"DeviceRGB", |
2077 |
@@ -157,7 +157,7 @@ |
2078 |
return nGfxColorSpaceModes; |
2079 |
} |
2080 |
|
2081 |
-char *GfxColorSpace::getColorSpaceModeName(int idx) { |
2082 |
+const char *GfxColorSpace::getColorSpaceModeName(int idx) { |
2083 |
return gfxColorSpaceModeNames[idx]; |
2084 |
} |
2085 |
|
2086 |
@@ -949,7 +949,7 @@ |
2087 |
int indexHighA; |
2088 |
Object obj1; |
2089 |
int x; |
2090 |
- char *s; |
2091 |
+ const char *s; |
2092 |
int n, i, j; |
2093 |
|
2094 |
if (arr->getLength() != 4) { |
2095 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/GfxState.h texlive-20080816-source/libs/xpdf/xpdf/GfxState.h |
2096 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/GfxState.h 2007-07-12 01:13:59.000000000 +0400 |
2097 |
+++ texlive-20080816-source/libs/xpdf/xpdf/GfxState.h 2008-11-21 17:08:48.000000000 +0300 |
2098 |
@@ -164,7 +164,7 @@ |
2099 |
static int getNumColorSpaceModes(); |
2100 |
|
2101 |
// Return the name of the <idx>th color space mode. |
2102 |
- static char *getColorSpaceModeName(int idx); |
2103 |
+ static const char *getColorSpaceModeName(int idx); |
2104 |
|
2105 |
private: |
2106 |
}; |
2107 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/GlobalParams.cc texlive-20080816-source/libs/xpdf/xpdf/GlobalParams.cc |
2108 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/GlobalParams.cc 2008-05-08 17:40:41.000000000 +0400 |
2109 |
+++ texlive-20080816-source/libs/xpdf/xpdf/GlobalParams.cc 2008-11-21 17:29:19.000000000 +0300 |
2110 |
@@ -117,9 +117,9 @@ |
2111 |
//------------------------------------------------------------------------ |
2112 |
|
2113 |
static struct { |
2114 |
- char *name; |
2115 |
- char *t1FileName; |
2116 |
- char *ttFileName; |
2117 |
+ const char *name; |
2118 |
+ const char *t1FileName; |
2119 |
+ const char *ttFileName; |
2120 |
} displayFontTab[] = { |
2121 |
{"Courier", "n022003l.pfb", "cour.ttf"}, |
2122 |
{"Courier-Bold", "n022004l.pfb", "courbd.ttf"}, |
2123 |
@@ -139,13 +139,13 @@ |
2124 |
}; |
2125 |
|
2126 |
#ifdef WIN32 |
2127 |
-static char *displayFontDirs[] = { |
2128 |
+static const char *displayFontDirs[] = { |
2129 |
"c:/windows/fonts", |
2130 |
"c:/winnt/fonts", |
2131 |
NULL |
2132 |
}; |
2133 |
#else |
2134 |
-static char *displayFontDirs[] = { |
2135 |
+static const char *displayFontDirs[] = { |
2136 |
"/usr/share/ghostscript/fonts", |
2137 |
"/usr/local/share/ghostscript/fonts", |
2138 |
"/usr/share/fonts/default/Type1", |
2139 |
@@ -205,7 +205,7 @@ |
2140 |
GBool bold, italic; |
2141 |
|
2142 |
static WinFontInfo *make(GString *nameA, GBool boldA, GBool italicA, |
2143 |
- HKEY regKey, char *winFontDir); |
2144 |
+ HKEY regKey, const char *winFontDir); |
2145 |
WinFontInfo(GString *nameA, GBool boldA, GBool italicA, |
2146 |
GString *fileNameA); |
2147 |
virtual ~WinFontInfo(); |
2148 |
@@ -213,7 +213,7 @@ |
2149 |
}; |
2150 |
|
2151 |
WinFontInfo *WinFontInfo::make(GString *nameA, GBool boldA, GBool italicA, |
2152 |
- HKEY regKey, char *winFontDir) { |
2153 |
+ HKEY regKey, const char *winFontDir) { |
2154 |
GString *regName; |
2155 |
GString *fileNameA; |
2156 |
char buf[MAX_PATH]; |
2157 |
@@ -280,7 +280,7 @@ |
2158 |
class WinFontList { |
2159 |
public: |
2160 |
|
2161 |
- WinFontList(char *winFontDirA); |
2162 |
+ WinFontList(const char *winFontDirA); |
2163 |
~WinFontList(); |
2164 |
WinFontInfo *find(GString *font); |
2165 |
|
2166 |
@@ -297,12 +297,12 @@ |
2167 |
GList *fonts; // [WinFontInfo] |
2168 |
HDC dc; // (only used during enumeration) |
2169 |
HKEY regKey; // (only used during enumeration) |
2170 |
- char *winFontDir; // (only used during enumeration) |
2171 |
+ const char *winFontDir; // (only used during enumeration) |
2172 |
}; |
2173 |
|
2174 |
-WinFontList::WinFontList(char *winFontDirA) { |
2175 |
+WinFontList::WinFontList(const char *winFontDirA) { |
2176 |
OSVERSIONINFO version; |
2177 |
- char *path; |
2178 |
+ const char *path; |
2179 |
|
2180 |
fonts = new GList(); |
2181 |
dc = GetDC(NULL); |
2182 |
@@ -463,7 +463,7 @@ |
2183 |
// KeyBinding |
2184 |
//------------------------------------------------------------------------ |
2185 |
|
2186 |
-KeyBinding::KeyBinding(int codeA, int modsA, int contextA, char *cmd0) { |
2187 |
+KeyBinding::KeyBinding(int codeA, int modsA, int contextA, const char *cmd0) { |
2188 |
code = codeA; |
2189 |
mods = modsA; |
2190 |
context = contextA; |
2191 |
@@ -472,7 +472,7 @@ |
2192 |
} |
2193 |
|
2194 |
KeyBinding::KeyBinding(int codeA, int modsA, int contextA, |
2195 |
- char *cmd0, char *cmd1) { |
2196 |
+ const char *cmd0, const char *cmd1) { |
2197 |
code = codeA; |
2198 |
mods = modsA; |
2199 |
context = contextA; |
2200 |
@@ -501,7 +501,7 @@ |
2201 |
class Plugin { |
2202 |
public: |
2203 |
|
2204 |
- static Plugin *load(char *type, char *name); |
2205 |
+ static Plugin *load(const char *type, const char *name); |
2206 |
~Plugin(); |
2207 |
|
2208 |
private: |
2209 |
@@ -515,7 +515,7 @@ |
2210 |
#endif |
2211 |
}; |
2212 |
|
2213 |
-Plugin *Plugin::load(char *type, char *name) { |
2214 |
+Plugin *Plugin::load(const char *type, const char *name) { |
2215 |
GString *path; |
2216 |
Plugin *plugin; |
2217 |
XpdfPluginVecTable *vt; |
2218 |
@@ -677,7 +677,7 @@ |
2219 |
displayCIDFonts = new GHash(); |
2220 |
displayNamedCIDFonts = new GHash(); |
2221 |
#if HAVE_PAPER_H |
2222 |
- char *paperName; |
2223 |
+ const char *paperName; |
2224 |
const struct paper *paperType; |
2225 |
paperinit(); |
2226 |
if ((paperName = systempapername())) { |
2227 |
@@ -771,7 +771,7 @@ |
2228 |
|
2229 |
} |
2230 |
|
2231 |
-GlobalParams::GlobalParams(char *cfgFileName) { |
2232 |
+GlobalParams::GlobalParams(const char *cfgFileName) { |
2233 |
UnicodeMap *map; |
2234 |
GString *fileName; |
2235 |
FILE *f; |
2236 |
@@ -811,7 +811,7 @@ |
2237 |
displayCIDFonts = new GHash(); |
2238 |
displayNamedCIDFonts = new GHash(); |
2239 |
#if HAVE_PAPER_H |
2240 |
- char *paperName; |
2241 |
+ const char *paperName; |
2242 |
const struct paper *paperType; |
2243 |
paperinit(); |
2244 |
if ((paperName = systempapername())) { |
2245 |
@@ -1096,7 +1096,7 @@ |
2246 |
} |
2247 |
} |
2248 |
|
2249 |
-void GlobalParams::parseLine(char *buf, GString *fileName, int line) { |
2250 |
+void GlobalParams::parseLine(const char *buf, GString *fileName, int line) { |
2251 |
GList *tokens; |
2252 |
GString *cmd, *incFile; |
2253 |
char *p1, *p2; |
2254 |
@@ -1531,7 +1531,7 @@ |
2255 |
psFonts->add(param->pdfFontName, param); |
2256 |
} |
2257 |
|
2258 |
-void GlobalParams::parsePSFont16(char *cmdName, GList *fontList, |
2259 |
+void GlobalParams::parsePSFont16(const char *cmdName, GList *fontList, |
2260 |
GList *tokens, GString *fileName, int line) { |
2261 |
PSFontParam *param; |
2262 |
int wMode; |
2263 |
@@ -1692,9 +1692,9 @@ |
2264 |
|
2265 |
GBool GlobalParams::parseKey(GString *modKeyStr, GString *contextStr, |
2266 |
int *code, int *mods, int *context, |
2267 |
- char *cmdName, |
2268 |
+ const char *cmdName, |
2269 |
GList *tokens, GString *fileName, int line) { |
2270 |
- char *p0; |
2271 |
+ const char *p0; |
2272 |
|
2273 |
*mods = xpdfKeyModNone; |
2274 |
p0 = modKeyStr->getCString(); |
2275 |
@@ -1821,7 +1821,7 @@ |
2276 |
} |
2277 |
#endif |
2278 |
|
2279 |
-void GlobalParams::parseCommand(char *cmdName, GString **val, |
2280 |
+void GlobalParams::parseCommand(const char *cmdName, GString **val, |
2281 |
GList *tokens, GString *fileName, int line) { |
2282 |
if (tokens->getLength() != 2) { |
2283 |
error(-1, "Bad '%s' config file command (%s:%d)", |
2284 |
@@ -1834,7 +1834,7 @@ |
2285 |
*val = ((GString *)tokens->get(1))->copy(); |
2286 |
} |
2287 |
|
2288 |
-void GlobalParams::parseYesNo(char *cmdName, GBool *flag, |
2289 |
+void GlobalParams::parseYesNo(const char *cmdName, GBool *flag, |
2290 |
GList *tokens, GString *fileName, int line) { |
2291 |
GString *tok; |
2292 |
|
2293 |
@@ -1850,7 +1850,7 @@ |
2294 |
} |
2295 |
} |
2296 |
|
2297 |
-GBool GlobalParams::parseYesNo2(char *token, GBool *flag) { |
2298 |
+GBool GlobalParams::parseYesNo2(const char *token, GBool *flag) { |
2299 |
if (!strcmp(token, "yes")) { |
2300 |
*flag = gTrue; |
2301 |
} else if (!strcmp(token, "no")) { |
2302 |
@@ -1861,7 +1861,7 @@ |
2303 |
return gTrue; |
2304 |
} |
2305 |
|
2306 |
-void GlobalParams::parseInteger(char *cmdName, int *val, |
2307 |
+void GlobalParams::parseInteger(const char *cmdName, int *val, |
2308 |
GList *tokens, GString *fileName, int line) { |
2309 |
GString *tok; |
2310 |
int i; |
2311 |
@@ -1892,7 +1892,7 @@ |
2312 |
*val = atoi(tok->getCString()); |
2313 |
} |
2314 |
|
2315 |
-void GlobalParams::parseFloat(char *cmdName, double *val, |
2316 |
+void GlobalParams::parseFloat(const char *cmdName, double *val, |
2317 |
GList *tokens, GString *fileName, int line) { |
2318 |
GString *tok; |
2319 |
int i; |
2320 |
@@ -1992,12 +1992,12 @@ |
2321 |
|
2322 |
//------------------------------------------------------------------------ |
2323 |
|
2324 |
-void GlobalParams::setBaseDir(char *dir) { |
2325 |
+void GlobalParams::setBaseDir(const char *dir) { |
2326 |
delete baseDir; |
2327 |
baseDir = new GString(dir); |
2328 |
} |
2329 |
|
2330 |
-void GlobalParams::setupBaseFonts(char *dir) { |
2331 |
+void GlobalParams::setupBaseFonts(const char *dir) { |
2332 |
GString *fontName; |
2333 |
GString *fileName; |
2334 |
#ifdef WIN32 |
2335 |
@@ -2109,7 +2109,7 @@ |
2336 |
// accessors |
2337 |
//------------------------------------------------------------------------ |
2338 |
|
2339 |
-CharCode GlobalParams::getMacRomanCharCode(char *charName) { |
2340 |
+CharCode GlobalParams::getMacRomanCharCode(const char *charName) { |
2341 |
// no need to lock - macRomanReverseMap is constant |
2342 |
return macRomanReverseMap->lookup(charName); |
2343 |
} |
2344 |
@@ -2123,7 +2123,7 @@ |
2345 |
return s; |
2346 |
} |
2347 |
|
2348 |
-Unicode GlobalParams::mapNameToUnicode(char *charName) { |
2349 |
+Unicode GlobalParams::mapNameToUnicode(const char *charName) { |
2350 |
// no need to lock - nameToUnicode is constant |
2351 |
return nameToUnicode->lookup(charName); |
2352 |
} |
2353 |
@@ -2456,9 +2456,9 @@ |
2354 |
return tiny; |
2355 |
} |
2356 |
|
2357 |
-GString *GlobalParams::findFontFile(GString *fontName, char **exts) { |
2358 |
+GString *GlobalParams::findFontFile(GString *fontName, const char **exts) { |
2359 |
GString *dir, *fileName; |
2360 |
- char **ext; |
2361 |
+ const char **ext; |
2362 |
FILE *f; |
2363 |
int i; |
2364 |
|
2365 |
@@ -2745,7 +2745,7 @@ |
2366 |
unlockGlobalParams; |
2367 |
} |
2368 |
|
2369 |
-void GlobalParams::setPSFile(char *file) { |
2370 |
+void GlobalParams::setPSFile(const char *file) { |
2371 |
lockGlobalParams; |
2372 |
if (psFile) { |
2373 |
delete psFile; |
2374 |
@@ -2754,7 +2754,7 @@ |
2375 |
unlockGlobalParams; |
2376 |
} |
2377 |
|
2378 |
-GBool GlobalParams::setPSPaperSize(char *size) { |
2379 |
+GBool GlobalParams::setPSPaperSize(const char *size) { |
2380 |
lockGlobalParams; |
2381 |
if (!strcmp(size, "match")) { |
2382 |
psPaperWidth = psPaperHeight = -1; |
2383 |
@@ -2884,14 +2884,14 @@ |
2384 |
unlockGlobalParams; |
2385 |
} |
2386 |
|
2387 |
-void GlobalParams::setTextEncoding(char *encodingName) { |
2388 |
+void GlobalParams::setTextEncoding(const char *encodingName) { |
2389 |
lockGlobalParams; |
2390 |
delete textEncoding; |
2391 |
textEncoding = new GString(encodingName); |
2392 |
unlockGlobalParams; |
2393 |
} |
2394 |
|
2395 |
-GBool GlobalParams::setTextEOL(char *s) { |
2396 |
+GBool GlobalParams::setTextEOL(const char *s) { |
2397 |
lockGlobalParams; |
2398 |
if (!strcmp(s, "unix")) { |
2399 |
textEOL = eolUnix; |
2400 |
@@ -2919,7 +2919,7 @@ |
2401 |
unlockGlobalParams; |
2402 |
} |
2403 |
|
2404 |
-void GlobalParams::setInitialZoom(char *s) { |
2405 |
+void GlobalParams::setInitialZoom(const char *s) { |
2406 |
lockGlobalParams; |
2407 |
delete initialZoom; |
2408 |
initialZoom = new GString(s); |
2409 |
@@ -2932,7 +2932,7 @@ |
2410 |
unlockGlobalParams; |
2411 |
} |
2412 |
|
2413 |
-GBool GlobalParams::setEnableT1lib(char *s) { |
2414 |
+GBool GlobalParams::setEnableT1lib(const char *s) { |
2415 |
GBool ok; |
2416 |
|
2417 |
lockGlobalParams; |
2418 |
@@ -2941,7 +2941,7 @@ |
2419 |
return ok; |
2420 |
} |
2421 |
|
2422 |
-GBool GlobalParams::setEnableFreeType(char *s) { |
2423 |
+GBool GlobalParams::setEnableFreeType(const char *s) { |
2424 |
GBool ok; |
2425 |
|
2426 |
lockGlobalParams; |
2427 |
@@ -2951,7 +2951,7 @@ |
2428 |
} |
2429 |
|
2430 |
|
2431 |
-GBool GlobalParams::setAntialias(char *s) { |
2432 |
+GBool GlobalParams::setAntialias(const char *s) { |
2433 |
GBool ok; |
2434 |
|
2435 |
lockGlobalParams; |
2436 |
@@ -2960,7 +2960,7 @@ |
2437 |
return ok; |
2438 |
} |
2439 |
|
2440 |
-GBool GlobalParams::setVectorAntialias(char *s) { |
2441 |
+GBool GlobalParams::setVectorAntialias(const char *s) { |
2442 |
GBool ok; |
2443 |
|
2444 |
lockGlobalParams; |
2445 |
@@ -3037,7 +3037,7 @@ |
2446 |
#endif |
2447 |
} |
2448 |
|
2449 |
-XpdfSecurityHandler *GlobalParams::getSecurityHandler(char *name) { |
2450 |
+XpdfSecurityHandler *GlobalParams::getSecurityHandler(const char *name) { |
2451 |
#ifdef ENABLE_PLUGINS |
2452 |
XpdfSecurityHandler *hdlr; |
2453 |
int i; |
2454 |
@@ -3075,7 +3075,7 @@ |
2455 |
// plugins |
2456 |
//------------------------------------------------------------------------ |
2457 |
|
2458 |
-GBool GlobalParams::loadPlugin(char *type, char *name) { |
2459 |
+GBool GlobalParams::loadPlugin(const char *type, const char *name) { |
2460 |
Plugin *plugin; |
2461 |
|
2462 |
if (!(plugin = Plugin::load(type, name))) { |
2463 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/GlobalParams.h texlive-20080816-source/libs/xpdf/xpdf/GlobalParams.h |
2464 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/GlobalParams.h 2008-05-08 17:40:41.000000000 +0400 |
2465 |
+++ texlive-20080816-source/libs/xpdf/xpdf/GlobalParams.h 2008-11-21 17:27:00.000000000 +0300 |
2466 |
@@ -172,8 +172,8 @@ |
2467 |
// together) |
2468 |
GList *cmds; // list of commands [GString] |
2469 |
|
2470 |
- KeyBinding(int codeA, int modsA, int contextA, char *cmd0); |
2471 |
- KeyBinding(int codeA, int modsA, int contextA, char *cmd0, char *cmd1); |
2472 |
+ KeyBinding(int codeA, int modsA, int contextA, const char *cmd0); |
2473 |
+ KeyBinding(int codeA, int modsA, int contextA, const char *cmd0, const char *cmd1); |
2474 |
KeyBinding(int codeA, int modsA, int contextA, GList *cmdsA); |
2475 |
~KeyBinding(); |
2476 |
}; |
2477 |
@@ -232,26 +232,26 @@ |
2478 |
|
2479 |
// Initialize the global parameters by attempting to read a config |
2480 |
// file. |
2481 |
- GlobalParams(char *cfgFileName); |
2482 |
+ GlobalParams(const char *cfgFileName); |
2483 |
|
2484 |
// Initialize it without reading the config |
2485 |
GlobalParams(); |
2486 |
|
2487 |
~GlobalParams(); |
2488 |
|
2489 |
- void setBaseDir(char *dir); |
2490 |
- void setupBaseFonts(char *dir); |
2491 |
+ void setBaseDir(const char *dir); |
2492 |
+ void setupBaseFonts(const char *dir); |
2493 |
|
2494 |
#ifndef PDF_PARSER_ONLY |
2495 |
- void parseLine(char *buf, GString *fileName, int line); |
2496 |
+ void parseLine(const char *buf, GString *fileName, int line); |
2497 |
#endif |
2498 |
|
2499 |
//----- accessors |
2500 |
|
2501 |
- CharCode getMacRomanCharCode(char *charName); |
2502 |
+ CharCode getMacRomanCharCode(const char *charName); |
2503 |
|
2504 |
GString *getBaseDir(); |
2505 |
- Unicode mapNameToUnicode(char *charName); |
2506 |
+ Unicode mapNameToUnicode(const char *charName); |
2507 |
UnicodeMap *getResidentUnicodeMap(GString *encodingName); |
2508 |
FILE *getUnicodeMapFile(GString *encodingName); |
2509 |
FILE *findCMapFile(GString *collection, GString *cMapName); |
2510 |
@@ -281,7 +281,7 @@ |
2511 |
EndOfLineKind getTextEOL(); |
2512 |
GBool getTextPageBreaks(); |
2513 |
GBool getTextKeepTinyChars(); |
2514 |
- GString *findFontFile(GString *fontName, char **exts); |
2515 |
+ GString *findFontFile(GString *fontName, const char **exts); |
2516 |
GString *getInitialZoom(); |
2517 |
GBool getContinuousView(); |
2518 |
GBool getEnableT1lib(); |
2519 |
@@ -314,8 +314,8 @@ |
2520 |
//----- functions to set parameters |
2521 |
|
2522 |
void addDisplayFont(DisplayFontParam *param); |
2523 |
- void setPSFile(char *file); |
2524 |
- GBool setPSPaperSize(char *size); |
2525 |
+ void setPSFile(const char *file); |
2526 |
+ GBool setPSPaperSize(const char *size); |
2527 |
void setPSPaperWidth(int width); |
2528 |
void setPSPaperHeight(int height); |
2529 |
void setPSImageableArea(int llx, int lly, int urx, int ury); |
2530 |
@@ -332,16 +332,16 @@ |
2531 |
void setPSPreload(GBool preload); |
2532 |
void setPSOPI(GBool opi); |
2533 |
void setPSASCIIHex(GBool hex); |
2534 |
- void setTextEncoding(char *encodingName); |
2535 |
- GBool setTextEOL(char *s); |
2536 |
+ void setTextEncoding(const char *encodingName); |
2537 |
+ GBool setTextEOL(const char *s); |
2538 |
void setTextPageBreaks(GBool pageBreaks); |
2539 |
void setTextKeepTinyChars(GBool keep); |
2540 |
- void setInitialZoom(char *s); |
2541 |
+ void setInitialZoom(const char *s); |
2542 |
void setContinuousView(GBool cont); |
2543 |
- GBool setEnableT1lib(char *s); |
2544 |
- GBool setEnableFreeType(char *s); |
2545 |
- GBool setAntialias(char *s); |
2546 |
- GBool setVectorAntialias(char *s); |
2547 |
+ GBool setEnableT1lib(const char *s); |
2548 |
+ GBool setEnableFreeType(const char *s); |
2549 |
+ GBool setAntialias(const char *s); |
2550 |
+ GBool setVectorAntialias(const char *s); |
2551 |
void setScreenType(ScreenType t); |
2552 |
void setScreenSize(int size); |
2553 |
void setScreenDotRadius(int r); |
2554 |
@@ -356,7 +356,7 @@ |
2555 |
//----- security handlers |
2556 |
|
2557 |
void addSecurityHandler(XpdfSecurityHandler *handler); |
2558 |
- XpdfSecurityHandler *getSecurityHandler(char *name); |
2559 |
+ XpdfSecurityHandler *getSecurityHandler(const char *name); |
2560 |
|
2561 |
private: |
2562 |
|
2563 |
@@ -378,7 +378,7 @@ |
2564 |
void parsePSImageableArea(GList *tokens, GString *fileName, int line); |
2565 |
void parsePSLevel(GList *tokens, GString *fileName, int line); |
2566 |
void parsePSFont(GList *tokens, GString *fileName, int line); |
2567 |
- void parsePSFont16(char *cmdName, GList *fontList, |
2568 |
+ void parsePSFont16(const char *cmdName, GList *fontList, |
2569 |
GList *tokens, GString *fileName, int line); |
2570 |
void parseTextEncoding(GList *tokens, GString *fileName, int line); |
2571 |
void parseTextEOL(GList *tokens, GString *fileName, int line); |
2572 |
@@ -390,21 +390,21 @@ |
2573 |
void parseUnbind(GList *tokens, GString *fileName, int line); |
2574 |
GBool parseKey(GString *modKeyStr, GString *contextStr, |
2575 |
int *code, int *mods, int *context, |
2576 |
- char *cmdName, |
2577 |
+ const char *cmdName, |
2578 |
GList *tokens, GString *fileName, int line); |
2579 |
#endif |
2580 |
- void parseCommand(char *cmdName, GString **val, |
2581 |
+ void parseCommand(const char *cmdName, GString **val, |
2582 |
GList *tokens, GString *fileName, int line); |
2583 |
- void parseYesNo(char *cmdName, GBool *flag, |
2584 |
+ void parseYesNo(const char *cmdName, GBool *flag, |
2585 |
GList *tokens, GString *fileName, int line); |
2586 |
- GBool parseYesNo2(char *token, GBool *flag); |
2587 |
- void parseInteger(char *cmdName, int *val, |
2588 |
+ GBool parseYesNo2(const char *token, GBool *flag); |
2589 |
+ void parseInteger(const char *cmdName, int *val, |
2590 |
GList *tokens, GString *fileName, int line); |
2591 |
- void parseFloat(char *cmdName, double *val, |
2592 |
+ void parseFloat(const char *cmdName, double *val, |
2593 |
GList *tokens, GString *fileName, int line); |
2594 |
UnicodeMap *getUnicodeMap2(GString *encodingName); |
2595 |
#ifdef ENABLE_PLUGINS |
2596 |
- GBool loadPlugin(char *type, char *name); |
2597 |
+ GBool loadPlugin(const char *type, const char *name); |
2598 |
#endif |
2599 |
|
2600 |
//----- static tables |
2601 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/Link.cc texlive-20080816-source/libs/xpdf/xpdf/Link.cc |
2602 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/Link.cc 2007-07-12 01:13:59.000000000 +0400 |
2603 |
+++ texlive-20080816-source/libs/xpdf/xpdf/Link.cc 2008-11-21 17:19:11.000000000 +0300 |
2604 |
@@ -626,7 +626,7 @@ |
2605 |
// LinkUnknown |
2606 |
//------------------------------------------------------------------------ |
2607 |
|
2608 |
-LinkUnknown::LinkUnknown(char *actionA) { |
2609 |
+LinkUnknown::LinkUnknown(const char *actionA) { |
2610 |
action = new GString(actionA); |
2611 |
} |
2612 |
|
2613 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/Link.h texlive-20080816-source/libs/xpdf/xpdf/Link.h |
2614 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/Link.h 2007-07-12 01:13:59.000000000 +0400 |
2615 |
+++ texlive-20080816-source/libs/xpdf/xpdf/Link.h 2008-11-21 17:18:48.000000000 +0300 |
2616 |
@@ -284,7 +284,7 @@ |
2617 |
public: |
2618 |
|
2619 |
// Build a LinkUnknown with the specified action type. |
2620 |
- LinkUnknown(char *actionA); |
2621 |
+ LinkUnknown(const char *actionA); |
2622 |
|
2623 |
// Destructor. |
2624 |
virtual ~LinkUnknown(); |
2625 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/NameToCharCode.cc texlive-20080816-source/libs/xpdf/xpdf/NameToCharCode.cc |
2626 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/NameToCharCode.cc 2006-01-16 03:09:26.000000000 +0300 |
2627 |
+++ texlive-20080816-source/libs/xpdf/xpdf/NameToCharCode.cc 2008-11-21 17:19:46.000000000 +0300 |
2628 |
@@ -19,7 +19,7 @@ |
2629 |
//------------------------------------------------------------------------ |
2630 |
|
2631 |
struct NameToCharCodeEntry { |
2632 |
- char *name; |
2633 |
+ const char *name; |
2634 |
CharCode c; |
2635 |
}; |
2636 |
|
2637 |
@@ -41,13 +41,13 @@ |
2638 |
|
2639 |
for (i = 0; i < size; ++i) { |
2640 |
if (tab[i].name) { |
2641 |
- gfree(tab[i].name); |
2642 |
+ gfree(const_cast<char*>(tab[i].name)); |
2643 |
} |
2644 |
} |
2645 |
gfree(tab); |
2646 |
} |
2647 |
|
2648 |
-void NameToCharCode::add(char *name, CharCode c) { |
2649 |
+void NameToCharCode::add(const char *name, CharCode c) { |
2650 |
NameToCharCodeEntry *oldTab; |
2651 |
int h, i, oldSize; |
2652 |
|
2653 |
@@ -89,7 +89,7 @@ |
2654 |
++len; |
2655 |
} |
2656 |
|
2657 |
-CharCode NameToCharCode::lookup(char *name) { |
2658 |
+CharCode NameToCharCode::lookup(const char *name) { |
2659 |
int h; |
2660 |
|
2661 |
h = hash(name); |
2662 |
@@ -104,8 +104,8 @@ |
2663 |
return 0; |
2664 |
} |
2665 |
|
2666 |
-int NameToCharCode::hash(char *name) { |
2667 |
- char *p; |
2668 |
+int NameToCharCode::hash(const char *name) { |
2669 |
+ const char *p; |
2670 |
unsigned int h; |
2671 |
|
2672 |
h = 0; |
2673 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/NameToCharCode.h texlive-20080816-source/libs/xpdf/xpdf/NameToCharCode.h |
2674 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/NameToCharCode.h 2006-01-16 03:09:26.000000000 +0300 |
2675 |
+++ texlive-20080816-source/libs/xpdf/xpdf/NameToCharCode.h 2008-11-21 17:05:25.000000000 +0300 |
2676 |
@@ -27,12 +27,12 @@ |
2677 |
NameToCharCode(); |
2678 |
~NameToCharCode(); |
2679 |
|
2680 |
- void add(char *name, CharCode c); |
2681 |
- CharCode lookup(char *name); |
2682 |
+ void add(const char *name, CharCode c); |
2683 |
+ CharCode lookup(const char *name); |
2684 |
|
2685 |
private: |
2686 |
|
2687 |
- int hash(char *name); |
2688 |
+ int hash(const char *name); |
2689 |
|
2690 |
NameToCharCodeEntry *tab; |
2691 |
int size; |
2692 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/NameToUnicodeTable.h texlive-20080816-source/libs/xpdf/xpdf/NameToUnicodeTable.h |
2693 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/NameToUnicodeTable.h 2006-01-16 03:09:26.000000000 +0300 |
2694 |
+++ texlive-20080816-source/libs/xpdf/xpdf/NameToUnicodeTable.h 2008-11-21 16:18:19.000000000 +0300 |
2695 |
@@ -8,7 +8,7 @@ |
2696 |
|
2697 |
static struct { |
2698 |
Unicode u; |
2699 |
- char *name; |
2700 |
+ const char *name; |
2701 |
} nameToUnicodeTab[] = { |
2702 |
{0x0021, "!"}, |
2703 |
{0x0023, "#"}, |
2704 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/Object.cc texlive-20080816-source/libs/xpdf/xpdf/Object.cc |
2705 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/Object.cc 2006-01-16 03:09:26.000000000 +0300 |
2706 |
+++ texlive-20080816-source/libs/xpdf/xpdf/Object.cc 2008-11-21 17:23:26.000000000 +0300 |
2707 |
@@ -24,7 +24,7 @@ |
2708 |
// Object |
2709 |
//------------------------------------------------------------------------ |
2710 |
|
2711 |
-char *objTypeNames[numObjTypes] = { |
2712 |
+const char *objTypeNames[numObjTypes] = { |
2713 |
"boolean", |
2714 |
"integer", |
2715 |
"real", |
2716 |
@@ -112,7 +112,7 @@ |
2717 |
delete string; |
2718 |
break; |
2719 |
case objName: |
2720 |
- gfree(name); |
2721 |
+ gfree(const_cast<char*>(name)); |
2722 |
break; |
2723 |
case objArray: |
2724 |
if (!array->decRef()) { |
2725 |
@@ -130,7 +130,7 @@ |
2726 |
} |
2727 |
break; |
2728 |
case objCmd: |
2729 |
- gfree(cmd); |
2730 |
+ gfree(const_cast<char*>(cmd)); |
2731 |
break; |
2732 |
default: |
2733 |
break; |
2734 |
@@ -141,7 +141,7 @@ |
2735 |
type = objNone; |
2736 |
} |
2737 |
|
2738 |
-char *Object::getTypeName() { |
2739 |
+const char *Object::getTypeName() { |
2740 |
return objTypeNames[type]; |
2741 |
} |
2742 |
|
2743 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/Object.h texlive-20080816-source/libs/xpdf/xpdf/Object.h |
2744 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/Object.h 2006-01-16 03:09:26.000000000 +0300 |
2745 |
+++ texlive-20080816-source/libs/xpdf/xpdf/Object.h 2008-11-21 17:49:30.000000000 +0300 |
2746 |
@@ -89,7 +89,7 @@ |
2747 |
{ initObj(objReal); real = realA; return this; } |
2748 |
Object *initString(GString *stringA) |
2749 |
{ initObj(objString); string = stringA; return this; } |
2750 |
- Object *initName(char *nameA) |
2751 |
+ Object *initName(const char *nameA) |
2752 |
{ initObj(objName); name = copyString(nameA); return this; } |
2753 |
Object *initNull() |
2754 |
{ initObj(objNull); return this; } |
2755 |
@@ -99,7 +99,7 @@ |
2756 |
Object *initStream(Stream *streamA); |
2757 |
Object *initRef(int numA, int genA) |
2758 |
{ initObj(objRef); ref.num = numA; ref.gen = genA; return this; } |
2759 |
- Object *initCmd(char *cmdA) |
2760 |
+ Object *initCmd(const char *cmdA) |
2761 |
{ initObj(objCmd); cmd = copyString(cmdA); return this; } |
2762 |
Object *initError() |
2763 |
{ initObj(objError); return this; } |
2764 |
@@ -135,11 +135,11 @@ |
2765 |
GBool isNone() { return type == objNone; } |
2766 |
|
2767 |
// Special type checking. |
2768 |
- GBool isName(char *nameA) |
2769 |
+ GBool isName(const char *nameA) |
2770 |
{ return type == objName && !strcmp(name, nameA); } |
2771 |
- GBool isDict(char *dictType); |
2772 |
- GBool isStream(char *dictType); |
2773 |
- GBool isCmd(char *cmdA) |
2774 |
+ GBool isDict(const char *dictType); |
2775 |
+ GBool isStream(const char *dictType); |
2776 |
+ GBool isCmd(const char *cmdA) |
2777 |
{ return type == objCmd && !strcmp(cmd, cmdA); } |
2778 |
|
2779 |
// Accessors. NB: these assume object is of correct type. |
2780 |
@@ -148,14 +148,14 @@ |
2781 |
double getReal() { return real; } |
2782 |
double getNum() { return type == objInt ? (double)intg : real; } |
2783 |
GString *getString() { return string; } |
2784 |
- char *getName() { return name; } |
2785 |
+ const char *getName() { return name; } |
2786 |
Array *getArray() { return array; } |
2787 |
Dict *getDict() { return dict; } |
2788 |
Stream *getStream() { return stream; } |
2789 |
Ref getRef() { return ref; } |
2790 |
int getRefNum() { return ref.num; } |
2791 |
int getRefGen() { return ref.gen; } |
2792 |
- char *getCmd() { return cmd; } |
2793 |
+ const char *getCmd() { return cmd; } |
2794 |
|
2795 |
// Array accessors. |
2796 |
int arrayGetLength(); |
2797 |
@@ -165,16 +165,16 @@ |
2798 |
|
2799 |
// Dict accessors. |
2800 |
int dictGetLength(); |
2801 |
- void dictAdd(char *key, Object *val); |
2802 |
- GBool dictIs(char *dictType); |
2803 |
- Object *dictLookup(char *key, Object *obj); |
2804 |
- Object *dictLookupNF(char *key, Object *obj); |
2805 |
- char *dictGetKey(int i); |
2806 |
+ void dictAdd(const char *key, Object *val); |
2807 |
+ GBool dictIs(const char *dictType); |
2808 |
+ Object *dictLookup(const char *key, Object *obj); |
2809 |
+ Object *dictLookupNF(const char *key, Object *obj); |
2810 |
+ const char *dictGetKey(int i); |
2811 |
Object *dictGetVal(int i, Object *obj); |
2812 |
Object *dictGetValNF(int i, Object *obj); |
2813 |
|
2814 |
// Stream accessors. |
2815 |
- GBool streamIs(char *dictType); |
2816 |
+ GBool streamIs(const char *dictType); |
2817 |
void streamReset(); |
2818 |
void streamClose(); |
2819 |
int streamGetChar(); |
2820 |
@@ -185,7 +185,7 @@ |
2821 |
Dict *streamGetDict(); |
2822 |
|
2823 |
// Output. |
2824 |
- char *getTypeName(); |
2825 |
+ const char *getTypeName(); |
2826 |
void print(FILE *f = stdout); |
2827 |
|
2828 |
// Memory testing. |
2829 |
@@ -199,12 +199,12 @@ |
2830 |
int intg; // integer |
2831 |
double real; // real |
2832 |
GString *string; // string |
2833 |
- char *name; // name |
2834 |
+ const char *name; // name |
2835 |
Array *array; // array |
2836 |
Dict *dict; // dictionary |
2837 |
Stream *stream; // stream |
2838 |
Ref ref; // indirect reference |
2839 |
- char *cmd; // command |
2840 |
+ const char *cmd; // command |
2841 |
}; |
2842 |
|
2843 |
#ifdef DEBUG_MEM |
2844 |
@@ -240,22 +240,22 @@ |
2845 |
inline int Object::dictGetLength() |
2846 |
{ return dict->getLength(); } |
2847 |
|
2848 |
-inline void Object::dictAdd(char *key, Object *val) |
2849 |
+inline void Object::dictAdd(const char *key, Object *val) |
2850 |
{ dict->add(key, val); } |
2851 |
|
2852 |
-inline GBool Object::dictIs(char *dictType) |
2853 |
+inline GBool Object::dictIs(const char *dictType) |
2854 |
{ return dict->is(dictType); } |
2855 |
|
2856 |
-inline GBool Object::isDict(char *dictType) |
2857 |
+inline GBool Object::isDict(const char *dictType) |
2858 |
{ return type == objDict && dictIs(dictType); } |
2859 |
|
2860 |
-inline Object *Object::dictLookup(char *key, Object *obj) |
2861 |
+inline Object *Object::dictLookup(const char *key, Object *obj) |
2862 |
{ return dict->lookup(key, obj); } |
2863 |
|
2864 |
-inline Object *Object::dictLookupNF(char *key, Object *obj) |
2865 |
+inline Object *Object::dictLookupNF(const char *key, Object *obj) |
2866 |
{ return dict->lookupNF(key, obj); } |
2867 |
|
2868 |
-inline char *Object::dictGetKey(int i) |
2869 |
+inline const char *Object::dictGetKey(int i) |
2870 |
{ return dict->getKey(i); } |
2871 |
|
2872 |
inline Object *Object::dictGetVal(int i, Object *obj) |
2873 |
@@ -270,10 +270,10 @@ |
2874 |
|
2875 |
#include "Stream.h" |
2876 |
|
2877 |
-inline GBool Object::streamIs(char *dictType) |
2878 |
+inline GBool Object::streamIs(const char *dictType) |
2879 |
{ return stream->getDict()->is(dictType); } |
2880 |
|
2881 |
-inline GBool Object::isStream(char *dictType) |
2882 |
+inline GBool Object::isStream(const char *dictType) |
2883 |
{ return type == objStream && streamIs(dictType); } |
2884 |
|
2885 |
inline void Object::streamReset() |
2886 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/Page.cc texlive-20080816-source/libs/xpdf/xpdf/Page.cc |
2887 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/Page.cc 2008-05-08 17:40:41.000000000 +0400 |
2888 |
+++ texlive-20080816-source/libs/xpdf/xpdf/Page.cc 2008-11-21 17:43:25.000000000 +0300 |
2889 |
@@ -184,7 +184,7 @@ |
2890 |
resources.free(); |
2891 |
} |
2892 |
|
2893 |
-GBool PageAttrs::readBox(Dict *dict, char *key, PDFRectangle *box) { |
2894 |
+GBool PageAttrs::readBox(Dict *dict, const char *key, PDFRectangle *box) { |
2895 |
PDFRectangle tmp; |
2896 |
double t; |
2897 |
Object obj1, obj2; |
2898 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/Page.h texlive-20080816-source/libs/xpdf/xpdf/Page.h |
2899 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/Page.h 2008-05-08 17:40:41.000000000 +0400 |
2900 |
+++ texlive-20080816-source/libs/xpdf/xpdf/Page.h 2008-11-21 17:43:36.000000000 +0300 |
2901 |
@@ -114,7 +114,7 @@ |
2902 |
|
2903 |
private: |
2904 |
|
2905 |
- GBool readBox(Dict *dict, char *key, PDFRectangle *box); |
2906 |
+ GBool readBox(Dict *dict, const char *key, PDFRectangle *box); |
2907 |
|
2908 |
PDFRectangle mediaBox; |
2909 |
PDFRectangle cropBox; |
2910 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/Stream.cc texlive-20080816-source/libs/xpdf/xpdf/Stream.cc |
2911 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/Stream.cc 2008-03-23 19:38:33.000000000 +0300 |
2912 |
+++ texlive-20080816-source/libs/xpdf/xpdf/Stream.cc 2008-11-21 17:50:08.000000000 +0300 |
2913 |
@@ -85,7 +85,7 @@ |
2914 |
return buf; |
2915 |
} |
2916 |
|
2917 |
-GString *Stream::getPSFilter(int psLevel, char *indent) { |
2918 |
+GString *Stream::getPSFilter(int psLevel, const char *indent) { |
2919 |
return new GString(); |
2920 |
} |
2921 |
|
2922 |
@@ -133,7 +133,7 @@ |
2923 |
return str; |
2924 |
} |
2925 |
|
2926 |
-Stream *Stream::makeFilter(char *name, Stream *str, Object *params) { |
2927 |
+Stream *Stream::makeFilter(const char *name, Stream *str, Object *params) { |
2928 |
int pred; // parameters |
2929 |
int colors; |
2930 |
int bits; |
2931 |
@@ -878,7 +878,7 @@ |
2932 |
return buf; |
2933 |
} |
2934 |
|
2935 |
-GString *ASCIIHexStream::getPSFilter(int psLevel, char *indent) { |
2936 |
+GString *ASCIIHexStream::getPSFilter(int psLevel, const char *indent) { |
2937 |
GString *s; |
2938 |
|
2939 |
if (psLevel < 2) { |
2940 |
@@ -959,7 +959,7 @@ |
2941 |
return b[index]; |
2942 |
} |
2943 |
|
2944 |
-GString *ASCII85Stream::getPSFilter(int psLevel, char *indent) { |
2945 |
+GString *ASCII85Stream::getPSFilter(int psLevel, const char *indent) { |
2946 |
GString *s; |
2947 |
|
2948 |
if (psLevel < 2) { |
2949 |
@@ -1145,7 +1145,7 @@ |
2950 |
return code; |
2951 |
} |
2952 |
|
2953 |
-GString *LZWStream::getPSFilter(int psLevel, char *indent) { |
2954 |
+GString *LZWStream::getPSFilter(int psLevel, const char *indent) { |
2955 |
GString *s; |
2956 |
|
2957 |
if (psLevel < 2 || pred) { |
2958 |
@@ -1186,7 +1186,7 @@ |
2959 |
eof = gFalse; |
2960 |
} |
2961 |
|
2962 |
-GString *RunLengthStream::getPSFilter(int psLevel, char *indent) { |
2963 |
+GString *RunLengthStream::getPSFilter(int psLevel, const char *indent) { |
2964 |
GString *s; |
2965 |
|
2966 |
if (psLevel < 2) { |
2967 |
@@ -1834,7 +1834,7 @@ |
2968 |
return (inputBuf >> (inputBits - n)) & (0xffff >> (16 - n)); |
2969 |
} |
2970 |
|
2971 |
-GString *CCITTFaxStream::getPSFilter(int psLevel, char *indent) { |
2972 |
+GString *CCITTFaxStream::getPSFilter(int psLevel, const char *indent) { |
2973 |
GString *s; |
2974 |
char s1[50]; |
2975 |
|
2976 |
@@ -3289,7 +3289,7 @@ |
2977 |
return (c1 << 8) + c2; |
2978 |
} |
2979 |
|
2980 |
-GString *DCTStream::getPSFilter(int psLevel, char *indent) { |
2981 |
+GString *DCTStream::getPSFilter(int psLevel, const char *indent) { |
2982 |
GString *s; |
2983 |
|
2984 |
if (psLevel < 2) { |
2985 |
@@ -4051,7 +4051,7 @@ |
2986 |
return c; |
2987 |
} |
2988 |
|
2989 |
-GString *FlateStream::getPSFilter(int psLevel, char *indent) { |
2990 |
+GString *FlateStream::getPSFilter(int psLevel, const char *indent) { |
2991 |
GString *s; |
2992 |
|
2993 |
if (psLevel < 3 || pred) { |
2994 |
@@ -4466,7 +4466,7 @@ |
2995 |
} |
2996 |
|
2997 |
GBool ASCIIHexEncoder::fillBuf() { |
2998 |
- static char *hex = "0123456789abcdef"; |
2999 |
+ static const char *hex = "0123456789abcdef"; |
3000 |
int c; |
3001 |
|
3002 |
if (eof) { |
3003 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/Stream.h texlive-20080816-source/libs/xpdf/xpdf/Stream.h |
3004 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/Stream.h 2008-05-08 17:40:41.000000000 +0400 |
3005 |
+++ texlive-20080816-source/libs/xpdf/xpdf/Stream.h 2008-11-21 17:50:23.000000000 +0300 |
3006 |
@@ -154,7 +154,7 @@ |
3007 |
virtual void setPos(Guint pos, int dir = 0) = 0; |
3008 |
|
3009 |
// Get PostScript command for the filter(s). |
3010 |
- virtual GString *getPSFilter(int psLevel, char *indent); |
3011 |
+ virtual GString *getPSFilter(int psLevel, const char *indent); |
3012 |
|
3013 |
// Does this stream type potentially contain non-printable chars? |
3014 |
virtual GBool isBinary(GBool last = gTrue) = 0; |
3015 |
@@ -185,7 +185,7 @@ |
3016 |
|
3017 |
private: |
3018 |
|
3019 |
- Stream *makeFilter(char *name, Stream *str, Object *params); |
3020 |
+ Stream *makeFilter(const char *name, Stream *str, Object *params); |
3021 |
|
3022 |
int ref; // reference count |
3023 |
}; |
3024 |
@@ -440,7 +440,7 @@ |
3025 |
virtual int getChar() |
3026 |
{ int c = lookChar(); buf = EOF; return c; } |
3027 |
virtual int lookChar(); |
3028 |
- virtual GString *getPSFilter(int psLevel, char *indent); |
3029 |
+ virtual GString *getPSFilter(int psLevel, const char *indent); |
3030 |
virtual GBool isBinary(GBool last = gTrue); |
3031 |
|
3032 |
private: |
3033 |
@@ -463,7 +463,7 @@ |
3034 |
virtual int getChar() |
3035 |
{ int ch = lookChar(); ++index; return ch; } |
3036 |
virtual int lookChar(); |
3037 |
- virtual GString *getPSFilter(int psLevel, char *indent); |
3038 |
+ virtual GString *getPSFilter(int psLevel, const char *indent); |
3039 |
virtual GBool isBinary(GBool last = gTrue); |
3040 |
|
3041 |
private: |
3042 |
@@ -489,7 +489,7 @@ |
3043 |
virtual int getChar(); |
3044 |
virtual int lookChar(); |
3045 |
virtual int getRawChar(); |
3046 |
- virtual GString *getPSFilter(int psLevel, char *indent); |
3047 |
+ virtual GString *getPSFilter(int psLevel, const char *indent); |
3048 |
virtual GBool isBinary(GBool last = gTrue); |
3049 |
|
3050 |
private: |
3051 |
@@ -533,7 +533,7 @@ |
3052 |
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); } |
3053 |
virtual int lookChar() |
3054 |
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); } |
3055 |
- virtual GString *getPSFilter(int psLevel, char *indent); |
3056 |
+ virtual GString *getPSFilter(int psLevel, const char *indent); |
3057 |
virtual GBool isBinary(GBool last = gTrue); |
3058 |
|
3059 |
private: |
3060 |
@@ -564,7 +564,7 @@ |
3061 |
virtual int getChar() |
3062 |
{ int c = lookChar(); buf = EOF; return c; } |
3063 |
virtual int lookChar(); |
3064 |
- virtual GString *getPSFilter(int psLevel, char *indent); |
3065 |
+ virtual GString *getPSFilter(int psLevel, const char *indent); |
3066 |
virtual GBool isBinary(GBool last = gTrue); |
3067 |
|
3068 |
private: |
3069 |
@@ -637,7 +637,7 @@ |
3070 |
virtual void close(); |
3071 |
virtual int getChar(); |
3072 |
virtual int lookChar(); |
3073 |
- virtual GString *getPSFilter(int psLevel, char *indent); |
3074 |
+ virtual GString *getPSFilter(int psLevel, const char *indent); |
3075 |
virtual GBool isBinary(GBool last = gTrue); |
3076 |
Stream *getRawStream() { return str; } |
3077 |
|
3078 |
@@ -740,7 +740,7 @@ |
3079 |
virtual int getChar(); |
3080 |
virtual int lookChar(); |
3081 |
virtual int getRawChar(); |
3082 |
- virtual GString *getPSFilter(int psLevel, char *indent); |
3083 |
+ virtual GString *getPSFilter(int psLevel, const char *indent); |
3084 |
virtual GBool isBinary(GBool last = gTrue); |
3085 |
|
3086 |
private: |
3087 |
@@ -793,7 +793,7 @@ |
3088 |
virtual void reset() {} |
3089 |
virtual int getChar() { return EOF; } |
3090 |
virtual int lookChar() { return EOF; } |
3091 |
- virtual GString *getPSFilter(int psLevel, char *indent) { return NULL; } |
3092 |
+ virtual GString *getPSFilter(int psLevel, const char *indent) { return NULL; } |
3093 |
virtual GBool isBinary(GBool last = gTrue) { return gFalse; } |
3094 |
}; |
3095 |
|
3096 |
@@ -810,7 +810,7 @@ |
3097 |
virtual void reset(); |
3098 |
virtual int getChar(); |
3099 |
virtual int lookChar(); |
3100 |
- virtual GString *getPSFilter(int psLevel, char *indent) { return NULL; } |
3101 |
+ virtual GString *getPSFilter(int psLevel, const char *indent) { return NULL; } |
3102 |
virtual GBool isBinary(GBool last = gTrue); |
3103 |
virtual GBool isEncoder() { return gTrue; } |
3104 |
|
3105 |
@@ -835,7 +835,7 @@ |
3106 |
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); } |
3107 |
virtual int lookChar() |
3108 |
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); } |
3109 |
- virtual GString *getPSFilter(int psLevel, char *indent) { return NULL; } |
3110 |
+ virtual GString *getPSFilter(int psLevel, const char *indent) { return NULL; } |
3111 |
virtual GBool isBinary(GBool last = gTrue) { return gFalse; } |
3112 |
virtual GBool isEncoder() { return gTrue; } |
3113 |
|
3114 |
@@ -865,7 +865,7 @@ |
3115 |
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); } |
3116 |
virtual int lookChar() |
3117 |
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); } |
3118 |
- virtual GString *getPSFilter(int psLevel, char *indent) { return NULL; } |
3119 |
+ virtual GString *getPSFilter(int psLevel, const char *indent) { return NULL; } |
3120 |
virtual GBool isBinary(GBool last = gTrue) { return gFalse; } |
3121 |
virtual GBool isEncoder() { return gTrue; } |
3122 |
|
3123 |
@@ -895,7 +895,7 @@ |
3124 |
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); } |
3125 |
virtual int lookChar() |
3126 |
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); } |
3127 |
- virtual GString *getPSFilter(int psLevel, char *indent) { return NULL; } |
3128 |
+ virtual GString *getPSFilter(int psLevel, const char *indent) { return NULL; } |
3129 |
virtual GBool isBinary(GBool last = gTrue) { return gTrue; } |
3130 |
virtual GBool isEncoder() { return gTrue; } |
3131 |
|
3132 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/UnicodeMap.cc texlive-20080816-source/libs/xpdf/xpdf/UnicodeMap.cc |
3133 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/UnicodeMap.cc 2006-01-16 03:09:26.000000000 +0300 |
3134 |
+++ texlive-20080816-source/libs/xpdf/xpdf/UnicodeMap.cc 2008-11-21 17:20:50.000000000 +0300 |
3135 |
@@ -121,7 +121,7 @@ |
3136 |
#endif |
3137 |
} |
3138 |
|
3139 |
-UnicodeMap::UnicodeMap(char *encodingNameA, GBool unicodeOutA, |
3140 |
+UnicodeMap::UnicodeMap(const char *encodingNameA, GBool unicodeOutA, |
3141 |
UnicodeMapRange *rangesA, int lenA) { |
3142 |
encodingName = new GString(encodingNameA); |
3143 |
unicodeOut = unicodeOutA; |
3144 |
@@ -136,7 +136,7 @@ |
3145 |
#endif |
3146 |
} |
3147 |
|
3148 |
-UnicodeMap::UnicodeMap(char *encodingNameA, GBool unicodeOutA, |
3149 |
+UnicodeMap::UnicodeMap(const char *encodingNameA, GBool unicodeOutA, |
3150 |
UnicodeMapFunc funcA) { |
3151 |
encodingName = new GString(encodingNameA); |
3152 |
unicodeOut = unicodeOutA; |
3153 |
diff -ur texlive-20080816-source/libs/xpdf.orig/xpdf/UnicodeMap.h texlive-20080816-source/libs/xpdf/xpdf/UnicodeMap.h |
3154 |
--- texlive-20080816-source/libs/xpdf.orig/xpdf/UnicodeMap.h 2006-01-16 03:09:26.000000000 +0300 |
3155 |
+++ texlive-20080816-source/libs/xpdf/xpdf/UnicodeMap.h 2008-11-21 17:20:34.000000000 +0300 |
3156 |
@@ -53,12 +53,12 @@ |
3157 |
static UnicodeMap *parse(GString *encodingNameA); |
3158 |
|
3159 |
// Create a resident UnicodeMap. |
3160 |
- UnicodeMap(char *encodingNameA, GBool unicodeOutA, |
3161 |
+ UnicodeMap(const char *encodingNameA, GBool unicodeOutA, |
3162 |
UnicodeMapRange *rangesA, int lenA); |
3163 |
|
3164 |
// Create a resident UnicodeMap that uses a function instead of a |
3165 |
// list of ranges. |
3166 |
- UnicodeMap(char *encodingNameA, GBool unicodeOutA, |
3167 |
+ UnicodeMap(const char *encodingNameA, GBool unicodeOutA, |
3168 |
UnicodeMapFunc funcA); |
3169 |
|
3170 |
~UnicodeMap(); |