Functions

OutErrV

Write formatted text from a va_list to standard error

Syntax

Signature
void OutErrV( const char *format, va_list args );

Arguments

format printf-style format. NULL is treated as empty text.

args Values for the conversions in format, started with va_start() by the caller.

Return value

No return value.

Description

Format a diagnostic from an existing `va_list` and send it through `OutErr()`. This is the form for a variadic logging helper. The format controls line breaks. Use `va_copy()` if you need to reuse the argument list after the call.

Example

outerrv.c
#include "xdev-wtui.h"

// The own function passes its values on
static void Fail( const char *format, ... )
{
   va_list args;

   va_start( args, format );
   OutErrV( format, args );
   va_end( args );
}

int main( void )
{
   Fail( "Error %d: %s.\n", 2, "file not found" );

   return 1;
}