X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=src%2Fltj-stack.lua;h=cb5066483389f5f65241ec195283f03046eb7a2c;hb=a975e3129629556e88bce7547a2e632f3a83bb5b;hp=493ff5902e00e36277598ea4b89acc9ed9f04ce5;hpb=ae1314aae218985b5db11fb08f143476ce5df3e3;p=luatex-ja%2Fluatexja.git diff --git a/src/ltj-stack.lua b/src/ltj-stack.lua index 493ff59..cb50664 100644 --- a/src/ltj-stack.lua +++ b/src/ltj-stack.lua @@ -153,14 +153,29 @@ function set_stack_skip(g,m,sp) end end +-- These three functions are used in ltj-jfmglue.lua. +local table_current_stack +function report_stack_level(bsl) + table_current_stack = charprop_stack_table[bsl] +end +function fast_get_skip_table(m) + return table_current_stack[m] + or { width = 0, stretch = 0, shrink = 0, stretch_order = 0, shrink_order = 0 } +end +function fast_get_penalty_table(m,c,d) + local i = table_current_stack[m] + return (i and i[c]) or d +end + +-- For other situations, use the following instead: function get_skip_table(m, idx) return charprop_stack_table[idx][m] or { width = 0, stretch = 0, shrink = 0, stretch_order = 0, shrink_order = 0 } end - function get_penalty_table(m,c,d, idx) local i = charprop_stack_table[idx][m] return (i and i[c]) or d end + -- EOF