diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-19 11:52:44 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-19 11:52:44 -0600 |
commit | 6b7a8ff33a6383be4a9dea3c4225d142aab79b78 (patch) | |
tree | 5350a439bb05233ff6ee4a4368cdd59de686c685 /knetworkconf/backends | |
parent | b836ed566cdce05ae8408705487cd10a423f3a90 (diff) | |
download | tdeadmin-6b7a8ff33a6383be4a9dea3c4225d142aab79b78.tar.gz tdeadmin-6b7a8ff33a6383be4a9dea3c4225d142aab79b78.zip |
Remove additional unneeded tq method conversions
Diffstat (limited to 'knetworkconf/backends')
-rw-r--r-- | knetworkconf/backends/parse.pl.in | 10 | ||||
-rw-r--r-- | knetworkconf/backends/replace.pl.in | 18 | ||||
-rw-r--r-- | knetworkconf/backends/xml.pl.in | 68 |
3 files changed, 48 insertions, 48 deletions
diff --git a/knetworkconf/backends/parse.pl.in b/knetworkconf/backends/parse.pl.in index 0a02012..25c9373 100644 --- a/knetworkconf/backends/parse.pl.in +++ b/knetworkconf/backends/parse.pl.in @@ -1451,12 +1451,12 @@ sub gst_parse_xml sub gst_parse_xml_child_names { my ($file, $varpath) = @_; - my ($model, $branch, @tqchildren); + my ($model, $branch, @children); ($model) = &gst_xml_model_scan ($file); $branch = &gst_xml_model_find ($model, $varpath); - if (!$branch) { return @tqchildren; } + if (!$branch) { return @children; } my @list = @$branch; shift @list; # Attributes @@ -1465,7 +1465,7 @@ sub gst_parse_xml_child_names { if ($list [0] ne "__unparsed__" && $list [0] ne "0") { - push @tqchildren, shift @list; + push @children, shift @list; } else { @@ -1475,7 +1475,7 @@ sub gst_parse_xml_child_names shift @list; } - return @tqchildren; + return @children; } sub gst_parse_alchemist @@ -1505,7 +1505,7 @@ sub gst_parse_alchemist_print_option return undef if (!$branch); - $options = &gst_xml_model_get_tqchildren ($branch); + $options = &gst_xml_model_get_children ($branch); foreach $o (@$options) { diff --git a/knetworkconf/backends/replace.pl.in b/knetworkconf/backends/replace.pl.in index 8114f19..a72e3ef 100644 --- a/knetworkconf/backends/replace.pl.in +++ b/knetworkconf/backends/replace.pl.in @@ -1457,22 +1457,22 @@ sub gst_replace_alchemist_ensure_list_types for $elem (@path) { next if ($elem eq ""); - my @tqchildren = @$branch; - shift @tqchildren; # Attributes + my @children = @$branch; + shift @children; # Attributes $branch = undef; - while (@tqchildren) + while (@children) { - if ($tqchildren [0] eq $elem) + if ($children [0] eq $elem) { - shift @tqchildren; - $branch = shift @tqchildren; + shift @children; + $branch = shift @children; &gst_xml_model_set_attribute ($branch, "TYPE", "LIST"); last; } - shift @tqchildren; - shift @tqchildren; + shift @children; + shift @children; } last if ($branch == undef); @@ -1532,7 +1532,7 @@ sub gst_replace_alchemist_print_option # See if option is already defined. - $options = &gst_xml_model_get_tqchildren ($branch); + $options = &gst_xml_model_get_children ($branch); foreach $o (@$options) { diff --git a/knetworkconf/backends/xml.pl.in b/knetworkconf/backends/xml.pl.in index cd2201c..b9810c6 100644 --- a/knetworkconf/backends/xml.pl.in +++ b/knetworkconf/backends/xml.pl.in @@ -352,34 +352,34 @@ sub gst_xml_model_print_recurse my ($tree, $indent) = @_; my ($string); - my @tqchildren = @$tree; - shift @tqchildren; # Attributes + my @children = @$tree; + shift @children; # Attributes - while (@tqchildren) + while (@children) { - my $branch = $tqchildren [1]; + my $branch = $children [1]; - if ($tqchildren [0] eq "__unparsed__") + if ($children [0] eq "__unparsed__") { - $string .= "<" . $tqchildren [1] . ">"; + $string .= "<" . $children [1] . ">"; } - elsif ($tqchildren [0] eq "0") + elsif ($children [0] eq "0") { - $string .= $tqchildren [1]; + $string .= $children [1]; } elsif (@$branch == 1) # Empty tag. { - $string .= "<" . $tqchildren [0] . &gst_xml_model_print_attributes ($branch) . "/>"; + $string .= "<" . $children [0] . &gst_xml_model_print_attributes ($branch) . "/>"; } else { - $string .= "<" . $tqchildren [0] . &gst_xml_model_print_attributes ($branch) . ">"; + $string .= "<" . $children [0] . &gst_xml_model_print_attributes ($branch) . ">"; $string .= &gst_xml_model_print_recurse ($branch); - $string .= "</" . $tqchildren [0] . ">"; + $string .= "</" . $children [0] . ">"; } - shift @tqchildren; - shift @tqchildren; + shift @children; + shift @children; } # if ($branch) @@ -825,21 +825,21 @@ sub gst_xml_model_find for $elem (@path) { next if ($elem eq ""); - my @tqchildren = @$branch; - shift @tqchildren; # Attributes + my @children = @$branch; + shift @children; # Attributes $branch = undef; - while (@tqchildren) + while (@children) { - if ($tqchildren [0] eq $elem) + if ($children [0] eq $elem) { - shift @tqchildren; - $branch = shift @tqchildren; + shift @children; + $branch = shift @children; last; } - shift @tqchildren; - shift @tqchildren; + shift @children; + shift @children; } last if ($branch == undef); @@ -890,23 +890,23 @@ sub gst_xml_model_ensure { next if ($elem eq ""); - my @tqchildren = @$branch; + my @children = @$branch; my $parent_branch = $branch; - shift @tqchildren; # Attributes + shift @children; # Attributes $branch = undef; - while (@tqchildren) + while (@children) { - if ($tqchildren [0] eq $elem) + if ($children [0] eq $elem) { - shift @tqchildren; - $branch = shift @tqchildren; + shift @children; + $branch = shift @children; last; } - shift @tqchildren; - shift @tqchildren; + shift @children; + shift @children; } if ($branch == undef) @@ -950,22 +950,22 @@ sub gst_xml_model_remove return -1; } -sub gst_xml_model_get_tqchildren +sub gst_xml_model_get_children { my ($branch) = @_; - my (@tqchildren); + my (@children); - if (!$branch) { return \@tqchildren; } + if (!$branch) { return \@children; } for ($i = 1; $i < @$branch; $i += 2) { if (@$branch [$i] ne "__unparsed__" && @$branch [$i] ne "0") { - push @tqchildren, @$branch [$i + 1]; + push @children, @$branch [$i + 1]; } } - return \@tqchildren; + return \@children; } sub gst_xml_model_get_pcdata |