summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive_stdio.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-11-12 01:24:39 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-11-12 01:24:39 +0000
commit7d8f11b58764859230367055deda3489fc09412f (patch)
tree6961a38d59d54670c8e1d942dbef44449c18a9c1 /perl-install/interactive_stdio.pm
parent855cc85f5558115010b9629246b014b83fcfe2c3 (diff)
downloaddrakx-backup-do-not-use-7d8f11b58764859230367055deda3489fc09412f.tar
drakx-backup-do-not-use-7d8f11b58764859230367055deda3489fc09412f.tar.gz
drakx-backup-do-not-use-7d8f11b58764859230367055deda3489fc09412f.tar.bz2
drakx-backup-do-not-use-7d8f11b58764859230367055deda3489fc09412f.tar.xz
drakx-backup-do-not-use-7d8f11b58764859230367055deda3489fc09412f.zip
no_comment
Diffstat (limited to 'perl-install/interactive_stdio.pm')
-rw-r--r--perl-install/interactive_stdio.pm20
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;
+