diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-02-27 13:55:44 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-02-27 13:55:44 +0000 |
commit | 47ce3271b417e6d0a8fcbbbe94bd9060290e5032 (patch) | |
tree | c6da726176d1271ff0fe608db0b51b52fb4870f8 /Build/source/texk/dvisvgm/dvisvgm-src/src/InputReader.cpp | |
parent | e8c2792ffc88bff8519581351d6349a84d81bebe (diff) |
dvisvgm 1.15
git-svn-id: svn://tug.org/texlive/trunk@39886 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvisvgm/dvisvgm-src/src/InputReader.cpp')
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-src/src/InputReader.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/InputReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/InputReader.cpp index 493dd311b30..46107532f68 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/src/InputReader.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/InputReader.cpp @@ -107,7 +107,7 @@ int InputReader::compare (const char *s, bool consume) { bool InputReader::parseInt (int &val, bool accept_sign) { val = 0; int fac=1; - char sign; // explicitly given sign + int sign; // explicitly given sign if (accept_sign && ((sign = peek()) == '+' || sign == '-')) { if (isdigit(peek(1))) { get(); // skip sign @@ -143,7 +143,7 @@ bool InputReader::parseInt (int base, int &val) { const char *digits = "0123456789abcdefghijklmnopqrstuvwxyz"; const char maxdigit = digits[base-1]; - char c; + int c; if (!isalnum(c = tolower(peek())) || c > maxdigit) return false; @@ -167,7 +167,7 @@ char InputReader::parseDouble (double &val) { int int_part=0; bool is_float = false; skipSpace(); - char sign = peek(); + int sign = peek(); if (parseInt(int_part)) { // match [+-]?[0-9]+\.? if (peek() == '.') { get(); @@ -179,7 +179,6 @@ char InputReader::parseDouble (double &val) { } } else { // match [+-]?\. - char sign; // explicitly given sign if ((sign = peek()) == '+' || sign == '-') { // match [+-]?\.[0-9] if (peek(1) != '.' || !isdigit(peek(2))) return 0; @@ -199,7 +198,7 @@ char InputReader::parseDouble (double &val) { frac_part += (get()-'0')/u; val = (int_part + frac_part) * fac; // parse exponent - char c; + int c; if (tolower(peek()) == 'e' && (isdigit(c=peek(1)) || ((c == '+' || c == '-') && isdigit(peek(2))))) { get(); // skip 'e' int exp; @@ -245,7 +244,7 @@ string InputReader::getWord () { char InputReader::getPunct () { skipSpace(); if (ispunct(peek())) - return get(); + return char(get()); return 0; } |