Added setStdIoUnbuffered for unbuffered stdio (fixes #2146).

This commit is contained in:
A. S. Budden 2016-06-12 07:40:28 +01:00
commit 52b4e8f661
3 changed files with 9 additions and 0 deletions

View file

@ -2708,6 +2708,9 @@ when not defined(JS): #and not defined(nimscript):
##
## Default mode is readonly. Returns true iff the file could be reopened.
proc setStdIoUnbuffered() {.tags: [], benign.}
## Configures `stdin`, `stdout` and `stderr` to be unbuffered.
proc close*(f: File) {.importc: "fclose", header: "<stdio.h>", tags: [].}
## Closes the file.