| 4277 | } |
| 4278 | |
| 4279 | staticfn int |
| 4280 | optfn_term_rows( |
| 4281 | int optidx, int req, boolean negated, |
| 4282 | char *opts, char *op) |
| 4283 | { |
| 4284 | int retval = optn_ok; |
| 4285 | long ltmp; |
| 4286 | |
| 4287 | if (req == do_init) { |
| 4288 | return optn_ok; |
| 4289 | } |
| 4290 | if (req == do_set) { |
| 4291 | /* WINCAP2 |
| 4292 | * term_rows:amount */ |
| 4293 | |
| 4294 | if ((op = string_for_opt(opts, negated)) != empty_optstr) { |
| 4295 | ltmp = atol(op); |
| 4296 | /* just checks atol() sanity, not logical window size sanity |
| 4297 | */ |
| 4298 | if (ltmp <= 0L || ltmp >= (long) LARGEST_INT) { |
| 4299 | config_error_add("Invalid %s: %ld", allopt[optidx].name, |
| 4300 | ltmp); |
| 4301 | retval = optn_err; |
| 4302 | } else { |
| 4303 | iflags.wc2_term_rows = (int) ltmp; |
| 4304 | } |
| 4305 | } |
| 4306 | return retval; |
| 4307 | } |
| 4308 | if (req == get_val || req == get_cnf_val) { |
| 4309 | if (iflags.wc2_term_rows) |
| 4310 | Sprintf(opts, "%d", iflags.wc2_term_rows); |
| 4311 | else if (req == get_cnf_val) |
| 4312 | opts[0] = '\0'; |
| 4313 | else |
| 4314 | Strcpy(opts, defopt); |
| 4315 | return optn_ok; |
| 4316 | } |
| 4317 | return optn_ok; |
| 4318 | } |
| 4319 | |
| 4320 | staticfn int |
| 4321 | optfn_tile_file( |
nothing calls this directly
no test coverage detected