Limit of $maxlines matched " .
# "lines per file exceeded...\n" if
# $linecount==$maxlines && $maxlines > 0;
#
print $mOutput->limitMaxLines($maxlines) if $linecount==($maxlines+1) && $maxlines > 0;
next line;
}
if ($charcount >= $maxchars) {
print "***\n";
next line;
}
if ($SUPPRESS_HTML_TAGS && $file =~ /$SUPPRESS_HTML_TAGS/o) {
$string =~ s#\?[a-zA-Z][^>]*\>?##g;
} else {
# we shouldn't suppress tags, but we need to do basic
# substitutions
$string =~ s/\&/\&/g;
$string =~ s/\\</g;
$string =~ s/\>/\>/g;
}
if($string !~ /^\s*$/){
if($QS_lines){
if ($charcount + length($string) >$maxchars) {
$string = substr($string,0,$maxchars - $charcount - length($string));
}
# BOLDING
if ($OPT_case) {
$string =~ s#$highlight#$&#gio;
} else {
$string =~ s#$highlight#$&#go;
}
# unused $length = length($indexdir);
# Added $link as argument for use in BASE HREF tag
# Trim spaces from $line as per Jan Holler. 10/17/97 --GB
$line =~ s/\ //g;
$linkto = "$FSSERV$indexdir\?link=$link&file=$file&line=$line#mfs";
print $mOutput->makeJumpToLine($linkto, $line, $string);
}else{
if ($charcount + length($string) >$maxchars) {
$string = substr($string,0,$maxchars - $charcount - length($string));
}
# BOLDING
if ($OPT_case) {
$string =~ s#$highlight#$&#gio;
} else {
$string =~ s#$highlight#$&#go;
}
print $mOutput->makeLine($string);
}
}
$charcount += length($string);
}
# If we jumped out because of max files, we already printed the necessary ending codes
# otherwise, do it now.
($fcount < $maxfiles) && print $mOutput->makeEndHits($file);
if (($fcount >= $maxfiles) && $USE_CACHE && $mCache && $HAVE_CUSTOM_OUTPUT) {
print $mOutput->makeNextHits($indexdir, $cachefile, $QS_query, $maxfiles, $maxlines, $maxchars);
}
if ($HAVE_CUSTOM_OUTPUT) {
print $mOutput->makeNewQuery($indexdir, $maxfiles, $maxlines,
$maxchars, $QS_file,$QS_lines,$QS_age,$QS_case,
$QS_whole,$QS_errors, $QS_filter, $QS_query);
}
print $mOutput->makeFinalOutput($QS_query, $lcount, $fcount);
### DEBUG
# $utime = (times)[0];
# $stime = (times)[1];
# $ctime = (times)[1];
# $cstime = (times)[1];
# print "time after formatting: $utime, $stime, $ctime, $cstime
\n";
# ($sec, $min, $hour, $other) = localtime(time);
# print "
now: $hour:$min:$sec
\n";
unlink "/tmp/.glimpse_tmp.$gpid";
exit(0);
##########################################################################
sub www_form_urldecode { # Added 10/18/97 as per Peter Bigot --GB
local($_) = @_;
# Reverse the encoding: plus goes to space, then unhex encoded chars
s/\+/ /g;
s/%([A-Fa-f0-9]{2})/pack("c",hex($1))/ge;
return $_;
}
##########################################################################
sub diag_exit {
# exit on error
exit -1;
}
##########################################################################
sub err_noneighborhood {
local($_) = @_;
# neighborhood does not exist
print <
File not found
There is no neighborhood for file $_. Either the file does not
exist or the neighborhood file does not exist.