mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
587 B
33 lines
587 B
/^@@/ {
|
|
fname = $2
|
|
}
|
|
|
|
/^@COMMENT/ {
|
|
print "\n// " $2 " " $3 " " $4 " " $5
|
|
}
|
|
|
|
/^typedef/ {
|
|
n = split($0, decl, "(")
|
|
n = split(decl[1], rets, "typedef ")
|
|
n = split(decl[3], arglist, ")")
|
|
n = split(arglist[1], the_args, ",")
|
|
argstr = "( "
|
|
actuals = "( "
|
|
for (i = 1; i <= n; i++)
|
|
{
|
|
argstr = argstr the_args[i] " arg" i
|
|
actuals = actuals " arg" i
|
|
if (i != n)
|
|
{
|
|
argstr = argstr ", "
|
|
actuals = actuals ", "
|
|
}
|
|
}
|
|
argstr = argstr " )"
|
|
actuals = actuals " )"
|
|
print "inline " rets[2] fname " " argstr
|
|
print "{"
|
|
print " _w32imp->" fname actuals
|
|
print "}"
|
|
print ""
|
|
}
|