Lines Matching refs:opt

47 		error_args(opt->name, argc, argv);
55 error_args(opt->name, argc, argv);
63 error_args(opt->name, argc, argv);
72 error_args(opt->name, argc, argv);
88 error_args(opt->name, argc - 1, argv + 1);
104 exit_error(true, "%s missing <mainperc>", opt->name);
107 "bad %s pair number [<minilabel> <miniperc>]", opt->name);
139 error_args(opt->name, argc - 1, argv + 1);
168 dprintf(opt->output_fd, "%d", value);
189 error_args(opt->name, argc - 3, argv + 3);
197 if (strcmp(opt->name, "--datebox") == 0)
204 if (opt->date_fmt != NULL) {
210 strftime(stringdate, 1024, opt->date_fmt, localtm);
211 dprintf(opt->output_fd, "%s", stringdate);
212 } else if (opt->bikeshed && ~dd & 1) {
213 dprintf(opt->output_fd, "%u/%u/%u", dd, mm, yy);
215 dprintf(opt->output_fd, "%02u/%02u/%u", dd, mm, yy);
237 return (date(conf, text, rows, cols, argc, argv, opt));
242 return (date(conf, text, rows, cols, argc, argv, opt));
271 if (opt->time_fmt != NULL) {
277 strftime(stringtime, 1024, opt->time_fmt, localtm);
278 dprintf(opt->output_fd, "%s", stringtime);
279 } else if (opt->bikeshed && ~ss & 1) {
280 dprintf(opt->output_fd, "%u:%u:%u", hh, mm, ss);
282 dprintf(opt->output_fd, "%02u:%02u:%02u", hh, mm, ss);
293 struct options *opt)
307 exit_error(true, "%s bad arguments items number", opt->name);
312 exit_error(false, "%s cannot allocate items", opt->name);
335 if (opt->item_default != NULL && *focusitem == -1)
336 if (strcmp((*items)[i].name, opt->item_default) == 0)
343 int focusitem, struct options *opt)
350 ismenu = (strcmp(opt->name, "--menu") == 0) ? true : false;
351 ischecklist = (strcmp(opt->name, "--checklist") == 0) ? true : false;
353 quotech = opt->item_singlequote ? '\'' : '"';
359 dprintf(opt->output_fd, "HELP ");
363 if (opt->item_bottomdesc &&
364 opt->help_print_item_name == false)
369 toquote = opt->item_always_quote;
371 opt->item_output_sepnl == false)
375 dprintf(opt->output_fd, "%c%s%c",
378 dprintf(opt->output_fd, "%s", focusname);
381 if (ismenu || opt->help_print_items == false)
388 if ((sepstr = opt->item_output_sep) == NULL) {
389 if (opt->item_output_sepnl)
399 if (opt->item_output_sepnl) {
409 dprintf(opt->output_fd, "%s", sepstr);
416 toquote = opt->item_always_quote;
417 if (ischecklist && opt->item_output_sepnl == false)
421 dprintf(opt->output_fd, "%c%s%c",
424 dprintf(opt->output_fd, "%s", items[i].name);
427 dprintf(opt->output_fd, "%s", sepstr);
441 get_menu_items(argc-1, argv+1, opt->item_prefix, opt->item_depth, true,
442 true, true, opt->item_bottomdesc, &nitems, &items, &focusitem, opt);
447 print_menu_items(output, nitems, items, focusitem, opt);
450 if (output == BSDDIALOG_HELP && opt->item_bottomdesc)
466 get_menu_items(argc-1, argv+1, opt->item_prefix, opt->item_depth, true,
467 true, false, opt->item_bottomdesc, &nitems, &items, &focusitem,
468 opt);
473 print_menu_items(output, nitems, items, focusitem, opt);
476 if (output == BSDDIALOG_HELP && opt->item_bottomdesc)
492 get_menu_items(argc-1, argv+1, opt->item_prefix, opt->item_depth, true,
493 true, true, opt->item_bottomdesc, &nitems, &items, &focusitem, opt);
498 print_menu_items(output, nitems, items, focusitem, opt);
501 if (output == BSDDIALOG_HELP && opt->item_bottomdesc)
517 get_menu_items(argc-1, argv+1, opt->item_prefix, true, true, true, true,
518 opt->item_bottomdesc, &nitems, &items, &focusitem, opt);
526 print_menu_items(output, nitems, items, focusitem, opt);
529 if (output == BSDDIALOG_HELP && opt->item_bottomdesc)
561 int focusitem, struct options *opt)
570 dprintf(opt->output_fd, "HELP");
573 if (opt->item_bottomdesc &&
574 opt->help_print_item_name == false)
576 dprintf(opt->output_fd, " %s", helpname);
578 if (opt->help_print_items == false)
580 dprintf(opt->output_fd, "\n");
585 dprintf(opt->output_fd, "%s\n", items[i].value);
602 sizeitem = opt->item_bottomdesc ? 9 : 8;
631 items[i].bottomdesc = opt->item_bottomdesc ? argv[j++] : "";
637 print_form_items(output, nitems, items, focusitem, opt);
640 if (output == BSDDIALOG_HELP && opt->item_bottomdesc)
661 item.maxvaluelen = opt->max_input_form;
668 print_form_items(output, 1, &item, -1, opt);
685 sizeitem = opt->item_bottomdesc ? 10 : 9;
713 items[i].bottomdesc = opt->item_bottomdesc ? argv[j++] : "";
723 print_form_items(output, nitems, items, focusitem, opt);
726 if (output == BSDDIALOG_HELP && opt->item_bottomdesc)
747 item.maxvaluelen = opt->max_input_form;
755 print_form_items(output, 1, &item, -1, opt);
772 sizeitem = opt->item_bottomdesc ? 9 : 8;
798 items[i].bottomdesc = opt->item_bottomdesc ? argv[j++] : "";
804 print_form_items(output, nitems, items, focusitem, opt);
807 if (output == BSDDIALOG_HELP && opt->item_bottomdesc)