shishi_parse_name(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_parse_name(3) πŸ’–

okay bestie, welcome to shishi_parse_name, straight out of the shishi manual πŸ’… this is the lil function that takes one big string and goes snip snip into a principal and a realm. it's giving scissors. it's giving organized. we love her.


✨ NAME ✨

shishi_parse_name β€” an API function πŸŽ€


✨ SYNOPSIS ✨

#include <shishi.h>

int shishi_parse_name(Shishi * handle, const char * name, char **
principal, char ** realm);

✨ ARGUMENTS ✨

  • Shishi * handle β€” the Shishi library handle, and you get it from shishi_init(). no handle, no party πŸ™ˆ
  • const char * name β€” the input principal name string you're handing over, like imap/mail.gnu.orgGNU.ORG for example 🌸
  • char ** principal β€” a newly allocated output string, and inside it is the principal name. fresh out the allocator, no cap ✨
  • char ** realm β€” another newly allocated output string, this one holding the realm name πŸ¦‹

✨ DESCRIPTION ✨

so the whole vibe here is: you give her a principal name β€” like simonJOSEFSSON.ORG β€” and she splits it into two newly allocated strings. the principal is simon and the realm is JOSEFSSON.ORG. iconic behavior honestly πŸ‘‘

and if there's no realm part in name at all? then realm gets set to NULL. she's not gonna invent one, she's just gonna say "nope, not here" πŸ’€


✨ RETURN VALUE ✨

Returns SHISHI_INVALID_PRINCIPAL_NAME if name is NULL or ends with the escape character " successful.

okay so real talk bestie, the source text right here looks like the formatter chewed it up mid-sentence 😭 i'm not gonna sit here and make up the rest of that sentence for you β€” that would be lying to your face and i love you too much. everything that's there is there, and the vibes are: bad name in, SHISHI_INVALID_PRINCIPAL_NAME out 🫢

✨ REPORTING BUGS ✨

found a bug? tell the shishi girlies directly, they want to know fr fr πŸ’Œ


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. (yes bestie, keep the receipt πŸ“)


✨ 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, this command:

info shishi

should give you access to the complete manual. go read it, it's lowkey a whole library 🌈


and that's the page!! slay πŸ’– this was shishi_parse_name(3) from shishi, and this lil manual page is hanging out at version 1.0.3 πŸŽ€ mwah, go split some names, bestie 🫢✨