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

Function proc_wizkit_line

src/files.c:2561–2581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2559}
2560
2561boolean
2562proc_wizkit_line(char *buf)
2563{
2564 struct obj *otmp;
2565
2566 if (strlen(buf) >= BUFSZ)
2567 buf[BUFSZ - 1] = '\0';
2568 otmp = readobjnam(buf, (struct obj *) 0);
2569
2570 if (otmp) {
2571 if (otmp != &hands_obj) {
2572 wish_history_add(buf);
2573 wizkit_addinv(otmp);
2574 }
2575 } else {
2576 /* .60 limits output line width to 79 chars */
2577 config_error_add("Bad wizkit item: \"%.60s\"", buf);
2578 return FALSE;
2579 }
2580 return TRUE;
2581}
2582
2583void
2584read_wizkit(void)

Callers

nothing calls this directly

Calls 4

readobjnamFunction · 0.85
wish_history_addFunction · 0.85
wizkit_addinvFunction · 0.85
config_error_addFunction · 0.85

Tested by

no test coverage detected