summaryrefslogtreecommitdiff
path: root/Build/source/texk
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2016-02-10 23:48:47 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2016-02-10 23:48:47 +0000
commitebd7b4631042cbbfe8e6ad5bea6c00a9037fb8ae (patch)
tree83c5ba9a90bd929ab8c04d0a77925e885ee102c1 /Build/source/texk
parent8abd04ee7bd6fe2e5ea27d3832600860eb9c0e4f (diff)
web2c/luatexdir: sync with the upstream
git-svn-id: svn://tug.org/texlive/trunk@39661 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/ltexlib.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/luatexdir/lua/ltexlib.c b/Build/source/texk/web2c/luatexdir/lua/ltexlib.c
index 97d754a152b..060a60708f0 100644
--- a/Build/source/texk/web2c/luatexdir/lua/ltexlib.c
+++ b/Build/source/texk/web2c/luatexdir/lua/ltexlib.c
@@ -1076,6 +1076,19 @@ static int getbox(lua_State * L)
return 1;
}
+static int splitbox(lua_State * L)
+{
+ int k = get_box_id(L, 1, true);
+ check_index_range(k, "splitbox");
+ if (lua_isnumber(L, 2)) {
+ nodelist_to_lua(L, vsplit(k,lua_tointeger(L,2)));
+ } else {
+ /* maybe a warning */
+ lua_pushnil(L);
+ }
+ return 1;
+}
+
static int isbox(lua_State * L)
{
int k = get_box_id(L, -1, false);
@@ -2822,6 +2835,7 @@ static const struct luaL_Reg texlib[] = {
{ "isbox", isbox },
{ "setbox", setbox },
{ "getbox", getbox },
+ { "splitbox", splitbox },
{ "setlist", setlist },
{ "getlist", getlist },
{ "setnest", setnest },