/* lua_pcall with our traceback handler and instruction step limiting.
* On error, traceback will be on top of stack */
int
-nhl_pcall(lua_State *L, int nargs, int nresults){
+nhl_pcall(lua_State *L, int nargs, int nresults)
+{
struct nhl_user_data *nud;
int rv;
};
static void
-nhl_clearfromtable(lua_State *L, int tndx, const char **todo){
+nhl_clearfromtable(lua_State *L, int tndx, const char **todo)
+{
while(*todo){
lua_pushnil(L);
lua_setfield(L, tndx, *todo++);
*/
#ifdef notyet
static boolean
-start_luapat(){
+start_luapat(void)
+{
int rv;
/* XXX set memory and step limits */
nhl_sandbox_info sbi = {NHL_SB_STRING, 0, 0, 0};
#endif
static void
-end_luapat(){
+end_luapat(void)
+{
if(luapat){
lua_close(luapat);
luapat = NULL;
#ifdef notyet
static int
-opencheckpat(lua_State *L, const char *ename, int param){
+opencheckpat(lua_State *L, const char *ename, int param)
+{
/* careful - we're using 2 different and unrelated Lua states */
const char *string;
int rv;
* it's worth the processing time), it can be overridden.
*/
#ifndef NHL_ALLOC_ADJUST
-#define NHL_ALLOC_ADJUST(d) d = (d+15 & ~15)
+#define NHL_ALLOC_ADJUST(d) d = ((d+15) & ~15)
#endif
static void *
nhl_alloc (void *ud, void *ptr, size_t osize, size_t nsize) {