compiler uses new 'readLine'

This commit is contained in:
Araq 2011-11-27 19:01:55 +01:00
commit a489161b16
8 changed files with 86 additions and 73 deletions

View file

@ -380,8 +380,8 @@ proc externalFileChanged(filename: string): bool =
var currentCrc = int(footprint(filename))
var f: TFile
if open(f, crcFile, fmRead):
var line = f.readLine()
if isNil(line) or line.len == 0: line = "0"
var line = newStringOfCap(40)
if not f.readLine(line): line = "0"
close(f)
var oldCrc = parseInt(line)
result = oldCrc != currentCrc