X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=contrib%2Fpackage%2Fiwinfo%2Fsrc%2Finclude%2Fiwinfo%2Flua.h;fp=contrib%2Fpackage%2Fiwinfo%2Fsrc%2Finclude%2Fiwinfo%2Flua.h;h=0000000000000000000000000000000000000000;hp=65a3a5cb910930346b52e559a01c6531870ad3a1;hb=239672e76b6005c300682f467be4855a8b7fe648;hpb=486770051bda52c6c763f82a68fa0ccfdbd1d908 diff --git a/contrib/package/iwinfo/src/include/iwinfo/lua.h b/contrib/package/iwinfo/src/include/iwinfo/lua.h deleted file mode 100644 index 65a3a5cb9..000000000 --- a/contrib/package/iwinfo/src/include/iwinfo/lua.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * iwinfo - Wireless Information Library - Lua Headers - * - * Copyright (C) 2009 Jo-Philipp Wich - * - * The iwinfo library is free software: you can redistribute it and/or - * modify it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * The iwinfo library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with the iwinfo library. If not, see http://www.gnu.org/licenses/. - */ - -#ifndef __IWINFO_LUALUB_H_ -#define __IWINFO_LUALIB_H_ - -#include -#include -#include - -#include "iwinfo.h" -#include "iwinfo/wext_scan.h" - - -#define IWINFO_META "iwinfo" -#define IWINFO_WEXT_META "iwinfo.wext" - -#ifdef USE_WL -#define IWINFO_WL_META "iwinfo.wl" -#endif - -#ifdef USE_MADWIFI -#define IWINFO_MADWIFI_META "iwinfo.madwifi" -#endif - -#ifdef USE_NL80211 -#define IWINFO_NL80211_META "iwinfo.nl80211" -#endif - - -#define LUA_REG(type,op) \ - { #op, iwinfo_L_##type##_##op } - -#define LUA_WRAP_INT(type,op) \ - static int iwinfo_L_##type##_##op(lua_State *L) \ - { \ - const char *ifname = luaL_checkstring(L, 1); \ - int rv; \ - if( !type##_get_##op(ifname, &rv) ) \ - lua_pushnumber(L, rv); \ - else \ - lua_pushnil(L); \ - return 1; \ - } - -#define LUA_WRAP_STRING(type,op) \ - static int iwinfo_L_##type##_##op(lua_State *L) \ - { \ - const char *ifname = luaL_checkstring(L, 1); \ - char rv[IWINFO_BUFSIZE]; \ - memset(rv, 0, IWINFO_BUFSIZE); \ - if( !type##_get_##op(ifname, rv) ) \ - lua_pushstring(L, rv); \ - else \ - lua_pushnil(L); \ - return 1; \ - } - -#define LUA_WRAP_LIST(type,op) \ - static int iwinfo_L_##type##_##op(lua_State *L) \ - { \ - return iwinfo_L_##op(L, type##_get_##op); \ - } - -#endif -