diff options
author | Marius <mariausol@gmail.com> | 2013-04-16 20:20:28 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-04-16 20:20:28 +0300 |
commit | 2bce12e0c387ba3a0e084bf0c44c23af1f93642e (patch) | |
tree | fcf93a966bbc848411295c490198b61ac17849be /tex/generic | |
parent | 7d59d03f80badf3733d3230b9976b66c19e92919 (diff) | |
download | context-2bce12e0c387ba3a0e084bf0c44c23af1f93642e.tar.gz |
beta 2013.04.16 18:49
Diffstat (limited to 'tex/generic')
-rw-r--r-- | tex/generic/context/luatex/luatex-basics-nod.lua | 4 | ||||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 19 |
2 files changed, 14 insertions, 9 deletions
diff --git a/tex/generic/context/luatex/luatex-basics-nod.lua b/tex/generic/context/luatex/luatex-basics-nod.lua index ec515001e..5ab9df7f9 100644 --- a/tex/generic/context/luatex/luatex-basics-nod.lua +++ b/tex/generic/context/luatex/luatex-basics-nod.lua @@ -28,12 +28,12 @@ if tex.attribute[0] ~= 0 then end -attributes = { } +attributes = attributes or { } attributes.unsetvalue = -0x7FFFFFFF local numbers, last = { }, 127 -function attributes.private(name) +attributes.private = attributes.private or function(name) local number = numbers[name] if not number then if last < 255 then diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 150b9cc77..8633b8e3a 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 : 04/16/13 12:08:48 +-- merge date : 04/16/13 18:49:45 do -- begin closure to overcome local limits and interference @@ -2141,7 +2141,7 @@ elseif not lfs.isfile then end end local insert,concat=table.insert,table.concat -local match=string.match +local match,find=string.match,string.find local lpegmatch=lpeg.match local getcurrentdir,attributes=lfs.currentdir,lfs.attributes local checkedsplit=string.checkedsplit @@ -2355,11 +2355,11 @@ local anchors=fwslash+drivespec local untouched=periods+(1-period)^1*P(-1) local splitstarter=(Cs(drivespec*(bwslash/"/"+fwslash)^0)+Cc(false))*Ct(lpeg.splitat(S("/\\")^1)) local absolute=fwslash -function file.collapsepath(str,anchor) +function file.collapsepath(str,anchor) if not str then return end - if anchor and not lpegmatch(anchors,str) then + if anchor==true and not lpegmatch(anchors,str) then str=getcurrentdir().."/"..str end if str=="" or str=="." then @@ -2399,7 +2399,12 @@ function file.collapsepath(str,anchor) elseif lpegmatch(absolute,str) then return "/"..concat(newelements,'/') else - return concat(newelements,'/') + newelements=concat(newelements,'/') + if anchor=="." and find(str,"^%./") then + return "./"..newelements + else + return newelements + end end end local validchars=R("az","09","AZ","--","..") @@ -3399,10 +3404,10 @@ if tex.attribute[0]~=0 then texio.write_nl("log","!") tex.attribute[0]=0 end -attributes={} +attributes=attributes or {} attributes.unsetvalue=-0x7FFFFFFF local numbers,last={},127 -function attributes.private(name) +attributes.private=attributes.private or function(name) local number=numbers[name] if not number then if last<255 then |