rename tinyrt api names

This commit is contained in:
flysand7 2023-07-25 16:27:13 +11:00
parent 1007f634fb
commit c8a6a65509
2 changed files with 6 additions and 6 deletions

View File

@ -111,14 +111,14 @@ tinyrt_iface_hdr:write('\n')
n = 1
for line in io.lines(tinyrt_manifest_path) do
if line:len() ~= 0 and line:sub(1,1) ~= '#' and line:gsub('%s+', '') ~= '' then
local line_it = line:gmatch('[a-zA-Z0-9]+')
local line_it = line:gmatch('[_a-zA-Z0-9]+')
local api_name = line_it():upper()
local has_impl = line_it()
if has_impl == '0' or has_impl == '1' then
local api_define = '#define RT_API_' .. api_name .. ' '..has_impl..'\n'
local api_define = '#define ' .. api_name .. ' '..has_impl..'\n'
tinyrt_iface_hdr:write(api_define)
else
print('SYNTAX ERROR AT LINE '..i..': Expected 1 or 0 for the value')
print('SYNTAX ERROR AT LINE '..n..': Expected 1 or 0 for the value')
end
end

View File

@ -10,6 +10,6 @@
# the form
# #define RT_API_FILE
file = 1
program = 1
shell = 0
rt_api_file = 1
rt_api_program = 1
rt_api_shell = 0