* 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 */
| 719 | * @param translation_domain translation domain |
| 720 | */ |
| 721 | static 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. |
no test coverage detected