Changes opt_h and opt_v handlers to prevent -h and -v options from
calling exit() if PL_OPTION_QUIET is set.
---
 src/plargs.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/plargs.c b/src/plargs.c
index cbacadf..4b0e405 100644
--- a/src/plargs.c
+++ b/src/plargs.c
@@ -1474,9 +1474,12 @@ static int
 opt_h( const char *opt, const char *optarg, void *client_data )
 {
     if ( !mode_quiet )
+    {
         Help();
+        return 2;
+    }
 
-    return 2;
+    return 0;
 }
 
 /*--------------------------------------------------------------------------*\
@@ -1490,9 +1493,12 @@ static int
 opt_v( const char *opt, const char *optarg, void *client_data )
 {
     if ( !mode_quiet )
+    {
         fprintf( stderr, "PLplot library version: %s\n", VERSION );
+        return 2;
+    }
 
-    return 2;
+    return 0;
 }
 
 /*--------------------------------------------------------------------------*\
-- 
1.7.0


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to