lua5.4
宏定义 | 类型定义 | 函数 | 变量
lutf8lib.c 文件参考
#include "lprefix.h"
#include <assert.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
lutf8lib.c 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

宏定义

#define lutf8lib_c
 
#define LUA_LIB
 
#define MAXUNICODE   0x10FFFFu
 
#define MAXUTF   0x7FFFFFFFu
 
#define iscont(p)   ((*(p) & 0xC0) == 0x80)
 
#define UTF8PATT   "[\0-\x7F\xC2-\xFD][\x80-\xBF]*"
 

类型定义

typedef unsigned long utfint
 

函数

static lua_Integer u_posrelat (lua_Integer pos, size_t len)
 
static const char * utf8_decode (const char *s, utfint *val, int strict)
 
static int utflen (lua_State *L)
 
static int codepoint (lua_State *L)
 
static void pushutfchar (lua_State *L, int arg)
 
static int utfchar (lua_State *L)
 
static int byteoffset (lua_State *L)
 
static int iter_aux (lua_State *L, int strict)
 
static int iter_auxstrict (lua_State *L)
 
static int iter_auxlax (lua_State *L)
 
static int iter_codes (lua_State *L)
 
LUAMOD_API int luaopen_utf8 (lua_State *L)
 

变量

static const luaL_Reg funcs []
 

宏定义说明

◆ iscont

#define iscont (   p)    ((*(p) & 0xC0) == 0x80)

◆ LUA_LIB

#define LUA_LIB

◆ lutf8lib_c

#define lutf8lib_c

◆ MAXUNICODE

#define MAXUNICODE   0x10FFFFu

◆ MAXUTF

#define MAXUTF   0x7FFFFFFFu

◆ UTF8PATT

#define UTF8PATT   "[\0-\x7F\xC2-\xFD][\x80-\xBF]*"

类型定义说明

◆ utfint

typedef unsigned long utfint

函数说明

◆ byteoffset()

static int byteoffset ( lua_State L)
static
函数调用图:

◆ codepoint()

static int codepoint ( lua_State L)
static
函数调用图:

◆ iter_aux()

static int iter_aux ( lua_State L,
int  strict 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ iter_auxlax()

static int iter_auxlax ( lua_State L)
static
函数调用图:
这是这个函数的调用关系图:

◆ iter_auxstrict()

static int iter_auxstrict ( lua_State L)
static
函数调用图:
这是这个函数的调用关系图:

◆ iter_codes()

static int iter_codes ( lua_State L)
static
函数调用图:

◆ luaopen_utf8()

LUAMOD_API int luaopen_utf8 ( lua_State L)
函数调用图:

◆ pushutfchar()

static void pushutfchar ( lua_State L,
int  arg 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ u_posrelat()

static lua_Integer u_posrelat ( lua_Integer  pos,
size_t  len 
)
static
这是这个函数的调用关系图:

◆ utf8_decode()

static const char* utf8_decode ( const char *  s,
utfint val,
int  strict 
)
static
这是这个函数的调用关系图:

◆ utfchar()

static int utfchar ( lua_State L)
static
函数调用图:

◆ utflen()

static int utflen ( lua_State L)
static
函数调用图:

变量说明

◆ funcs

const luaL_Reg funcs[]
static
初始值:
= {
{"offset", byteoffset},
{"codepoint", codepoint},
{"char", utfchar},
{"len", utflen},
{"codes", iter_codes},
{"charpattern", NULL},
{NULL, NULL}
}
iter_codes
static int iter_codes(lua_State *L)
Definition: lutf8lib.c:257
codepoint
static int codepoint(lua_State *L)
Definition: lutf8lib.c:122
utflen
static int utflen(lua_State *L)
Definition: lutf8lib.c:92
byteoffset
static int byteoffset(lua_State *L)
Definition: lutf8lib.c:183
utfchar
static int utfchar(lua_State *L)
Definition: lutf8lib.c:161