projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make it possible to #define gcd to an alias.
[gnulib.git]
/
lib
/
argp-help.c
diff --git
a/lib/argp-help.c
b/lib/argp-help.c
index
a83a356
..
e7baaf9
100644
(file)
--- a/
lib/argp-help.c
+++ b/
lib/argp-help.c
@@
-1476,6
+1476,7
@@
argp_doc (const struct argp *argp, const struct argp_state *state,
const char *text;
const char *inp_text;
size_t inp_text_len = 0;
const char *text;
const char *inp_text;
size_t inp_text_len = 0;
+ const char *trans_text;
void *input = 0;
int anything = 0;
const struct argp_child *child = argp->children;
void *input = 0;
int anything = 0;
const struct argp_child *child = argp->children;
@@
-1494,10
+1495,11
@@
argp_doc (const struct argp *argp, const struct argp_state *state,
}
}
else
}
}
else
- inp_text = dgettext (argp->argp_domain, post ? 0 : argp->doc);
+ inp_text = post ? 0 : argp->doc;
+ trans_text = inp_text ? dgettext (argp->argp_domain, inp_text) : NULL;
}
else
}
else
- inp_text = 0;
+
trans_text =
inp_text = 0;
if (argp->help_filter)
/* We have to filter the doc strings. */
if (argp->help_filter)
/* We have to filter the doc strings. */
@@
-1507,10
+1509,10
@@
argp_doc (const struct argp *argp, const struct argp_state *state,
(*argp->help_filter) (post
? ARGP_KEY_HELP_POST_DOC
: ARGP_KEY_HELP_PRE_DOC,
(*argp->help_filter) (post
? ARGP_KEY_HELP_POST_DOC
: ARGP_KEY_HELP_PRE_DOC,
-
inp
_text, input);
+
trans
_text, input);
}
else
}
else
- text = (const char *)
inp
_text;
+ text = (const char *)
trans
_text;
if (text)
{
if (text)
{
@@
-1525,7
+1527,7
@@
argp_doc (const struct argp *argp, const struct argp_state *state,
anything = 1;
}
anything = 1;
}
- if (text && text !=
inp
_text)
+ if (text && text !=
trans
_text)
free ((char *) text); /* Free TEXT returned from the help filter. */
if (inp_text && inp_text_len)
free ((char *) text); /* Free TEXT returned from the help filter. */
if (inp_text && inp_text_len)