| 1849 | } |
| 1850 | |
| 1851 | staticfn int |
| 1852 | optfn_hilite_status( |
| 1853 | int optidx UNUSED, |
| 1854 | int req, |
| 1855 | boolean negated, |
| 1856 | char *opts, |
| 1857 | char *op) |
| 1858 | { |
| 1859 | if (req == do_init) { |
| 1860 | return optn_ok; |
| 1861 | } |
| 1862 | if (req == do_set) { |
| 1863 | /* hilite fields in status prompt */ |
| 1864 | #ifdef STATUS_HILITES |
| 1865 | op = string_for_opt(opts, TRUE); |
| 1866 | if (op != empty_optstr && negated) { |
| 1867 | clear_status_hilites(); |
| 1868 | return optn_ok; |
| 1869 | } else if (op == empty_optstr) { |
| 1870 | config_error_add("Value is mandatory for hilite_status"); |
| 1871 | return optn_err; |
| 1872 | } |
| 1873 | if (!parse_status_hl1(op, go.opt_from_file)) |
| 1874 | return optn_err; |
| 1875 | return optn_ok; |
| 1876 | #else |
| 1877 | nhUse(negated); |
| 1878 | nhUse(op); |
| 1879 | config_error_add("'%s' is not supported", allopt[optidx].name); |
| 1880 | return optn_err; |
| 1881 | #endif |
| 1882 | } |
| 1883 | if (req == get_val || req == get_cnf_val) { |
| 1884 | opts[0] = '\0'; |
| 1885 | #ifdef STATUS_HILITES |
| 1886 | if (req == get_val) |
| 1887 | Strcpy(opts, count_status_hilites() |
| 1888 | ? "(see \"status highlight rules\" below)" |
| 1889 | : "(none)"); |
| 1890 | #endif |
| 1891 | return optn_ok; |
| 1892 | } |
| 1893 | return optn_ok; |
| 1894 | } |
| 1895 | |
| 1896 | staticfn int |
| 1897 | optfn_horsename( |
nothing calls this directly
no test coverage detected