Bull DPX/20 Guia do Utilizador Página 60

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 424
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 59
1-48 SOMobjects Base Toolkit: Programmers Reference Manual
SOMOutCharRoutine Function
Purpose
Prints a character. This function is replaceable.
Syntax
int (*SOMOutCharRoutine) (char c);
Description
SOMOutCharRoutine is a replaceable character output routine. It is invoked by SOM
whenever a character is generated by one of the SOM error-handling or debugging macros.
The default implementation outputs the specified character to stdout. To change the
destination of character output, store the address of a user-written character output routine
in global variable SOMOutCharRoutine.
Another function, somSetOutChar, may be preferred over the SOMOutCharRoutine
function. The somSetOutChar function enables each application (or thread) to have a
customized character output routine.
Parameters
c The character to be output.
Return Value
Returns 0 if an error occurs and 1 otherwise.
Example
#include <som.h>
#pragma linkage(myCharacterOutputRoutine, system)
/* Define a replacement routine: */
int SOMLINK myCharacterOutputRoutine (char c)
{
(Customized code goes here)
}
...
/* After the next stmt all output */
/* will be sent to the new routine */
SOMOutCharRoutine = myCharacterOutputRoutine;
Related Information
Functions: somVprintf, somPrefixLevel, somLPrintf, somPrintf, somSetOutChar
Vista de página 59
1 2 ... 55 56 57 58 59 60 61 62 63 64 65 ... 423 424

Comentários a estes Manuais

Sem comentários