stratagus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Stratagus-CVS] stratagus/src/include ccl.h


From: Jimmy Salmon
Subject: [Stratagus-CVS] stratagus/src/include ccl.h
Date: Wed, 12 Nov 2003 15:03:47 -0500

CVSROOT:        /cvsroot/stratagus
Module name:    stratagus
Branch:         
Changes by:     Jimmy Salmon <address@hidden>   03/11/12 15:03:46

Modified files:
        src/include    : ccl.h 

Log message:
        Started lua support

Patches:
Index: stratagus/src/include/ccl.h
diff -u stratagus/src/include/ccl.h:1.41 stratagus/src/include/ccl.h:1.42
--- stratagus/src/include/ccl.h:1.41    Mon Nov  3 06:21:41 2003
+++ stratagus/src/include/ccl.h Wed Nov 12 15:03:46 2003
@@ -10,7 +10,7 @@
 //
 /address@hidden ccl.h          -       The clone configuration language 
headerfile. */
 //
-//     (c) Copyright 1998-2002 by Lutz Sammer
+//     (c) Copyright 1998-2003 by Lutz Sammer and Jimmy Salmon
 //
 //      This program is free software; you can redistribute it and/or modify
 //      it under the terms of the GNU General Public License as published by
@@ -26,18 +26,24 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: ccl.h,v 1.41 2003/11/03 11:21:41 pludov Exp $
+//     $Id: ccl.h,v 1.42 2003/11/12 20:03:46 jsalmon3 Exp $
 
 #ifndef __CCL_H__
 #define __CCL_H__
 
 //@{
 
+#if !defined(USE_GUILE) && !defined(USE_SIOD) && !defined(USE_LUA)
+#define USE_SIOD
+#endif
+
 /*----------------------------------------------------------------------------
 --     Includes
 ----------------------------------------------------------------------------*/
 
-#ifdef USE_GUILE
+#if defined(USE_GUILE)
+
+
 #  include <guile/gh.h>
 #  define get_c_string(lisp)     CclConvertToString(lisp)
 #  define try_get_c_string(lisp) CclConvertToString(lisp)
@@ -68,7 +74,10 @@
 struct gen_printio* f;
 typedef scm_t_bits ccl_smob_type_t;
 
-#else
+
+#elif defined(USE_SIOD)
+
+
 #  include <string.h>
 #  include "siod.h"
 #  include "siodp.h"
@@ -146,7 +155,21 @@
 extern LISP sym_t;
 typedef long ccl_smob_type_t;
 
-#endif // !USE_GUILE
+
+#elif defined(USE_LUA)
+
+
+#include "lua.h"
+#include "lauxlib.h"
+#include "lualib.h"
+
+extern lua_State* Lua;
+
+extern int LuaLoadFile(const char* file);
+
+
+#endif // USE_LUA
+
 
 #include "iolib.h"
 
@@ -163,6 +186,7 @@
 --     Functions
 ----------------------------------------------------------------------------*/
 
+#if defined(USE_GUILE) || defined(USE_SIOD)
 extern char*           CclConvertToString(SCM scm);
 extern ccl_smob_type_t CclMakeSmobType(const char* name);
 extern SCM             CclMakeSmobObj(ccl_smob_type_t tag, void* ptr);
@@ -172,6 +196,8 @@
 extern void CclGcProtect(SCM* obj);    /// Protect scm var for GC
 extern void CclGcUnprotect(SCM* obj);  /// Unprotect scm var for GC
 extern void CclGcProtectedAssign(SCM* obj, SCM value); /// Alter garbage 
protected scm var.
+#elif defined(USE_LUA)
+#endif
 extern void CclGarbageCollect(int fast);/// Perform garbage collection
 extern void CclFlushOutput();          /// Flush ccl output
 extern void InitCcl(void);             /// Initialise ccl




reply via email to

[Prev in Thread] Current Thread [Next in Thread]