| 882 | */ |
| 883 | |
| 884 | staticfn int |
| 885 | optfn_alignment( |
| 886 | int optidx, |
| 887 | int req, |
| 888 | boolean negated, |
| 889 | char *opts, |
| 890 | char *op) |
| 891 | { |
| 892 | if (req == do_init) { |
| 893 | return optn_ok; |
| 894 | } |
| 895 | if (req == do_set) { |
| 896 | /* alignment:string */ |
| 897 | if (!parse_role_opt(optidx, negated, allopt[optidx].name, opts, &op)) |
| 898 | return optn_silenterr; |
| 899 | |
| 900 | if (*op != '!') { |
| 901 | if ((flags.initalign = str2align(op)) == ROLE_NONE) { |
| 902 | config_error_add("Unknown %s '%s'", allopt[optidx].name, op); |
| 903 | return optn_err; |
| 904 | } |
| 905 | saveoptstr(optidx, rolestring(flags.initalign, aligns, adj)); |
| 906 | } |
| 907 | return optn_ok; |
| 908 | } |
| 909 | if (req == get_val) { |
| 910 | Sprintf(opts, "%s", rolestring(flags.initalign, aligns, adj)); |
| 911 | return optn_ok; |
| 912 | } |
| 913 | if (req == get_cnf_val) { |
| 914 | op = get_cnf_role_opt(optidx); |
| 915 | Strcpy(opts, op ? op : "none"); |
| 916 | return optn_ok; |
| 917 | } |
| 918 | return optn_ok; |
| 919 | } |
| 920 | |
| 921 | |
| 922 | staticfn int |
nothing calls this directly
no test coverage detected