[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src/stratagus ccl.c
From: |
address@hidden |
Subject: |
[Stratagus-CVS] stratagus/src/stratagus ccl.c |
Date: |
23 Dec 2003 11:14:16 +1100 |
CVSROOT: /home/strat
Module name: stratagus
Changes by: <address@hidden> 03/12/23 11:14:16
Modified files:
src/stratagus : ccl.c
Log message:
Added FIXMEs for docs
Patches:
Index: stratagus/src/stratagus/ccl.c
diff -u stratagus/src/stratagus/ccl.c:1.148 stratagus/src/stratagus/ccl.c:1.149
--- stratagus/src/stratagus/ccl.c:1.148 Sat Dec 20 16:33:16 2003
+++ stratagus/src/stratagus/ccl.c Tue Dec 23 11:14:15 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: ccl.c,v 1.148 2003/12/20 05:33:16 jsalmon3 Exp $
+// $Id: ccl.c,v 1.149 2003/12/23 00:14:15 jsalmon3 Exp $
//@{
@@ -125,6 +125,9 @@
----------------------------------------------------------------------------*/
#ifdef USE_LUA
+/**
+** FIXME: docu
+*/
local void lstop(lua_State *l, lua_Debug *ar)
{
(void)ar; // unused arg.
@@ -132,6 +135,9 @@
luaL_error(l, "interrupted!");
}
+/**
+** FIXME: docu
+*/
local void laction(int i)
{
// if another SIGINT happens before lstop,
@@ -140,6 +146,9 @@
lua_sethook(Lua, lstop, LUA_MASKCALL | LUA_MASKRET | LUA_MASKCOUNT, 1);
}
+/**
+** FIXME: docu
+*/
local void l_message(const char *pname, const char *msg)
{
if (pname) {
@@ -149,6 +158,13 @@
exit(1);
}
+/**
+** FIXME: docu
+**
+** @param status FIXME: docu
+**
+** @return FIXME: docu
+*/
local int report(int status)
{
const char* msg;
@@ -165,30 +181,36 @@
}
/**
-** Call a lua function
+** Call a lua function
+**
+** @param narg Number of arguments
+** @param clear Clear the return value(s)
**
-** @param narg Number of arguments
-** @param clear Clear the return value(s)
+** @return FIXME: docu
*/
global int LuaCall(int narg, int clear)
{
int status;
int base;
- base = lua_gettop(Lua) - narg; /* function index */
+ base = lua_gettop(Lua) - narg; // function index
lua_pushliteral(Lua, "_TRACEBACK");
- lua_rawget(Lua, LUA_GLOBALSINDEX); /* get traceback function */
- lua_insert(Lua, base); /* put it under chunk and args */
+ lua_rawget(Lua, LUA_GLOBALSINDEX); // get traceback function
+ lua_insert(Lua, base); // put it under chunk and args
signal(SIGINT, laction);
status = lua_pcall(Lua, narg, (clear ? 0 : LUA_MULTRET), base);
signal(SIGINT, SIG_DFL);
- lua_remove(Lua, base); /* remove traceback function */
+ lua_remove(Lua, base); // remove traceback function
return report(status);
}
/**
-** Load a file and execute it
+** Load a file and execute it
+**
+** @param file File to load and execute
+**
+** @return FIXME: docu
*/
global int LuaLoadFile(const char* file)
{
@@ -202,6 +224,9 @@
return status;
}
+/**
+** FIXME: docu
+*/
local int CclLoad(lua_State* l)
{
char buf[1024];
@@ -215,18 +240,27 @@
return 0;
}
+/**
+** FIXME: docu
+*/
global const char* LuaToString(lua_State* l, int narg)
{
luaL_checktype(l, narg, LUA_TSTRING);
return lua_tostring(l, narg);
}
+/**
+** FIXME: docu
+*/
global lua_Number LuaToNumber(lua_State* l, int narg)
{
luaL_checktype(l, narg, LUA_TNUMBER);
return lua_tonumber(l, narg);
}
+/**
+** FIXME: docu
+*/
global int LuaToBoolean(lua_State* l, int narg)
{
luaL_checktype(l, narg, LUA_TBOOLEAN);
@@ -2041,7 +2075,7 @@
}
fprintf(fd, ";;; -----------------------------------------\n");
- fprintf(fd, ";;; $Id: ccl.c,v 1.148 2003/12/20 05:33:16 jsalmon3 Exp
$\n");
+ fprintf(fd, ";;; $Id: ccl.c,v 1.149 2003/12/23 00:14:15 jsalmon3 Exp
$\n");
fprintf(fd, "(set-video-resolution! %d %d)\n", VideoWidth, VideoHeight);
fprintf(fd, "(set-group-keys \"");
@@ -2073,7 +2107,7 @@
}
fprintf(fd, "--- -----------------------------------------\n");
- fprintf(fd, "--- $Id: ccl.c,v 1.148 2003/12/20 05:33:16 jsalmon3 Exp
$\n");
+ fprintf(fd, "--- $Id: ccl.c,v 1.149 2003/12/23 00:14:15 jsalmon3 Exp
$\n");
fprintf(fd, "SetVideoResolution(%d, %d)\n", VideoWidth, VideoHeight);
fprintf(fd, "SetGroupKeys(\"");
@@ -2111,7 +2145,7 @@
}
fprintf(fd, ";;; -----------------------------------------\n");
- fprintf(fd, ";;; $Id: ccl.c,v 1.148 2003/12/20 05:33:16 jsalmon3 Exp
$\n");
+ fprintf(fd, ";;; $Id: ccl.c,v 1.149 2003/12/23 00:14:15 jsalmon3 Exp
$\n");
// Global options
if (OriginalFogOfWar) {
@@ -2192,7 +2226,7 @@
}
fprintf(fd, "--- -----------------------------------------\n");
- fprintf(fd, "--- $Id: ccl.c,v 1.148 2003/12/20 05:33:16 jsalmon3 Exp
$\n");
+ fprintf(fd, "--- $Id: ccl.c,v 1.149 2003/12/23 00:14:15 jsalmon3 Exp
$\n");
// Global options
if (OriginalFogOfWar) {
@@ -2315,7 +2349,7 @@
extern SCM oblistvar;
CLprintf(file, "\n;;; -----------------------------------------\n");
- CLprintf(file, ";;; MODULE: CCL $Id: ccl.c,v 1.148 2003/12/20 05:33:16
jsalmon3 Exp $\n\n");
+ CLprintf(file, ";;; MODULE: CCL $Id: ccl.c,v 1.149 2003/12/23 00:14:15
jsalmon3 Exp $\n\n");
for (list = oblistvar; gh_list_p(list); list = gh_cdr(list)) {
SCM sym;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Stratagus-CVS] stratagus/src/stratagus ccl.c,
address@hidden <=