diff options
Diffstat (limited to 'Build/source/libs/xpdf/xpdf-src/xpdf/Lexer.cc')
-rw-r--r-- | Build/source/libs/xpdf/xpdf-src/xpdf/Lexer.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/Lexer.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/Lexer.cc index d1066d33837..0c74dbb04ea 100644 --- a/Build/source/libs/xpdf/xpdf-src/xpdf/Lexer.cc +++ b/Build/source/libs/xpdf/xpdf-src/xpdf/Lexer.cc @@ -8,6 +8,10 @@ #include <aconf.h> +#ifdef USE_GCC_PRAGMAS +#pragma implementation +#endif + #include <stdlib.h> #include <stddef.h> #include <string.h> @@ -109,7 +113,7 @@ Object *Lexer::getObj(Object *obj) { char *p; int c, c2; GBool comment, neg, doubleMinus, done, invalid; - int numParen, nErrors; + int numParen; int xi; double xf, scale; GString *s; @@ -430,8 +434,7 @@ Object *Lexer::getObj(Object *obj) { m = n = 0; c2 = 0; s = NULL; - nErrors = 0; - while (nErrors < 100) { + while (1) { c = getChar(); if (c == '>') { break; @@ -440,17 +443,15 @@ Object *Lexer::getObj(Object *obj) { break; } else if (specialChars[c] != 1) { c2 = c2 << 4; - if (c >= '0' && c <= '9') { + if (c >= '0' && c <= '9') c2 += c - '0'; - } else if (c >= 'A' && c <= 'F') { + else if (c >= 'A' && c <= 'F') c2 += c - 'A' + 10; - } else if (c >= 'a' && c <= 'f') { + else if (c >= 'a' && c <= 'f') c2 += c - 'a' + 10; - } else { + else error(errSyntaxError, getPos(), "Illegal character <{0:02x}> in hex string", c); - ++nErrors; - } if (++m == 2) { if (n == tokBufSize) { if (!s) |