Mono Class Library: Mono.Unix.Native.Stdlib Overview | MembersMono.Unix.Native.Stdlib.setbuf Method |
Control FILE stream buffering operations. [Edit]
|
The setbuf() function returns the value 0 if successful; otherwise the value -1 is returned and Stdlib.GetLastError indicates the error. [Edit]
The setbuf function disables FILE stream buffering if buf is IntPtr.Zero, otherwise full buffering is enabled (and buf is used as the buffer).
The setbuf function is an alias for calls to Stdlib.setvbuf. Except for the lack of a return value, the setbuf function is exactly equivalent to the call:
Stdlib.setvbuf (stream, buf, buf ? Stdlib._IOFBF : Stdlib._IONBF, Stdlib.BUFSIZ);
This function requires that buf refer to at least Stdlib.BUFSIZ bytes of memory. This memory must remain valid until the next setbuf, Stdlib.setvbuf, or Stdlib.fclose call.
[Edit]
Namespace: Mono.Unix.Native
Assembly: Mono.Posix (in Mono.Posix.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0