| 3401 | } |
| 3402 | |
| 3403 | staticfn int |
| 3404 | optfn_pile_limit( |
| 3405 | int optidx, int req, boolean negated, |
| 3406 | char *opts, char *op) |
| 3407 | { |
| 3408 | if (req == do_init) { |
| 3409 | return optn_ok; |
| 3410 | } |
| 3411 | if (req == do_set) { |
| 3412 | /* pile limit: when walking over objects, number which triggers |
| 3413 | "there are several/many objects here" instead of listing them |
| 3414 | */ |
| 3415 | |
| 3416 | op = string_for_opt(opts, negated); |
| 3417 | if ((negated && op == empty_optstr) |
| 3418 | || (!negated && op != empty_optstr)) |
| 3419 | flags.pile_limit = negated ? 0 : atoi(op); |
| 3420 | else if (negated) { |
| 3421 | bad_negation(allopt[optidx].name, TRUE); |
| 3422 | return optn_err; |
| 3423 | } else /* op == empty_optstr */ |
| 3424 | flags.pile_limit = PILE_LIMIT_DFLT; |
| 3425 | /* sanity check */ |
| 3426 | if (flags.pile_limit < 0) |
| 3427 | flags.pile_limit = PILE_LIMIT_DFLT; |
| 3428 | return optn_ok; |
| 3429 | } |
| 3430 | if (req == get_val || req == get_cnf_val) { |
| 3431 | Sprintf(opts, "%d", flags.pile_limit); |
| 3432 | return optn_ok; |
| 3433 | } |
| 3434 | return optn_ok; |
| 3435 | } |
| 3436 | |
| 3437 | staticfn int |
| 3438 | optfn_player_selection( |
nothing calls this directly
no test coverage detected