From: <and...@us...> - 2008-12-10 10:20:38
|
Revision: 9075 http://plplot.svn.sourceforge.net/plplot/?rev=9075&view=rev Author: andrewross Date: 2008-12-10 10:20:33 +0000 (Wed, 10 Dec 2008) Log Message: ----------- Update documentation to describe return values from plparseopt (and a few other command line argument related functions). Modified Paths: -------------- trunk/doc/docbook/src/api-c.xml trunk/doc/docbook/src/api.xml trunk/doc/docbook/src/plplotdoc.xml.in Modified: trunk/doc/docbook/src/api-c.xml =================================================================== --- trunk/doc/docbook/src/api-c.xml 2008-12-10 10:08:05 UTC (rev 9074) +++ trunk/doc/docbook/src/api-c.xml 2008-12-10 10:20:33 UTC (rev 9075) @@ -166,6 +166,42 @@ </sect1> + <sect1 id="plClearOpts" renderas="sect3"> + <title> + <function>plClearOpts</function>: Clear internal option table info + structure. + </title> + + <para> + <funcsynopsis> + <funcprototype> + <funcdef> + <function>plClearOpts</function> + </funcdef> + <paramdef></paramdef> + </funcprototype> + </funcsynopsis> + </para> + + <para> + Clear the internal options table info structure. This removes any + option added with &plMergeOpts; as well as all default entries. + </para> + + <para> + This function returns 0 on success. + </para> + + <para> + This function is currently available in C, C++ and Ocaml. + </para> + + <para> + This function is not used in any examples. + </para> + + </sect1> + <sect1 id="plexit" renderas="sect3"> <title> <function>plexit</function>: Error exit @@ -284,7 +320,7 @@ <para> <funcsynopsis> <funcprototype> - <funcdef> + <funcdef>int <function>plGetCursor</function> </funcdef> <paramdef><parameter>gin</parameter></paramdef> @@ -314,6 +350,11 @@ </variablelist> <para> + This function returns 1 on success and 0 if no translation to world + coordinates is possible. + </para> + + <para> This function is currently only available with the C, C++, Ocaml, Octave, Perl, Python and Ada language bindings. </para> @@ -379,7 +420,7 @@ <para> <funcsynopsis> <funcprototype> - <funcdef> + <funcdef>int <function>plMergeOpts</function> </funcdef> <paramdef><parameter>options</parameter></paramdef> Modified: trunk/doc/docbook/src/api.xml =================================================================== --- trunk/doc/docbook/src/api.xml 2008-12-10 10:08:05 UTC (rev 9074) +++ trunk/doc/docbook/src/api.xml 2008-12-10 10:20:33 UTC (rev 9075) @@ -7499,7 +7499,7 @@ <para> <funcsynopsis> <funcprototype> - <funcdef> + <funcdef>int <function>plparseopts</function> </funcdef> <paramdef><parameter>p_argc</parameter></paramdef> @@ -7592,7 +7592,50 @@ </varlistentry> </variablelist> + <para> + &plparseopts; removes all recognized flags + (decreasing argc accordingly), so that invalid input may be readily + detected. It can also be used to process user command line flags. The + user can merge an option table of type PLOptionTable into the internal + option table info structure using &plMergeOpts;. Or, the user can + specify that ONLY the external table(s) be parsed by calling + &plClearOpts; before &plMergeOpts;. + </para> + <para> + The default action taken by &plparseopts; is as follows: + <simplelist columns="1"> + <member> + Returns with an error if an unrecognized option or badly formed + option-value pair are encountered. + </member> + <member> + Returns immediately (return code 0) when the first non-option + command line argument is found. + </member> + <member> + Returns with the return code of the option handler, if one + was called. + </member> + <member> + Deletes command line arguments from argv list as they are found, + and decrements argc accordingly. + </member> + <member> + Does not show "invisible" options in usage or help messages. + </member> + <member> + Assumes the program name is contained in argv[0]. + </member> + </simplelist> + </para> + + <para> + These behaviors may be controlled through the + <parameter>mode</parameter> argument. + </para> + + <para> Redacted form: <itemizedlist> <listitem> @@ -10480,7 +10523,7 @@ <para> <funcsynopsis> <funcprototype> - <funcdef> + <funcdef>int <function>plsetopt</function> </funcdef> <paramdef><parameter>opt</parameter></paramdef> @@ -10493,7 +10536,7 @@ Set any command-line option internally from a program before it invokes &plinit;. <literal>opt</literal> is the name of the command-line option and <literal>optarg</literal> is the corresponding command-line - option argument. + option argument. </para> <variablelist> @@ -10523,6 +10566,10 @@ </variablelist> <para> + This function returns 0 on success. + </para> + + <para> Redacted form: <function>plsetopt(opt, optarg)</function> </para> Modified: trunk/doc/docbook/src/plplotdoc.xml.in =================================================================== --- trunk/doc/docbook/src/plplotdoc.xml.in 2008-12-10 10:08:05 UTC (rev 9074) +++ trunk/doc/docbook/src/plplotdoc.xml.in 2008-12-10 10:20:33 UTC (rev 9075) @@ -86,6 +86,7 @@ <!ENTITY plbox3 '<link linkend="plbox3"><function> plbox3</function></link>'> <!ENTITY plcalc_world '<link linkend="plcalc_world"><function> plcalc_world</function></link>'> <!ENTITY plclear '<link linkend="plclear"><function>plclear</function></link>'> +<!ENTITY plClearOpts '<link linkend="plClearOpts"><function>plClearOpts</function></link>'> <!ENTITY plcol0 '<link linkend="plcol0"><function>plcol0</function></link>'> <!ENTITY plcol1 '<link linkend="plcol1"><function>plcol1</function></link>'> <!ENTITY plcon0 '<link linkend="plcon0"><function>plcon0</function></link>'> @@ -239,7 +240,8 @@ <!ENTITY plw3d '<link linkend="plw3d"><function>plw3d</function></link>'> <!ENTITY plwid '<link linkend="plwid"><function>plwid</function></link>'> <!ENTITY plwind '<link linkend="plwind"><function>plwind</function></link>'> -<!ENTITY PLGraphicsIn '<link linkend="PLGraphicsIn"><function>PLGraphicsIn</function></link>'> +<!ENTITY PLGraphicsIn '<link linkend="PLGraphicsIn"><structname>PLGraphicsIn</structname></link>'> +<!ENTITY PLOptionTable '<link linkend="PLOptionTable"><structname>PLOptionTable</structname></link>'> <!ENTITY PLplot-website '@PLPLOT_WEBSITE@'> <!ENTITY % Math-Entities SYSTEM "math.ent"> %Math-Entities; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |