MCPcopy Create free account
hub / github.com/NetHack/NetHack / optfn_video

Function optfn_video

src/options.c:4646–4676  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4644
4645#ifdef NO_TERMS
4646staticfn int
4647optfn_video(
4648 int optidx, int req, boolean negated UNUSED,
4649 char *opts, char *op UNUSED)
4650{
4651 if (req == do_init) {
4652 return optn_ok;
4653 }
4654 if (req == do_set) {
4655 /* video:string */
4656 if ((opts = string_for_env_opt(allopt[optidx].name, opts, FALSE))
4657 == empty_optstr) {
4658 return optn_err;
4659 }
4660 if (!assign_video(opts)) {
4661 config_error_add("Unknown error handling '%s'",
4662 allopt[optidx].name);
4663 return optn_err;
4664 }
4665 return optn_ok;
4666 }
4667 if (req == get_val) {
4668 Sprintf(opts, "%s", to_be_done);
4669 return optn_ok;
4670 }
4671 if (req == get_cnf_val) {
4672 opts[0] = '\0';
4673 return optn_ok;
4674 }
4675 return optn_ok;
4676}
4677
4678#endif /* NO_TERMS */
4679#endif /* MSDOS */

Callers

nothing calls this directly

Calls 3

string_for_env_optFunction · 0.85
assign_videoFunction · 0.85
config_error_addFunction · 0.85

Tested by

no test coverage detected