``[the(] singular(food, xname) [)]'' */
| 214 | |
| 215 | /* ``[the(] singular(food, xname) [)]'' */ |
| 216 | staticfn const char * |
| 217 | food_xname(struct obj *food, boolean the_pfx) |
| 218 | { |
| 219 | const char *result; |
| 220 | |
| 221 | if (food->otyp == CORPSE) { |
| 222 | result = corpse_xname(food, (const char *) 0, |
| 223 | CXN_SINGULAR | (the_pfx ? CXN_PFX_THE : 0)); |
| 224 | /* not strictly needed since pname values are capitalized |
| 225 | and the() is a no-op for them */ |
| 226 | if (type_is_pname(&mons[food->corpsenm])) |
| 227 | the_pfx = FALSE; |
| 228 | } else { |
| 229 | /* the ordinary case */ |
| 230 | result = singular(food, xname); |
| 231 | } |
| 232 | if (the_pfx) |
| 233 | result = the(result); |
| 234 | return result; |
| 235 | } |
| 236 | |
| 237 | /* Created by GAN 01/28/87 |
| 238 | * Amended by AKP 09/22/87: if not hard, don't choke, just vomit. |
no test coverage detected