for use by safe_qbuf() */
| 602 | |
| 603 | /* for use by safe_qbuf() */ |
| 604 | staticfn char * |
| 605 | docall_xname(struct obj *obj) |
| 606 | { |
| 607 | struct obj otemp; |
| 608 | |
| 609 | otemp = *obj; |
| 610 | otemp.oextra = (struct oextra *) 0; |
| 611 | otemp.quan = 1L; |
| 612 | /* in case water is already known, convert "[un]holy water" to "water" */ |
| 613 | otemp.blessed = otemp.cursed = 0; |
| 614 | /* remove attributes that are doname() caliber but get formatted |
| 615 | by xname(); most of these fixups aren't really needed because the |
| 616 | relevant type of object isn't callable so won't reach this far */ |
| 617 | if (otemp.oclass == WEAPON_CLASS) |
| 618 | otemp.opoisoned = 0; /* not poisoned */ |
| 619 | else if (otemp.oclass == POTION_CLASS) |
| 620 | otemp.odiluted = 0; /* not diluted */ |
| 621 | else if (otemp.otyp == TOWEL || otemp.otyp == STATUE) |
| 622 | otemp.spe = 0; /* not wet or historic */ |
| 623 | else if (otemp.otyp == TIN) |
| 624 | otemp.known = 0; /* suppress tin type (homemade, &c) and mon type */ |
| 625 | else if (otemp.otyp == FIGURINE) |
| 626 | otemp.corpsenm = NON_PM; /* suppress mon type */ |
| 627 | else if (otemp.otyp == HEAVY_IRON_BALL) |
| 628 | otemp.owt = objects[HEAVY_IRON_BALL].oc_weight; /* not "very heavy" */ |
| 629 | else if (otemp.oclass == FOOD_CLASS && otemp.globby) |
| 630 | otemp.owt = 120; /* 6*20, neither a small glob nor a large one */ |
| 631 | |
| 632 | return an(xname(&otemp)); |
| 633 | } |
| 634 | |
| 635 | void |
| 636 | docall(struct obj *obj) |