returns "[your ]xname(obj)" or "Foobar's xname(obj)" or "the xname(obj)" */
| 2356 | |
| 2357 | /* returns "[your ]xname(obj)" or "Foobar's xname(obj)" or "the xname(obj)" */ |
| 2358 | char * |
| 2359 | yname(struct obj *obj) |
| 2360 | { |
| 2361 | char *s = cxname(obj); |
| 2362 | |
| 2363 | /* leave off "your" for most of your artifacts, but prepend |
| 2364 | * "your" for unique objects and "foo of bar" quest artifacts */ |
| 2365 | if (!carried(obj) || !obj_is_pname(obj) |
| 2366 | || obj->oartifact >= ART_ORB_OF_DETECTION) { |
| 2367 | char *outbuf = shk_your(nextobuf(), obj); |
| 2368 | int space_left = BUFSZ - 1 - Strlen(outbuf); |
| 2369 | |
| 2370 | s = strncat(outbuf, s, space_left); |
| 2371 | } |
| 2372 | |
| 2373 | return s; |
| 2374 | } |
| 2375 | |
| 2376 | /* capitalized variant of yname() */ |
| 2377 | char * |
no test coverage detected