summaryrefslogtreecommitdiff
path: root/libshouldbeinlibc
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-07-06 21:12:33 +0000
committerMiles Bader <miles@gnu.org>1996-07-06 21:12:33 +0000
commit5ec631163c7e36d10278b4bc69aaf1822287715e (patch)
tree870509caded3d85b19213cca43327404af80a14f /libshouldbeinlibc
parent5879f4c0c8d1c39454263b361ed1393ddad6bfa9 (diff)
(argp_version_parser):
Output ARGP_PROGRAM_VERSION to STATE->out_stream, not stdout. Supply that stream and STATE to ARGP_PROGRAM_VERSION_HOOK.
Diffstat (limited to 'libshouldbeinlibc')
-rw-r--r--libshouldbeinlibc/argp-parse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libshouldbeinlibc/argp-parse.c b/libshouldbeinlibc/argp-parse.c
index 230eb596..f8801681 100644
--- a/libshouldbeinlibc/argp-parse.c
+++ b/libshouldbeinlibc/argp-parse.c
@@ -127,9 +127,9 @@ argp_version_parser (int key, char *arg, struct argp_state *state)
{
case 'v':
if (argp_program_version_hook)
- (*argp_program_version_hook) ();
+ (*argp_program_version_hook) (state->out_stream, state);
else if (argp_program_version)
- puts (argp_program_version);
+ fprintf (state->out_stream, "%s\n", argp_program_version);
else
argp_error (state, "No version known!?");
if (! (state->flags & ARGP_NO_EXIT))