Lines Matching refs:opt_p
282 const char *opt_p = current_opt_p->opt; in cli_opt_usage() local
285 if (opt_p == NULL) in cli_opt_usage()
287 opt_p = current_opt_p->longopt; in cli_opt_usage()
291 opt_length += (int) strlen (opt_p); in cli_opt_usage()
305 printf ("-%s", opt_p); in cli_opt_usage()
309 printf ("--%s", opt_p); in cli_opt_usage()
324 const char *opt_p = current_opt_p->meta; in cli_opt_usage() local
325 int opt_length = (int) (2 + strlen (opt_p)); in cli_opt_usage()
334 printf (" [%s]", opt_p); in cli_opt_usage()
388 const cli_opt_t *opt_p = options_p; in cli_help() local
390 while (opt_p->id != CLI_OPT_DEFAULT) in cli_help()
395 if (opt_p->opt != NULL) in cli_help()
397 printf ("-%s", opt_p->opt); in cli_help()
398 length += (int) (strlen (opt_p->opt) + 1); in cli_help()
401 if (opt_p->opt != NULL && opt_p->longopt != NULL) in cli_help()
407 if (opt_p->longopt != NULL) in cli_help()
409 printf ("--%s", opt_p->longopt); in cli_help()
410 length += (int) (strlen (opt_p->longopt) + 2); in cli_help()
413 if (opt_p->meta != NULL) in cli_help()
415 printf (" %s", opt_p->meta); in cli_help()
416 length += 1 + (int) strlen (opt_p->meta); in cli_help()
419 if (opt_p->help != NULL) in cli_help()
429 cli_print_help (opt_p->help); in cli_help()
433 opt_p++; in cli_help()
436 if (opt_p->help != NULL) in cli_help()
440 if (opt_p->meta != NULL) in cli_help()
442 length = (int) (CLI_LINE_INDENT + strlen (opt_p->meta)); in cli_help()
445 printf ("%s", opt_p->meta); in cli_help()
456 cli_print_help (opt_p->help); in cli_help()