summaryrefslogtreecommitdiff
path: root/Build/source/libs/xpdf/xpdf-3.03-PATCHES/patch-20-skip-reading-config-file
blob: 24d43695ef1eb56546a3723203a2b494fd45e37a (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.03.orig/xpdf/GlobalParams.cc xpdf-3.03/xpdf/GlobalParams.cc
--- xpdf-3.03.orig/xpdf/GlobalParams.cc	2011-08-15 23:08:53.000000000 +0200
+++ xpdf-3.03/xpdf/GlobalParams.cc	2012-10-19 10:01:03.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>
 
@@ -779,6 +782,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;
@@ -811,6 +815,7 @@
     parseFile(fileName, f);
     delete fileName;
     fclose(f);
+#endif /* !PDF_PARSER_ONLY */
   }
 }
 
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	2012-10-19 09:58:39.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(char *cfgFileName);
+  GlobalParams(char *cfgFileName = NULL);
 
   ~GlobalParams();