diff options
| author | bptato <nincsnevem662@gmail.com> | 2025-01-31 21:18:33 +0100 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2025-01-31 21:18:47 +0100 |
| commit | 3935fdb1d6e6754851a3aab9e8cceaaf82283bb1 (patch) | |
| tree | 2dfc9da8d6763fc5e7afd8c1e01b2d411a666825 /src/utils | |
| parent | 9f44d7b9b03a087ceff7ac030758ef4f25bb7933 (diff) | |
| download | chawan-3935fdb1d6e6754851a3aab9e8cceaaf82283bb1.tar.gz | |
eprint: add fprintf wrapper
useful in situations where allocations change program behavior
Diffstat (limited to 'src/utils')
| -rw-r--r-- | src/utils/eprint.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils/eprint.nim b/src/utils/eprint.nim index 33d9990c..a4e489e2 100644 --- a/src/utils/eprint.nim +++ b/src/utils/eprint.nim @@ -21,6 +21,9 @@ else: func eprint*(s: varargs[string, `$`]) = eprint0(s) +proc c_fprintf*(f: File, frmt: cstring): cint {. + importc: "fprintf", header: "<stdio.h>", varargs, discardable.} + func elog*(s: varargs[string, `$`]) = {.cast(noSideEffect), cast(tags: []), cast(raises: []).}: var f: File = nil |