diff options
author | Sebastien Dupont <sdupont@mandriva.com> | 2001-10-11 13:26:48 +0000 |
---|---|---|
committer | Sebastien Dupont <sdupont@mandriva.com> | 2001-10-11 13:26:48 +0000 |
commit | bc2042cdc569b1721047fef25169d228bcdd775d (patch) | |
tree | e99c8ae86d0def5e8f60e666f7c4f64d3f56a252 /perl-install/standalone/drakfont | |
parent | 1e579a7463b7dd7b0f7397a40e6b3b37f20db67d (diff) | |
download | drakx-bc2042cdc569b1721047fef25169d228bcdd775d.tar drakx-bc2042cdc569b1721047fef25169d228bcdd775d.tar.gz drakx-bc2042cdc569b1721047fef25169d228bcdd775d.tar.bz2 drakx-bc2042cdc569b1721047fef25169d228bcdd775d.tar.xz drakx-bc2042cdc569b1721047fef25169d228bcdd775d.zip |
optimisation
Diffstat (limited to 'perl-install/standalone/drakfont')
-rwxr-xr-x | perl-install/standalone/drakfont | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/perl-install/standalone/drakfont b/perl-install/standalone/drakfont index 66b126df2..160ae318f 100755 --- a/perl-install/standalone/drakfont +++ b/perl-install/standalone/drakfont @@ -145,27 +145,32 @@ sub search_windows_font { return 0; } # TODO : handle replace like on the other function - if (!$replace) { - foreach ([\@list_fonts_win, "windows"], [\@list_fonts_winnt, "winnt"]) { - foreach my $i (@{$_[0]}) { - grep ( /$i$/, @font_list) || grep (/$i/, @installed_fonts) or push @font_list, "$win_dir/$_[1]/fonts/$i"; - } +# !$replace && grep(/$i/, @installed_fonts) and next; + +# if (!$replace) { + foreach $_ ([\@list_fonts_win, "windows"], [\@list_fonts_winnt, "winnt"]) { +# print "totoottoootototo (@{$_[0]}) \n"; + foreach my $i (@{$_[0]}) { + print "result__________ : $i \n"; + !$replace && grep(/$i/, @installed_fonts) and next; + grep ( /$i$/, @font_list) or push @font_list, "$win_dir/$_[1]/fonts/$i"; } + } # foreach my $i (@list_fonts_win) { # grep ( /$i$/, @font_list) || grep (/$i/, @installed_fonts) or push @font_list, "$win_dir/windows/fonts/$i"; # foreach my $i (@list_fonts_winnt) { # grep ( /$i$/, @font_list) || grep (/$i/, @installed_fonts) or push @font_list, "$win_dir/winnt/fonts/$i"; # } - } else { +# } else { # foreach ([\@list_fonts_win, "windows"], [\@list_fonts_winnt, "winnt"]) { #TODO : add a foreach to factorize - foreach my $i (@list_fonts_win) { - grep ( /$i$/, @font_list) or push @font_list, "$win_dir/windows/fonts/$i"; - } - foreach my $i (@list_fonts_winnt) { - grep ( /$i$/, @font_list) or push @font_list, "$win_dir/winnt/fonts/$i"; - } - } +# foreach my $i (@list_fonts_win) { +# grep ( /$i$/, @font_list) or push @font_list, "$win_dir/windows/fonts/$i"; +# } +# foreach my $i (@list_fonts_winnt) { +# grep ( /$i$/, @font_list) or push @font_list, "$win_dir/winnt/fonts/$i"; +# } +# } } 1; } |