dce_printf(3dce), dce_fprintf(3dce), dce_sprintf(3dce)Formatted DCE message output routines Synopsis #include <dce/dce.h> int dce_printf(
unsigned32 messageid, int dce_fprintf(
FILE *stream, unsigned char *dce_sprintf(
unsigned32 messageid, Parameters Input
messageid
stream
. . .
Description The dce_fprintf( ) routine functions much like dce_printf( ), except that it prints the message and its arguments on the specified stream. The dce_sprintf( ) routine retrieves the message text associated with the specified messageid, and prints the message and its arguments into an allocated string that is returned. The routine determines the correct message catalog and, if necessary, opens it. If the message catalog is inaccessible, and the message exists in an in-memory table, then this message is printed. If neither the catalog nor the default message is available, a default message is printed. The dce_pgm_printf( ) routine is equivalent to dce_printf( ), except that it prefixes the program name to the message (in the standard style of DCE error messages), and appends a newline to the end of the message. For more information, see the dce_pgm_printf(3dce) reference page.
Examples
start The following code fragment shows how dce_sprintf( ) might be called to write the message (with some argument values) into a string:
unsigned char *my_msg; Of course, dce_printf( ) could also be called to print the message and arguments: dce_printf(arg_msg, 2, 8); Errors The following describes a partial list of errors that might be returned. Refer to the OSF DCE Problem Determination Guide for complete descriptions of all error messages.
Notes
Related Information
|