Last active
May 27, 2024 18:06
-
-
Save juancarlospaco/aa16aa332e07f1de9139de1e6ae4f1a0 to your computer and use it in GitHub Desktop.
C print for Nim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proc printf*(format: cstring): cint {.importc, header: "<stdio.h>".} | |
proc fprintf*(stream: File, format: cstring): cint {.importc, header: "<stdio.h>".} | |
proc sprintf*(str: var cstring, format: cstring): cint {.importc, header: "<stdio.h>".} | |
proc vsprintf*(str: var cstring, format: cstring, arg: varargs[typed, `$`]): cint {.importc, header: "<stdio.h>".} | |
proc vfprintf*(stream: File, format: cstring, arg: varargs[typed, `$`]): cint {.importc, header: "<stdio.h>".} | |
proc vprintf*(format: cstring, arg: varargs[typed, `$`]): cint {.importc, header: "<stdio.h>".} | |
proc fputs*(str: char, stream: File): cint {.importc, header: "<stdio.h>".} | |
proc puts*(str: char): cint {.importc, header: "<stdio.h>".} | |
proc printf_s*(format: cstring, arg: varargs[typed, `$`]): cint {.importc, header: "<stdio.h>".} | |
proc fprintf_s*(stream: File, format: cstring, arg: varargs[typed, `$`]): cint {.importc, header: "<stdio.h>".} | |
proc wprintf*(format: cstring, arg: varargs[typed, `$`]): cint {.importc, header: "<stdio.h>".} | |
proc fwprintf*(stream: File, format: cstring, arg: varargs[typed, `$`]): cint {.importc, header: "<stdio.h>".} | |
proc wprintf_s*(format: cstring, arg: varargs[typed, `$`]): cint {.importc, header: "<stdio.h>".} | |
proc fwprintf_s*(stream: File, format: cstring, arg: varargs[typed, `$`]): cint {.importc, header: "<stdio.h>".} | |
proc fwrite*(formatstr: cstring, size: cuint, nmemb: cuint, stream: File): cint {.importc, header: "<stdio.h>".} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
proc printf*(format: cstring): cint {.importc, header: "<stdio.h>", varargs.}