[BACK]Return to cvsweb.cgi CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / cvsweb

Diff for /cvsweb/cvsweb.cgi between version 1.1.1.8 and 1.1.1.9

version 1.1.1.8, 2000/09/30 18:55:43 version 1.1.1.9, 2000/09/30 20:17:23
Line 43 
Line 43 
 # SUCH DAMAGE.  # SUCH DAMAGE.
 #  #
 # $zId: cvsweb.cgi,v 1.103 2000/09/20 17:02:29 jumager Exp $  # $zId: cvsweb.cgi,v 1.103 2000/09/20 17:02:29 jumager Exp $
 # $kId: cvsweb.cgi,v 1.29 2000/09/30 18:48:16 knu Exp $  # $kId: cvsweb.cgi,v 1.30 2000/09/30 20:10:01 knu Exp $
 #  #
 ###  ###
   
Line 1141  sub doAnnotate($$) {
Line 1141  sub doAnnotate($$) {
     ($pathname = $where) =~ s/(Attic\/)?[^\/]*$//;      ($pathname = $where) =~ s/(Attic\/)?[^\/]*$//;
     ($filename = $where) =~ s/^.*\///;      ($filename = $where) =~ s/^.*\///;
   
     http_header();  
   
     navigateHeader($scriptwhere,$pathname,$filename,$rev, "annotate");  
     print "<h3 align=center>Annotation of $pathname$filename, Revision $rev</h3>\n";  
   
     # this seems to be necessary      # this seems to be necessary
     $| = 1; $| = 0; # Flush      $| = 1; $| = 0; # Flush
   
Line 1207  sub doAnnotate($$) {
Line 1202  sub doAnnotate($$) {
     # were nicer about buffering, then we could just leave it open, I think.      # were nicer about buffering, then we could just leave it open, I think.
     close ($writer) || die "cannot close: $!";      close ($writer) || die "cannot close: $!";
   
       http_header();
   
       navigateHeader($scriptwhere,$pathname,$filename,$rev, "annotate");
       print "<h3 align=center>Annotation of $pathname$filename, Revision $rev</h3>\n";
   
     # Ready to get the responses from the server.      # Ready to get the responses from the server.
     # For example:      # For example:
     #     E Annotations for foo/xx      #     E Annotations for foo/xx
Line 1239  sub doAnnotate($$) {
Line 1239  sub doAnnotate($$) {
         }          }
         elsif ($words[0] eq "M") {          elsif ($words[0] eq "M") {
             $lineNr++;              $lineNr++;
             my $lrev = substr ($_, 2, 13);              (my $lrev = substr($_, 2, 13)) =~ y/ //d;
             my $lusr = substr ($_, 16,  9);              (my $lusr = substr($_, 16,  9)) =~ y/ //d;
             my $line = substr ($_, 36);              my $line = substr($_, 36);
               my $isCurrentRev = ($rev eq $lrev);
             # we should parse the date here ..              # we should parse the date here ..
             if ($lrev eq $oldLrev) {              if ($lrev eq $oldLrev) {
                 $revprint = "             ";                  $revprint = sprintf('%-8s', '');
             }              }
             else {              else {
                 $revprint = $lrev; $oldLusr = "";                  $revprint = sprintf('%-8s', $lrev);
                 $revprint =~ s`^(\S+)`<a href="${scriptwhere}${barequery}#rev$1">$1</A>`;       # `                  $revprint =~ s`\S+`<a href="${scriptwhere}${barequery}#rev$1">$&</A>`;  # `
                   $oldLusr = '';
             }              }
             if ($lusr eq $oldLusr) {              if ($lusr eq $oldLusr) {
                 $usrprint = "         ";                  $usrprint = '';
             }              }
             else {              else {
                 $usrprint = $lusr;                  $usrprint = $lusr;
             }              }
             $oldLrev = $lrev;              $oldLrev = $lrev;
             $oldLusr = $lusr;              $oldLusr = $lusr;
             # is there a less timeconsuming way to strip spaces ?  
             ($lrev = $lrev) =~ s/\s+//g;  
             my $isCurrentRev = ($rev eq $lrev);  
   
             print "<b>" if ($isCurrentRev);              # Set bold for text-based browsers only - graphical
             printf ("%8s%s%8s %4d:", $revprint, ($isCurrentRev ? "|" : " "), $usrprint, $lineNr);              # browsers show bold fonts a bit wider than regular fonts,
               # so it looks irregular.
               print "<b>" if ($isCurrentRev && $is_textbased);
   
               printf ("%s%s %-8s %4d:",
                       $revprint,
                       $isCurrentRev ? '!' : ' ',
                       $usrprint,
                       $lineNr);
             print spacedHtmlText($line, $d{'tabstop'});              print spacedHtmlText($line, $d{'tabstop'});
             print "</b>" if ($isCurrentRev);  
               print "</b>" if ($isCurrentRev && $is_textbased);
         }          }
         elsif ($words[0] eq "ok") {          elsif ($words[0] eq "ok") {
             # We could complain about any text received after this, like the              # We could complain about any text received after this, like the
Line 2478  sub navigateHeader($$$$$) {
Line 2486  sub navigateHeader($$$$$) {
     $swhere = urlencode($filename) if ($swhere eq "");      $swhere = urlencode($filename) if ($swhere eq "");
     print "<\!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">";      print "<\!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">";
     print "<HTML>\n<HEAD>\n";      print "<HTML>\n<HEAD>\n";
     print '<!-- CVSweb $zRevision: 1.103 $  $kRevision: 1.29 $ -->';      print '<!-- CVSweb $zRevision: 1.103 $  $lRevision: 1.30 $ -->';
     print "\n<TITLE>$path$filename - $title - $rev</TITLE></HEAD>\n";      print "\n<TITLE>$path$filename - $title - $rev</TITLE></HEAD>\n";
     print  "$body_tag_for_src\n";      print  "$body_tag_for_src\n";
     print "<table width=\"100%\" border=0 cellspacing=0 cellpadding=1 bgcolor=\"$navigationHeaderColor\">";      print "<table width=\"100%\" border=0 cellspacing=0 cellpadding=1 bgcolor=\"$navigationHeaderColor\">";
Line 2833  sub http_header(;$) {
Line 2841  sub http_header(;$) {
   
 sub html_header($) {  sub html_header($) {
     my ($title) = @_;      my ($title) = @_;
     my $version = '$zRevision: 1.103 $  $kRevision: 1.29 $'; #'      my $version = '$zRevision: 1.103 $  $kRevision: 1.30 $'; #'
     http_header();      http_header();
     print <<EOH;      print <<EOH;
 <!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"  <!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"

Legend:
Removed from v.1.1.1.8  
changed lines
  Added in v.1.1.1.9

CVSweb