MCPcopy Create free account
hub / github.com/NetHack/NetHack / roguename

Function roguename

src/do_name.c:1423–1439  ·  view source on GitHub ↗

name of a Rogue player */

Source from the content-addressed store, hash-verified

1421
1422/* name of a Rogue player */
1423const char *
1424roguename(void)
1425{
1426 char *i, *opts;
1427
1428 if ((opts = nh_getenv("ROGUEOPTS")) != 0) {
1429 for (i = opts; *i; i++)
1430 if (!strncmp("name=", i, 5)) {
1431 char *j;
1432 if ((j = strchr(i + 5, ',')) != 0)
1433 *j = (char) 0;
1434 return i + 5;
1435 }
1436 }
1437 return rn2(3) ? (rn2(2) ? "Michael Toy" : "Kenneth Arnold")
1438 : "Glenn Wichman";
1439}
1440
1441static NEARDATA const char *const hcolors[] = {
1442 "ultraviolet", "infrared", "bluish-orange", "reddish-green", "dark white",

Callers 2

namefloorobjFunction · 0.85
makerogueghostFunction · 0.85

Calls 2

rn2Function · 0.85
nh_getenvFunction · 0.70

Tested by

no test coverage detected