TT_MESSAGE_PRINT(3)

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

πŸ’– tt_message_print: format a message πŸ’–

okay so welcome to the tt_message_print(library call) page, bestie β€” that's the library call manual section, and we're formatting messages like it's a group-chat screenshot πŸ’…βœ¨


✨ NAME ✨

tt_message_print β€” format a message πŸ’Œ

πŸ¦‹ SYNOPSIS πŸ¦‹

#include &<Tt/tt_c.h>
char *tt_message_print(
Tt_message *m);

🌸 DESCRIPTION 🌸

The tt_message_print function formats a message in the same way a message is formatted for the ttsession(1) trace and returns a string containing it. it's literally giving "trace formatting but make it return a string" ✨

The m argument is the message to be formatted. that's the one argument, bestie β€” no secret extras 🫢

πŸ’… RETURN VALUE πŸ’…

Upon successful completion, the tt_message_print function returns the formatted string. The application can use tt_ptr_error(3) to extract one of the following Tt_status values from the returned pointer:

  • TT_OK β€” the operation completed successfully. slay βœ…
  • TT_ERR_NOMEM β€” there is insufficient memory available to perform the function. memory said no 😭
  • TT_ERR_POINTER β€” the pointer passed does not point to an object of the correct type for this operation. wrong-type pointer energy, not the vibe πŸ’€
bestie reminder: those statuses come out of the returned pointer via tt_ptr_error(3) β€” that's the official extraction move πŸ‘‘

πŸŽ€ APPLICATION USAGE πŸŽ€

The tt_message_print function allows an application to dump out messages that are received but not understood. perfect for those "what even is this message" moments πŸ™ˆ

The application should use tt_free(3) to free any data stored in the address returned by the ToolTalk API. yes bestie, free it with tt_free(3) β€” don't leave that data hanging 🫢

🌈 SEE ALSO 🌈


okay that's the page, bestie πŸ«ΆπŸ’– β€” cute sign-off: the footer vibe is tt_message_print(library call), and this copy doesn't hand me a separate source/version/date stamp to repeat, so I'm not inventing one πŸ’…βœ¨

πŸ“¦ where this page comes from