diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-02-06 18:03:24 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-02-06 18:03:24 -0200 |
commit | 68df7c6279421a0a5710afc31e5cd3122e0d3391 (patch) | |
tree | 4558a662b35c9ae26d5c20858e6f1ba2daa4c580 /lutf8lib.c | |
parent | 19ad78d713081e422bd6e70c05837ba9034a49a4 (diff) | |
download | lua-68df7c6279421a0a5710afc31e5cd3122e0d3391.tar.gz lua-68df7c6279421a0a5710afc31e5cd3122e0d3391.tar.bz2 lua-68df7c6279421a0a5710afc31e5cd3122e0d3391.zip |
added proper headers for a standard lib file
Diffstat (limited to 'lutf8lib.c')
-rw-r--r-- | lutf8lib.c | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -1,11 +1,21 @@ | |||
1 | /* gcc -shared -o utf8.so -fpic -O2 -Wall -I.. utf8.c */ | 1 | /* |
2 | ** $Id: $ | ||
3 | ** Standard library for UTF-8 manipulation | ||
4 | ** See Copyright Notice in lua.h | ||
5 | */ | ||
6 | |||
2 | 7 | ||
3 | #include <assert.h> | 8 | #include <assert.h> |
4 | #include <stdlib.h> | 9 | #include <stdlib.h> |
5 | #include <string.h> | 10 | #include <string.h> |
6 | 11 | ||
12 | #define lutf8lib_c | ||
13 | #define LUA_LIB | ||
14 | |||
7 | #include "lua.h" | 15 | #include "lua.h" |
16 | |||
8 | #include "lauxlib.h" | 17 | #include "lauxlib.h" |
18 | #include "lualib.h" | ||
9 | 19 | ||
10 | #define MAXUNICODE 0x10FFFF | 20 | #define MAXUNICODE 0x10FFFF |
11 | 21 | ||
@@ -221,9 +231,6 @@ static struct luaL_Reg funcs[] = { | |||
221 | }; | 231 | }; |
222 | 232 | ||
223 | 233 | ||
224 | |||
225 | int luaopen_utf8 (lua_State *L); | ||
226 | |||
227 | int luaopen_utf8 (lua_State *L) { | 234 | int luaopen_utf8 (lua_State *L) { |
228 | luaL_newlib(L, funcs); | 235 | luaL_newlib(L, funcs); |
229 | lua_pushliteral(L, UTF8PATT); | 236 | lua_pushliteral(L, UTF8PATT); |