mirror of https://github.com/rusefi/lua.git
added proper headers for a standard lib file
This commit is contained in:
parent
19ad78d713
commit
68df7c6279
15
lutf8lib.c
15
lutf8lib.c
|
@ -1,11 +1,21 @@
|
||||||
/* gcc -shared -o utf8.so -fpic -O2 -Wall -I.. utf8.c */
|
/*
|
||||||
|
** $Id: $
|
||||||
|
** Standard library for UTF-8 manipulation
|
||||||
|
** See Copyright Notice in lua.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#define lutf8lib_c
|
||||||
|
#define LUA_LIB
|
||||||
|
|
||||||
#include "lua.h"
|
#include "lua.h"
|
||||||
|
|
||||||
#include "lauxlib.h"
|
#include "lauxlib.h"
|
||||||
|
#include "lualib.h"
|
||||||
|
|
||||||
#define MAXUNICODE 0x10FFFF
|
#define MAXUNICODE 0x10FFFF
|
||||||
|
|
||||||
|
@ -221,9 +231,6 @@ static struct luaL_Reg funcs[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int luaopen_utf8 (lua_State *L);
|
|
||||||
|
|
||||||
int luaopen_utf8 (lua_State *L) {
|
int luaopen_utf8 (lua_State *L) {
|
||||||
luaL_newlib(L, funcs);
|
luaL_newlib(L, funcs);
|
||||||
lua_pushliteral(L, UTF8PATT);
|
lua_pushliteral(L, UTF8PATT);
|
||||||
|
|
Loading…
Reference in New Issue