summaryrefslogtreecommitdiff
path: root/Master/bin/x86_64-solaris/mtxrun
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-06-26 23:01:19 +0000
committerKarl Berry <karl@freefriends.org>2012-06-26 23:01:19 +0000
commit8a22bc373b32d13813e0cc9916b7e038af6c8c77 (patch)
treeff218b985ba3645ef4bc89a6c97923b7c808008c /Master/bin/x86_64-solaris/mtxrun
parent65b779cdd1f0e9d8b40de0b6613cfc286f6449f3 (diff)
64-bit binaries from ettore
git-svn-id: svn://tug.org/texlive/trunk@26899 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/bin/x86_64-solaris/mtxrun')
-rwxr-xr-xMaster/bin/x86_64-solaris/mtxrun97
1 files changed, 3 insertions, 94 deletions
diff --git a/Master/bin/x86_64-solaris/mtxrun b/Master/bin/x86_64-solaris/mtxrun
index 108f2a8a112..d2f7e408f0d 100755
--- a/Master/bin/x86_64-solaris/mtxrun
+++ b/Master/bin/x86_64-solaris/mtxrun
@@ -4087,10 +4087,8 @@ local one = P(1)
local two = C(1) * C(1)
local four = C(R(utfchar(0xD8),utfchar(0xFF))) * C(1) * C(1) * C(1)
--- actually one of them is already utf ... sort of useless this one
-
local pattern = P("\254\255") * Cs( (
- four / function(a,b,c,d)
+ four / function(a,b,c,d)
local ab = 0xFF * byte(a) + byte(b)
local cd = 0xFF * byte(c) + byte(d)
return utfchar((ab-0xD800)*0x400 + (cd-0xDC00) + 0x10000)
@@ -4101,7 +4099,7 @@ local pattern = P("\254\255") * Cs( (
+ one
)^1 )
+ P("\255\254") * Cs( (
- four / function(b,a,d,c)
+ four / function(b,a,d,c)
local ab = 0xFF * byte(a) + byte(b)
local cd = 0xFF * byte(c) + byte(d)
return utfchar((ab-0xD800)*0x400 + (cd-0xDC00) + 0x10000)
@@ -4116,22 +4114,6 @@ function string.toutf(s)
return lpegmatch(pattern,s) or s -- todo: utf32
end
-local validatedutf = Cs (
- (
- patterns.utf8one
- + patterns.utf8two
- + patterns.utf8three
- + patterns.utf8four
- + P(1) / "�"
- )^0
-)
-
-patterns.validatedutf = validatedutf
-
-function string.validutf(str)
- return lpegmatch(validatedutf,str)
-end
-
end -- of closure
@@ -8192,34 +8174,6 @@ function xml.makestandalone(root)
return root
end
-function xml.kind(e)
- local dt = e and e.dt
- if dt then
- local n = #dt
- if n == 1 then
- local d = dt[1]
- if d.special then
- local tg = d.tg
- if tg == "@cd@" then
- return "cdata"
- elseif tg == "@cm" then
- return "comment"
- elseif tg == "@pi@" then
- return "instruction"
- elseif tg == "@dt@" then
- return "declaration"
- end
- elseif type(d) == "string" then
- return "text"
- end
- return "element"
- elseif n > 0 then
- return "mixed"
- end
- end
- return "empty"
-end
-
end -- of closure
@@ -9647,7 +9601,7 @@ local xmlfilter = xml.filter
local type, setmetatable, getmetatable = type, setmetatable, getmetatable
local insert, remove, fastcopy, concat = table.insert, table.remove, table.fastcopy, table.concat
-local gmatch, gsub, format, find, strip = string.gmatch, string.gsub, string.format, string.find, string.strip
+local gmatch, gsub, format = string.gmatch, string.gsub, string.format
local utfbyte = utf.byte
local function report(what,pattern,c,e)
@@ -10339,51 +10293,6 @@ function xml.setcdata(e,str) -- also setcomment
} }
end
--- maybe helpers like this will move to an autoloader
-
-function xml.separate(x,pattern)
- local collected = xmlapplylpath(x,pattern)
- if collected then
- for c=1,#collected do
- local e = collected[c]
- local d = e.dt
- if d == x then
- report_xml("warning: xml.separate changes root")
- x = d
- end
- local t, n = { "\n" }, 1
- local i, nd = 1, #d
- while i <= nd do
- while i <= nd do
- local di = d[i]
- if type(di) == "string" then
- if di == "\n" or find(di,"^%s+$") then -- first test is speedup
- i = i + 1
- else
- d[i] = strip(di)
- break
- end
- else
- break
- end
- end
- if i > nd then
- break
- end
- t[n+1] = "\n"
- t[n+2] = d[i]
- t[n+3] = "\n"
- n = n + 3
- i = i + 1
- end
- t[n+1] = "\n"
- setmetatable(t,getmetatable(d))
- e.dt = t
- end
- end
- return x
-end
-
end -- of closure