MCPcopy Create free account
hub / github.com/RsyncProject/rsync / itemUsage

Function itemUsage

popt/popthelp.c:721–740  ·  view source on GitHub ↗

* Display popt alias and exec usage. * @param fp output file handle * @param columns output display width control * @param item alias/exec array * @param nitems no. of ara/exec entries * @param translation_domain translation domain */

Source from the content-addressed store, hash-verified

719 * @param translation_domain translation domain
720 */
721static size_t itemUsage(FILE * fp, columns_t columns,
722 poptItem item, int nitems,
723 const char * translation_domain)
724{
725 int i;
726
727 if (item != NULL)
728 for (i = 0; i < nitems; i++, item++) {
729 const struct poptOption * opt;
730 opt = &item->option;
731 if (poptArgType(opt) == POPT_ARG_INTL_DOMAIN) {
732 translation_domain = (const char *)opt->arg;
733 } else
734 if ((opt->longName || opt->shortName) && !F_ISSET(opt, DOC_HIDDEN)) {
735 columns->cur = singleOptionUsage(fp, columns, opt, translation_domain);
736 }
737 }
738
739 return columns->cur;
740}
741
742/**
743 * Keep track of option tables already processed.

Callers 1

poptPrintUsageFunction · 0.85

Calls 1

singleOptionUsageFunction · 0.85

Tested by

no test coverage detected