diff options
author | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2001-01-31 18:24:05 +0000 |
---|---|---|
committer | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2001-01-31 18:24:05 +0000 |
commit | 044d9edc7739228f29e67f81a6e288482d1eede8 (patch) | |
tree | 910bd608acb8ceabd6823a7336174d46722a93eb /helpers | |
parent | 6bc5adf682ee356ac8e03e9e45776e7bf1e49e44 (diff) | |
download | libapr-044d9edc7739228f29e67f81a6e288482d1eede8.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: http://svn.apache.org/repos/asf/apr/apr/trunk@61173 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'helpers')
-rw-r--r-- | helpers/make_export.awk | 16 |
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 } |