MCPcopy Create free account
hub / github.com/gwsw/less / mca_opt_toggle

Function mca_opt_toggle

command.c:189–217  ·  view source on GitHub ↗

* Set up the display to start a new toggle-option command. */

Source from the content-addressed store, hash-verified

187 * Set up the display to start a new toggle-option command.
188 */
189 static void
190mca_opt_toggle(VOID_PARAM)
191{
192 int no_prompt;
193 int flag;
194 char *dash;
195
196 no_prompt = (optflag & OPT_NO_PROMPT);
197 flag = (optflag & ~OPT_NO_PROMPT);
198 dash = (flag == OPT_NO_TOGGLE) ? "_" : "-";
199
200 set_mca(A_OPT_TOGGLE);
201 cmd_putstr(dash);
202 if (optgetname)
203 cmd_putstr(dash);
204 if (no_prompt)
205 cmd_putstr("(P)");
206 switch (flag)
207 {
208 case OPT_UNSET:
209 cmd_putstr("+");
210 break;
211 case OPT_SET:
212 cmd_putstr("!");
213 break;
214 }
215 forw_prompt = 0;
216 set_mlist(NULL, 0);
217}
218
219/*
220 * Execute a multicharacter command.

Callers 3

mca_opt_first_charFunction · 0.85
mca_opt_nonfirst_charFunction · 0.85
commandsFunction · 0.85

Calls 3

set_mcaFunction · 0.85
cmd_putstrFunction · 0.85
set_mlistFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…