cgiwrap_iterenv(3)
π cgiwrap_iterenv(3) π
okay bestie, welcome to cgiwrap_iterenv, straight outta the <cgi/cgiwrap.h> header in the ClearSilver cgi family. she's a little iterator, she's lowkey the backbone of your debug output, and she's about to hand you every single environment variable one at a time like a girl passing out friendship bracelets. π
β¨ NAME β¨
cgiwrap_iterenv β iterater for env vars πΈ
yes, the manpage literally says "iterater". we don't fix it. we love her exactly as she is. no cap. π
β¨ SYNOPSIS β¨
#include <cgi/cgiwrap.h>
NEOERR *cgiwrap_iterenv (int n, char **k, char **v);
like, that's the whole vibe. one include, one call, infinite env-var lore. π¦
β¨ ARGUMENTS β¨
nβ the variable you wanna return. start it at0and keep incrementing until you get aNULLreturn value back. that's your little "we're done here" signal, periodt. β
β¨ DESCRIPTION β¨
so here's the tea: cgiwrap_iterenv lets a program iterate over all the environment variables. every single one. one by one. no skipping. π
it's probably mostly used by the default debug output β iykyk. π
β¨ RETURN VALUE β¨
kβ amalloc'dcopy of the variable name πvβ amalloc'dcopy of the variable value π
bestie. listen. those are malloc'd copies. that memory is yours now. you gotta free it. not me forgetting to free and leaking like a broken heart. π
β¨ SEE ALSO β¨
the whole friend group, fr fr:
cgiwrap_iterenv(3)cgiwrap_putenv(3)cgiwrap_init_emu(3)cgiwrap_writef(3)cgiwrap_init_std(3)cgiwrap_writevf(3)cgiwrap_read(3)cgiwrap_write(3)cgiwrap_getenv
and that's the whole page, bestie!! this iconic little number comes to you from ClearSilver, dated 12 July 2007 β yes she's vintage, yes she still ate, and yes she's still serving env vars to this very day. π«Ά go iterate, go free your mallocs, and go be the main character of your own cgi script. mwah. ππΈβ¨
π¦ where this page comes from
- debian bookworm: clearsilver-dev 0.10.5-4+b5
- debian trixie: clearsilver-dev 0.10.5-6+b1
- epel 10: clearsilver 0.10.5-80.el10_2 Β· Apache-1.1
- epel 9: clearsilver 0.10.5-74.el9 Β· Apache-1.1
- fedora 43: clearsilver 0.10.5-80.fc43 Β· Apache-1.1
- fedora 44: clearsilver 0.10.5-82.fc44 Β· Apache-1.1
- ubuntu jammy: clearsilver-dev 0.10.5-4build3
- ubuntu noble: clearsilver-dev 0.10.5-4build7
- ubuntu questing: clearsilver-dev 0.10.5-6build1
- ubuntu resolute: clearsilver-dev 0.10.5-7
- ubuntu stonking: clearsilver-dev 0.10.5-7build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms