aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFerenc Wágner <wferi@niif.hu>2014-07-03 15:45:27 +0200
committerFerenc Wágner <wferi@niif.hu>2014-10-11 21:59:15 +0200
commit8eb0ba9e217943280315af3e745125cfb28341dc (patch)
tree620ce2af704bba7b7ed2960a74ff1447db78ecc7
parentc141c539e233095176300db0ead76531c14a7e47 (diff)
downloadsyslinux-8eb0ba9e217943280315af3e745125cfb28341dc.tar.gz
syslinux-8eb0ba9e217943280315af3e745125cfb28341dc.tar.xz
syslinux-8eb0ba9e217943280315af3e745125cfb28341dc.zip
lua: share the export macro (CPP only change)
Signed-off-by: Ferenc Wágner <wferi@niif.hu>
-rw-r--r--com32/lua/src/syslinux.c78
1 files changed, 39 insertions, 39 deletions
diff --git a/com32/lua/src/syslinux.c b/com32/lua/src/syslinux.c
index f17faf32..fc2effc9 100644
--- a/com32/lua/src/syslinux.c
+++ b/com32/lua/src/syslinux.c
@@ -489,49 +489,49 @@ LUALIB_API int luaopen_syslinux(lua_State * L)
luaL_newlib(L, syslinuxlib);
+#define export(c,x) lua_pushinteger (L,c##_##x); lua_setfield (L, -2, #x);
+
lua_newtable (L);
-#define export_key(x) lua_pushinteger (L, KEY_##x); lua_setfield (L, -2, #x);
- export_key (NONE);
- export_key (BACKSPACE);
- export_key (TAB);
- export_key (ENTER);
- export_key (ESC);
- export_key (DEL);
- export_key (F1);
- export_key (F2);
- export_key (F3);
- export_key (F4);
- export_key (F5);
- export_key (F6);
- export_key (F7);
- export_key (F8);
- export_key (F9);
- export_key (F10);
- export_key (F11);
- export_key (F12);
- export_key (UP);
- export_key (DOWN);
- export_key (LEFT);
- export_key (RIGHT);
- export_key (PGUP);
- export_key (PGDN);
- export_key (HOME);
- export_key (END);
- export_key (INSERT);
- export_key (DELETE);
+ export (KEY, NONE);
+ export (KEY, BACKSPACE);
+ export (KEY, TAB);
+ export (KEY, ENTER);
+ export (KEY, ESC);
+ export (KEY, DEL);
+ export (KEY, F1);
+ export (KEY, F2);
+ export (KEY, F3);
+ export (KEY, F4);
+ export (KEY, F5);
+ export (KEY, F6);
+ export (KEY, F7);
+ export (KEY, F8);
+ export (KEY, F9);
+ export (KEY, F10);
+ export (KEY, F11);
+ export (KEY, F12);
+ export (KEY, UP);
+ export (KEY, DOWN);
+ export (KEY, LEFT);
+ export (KEY, RIGHT);
+ export (KEY, PGUP);
+ export (KEY, PGDN);
+ export (KEY, HOME);
+ export (KEY, END);
+ export (KEY, INSERT);
+ export (KEY, DELETE);
lua_setfield (L, -2, "KEY");
lua_newtable (L);
-#define export_image_type(x) lua_pushinteger (L, IMAGE_TYPE_##x); lua_setfield (L, -2, #x);
- export_image_type (KERNEL);
- export_image_type (LINUX);
- export_image_type (BOOT);
- export_image_type (BSS);
- export_image_type (PXE);
- export_image_type (FDIMAGE);
- export_image_type (COM32);
- export_image_type (CONFIG);
- export_image_type (LOCALBOOT);
+ export (IMAGE_TYPE, KERNEL);
+ export (IMAGE_TYPE, LINUX);
+ export (IMAGE_TYPE, BOOT);
+ export (IMAGE_TYPE, BSS);
+ export (IMAGE_TYPE, PXE);
+ export (IMAGE_TYPE, FDIMAGE);
+ export (IMAGE_TYPE, COM32);
+ export (IMAGE_TYPE, CONFIG);
+ export (IMAGE_TYPE, LOCALBOOT);
lua_setfield (L, -2, "IMAGE_TYPE");
return 1;