summaryrefslogtreecommitdiff
path: root/Build/source/libs/xpdf/TLpatches/patch-20-skip-reading-config-file
blob: 5c20dccdd7255062a4a64b673f2c8841907caa75 (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
	Patches for pdfTeX / luaTeX / XeTeX

	Declare GlobalParams constructor with a default 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.04.orig/xpdf/GlobalParams.cc xpdf-3.04/xpdf/GlobalParams.cc
--- xpdf-3.04.orig/xpdf/GlobalParams.cc	2014-05-28 20:50:50.000000000 +0200
+++ xpdf-3.04/xpdf/GlobalParams.cc	2014-05-30 19:29:23.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
+//========================================================================
 
 #include <aconf.h>
 
@@ -812,6 +815,7 @@
   f = NULL;
   fileName = NULL;
   if (cfgFileName && cfgFileName[0]) {
+#ifndef PDF_PARSER_ONLY
     fileName = new GString(cfgFileName);
     if (!(f = fopen(fileName->getCString(), "r"))) {
       delete fileName;
@@ -844,6 +848,7 @@
     parseFile(fileName, f);
     delete fileName;
     fclose(f);
+#endif /* !PDF_PARSER_ONLY */
   }
 }
 
diff -ur -N xpdf-3.04.orig/xpdf/GlobalParams.h xpdf-3.04/xpdf/GlobalParams.h
--- xpdf-3.04.orig/xpdf/GlobalParams.h	2014-05-28 20:50:50.000000000 +0200
+++ xpdf-3.04/xpdf/GlobalParams.h	2014-05-30 19:29:23.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
@@ -173,7 +176,7 @@
 
   // Initialize the global parameters by attempting to read a config
   // file.
-  GlobalParams(const char *cfgFileName);
+  GlobalParams(const char *cfgFileName = NULL);
 
   ~GlobalParams();