| 3504 | } |
| 3505 | |
| 3506 | staticfn int |
| 3507 | optfn_race( |
| 3508 | int optidx, |
| 3509 | int req, |
| 3510 | boolean negated, |
| 3511 | char *opts, |
| 3512 | char *op) |
| 3513 | { |
| 3514 | if (req == do_init) { |
| 3515 | return optn_ok; |
| 3516 | } |
| 3517 | if (req == do_set) { |
| 3518 | /* race:string */ |
| 3519 | if (!parse_role_opt(optidx, negated, allopt[optidx].name, opts, &op)) |
| 3520 | return optn_silenterr; |
| 3521 | |
| 3522 | if (*op != '!') { |
| 3523 | if ((flags.initrace = str2race(op)) == ROLE_NONE) { |
| 3524 | config_error_add("Unknown %s '%s'", allopt[optidx].name, op); |
| 3525 | return optn_err; |
| 3526 | } |
| 3527 | gp.pl_race = *op; /* Backwards compatibility */ |
| 3528 | saveoptstr(optidx, rolestring(flags.initrace, races, noun)); |
| 3529 | } |
| 3530 | return optn_ok; |
| 3531 | } |
| 3532 | if (req == get_val) { |
| 3533 | Sprintf(opts, "%s", rolestring(flags.initrace, races, noun)); |
| 3534 | return optn_ok; |
| 3535 | } |
| 3536 | if (req == get_cnf_val) { |
| 3537 | op = get_cnf_role_opt(optidx); |
| 3538 | Strcpy(opts, op ? op : "none"); |
| 3539 | return optn_ok; |
| 3540 | } |
| 3541 | return optn_ok; |
| 3542 | } |
| 3543 | |
| 3544 | staticfn int |
| 3545 | optfn_roguesymset( |
nothing calls this directly
no test coverage detected