diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-11-12 01:24:39 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-11-12 01:24:39 +0000 |
commit | 7d8f11b58764859230367055deda3489fc09412f (patch) | |
tree | 6961a38d59d54670c8e1d942dbef44449c18a9c1 /perl-install/interactive_stdio.pm | |
parent | 855cc85f5558115010b9629246b014b83fcfe2c3 (diff) | |
download | drakx-7d8f11b58764859230367055deda3489fc09412f.tar drakx-7d8f11b58764859230367055deda3489fc09412f.tar.gz drakx-7d8f11b58764859230367055deda3489fc09412f.tar.bz2 drakx-7d8f11b58764859230367055deda3489fc09412f.tar.xz drakx-7d8f11b58764859230367055deda3489fc09412f.zip |
no_comment
Diffstat (limited to 'perl-install/interactive_stdio.pm')
-rw-r--r-- | perl-install/interactive_stdio.pm | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/perl-install/interactive_stdio.pm b/perl-install/interactive_stdio.pm index d99ea990f..e37e71672 100644 --- a/perl-install/interactive_stdio.pm +++ b/perl-install/interactive_stdio.pm @@ -9,7 +9,7 @@ use vars qw(@ISA); use interactive; use common qw(:common); -1; +$| = 1; sub readln { my $l = <STDIN>; @@ -23,9 +23,10 @@ sub check_it { } sub ask_from_listW { - my ($o, $title, $messages, $list, $def) = @_; - my $i; + my ($o, $title_, $messages, $list, $def) = @_; + my ($title, @okcancel) = ref $title_ ? @$title_ : ($title_, _("Ok"), _("Cancel")); print map { "$_\n" } @$messages; + my $i; if (@$list < 10 && sum(map { length $_ } @$list) < 50) { my @l; @@ -81,10 +82,15 @@ sub ask_many_from_list_refW { $val; } - sub wait_messageW { my ($o, $title, $message) = @_; - print map { "$_\n" } @$message; + print join "\n", @$message; } -sub wait_message_nextW { print "$_[1]\n" } -sub wait_message_endW { print "Done\n" } +sub wait_message_nextW { + my $m = join "\n", @{$_[1]}; + print "\r$m", ' ' x (60 - length $m); +} +sub wait_message_endW { print "\nDone\n" } + +1; + |