summaryrefslogtreecommitdiff
path: root/devtools
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2008-07-10 15:30:55 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2008-07-10 15:30:55 +0000
commit36d4057de2f1f63c03fbb9fdce3a1611b4c08243 (patch)
tree22f0972d212f0fdea13ca770375bead492b0fdee /devtools
parent4812170e6ea01064a9c6996751b136423e38762a (diff)
downloadMPC-36d4057de2f1f63c03fbb9fdce3a1611b4c08243.tar.gz
ChangeLogTag: Thu Jul 10 15:28:50 UTC 2008 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'devtools')
-rwxr-xr-xdevtools/document_template.pl20
1 files changed, 16 insertions, 4 deletions
diff --git a/devtools/document_template.pl b/devtools/document_template.pl
index b2b8aeb5..2b99a871 100755
--- a/devtools/document_template.pl
+++ b/devtools/document_template.pl
@@ -38,7 +38,7 @@ require StringProcessor;
my(%keywords) = ();
my(%arrow_op) = ();
my($doc_ext) = '.txt';
-my($version) = '1.1';
+my($version) = '1.2';
# ******************************************************************
# Subroutine Section
@@ -237,9 +237,21 @@ if (open($fh, $input)) {
}
elsif ($name eq 'if') {
$vname =~ s/(!|&&|\|\|)//g;
- foreach my $keyword (keys %keywords) {
- $vname =~ s/$keyword\(.*[\)]?//g;
- }
+
+ ## Keep pulling off keyword functions until we get down to
+ ## the actual template variable used in the function call.
+ my $retry;
+ do {
+ $retry = undef;
+ foreach my $keyword (keys %keywords) {
+ if ($vname =~ s/$keyword\((.*)[\)]?/$1/g) {
+ $retry = 1 if ($vname ne '');
+ last;
+ }
+ }
+ } while($retry);
+ $vname =~ s/\s*,.*//;
+
if ($vname !~ /^\s*$/) {
$name = lc($vname);
$key = lc($vname);