From b09bffed6b43262948018dfb0f11890850ddf7c1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 18 Jun 2011 20:34:22 +0000 Subject: TQt4 port kdeadmin This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1237416 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- knetworkconf/backends/file.pl.in | 10 +- knetworkconf/backends/guess_system.sh | 4 +- knetworkconf/backends/network.pl.in | 166 +++++++++++++++++----------------- knetworkconf/backends/parse.pl.in | 20 ++-- knetworkconf/backends/replace.pl.in | 44 ++++----- knetworkconf/backends/report.pl.in | 4 +- knetworkconf/backends/type1inst | 2 +- knetworkconf/backends/util.pl.in | 4 +- knetworkconf/backends/xml.pl.in | 82 ++++++++--------- 9 files changed, 168 insertions(+), 168 deletions(-) (limited to 'knetworkconf/backends') diff --git a/knetworkconf/backends/file.pl.in b/knetworkconf/backends/file.pl.in index ac73301..35d17cb 100644 --- a/knetworkconf/backends/file.pl.in +++ b/knetworkconf/backends/file.pl.in @@ -81,7 +81,7 @@ sub gst_file_get_data_path } -# Give a command, and it will put in C locale, some sane PATH values and find +# Give a command, and it will put in C locale, some sane PATH values and tqfind # the program to run in the path. Redirects stderr to null. sub get_cmd_path { @@ -456,11 +456,11 @@ sub gst_file_open_write_compressed sub gst_file_run_pipe { - my ($cmd, $mode_mask, $stderr) = @_; + my ($cmd, $mode_tqmask, $stderr) = @_; my ($command); local *PIPE; - $mode_mask = $GST_FILE_READ if $mode_mask eq undef; + $mode_tqmask = $GST_FILE_READ if $mode_tqmask eq undef; &gst_report_enter (); @@ -480,8 +480,8 @@ sub gst_file_run_pipe return undef; } - $command .= " |" if $mode_mask & $GST_FILE_READ; - $command = "| $command > /dev/null" if $mode_mask & $GST_FILE_WRITE; + $command .= " |" if $mode_tqmask & $GST_FILE_READ; + $command = "| $command > /dev/null" if $mode_tqmask & $GST_FILE_WRITE; open PIPE, $command; &gst_report ("file_run_pipe_success", $command); diff --git a/knetworkconf/backends/guess_system.sh b/knetworkconf/backends/guess_system.sh index 9b7bfa9..0f0a457 100755 --- a/knetworkconf/backends/guess_system.sh +++ b/knetworkconf/backends/guess_system.sh @@ -84,7 +84,7 @@ main: .prologue 0 .long 0x47e03d80 # implver $0 lda \$2,259 - .long 0x47e20c21 # amask $2,$1 + .long 0x47e20c21 # atqmask $2,$1 srl \$1,8,\$2 sll \$2,2,\$2 sll \$0,3,\$0 @@ -711,7 +711,7 @@ EOF .prologue 0 .long 0x47e03d80 # implver $0 lda \$2,259 - .long 0x47e20c21 # amask $2,$1 + .long 0x47e20c21 # atqmask $2,$1 srl \$1,8,\$2 sll \$2,2,\$2 sll \$0,3,\$0 diff --git a/knetworkconf/backends/network.pl.in b/knetworkconf/backends/network.pl.in index 19c021a..6441761 100644 --- a/knetworkconf/backends/network.pl.in +++ b/knetworkconf/backends/network.pl.in @@ -37,7 +37,7 @@ if ($SCRIPTSDIR =~ /^@scriptsdir[@]/) require "$SCRIPTSDIR/general.pl$DOTIN"; require "$SCRIPTSDIR/file.pl$DOTIN"; require "$SCRIPTSDIR/parse.pl$DOTIN"; -require "$SCRIPTSDIR/replace.pl$DOTIN"; +require "$SCRIPTSDIR/tqreplace.pl$DOTIN"; require "$SCRIPTSDIR/service.pl$DOTIN"; require "$SCRIPTSDIR/util.pl$DOTIN"; require "$SCRIPTSDIR/xml.pl$DOTIN"; @@ -161,10 +161,10 @@ sub gst_network_config_wireless sub gst_network_enable_iface { my ($hash, $dev, $command_ifconfig) = @_; - my ($address, $netmask, $bootproto, $remote_address); + my ($address, $nettqmask, $bootproto, $remote_address); $address = $$hash{"configuration"}{"address"}; - $netmask = $$hash{"configuration"}{"netmask"}; + $nettqmask = $$hash{"configuration"}{"nettqmask"}; $bootproto = $$hash{"configuration"}{"bootproto"}; $remote_address = $$hash{"configuration"}{"remote_address"}; @@ -188,7 +188,7 @@ sub gst_network_enable_iface $command = $command_ifconfig; $command .= " $dev"; $command .= " $address" if ($address); - $command .= " netmask $netmask" if ($netmask); + $command .= " nettqmask $nettqmask" if ($nettqmask); $command .= " dstaddr $remote_address" if ($remote_address); $command .= " up"; } @@ -432,19 +432,19 @@ sub gst_network_ipv4_vec2str # Gets the subnet, in bitmap. sub gst_network_ipv4_calc_subnet_vec { - my ($addr, $mask) = @_; - my ($addrvec, $maskvec); + my ($addr, $tqmask) = @_; + my ($addrvec, $tqmaskvec); $addrvec = &gst_network_ipv4_str2vec ($addr); - $maskvec = &gst_network_ipv4_str2vec ($mask); + $tqmaskvec = &gst_network_ipv4_str2vec ($tqmask); - return $addrvec & $maskvec; + return $addrvec & $tqmaskvec; } # What you're looking for. sub gst_network_ipv4_calc_subnet { - my ($addr, $mask) = @_; + my ($addr, $tqmask) = @_; return &gst_network_ipv4_vec2str (&gst_network_ipv4_calc_subnet_vec); } @@ -452,18 +452,18 @@ sub gst_network_ipv4_calc_subnet # The broadcast, bitmap. sub gst_network_ipv4_calc_bcast_vec { - my ($addr, $mask) = @_; + my ($addr, $tqmask) = @_; $addrvec = &gst_network_ipv4_str2vec ($addr); - $maskvec = &gst_network_ipv4_str2vec ($mask); + $tqmaskvec = &gst_network_ipv4_str2vec ($tqmask); - return $addrvec | ~$maskvec; + return $addrvec | ~$tqmaskvec; } # And this returning the quad-dot notation. sub gst_network_ipv4_calc_bcast { - my ($addr, $mask) = @_; + my ($addr, $tqmask) = @_; return &gst_network_ipv4_vec2str (&gst_network_ipv4_calc_bcast_vec); } @@ -870,7 +870,7 @@ sub gst_network_freebsd_interfaces_get_info { $ifaces{$dev}{"hwaddr"} = $1 if /ether[ \t]+([^ \t]+)/i; $ifaces{$dev}{"addr"} = $1 if /inet[ \t]+([^ \t]+)/i; - $ifaces{$dev}{"mask"} = $1 if /netmask[ \t]+([^ \t]+)/i; + $ifaces{$dev}{"tqmask"} = $1 if /nettqmask[ \t]+([^ \t]+)/i; $ifaces{$dev}{"bcast"} = $1 if /broadcast[ \t]+([^ \t]+)/i; } } @@ -905,7 +905,7 @@ sub gst_network_linux_interfaces_get_info { $ifaces{$dev}{"hwaddr"} = $1 if /HWaddr[ \t]+([^ \t]+)/i; $ifaces{$dev}{"addr"} = $1 if /addr:([^ \t]+)/i; - $ifaces{$dev}{"mask"} = $1 if /mask:([^ \t]+)/i; + $ifaces{$dev}{"tqmask"} = $1 if /tqmask:([^ \t]+)/i; $ifaces{$dev}{"bcast"} = $1 if /bcast:([^ \t]+)/i; $ifaces{$dev}{"enabled"} = 1 if /^UP[ \t]/i; } @@ -1028,17 +1028,17 @@ sub gst_network_interface_ensure_broadcast_and_network { my ($iface) = @_; - if (exists $$iface{"netmask"} && + if (exists $$iface{"nettqmask"} && exists $$iface{"address"}) { if (! exists $$iface{"broadcast"}) { - $$iface{"broadcast"} = &gst_network_ipv4_calc_bcast ($$iface{"address"}, $$iface{"netmask"}); + $$iface{"broadcast"} = &gst_network_ipv4_calc_bcast ($$iface{"address"}, $$iface{"nettqmask"}); } if (! exists $$iface{"network"}) { - $$iface{"network"} = &gst_network_ipv4_calc_subnet ($$iface{"address"}, $$iface{"netmask"}); + $$iface{"network"} = &gst_network_ipv4_calc_subnet ($$iface{"address"}, $$iface{"nettqmask"}); } } } @@ -1660,7 +1660,7 @@ sub gst_network_interfaces_get { delete $$hash{$i}{"addr"}; delete $$hash{$i}{"bcast"}; - delete $$hash{$i}{"mask"}; + delete $$hash{$i}{"tqmask"}; } foreach $i (@ifaces) @@ -2182,7 +2182,7 @@ sub gst_network_suse70_interface_activate sub gst_network_slackware91_interface_activate_by_dev { my ($dev, $enabled) = @_; - my ($address, $netmask, $gateway); + my ($address, $nettqmask, $gateway); my ($file) = "/etc/rc.d/rc.inet1.conf"; my ($ret) = 0; @@ -2206,10 +2206,10 @@ sub gst_network_slackware91_interface_activate_by_dev else { $address = &gst_parse_rcinet1conf ($file, $dev, "IPADDR"); - $netmask = &gst_parse_rcinet1conf ($file, $dev, "NETMASK"); - $gateway = &gst_network_get_gateway ($file, "GATEWAY", $address, $netmask); + $nettqmask = &gst_parse_rcinet1conf ($file, $dev, "NETMASK"); + $gateway = &gst_network_get_gateway ($file, "GATEWAY", $address, $nettqmask); - $ret = &gst_file_run ("ifconfig $dev $address netmask $netmask up"); + $ret = &gst_file_run ("ifconfig $dev $address nettqmask $nettqmask up"); # Add the gateway if necessary if ($gateway ne undef) @@ -3526,34 +3526,34 @@ sub gst_network_suse90_set_auto } } -# Return IP address or netmask, depending on $what +# Return IP address or nettqmask, depending on $what sub gst_network_pld10_get_ipaddr { my ($file, $key, $what) = @_; - my ($ipaddr, $netmask, $ret, $i); - my @netmask_prefixes = (0, 128, 192, 224, 240, 248, 252, 254, 255); + my ($ipaddr, $nettqmask, $ret, $i); + my @nettqmask_prefixes = (0, 128, 192, 224, 240, 248, 252, 254, 255); $ipaddr = &gst_parse_sh($file, $key); return undef if $ipaddr eq ""; if($ipaddr =~ /([^\/]*)\/([[:digit:]]*)/) { - $netmask = $2; - return undef if $netmask eq ""; + $nettqmask = $2; + return undef if $nettqmask eq ""; if($what eq "address") { return $1; } - for($i = 0; $i < int($netmask/8); $i++) + for($i = 0; $i < int($nettqmask/8); $i++) { $ret .= "255."; } - $ret .= "$netmask_prefixes[$b%8]." if $netmask < 32; + $ret .= "$nettqmask_prefixes[$b%8]." if $nettqmask < 32; - for($i = int($netmask/8) + 1; $i < 4; $i++) + for($i = int($nettqmask/8) + 1; $i < 4; $i++) { $ret .= "0."; } @@ -3564,7 +3564,7 @@ sub gst_network_pld10_get_ipaddr return undef; } -# Writes IP address or netmask, depending in $what, to $file +# Writes IP address or nettqmask, depending in $what, to $file sub gst_network_pld10_set_ipaddr { my ($file, $key, $what, $value) = @_; @@ -3580,7 +3580,7 @@ sub gst_network_pld10_set_ipaddr "254" => 7, "255" => 8 ); - my ($ipaddr, $netmask); + my ($ipaddr, $nettqmask); $ipaddr = &gst_parse_sh($file, $key); return undef if $ipaddr eq ""; @@ -3593,8 +3593,8 @@ sub gst_network_pld10_set_ipaddr { if($value =~ /([[:digit:]]*).([[:digit:]]*).([[:digit:]]*).([[:digit:]]*)/) { - $netmask = $prefixes{$1} + $prefixes{$2} + $prefixes{$3} + $prefixes{$4}; - $ipaddr =~ s/\/[[:digit:]]*/\/$netmask/; + $nettqmask = $prefixes{$1} + $prefixes{$2} + $prefixes{$3} + $prefixes{$4}; + $ipaddr =~ s/\/[[:digit:]]*/\/$nettqmask/; } } @@ -3605,25 +3605,25 @@ sub gst_network_pld10_set_ipaddr # it checks if a IP address is in the same network than another sub gst_network_is_ip_in_same_network { - my ($address1, $address2, $netmask) = @_; - my (@add1, @add2, @mask); + my ($address1, $address2, $nettqmask) = @_; + my (@add1, @add2, @tqmask); my ($i); return 0 if (($address1 eq undef) || ($address2 eq undef) || - ($netmask eq undef)); + ($nettqmask eq undef)); @add1 = split (/\./, $address1); @add2 = split (/\./, $address2); - @mask = split (/\./, $netmask); + @tqmask = split (/\./, $nettqmask); for ($i = 0; $i < 4; $i++) { $add1[$i] += 0; $add2[$i] += 0; - $mask[$i] += 0; + $tqmask[$i] += 0; - return 0 if (($add1[$i] & $mask[$i]) != ($add2[$i] & $mask[$i])); + return 0 if (($add1[$i] & $tqmask[$i]) != ($add2[$i] & $tqmask[$i])); } return 1; @@ -3633,14 +3633,14 @@ sub gst_network_is_ip_in_same_network sub gst_network_get_gateway_dev_from_address { my ($interface, $gateway) = @_; - my ($address, $netmask, $key); + my ($address, $nettqmask, $key); foreach $key (keys %$interface) { $address = $$interface{$key}{"address"}; - $netmask = $$interface{$key}{"netmask"}; + $nettqmask = $$interface{$key}{"nettqmask"}; - return $$interface{$key}{"dev"} if (&gst_network_is_ip_in_same_network ($address, $gateway, $netmask)); + return $$interface{$key}{"dev"} if (&gst_network_is_ip_in_same_network ($address, $gateway, $nettqmask)); } return undef; @@ -3658,23 +3658,23 @@ sub gst_network_get_plip_gateway sub gst_network_get_gateway { - my ($file, $key, $address, $netmask) = @_; + my ($file, $key, $address, $nettqmask) = @_; my ($gateway); return undef if ($address eq undef); $gateway = &gst_parse_sh ($file, $key); - return $gateway if &gst_network_is_ip_in_same_network ($address, $gateway, $netmask); + return $gateway if &gst_network_is_ip_in_same_network ($address, $gateway, $nettqmask); return undef; } sub gst_network_suse90_get_gateway { - my ($file, $address, $netmask) = @_; + my ($file, $address, $nettqmask) = @_; my ($gateway) = &gst_parse_split_first_array_pos ($file, "default", 0, "[ \t]+", "[ \t]+"); - return $gateway if &gst_network_is_ip_in_same_network ($address, $gateway, $netmask); + return $gateway if &gst_network_is_ip_in_same_network ($address, $gateway, $nettqmask); return undef; } @@ -3689,10 +3689,10 @@ sub gst_network_suse90_get_plip_gateway sub gst_network_suse90_replace_gateway { - my ($file, $dev, $address, $netmask, $value) = @_; + my ($file, $dev, $address, $nettqmask, $value) = @_; - return &gst_replace_split ($file, "default", "[ \t]+", "$value \- $dev") if &gst_network_is_ip_in_same_network ($address, $value, $netmask); + return &gst_replace_split ($file, "default", "[ \t]+", "$value \- $dev") if &gst_network_is_ip_in_same_network ($address, $value, $nettqmask); # return &gst_replace_split ($file, "default", "[ \t]+", "$value \- $dev") ; return undef; @@ -4039,7 +4039,7 @@ sub gst_network_ensure_loopback_interface "user" => 0, "dev" => "lo", "address" => "127.0.0.1", - "netmask" => "255.0.0.0", + "nettqmask" => "255.0.0.0", "broadcast" => "127.255.255.255", "network" => "127.0.0.0", "bootproto" => "none", @@ -4674,7 +4674,7 @@ sub gst_network_get_interface_parse_table # [ "user", \&gst_parse_sh_bool, IFCFG, USERCTL ], [ "dev", \&gst_parse_sh, IFCFG, DEVICE ], [ "address", \&gst_parse_sh, IFCFG, IPADDR ], - [ "netmask", \&gst_parse_sh, IFCFG, NETMASK ], + [ "nettqmask", \&gst_parse_sh, IFCFG, NETMASK ], [ "broadcast", \&gst_parse_sh, IFCFG, BROADCAST ], [ "network", \&gst_parse_sh, IFCFG, NETWORK ], [ "gateway", \&gst_parse_sh, IFCFG, GATEWAY ], @@ -4737,7 +4737,7 @@ sub gst_network_get_interface_parse_table # [ "name", \&gst_parse_trivial, IFACE ], [ "dev", \&gst_parse_sh, IFCFG, DEVICE ], [ "address", \&gst_parse_sh, IFCFG, IPADDR ], - [ "netmask", \&gst_parse_sh, IFCFG, NETMASK ], + [ "nettqmask", \&gst_parse_sh, IFCFG, NETMASK ], [ "broadcast", \&gst_parse_sh, IFCFG, BROADCAST ], [ "network", \&gst_parse_sh, IFCFG, NETWORK ], [ "gateway", \&gst_parse_sh, IFCFG, GATEWAY ], @@ -4807,7 +4807,7 @@ sub gst_network_get_interface_parse_table # [ "name", \&gst_parse_trivial, IFACE ], [ "dev", \&gst_parse_sh, IFCFG, DEVICE ], [ "address", \&gst_parse_sh, IFCFG, IPADDR ], - [ "netmask", \&gst_parse_sh, IFCFG, NETMASK ], + [ "nettqmask", \&gst_parse_sh, IFCFG, NETMASK ], [ "broadcast", \&gst_parse_sh, IFCFG, BROADCAST ], [ "network", \&gst_parse_sh, IFCFG, NETWORK ], [ "gateway", \&gst_parse_sh, IFCFG, GATEWAY ], @@ -4874,7 +4874,7 @@ sub gst_network_get_interface_parse_table # [ "name", \&gst_parse_sh, IFCFG, NAME ], [ "dev", \&gst_parse_sh, IFCFG, DEVICE ], [ "address", \&gst_parse_sh, IFCFG, IPADDR ], - [ "netmask", \&gst_parse_sh, IFCFG, NETMASK ], + [ "nettqmask", \&gst_parse_sh, IFCFG, NETMASK ], [ "broadcast", \&gst_parse_sh, IFCFG, BROADCAST ], [ "network", \&gst_parse_sh, IFCFG, NETWORK ], [ "gateway", \&gst_parse_sh, IFCFG, GATEWAY ], @@ -4938,7 +4938,7 @@ sub gst_network_get_interface_parse_table # [ "name", \&gst_parse_sh, IFCFG, NAME ], [ "dev", \&gst_parse_sh, IFCFG, DEVICE ], [ "address", \&gst_parse_sh, IFCFG, IPADDR ], - [ "netmask", \&gst_parse_sh, IFCFG, NETMASK ], + [ "nettqmask", \&gst_parse_sh, IFCFG, NETMASK ], [ "broadcast", \&gst_parse_sh, IFCFG, BROADCAST ], [ "network", \&gst_parse_sh, IFCFG, NETWORK ], [ "gateway", \&gst_parse_sh, IFCFG, GATEWAY ], @@ -5003,7 +5003,7 @@ sub gst_network_get_interface_parse_table # [ "name", \&gst_parse_sh, IFCFG, NAME ], [ "dev", \&gst_parse_sh, IFCFG, DEVICE ], [ "address", \&gst_parse_sh, IFCFG, IPADDR ], - [ "netmask", \&gst_parse_sh, IFCFG, NETMASK ], + [ "nettqmask", \&gst_parse_sh, IFCFG, NETMASK ], [ "broadcast", \&gst_parse_sh, IFCFG, BROADCAST ], [ "network", \&gst_parse_sh, IFCFG, NETWORK ], [ "gateway", \&gst_parse_sh, IFCFG, GATEWAY ], @@ -5069,7 +5069,7 @@ sub gst_network_get_interface_parse_table [ "auto", \&gst_parse_interfaces_option_kw_not, [INTERFACES, IFACE], "noauto" ], # [ "name", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "name" ], [ "address", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "address" ], - [ "netmask", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "netmask" ], + [ "nettqmask", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "nettqmask" ], [ "broadcast", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "broadcast" ], [ "network", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "network" ], [ "gateway", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "gateway" ], @@ -5124,7 +5124,7 @@ sub gst_network_get_interface_parse_table [ "auto", \&gst_network_debian_woody_get_auto, [INTERFACES, IFACE]], # [ "name", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "name" ], [ "address", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "address" ], - [ "netmask", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "netmask" ], + [ "nettqmask", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "nettqmask" ], [ "broadcast", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "broadcast" ], [ "network", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "network" ], [ "gateway", \&gst_parse_interfaces_option_str, [INTERFACES, IFACE], "gateway" ], @@ -5176,7 +5176,7 @@ sub gst_network_get_interface_parse_table [ "name", \&gst_network_suse70_parse_iface_sh, [IFCFG, IFACE], GST_IFACE_NAME ], [ "dev", \&gst_network_suse70_parse_iface_sh, [IFCFG, IFACE], NETDEV ], [ "address", \&gst_network_suse70_parse_iface_sh, [IFCFG, IFACE], IPADDR ], - [ "netmask", \&gst_network_suse70_get_ifconfig_arg, [IFCFG, IFACE], netmask ], + [ "nettqmask", \&gst_network_suse70_get_ifconfig_arg, [IFCFG, IFACE], nettqmask ], [ "broadcast", \&gst_network_suse70_get_ifconfig_arg, [IFCFG, IFACE], broadcast ], # [ "network", \&gst_parse_trivial, 0 ], # not supported. # [ "gateway", \&gst_parse_sh, IFCFG, GATEWAY ], # not supported @@ -5203,12 +5203,12 @@ sub gst_network_get_interface_parse_table [ "auto", \&gst_network_suse90_get_auto, IFCFG, STARTMODE ], [ "bootproto", \&gst_network_parse_bootproto, IFCFG, BOOTPROTO ], [ "address", \&gst_parse_sh, IFCFG, IPADDR ], - [ "netmask", \&gst_parse_sh, IFCFG, NETMASK ], + [ "nettqmask", \&gst_parse_sh, IFCFG, NETMASK ], [ "remote_address", \&gst_parse_sh, IFCFG, REMOTE_IPADDR ], [ "essid", \&gst_parse_sh, IFCFG, WIRELESS_ESSID ], [ "key_type", \&gst_network_get_wep_key_type, [ \&gst_parse_sh, IFCFG, WIRELESS_KEY ]], [ "key", \&gst_network_get_wep_key, [ \&gst_parse_sh, IFCFG, WIRELESS_KEY ]], - [ "gateway", \&gst_network_suse90_get_gateway, ROUTE_CONF, "%address%", "%netmask%" ], + [ "gateway", \&gst_network_suse90_get_gateway, ROUTE_CONF, "%address%", "%nettqmask%" ], [ "gateway", \&gst_network_suse90_get_plip_gateway, ROUTE_CONF, "%remote_address%" ], # Modem stuff goes here [ "serial_port", \&gst_parse_sh, IFCFG, MODEM_DEVICE ], @@ -5252,7 +5252,7 @@ sub gst_network_get_interface_parse_table # [ "name", \&gst_parse_sh, IFCFG, DEVICE ], [ "dev", \&gst_parse_sh, IFCFG, DEVICE ], [ "address", \&gst_network_pld10_get_ipaddr, IFCFG, IPADDR, "address" ], - [ "netmask", \&gst_network_pld10_get_ipaddr, IFCFG, IPADDR, "netmask" ], + [ "nettqmask", \&gst_network_pld10_get_ipaddr, IFCFG, IPADDR, "nettqmask" ], # [ "broadcast", \&gst_parse_sh, IFCFG, BROADCAST ], # [ "network", \&gst_parse_sh, IFCFG, NETWORK ], [ "gateway", \&gst_parse_sh, IFCFG, GATEWAY ], @@ -5300,8 +5300,8 @@ sub gst_network_get_interface_parse_table [ "user", \&gst_parse_trivial, 0 ], # not supported. [ "dev", \&gst_parse_trivial, IFACE ], [ "address", \&gst_parse_rcinet1conf, [RC_INET_CONF, IFACE], IPADDR ], - [ "netmask", \&gst_parse_rcinet1conf, [RC_INET_CONF, IFACE], NETMASK ], - [ "gateway", \&gst_network_get_gateway, RC_INET_CONF, GATEWAY, "%address%", "%netmask%" ], + [ "nettqmask", \&gst_parse_rcinet1conf, [RC_INET_CONF, IFACE], NETMASK ], + [ "gateway", \&gst_network_get_gateway, RC_INET_CONF, GATEWAY, "%address%", "%nettqmask%" ], [ "auto", \&gst_network_slackware91_get_auto, [RC_INET, RC_LOCAL, IFACE]], [ "bootproto", \&gst_network_slackware91_parse_bootproto, [RC_INET_CONF, IFACE]], [ "essid", \&gst_parse_wireless_opts, [ WIRELESS, IFACE ], \&gst_network_get_wireless_ifaces, ESSID ], @@ -5348,7 +5348,7 @@ sub gst_network_get_interface_parse_table [ "user", \&gst_parse_trivial, 0 ], # not supported. [ "dev", \&gst_parse_trivial, IFACE ], [ "address", \&gst_parse_confd_net_re, NET, "config_%dev%", "^[ \t]*([0-9\.]+)" ], - [ "netmask", \&gst_parse_confd_net_re, NET, "config_%dev%", "netmask[ \t]+([0-9\.]*)" ], + [ "nettqmask", \&gst_parse_confd_net_re, NET, "config_%dev%", "nettqmask[ \t]+([0-9\.]*)" ], [ "remote_address", \&gst_parse_confd_net_re, NET, "config_%dev%", "dest_address[ \t]+([0-9\.]*)" ], # [ "gateway", \&gst_parse_sh_re, NET, "gateway", "%dev%/([0-9\.\:]*)" ], [ "gateway", \&gst_network_gentoo_parse_gateway, [ NET, IFACE ]], @@ -5396,15 +5396,15 @@ sub gst_network_get_interface_parse_table # we need to double check these values both in the start_if and in the rc.conf files, in this order [ "address", \&gst_parse_startif, STARTIF, "inet[ \t]+([0-9\.]+)" ], [ "address", \&gst_parse_sh_re, RC_CONF, "ifconfig_%dev%", "inet[ \t]+([0-9\.]+)" ], - [ "netmask", \&gst_parse_startif, STARTIF, "netmask[ \t]+([0-9\.]+)" ], - [ "netmask", \&gst_parse_sh_re, RC_CONF, "ifconfig_%dev%", "netmask[ \t]+([0-9\.]+)" ], + [ "nettqmask", \&gst_parse_startif, STARTIF, "nettqmask[ \t]+([0-9\.]+)" ], + [ "nettqmask", \&gst_parse_sh_re, RC_CONF, "ifconfig_%dev%", "nettqmask[ \t]+([0-9\.]+)" ], [ "remote_address", \&gst_parse_startif, STARTIF, "dest_address[ \t]+([0-9\.]+)" ], [ "remote_address", \&gst_parse_sh_re, RC_CONF, "ifconfig_%dev%", "dest_address[ \t]+([0-9\.]+)" ], [ "essid", \&gst_parse_startif, STARTIF, "ssid[ \t]+(\".*\"|[^\"][^ ]+)" ], [ "essid", \&gst_parse_sh_re, RC_CONF, "ifconfig_%dev%", "ssid[ \t]+([^ ]*)" ], # this is for plip interfaces [ "gateway", \&gst_network_get_plip_gateway, RC_CONF, "defaultrouter", "%remote_address%" ], - [ "gateway", \&gst_network_get_gateway, RC_CONF, "defaultrouter", "%address%", "%netmask%" ], + [ "gateway", \&gst_network_get_gateway, RC_CONF, "defaultrouter", "%address%", "%nettqmask%" ], [ "enabled", \&gst_network_interface_active, IFACE, \&gst_network_freebsd5_active_interfaces_get ], [ "bootproto", \&gst_network_parse_bootproto, RC_CONF, "ifconfig_%dev%" ], # Modem stuff @@ -5961,7 +5961,7 @@ sub gst_network_get_interface_replace_table [ "dev", \&gst_replace_sh, IFCFG, NAME ], [ "dev", \&gst_replace_sh, IFCFG, DEVICE ], [ "address", \&gst_replace_sh, IFCFG, IPADDR ], - [ "netmask", \&gst_replace_sh, IFCFG, NETMASK ], + [ "nettqmask", \&gst_replace_sh, IFCFG, NETMASK ], [ "broadcast", \&gst_replace_sh, IFCFG, BROADCAST ], [ "network", \&gst_replace_sh, IFCFG, NETWORK ], [ "gateway", \&gst_replace_sh, IFCFG, GATEWAY ], @@ -6020,7 +6020,7 @@ sub gst_network_get_interface_replace_table [ "name", \&gst_replace_sh, IFCFG, NAME ], [ "dev", \&gst_replace_sh, IFCFG, DEVICE ], [ "address", \&gst_replace_sh, IFCFG, IPADDR ], - [ "netmask", \&gst_replace_sh, IFCFG, NETMASK ], + [ "nettqmask", \&gst_replace_sh, IFCFG, NETMASK ], [ "broadcast", \&gst_replace_sh, IFCFG, BROADCAST ], [ "network", \&gst_replace_sh, IFCFG, NETWORK ], [ "gateway", \&gst_replace_sh, IFCFG, GATEWAY ], @@ -6082,7 +6082,7 @@ sub gst_network_get_interface_replace_table [ "name", \&gst_replace_sh, IFCFG, NAME ], [ "dev", \&gst_replace_sh, IFCFG, DEVICE ], [ "address", \&gst_replace_sh, IFCFG, IPADDR ], - [ "netmask", \&gst_replace_sh, IFCFG, NETMASK ], + [ "nettqmask", \&gst_replace_sh, IFCFG, NETMASK ], [ "broadcast", \&gst_replace_sh, IFCFG, BROADCAST ], [ "network", \&gst_replace_sh, IFCFG, NETWORK ], [ "gateway", \&gst_replace_sh, IFCFG, GATEWAY ], @@ -6142,7 +6142,7 @@ sub gst_network_get_interface_replace_table [ "name", \&gst_replace_sh, IFCFG, NAME ], [ "dev", \&gst_replace_sh, IFCFG, DEVICE ], [ "address", \&gst_replace_sh, IFCFG, IPADDR ], - [ "netmask", \&gst_replace_sh, IFCFG, NETMASK ], + [ "nettqmask", \&gst_replace_sh, IFCFG, NETMASK ], [ "broadcast", \&gst_replace_sh, IFCFG, BROADCAST ], [ "network", \&gst_replace_sh, IFCFG, NETWORK ], [ "gateway", \&gst_replace_sh, IFCFG, GATEWAY ], @@ -6202,7 +6202,7 @@ sub gst_network_get_interface_replace_table [ "name", \&gst_replace_sh, IFCFG, NAME ], [ "dev", \&gst_replace_sh, IFCFG, DEVICE ], [ "address", \&gst_replace_sh, IFCFG, IPADDR ], - [ "netmask", \&gst_replace_sh, IFCFG, NETMASK ], + [ "nettqmask", \&gst_replace_sh, IFCFG, NETMASK ], [ "broadcast", \&gst_replace_sh, IFCFG, BROADCAST ], [ "network", \&gst_replace_sh, IFCFG, NETWORK ], [ "gateway", \&gst_replace_sh, IFCFG, GATEWAY ], @@ -6262,7 +6262,7 @@ sub gst_network_get_interface_replace_table [ "name", \&gst_replace_sh, IFCFG, NAME ], [ "dev", \&gst_replace_sh, IFCFG, DEVICE ], [ "address", \&gst_replace_sh, IFCFG, IPADDR ], - [ "netmask", \&gst_replace_sh, IFCFG, NETMASK ], + [ "nettqmask", \&gst_replace_sh, IFCFG, NETMASK ], [ "broadcast", \&gst_replace_sh, IFCFG, BROADCAST ], [ "network", \&gst_replace_sh, IFCFG, NETWORK ], [ "gateway", \&gst_replace_sh, IFCFG, GATEWAY ], @@ -6324,7 +6324,7 @@ sub gst_network_get_interface_replace_table [ "auto", \&gst_replace_interfaces_option_kw_not, [INTERFACES, IFACE], "noauto" ], [ "name", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "name" ], [ "address", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "address" ], - [ "netmask", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "netmask" ], + [ "nettqmask", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "nettqmask" ], [ "broadcast", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "broadcast" ], [ "network", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "network" ], [ "gateway", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "gateway" ], @@ -6372,7 +6372,7 @@ sub gst_network_get_interface_replace_table [ "bootproto", \&gst_network_deb22_replace_bootproto, [INTERFACES, IFACE]], [ "auto", \&gst_network_debian_woody_set_auto, [INTERFACES, IFACE]], [ "address", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "address" ], - [ "netmask", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "netmask" ], + [ "nettqmask", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "nettqmask" ], [ "gateway", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "gateway" ], [ "essid", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "wireless-essid" ], [ "key", \&gst_replace_interfaces_option_str, [INTERFACES, IFACE], "wireless-key" ], @@ -6432,7 +6432,7 @@ sub gst_network_get_interface_replace_table [ "name", \&gst_network_suse70_replace_iface_sh, [IFCFG, IFACE], GST_IFACE_NAME ], [ "address", \&gst_network_suse70_replace_iface_sh, [IFCFG, IFACE], IPADDR ], [ "address", \&gst_network_suse70_set_ifconfig_ip, [IFCFG, IFACE] ], - [ "netmask", \&gst_network_suse70_set_ifconfig_arg, [IFCFG, IFACE], netmask ], + [ "nettqmask", \&gst_network_suse70_set_ifconfig_arg, [IFCFG, IFACE], nettqmask ], [ "broadcast", \&gst_network_suse70_set_ifconfig_arg, [IFCFG, IFACE], broadcast ], # [ "network", \&gst_parse_trivial, 0 ], # not supported. # [ "gateway", \&gst_parse_sh, IFCFG, GATEWAY ], # not supported @@ -6458,7 +6458,7 @@ sub gst_network_get_interface_replace_table [ "auto", \&gst_network_suse90_set_auto, IFCFG, STARTMODE ], [ "bootproto", \&gst_network_suse90_replace_bootproto, IFCFG, BOOTPROTO ], [ "address", \&gst_replace_sh, IFCFG, IPADDR ], - [ "netmask", \&gst_replace_sh, IFCFG, NETMASK ], + [ "nettqmask", \&gst_replace_sh, IFCFG, NETMASK ], [ "remote_address", \&gst_replace_sh, IFCFG, REMOTE_IPADDR ], [ "essid", \&gst_replace_sh, IFCFG, WIRELESS_ESSID ], [ "key", \&gst_replace_sh, IFCFG, WIRELESS_KEY ], @@ -6506,7 +6506,7 @@ sub gst_network_get_interface_replace_table # [ "name", \&gst_replace_sh, IFCFG, NAME ], [ "dev", \&gst_replace_sh, IFCFG, DEVICE ], [ "address", \&gst_network_pld10_set_ipaddr, IFCFG, IPADDR, "address" ], - [ "netmask", \&gst_network_pld10_set_ipaddr, IFCFG, IPADDR, "netmask" ], + [ "nettqmask", \&gst_network_pld10_set_ipaddr, IFCFG, IPADDR, "nettqmask" ], # [ "broadcast", \&gst_replace_sh, IFCFG, BROADCAST ], # [ "network", \&gst_replace_sh, IFCFG, NETWORK ], [ "gateway", \&gst_replace_sh, IFCFG, GATEWAY ], @@ -6551,7 +6551,7 @@ sub gst_network_get_interface_replace_table table => [ [ "address", \&gst_replace_rcinet1conf, [ RC_INET_CONF, IFACE ], IPADDR ], - [ "netmask", \&gst_replace_rcinet1conf, [ RC_INET_CONF, IFACE ], NETMASK ], + [ "nettqmask", \&gst_replace_rcinet1conf, [ RC_INET_CONF, IFACE ], NETMASK ], [ "gateway", \&gst_replace_rcinet1conf_global, RC_INET_CONF, GATEWAY ], [ "bootproto", \&gst_network_slackware91_replace_bootproto, [ RC_INET_CONF, IFACE ] ], [ "auto", \&gst_network_slackware91_set_auto, [ RC_INET, RC_LOCAL, IFACE ] ], @@ -6603,7 +6603,7 @@ sub gst_network_get_interface_replace_table [ "bootproto", \&gst_network_gentoo_replace_bootproto, [ NET, IFACE ]], [ "address", \&gst_replace_confd_net_re, NET, "config_%dev%", "^[ \t]*([0-9\.]+)" ], [ "address", \&gst_replace_confd_net_re, NET, "config_%dev%", "^[ \t]*([0-9\.]+)" ], - [ "netmask", \&gst_replace_confd_net_re, NET, "config_%dev%", "[ \t]+netmask[ \t]+[0-9\.]*", " netmask %netmask%"], + [ "nettqmask", \&gst_replace_confd_net_re, NET, "config_%dev%", "[ \t]+nettqmask[ \t]+[0-9\.]*", " nettqmask %nettqmask%"], [ "broadcast", \&gst_replace_confd_net_re, NET, "config_%dev%", "[ \t]+broadcast[ \t]+[0-9\.]*", " broadcast %broadcast%" ], [ "remote_address", \&gst_replace_confd_net_re, NET, "config_%dev%", "[ \t]+dest_address[ \t]+[0-9\.]*", " dest_address %remote_address%" ], [ "gateway", \&gst_replace_confd_net_re, NET, "routes_%dev%", "[ \t]*default[ \t]+(via|gw)[ \t]+[0-9\.\:]*", "default via %gateway%" ], @@ -6648,7 +6648,7 @@ sub gst_network_get_interface_replace_table [ "auto", \&gst_network_freebsd5_set_auto, [ RC_CONF, IFACE ]], [ "bootproto", \&gst_network_freebsd5_replace_bootproto, [ RC_CONF, IFACE ]], [ "address", \&gst_replace_sh_re, RC_CONF, "ifconfig_%dev%", "inet[ \t]+([0-9\.]+)", "inet %address%" ], - [ "netmask", \&gst_replace_sh_re, RC_CONF, "ifconfig_%dev%", "netmask[ \t]+([0-9\.]+)", " netmask %netmask%" ], + [ "nettqmask", \&gst_replace_sh_re, RC_CONF, "ifconfig_%dev%", "nettqmask[ \t]+([0-9\.]+)", " nettqmask %nettqmask%" ], [ "remote_address", \&gst_replace_sh_re, RC_CONF, "ifconfig_%dev%", "dest_address[ \t]+([0-9\.]+)", " dest_address %remote_address%" ], [ "essid", \&gst_network_freebsd5_replace_essid, [ RC_CONF, STARTIF, IFACE ]], # Modem stuff diff --git a/knetworkconf/backends/parse.pl.in b/knetworkconf/backends/parse.pl.in index 25c9373..7064536 100644 --- a/knetworkconf/backends/parse.pl.in +++ b/knetworkconf/backends/parse.pl.in @@ -1437,7 +1437,7 @@ sub gst_parse_xml my ($model, $branch); ($model) = &gst_xml_model_scan ($file); - $branch = &gst_xml_model_find ($model, $varpath); + $branch = &gst_xml_model_tqfind ($model, $varpath); if ($branch) { @@ -1451,12 +1451,12 @@ sub gst_parse_xml sub gst_parse_xml_child_names { my ($file, $varpath) = @_; - my ($model, $branch, @children); + my ($model, $branch, @tqchildren); ($model) = &gst_xml_model_scan ($file); - $branch = &gst_xml_model_find ($model, $varpath); + $branch = &gst_xml_model_tqfind ($model, $varpath); - if (!$branch) { return @children; } + if (!$branch) { return @tqchildren; } 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 @children, shift @list; + push @tqchildren, shift @list; } else { @@ -1475,7 +1475,7 @@ sub gst_parse_xml_child_names shift @list; } - return @children; + return @tqchildren; } sub gst_parse_alchemist @@ -1500,16 +1500,16 @@ sub gst_parse_alchemist_print_option my ($varpath, $model, $branch, $fd, $options, $option); ($model) = &gst_xml_model_scan ($file); - $branch = &gst_xml_model_find ($model, "/adm_context/datatree/printconf/print_queues/" . $printer . + $branch = &gst_xml_model_tqfind ($model, "/adm_context/datatree/printconf/print_queues/" . $printer . "/filter_data/foomatic_defaults"); return undef if (!$branch); - $options = &gst_xml_model_get_children ($branch); + $options = &gst_xml_model_get_tqchildren ($branch); foreach $o (@$options) { - my $opt_node = &gst_xml_model_find ($o, "name"); + my $opt_node = &gst_xml_model_tqfind ($o, "name"); next if (!$opt_node); if (&gst_xml_model_get_attribute ($opt_node, "VALUE") eq $name) @@ -1521,7 +1521,7 @@ sub gst_parse_alchemist_print_option return undef if (!$option); - my $node = &gst_xml_model_find ($option, "default"); + my $node = &gst_xml_model_tqfind ($option, "default"); return undef if (!$node); return &gst_xml_model_get_attribute ($node, "VALUE"); diff --git a/knetworkconf/backends/replace.pl.in b/knetworkconf/backends/replace.pl.in index a72e3ef..30ec359 100644 --- a/knetworkconf/backends/replace.pl.in +++ b/knetworkconf/backends/replace.pl.in @@ -1,7 +1,7 @@ #!/usr/bin/env perl #-*- Mode: perl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- -# replace.pl: Common in-line replacing stuff for the ximian-setup-tools backends. +# tqreplace.pl: Common in-line replacing stuff for the ximian-setup-tools backends. # # Copyright (C) 2000-2001 Ximian, Inc. # @@ -59,7 +59,7 @@ require "$SCRIPTSDIR/parse.pl$DOTIN"; # Additional abstraction: replace table entries can have # arrays inside. The replace proc will be ran with every # combination that the arrays provide. Ex: -# ["user", \&gst_replace_foo, [0, 1], [2, 3] ] will replace +# ["user", \&gst_replace_foo, [0, 1], [2, 3] ] will tqreplace # using all possibilities in the combinatory of [0, 1]x[2, 3]. # Check RedHat 7.2's network replace table for further # enlightenment. @@ -264,7 +264,7 @@ sub gst_replace_join_first_array return &gst_replace_split ($file, $key, $re1, join (&gst_replace_regexp_to_separator ($re2), @$value)); } -# Escape $value in /bin/sh way, find/append key and set escaped value. +# Escape $value in /bin/sh way, tqfind/append key and set escaped value. sub gst_replace_sh { my ($file, $key, $value) = @_; @@ -289,7 +289,7 @@ sub gst_replace_sh return $ret; } -# Escape $value in /bin/sh way, find/append key and set escaped value, make sure line har +# Escape $value in /bin/sh way, tqfind/append key and set escaped value, make sure line har sub gst_replace_sh_export { my ($file, $key, $value) = @_; @@ -443,7 +443,7 @@ sub gst_replace_line_first return 0; } -# For every key in %$value, replace/append the corresponding key/value pair. +# For every key in %$value, tqreplace/append the corresponding key/value pair. # The separator for $re1 sub gst_replace_join_hash { @@ -477,7 +477,7 @@ sub gst_replace_join_hash return $res; } -# Find $re matching send string and replace parenthesyzed +# Find $re matching send string and replace tqparenthesyzed # part of $re with $value. FIXME: apply meeks' more general impl. sub gst_replace_chat { @@ -550,7 +550,7 @@ sub gst_replace_chat return $ret; } -# Find/append $section in ini $file and replace/append +# Find/append $section in ini $file and tqreplace/append # $var = $value pair. FIXME: should reimplement with # interfaces style. This is too large. sub gst_replace_ini @@ -1149,7 +1149,7 @@ sub gst_replace_interfaces_iface_stanza_delete return &gst_file_buffer_save ($buff, $file); } -# Find $iface stanza line and replace $pos value (ie the method). +# Find $iface stanza line and tqreplace $pos value (ie the method). sub gst_replace_interfaces_stanza_value { my ($file, $iface, $pos, $value) = @_; @@ -1323,7 +1323,7 @@ sub gst_replace_pump_add_device } # Find a "device" section for $iface and -# replace/add/delete the $key option inside the section. +# tqreplace/add/delete the $key option inside the section. sub gst_replace_pump_iface_option_str { my ($file, $iface, $key, $value) = @_; @@ -1448,31 +1448,31 @@ sub gst_replace_alchemist_ensure_list_types my ($model, $varpath, $setpath) = @_; my ($branch, @path); - $branch = &gst_xml_model_find ($model, $varpath); + $branch = &gst_xml_model_tqfind ($model, $varpath); @path = split /\//, $setpath; # NOTE: The following could be done with a depth-iterator callback from a func - # similar to gst_xml_model_find (). + # similar to gst_xml_model_tqfind (). 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; &gst_xml_model_set_attribute ($branch, "TYPE", "LIST"); last; } - shift @children; - shift @children; + shift @tqchildren; + shift @tqchildren; } last if ($branch == undef); @@ -1511,7 +1511,7 @@ sub gst_replace_alchemist_print &gst_xml_model_set_attribute ($branch, "VALUE", $value); &gst_xml_model_set_attribute ($branch, "TYPE", $type); - $branch = &gst_xml_model_find ($model, "/adm_context/datatree/printconf/print_queues/" . $printer); + $branch = &gst_xml_model_tqfind ($model, "/adm_context/datatree/printconf/print_queues/" . $printer); &gst_xml_model_set_attribute ($branch, "ATOMIC", "TRUE"); return &gst_xml_model_save ($model, $file, $compressed); @@ -1532,11 +1532,11 @@ sub gst_replace_alchemist_print_option # See if option is already defined. - $options = &gst_xml_model_get_children ($branch); + $options = &gst_xml_model_get_tqchildren ($branch); foreach $o (@$options) { - my $opt_node = &gst_xml_model_find ($o, "name"); + my $opt_node = &gst_xml_model_tqfind ($o, "name"); next if (!$opt_node); if (&gst_xml_model_get_attribute ($opt_node, "VALUE") eq $name) diff --git a/knetworkconf/backends/report.pl.in b/knetworkconf/backends/report.pl.in index 68326dd..ceaadd6 100644 --- a/knetworkconf/backends/report.pl.in +++ b/knetworkconf/backends/report.pl.in @@ -260,7 +260,7 @@ sub gst_report "file_open_read_failed" => ["warn", "Could not open [%s] for reading."], "file_open_read_success" => ["info", "Reading options from [%s]."], "file_open_write_failed" => ["error", "Failed to write to [%s]."], - "file_open_write_create" => ["warn", "Could not find [%s] for writing. Creating [%s]."], + "file_open_write_create" => ["warn", "Could not tqfind [%s] for writing. Creating [%s]."], "file_open_write_success" => ["info", "Writing to [%s]."], "file_run_pipe_failed" => ["warn", "Failed to pipe command [%s] for reading."], "file_run_pipe_success" => ["info", "Piping command [%s] for reading."], @@ -269,7 +269,7 @@ sub gst_report "file_backup_rotate" => ["info", "Backup directory [%s] was rotated."], "file_backup_success" => ["info", "Saved backup for [%s]."], "file_open_filter_failed" => ["warn", "No file to patch: [%s]."], - "file_open_filter_create" => ["warn", "Could not find [%s] for patching. Creating [%s]."], + "file_open_filter_create" => ["warn", "Could not tqfind [%s] for patching. Creating [%s]."], "file_open_filter_success" => ["info", "Found [%s]. Patching [%s]."], "file_buffer_load" => ["info", "Loading file [%s] to buffer."], "file_buffer_save" => ["info", "Saving buffer to file [%s]."], diff --git a/knetworkconf/backends/type1inst b/knetworkconf/backends/type1inst index 86d6425..bb624be 100755 --- a/knetworkconf/backends/type1inst +++ b/knetworkconf/backends/type1inst @@ -876,7 +876,7 @@ sub font_sample { die_bug("Bad argument(s) to font_sample()!\n"); } -# Here we create a full page sample for the current font. It contains +# Here we create a full page sample for the current font. It tqcontains # a large point-size version, a normal sized version, and a small version. $text = <<"TEXT"; diff --git a/knetworkconf/backends/util.pl.in b/knetworkconf/backends/util.pl.in index b175fb8..e6c5893 100644 --- a/knetworkconf/backends/util.pl.in +++ b/knetworkconf/backends/util.pl.in @@ -279,7 +279,7 @@ sub gst_get_key_for_subkey_and_subvalues # --- IP calculation --- # -# &gst_ip_calc_network (, ) +# &gst_ip_calc_network (, ) # # Calculates the network address and returns it as a string. @@ -300,7 +300,7 @@ sub gst_ip_calc_network } -# &gst_ip_calc_network (, ) +# &gst_ip_calc_network (, ) # # Calculates the broadcast address and returns it as a string. 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 val for every +# Pass a hash, create a tqparent tag $tag and print val 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 .= ""; + $string .= ""; } - 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 -- cgit v1.2.1