-- this file is generated, don't change it -- configuration (can be overloaded later) texconfig.error_line=250 texconfig.expand_depth=10000 texconfig.fix_mem_init=1000000 texconfig.function_size=32768 texconfig.half_error_line=125 texconfig.hash_extra=200000 texconfig.level_chr=46 texconfig.level_max=500 texconfig.max_in_open=1000 texconfig.max_print_line=100000 texconfig.max_strings=500000 texconfig.nest_size=1000 texconfig.param_size=25000 texconfig.properties_size=10000 texconfig.save_size=100000 texconfig.stack_size=10000 -- checking storage = storage or { } luatex = luatex or { } -- we provide our own file handling texconfig.kpse_init = false texconfig.shell_escape = 't' ---------.start_time = tonumber(os.getenv("SOURCE_DATE_EPOCH")) -- not used in context -- as soon as possible luatex.starttime = os.gettimeofday() -- this will happen after the format is loaded function texconfig.init() -- development local builtin, globals = { }, { } libraries = { -- we set it here as we want libraries also 'indexed' basiclua = { -- always "string", "table", "coroutine", "debug", "file", "io", "lpeg", "math", "os", "package", -- bonus "bit32", "utf8", }, basictex = { -- always "callback", "font", "lua", "node", "status", "tex", "texconfig", "texio", "token", -- not in luametatex "img", "pdf", "lang", -- in luametatex "language", }, extralua = { -- not in luametatex "unicode", "utf", "gzip", "zip", "zlib", -- in luametatex "xzip", "xmath", "xcomplex", "xdecimal", "basexx", -- maybe some day in luametatex "lz4", "lzo", -- always (mime can go) "lfs","socket", "mime", "md5", "sha2", "fio", "sio", }, extratex = { -- not in luametatex "kpse", -- always "pdfe", "mplib", -- in luametatex "pdfdecode", "pngdecode", }, obsolete = { "epdf", "fontloader", -- can be filled by luat-log "kpse", }, functions = { "assert", "pcall", "xpcall", "error", "collectgarbage", "dofile", "load","loadfile", "require", "module", "getmetatable", "setmetatable", "ipairs", "pairs", "rawequal", "rawget", "rawset", "next", "tonumber", "tostring", "type", "unpack", "select", "print", }, builtin = builtin, -- to be filled globals = globals, -- to be filled } for k, v in next, _G do globals[k] = tostring(v) end local function collect(t,fnc) local lib = { } for k, v in next, t do if fnc then lib[v] = _G[v] else local keys = { } local gv = _G[v] local tv = type(gv) if tv == "table" then for k, v in next, gv do keys[k] = tostring(v) -- true -- by tostring we cannot call overloads functions (security) end end lib[v] = keys builtin[v] = keys end end return lib end libraries.basiclua = collect(libraries.basiclua) libraries.basictex = collect(libraries.basictex) libraries.extralua = collect(libraries.extralua) libraries.extratex = collect(libraries.extratex) libraries.functions = collect(libraries.functions,true) libraries.obsolete = collect(libraries.obsolete) -- shortcut and helper local setbytecode = lua.setbytecode local getbytecode = lua.getbytecode local callbytecode = lua.callbytecode or function(i) local b = getbytecode(i) if type(b) == "function" then b() return true else return false end end local function init(start) local i = start local t = os.clock() while true do -- local b = callbytecode(i) local e, b = pcall(callbytecode,i) if not e then print(string.format("\nfatal error : unable to load bytecode register %i, maybe wipe the cache first\n",i)) os.exit() end if b then setbytecode(i,nil) ; i = i + 1 else break end end return i - start, os.clock() - t end -- the stored tables and modules storage.noftables , storage.toftables = init(0) storage.nofmodules, storage.tofmodules = init(501) if modules then local loaded = package.loaded for module, _ in next, modules do loaded[module] = true end end texconfig.init = function() end end CONTEXTLMTXMODE = 0 -- we provide a qualified path callback.register('find_format_file',function(name) texconfig.formatname = name return name end) -- done, from now on input and callbacks are internal