make working classes && add vscode config && add lua submodule
This commit is contained in:
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "lua"]
|
||||||
|
path = lua
|
||||||
|
url = https://git.kolibrios.org/lua/lua.git
|
23
.vscode/c_cpp_properties.json
vendored
Normal file
23
.vscode/c_cpp_properties.json
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Release",
|
||||||
|
"includePath": [
|
||||||
|
"${workspaceFolder}/lua/src",
|
||||||
|
"${workspaceFolder}/../kolibrios/contrib/sdk/sources/newlib/libc/include"
|
||||||
|
],
|
||||||
|
"defines": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Debug",
|
||||||
|
"includePath": [
|
||||||
|
"${workspaceFolder}/lua/src",
|
||||||
|
"${workspaceFolder}/../kolibrios/contrib/sdk/sources/newlib/libc/include"
|
||||||
|
],
|
||||||
|
"defines": [
|
||||||
|
"NDEBUG"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version": 4
|
||||||
|
}
|
8
.vscode/extensions.json
vendored
Normal file
8
.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"sumneko.lua",
|
||||||
|
"ms-vscode.cpptools",
|
||||||
|
"streetsidesoftware.code-spell-checker-russian",
|
||||||
|
"streetsidesoftware.code-spell-checker"
|
||||||
|
]
|
||||||
|
}
|
5
.vscode/settings.json
vendored
Normal file
5
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"files.associations": {
|
||||||
|
"stdlib.h": "c"
|
||||||
|
}
|
||||||
|
}
|
20
Makefile
20
Makefile
@@ -6,22 +6,22 @@ STRIP=kos32-strip
|
|||||||
OBJCOPY=kos32-objcopy
|
OBJCOPY=kos32-objcopy
|
||||||
STD=-std=gnu99
|
STD=-std=gnu99
|
||||||
CFLAGS=$(SYSCFLAGS) -O2 -Wall -Wextra -DLUA_COMPAT_5_3 $(STD) $(MYCFLAGS)
|
CFLAGS=$(SYSCFLAGS) -O2 -Wall -Wextra -DLUA_COMPAT_5_3 $(STD) $(MYCFLAGS)
|
||||||
LDFLAGS=$(SYSLDFLAGS) $(MYLDFLAGS) lua$(LUA_V).dll.a
|
LDFLAGS=$(SYSLDFLAGS) $(MYLDFLAGS)
|
||||||
LIBS=$(SYSLIBS) $(MYLIBS)
|
LIBS=$(SYSLIBS) $(MYLIBS) $(TOOLCHAIN_PATH)/mingw32/lib/lua$(LUA_V).dll.a
|
||||||
|
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS), Windows_NT)
|
||||||
TOOLCHAIN_PATH=C:/MinGW/msys/1.0/home/autobuild/tools/win32
|
TOOLCHAIN_PATH=C:/MinGW/msys/1.0/home/autobuild/tools/win32
|
||||||
else
|
else
|
||||||
TOOLCHAIN_PATH=/home/autobuild/tools/win32
|
TOOLCHAIN_PATH=/home/autobuild/tools/win32
|
||||||
endif
|
endif
|
||||||
|
|
||||||
KOLIBRIOS_REPO=../../kolibrios
|
KOLIBRIOS_REPO=../kolibrios
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SDK_DIR=$(KOLIBRIOS_REPO)/contrib/sdk
|
SDK_DIR=$(KOLIBRIOS_REPO)/contrib/sdk
|
||||||
NewLib_DIR=$(SDK_DIR)/sources/newlib
|
NewLib_DIR=$(SDK_DIR)/sources/newlib
|
||||||
SYSCFLAGS=-fno-ident -fomit-frame-pointer -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -I$(NewLib_DIR)/libc/include -I$(TOOLCHAIN_PATH)/include
|
SYSCFLAGS=-fno-ident -fomit-frame-pointer -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -I$(NewLib_DIR)/libc/include -I$(abspath .)/lua/src
|
||||||
SYSLDFLAGS=--image-base 0 -Tapp-dynamic.lds
|
SYSLDFLAGS=--image-base 0 -Tapp-dynamic.lds
|
||||||
SYSLIBS=-nostdlib -L $(SDK_DIR)/lib -L$(TOOLCHAIN_PATH)/lib -L$(TOOLCHAIN_PATH)/mingw32/lib -lgcc -lc.dll -ldll
|
SYSLIBS=-nostdlib -L $(SDK_DIR)/lib -L$(TOOLCHAIN_PATH)/lib -L$(TOOLCHAIN_PATH)/mingw32/lib -lgcc -lc.dll -ldll
|
||||||
MYCFLAGS=
|
MYCFLAGS=
|
||||||
@@ -29,15 +29,15 @@ MYLDFLAGS=
|
|||||||
MYLIBS=
|
MYLIBS=
|
||||||
MYOBJS=
|
MYOBJS=
|
||||||
|
|
||||||
ALL_O = src/syscalls.o src/ARP_entry.o src/sytemColors.o
|
ALL_O = src/syscalls.o src/ARP_entry.o src/systemColors.o
|
||||||
|
|
||||||
syscalls.dll: $(ALL_O)
|
syscalls.dll: $(ALL_O)
|
||||||
$(CC) -shared -T dll.lds --entry _DllStartup -o $@ lsyscalls.o $(SYSLIBS)
|
$(CC) -shared -T dll.lds --entry _DllStartup -o $@ $(ALL_O) $(LIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(ALL_O) syscalls.dll
|
rm -f $(ALL_O) syscalls.dll
|
||||||
|
|
||||||
|
|
||||||
src/syscalls.o: src/syscalls.c
|
src/syscalls.o: src/syscalls.c src/systemColors.h src/ARP_entry.h src/scancodes.h
|
||||||
src/ARP_entry.o: src/ARP_entry.c src/ARP_entry.h
|
src/ARP_entry.o: src/ARP_entry.c src/ARP_entry.h src/debug.h
|
||||||
src/sytemColors.o: src/sytemColors.c src/sytemColors.h
|
src/systemColors.o: src/systemColors.c src/systemColors.h src/debug.h
|
||||||
|
1
lua
Submodule
1
lua
Submodule
repo.diff.submodule_added%!(EXTRA template.HTML=lua, template.HTML=eae2ea0aaa)
@@ -1,27 +1,30 @@
|
|||||||
#include "ARP_entry.h"
|
#include "ARP_entry.h"
|
||||||
|
#include "debug.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <sys/ksys.h>
|
#include <sys/ksys.h>
|
||||||
|
|
||||||
|
|
||||||
static int syscalls_gcARPEntry(lua_State *L)
|
static int syscalls_gcARPEntry(lua_State* L)
|
||||||
{
|
{
|
||||||
free(lua_touserdata(L, 1));
|
free(lua_touserdata(L, 1));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool syscalls_cmpAPREntry(const struct ARP_entry *entry1, const struct ARP_entry *entry2)
|
static bool syscalls_cmpAPREntry(const struct ARP_entry* entry1, const struct ARP_entry* entry2)
|
||||||
{
|
{
|
||||||
return memcmp(entry1, entry2, sizeof(struct ARP_entry));
|
return memcmp(entry1, entry2, sizeof(struct ARP_entry));
|
||||||
}
|
}
|
||||||
|
|
||||||
int syscalls_indexARPEntry(lua_State *L)
|
int syscalls_indexARPEntry(lua_State* L)
|
||||||
{
|
{
|
||||||
struct ARP_entry *entry = (struct ARP_entry *)luaL_checkudata(L, 1, syscalls_ARPEntry_metatable_name);
|
DEBUG_LINE("ARP entry index");
|
||||||
|
|
||||||
const char *index = luaL_checkstring(L, 2);
|
struct ARP_entry* entry = (struct ARP_entry*)luaL_checkudata(L, 1, syscalls_ARPEntry_metatable_name);
|
||||||
|
|
||||||
|
const char* index = luaL_checkstring(L, 2);
|
||||||
|
|
||||||
if (strcmp(index, "IP") == 0)
|
if (strcmp(index, "IP") == 0)
|
||||||
{
|
{
|
||||||
@@ -50,11 +53,13 @@ int syscalls_indexARPEntry(lua_State *L)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int syscalls_newindexARPEntry(lua_State *L)
|
int syscalls_newindexARPEntry(lua_State* L)
|
||||||
{
|
{
|
||||||
struct ARP_entry *entry = (struct ARP_entry *)luaL_checkudata(L, 1, syscalls_ARPEntry_metatable_name);
|
DEBUG_LINE("ARP entry newindex");
|
||||||
|
|
||||||
const char *index = luaL_checkstring(L, 2);
|
struct ARP_entry* entry = (struct ARP_entry*)luaL_checkudata(L, 1, syscalls_ARPEntry_metatable_name);
|
||||||
|
|
||||||
|
const char* index = luaL_checkstring(L, 2);
|
||||||
|
|
||||||
if (strcmp(index, "IP"))
|
if (strcmp(index, "IP"))
|
||||||
{
|
{
|
||||||
@@ -80,13 +85,13 @@ int syscalls_newindexARPEntry(lua_State *L)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int syscalls_eqAPREntry(lua_State *L)
|
static int syscalls_eqAPREntry(lua_State* L)
|
||||||
{
|
{
|
||||||
lua_pushboolean(
|
lua_pushboolean(
|
||||||
L,
|
L,
|
||||||
syscalls_cmpAPREntry(
|
syscalls_cmpAPREntry(
|
||||||
(struct ARP_entry *)lua_touserdata(L, 1),
|
(struct ARP_entry*)lua_touserdata(L, 1),
|
||||||
(struct ARP_entry *)lua_touserdata(L, 2)
|
(struct ARP_entry*)lua_touserdata(L, 2)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -95,19 +100,15 @@ static int syscalls_eqAPREntry(lua_State *L)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
int syscalls_newARPEntry(lua_State *L)
|
int syscalls_newARPEntry(lua_State* L)
|
||||||
{
|
{
|
||||||
struct ARP_entry *entry = malloc(sizeof(struct ARP_entry));
|
struct ARP_entry* entry = syscalls_pushARPEntry(L);;
|
||||||
|
|
||||||
entry->IP = luaL_checkinteger(L, 1);
|
entry->IP = luaL_checkinteger(L, 1);
|
||||||
memcpy(entry->MAC, luaL_checkstring(L, 2), 6);
|
memcpy(entry->MAC, luaL_checkstring(L, 2), 6);
|
||||||
entry->Status = luaL_checkinteger(L, 3);
|
entry->Status = luaL_checkinteger(L, 3);
|
||||||
entry->TTL = luaL_checkinteger(L, 4);
|
entry->TTL = luaL_checkinteger(L, 4);
|
||||||
|
|
||||||
syscalls_pushARPEntry(
|
|
||||||
L,
|
|
||||||
entry);
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -116,27 +117,36 @@ static const luaL_Reg syscalls_ARPEntry_m[] = {
|
|||||||
{"__newindex", syscalls_newindexARPEntry},
|
{"__newindex", syscalls_newindexARPEntry},
|
||||||
{"__eq", syscalls_eqAPREntry},
|
{"__eq", syscalls_eqAPREntry},
|
||||||
{"__gc", syscalls_gcARPEntry},
|
{"__gc", syscalls_gcARPEntry},
|
||||||
{NULL, NULL}};
|
{NULL, NULL}
|
||||||
|
};
|
||||||
|
|
||||||
void syscalls_pushARPEntry(lua_State* L, struct ARP_entry* entry)
|
struct ARP_entry* syscalls_pushARPEntry(lua_State* L)
|
||||||
{
|
{
|
||||||
*(struct ARP_entry**)lua_newuserdata(L, sizeof(struct ARP_entry)) = entry;
|
DEBUG_LINE("push ARP entry");
|
||||||
|
|
||||||
luaL_newlibtable(L, syscalls_ARPEntry_m);
|
struct ARP_entry* entry = lua_newuserdata(L, sizeof(struct ARP_entry));
|
||||||
luaL_setfuncs(L, syscalls_ARPEntry_m, 0);
|
|
||||||
|
|
||||||
lua_setmetatable(L, -2);
|
luaL_setmetatable(L, syscalls_ARPEntry_metatable_name);
|
||||||
|
|
||||||
|
return entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const luaL_Reg syscalls_ARPEntry_lib[] = {
|
static const luaL_Reg syscalls_ARPEntry_lib[] = {
|
||||||
{"new", syscalls_newARPEntry},
|
{"new", syscalls_newARPEntry},
|
||||||
{NULL, NULL}};
|
{NULL, NULL}
|
||||||
|
};
|
||||||
|
|
||||||
void syscalls_register_ARPEntry(lua_State *L)
|
void syscalls_register_ARPEntry(lua_State* L)
|
||||||
{
|
{
|
||||||
|
DEBUG_LINE("register ARP entry");
|
||||||
|
|
||||||
luaL_newlib(L, syscalls_ARPEntry_lib);
|
luaL_newlib(L, syscalls_ARPEntry_lib);
|
||||||
|
|
||||||
lua_setfield(L, -2, syscalls_ARPEntry_name);
|
lua_setfield(L, -2, syscalls_ARPEntry_name);
|
||||||
|
|
||||||
luaL_newlibtable(L, syscalls_ARPEntry_m);
|
|
||||||
|
luaL_newmetatable(L, syscalls_ARPEntry_metatable_name);
|
||||||
luaL_setfuncs(L, syscalls_ARPEntry_m, 0);
|
luaL_setfuncs(L, syscalls_ARPEntry_m, 0);
|
||||||
|
|
||||||
|
lua_pop(L, 1);
|
||||||
}
|
}
|
||||||
|
@@ -22,15 +22,15 @@ struct ARP_entry
|
|||||||
/*
|
/*
|
||||||
* Create ARPEntry
|
* Create ARPEntry
|
||||||
*/
|
*/
|
||||||
void syscalls_pushARPEntry(lua_State *L, struct ARP_entry *entry);
|
struct ARP_entry* syscalls_pushARPEntry(lua_State* L);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* shell of syscalls_createARPEntry for lua
|
* shell of syscalls_createARPEntry for lua
|
||||||
*/
|
*/
|
||||||
int syscalls_newARPEntry(lua_State *L);
|
int syscalls_newARPEntry(lua_State* L);
|
||||||
int syscalls_indexARPEntry(lua_State *L);
|
int syscalls_indexARPEntry(lua_State* L);
|
||||||
int syscalls_newindexARPEntry(lua_State *L);
|
int syscalls_newindexARPEntry(lua_State* L);
|
||||||
|
|
||||||
void syscalls_register_ARPEntry(lua_State *L);
|
void syscalls_register_ARPEntry(lua_State* L);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
23
src/debug.h
Normal file
23
src/debug.h
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
#ifndef __DEBUG_H__
|
||||||
|
#define __DEBUG_H__
|
||||||
|
|
||||||
|
#ifdef NDEBUG
|
||||||
|
|
||||||
|
#include <sys/ksys.h>
|
||||||
|
/**
|
||||||
|
* Debug out, enabled
|
||||||
|
*/
|
||||||
|
#define DEBUG_PRINT(msg) _ksys_debug_puts(msg)
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Debug out, disabled
|
||||||
|
*/
|
||||||
|
#define DEBUG_PRINT(msg)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define DEBUG_LINE(msg) DEBUG_PRINT(msg); DEBUG_PRINT("\n")
|
||||||
|
|
||||||
|
#endif // __DEBUG_H__
|
349
src/syscalls.c
349
src/syscalls.c
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,14 @@
|
|||||||
#include "systemColors.h"
|
#include "systemColors.h"
|
||||||
|
#include "debug.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
|
||||||
|
static int syscalls_SystemColors_m_index;
|
||||||
|
|
||||||
int syscalls_newSystemColors(lua_State* L)
|
int syscalls_newSystemColors(lua_State* L)
|
||||||
{
|
{
|
||||||
ksys_colors_table_t* colorsTable = malloc(sizeof(ksys_colors_table_t));
|
ksys_colors_table_t* colorsTable = syscalls_pushSystemColors(L);
|
||||||
|
|
||||||
colorsTable->frame_area = luaL_optinteger(L, 1, 0);
|
colorsTable->frame_area = luaL_optinteger(L, 1, 0);
|
||||||
colorsTable->grab_bar = luaL_optinteger(L, 2, 0);
|
colorsTable->grab_bar = luaL_optinteger(L, 2, 0);
|
||||||
@@ -17,13 +21,13 @@ int syscalls_newSystemColors(lua_State* L)
|
|||||||
colorsTable->work_graph = luaL_optinteger(L, 9, 0);
|
colorsTable->work_graph = luaL_optinteger(L, 9, 0);
|
||||||
colorsTable->work_text = luaL_optinteger(L, 10, 0);
|
colorsTable->work_text = luaL_optinteger(L, 10, 0);
|
||||||
|
|
||||||
syscalls_pushSystemColors(L, colorsTable);
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int syscalls_indexSystemColors(lua_State* L)
|
static int syscalls_indexSystemColors(lua_State* L)
|
||||||
{
|
{
|
||||||
|
DEBUG_LINE("system colors index");
|
||||||
|
|
||||||
const ksys_colors_table_t* t = (const ksys_colors_table_t*)luaL_checkudata(L, 1, syscalls_SystemColors_metatable_name);
|
const ksys_colors_table_t* t = (const ksys_colors_table_t*)luaL_checkudata(L, 1, syscalls_SystemColors_metatable_name);
|
||||||
|
|
||||||
const char* index = luaL_checkstring(L, 2);
|
const char* index = luaL_checkstring(L, 2);
|
||||||
@@ -150,35 +154,41 @@ static int sycalls_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);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ksys_colors_table_t* syscalls_pushSystemColors(lua_State* L)
|
||||||
|
{
|
||||||
|
DEBUG_LINE("push system colors table");
|
||||||
|
|
||||||
|
ksys_colors_table_t* colorsTable = lua_newuserdata(L, sizeof(ksys_colors_table_t));
|
||||||
|
luaL_setmetatable(L, syscalls_SystemColors_metatable_name);
|
||||||
|
|
||||||
|
return colorsTable;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
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", sycalls_eqSystemColors},
|
||||||
{NULL, NULL} };
|
{"__gc", sycalls_gcSystemColors},
|
||||||
|
{NULL, NULL}
|
||||||
void syscalls_pushSystemColors(lua_State* L, ksys_colors_table_t* colorsTable)
|
};
|
||||||
{
|
|
||||||
*(ksys_colors_table_t**)lua_newuserdata(L, sizeof(ksys_colors_table_t)) = colorsTable;
|
|
||||||
|
|
||||||
luaL_newlibtable(L, syscalls_SystemColors_m);
|
|
||||||
luaL_setfuncs(L, syscalls_SystemColors_m, 0);
|
|
||||||
|
|
||||||
lua_setmetatable(L, -2);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static const luaL_Reg syscalls_SystemColors_lib[] = {
|
static const luaL_Reg syscalls_SystemColors_lib[] = {
|
||||||
{"new", syscalls_newSystemColors},
|
{"new", syscalls_newSystemColors},
|
||||||
{NULL, NULL} };
|
{NULL, NULL}
|
||||||
|
};
|
||||||
|
|
||||||
void syscalls_register_SystemColors(lua_State* L)
|
void syscalls_register_SystemColors(lua_State* L)
|
||||||
{
|
{
|
||||||
luaL_newlib(L, syscalls_SystemColors_lib);
|
luaL_newlib(L, syscalls_SystemColors_lib);
|
||||||
lua_setfield(L, -2, syscalls_SystemColors_name);
|
lua_setfield(L, -2, "SystemColors");
|
||||||
|
|
||||||
luaL_newlibtable(L, syscalls_SystemColors_m);
|
luaL_newmetatable(L, syscalls_SystemColors_metatable_name);
|
||||||
luaL_setfuncs(L, syscalls_SystemColors_m, 0);
|
luaL_setfuncs(L, syscalls_SystemColors_m, 0);
|
||||||
|
|
||||||
|
lua_pop(L, 1);
|
||||||
}
|
}
|
||||||
|
@@ -6,14 +6,15 @@
|
|||||||
#include <lauxlib.h>
|
#include <lauxlib.h>
|
||||||
#include <sys/ksys.h>
|
#include <sys/ksys.h>
|
||||||
|
|
||||||
|
#define syscalls_SystemColors_metatable_name "syscalls SystemColors metatable"
|
||||||
|
|
||||||
#define syscalls_SystemColors_name "SystemColors"
|
int syscalls_newSystemColors(lua_State* L);
|
||||||
#define syscalls_SystemColors_metatable_name syscalls_SystemColors_name ".mt"
|
|
||||||
|
|
||||||
int syscalls_newSystemColors(lua_State *L);
|
ksys_colors_table_t* syscalls_pushSystemColors(lua_State* L);
|
||||||
|
|
||||||
void syscalls_pushSystemColors(lua_State *L, ksys_colors_table_t *t);
|
/**
|
||||||
|
* Register SystemColors lib
|
||||||
void syscalls_register_SystemColors(lua_State *L);
|
*/
|
||||||
|
void syscalls_register_SystemColors(lua_State* L);
|
||||||
|
|
||||||
#endif // _SYSCALLS_SYSTEMCOLORS_H_
|
#endif // _SYSCALLS_SYSTEMCOLORS_H_
|
||||||
|
9
tests/SystemColors.lua
Normal file
9
tests/SystemColors.lua
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
local syscalls = require("syscalls")
|
||||||
|
|
||||||
|
local SystemColors = syscalls.GetSystemColors()
|
||||||
|
|
||||||
|
print(SystemColors)
|
||||||
|
|
||||||
|
for i, v in pairs(SystemColors) do
|
||||||
|
print(i, v)
|
||||||
|
end
|
4
tests/libraryStruct.lua
Normal file
4
tests/libraryStruct.lua
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
for i, v in pairs(require("syscalls")) do
|
||||||
|
print(i, v)
|
||||||
|
end
|
Reference in New Issue
Block a user