From 4a25ca5c80d9b88fdc1a0d44d1db47da47206899 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: rename the following methods: tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- knetworkconf/backends/file.pl.in | 2 +- knetworkconf/backends/network.pl.in | 2 +- knetworkconf/backends/parse.pl.in | 10 +++++----- knetworkconf/backends/replace.pl.in | 24 ++++++++++++------------ knetworkconf/backends/report.pl.in | 4 ++-- knetworkconf/backends/type1inst | 2 +- knetworkconf/backends/xml.pl.in | 6 +++--- 7 files changed, 25 insertions(+), 25 deletions(-) (limited to 'knetworkconf/backends') diff --git a/knetworkconf/backends/file.pl.in b/knetworkconf/backends/file.pl.in index 35d17cb..f147474 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 tqfind +# Give a command, and it will put in C locale, some sane PATH values and find # the program to run in the path. Redirects stderr to null. sub get_cmd_path { diff --git a/knetworkconf/backends/network.pl.in b/knetworkconf/backends/network.pl.in index 42d1629..ed36e40 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/tqreplace.pl$DOTIN"; +require "$SCRIPTSDIR/replace.pl$DOTIN"; require "$SCRIPTSDIR/service.pl$DOTIN"; require "$SCRIPTSDIR/util.pl$DOTIN"; require "$SCRIPTSDIR/xml.pl$DOTIN"; diff --git a/knetworkconf/backends/parse.pl.in b/knetworkconf/backends/parse.pl.in index 7064536..0a02012 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_tqfind ($model, $varpath); + $branch = &gst_xml_model_find ($model, $varpath); if ($branch) { @@ -1454,7 +1454,7 @@ sub gst_parse_xml_child_names my ($model, $branch, @tqchildren); ($model) = &gst_xml_model_scan ($file); - $branch = &gst_xml_model_tqfind ($model, $varpath); + $branch = &gst_xml_model_find ($model, $varpath); if (!$branch) { return @tqchildren; } @@ -1500,7 +1500,7 @@ sub gst_parse_alchemist_print_option my ($varpath, $model, $branch, $fd, $options, $option); ($model) = &gst_xml_model_scan ($file); - $branch = &gst_xml_model_tqfind ($model, "/adm_context/datatree/printconf/print_queues/" . $printer . + $branch = &gst_xml_model_find ($model, "/adm_context/datatree/printconf/print_queues/" . $printer . "/filter_data/foomatic_defaults"); return undef if (!$branch); @@ -1509,7 +1509,7 @@ sub gst_parse_alchemist_print_option foreach $o (@$options) { - my $opt_node = &gst_xml_model_tqfind ($o, "name"); + my $opt_node = &gst_xml_model_find ($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_tqfind ($option, "default"); + my $node = &gst_xml_model_find ($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 bac1f9a..8114f19 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 -*- -# tqreplace.pl: Common in-line replacing stuff for the ximian-setup-tools backends. +# replace.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 tqreplace +# ["user", \&gst_replace_foo, [0, 1], [2, 3] ] will replace # 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, tqfind/append key and set escaped value. +# Escape $value in /bin/sh way, find/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, tqfind/append key and set escaped value, make sure line har +# Escape $value in /bin/sh way, find/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, tqreplace/append the corresponding key/value pair. +# For every key in %$value, replace/append the corresponding key/value pair. # The separator for $re1 sub gst_replace_join_hash { @@ -550,7 +550,7 @@ sub gst_replace_chat return $ret; } -# Find/append $section in ini $file and tqreplace/append +# Find/append $section in ini $file and replace/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 tqreplace $pos value (ie the method). +# Find $iface stanza line and replace $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 -# tqreplace/add/delete the $key option inside the section. +# replace/add/delete the $key option inside the section. sub gst_replace_pump_iface_option_str { my ($file, $iface, $key, $value) = @_; @@ -1448,11 +1448,11 @@ sub gst_replace_alchemist_ensure_list_types my ($model, $varpath, $setpath) = @_; my ($branch, @path); - $branch = &gst_xml_model_tqfind ($model, $varpath); + $branch = &gst_xml_model_find ($model, $varpath); @path = split /\//, $setpath; # NOTE: The following could be done with a depth-iterator callback from a func - # similar to gst_xml_model_tqfind (). + # similar to gst_xml_model_find (). for $elem (@path) { @@ -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_tqfind ($model, "/adm_context/datatree/printconf/print_queues/" . $printer); + $branch = &gst_xml_model_find ($model, "/adm_context/datatree/printconf/print_queues/" . $printer); &gst_xml_model_set_attribute ($branch, "ATOMIC", "TRUE"); return &gst_xml_model_save ($model, $file, $compressed); @@ -1536,7 +1536,7 @@ sub gst_replace_alchemist_print_option foreach $o (@$options) { - my $opt_node = &gst_xml_model_tqfind ($o, "name"); + my $opt_node = &gst_xml_model_find ($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 ceaadd6..68326dd 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 tqfind [%s] for writing. Creating [%s]."], + "file_open_write_create" => ["warn", "Could not find [%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 tqfind [%s] for patching. Creating [%s]."], + "file_open_filter_create" => ["warn", "Could not find [%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 bb624be..86d6425 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 tqcontains +# Here we create a full page sample for the current font. It contains # a large point-size version, a normal sized version, and a small version. $text = <<"TEXT"; diff --git a/knetworkconf/backends/xml.pl.in b/knetworkconf/backends/xml.pl.in index dfd41cd..eed6b88 100644 --- a/knetworkconf/backends/xml.pl.in +++ b/knetworkconf/backends/xml.pl.in @@ -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_tqfind +sub gst_xml_model_find { my ($model, $varpath) = @_; my ($branch, @path); @@ -855,7 +855,7 @@ sub gst_xml_model_add my ($branch, @path); @path = split /\//, $addpath; - $branch = &gst_xml_model_tqfind ($model, $varpath); + $branch = &gst_xml_model_find ($model, $varpath); if ($branch == undef) { return -1; @@ -932,7 +932,7 @@ sub gst_xml_model_remove my ($branch, $i); @path = split /\//, $addpath; - $branch = &gst_xml_model_tqfind ($model, $varpath); + $branch = &gst_xml_model_find ($model, $varpath); if ($branch == undef) { return -1; -- cgit v1.2.1