| 4064 | } |
| 4065 | |
| 4066 | staticfn int |
| 4067 | optfn_statuslines( |
| 4068 | int optidx, int req, boolean negated, |
| 4069 | char *opts, char *op) |
| 4070 | { |
| 4071 | int retval = optn_ok, itmp = 0; |
| 4072 | |
| 4073 | if (req == do_init) { |
| 4074 | return optn_ok; |
| 4075 | } |
| 4076 | if (req == do_set) { |
| 4077 | /* WINCAP2 |
| 4078 | * statuslines:n */ |
| 4079 | |
| 4080 | op = string_for_opt(opts, negated); |
| 4081 | if (negated) { |
| 4082 | bad_negation(allopt[optidx].name, TRUE); |
| 4083 | itmp = 2; |
| 4084 | retval = optn_err; |
| 4085 | } else if (op != empty_optstr) { |
| 4086 | itmp = atoi(op); |
| 4087 | } |
| 4088 | if (itmp < 2 || itmp > 3) { |
| 4089 | config_error_add("'%s:%s' is invalid; must be 2 or 3", |
| 4090 | allopt[optidx].name, op); |
| 4091 | retval = optn_silenterr; |
| 4092 | } else { |
| 4093 | iflags.wc2_statuslines = itmp; |
| 4094 | if (!go.opt_initial) |
| 4095 | go.opt_need_redraw = TRUE; |
| 4096 | } |
| 4097 | return retval; |
| 4098 | } |
| 4099 | if (req == get_val || req == get_cnf_val) { |
| 4100 | if (wc2_supported(allopt[optidx].name)) |
| 4101 | Strcpy(opts, (iflags.wc2_statuslines < 3) ? "2" : "3"); |
| 4102 | else |
| 4103 | Strcpy(opts, "unknown"); |
| 4104 | return optn_ok; |
| 4105 | } |
| 4106 | return optn_ok; |
| 4107 | } |
| 4108 | |
| 4109 | #ifdef WIN32CON |
| 4110 | staticfn int |
nothing calls this directly
no test coverage detected