diff options
author | Marius <mariausol@gmail.com> | 2013-03-04 20:00:26 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-03-04 20:00:26 +0200 |
commit | 9798ccd13ea7e74f5fd25c5975fbc8d3048ced9d (patch) | |
tree | c1c8868af7b8944d43dd2164975a594b22dca9ca /tex/generic | |
parent | 0d5087c4edd28707b198afabd26016fe922c6e35 (diff) | |
download | context-9798ccd13ea7e74f5fd25c5975fbc8d3048ced9d.tar.gz |
beta 2013.03.04 18:28
Diffstat (limited to 'tex/generic')
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 4d843bd44..fe68795ec 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 02/26/13 00:17:03 +-- merge date : 03/04/13 18:28:23 do -- begin closure to overcome local limits and interference @@ -755,7 +755,7 @@ local function sortedkeys(tab) return {} end end -local function sortedhashkeys(tab) +local function sortedhashkeys(tab,cmp) if tab then local srt,s={},0 for key,_ in next,tab do @@ -764,7 +764,7 @@ local function sortedhashkeys(tab) srt[s]=key end end - sort(srt) + sort(srt,cmp) return srt else return {} @@ -782,9 +782,15 @@ end table.sortedkeys=sortedkeys table.sortedhashkeys=sortedhashkeys local function nothing() end -local function sortedhash(t) +local function sortedhash(t,cmp) if t then - local n,s=0,sortedkeys(t) + local s + if cmp then + s=sortedhashkeys(t,function(a,b) return cmp(t,a,b) end) + else + s=sortedkeys(t) + end + local n=0 local function kv(s) n=n+1 local k=s[n] |