-- $Id$
--- $HeadURL: https://svn.sourceforge.net/svnroot/primemover/pm/lib/c.pm $
--- $LastChangedDate: 2006-10-12 20:17:52Z $
+-- $HeadURL: https://primemover.svn.sf.net/svnroot/primemover/pm/lib/c.pm $
+-- $LastChangedDate: 2007-02-24 01:37:06 +0000 (Sat, 24 Feb 2007) $
-- pm includefile to compile *host* C programs.
exit 1
XXXXSTARTscript
-38419
+38405
#!/usr/bin/lua
-- Prime Mover
--
-- Prime Mover is licensed under the MIT open source license. Search
-- for 'MIT' in this file to find the full license text.
--
--- $Id: pm 74 2006-10-12 20:11:47Z dtrg $
+-- $Id: pm 93 2007-02-24 21:20:53Z dtrg $
-- ======================================================================= --
-- GLOBALS --
-- ======================================================================= --
-local VERSION = "0.1"
+local VERSION = "0.1.1"
-- Fast versions of useful system variables.
usererror("'", i, "' doesn't seem to be a valid target")
end
--- xpcall(
--- function()
+ xpcall(
+ function()
o:__build()
--- end,
--- function(e)
--- message("rule engine execution error --- traceback follows:")
--- traceback(e)
--- end
--- )
+ end,
+ function(e)
+ message("rule engine execution error --- traceback follows:")
+ traceback(e)
+ end
+ )
end
XXXXSTARTinterpreter
-253576
+253583
#include <signal.h>
#include <sys/wait.h>
#include <stdarg.h>
return 1;}static int Psetuid(lua_State*L){return lposix_pushresult(L,setuid(
mygetuid(L,1)),NULL);}static int Psetgid(lua_State*L){return lposix_pushresult
(L,setgid(mygetgid(L,1)),NULL);}struct mytimes{struct tms t;clock_t elapsed;};
-#define pushtime(L,x) lua_pushnumber(L,((lua_Number)x)/CLK_TCK)
+#define pushtime(L,x) lua_pushnumber(L,((lua_Number)x)/CLOCKS_PER_SEC)
static int Ftimes(lua_State*L,int i,const void*data){const struct mytimes*t=
data;switch(i){case 0:pushtime(L,t->t.tms_utime);break;case 1:pushtime(L,t->t.
tms_stime);break;case 2:pushtime(L,t->t.tms_cutime);break;case 3:pushtime(L,t