/usr/share/perl5/Debconf/FrontEnd/ScreenSize.pm is in debconf 1.5.42ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | #!/usr/bin/perl -w
# This file was preprocessed, do not edit!
package Debconf::FrontEnd::ScreenSize;
use strict;
use Debconf::Gettext;
use base qw(Debconf::FrontEnd);
sub init {
my $this=shift;
$this->SUPER::init(@_);
$this->resize; # Get current screen size.
$SIG{WINCH}=sub {
if (defined $this) {
$this->resize;
}
};
}
sub resize {
my $this=shift;
if (exists $ENV{LINES}) {
$this->screenheight($ENV{'LINES'});
$this->screenheight_guessed(0);
}
else {
my ($rows)=`stty -a 2>/dev/null` =~ m/rows (\d+)/s;
if ($rows) {
$this->screenheight($rows);
$this->screenheight_guessed(0);
}
else {
$this->screenheight(25);
$this->screenheight_guessed(1);
}
}
if (exists $ENV{COLUMNS}) {
$this->screenwidth($ENV{'COLUMNS'});
}
else {
my ($cols)=`stty -a 2>/dev/null` =~ m/columns (\d+)/s;
$this->screenwidth($cols || 80);
}
}
1
|