bugfixes; added events module, sequtils module

This commit is contained in:
Araq 2011-07-26 00:46:41 +02:00
commit 0e7f2ca3f1
13 changed files with 292 additions and 15 deletions

View file

@ -107,8 +107,10 @@ proc highlight(s, match, repl: string, t: tuple[first, last: int],
stdout.write("\n")
proc processFile(filename: string) =
var buffer = system.readFile(filename)
if isNil(buffer):
var buffer: string
try:
buffer = system.readFile(filename)
except EIO:
echo "cannot open file: ", filename
return
stdout.writeln(filename)