PDMakeMessage(3)

PDMakeMessage - message creation convenience function

As shipped in IRIX 6.5.5. Unchanged since IRIX 6.5.

NAME
     PDMakeMessage - message creation convenience function

SYNOPSIS
     #include <pod.h>

     int PDMakeMessage(PDMessageStruct *message, int code);

DESCRIPTION
     PDMakeMessage is a convenience function for filling a PDMessageStruct
     structure. This function is useful when building an array of messages for
     use with the PDLocalWriteStatus function.

     PDMakeMessage fills the structure pointed to by message with the message
     code specified by code. code is one of the standard error, warning or
     information codes defined in pod.h. The text field of the message
     structure is automatically set to a standard message based on the value
     of code.

     The PDMessageStruct is defined as follows.

          typedef struct _pdMessageStruct {
              int message_code;
              char message_text[PD_STR_MAX];
          } PDMessageStruct;


     message_code        Error, warning or information message code ID (see
                         pod.h).

     message_text        Text for the message truncated to a length of
                         PD_STR_MAX-1.

RETURN VALUE
     0 is returned if execution was successful. -1 is returned and PDerrno is
     set if an execution error has occurred.

EXECUTION ERROR CODES
     PDMakeMessage will fail under the following circumstances.

     PD_LIBERR_BAD_STRUCT     A NULL structure pointer has been specified.

     PD_LIBERR_BAD_MSG        An invalid message code has been specified.
                              Valid message codes are listed in pod.h.

SEE ALSO
     PDReadStatus(3), libpod(3)