summaryrefslogtreecommitdiffstats
path: root/knetworkconf/backends/xml.pl.in
diff options
context:
space:
mode:
Diffstat (limited to 'knetworkconf/backends/xml.pl.in')
-rw-r--r--knetworkconf/backends/xml.pl.in82
1 files changed, 41 insertions, 41 deletions
diff --git a/knetworkconf/backends/xml.pl.in b/knetworkconf/backends/xml.pl.in
index b9810c6..9421f75 100644
--- a/knetworkconf/backends/xml.pl.in
+++ b/knetworkconf/backends/xml.pl.in
@@ -238,7 +238,7 @@ sub gst_xml_print_arrays
}
}
-# Pass a hash, create a parent tag $tag and print <key>val</key> for every
+# Pass a hash, create a tqparent tag $tag and print <key>val</key> for every
# value pair in the hash. If structure refs are found, these are recursively
# printed with print_structure.
sub gst_xml_print_hash
@@ -352,34 +352,34 @@ sub gst_xml_model_print_recurse
my ($tree, $indent) = @_;
my ($string);
- my @children = @$tree;
- shift @children; # Attributes
+ my @tqchildren = @$tree;
+ shift @tqchildren; # Attributes
- while (@children)
+ while (@tqchildren)
{
- my $branch = $children [1];
+ my $branch = $tqchildren [1];
- if ($children [0] eq "__unparsed__")
+ if ($tqchildren [0] eq "__unparsed__")
{
- $string .= "<" . $children [1] . ">";
+ $string .= "<" . $tqchildren [1] . ">";
}
- elsif ($children [0] eq "0")
+ elsif ($tqchildren [0] eq "0")
{
- $string .= $children [1];
+ $string .= $tqchildren [1];
}
elsif (@$branch == 1) # Empty tag.
{
- $string .= "<" . $children [0] . &gst_xml_model_print_attributes ($branch) . "/>";
+ $string .= "<" . $tqchildren [0] . &gst_xml_model_print_attributes ($branch) . "/>";
}
else
{
- $string .= "<" . $children [0] . &gst_xml_model_print_attributes ($branch) . ">";
+ $string .= "<" . $tqchildren [0] . &gst_xml_model_print_attributes ($branch) . ">";
$string .= &gst_xml_model_print_recurse ($branch);
- $string .= "</" . $children [0] . ">";
+ $string .= "</" . $tqchildren [0] . ">";
}
- shift @children;
- shift @children;
+ shift @tqchildren;
+ shift @tqchildren;
}
# if ($branch)
@@ -814,7 +814,7 @@ sub gst_xml_get_state
# XML model operations.
# Locate a node from the branch leading up to it.
-sub gst_xml_model_find
+sub gst_xml_model_tqfind
{
my ($model, $varpath) = @_;
my ($branch, @path);
@@ -825,21 +825,21 @@ sub gst_xml_model_find
for $elem (@path)
{
next if ($elem eq "");
- my @children = @$branch;
- shift @children; # Attributes
+ my @tqchildren = @$branch;
+ shift @tqchildren; # Attributes
$branch = undef;
- while (@children)
+ while (@tqchildren)
{
- if ($children [0] eq $elem)
+ if ($tqchildren [0] eq $elem)
{
- shift @children;
- $branch = shift @children;
+ shift @tqchildren;
+ $branch = shift @tqchildren;
last;
}
- shift @children;
- shift @children;
+ shift @tqchildren;
+ shift @tqchildren;
}
last if ($branch == undef);
@@ -855,7 +855,7 @@ sub gst_xml_model_add
my ($branch, @path);
@path = split /\//, $addpath;
- $branch = &gst_xml_model_find ($model, $varpath);
+ $branch = &gst_xml_model_tqfind ($model, $varpath);
if ($branch == undef)
{
return -1;
@@ -890,23 +890,23 @@ sub gst_xml_model_ensure
{
next if ($elem eq "");
- my @children = @$branch;
- my $parent_branch = $branch;
+ my @tqchildren = @$branch;
+ my $tqparent_branch = $branch;
- shift @children; # Attributes
+ shift @tqchildren; # Attributes
$branch = undef;
- while (@children)
+ while (@tqchildren)
{
- if ($children [0] eq $elem)
+ if ($tqchildren [0] eq $elem)
{
- shift @children;
- $branch = shift @children;
+ shift @tqchildren;
+ $branch = shift @tqchildren;
last;
}
- shift @children;
- shift @children;
+ shift @tqchildren;
+ shift @tqchildren;
}
if ($branch == undef)
@@ -918,8 +918,8 @@ sub gst_xml_model_ensure
push @list, \%hash;
- push @$parent_branch, $elem;
- push @$parent_branch, $branch;
+ push @$tqparent_branch, $elem;
+ push @$tqparent_branch, $branch;
}
}
@@ -932,7 +932,7 @@ sub gst_xml_model_remove
my ($branch, $i);
@path = split /\//, $addpath;
- $branch = &gst_xml_model_find ($model, $varpath);
+ $branch = &gst_xml_model_tqfind ($model, $varpath);
if ($branch == undef)
{
return -1;
@@ -950,22 +950,22 @@ sub gst_xml_model_remove
return -1;
}
-sub gst_xml_model_get_children
+sub gst_xml_model_get_tqchildren
{
my ($branch) = @_;
- my (@children);
+ my (@tqchildren);
- if (!$branch) { return \@children; }
+ if (!$branch) { return \@tqchildren; }
for ($i = 1; $i < @$branch; $i += 2)
{
if (@$branch [$i] ne "__unparsed__" && @$branch [$i] ne "0")
{
- push @children, @$branch [$i + 1];
+ push @tqchildren, @$branch [$i + 1];
}
}
- return \@children;
+ return \@tqchildren;
}
sub gst_xml_model_get_pcdata