diff options
author | Hans Hagen <pragma@wxs.nl> | 2017-10-29 16:50:11 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2017-10-29 16:50:11 +0100 |
commit | 7fc4b935d045c84e89459e726ff54ae331e4c574 (patch) | |
tree | 0a4587b2e4f72ccb5feff81c348c5138f4ece7e7 /tex/context/base/mkiv/l-table.lua | |
parent | d91c37679b13162a4ead85abbe564090b2e1b51c (diff) | |
download | context-7fc4b935d045c84e89459e726ff54ae331e4c574.tar.gz |
2017-10-29 15:50:00
Diffstat (limited to 'tex/context/base/mkiv/l-table.lua')
-rw-r--r-- | tex/context/base/mkiv/l-table.lua | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/l-table.lua b/tex/context/base/mkiv/l-table.lua index e37c74f8b..ba8712ddb 100644 --- a/tex/context/base/mkiv/l-table.lua +++ b/tex/context/base/mkiv/l-table.lua @@ -1392,3 +1392,26 @@ function table.filtered(t,pattern,sort,cmp) return nothing end end + +-- lua 5.3: + +if not table.move then + + function table.move(a1,f,e,t,a2) + if a2 and a1 ~= a2 then + for i=f,e do + a2[t] = a1[i] + t = t + 1 + end + return a2 + else + t = t + e - f + for i=e,f,-1 do + a1[t] = a1[i] + t = t - 1 + end + return a1 + end + end + +end |