There are several different DCE messaging routines. It is possible for an application to accomplish all of its messaging tasks with only one or two of these routines (dce_printf( ) and dce_error_inq_text( )); additional routines allow applications to perform manipulations on message tables, open and close message catalogs explicitly, retrieve messages without printing them, and so on. The complete list of routines is as follows:
· Message output routines
These routines retrieve and output a specified message. If necessary, the message catalog is opened.
- dce_printf( )
- dce_fprintf( )
- dce_sprintf( )
- dce_pgm_printf( )
- dce_pgm_sprintf( )
- dce_pgm_fprintf( )
· Message retrieval routines
These routines retrieve a specified message. If necessary, the message catalog is opened.
- dce_msg_get_msg( )
- dce_msg_get( )
- dce_msg_get_default_msg( )
- dce_error_inq_text( )
· Message table routines
Miscellaneous routines for manipulating in-memory message tables.
- dce_msg_define_msg_table( )
- dce_msg_translate_table( )
· DCE XPG4 routines
DCE versions of the XPG messaging routines catopen( ), catgets( ), and catclose( ).
- dce_msg_cat_open( )
- dce_msg_cat_get_msg( )
- dce_msg_get_cat_msg( )
- dce_msg_cat_close( )
Generally speaking, routines that retrieve or print messages will first try to get a message from the message catalog file (the routines deduce the correct message catalog from the message ID that is passed to them). Routines will look for the catalog in the current locale's system-specific location for correctly installed message catalogs.
If the message catalog cannot be found, and an in-memory message table has been defined, the message will be retrieved from there.
The only exception to this message-finding algorithm occurs with dce_msg_get_default_msg( ), which always attempts to retrieve the in-memory message only.
The following topics describe each of the DCE messaging routines in detail. Complete reference pages for the routines can be found in the OSF DCE Application Development Reference.
More: