*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> EvmEventFormatFromTemplate (3)              
Title
Content
Arch
Section
 

EvmEventFormat(3)

Contents


NAME    [Toc]    [Back]

       EvmEventFormat, EvmEventFormatFromTemplate, EvmVarFormat -
       Format events for display

SYNOPSIS    [Toc]    [Back]

       #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 );

OPERANDS    [Toc]    [Back]

       A  pointer  to a character string to receive the formatted
       event data. The stored  string  will  be  null-terminated,
       even  if truncated, unless the length operand is zero (0).
       The maximum length of the output string. If the  formatted
       event is longer than length, the output is truncated.  The
       event to be formatted.  The primary template  for  formatting
  the  output.   The name of a variable data item contained
 in the event whose value is  to  be  formatted.   A
       Boolean  value  indicating whether I18N translation should
       be attempted on the variable value.  Translation  will  be
       attempted  if  this operand is EvmTRUE, the variable is of
       type string and includes an I18N message  identifier,  and
       the event contains I18N catalog information.

DESCRIPTION    [Toc]    [Back]

       Information  contained  in  an  event must be formatted to
       present it in human-readable form.  The event poster  supplies
  formatting  information  through the event's format
       data item, and the routines  described  here  provide  the
       event formatting capability.

       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, and 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 format  string
       contained in the event is used.

       If  the  event  does  not  contain  format  information, a
       generic display of the event's name and any  variables  is
       produced.

       The  EvmEventFormatFromTemplate() routine also formats the
       supplied event, but uses the supplied show_template string
       as  its primary formatting template. Literal characters in
       the show_template are transferred to the buffer unchanged.
       Any    token    of    the   form   @item_name[%width]   or
       @{item_name[%width]} is replaced by the value of the  corresponding
  data  item  from  the supplied event, if it is
       present. If width is supplied, the value occupies a  minimum
  of  width  character  positions. The item_name is the
       name of a standard event data item. The special string  @@
       is replaced by the results of applying EvmEventFormat() to
       the event.

       Refer to evmshow(1) and EvmEvent(5) for  more  information
       about formatting events for display.

       EvmVarFormat()  retrieves  a variable called var_name from
       the supplied event, and returns a formatted version of its
       value in buffer.  I18N translation is applied as appropriate
 if the value of translate is EvmTRUE.

NOTES    [Toc]    [Back]

       Floating   point   values   are   formatted   using    the
       printf(3) %.8g format specifier.

RETURN VALUES    [Toc]    [Back]

       The  operation  was  completed  without error.  One of the
       arguments to the function  was  invalid.   A  value  in  a
       structure  member is invalid.  An operation failed because
       an attempt to acquire heap memory failed.

ERRORS    [Toc]    [Back]

       None

LIBRARY    [Toc]    [Back]

       EVM Support Library (libevm.so, libevm.a)

FILES    [Toc]    [Back]

       None

SEE ALSO    [Toc]    [Back]

      
      
       Commands: evmshow(1)

       Routines: EvmEventDump(3), printf(3), setlocale(3)

       Files: locale(4), kevm(7)

       Event Management: EVM(5)

       EVM Events: EvmEvent(5)

       Programmer's Guide



                                                EvmEventFormat(3)
[ Back ]
 Similar pages
Name OS Title
vrnotify HP-UX display VERITAS Volume Replicator (VVR) events
vxnotify HP-UX display VERITAS Volume Manager configuration events
fmtmsg NetBSD format and display a message
fmtmsg Tru64 Display a message in the specified format
pfmt IRIX display error message in standard format
pfmt IRIX display error message in standard format
man FreeBSD format and display the on-line manual pages
vis FreeBSD display non-printable characters in a visual format
vis OpenBSD display non-printable characters in a visual format
lfmt IRIX display error message in standard format and pass to logging and monitoring services
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service