From 3e41a9f14cee176dfd21240bba591291b91dac1f Mon Sep 17 00:00:00 2001 From: Mark Janssen Date: Sun, 27 Jan 2008 16:42:54 +0000 Subject: [PATCH] --help output re-include version info print short error message and --help hint on bad input (and not the entire --help output) git-svn-id: https://proxytunnel.svn.sourceforge.net/svnroot/proxytunnel/trunk/proxytunnel@216 bc163920-b10d-0410-b2c5-a5491ca2ceef --- cmdline.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmdline.c b/cmdline.c index a2f3c0e..9761ed6 100644 --- a/cmdline.c +++ b/cmdline.c @@ -42,7 +42,7 @@ void cmdline_parser_print_version (void) { } void cmdline_parser_print_help (void) { -// cmdline_parser_print_version (); + cmdline_parser_print_version (); printf( "Usage: %s [OPTIONS]...\n" "Build generic tunnels trough HTTPS proxy's, supports HTTP authorization\n" @@ -408,8 +408,9 @@ int cmdline_parser( int argc, char * const *argv, struct gengetopt_args_info *ar if (! args_info->proxy_given && ! args_info->dest_given ) { clear_args (); - cmdline_parser_print_help (); - exit(0); +// cmdline_parser_print_help (); + message( "No proxy or destination given, exiting\nUse '--help' flag for usage info\n" ); + exit(1); } /* For Windows quiet is the default output. -- Dag */