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

@ -114,18 +114,18 @@ proc c_signal(sign: cint, handler: proc (a: cint) {.noconv.}): c_sighandler_t {.
type
CFile {.importc: "FILE", header: "<stdio.h>",
incompletestruct.} = object
CFileStar* = ptr CFile ## The type representing a file handle.
CFilePtr* = ptr CFile ## The type representing a file handle.
var
cstderr* {.importc: "stderr", header: "<stdio.h>".}: CFileStar
cstdout* {.importc: "stdout", header: "<stdio.h>".}: CFileStar
cstderr* {.importc: "stderr", header: "<stdio.h>".}: CFilePtr
cstdout* {.importc: "stdout", header: "<stdio.h>".}: CFilePtr
proc c_fprintf(f: CFileStar, frmt: cstring): cint {.
proc c_fprintf(f: CFilePtr, frmt: cstring): cint {.
importc: "fprintf", header: "<stdio.h>", varargs, discardable.}
proc c_printf(frmt: cstring): cint {.
importc: "printf", header: "<stdio.h>", varargs, discardable.}
proc c_fputs(c: cstring, f: CFileStar): cint {.
proc c_fputs(c: cstring, f: CFilePtr): cint {.
importc: "fputs", header: "<stdio.h>", discardable.}
proc c_sprintf(buf, frmt: cstring): cint {.