evmeventformat.3 (2010 09)

e
EvmEventFormat(3) EvmEventFormat(3)
NAME
EvmEventFormat(), EvmEventFormatFromTemplate(), EvmVarFormat() - format events for display
SYNOPSIS
#include <evm/evm.h>
EvmStatus_t EvmEventFormat(
char *buffer,
size_t length ,
EvmEvent_t event );
EvmStatus_t EvmEventFormatFromTemplate(
char *buffer,
size_t length ,
EvmString_t show_template
,
EvmEvent_t event );
EvmStatus_t EvmVarFormat(
EvmEvent_t event ,
const char *var_name ,
char *buffer,
size_t length ,
EvmBoolean_t translate );
Library
EVM Support Library (libevm.so).
Parameters
buffer A pointer to a character string to receive the formatted event data. The stored string is
null-terminated, even if truncated, unless the length operand is zero (0).
length The maximum length (number of characters) of the output string. If the formatted event
is longer than length , the output is truncated.
event The event to be formatted.
show_template
The primary template for formatting the output.
var_name The name of a variable data item of the event whose value is to be formatted.
translate A Boolean value indicating whether I18N (internationalization) translation is to be
attempted on the variable data item (var_name ). If the translate operand is
EvmTRUE,
translation is attempted. In addition, the following conditions must be met:
The variable is of type string and includes an I18N (internationalization) message
identifier
The event contains I18N (internationalization) catalog information.
DESCRIPTION
Information contained in an event must be formatted into a readable format. The software which posts
the event (event poster) supplies formatting information through the event’s format data item. The rou-
tines described here explain the event formatting capabilities.
The
EvmEventFormat() routine combines the supplied event’s format data item with any data items
or variables specified in the event’s format item that are available in the event. EvmEventFormat()
returns a formatted version of the event in buffer.
If the event contains I18N message catalog information, and the catalog is available in the user’s locale,
the format string is retrieved from the message catalog if possible. If no translation is possible, the for-
mat string from the event is used.
If the event does not contain format information,
EvmEventFormat() produces a generic display of the
event’s name and any variables.
The
EvmEventFormatFromTemplate() routine also formats the supplied event. EvmEventFor-
matFromTemplate() uses the supplied show_template string as its primary formatting template.
Literal characters in show_template are transferred to the buffer unchanged.
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)