NAME
obuffer.h - output buffer interface
SYNOPSIS
#include <limb/obuffer.h>
DESCRIPTION
This header defines required functions to write on output buffers.
An output buffer is simply a wrapper around a buffer (from buffer.h(0)), with a level to only receive data from the same level or lower. Refer to obuffer_level(3) for more.
Additionally it is possible to attach one output buffer to another, thusly forming a chain. Whenever sending data to any buffer in the chain, it will be sent to all output buffers in the chain. Refer to obuffer_attach(3) for more.
Constants
The following constants are defined :
OLVL_SILENT, OLVL_QUIET, OLVL_NORMAL, OLVL_VERBOSE, OLVL_DEBUG, OLVL_MAXIMUM
Different output levels
Types
The following types are defined :
obuffer
A struct obuffer
Structures
The following structures are defined :
struct obuffer
An opaque structure representing an output buffer.
Pointers
The following pointers are defined :
obuffer_1
An output buffer based on buffer_1
, thusly representing stdout.
obuffer_2
An output buffer based on buffer_2
, thusly representing stderr.
Macros
The following macros are defined :
OBUFFER_INIT(buffer
, level
)
Value to initialize an obuffer.
Functions
The following functions/macros are defined :
To parse a string representing an output level.
Return the level of an output buffer.
To set the level of an output buffer.
To write given data to an output buffer (if levels match)
To write a message, given as an array of strings, to an output buffer (if levels match)
To attach an output buffer to another, entering its chain.
To remove an output buffer from its chain.
Return whether or not an output buffer is part of a chain.