diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-02-02 12:59:48 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-02-02 12:59:48 +0000 |
commit | 0fba996c14f13fc489663ff83ac7363295a475ef (patch) | |
tree | 325d49cb75e01489809969b20ce056688493a242 /Build/source/texk/web2c/luatexdir | |
parent | b9a5638378c7ec50deb5cb387b99d95c6ae47a46 (diff) |
web2c/luatexdir: sync with the upstream
git-svn-id: svn://tug.org/texlive/trunk@39549 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lang/texlang.w | 9 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua/lnodelib.c | 12 |
2 files changed, 11 insertions, 10 deletions
diff --git a/Build/source/texk/web2c/luatexdir/lang/texlang.w b/Build/source/texk/web2c/luatexdir/lang/texlang.w index 170770bfeed..4e760a2d1fe 100644 --- a/Build/source/texk/web2c/luatexdir/lang/texlang.w +++ b/Build/source/texk/web2c/luatexdir/lang/texlang.w @@ -26,7 +26,7 @@ @ Low-level helpers @ @c -#define noVERBOSE +#define VERBOSE 0 #define MAX_TEX_LANGUAGES 16384 @@ -193,9 +193,6 @@ void load_tex_patterns(int curlang, halfword head) uindex = uni2string(uindex, xx); \ } while (0) -#define hj_char_code(l,c) \ - (l>=0 && get_hj_code(l,c)) - @ Cleans one word which is returned in |cleaned|, returns the new offset into |buffer| @@ -761,7 +758,7 @@ static halfword find_next_wordstart(halfword r) } else { start_ok = 0; } - } else if (start_ok && (l = hj_char_code(char_lang(r),chr)) > 0) { + } else if (start_ok && (char_lang(r)>0) && ((l = get_hj_code(char_lang(r),chr)) > 0)) { if (char_uchyph(r) || l == chr) { return r; } else { @@ -854,7 +851,7 @@ void hnj_hyphenation(halfword head, halfword tail) langdata.pre_hyphen_char = get_pre_hyphen_char(clang); langdata.post_hyphen_char = get_post_hyphen_char(clang); while (r != null && type(r) == glyph_node && is_simple_character(r) && clang == char_lang(r) && - (((lchar = hj_char_code(clang,character(r))) > 0) || (character(r) == ex_hyphen_char && (lchar = ex_hyphen_char)))) { + (((clang > 0) && (lchar = get_hj_code(clang,character(r))) > 0) || (character(r) == ex_hyphen_char && (lchar = ex_hyphen_char)))) { if (character(r) == ex_hyphen_char) explicit_hyphen = true; wordlen++; diff --git a/Build/source/texk/web2c/luatexdir/lua/lnodelib.c b/Build/source/texk/web2c/luatexdir/lua/lnodelib.c index d8c23b75c1f..2b44f6facad 100644 --- a/Build/source/texk/web2c/luatexdir/lua/lnodelib.c +++ b/Build/source/texk/web2c/luatexdir/lua/lnodelib.c @@ -984,11 +984,15 @@ static int lua_nodelib_direct_getboth(lua_State * L) static int lua_nodelib_subtype(lua_State * L) { - int i = get_node_type_id_from_name(L,1,whatsit_node_data); - if (i >= 0) { - lua_pushinteger(L, i); + if (lua_type(L,1) == LUA_TSTRING) { + int i = get_node_type_id_from_name(L,1,whatsit_node_data); + if (i >= 0) { + lua_pushinteger(L, i); + } else { + lua_pushnil(L); + } } else { - lua_pushnil(L); /* return 0; */ + lua_pushnil(L); } return 1; } |