Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
my @GENERALFAMILY_LIST;
my @WEIGHT_LIST;
my @SHAPE_LIST;
$DIALOGTITLE = '';
$DWIDTH = 70;
$SUFFIXPATH = '';
$result = 0;
my %PARSEHINTS;
my %F2G = ();
my $NOQUESTION = 0;
sub parse_all_hints_conf {
my $key = shift;
my $listptr = shift;
$PARSEHINTS{$key} = $listptr;
}
sub parse_all_hints_init {
@GENERALFAMILY_LIST = ('Roman', 'SansSerif', 'Typewriter', 'Symbol',
'Gothic', 'Mincho');
@WEIGHT_LIST = ('Medium', 'Bold', 'Semibold', 'Light', 'Semilight');
@SHAPE_LIST = ('Serif', 'NoSerif', 'Upright', 'Oblique', 'Italic',
'Condensed', 'Expanded');
%PARSEHINTS = ();
parse_all_hints_conf('GeneralFamily', \@GENERALFAMILY_LIST);
parse_all_hints_conf('Weight', \@WEIGHT_LIST);
parse_all_hints_conf('Shape', \@SHAPE_LIST);
}
sub parse_all_hints {
my @hints = ();
foreach my $c (keys(%Debian::Defoma::Font::Fobjs)) {
foreach my $f (defoma_font_get_fonts($c)) {
my @h = defoma_font_get_hints($c, $f);
next unless (@h);
while ($h[0] !~ /^--/) {
shift(@h);
}
push(@hints, @h);
}
}
my $h = parse_hints_start(@hints);
foreach my $k (keys(%PARSEHINTS)) {
my $listptr = $PARSEHINTS{$k};
my %kso = ();
foreach my $i (@{$listptr}) {
$kso{$i} = undef;
}
foreach my $i (split(' ', $h->{$k})) {
push(@{$listptr}, $i) unless (exists($kso{$i}));
$kso{$i} = undef;
}
}
}
sub fileselector {
my $text = shift;
my $origdir = `/bin/pwd`;
chomp($origdir);
my $file;
my $retfile = '';
my $dtitle = $DIALOGTITLE;
$DIALOGTITLE = 'File Selector';
while (1) {
my $dir=`/bin/pwd`;
chomp($dir);
my @dirs = ();
my @files = ();
my @list;
opendir(DIR, '.');
@list = readdir(DIR);
closedir(DIR);
foreach $file (@list) {
next if ($file eq '.');
if (-d $file) {
push(@dirs, "$file/");
} else {
push(@files, $file);
}
}
@files = sort { $a cmp $b } (@files);
@dirs = sort { $a cmp $b } (@dirs);
my $ddir = $dir;
my $len = length($ddir);
if ($len > 60) {
$len -= 60;
$ddir =~ s/^.{$len}//;
}
my $desc = "$text\\n\\nDir: $ddir";
$file = menu_single($desc, 10, '', @dirs, @files);
$file =~ s@/$@@;
last if ($result != 0);
if (-d $file) {
chdir $file;
} else {
$retfile = "$dir/$file";
last;
}
}
$DIALOGTITLE = $dtitle;
chdir $origdir;
return $retfile;
}
sub msgbox_q {
unless ($NOQUESTION) {
msgbox(@_);
}
}
sub input_checklist_q {
if ($NOQUESTION) {
return $_[1];
} else {
return input_checklist(@_);
}
}
sub input_menu_q {
if ($NOQUESTION) {
return $_[1] if ($_[1] ne '');
return $_[6] if (@_ >= 7);
return '';
} else {
return input_menu(@_);
}
}
sub input_fontname {
my $default = shift;
my $text = <', $text,
@GENERALFAMILY_LIST, '');
if ($result == 0) {
$F2G{$family} = $ret;
}
return $ret;
}
sub input_weight {
my $font = shift;
my $default = shift;
my $menutext = <', $menutext, @WEIGHT_LIST,
'');
}
sub input_width {
my $font = shift;
my $default = shift;
my $menutext = < 1) ? ' ' : ' = ';
$line .= $i;
$flag = 2;
}
}
push(@lines, $line) if ($flag);
return @lines;
}
sub hint_beginlib {
$DIALOGTITLE = shift;
$DWIDTH = shift;
my $mode = shift;
$SUFFIXPATH = shift || '';
$NOQUESTION = shift;
parse_all_hints_init();
parse_all_hints();
if ($ENV{'DISPLAY'} && -f "$LIBDIR/libgtk.pl" && $mode ne 'c') {
require("$LIBDIR/libgtk.pl");
if ($@) {
require("$LIBDIR/libconsole.pl");
}
} else {
require("$LIBDIR/libconsole.pl");
}
}
1;