qlibs:(env)
π NAME π
okay so bestie, weβre in qlibs:(env) and this whole page is about env β manage variables in the environment. thatβs the assignment, and itβs lowkey iconic. β¨
π οΈ SYNTAX π οΈ
#include "env.h"
char **environ;
char *env_put(char *NAME,char *value);
char *env_puts(char *NAME=value);
char *env_set(char *NAME=value);
char *env_unset(char *NAME);
char *env_get(char *NAME);
char *env_pick();
char *env_clear();
π DESCRIPTION π
The environment, environ, is a 0-terminated array of 0-terminated strings, called environment variables. each environment variable is of the form NAME=value. thatβs the whole vibe check. π«Ά
hereβs the function lineup, bestie β no cap, every one is doing her own little job:
env_putsβ puts the stringNAME=valueinto the environment. slay, string delivered. πenv_putβ assigns the new environment variableNAMEwith value. fresh variable, main character entrance. πenv_setβ assigns an existing environment variableNAMEwith value:NAME=value. note the βexistingβ bestie, weβre not making a new one here. πenv_unsetβ unsets an existing environment variable given asNAME. bye-bye, variable. πenv_getβ returns the assigned value of the first variable whose name isNAME, or0if there is no such variable. first match wins, and if nobodyβs home, itβs0. πenv_pickβ returns any variable in the environment, or0if the environment is empty. little random pick-me energy, but make it Unix. π²env_clearβ clears the whole environment. like, the entire thing. poof. π
π SEE ALSO π
okay thatβs the page, bestie! signing off from section 3 of qlibs:(env) β the footer didnβt give a date, so thatβs the whole receipt π§Ύππ
π¦ where this page comes from
- alpine 3.24: fehqlibs-doc 31-r0 Β· Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms