From ffa3618a3cfcb5298e00ec9df02253426c62cf12 Mon Sep 17 00:00:00 2001
From: David Walter Seikel
Date: Sun, 5 Feb 2012 10:39:25 +1000
Subject: White space clean up.

---
 LuaSL/src/LuaSL_LSL_tree.h     | 11 +++++------
 LuaSL/src/LuaSL_compile.c      | 35 ++++++++++++++++++-----------------
 LuaSL/src/LuaSL_lemon_yaccer.y |  6 +++---
 LuaSL/src/LuaSL_lexer.l        |  3 +--
 LuaSL/src/LuaSL_main.c         |  4 ++--
 5 files changed, 29 insertions(+), 30 deletions(-)

(limited to 'LuaSL')

diff --git a/LuaSL/src/LuaSL_LSL_tree.h b/LuaSL/src/LuaSL_LSL_tree.h
index 3c30129..ca5f844 100644
--- a/LuaSL/src/LuaSL_LSL_tree.h
+++ b/LuaSL/src/LuaSL_LSL_tree.h
@@ -11,7 +11,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 
-#include "assert.h"  
+#include "assert.h"
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -28,7 +28,7 @@
 #include <luaproc/sched.h>
 
 #include "LuaSL_lemon_yaccer.h"
-                    
+
 #define YYERRCODE 256
 #define YYDEBUG 1
 
@@ -67,7 +67,7 @@ typedef LSL_Leaf * (*evaluateToken) (LSL_Leaf  *content, LSL_Leaf *left, LSL_Lea
 //#ifndef FALSE
 //typedef enum
 //{
-//    FALSE	= 0, 
+//    FALSE	= 0,
 //    TRUE	= 1
 //} boolean;
 //#endif
@@ -266,7 +266,7 @@ struct _LSL_Statement
 /*
 LSL_Leaf *addStatement(LSL_Leaf *lval, LSL_Type type, LSL_Leaf *left, LSL_Leaf *expr, LSL_Leaf *right, LSL_Leaf *block);
 
-expr						expr			// Might be bogus, 
+expr						expr			// Might be bogus,
 Variable defines	identifier, optional	expr			// For these we only store the variable leaf in expressions.
 Function define		identifier,			block,	parens	// Also function params, but that's stored in the function anyway.
 state change		identifier
@@ -395,7 +395,7 @@ Once the parser has condensed things down, it only deals with the
 condensed nodes.  So we can get rid of some of the AST parts at this
 time, so long as we keep the relevant information.  This is what the
 other data structures above are for.  Lemon tries to free the no longer
-needed AST nodes itself, even if we are still using them internally. 
+needed AST nodes itself, even if we are still using them internally.
 Need to do something about that.
 
 */
@@ -464,4 +464,3 @@ void ParseFree(void *p, void (*freeProc)(void*));
 
 
 #endif // __LUASL_LSL_TREE_H__
-
diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c
index 16e1c1d..dbc7031 100644
--- a/LuaSL/src/LuaSL_compile.c
+++ b/LuaSL/src/LuaSL_compile.c
@@ -1,8 +1,10 @@
+
 #include "LuaSL.h"
 
 /* TODO - problem de jour
 */
 
+
 static LSL_Leaf *evaluateFloatToken(LSL_Leaf  *content, LSL_Leaf *left, LSL_Leaf *right);
 static LSL_Leaf *evaluateIntegerToken(LSL_Leaf  *content, LSL_Leaf *left, LSL_Leaf *right);
 static LSL_Leaf *evaluateNoToken(LSL_Leaf *content, LSL_Leaf *left, LSL_Leaf *right);
@@ -156,19 +158,19 @@ LSL_Token LSL_Tokens[] =
 };
 
 // VERY IMPORTANT to keep this in sync with enum opType from LuaSL_LSL_tree.h!
-allowedTypes allowed[] = 
+allowedTypes allowed[] =
 {
-    {OT_nothing,	"nothing",	(ST_NONE)},																// 
+    {OT_nothing,	"nothing",	(ST_NONE)},																//
 
     {OT_bool,		"boolean",	(ST_BOOL_NOT)},																// bool				!
     {OT_integer,	"integer",	(ST_BOOL_NOT | ST_BIT_NOT | ST_NEGATE)},												// int				! - ~
     {OT_float,		"float",	(ST_BOOL_NOT | ST_NEGATE)},														// float			! -
     {OT_key,		"key",		(ST_BOOL_NOT)},																// key				!
-    {OT_list,		"list",		(ST_NONE)},																// 
-    {OT_rotation,	"rotation",	(ST_NONE)},																// 
+    {OT_list,		"list",		(ST_NONE)},																//
+    {OT_rotation,	"rotation",	(ST_NONE)},																//
     {OT_string,		"string",	(ST_BOOL_NOT)},																// string			!
-    {OT_vector,		"vector",	(ST_NONE)},																// 
-    {OT_other,		"other",	(ST_NONE)},																// 
+    {OT_vector,		"vector",	(ST_NONE)},																//
+    {OT_other,		"other",	(ST_NONE)},																//
 
     {OT_bool,		"boolean",	(ST_BOOLEAN | ST_EQUALITY)},														// bool		bool		          == !=           =                            && ||
 
@@ -176,7 +178,7 @@ allowedTypes allowed[] =
     {OT_integer,	"integer",	(ST_MULTIPLY | ST_ADD | ST_SUBTRACT | ST_EQUALITY | ST_COMPARISON | ST_CONCATENATION | ST_ASSIGNMENT | ST_MODULO | ST_BITWISE)},	// int		int		* / + - % == != < > <= >= = += -= *= /= %= & | ^ << >>
     {OT_float,		"float",	(ST_MULTIPLY | ST_ADD | ST_SUBTRACT | ST_EQUALITY | ST_COMPARISON | ST_CONCATENATION | ST_ASSIGNMENT)},					// int		float		cast to float float
     {OT_float,		"float",	(ST_MULTIPLY | ST_ADD | ST_SUBTRACT | ST_EQUALITY | ST_COMPARISON | ST_CONCATENATION | ST_ASSIGNMENT)},					// float	int		cast to float float
-    {OT_float,		"float",	(ST_MULTIPLY | ST_ADD | ST_SUBTRACT | ST_EQUALITY | ST_COMPARISON | ST_CONCATENATION | ST_ASSIGNMENT)},					// float	float		* / + -   == != < > <= >= = += -= *= /= 
+    {OT_float,		"float",	(ST_MULTIPLY | ST_ADD | ST_SUBTRACT | ST_EQUALITY | ST_COMPARISON | ST_CONCATENATION | ST_ASSIGNMENT)},					// float	float		* / + -   == != < > <= >= = += -= *= /=
 
     {OT_string,		"string",	(ST_ADD | ST_EQUALITY | ST_CONCATENATION)},												// key		key		cast to string string
     {OT_string,		"string",	(ST_ADD | ST_EQUALITY | ST_CONCATENATION)},												// key		string		cast to string string
@@ -196,11 +198,11 @@ allowedTypes allowed[] =
     {OT_vector,		"vector",	(ST_MULTIPLY | ST_ASSIGNMENT)},														// vector	float		* /                               *= /=
     {OT_vector,		"vector",	(ST_MULTIPLY)},																// vector	rotation	* /
 
-    {OT_rotation,	"rotation",	(ST_MULTIPLY | ST_ADD | ST_SUBTRACT | ST_EQUALITY | ST_CONCATENATION | ST_ASSIGNMENT)},							// rotation	rotation	* / + -   == !=           = += -= *= /= 
+    {OT_rotation,	"rotation",	(ST_MULTIPLY | ST_ADD | ST_SUBTRACT | ST_EQUALITY | ST_CONCATENATION | ST_ASSIGNMENT)},							// rotation	rotation	* / + -   == !=           = += -= *= /=
 
-    {OT_other,		"other",	(ST_NONE)},																// 
-    {OT_undeclared,	"undeclared",	(ST_NONE)},																// 
-    {OT_invalid,	"invalid",	(ST_NONE)}																// 
+    {OT_other,		"other",	(ST_NONE)},																//
+    {OT_undeclared,	"undeclared",	(ST_NONE)},																//
+    {OT_invalid,	"invalid",	(ST_NONE)}																//
 };
 
 opType opExpr[][10] =
@@ -269,7 +271,7 @@ static LSL_Leaf *findFunction(LuaSL_compiler *compiler, const char *name)
 	}
 	else
 	    func = eina_hash_find(compiler->script.functions, name);
-	
+
     }
 
     return func;
@@ -499,7 +501,7 @@ LSL_Leaf *addOperation(LuaSL_compiler *compiler, LSL_Leaf *left, LSL_Leaf *lval,
 	 *	buggerAround();
 	 *    }
 	 *
-	 * Turns into - 
+	 * Turns into -
 	 *
 	 *    x = doSomething();
 	 *    while (x == foo)
@@ -873,13 +875,13 @@ LSL_Leaf *addNumby(LSL_Leaf *numby)
 	    case LSL_FLOAT :
 	    {
 		num->value.floatValue = atof(num->text.text);
-		numby->basicType = OT_float; 
+		numby->basicType = OT_float;
 		break;
 	    }
 	    case LSL_INTEGER :
 	    {
 		num->value.integerValue = atoi(num->text.text);
-		numby->basicType = OT_integer; 
+		numby->basicType = OT_integer;
 		break;
 	    }
 	    default:
@@ -2620,7 +2622,7 @@ boolean compileLSL(gameGlobals *game, char *script, boolean doConstants)
 // Take the result of the parse, and convert it into Lua source.
 //   Each LSL script becomes a Lua state.
 //   LSL states are handled as Lua tables, with each LSL state function being a table function in a common metatable.
-//   LL and OS functions are likely to be C functions. 
+//   LL and OS functions are likely to be C functions.
 
 // Compile the Lua source by the Lua compiler.
 
@@ -2770,4 +2772,3 @@ int main(int argc, char **argv)
     return 0;
 }
 #endif
-
diff --git a/LuaSL/src/LuaSL_lemon_yaccer.y b/LuaSL/src/LuaSL_lemon_yaccer.y
index 71d4399..1ac3cc8 100644
--- a/LuaSL/src/LuaSL_lemon_yaccer.y
+++ b/LuaSL/src/LuaSL_lemon_yaccer.y
@@ -1,5 +1,6 @@
-%include {
-#include "LuaSL.h"
+%include
+{
+    #include "LuaSL.h"
 }
 
 %extra_argument {LuaSL_compiler *compiler}
@@ -272,4 +273,3 @@ expr(A) ::= LSL_STRING(B).									{ B->basicType = OT_string; A = B; }
 %endif
 
 */
-
diff --git a/LuaSL/src/LuaSL_lexer.l b/LuaSL/src/LuaSL_lexer.l
index 76d1b5b..85b2821 100644
--- a/LuaSL/src/LuaSL_lexer.l
+++ b/LuaSL/src/LuaSL_lexer.l
@@ -8,7 +8,7 @@ int common(YYSTYPE *lval, char *text, int len, LuaSL_compiler *compiler, boolean
 %}
 
 %option reentrant never-interactive batch
-%option bison-bridge 8bit 
+%option bison-bridge 8bit
 %option noreject noyymore
 %option backup debug perf-report perf-report verbose warn
 %option align full
@@ -162,4 +162,3 @@ int yywrap(yyscan_t yyscanner)  // This as actually useless for our needs, as it
 
     return 1;
 }
-
diff --git a/LuaSL/src/LuaSL_main.c b/LuaSL/src/LuaSL_main.c
index 3ee2e8c..5601dde 100644
--- a/LuaSL/src/LuaSL_main.c
+++ b/LuaSL/src/LuaSL_main.c
@@ -1,3 +1,4 @@
+
 #include "LuaSL.h"
 
 #define LUA_TEST	0
@@ -313,7 +314,7 @@ main(int argc, char **argv)
 
     if (badArgs)
     {
-	// display the program usage to the user as they have it wrong 
+	// display the program usage to the user as they have it wrong
 	printf("Usage: %s [-u]\n", programName);
 	printf("   -u: Show the test UI.\n");
     }
@@ -487,4 +488,3 @@ main(int argc, char **argv)
 
     return 0;
 }
-
-- 
cgit v1.1