void help_print_desc(const struct option *opt, const char *s, int i, int w)
{
- for (s = pgettext_expr(opt->name, s); *s; w = 0) {
+ if (opt)
+ s = pgettext_expr(opt->name, s);
+
+ for (; *s; w = 0) {
const char *nl = strchr(s, '\n');
int n = (nl ? nl-s : -1);
int help_print_optstring(const struct option *opt, const char *argname, int l);
/*
- * Print an option description with each line indented. The string is first
- * localized (if NLS is enabled). The first line will be indented by i-w
- * spaces (to account for the cursor being in some other column), all other
- * lines are indented by i spaces.
+ * Print an option description with each line indented. If opt is not NULL,
+ * then the string is first localized (if NLS is enabled) via pgettext_expr
+ * with the context set to opt->name. The first line will be indented by
+ * i-w spaces (to account for the cursor being in some other column), all
+ * other lines are indented by i spaces.
*/
void help_print_desc(const struct option *opt, const char *desc, int i, int w);