further system.nim cleanups

This commit is contained in:
Andreas Rumpf 2019-02-06 22:35:51 +01:00
commit 37f9ace517
5 changed files with 31 additions and 42 deletions

View file

@ -17,10 +17,10 @@ var
## instead of stdmsg.write when printing stacktrace.
## Unstable API.
proc c_fwrite(buf: pointer, size, n: csize, f: CFileStar): cint {.
proc c_fwrite(buf: pointer, size, n: csize, f: CFilePtr): cint {.
importc: "fwrite", header: "<stdio.h>".}
proc rawWrite(f: CFileStar, s: string|cstring) =
proc rawWrite(f: CFilePtr, s: string|cstring) =
# we cannot throw an exception here!
discard c_fwrite(cstring(s), 1, s.len, f)