aboutsummaryrefslogtreecommitdiff
path: root/engines/director/lingo/lingo-lex.l
diff options
context:
space:
mode:
authorEugene Sandulenko2017-01-10 18:58:37 +0100
committerEugene Sandulenko2017-01-10 18:58:37 +0100
commit0e58b35c672c2416d818ca8a7bd388432b01be3d (patch)
tree411133e9bce12692b9de4920a7f3a8963cdf84f4 /engines/director/lingo/lingo-lex.l
parentaf2a917ab27481a5383922c25a8e66fd4add4ce8 (diff)
downloadscummvm-rg350-0e58b35c672c2416d818ca8a7bd388432b01be3d.tar.gz
scummvm-rg350-0e58b35c672c2416d818ca8a7bd388432b01be3d.tar.bz2
scummvm-rg350-0e58b35c672c2416d818ca8a7bd388432b01be3d.zip
DIRECTOR: Lingo: Implemented stub for 'the time' entity
Diffstat (limited to 'engines/director/lingo/lingo-lex.l')
-rw-r--r--engines/director/lingo/lingo-lex.l15
1 files changed, 8 insertions, 7 deletions
diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l
index 498862835e..75fc176869 100644
--- a/engines/director/lingo/lingo-lex.l
+++ b/engines/director/lingo/lingo-lex.l
@@ -173,18 +173,19 @@ whitespace [\t ]
warning("Unhandled the entity %s", ptr);
}
-(?i:the[ \t]+[[:alpha:]]+[ \t+]date) {
+(?i:the[ \t]+[[:alpha:]]+[ \t+](date|time)) {
count();
- const char *p = &yytext[4]; // Skip 'the '
- while (*p == ' ' || *p == '\t')
- p++;
+ const char *ptr = &yytext[4]; // Skip 'the '
+ while (*ptr == ' ' || *ptr == '\t')
+ ptr++;
Common::String field;
- while (*p != ' ' && *p != '\t')
- field += *p++;
+ while (*ptr != ' ' && *ptr != '\t')
+ field += *ptr++;
- const char *ptr = "date";
+ while (*ptr == ' ' || *ptr == '\t')
+ ptr++;
field = Common::String::format("%d%s", g_lingo->_theEntities[ptr]->entity, field.c_str());