aboutsummaryrefslogtreecommitdiffstats
path: root/src/ipcalc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipcalc.c')
0 files changed, 0 insertions, 0 deletions
ignaud [tv]
summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-11-14 17:36:32 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-11-14 17:36:32 +0000
commit78e8097c578fb334c7440a5459fdb7aecc827feb (patch)
tree365a303dd0143c940451e55df0316b3aaf6c0a67 /perl-install
parent0321ff25b57d94626c9a5c2d02fbdb5448474fc6 (diff)
downloaddrakx-78e8097c578fb334c7440a5459fdb7aecc827feb.tar
drakx-78e8097c578fb334c7440a5459fdb7aecc827feb.tar.gz
drakx-78e8097c578fb334c7440a5459fdb7aecc827feb.tar.bz2
drakx-78e8097c578fb334c7440a5459fdb7aecc827feb.tar.xz
drakx-78e8097c578fb334c7440a5459fdb7aecc827feb.zip
- add/remove spaces to make perl_checker happy
- remove redundant parentheses - add some parentheses for clarity
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Xconfig/xfreeX.pm2
-rw-r--r--perl-install/any.pm2
-rw-r--r--perl-install/bootloader.pm8
-rw-r--r--perl-install/bootlook.pm12
-rw-r--r--perl-install/commands.pm18
-rw-r--r--perl-install/crypto.pm2
-rw-r--r--perl-install/detect_devices.pm13
-rw-r--r--perl-install/devices.pm2
-rw-r--r--perl-install/diskdrake/hd_gtk.pm2
-rw-r--r--perl-install/fs.pm4
-rw-r--r--perl-install/ftp.pm2
-rw-r--r--perl-install/harddrake/data.pm4
-rw-r--r--perl-install/harddrake/ui.pm4
-rw-r--r--perl-install/install_any.pm4
-rw-r--r--perl-install/install_steps_gtk.pm4
-rw-r--r--perl-install/install_steps_interactive.pm10
-rw-r--r--perl-install/interactive/gtk.pm2
-rw-r--r--perl-install/interactive/newt.pm2
-rw-r--r--perl-install/interactive/stdio.pm4
-rw-r--r--perl-install/my_gtk.pm6
-rw-r--r--perl-install/network/network.pm6
-rw-r--r--perl-install/network/smb.pm2
-rw-r--r--perl-install/network/tools.pm4
-rw-r--r--perl-install/partition_table/dos.pm2
-rw-r--r--perl-install/partition_table/mac.pm2
-rw-r--r--perl-install/pkgs.pm2
-rw-r--r--perl-install/printer/cups.pm4
-rw-r--r--perl-install/printer/detect.pm16
-rw-r--r--perl-install/printer/gimp.pm9
-rw-r--r--perl-install/printer/main.pm85
-rw-r--r--perl-install/printer/office.pm17
-rw-r--r--perl-install/printer/printerdrake.pm505
-rw-r--r--perl-install/resize_fat/dir_entry.pm2
-rw-r--r--perl-install/resize_fat/main.pm4
-rw-r--r--perl-install/run_program.pm2
-rwxr-xr-xperl-install/scanner.pm2
-rw-r--r--perl-install/steps.pm2
-rw-r--r--perl-install/swap.pm8
-rw-r--r--perl-install/ugtk.pm4
-rw-r--r--perl-install/unused/scsi.pm2
40 files changed, 387 insertions, 400 deletions
diff --git a/perl-install/Xconfig/xfreeX.pm b/perl-install/Xconfig/xfreeX.pm
index ca2f91423..5853342f9 100644
--- a/perl-install/Xconfig/xfreeX.pm
+++ b/perl-install/Xconfig/xfreeX.pm
@@ -284,7 +284,7 @@ sub add_Section {
}
sub remove_Section {
my ($raw_X, $Section, $when) = @_;
- @$raw_X = grep { $_->{name} ne $Section || ($when && $when->($_->{l})) } @$raw_X;
+ @$raw_X = grep { $_->{name} ne $Section || $when && $when->($_->{l}) } @$raw_X;
$raw_X;
}
sub get_Sections {
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 9fa757230..e183f46f1 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -128,7 +128,7 @@ sub setupBootloader {
$boot : fsedit::get_root($fstab, 'boot')->{device});
}
} else {
- $in->set_help(arch() =~ /sparc/ ? "setupSILOGeneral" : arch() =~ /ppc/ ? 'setupYabootGeneral' :"setupBootloader") unless $::isStandalone; #- TO MERGE ?
+ $in->set_help(arch() =~ /sparc/ ? "setupSILOGeneral" : arch() =~ /ppc/ ? 'setupYabootGeneral' : "setupBootloader") unless $::isStandalone; #- TO MERGE ?
my @silo_install_lang = (N("First sector of drive (MBR)"), N("First sector of boot partition"));
my $silo_install_lang = $silo_install_lang[$b->{use_partition}];
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index e13f250aa..81737f4c8 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -631,7 +631,7 @@ sub install_yaboot {
if ($_->{type} eq "image") {
my $of_dev = '';
- if (($boot !~ /$_->{root}/) && $boot) {
+ if ($boot !~ /$_->{root}/ && $boot) {
$of_dev = get_of_dev($boot);
print F "$_->{type}=$of_dev," . substr($_->{kernel_or_dev}, 5);
} else {
@@ -640,7 +640,7 @@ sub install_yaboot {
}
print F "\tlabel=", substr($_->{label}, 0, 15); #- lilo doesn't handle more than 15 char long labels
print F "\troot=$_->{root}";
- if (($boot !~ /$_->{root}/) && $boot) {
+ if ($boot !~ /$_->{root}/ && $boot) {
print F "\tinitrd=$of_dev," . substr($_->{initrd}, 5) if $_->{initrd};
} else {
print F "\tinitrd=$of_dev,$_->{initrd}" if $_->{initrd};
@@ -732,8 +732,8 @@ sub install_silo {
}
log::l("Installing boot loader...");
$::testing and return;
- run_program::rooted($::prefix, "silo", "2>", "/tmp/.error", $silo->{use_partition} ? ("-t") : ()) or
- run_program::rooted_or_die($::prefix, "silo", "2>", "/tmp/.error", "-p", "2", $silo->{use_partition} ? ("-t") : ());
+ run_program::rooted($::prefix, "silo", "2>", "/tmp/.error", $silo->{use_partition} ? "-t" : ()) or
+ run_program::rooted_or_die($::prefix, "silo", "2>", "/tmp/.error", "-p", "2", $silo->{use_partition} ? "-t" : ());
unlink "$::prefix/tmp/.error";
#- try writing in the prom.
diff --git a/perl-install/bootlook.pm b/perl-install/bootlook.pm
index 2eba6b460..58cd29cf7 100644
--- a/perl-install/bootlook.pm
+++ b/perl-install/bootlook.pm
@@ -117,8 +117,8 @@ if (member( $cur_res, qw( 785 788 791 794))) {
#- and check that lilo is the correct loader
$no_bootsplash ||= chomp_(`detectloader -q`) ne 'LILO';
my @thms;
-my @lilo_thms = (($themes{'default'}) ?() :qw(default));
-my @boot_thms = (($themes{'default'}) ?() :qw(default));
+my @lilo_thms = ($themes{'default'} ? () : qw(default));
+my @boot_thms = ($themes{'default'} ? () : qw(default));
chdir($themes{'path'}); #- we must change directory for correct @thms assignement
foreach (all('.')) {
if (-d $themes{'path'} . $_ && m/^[^.]/) {
@@ -156,8 +156,8 @@ $B_create->signal_connect(clicked => sub {
$combo{'thms'}->entry->signal_connect(changed => sub {
my $thm_txt = $combo{'thms'}->entry->get_text();
- $combo{'lilo'}->entry->set_text(member($thm_txt, @lilo_thms) ? $thm_txt : ($themes{'default'} || 'default'));
- $combo{'boot'}->entry->set_text(member($thm_txt, @boot_thms) ? $thm_txt : ($themes{'default'} || 'default'));
+ $combo{'lilo'}->entry->set_text(member($thm_txt, @lilo_thms) ? $thm_txt : $themes{'default'} || 'default');
+ $combo{'boot'}->entry->set_text(member($thm_txt, @boot_thms) ? $thm_txt : $themes{'default'} || 'default');
});
@@ -376,7 +376,7 @@ sub parse_etc_passwd {
do {
@user_info = getpwent();
($uname, $uid) = @user_info[0,2];
- push (@usernames, $uname) if ($uid > 500) and !($uname eq "nobody");
+ push (@usernames, $uname) if $uid > 500 and !($uname eq "nobody");
} while @user_info;
}
@@ -408,7 +408,7 @@ sub isXlaunched {
}
sub updateInit {
- my $runlevel = ($x_mode) ? 5 : 3;
+ my $runlevel = $x_mode ? 5 : 3;
substInFile { s/^id:\d:initdefault:\s*$/id:$runlevel:initdefault:\n/ } "/etc/inittab";
}
diff --git a/perl-install/commands.pm b/perl-install/commands.pm
index f871cf6ea..f5cc2f44c 100644
--- a/perl-install/commands.pm
+++ b/perl-install/commands.pm
@@ -54,7 +54,7 @@ sub grep_ {
@_ == 0 || $h and die "usage: grep <regexp> [files...]\n";
my $r = shift;
$r = qr/$r/i if $i;
- @ARGV = @_; (/$r/ ? $v || print : $v && print) while <>;
+ @ARGV = @_; (/$r/ xor $v) and print while <>;
}
sub tr_ {
@@ -193,11 +193,11 @@ sub rights {
if (vec(pack("S", $_[0]), $i, 1)) {
my ($val, $place) = $i >= 9 ? @{$rights[$i]} : ($rights[$i], $i);
my $old = \substr($r, 8 - $place, 1);
- $$old = ($$old eq '-' && $i >= 9) ? uc $val : $val;
+ $$old = $$old eq '-' && $i >= 9 ? uc $val : $val;
}
}
my @types = split //, "_pc_d_b_-_l_s";
- $types[$_[0] >> 12 & 0xf] . $r;
+ $types[($_[0] >> 12) & 0xf] . $r;
}
sub displaySize {
@@ -268,14 +268,14 @@ sub dd {
$h{$1} = $2;
}
local (*IF, *OF); my ($tmp, $nb, $read);
- ref $h{if} eq 'GLOB' ? *IF = $h{if} : sysopen(IF, $h{if}, 0) || die "error: can't open file $h{if}\n";
- ref $h{of} eq 'GLOB' ? *OF = $h{of} : sysopen(OF, $h{of}, 0x41) || die "error: can't open file $h{of}\n";
+ ref $h{if} eq 'GLOB' ? (*IF = $h{if}) : sysopen(IF, $h{if}, 0) || die "error: can't open file $h{if}\n";
+ ref $h{of} eq 'GLOB' ? (*OF = $h{of}) : sysopen(OF, $h{of}, 0x41) || die "error: can't open file $h{of}\n";
$h{bs} = removeXiBSuffix($h{bs});
for ($nb = 0; !$h{count} || $nb < $h{count}; $nb++) {
printf "\r%02.1d%%", 100 * $nb / $h{count} if $h{count} && $percent;
- $read = sysread(IF, $tmp, $h{bs}) or $h{count} ? die "error: can't read block $nb\n" : last;
+ $read = sysread(IF, $tmp, $h{bs}) or ($h{count} ? die "error: can't read block $nb\n" : last);
syswrite(OF, $tmp) or die "error: can't write block $nb\n";
$read < $h{bs} and $read = 1, last;
}
@@ -473,9 +473,9 @@ $dev, $size, $used, $free, $use, $mntpoint
$use = int(100 * ($size - $free) / $size);
$used = $size - $free;
if ($h) {
- $used = int ($used / 1024) . "M";
- $size = int ($size / 1024) . "M";
- $free = int ($free / 1024) . "M";
+ $used = int($used / 1024 . "M");
+ $size = int($size / 1024 . "M");
+ $free = int($free / 1024 . "M");
}
write DF if $size;
}
diff --git a/perl-install/crypto.pm b/perl-install/crypto.pm
index eae03336d..c44723e14 100644
--- a/perl-install/crypto.pm
+++ b/perl-install/crypto.pm
@@ -44,7 +44,7 @@ use ftp;
%mirrors = ();
-sub mirror2text { $mirrors{$_[0]} && ($mirrors{$_[0]}[0] . '|' . $_[0]) }
+sub mirror2text { $mirrors{$_[0]} && $mirrors{$_[0]}[0] . '|' . $_[0] }
sub mirrors {
unless (keys %mirrors) {
#- contact the following URL to retrieve list of mirror.
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 3ad4c31b6..23a867c2f 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -286,7 +286,7 @@ sub getIDE() {
my $type = ${{ disk => 'hd', cdrom => 'cdrom', tape => 'tape', floppy => 'fd' }}{$t} or next;
my $info = chomp_(cat_("$d/model")) || "(none)";
- my $num = ord (($d =~ /(.)$/)[0]) - ord 'a';
+ my $num = ord(($d =~ /(.)$/)[0]) - ord 'a';
my ($vendor, $model) = map {
if_($info =~ /^$_(-|\s)*(.*)/, $eide_hds{$_}, $2);
} keys %eide_hds;
@@ -640,23 +640,20 @@ sub whatUsbport() {
# Extract the printer data from the ID string
my ($manufacturer, $model, $serialnumber, $description) =
("", "", "", "");
- if (($idstr =~ /MFG:([^;]+);/) ||
- ($idstr =~ /MANUFACTURER:([^;]+);/)) {
+ if ($idstr =~ /MFG:([^;]+);/ || $idstr =~ /MANUFACTURER:([^;]+);/) {
$manufacturer = $1;
$manufacturer =~ s/Hewlett[-\s_]Packard/HP/;
$manufacturer =~ s/HEWLETT[-\s_]PACKARD/HP/;
}
# For HP's multi-function devices the real model name is in the "SKU"
# field. So use this field with priority for $model when it exists.
- if (($idstr =~ /MDL:([^;]+);/) ||
- ($idstr =~ /MODEL:([^;]+);/)) {
+ if ($idstr =~ /MDL:([^;]+);/ || $idstr =~ /MODEL:([^;]+);/) {
$model ||= $1;
}
if ($idstr =~ /SKU:([^;]+);/) {
$model = $1;
}
- if (($idstr =~ /DES:([^;]+);/) ||
- ($idstr =~ /DESCRIPTION:([^;]+);/)) {
+ if ($idstr =~ /DES:([^;]+);/ || $idstr =~ /DESCRIPTION:([^;]+);/) {
$description = $1;
$description =~ s/Hewlett[-\s_]Packard/HP/;
$description =~ s/HEWLETT[-\s_]PACKARD/HP/;
@@ -665,7 +662,7 @@ sub whatUsbport() {
$serialnumber = $1;
}
# Was there a manufacturer and a model in the string?
- if (($manufacturer eq "") || ($model eq "")) {
+ if ($manufacturer eq "" || $model eq "") {
next;
}
# No description field? Make one out of manufacturer and model.
diff --git a/perl-install/devices.pm b/perl-install/devices.pm
index 32c52904c..20e5c157b 100644
--- a/perl-install/devices.pm
+++ b/perl-install/devices.pm
@@ -27,7 +27,7 @@ sub size($) {
for ($high = 1; $high > 0 && &$valid_offset($high); $high *= 2) { $low = $high }
while ($low < $high - 1) {
- $mid = int ($low + $high) / 2;
+ $mid = int(($low + $high) / 2);
&$valid_offset($mid) ? $low : $high = $mid;
}
$low + 1;
diff --git a/perl-install/diskdrake/hd_gtk.pm b/perl-install/diskdrake/hd_gtk.pm
index f8852466c..bbbcc6bdc 100644
--- a/perl-install/diskdrake/hd_gtk.pm
+++ b/perl-install/diskdrake/hd_gtk.pm
@@ -95,7 +95,7 @@ sub main {
if $::isStandalone;
$in->ask_warn('',
N("If you plan to use aboot, be carefull to leave a free space (2048 sectors is enough)
-at the beginning of the disk")) if (arch() eq 'alpha') and !$::isEmbedded;
+at the beginning of the disk")) if arch() eq 'alpha' and !$::isEmbedded;
$w->main;
}
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 0c07e5d9a..f60807af0 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -396,8 +396,8 @@ sub mount_options_help {
my $prev_tp = $tp;
$tp = /^\.(TP|RE)/;
my ($s) = /^\.B (.*)/;
- if ($prev_tp && $s eq '\-o' .. /X^/) {
- if (my $v = $prev_tp && $s =~ /^[a-z]/i .. $tp) {
+ if (($prev_tp && $s eq '\-o') .. /X^/) {
+ if (my $v = ($prev_tp && $s =~ /^[a-z]/i) .. $tp) {
if ($v == 1) {
$s = $short{$s} || $s;
$option = exists $help{$s} && !$help{$s} ? $s : '';
diff --git a/perl-install/ftp.pm b/perl-install/ftp.pm
index f9a046e2d..3123edc34 100644
--- a/perl-install/ftp.pm
+++ b/perl-install/ftp.pm