save_input_approver(3)
β¨ save_input_approver β¨
okay bestie, gather round β this is a page from the gstream manual, section 3. Yes, the whole library functions section. Very demure, very coder of us. π
πΈ NAME πΈ
save_input_approver β the little function that tucks your current input approver away somewhere safe so you can get it back later π
π¦ SYNOPSIS π¦
#include <gstream.h>
void save_input_approver();
that's it. that's the whole thing. no args, no return value, just vibes and a backup. β¨
π DESCRIPTION π
so here's the tea, bestie. π
The input approver system has one super common move: you wanna temporarily swap in your own homemade approver, run an input, and then put everything back exactly how it was. main character energy, honestly. Because of that, gstream ships a lil duo of functions to hold your hand through it:
save_input_approverrestore_input_approver
a matching set. iconic. no notes. π
And what does the saving one do? It backs up the approver you're currently using, so you can keep on using it without losing track of it. Like screenshotting your settings before you go feral in the config. π
here's the whole glow-up in code form:
gs.save_input_approver();
gs >> my_string; // uses still default approver
gs.set_input_approver(ia_my_own);
gs >> my_string; // uses ia_my_own approver
gs.restore_input_approver();
gs >> my_string; // uses default approver again
read it again, it's literally a little story: save β still the default approver β swap in ia_my_own β now it's using ia_my_own β restore β default approver is back, baby. π₯
heads up: saving only backs up the approver β it doesn't change anything by itself. The actual swapping happens inset_input_approver, and the getting-it-back happens inrestore_input_approver. π
π SEE ALSO π
gstream-restore_input_approver(3)β the other half of the duo, brings your approver home π«Άgstream-set_input_approver(3)β for when you wanna install your own β¨gstream-get_input_approver(3)β for when you just wanna peek at what's there π
and that's the page!! this whole thing lives in the gstream manual, version 1.6, and yeah β it's filed under save_input_approver(3). slay, go back up your approvers responsibly πβ¨π
π¦ where this page comes from
- fedora 43: gstream-devel 1.6-35.fc43 Β· Giftware
- fedora 43: gstream-devel 1.6-35.fc43 Β· Giftware
- fedora 44: gstream-devel 1.6-36.fc44 Β· Giftware
- fedora 44: gstream-devel 1.6-36.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms