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

Function exec_mca

command.c:222–307  ·  view source on GitHub ↗

* Execute a multicharacter command. */

Source from the content-addressed store, hash-verified

220 * Execute a multicharacter command.
221 */
222 static void
223exec_mca(VOID_PARAM)
224{
225 char *cbuf;
226
227 cmd_exec();
228 cbuf = get_cmdbuf();
229
230 switch (mca)
231 {
232 case A_F_SEARCH:
233 case A_B_SEARCH:
234 multi_search(cbuf, (int) number, 0);
235 break;
236#if HILITE_SEARCH
237 case A_FILTER:
238 search_type ^= SRCH_NO_MATCH;
239 set_filter_pattern(cbuf, search_type);
240 break;
241#endif
242 case A_FIRSTCMD:
243 /*
244 * Skip leading spaces or + signs in the string.
245 */
246 while (*cbuf == '+' || *cbuf == ' ')
247 cbuf++;
248 if (every_first_cmd != NULL)
249 free(every_first_cmd);
250 if (*cbuf == '\0')
251 every_first_cmd = NULL;
252 else
253 every_first_cmd = save(cbuf);
254 break;
255 case A_OPT_TOGGLE:
256 toggle_option(curropt, opt_lower, cbuf, optflag);
257 curropt = NULL;
258 break;
259 case A_F_BRACKET:
260 match_brac(cbuf[0], cbuf[1], 1, (int) number);
261 break;
262 case A_B_BRACKET:
263 match_brac(cbuf[1], cbuf[0], 0, (int) number);
264 break;
265#if EXAMINE
266 case A_EXAMINE:
267 if (secure)
268 break;
269 edit_list(cbuf);
270#if TAGS
271 /* If tag structure is loaded then clean it up. */
272 cleantags();
273#endif
274 break;
275#endif
276#if SHELL_ESCAPE
277 case A_SHELL:
278 /*
279 * !! just uses whatever is in shellcmd.

Callers 1

mca_charFunction · 0.85

Calls 12

cmd_execFunction · 0.85
get_cmdbufFunction · 0.85
multi_searchFunction · 0.85
set_filter_patternFunction · 0.85
toggle_optionFunction · 0.85
match_bracFunction · 0.85
edit_listFunction · 0.85
cleantagsFunction · 0.85
fexpandFunction · 0.85
lsystemFunction · 0.85
pipe_markFunction · 0.85
errorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…