summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2001-01-31 18:24:05 +0000
committerJeff Trawick <trawick@apache.org>2001-01-31 18:24:05 +0000
commit6808f3b6ecedbcd59aca70720fbf85dc6741642d (patch)
tree910bd608acb8ceabd6823a7336174d46722a93eb /helpers
parentaf5be659636c2b1a7086fd8d4ab2c3b1def24988 (diff)
downloadapr-6808f3b6ecedbcd59aca70720fbf85dc6741642d.tar.gz
Fix the export list builder to understand more preprocessor constructs
(like those in apr_user.h). Submitted by: Brian Havard Reviewed by: Jeff Trawick git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@61173 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'helpers')
-rw-r--r--helpers/make_export.awk16
1 files changed, 10 insertions, 6 deletions
diff --git a/helpers/make_export.awk b/helpers/make_export.awk
index c2b232154..7d61a55fa 100644
--- a/helpers/make_export.awk
+++ b/helpers/make_export.awk
@@ -11,7 +11,6 @@
}
macro_stack[macro_no++] = macro
macro = substr($0, length($1)+2)
- found++
count++
line = line macro "\n"
next
@@ -23,17 +22,17 @@
line = line "/" macro "\n"
macro = macro_stack[--macro_no]
}
- if (found == count + 1) {
- found--
+ if (count == 0) {
+ if (found != 0) {
+ printf("%s", line)
+ }
line = ""
- } else if (found > count + 1) {
- found = 0
}
next
}
/^[ \t]*(AP[RU]?_DECLARE[^(]*[(])?(const[ \t])?[a-z_]+[ \t\*]*[)]?[ \t]+[*]?([A-Za-z0-9_]+)\(/ {
- if (found) {
+ if (count) {
found++
}
for (i = 0; i < count; i++) {
@@ -42,6 +41,11 @@
sub("^[ \t]*(AP[UR]?_DECLARE[^(]*[(])?(const[ \t])?[a-z_]+[ \t\*]*[)]?[ \t]+[*]?", "");
sub("[(].*", "");
line = line $0 "\n"
+
+ if (count == 0) {
+ printf("%s", line)
+ line = ""
+ }
next
}