mirror of
https://github.com/neovim/neovim.git
synced 2026-01-03 09:56:25 +10:00
- Move all generator Lua scripts to the `src/gen/`
- Add a `.luarc.json` to `src/gen/`
- Add a `preload.lua` to `src/gen/`
- Add `src` to `package.path` so it aligns with `.luarc.json'
- Fix all `require` statements in `src/gen/` so they are consistent:
- `require('scripts.foo')` -> `require('gen.foo')`
- `require('src.nvim.options')` -> `require('nvim.options')`
- `require('api.dispatch_deprecated')` -> `require('nvim.api.dispatch_deprecated')`
18 lines
305 B
Lua
18 lines
305 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
|