[Scummvm-cvs-logs] scummvm master -> e7cc065c6ce646acb291d1d7784f20dffa3929d2

sev- sev at scummvm.org
Thu Aug 4 14:50:36 CEST 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
e7cc065c6c DIRECTOR: Lingo: Fix WinCE compilation.


Commit: e7cc065c6ce646acb291d1d7784f20dffa3929d2
    https://github.com/scummvm/scummvm/commit/e7cc065c6ce646acb291d1d7784f20dffa3929d2
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-08-04T14:50:08+02:00

Commit Message:
DIRECTOR: Lingo: Fix WinCE compilation.

The plafrom has VOID defined

Changed paths:
    engines/director/lingo/lingo-code.cpp
    engines/director/lingo/lingo-codegen.cpp
    engines/director/lingo/lingo-gr.cpp
    engines/director/lingo/lingo-gr.h
    engines/director/lingo/lingo-gr.y
    engines/director/lingo/lingo-the.cpp
    engines/director/lingo/lingo.cpp
    engines/director/lingo/lingo.h



diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index 4c88e5d..f48f29a 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -58,7 +58,7 @@ void Lingo::push(Datum d) {
 void Lingo::pushVoid() {
 	Datum d;
 	d.u.i = 0;
-	d.type = VOID;
+	d.type = VOIDVAL;
 	push(d);
 }
 
@@ -80,7 +80,7 @@ void Lingo::c_printtop(void) {
 	Datum d = g_lingo->pop();
 
 	switch (d.type) {
-	case VOID:
+	case VOIDVAL:
 		warning("Void");
 		break;
 	case INT:
@@ -173,7 +173,7 @@ void Lingo::c_assign() {
 		return;
 	}
 
-	if (d1.u.sym->type != INT && d1.u.sym->type != VOID &&
+	if (d1.u.sym->type != INT && d1.u.sym->type != VOIDVAL &&
 			d1.u.sym->type != FLOAT && d1.u.sym->type != STRING) {
 		warning("assignment to non-variable '%s'", d1.u.sym->name);
 		return;
@@ -207,13 +207,13 @@ void Lingo::c_assign() {
 }
 
 bool Lingo::verify(Symbol *s) {
-	if (s->type != INT && s->type != VOID && s->type != FLOAT && s->type != STRING && s->type != POINT) {
+	if (s->type != INT && s->type != VOIDVAL && s->type != FLOAT && s->type != STRING && s->type != POINT) {
 		warning("attempt to evaluate non-variable '%s'", s->name);
 
 		return false;
 	}
 
-	if (s->type == VOID)
+	if (s->type == VOIDVAL)
 		warning("Variable used before assigning a value '%s'", s->name);
 
 	return true;
@@ -733,7 +733,7 @@ void Lingo::c_call() {
 		Datum d;
 
 		d.u.i = 0;
-		d.type = VOID;
+		d.type = VOIDVAL;
 		g_lingo->push(d);
 	}
 
diff --git a/engines/director/lingo/lingo-codegen.cpp b/engines/director/lingo/lingo-codegen.cpp
index 07fb522..885b6a2 100644
--- a/engines/director/lingo/lingo-codegen.cpp
+++ b/engines/director/lingo/lingo-codegen.cpp
@@ -95,7 +95,7 @@ Symbol *Lingo::lookupVar(const char *name, bool create, bool putInGlobalList) {
 		sym = new Symbol;
 		sym->name = (char *)calloc(strlen(name) + 1, 1);
 		Common::strlcpy(sym->name, name, strlen(name) + 1);
-		sym->type = VOID;
+		sym->type = VOIDVAL;
 		sym->u.i = 0;
 
 		(*_localvars)[name] = sym;
diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp
index 3791239..58789d2 100644
--- a/engines/director/lingo/lingo-gr.cpp
+++ b/engines/director/lingo/lingo-gr.cpp
@@ -68,7 +68,7 @@
    enum yytokentype {
      CASTREF = 258,
      UNARY = 259,
-     VOID = 260,
+     VOIDVAL = 260,
      VAR = 261,
      POINT = 262,
      RECT = 263,
@@ -132,7 +132,7 @@
 /* Tokens.  */
 #define CASTREF 258
 #define UNARY 259
-#define VOID 260
+#define VOIDVAL 260
 #define VAR 261
 #define POINT 262
 #define RECT 263
@@ -623,7 +623,7 @@ static const yytype_uint16 yyrline[] =
    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
 static const char *const yytname[] =
 {
-  "$end", "error", "$undefined", "CASTREF", "UNARY", "VOID", "VAR",
+  "$end", "error", "$undefined", "CASTREF", "UNARY", "VOIDVAL", "VAR",
   "POINT", "RECT", "ARRAY", "SYMBOL", "INT", "THEENTITY",
   "THEENTITYWITHID", "FLOAT", "BLTIN", "BLTINNOARGS", "ID", "STRING",
   "HANDLER", "tDOWN", "tELSE", "tNLELSIF", "tEND", "tEXIT", "tFRAME",
diff --git a/engines/director/lingo/lingo-gr.h b/engines/director/lingo/lingo-gr.h
index a806533..241c429 100644
--- a/engines/director/lingo/lingo-gr.h
+++ b/engines/director/lingo/lingo-gr.h
@@ -41,7 +41,7 @@
    enum yytokentype {
      CASTREF = 258,
      UNARY = 259,
-     VOID = 260,
+     VOIDVAL = 260,
      VAR = 261,
      POINT = 262,
      RECT = 263,
@@ -105,7 +105,7 @@
 /* Tokens.  */
 #define CASTREF 258
 #define UNARY 259
-#define VOID 260
+#define VOIDVAL 260
 #define VAR 261
 #define POINT 262
 #define RECT 263
diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y
index 9a10916..b70e318 100644
--- a/engines/director/lingo/lingo-gr.y
+++ b/engines/director/lingo/lingo-gr.y
@@ -76,7 +76,7 @@ void yyerror(char *s) {
 	Common::Array<double> *arr;
 }
 
-%token CASTREF UNARY VOID VAR POINT RECT ARRAY SYMBOL
+%token CASTREF UNARY VOIDVAL VAR POINT RECT ARRAY SYMBOL
 %token<i> INT
 %token<e> THEENTITY THEENTITYWITHID
 %token<f> FLOAT
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index 2aedf32..cf303aa 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -320,7 +320,7 @@ Datum Lingo::getTheEntity(int entity, Datum &id, int field) {
 		break;
 	default:
 		warning("Unprocessed getting field %d of entity %d", field, entity);
-		d.type = VOID;
+		d.type = VOIDVAL;
 	}
 
 	return d;
@@ -431,7 +431,7 @@ Datum Lingo::getTheSprite(Datum &id1, int field) {
 		break;
 	default:
 		warning("Unprocessed getting field %d of sprite", field);
-		d.type = VOID;
+		d.type = VOIDVAL;
 	}
 
 	return d;
@@ -497,7 +497,7 @@ Datum Lingo::getTheCast(Datum &id1, int field) {
 		{
 			if (cast->type != kCastShape) {
 				warning("Field %d of cast %d not found", field, id);
-				d.type = VOID;
+				d.type = VOIDVAL;
 				return d;
 			}
 
@@ -509,7 +509,7 @@ Datum Lingo::getTheCast(Datum &id1, int field) {
 		{
 			if (cast->type != kCastShape) {
 				warning("Field %d of cast %d not found", field, id);
-				d.type = VOID;
+				d.type = VOIDVAL;
 				return d;
 			}
 
@@ -522,7 +522,7 @@ Datum Lingo::getTheCast(Datum &id1, int field) {
 		break;
 	default:
 		warning("Unprocessed getting field %d of cast %d", field, id);
-		d.type = VOID;
+		d.type = VOIDVAL;
 	//TODO find out about String fields
 	}
 
diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp
index 0bb4309..d13de6a 100644
--- a/engines/director/lingo/lingo.cpp
+++ b/engines/director/lingo/lingo.cpp
@@ -69,7 +69,7 @@ struct EventHandlerType {
 
 Symbol::Symbol() {
 	name = NULL;
-	type = VOID;
+	type = VOIDVAL;
 	u.s = NULL;
 	nargs = 0;
 	global = false;
@@ -302,8 +302,8 @@ const char *Datum::type2str(bool isk) {
 		return isk ? "#string" : "STRING";
 	case CASTREF:
 		return "CASTREF";
-	case VOID:
-		return isk ? "#void" : "VOID";
+	case VOIDVAL:
+		return isk ? "#void" : "VOIDVAL";
 	case POINT:
 		return isk ? "#point" : "POINT";
 	case SYMBOL:
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index 3bec298..51cc649 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -106,7 +106,7 @@ struct Datum {	/* interpreter stack type */
 		FloatArray *arr;	/* ARRAY, POINT, RECT */
 	} u;
 
-	Datum() { u.sym = NULL; type = VOID; }
+	Datum() { u.sym = NULL; type = VOIDVAL; }
 
 	double toFloat();
 	int toInt();






More information about the Scummvm-git-logs mailing list