5 # drop names from a declaration (hack to make prototypes comparable)
8 # type is not typedefed so next unknown id is probably a variable name
9 split("void char short int long float double signed unsigned _Bool _Complex", a)
13 # next token is an id, type is not typedefed
14 split("struct union enum", a)
18 # decoratoin that can be skipped
19 split("static extern auto register inline const volatile restrict", a)
24 split("( ) [ ] , ... *", a)
30 if (tok ~ /^[a-zA-Z_]/) {
41 gsub(/\/\*[^/]*\*\//, "")
44 gsub(/[^a-zA-Z0-9_.]/," & ")
50 for (i = 1; i <= NF; i++) {
53 if (state == "type") {
55 if (!tok[$i] || tok[$i] == "type")
57 if (tok[$i] == "struct") {
62 } else if (state == "id") {
72 } else if (state == "idfound") {
74 if ($i == "(" || $i == ",")