STDIO interaction.
More...
#include <wfio/type.h>
#include <stdio.h>
Go to the source code of this file.
|
| wfio |
| The root namespace for WFIO.
|
|
STDIO interaction.
- Author
- Phillip Kilgore
- Since
- 0.0.1
- Note
- This file includes <stdio.h>.
◆ wfio_device_from_stdio()
Wrap the device with the given filehandle handle
.
This function wraps an already open FILE* produced by the standard library. The new device takes ownership of the FILE* in the process. The device behaves as thought the corresponding STDIO calls were made.
Calling wfio_device_ioctl() on this device occurs in a purely implementation-defined manner. If file descriptors are supported, then this is equivalent to invoking this function on a file desciptor device (see wfio_device_from_fd()).
- Parameters
-
handle | The file handle to wrap. |
error | An optional error indicator. |
- Returns
- An open wfar_device_t on success; otherwise, NULL.
◆ wfio_stdio_getbufsz()
Obtain the buffer size associated with this handle.
- Parameters
-
handle | The file handle to get the buffer size for. |
error | An optional error indicator. |
- Returns
- The size of the buffer on success; otherwise, WFIO_NPOS.
◆ wfio_stdio_to_fd()
Attempt to convert handle
to a file descriptor.
- Parameters
-
handle | The file handle to convert. |
error | An optional error indicator. |
- Returns
- The file descriptor corresponding to
handle
on success; otherwise, WFIO_BAD_FD.