• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt/router/samba-3.0.25b/source/popt/

Lines Matching refs:opt

74     const struct poptOption *opt;
77 for (opt = table; opt->longName || opt->shortName || opt->arg; opt++) {
78 if (opt->argInfo == POPT_ARG_INTL_DOMAIN)
79 return opt->arg;
85 * @param opt option(s)
89 getArgDescrip(const struct poptOption * opt,
95 if (!(opt->argInfo & POPT_ARG_MASK)) return NULL;
97 if (opt == (poptHelpOptions + 1) || opt == (poptHelpOptions + 2))
98 if (opt->argDescrip) return POPT_(opt->argDescrip);
100 if (opt->argDescrip) return D_(translation_domain, opt->argDescrip);
102 switch (opt->argInfo & POPT_ARG_MASK) {
121 * @param opt option(s)
127 const struct poptOption * opt,
144 if (opt->arg) /* XXX programmer error */
145 switch (opt->argInfo & POPT_ARG_MASK) {
148 { long aLong = *((int *)opt->arg);
152 { long aLong = *((long *)opt->arg);
156 { double aDouble = *((float *)opt->arg);
160 { double aDouble = *((double *)opt->arg);
164 { const char * s = *(const char **)opt->arg;
194 * @param opt option(s)
198 const struct poptOption * opt,
205 const char * help = D_(translation_domain, opt->descrip);
206 const char * argDescrip = getArgDescrip(opt, translation_domain);
213 if (opt->longName) nb += strlen(opt->longName);
222 if (opt->longName && opt->shortName)
223 sprintf(left, "-%c, %s%s", opt->shortName,
224 ((opt->argInfo & POPT_ARGFLAG_ONEDASH) ? "-" : "--"),
225 opt->longName);
226 else if (opt->shortName != '\0')
227 sprintf(left, "-%c", opt->shortName);
228 else if (opt->longName)
230 ((opt->argInfo & POPT_ARGFLAG_ONEDASH) ? "-" : "--"),
231 opt->longName);
237 if (opt->argInfo & POPT_ARGFLAG_OPTIONAL)
242 if (opt->argInfo & POPT_ARGFLAG_SHOW_DEFAULT) {
243 defs = singleOptionDefaultValue(lineLength, opt, translation_domain);
262 if (opt->argDescrip == NULL) {
263 switch (opt->argInfo & POPT_ARG_MASK) {
268 { long aLong = opt->val;
269 int ops = (opt->argInfo & POPT_ARGFLAG_LOGICALOPS);
270 int negate = (opt->argInfo & POPT_ARGFLAG_NOT);
313 if (opt->argInfo & POPT_ARGFLAG_OPTIONAL)
363 * @param opt option(s)
366 static int maxArgWidth(const struct poptOption * opt,
374 if (opt != NULL)
375 while (opt->longName || opt->shortName || opt->arg) {
376 if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) {
377 if (opt->arg) /* XXX program error */
378 len = maxArgWidth(opt->arg, translation_domain);
380 } else if (!(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN)) {
382 if (opt->shortName != '\0') len += sizeof("-X")-1;
383 if (opt->shortName != '\0' && opt->longName) len += sizeof(", ")-1;
384 if (opt->longName) {
385 len += ((opt->argInfo & POPT_ARGFLAG_ONEDASH)
387 len += strlen(opt->longName);
390 s = getArgDescrip(opt, translation_domain);
393 if (opt->argInfo & POPT_ARGFLAG_OPTIONAL) len += sizeof("[]")-1;
397 opt++;
422 const struct poptOption * opt;
423 opt = &item->option;
424 if ((opt->longName || opt->shortName) &&
425 !(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN))
426 singleOptionHelp(fp, left, opt, translation_domain);
444 const struct poptOption * opt;
454 for (opt = table; (opt->longName || opt->shortName || opt->arg); opt++) {
455 if ((opt->longName || opt->shortName) &&
456 !(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN))
457 singleOptionHelp(fp, left, opt, translation_domain);
461 for (opt = table; (opt->longName || opt->shortName || opt->arg); opt++) {
462 if ((opt->argInfo & POPT_ARG_MASK) != POPT_ARG_INCLUDE_TABLE)
464 sub_transdom = getTableTranslationDomain(opt->arg);
468 if (opt->descrip)
469 fprintf(fp, "\n%s\n", D_(sub_transdom, opt->descrip));
471 singleTableHelp(con, fp, opt->arg, left, sub_transdom);
519 * @param opt option(s)
523 const struct poptOption * opt,
531 const char * argDescrip = getArgDescrip(opt, translation_domain);
533 if (opt->shortName != '\0' && opt->longName != NULL) {
535 if (!(opt->argInfo & POPT_ARGFLAG_ONEDASH)) len++;
536 len += strlen(opt->longName);
537 } else if (opt->shortName != '\0') {
539 shortStr[0] = opt->shortName;
541 } else if (opt->longName) {
542 len += strlen(opt->longName);
543 if (!(opt->argInfo & POPT_ARGFLAG_ONEDASH)) len++;
544 item = opt->longName;
557 if (opt->longName && opt->shortName) {
559 opt->shortName, ((opt->argInfo & POPT_ARGFLAG_ONEDASH) ? "" : "-"),
560 opt->longName,
565 ((opt->shortName || (opt->argInfo & POPT_ARGFLAG_ONEDASH)) ? "" : "-"),
567 (argDescrip ? (opt->shortName != '\0' ? " " : "=") : ""),
592 const struct poptOption * opt;
593 opt = &item->option;
594 if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INTL_DOMAIN) {
595 translation_domain = (const char *)opt->arg;
596 } else if ((opt->longName || opt->shortName) &&
597 !(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN)) {
598 cursor = singleOptionUsage(fp, cursor, opt, translation_domain);
620 * @param opt option(s)
626 /*@null@*/ const struct poptOption * opt,
633 if (opt != NULL)
634 for (; (opt->longName || opt->shortName || opt->arg) ; opt++) {
635 if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INTL_DOMAIN) {
636 translation_domain = (const char *)opt->arg;
637 } else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) {
644 if (that == NULL || that != opt->arg)
649 if (opt->arg == NULL || i < done->nopts)
653 done->opts[done->nopts++] = (const void *) opt->arg;
656 cursor = singleTableUsage(con, fp, cursor, opt->arg,
658 } else if ((opt->longName || opt->shortName) &&
659 !(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN)) {
660 cursor = singleOptionUsage(fp, cursor, opt, translation_domain);
671 * @param opt option(s)
676 static int showShortOptions(const struct poptOption * opt, FILE * fp,
687 if (opt != NULL)
688 for (; (opt->longName || opt->shortName || opt->arg); opt++) {
689 if (opt->shortName && !(opt->argInfo & POPT_ARG_MASK))
690 s[strlen(s)] = opt->shortName;
691 else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE)
692 if (opt->arg) /* XXX program error */
693 len = showShortOptions(opt->arg, fp, s);