aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--preproc.awk10
1 files changed, 6 insertions, 4 deletions
diff --git a/preproc.awk b/preproc.awk
index b574edf..c9bcb07 100644
--- a/preproc.awk
+++ b/preproc.awk
@@ -163,18 +163,20 @@ stage2 && macroNameOnly {
}
stage2 && /^[[:blank:]]*<[^>]*>/ {
- match($0, /<[^>]*>/)
# If we found a definition
if ($0 ~ "{") {
macroName = ""
depth = gsub("{", "{") - gsub("}", "}")
+ next
}
- # Macro name could begin a potential definition, with a "{" on a new line
- else {
+ # If there isn't anything nonblank after the macro name then it might
+ # be the name of a potential definition, with a "{" on another line
+ else if (match($0, /<[^>]*>[[:blank:]]*[^[:blank:]]/) == 0) {
+ match($0, /<[^>]*>/)
macroName = substr($0, RSTART, RLENGTH)
macroNameOnly = 1
+ next
}
- next
}
# Outside definition