From 3534b428629be185e096be99e3bd5fdfe32d5544 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 18 Sep 2014 18:55:44 +0000 Subject: initial commit with rc for skalibs-2.0.0.0 --- doc/libstddjb/lolstdio.html | 91 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 doc/libstddjb/lolstdio.html (limited to 'doc/libstddjb/lolstdio.html') diff --git a/doc/libstddjb/lolstdio.html b/doc/libstddjb/lolstdio.html new file mode 100644 index 0000000..e059f24 --- /dev/null +++ b/doc/libstddjb/lolstdio.html @@ -0,0 +1,91 @@ + + + + + skalibs: the lolstdio library interface + + + + + + +

+libstddjb
+libskarnet
+skalibs
+Software
+skarnet.org +

+ +

The lolstdio library interface

+ +

+ The following functions are declared in the skalibs/lolstdio.h header, +and implemented in the libskarnet.a or libskarnet.so library. +

+ +

General information

+ +

+ lolstdio is a set of convenience functions providing +printf-style +formatting but interacting with buffers or +bufallocs instead of stdio FILEs. +

+ +

+ Like any printf-style functions, the lolstdio functions are rather +complex and inefficient, and not recommended for general use; they are +provided as a quick and dirty way to debug or test things. Programmers +are advised to use the type-specific formatting +functions instead in production-quality code. +

+ +

+ Be aware that functions writing into buffers interact badly with +non-blocking fds (and asynchronism in general) - just as you cannot +use FILEs with non-blocking output. Functions writing into bufallocs, +however, are fine, because bufallocs are much more suited to asynchronous +writing than fixed-size buffers or FILEs are. +

+ +

+ The current lolstdio implementation relies on the libc's +vsnprintf +function. +

+ +

Functions

+ +

+ int vbprintf (buffer *b, char const *format, va_list args)
+Like vfprintf +except that the result is written to the buffer b. +

+ +

+ int bprintf (buffer *b, char const *format, ...)
+Like fprintf +except that the result is written to the buffer b. +

+ +

+ int lolprintf (char const *format, ...)
+Like printf +except that the result is written to the buffer buffer_1. +

+ +

+ int vbaprintf (bufalloc *ba, char const *format, va_list args)
+Like vfprintf +except that the result is written to the bufalloc ba. +

+ +

+ int baprintf (bufalloc *ba, char const *format, ...)
+Like fprintf +except that the result is written to the bufalloc ba. +

+ + + -- cgit v1.2.3