diff options
| author | louis <louis.braun@gmx.de> | 2015-06-13 15:50:38 +0200 |
|---|---|---|
| committer | louis <louis.braun@gmx.de> | 2015-06-13 15:50:38 +0200 |
| commit | 41736f4428f7d0545f11f5d1cbdc92a352c6049c (patch) | |
| tree | a66ae787eef678d1da82b0a657a5fc071b077bb5 /libtemplate/templatefunction.c | |
| parent | 7f2a4ca46c2f75abbaa3862d5070b5863b8b7b79 (diff) | |
| parent | 1f09f9928d3545f6dcc9ce7a0e9c34a7ad7dc0fd (diff) | |
| download | vdr-plugin-skindesigner-41736f4428f7d0545f11f5d1cbdc92a352c6049c.tar.gz vdr-plugin-skindesigner-41736f4428f7d0545f11f5d1cbdc92a352c6049c.tar.bz2 | |
Merge branch 'master' into svgtemplates
Diffstat (limited to 'libtemplate/templatefunction.c')
| -rw-r--r-- | libtemplate/templatefunction.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/libtemplate/templatefunction.c b/libtemplate/templatefunction.c index b2bad34..6c6ae5c 100644 --- a/libtemplate/templatefunction.c +++ b/libtemplate/templatefunction.c @@ -991,14 +991,13 @@ void cTemplateFunction::ParseTextToken(string &value, size_t start, size_t end) value = value.replace(0, start, "");
token.type = ttConstString;
token.value = constString;
- textTokens.push_back(token);
} else {
string tokenName = value.substr(1, end - start - 1);
value = value.replace(0, end - start + 1, "");
token.type = ttToken;
token.value = tokenName;
- textTokens.push_back(token);
}
+ textTokens.push_back(token);
}
void cTemplateFunction::ParseConditionalTextToken(string &value, size_t start, size_t end) {
@@ -1008,7 +1007,6 @@ void cTemplateFunction::ParseConditionalTextToken(string &value, size_t start, s value = value.replace(0, start, "");
token.type = ttConstString;
token.value = constString;
- textTokens.push_back(token);
} else {
string condToken = value.substr(start + 1, end - start - 1);
value = value.replace(0, end - start + 1, "");
@@ -1041,9 +1039,8 @@ void cTemplateFunction::ParseConditionalTextToken(string &value, size_t start, s token.type = ttConditionalToken;
token.value = tokenName;
token.subTokens = subTokens;
- textTokens.push_back(token);
}
-
+ textTokens.push_back(token);
}
void cTemplateFunction::ParsePrintfTextToken(string &value, size_t start, size_t end) {
@@ -1053,7 +1050,6 @@ void cTemplateFunction::ParsePrintfTextToken(string &value, size_t start, size_t value = value.replace(0, start, "");
token.type = ttConstString;
token.value = constString;
- textTokens.push_back(token);
} else {
token.type = ttPrintfToken;
//fetch parameter list from printf
@@ -1814,14 +1810,14 @@ void cTemplateFunction::Debug(void) { eTextTokenType tokenType = (*it).type;
string tokType = "";
if (tokenType == ttConstString)
- tokType = "Const: ";
+ tokType = "Const";
else if (tokenType == ttToken)
- tokType = "Token: ";
+ tokType = "Token";
else if (tokenType == ttConditionalToken)
- tokType = "Conditional Token: ";
+ tokType = "Conditional Token";
else if (tokenType == ttPrintfToken)
- tokType = "PrintF Token: ";
- esyslog("skindesigner: %s %d = \"%s\"", tokType.c_str(), i++, (*it).value.c_str());
+ tokType = "PrintF Token";
+ esyslog("skindesigner: Token %d Type %s : \"%s\"", i++, tokType.c_str(), (*it).value.c_str());
if (tokenType == ttConditionalToken) {
for (vector<cTextToken>::iterator it2 = (*it).subTokens.begin(); it2 != (*it).subTokens.end(); it2++) {
eTextTokenType tokenTypeCond = (*it2).type;
@@ -1835,7 +1831,7 @@ void cTemplateFunction::Debug(void) { }
if (tokenType == ttPrintfToken) {
for (vector<string>::iterator it2 = (*it).parameters.begin(); it2 != (*it).parameters.end(); it2++) {
- esyslog("skindesigner: Printf parameter: %s", (*it2).c_str());
+ esyslog("skindesigner: PrintF parameter: %s", (*it2).c_str());
}
}
}
|
