aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2016-06-21 11:23:36 +0200
committerEugene Sandulenko2016-08-03 23:40:36 +0200
commit8fb7aaf4a0e76db7d1a2516a00d6946e6ee44693 (patch)
treefb27db5c93e155e7761afdb48882fd3b1df03eb6 /engines
parentfc144c716c057da05713120c8464f7114093e98e (diff)
downloadscummvm-rg350-8fb7aaf4a0e76db7d1a2516a00d6946e6ee44693.tar.gz
scummvm-rg350-8fb7aaf4a0e76db7d1a2516a00d6946e6ee44693.tar.bz2
scummvm-rg350-8fb7aaf4a0e76db7d1a2516a00d6946e6ee44693.zip
DIRECTOR: Lingo: Renamed UNDEF -> VOID
Diffstat (limited to 'engines')
-rw-r--r--engines/director/lingo/lingo-code.cpp8
-rw-r--r--engines/director/lingo/lingo-gr.cpp8
-rw-r--r--engines/director/lingo/lingo-gr.h4
-rw-r--r--engines/director/lingo/lingo-gr.y2
-rw-r--r--engines/director/lingo/lingo.cpp2
5 files changed, 12 insertions, 12 deletions
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index 7f51be57d4..11804c2dc1 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -98,7 +98,7 @@ void Lingo::c_varpush() {
sym = new Symbol;
sym->name = (char *)calloc(strlen(name) + 1, 1);
Common::strlcpy(sym->name, name, strlen(name) + 1);
- sym->type = UNDEF;
+ sym->type = VOID;
sym->u.val = 0;
g_lingo->_vars[name] = sym;
@@ -118,7 +118,7 @@ void Lingo::c_assign() {
d1 = g_lingo->pop();
d2 = g_lingo->pop();
- if (d1.sym->type != VAR && d1.sym->type != UNDEF) {
+ if (d1.sym->type != VAR && d1.sym->type != VOID) {
warning("assignment to non-variable '%s'", d1.sym->name);
return;
}
@@ -129,13 +129,13 @@ void Lingo::c_assign() {
}
bool Lingo::verify(Symbol *s) {
- if (s->type != VAR && s->type != UNDEF) {
+ if (s->type != VAR && s->type != VOID) {
warning("attempt to evaluate non-variable '%s'", s->name);
return false;
}
- if (s->type == UNDEF) {
+ if (s->type == VOID) {
warning("undefined variable '%s'", s->name);
return false;
diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp
index c8f1fabbee..7d7bf1d41c 100644
--- a/engines/director/lingo/lingo-gr.cpp
+++ b/engines/director/lingo/lingo-gr.cpp
@@ -67,7 +67,7 @@
know about them. */
enum yytokentype {
UNARY = 258,
- UNDEF = 259,
+ VOID = 259,
INT = 260,
FLOAT = 261,
VAR = 262,
@@ -99,7 +99,7 @@
#endif
/* Tokens. */
#define UNARY 258
-#define UNDEF 259
+#define VOID 259
#define INT 260
#define FLOAT 261
#define VAR 262
@@ -511,7 +511,7 @@ static const yytype_uint8 yyrline[] =
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
- "$end", "error", "$undefined", "UNARY", "UNDEF", "INT", "FLOAT", "VAR",
+ "$end", "error", "$undefined", "UNARY", "VOID", "INT", "FLOAT", "VAR",
"STRING", "tIF", "tELSE", "tEND", "tFRAME", "tGO", "tINTO", "tLOOP",
"tMCI", "tMCIWAIT", "tMOVIE", "tNEXT", "tOF", "tPREVIOUS", "tPUT",
"tSET", "tTHEN", "tTO", "tGE", "tLE", "tGT", "tLT", "tEQ", "tNEQ", "'='",
@@ -1937,6 +1937,6 @@ yyreturn:
}
-#line 215 "engines/director/lingo/lingo-gr.y"
+#line 228 "engines/director/lingo/lingo-gr.y"
diff --git a/engines/director/lingo/lingo-gr.h b/engines/director/lingo/lingo-gr.h
index 581f3d236e..797826974e 100644
--- a/engines/director/lingo/lingo-gr.h
+++ b/engines/director/lingo/lingo-gr.h
@@ -40,7 +40,7 @@
know about them. */
enum yytokentype {
UNARY = 258,
- UNDEF = 259,
+ VOID = 259,
INT = 260,
FLOAT = 261,
VAR = 262,
@@ -72,7 +72,7 @@
#endif
/* Tokens. */
#define UNARY 258
-#define UNDEF 259
+#define VOID 259
#define INT 260
#define FLOAT 261
#define VAR 262
diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y
index 582ff5309f..8d205b8ae1 100644
--- a/engines/director/lingo/lingo-gr.y
+++ b/engines/director/lingo/lingo-gr.y
@@ -69,7 +69,7 @@ using namespace Director;
int code;
}
-%token UNARY UNDEF
+%token UNARY VOID
%token<i> INT
%token<f> FLOAT
%token<s> VAR STRING
diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp
index 25b449591e..fee23d1e34 100644
--- a/engines/director/lingo/lingo.cpp
+++ b/engines/director/lingo/lingo.cpp
@@ -69,7 +69,7 @@ struct EventHandlerType {
Symbol::Symbol() {
name = NULL;
- type = UNDEF;
+ type = VOID;
u.str = NULL;
}