Format a stored message.FORMAT
int POPSTORE_format_message (format, fspec, fpsec_len,
context, output_proc)
POPSTORE_format_element *format;
char *fspec;
int fspec_len;
void *context;
int (*output_proc)();
Pointer to a formatting context returned by a previous call to POPSTORE_format_read. Used for input only.
formatMessage file specification for the message file to display. Used for input only.
fspecLength in bytes of the message file specification. Used for input only.
fspec_lenPointer to private client data to be passed to the client-supplied output_proc procedure. Used for input only.
contextAddress of a client-supplied subroutine to call to output formatted data. Used for input only.
output_proc
Stored messages may be formatted for display with POPSTORE_format_message. The formatting context passed to this subroutine should be derived from a formatting file using substitution strings from Tables 4-10 and 4-22 . Whereas the POPSTORE_message_ subroutines all require message indices such as the value 9 to reference the ninth message, POPSTORE_format_message requires a message file name to reference a message file. This is done because POPSTORE_format_message is typically used in situations where a user context is no longer available. The message to display is indicated by theReturn Valuesfspecargument. The value of that argument should be a message file name without directory path information. This file name can be derived from a user's message list: the nth message in a user's list of messages has the file nameuser_context->messages[n-1].filenamewhereuser_contextis a pointer to aPOPSTORE_user_contextreturned by the POPSTORE_user_begin_d subroutine. See the description of the POPSTORE_format_counters subroutine for a description of theoutput_procprocedure.
| POPSTORE_SUCCESS | Normal, successful completion. |
| POPSTORE_BADARG | Bad value passed for the address of the output procedure,
output_proc, or the message file specification,
fspec.
|
| POPSTORE_BADLENGTH | Bad length passed for the value of
fspec_len.
|
| POPSTORE_FILOPNERR | An error occurred while trying to open the message file. |
| POPSTORE_READERROR | An error occurred while trying to read the message file. |
| POPSTORE_SEEKERROR | An error occurred while seeking in the message file. |
| POPSTORE_TOOLONG | Username or file specification is too long. The username string may not exceed a length of POPSTORE_MAX_USER_LEN bytes; the file specification may not exceed a length of 1024 bytes. |
| POPSTORE_VMERROR | Insufficient virtual memory. |
Any error value returned by the output procedure,
output_proc.
|