From 9798ccd13ea7e74f5fd25c5975fbc8d3048ced9d Mon Sep 17 00:00:00 2001 From: Marius Date: Mon, 4 Mar 2013 20:00:26 +0200 Subject: beta 2013.03.04 18:28 --- tex/generic/context/luatex/luatex-fonts-merged.lua | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'tex/generic') 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] -- cgit v1.2.3