forked from github/server
fix compilation on gcc
This commit is contained in:
parent
a08cb98fd2
commit
8987d01214
|
@ -1006,30 +1006,6 @@ typedef struct event_args {
|
||||||
const char *sendertype;
|
const char *sendertype;
|
||||||
} event_args;
|
} event_args;
|
||||||
|
|
||||||
static void args_free(void *udata)
|
|
||||||
{
|
|
||||||
free(udata);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void event_cb(void *sender, const char *event, void *udata)
|
|
||||||
{
|
|
||||||
lua_State *L = (lua_State *) global.vm_state;
|
|
||||||
event_args *args = (event_args *) udata;
|
|
||||||
int nargs = 2;
|
|
||||||
lua_rawgeti(L, LUA_REGISTRYINDEX, args->hfunction);
|
|
||||||
if (sender && args->sendertype) {
|
|
||||||
tolua_pushusertype(L, sender, TOLUA_CAST args->sendertype);
|
|
||||||
} else {
|
|
||||||
lua_pushnil(L);
|
|
||||||
}
|
|
||||||
tolua_pushstring(L, event);
|
|
||||||
if (args->hargs) {
|
|
||||||
lua_rawgeti(L, LUA_REGISTRYINDEX, args->hfunction);
|
|
||||||
++nargs;
|
|
||||||
}
|
|
||||||
lua_pcall(L, nargs, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int tolua_report_unit(lua_State * L)
|
static int tolua_report_unit(lua_State * L)
|
||||||
{
|
{
|
||||||
char buffer[512];
|
char buffer[512];
|
||||||
|
|
|
@ -4483,8 +4483,8 @@ void init_processor(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
p += 10;
|
p += 10;
|
||||||
|
add_proc_region(p, do_contact, "Kontaktieren");
|
||||||
add_proc_order(p, K_MAIL, &mail_cmd, 0, "Botschaften");
|
add_proc_order(p, K_MAIL, &mail_cmd, 0, "Botschaften");
|
||||||
add_proc_order(p, K_CONTACT, &contact_cmd, 0, "Kontaktieren");
|
|
||||||
|
|
||||||
p += 10; /* all claims must be done before we can USE */
|
p += 10; /* all claims must be done before we can USE */
|
||||||
add_proc_region(p, &enter_1, "Betreten (1. Versuch)");
|
add_proc_region(p, &enter_1, "Betreten (1. Versuch)");
|
||||||
|
|
|
@ -2,20 +2,16 @@
|
||||||
|
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
#else /*
*/
|
#else /* WIN32 */
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#endif /*
*/
|
#endif /* WIN32 */
|
||||||
int os_mkdir(const char *path, int mode)
|
int os_mkdir(const char *path, int mode)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
mode = mode;
|
mode = mode;
|
||||||
return _mkdir(path);
|
return _mkdir(path);
|
||||||
|
|
||||||
#else /* POSIX is our last hope */
|
#else /* POSIX is our last hope */
|
||||||
return mkdir(path, (mode_t) mode);
|
return mkdir(path, (mode_t) mode);
|
||||||
|
#endif /* WIN32 */
|
||||||
#endif /*
*/
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue