Less engine bug workarounds

This commit is contained in:
Marcel Krüger 2020-06-15 07:01:40 +02:00
parent ade568565c
commit 06b138f1e7
2 changed files with 1 additions and 20 deletions

View File

@ -79,28 +79,12 @@ do
end end
end end
callback_register('read_data_file', function(name) error[[TODO]]return kpse.find_file(name, 'tex', true) end) callback_register('read_data_file', function(name) error[[TODO]]return kpse.find_file(name, 'tex', true) end)
local input_pattern do
local hex = lpeg.R('09', 'af')
local hexx = hex * hex
local tonumber = tonumber
local char = utf8.char
local sub = string.sub
local char = lpeg.Cg('^^' * (
('^^' * ('^^' * hexx)^-1 * hexx)^-1 * hexx/function(s)
local cp = tonumber(sub(s, #s/2), 16)
return cp == 0 and '^^@' or char(cp)
end
-- + lpeg.R'\0\63' / function(s) return char(s:byte()+64) end
-- + lpeg.R'\63\127' / function(s) return char(s:byte()-64) end
)) + 1
input_pattern = lpeg.Cs(char^0)
end
callback_register('open_data_file', function(name) callback_register('open_data_file', function(name)
local f = io.open(name) local f = io.open(name)
return setmetatable({ return setmetatable({
reader = function() reader = function()
local line = f:read() local line = f:read()
return line and input_pattern:match(line) return line
end, end,
close = function()error[[1]] return f:close() end, close = function()error[[1]] return f:close() end,
}, { }, {

View File

@ -15,9 +15,6 @@
\global\def\eTeXrevision{.2} \global\def\eTeXrevision{.2}
\endgroup \endgroup
\input load-unicode-data.tex \input load-unicode-data.tex
\showthe\mathcode`\1
\input etex.src \input etex.src
\showthe\mathcode`\1
\input luametalatex-baseregisters \input luametalatex-baseregisters
\showthe\mathcode`\1
\dump \dump