#XXX: Don't use alternative output formats yet
$format = 'html';
if ($format eq 'html') {
- print $input->header;
+ print $input->header( -charset => 'utf-8' );
}
if ($params{errors}{keywords}) {
push @results, @{ do_names_search( $keyword, \%sources,
$sp_obj,
\&read_src_entry, \%opts ) };
+ } elsif ($searchon eq 'contents') {
+ require "./search_contents.pl";
+ &contents(\$input);
+ exit;
} else {
push @results, @{ do_names_search( $keyword, \%packages,
$p_obj,
my @pkgs = sort(keys %pkgs, keys %provided_by);
if ($opts{format} eq 'html') {
- my ($start, $end) = multipageheader( $input, scalar @pkgs, \%opts );
- my $count = 0;
+ #my ($start, $end) = multipageheader( $input, scalar @pkgs, \%opts );
+ print "<p>Found <em>".(scalar @pkgs)."</em> matching packages,";
+ #my $count = 0;
foreach my $pkg (@pkgs) {
- $count++;
- next if $count < $start or $count > $end;
+ #$count++;
+ #next if $count < $start or $count > $end;
printf "<h3>Package %s</h3>\n", $pkg;
print "<ul>\n";
foreach my $suite (@SUITES) {
my @versions = version_sort keys %{$pkgs{$pkg}{$suite}{$archive}};
my $origin_str = "";
if ($sect{$pkg}{$suite}{$archive}{$versions[0]}) {
- $origin_str .= " [<span style=\"color:red\">$sect{$pkg}{$suite}{$versions[0]}</span>]";
+ $origin_str .= " [<span style=\"color:red\">$sect{$pkg}{$suite}{$archive}{$versions[0]}</span>]";
}
printf "<li><a href=\"$ROOT/%s/%s\">%s</a> (%s): %s %s\n",
$path, $pkg, $path, $subsect{$pkg}{$suite}{$archive}{$versions[0]},
}
if ($opts{format} eq 'html') {
- my ($start, $end) = multipageheader( $input, scalar keys %pkgs, \%opts );
- my $count = 0;
+ #my ($start, $end) = multipageheader( $input, scalar keys %pkgs, \%opts );
+ print "<p>Found <em>".(scalar keys %pkgs)."</em> matching packages,";
+ #my $count = 0;
foreach my $pkg (sort keys %pkgs) {
- $count++;
- next if ($count < $start) or ($count > $end);
+ #$count++;
+ #next if ($count < $start) or ($count > $end);
printf "<h3>Source package %s</h3>\n", $pkg;
print "<ul>\n";
foreach my $suite (@SUITES) {
}
}
}
- printindexline( $input, scalar keys %pkgs, \%opts );
+ #printindexline( $input, scalar keys %pkgs, \%opts );
}
#print_results(\@results, \%opts) if @results;;
my $tet1 = new Benchmark;