TICKIT_TERM_OPEN_STDIO(3)

πŸ’– TICKIT_TERM_OPEN_STDIO πŸ’–

okay bestie so this one is from the Library Functions Manual and it's literally called tickit_term_open_stdio β€” she's a libtickit girlie and she's here to make you a terminal that's wired straight into your process's standard input and output. no biggie. ✨


🌸 NAME 🌸

tickit_term_open_stdio β€” create a terminal instance on standard input/output


πŸŽ€ SYNOPSIS πŸŽ€

#include <tickit.h>

TickitTerm *tickit_term_open_stdio(void);

Link with -ltickit.


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so tickit_term_open_stdio() makes you a brand new TickitTerm instance that represents the standard input and output streams of the process. that's it, that's the whole vibe. πŸ’…

the tea is: this function is a convenient shortcut for the common use-case of:

  1. creating an instance using tickit_term_build(3) with the open field set to TICKIT_OPEN_STDIO
  2. enabling SIGWINCH support using tickit_term_observe_sigwinch(3)

so like, instead of doing all that yourself, you just call this and she handles it. main character energy fr fr. πŸ‘‘


πŸ’œ RETURN VALUE πŸ’œ

  • success 🌈 β€” tickit_term_open_stdio() returns a pointer to the new instance. slay.
  • failure 😭 β€” NULL is returned, and errno is set to indicate the failure. not the vibe, but at least you know why.
ngl bestie, always check for NULL before you start using the pointer, or it's giving undefined behaviour πŸ’€

πŸ”₯ SEE ALSO πŸ”₯


and that's the whole page, periodt. this icon was brought to you by the Tickit Library Functions Manual, page TICKIT_TERM_OPEN_STDIO(3) β€” go read the rest of the set, iykyk 🫢✨