Commit 0c25dedf authored by Wayne Davison's avatar Wayne Davison

Simplified the function-finding regex, and made it more versatile

(so we don't need to keep adding variable-type strings).
parent 6105464b
......@@ -54,15 +54,14 @@ BEGIN {
printf "int %s(void);\n", a[2]
}
/^static|^extern/ || !/^[a-zA-Z]/ || /[;]/ {
/^static|^extern/ || /[;]/ {
next;
}
!/^OFF_T|^size_t|^off_t|^pid_t|^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^uchar|^short|^struct|^BOOL|^void|^time|^const|^RETSIGTYPE/ {
!/^[A-Za-z][A-Za-z0-9_]* / {
next;
}
/[(].*[)][ \t]*$/ {
printf "%s;\n",$0;
next;
......@@ -73,4 +72,3 @@ BEGIN {
printf "%s\n",$0;
next;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment