diff options
author | xyz <xyz@queeq.com> | 2015-08-25 06:48:58 -0400 |
---|---|---|
committer | xyz <xyz@queeq.com> | 2015-08-25 06:48:58 -0400 |
commit | 1def8ec9f9e3042dd765d29f21954b504b0a8c46 (patch) | |
tree | a609f914f0a1a760c2ad556933af7932a46b651c /lib/system/sysio.nim | |
parent | 88247e6857beb73666b7bc763bd897b26806dd9f (diff) | |
download | Nim-1def8ec9f9e3042dd765d29f21954b504b0a8c46.tar.gz |
remove fileError
Diffstat (limited to 'lib/system/sysio.nim')
-rw-r--r-- | lib/system/sysio.nim | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/system/sysio.nim b/lib/system/sysio.nim index 6db92ddf9..8ad48d368 100644 --- a/lib/system/sysio.nim +++ b/lib/system/sysio.nim @@ -153,7 +153,7 @@ proc readAllFile(file: File, len: int): string = if endOfFile(file): if bytes < len: result.setLen(bytes) - elif fileError(file): + elif ferror(file) != 0: raiseEIO("error while reading from file") else: # We read all the bytes but did not reach the EOF @@ -196,9 +196,6 @@ proc endOfFile(f: File): bool = ungetc(c, f) return c < 0'i32 -proc fileError(f: File): bool = - result = (ferror(f) != 0) - proc writeLn[Ty](f: File, x: varargs[Ty, `$`]) = for i in items(x): write(f, i) |