3 if /^((void|VALUE|int|char *\*|ID|struct [\w_]+ *\*|st_table *\*) *)?\n([\w\d_]+)\(.*\)\n\s*((.+;\n)*)\{/ =~ line
5 printf "%s %s(", $2, $3
7 for arg in $4.split(/;\n\s*/)
10 if arg =~ /(([^*]+) *\** *[\w\d_]+),/
17 while arg.sub!(/(\** *[\w\d_]+)(,|$)/, "") && $~
18 args.push type + " " + $1.strip
24 printf "%s);\n", args.join(', ')