| 3821 | } |
| 3822 | |
| 3823 | staticfn int |
| 3824 | optfn_soundlib( |
| 3825 | int optidx, int req, boolean negated UNUSED, |
| 3826 | char *opts, char *op) |
| 3827 | { |
| 3828 | char soundlibbuf[WINTYPELEN]; |
| 3829 | |
| 3830 | if (req == do_init) { |
| 3831 | return optn_ok; |
| 3832 | } |
| 3833 | if (req == do_set) { |
| 3834 | /* |
| 3835 | * soundlib: option to choose the interface for binaries built |
| 3836 | * with support for more than the default interface (nosound). |
| 3837 | * |
| 3838 | * Option processing sets gc.chosen_soundlib. A later call |
| 3839 | * to activate_chosen_soundlib() actually activates it, and |
| 3840 | * sets gc.active_soundlib. |
| 3841 | */ |
| 3842 | if ((op = string_for_env_opt(allopt[optidx].name, opts, FALSE)) |
| 3843 | != empty_optstr) { |
| 3844 | enum soundlib_ids option_id; |
| 3845 | |
| 3846 | get_soundlib_name(soundlibbuf, WINTYPELEN); |
| 3847 | option_id = soundlib_id_from_opt(op); |
| 3848 | gc.chosen_soundlib = option_id; |
| 3849 | assign_soundlib(gc.chosen_soundlib); |
| 3850 | } else |
| 3851 | return optn_err; |
| 3852 | return optn_ok; |
| 3853 | } |
| 3854 | if (req == get_val || req == get_cnf_val) { |
| 3855 | get_soundlib_name(soundlibbuf, WINTYPELEN); |
| 3856 | Sprintf(opts, "%s", soundlibbuf); |
| 3857 | return optn_ok; |
| 3858 | } |
| 3859 | return optn_ok; |
| 3860 | } |
| 3861 | |
| 3862 | staticfn int |
| 3863 | optfn_sortdiscoveries( |
nothing calls this directly
no test coverage detected