summaryrefslogtreecommitdiff
path: root/Build/source/libs/xpdf/xpdf-3.02-PATCHES/patch-23-exclude-keyBindings
blob: c1de3c7837c053c021b249848fcf21df0176b89e (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
	Patches for pdfTeX / luaTeX / XeTeX

	from:
		Han The Thanh <thanh@pdftex.org>

diff -ur -N xpdf-3.02.orig/xpdf/GlobalParams.cc xpdf-3.02/xpdf/GlobalParams.cc
--- xpdf-3.02.orig/xpdf/GlobalParams.cc	2009-05-10 13:01:34.000000000 +0200
+++ xpdf-3.02/xpdf/GlobalParams.cc	2009-05-10 13:16:03.000000000 +0200
@@ -429,6 +429,7 @@
   }
 }
 
+#ifndef PDF_PARSER_ONLY
 //------------------------------------------------------------------------
 // KeyBinding
 //------------------------------------------------------------------------
@@ -461,6 +462,7 @@
 KeyBinding::~KeyBinding() {
   deleteGList(cmds, GString);
 }
+#endif /* !PDF_PARSER_ONLY */
 
 #ifdef ENABLE_PLUGINS
 //------------------------------------------------------------------------
@@ -718,7 +720,9 @@
   movieCommand = NULL;
   mapNumericCharNames = gTrue;
   mapUnknownCharNames = gFalse;
+#ifndef PDF_PARSER_ONLY
   createDefaultKeyBindings();
+#endif
   printCommands = gFalse;
   errQuiet = gFalse;
 
@@ -801,6 +805,7 @@
 #endif /* !PDF_PARSER_ONLY */
 }
 
+#ifndef PDF_PARSER_ONLY
 void GlobalParams::createDefaultKeyBindings() {
   keyBindings = new GList();
 
@@ -1127,6 +1132,7 @@
 
   deleteGList(tokens, GString);
 }
+#endif /* !PDF_PARSER_ONLY */
 
 void GlobalParams::parseNameToUnicode(GList *tokens, GString *fileName,
 					 int line) {
@@ -1471,6 +1477,7 @@
   }
 }
 
+#ifndef PDF_PARSER_ONLY
 void GlobalParams::parseBind(GList *tokens, GString *fileName, int line) {
   KeyBinding *binding;
   GList *cmds;
@@ -1656,6 +1663,7 @@
 
   return gTrue;
 }
+#endif /* !PDF_PARSER_ONLY */
 
 void GlobalParams::parseCommand(char *cmdName, GString **val,
 				GList *tokens, GString *fileName, int line) {
@@ -1799,7 +1807,9 @@
   if (movieCommand) {
     delete movieCommand;
   }
+#ifndef PDF_PARSER_ONLY
   deleteGList(keyBindings, KeyBinding);
+#endif
 
   cMapDirs->startIter(&iter);
   while (cMapDirs->getNext(&iter, &key, (void **)&list)) {
@@ -2450,6 +2460,7 @@
   return map;
 }
 
+#ifndef PDF_PARSER_ONLY
 GList *GlobalParams::getKeyBinding(int code, int mods, int context) {
   KeyBinding *binding;
   GList *cmds;
@@ -2475,6 +2486,7 @@
   unlockGlobalParams;
   return cmds;
 }
+#endif /* !PDF_PARSER_ONLY */
 
 GBool GlobalParams::getPrintCommands() {
   GBool p;
diff -ur -N xpdf-3.02.orig/xpdf/GlobalParams.h xpdf-3.02/xpdf/GlobalParams.h
--- xpdf-3.02.orig/xpdf/GlobalParams.h	2009-05-10 13:01:46.000000000 +0200
+++ xpdf-3.02/xpdf/GlobalParams.h	2009-05-10 13:16:03.000000000 +0200
@@ -126,6 +126,7 @@
 
 //------------------------------------------------------------------------
 
+#ifndef PDF_PARSER_ONLY
 class KeyBinding {
 public:
 
@@ -189,6 +190,7 @@
 #define xpdfKeyContextMainWin     (2 << 6)
 #define xpdfKeyContextScrLockOn   (1 << 8)
 #define xpdfKeyContextScrLockOff  (2 << 8)
+#endif /* !PDF_PARSER_ONLY */
 
 //------------------------------------------------------------------------
 
@@ -264,7 +266,9 @@
   GString *getMovieCommand() { return movieCommand; }
   GBool getMapNumericCharNames();
   GBool getMapUnknownCharNames();
+#ifndef PDF_PARSER_ONLY
   GList *getKeyBinding(int code, int mods, int context);
+#endif
   GBool getPrintCommands();
   GBool getErrQuiet();
 
@@ -323,7 +327,9 @@
 
 private:
 
+#ifndef PDF_PARSER_ONLY
   void createDefaultKeyBindings();
+#endif
   void parseFile(GString *fileName, FILE *f);
   void parseNameToUnicode(GList *tokens, GString *fileName, int line);
   void parseCIDToUnicode(GList *tokens, GString *fileName, int line);
@@ -346,12 +352,14 @@
   void parseFontDir(GList *tokens, GString *fileName, int line);
   void parseInitialZoom(GList *tokens, GString *fileName, int line);
   void parseScreenType(GList *tokens, GString *fileName, int line);
+#ifndef PDF_PARSER_ONLY
   void parseBind(GList *tokens, GString *fileName, int line);
   void parseUnbind(GList *tokens, GString *fileName, int line);
   GBool parseKey(GString *modKeyStr, GString *contextStr,
 		 int *code, int *mods, int *context,
 		 char *cmdName,
 		 GList *tokens, GString *fileName, int line);
+#endif
   void parseCommand(char *cmdName, GString **val,
 		    GList *tokens, GString *fileName, int line);
   void parseYesNo(char *cmdName, GBool *flag,
@@ -446,7 +454,9 @@
   GString *movieCommand;	// command executed for movie annotations
   GBool mapNumericCharNames;	// map numeric char names (from font subsets)?
   GBool mapUnknownCharNames;	// map unknown char names?
+#ifndef PDF_PARSER_ONLY
   GList *keyBindings;		// key & mouse button bindings [KeyBinding]
+#endif
   GBool printCommands;		// print the drawing commands
   GBool errQuiet;		// suppress error messages?