mirror of
https://github.com/neovim/neovim.git
synced 2025-10-06 09:56:31 +00:00
18 lines
299 B
Lua
18 lines
299 B
Lua
local function dump_bin_array(output, name, data)
|
|
output:write([[
|
|
static const uint8_t ]]..name..[[[] = {
|
|
]])
|
|
|
|
for i = 1, #data do
|
|
output:write(string.byte(data, i)..', ')
|
|
if i % 10 == 0 then
|
|
output:write('\n ')
|
|
end
|
|
end
|
|
output:write([[
|
|
};
|
|
]])
|
|
end
|
|
|
|
return dump_bin_array
|