Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pdf/xpdf/Lexer.cc
diff options
context:
space:
mode:
authorMartin Kretzschmar <mkretzschmar@src.gnome.org>2002-09-18 22:20:42 (GMT)
committer Martin Kretzschmar <mkretzschmar@src.gnome.org>2002-09-18 22:20:42 (GMT)
commit2a393c134fe3fe8eb85bf818cb7ad6ae4396322a (patch)
treeeba8b0dcaba42d799ed8313faee15fb74a5a0cd2 /pdf/xpdf/Lexer.cc
parent7aac8dc8533347e21311b15186e0af82f1b22fd6 (diff)
Synched with Xpdf 1.01
Diffstat (limited to 'pdf/xpdf/Lexer.cc')
-rw-r--r--pdf/xpdf/Lexer.cc17
1 files changed, 11 insertions, 6 deletions
diff --git a/pdf/xpdf/Lexer.cc b/pdf/xpdf/Lexer.cc
index 4ca8cfe..d037469 100644
--- a/pdf/xpdf/Lexer.cc
+++ b/pdf/xpdf/Lexer.cc
@@ -2,7 +2,7 @@
//
// Lexer.cc
//
-// Copyright 1996 Derek B. Noonburg
+// Copyright 1996-2002 Glyph & Cog, LLC
//
//========================================================================
@@ -10,6 +10,7 @@
#pragma implementation
#endif
+#include <aconf.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
@@ -44,22 +45,22 @@ static char specialChars[256] = {
// Lexer
//------------------------------------------------------------------------
-Lexer::Lexer(Stream *str) {
+Lexer::Lexer(XRef *xref, Stream *str) {
Object obj;
curStr.initStream(str);
- streams = new Array();
+ streams = new Array(xref);
streams->add(curStr.copy(&obj));
strPtr = 0;
freeArray = gTrue;
curStr.streamReset();
}
-Lexer::Lexer(Object *obj) {
+Lexer::Lexer(XRef *xref, Object *obj) {
Object obj2;
if (obj->isStream()) {
- streams = new Array();
+ streams = new Array(xref);
freeArray = gTrue;
streams->add(obj->copy(&obj2));
} else {
@@ -204,11 +205,15 @@ Object *Lexer::getObj(Object *obj) {
case '(':
++numParen;
+ c2 = c;
break;
case ')':
- if (--numParen == 0)
+ if (--numParen == 0) {
done = gTrue;
+ } else {
+ c2 = c;
+ }
break;
case '\\':