Return-Path: Mailing-List: contact cvs-help@apr.apache.org; run by ezmlm Delivered-To: mailing list cvs@apr.apache.org Received: (qmail 90871 invoked by uid 1095); 5 Dec 2000 14:55:18 -0000 Date: 5 Dec 2000 14:55:18 -0000 Message-ID: <20001205145518.90866.qmail@locus.apache.org> From: bjh@locus.apache.org To: apr-cvs@apache.org Subject: cvs commit: apr/helpers make_export.pl 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--;