repo.or.cz
/
lua.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Imported from ../lua-4.0.tar.gz.
[lua.git]
/
etc
/
stdcall.lua
blob
7eac5c2ec00c41e1e54f34f0ec904fab9ba0eda7
1
-- stdcall.lua
2
-- add __stdcall where appropriate
3
-- usage: lua stdcall.lua <lua.h >s_lua.h
4
-- usage: lua stdcall.lua <lapi.c >s_lapi.c
5
6
T
=
read
"*a"
7
T
=
gsub
(
T
,
"(lua_%w+%s+%()"
,
"__stdcall %1"
)
8
T
=
gsub
(
T
,
"(%*lua_CFunction)"
,
"__stdcall %1"
)
9
10
write
(
T
)