summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2012-12-06 16:40:13 +0200
committerMarius <mariausol@gmail.com>2012-12-06 16:40:13 +0200
commitc5eeba726820e576380fadff494ce494b625b6ae (patch)
tree300975aac0caaf2e7722bdd0edabf335d7b4d5b1 /tex
parent8bf2b14b01c07e915720438abcc5b0441b3c883d (diff)
downloadcontext-c5eeba726820e576380fadff494ce494b625b6ae.tar.gz
beta 2012.12.06 15:01
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/cont-new.mkii2
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4145 -> 4142 bytes
-rw-r--r--tex/context/base/context-version.pngbin40384 -> 40036 bytes
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/l-file.lua164
-rw-r--r--tex/context/base/status-files.pdfbin24520 -> 24519 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin199332 -> 199334 bytes
-rw-r--r--tex/context/base/strc-lst.lua4
-rw-r--r--tex/context/base/strc-num.mkiv1
-rw-r--r--tex/context/base/type-imp-latinmodern.mkiv4
-rw-r--r--tex/context/fonts/lm.lfg9
-rw-r--r--tex/context/fonts/texgyre.lfg12
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua166
15 files changed, 194 insertions, 174 deletions
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index e355a4c76..057bc4ac9 100644
--- a/tex/context/base/cont-new.mkii
+++ b/tex/context/base/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2012.12.06 12:15}
+\newcontextversion{2012.12.06 15:01}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 9fb4a2663..f248954ae 100644
--- a/tex/context/base/cont-new.mkiv
+++ b/tex/context/base/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2012.12.06 12:15}
+\newcontextversion{2012.12.06 15:01}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index 9c13eb9dc..320739877 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png
index 12e6cf850..77d607dea 100644
--- a/tex/context/base/context-version.png
+++ b/tex/context/base/context-version.png
Binary files differ
diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii
index fea95e7be..33a6922be 100644
--- a/tex/context/base/context.mkii
+++ b/tex/context/base/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2012.12.06 12:15}
+\edef\contextversion{2012.12.06 15:01}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 81237a7a1..b630c9809 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -25,7 +25,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2012.12.06 12:15}
+\edef\contextversion{2012.12.06 15:01}
%D For those who want to use this:
diff --git a/tex/context/base/l-file.lua b/tex/context/base/l-file.lua
index bea4ef0aa..d47b13c30 100644
--- a/tex/context/base/l-file.lua
+++ b/tex/context/base/l-file.lua
@@ -297,15 +297,15 @@ function file.collapsepath(str,anchor)
end
end
---~ local function test(str)
---~ print(string.format("%-20s %-15s %-15s",str,file.collapsepath(str),file.collapsepath(str,true)))
---~ end
---~ test("a/b.c/d") test("b.c/d") test("b.c/..")
---~ test("/") test("c:/..") test("sys://..")
---~ test("") test("./") test(".") test("..") test("./..") test("../..")
---~ test("a") test("./a") test("/a") test("a/../..")
---~ test("a/./b/..") test("a/aa/../b/bb") test("a/.././././b/..") test("a/./././b/..")
---~ test("a/b/c/../..") test("./a/b/c/../..") test("a/b/c/../..")
+-- local function test(str)
+-- print(string.format("%-20s %-15s %-15s",str,file.collapsepath(str),file.collapsepath(str,true)))
+-- end
+-- test("a/b.c/d") test("b.c/d") test("b.c/..")
+-- test("/") test("c:/..") test("sys://..")
+-- test("") test("./") test(".") test("..") test("./..") test("../..")
+-- test("a") test("./a") test("/a") test("a/../..")
+-- test("a/./b/..") test("a/aa/../b/bb") test("a/.././././b/..") test("a/./././b/..")
+-- test("a/b/c/../..") test("./a/b/c/../..") test("a/b/c/../..")
function file.robustname(str,strict)
str = gsub(str,"[^%a%d%/%-%.\\]+","-")
@@ -316,6 +316,20 @@ function file.robustname(str,strict)
end
end
+-- local pattern_a = lpeg.replacer(1-R("az","09","AZ","--",".."))
+-- local pattern_a = Cs((R("az","09","AZ","--","..") + P(1)/"-")^1)
+-- local whatever = P("-")^0 / ""
+-- local pattern_b = Cs(whatever * (1 - whatever * -1)^1)
+
+-- function file.robustname(str,strict)
+-- str = lpegmatch(pattern_a,str) or str
+-- if strict then
+-- return lpegmatch(pattern_b,str) or str -- two step is cleaner (less backtracking)
+-- else
+-- return str
+-- end
+-- end
+
file.readdata = io.loaddata
file.savedata = io.savedata
@@ -325,92 +339,82 @@ end
-- lpeg variants, slightly faster, not always
---~ local period = P(".")
---~ local slashes = S("\\/")
---~ local noperiod = 1-period
---~ local noslashes = 1-slashes
---~ local name = noperiod^1
+-- local period = P(".")
+-- local slashes = S("\\/")
+-- local noperiod = 1-period
+-- local noslashes = 1-slashes
+-- local name = noperiod^1
---~ local pattern = (noslashes^0 * slashes)^0 * (noperiod^1 * period)^1 * C(noperiod^1) * -1
+-- local pattern = (noslashes^0 * slashes)^0 * (noperiod^1 * period)^1 * C(noperiod^1) * -1
---~ function file.suffixonly(name)
---~ return lpegmatch(pattern,name) or ""
---~ end
+-- function file.suffixonly(name)
+-- return lpegmatch(pattern,name) or ""
+-- end
---~ local pattern = Cs(((period * noperiod^1 * -1)/"" + 1)^1)
+-- local pattern = Cs(((period * noperiod^1 * -1)/"" + 1)^1)
---~ function file.removesuffix(name)
---~ return lpegmatch(pattern,name)
---~ end
+-- function file.removesuffix(name)
+-- return lpegmatch(pattern,name)
+-- end
---~ local pattern = (noslashes^0 * slashes)^1 * C(noslashes^1) * -1
+-- local pattern = (noslashes^0 * slashes)^1 * C(noslashes^1) * -1
---~ function file.basename(name)
---~ return lpegmatch(pattern,name) or name
---~ end
+-- function file.basename(name)
+-- return lpegmatch(pattern,name) or name
+-- end
---~ local pattern = (noslashes^0 * slashes)^1 * Cp() * noslashes^1 * -1
+-- local pattern = Cs ((1 - slashes * noslashes^1 * -1)^1)
---~ function file.dirname(name)
---~ local p = lpegmatch(pattern,name)
---~ if p then
---~ return sub(name,1,p-2)
---~ else
---~ return ""
---~ end
---~ end
+-- function file.dirname(name)
+-- return lpegmatch(pattern,name) or ""
+-- end
---~ local pattern = (noslashes^0 * slashes)^0 * (noperiod^1 * period)^1 * Cp() * noperiod^1 * -1
+-- local pattern = (noslashes^0 * slashes)^0 * (noperiod^1 * period)^1 * Cp() * noperiod^1 * -1
---~ function file.addsuffix(name, suffix)
---~ local p = lpegmatch(pattern,name)
---~ if p then
---~ return name
---~ else
---~ return name .. "." .. suffix
---~ end
---~ end
+-- function file.addsuffix(name, suffix)
+-- local p = lpegmatch(pattern,name)
+-- if p then
+-- return name
+-- else
+-- return name .. "." .. suffix
+-- end
+-- end
---~ local pattern = (noslashes^0 * slashes)^0 * (noperiod^1 * period)^1 * Cp() * noperiod^1 * -1
+-- local suffix = period * (1-period-slashes)^1 * -1
+-- local pattern = Cs((1-suffix)^1)
---~ function file.replacesuffix(name,suffix)
---~ local p = lpegmatch(pattern,name)
---~ if p then
---~ return sub(name,1,p-2) .. "." .. suffix
---~ else
---~ return name .. "." .. suffix
---~ end
---~ end
+-- function file.replacesuffix(name,suffix)
+-- if suffix and suffix ~= "" then
+-- return lpegmatch(pattern,name) .. "." .. suffix
+-- else
+-- return name
+-- end
+-- end
---~ local pattern = (noslashes^0 * slashes)^0 * Cp() * ((noperiod^1 * period)^1 * Cp() + P(true)) * noperiod^1 * -1
+-- local path = noslashes^0 * slashes^1
+-- local suffix = period * (1-period-slashes)^1 * -1
+-- local pattern = path^0 * Cs((1-suffix)^1) * suffix^0
---~ function file.nameonly(name)
---~ local a, b = lpegmatch(pattern,name)
---~ if b then
---~ return sub(name,a,b-2)
---~ elseif a then
---~ return sub(name,a)
---~ else
---~ return name
---~ end
---~ end
+-- function file.nameonly(name)
+-- return lpegmatch(pattern,name) or name
+-- end
---~ local test = file.suffixonly
---~ local test = file.basename
---~ local test = file.dirname
---~ local test = file.addsuffix
---~ local test = file.replacesuffix
---~ local test = file.nameonly
-
---~ print(1,test("./a/b/c/abd.def.xxx","!!!"))
---~ print(2,test("./../b/c/abd.def.xxx","!!!"))
---~ print(3,test("a/b/c/abd.def.xxx","!!!"))
---~ print(4,test("a/b/c/def.xxx","!!!"))
---~ print(5,test("a/b/c/def","!!!"))
---~ print(6,test("def","!!!"))
---~ print(7,test("def.xxx","!!!"))
-
---~ local tim = os.clock() for i=1,250000 do local ext = test("abd.def.xxx","!!!") end print(os.clock()-tim)
+-- local test = file.suffixonly
+-- local test = file.basename
+-- local test = file.dirname
+-- local test = file.addsuffix
+-- local test = file.replacesuffix
+-- local test = file.nameonly
+
+-- print(1,test("./a/b/c/abd.def.xxx","!!!"))
+-- print(2,test("./../b/c/abd.def.xxx","!!!"))
+-- print(3,test("a/b/c/abd.def.xxx","!!!"))
+-- print(4,test("a/b/c/def.xxx","!!!"))
+-- print(5,test("a/b/c/def","!!!"))
+-- print(6,test("def","!!!"))
+-- print(7,test("def.xxx","!!!"))
+
+-- local tim = os.clock() for i=1,250000 do local ext = test("abd.def.xxx","!!!") end print(os.clock()-tim)
-- also rewrite previous
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 695fbdabf..53850f889 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf
index 9b5416e5c..2cc31b488 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/strc-lst.lua b/tex/context/base/strc-lst.lua
index 0c13e28b2..13ea04489 100644
--- a/tex/context/base/strc-lst.lua
+++ b/tex/context/base/strc-lst.lua
@@ -771,7 +771,7 @@ local internals = setmetatableindex({ }, function(t,k)
local references = entry.references
if references then
local kind = metadata.kind
- local name = metadata.name
+ local name = numberdata.counter or metadata.name
local internal = references.internal
if kind and name and internal then
local sublist = sublists[kind][name]
@@ -810,7 +810,7 @@ function lists.reordered(entry)
local references = entry.references
if references then
local kind = metadata.kind
- local name = metadata.name
+ local name = numberdata.counter or metadata.name
local internal = references.internal
if kind and name and internal then
return internals[internal] or numberdata
diff --git a/tex/context/base/strc-num.mkiv b/tex/context/base/strc-num.mkiv
index c424bd6bf..96d1f0816 100644
--- a/tex/context/base/strc-num.mkiv
+++ b/tex/context/base/strc-num.mkiv
@@ -595,6 +595,7 @@
},
numberdata = {
numbers = structures.counters.compact("\currentcounter",nil,true),
+ counter = "\currentcounter",
separatorset = "#3\c!numberseparatorset",
conversion = \!!bs#3\c!numberconversion\!!es,
conversionset = "#3\c!numberconversionset",
diff --git a/tex/context/base/type-imp-latinmodern.mkiv b/tex/context/base/type-imp-latinmodern.mkiv
index ee6d89f44..4a692f8b3 100644
--- a/tex/context/base/type-imp-latinmodern.mkiv
+++ b/tex/context/base/type-imp-latinmodern.mkiv
@@ -170,8 +170,8 @@
\starttypescript [\s!math] [modern,latin-modern]
\loadfontgoodies[lm]
- \definefontsynonym [LMMathRoman-Regular] [\v!file:lmodernmath-regular.otf] [\s!features=\s!math\mathsizesuffix,\s!goodies=lm]
- \definefontsynonym [LMMathRoman-Bold] [\v!file:lmodernmath-regular.otf] [\s!features=\s!math\mathsizesuffix,\s!goodies=lm]
+ \definefontsynonym [LMMathRoman-Regular] [\v!file:lmmath-regular.otf] [\s!features=\s!math\mathsizesuffix,\s!goodies=lm]
+ \definefontsynonym [LMMathRoman-Bold] [\v!file:lmmath-regular.otf] [\s!features=\s!math\mathsizesuffix,\s!goodies=lm]
\stoptypescript
\starttypescript [modern-designsize-virtual]
diff --git a/tex/context/fonts/lm.lfg b/tex/context/fonts/lm.lfg
index 5c0b4af2d..9a7c9027b 100644
--- a/tex/context/fonts/lm.lfg
+++ b/tex/context/fonts/lm.lfg
@@ -11,8 +11,13 @@ return {
},
},
},
- filenames = { -- for a while:
- ["lmodernmath-regular.otf"] = { "lmodernmath-regular.otf", "lmodern-math.otf", "lmmath-regular.otf" },
+ filenames = {
+ ["lmmath-regular.otf"] = {
+ "latinmodernmath-regular.otf",
+ "lmmath-regular.otf",
+ "lmodernmath-regular.otf",
+ "lmodern-math.otf",
+ },
},
designsizes = {
["LMMathRoman-Regular"] = {
diff --git a/tex/context/fonts/texgyre.lfg b/tex/context/fonts/texgyre.lfg
index bfb474deb..df0313e48 100644
--- a/tex/context/fonts/texgyre.lfg
+++ b/tex/context/fonts/texgyre.lfg
@@ -4,8 +4,14 @@ return {
comment = "Goodies that complement tex gyre.",
author = "Hans Hagen",
copyright = "ConTeXt development team",
- filenames = { -- for a while:
- ["tgpagellamath-regular.otf"] = { "tgpagella-math.otf", "texgyrepagella-math.otf" },
- ["tgtermesmath-regular.otf"] = { "tgtermes-math.otf" , "texgyretermes-math.otf" },
+ filenames = {
+ ["tgpagellamath-regular.otf"] = {
+ "texgyrepagella-math.otf",
+ "tgpagella-math.otf",
+ },
+ ["tgtermesmath-regular.otf"] = {
+ "texgyretermes-math.otf",
+ "tgtermes-math.otf",
+ },
},
}
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 8cad5d838..e4c16421f 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 : 12/06/12 12:15:07
+-- merge date : 12/06/12 15:01:05
do -- begin closure to overcome local limits and interference
@@ -2444,15 +2444,15 @@ function file.collapsepath(str,anchor)
end
end
---~ local function test(str)
---~ print(string.format("%-20s %-15s %-15s",str,file.collapsepath(str),file.collapsepath(str,true)))
---~ end
---~ test("a/b.c/d") test("b.c/d") test("b.c/..")
---~ test("/") test("c:/..") test("sys://..")
---~ test("") test("./") test(".") test("..") test("./..") test("../..")
---~ test("a") test("./a") test("/a") test("a/../..")
---~ test("a/./b/..") test("a/aa/../b/bb") test("a/.././././b/..") test("a/./././b/..")
---~ test("a/b/c/../..") test("./a/b/c/../..") test("a/b/c/../..")
+-- local function test(str)
+-- print(string.format("%-20s %-15s %-15s",str,file.collapsepath(str),file.collapsepath(str,true)))
+-- end
+-- test("a/b.c/d") test("b.c/d") test("b.c/..")
+-- test("/") test("c:/..") test("sys://..")
+-- test("") test("./") test(".") test("..") test("./..") test("../..")
+-- test("a") test("./a") test("/a") test("a/../..")
+-- test("a/./b/..") test("a/aa/../b/bb") test("a/.././././b/..") test("a/./././b/..")
+-- test("a/b/c/../..") test("./a/b/c/../..") test("a/b/c/../..")
function file.robustname(str,strict)
str = gsub(str,"[^%a%d%/%-%.\\]+","-")
@@ -2463,6 +2463,20 @@ function file.robustname(str,strict)
end
end
+-- local pattern_a = lpeg.replacer(1-R("az","09","AZ","--",".."))
+-- local pattern_a = Cs((R("az","09","AZ","--","..") + P(1)/"-")^1)
+-- local whatever = P("-")^0 / ""
+-- local pattern_b = Cs(whatever * (1 - whatever * -1)^1)
+
+-- function file.robustname(str,strict)
+-- str = lpegmatch(pattern_a,str) or str
+-- if strict then
+-- return lpegmatch(pattern_b,str) or str -- two step is cleaner (less backtracking)
+-- else
+-- return str
+-- end
+-- end
+
file.readdata = io.loaddata
file.savedata = io.savedata
@@ -2472,92 +2486,82 @@ end
-- lpeg variants, slightly faster, not always
---~ local period = P(".")
---~ local slashes = S("\\/")
---~ local noperiod = 1-period
---~ local noslashes = 1-slashes
---~ local name = noperiod^1
+-- local period = P(".")
+-- local slashes = S("\\/")
+-- local noperiod = 1-period
+-- local noslashes = 1-slashes
+-- local name = noperiod^1
---~ local pattern = (noslashes^0 * slashes)^0 * (noperiod^1 * period)^1 * C(noperiod^1) * -1
+-- local pattern = (noslashes^0 * slashes)^0 * (noperiod^1 * period)^1 * C(noperiod^1) * -1
---~ function file.suffixonly(name)
---~ return lpegmatch(pattern,name) or ""
---~ end
+-- function file.suffixonly(name)
+-- return lpegmatch(pattern,name) or ""
+-- end
---~ local pattern = Cs(((period * noperiod^1 * -1)/"" + 1)^1)
+-- local pattern = Cs(((period * noperiod^1 * -1)/"" + 1)^1)
---~ function file.removesuffix(name)
---~ return lpegmatch(pattern,name)
---~ end
+-- function file.removesuffix(name)
+-- return lpegmatch(pattern,name)
+-- end
---~ local pattern = (noslashes^0 * slashes)^1 * C(noslashes^1) * -1
+-- local pattern = (noslashes^0 * slashes)^1 * C(noslashes^1) * -1
---~ function file.basename(name)
---~ return lpegmatch(pattern,name) or name
---~ end
+-- function file.basename(name)
+-- return lpegmatch(pattern,name) or name
+-- end
---~ local pattern = (noslashes^0 * slashes)^1 * Cp() * noslashes^1 * -1
+-- local pattern = Cs ((1 - slashes * noslashes^1 * -1)^1)
---~ function file.dirname(name)
---~ local p = lpegmatch(pattern,name)
---~ if p then
---~ return sub(name,1,p-2)
---~ else
---~ return ""
---~ end
---~ end
+-- function file.dirname(name)
+-- return lpegmatch(pattern,name) or ""
+-- end
---~ local pattern = (noslashes^0 * slashes)^0 * (noperiod^1 * period)^1 * Cp() * noperiod^1 * -1
+-- local pattern = (noslashes^0 * slashes)^0 * (noperiod^1 * period)^1 * Cp() * noperiod^1 * -1
---~ function file.addsuffix(name, suffix)
---~ local p = lpegmatch(pattern,name)
---~ if p then
---~ return name
---~ else
---~ return name .. "." .. suffix
---~ end
---~ end
+-- function file.addsuffix(name, suffix)
+-- local p = lpegmatch(pattern,name)
+-- if p then
+-- return name
+-- else
+-- return name .. "." .. suffix
+-- end
+-- end
---~ local pattern = (noslashes^0 * slashes)^0 * (noperiod^1 * period)^1 * Cp() * noperiod^1 * -1
+-- local suffix = period * (1-period-slashes)^1 * -1
+-- local pattern = Cs((1-suffix)^1)
---~ function file.replacesuffix(name,suffix)
---~ local p = lpegmatch(pattern,name)
---~ if p then
---~ return sub(name,1,p-2) .. "." .. suffix
---~ else
---~ return name .. "." .. suffix
---~ end
---~ end
+-- function file.replacesuffix(name,suffix)
+-- if suffix and suffix ~= "" then
+-- return lpegmatch(pattern,name) .. "." .. suffix
+-- else
+-- return name
+-- end
+-- end
---~ local pattern = (noslashes^0 * slashes)^0 * Cp() * ((noperiod^1 * period)^1 * Cp() + P(true)) * noperiod^1 * -1
+-- local path = noslashes^0 * slashes^1
+-- local suffix = period * (1-period-slashes)^1 * -1
+-- local pattern = path^0 * Cs((1-suffix)^1) * suffix^0
---~ function file.nameonly(name)
---~ local a, b = lpegmatch(pattern,name)
---~ if b then
---~ return sub(name,a,b-2)
---~ elseif a then
---~ return sub(name,a)
---~ else
---~ return name
---~ end
---~ end
+-- function file.nameonly(name)
+-- return lpegmatch(pattern,name) or name
+-- end
---~ local test = file.suffixonly
---~ local test = file.basename
---~ local test = file.dirname
---~ local test = file.addsuffix
---~ local test = file.replacesuffix
---~ local test = file.nameonly
-
---~ print(1,test("./a/b/c/abd.def.xxx","!!!"))
---~ print(2,test("./../b/c/abd.def.xxx","!!!"))
---~ print(3,test("a/b/c/abd.def.xxx","!!!"))
---~ print(4,test("a/b/c/def.xxx","!!!"))
---~ print(5,test("a/b/c/def","!!!"))
---~ print(6,test("def","!!!"))
---~ print(7,test("def.xxx","!!!"))
-
---~ local tim = os.clock() for i=1,250000 do local ext = test("abd.def.xxx","!!!") end print(os.clock()-tim)
+-- local test = file.suffixonly
+-- local test = file.basename
+-- local test = file.dirname
+-- local test = file.addsuffix
+-- local test = file.replacesuffix
+-- local test = file.nameonly
+
+-- print(1,test("./a/b/c/abd.def.xxx","!!!"))
+-- print(2,test("./../b/c/abd.def.xxx","!!!"))
+-- print(3,test("a/b/c/abd.def.xxx","!!!"))
+-- print(4,test("a/b/c/def.xxx","!!!"))
+-- print(5,test("a/b/c/def","!!!"))
+-- print(6,test("def","!!!"))
+-- print(7,test("def.xxx","!!!"))
+
+-- local tim = os.clock() for i=1,250000 do local ext = test("abd.def.xxx","!!!") end print(os.clock()-tim)
-- also rewrite previous