=================================================================== RCS file: /cvs/cvsweb/cvsweb.cgi,v retrieving revision 1.1.1.28 retrieving revision 1.1.1.29 diff -u -p -r1.1.1.28 -r1.1.1.29 --- cvsweb/cvsweb.cgi 2001/08/01 10:24:01 1.1.1.28 +++ cvsweb/cvsweb.cgi 2002/04/10 20:03:49 1.1.1.29 @@ -10,6 +10,7 @@ # Dick Balaska # Akinori MUSHA # Jens-Uwe Mager +# Ville Skyttä (html cleanup) # # Based on: # * Bill Fenners cvsweb.cgi revision 1.28 available from: @@ -18,7 +19,7 @@ # Copyright (c) 1996-1998 Bill Fenner # (c) 1998-1999 Henner Zeller # (c) 1999 Henrik Nordstrom -# (c) 2000-2001 Akinori MUSHA +# (c) 2000-2002 Akinori MUSHA # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -42,8 +43,9 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # +# $FreeBSD: projects/cvsweb/cvsweb.cgi,v 1.90 2002/04/10 19:25:11 knu Exp $ # $zId: cvsweb.cgi,v 1.112 2001/07/24 13:03:16 hzeller Exp $ -# $Idaemons: /home/cvs/cvsweb/cvsweb.cgi,v 1.82 2001/08/01 09:54:52 knu Exp $ +# $Idaemons: /home/cvs/cvsweb/cvsweb.cgi,v 1.84 2001/10/07 20:50:10 knu Exp $ # ### @@ -67,7 +69,7 @@ use vars qw ( $is_links $is_lynx $is_w3m $is_msie $is_mozilla3 $is_textbased %input $query $barequery $sortby $bydate $byrev $byauthor $bylog $byfile $defaultDiffType $logsort $cvstree $cvsroot - $mimetype $charset $defaultTextPlain $defaultViewable + $mimetype $charset $output_filter $defaultTextPlain $defaultViewable $command_path %CMD $allow_compress $backicon $diricon $fileicon $fullname $newname $cvstreedefault @@ -106,6 +108,7 @@ sub search_path($); sub getMimeTypeFromSuffix($); sub head($;$); sub scan_directives(@); +sub openOutputFilter(); sub doAnnotate($$); sub doCheckout($$); sub cvswebMarkup($$$); @@ -141,11 +144,7 @@ sub forbidden_module($); ##### Start of Configuration Area ######## delete $ENV{PATH}; -$cvsweb_revision = - '1.112' . '.' . ( - split (/ /, - q$Idaemons: /home/cvs/cvsweb/cvsweb.cgi,v 1.82 2001/08/01 09:54:52 knu Exp $ -))[2]; +$cvsweb_revision = '2.0.1'; use File::Basename; @@ -301,7 +300,7 @@ if (-f $config) { require $config || &fatal( "500 Internal Error", sprintf( - 'Error in loading configuration file: %s

%s
', + 'Error in loading configuration file: %s

%s
', $config, &htmlify($@) ) @@ -451,7 +450,7 @@ foreach $k (keys %ICONS) { if ($ipath) { ${"${k}icon"} = sprintf( - '%s', + '%s', hrefquote($ipath), htmlquote($itxt), $iwidth, $iheight) } else { ${"${k}icon"} = $itxt; @@ -466,7 +465,7 @@ if (-f $config_cvstree) { require $config_cvstree || &fatal( "500 Internal Error", sprintf( - 'Error in loading configuration file: %s

%s
', + 'Error in loading configuration file: %s

%s
', $config_cvstree, &htmlify($@) ) @@ -508,7 +507,7 @@ undef $rewrite; if (!-d $cvsroot) { &fatal("500 Internal Error", - '$CVSROOT not found!

The server on which the CVS tree lives is probably down. Please try again in a few minutes.' + '$CVSROOT not found!

The server on which the CVS tree lives is probably down. Please try again in a few minutes.' ); } @@ -537,9 +536,9 @@ if ($input{tarball}) { "You cannot download the top level directory."); } - my $tmpdir = "/tmp/.cvsweb.$$." . int(time); + my $tmpexportdir = "$tmpdir/.cvsweb.$$." . int(time); - mkdir($tmpdir, 0700) + mkdir($tmpexportdir, 0700) or &fatal("500 Internal Error", "Unable to make temporary directory: $!"); @@ -549,26 +548,30 @@ if ($input{tarball}) { (exists $input{only_with_tag} && length $input{only_with_tag}) ? $input{only_with_tag} : "HEAD"; + if ($tag eq 'MAIN') { + $tag = 'HEAD'; + } + if (system $CMD{cvs}, @cvs_options, '-Qd', $cvsroot, 'export', '-r', - $tag, '-d', "$tmpdir/$basedir", $module) + $tag, '-d', "$tmpexportdir/$basedir", $module) { @fatal = ("500 Internal Error", "cvs co failure: $!: $module"); } else { $| = 1; # Essential to get the buffering right. if ($ext eq '.tar.gz') { - print "Content-type: application/x-gzip\r\n\r\n"; + print "Content-Type: application/x-gzip\r\n\r\n"; system - "$CMD{tar} @tar_options -cf - -C $tmpdir $basedir | $CMD{gzip} @gzip_options -c" + "$CMD{tar} @tar_options -cf - -C $tmpexportdir $basedir | $CMD{gzip} @gzip_options -c" and @fatal = ("500 Internal Error", "tar zc failure: $!: $basedir"); } elsif ($ext eq '.zip' && $CMD{zip}) { - print "Content-type: application/zip\r\n\r\n"; + print "Content-Type: application/zip\r\n\r\n"; system - "cd $tmpdir && $CMD{zip} @zip_options -r - $basedir" + "cd $tmpexportdir && $CMD{zip} @zip_options -r - $basedir" and @fatal = ("500 Internal Error", "zip failure: $!: $basedir"); } else { @@ -577,7 +580,7 @@ if ($input{tarball}) { } } - system $CMD{rm}, '-rf', $tmpdir if -d $tmpdir; + system $CMD{rm}, '-rf', $tmpexportdir if -d $tmpexportdir; &fatal(@fatal) if @fatal; @@ -615,7 +618,7 @@ if (-d $fullname) { } } - print "

\n"; + print "

\n"; # give direct access to dirs if ($where eq '/') { @@ -623,16 +626,16 @@ if (-d $fullname) { chooseCVSRoot (); } else { print "

Current directory: ", &clickablePath($where, 0), - "\n"; + "

\n"; - print "

Current tag: ", $input{only_with_tag}, "\n" + print "

Current tag: ", $input{only_with_tag},"

\n" if $input{only_with_tag}; } - print "
\n"; + print "
\n"; - # Using in this manner violates the HTML2.0 spec but + # Using in this manner violates the HTML2.0 spec but # provides the results that I want in most browsers. Another # case of layout spooging up HTML. @@ -642,12 +645,12 @@ if (-d $fullname) { # Can't this be done by defining the border for the inner table? print - "
"; + "
"; } print - "\n"; + "
\n"; $infocols++; - printf '"; $infocols++; - printf '"; } $infocols++; - printf '"; } elsif ($use_descriptions) { - printf '
', + printf '
', $byfile ? $columnHeaderColorSorted : $columnHeaderColorDefault; @@ -668,7 +671,7 @@ if (-d $fullname) { # with revision information: if (scalar(%fileinfo)) { $infocols++; - printf '', + printf '', $byrev ? $columnHeaderColorSorted : $columnHeaderColorDefault; @@ -685,7 +688,7 @@ if (-d $fullname) { } print "', + printf '', $bydate ? $columnHeaderColorSorted : $columnHeaderColorDefault; @@ -704,7 +707,7 @@ if (-d $fullname) { if ($show_author) { $infocols++; - printf '', + printf '', $byauthor ? $columnHeaderColorSorted : $columnHeaderColorDefault; @@ -725,7 +728,7 @@ if (-d $fullname) { print "', + printf '', $bylog ? $columnHeaderColorSorted : $columnHeaderColorDefault; @@ -742,7 +745,7 @@ if (-d $fullname) { } print "', + printf '', $columnHeaderColorDefault; print "Description"; $infocols++; @@ -823,7 +826,7 @@ if (-d $fullname) { print " ", &link("Parent Directory", $url); } else { $url = './' . urlencode($_) . "/$query"; - print ""; + print ""; if ($nofilelinks) { print $diricon; @@ -862,10 +865,11 @@ if (-d $fullname) { print " " if ($dirtable); $filename =~ s%^[^/]+/%%; print "$filename/$rev"; - print "
" if ($dirtable); + print "
" if ($dirtable); if ($log) { - print " ", &htmlify( + print " ", + &htmlify( substr($log, 0, $shortLogLen)); if (length $log > 80) { print "..."; @@ -879,8 +883,8 @@ if (-d $fullname) { if ($use_descriptions && defined $descriptions{$dwhere}) { - print "
 " + print " " if $dirtable; print $descriptions{$dwhere}; } elsif ($dirtable && $infocols > 1) { @@ -914,7 +918,7 @@ if (-d $fullname) { $filesfound++; printf '
', $tabcolors[$dirrow % 2] if $dirtable; - print ""; + print ""; if ($nofilelinks) { print $fileicon; @@ -939,7 +943,7 @@ if (-d $fullname) { print " " if ($dirtable); if ($log) { - print " ", + print " ", &htmlify(substr($log, 0, $shortLogLen)); if (length $log > 80) { print "..."; @@ -953,14 +957,15 @@ if (-d $fullname) { print "\n"; } + print($dirtable ? "
\n" : "\n"); + if ($dirtable && defined($tableBorderColor)) { print "
"; } - print($dirtable == 1 ? "
\n" : "
\n"); if ($filesexists && !$filesfound) { print - "

NOTE: There are $filesexists files, but none matches the current tag ($input{only_with_tag})\n"; + "

NOTE: There are $filesexists files, but none matches the current tag ($input{only_with_tag}).

\n"; } if ($input{only_with_tag} && (!%tags || !$tags{$input{only_with_tag}})) { @@ -970,45 +975,45 @@ if (-d $fullname) { if (scalar %tags || $input{only_with_tag} || $edit_option_form || defined($input{"options"})) { - print "
"; + print "
"; } if (scalar %tags || $input{only_with_tag}) { - print "
\n"; + print "\n"; foreach my $var (@stickyvars) { print - "\n" + "\n" if (defined($input{$var}) && (!defined($DEFAULTVALUE{$var}) || $input{$var} ne $DEFAULTVALUE{$var}) && $input{$var} ne "" && $var ne "only_with_tag"); } - print "Show only files with tag:\n"; - print ""; - print "\n"; foreach my $tag (reverse sort { lc $a cmp lc $b } keys %tags) { - print "$tag\n"; + && $input{only_with_tag} eq $tag ? " selected" : "", + ">$tag\n"; } - print "\n"; + print "\n"; print " Module path or alias:\n"; - printf "\n", + printf "\n", htmlquote($where); - print "\n"; - print "\n"; + print "

\n"; + print "\n"; } if ($allow_tar) { my ($basefile) = ($where =~ m,(?:.*/)?([^/]+),); if (defined($basefile) && $basefile ne '') { - print "
\n", - "
Download this directory in "; + print "
\n", + "
Download this directory in "; # Mangle the filename so browsers show a reasonable # filename to download. @@ -1019,7 +1024,7 @@ if (-d $fullname) { &link("zip archive", "./$basefile.zip$query" . ($query ? "&" : "?") . "tarball=1"); } - print "
"; + print "
"; } } @@ -1027,41 +1032,41 @@ if (-d $fullname) { $formwhere =~ s|Attic/?$|| if ($input{'hideattic'}); if ($edit_option_form || defined($input{"options"})) { - print "
\n"; - print "\n"; + print "\n"; + print "\n"; if ($cvstree ne $cvstreedefault) { print - "\n"; + "\n"; } - print "
"; + print "
"; print - ""; - print ""; + print ""; + print "Revision"; + print "Log message"; + print ""; print ""; print ""; - print "\n"; + print "\n"; print - "
Preferences
Sort files by
Preferences
Sort files by Sort log by: "; printLogSortSelect(0); print "
Diff format: "; printDiffSelect(0); print "Show Attic files: "; - print "
"; - print "
\n"; + ""; + print "\n"; } print &html_footer; - print "\n"; } ############################### @@ -1120,7 +1125,11 @@ elsif (-f $fullname . ',v') { # The file has been removed and is in the Attic. # Send a redirect pointing to the file in the Attic. (my $newplace = $scriptwhere) =~ s|/([^/]+)$|/Attic/$1|; - redirect("$newplace$query"); + if ($ENV{QUERY_STRING} ne "") { + redirect("${newplace}?$ENV{QUERY_STRING}"); + } else { + redirect($newplace); + } exit; } elsif (0 && (my @files = &safeglob($fullname . ",v"))) { http_header("text/plain"); @@ -1157,34 +1166,34 @@ sub printDiffSelect($) { my ($use_java_script) = @_; my $f = $input{'f'}; - print '"; + print ""; } sub printLogSortSelect($) { my ($use_java_script) = @_; - print '"; + print ""; } sub findLastModifiedSubdirs(@) { @@ -1356,7 +1365,7 @@ sub link($$) { $url =~ s/:/sprintf("%%%02x", ord($&))/eg if $url =~ /^[^a-z]/; # relative - sprintf '%s', hrefquote($url), $name; + sprintf '%s', hrefquote($url), $name; } sub revcmp($$) { @@ -1514,6 +1523,18 @@ sub scan_directives(@) { ('tabstop' => $ts); } +sub openOutputFilter() { + return if !defined($output_filter) || $output_filter eq ''; + + open(STDOUT, "|-") && return; + + # child of child + open(STDERR, '>/dev/null'); + exec($output_filter); + + exit -1; +} + ############################### # show Annotation ############################### @@ -1614,7 +1635,7 @@ sub doAnnotate($$) { navigateHeader($scriptwhere, $pathname, $filename, $rev, "annotate"); print - "

Annotation of $pathname$filename, Revision $rev

\n"; + "

Annotation of $pathname$filename, Revision $rev

\n"; # Ready to get the responses from the server. # For example: @@ -1627,7 +1648,7 @@ sub doAnnotate($$) { my ($revprint, $usrprint); if ($annTable) { - print "\n"; + print "
\n"; } else { print "
";
 	}
@@ -1815,7 +1836,7 @@ sub cvswebMarkup($$$) {
 	http_header();
 
 	navigateHeader($scriptwhere, $pathname, $filename, $revision, "view");
-	print "
"; + print "
"; print "
"; print "File: ", &clickablePath($where, 1); print " ("; @@ -1827,27 +1848,27 @@ sub cvswebMarkup($$$) { &download_link($fileurl, $revision, "as text", "text/plain"); print ")"; } - print "
\n"; + print "
\n"; if ($show_log_in_markup) { readLog($fullname); #,$revision); printLog($revision, 0); } else { - print "Version: $revision
\n"; - print "Tag: ", $input{only_with_tag}, "
\n" + print "Version: $revision
\n"; + print "Tag: ", $input{only_with_tag}, "
\n" if $input{only_with_tag}; } print "
"; my $url = download_url($fileurl, $revision, $mimetype); - print "
"; + print "
"; if ($mimetype =~ /^image/) { - printf '
', hrefquote("$url$barequery"); + printf '
', hrefquote("$url$barequery"); } elsif ($mimetype =~ m%^application/pdf%) { - printf '
', + printf '
', hrefquote("$url$barequery"); } elsif ($preformat_in_markup) { - print "
";
+		print "
";
 
 		# prefetch several lines
 		my @buf = head($filehandle);
@@ -1859,14 +1880,14 @@ sub cvswebMarkup($$$) {
 
 			print spacedHtmlText($_, $d{'tabstop'});
 		}
-		print "
"; + print "
"; } else { - print "
";
+		print "
";
 
 		while (<$filehandle>) {
 			print htmlquote($_);
 		}
-		print "
"; + print "
"; } } @@ -1959,6 +1980,7 @@ sub doDiff($$$$$$) { if (!open($fh, "-|")) { # child open(STDERR, ">&STDOUT"); # Redirect stderr to stdout + openOutputFilter(); exec($CMD{rcsdiff}, @difftype, "-r$rev1", "-r$rev2", $fullname); } if ($human_readable) { @@ -2045,14 +2067,16 @@ sub getDirLogs($$@) { if (defined($tag)) { #can't use -r as - is allowed in tagnames, but misinterpreated by rlog.. - if (!open($fh, "-|")) { + if (!open($fh, "-|")) { # child open(STDERR, '>/dev/null'); # rlog may complain; ignore. + openOutputFilter(); exec($CMD{rlog}, @files); } } else { - if (!open($fh, "-|")) { + if (!open($fh, "-|")) { # child open(STDERR, '>/dev/null'); # rlog may complain; ignore. + openOutputFilter(); exec($CMD{rlog}, '-r', @files); } } @@ -2249,8 +2273,10 @@ sub readLog($;$) { print("Going to rlog '$fullname'\n") if ($verbose); if (!open($fh, "-|")) { # child if ($revision ne '') { + openOutputFilter(); exec($CMD{rlog}, $revision, $fullname); } else { + openOutputFilter(); exec($CMD{rlog}, $fullname); } } @@ -2416,7 +2442,7 @@ sub readLog($;$) { } $revsym{$rev} .= ", " if ($revsym{$rev}); $revsym{$rev} .= $_; - $sel .= "\n"; } print "Done associating revisions with branches\n" if ($verbose); @@ -2494,11 +2520,11 @@ sub printLog($;$) { my ($filename); ($filename = $where) =~ s/^.*\///; my ($fileurl) = urlencode($filename); - print ""; + print ""; if (defined($revsym{$_})) { foreach my $sym (split (", ", $revsym{$_})) { - print ""; + print ""; } } @@ -2506,7 +2532,7 @@ sub printLog($;$) { && !defined($nameprinted{$br})) { foreach my $sym (split (", ", $revsym{$br})) { - print ""; + print ""; } $nameprinted{$br} = 1; } @@ -2561,7 +2587,7 @@ sub printLog($;$) { } } } else { - print "Revision $_"; + print "Revision $_"; } if (/^1\.1\.1\.\d+$/) { @@ -2576,13 +2602,13 @@ sub printLog($;$) { print readableTime(time() - $date{$_}, 1), " ago)"; print " by "; print "", $author{$_}, "\n"; - print "
Branch: ", $link ? link_tags($revsym{$br}) : $revsym{$br}, + print "
Branch: ", $link ? link_tags($revsym{$br}) : $revsym{$br}, "\n" if ($revsym{$br}); - print "
CVS Tags: ", $link ? link_tags($revsym{$_}) : $revsym{$_}, + print "
CVS Tags: ", $link ? link_tags($revsym{$_}) : $revsym{$_}, "" if ($revsym{$_}); - print "
Branch point for: ", + print "
Branch point for: ", $link ? link_tags($branchpoint{$_}) : $branchpoint{$_}, "\n" if ($branchpoint{$_}); @@ -2601,17 +2627,17 @@ sub printLog($;$) { if ($prev ne "") { if ($difflines{$_}) { print - "
Changes since $prev: $difflines{$_} lines"; + "
Changes since $prev: $difflines{$_} lines"; } } if ($isDead) { - print "
FILE REMOVED\n"; + print "
FILE REMOVED\n"; } elsif ($link) { my %diffrev = (); $diffrev{$_} = 1; $diffrev{""} = 1; - print "
Diff"; + print "
Diff"; # # Offer diff to previous revision @@ -2696,9 +2722,9 @@ sub printLog($;$) { printDiffLinks($input{'r1'}, $url); } } - print "
\n";
+	print "
\n";
 	print &htmlify($log{$_}, 1);
-	print "
\n"; + print "
\n"; } sub doLog($) { @@ -2714,117 +2740,116 @@ sub doLog($) { print &link($backicon, "$backurl#$filename"), " Up to ", &clickablePath($upwhere, 1), "

\n"; print &link('Request diff between arbitrary revisions', '#diff'); - print '


'; + print '
'; if ($curbranch) { print "Default branch: ", ($revsym{$curbranch} || $curbranch); } else { print "No default branch"; } - print "
\n"; + print "
\n"; if ($input{only_with_tag}) { - print "Current tag: $input{only_with_tag}
\n"; + print "Current tag: $input{only_with_tag}
\n"; } undef %nameprinted; for (my $i = 0 ; $i <= $#revdisplayorder ; $i++) { - print "
"; + print "
"; printLog($revdisplayorder[$i]); } - print "
"; - print "\n"; + print "
"; + print "
\n"; print "This form allows you to request diff's between any two\n"; print "revisions of a file. You may select a symbolic revision\n"; print "name using the selection box or you may type in a numeric\n"; print "name using the type-in text box.\n"; - print "

\n"; + print "

\n"; print - "

\n"; + "\n"; foreach (@stickyvars) { - printf('', $_, + printf('', $_, $input{$_}) if (defined($input{$_}) && ((!defined($DEFAULTVALUE{$_}) || $input{$_} ne $DEFAULTVALUE{$_}) && $input{$_} ne "")); } - print "\n"; - print ""; + print ""; + print "\n"; + print "
Diffs between \n"; - print "\n"; + print ""; - print "\n"; - print ""; + print "\n"; + print ""; - print "\n"; - print "\n"; - print "
Diffs between \n"; + print "\n"; + print "\n"; $diffrev = $revdisplayorder[$#revdisplayorder]; $diffrev = $input{"r1"} if (defined($input{"r1"})); print - "
and \n"; - print "
and \n"; + print "\n"; + print "\n"; $diffrev = $revdisplayorder[0]; $diffrev = $input{"r2"} if (defined($input{"r2"})); print - "
\n"; - print "
\n"; - print ""; - print "\n"; - print ""; - print ""; + print "\n"; + print "\n"; + print "
Preferred Diff type:"; + "
\n"; + print "
\n"; + print ""; + print "\n"; + print ""; + print "\n"; + print "\n"; if (@branchnames) { - print ""; - print ""; + print "\n"; + print "\n"; } foreach (@stickyvars) { next if ($_ eq "f"); next if ($_ eq "only_with_tag"); next if ($_ eq "logsort"); - print "\n" + print "\n" if (defined($input{$_}) && (!defined($DEFAULTVALUE{$_}) || $input{$_} ne $DEFAULTVALUE{$_}) && $input{$_} ne ""); } - print ""; - print ""; + print ""; - print ""; - print "\n"; - print "
Preferred Diff type:"; printDiffSelect($use_java_script); - print "
View only Branch:"; - print "\n"; - print "View only Branch:"; + print "\n"; + print "
"; - print "\n"; - print "Sort log by:"; + print "
"; + print "\n"; + print "Sort log by:"; printLogSortSelect($use_java_script); - print "
"; + print "
"; print &html_footer; - print "\n"; } sub flush_diff_rows($$$$) { @@ -2902,13 +2927,13 @@ sub human_readable_diff($) { } print - "

Diff for /$where_nd between version $rev1 and $rev2

\n", - "\n", - "\n", "
", + "

Diff for /$where_nd between version $rev1 and $rev2

\n", + "\n", + "\n", "\n", "\n", "\n"; @@ -2941,14 +2966,14 @@ sub human_readable_diff($) { print "\n"; $state = "dump"; $leftRow = 0; @@ -2991,50 +3016,51 @@ sub human_readable_diff($) { } } } + close($fh); + flush_diff_rows \@leftCol, \@rightCol, $leftRow, $rightRow; # state is empty if we didn't have any change if (!$state) { - print ""; - print ""; + print ""; + print ""; print - ""; + ""; } print "
", "version $rev1"; print ", $date1" if (defined($date1)); print "
Tag: $sym1\n" if ($sym1); - print "
", "version $rev2"; + print "", "version $rev2"; print ", $date2" if (defined($date2)); print "
Tag: $sym2\n" if ($sym1); print "
"; print - "
Line $oldline"; + "
Line $oldline"; print - " $funname
"; + " $funname
"; print "
"; print - "
Line $newline"; + "
Line $newline"; print - " $funname
"; + " $funname
"; print "
 
 
- No viewable Change -
- No viewable change -
"; - close($fh); print "

\n"; - print ""; + print "
"; print "
"; # print legend - print ""; print "
"; - print "Legend:
\n"; + print "
"; + print "Legend:
\n"; print - ""; + ""; print - ""; + ""; print - ""; + ""; print "
Removed from v.$rev1 
Removed from v.$rev1 
changed lines
changed lines
 Added in v.$rev2
 Added in v.$rev2
\n"; print "
"; # Print format selector - print "
\n"; + print "\n"; foreach my $var (keys %input) { next if ($var eq "f"); next if (defined($DEFAULTVALUE{$var}) && $DEFAULTVALUE{$var} eq $input{$var}); - print "\n"; + print "\n"; } printDiffSelect($use_java_script); - print "\n"; - print "
\n"; + print "\n"; + print "\n"; print "
"; @@ -3046,15 +3072,16 @@ sub navigateHeader($$$$$) { $swhere = './' . urlencode($filename) if ($swhere eq ""); print < - - - - -$path$filename - $title - $rev + + + + + +$path$filename - $title - $rev + $body_tag_for_src - -
+ +"; - print ""; print "
EOF print &link($backicon, "$swhere$query#rev$rev"); @@ -3062,7 +3089,8 @@ EOF " CVS log"; print " $fileicon$diricon Up to ", &clickablePath($path, 1), + print "$diricon Up to ", + &clickablePath($path, 1), "
"; } @@ -3171,7 +3199,7 @@ sub chooseCVSRoot() { my ($k); print "
\n"; foreach $k (keys %input) { - print "\n" + print "\n" if ($input{$k}) && ($k ne "cvsroot"); } @@ -3181,13 +3209,13 @@ sub chooseCVSRoot() { print ""; print ""; print ""; @@ -3195,13 +3223,13 @@ sub chooseCVSRoot() { } else { # no choice -- but we need the form to select module/path, at least for Netscape - print "\n"; + print "\n"; print "CVS Root: [$cvstree]"; } print " Module path or alias:\n"; - print "\n"; - print ""; + print "\n"; + print ""; if (2 <= @CVSROOT) { print "
CVS Root:\n\n
"; @@ -3276,7 +3304,7 @@ sub download_url($$;$) { && (!defined($mimetype) || $mimetype ne "text/x-cvsweb-markup")) { my $path = $where; - $path =~ s|/[^/]*$|/|; + $path =~ s|[^/]+$||; $url = "$scriptname/$checkoutMagic/${path}$url"; } $url .= "?rev=$revision"; @@ -3293,7 +3321,7 @@ sub download_link($$$;$) { $fullurl =~ s/:/sprintf("%%%02x", ord($&))/eg; - printf '$textlink"; + print ">$textlink"; } # Returns a Query string with the @@ -3430,7 +3462,7 @@ sub http_header(;$) { if ($is_mod_perl) { Apache->request->content_type($content_type); } else { - print "Content-type: $content_type\r\n"; + print "Content-Type: $content_type\r\n"; } if ($allow_compress && $maycompress) { @@ -3445,7 +3477,7 @@ sub http_header(;$) { Vary => "Accept-Encoding"); Apache->request->send_http_header; } else { - print "Content-encoding: x-gzip\r\n"; + print "Content-Encoding: x-gzip\r\n"; print "Vary: Accept-Encoding\r\n" ; #RFC 2068, 14.43 print "\r\n"; # Close headers @@ -3467,7 +3499,7 @@ sub http_header(;$) { print "\r\n"; # Close headers } print - "Unable to find gzip binary in the \$command_path ($command_path) to compress output
"; + "Unable to find gzip binary in the \$command_path ($command_path) to compress output
"; } } else { @@ -3483,13 +3515,12 @@ sub html_header($) { my ($title) = @_; http_header("text/html"); print < + $title - + $body_tag $logo

$title