diff options
Diffstat (limited to 'perl-install')
50 files changed, 350 insertions, 355 deletions
diff --git a/perl-install/Xconfig/card.pm b/perl-install/Xconfig/card.pm index 5e397e65d..3d2f472eb 100644 --- a/perl-install/Xconfig/card.pm +++ b/perl-install/Xconfig/card.pm @@ -457,7 +457,7 @@ NOTE THIS IS EXPERIMENTAL SUPPORT AND MAY FREEZE YOUR COMPUTER.", $xf4_ver), $::force_xf4 = 0; $card->{server} = "Xpmac"; $card->{prefer_xf3} = 1; - }}; + } }; } @choices; } diff --git a/perl-install/Xconfig/monitor.pm b/perl-install/Xconfig/monitor.pm index dedac149c..135e1865f 100644 --- a/perl-install/Xconfig/monitor.pm +++ b/perl-install/Xconfig/monitor.pm @@ -73,7 +73,7 @@ sub choose { configure_automatic($monitor, $monitors) and $auto and return 1; - my %h_monitors = map { ; "$_->{VendorName}|$_->{ModelName}" => $_ } @$monitors; + my %h_monitors = map {; "$_->{VendorName}|$_->{ModelName}" => $_ } @$monitors; ask_monitor: my $merged_name = do { diff --git a/perl-install/Xconfig/test.pm b/perl-install/Xconfig/test.pm index 38d9f9377..8065eaacb 100644 --- a/perl-install/Xconfig/test.pm +++ b/perl-install/Xconfig/test.pm @@ -73,7 +73,7 @@ sub test { i: while (<F>) { if (Xconfig::card::using_xf4($card)) { if (/^\(EE\)/ && !/Disabling/ || /^Fatal\b/) { - my @msg = !/error/ && $_ ; + my @msg = !/error/ && $_; local $_; while (<F>) { /reporting a problem/ and last; @@ -84,7 +84,7 @@ sub test { } } else { if (/\b(error|not supported)\b/i) { - my @msg = !/error/ && $_ ; + my @msg = !/error/ && $_; local $_; while (<F>) { /not fatal/ and last i; @@ -102,7 +102,7 @@ sub test { local *F; open F, "|perl 2>/dev/null"; print F "use lib qw(", join(' ', @INC), ");\n"; - print F q{ + print F q( BEGIN { $::no_ugtk_init = 1 } require lang; require my_gtk; @@ -110,7 +110,7 @@ sub test { use interactive::gtk; use run_program; - $::prefix = "} . $::prefix . q{"; + $::prefix = ") . $::prefix . q("; $::isStandalone = 1; lang::bindtextdomain(); @@ -136,7 +136,7 @@ sub test { my $in = interactive::gtk->new; $in->exit($in->ask_yesorno('', [ N("Is this the correct setting?"), $text ], 0) ? 0 : 222); - }; + ); my $rc = close F; my $err = $?; diff --git a/perl-install/any.pm b/perl-install/any.pm index 8403d39e7..9fa757230 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -124,8 +124,8 @@ sub setupBootloader { my $onmbr = "/dev/$boot" eq $b->{boot}; $b->{boot} = "/dev/" . ($in->ask_from_list_(N("LILO/grub Installation"), N("Where do you want to install the bootloader?"), - \@l, $l[!$onmbr]) eq $l[0] - ? $boot : fsedit::get_root($fstab, 'boot')->{device}); + \@l, $l[!$onmbr]) eq $l[0] ? + $boot : fsedit::get_root($fstab, 'boot')->{device}); } } else { $in->set_help(arch() =~ /sparc/ ? "setupSILOGeneral" : arch() =~ /ppc/ ? 'setupYabootGeneral' :"setupBootloader") unless $::isStandalone; #- TO MERGE ? @@ -190,12 +190,12 @@ sub setupBootloader { $in->ask_from('', N("Bootloader main options"), [ { label => N("Bootloader to use"), val => \$bootloader, list => [ keys(%bootloaders) ], format => \&translate }, { label => N("Init Message"), val => \$b->{'init-message'} }, - { label => N("Boot device"), val => \$b->{boot}, list => [ map { "/dev/$_" } (map { $_->{device} } (grep { isAppleBootstrap($_) } @$fstab))], not_edit => !$::expert }, + { label => N("Boot device"), val => \$b->{boot}, list => [ map { "/dev/$_" } (map { $_->{device} } (grep { isAppleBootstrap($_) } @$fstab)) ], not_edit => !$::expert }, { label => N("Open Firmware Delay"), val => \$b->{delay} }, { label => N("Kernel Boot Timeout"), val => \$b->{timeout} }, { label => N("Enable CD Boot?"), val => \$b->{enablecdboot}, type => "bool" }, { label => N("Enable OF Boot?"), val => \$b->{enableofboot}, type => "bool" }, - { label => N("Default OS?"), val=> \$b->{defaultos}, list => [ 'linux', 'macos', 'macosx', 'darwin' ] }, + { label => N("Default OS?"), val => \$b->{defaultos}, list => [ 'linux', 'macos', 'macosx', 'darwin' ] }, ]) or return 0; } @@ -314,7 +314,7 @@ if (arch() !~ /ppc/) { unshift @l, { label => N("Label"), val => \$e->{label}, list => ['macos', 'macosx', 'darwin'] }; if ($e->{type} eq "image") { @l = ({ label => N("Label"), val => \$e->{label} }, - $::expert ? @l[1..4] : (@l[1..2], { label => N("Append"), val => \$e->{append} }) , + $::expert ? @l[1..4] : (@l[1..2], { label => N("Append"), val => \$e->{append} }), if_($::expert, { label => N("Initrd-size"), val => \$e->{initrdsize}, list => [ '', '4096', '8192', '16384', '24576' ] }), if_($::expert, $l[5]), { label => N("NoVideo"), val => \$e->{novideo}, type => 'bool' }, @@ -1100,7 +1100,7 @@ connections from many clients. Note: if your machine is only a client on the Int { label => N("Security level"), val => $security, list => [ sort keys %l ], format => sub { $l{$_} } }, if_($in->do_pkgs->is_installed('libsafe') && arch() =~ /^i.86/, { label => N("Use libsafe for servers"), val => $libsafe, type => 'bool', text => - N("A library which defends against buffer overflow and format string attacks.") } ), + N("A library which defends against buffer overflow and format string attacks.") }), { label => N("Security Administrator (login or email)"), val => $email, }, ], ); diff --git a/perl-install/bootlook.pm b/perl-install/bootlook.pm index b49cfe924..04c752ee7 100644 --- a/perl-install/bootlook.pm +++ b/perl-install/bootlook.pm @@ -76,8 +76,8 @@ $window->border_width(2); ### menus definition # the menus are not shown # but they provides shiny shortcut like C-q -my @menu_items = ( { path => N("/_File"), type => '<Branch>' }, - { path => N("/File/_Quit"), accelerator => N("<control>Q"), callback => sub { $::isEmbedded ? kill('USR1', $::CCPID) : Gtk->exit(0) } }, +my @menu_items = ({ path => N("/_File"), type => '<Branch>' }, + { path => N("/File/_Quit"), accelerator => N("<control>Q"), callback => sub { $::isEmbedded ? kill('USR1', $::CCPID) : Gtk->exit(0) } }, ); my $menubar = ugtk::create_factory_menu($window, @menu_items); ######### menus end @@ -91,24 +91,24 @@ $desktop_combo->entry->set_text($auto_mode{desktop}) if ($auto_mode{desktop}); my $a_c_button = new Gtk::RadioButton (N("NewStyle Categorizing Monitor")); my $a_h_button = new Gtk::RadioButton N("NewStyle Monitor"), $a_c_button; my $a_v_button = new Gtk::RadioButton N("Traditional Monitor"), $a_c_button; -my $a_g_button = new Gtk::RadioButton N("Traditional Gtk+ Monitor"),$a_c_button ; +my $a_g_button = new Gtk::RadioButton N("Traditional Gtk+ Monitor"),$a_c_button; my $a_button = new Gtk::CheckButton(N("Launch Aurora at boot time")); my $a_box = new Gtk::VBox(0, 0); my $x_box = new Gtk::VBox(0, 0); my $disp_mode = arch() =~ /ppc/ ? N("Yaboot mode") : N("Lilo/grub mode"); -my %themes = ('path'=>'/usr/share/bootsplash/themes/', - 'default'=>'Mandrake', - 'def_thmb'=>'/usr/share/libDrakX/pixmaps/nosplash_thumb.png', - 'lilo'=>{'file'=>'/lilo/message', - 'thumb'=>'/lilo/thumb.png'} , - 'boot'=>{'path'=>'/images/', +my %themes = ('path' =>'/usr/share/bootsplash/themes/', + 'default' =>'Mandrake', + 'def_thmb' =>'/usr/share/libDrakX/pixmaps/nosplash_thumb.png', + 'lilo' => {'file' =>'/lilo/message', + 'thumb' =>'/lilo/thumb.png' }, + 'boot' => {'path' =>'/images/', #'thumb'=>'/images/thumb.png', }, ); my ($cur_res) = cat_('/etc/lilo.conf') =~ /vga=(.*)/; #- verify that current resolution is ok -if ( member( $cur_res, qw( 785 788 791 794) ) ) { +if ( member( $cur_res, qw( 785 788 791 794))) { ($cur_res) = $bootloader::vga_modes{$cur_res} =~ /^([0-9x]+).*?$/; } else { $no_bootsplash = 1; #- we can't select any theme we're not in Framebuffer mode :-/ @@ -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/^[^.]/) { @@ -128,7 +128,7 @@ foreach (all('.')) { } # $_ eq $themes{'defaut'} and $default = $themes{'defaut'}; } -my %combo = ('thms'=> '','lilo'=> '','boot'=> ''); +my %combo = ('thms' => '','lilo' => '','boot' => ''); foreach (keys (%combo)) { $combo{$_} = new Gtk::Combo; $combo{$_}->set_value_in_list(1, 0); @@ -140,7 +140,7 @@ $combo{'boot'}->set_popdown_strings(@boot_thms) if(! $no_bootsplash); my $lilo_pixbuf; my $lilo_pic = gtkpng($themes{'def_thmb'}); -my $boot_pixbuf ; +my $boot_pixbuf; my $boot_pic = gtkpng($themes{'def_thmb'}); my $thm_button = new Gtk::Button(N("Install themes")); @@ -149,8 +149,8 @@ my $B_create = new Gtk::Button(N("Create new theme")); my $keep_logo = 1; $logo_thm->set_active(1); $logo_thm->signal_connect(clicked => sub { invbool(\$keep_logo) }); -$B_create->signal_connect(clicked => sub{ - $::isEmbedded ? (kill('USR1', $::CCPID) and system('/usr/sbin/draksplash ')) : system('/usr/sbin/draksplash ') ; +$B_create->signal_connect(clicked => sub { + $::isEmbedded ? (kill('USR1', $::CCPID) and system('/usr/sbin/draksplash ')) : system('/usr/sbin/draksplash '); }); #- ******** action to take on changing combos values @@ -190,10 +190,10 @@ sub { if (-f $themes{'path'}.$combo{'lilo'}->entry->get_text() . $themes{'lilo'}{'file'}) { use MDK::Common::File; standalone::explanations(N("Backup %s to %s.old",$lilomsg,$lilomsg)); - cp_af($lilomsg,"/boot/message-graphic.old") ; + cp_af($lilomsg,"/boot/message-graphic.old"); #can't use this anymore or $in->ask_warn(N("Error"), N("unable to backup lilo message")); standalone::explanations(N("Copy %s to %s",$themes{'path'} . $combo{'lilo'}->entry->get_text() . $themes{'lilo'}{'file'},$lilomsg)); - cp_af($themes{'path'} . $combo{'lilo'}->entry->get_text() . $themes{'lilo'}{'file'}, $lilomsg) ; + cp_af($themes{'path'} . $combo{'lilo'}->entry->get_text() . $themes{'lilo'}{'file'}, $lilomsg); #can't use this anymore or $in->ask_warn(N("Error"), N("can't change lilo message")); } else { $error = 1; @@ -238,7 +238,7 @@ LOGO_CONSOLE=" . ($keep_logo ? 'yes' : 'no') . "\n"; #here is mkinitrd time if (!$error) { foreach (map { if_(m|^initrd-(.*)\.img|, $1) } all('/boot')){ - if ( system("mkinitrd -f /boot/initrd-$_.img $_" ) ) { + if ( system("mkinitrd -f /boot/initrd-$_.img $_")) { $in->ask_warn(N("Error"), N("Can't launch mkinitrd -f /boot/initrd-%s.img %s.", $_,$_)); $error = 1; @@ -273,7 +273,7 @@ Click on Configure to launch the setup wizard.", $lilogrub), ), #Splash Selector - gtkadd(my $thm_frame = new Gtk::Frame( N("Splash selection") ), + gtkadd(my $thm_frame = new Gtk::Frame( N("Splash selection")), gtkpack__(gtkset_border_width(new Gtk::HBox(0,5),5), gtkpack__(new Gtk::VBox(0,5), N("Themes"), @@ -340,7 +340,7 @@ Click on Configure to launch the setup wizard.", $lilogrub), ) ), gtkadd (gtkset_layout(new Gtk::HButtonBox,-end), - gtksignal_connect(new Gtk::Button(N("OK")), clicked => sub{ updateInit(); updateAutologin(); updateAurora(); $::isEmbedded ? kill('USR1',$::CCPID) : Gtk->exit(0) }), + gtksignal_connect(new Gtk::Button(N("OK")), clicked => sub { updateInit(); updateAutologin(); updateAurora(); $::isEmbedded ? kill('USR1',$::CCPID) : Gtk->exit(0) }), gtksignal_connect(new Gtk::Button(N("Cancel")), clicked => sub { $::isEmbedded ? kill('USR1', $::CCPID) : Gtk->exit(0) }) ) ) @@ -370,8 +370,7 @@ Gtk->exit(0); # get user names to put in combo #------------------------------------------------------------- -sub parse_etc_passwd -{ +sub parse_etc_passwd { my ($uname, $uid); setpwent(); do { @@ -381,8 +380,7 @@ sub parse_etc_passwd } while (@user_info); } -sub get_wm -{ +sub get_wm { @winm = (split (' ', `/usr/sbin/chksession -l`)); } diff --git a/perl-install/commands.pm b/perl-install/commands.pm index e05c0c2db..6d478c283 100644 --- a/perl-install/commands.pm +++ b/perl-install/commands.pm @@ -41,11 +41,13 @@ sub getopts { sub true { exit 0 } sub false { exit 1 } sub cat { @ARGV = @_; print while <> } -sub which { ARG: foreach (@_) { foreach my $c (split /:/, $ENV{PATH}) { -x "$c/$_" and print("$c/$_\n"), next ARG }}} sub dirname_ { print dirname(@_), "\n" } sub basename_ { print basename(@_), "\n" } sub rmdir_ { foreach (@_) { rmdir $_ or die "rmdir: can't remove $_\n" } } sub lsmod { print "Module Size Used by\n"; cat("/proc/modules") } +sub which { + ARG: foreach (@_) { foreach my $c (split /:/, $ENV{PATH}) { -x "$c/$_" and print("$c/$_\n"), next ARG }} +} sub grep_ { my ($h, $v, $i) = getopts(\@_, qw(hvi)); @@ -102,7 +104,7 @@ sub mknod { eval { devices::make($_[0]) }; $@ and die "mknod: failed to create $_[0]\n"; } elsif (@_ == 4) { require c; - my $mode = $ {{"b" => c::S_IFBLK(), "c" => c::S_IFCHR()}}{$_[1]} or die "unknown node type $_[1]\n"; + my $mode = ${{ "b" => c::S_IFBLK(), "c" => c::S_IFCHR() }}{$_[1]} or die "unknown node type $_[1]\n"; syscall_('mknod', my $a = $_[0], $mode | 0600, makedev($_[2], $_[3])) or die "mknod failed: $!\n"; } else { die "usage: mknod <path> [b|c] <major> <minor> or mknod <path>\n" } } @@ -204,7 +206,7 @@ sub displaySize { } sub ls { - my ($l , $h) = getopts(\@_, qw(lh)); + my ($l, $h) = getopts(\@_, qw(lh)); $h and die "usage: ls [-l] <files...>\n"; @_ or @_ = '.'; @@ -309,7 +311,7 @@ sub strings { while (<>) { while (/[$printable_chars]{$n,}/og) { printf "%07d ", ($l + length $') if $o; - print "$&\n" ; + print "$&\n"; } $l += length; } continue { $l = 0 if eof } diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index ca4bc3240..2abe7621d 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -237,7 +237,7 @@ sub getSCSI() { # (see linux/include/scsi/scsi.h and sans-find-scanner.1) each_index { put_in_hash $_, { media_type => 'scanner' }; - } grep { $_->{raw_type} =~ /Scanner/ || $_->{raw_type} =~ /Processor /} @l; + } grep { $_->{raw_type} =~ /Scanner/ || $_->{raw_type} =~ /Processor / } @l; get_devfs_devices(@l); get_sys_cdrom_info(@l); @@ -283,7 +283,7 @@ sub getIDE() { foreach my $d (sort @{[glob_('/proc/ide/hd*')]}) { cat_("$d/driver") =~ /ide-scsi/ and next; #- already appears in /proc/scsi/scsi my $t = chomp_(cat_("$d/media")); - my $type = $ {{disk => 'hd', cdrom => 'cdrom', tape => 'tape', floppy => 'fd'}}{$t} or next; + 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'; @@ -679,7 +679,7 @@ sub whatUsbport() { MANUFACTURER => $manufacturer, DESCRIPTION => $description, SERIALNUMBER => $serialnumber - }}; + } }; } @res; } @@ -691,7 +691,7 @@ sub whatUsbport() { #-COMMAND SET:MLC,PCL,PJL; sub whatPrinter { my @res = (whatParport(), whatUsbport()); - grep { $_->{val}{CLASS} eq "PRINTER"} @res; + grep { $_->{val}{CLASS} eq "PRINTER" } @res; } sub whatPrinterPort() { diff --git a/perl-install/devices.pm b/perl-install/devices.pm index d029dd299..6ce3a7e86 100644 --- a/perl-install/devices.pm +++ b/perl-install/devices.pm @@ -79,7 +79,7 @@ sub entry { } elsif (/^hd(.)(\d{0,2})/) { $type = c::S_IFBLK(); ($major, $minor) = - @{ $ {{'a' => [3, 0], 'b' => [3, 64], + @{ ${{'a' => [3, 0], 'b' => [3, 64], 'c' => [22,0], 'd' => [22,64], 'e' => [33,0], 'f' => [33,64], 'g' => [34,0], 'h' => [34,64], @@ -128,27 +128,27 @@ sub entry { } unless ($type) { ($type, $major, $minor) = - @{ ${{"aztcd" => [ c::S_IFBLK(), 29, 0 ], - "bpcd" => [ c::S_IFBLK(), 41, 0 ], - "cdu31a" => [ c::S_IFBLK(), 15, 0 ], - "cdu535" => [ c::S_IFBLK(), 24, 0 ], - "cm206cd" => [ c::S_IFBLK(), 32, 0 ], - "gscd" => [ c::S_IFBLK(), 16, 0 ], - "mcd" => [ c::S_IFBLK(), 23, 0 ], - "mcdx" => [ c::S_IFBLK(), 20, 0 ], - "mem" => [ c::S_IFCHR(), 1, 1 ], - "optcd" => [ c::S_IFBLK(), 17, 0 ], - "kbd" => [ c::S_IFCHR(), 11, 0 ], - "psaux" => [ c::S_IFCHR(), 10, 1 ], - "atibm" => [ c::S_IFCHR(), 10, 3 ], - "random" => [ c::S_IFCHR(), 1, 8 ], - "sbpcd" => [ c::S_IFBLK(), 25, 0 ], - "sjcd" => [ c::S_IFBLK(), 18, 0 ], - "tty" => [ c::S_IFCHR(), 5, 0 ], - "usbmouse"=> [ c::S_IFCHR(), 13, 63], #- aka /dev/input/mice - "adbmouse"=> [ c::S_IFCHR(), 10, 10], #- PPC - "zero" => [ c::S_IFCHR(), 1, 5 ], - "null" => [ c::S_IFCHR(), 1, 3 ], + @{ ${{"aztcd" => [ c::S_IFBLK(), 29, 0 ], + "bpcd" => [ c::S_IFBLK(), 41, 0 ], + "cdu31a" => [ c::S_IFBLK(), 15, 0 ], + "cdu535" => [ c::S_IFBLK(), 24, 0 ], + "cm206cd" => [ c::S_IFBLK(), 32, 0 ], + "gscd" => [ c::S_IFBLK(), 16, 0 ], + "mcd" => [ c::S_IFBLK(), 23, 0 ], + "mcdx" => [ c::S_IFBLK(), 20, 0 ], + "mem" => [ c::S_IFCHR(), 1, 1 ], + "optcd" => [ c::S_IFBLK(), 17, 0 ], + "kbd" => [ c::S_IFCHR(), 11, 0 ], + "psaux" => [ c::S_IFCHR(), 10, 1 ], + "atibm" => [ c::S_IFCHR(), 10, 3 ], + "random" => [ c::S_IFCHR(), 1, 8 ], + "sbpcd" => [ c::S_IFBLK(), 25, 0 ], + "sjcd" => [ c::S_IFBLK(), 18, 0 ], + "tty" => [ c::S_IFCHR(), 5, 0 ], + "usbmouse" => [ c::S_IFCHR(), 13, 63], #- aka /dev/input/mice + "adbmouse" => [ c::S_IFCHR(), 10, 10], #- PPC + "zero" => [ c::S_IFCHR(), 1, 5 ], + "null" => [ c::S_IFCHR(), 1, 3 ], }}{$_} or die "unknown device $_ (caller is " . join(":", caller()) . ")" }; } ($type, $major, $minor); diff --git a/perl-install/ftp.pm b/perl-install/ftp.pm index c84ce66a6..f9a046e2d 100644 --- a/perl-install/ftp.pm +++ b/perl-install/ftp.pm @@ -44,7 +44,7 @@ sub new { my @l = ($ftp, \ (my $retr = undef)); $hosts{"$host$prefix"} = \@l; @l; - }}; + } }; wantarray ? @l : $l[0]; } diff --git a/perl-install/harddrake/data.pm b/perl-install/harddrake/data.pm index 5dcf3e372..e4c2b8062 100644 --- a/perl-install/harddrake/data.pm +++ b/perl-install/harddrake/data.pm @@ -11,7 +11,7 @@ my @devices = detect_devices::probeall(1); # Update me each time you handle one more devices class (aka configurator) sub unknown { - grep { ($_->{media_type} !~ /tape|SERIAL_(USB|SMBUS)|Printer|DISPLAY|MULTIMEDIA_(VIDEO|AUDIO|OTHER)|STORAGE_(IDE|SCSI|OTHER)|BRIDGE|NETWORK/) && ($_->{driver} ne 'scanner') && $_->{type} ne 'network' && $_->{driver} !~ /Mouse:USB/} @devices; + grep { ($_->{media_type} !~ /tape|SERIAL_(USB|SMBUS)|Printer|DISPLAY|MULTIMEDIA_(VIDEO|AUDIO|OTHER)|STORAGE_(IDE|SCSI|OTHER)|BRIDGE|NETWORK/) && ($_->{driver} ne 'scanner') && $_->{type} ne 'network' && $_->{driver} !~ /Mouse:USB/ } @devices; } @@ -23,15 +23,15 @@ our @tree = ( ["FLOPPY","Floppy", "floppy.png", "",\&detect_devices::floppies, 0 ], ["HARDDISK","Disk", "harddisk.png", "$sbindir/diskdrake", \&detect_devices::hds, 1 ], - ["CDROM","CDROM", "cd.png", "", sub { grep { !(detect_devices::isBurner($_) || detect_devices::isDvdDrive($_)) } &detect_devices::cdroms } , 0 ], + ["CDROM","CDROM", "cd.png", "", sub { grep { !(detect_devices::isBurner($_) || detect_devices::isDvdDrive($_)) } &detect_devices::cdroms }, 0 ], ["BURNER","CD/DVD burners", "cd.png", "", \&detect_devices::burners(), 0 ], ["DVDROM","DVD-ROM", "cd.png", "", sub { grep { ! detect_devices::isBurner($_) } detect_devices::dvdroms() }, 0 ], ["TAPE","Tape", "tape.png", "", \&detect_devices::tapes, 0 ], ["VIDEO","Videocard", "video.png", "$sbindir/XFdrake", sub { grep { $_->{driver} =~ /^(Card|Server):/ || $_->{media_type} =~ 'DISPLAY_VGA' } @devices }, 1 ], - ["TV","Tvcard", "tv.png", "/usr/bin/XawTV", sub { grep { $_->{media_type} =~ 'MULTIMEDIA_VIDEO' && $_->{bus} eq 'PCI' } @devices}, 0 ], - ["MULTIMEDIA_OTHER","Other MultiMedia devices", "multimedia.png", "", sub { grep { $_->{media_type} =~ 'MULTIMEDIA_OTHER' } @devices}, 0 ], - ["AUDIO","Soundcard", "sound.png", "$sbindir/draksound", sub { grep { $_->{media_type} =~ 'MULTIMEDIA_AUDIO' } @devices}, 0 ], - ["WEBCAM","Webcam", "webcam.png", "", sub { grep { $_->{media_type} =~ 'MULTIMEDIA_VIDEO' && $_->{bus} ne 'PCI'} @devices }, 0 ], + ["TV","Tvcard", "tv.png", "/usr/bin/XawTV", sub { grep { $_->{media_type} =~ 'MULTIMEDIA_VIDEO' && $_->{bus} eq 'PCI' } @devices }, 0 ], + ["MULTIMEDIA_OTHER","Other MultiMedia devices", "multimedia.png", "", sub { grep { $_->{media_type} =~ 'MULTIMEDIA_OTHER' } @devices }, 0 ], + ["AUDIO","Soundcard", "sound.png", "$sbindir/draksound", sub { grep { $_->{media_type} =~ 'MULTIMEDIA_AUDIO' } @devices }, 0 ], + ["WEBCAM","Webcam", "webcam.png", "", sub { grep { $_->{media_type} =~ 'MULTIMEDIA_VIDEO' && $_->{bus} ne 'PCI' } @devices }, 0 ], ["CPU","Processors", "cpu.png", "", sub { detect_devices::getCPUs() }, 0 ], ["ETHERNET","Ethernetcard", "hw_network.png", "$sbindir/drakconnect", sub { #- generic NIC detection for USB seems broken (class, subclass, @@ -40,26 +40,26 @@ our @tree = my @usbnet = qw(CDCEther catc kaweth pegasus usbnet); # should be taken from detect_devices.pm or modules.pm. it's identical - grep { $_->{media_type} =~ /^NETWORK/ || member($_->{driver}, @usbnet) || $_->{type} eq 'network' } @devices}, 1 ], - ["MODEM","Modem", "modem.png", "", sub { detect_devices::getModem() } , 0 ], - ["BRIDGE","Bridge(s)", "memory.png", "", sub { grep { $_->{media_type} =~ 'BRIDGE' } @devices}, 0 ], - ["UNKNOWN","Unknown/Others", "unknown.png", "" , \&unknown, 0 ], + grep { $_->{media_type} =~ /^NETWORK/ || member($_->{driver}, @usbnet) || $_->{type} eq 'network' } @devices }, 1 ], + ["MODEM","Modem", "modem.png", "", sub { detect_devices::getModem() }, 0 ], + ["BRIDGE","Bridge(s)", "memory.png", "", sub { grep { $_->{media_type} =~ 'BRIDGE' } @devices }, 0 ], + ["UNKNOWN","Unknown/Others", "unknown.png", "", \&unknown, 0 ], ["PRINTER","Printer", "hw_printer.png", "$sbindir/printerdrake", sub { - require printerdrake; printerdrake::detect() } , 0 ], + require printerdrake; printerdrake::detect() }, 0 ], ["SCANNER","Scanner", "scanner.png", "$sbindir/scannerdrake", sub { require scanner; scanner::detect() }, 0 ], ["MOUSE","Mouse", "hw_mouse.png", "$sbindir/mousedrake", sub { require mouse; require modules; modules::mergein_conf('/etc/modules.conf') if -r '/etc/modules.conf'; - &mouse::detect() } , 1 ], + &mouse::detect() }, 1 ], ["JOYSTICK","Joystick", "joystick.png", "", sub {}, 0 ], - ["ATA_STORAGE","(E)IDE/ATA controllers", "ide_hd.png", "", sub { grep { $_->{media_type} =~ 'STORAGE_(IDE|OTHER)' } @devices}, 0 ], - ["SCSI_CONTROLLER","SCSI controllers", "scsi.png", "", sub { grep { $_->{media_type} =~ 'STORAGE_SCSI' } @devices}, 0 ], - ["USB_CONTROLLER","USB controllers", "usb.png", "", sub { grep { $_->{media_type} =~ 'SERIAL_USB' } @devices}, 0 ], - ["SMB_CONTROLLER","SMBus controllers", "usb.png", "", sub { grep { $_->{media_type} =~ 'SERIAL_SMBUS' } @devices}, 0 ], + ["ATA_STORAGE","(E)IDE/ATA controllers", "ide_hd.png", "", sub { grep { $_->{media_type} =~ 'STORAGE_(IDE|OTHER)' } @devices }, 0 ], + ["SCSI_CONTROLLER","SCSI controllers", "scsi.png", "", sub { grep { $_->{media_type} =~ 'STORAGE_SCSI' } @devices }, 0 ], + ["USB_CONTROLLER","USB controllers", "usb.png", "", sub { grep { $_->{media_type} =~ 'SERIAL_USB' } @devices }, 0 ], + ["SMB_CONTROLLER","SMBus controllers", "usb.png", "", sub { grep { $_->{media_type} =~ 'SERIAL_SMBUS' } @devices }, 0 ], ); diff --git a/perl-install/harddrake/sound.pm b/perl-install/harddrake/sound.pm index 48e8ffbff..15d7ad7df 100644 --- a/perl-install/harddrake/sound.pm +++ b/perl-install/harddrake/sound.pm @@ -178,7 +178,7 @@ sub switch { "$_[0] (". $des{$_[0]} . ')' }, allow_empty_list => 1 }, { - val => N("Help"), disabled => sub { }, + val => N("Help"), disabled => sub {}, clicked => sub { $in->ask_warn(N("Switching between ALSA and OSS help"), N("OSS (Open Sound System) was the first sound API. It's an OS independant sound API (it's available on most unices systems) but it's a very basic and limited API. @@ -213,8 +213,8 @@ The new \"%s\" driver'll only be used on next bootstrap.", $driver, $new_driver) N("The \"%s\" driver for your sound card is unlisted\n Please send the output of the \"lspcidrake -v\" command to <install at mandrakesoft dot com> -with subject: unlisted sound driver \"%s\"") - , $driver, $driver); +with subject: unlisted sound driver \"%s\""), + $driver, $driver); } } diff --git a/perl-install/harddrake/ui.pm b/perl-install/harddrake/ui.pm index 882f0bc1a..c4009e5e9 100644 --- a/perl-install/harddrake/ui.pm +++ b/perl-install/harddrake/ui.pm @@ -94,7 +94,7 @@ my @menu_items = if ($current_device) { $in->ask_warn(N("Harddrake help"), N("Description of the fields:\n\n") - . join("\n\n", map { if_($fields{$_}[0], "$fields{$_}[0]: $fields{$_}[1]")} sort keys %$current_device)) + . join("\n\n", map { if_($fields{$_}[0], "$fields{$_}[0]: $fields{$_}[1]") } sort keys %$current_device)) } else { $in->ask_warn(N("Select a device !"), N("Once you've selected a device, you'll be able to see explanations on fields displayed on the right frame (\"Information\")")) } @@ -106,7 +106,7 @@ my @menu_items = callback => sub { $in->ask_warn(N("About Harddrake"), join ("", N("This is HardDrake, a Mandrake hardware configuration tool.\nVersion:"), " $harddrake::data::version\n", - N("Author:"), " Thierry Vignaud <tvignaud\@mandrakesoft.com> \n\n" , + N("Author:"), " Thierry Vignaud <tvignaud\@mandrakesoft.com> \n\n", formatAlaTeX($license))); } } @@ -132,7 +132,7 @@ sub detect { if (exists $_->{bus} && $_->{bus} eq "PCI") { my $i = $_; $_->{bus_id} = join ':', map { if_($i->{$_} ne "65535", sprintf("%lx", $i->{$_})) } qw(vendor id subvendor subid); - $_->{bus_location} = join ':', map { sprintf("%lx", $i->{$_} ) } qw(pci_bus pci_device pci_function); + $_->{bus_location} = join ':', map { sprintf("%lx", $i->{$_}) } qw(pci_bus pci_device pci_function); } # split description into manufacturer/description ($_->{Vendor}, $_->{description}) = split(/\|/,$_->{description}) if exists $_->{description}; @@ -148,7 +148,7 @@ sub detect { } elsif ((exists $_->{id}) && ($_->{bus} ne 'PCI')) { # SCSI detection incoherency: my $i = $_; - $_->{bus_location} = join ':', map { sprintf("%lx", $i->{$_} ) } qw(bus id); + $_->{bus_location} = join ':', map { sprintf("%lx", $i->{$_}) } qw(bus id); } if ($Ident eq "AUDIO") { require harddrake::sound; @@ -249,7 +249,7 @@ sub new { if ($pid = fork()) { $sig_id = $statusbar->push($statusbar->get_context_id("id"), N("Running \"%s\" ...", $configurator)); } else { exec($configurator) or die "$configurator missing\n" } - }) ; + }); $config_button->show; } else { $text->backward_delete($text->get_point); # erase all previous text diff --git a/perl-install/harddrake/v4l.pm b/perl-install/harddrake/v4l.pm index 47cce15cf..2ec3f36d0 100644 --- a/perl-install/harddrake/v4l.pm +++ b/perl-install/harddrake/v4l.pm @@ -209,12 +209,12 @@ sub config { if ($in->ask_from("BTTV configuration", N("For most modern TV cards, the bttv module of the GNU/Linux kernel just auto-detect the rights parameters. If your card is misdetected, you can force the right tuner and card types here. Just select your tv card parameters if needed"), [ - { label => N("Card model:"), val => \$conf{card}, list => [keys %{$cards_lst->{$driver}}], type => 'combo', default => -1, sort =>1, separator => '|'}, - { label => N("Tuner type:"), val => \$conf{tuner}, list => [keys %tuners_lst], format => sub { $tuners_lst{$_[0]} }, sort => 1, separator => '|'}, - { label => N("Number of capture buffers:"), val => \$conf{gbuffers}, min=>2, max=>32, sort => 1, default => 0, type=>'range', advanced =>1, help => N("number of capture buffers for mmap'ed capture")}, + { label => N("Card model:"), val => \$conf{card}, list => [keys %{$cards_lst->{$driver}}], type => 'combo', default => -1, sort =>1, separator => '|' }, + { label => N("Tuner type:"), val => \$conf{tuner}, list => [keys %tuners_lst], format => sub { $tuners_lst{$_[0]} }, sort => 1, separator => '|' }, + { label => N("Number of capture buffers:"), val => \$conf{gbuffers}, min => 2, max => 32, sort => 1, default => 0, type => 'range', advanced => 1, help => N("number of capture buffers for mmap'ed capture") }, if_($driver eq 'bttv', - { label => N("PLL setting:"), val => \$conf{pll}, list => [keys %pll_lst], format => sub { $pll_lst{$_[0]} }, sort => 1, default => 0, advanced =>1}, - { label => N("Radio support:"), val => \$conf{radio}, type => "bool", text => N("enable radio support")}), + { label => N("PLL setting:"), val => \$conf{pll}, list => [keys %pll_lst], format => sub { $pll_lst{$_[0]} }, sort => 1, default => 0, advanced =>1 }, + { label => N("Radio support:"), val => \$conf{radio}, type => "bool", text => N("enable radio support") }), ] )) { diff --git a/perl-install/install2.pm b/perl-install/install2.pm index f9bebe686..323d868b6 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -374,7 +374,7 @@ sub main { my $f = ${{ oem => sub { $::oem = $v }, lang => sub { $o->{lang} = $v }, - flang => sub { $o->{lang} = $v ; push @auto, 'selectLanguage' }, + flang => sub { $o->{lang} = $v; push @auto, 'selectLanguage' }, method => sub { $o->{method} = $v }, pcmcia => sub { $o->{pcmcia} = $v }, vga16 => sub { $o->{vga16} = $v }, @@ -396,7 +396,7 @@ sub main { defcfg => sub { $cfg = $v }, newt => sub { $o->{interactive} = "newt" }, text => sub { $o->{interactive} = "newt" }, - stdio => sub { $o->{interactive} = "stdio"}, + stdio => sub { $o->{interactive} = "stdio" }, corporate => sub { $::corporate = 1 }, kickstart => sub { $::auto_install = $v }, uml_install => sub { $::uml_install = 1 }, @@ -407,8 +407,8 @@ sub main { fdisk => sub { $o->{partitioning}{fdisk} = 1 }, g_auto_install => sub { $::testing = $::g_auto_install = 1; $o->{partitioning}{auto_allocate} = 1 }, nomouseprobe => sub { $o->{nomouseprobe} = $v }, - blank => sub { $o->{blank} = $::blank = 1}, - updatemodules => sub { $o->{updatemodules} = 1}, + blank => sub { $o->{blank} = $::blank = 1 }, + updatemodules => sub { $o->{updatemodules} = 1 }, }}{lc $n}; &$f if $f; } %cmdline; @@ -562,7 +562,7 @@ sub main { #-the main cycle my $clicked = 0; - MAIN: for ($o->{step} = $o->{steps}{first}; ; $o->{step} = getNextStep()) { + MAIN: for ($o->{step} = $o->{steps}{first};; $o->{step} = getNextStep()) { $o->{steps}{$o->{step}}{entered}++; $o->enteringStep($o->{step}); if ($o->{steps}{$o->{step}}{icon}) { $o->{icon} = $o->{steps}{$o->{step}}{icon} } else { undef $o->{icon} } diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index b3b4b70af..f3a896d23 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -469,8 +469,7 @@ sub setAuthentication { $o->pkg_install("ypbind"); my $domain = $o->{netc}{NISDOMAIN}; $domain || $nis ne "broadcast" or die N("Can't use broadcast with no NIS domain"); - my $t = $domain ? "domain $domain" . ($nis ne "broadcast" && " server") - : "ypserver"; + my $t = $domain ? "domain $domain" . ($nis ne "broadcast" && " server") : "ypserver"; substInFile { $_ = "#~$_" unless /^#/; $_ .= "$t $nis\n" if eof; diff --git a/perl-install/install_gtk.pm b/perl-install/install_gtk.pm index 08d11e269..783e891d9 100644 --- a/perl-install/install_gtk.pm +++ b/perl-install/install_gtk.pm @@ -131,7 +131,7 @@ sub create_steps_window { $map, 0, 0, ($darea->allocation->[2]-$PIX_W)/2 + 3, ($darea->allocation->[3]-$PIX_H)/2, - $PIX_W , $PIX_H); + $PIX_W, $PIX_H); }; my $f = sub { @@ -255,9 +255,7 @@ EndSection END -} -else - { +} else { my $wacom; if ($wacom_dev) { diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index bfd5d7dfd..71e50a8bb 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -48,8 +48,8 @@ sub new($$) { unless (-d "/var/log") { mkdir("/var/log") } local $SIG{CHLD} = sub { $ok = 0 if waitpid(-1, c::WNOHANG()) > 0 }; unless (fork) { - exec $_[0], (arch() =~ /^sparc/ || arch() eq "ppc" ? () : ("-kb")), "-dpms","-s" ,"240", - ($_[0] =~ /Xpmac/ ? $xpmac_opts !~ /ofonly/ ? ("-mode", "17", "-depth", "32") : ("-mach64"):()), + exec $_[0], (arch() =~ /^sparc/ || arch() eq "ppc" ? () : ("-kb")), "-dpms","-s","240", + ($_[0] =~ /Xpmac/ ? $xpmac_opts !~ /ofonly/ ? ("-mode", "17", "-depth", "32") : ("-mach64") :()), ($_[0] =~ /Xsun/ || $_[0] =~ /Xpmac/ ? ("-fp", "/usr/X11R6/lib/X11/fonts:unscaled") : ("-allowMouseOpenFail", "-xf86config", $f)) or exit 1; } diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 7374e8592..af4daabf1 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -261,7 +261,7 @@ sub selectInstallClass { my $installMode = $o->{isUpgrade} ? $o->{keepConfiguration} ? N_("Upgrade packages only") : N_("Upgrade") : N_("Install"); if ($installMode = $o->selectInstallClass1($verifInstallClass, - first(list2kv(@c)), ${{reverse %c}}{$::expert ? "expert" : "beginner"}, + first(list2kv(@c)), ${{ reverse %c }}{$::expert ? "expert" : "beginner"}, exists $o->{isUpgrade} ? [] : [ N_("Install"), N_("Upgrade"), N_("Upgrade packages only") ], $installMode)) { log::l("install class: $installMode"); $o->{isUpgrade} = $installMode =~ /Upgrade/; diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm index 6e8eb1fd4..53d7d72c2 100644 --- a/perl-install/interactive/gtk.pm +++ b/perl-install/interactive/gtk.pm @@ -118,7 +118,7 @@ sub create_clist { $starting_word = '' : $select->(($j + $curr) % @l); - $timeout = Gtk->timeout_add($forgetTime, sub { $timeout = $starting_word = ''; 0 } ); + $timeout = Gtk->timeout_add($forgetTime, sub { $timeout = $starting_word = ''; 0 }); } 1; }); @@ -536,7 +536,7 @@ sub ask_fromW { my $create_widgets = sub { my ($size, @widgets) = @_; - my $w = create_packtable({}, map { [($_->{icon_w}, $_->{e}{label}, $_->{real_w})]} @widgets); + my $w = create_packtable({}, map { [($_->{icon_w}, $_->{e}{label}, $_->{real_w})] } @widgets); $size && $total_size or return $w; #- do not bother computing stupid/bad things my $ratio = max($size / $total_size, 0.2); diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm index 7f6b64b3c..301d363f2 100644 --- a/perl-install/keyboard.pm +++ b/perl-install/keyboard.pm @@ -22,114 +22,114 @@ my $KMAP_MAGIC = 0x8B39C07F; #- beware only the first 5 characters of the locale are used my %lang2keyboard = ( - 'af' => 'us_intl', -#-'ar' => 'ar:80 ar_d:70 ar_azerty:60 ar_azerty_d:50', - 'az' => 'az:80 tr_q:10 us_intl:5', - 'be' => 'by:80 ru:50 ru_yawerty:40', - 'bg' => 'bg_phonetic:60 bg:50', - 'bn' => 'ben:80 dev:20 us_intl:5', - 'br' => 'fr:90', - 'bs' => 'bs:90', - 'ca' => 'es:89 fr:15', - 'cs' => 'cz_qwerty:70 cz:50', - 'cy' => 'uk:90', - 'da' => 'dk:90', - 'de' => 'de_nodeadkeys:70 de:50', -'de_AT'=> 'de_nodeadkeys:70 de:50', -'de_BE'=> 'be:70 de_nodeadkeys:60 de:50', -'de_CH'=> 'ch_de:70 ch_fr:25 de_nodeadkeys:20 de:15', -'de_DE'=> 'de_nodeadkeys:70 de:50', -'de_LU'=> 'de_nodeadkeys:70 de:50 fr:40 be:35', - 'el' => 'gr:90', - 'en' => 'us:90 us_intl:50', -'en_US'=> 'us:90 us_intl:50', -'en_GB'=> 'uk:89 us:60 us_intl:50', -'en_IE'=> 'uk:89 us:60 us_intl:50', - 'eo' => 'us_intl:89 dvorak:20', - 'es' => 'es:85 la:80 us_intl:50', -'es@tr'=> 'es:85 la:80 us_intl:50', -'es_AR'=> 'la:80 us_intl:50 es:20', -'es_ES'=> 'es:90', -'es_MX'=> 'la:80 us_intl:50 es:20', - 'et' => 'ee:90', - 'eu' => 'es:89 fr:15', - 'fa' => 'ir:90', - 'fi' => 'fi:90', - 'fr' => 'fr:90', -'fr_BE'=> 'be:85 fr:5', -'fr_CA'=> 'qc:85 fr:5', -'fr_CH'=> 'ch_fr:70 ch_de:15 fr:10', -'fr_FR'=> 'fr:90', -'fr_LU'=> 'fr:70 de_nodeadkeys:50 de:40 be:35', - 'ga' => 'uk:90', - 'gd' => 'uk:90', - 'gl' => 'es:90', - 'gu' => 'guj:90', - 'gv' => 'uk:90', - 'he' => 'il:89 il_phonetic:10', - 'hi' => 'dev:90', - 'hr' => 'hr:80 si:50', - 'hu' => 'hu:90', - 'hy' => 'am:80 am_old:10 am_phonetic:5', - 'id' => 'us:90 us_intl:20', - 'is' => 'is:90', - 'iu' => 'iu:90', - 'it' => 'it:90', -'it_CH'=> 'ch_fr:80 ch_de:60 it:50', -'it_IT'=> 'it:90', - 'ja' => 'jp:80 us:50 us_intl:20', - 'ka' => 'ge_la:80 ge_ru:50', - 'kl' => 'dk:80 us_intl:30', - 'ko' => 'kr:80 us:60', - 'kw' => 'uk:90', - 'lo' => 'lao:90', - 'lt' => 'lt:80 lt_new:70 lt_b:60 lt_p:50', - 'lv' => 'lv:80 lt:40 lt_new:30 lt_b:20 lt_p:10 ee:5', - 'mi' => 'us_intl:60 uk:20 us:10', - 'mk' => 'mk:80', - 'mn' => 'mng:75 ru:20 ru_yawerty:5', - 'mr' => 'dev:90', - 'ms' => 'us:90 us_intl:20', - 'mt' => 'mt:55 mt_us:35 us_intl:10', - 'my' => 'mm:90', - 'nb' => 'no:85 dvorak_no:10', -'nl_BE'=> 'be:80 nl:10 us_intl:5', -'nl_NL'=> 'us_intl:80 nl:15 us:10 uk:5', - 'nn' => 'no:85 dvorak_no:10', - 'no' => 'no:85 dvorak_no:10', - 'oc' => 'fr:90', - 'pa' => 'gur:90', - 'ph' => 'us:90 us_intl:20', - 'pl' => 'pl:80 pl2:60', - 'pp' => 'br:80 la:20 pt:10 us_intl:30', -'pt_BR'=> 'br:80 la:20 pt:10 us_intl:30', -'pt_PT'=> 'pt:80', - 'ro' => 'ro2:80 ro:40 us_intl:10', - 'ru' => 'ru:85 ru_yawerty:80', -'ru_RU'=> 'ru:85 ru_yawerty:80', -'ru_UA'=> 'ua:50 ru:40 ru_yawerty:30', - 'sk' => 'sk_qwerty:80 sk:70', - 'sl' => 'si:80 hr:50', - 'sp' => 'sr:80', -'sp_YU'=> 'sr:80', - 'sq' => 'al:80', - 'sr' => 'yu:80', -'sr_YU'=> 'yu:80', - 'sv' => 'se:85 fi:30 dvorak_se:10', -'sv_FI'=> 'fi:85 sv:20', -'sv_SE'=> 'se:85 fi:20', - 'ta' => 'tscii:80 tml:20', - 'tg' => 'tj:80 ru_yawerty:40', - 'th' => 'th:90', - 'tr' => 'tr_q:85 tr_q:30', - 'tt' => 'ru:50 ru_yawerty:40', - 'uk' => 'ua:85 ru:50 ru_yawerty:40', - 'uz' => 'us:80', - 'vi' => 'vn:80 us:60 us_intl:50', - 'wa' => 'be:85 fr:5', -'zh_CN'=> 'us:60', -'zh_HK'=> 'us:60', -'zh_TW'=> 'us:60', + 'af' => 'us_intl', +#-'ar' => 'ar:80 ar_d:70 ar_azerty:60 ar_azerty_d:50', + 'az' => 'az:80 tr_q:10 us_intl:5', + 'be' => 'by:80 ru:50 ru_yawerty:40', + 'bg' => 'bg_phonetic:60 bg:50', + 'bn' => 'ben:80 dev:20 us_intl:5', + 'br' => 'fr:90', + 'bs' => 'bs:90', + 'ca' => 'es:89 fr:15', + 'cs' => 'cz_qwerty:70 cz:50', + 'cy' => 'uk:90', + 'da' => 'dk:90', + 'de' => 'de_nodeadkeys:70 de:50', +'de_AT' => 'de_nodeadkeys:70 de:50', +'de_BE' => 'be:70 de_nodeadkeys:60 de:50', +'de_CH' => 'ch_de:70 ch_fr:25 de_nodeadkeys:20 de:15', +'de_DE' => 'de_nodeadkeys:70 de:50', +'de_LU' => 'de_nodeadkeys:70 de:50 fr:40 be:35', + 'el' => 'gr:90', + 'en' => 'us:90 us_intl:50', +'en_US' => 'us:90 us_intl:50', +'en_GB' => 'uk:89 us:60 us_intl:50', +'en_IE' => 'uk:89 us:60 us_intl:50', + 'eo' => 'us_intl:89 dvorak:20', + 'es' => 'es:85 la:80 us_intl:50', +'es@tr' => 'es:85 la:80 us_intl:50', +'es_AR' => 'la:80 us_intl:50 es:20', +'es_ES' => 'es:90', +'es_MX' => 'la:80 us_intl:50 es:20', + 'et' => 'ee:90', + 'eu' => 'es:89 fr:15', + 'fa' => 'ir:90', + 'fi' => 'fi:90', + 'fr' => 'fr:90', +'fr_BE' => 'be:85 fr:5', +'fr_CA' => 'qc:85 fr:5', +'fr_CH' => 'ch_fr:70 ch_de:15 fr:10', +'fr_FR' => 'fr:90', +'fr_LU' => 'fr:70 de_nodeadkeys:50 de:40 be:35', + 'ga' => 'uk:90', + 'gd' => 'uk:90', + 'gl' => 'es:90', + 'gu' => 'guj:90', + 'gv' => 'uk:90', + 'he' => 'il:89 il_phonetic:10', + 'hi' => 'dev:90', + 'hr' => 'hr:80 si:50', + 'hu' => 'hu:90', + 'hy' => 'am:80 am_old:10 am_phonetic:5', + 'id' => 'us:90 us_intl:20', + 'is' => 'is:90', + 'iu' => 'iu:90', + 'it' => 'it:90', +'it_CH' => 'ch_fr:80 ch_de:60 it:50', +'it_IT' => 'it:90', + 'ja' => 'jp:80 us:50 us_intl:20', + 'ka' => 'ge_la:80 ge_ru:50', + 'kl' => 'dk:80 us_intl:30', + 'ko' => 'kr:80 us:60', + 'kw' => 'uk:90', + 'lo' => 'lao:90', + 'lt' => 'lt:80 lt_new:70 lt_b:60 lt_p:50', + 'lv' => 'lv:80 lt:40 lt_new:30 lt_b:20 lt_p:10 ee:5', + 'mi' => 'us_intl:60 uk:20 us:10', + 'mk' => 'mk:80', + 'mn' => 'mng:75 ru:20 ru_yawerty:5', + 'mr' => 'dev:90', + 'ms' => 'us:90 us_intl:20', + 'mt' => 'mt:55 mt_us:35 us_intl:10', + 'my' => 'mm:90', + 'nb' => 'no:85 dvorak_no:10', +'nl_BE' => 'be:80 nl:10 us_intl:5', +'nl_NL' => 'us_intl:80 nl:15 us:10 uk:5', + 'nn' => 'no:85 dvorak_no:10', + 'no' => 'no:85 dvorak_no:10', + 'oc' => 'fr:90', + 'pa' => 'gur:90', + 'ph' => 'us:90 us_intl:20', + 'pl' => 'pl:80 pl2:60', + 'pp' => 'br:80 la:20 pt:10 us_intl:30', +'pt_BR' => 'br:80 la:20 pt:10 us_intl:30', +'pt_PT' => 'pt:80', + 'ro' => 'ro2:80 ro:40 us_intl:10', + 'ru' => 'ru:85 ru_yawerty:80', +'ru_RU' => 'ru:85 ru_yawerty:80', +'ru_UA' => 'ua:50 ru:40 ru_yawerty:30', + 'sk' => 'sk_qwerty:80 sk:70', + 'sl' => 'si:80 hr:50', + 'sp' => 'sr:80', +'sp_YU' => 'sr:80', + 'sq' => 'al:80', + 'sr' => 'yu:80', +'sr_YU' => 'yu:80', + 'sv' => 'se:85 fi:30 dvorak_se:10', +'sv_FI' => 'fi:85 sv:20', +'sv_SE' => 'se:85 fi:20', + 'ta' => 'tscii:80 tml:20', + 'tg' => 'tj:80 ru_yawerty:40', + 'th' => 'th:90', + 'tr' => 'tr_q:85 tr_q:30', + 'tt' => 'ru:50 ru_yawerty:40', + 'uk' => 'ua:85 ru:50 ru_yawerty:40', + 'uz' => 'us:80', + 'vi' => 'vn:80 us:60 us_intl:50', + 'wa' => 'be:85 fr:5', +'zh_CN' => 'us:60', +'zh_HK' => 'us:60', +'zh_TW' => 'us:60', ); # USB kbd table @@ -174,7 +174,7 @@ arch() =~ /^sparc/ ? ( "az" => [ N_("Azerbaidjani (latin)"),"az", "az", 0 ], #"a3" => [ N_("Azerbaidjani (cyrillic)"), "az-koi8k","az(cyrillic)",1 ], "be" => [ N_("Belgian"), "be2-latin1", "be", 0 ], - "ben"=> [ N_("Bengali"), "us", "ben", 1 ], + "ben" => [ N_("Bengali"), "us", "ben", 1 ], "bg_phonetic" => [ N_("Bulgarian (phonetic)"),"bg", "bg(phonetic)", 1 ], "bg" => [ N_("Bulgarian (BDS)"), "bg", "bg", 1 ], "br" => [ N_("Brazilian (ABNT-2)"),"br-abnt2", "br", 0 ], @@ -197,11 +197,11 @@ arch() =~ /^sparc/ ? ( "es" => [ N_("Spanish"), "es-latin1", "es", 0 ], "fi" => [ N_("Finnish"), "fi-latin1", "fi", 0 ], "fr" => [ N_("French"), "fr-latin1", "fr", 0 ], - "ge_ru"=>[N_("Georgian (\"Russian\" layout)"),"ge_ru-georgian_academy","ge_ru",1], - "ge_la"=>[N_("Georgian (\"Latin\" layout)"),"ge_la-georgian_academy","ge_la",1], + "ge_ru" => [N_("Georgian (\"Russian\" layout)"),"ge_ru-georgian_academy","ge_ru",1], + "ge_la" => [N_("Georgian (\"Latin\" layout)"),"ge_la-georgian_academy","ge_la",1], "gr" => [ N_("Greek"), "gr-8859_7", "el", 1 ], - "guj"=> [ N_("Gujarati"), "us", "guj", 1 ], - "gur"=> [ N_("Gurmukhi"), "us", "gur", 1 ], + "guj" => [ N_("Gujarati"), "us", "guj", 1 ], + "gur" => [ N_("Gurmukhi"), "us", "gur", 1 ], "hu" => [ N_("Hungarian"), "hu-latin2", "hu", 0 ], "hr" => [ N_("Croatian"), "croat", "hr", 0 ], "il" => [ N_("Israeli"), "il-8859_8", "il", 1 ], @@ -215,7 +215,7 @@ arch() =~ /^sparc/ ? ( # some functioanlity; "us" used for XKB until this is fixed "kr" => [ N_("Korean keyboard"), "us", "us", 1 ], "la" => [ N_("Latin American"), "la-latin1", "la", 0 ], - "lao"=> [ N_("Laotian"), "us", "lao", 1 ], + "lao" => [ N_("Laotian"), "us", "lao", 1 ], "lt" => [ N_("Lithuanian AZERTY (old)"), "lt-latin7", "lt_a", 0 ], #- TODO: write a console kbd map for lt_new "lt_new" => [ N_("Lithuanian AZERTY (new)"), "lt-latin7", "lt_std", 0 ], @@ -224,7 +224,7 @@ arch() =~ /^sparc/ ? ( "lv" => [ N_("Latvian"), "lv-latin7", "lv", 0 ], "mk" => [ N_("Macedonian"), "mk", "mk", 1 ], "mm" => [ N_("Myanmar (Burmese)"),"us", "mm", 1 ], - "mng"=> [ N_("Mongolian (cyrillic)"),"us", "mng", 1 ], + "mng" => [ N_("Mongolian (cyrillic)"),"us", "mng", 1 ], "mt" => [ N_("Maltese (UK)"), "uk", "mt", 0 ], "mt_us" => [ N_("Maltese (US)"),"us", "mt_us", 0 ], "nl" => [ N_("Dutch"), "nl-latin1", "nl", 0 ], diff --git a/perl-install/lang.pm b/perl-install/lang.pm index 62b5050f5..2018f2d1d 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -28,55 +28,55 @@ my %languages = my @languages = ( 'en_US' => [ 'English|United States', 'C', 'en', 'en_US:en' ], 'en_GB' => [ 'English|United Kingdom', 'iso-8859-15', 'en', 'en_GB:en' ], 'en_IE' => [ 'English|Ireland', 'iso-8859-15','en', 'en_IE:en_GB:en' ], -'en_US.UTF-8'=> [ 'English|UTF-8', 'iso-8859-15', 'en', 'en_US:en', 'UTF-8', ], +'en_US.UTF-8' => [ 'English|UTF-8', 'iso-8859-15', 'en', 'en_US:en', 'UTF-8', ], 'af' => [ 'Afrikaans', 'iso-8859-1', 'af', 'af:en_ZA' ], -'ar_EG.UTF-8'=> [ 'Arabic', 'iso-8859-6', 'ar', 'ar', 'UTF-8' ], +'ar_EG.UTF-8' => [ 'Arabic', 'iso-8859-6', 'ar', 'ar', 'UTF-8' ], #'az_AZ.ISO-8859-9E'=> [ 'Azeri (Latin)','iso-8859-9e','az', 'az:tr' ], -'az_AZ.UTF-8'=> [ 'Azeri (Latin)', 'iso-8859-9e', 'az', 'az:tr', 'UTF-8' ], +'az_AZ.UTF-8' => [ 'Azeri (Latin)', 'iso-8859-9e', 'az', 'az:tr', 'UTF-8' ], 'be' => [ 'Belarussian (CP1251)', 'cp1251', 'be', 'be:be_BY.CP1251:ru_RU.CP1251' ], 'be_BY.UTF-8' => [ 'Belarussian (UTF-8)','cp1251', 'be', 'be:be_BY.CP1251:ru_RU.CP1251', 'UTF-8' ], #- provide aliases for some not very standard names used in po files... 'bg' => [ 'Bulgarian (CP1251)', 'cp1251', 'bg', 'bg:bg.CP1251:bg_BG.CP1251:bg_BG' ], -'bg_BG.UTF-8'=> [ 'Bulgarian (UTF-8)', 'cp1251', 'bg', 'bg:bg.CP1251:bg_BG.CP1251:bg_BG', 'UTF-8' ], +'bg_BG.UTF-8' => [ 'Bulgarian (UTF-8)', 'cp1251', 'bg', 'bg:bg.CP1251:bg_BG.CP1251:bg_BG', 'UTF-8' ], 'br' => [ 'Brezhoneg', 'iso-8859-15','br', 'br:fr_FR:fr' ], 'bs' => [ 'Bosnian', 'iso-8859-2', 'bs', 'bs' ], 'ca_ES' => [ 'Catalan', 'iso-8859-15','ca', 'ca:es_ES:es' ], 'cs' => [ 'Czech', 'iso-8859-2', 'cs', 'cs' ], #- 'cy' => [ 'Cymraeg (Welsh)','iso-8859-14','cy', 'cy:en_GB:en' ], -'cy_GB.UTF-8'=> [ 'Cymraeg (Welsh)', 'iso-8859-14', 'cy', 'cy:en_GB:en', 'UTF-8' ], +'cy_GB.UTF-8' => [ 'Cymraeg (Welsh)', 'iso-8859-14', 'cy', 'cy:en_GB:en', 'UTF-8' ], 'da' => [ 'Danish', 'iso-8859-15', 'da', 'da' ], 'de_AT' => [ 'German|Austria', 'iso-8859-15','de', 'de_AT:de' ], 'de_BE' => [ 'German|Belgium', 'iso-8859-15','de', 'de_BE:de' ], 'de_CH' => [ 'German|Switzerland', 'iso-8859-15', 'de', 'de_CH:de' ], 'de_DE' => [ 'German|Germany', 'iso-8859-15','de', 'de_DE:de' ], 'el' => [ 'Greek', 'iso-8859-7', 'el', 'el' ], -'el_GR.UTF-8'=> [ 'Greek (UTF-8)', 'iso-8859-7', 'el', 'el', 'UTF-8' ], +'el_GR.UTF-8' => [ 'Greek (UTF-8)', 'iso-8859-7', 'el', 'el', 'UTF-8' ], 'eo' => [ 'Esperanto', 'iso-8859-3', 'eo', 'eo', 'UTF-8' ], 'es_AR' => [ 'Spanish|Argentina', 'iso-8859-1', 'es', 'es_AR:es_UY:es:es_ES' ], 'es_ES' => [ 'Spanish|Spain (modern sorting)', 'iso-8859-15', 'es', 'es_ES:es' ], 'es@tradicional' => [ 'Spanish|Spain (traditional sorting)', 'iso-8859-15', 'es', 'es' ], -'es_ES.UTF-8'=> [ 'Spanish|Spain (UTF-8)','iso-8859-15', 'es', 'es_ES:es', 'UTF-8' ], +'es_ES.UTF-8' => [ 'Spanish|Spain (UTF-8)','iso-8859-15', 'es', 'es_ES:es', 'UTF-8' ], 'es_MX' => [ 'Spanish|Mexico', 'iso-8859-1', 'es', 'es_MX:es:es_ES' ], 'et' => [ 'Estonian', 'iso-8859-15','et', 'et' ], 'eu_ES' => [ 'Euskara (Basque)','iso-8859-15', 'eu', 'eu' ], -'fa_IR.UTF-8'=> [ 'Farsi (Iranian)', 'unicode', 'fa', 'fa', 'UTF-8' ], +'fa_IR.UTF-8' => [ 'Farsi (Iranian)', 'unicode', 'fa', 'fa', 'UTF-8' ], 'fi_FI' => [ 'Finnish (Suomi)', 'iso-8859-15','fi', 'fi' ], #-'fo' => [ 'Faroese', 'iso-8859-1', 'fo', 'fo' ], 'fr_BE' => [ 'French|Belgium', 'iso-8859-15','fr', 'fr_BE:fr' ], 'fr_CA' => [ 'French|Canada', 'iso-8859-15','fr', 'fr_CA:fr' ], 'fr_CH' => [ 'French|Switzerland', 'iso-8859-15', 'fr', 'fr_CH:fr' ], 'fr_FR' => [ 'French|France', 'iso-8859-15','fr', 'fr_FR:fr' ], -'fr_FR.UTF-8'=> [ 'French|France (UTF-8)','iso-8859-15','fr', 'fr_FR:fr', 'UTF-8' ], +'fr_FR.UTF-8' => [ 'French|France (UTF-8)','iso-8859-15','fr', 'fr_FR:fr', 'UTF-8' ], 'ga_IE' => [ 'Gaeilge (Irish)', 'iso-8859-15','ga', 'ga:en_IE:en' ], #-'gd' => [ 'Scottish gaelic', 'iso-8859-14','gd', 'gd:en_GB:en' ], 'gl_ES' => [ 'Galego (Galician)','iso-8859-15','gl', 'gl:es_ES:pt_PT:pt_BR:es:pt' ], #-'gv' => [ 'Manx gaelic', 'iso-8859-14','gv', 'gv:en_GB:en' ], #- 'iw' was the old code for hebrew language -'he_IL.UTF-8'=> [ 'Hebrew', 'iso-8859-8', 'he', 'he:iw_IL', 'UTF-8' ], +'he_IL.UTF-8' => [ 'Hebrew', 'iso-8859-8', 'he', 'he:iw_IL', 'UTF-8' ], 'hr' => [ 'Croatian', 'iso-8859-2', 'hr', 'hr' ], 'hu' => [ 'Hungarian', 'iso-8859-2', 'hu', 'hu' ], #'hy_AM.ARMSCII-8'=> [ 'Armenian|ARMSCII-8','armscii-8','hy','hy' ], -'hy_AM.UTF-8'=> [ 'Armenian', 'armscii-8', 'hy', 'hy', 'UTF-8' ], +'hy_AM.UTF-8' => [ 'Armenian', 'armscii-8', 'hy', 'hy', 'UTF-8' ], #- 'in' was the old code for indonesian language; by putting LANGUAGE=id:in_ID #- we catch the few catalog files still using the wrong code 'id' => [ 'Indonesian', 'iso-8859-1', 'id', 'id:in_ID' ], @@ -85,21 +85,21 @@ my %languages = my @languages = ( 'it_IT' => [ 'Italian|Italy','iso-8859-15','it', 'it_IT:it' ], #-'iu' => [ 'Inuktitut', 'unicodeIU', 'iu', 'iu' ], 'ja' => [ 'Japanese', 'jisx0208', 'ja', 'ja_JP.ujis:ja' ], -'ja_JP.UTF-8'=> [ 'Japanese (UTF-8)', 'jisx0208', 'ja', 'ja_JP.ujis:ja', 'UTF-8' ], -'ka_GE.UTF-8'=> [ 'Georgian', 'utf_ka', 'ka', 'ka', 'UTF-8' ], +'ja_JP.UTF-8' => [ 'Japanese (UTF-8)', 'jisx0208', 'ja', 'ja_JP.ujis:ja', 'UTF-8' ], +'ka_GE.UTF-8' => [ 'Georgian', 'utf_ka', 'ka', 'ka', 'UTF-8' ], #-'kl' => [ 'Greenlandic (inuit)', 'iso-8859-1', 'kl', 'kl' ], 'ko' => [ 'Korean', 'ksc5601', 'ko', 'ko' ], -'ko_KR.UTF-8'=> [ 'Korean (UTF-8)', 'ksc5601', 'ko', 'ko', 'UTF-8' ], +'ko_KR.UTF-8' => [ 'Korean (UTF-8)', 'ksc5601', 'ko', 'ko', 'UTF-8' ], #-'kw' => [ 'Cornish gaelic', 'iso-8859-14','kw', 'kw:en_GB:en' ], #-'lo' => [ 'Laotian', 'mulelao-1', 'lo', 'lo' ], 'lt' => [ 'Lithuanian', 'iso-8859-13','lt', 'lt' ], 'lv' => [ 'Latvian', 'iso-8859-13','lv', 'lv' ], 'mi' => [ 'Maori', 'iso-8859-13','mi', 'mi' ], #- 'mk' => [ 'Macedonian (Cyrillic)','iso-8859-5', 'mk', 'mk' ], -'mk_MK.UTF-8'=> [ 'Macedonian (Cyrillic)','cp1251', 'mk', 'mk', 'UTF-8' ], +'mk_MK.UTF-8' => [ 'Macedonian (Cyrillic)','cp1251', 'mk', 'mk', 'UTF-8' ], 'ms' => [ 'Malay', 'iso-8859-1', 'ms', 'ms' ], #- 'mt' => [ 'Maltese|ISO-8859-3', 'iso-8859-3', 'mt', 'mt' ], -'mt_MT.UTF-8'=> [ 'Maltese', 'iso-8859-3', 'mt', 'mt', 'UTF-8' ], +'mt_MT.UTF-8' => [ 'Maltese', 'iso-8859-3', 'mt', 'mt', 'UTF-8' ], 'nl_BE' => [ 'Dutch|Belgium', 'iso-8859-15', 'nl', 'nl_BE:nl' ], 'nl_NL' => [ 'Dutch|Netherlands','iso-8859-15', 'nl', 'nl_NL:nl' ], #- 'nb' is the new locale name in glibc 2.2 @@ -120,10 +120,10 @@ my %languages = my @languages = ( 'sk' => [ 'Slovak', 'iso-8859-2', 'sk', 'sk' ], 'sl' => [ 'Slovenian', 'iso-8859-2', 'sl', 'sl' ], #- 'sp' => [ 'Serbian|Cyrillic (ISO-8859-5)','iso-8859-5', 'sp', 'sp:sr' ], -#'sp_YU.CP1251'=> [ 'Serbian|Cyrillic (CP1251)','cp1251', 'sp', 'sp:sr' ], -'sp_YU.UTF-8'=> [ 'Serbian|Cyrillic','cp1251', 'sp', 'sp:sr', 'UTF-8' ], +#'sp_YU.CP1251' => [ 'Serbian|Cyrillic (CP1251)','cp1251', 'sp', 'sp:sr' ], +'sp_YU.UTF-8' => [ 'Serbian|Cyrillic','cp1251', 'sp', 'sp:sr', 'UTF-8' ], 'sr' => [ 'Serbian|Latin (ISO-8859-2)','iso-8859-2','sr', 'sr' ], -'sr_YU.UTF-8'=> [ 'Serbian|Latin (UTF-8)', 'iso-8859-2', 'sr', 'sr', 'UTF-8' ], +'sr_YU.UTF-8' => [ 'Serbian|Latin (UTF-8)', 'iso-8859-2', 'sr', 'sr', 'UTF-8' ], 'sv' => [ 'Swedish', 'iso-8859-1', 'sv', 'sv' ], #- there is no tamil font curently; so set DrakX encoding to utf_1 #- note: most of the gnome translations for tamil are broken (using bad @@ -131,17 +131,17 @@ my %languages = my @languages = ( #- #- Tamil currently works only with TSCII encoding; which identifies #- itself as a fake iso-8859-1 -#'ta_IN.UTF-8'=> [ 'Tamil (UTF-8)', 'iso-8859-1', 'ta', 'ta', 'UTF-8' ], +#'ta_IN.UTF-8' => [ 'Tamil (UTF-8)', 'iso-8859-1', 'ta', 'ta', 'UTF-8' ], 'ta_IN' => [ 'Tamil (TSCII)', 'tscii', 'ta', 'ta' ], -'tg_TJ.UTF-8'=> [ 'Tajik', 'utf_koi8-k', 'tg', 'tg', 'UTF-8' ], +'tg_TJ.UTF-8' => [ 'Tajik', 'utf_koi8-k', 'tg', 'tg', 'UTF-8' ], 'th' => [ 'Thai|TIS-620', 'tis620', 'th', 'th' ], -'th_TH.UTF-8'=> [ 'Thai (UTF-8)', 'tis620', 'th', 'th', 'UTF-8' ], +'th_TH.UTF-8' => [ 'Thai (UTF-8)', 'tis620', 'th', 'th', 'UTF-8' ], 'tr' => [ 'Turkish', 'iso-8859-9', 'tr', 'tr' ], -#-'tt_RU.UTF-8'=> [ 'Tatar', 'koi8-k', 'tt', 'tt' ], +#-'tt_RU.UTF-8' => [ 'Tatar', 'koi8-k', 'tt', 'tt' ], #-'ur' => [ 'Urdu', 'cp1256', 'ur', 'ur' ], 'uk_UA' => [ 'Ukrainian|KOI8-U', 'koi8-u', 'uk', 'uk_UA:uk' ], -'uk_UA.CP1251'=> [ 'Ukrainian|CP1251', 'cp1251', 'uk', 'uk_UA:uk' ], -'uk_UA.UTF-8'=> [ 'Ukrainian|UTF-8', 'cp1251', 'uk', 'uk_UA:uk', 'UTF-8' ], +'uk_UA.CP1251' => [ 'Ukrainian|CP1251', 'cp1251', 'uk', 'uk_UA:uk' ], +'uk_UA.UTF-8' => [ 'Ukrainian|UTF-8', 'cp1251', 'uk', 'uk_UA:uk', 'UTF-8' ], 'uz' => [ 'Uzbek', 'iso-8859-1', 'uz', 'uz' ], #'vi_VN.TCVN' => [ 'Vietnamese|TCVN', 'tcvn', 'vi', 'vi' ], #'vi_VN.VISCII' => [ 'Vietnamese|VISCII','viscii', 'vi', 'vi' ], diff --git a/perl-install/modules.pm b/perl-install/modules.pm index a757b50c2..2dc9a12ad 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -306,7 +306,7 @@ sub configure_pcmcia { }; #- run cardmgr in foreground while it is configuring the card. - run_program::run("cardmgr", "-f", "-m" ,"/modules"); + run_program::run("cardmgr", "-f", "-m", "/modules"); sleep(3); #- make sure to be aware of loaded module by cardmgr. diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm index d19fc9f69..5628c2700 100644 --- a/perl-install/mouse.pm +++ b/perl-install/mouse.pm @@ -437,7 +437,7 @@ sub test_mouse_install { $w->sync; # HACK Gtk::Gdk->pointer_grab($darea->window, 1, [ 'pointer_motion_mask'], - $darea->window, undef ,0); + $darea->window, undef, 0); $w->main; } diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm index c10e1435f..89cacba8c 100644 --- a/perl-install/my_gtk.pm +++ b/perl-install/my_gtk.pm @@ -68,19 +68,19 @@ sub new { for (my $i = 0; $i < (540/$y1); $i++) { $draw1->window->draw_pixmap ($draw1->style->bg_gc('normal'), $im_up, 0, 0, 0, $y1*$i, - $x1 , $y1); + $x1, $y1); $draw1->window->draw_string( $style->font, $draw1->style->white_gc, 40, 62, - ($::Wizard_title) ); + ($::Wizard_title)); } }); $draw2->signal_connect(expose_event => sub { for (my $i = 0; $i < (300/$y2); $i++) { $draw2->window->draw_pixmap ($draw2->style->bg_gc('normal'), $im_left, 0, 0, 0, $y2*$i, - $x2 , $y2); + $x2, $y2); } }); $::WizardTable->attach($draw1, 0, 2, 0, 1, 'fill', 'fill', 0, 0); @@ -270,7 +270,7 @@ sub _create_window($$) { my $b = Gtk::Gdk::Bitmap->create_from_data($w->window, $s, $wib, $he); $w->window->shape_combine_mask($b, 0, 0); } - }) if ($my_gtk::force_center || $o->{force_center}) && !($my_gtk::force_position || $o->{force_position}) ; + }) if ($my_gtk::force_center || $o->{force_center}) && !($my_gtk::force_position || $o->{force_position}); $o->{window} = $::noBorder ? $w : $f; $o->{rwindow} = $w; @@ -378,8 +378,8 @@ sub ask_browse_tree_info { $go->grab_focus; $w->{rwindow}->show_all; - my @toolbar = (ftout => [ N("Expand Tree") , sub { $tree->expand_recursive(undef) } ], - ftin => [ N("Collapse Tree") , sub { $tree->collapse_recursive(undef) } ], + my @toolbar = (ftout => [ N("Expand Tree"), sub { $tree->expand_recursive(undef) } ], + ftin => [ N("Collapse Tree"), sub { $tree->collapse_recursive(undef) } ], reload => [ N("Toggle between flat and group sorted"), sub { invbool(\$common->{state}{flat}); $common->{rebuild_tree}->() } ]); foreach my $ic (@{$common->{icons} || []}) { push @toolbar, ($ic->{icon} => [ $ic->{help}, sub { @@ -535,8 +535,7 @@ sub ask_browse_tree_info_given_widgets { my @unsel = $common->{grep_unselected}(@l); my @p = @unsel ? #- not all is selected, select all if no option to potentially override - (exists $common->{partialsel_unsel} && $common->{partialsel_unsel}->(\@unsel, \@l) ? difference2(\@l, \@unsel) : @unsel) - : @l; + (exists $common->{partialsel_unsel} && $common->{partialsel_unsel}->(\@unsel, \@l) ? difference2(\@l, \@unsel) : @unsel) : @l; $common->{toggle_nodes}($set_leaf_state, @p); &$update_size; $parent = $curr; diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm index c90913c62..8f1763151 100644 --- a/perl-install/network/adsl.pm +++ b/perl-install/network/adsl.pm @@ -93,7 +93,7 @@ sub adsl_conf { adsl_conf_step_1: adsl_ask_info ($adsl, $netc, $intf) or return; adsl_conf_step_2: - $adsl_type =~ /speedtouch|eci/ or conf_network_card($netc, $intf, 'static' , '10.0.0.10') or goto adsl_conf_step_1; + $adsl_type =~ /speedtouch|eci/ or conf_network_card($netc, $intf, 'static', '10.0.0.10') or goto adsl_conf_step_1; adsl_conf_backend($adsl, $netc, $adsl_type); 1; } diff --git a/perl-install/network/drakfirewall.pm b/perl-install/network/drakfirewall.pm index 7e1e225aa..1611626e5 100644 --- a/perl-install/network/drakfirewall.pm +++ b/perl-install/network/drakfirewall.pm @@ -162,7 +162,7 @@ where port is between 1 and 65535.", $invalid_port)); return 1; } }, - }}, + } }, [ { text => N("Everything (no firewall)"), val => \$disabled, type => 'bool' }, (map { { text => $_->{name}, val => \$_->{on}, type => 'bool', disabled => sub { $disabled } } } @l), diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm index ae5c8755b..3754cfd4a 100644 --- a/perl-install/network/ethernet.pm +++ b/perl-install/network/ethernet.pm @@ -27,11 +27,11 @@ sub configure_cable { if ($::expert) { my @m = ( { description => "dhcpcd", - c => 1}, + c => 1 }, { description => "dhcpxd", - c => 3}, + c => 3 }, { description => "dhcp-client", - c => 4}, + c => 4 }, ); if (my $f = $in->ask_from_listf(N("Connect to the Internet"), N("Which dhcp client do you want to use? diff --git a/perl-install/network/isdn.pm b/perl-install/network/isdn.pm index 029f75bcf..9029cc7c0 100644 --- a/perl-install/network/isdn.pm +++ b/perl-install/network/isdn.pm @@ -181,9 +181,9 @@ sub isdn_ask_info { sub isdn_ask_protocol { my @toto = ( { description => $::expert ? N("Europe protocol (EDSS1)") : N("Europe protocol"), - protokol => 2}, + protokol => 2 }, { description => $::expert ? N("Protocol for the rest of the world\nNo D-Channel (leased lines)") : N("Protocol for the rest of the world"), - protokol => 3} + protokol => 3 } ); my $e = $in->ask_from_listf(N("ISDN Configuration"), N("Which protocol do you want to use?"), diff --git a/perl-install/network/isdn_consts.pm b/perl-install/network/isdn_consts.pm index 831bb6f25..eff83b0b5 100644 --- a/perl-install/network/isdn_consts.pm +++ b/perl-install/network/isdn_consts.pm @@ -169,7 +169,7 @@ package network::isdn; # $Id$ driver => 'hisax', type => '15', irq => '9', - io=> '0xd80', + io => '0xd80', card => 'isa', }, { description => "Sedlbauer PC/104 (ISA)", #15 irq, io @@ -206,7 +206,7 @@ package network::isdn; # $Id$ driver => 'hisax', type => '16', irq => '9', - io=> '0xd80', + io => '0xd80', card => 'isa', }, { description => "MIC card (ISA)", #17 irq, io diff --git a/perl-install/network/modem.pm b/perl-install/network/modem.pm index 6bde79dff..1003cc637 100644 --- a/perl-install/network/modem.pm +++ b/perl-install/network/modem.pm @@ -12,7 +12,7 @@ use MDK::Common::Globals "network", qw($in $prefix); @ISA = qw(Exporter); @EXPORT = qw(pppConfig); -sub configure{ +sub configure { my ($netcnx, $mouse, $netc) = @_; $netcnx->{type}='modem'; $netcnx->{$netcnx->{type}}={}; diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 592092a06..a472f0a2c 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -34,13 +34,13 @@ sub intro { } my @l = ( !$connected && -e $connect_file ? { description => N("Connect"), - c => 1} : (), + c => 1 } : (), $connected && -e $disconnect_file ? { description => N("Disconnect"), - c => 2} : (), + c => 2 } : (), { description => N("Configure the connection"), - c => 3}, + c => 3 }, { description => N("Cancel"), - c => 4}, + c => 4 }, ); my $e = $in->ask_from_listf(N("Internet connection & configuration"), translate($text), @@ -184,7 +184,7 @@ If you don't want to use the auto detection, deselect the checkbox. my $set_default; my %conf; $conf{$_} = $netc->{autodetect}{$_} ? 1 : 0 foreach 'modem', 'winmodem', 'adsl', 'cable', 'lan'; - $conf{isdn} = $netc->{autodetect}{isdn}{description} ? 1: 0; + $conf{isdn} = $netc->{autodetect}{isdn}{description} ? 1 : 0; # my @l = ( # [N("Normal modem connection"), $netc->{autodetect}{modem}, N_("detected on port %s"), \$conf{modem}], # [N("ISDN connection"), $netc->{autodetect}{isdn}{description}, N_("detected %s"), \$conf{isdn}], @@ -229,14 +229,14 @@ If you don't want to use the auto detection, deselect the checkbox. } elsif ($nb > 1) { $in->ask_from(N("Network Configuration Wizard"), N("You have configured multiple ways to connect to the Internet.\nChoose the one you want to use.\n\n" . if_(!$::isStandalone, "You may want to configure some profiles after the installation, in the Mandrake Control Center")), - [ { label => N("Internet connection"), val => \$netc->{internet_cnx_choice}, list => [ keys %{$netc->{internet_cnx}} ]} ] + [ { label => N("Internet connection"), val => \$netc->{internet_cnx_choice}, list => [ keys %{$netc->{internet_cnx}} ] } ] ) or goto step_2; } elsif ($nb == 1) { $netc->{internet_cnx_choice} = (keys %{$netc->{internet_cnx}})[0]; } member($netc->{internet_cnx_choice}, ('adsl', 'isdn')) and $netc->{at_boot} = $in->ask_yesorno(N("Network Configuration Wizard"), N("Do you want to start the connection at boot?")); - if ($netc->{internet_cnx_choice} ) { + if ($netc->{internet_cnx_choice}) { write_cnx_script($netc); $netcnx->{type} = $netc->{internet_cnx}{$netc->{internet_cnx_choice}}{type}; } else { @@ -268,8 +268,8 @@ If you don't want to use the auto detection, deselect the checkbox. The configuration will now be applied to your system. ") . if_($::isStandalone && $in->isa('interactive_gtk'), -N("After this is done, we recommend that you restart your X environment to avoid any hostname-related problems.")) - : N("Problems occured during configuration. +N("After this is done, we recommend that you restart your X environment to avoid any hostname-related problems.")) : + N("Problems occured during configuration. Test your connection via net_monitor or mcc. If your connection doesn't work, you might want to relaunch the configuration."); if ($::isWizard) { $::Wizard_no_previous=1; @@ -409,7 +409,7 @@ ISDNCardVendor=$isdn->{vendor} ISDNId=$isdn->{id} ISDNProvider=$netc->{DOMAINNAME2} ISDNProviderPhone=$isdn->{phone_out} -ISDNProviderDomain=" . do { $netc->{DOMAINNAME2} =~ /\.(.*)/; $1} . " +ISDNProviderDomain=" . do { $netc->{DOMAINNAME2} =~ /\.(.*)/; $1 } . " ISDNProviderDNS1=$netc->{dnsServer2} ISDNProviderDNS2=$netc->{dnsServer3} ISDNDialing=$isdn->{dialing_mode} diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm index 8b7fb7ce0..3c4a75895 100644 --- a/perl-install/network/network.pm +++ b/perl-install/network/network.pm @@ -228,7 +228,7 @@ sub netmask { $ip =~ $ip_regexp; if ($1 >= 1 && $1 < 127) { "255.0.0.0"; #-1.0.0.0 to 127.0.0.0 - } elsif ($1 >= 128 && $1 <= 191){ + } elsif ($1 >= 128 && $1 <= 191) { "255.255.0.0"; #-128.0.0.0 to 191.255.0.0 } elsif ($1 >= 192 && $1 <= 223) { "255.255.255.0"; diff --git a/perl-install/network/shorewall.pm b/perl-install/network/shorewall.pm index d93817e9e..a173c13f8 100644 --- a/perl-install/network/shorewall.pm +++ b/perl-install/network/shorewall.pm @@ -111,14 +111,14 @@ sub write { [ 'all', 'all', 'REJECT', 'info' ], ); set_config_file('rules', - (map - { map_each { [ 'ACCEPT', $_, 'fw', $::a, join(',', @$::b), '-' ] } %ports_by_proto } - ('net', if_($conf->{masquerade}, 'masq'), if_($conf->{loc_interface}, 'loc'))), + (map { + map_each { [ 'ACCEPT', $_, 'fw', $::a, join(',', @$::b), '-' ] } %ports_by_proto + } ('net', if_($conf->{masquerade}, 'masq'), if_($conf->{loc_interface}, 'loc'))), if_($conf->{masquerade}, map { [ 'ACCEPT', 'masq', 'fw', $_, join(',', @drakgw_ports), '-' ] } 'tcp', 'udp'), if_($conf->{masquerade}, map { [ 'ACCEPT', 'fw', 'masq', $_, join(',', @internal_ports), '-' ] } 'tcp', 'udp'), ); set_config_file('masq', - $conf->{masquerade} ? [ $conf->{net_interface}, $conf->{masquerade}{subnet} ]: (), + $conf->{masquerade} ? [ $conf->{net_interface}, $conf->{masquerade}{subnet} ] : (), ); if ($conf->{disabled}) { diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm index 108cfee83..e1db41702 100644 --- a/perl-install/network/tools.pm +++ b/perl-install/network/tools.pm @@ -54,7 +54,7 @@ sub ask_connect_now { $up = connected(); } my $m = $up ? (N("The system is now connected to Internet.") . - if_($::isInstall, N("For security reason, it will be disconnected now.")) ) : + if_($::isInstall, N("For security reason, it will be disconnected now."))) : N("The system doesn't seem to be connected to internet. Try to reconfigure your connection."); if ($::isWizard) { @@ -82,7 +82,7 @@ sub ask_info2 { $in->ask_from(N("Connection Configuration"), N("Please fill or check the field below"), [ - if__($cnx->{irq}, { label => N("Card IRQ"), val => \$cnx->{irq} }) , + if__($cnx->{irq}, { label => N("Card IRQ"), val => \$cnx->{irq} }), if__($cnx->{mem}, { label => N("Card mem (DMA)"), val => \$cnx->{mem} }), if__($cnx->{io}, { label => N("Card IO"), val => \$cnx->{io} }), if__($cnx->{io0}, { label => N("Card IO_0"), val => \$cnx->{io0} }), @@ -93,8 +93,8 @@ sub ask_info2 { if__($netc->{dnsServer2}, { label => N("Provider dns 1 (optional)"), val => \$netc->{dnsServer2} }), if__($netc->{dnsServer3}, { label => N("Provider dns 2 (optional)"), val => \$netc->{dnsServer3} }), if__($cnx->{vpivci}, { label => N("Choose your country"), val => \$netc->{vpivci}, list => detect_timezone() }), - if__($cnx->{dialing_mode}, { label => N("Dialing mode"), val => \$cnx->{dialing_mode},list=>["auto","manual"]}), - if__($cnx->{speed}, { label => N("Connection speed"), val => \$cnx->{speed}, list => ["64 Kb/s", "128 Kb/s"]}), + if__($cnx->{dialing_mode}, { label => N("Dialing mode"), val => \$cnx->{dialing_mode},list => ["auto","manual"] }), + if__($cnx->{speed}, { label => N("Connection speed"), val => \$cnx->{speed}, list => ["64 Kb/s", "128 Kb/s"] }), if__($cnx->{huptimeout}, { label => N("Connection timeout (in sec)"), val => \$cnx->{huptimeout} }), if__($cnx->{login}, { label => N("Account Login (user name)"), val => \$cnx->{login} }), if__($cnx->{passwd}, { label => N("Account Password"), val => \$cnx->{passwd}, hidden => 1 }), @@ -219,7 +219,7 @@ sub connected2 { } } -sub disconnected { } +sub disconnected {} sub write_initscript { diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm index a386630e0..bdbfc4ae7 100644 --- a/perl-install/partition_table.pm +++ b/perl-install/partition_table.pm @@ -199,10 +199,10 @@ arch() !~ /sparc/ ? ( 0x1e => 'vfat', 0x82 => 'swap', 0x83 => 'ext2', - 0x183=> 'reiserfs', - 0x283=> 'xfs', - 0x383=> 'jfs', - 0x483=> 'ext3', + 0x183 => 'reiserfs', + 0x283 => 'xfs', + 0x383 => 'jfs', + 0x483 => 'ext3', 0x401 => 'apple', 0x402 => 'hfs', ); @@ -232,10 +232,10 @@ sub isRawLVM { $_[0]{type} == 0x8e } sub isRawRAID { $_[0]{type} == 0xfd } sub isSwap { type2fs($_[0]) eq 'swap' } sub isExt2 { type2fs($_[0]) eq 'ext2' } -sub isDos { arch() !~ /^sparc/ && $ {{ 1=>1, 4=>1, 6=>1 }}{$_[0]{type}} } -sub isWin { $ {{ 0xb=>1, 0xc=>1, 0xe=>1, 0x1b=>1, 0x1c=>1, 0x1e=>1 }}{$_[0]{type}} } +sub isDos { arch() !~ /^sparc/ && ${{ 1 => 1, 4 => 1, 6 => 1 }}{$_[0]{type}} } +sub isWin { ${{ 0xb => 1, 0xc => 1, 0xe => 1, 0x1b => 1, 0x1c => 1, 0x1e => 1 }}{$_[0]{type}} } sub isFat { isDos($_[0]) || isWin($_[0]) } -sub isSunOS { arch() =~ /sparc/ && $ {{ 0x1=>1, 0x2=>1, 0x4=>1, 0x6=>1, 0x7=>1, 0x8=>1 }}{$_[0]{type}} } +sub isSunOS { arch() =~ /sparc/ && ${{ 0x1 => 1, 0x2 => 1, 0x4 => 1, 0x6 => 1, 0x7 => 1, 0x8 => 1 }}{$_[0]{type}} } sub isNT { arch() !~ /^sparc/ && $_[0]{type} == 0x7 } sub isApple { type2fs($_[0]) eq 'apple' && defined $_[0]{isDriver} } sub isAppleBootstrap { type2fs($_[0]) eq 'apple' && defined $_[0]{isBoot} } @@ -600,7 +600,7 @@ sub write { } $hd->kernel_read; foreach (@magic_parts) { - syscall_('mount', , $_->{real_mntpoint}, type2fs($_), c::MS_MGC_VAL()) or log::l(N("mount failed: ") . "$!"); + syscall_('mount', $_->{real_mntpoint}, type2fs($_), c::MS_MGC_VAL()) or log::l(N("mount failed: ") . "$!"); } } $hd->{needKernelReread} = 0; diff --git a/perl-install/partition_table/bsd.pm b/perl-install/partition_table/bsd.pm index 431d17f1f..dc85ab3cf 100644 --- a/perl-install/partition_table/bsd.pm +++ b/perl-install/partition_table/bsd.pm @@ -47,8 +47,8 @@ my ($main_format, $main_fields) = list2kv( S => 'npartitions', I => 'bbsize', I => 'sbsize', - a128=> 'partitions', - a236=> 'blank', + a128 => 'partitions', + a236 => 'blank', ); $main_format = join '', @$main_format; diff --git a/perl-install/partition_table/lvm_PV.pm b/perl-install/partition_table/lvm_PV.pm index 4a55d3810..dc84e74dc 100644 --- a/perl-install/partition_table/lvm_PV.pm +++ b/perl-install/partition_table/lvm_PV.pm @@ -29,7 +29,7 @@ sub read { sysread F, my $tmp, length $magic or die "error reading magic number on disk $hd->{file}"; $tmp eq $magic or die "bad magic number on disk $hd->{file}"; - [ ]; + []; } sub write { diff --git a/perl-install/printer.pm b/perl-install/printer.pm index 2e426107c..df989355b 100644 --- a/perl-install/printer.pm +++ b/perl-install/printer.pm @@ -2022,8 +2022,7 @@ sub configure_hpoj { } else { print CONFIG "\n". - "# The serial number of the device that was originally detected on this port:\n" - ; + "# The serial number of the device that was originally detected on this port:\n"; if ($bus=~/^[pu]/) { print CONFIG "# Comment out if you want to disable serial-number matching.\n"; @@ -2096,7 +2095,7 @@ sub configure_hpoj { return $ptaldevice; } -sub parport_addr{ +sub parport_addr { # auto-detect the parallel port addresses my ($device) = @_; $device =~ m!^/dev/lp(\d+)$! or diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm index 96ee46806..7c6d411b6 100644 --- a/perl-install/printerdrake.pm +++ b/perl-install/printerdrake.pm @@ -329,13 +329,13 @@ This wizard will help you to install your printer(s) connected to this computer. If you have printer(s) connected to this machine, Please plug it/them in on this computer and turn it/them on so that it/they can be auto-detected. - Click on \"Next\" when you are ready, and on \"Cancel\" when you do not want to set up your printer(s) now.")))}, + Click on \"Next\" when you are ready, and on \"Cancel\" when you do not want to set up your printer(s) now."))) }, [ { text => N("Auto-detect printers connected to this machine"), type => 'bool', - val => \$autodetectlocal}, + val => \$autodetectlocal }, ($havelocalnetworks ? ({ text => N("Auto-detect printers connected directly to the local network"), type => 'bool', - val => \$autodetectnetwork}, + val => \$autodetectnetwork }, ($printer->{SPOOLER} ne "pdq" ? { text => N("Auto-detect printers connected to machines running Microsoft Windows"), type => 'bool', val => \$autodetectsmb } : ())) : ()) @@ -631,7 +631,7 @@ sub setup_local_autoscan { } return 0; } - }}, + } }, [ ($::expert ? { val => \$device } : ()), @@ -740,7 +740,7 @@ complete => sub { "$modelinfo->{MANUFACTURER} $modelinfo->{MODEL}", $printer->{currentqueue}{connect}, $auto_hpoj, ({port => $printer->{currentqueue}{connect}, - val => $modelinfo})); + val => $modelinfo })); 1; } @@ -871,8 +871,8 @@ sub setup_smb { { label => N("Auto-detected"), val => \$menuchoice, list => \@menuentrieslist, not_edit => 1, format => \&translate, sort => 0, - allow_empty_list => 1, type => 'combo' } - : ()) ], + allow_empty_list => 1, type => 'combo' } : + ()) ], complete => sub { if (!network::is_ip($smbserverip) && $smbserverip ne "") { $in->ask_warn('', N("IP address should be in format 1.2.3.4")); @@ -1133,8 +1133,8 @@ sub setup_socket { ($autodetect ? { val => \$menuchoice, list => \@menuentrieslist, not_edit => 0, format => \&translate, sort => 0, - allow_empty_list => 1, type => 'list' } - : ()) + allow_empty_list => 1, type => 'list' } : + ()) ] ); @@ -1169,7 +1169,7 @@ sub setup_socket { "$modelinfo->{MANUFACTURER} $modelinfo->{MODEL}", $printer->{currentqueue}{connect}, $auto_hpoj, ({port => $printer->{currentqueue}{connect}, - val => $modelinfo})); + val => $modelinfo })); 1; } @@ -1258,7 +1258,7 @@ complete => sub { "$modelinfo->{MANUFACTURER} $modelinfo->{MODEL}", $printer->{currentqueue}{connect}, $auto_hpoj, ({port => $printer->{currentqueue}{connect}, - val => $modelinfo})); + val => $modelinfo })); } 1; @@ -2092,7 +2092,7 @@ You should make sure that the page size and the ink type/printing mode (if avail } } return (0); - } ); + }); } # Read out the user's choices and generate the appropriate command # line arguments @@ -2209,7 +2209,7 @@ Note: the photo test page can take a rather long time to get printed and on lase } return 0; } - }}, + } }, [ { text => N("Standard test page"), type => 'bool', val => \$standard }, @@ -2272,7 +2272,7 @@ It may take some time before the printer starts.\n"); and return 1; } } else { - return ($::isWizard ? $res1 : 1) ; + return ($::isWizard ? $res1 : 1); } return 2; } @@ -2512,9 +2512,9 @@ You can also type a new name or skip this printer.", return (1,0); # Let the user correct the name } return 0; - }} + } } }, - [{label => N("New printer name"),val => \$newqueue}]))) { + [{label => N("New printer name"),val => \$newqueue }]))) { { my $w = $in->wait_message(N("Printerdrake"), N("Transferring %s...", $oldqueue)); @@ -2553,7 +2553,7 @@ sub start_network { do { my $ret = &$upNetwork(); undef $upNetwork; sleep(1); - $ret}); + $ret }); } else { return printer::start_service("network"); } @@ -2587,7 +2587,7 @@ sub check_network { N("You are going to configure a remote printer. This needs working network access, but your network is not configured yet. If you go on without network configuration, you will not be able to use the printer which you are configuring now. How do you want to proceed?"), [ { val => \$choice, type => 'list', list => [ N("Configure the network now"), - N("Go on without configuring the network") ]} ] )) { + N("Go on without configuring the network") ] } ])) { if ($choice eq N("Configure the network now")) { if ($::isInstall) { require network::netconnect; @@ -3117,12 +3117,12 @@ sub main { my @printerlist = ((sort((map { $printer->{configured}{$_}{queuedata}{menuentry} . ($_ eq $printer->{DEFAULT} ? - N(" (Default)") : (""))} + N(" (Default)") : ("")) } keys(%{$printer->{configured} || {}})), ($printer->{SPOOLER} eq "cups" ? - printer::get_cups_remote_queues($printer) - : ()))) + printer::get_cups_remote_queues($printer) : + ()))) ); my $noprinters = ($#printerlist < 0); # Position the cursor where it were before (in case @@ -3466,7 +3466,7 @@ What do you want to modify on this printer?", N("Print test pages"), N("Know how to use this printer"), ($printer->{configured}{$queue} ? - N("Remove printer") : ()) ] } ] ) ) { + N("Remove printer") : ()) ] } ])) { # Stay in the queue edit window until the user clicks "Close" # or deletes the queue $editqueue = 1; diff --git a/perl-install/resize_fat/any.pm b/perl-install/resize_fat/any.pm index f811e7159..ccc0d4845 100644 --- a/perl-install/resize_fat/any.pm +++ b/perl-install/resize_fat/any.pm @@ -23,11 +23,11 @@ $UNMOVEABLE = 8; #- returns the number of clusters for a given filesystem type sub min_cluster_count($) { my ($fs) = @_; - (1 << $ {{ FAT16 => 12, FAT32 => 12 }}{$fs->{fs_type}}) - 12; + (1 << ${{ FAT16 => 12, FAT32 => 12 }}{$fs->{fs_type}}) - 12; } sub max_cluster_count($) { my ($fs) = @_; - (1 << $ {{ FAT16 => 16, FAT32 => 28 }}{$fs->{fs_type}}) - 11; + (1 << ${{ FAT16 => 16, FAT32 => 28 }}{$fs->{fs_type}}) - 11; } diff --git a/perl-install/resize_fat/directory.pm b/perl-install/resize_fat/directory.pm index 455f579a2..1f2b1ede6 100644 --- a/perl-install/resize_fat/directory.pm +++ b/perl-install/resize_fat/directory.pm @@ -35,7 +35,7 @@ sub entry_size { $psizeof_format } sub traverse($$$) { my ($directory, $curr_dir_name, $f) = @_; - for (my $i = 0; ; $i++) { + for (my $i = 0;; $i++) { my $raw = \substr($directory, $i * $psizeof_format, $psizeof_format); #- empty entry means end of directory diff --git a/perl-install/resize_fat/main.pm b/perl-install/resize_fat/main.pm index dd3e720e5..ba6ac1bc7 100644 --- a/perl-install/resize_fat/main.pm +++ b/perl-install/resize_fat/main.pm @@ -21,7 +21,7 @@ use resize_fat::any; #- - reads in the boot sector/partition info., and tries to make some sense of it sub new($$$) { my ($type, $device, $fs_name) = @_; - my $fs = { device => $device, fs_name => $fs_name } ; + my $fs = { device => $device, fs_name => $fs_name }; eval { resize_fat::io::open($fs); diff --git a/perl-install/scanner.pm b/perl-install/scanner.pm index 698d67c68..9d85129cc 100755 --- a/perl-install/scanner.pm +++ b/perl-install/scanner.pm @@ -64,7 +64,7 @@ sub detect { DESCRIPTION => $_->{description}, #id => $_->{id}, #vendor => $_->{vendor}, - }}; + } }; ++$i; } foreach (grep { $_->{media_type} =~ /scanner/ } detect_devices::getSCSI()) { @@ -181,8 +181,8 @@ sub updateScannerDBfromSane { mfg => sub { $mfg = $val; $name = undef },#bug when a new mfg comes. should called $fs->{ $name }(); but ?? model => sub { unless ($name) { $name = $val; next } - $name = (member($mfg, keys %$sane2DB)) - ? (ref $sane2DB->{ $mfg }) ? $sane2DB->{ $mfg }($name) : "$sane2DB->{ $mfg }|$name" : "$mfg|$name"; + $name = (member($mfg, keys %$sane2DB)) ? + (ref $sane2DB->{ $mfg}) ? $sane2DB->{ $mfg}($name) : "$sane2DB->{ $mfg }|$name" : "$mfg|$name"; if (member($name, keys %$scanner::scannerDB)) { print "#[$name] already in ScannerDB!\n"; } else { @@ -200,7 +200,7 @@ sub updateScannerDBfromSane { s/\s+$//; /^\;/ and next; ($cmd, $val) = /:(\S+)\s*\"([^\;]*)\"/ or next; #log::l("bad line $lineno ($_)"), next; - my $f = $fs->{ $cmd }; + my $f = $fs->{ $cmd}; $f ? $f->() : log::l("unknown line $lineno ($_)"); } $fs->{model}(); # the last one diff --git a/perl-install/security/main.pm b/perl-install/security/main.pm index edfe34bce..40dae3daf 100644 --- a/perl-install/security/main.pm +++ b/perl-install/security/main.pm @@ -81,8 +81,8 @@ sub draksec_main { } # Connect the signals - $window->signal_connect('delete_event', sub { $window->destroy(); } ); - $window->signal_connect('destroy', sub { my_gtk->exit(); } ); + $window->signal_connect('delete_event', sub { $window->destroy(); }); + $window->signal_connect('destroy', sub { my_gtk->exit(); }); $window->add(my $vbox = gtkshow(new Gtk::VBox(0, 0))); @@ -100,7 +100,7 @@ sub draksec_main { [ new Gtk::Label(N("Security Alerts:")), my $secadmin_check = new Gtk::CheckButton ], [ new Gtk::Label(N("Security Administrator:")), - my $secadmin_entry = new Gtk::Entry ] )), + my $secadmin_entry = new Gtk::Entry ])), new Gtk::Label(N("Basic"))); $secadmin_entry->set_text($msec->get_check_value("MAIL_USER")); @@ -210,10 +210,10 @@ sub draksec_main { remove_wait_msg($w); my_gtk->exit(0); - } ); + }); my $bcancel = gtksignal_connect(new Gtk::Button(N("Cancel")), - 'clicked' => sub { my_gtk->exit(0) } ); + 'clicked' => sub { my_gtk->exit(0) }); gtkpack_($vbox, 1, gtkshow($notebook), 0, gtkadd(gtkadd(gtkshow(new Gtk::HBox(0, 0)), diff --git a/perl-install/security/msec.pm b/perl-install/security/msec.pm index 4392b0038..94af85fa3 100644 --- a/perl-install/security/msec.pm +++ b/perl-install/security/msec.pm @@ -142,7 +142,8 @@ sub get_secure_level { ${{ getVarsFromSh("$::prefix/etc/sysconfig/msec") }}{SECURE_LEVEL}; # || $ENV{SECURE_LEVEL}; - return $sec_levels[$num_level];} + return $sec_levels[$num_level]; +} sub get_seclevel_list { qw(Standard High Higher Paranoid); diff --git a/perl-install/services.pm b/perl-install/services.pm index ee6ff2d5c..c48518816 100644 --- a/perl-install/services.pm +++ b/perl-install/services.pm @@ -226,7 +226,7 @@ sub ask_standalone_gtk { push @$on_services, $service if !member($service, @$on_services); } else { @$on_services = grep { $_ ne $service } @$on_services; - }}), member($service, @$on_services))), + } }), member($service, @$on_services))), map { my $a = $_; gtkpack__(new Gtk::HBox(0,0), gtksignal_connect(new Gtk::Button(translate($a)), clicked => sub { my $c = "service $service " . (lc($a) eq "start" ? "restart" : lc($a)) . " 2>&1"; local $_ = `$c`; s/\033\[[^mG]*[mG]//g; diff --git a/perl-install/standalone.pm b/perl-install/standalone.pm index a97267669..b758184ed 100644 --- a/perl-install/standalone.pm +++ b/perl-install/standalone.pm @@ -122,7 +122,7 @@ sub explanations { c::syslog(c::LOG_INFO()|c::LOG_LOCAL1(), "@_") } @builtin_functs = qw(chmod chown unlink link symlink rename system); @drakx_modules = qw(Xconfig::card Xconfig::default Xconfig::main Xconfig::monitor Xconfig::parse Xconfig::proprietary Xconfig::resolution_and_depth Xconfig::screen Xconfig::test Xconfig::various Xconfig::xfree Xconfig::xfree3 Xconfig::xfree4 Xconfig::xfreeX any bootloader bootlook c class_discard commands crypto detect_devices devices diskdrake diskdrake::hd_gtk diskdrake::interactive diskdrake::removable diskdrake::removable_gtk diskdrake::smbnfs_gtk fs fsedit http keyboard lang log loopback lvm modparm modules mouse my_gtk network network::adsl network::ethernet network::isdn_consts network::isdn network::modem network::netconnect network::network network::nfs network::smb network::tools partition_table partition_table_bsd partition_table::dos partition_table::empty partition_table::gpt partition_table::mac partition_table::raw partition_table::sun printer printerdrake proxy raid run_program scanner services steps swap timezone network::drakfirewall network::shorewall); -$SIG{SEGV} = sub { ($progname = $0) =~ s|.*/||; exec("drakbug --incident $progname")}; +$SIG{SEGV} = sub { ($progname = $0) =~ s|.*/||; exec("drakbug --incident $progname") }; sub import { ($standalone_name = $0) =~ s|.*/||; diff --git a/perl-install/steps.pm b/perl-install/steps.pm index e5a24413b..1f74e282b 100644 --- a/perl-install/steps.pm +++ b/perl-install/steps.pm @@ -40,7 +40,7 @@ if_((arch() !~ /alpha/) && (arch() !~ /ppc/), $h{entered} = 0; $h{onError} = $installSteps[$i + 2 * $h{onError}]; $h{reachable} = !$h{needs}; - $installSteps{ $installSteps[$i] } = \%h; + $installSteps{ $installSteps[$i]} = \%h; push @orderedInstallSteps, $installSteps[$i]; } $installSteps{first} = $installSteps[0]; diff --git a/perl-install/ugtk.pm b/perl-install/ugtk.pm index fac3e1646..49a0a7ab6 100644 --- a/perl-install/ugtk.pm +++ b/perl-install/ugtk.pm @@ -48,7 +48,7 @@ sub gtkpack__ { gtkpowerpack(0, 1, @_) } sub gtkpack2 { gtkpowerpack(1, 0, @_) } sub gtkpack2_ { gtkpowerpack('arg', 0, @_) } sub gtkpack2__ { gtkpowerpack(0, 0, @_) } -sub gtkpack3 { gtkpowerpack($a?1:0, 0, @_) } +sub gtkpack3 { gtkpowerpack($a ?1 :0, 0, @_) } sub gtkput { $_[0]->put(gtkshow($_[1]), $_[2], $_[3]); $_[0] } sub gtkpixmap { new Gtk::Pixmap(gdkpixmap(@_)) } sub gtkresize { $_[0]->window->resize($_[1], $_[2]); $_[0] } @@ -567,9 +567,8 @@ sub gtkicons_labels_widget { if (!$dbl_area->{state} || $state != $dbl_area->{state}) { $dbl_area->{state} = $state; fill_tiled($darea, $dbl_area, $background, $x_back2, $y_back2, $dx, $dy); - ($state ? $pixbuf_h : $pixbuf) - ->render_to_drawable($dbl_area, $darea->style->fg_gc('normal'), 0, 0, 0, 0, - $pixbuf->get_width, $pixbuf->get_height, 'normal', 0, 0); + ($state ? $pixbuf_h : $pixbuf)->render_to_drawable($dbl_area, $darea->style->fg_gc('normal'), 0, 0, 0, 0, + $pixbuf->get_width, $pixbuf->get_height, 'normal', 0, 0); $dbl_area->draw_pixmap($darea->style->bg_gc('normal'), ($state ? $pix->[1] : $pix->[0]), 0, 0, ($dx - $width)/2, $y_round, $width, $height); } @@ -752,7 +751,7 @@ sub gtkpowerpack { } #- Get and pack the widget (create it if necessary when it is a label...) my $widget = ref($_[0]) ? shift : new Gtk::Label(shift); - if ($attr{pack_end}) { $box->pack_end($widget, $attr{expand}, $attr{fill}, $attr{padding})} + if ($attr{pack_end}) { $box->pack_end($widget, $attr{expand}, $attr{fill}, $attr{padding}) } else { $box->pack_start($widget, $attr{expand}, $attr{fill}, $attr{padding}) } $widget->show; } @@ -862,8 +861,8 @@ sub compute_icons { bcl_init: @dx2 = undef; bcl: - @dx = map{ $_->{dx} } @tab[$index..$index+$nb]; - $dy[$index] = max(map{ $_->{dy} } @tab[$index..$index+$nb]); + @dx = map { $_->{dx} } @tab[$index..$index+$nb]; + $dy[$index] = max(map { $_->{dy} } @tab[$index..$index+$nb]); foreach (0..$#dx) { if ($dx[$_] > $dx2[$_]) { $dx2[$_] = $dx[$_] } else { $dx[$_] = $dx2[$_] } } diff --git a/perl-install/unused/scsi.pm b/perl-install/unused/scsi.pm index 8e20f7d70..bd0df92b1 100644 --- a/perl-install/unused/scsi.pm +++ b/perl-install/unused/scsi.pm @@ -61,7 +61,7 @@ sub ideGetDevices { #- Great. 2.2 kernel, things are much easier and less error prone. foreach my $d (glob_('/proc/ide/hd*')) { my ($t) = chomp_(cat_("$d/media")); - my $type = $ {{disk => 'hd', cdrom => 'cdrom', tape => 'tape', floppy => 'fd'}}{$t} or next; + my $type = ${{ disk => 'hd', cdrom => 'cdrom', tape => 'tape', floppy => 'fd' }}{$t} or next; my ($info) = chomp_(cat_("$d/model")); $info ||= "(none)"; my $num = ord (($d =~ /(.)$/)[0]) - ord 'a'; |