MCPcopy Create free account
hub / github.com/F-Stack/f-stack / main

Function main

tools/libxo/xo/xo.c:270–555  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268};
269
270int
271main (int argc UNUSED, char **argv)
272{
273 char *fmt = NULL, *cp, *np;
274 char *opt_opener = NULL, *opt_closer = NULL, *opt_wrapper = NULL;
275 char *opt_options = NULL;
276 char *opt_instance = NULL;
277 char *opt_name = NULL;
278 xo_state_t new_state = 0;
279 int opt_depth = 0;
280 int opt_not_first = 0;
281 int opt_top_wrap = 0;
282 int rc;
283
284 argc = xo_parse_args(argc, argv);
285 if (argc < 0)
286 return 1;
287
288 while ((rc = getopt_long(argc, argv, "Cc:HJl:O:o:ps:TXW",
289 long_opts, NULL)) != -1) {
290 switch (rc) {
291 case 'C':
292 xo_set_flags(NULL, XOF_CONTINUATION);
293 break;
294
295 case 'c':
296 opt_closer = optarg;
297 xo_set_flags(NULL, XOF_IGNORE_CLOSE);
298 break;
299
300 case 'H':
301 xo_set_style(NULL, XO_STYLE_HTML);
302 break;
303
304 case 'I':
305 opt_instance = optarg;
306 break;
307
308 case 'J':
309 xo_set_style(NULL, XO_STYLE_JSON);
310 break;
311
312 case 'l':
313 xo_set_leading_xpath(NULL, optarg);
314 break;
315
316 case 'O':
317 opt_options = optarg;
318 break;
319
320 case 'o':
321 opt_opener = optarg;
322 break;
323
324 case 'p':
325 xo_set_flags(NULL, XOF_PRETTY);
326 break;
327

Callers

nothing calls this directly

Calls 15

xo_parse_argsFunction · 0.85
getopt_longFunction · 0.85
xo_set_flagsFunction · 0.85
xo_set_styleFunction · 0.85
xo_set_leading_xpathFunction · 0.85
xo_set_style_nameFunction · 0.85
xo_errxFunction · 0.85
bzeroFunction · 0.85
xo_set_optionsFunction · 0.85
xo_set_formatterFunction · 0.85
xo_set_depthFunction · 0.85
xo_explicit_transitionFunction · 0.85

Tested by

no test coverage detected