shishi_tkts_nth(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_nth β€” bestie, let's grab a ticket by number πŸŽ€

okay so this one lives in the shishi manual, section 3, and it's genuinely one of the cutest little lookups in the whole library. no cap. it's literally "give me ticket number N from the ticket set" and that's it. periodt.


✨ SYNOPSIS ✨

#include <shishi.h>

Shishi_tkt * shishi_tkts_nth(Shishi_tkts * tkts, int ticketno);

πŸ’– ARGUMENTS πŸ’–

  • Shishi_tkts * tkts β€” the ticket set handle, bestie. the one you got from shishi_tkts() earlier. it's giving "the bag you keep all your tickets in" πŸ‘œ
  • int ticketno β€” an integer saying which ticket in the ticket set you're asking for. just a lil number, no drama.

πŸ¦‹ GET THE N πŸ¦‹

th ticket in ticket set.

(okay yes the heading is doing a bit β€” the "N" up there is the ticketno you pass in, and the "th" finishes the sentence. iconic, honestly. this is the function that actually hands you that ticket. πŸ’…)


🌸 RETURN VALUE 🌸

it hands back a ticket handle to the ticketno:th ticket in the ticket set, or NULL if the ticket set is invalid or ticketno is out of bounds. 🫢

and listen, the counting is zero-based, no cap:

  • the first ticket is ticketno 0
  • the second is ticketno 1
  • and so on, and so on
so if you're off-by-one'ing, that's a you problem bestie 😭 the function is not the villain here.

πŸ”₯ REPORTING BUGS πŸ”₯

found something cursed? report bugs 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.

(that's the license, and it's very generous of them, we love that for us πŸ’œ)


🌈 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.

go read it, it's the main character of docs fr fr πŸ“šβœ¨


and that's the whole page bestie!! πŸŽ€ this was shishi_tkts_nth(3) from the shishi manual, version 1.0.3 β€” the date's the same vintage energy as the rest of the set. now go index into that ticket set responsibly, mwah πŸ’‹