implement lua_threads, nexus:sleep test func, and basic support in console/lua_console... doesn't actually work yet
#include "util.h"
#include "../str.h"
const char *dump_strn (const char *str, ssize_t len)
{
static char dump_buf[DUMP_STR_COUNT][DUMP_STR_BUF];
static size_t dump_idx = 0;
// pick a buffer to use
char *buf = dump_buf[dump_idx++];
// cycle
if (dump_idx >= DUMP_STR_COUNT)
dump_idx = 0;
// write the quoted string into the selected buf
str_quote(buf, DUMP_STR_BUF, str, len);
// ok
return buf;
}
const char *dump_str (const char *str)
{
return dump_strn(str, -1);
}