version 3.31, 2000/10/02 19:07:08 |
version 3.34, 2000/10/10 18:48:59 |
|
|
$checkoutMagic $doCheckout $scriptname $scriptwhere |
$checkoutMagic $doCheckout $scriptname $scriptwhere |
$where $pathinfo $Browser $nofilelinks $maycompress @stickyvars |
$where $pathinfo $Browser $nofilelinks $maycompress @stickyvars |
%funcline_regexp $is_mod_perl |
%funcline_regexp $is_mod_perl |
$is_lynx $is_w3m $is_msie $is_mozilla3 $is_textbased |
$is_links $is_lynx $is_w3m $is_msie $is_mozilla3 $is_textbased |
%input $query $barequery $sortby $bydate $byrev $byauthor |
%input $query $barequery $sortby $bydate $byrev $byauthor |
$bylog $byfile $hr_default $logsort $cvstree $cvsroot |
$bylog $byfile $hr_default $logsort $cvstree $cvsroot |
$mimetype $defaultTextPlain $defaultViewable $allow_compress |
$mimetype $defaultTextPlain $defaultViewable $allow_compress |
|
|
$tabstop $state $annTable $sel $curbranch @HideModules |
$tabstop $state $annTable $sel $curbranch @HideModules |
$module $use_descriptions %descriptions @mytz $dwhere $moddate |
$module $use_descriptions %descriptions @mytz $dwhere $moddate |
$use_moddate $has_zlib $gzip_open |
$use_moddate $has_zlib $gzip_open |
|
$LOG_FILESEPARATOR $LOG_REVSEPARATOR |
); |
); |
|
|
sub printDiffSelect($); |
sub printDiffSelect($); |
Line 159 $checkout_magic = $show_subdir_lastmod = $show_log_in_ |
|
Line 160 $checkout_magic = $show_subdir_lastmod = $show_log_in_ |
|
$navigationHeaderColor = $tableBorderColor = $markupLogColor = |
$navigationHeaderColor = $tableBorderColor = $markupLogColor = |
$tabstop = $use_moddate = $moddate = $gzip_open = undef; |
$tabstop = $use_moddate = $moddate = $gzip_open = undef; |
|
|
|
$LOG_FILESEPARATOR = q/^={77}$/; |
|
$LOG_REVSEPARATOR = q/^-{28}$/; |
|
|
##### End of configuration variables ##### |
##### End of configuration variables ##### |
|
|
use Time::Local; |
use Time::Local; |
Line 192 $is_mod_perl = defined($ENV{MOD_PERL}); |
|
Line 196 $is_mod_perl = defined($ENV{MOD_PERL}); |
|
# per file, so disable the link at the icon |
# per file, so disable the link at the icon |
# in this case: |
# in this case: |
$Browser = $ENV{HTTP_USER_AGENT}; |
$Browser = $ENV{HTTP_USER_AGENT}; |
|
$is_links = ($Browser =~ m`^Links `); |
$is_lynx = ($Browser =~ m`^Lynx/`i); |
$is_lynx = ($Browser =~ m`^Lynx/`i); |
$is_w3m = ($Browser =~ m`^w3m/`i); |
$is_w3m = ($Browser =~ m`^w3m/`i); |
$is_msie = ($Browser =~ m`MSIE`); |
$is_msie = ($Browser =~ m`MSIE`); |
$is_mozilla3 = ($Browser =~ m`^Mozilla/[3-9]`); |
$is_mozilla3 = ($Browser =~ m`^Mozilla/[3-9]`); |
|
|
$is_textbased = ($is_lynx || $is_w3m); |
$is_textbased = ($is_links || $is_lynx || $is_w3m); |
|
|
$nofilelinks = $is_textbased; |
$nofilelinks = $is_textbased; |
|
|
Line 284 foreach (@stickyvars) { |
|
Line 289 foreach (@stickyvars) { |
|
# construct a query string with the sticky non default parameters set |
# construct a query string with the sticky non default parameters set |
if (defined($input{$_}) && $input{$_} ne '' && |
if (defined($input{$_}) && $input{$_} ne '' && |
!(defined($DEFAULTVALUE{$_}) && $input{$_} eq $DEFAULTVALUE{$_})) { |
!(defined($DEFAULTVALUE{$_}) && $input{$_} eq $DEFAULTVALUE{$_})) { |
push @barequery, join('=', urlencode($_), urlencode($input{$_}); |
push @barequery, join('=', urlencode($_), urlencode($input{$_})); |
} |
} |
} |
} |
# is there any query ? |
# is there any query ? |
Line 344 if ($input{'cvsroot'} && $CVSROOT{$input{'cvsroot'}}) |
|
Line 349 if ($input{'cvsroot'} && $CVSROOT{$input{'cvsroot'}}) |
|
$cvsroot = $CVSROOT{$cvstree}; |
$cvsroot = $CVSROOT{$cvstree}; |
|
|
# create icons out of description |
# create icons out of description |
my $k |
my $k; |
foreach $k (keys %ICONS) { |
foreach $k (keys %ICONS) { |
no strict 'refs'; |
no strict 'refs'; |
my ($itxt,$ipath,$iwidth,$iheight) = @{$ICONS{$k}}; |
my ($itxt,$ipath,$iwidth,$iheight) = @{$ICONS{$k}}; |
Line 932 sub htmlify($;$) { |
|
Line 937 sub htmlify($;$) { |
|
if ($extra) { |
if ($extra) { |
# get PR #'s as link .. |
# get PR #'s as link .. |
if (defined($prcgi)) { |
if (defined($prcgi)) { |
1 while $string =~ s`\b(pr[:#]?\s*(?:#?\d+[,\s]\s*)*#?)(\d+)\b`$1 . &link($2, sprintf($prcgi, $2))`ie; # ` |
1 while $string =~ s`\b(pr[:#]?\s*(?:#?\d+[,\s]\s*)*#?)(\d+)\b`$1 . &link($2, sprintf($prcgi, $2))`ie; # `; |
$string =~ s`\b${prcategories}/(\d+)\b`&link($&, sprintf($prcgi, $1))`igeo; # ` |
$string =~ s`\b${prcategories}/(\d+)\b`&link($&, sprintf($prcgi, $1))`igeo; # `; |
} |
} |
|
|
# get manpage specs as link .. |
# get manpage specs as link .. |
if (defined($mancgi)) { |
if (defined($mancgi)) { |
$string =~ s`\b([a-zA-Z]\w+)\(([0-9n])\)\B`&link($&, sprintf($mancgi, $2, $1))`ge; # ` |
$string =~ s`\b([a-zA-Z]\w+)(?:\(([0-9n])\)\B|\.([0-9n])\b)`&link($&, sprintf($mancgi, $2 ne '' ? $2 : $3, $1))`ge; # `x; |
} |
} |
} |
} |
|
|
Line 978 sub spacedHtmlText($;$) { |
|
Line 983 sub spacedHtmlText($;$) { |
|
sub link($$) { |
sub link($$) { |
my($name, $where) = @_; |
my($name, $where) = @_; |
|
|
return "<A HREF=\"$where\">$name</A>\n"; |
return "<A HREF=\"$where\">$name</A>"; |
} |
} |
|
|
sub revcmp($$) { |
sub revcmp($$) { |
Line 1251 sub doAnnotate($$) { |
|
Line 1256 sub doAnnotate($$) { |
|
} |
} |
else { |
else { |
$revprint = sprintf('%-8s', $lrev); |
$revprint = sprintf('%-8s', $lrev); |
$revprint =~ s`\S+`<a href="${scriptwhere}${barequery}#rev$1">$&</A>`; # ` |
$revprint =~ s`\S+`<a href="${scriptwhere}${barequery}#rev$&">$&</A>`; # ` |
$oldLusr = ''; |
$oldLusr = ''; |
} |
} |
if ($lusr eq $oldLusr) { |
if ($lusr eq $oldLusr) { |
Line 1268 sub doAnnotate($$) { |
|
Line 1273 sub doAnnotate($$) { |
|
# so it looks irregular. |
# so it looks irregular. |
print "<b>" if ($isCurrentRev && $is_textbased); |
print "<b>" if ($isCurrentRev && $is_textbased); |
|
|
printf ("%s%s %-8s %4d:", |
printf "%s%s %-8s %4d:", |
$revprint, |
$revprint, |
$isCurrentRev ? '!' : ' ', |
$isCurrentRev ? '!' : ' ', |
$usrprint, |
$usrprint, |
$lineNr); |
$lineNr; |
print spacedHtmlText($line, $d{'tabstop'}); |
print spacedHtmlText($line, $d{'tabstop'}); |
|
|
print "</b>" if ($isCurrentRev && $is_textbased); |
print "</b>" if ($isCurrentRev && $is_textbased); |
|
|
$state = "head"; |
$state = "head"; |
goto again; |
goto again; |
} |
} |
if ($state eq "head" && /^----------------------------$/) { |
if ($state eq "head" && /$LOG_REVSEPARATOR/o) { |
$state = "log"; |
$state = "log"; |
$rev = undef; |
$rev = undef; |
$date = undef; |
$date = undef; |
|
|
next; |
next; |
} |
} |
if ($state eq "log") { |
if ($state eq "log") { |
if (/^----------------------------$/ |
if (/$LOG_REVSEPARATOR/o || /$LOG_FILESEPARATOR/o) { |
|| /^=============================/) { |
|
# End of a log entry. |
# End of a log entry. |
my $revbranch; |
my $revbranch; |
($revbranch = $rev) =~ s/\.\d+$//; |
($revbranch = $rev) =~ s/\.\d+$//; |
|
|
$log = $log . $_; |
$log = $log . $_; |
} |
} |
} |
} |
if (/^===============/) { |
if (/$LOG_FILESEPARATOR/o) { |
$state = "start"; |
$state = "start"; |
next; |
next; |
} |
} |
Line 1826 sub readLog($;$) { |
|
Line 1830 sub readLog($;$) { |
|
# log info |
# log info |
# ---------------------------- |
# ---------------------------- |
logentry: |
logentry: |
while (!/^=========/) { |
while (!/$LOG_FILESEPARATOR/o) { |
$_ = <$fh>; |
$_ = <$fh>; |
last logentry if (!defined($_)); # EOF |
last logentry if (!defined($_)); # EOF |
print "R:", $_ if ($verbose); |
print "R:", $_ if ($verbose); |
Line 1834 sub readLog($;$) { |
|
Line 1838 sub readLog($;$) { |
|
$rev = $1; |
$rev = $1; |
unshift(@allrevisions,$rev); |
unshift(@allrevisions,$rev); |
} |
} |
elsif (/^========/ || /^----------------------------$/) { |
elsif (/$LOG_FILESEPARATOR/o || /$LOG_REVSEPARATOR/o) { |
next logentry; |
next logentry; |
} |
} |
else { |
else { |
Line 1868 sub readLog($;$) { |
|
Line 1872 sub readLog($;$) { |
|
while (<$fh>) { |
while (<$fh>) { |
print "L:", $_ if ($verbose); |
print "L:", $_ if ($verbose); |
next line if (/^branches:\s/); |
next line if (/^branches:\s/); |
last line if (/^----------------------------$/ || /^=========/); |
last line if (/$LOG_FILESEPARATOR/o || /$LOG_REVSEPARATOR/o); |
$log{$rev} .= $_; |
$log{$rev} .= $_; |
} |
} |
print "E:", $_ if ($verbose); |
print "E:", $_ if ($verbose); |