TT_MESSAGE_ARG_XVAL(3)

πŸ“¦
version 2.5.3 Β· 2 versions
, in nixos 26.05

πŸ’– NAME πŸ’–

tt_message_arg_xval β€” from the library call manual, bestie β€” retrieves and deserializes the data from a message argument. ✨

✨ SYNOPSIS ✨

#include &<Tt/tt_c.h>
Tt_status tt_message_arg_xval(
Tt_message m,
int n,
xdrproc_t xdr_proc,
void **value);

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so tt_message_arg_xval retrieves and deserializes the data from a message argument. It does this using an XDR routine that is supplied by the client. No cap, you bring the XDR procedure. πŸ’…

The m argument is the opaque handle for the message involved in this operation. The n argument is the number of the argument to be returned, and the first argument is numbered zero. Yes, zero. Programmer brain. 🫢

The xdr_proc argument points to the XDR procedure to be used to deserialize the data in the nth argument into newly allocated storage, the address of which will be stored in the pointer whose address is value. πŸŽ€

The value argument is the data to be deserialized. 🌸

πŸ’… RETURN VALUE πŸ’…

Upon successful completion, tt_message_arg_xval returns the status of the operation as one of the following Tt_status values:

  • TT_OK β€” the operation completed successfully. πŸ‘‘
  • TT_ERR_MODE β€” the specified Tt_mode is invalid.
  • TT_ERR_NOMP β€” the ttsession(1) process is not running and the ToolTalk service cannot restart it.
  • TT_ERR_POINTER β€” the pointer passed does not point to an object of the correct type for this operation.
  • TT_ERR_NUM β€” the integer value passed was invalid (out of range).
  • TT_ERR_XDR β€” the XDR procedure failed on the given data, or evaluated to a zero-length structure.

🧚 APPLICATION USAGE 🧚

Important storage tea: the allocation calls are made by the XDR procedure. Therefore, any storage allocated is not allocated from the ToolTalk allocation stack. The application should use the xdr_free(3) call to free this storage. Fr fr, don’t forget the cleanup. 🧼

🌈 SEE ALSO 🌈


Source/section: library call. Version/date: the footer didn’t show separate version/date tea, so no invented details here β€” just good old manual-page energy. Byeee, and may your XDR always slay. πŸ’œπŸŽ€

πŸ“¦ where this page comes from