summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/lua/llanglib.c
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2015-10-07 02:16:02 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2015-10-07 02:16:02 +0000
commita021762e6ccc1101fefbac38abb168b69a11f0ca (patch)
treebaf31827b9c7c7af518a3f4aa58ccba0de18b640 /Build/source/texk/web2c/luatexdir/lua/llanglib.c
parent4ca2692153042a0c2f7db8d681e190b867ae2faf (diff)
web2c/luatexdir: Sync with the upstream trunk.
git-svn-id: svn://tug.org/texlive/trunk@38575 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/lua/llanglib.c')
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/llanglib.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/Build/source/texk/web2c/luatexdir/lua/llanglib.c b/Build/source/texk/web2c/luatexdir/lua/llanglib.c
index 771f10219d3..616c0713a18 100644
--- a/Build/source/texk/web2c/luatexdir/lua/llanglib.c
+++ b/Build/source/texk/web2c/luatexdir/lua/llanglib.c
@@ -1,5 +1,5 @@
/* llanglib.c
-
+
Copyright 2006-2008 Taco Hoekwater <taco@luatex.org>
This file is part of LuaTeX.
@@ -177,6 +177,23 @@ static int lang_post_exhyphen_char(lua_State * L)
}
+static int lang_hyphenation_min(lua_State * L)
+{
+ struct tex_language **lang_ptr;
+ lang_ptr = check_islang(L, 1);
+ if (lua_gettop(L) != 1) {
+ if (!lua_isnumber(L, 2)) {
+ return luaL_error(L,
+ "lang.hyphenationmin(): argument should be a number");
+ }
+ (*lang_ptr)->hyphenation_min=(int)lua_tonumber(L, 2);
+ return 0;
+ } else {
+ lua_pushnumber(L, (*lang_ptr)->hyphenation_min);
+ return 1;
+ }
+}
+
static int lang_clear_hyphenation(lua_State * L)
{
struct tex_language **lang_ptr;
@@ -226,6 +243,7 @@ static const struct luaL_Reg langlib_d[] = {
{"posthyphenchar", lang_post_hyphen_char},
{"preexhyphenchar", lang_pre_exhyphen_char},
{"postexhyphenchar", lang_post_exhyphen_char},
+ {"hyphenationmin", lang_hyphenation_min},
{"id", lang_id},
/* *INDENT-ON* */
{NULL, NULL} /* sentinel */
@@ -242,6 +260,7 @@ static const struct luaL_Reg langlib[] = {
{"posthyphenchar", lang_post_hyphen_char},
{"preexhyphenchar", lang_pre_exhyphen_char},
{"postexhyphenchar", lang_post_exhyphen_char},
+ {"hyphenationmin", lang_hyphenation_min},
{"id", lang_id},
{"clean", do_lang_clean},
{"hyphenate", do_lang_hyphenate},