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

Function aobjnam

src/objnam.c:2243–2258  ·  view source on GitHub ↗

returns "count cxname(otmp)" or just cxname(otmp) if count == 1 */

Source from the content-addressed store, hash-verified

2241
2242/* returns "count cxname(otmp)" or just cxname(otmp) if count == 1 */
2243char *
2244aobjnam(struct obj *otmp, const char *verb)
2245{
2246 char prefix[PREFIX];
2247 char *bp = cxname(otmp);
2248
2249 if (otmp->quan != 1L) {
2250 Sprintf(prefix, "%ld ", otmp->quan);
2251 bp = strprepend(bp, prefix);
2252 }
2253 if (verb) {
2254 Strcat(bp, " ");
2255 Strcat(bp, otense(otmp, verb));
2256 }
2257 return bp;
2258}
2259
2260/* combine yname and aobjnam eg "your count cxname(otmp)" */
2261char *

Callers 8

ready_weaponFunction · 0.85
potionhitFunction · 0.85
yobjnamFunction · 0.85
invoke_create_ammoFunction · 0.85
hornoplentyFunction · 0.85
acid_damageFunction · 0.85
makewishFunction · 0.85
dowriteFunction · 0.85

Calls 3

cxnameFunction · 0.85
strprependFunction · 0.85
otenseFunction · 0.85

Tested by

no test coverage detected