MCPcopy Index your code
hub / github.com/NetHack/NetHack / nh_getenv

Function nh_getenv

src/options.c:6847–6856  ·  view source on GitHub ↗

# errors: OPTIONS=aaaaaaaaaa[ more than 247 (255 - 8 for 'OPTIONS=') total ]aaaaaaaaaa OPTIONS OPTIONS= MSGTYPE=stop"You swap places with " MSGTYPE=st.op "You swap places with " MSGTYPE=stop "You swap places with \" MENUCOLOR=" blessed "green&none MENUCOLOR=" holy " = green&reverse MENUCOLOR=" cursed " = red&uline MENUCOLOR=" unholy " = reed OPTIONS=!legacy:true,fooo OPTIONS=align:!pin OPTIONS=gen

Source from the content-addressed store, hash-verified

6845 * bounds-check itself.
6846 */
6847char *
6848nh_getenv(const char *ev)
6849{
6850 char *getev = getenv(ev);
6851
6852 if (getev && strlen(getev) <= (BUFSZ / 2))
6853 return getev;
6854 else
6855 return (char *) 0;
6856}
6857
6858/* copy up to maxlen-1 characters; 'dest' must be able to hold maxlen;
6859 treat comma as alternate end of 'src' */

Callers 15

mkshopFunction · 0.70
optfn_perminv_modeFunction · 0.70
initoptions_initFunction · 0.70
roguenameFunction · 0.70
getmailstatusFunction · 0.70
readmailFunction · 0.70
make_converted_nameFunction · 0.70
fopen_wizkit_fileFunction · 0.70
reveal_pathsFunction · 0.70
makelevelFunction · 0.70
fopen_config_fileFunction · 0.70
mainFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected