Re: [Plplot-devel] plparseopts return value

2010-04-18 Thread Hezekiah M. Carty
On Tue, Mar 9, 2010 at 3:24 PM, David MacMahon
dav...@astro.berkeley.edu wrote:
 I think plparseopts returns -1 (i.e. an error) if PL_MODE_SKIP is
 given and the last argument is unknown (i.e. skipped).  If the same
 command line arguments are reordered such that the last argument is
 known (i.e. not skipped), plparseopts will return 0 (i.e. no error).
 I think this can be fixed by moving the status = 0; line from the
 end of the if ( status == -1 ) block to the beginning of that block
 (i.e. before the if ( mode_skip ) block).  Not a high priority, IMHO.


Dave,

Thanks for pointing this out.  I have committed your suggested fix as
revision 10925.

Hez

--
Download Intel#174; 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


Re: [Plplot-devel] plparseopts return value

2008-12-08 Thread Andrew Ross

Hez,

See the comments in src/plargs.c

The default action taken by plparseopts() is as follows:
- Returns with an error if an unrecognized option or badly formed 
  option-value pair are encountered.
- Returns immediately (return code 0) when the first non-option 
  command line argument is found.
- Returns with the return code of the option handler, if one was called.
- Deletes command line arguments from argv list as they are found, and
  decrements argc accordingly.  
- Does not show invisible options in usage or help messages.  
- Assumes the program name is contained in argv[0].

I think some of this should be moved into the documentation. I'll look
into this.

Andrew


On Mon, Dec 08, 2008 at 01:29:27PM -0500, Hezekiah M. Carty wrote:
 PLplot developers,
 
 What is the expected method for handling the return value from
 plparseopts?  I am interested in general, but at this point more
 specifically for the OCaml bindings.  The function currently returns
 the integer value returned by the C plparseopts function call.
 However, the meaning(s) of this value do not seem to be documented.
 Would it be appropriate to raise an exception when plparseopts returns
 a non-zero value?
 
 After looking through the interfaces for the other language bindings,
 some seem to ignore the return value, and others return it as-is (if I
 understand them correctly).  If this is something which should change
 then I would like to do so before the upcoming 5.9.1 release.
 
 Hez
 
 -- 
 Hezekiah M. Carty
 Graduate Research Assistant
 University of Maryland
 Department of Atmospheric and Oceanic Science
 
 --
 SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
 The future of the web can't happen without you.  Join us at MIX09 to help
 pave the way to the Next Web now. Learn more and register at
 http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
 ___
 Plplot-devel mailing list
 Plplot-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/plplot-devel
 

--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel