version 0.8.2
This commit is contained in:
parent
581572b28c
commit
053309e60a
125 changed files with 6564 additions and 1308 deletions
|
|
@ -48,7 +48,8 @@ proc read[T](s: PStream, result: var T) =
|
|||
|
||||
proc readChar*(s: PStream): char =
|
||||
## reads a char from the stream `s`. Raises `EIO` if an error occured.
|
||||
read(s, result)
|
||||
## Returns '\0' as an EOF marker.
|
||||
discard s.readData(s, addr(result), sizeof(result))
|
||||
|
||||
proc readBool*(s: PStream): bool =
|
||||
## reads a bool from the stream `s`. Raises `EIO` if an error occured.
|
||||
|
|
@ -94,7 +95,7 @@ proc readLine*(s: PStream): string =
|
|||
if c == '\c':
|
||||
c = readChar(s)
|
||||
break
|
||||
elif c == '\L': break
|
||||
elif c == '\L' or c == '\0': break
|
||||
result.add(c)
|
||||
|
||||
type
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue