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

Diff for /cvsweb/cvsweb.cgi between version 3.19 and 3.20

version 3.19, 2000/09/04 15:53:41 version 3.20, 2000/09/10 11:54:21
Line 82  use vars qw (
Line 82  use vars qw (
 sub printDiffSelect($);  sub printDiffSelect($);
 sub findLastModifiedSubdirs(@);  sub findLastModifiedSubdirs(@);
 sub htmlify($;$);  sub htmlify($;$);
 sub spacedHtmlText($);  sub spacedHtmlText($;$);
 sub link($$);  sub link($$);
 sub revcmp($$);  sub revcmp($$);
 sub fatal($$);  sub fatal($$);
Line 916  sub htmlify($;$) {
Line 916  sub htmlify($;$) {
         return $string;          return $string;
 }  }
   
 sub spacedHtmlText($) {  sub spacedHtmlText($;$) {
         local $_ = $_[0];          local $_ = $_[0];
           my $ts = $_[1] || $tabstop;
   
         # Cut trailing spaces          # Cut trailing spaces and tabs
         s/\s+$/\n/;          s/[ \t]+$//;
   
         # Expand tabs          if (defined($tabstop)) {
         s/\t+/' ' x (length($&) * $tabstop - length($`) % $tabstop)/e              # Expand tabs
             if (defined($tabstop));              1 while s/\t+/' ' x (length($&) * $ts - length($`) % $ts)/e
           }
   
         # replace <tab> and <space> (\001 is to protect us from htmlify)          # replace <tab> and <space> (\001 is to protect us from htmlify)
         # gzip can make excellent use of this repeating pattern :-)          # gzip can make excellent use of this repeating pattern :-)
         s/\001/\001%/g; #protect our & substitute  
         if ($hr_breakable) {          if ($hr_breakable) {
             # make every other space 'breakable'              # make every other space 'breakable'
             s/  / \001nbsp; \001nbsp; \001nbsp; \001nbsp;/g;    # <tab>  
             s/  / \001nbsp;/g;                              # 2 * <space>              s/  / \001nbsp;/g;                              # 2 * <space>
             # leave single space as it is              # leave single space as it is
         }          } else {
         else {  
             s/  /\001nbsp;\001nbsp;\001nbsp;\001nbsp;\001nbsp;\001nbsp;\001nbsp;\001nbsp;/g;  
             s/ /\001nbsp;/g;              s/ /\001nbsp;/g;
         }          }
   
         $_ = htmlify($_);          $_ = htmlify($_);
   
         # unescape          # unescape
         s/\001([^%])/&$1/g;          y/\001/&/;
         s/\001%/\001/g;  
   
         return $_;          return $_;
 }  }

Legend:
Removed from v.3.19  
changed lines
  Added in v.3.20

CVSweb