Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Stream extensions (one-line notes) - glibc

Split from the chapter glibc: stdio and Formatted I/O into the per-function layout; see the method page and the glibc ledger for coverage status.

Researched from the glibc manual, stdio_ext(3) and headers; no full entries yet.

Function(s)Note
fwideSet/query orientation (ISO C95, wchar.h); positive mode wide, negative narrow, 0 query; cannot re-orient an oriented stream (manual, Streams and I18N).
wprintf family (fwprintf, swprintf, vwprintf, vfwprintf, vswprintf)Wide output; operates on the same streams; swprintf returns negative + E2BIG on overflow (GNU errno extension) unlike snprintf.
wscanf family (fwscanf, swscanf, vwscanf, vfwscanf, vswscanf)Wide input mirrors scanf; wide-oriented streams only.
fgetwc / fputwc / ungetwc (+_unlocked, getwc, getwchar, putwchar, fgetws, fputws)Wide character/string I/O; WEOF failure value; _unlocked wide variants are GNU.
fmemopen / open_memstream / open_wmemstreamStreams over memory: fixed buffer vs. grown malloc buffer whose pointer/size update at fflush/fclose (manual, String Streams); POSIX.1-2008; symbol fmemopen carries version GLIBC_2.22 on installed glibc (reimplementation).
fopencookieCustom streams via cookie_io_functions_t read/write/seek/close callbacks (manual, Custom Streams); GNU.
__fbufsize, __flbf, __fpending, __fpurge, __freadable, __fwritable, __freading, __fwriting, __fsetlocking, _flushlbfSolaris-origin stdio_ext.h introspection: buffer size, line-buffered flag, pending output bytes, buffer discard, direction queries, locking mode, line-buffer flush (manual, Streams and Threads / Flushing Buffers).
obstack_printf / obstack_vprintfasprintf variants allocating on an obstack (manual, Dynamic Output); GNU.
parse_printf_format / printf_size / printf_size_infoGNU template parsing and size-suffix conversions supporting custom printf handlers (manual, Parsing a Template String).
register_printf_functionRegister custom conversion specifiers for the printf family (manual, Customizing Printf); glibc-specific, no ISO/POSIX counterpart – treat as non-portable.
fmtmsg / addseverityStrictly formatted messages to stderr/console with severity classes (manual, Formatted Messages); XSI origin.
getw / putwSVID word I/O legacy, grouped above; no way to report a -1 word via getw.