TT_PATTERN_REGISTER(3)

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

🌸 NAME 🌸

tt_pattern_register β€” register a pattern with the ToolTalk service. And yes bestie, this is the library call manual page, so you're in the right place πŸ’…


✨ SYNOPSIS ✨

#include &<Tt/tt_c.h>
Tt_status tt_pattern_register(
Tt_pattern p);

πŸ’– DESCRIPTION πŸ’–

Okay so tt_pattern_register registers a pattern with the ToolTalk service. That's the main-character move.

When the process is registered, it will start receiving messages that match the specified pattern. Slay ✨

⚠️ Once a pattern is registered, no further changes can be made in the pattern. So lock it in before you commit, bestie β€” no take-backs.

When the process joins a session or file, the ToolTalk service updates the file and session field of its registered patterns. Iconic behavior, honestly πŸ¦‹

The p argument is a unique handle for a message pattern. That handle is returned after tt_pattern_create(3) is called. So yes, you need that first, iykyk.


🌈 RETURN VALUE 🌈

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

  • TT_OK β€” the operation completed successfully. periodt πŸ’…
  • 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. rude, but okay πŸ™ˆ
  • TT_ERR_PROCID β€” the specified process identifier is out of date or invalid. πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹


source/version tea: it's the library call manual, page tt_pattern_register; date: not shown in the footer, bestie β€” bye, mwah πŸ’–βœ¨πŸ«Ά

πŸ“¦ where this page comes from