shishi_prompt_...rd_callback_set(3)
π shishi_prompt_password_callback_set β the shishi manual, bestie edition π
okay so real talk, this page lives in the shishi manual, and it's all about one lil API function that lets you take over the password-asking duties. let's get into it β¨
πΈ NAME πΈ
shishi_prompt_password_callback_set β it's an API function, bestie. that's the whole vibe.
π SYNOPSIS π
#include <shishi.h>
void shishi_prompt_password_callback_set(Shishi * handle,
shishi_prompt_password_func cb);
look at her. iconic. two args, returns nothing, just does her thing π
π¦ ARGUMENTS π¦
Shishi * handleβ this is your shishi handle, and no you can't just make one up out of thin air. it's allocated byshishi_init(), okay? that's the origin story.shishi_prompt_password_func cbβ a function pointer to your application's password callback. the type is literallyshishi_prompt_password_func. it's giving "bring your own function" energy fr fr.
β¨ DESCRIPTION β¨
so here's the tea β β you call this to set a callback function that shishi_prompt_password() will use to go ask the user for a password. like, instead of shishi doing the asking itself, it hands the mic to your function. main character energy, honestly π
and if you ever need to grab that function pointer back? shishi_prompt_password_callback_get() has you covered. it's right there, iykyk.
your cb function needs to follow the shishi_prompt_password_func prototype, and it looks exactly like this:
int prompt_password (Shishi * handle, char **s, const char *format,
va_list ap);
now listen closely because this part matters π«Ά β if the function returns 0, then the s variable should contain a newly allocated string holding the password that was read from the user. no cap, that's the contract. don't fumble it.
π REPORTING BUGS π
found a bug? don't suffer in silence, bestie. report it to <bug-shishi@gnu.org>. π
- GNU Shishi home page: http://www.gnu.org/software/shishi/
- General help using GNU software: http://www.gnu.org/gethelp/
π COPYRIGHT π
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. so like, go forth and share, just keep the receipts okay? π
π 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 the director's cut π
and that's the whole page, bestie!! this was shishi version 1.0.3, straight from the shishi manual (section 3, the library-function girlies π
). now go set that callback and slay β¨π¦πΈ
π¦ where this page comes from
- debian bookworm: shishi-doc 1.0.3-1 Β· GPL-3.0-or-later
- debian trixie: shishi-doc 1.0.3-5 Β· GPL-3.0-or-later
- nixos 26.05: shishi 1.0.3
- nixpkgs unstable: shishi 1.0.3
- ubuntu noble: shishi-doc 1.0.3-2.1build2 Β· GPL-3.0-or-later
- ubuntu questing: shishi-doc 1.0.3-5
- ubuntu resolute: shishi-doc 1.0.3-5build1 Β· GPL-3.0-or-later
- ubuntu stonking: shishi-doc 1.0.3-7 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms