bjh 00/12/05 06:55:17
Modified: helpers make_export.pl
Log:
Handle nested macros properly when generating export list.
Revision Changes Path
1.6 +3 -0 apr/helpers/make_export.pl
Index: make_export.pl
===================================================================
RCS file: /home/cvs/apr/helpers/make_export.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- make_export.pl 2000/12/02 19:00:07 1.5
+++ make_export.pl 2000/12/05 14:55:16 1.6
@@ -18,6 +18,7 @@
my $line;
my $count;
my $found;
+ my @macro_stack;
open (FILE, $srcfile) || die "Can't open $srcfile\n";
# print STDERR "Reading \"$srcfile\"\n";
@@ -34,6 +35,7 @@
if (/\#if(def)? (APR_.*)/) {
$count++;
$found++;
+ push @macro_stack, $macro;
$macro = $2;
$line .= "$macro\n";
next;
@@ -54,6 +56,7 @@
if ($count > 0) {
$count--;
$line .= "\/$macro\n";
+ $macro = pop @macro_stack;
}
if ($found == $count + 1) {
$found--;