dce_pgm_printf(3dce), dce_pgm_fprintf(3dce), dce_pgm_sprintf(3dce)
Formatted DCE message output routines
Synopsis
#include <dce/dce.h>
int dce_pgm_printf(
unsigned32 messageid, . . .);
int dce_pgm_fprintf(
FILE *stream, unsigned32 messageid, . . .);
unsigned char *dce_pgm_sprintf(
unsigned32 messageid, . . .);
Parameters
Input
messageid The message ID, defined in the message's code field in the sams file.
stream An open file pointer.
. . . Any format arguments for the message string.
Description 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. The routine dce_printf( ) does neither. This allows clients (which do not usually use the serviceability interface) to
produce error (or other) messages which automatically include the originating application's name. Note that the application should call dce_svc_set_progname( ) first to set the desired
application name. Otherwise, the default program name will be PID#nnnn, where nnnn is the process ID of the application making the call.
The dce_pgm_sprintf( ) routine is similarly equivalent to dce_sprintf( ), and the dce_pgm_fprintf( ) routine is similarly equivalent to dce_fprintf( ).
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.
See dce_msg_get(3dce)
Related Information Functions: dce_fprintf(3dce)
dce_msg_get_msg(3dce)
dce_printf(3dce)
dce_sprintf(3dce)
dce_svc_set_progname(3dce)
|