diff options
Diffstat (limited to 'src/l_util.c')
-rw-r--r-- | src/l_util.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/l_util.c b/src/l_util.c index 93c2aec..3b174b6 100644 --- a/src/l_util.c +++ b/src/l_util.c @@ -1,15 +1,15 @@ /* * gcsd * - * gcsd the generic command sequencer daemon can be used to serialize + * gcsd the generic command sequencer daemon can be used to serialize * commands sent over various paralell communication channels to a * single command output. It can be seen as a multiplexer for any * kind of communication between a single resource and various clients * which want to submit commands to it or query information from it. - * gcsd is written in C and Lua. The goal is to provide an easy to + * gcsd is written in C and Lua. The goal is to provide an easy to * understand high level API based on Lua which can be used to * implement the business logic of the so formed multiplexer daemon. - * + * * * Copyright (C) 2009-2010 Markus Grueneis <gimpf@spreadspace.org> * Christian Pointner <equinox@spreadspace.org> @@ -112,7 +112,7 @@ static int l_util_select(lua_State *L) fd_set readables, writeables; int max_fd = collect_fds(L, 1, &readables, 0); max_fd = collect_fds(L, 2, &writeables, max_fd); - + struct timeval tv; struct timeval* timeout = NULL; if(ms >= 0) { @@ -164,7 +164,7 @@ static char** table_to_argv(lua_State *L, const char* script, int index) i--; for(; i >= 0; --i) free(my_ptrptr[i]); - + free(my_ptrptr); return NULL; } @@ -193,7 +193,7 @@ static char** table_to_evp(lua_State *L, int index) i--; for(; i >= 0; --i) free(my_ptrptr[i]); - + free(my_ptrptr); return NULL; } @@ -210,7 +210,7 @@ void free_ptrptr(char** ptrptr) int i; for(i = 0; ptrptr[i]; ++i) free(ptrptr[i]); - + free(ptrptr); } @@ -264,7 +264,7 @@ static void prepare_fds(lua_State *L, int *child_stdio, int pipefd) for (fd=getdtablesize();fd>=0;--fd) // close all file descriptors if(fd != pipefd && fd != child_stdio[0] && fd != child_stdio[1] && fd != child_stdio[2]) close(fd); fcntl(pipefd, F_SETFD, FD_CLOEXEC); - + int i, ret; for(i = 0; i<3; ++i) { if(child_stdio[i] >= 0) { @@ -454,7 +454,7 @@ static const struct luaL_reg util_funcs [] = { { NULL, NULL } }; -LUALIB_API int luaopen_util(lua_State *L) +LUALIB_API int luaopen_util(lua_State *L) { luaL_register(L, LUA_UTILLIBNAME, util_funcs); lua_newtable(L); |