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

Diff for /cvsweb/cvsweb.cgi between version 3.35 and 3.36

version 3.35, 2000/10/10 21:14:05 version 3.36, 2000/10/20 12:28:45
Line 84  use vars qw (
Line 84  use vars qw (
   
 sub printDiffSelect($);  sub printDiffSelect($);
 sub findLastModifiedSubdirs(@);  sub findLastModifiedSubdirs(@);
   sub htmlify_sub(&$);
 sub htmlify($;$);  sub htmlify($;$);
 sub spacedHtmlText($;$);  sub spacedHtmlText($;$);
 sub link($$);  sub link($$);
Line 117  sub download_link($$$;$);
Line 118  sub download_link($$$;$);
 sub toggleQuery($$);  sub toggleQuery($$);
 sub urlencode($);  sub urlencode($);
 sub htmlquote($);  sub htmlquote($);
   sub htmlunquote($);
 sub http_header(;$);  sub http_header(;$);
 sub html_header($);  sub html_header($);
 sub html_footer();  sub html_footer();
Line 327  else {
Line 329  else {
     $byfile = 1;      $byfile = 1;
 }  }
   
 $hr_default = $input{'f'} eq 'h';  $hr_default = ($input{'f'} eq 'h' || $input{'f'} eq 'H');
   
 $logsort = $input{'logsort'};  $logsort = $input{'logsort'};
   
Line 482  elsif (-d $fullname) {
Line 484  elsif (-d $fullname) {
             }              }
             print "<table  width=\"100%\" border=0 cellspacing=1 cellpadding=$tablepadding>\n";              print "<table  width=\"100%\" border=0 cellspacing=1 cellpadding=$tablepadding>\n";
             $infocols++;              $infocols++;
             print "<tr><th align=left bgcolor=\"" . (($byfile) ?              printf '<tr><th align=left bgcolor="%s">',
                                                    $columnHeaderColorSorted :                $byfile ? $columnHeaderColorSorted : $columnHeaderColorDefault;
                                                    $columnHeaderColorDefault) . "\">";  
             if ($byfile) {              if ($byfile) {
                 print 'File';                  print 'File';
             } else {              } else {
Line 496  elsif (-d $fullname) {
Line 497  elsif (-d $fullname) {
             # with revision information:              # with revision information:
             if (scalar(%fileinfo)) {              if (scalar(%fileinfo)) {
                 $infocols++;                  $infocols++;
                 print "<th align=left bgcolor=\"" . (($byrev) ?                  printf '<th align=left bgcolor="%s">',
                                                    $columnHeaderColorSorted :                    $byrev ? $columnHeaderColorSorted : $columnHeaderColorDefault;
                                                    $columnHeaderColorDefault) . "\">";  
                 if ($byrev) {                  if ($byrev) {
                     print 'Rev.';                      print 'Rev.';
                 } else {                  } else {
Line 507  elsif (-d $fullname) {
Line 507  elsif (-d $fullname) {
                 }                  }
                 print "</th>";                  print "</th>";
                 $infocols++;                  $infocols++;
                 print "<th align=left bgcolor=\"" . (($bydate) ?                  printf '<th align=left bgcolor="%s">',
                                                    $columnHeaderColorSorted :                    $bydate ? $columnHeaderColorSorted : $columnHeaderColorDefault;
                                                    $columnHeaderColorDefault) . "\">";  
                 if ($bydate) {                  if ($bydate) {
                     print 'Age';                      print 'Age';
                 } else {                  } else {
                     print &link('Age', sprintf('./%s#dirlist',                      print &link('Age', sprintf('./%s#dirlist',
                                                 &toggleQuery("sortby", "date")));                                                 &toggleQuery("sortby", "date")));
                 }                  }
                 print "</th>";                  print "</th>";
                 if ($show_author) {                  if ($show_author) {
                     $infocols++;                      $infocols++;
                     print "<th align=left bgcolor=\"" . (($byauthor) ?                      printf '<th align=left bgcolor="%s">',
                                                    $columnHeaderColorSorted :                        $byauthor ? $columnHeaderColorSorted : $columnHeaderColorDefault;
                                                    $columnHeaderColorDefault) . "\">";  
                     if ($byauthor) {                      if ($byauthor) {
                         print 'Author';                          print 'Author';
                     } else {                      } else {
Line 531  elsif (-d $fullname) {
Line 529  elsif (-d $fullname) {
                     print "</th>";                      print "</th>";
                 }                  }
                 $infocols++;                  $infocols++;
                 print "<th align=left bgcolor=\"" . (($bylog) ?                  printf '<th align=left bgcolor="%s">',
                                                $columnHeaderColorSorted :                    $bylog ? $columnHeaderColorSorted : $columnHeaderColorDefault;
                                                $columnHeaderColorDefault) . "\">";  
                 if ($bylog) {                  if ($bylog) {
                     print 'Last log entry';                      print 'Last log entry';
                 } else {                  } else {
                     print &link('Last log entry', sprintf('./%s#dirlist',                      print &link('Last log entry', sprintf('./%s#dirlist',
                                                   &toggleQuery("sortby", "log")));                                                            &toggleQuery("sortby", "log")));
                 }                  }
                 print "</th>";                  print "</th>";
             }              }
             elsif ($use_descriptions) {              elsif ($use_descriptions) {
                 print "<th align=left bgcolor=\"". $columnHeaderColorDefault . "\">";                  printf '<th align=left bgcolor="%s">', $columnHeaderColorDefault;
                 print "Description";                  print "Description";
                 $infocols++;                  $infocols++;
             }              }
Line 608  elsif (-d $fullname) {
Line 605  elsif (-d $fullname) {
                 next if ($_ eq '..' && $where eq '/');                  next if ($_ eq '..' && $where eq '/');
                 my ($rev,$date,$log,$author,$filename) = @{$fileinfo{$_}}                  my ($rev,$date,$log,$author,$filename) = @{$fileinfo{$_}}
                     if (defined($fileinfo{$_}));                      if (defined($fileinfo{$_}));
                 print "<tr bgcolor=\"" . @tabcolors[$dirrow%2] . "\"><td>" if ($dirtable);                  printf '<tr bgcolor="%s"><td>', $tabcolors[$dirrow % 2] if $dirtable;
                 if ($_ eq '..') {                  if ($_ eq '..') {
                     $url = "../" . $query;                      $url = "../$query";
                     if ($nofilelinks) {                      if ($nofilelinks) {
                         print $backicon;                          print $backicon;
                     }                      }
Line 620  elsif (-d $fullname) {
Line 617  elsif (-d $fullname) {
                     print " ", &link("Previous Directory", $url);                      print " ", &link("Previous Directory", $url);
                 }                  }
                 else {                  else {
                     $url = urlencode($_) . '/' . $query;                      $url = urlencode($_) . "/$query";
                     print "<A NAME=\"$_\"></A>";                      print "<A NAME=\"$_\"></A>";
                     if ($nofilelinks) {                      if ($nofilelinks) {
                         print $diricon;                          print $diricon;
Line 639  elsif (-d $fullname) {
Line 636  elsif (-d $fullname) {
                 if ($filename) {                  if ($filename) {
                     print "</td><td>&nbsp;</td><td>&nbsp;" if ($dirtable);                      print "</td><td>&nbsp;</td><td>&nbsp;" if ($dirtable);
                     if ($date) {                      if ($date) {
                         print " <i>" . readableTime(time() - $date,0) . "</i>";                          print " <i>", readableTime(time() - $date,0), "</i>";
                     }                      }
                     if ($show_author) {                      if ($show_author) {
                         print "</td><td>&nbsp;" if ($dirtable);                          print "</td><td>&nbsp;" if ($dirtable);
Line 650  elsif (-d $fullname) {
Line 647  elsif (-d $fullname) {
                     print "$filename/$rev";                      print "$filename/$rev";
                     print "<BR>" if ($dirtable);                      print "<BR>" if ($dirtable);
                     if ($log) {                      if ($log) {
                         print "&nbsp;<font size=-1>"                          print "&nbsp;<font size=-1>",
                             . &htmlify(substr($log,0,$shortLogLen));                            &htmlify(substr($log,0,$shortLogLen));
                         if (length $log > 80) {                          if (length $log > 80) {
                             print "...";                              print "...";
                         }                          }
Line 661  elsif (-d $fullname) {
Line 658  elsif (-d $fullname) {
                 else {                  else {
                     my ($dwhere) = ($where ne "/" ? $where : "") . $_;                      my ($dwhere) = ($where ne "/" ? $where : "") . $_;
                     if ($use_descriptions && defined $descriptions{$dwhere}) {                      if ($use_descriptions && defined $descriptions{$dwhere}) {
                         print "<TD COLSPAN=" . ($infocols-1) . ">&nbsp;" if $dirtable;                          print "<TD COLSPAN=", ($infocols-1), ">&nbsp;" if $dirtable;
                         print $descriptions{$dwhere};                          print $descriptions{$dwhere};
                     } elsif ($dirtable && $infocols > 1) {                      } elsif ($dirtable && $infocols > 1) {
                         # close the row with the appropriate number of                          # close the row with the appropriate number of
Line 692  elsif (-d $fullname) {
Line 689  elsif (-d $fullname) {
                 next if (!defined($fileinfo{$_}));                  next if (!defined($fileinfo{$_}));
                 ($rev,$date,$log,$author) = @{$fileinfo{$_}};                  ($rev,$date,$log,$author) = @{$fileinfo{$_}};
                 $filesfound++;                  $filesfound++;
                 print "<tr bgcolor=\"" . @tabcolors[$dirrow%2] . "\"><td>" if ($dirtable);                  printf '<tr bgcolor="%s"><td>', $tabcolors[$dirrow % 2] if $dirtable;
                 print "<A NAME=\"$_\"></A>";                  print "<A NAME=\"$_\"></A>";
                 if ($nofilelinks) {                  if ($nofilelinks) {
                     print $fileicon;                      print $fileicon;
Line 707  elsif (-d $fullname) {
Line 704  elsif (-d $fullname) {
                               $defaultViewable ? "text/x-cvsweb-markup" : undef);                                $defaultViewable ? "text/x-cvsweb-markup" : undef);
                 print "</td><td>&nbsp;" if ($dirtable);                  print "</td><td>&nbsp;" if ($dirtable);
                 if ($date) {                  if ($date) {
                     print " <i>" . readableTime(time() - $date,0) . "</i>";                      print " <i>", readableTime(time() - $date,0), "</i>";
                 }                  }
                 if ($show_author) {                  if ($show_author) {
                     print "</td><td>&nbsp;" if ($dirtable);                      print "</td><td>&nbsp;" if ($dirtable);
Line 715  elsif (-d $fullname) {
Line 712  elsif (-d $fullname) {
                 }                  }
                 print "</td><td>&nbsp;" if ($dirtable);                  print "</td><td>&nbsp;" if ($dirtable);
                 if ($log) {                  if ($log) {
                     print " <font size=-1>" . &htmlify(substr($log,0,$shortLogLen));                      print " <font size=-1>", &htmlify(substr($log,0,$shortLogLen));
                     if (length $log > 80) {                      if (length $log > 80) {
                         print "...";                          print "...";
                     }                      }
Line 730  elsif (-d $fullname) {
Line 727  elsif (-d $fullname) {
         if ($dirtable && defined($tableBorderColor)) {          if ($dirtable && defined($tableBorderColor)) {
             print "</td></tr></table>";              print "</td></tr></table>";
         }          }
         print "". ($dirtable == 1) ? "</table>" : "</menu>" . "\n";          print( $dirtable == 1 ? "</table>\n" : "</menu>\n" );
   
         if ($filesexists && !$filesfound) {          if ($filesexists && !$filesfound) {
             print "<P><B>NOTE:</B> There are $filesexists files, but none matches the current tag ($input{only_with_tag})\n";              print "<P><B>NOTE:</B> There are $filesexists files, but none matches the current tag ($input{only_with_tag})\n";
Line 933  sub findLastModifiedSubdirs(@) {
Line 930  sub findLastModifiedSubdirs(@) {
     return @files;      return @files;
 }  }
   
   sub htmlify_sub(&$) {
       (my $proc, local $_) = @_;
       local @_ = split(m`(<a [^>]+>[^<]*</a>)`i);
       my ($linked, $result);
   
       while (($_, $linked) = splice(@_, 0, 2)) {
           &$proc();
           $result .= $_;
           $result .= $linked;
       }
   
       $result;
   }
   
 sub htmlify($;$) {  sub htmlify($;$) {
         (local $_, my $extra) = @_;      (local $_, my $extra) = @_;
   
         $_ = htmlquote($_);      $_ = htmlquote($_);
   
         # get URL's as link      # get URL's as link
         s`(http|ftp|https)(://[-a-zA-Z0-9%.~:_/]+)([?&]([-a-zA-Z0-9%.~:_]+)=([-a-zA-Z0-9%.~:_])+)*`&link("$1$2$3", "$1$2$3")`ge;        # `      s{
         # get e-mails as link        (http|ftp|https)://\S+
         s`[-a-zA-Z0-9_.]+@([-a-zA-Z0-9]+\.)+[A-Za-z]{2,4}`&link($&, "mailto:$&")`ge;    # `       }{
            &link($&, htmlunquote($&))
        }egx;
   
         if ($extra) {      # get e-mails as link
             # get PR #'s as link: "PR#nnnn" "PR: nnnn, ..." "PR nnnn, ..." "bin/nnnn"      $_ = htmlify_sub {
             if (defined($prcgi)) {          s<
                 1 while s`\b(pr[:#]?\s*(?:#?\d+[,\s]\s*)*#?)(\d+)\b`$1 . &link($2, sprintf($prcgi, $2))`ie; # `;            [\w+=\-.!]+@[\w\-]+(\.[\w\-]+)+
                 s`\b${prcategories}/(\d+)\b`&link($&, sprintf($prcgi, $1))`igeo;        # `;              ><
             }                &link($&, "mailto:$&")
                   >egix;
       } $_;
   
             # get manpage specs as link: "foo.1" "foo(1)"      if ($extra) {
             if (defined($mancgi)) {          # get PR #'s as link: "PR#nnnn" "PR: nnnn, ..." "PR nnnn, ..." "bin/nnnn"
                 s`\b([a-zA-Z]\w+)(?:\(([0-9n])\)\B|\.([0-9n])\b)`&link($&, sprintf($mancgi, $2 ne '' ? $2 : $3, $1))`ge; # `x;          if (defined($prcgi)) {
             }              my $prev;
   
               do {
                   $prev = $_;
   
                   $_ = htmlify_sub {
                       s{
                         (\bPR[:\#]?\s*
                          (?:
                           \#?
                           \d+[,\s]\s*
                          )*
                          \#?)
                         (\d+)\b
                        }{
                            $1 . &link($2, sprintf($prcgi, $2)) . $3
                        }egix;
                   } $_;
               } while ($_ ne $prev);
   
               $_ = htmlify_sub {
                   s{
                     (\b$prcategories/(\d+)\b)
                    }{
                        &link($1, sprintf($prcgi, $2)) . $3
                    }egox;
               } $_;
         }          }
   
         $_;          # get manpage specs as link: "foo.1" "foo(1)"
           if (defined($mancgi)) {
               $_ = htmlify_sub {
                   s{
                     (\b([a-zA-Z][\w_.]+)
                      (?:
                       \( ([0-9n]) \)\B
                       |
                       \.([0-9n])\b
                      )
                     )
                    }{
                        &link($1, sprintf($mancgi, $3 ne '' ? $3 : $4, $2)) . $5
                    }egx;
               } $_;
           }
       }
   
       $_;
 }  }
   
 sub spacedHtmlText($;$) {  sub spacedHtmlText($;$) {
Line 1066  sub safeglob($) {
Line 1125  sub safeglob($) {
                 $glob =~ s/{([^}]+)}/($t = $1) =~ s-,-|-g; "($t)"/eg;                  $glob =~ s/{([^}]+)}/($t = $1) =~ s-,-|-g; "($t)"/eg;
                 foreach (readdir($dh)) {                  foreach (readdir($dh)) {
                         if (/^${glob}$/) {                          if (/^${glob}$/) {
                                 push(@results, $dirname . "/" .$_);                                  push(@results, "$dirname/" .$_);
                         }                          }
                 }                  }
         }          }
Line 1265  sub doAnnotate($$) {
Line 1324  sub doAnnotate($$) {
             }              }
             else {              else {
                 $revprint = sprintf('%-8s', $lrev);                  $revprint = sprintf('%-8s', $lrev);
                 $revprint =~ s`\S+`&link($&, "$scriptwhere$barequery#rev$&")`e; # `                  $revprint =~ s`\S+`&link($&, "$scriptwhere$query#rev$&")`e;     # `
                 $oldLusr = '';                  $oldLusr = '';
             }              }
             if ($lusr eq $oldLusr) {              if ($lusr eq $oldLusr) {
Line 1296  sub doAnnotate($$) {
Line 1355  sub doAnnotate($$) {
             # CVS command line client.  But for simplicity, we don't.              # CVS command line client.  But for simplicity, we don't.
         }          }
         elsif ($words[0] eq "error") {          elsif ($words[0] eq "error") {
             fatal ("500 Internal Error", "Error occured during annotate: <b>$_</b>");              fatal("500 Internal Error", "Error occured during annotate: <b>$_</b>");
         }          }
     }      }
     if ($annTable) {      if ($annTable) {
Line 1595  sub doDiff($$$$$$) {
Line 1654  sub doDiff($$$$$$) {
                 s|$cvsroot/||o;                  s|$cvsroot/||o;
                 if ($sym1) {                  if ($sym1) {
                     chop;                      chop;
                     $_ .= " " . $sym1 . "\n";                      $_ .= " $sym1\n";
                 }                  }
             }              }
             elsif (m|^$f2 $cvsroot|o) {              elsif (m|^$f2 $cvsroot|o) {
                 s|$cvsroot/||o;                  s|$cvsroot/||o;
                 if ($sym2) {                  if ($sym2) {
                     chop;                      chop;
                     $_ .= " " . $sym2 . "\n";                      $_ .= " $sym2\n";
                 }                  }
             }              }
             print $_;              print $_;
Line 1724  again:
Line 1783  again:
                 # End of a log entry.                  # End of a log entry.
                 my $revbranch;                  my $revbranch;
                 ($revbranch = $rev) =~ s/\.\d+$//;                  ($revbranch = $rev) =~ s/\.\d+$//;
                 print "$filename $rev Wanted: $revwanted "                  print "$filename $rev Wanted: $revwanted ",
                     . "Revbranch: $revbranch Branch: $branch "                    "Revbranch: $revbranch Branch: $branch ",
                     . "Branchpoint: $branchpoint\n" if ($verbose);                      "Branchpoint: $branchpoint\n" if ($verbose);
                 if (!defined($revwanted) && defined($branch)                  if (!defined($revwanted) && defined($branch)
                     && $branch eq $revbranch || !defined($tag)) {                      && $branch eq $revbranch || !defined($tag)) {
                     print "File revision $rev found for branch $branch\n"                      print "File revision $rev found for branch $branch\n"
Line 1764  again:
Line 1823  again:
                 next;                  next;
             }              }
             else {              else {
                 $log = $log . $_;                  $log .= $_;
             }              }
         }          }
         if (/$LOG_FILESEPARATOR/o) {          if (/$LOG_FILESEPARATOR/o) {
Line 2083  sub printLog($;$) {
Line 2142  sub printLog($;$) {
         }          }
         if (defined @mytz) {          if (defined @mytz) {
             my ($est) = $mytz[(localtime($date{$_}))[8]];              my ($est) = $mytz[(localtime($date{$_}))[8]];
             print ", <i>" . scalar localtime($date{$_}) . " $est</i> (";              print ", <i>", scalar localtime($date{$_}), " $est</i> (";
         } else {          } else {
             print ", <i>" . scalar gmtime($date{$_}) . " UTC</i> (";              print ", <i>", scalar gmtime($date{$_}), " UTC</i> (";
         }          }
         print readableTime(time() - $date{$_},1) . " ago)";          print readableTime(time() - $date{$_},1), " ago)";
         print " by ";          print " by ";
         print "<i>" . $author{$_} . "</i>\n";          print "<i>", $author{$_}, "</i>\n";
         print "<BR>Branch: <b>",$link?link_tags($revsym{$br}):$revsym{$br},"</b>\n"          print "<BR>Branch: <b>",$link?link_tags($revsym{$br}):$revsym{$br},"</b>\n"
             if ($revsym{$br});              if ($revsym{$br});
         print "<BR>CVS Tags: <b>",$link?link_tags($revsym{$_}):$revsym{$_},"</b>"          print "<BR>CVS Tags: <b>",$link?link_tags($revsym{$_}):$revsym{$_},"</b>"
Line 2133  sub printLog($;$) {
Line 2192  sub printLog($;$) {
                 print " to previous ";                  print " to previous ";
                 print &link($prev, $url);                  print &link($prev, $url);
                 if (!$hr_default) { # offer a human readable version if not default                  if (!$hr_default) { # offer a human readable version if not default
                     print &link('colored', "$url&f=h");                      print ' (', &link('colored', "$url&f=h"), ')';
                 }                  }
             }              }
             #              #
Line 2149  sub printLog($;$) {
Line 2208  sub printLog($;$) {
                 print " to branchpoint ";                  print " to branchpoint ";
                 print &link($brp, $url);                  print &link($brp, $url);
                 if (!$hr_default) { # offer a human readable version if not default                  if (!$hr_default) { # offer a human readable version if not default
                     print &link('colored', "$url&f=h");                      print ' (', &link('colored', "$url&f=h"), ')';
                 }                  }
             }              }
             #              #
Line 2185  sub printLog($;$) {
Line 2244  sub printLog($;$) {
                     print " next main ";                      print " next main ";
                     print &link($nextmain, $url);                      print &link($nextmain, $url);
                     if (!$hr_default) { # offer a human readable version if not default                      if (!$hr_default) { # offer a human readable version if not default
                         print &link('colored', "$url&f=h");                          print ' (', &link('colored', "$url&f=h"), ')';
                     }                      }
                 }                  }
             }              }
Line 2203  sub printLog($;$) {
Line 2262  sub printLog($;$) {
                 print " to selected ";                  print " to selected ";
                 print &link($input{'r1'}, $url);                  print &link($input{'r1'}, $url);
                 if (!$hr_default) { # offer a human readable version if not default                  if (!$hr_default) { # offer a human readable version if not default
                     print &link('colored', "$url&f=h");                      print ' (', &link('colored', "$url&f=h"), ')';
                 }                  }
             }              }
         }          }
Line 2396  sub human_readable_diff($){
Line 2455  sub human_readable_diff($){
     $date2 = $r2d;      $date2 = $r2d;
   }    }
   
   print "<h3 align=center>Diff for /$where_nd between version $rev1 and $rev2</h3>\n";    print "<h3 align=center>Diff for /$where_nd between version $rev1 and $rev2</h3>\n",
       "<table border=0 cellspacing=0 cellpadding=0 width=\"100%\">\n",
   print "<table border=0 cellspacing=0 cellpadding=0 width=\"100%\">\n";        "<tr bgcolor=\"#ffffff\">\n",
   print "<tr bgcolor=\"#ffffff\">\n";          "<th width=\"50%\" valign=TOP>",
   print "<th width=\"50%\" valign=TOP>";            "version $rev1";
   print "version $rev1";  
   print ", $date1" if (defined($date1));    print ", $date1" if (defined($date1));
   print "<br>Tag: $sym1\n" if ($sym1);    print "<br>Tag: $sym1\n" if ($sym1);
   print "</th>\n";    print "</th>\n",
   print "<th width=\"50%\" valign=TOP>";      "<th width=\"50%\" valign=TOP>",
   print "version $rev2";        "version $rev2";
   print ", $date2" if (defined($date2));    print ", $date2" if (defined($date2));
   print "<br>Tag: $sym2\n" if ($sym1);    print "<br>Tag: $sym2\n" if ($sym1);
   print "</th>\n";    print "</th>\n";
Line 2547  sub navigateHeader($$$$$) {
Line 2605  sub navigateHeader($$$$$) {
 sub plural_write($$) {  sub plural_write($$) {
     my ($num,$text) = @_;      my ($num,$text) = @_;
     if ($num != 1) {      if ($num != 1) {
         $text = $text . "s";          $text .= "s";
     }      }
     if ($num > 0) {      if ($num > 0) {
         return $num . " " . $text;          return join(' ', $num, $text);
     }      }
     else {      else {
         return "";          return "";
Line 2594  sub readableTime($$) {
Line 2652  sub readableTime($$) {
         my $resttime = plural_write(int ($rest / $break),          my $resttime = plural_write(int ($rest / $break),
                                 $desc{$break});                                  $desc{$break});
         if ($resttime) {          if ($resttime) {
             $retval = $retval . ", " . $resttime;              $retval .= ", $resttime";
         }          }
     }      }
   
Line 2624  sub clickablePath($$) {
Line 2682  sub clickablePath($$) {
         my $wherepath = '';          my $wherepath = '';
         my ($lastslash) = $pathname =~ m|/$|;          my ($lastslash) = $pathname =~ m|/$|;
         foreach (split(/\//, $pathname)) {          foreach (split(/\//, $pathname)) {
             $retval = $retval . " / ";              $retval .= " / ";
             $wherepath = $wherepath . '/' . $_;              $wherepath .= "/$_";
             my ($last) = "$wherepath/" eq "/$pathname"              my ($last) = "$wherepath/" eq "/$pathname"
                 || $wherepath eq "/$pathname";                  || $wherepath eq "/$pathname";
             if ($clickLast || !$last) {              if ($clickLast || !$last) {
Line 2669  sub chooseCVSRoot() {
Line 2727  sub chooseCVSRoot() {
         foreach $k (@foo) {          foreach $k (@foo) {
             print "<option value=\"$k\"";              print "<option value=\"$k\"";
             print " selected" if ($k eq $cvstree);              print " selected" if ($k eq $cvstree);
             print ">" . ($CVSROOTdescr{$k} ? $CVSROOTdescr{$k} :              print ">", ($CVSROOTdescr{$k} ? $CVSROOTdescr{$k} : $k), "</option>\n";
                         $k). "</option>\n";  
         }          }
         print "</select>\n</td>";          print "</select>\n</td>";
         print "<td><input type=submit value=\"Go\"></td>";          print "<td><input type=submit value=\"Go\"></td>";
Line 2845  sub htmlquote($) {
Line 2902  sub htmlquote($) {
     $_;      $_;
 }  }
   
   sub htmlunquote($) {
       local($_) = @_;
   
       # Special Characters; RFC 1866
       s/&quot;/\"/g;
       s/&lt;/</g;
       s/&gt;/>/g;
       s/&amp;/&/g;
   
       $_;
   }
   
 sub http_header(;$) {  sub http_header(;$) {
     my $content_type = shift || "text/html";      my $content_type = shift || "text/html";
     if (defined($moddate)) {      if (defined($moddate)) {
Line 2852  sub http_header(;$) {
Line 2921  sub http_header(;$) {
             Apache->request->header_out("Last-Modified" => scalar gmtime($moddate) . " GMT");              Apache->request->header_out("Last-Modified" => scalar gmtime($moddate) . " GMT");
         }          }
         else {          else {
             print "Last-Modified: " . scalar gmtime($moddate) . " GMT\r\n";              print "Last-Modified: ", scalar gmtime($moddate), " GMT\r\n";
         }          }
     }      }
     if ($is_mod_perl) {      if ($is_mod_perl) {

Legend:
Removed from v.3.35  
changed lines
  Added in v.3.36

CVSweb