further system.nim cleanups
This commit is contained in:
parent
2851f316f6
commit
37f9ace517
5 changed files with 31 additions and 42 deletions
|
|
@ -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 {.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue