summaryrefslogtreecommitdiff
path: root/Build/source/libs/xpdf/xpdf-3.03-PATCHES/patch-20-skip-reading-config-file
blob: 0de2b00314e2b180d3be299b5b62e0ad523286e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
	Patches for pdfTeX / luaTeX / XeTeX

	Declare GlobalParams constructor without config file argument
	and skip reading a config file.

	from:
		Han The Thanh <thanh@pdftex.org>
		Peter Breitenlohner <tex-live@tug.org>

diff -ur -N xpdf-3.03.orig/xpdf/GlobalParams.cc xpdf-3.03/xpdf/GlobalParams.cc
--- xpdf-3.03.orig/xpdf/GlobalParams.cc	2011-08-22 13:57:15.000000000 +0200
+++ xpdf-3.03/xpdf/GlobalParams.cc	2011-08-22 14:11:46.000000000 +0200
@@ -628,10 +628,15 @@
 // parsing
 //------------------------------------------------------------------------
 
+#ifdef PDF_PARSER_ONLY
+GlobalParams::GlobalParams() {
+  UnicodeMap *map;
+#else
 GlobalParams::GlobalParams(char *cfgFileName) {
   UnicodeMap *map;
   GString *fileName;
   FILE *f;
+#endif
   int i;
 
 #if MULTITHREADED
@@ -782,6 +787,7 @@
   map = new UnicodeMap("UCS-2", gTrue, &mapUCS2);
   residentUnicodeMaps->add(map->getEncodingName(), map);
 
+#ifndef PDF_PARSER_ONLY
   // look for a user config file, then a system-wide config file
   f = NULL;
   fileName = NULL;
@@ -819,6 +825,7 @@
     delete fileName;
     fclose(f);
   }
+#endif /* !PDF_PARSER_ONLY */
 }
 
 void GlobalParams::createDefaultKeyBindings() {
diff -ur -N xpdf-3.03.orig/xpdf/GlobalParams.h xpdf-3.03/xpdf/GlobalParams.h
--- xpdf-3.03.orig/xpdf/GlobalParams.h	2011-08-15 23:08:53.000000000 +0200
+++ xpdf-3.03/xpdf/GlobalParams.h	2011-08-22 14:11:46.000000000 +0200
@@ -5,6 +5,9 @@
 // Copyright 2001-2003 Glyph & Cog, LLC
 //
 //========================================================================
+//  Modified for TeX Live by Peter Breitenlohner <tex-live@tug.org>
+//  See top-level ChangeLog for a list of all modifications
+//========================================================================
 
 #ifndef GLOBALPARAMS_H
 #define GLOBALPARAMS_H
@@ -171,9 +174,14 @@
 class GlobalParams {
 public:
 
+#ifdef PDF_PARSER_ONLY
+  // Initialize the global parameters  without reading a config file.
+  GlobalParams();
+#else
   // Initialize the global parameters by attempting to read a config
   // file.
   GlobalParams(char *cfgFileName);
+#endif
 
   ~GlobalParams();