TutSetOutFlushFunc


Name

TutSetOutFlushFunc — set the function to use for TutOutFlush

Synopsis

void TutSetOutFlushFunc(flush_func) 
T_OUT_VA_FLUSH_FUNC flush_func; 

Arguments

flush_func — function to be used by TutOutFlush

Return Values

None

Diagnostics

None

Description

TutSetOutFlushFunc allows you to specify a function that is used by TutOutFlush to display and flush output, instead of the default function. This makes it possible to set up output data to go to a different place, or perform pre-processing before displaying the output.

Caution

None

See Also

TutGetOutFlushFunc, TutOutFlush

Examples

This example pre-processes output before displaying it:

static void flush_func(format_str, arg_list) 
T_STR format_str; 
va_list arg_list; 
{ 
  printf ("In custom flush function.\n"); 
  vprintf (format_str, arg_list); 
  fflush (stdout); 
} /* flush_func */ 
. 
. 
. 
TutSetOutFlushFunc(flush_func); 
TutOutFlush("test string\n"); 

TIBCO SmartSockets™ Utilities
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com