projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4748c8b
)
(__argp_help): Create a fake struct argp_state and
author
Sergey Poznyakoff
<gray@gnu.org.ua>
Wed, 2 Feb 2005 23:26:56 +0000
(23:26 +0000)
committer
Sergey Poznyakoff
<gray@gnu.org.ua>
Wed, 2 Feb 2005 23:26:56 +0000
(23:26 +0000)
pass it to _help, otherwise the latter coredumps trying to
dereference state.root_argp.
lib/argp-help.c
patch
|
blob
|
history
diff --git
a/lib/argp-help.c
b/lib/argp-help.c
index 7c700be45ada10886f5fa34537055136633132a8..cbe884433edf7381f30048106d8345947e0f794e 100644
(file)
--- a/
lib/argp-help.c
+++ b/
lib/argp-help.c
@@
-1669,7
+1669,10
@@
Try `%s --help' or `%s --usage' for more information.\n"),
void __argp_help (const struct argp *argp, FILE *stream,
unsigned flags, char *name)
{
- _help (argp, 0, stream, flags, name);
+ struct argp_state state;
+ memset (&state, 0, sizeof state);
+ state.root_argp = argp;
+ _help (argp, &state, stream, flags, name);
}
#ifdef weak_alias
weak_alias (__argp_help, argp_help)