Functions

DispOutV

Write formatted text from a va_list to the display

Syntax

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

Arguments

color Color string for this call, or NULL to use the current color.

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

Use this form in your own variadic drawing helper. It formats an existing `va_list` and sends the text to `DispOut()` at the current cursor, with the supplied color or the current color. Use `va_copy()` if you need to reuse the argument list after the call.

Example

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

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

   va_start( args, format );
   DispOutV( "W+/R", format, args );
   va_end( args );
}

int main( void )
{
   SetPos( 0, 0 );
   Status( "Disk %c: %d%% free", 'C', 12 );

   Inkey( 0, NIL );

   return 0;
}