shishi_tkts_find(3)

πŸ“¦
version 1.0.3 Β· 2 versions
  • 1.0.3 Β· debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.0.2 Β· ubuntu jammy
, in debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– shishi_tkts_find(3) πŸ’–

okay bestie, sit down, hydrate, and let me tell you about shishi_tkts_find β€” it's a lil function from the shishi manual (section 3, the library girlies) and she's here to hunt down tickets for you. no cap.


✨ NAME ✨

shishi_tkts_find β€” it's an API function, bestie. that's the whole vibe. πŸŽ€


🌸 SYNOPSIS 🌸

#include <shishi.h>

Shishi_tkt * shishi_tkts_find(Shishi_tkts * tkts, Shishi_tkts_hint * hint);

look at her. two args, one dream. πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • Shishi_tkts * tkts β€” the ticket set handle, as allocated by shishi_tkts(). this is your lil basket of tickets, and yes you gotta have it first.
  • Shishi_tkts_hint * hint β€” a structure packed with the characteristics of the ticket you're tryna find. it's giving "search filter but make it a struct". ✨

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the tea: this function searches the ticketset sequentially β€” like, from ticket number 0 through all the tickets in the set β€” looking for a ticket that fits the characteristics you handed over.

and the way that it's iconic?? if a ticket is found, the hint->startpos field gets updated to point to the next ticket in the set. which means you can call this function over and over again with the same hint argument and it'll keep finding all the tickets that match a certain criterium. literally a little iterator, she's so smart. 🧚

⚠️ but listen β€” if tickets get added to, or removed from, the ticketset while you're mid-query with the same hint argument, then the hint->startpos field must be updated appropriately. don't just let it drift, bestie, that's how you get lost in the set. πŸ’€

πŸ’œ HERE IS HOW YOU WOULD TYPICALLY USE THIS FUNCTION πŸ’œ

okay so this is the whole ~moment~, look:

Shishi_tkts_hint  hint;

Shishi_tkt  tkt;

memset(&hint, 0, sizeof(hint));

hint.server = "imap/mail.example.org";

tkt = shishi_tkts_find (shishi_tkts_default(handle), &hint);

if (!tkt)

printf("No ticket found...0);

else

do_something_with_ticket (tkt);

(and yes, that printf line really is written like that in the original. we don't fix, we don't touch, we preserve. 🫢)


🌈 RETURN VALUE 🌈

returns a ticket if one's found β€” or NULL if no further matching tickets could be found. so like, NULL means the search said "sorry babe, nothing left". 😭


πŸ”₯ REPORTING BUGS πŸ”₯

found a bug? don't gatekeep, report it to <bug-shishi@gnu.org>.


Copyright Β© 2002-2022 Simon Josefsson.

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.


⭐ SEE ALSO ⭐

The full documentation for shishi is maintained as a Texinfo manual. If the info and shishi programs are properly installed at your site, the command

info shishi

should give you access to the complete manual. periodt. πŸ’…


and that's the whole page, bestie β€” this was shishi_tkts_find(3) from shishi version 1.0.3, mwah, go find your tickets πŸ¦‹πŸ’–βœ¨