| 970 | } |
| 971 | |
| 972 | staticfn int |
| 973 | optfn_align_status( |
| 974 | int optidx, int req, boolean negated, |
| 975 | char *opts, char *op) |
| 976 | { |
| 977 | if (req == do_init) { |
| 978 | return optn_ok; |
| 979 | } |
| 980 | if (req == do_set) { |
| 981 | /* WINCAP align_status:[left|top|right|bottom] */ |
| 982 | op = string_for_opt(opts, negated); |
| 983 | if ((op != empty_optstr) && !negated) { |
| 984 | if (!strncmpi(op, "left", sizeof "left" - 1)) |
| 985 | iflags.wc_align_status = ALIGN_LEFT; |
| 986 | else if (!strncmpi(op, "top", sizeof "top" - 1)) |
| 987 | iflags.wc_align_status = ALIGN_TOP; |
| 988 | else if (!strncmpi(op, "right", sizeof "right" - 1)) |
| 989 | iflags.wc_align_status = ALIGN_RIGHT; |
| 990 | else if (!strncmpi(op, "bottom", sizeof "bottom" - 1)) |
| 991 | iflags.wc_align_status = ALIGN_BOTTOM; |
| 992 | else { |
| 993 | config_error_add("Unknown %s parameter '%s'", |
| 994 | allopt[optidx].name, op); |
| 995 | return optn_err; |
| 996 | } |
| 997 | } else if (negated) { |
| 998 | bad_negation(allopt[optidx].name, TRUE); |
| 999 | return optn_err; |
| 1000 | } |
| 1001 | return optn_ok; |
| 1002 | } |
| 1003 | if (req == get_val || req == get_cnf_val) { |
| 1004 | int which; |
| 1005 | |
| 1006 | which = iflags.wc_align_status; |
| 1007 | Sprintf(opts, "%s", |
| 1008 | (which == ALIGN_TOP) ? "top" |
| 1009 | : (which == ALIGN_LEFT) ? "left" |
| 1010 | : (which == ALIGN_BOTTOM) ? "bottom" |
| 1011 | : (which == ALIGN_RIGHT) ? "right" |
| 1012 | : defopt); |
| 1013 | return optn_ok; |
| 1014 | } |
| 1015 | if (req == do_handler) { |
| 1016 | return handler_align_misc(optidx); |
| 1017 | } |
| 1018 | return optn_ok; |
| 1019 | } |
| 1020 | |
| 1021 | staticfn int |
| 1022 | optfn_altkeyhandling( |
nothing calls this directly
no test coverage detected