Return TRUE if the provided string matches the unidentified description of * the provided object. */
| 349 | /* Return TRUE if the provided string matches the unidentified description of |
| 350 | * the provided object. */ |
| 351 | boolean |
| 352 | objdescr_is(struct obj *obj, const char *descr) |
| 353 | { |
| 354 | const char *objdescr; |
| 355 | |
| 356 | if (!obj) { |
| 357 | impossible("objdescr_is: null obj"); |
| 358 | return FALSE; |
| 359 | } |
| 360 | |
| 361 | objdescr = OBJ_DESCR(objects[obj->otyp]); |
| 362 | if (!objdescr) |
| 363 | return FALSE; /* no obj description, no match */ |
| 364 | return !strcmp(objdescr, descr); |
| 365 | } |
| 366 | |
| 367 | /* level dependent initialization */ |
| 368 | void |
no test coverage detected