add lua funcs names to Spell words && use tabs instead spaces
This commit is contained in:
31
.vscode/settings.json
vendored
31
.vscode/settings.json
vendored
@@ -1,5 +1,34 @@
|
|||||||
{
|
{
|
||||||
|
"editor.tabSize": 4,
|
||||||
|
"editor.insertSpaces": false,
|
||||||
"files.associations": {
|
"files.associations": {
|
||||||
"stdlib.h": "c"
|
"stdlib.h": "c"
|
||||||
}
|
},
|
||||||
|
"cSpell.words": [
|
||||||
|
"ksys",
|
||||||
|
"ksys_oskey_t",
|
||||||
|
"LUALIB_API",
|
||||||
|
"luaL_newlib",
|
||||||
|
"metatable",
|
||||||
|
"luaL_newmetatable",
|
||||||
|
"luaL_setmetatable",
|
||||||
|
"lua_createtable",
|
||||||
|
"luaL_setfuncs",
|
||||||
|
"luaL_checkinteger",
|
||||||
|
"luaL_checkstring",
|
||||||
|
"luaL_checkudata",
|
||||||
|
"lua_pushboolean",
|
||||||
|
"lua_pushinteger",
|
||||||
|
"lua_pushnumber",
|
||||||
|
"luaL_optinteger",
|
||||||
|
"lua_pushstring",
|
||||||
|
"lua_pushnil",
|
||||||
|
"lua_touserdata",
|
||||||
|
"lua_setfield",
|
||||||
|
"lua_getfield",
|
||||||
|
"lua_settop",
|
||||||
|
"lua_islightuserdata",
|
||||||
|
"luaL_checktype",
|
||||||
|
"LUA_TTABLE",
|
||||||
|
]
|
||||||
}
|
}
|
@@ -1,3 +1,3 @@
|
|||||||
# syscalls
|
# Syscalls
|
||||||
|
|
||||||
syscalls for Lua
|
Syscalls library for Lua
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
#ifndef _SYSCALLS_ARP_ENTRY_
|
#ifndef __SYSCALLS_ARP_ENTRY__
|
||||||
#define _SYSCALLS_ARP_ENTRY
|
#define __SYSCALLS_ARP_ENTRY__
|
||||||
|
|
||||||
#include <lua.h>
|
#include <lua.h>
|
||||||
#include <lualib.h>
|
#include <lualib.h>
|
||||||
#include <lauxlib.h>
|
#include <lauxlib.h>
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
||||||
@@ -33,4 +32,4 @@ int syscalls_newindexARPEntry(lua_State* L);
|
|||||||
|
|
||||||
void syscalls_register_ARPEntry(lua_State* L);
|
void syscalls_register_ARPEntry(lua_State* L);
|
||||||
|
|
||||||
#endif
|
#endif // __SYSCALLS_ARP_ENTRY__
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
|
|
||||||
#include <sys/ksys.h>
|
#include <sys/ksys.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Debug out, enabled
|
* Debug out, enabled
|
||||||
*/
|
*/
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
#include <lauxlib.h>
|
#include <lauxlib.h>
|
||||||
#include <sys/ksys.h>
|
#include <sys/ksys.h>
|
||||||
|
|
||||||
static inline void syscalls_register_scancodes(lua_State *L)
|
static inline void syscalls_register_scancodes(lua_State* L)
|
||||||
{
|
{
|
||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
|
|
||||||
|
@@ -86,7 +86,7 @@ static int syscalls_newindexSystemColors(lua_State* L)
|
|||||||
|
|
||||||
const char* index = luaL_checkstring(L, 2);
|
const char* index = luaL_checkstring(L, 2);
|
||||||
|
|
||||||
LUA_INTEGER val = luaL_checkinteger(L, 3);
|
ksys_color_t val = luaL_checkinteger(L, 3);
|
||||||
|
|
||||||
if (strcmp("frameArea", index) == 0)
|
if (strcmp("frameArea", index) == 0)
|
||||||
{
|
{
|
||||||
@@ -136,7 +136,7 @@ static int syscalls_newindexSystemColors(lua_State* L)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sycalls_eqSystemColors(lua_State* L)
|
static int syscalls_eqSystemColors(lua_State* L)
|
||||||
{
|
{
|
||||||
lua_pushboolean(
|
lua_pushboolean(
|
||||||
L,
|
L,
|
||||||
@@ -150,7 +150,7 @@ static int sycalls_eqSystemColors(lua_State* L)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sycalls_gcSystemColors(lua_State* L)
|
static int syscalls_gcSystemColors(lua_State* L)
|
||||||
{
|
{
|
||||||
ksys_colors_table_t* t = luaL_checkudata(L, 1, syscalls_SystemColors_metatable_name);
|
ksys_colors_table_t* t = luaL_checkudata(L, 1, syscalls_SystemColors_metatable_name);
|
||||||
free(t);
|
free(t);
|
||||||
@@ -172,8 +172,8 @@ ksys_colors_table_t* syscalls_pushSystemColors(lua_State* L)
|
|||||||
static const luaL_Reg syscalls_SystemColors_m[] = {
|
static const luaL_Reg syscalls_SystemColors_m[] = {
|
||||||
{"__index", syscalls_indexSystemColors},
|
{"__index", syscalls_indexSystemColors},
|
||||||
{"__newindex", syscalls_newindexSystemColors},
|
{"__newindex", syscalls_newindexSystemColors},
|
||||||
{"__eq", sycalls_eqSystemColors},
|
{"__eq", syscalls_eqSystemColors},
|
||||||
{"__gc", sycalls_gcSystemColors},
|
{"__gc", syscalls_gcSystemColors},
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#ifndef _SYSCALLS_SYSTEMCOLORS_H_
|
#ifndef _SYSCALLS_SYSTEM_COLORS_H_
|
||||||
#define _SYSCALLS_SYSTEMCOLORS_H_
|
#define _SYSCALLS_SYSTEM_COLORS_H_
|
||||||
|
|
||||||
#include <lua.h>
|
#include <lua.h>
|
||||||
#include <lualib.h>
|
#include <lualib.h>
|
||||||
@@ -17,4 +17,4 @@ ksys_colors_table_t* syscalls_pushSystemColors(lua_State* L);
|
|||||||
*/
|
*/
|
||||||
void syscalls_register_SystemColors(lua_State* L);
|
void syscalls_register_SystemColors(lua_State* L);
|
||||||
|
|
||||||
#endif // _SYSCALLS_SYSTEMCOLORS_H_
|
#endif // _SYSCALLS_SYSTEM_COLORS_H_
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
for i, v in pairs(require("syscalls")) do
|
for i, v in pairs(require("syscalls")) do
|
||||||
print(i, v)
|
print(i, v)
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user