BEGIN { OFS = ORS = "" }
/^#define *([A-Z][A-Z0-9_]*)[ \t]*\(?(-?[0-9][0-9]*|0x[0-9A-Fa-f]*)U?L? *(<< *[0-9]*)?\)?[ \t]*(\/\/.*|\/\*.*\*\/)?[ \t]*$/ {
print "#define ", $2, " ";
gsub(/^#define *[^ ]*[ \t]*/, "");
gsub(/[ \t]*(\/\/.*|\/\*.*\*\/)?[ \t]*$/, "");
gsub(/[UL]/, "");
print $0, "\n";
}
-
Adam Blank authored497589c4