summaryrefslogtreecommitdiff
path: root/src/cssparser.cc
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-03-15 21:21:15 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-03-15 21:21:15 +0100
commit22d0d7056206e3158fe6cdbe82c9508b2f41da29 (patch)
treecb2a425bdf4ede9f198c27e85a47ac8cec2c541c /src/cssparser.cc
parentf68785a65aed9ce40d9aec5fbf7f9cec3af1b384 (diff)
make CSS_MAX_STR_LEN a static const integer
Diffstat (limited to 'src/cssparser.cc')
-rw-r--r--src/cssparser.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cssparser.cc b/src/cssparser.cc
index 349e4ce6..5b41c490 100644
--- a/src/cssparser.cc
+++ b/src/cssparser.cc
@@ -426,7 +426,7 @@ void CssParser::nextToken()
// handle negative numbers
if (c == '-') {
- if (i < CSS_MAX_STR_LEN - 1)
+ if (i < maxStrLen - 1)
tval[i++] = c;
c = getc();
}
@@ -434,7 +434,7 @@ void CssParser::nextToken()
if (isdigit(c)) {
ttype = CSS_TK_DECINT;
do {
- if (i < CSS_MAX_STR_LEN - 1) {
+ if (i < maxStrLen - 1) {
tval[i++] = c;
}
/* else silently truncated */
@@ -450,10 +450,10 @@ void CssParser::nextToken()
c = getc();
if (isdigit(c)) {
ttype = CSS_TK_FLOAT;
- if (i < CSS_MAX_STR_LEN - 1)
+ if (i < maxStrLen - 1)
tval[i++] = '.';
do {
- if (i < CSS_MAX_STR_LEN - 1)
+ if (i < maxStrLen - 1)
tval[i++] = c;
/* else silently truncated */
c = getc();
@@ -492,7 +492,7 @@ void CssParser::nextToken()
i = 1;
c = getc();
while (isalnum(c) || c == '_' || c == '-') {
- if (i < CSS_MAX_STR_LEN - 1) {
+ if (i < maxStrLen - 1) {
tval[i] = c;
i++;
} /* else silently truncated */
@@ -534,7 +534,7 @@ void CssParser::nextToken()
}
}
- if (i < CSS_MAX_STR_LEN - 1) {
+ if (i < maxStrLen - 1) {
tval[i] = c;
i++;
} /* else silently truncated */
@@ -556,7 +556,7 @@ void CssParser::nextToken()
i = 1;
c = getc();
while (isxdigit(c)) {
- if (i < CSS_MAX_STR_LEN - 1) {
+ if (i < maxStrLen - 1) {
tval[i] = c;
i++;
} /* else silently truncated */