Previous 199869 Revisions Next

r34325 Saturday 10th January, 2015 at 14:06:17 UTC by Miodrag Milanović
Fixed LUA compile
[/trunk]makefile
[3rdparty/lsqlite3]lsqlite3.c
[3rdparty/lua/src]liolib.c lobject.c loslib.c lvm.c
[src/emu]luaengine.c luaengine.h

trunk/3rdparty/lsqlite3/lsqlite3.c
r242836r242837
3131#include <assert.h>
3232
3333#define LUA_LIB
34#include "lua/lua.h"
35#include "lua/lauxlib.h"
34#include "lua.h"
35#include "lauxlib.h"
3636
3737#if LUA_VERSION_NUM > 501
3838//
trunk/3rdparty/lua/src/liolib.c
r242836r242837
556556  if (op)
557557    return luaL_fileresult(L, 0, NULL);  /* error */
558558  else {
559    lua_pushnumber(L, (lua_Number)l_ftell(f));
559    lua_pushnumber(L, (lua_Number)(1.0 * l_ftell(f)));
560560    return 1;
561561  }
562562}
trunk/3rdparty/lua/src/lobject.c
r242836r242837
104104
105105static lua_Number readhexa (const char **s, lua_Number r, int *count) {
106106  for (; lisxdigit(cast_uchar(**s)); (*s)++) {  /* read integer part */
107    r = (r * cast_num(16.0)) + cast_num(luaO_hexavalue(cast_uchar(**s)));
107    r = (r * cast_num(16.0)) + cast_num(1.0*luaO_hexavalue(cast_uchar(**s)));
108108    (*count)++;
109109  }
110110  return r;
trunk/3rdparty/lua/src/loslib.c
r242836r242837
120120
121121
122122static int os_clock (lua_State *L) {
123  lua_pushnumber(L, ((lua_Number)clock())/(lua_Number)CLOCKS_PER_SEC);
123  lua_pushnumber(L, ((lua_Number)(1.0*clock()))/(lua_Number)CLOCKS_PER_SEC);
124124  return 1;
125125}
126126
r242836r242837
194194
195195static int os_date (lua_State *L) {
196196  const char *s = luaL_optstring(L, 1, "%c");
197  time_t t = luaL_opt(L, (time_t)luaL_checknumber, 2, time(NULL));
197  time_t t = luaL_opt(L, luaL_checknumber, 2, time(NULL));
198198  struct tm tmr, *stm;
199199  if (*s == '!') {  /* UTC? */
200200    stm = l_gmtime(&t, &tmr);
r242836r242837
264264
265265
266266static int os_difftime (lua_State *L) {
267  lua_pushnumber(L, difftime((time_t)(luaL_checknumber(L, 1)),
268                             (time_t)(luaL_optnumber(L, 2, 0))));
267  lua_pushnumber(L, difftime((luaL_checknumber(L, 1)),
268                             (luaL_optnumber(L, 2, 0))));
269269  return 1;
270270}
271271
trunk/3rdparty/lua/src/lvm.c
r242836r242837
339339      Table *h = hvalue(rb);
340340      tm = fasttm(L, h->metatable, TM_LEN);
341341      if (tm) break;  /* metamethod? break switch to call it */
342      setnvalue(ra, cast_num(luaH_getn(h)));  /* else primitive len */
342      setnvalue(ra, cast_num(1.0*luaH_getn(h)));  /* else primitive len */
343343      return;
344344    }
345345    case LUA_TSTRING: {
trunk/makefile
r242836r242837
643643   -I$(SRC)/lib/util \
644644   -I$(SRC)/lib \
645645   -I$(3RDPARTY) \
646   -I$(3RDPARTY)/lua/src \
646647   -I$(SRC)/osd \
647648   -I$(SRC)/osd/$(OSD) \
648649
trunk/src/emu/luaengine.c
r242836r242837
99***************************************************************************/
1010
1111#include <limits>
12#include "lua/lua.hpp"
12#include "lua.hpp"
1313#include "luabridge/Source/LuaBridge/LuaBridge.h"
1414#include <signal.h>
1515#include "emu.h"
trunk/src/emu/luaengine.h
r242836r242837
2424#undef None
2525#endif
2626
27#include "lua/lua.hpp"
27#include "lua.hpp"
2828#include "luabridge/Source/LuaBridge/LuaBridge.h"
2929
3030struct lua_State;


Previous 199869 Revisions Next


© 1997-2024 The MAME Team