From 5ec631163c7e36d10278b4bc69aaf1822287715e Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sat, 6 Jul 1996 21:12:33 +0000 Subject: (argp_version_parser): Output ARGP_PROGRAM_VERSION to STATE->out_stream, not stdout. Supply that stream and STATE to ARGP_PROGRAM_VERSION_HOOK. --- libshouldbeinlibc/argp-parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libshouldbeinlibc/argp-parse.c') 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)) -- cgit v1.2.3