| Previous | Contents | Index |
Format a stored message.
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
formatPOPSTORE_format_read. Used for input only.Message 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
contextoutput_procprocedure. Used for input only.Address of a client-supplied subroutine to call to output formatted data. Used for input only.
output_proc
Stored messages can be formatted for display withPOPSTORE_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 thePOPSTORE_message_subroutines all require message indices such as the value 9 to reference the ninth message,POPSTORE_format_messagerequires a message file name to reference a message file. This is done becausePOPSTORE_format_messageis typically used in situations where a user context is no longer available. The message to display is indicated by thefspecargument. 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 name
where
user_context->messages[n-1].filenameuser_contextis a pointer to aPOPSTORE_user_contextreturned by thePOPSTORE_user_begin_dsubroutine. See the description of thePOPSTORE_format_counterssubroutine 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 can not exceed a length of POPSTORE_MAX_USER_LEN bytes; the file specification can not exceed a length of 1024 bytes. POPSTORE_VMERROR Insufficient virtual memory. Any error value returned by the output procedure, output_proc.
| Previous | Next | Contents | Index |