diff options
-rw-r--r-- | po/cs.po | 2 | ||||
-rw-r--r-- | po/da.po | 2 | ||||
-rw-r--r-- | po/de.po | 2 | ||||
-rw-r--r-- | po/es.po | 2 | ||||
-rw-r--r-- | po/eu_ES.po | 2 | ||||
-rw-r--r-- | po/fi.po | 2 | ||||
-rw-r--r-- | po/fr.po | 2 | ||||
-rw-r--r-- | po/gl.po | 2 | ||||
-rw-r--r-- | po/hu.po | 2 | ||||
-rw-r--r-- | po/id.po | 2 | ||||
-rw-r--r-- | po/is.po | 2 | ||||
-rw-r--r-- | po/it.po | 2 | ||||
-rw-r--r-- | po/ja.po | 2 | ||||
-rw-r--r-- | po/ko.po | 2 | ||||
-rw-r--r-- | po/no.po | 2 | ||||
-rw-r--r-- | po/pl.po | 2 | ||||
-rw-r--r-- | po/popt.pot | 2 | ||||
-rw-r--r-- | po/pt.po | 2 | ||||
-rw-r--r-- | po/pt_BR.po | 2 | ||||
-rw-r--r-- | po/ro.po | 2 | ||||
-rw-r--r-- | po/ru.po | 2 | ||||
-rw-r--r-- | po/sk.po | 2 | ||||
-rw-r--r-- | po/sl.po | 2 | ||||
-rw-r--r-- | po/sr.po | 2 | ||||
-rw-r--r-- | po/sv.po | 2 | ||||
-rw-r--r-- | po/tr.po | 2 | ||||
-rw-r--r-- | po/uk.po | 2 | ||||
-rw-r--r-- | po/wa.po | 2 | ||||
-rw-r--r-- | po/zh.po | 2 | ||||
-rw-r--r-- | po/zh_CN.GB2312.po | 2 | ||||
-rw-r--r-- | popthelp.c | 49 |
31 files changed, 73 insertions, 36 deletions
@@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: 2001-07-24 00:03+0100\n" "Last-Translator: Milan Kerslager <kerslage@linux.cz>\n" "Language-Team: Czech <cs@li.org>\n" @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: Sun Jan 21 2001 04:30:32+0200\n" "Last-Translator: Martin Hansen <mah@k64.dk>\n" "Language-Team: Dansk <dansk@klid.dk>\n" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Leandro Lucarella <luca@linuxmendoza.org.ar>\n" "Language-Team: LANGUAGE <LL@li.org>\n" diff --git a/po/eu_ES.po b/po/eu_ES.po index 736af41..b9a3f06 100644 --- a/po/eu_ES.po +++ b/po/eu_ES.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: 2001-01-17 01:01+0100\n" "Last-Translator: Jesús Bravo Álvarez <jba@pobox.com>\n" "Language-Team: Galician <trasno@ceu.fi.udc.es>\n" @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: 2000-08-03 23:26+0200\n" "Last-Translator: László Németh <nemeth@qwertynet.hu>\n" "Language-Team: Hungarian\n" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: 2001-06-08 01:35+0000\n" "Last-Translator: Richard Allen <ra@hp.is>\n" "Language-Team: is <kde-isl@mmedia.is>\n" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: 2001-09-06 20:06+0900\n" "Last-Translator: Jong-Hoon Ryu <redhat4u@netian.com>\n" "Language-Team: GNU Translation project <ko@li.org>\n" @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: 2001-06-27 11:05+0200\n" "Last-Translator: Kjartan Maraas <kmaraas@online.no>\n" "Language-Team: Norwegian <no@li.org>\n" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" diff --git a/po/popt.pot b/po/popt.pot index 1e7c603..2d3892e 100644 --- a/po/popt.pot +++ b/po/popt.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: popt\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: 2002-02-13 18:32+0000\n" "Last-Translator: Pedro Morais <morais@kde.org>\n" "Language-Team: pt <morais@kde.org>\n" diff --git a/po/pt_BR.po b/po/pt_BR.po index 736af41..b9a3f06 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: 2000-06-14 23:23+EST\n" "Last-Translator: Cristian Gafton <gafton@redhat.com>\n" "Language-Team: Romanian <ro@li.org>\n" @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: 2001-07-05 21:00-0500\n" "Last-Translator: Eugene Kanter <eugene@blackcatlinux.com>\n" "Language-Team: Black Cat Linux Team <blackcat-support@blackcatlinux.com>\n" @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: 1999-08-04 21:40+0200\n" "Last-Translator: Stanislav Meduna <stano@eunet.sk>\n" "Language-Team: Slovak <sk-i18n@rak.isternet.sk>\n" @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: 2000-09-05 12:30+0200\n" "Last-Translator: Roman Maurer <roman.maurer@hermes.si>\n" "Language-Team: Slovenian <sl@li.org>\n" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: 2001-07-12 22:26+0100\n" "Last-Translator: Christian Rose <menthos@menthos.com>\n" "Language-Team: Swedish <sv@li.org>\n" @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: 2000-02-11 13:01+0200\n" "Last-Translator: Nilgun Belma Buguner <nilgun@technologist.com>\n" "Language-Team: Turkish <tr@li.org>\n" @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: 1999-09-30 16:54+0200\n" "Last-Translator: Yuri Syrota <rasta@renome.rovno.ua>\n" "Language-Team: Ukrainian <uk@li.org>\n" @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: 1999-03-18 23:11+0100\n" "Last-Translator: Nobody yet\n" "Language-Team: walon <linux-wa@chanae.alphanet.ch>\n" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" diff --git a/po/zh_CN.GB2312.po b/po/zh_CN.GB2312.po index 6522f81..107e433 100644 --- a/po/zh_CN.GB2312.po +++ b/po/zh_CN.GB2312.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: popt 1.6.3\n" -"POT-Creation-Date: 2002-07-25 14:27-0400\n" +"POT-Creation-Date: 2002-07-27 20:40-0400\n" "PO-Revision-Date: 1999-11-11 05:04+0800\n" "Last-Translator: Dillion Chen <dillon.chen@turbolinux.com.cn>\n" "Language-Team: TLDN\n" @@ -101,7 +101,11 @@ getArgDescrip(const struct poptOption * opt, switch (opt->argInfo & POPT_ARG_MASK) { case POPT_ARG_NONE: return POPT_("NONE"); +#ifdef DYING case POPT_ARG_VAL: return POPT_("VAL"); +#else + case POPT_ARG_VAL: return NULL; +#endif case POPT_ARG_INT: return POPT_("INT"); case POPT_ARG_LONG: return POPT_("LONG"); case POPT_ARG_STRING: return POPT_("STRING"); @@ -600,16 +604,29 @@ static int itemUsage(FILE * fp, int cursor, poptItem item, int nitems, } /** + * Keep track of option tables already processed. + */ +typedef struct poptDone_s { + int nopts; + int maxopts; +/*@observer@*/ + const void ** opts; +} * poptDone; + +/** * Display usage text for a table of options. * @param con context * @param fp output file handle * @param cursor * @param opt option(s) * @param translation_domain translation domain + * @param done tables already processed + * @return */ static int singleTableUsage(poptContext con, FILE * fp, int cursor, const struct poptOption * opt, - /*@null@*/ const char * translation_domain) + /*@null@*/ const char * translation_domain, + poptDone done) /*@globals fileSystem @*/ /*@modifies *fp, fileSystem @*/ { @@ -619,9 +636,21 @@ static int singleTableUsage(poptContext con, FILE * fp, if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INTL_DOMAIN) { translation_domain = (const char *)opt->arg; } else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) { - if (opt->arg) /* XXX program error */ + int i = 0; + if (done) + for (i = 0; i < done->nopts; i++) { + const void * that = done->opts[i]; + if (that == NULL || that != opt->arg) + continue; + break; + } + /* Skip if this table has already been processed. */ + if (opt->arg == NULL || i < done->nopts) + continue; + if (done->nopts < done->maxopts) + done->opts[done->nopts++] = (const void *) opt->arg; cursor = singleTableUsage(con, fp, cursor, opt->arg, - translation_domain); + translation_domain, done); } else if ((opt->longName || opt->shortName) && !(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN)) { cursor = singleOptionUsage(fp, cursor, opt, translation_domain); @@ -634,6 +663,7 @@ static int singleTableUsage(poptContext con, FILE * fp, /** * Return concatenated short options for display. + * @todo Sub-tables should be recursed. * @param opt option(s) * @param fp output file handle * @retval str concatenation of short options @@ -674,13 +704,20 @@ static int showShortOptions(const struct poptOption * opt, FILE * fp, void poptPrintUsage(poptContext con, FILE * fp, /*@unused@*/ int flags) { + poptDone done = memset(alloca(sizeof(*done)), 0, sizeof(*done)); int cursor; + done->nopts = 0; + done->maxopts = 64; + cursor = done->maxopts * sizeof(*done->opts); + done->opts = memset(alloca(cursor), 0, cursor); + done->opts[done->nopts++] = (const void *) con->options; + cursor = showHelpIntro(con, fp); cursor += showShortOptions(con->options, fp, NULL); - (void) singleTableUsage(con, fp, cursor, con->options, NULL); - (void) itemUsage(fp, cursor, con->aliases, con->numAliases, NULL); - (void) itemUsage(fp, cursor, con->execs, con->numExecs, NULL); + cursor = singleTableUsage(con, fp, cursor, con->options, NULL, done); + cursor = itemUsage(fp, cursor, con->aliases, con->numAliases, NULL); + cursor = itemUsage(fp, cursor, con->execs, con->numExecs, NULL); if (con->otherHelp) { cursor += strlen(con->otherHelp) + 1; |