• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/rsync-42/rsync/popt/

Lines Matching refs:opt

70     const struct poptOption *opt;
73 for (opt = table; opt->longName || opt->shortName || opt->arg; opt++) {
74 if (opt->argInfo == POPT_ARG_INTL_DOMAIN)
75 return opt->arg;
81 * @param opt option(s)
85 getArgDescrip(const struct poptOption * opt,
91 if (!(opt->argInfo & POPT_ARG_MASK)) return NULL;
93 if (opt == (poptHelpOptions + 1) || opt == (poptHelpOptions + 2))
94 if (opt->argDescrip) return POPT_(opt->argDescrip);
96 if (opt->argDescrip) return D_(translation_domain, opt->argDescrip);
98 switch (opt->argInfo & POPT_ARG_MASK) {
111 * @param opt option(s)
116 const struct poptOption * opt,
132 if (opt->arg) /* XXX programmer error */
133 switch (opt->argInfo & POPT_ARG_MASK) {
136 { long aLong = *((int *)opt->arg);
141 { long aLong = *((long *)opt->arg);
146 { double aDouble = *((float *)opt->arg);
151 { double aDouble = *((double *)opt->arg);
156 { const char * s = *(const char **)opt->arg;
183 * @param opt option(s)
187 const struct poptOption * opt,
194 const unsigned char * help = D_(translation_domain, opt->descrip);
195 const char * argDescrip = getArgDescrip(opt, translation_domain);
202 if (opt->longName) nb += strlen(opt->longName);
210 if (opt->longName && opt->shortName)
211 sprintf(left, "-%c, %s%s", opt->shortName,
212 ((opt->argInfo & POPT_ARGFLAG_ONEDASH) ? "-" : "--"),
213 opt->longName);
214 else if (opt->shortName != '\0')
215 sprintf(left, "-%c", opt->shortName);
216 else if (opt->longName)
218 ((opt->argInfo & POPT_ARGFLAG_ONEDASH) ? "-" : "--"),
219 opt->longName);
224 if (opt->argInfo & POPT_ARGFLAG_OPTIONAL)
229 if (opt->argInfo & POPT_ARGFLAG_SHOW_DEFAULT) {
230 defs = singleOptionDefaultValue(lineLength, opt, translation_domain);
249 if (opt->argDescrip == NULL) {
250 switch (opt->argInfo & POPT_ARG_MASK) {
254 { long aLong = opt->val;
255 int ops = (opt->argInfo & POPT_ARGFLAG_LOGICALOPS);
256 int negate = (opt->argInfo & POPT_ARGFLAG_NOT);
298 if (opt->argInfo & POPT_ARGFLAG_OPTIONAL)
345 * @param opt option(s)
348 static int maxArgWidth(const struct poptOption * opt,
356 if (opt != NULL)
357 while (opt->longName || opt->shortName || opt->arg) {
358 if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) {
359 if (opt->arg) /* XXX program error */
360 len = maxArgWidth(opt->arg, translation_domain);
362 } else if (!(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN)) {
364 if (opt->shortName != '\0') len += sizeof("-X")-1;
365 if (opt->shortName != '\0' && opt->longName) len += sizeof(", ")-1;
366 if (opt->longName) {
367 len += ((opt->argInfo & POPT_ARGFLAG_ONEDASH)
369 len += strlen(opt->longName);
372 s = getArgDescrip(opt, translation_domain);
375 if (opt->argInfo & POPT_ARGFLAG_OPTIONAL) len += sizeof("[]")-1;
379 opt++;
403 const struct poptOption * opt;
404 opt = &item->option;
405 if ((opt->longName || opt->shortName) &&
406 !(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN))
407 singleOptionHelp(fp, left, opt, translation_domain);
422 const struct poptOption * opt;
432 for (opt = table; (opt->longName || opt->shortName || opt->arg); opt++) {
433 if ((opt->longName || opt->shortName) &&
434 !(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN))
435 singleOptionHelp(fp, left, opt, translation_domain);
439 for (opt = table; (opt->longName || opt->shortName || opt->arg); opt++) {
440 if ((opt->argInfo & POPT_ARG_MASK) != POPT_ARG_INCLUDE_TABLE)
442 sub_transdom = getTableTranslationDomain(opt->arg);
446 if (opt->descrip)
447 fprintf(fp, "\n%s\n", D_(sub_transdom, opt->descrip));
449 singleTableHelp(con, fp, opt->arg, left, sub_transdom);
494 * @param opt option(s)
498 const struct poptOption * opt,
506 const char * argDescrip = getArgDescrip(opt, translation_domain);
508 if (opt->shortName!= '\0' ) {
509 if (!(opt->argInfo & POPT_ARG_MASK))
512 shortStr[0] = opt->shortName;
514 } else if (opt->longName) {
515 len += 1 + strlen(opt->longName);
516 item = opt->longName;
530 ((opt->shortName || (opt->argInfo & POPT_ARGFLAG_ONEDASH)) ? "" : "-"),
532 (argDescrip ? (opt->shortName != '\0' ? " " : "=") : ""),
555 const struct poptOption * opt;
556 opt = &item->option;
557 if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INTL_DOMAIN) {
558 translation_domain = (const char *)opt->arg;
559 } else if ((opt->longName || opt->shortName) &&
560 !(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN)) {
561 cursor = singleOptionUsage(fp, cursor, opt, translation_domain);
571 * @param opt option(s)
575 int cursor, const struct poptOption * opt,
581 if (opt != NULL)
582 for (; (opt->longName || opt->shortName || opt->arg) ; opt++) {
583 if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INTL_DOMAIN) {
584 translation_domain = (const char *)opt->arg;
585 } else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) {
586 if (opt->arg) /* XXX program error */
587 cursor = singleTableUsage(con, fp, cursor, opt->arg,
589 } else if ((opt->longName || opt->shortName) &&
590 !(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN)) {
591 cursor = singleOptionUsage(fp, cursor, opt, translation_domain);
601 * @param opt option(s)
606 static int showShortOptions(const struct poptOption * opt, FILE * fp,
621 if (opt != NULL)
622 for (; (opt->longName || opt->shortName || opt->arg); opt++) {
623 if (opt->shortName && !(opt->argInfo & POPT_ARG_MASK))
624 str[strlen(str)] = opt->shortName;
625 else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE)
626 if (opt->arg) /* XXX program error */
627 (void) showShortOptions(opt->arg, fp, str);