1-34 SOMobjects Base Toolkit: Programmer’s Reference Manual
somSetOutChar Function
Purpose
Changes the behavior of the somPrintf function.
Syntax
void somSetOutChar (
somTD_SOMOutCharRoutine * outCharRtn);
Description
The somSetOutChar function is called to change the output character routine that
somPrintf invokes. By default, somPrintf invokes a character output routine that goes to
stdout.
The execution of somSetOutChar affects only the application (or thread) in which it occurs.
Thus, somSetOutChar is normally preferred over SOMOutCharRoutine for changing the
output routine called by somPrintf, since SOMOutCharRoutine remains in effect for
subsequent threads as well.
Some additional samples of somSetOutChar can be found in the somapi.h header file.
Parameters
outCharRtn A pointer to your routine that outputs a character in the way you want.
Example
#include <som.h>
static int irOutChar(char c);
static int irOutChar(char c)
{
(Customized code goes here)
}
main (...)
{
...
somSetOutChar((somTD_SOMOutCharRoutine *) irOutChar);
}
Related Information
Functions: somPrintf, SOMOutCharRoutine
Comentários a estes Manuais