Ignore:
Timestamp:
Aug 4, 2000, 10:50:56 AM (25 years ago)
Author:
bird
Message:

More coding...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/database/www/cvs.php3

    r3946 r3947  
    22
    33
    4 $sCVSROOT = "d:\\odin32\\cvs\\cvsroot";
     4$sCVSROOT = "d:/odin32/cvs/cvsroot";
     5$sCVSROOT = ".";
    56
    67/**
     
    2829        global $sCVSROOT;
    2930
     31        $this->fOk = 0;
    3032        /*
    3133         * TODO: Security: Check that the path and filename is valid!
     
    3537        {
    3638            $this->sError = "filename is invalid";
    37             return $this->fOk = 0;
     39            return 1;
    3840        }
    3941
     
    4143         * Check filesize. Minimum size is 10 bytes!
    4244         */
    43         $this->sFullname = $sCVSROOT."\\".$sFilename;
     45        $this->sFullname = $sCVSROOT."/".$sFilename;
    4446        $cbFile = filesize($this->sFullname);
    4547        if ($cbFile <= 10)
    4648        {
    4749            $this->sError = "too small file,  " . $this->sFullname . ", ". $cbFile ."\n";
    48             return $this->fOk = 0;
    49         }
    50         if ($cbFile >= (2*1024*1024)) //currently max size of 2MB.
     50            return 1;
     51        }
     52        if (!$fNoDeltas && $cbFile >= (2*1024*1024)) //currently max size of 2MB.
    5153        {
    5254            $this->sError = "\ntoo large file,  ". $this->sFullname .", ". $cbFile ."\n";
    53             return $this->fOk = 0;
     55            return 1;
    5456        }
    5557
     
    8284            $this->sError = "\nfailed to open the file $this->sFullname\n";
    8385            fclose($hFile);
    84             return 0;
     86            return 1;
    8587        }
    8688
     
    108110            {
    109111                $iLine++;
    110                 $sLine = fgets($hFile, 0x10000);
     112                $sLine = fgets($hFile, 0x1000);
    111113                continue;
    112114            }
     
    145147                    /* Get next line and remove any EOF chars */
    146148                    $iLine++;
    147                     $sLine = str_replace("\x1a", "", fgets($hFile, 0x10000));
     149                    $sLine = str_replace("\x1a", "", fgets($hFile, 0x1000));
    148150                    continue;
    149151                }
     
    206208                    $fDesc = 1;
    207209                    $sRev = "";
     210                    break;
     211
     212                /*
     213                 * Stop after the first log entry.
     214                 */
     215                case "log":
    208216                    $fStop = $fNoDeltas;
    209217                    break;
     
    227235                    $this->sError = "Invalid file format.";
    228236                    fclose($hFile);
    229                     return 0;
     237                    return 1;
    230238                }
    231239                $this->aasKeys[$sKey] = $asValue;
     
    356364         * Write it!
    357365         */
    358         echo "<table><tr><td bgcolor=\"#020286\"><pre><font size=-0 color=\"#02FEFE\">\n";
     366        echo "<table><tr><td bgcolor=\"#020286\"><pre><font size=-0 face=\"System VIO, System Monospaced\" color=\"#02FEFE\">\n";
    359367
    360368        $fComment = 0;
     
    636644                else
    637645                {
    638                     while ($j < $cchLine && $sLine[$j] != '&'
    639                            && substr($sLine[$j], $i, 6) != "&quot;")
     646                    while ($j < $cchLine && ($sLine[$j] != '&' || substr($sLine, $j, 6) != "&quot;"))
    640647                        $j += ($sLine[$j] == '\\') ? 2 : 1;
    641648                    if ($j < $cchLine)
     
    682689            if ($cchWord > 0 && isset($aC_Keywords[substr($sLine, $i, $cchWord)]))
    683690                $sRet .= "<font color=\"#FF0202\">" . substr($sLine, $i, $cchWord) . "</font>";
     691
     692            /*
     693             * Check for number
     694             */
     695            else if ($sLine[$i] >= '0' && $sLine[$i] <= '9')
     696                $sRet .= "<font color=\"#FE0202\">" . substr($sLine, $i, $cchWord) . "</font>";
    684697
    685698            /*
Note: See TracChangeset for help on using the changeset viewer.