xref: /freebsd/stand/liblua/lutils.h (revision e63d20b70ee1dbee9b075f29de6f30cdcfe1abe1)
17cafeaa1SWarner Losh /*-
27cafeaa1SWarner Losh  * Copyright (c) 2014 Pedro Souza <pedrosouza@freebsd.org>
37cafeaa1SWarner Losh  * All rights reserved.
47cafeaa1SWarner Losh  *
57cafeaa1SWarner Losh  * Redistribution and use in source and binary forms, with or without
67cafeaa1SWarner Losh  * modification, are permitted provided that the following conditions
77cafeaa1SWarner Losh  * are met:
87cafeaa1SWarner Losh  * 1. Redistributions of source code must retain the above copyright
97cafeaa1SWarner Losh  *    notice, this list of conditions and the following disclaimer.
107cafeaa1SWarner Losh  * 2. Redistributions in binary form must reproduce the above copyright
117cafeaa1SWarner Losh  *    notice, this list of conditions and the following disclaimer in the
127cafeaa1SWarner Losh  *    documentation and/or other materials provided with the distribution.
137cafeaa1SWarner Losh  *
147cafeaa1SWarner Losh  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
157cafeaa1SWarner Losh  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
167cafeaa1SWarner Losh  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
177cafeaa1SWarner Losh  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
187cafeaa1SWarner Losh  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
197cafeaa1SWarner Losh  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
207cafeaa1SWarner Losh  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
217cafeaa1SWarner Losh  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
227cafeaa1SWarner Losh  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
237cafeaa1SWarner Losh  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
247cafeaa1SWarner Losh  * SUCH DAMAGE.
257cafeaa1SWarner Losh  */
267cafeaa1SWarner Losh 
277cafeaa1SWarner Losh #include <lua.h>
287cafeaa1SWarner Losh 
29061b68a7SWarner Losh int	luaopen_gfx(lua_State *);
306771d4a8SConrad Meyer int	luaopen_loader(lua_State *);
316771d4a8SConrad Meyer int	luaopen_io(lua_State *);
320a0d522bSKyle Evans int	luaopen_pager(lua_State *);
330921a771SWarner Losh 
340921a771SWarner Losh #include <sys/linker_set.h>
350921a771SWarner Losh 
360921a771SWarner Losh typedef void lua_init_md_t(lua_State *);
37*e63d20b7SWarner Losh #define _LUA_COMPILE_SET Xlua_compile_set
380921a771SWarner Losh #define LUA_COMPILE_SET(func)	\
39b4e85f76SWarner Losh 	DATA_SET(_LUA_COMPILE_SET, func)
400921a771SWarner Losh #define LUA_FOREACH_SET(s) \
41b4e85f76SWarner Losh 	SET_FOREACH((s), _LUA_COMPILE_SET)
42b4e85f76SWarner Losh SET_DECLARE(_LUA_COMPILE_SET, lua_init_md_t);
43