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

Function all_options_autocomplete

src/cmd.c:3295–3308  ·  view source on GitHub ↗

add changed autocompletions to the string buffer in config file format */

Source from the content-addressed store, hash-verified

3293
3294/* add changed autocompletions to the string buffer in config file format */
3295void
3296all_options_autocomplete(strbuf_t *sbuf)
3297{
3298 struct ext_func_tab *efp;
3299 char buf[BUFSZ];
3300
3301 for (efp = extcmdlist; efp->ef_txt; efp++)
3302 if ((efp->flags & AUTOCOMP_ADJ) != 0) {
3303 Sprintf(buf, "AUTOCOMPLETE=%s%s\n",
3304 (efp->flags & AUTOCOMPLETE) ? "" : "!",
3305 efp->ef_txt);
3306 strbuf_append(sbuf, buf);
3307 }
3308}
3309
3310/* return the number of changed autocompletions */
3311int

Callers 1

all_options_strbufFunction · 0.85

Calls 1

strbuf_appendFunction · 0.85

Tested by

no test coverage detected