Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 572052 Details for
Bug 734434
Messages isn't translatable
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Fix --help i18n
help.patch (text/plain), 3.58 KB, created by
Miloslav Trmač
on 2012-03-22 17:58:22 UTC
(
hide
)
Description:
Fix --help i18n
Filename:
MIME Type:
Creator:
Miloslav Trmač
Created:
2012-03-22 17:58:22 UTC
Size:
3.58 KB
patch
obsolete
>diff -up ./popthelp.c.help ./popthelp.c >--- ./popthelp.c.help 2012-03-22 18:42:18.087729244 +0100 >+++ ./popthelp.c 2012-03-22 18:45:40.955237774 +0100 >@@ -466,8 +466,11 @@ static size_t maxArgWidth(const struct p > if (opt != NULL) > while (opt->longName || opt->shortName || opt->arg) { > if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) { >- if (opt->arg) /* XXX program error */ >- len = maxArgWidth(opt->arg, translation_domain); >+ void * arg = opt->arg; >+ /* XXX sick hack to preserve pretense of ABI. */ >+ if (arg == poptHelpOptions) arg = poptHelpOptionsI18N; >+ if (arg) /* XXX program error */ >+ len = maxArgWidth(arg, translation_domain); > if (len > max) max = len; > } else if (!(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN)) { > len = sizeof(" ")-1; >@@ -569,16 +572,19 @@ static void singleTableHelp(poptContext > > if (table != NULL) > for (opt = table; (opt->longName || opt->shortName || opt->arg); opt++) { >+ void * arg = opt->arg; > if ((opt->argInfo & POPT_ARG_MASK) != POPT_ARG_INCLUDE_TABLE) > continue; >- sub_transdom = getTableTranslationDomain(opt->arg); >+ /* XXX sick hack to preserve pretense of ABI. */ >+ if (arg == poptHelpOptions) arg = poptHelpOptionsI18N; >+ sub_transdom = getTableTranslationDomain(arg); > if (sub_transdom == NULL) > sub_transdom = translation_domain; > > if (opt->descrip) > fprintf(fp, "\n%s\n", D_(sub_transdom, opt->descrip)); > >- singleTableHelp(con, fp, opt->arg, columns, sub_transdom); >+ singleTableHelp(con, fp, arg, columns, sub_transdom); > } > } > >@@ -765,22 +771,25 @@ static size_t singleTableUsage(poptConte > 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) { >+ void * arg = opt->arg; >+ /* XXX sick hack to preserve pretense of ABI. */ >+ if (arg == poptHelpOptions) arg = poptHelpOptionsI18N; > if (done) { > int i = done->nopts; > if (done->opts != NULL) > for (i = 0; i < done->nopts; i++) { > const void * that = done->opts[i]; >- if (that == NULL || that != opt->arg) >+ if (that == NULL || that != arg) > /*@innercontinue@*/ continue; > /*@innerbreak@*/ break; > } > /* Skip if this table has already been processed. */ >- if (opt->arg == NULL || i < done->nopts) >+ if (arg == NULL || i < done->nopts) > continue; > if (done->opts != NULL && done->nopts < done->maxopts) >- done->opts[done->nopts++] = (const void *) opt->arg; >+ done->opts[done->nopts++] = (const void *) arg; > } >- columns->cur = singleTableUsage(con, fp, columns, opt->arg, >+ columns->cur = singleTableUsage(con, fp, columns, arg, > translation_domain, done); > } else if ((opt->longName || opt->shortName) && > !(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN)) { >@@ -817,9 +826,13 @@ static size_t showShortOptions(const str > for (; (opt->longName || opt->shortName || opt->arg); opt++) { > if (opt->shortName && !(opt->argInfo & POPT_ARG_MASK)) > s[strlen(s)] = opt->shortName; >- else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) >- if (opt->arg) /* XXX program error */ >- len = showShortOptions(opt->arg, fp, s); >+ else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) { >+ void * arg = opt->arg; >+ /* XXX sick hack to preserve pretense of ABI. */ >+ if (arg == poptHelpOptions) arg = poptHelpOptionsI18N; >+ if (arg) /* XXX program error */ >+ len = showShortOptions(arg, fp, s); >+ } > } > > /* On return to top level, print the short options, return print length. */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 734434
: 572052 |
828357
|
846913