diff options
author | Luigi Scarso <luigi.scarso@gmail.com> | 2018-01-09 23:43:20 +0000 |
---|---|---|
committer | Luigi Scarso <luigi.scarso@gmail.com> | 2018-01-09 23:43:20 +0000 |
commit | aa5d0e8bf3515c424ba0594a2d4e06ae31da7796 (patch) | |
tree | e56fd10d89732547ddb207c1998a1ded4360382e /Build/source/texk/web2c/luatexdir/lang/hyphen.w | |
parent | d33684eeca435784c95c62c7981dd02f7818b263 (diff) |
Imported Luatex 1.06.3 (Lua 5.2.4)
git-svn-id: svn://tug.org/texlive/trunk@46269 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/lang/hyphen.w')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lang/hyphen.w | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/Build/source/texk/web2c/luatexdir/lang/hyphen.w b/Build/source/texk/web2c/luatexdir/lang/hyphen.w index 8e13896090d..35befb743de 100644 --- a/Build/source/texk/web2c/luatexdir/lang/hyphen.w +++ b/Build/source/texk/web2c/luatexdir/lang/hyphen.w @@ -776,6 +776,8 @@ void hnj_hyphen_load(HyphenDict * dict, const unsigned char *f) } @ @c +extern halfword insert_syllable_discretionary(halfword t, lang_variables * lan); + void hnj_hyphen_hyphenate(HyphenDict * dict, halfword first1, halfword last1, @@ -791,9 +793,9 @@ void hnj_hyphen_hyphenate(HyphenDict * dict, char *hyphens = hnj_malloc(hyphen_len + 1); /* Add a '.' to beginning and end to facilitate matching */ - set_vlink(begin_point, first1); - set_vlink(end_point, get_vlink(last1)); - set_vlink(last1, end_point); + vlink(begin_point) = first1; + vlink(end_point) = vlink(last1); + vlink(last1) = end_point; for (char_num = 0; char_num < hyphen_len; char_num++) { hyphens[char_num] = '0'; @@ -801,16 +803,16 @@ void hnj_hyphen_hyphenate(HyphenDict * dict, hyphens[hyphen_len] = 0; /* now, run the finite state machine */ - for (char_num = 0, here = begin_point; here != get_vlink(end_point); - here = get_vlink(here)) { + for (char_num = 0, here = begin_point; here != vlink(end_point); + here = vlink(here)) { int ch; if (here == begin_point || here == end_point) { ch = '.'; } else { - ch = get_hj_code(char_lang(here),get_character(here)); + ch = get_hj_code(char_lang(here),character(here)); if (ch <= 32) { - ch = get_character(here); + ch = character(here); } } while (state != -1) { @@ -857,14 +859,14 @@ void hnj_hyphen_hyphenate(HyphenDict * dict, } /* restore the correct pointers */ - set_vlink(last1, get_vlink(end_point)); + vlink(last1) = vlink(end_point); /* pattern is \.{\^.\^w\^o\^r\^d\^.\^} |word_len|=4, |ext_word_len|=6, |hyphens|=7 * check \.{ \^ \^ \^ } so drop first two and stop after |word_len-1| */ - for (here = first1, char_num = 2; here != left; here = get_vlink(here)) + for (here = first1, char_num = 2; here != left; here = vlink(here)) char_num++; - for (; here != right; here = get_vlink(here)) { + for (; here != right; here = vlink(here)) { if (hyphens[char_num] & 1) here = insert_syllable_discretionary(here, lan); char_num++; |