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

Function oc_to_str

src/options.c:8061–8073  ·  view source on GitHub ↗

* Convert the given string of object classes to a string of default object * symbols. */

Source from the content-addressed store, hash-verified

8059 * symbols.
8060 */
8061void
8062oc_to_str(char *src, char *dest)
8063{
8064 int i;
8065
8066 while ((i = (int) *src++) != 0) {
8067 if (i < 0 || i >= MAXOCLASSES)
8068 impossible("oc_to_str: illegal object class %d", i);
8069 else
8070 *dest++ = def_oc_syms[i].sym;
8071 }
8072 *dest = '\0';
8073}
8074
8075/*
8076 * Add the given mapping to the menu command map list. Always keep the

Callers 4

optfn_packorderFunction · 0.85
optfn_pickup_typesFunction · 0.85
dotogglepickupFunction · 0.85
basics_enlightenmentFunction · 0.85

Calls 1

impossibleFunction · 0.70

Tested by

no test coverage detected