Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@
lualock
apidocs/
apidocs/*

# Temporary files
*swp
*swo
*~
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PKGS := gtk+-3.0 lua oocairo xscrnsaver x11
INCS := $(shell pkg-config --cflags $(PKGS))
LIBS := $(shell pkg-config --libs $(PKGS)) -lpam

CFLAGS := -Wall -Wextra -std=gnu99 -I. $(INCS) $(CFLAGS)
CFLAGS := -Wall -Wextra -std=gnu99 -I. $(INCS) -D LUA_COMPAT_MODULE $(CFLAGS)
CPPFLAGS := -DLUALOCK_INSTALL_DIR=\"$(INSTALLDIR)/share/lualock\" \
-DLUALOCK_DATA_DIR=\"$(INSTALLDIR)/share/lualock/data\" $(CPPFLAGS)
DEBUG := -g -DDEBUG
Expand Down
3 changes: 2 additions & 1 deletion clib/cairo_surface.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#define luaL_register(L,n,l) (luaL_openlib(L,(n),(l),0))
#include <cairo.h>
#include <oocairo.h>

Expand Down Expand Up @@ -52,7 +53,7 @@ static gint lualock_lua_cairo_surface_resize(lua_State *L) {
}

void lualock_lua_cairo_surface_init(lua_State *L) {
const struct luaL_reg lualock_cairo_surface_lib[] =
const struct luaL_Reg lualock_cairo_surface_lib[] =
{
{ "show", lualock_lua_cairo_surface_show },
{ "get_surface", lualock_lua_cairo_surface_get_surface },
Expand Down
3 changes: 2 additions & 1 deletion clib/hook.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
// MA 02110-1301, USA.
//

#define luaL_register(L,n,l) (luaL_openlib(L,(n),(l),0))
#include <lauxlib.h>
#include <string.h>

Expand Down Expand Up @@ -55,7 +56,7 @@ static gint lualock_lua_hook_connect(lua_State *L) {
}

void lualock_lua_hook_init(lua_State *L) {
const struct luaL_reg lualock_hook_lib[] = {
const struct luaL_Reg lualock_hook_lib[] = {
{ "connect", lualock_lua_hook_connect },
{ NULL, NULL }
};
Expand Down
4 changes: 2 additions & 2 deletions clib/image.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ static gint lualock_lua_image_get_surface(lua_State *L) {
}

void lualock_lua_image_init(lua_State *L) {
const struct luaL_reg lualock_image_lib[] =
const struct luaL_Reg lualock_image_lib[] =
{
{ "show", lualock_lua_image_show },
{ "hide", lualock_lua_image_hide },
Expand All @@ -258,7 +258,7 @@ void lualock_lua_image_init(lua_State *L) {
lua_pushvalue(L, -1);
lua_setfield(L, -2, "__index");

luaL_register(L, NULL, lualock_image_lib);
luaL_setfuncs(L, lualock_image_lib, 0);
lua_register(L, "image", lualock_lua_image_new);
lua_pop(L, 1);
}
Expand Down
3 changes: 2 additions & 1 deletion clib/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
// MA 02110-1301, USA.
//

#define luaL_register(L,n,l) (luaL_openlib(L,(n),(l),0))
#include <lauxlib.h>
#include <stdlib.h>
#include <unistd.h>
Expand Down Expand Up @@ -88,7 +89,7 @@ static gint lualock_lua_timer_stop(lua_State *L) {
}

void lualock_lua_timer_init(lua_State *L) {
const struct luaL_reg lualock_timer_lib[] = {
const struct luaL_Reg lualock_timer_lib[] = {
{ "start", lualock_lua_timer_start },
{ "stop", lualock_lua_timer_stop },
{ NULL, NULL }
Expand Down
3 changes: 2 additions & 1 deletion clib/utils.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#define luaL_register(L,n,l) (luaL_openlib(L,(n),(l),0))
#include <glib.h>
#include <lauxlib.h>
#include <unistd.h>
Expand Down Expand Up @@ -91,7 +92,7 @@ static gint lualock_lua_parse_color(lua_State *L) {
}

void lualock_lua_utils_init(lua_State *L) {
const struct luaL_reg lualock_utils_lib[] = {
const struct luaL_Reg lualock_utils_lib[] = {
{ "spawn", lualock_lua_spawn },
{ "get_data_dir", lualock_lua_get_data_dir },
{ "get_config_dir", lualock_lua_get_config_dir },
Expand Down