[gnumeric] Docs: update with new functions; back to using www.



commit 2634b541556a85b6abc40750c67773d424aa623e
Author: Morten Welinder <terra gnome org>
Date:   Mon Jan 27 15:26:16 2014 -0500

    Docs: update with new functions; back to using www.

 ChangeLog           |    4 ++
 doc/C/func.defs     |   42 +++++++++++++++-
 doc/C/functions.xml |  136 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 src/func.c          |  115 ++++++++++++++++++++++++++++++++-----------
 4 files changed, 264 insertions(+), 33 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 0a51c20..6364f3c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-01-27  Morten Welinder  <terra gnome org>
+
+       * src/func.c (function_dump_defs): Undo wiki change.
+
 2014-01-21  Morten Welinder  <terra gnome org>
 
        * src/item-cursor.c (cb_item_cursor_animation): Drastically lower
diff --git a/doc/C/func.defs b/doc/C/func.defs
index d864533..d3e82da 100644
--- a/doc/C/func.defs
+++ b/doc/C/func.defs
@@ -264,6 +264,33 @@
 @SEEALSO=IMLN
 
 @CATEGORY=Complex
+ FUNCTION=IMFACT
+ SHORTDESC=the factorial of the complex number @{z}
+ SYNTAX=IMFACT(z)
+ ARGUMENTDESCRIPTION=@{z}: a complex number
+ NOTE=If @{z} is not a valid complex number, #VALUE! is returned.
+ SEEALSO=IMGAMMA
+
+ CATEGORY=Complex
+ FUNCTION=IMGAMMA
+ SHORTDESC=the gamma function of the complex number @{z}
+ SYNTAX=IMGAMMA(z)
+ ARGUMENTDESCRIPTION=@{z}: a complex number
+ NOTE=If @{z} is not a valid complex number, #VALUE! is returned.
+ SEEALSO=IMGAMMA
+
+ CATEGORY=Complex
+ FUNCTION=IMIGAMMA
+ SHORTDESC=the incomplete Gamma function
+ SYNTAX=IMIGAMMA(a,z,lower,regularize)
+ ARGUMENTDESCRIPTION=@{a}: a complex number
+ {z}: a complex number
+ {lower}: if true (the default), the lower incomplete gamma function, otherwise the upper incomplete gamma 
function
+ {regularize}: if true (the default), the regularized version of the incomplete gamma function
+ NOTE=The regularized incomplete gamma function is the unregularized incomplete gamma function divided by 
gamma(@{a})
+ SEEALSO=GAMMA,IMIGAMMA
+
+ CATEGORY=Complex
 @FUNCTION=IMINV
 @SHORTDESC=the reciprocal, or inverse, of the complex number @{z}
 @SYNTAX=IMINV(z)
@@ -3407,6 +3434,18 @@ The depreciation coefficient used is:
 @SEEALSO=MIN,MAX
 
 @CATEGORY=Mathematics
+ FUNCTION=IGAMMA
+ SHORTDESC=the incomplete Gamma function
+ SYNTAX=IGAMMA(a,x,lower,regularize,real)
+ ARGUMENTDESCRIPTION=@{a}: number
+ {x}: number
+ {lower}: if true (the default), the lower incomplete gamma function, otherwise the upper incomplete gamma 
function
+ {regularize}: if true (the default), the regularized version of the incomplete gamma function
+ {real}: if true (the default), the real part of the result, otherwise the imaginary part
+ NOTE=The regularized incomplete gamma function is the unregularized incomplete gamma function divided by 
gamma(@{a}) This is a real valued function as long as neither @{a} nor @{z} are negative.
+ SEEALSO=GAMMA,IMIGAMMA
+
+ CATEGORY=Mathematics
 @FUNCTION=INT
 @SHORTDESC=largest integer not larger than @{x}
 @SYNTAX=INT(x)
@@ -3581,10 +3620,9 @@ The depreciation coefficient used is:
 @CATEGORY=Mathematics
 @FUNCTION=POCHHAMMER
 @SHORTDESC=the value of GAMMA(@{x}+ {n})/GAMMA(@{x})
- SYNTAX=POCHHAMMER(x,n,give_log)
+ SYNTAX=POCHHAMMER(x,n)
 @ARGUMENTDESCRIPTION= {x}: number
 @{n}: number
- {give_log}: if true, log of the result will be returned instead
 @SEEALSO=GAMMA
 
 @CATEGORY=Mathematics
diff --git a/doc/C/functions.xml b/doc/C/functions.xml
index c71b1fa..6c4a8d6 100644
--- a/doc/C/functions.xml
+++ b/doc/C/functions.xml
@@ -1039,6 +1039,103 @@
       </para>
       </refsect1>
     </refentry>
+    <refentry id="gnumeric-function-IMFACT">
+      <refmeta>
+        <refentrytitle>
+          <function>IMFACT</function>
+        </refentrytitle>
+      </refmeta>
+      <refnamediv>
+        <refname>
+          <function>IMFACT</function>
+        </refname>
+        <refpurpose>
+        the factorial of the complex number <parameter>z</parameter>
+      </refpurpose>
+      </refnamediv>
+      <refsynopsisdiv>
+        <synopsis><function>IMFACT</function>(<parameter>z</parameter>)</synopsis>
+      </refsynopsisdiv>
+      <refsect1>
+        <title>Arguments</title>
+        <para><parameter>z</parameter>: a complex number</para>
+      </refsect1>
+      <refsect1>
+        <title>Note</title>
+        <para>If <parameter>z</parameter> is not a valid complex number, #VALUE! is returned.</para>
+      </refsect1>
+      <refsect1>
+        <title>See also</title>
+        <para><link linkend="gnumeric-function-IMGAMMA"><function>IMGAMMA</function></link>.
+      </para>
+      </refsect1>
+    </refentry>
+    <refentry id="gnumeric-function-IMGAMMA">
+      <refmeta>
+        <refentrytitle>
+          <function>IMGAMMA</function>
+        </refentrytitle>
+      </refmeta>
+      <refnamediv>
+        <refname>
+          <function>IMGAMMA</function>
+        </refname>
+        <refpurpose>
+        the gamma function of the complex number <parameter>z</parameter>
+      </refpurpose>
+      </refnamediv>
+      <refsynopsisdiv>
+        <synopsis><function>IMGAMMA</function>(<parameter>z</parameter>)</synopsis>
+      </refsynopsisdiv>
+      <refsect1>
+        <title>Arguments</title>
+        <para><parameter>z</parameter>: a complex number</para>
+      </refsect1>
+      <refsect1>
+        <title>Note</title>
+        <para>If <parameter>z</parameter> is not a valid complex number, #VALUE! is returned.</para>
+      </refsect1>
+      <refsect1>
+        <title>See also</title>
+        <para><link linkend="gnumeric-function-IMGAMMA"><function>IMGAMMA</function></link>.
+      </para>
+      </refsect1>
+    </refentry>
+    <refentry id="gnumeric-function-IMIGAMMA">
+      <refmeta>
+        <refentrytitle>
+          <function>IMIGAMMA</function>
+        </refentrytitle>
+      </refmeta>
+      <refnamediv>
+        <refname>
+          <function>IMIGAMMA</function>
+        </refname>
+        <refpurpose>
+        the incomplete Gamma function
+      </refpurpose>
+      </refnamediv>
+      <refsynopsisdiv>
+        
<synopsis><function>IMIGAMMA</function>(<parameter>a</parameter>,<parameter>z</parameter>,<parameter>lower</parameter>,<parameter>regularize</parameter>)</synopsis>
+      </refsynopsisdiv>
+      <refsect1>
+        <title>Arguments</title>
+        <para><parameter>a</parameter>: a complex number</para>
+        <para><parameter>z</parameter>: a complex number</para>
+        <para><parameter>lower</parameter>: if true (the default), the lower incomplete gamma function, 
otherwise the upper incomplete gamma function</para>
+        <para><parameter>regularize</parameter>: if true (the default), the regularized version of the 
incomplete gamma function</para>
+      </refsect1>
+      <refsect1>
+        <title>Note</title>
+        <para>The regularized incomplete gamma function is the unregularized incomplete gamma function 
divided by gamma(<parameter>a</parameter>)</para>
+      </refsect1>
+      <refsect1>
+        <title>See also</title>
+        <para><link linkend="gnumeric-function-GAMMA"><function>GAMMA</function></link>,
+        <link linkend="gnumeric-function-IMIGAMMA"><function>IMIGAMMA</function></link>.
+      </para>
+      </refsect1>
+    </refentry>
     <refentry id="gnumeric-function-IMINV">
       <refmeta>
         <refentrytitle>
@@ -11473,6 +11570,42 @@
       </para>
       </refsect1>
     </refentry>
+    <refentry id="gnumeric-function-IGAMMA">
+      <refmeta>
+        <refentrytitle>
+          <function>IGAMMA</function>
+        </refentrytitle>
+      </refmeta>
+      <refnamediv>
+        <refname>
+          <function>IGAMMA</function>
+        </refname>
+        <refpurpose>
+        the incomplete Gamma function
+      </refpurpose>
+      </refnamediv>
+      <refsynopsisdiv>
+        
<synopsis><function>IGAMMA</function>(<parameter>a</parameter>,<parameter>x</parameter>,<parameter>lower</parameter>,<parameter>regularize</parameter>,<parameter>real</parameter>)</synopsis>
+      </refsynopsisdiv>
+      <refsect1>
+        <title>Arguments</title>
+        <para><parameter>a</parameter>: number</para>
+        <para><parameter>x</parameter>: number</para>
+        <para><parameter>lower</parameter>: if true (the default), the lower incomplete gamma function, 
otherwise the upper incomplete gamma function</para>
+        <para><parameter>regularize</parameter>: if true (the default), the regularized version of the 
incomplete gamma function</para>
+        <para><parameter>real</parameter>: if true (the default), the real part of the result, otherwise the 
imaginary part</para>
+      </refsect1>
+      <refsect1>
+        <title>Note</title>
+        <para>The regularized incomplete gamma function is the unregularized incomplete gamma function 
divided by gamma(<parameter>a</parameter>) This is a real valued function as long as neither 
<parameter>a</parameter> nor <parameter>z</parameter> are negative.</para>
+      </refsect1>
+      <refsect1>
+        <title>See also</title>
+        <para><link linkend="gnumeric-function-GAMMA"><function>GAMMA</function></link>,
+        <link linkend="gnumeric-function-IMIGAMMA"><function>IMIGAMMA</function></link>.
+      </para>
+      </refsect1>
+    </refentry>
     <refentry id="gnumeric-function-INT">
       <refmeta>
         <refentrytitle>
@@ -12159,13 +12292,12 @@
       </refpurpose>
       </refnamediv>
       <refsynopsisdiv>
-        
<synopsis><function>POCHHAMMER</function>(<parameter>x</parameter>,<parameter>n</parameter>,<parameter>give_log</parameter>)</synopsis>
+        
<synopsis><function>POCHHAMMER</function>(<parameter>x</parameter>,<parameter>n</parameter>)</synopsis>
       </refsynopsisdiv>
       <refsect1>
         <title>Arguments</title>
         <para><parameter>x</parameter>: number</para>
         <para><parameter>n</parameter>: number</para>
-        <para><parameter>give_log</parameter>: if true, log of the result will be returned instead</para>
       </refsect1>
       <refsect1>
         <title>See also</title>
diff --git a/src/func.c b/src/func.c
index 5779aa9..f4f4c4c 100644
--- a/src/func.c
+++ b/src/func.c
@@ -219,7 +219,7 @@ dump_externals (GPtrArray *defs, FILE *out)
  * A generic utility routine to operate on all funtion defs
  * in various ways.  @dump_type will change/extend as needed
  * Right now
- * 0 : wiki's function page
+ * 0 : www.gnumeric.org's function.shtml page
  * 1 :
  * 2 : generate_po
  * 3 : dump function usage count
@@ -229,6 +229,7 @@ void
 function_dump_defs (char const *filename, int dump_type)
 {
        FILE *output_file;
+       char *up, *catname;
        unsigned i;
        GPtrArray *ordered;
        GnmFuncGroup const *group = NULL;
@@ -282,9 +283,47 @@ function_dump_defs (char const *filename, int dump_type)
                }
 
                fprintf (output_file,
-                        "= Gnumeric Sheet Functions =\n\n"
-                        "Gnumeric currently has %d functions for use in spreadsheets.\n"
-                        "%d of these are unique to Gnumeric.\n\n",
+                        "<!--#set var=\"title\" value=\"Functions\" -->"
+                        "<!--#set var=\"rootdir\" value=\".\" -->"
+                        "<!--#include virtual=\"header-begin.shtml\" -->\n"
+                        "<style type=\"text/css\"><!--\n"
+                        "  div.functiongroup {\n"
+                        "    margin-top: 1em;\n"
+                        "    margin-bottom: 1em;\n"
+                        "  }\n"
+                        "  table.functiongroup {\n"
+                        "    border-style: solid;\n"
+                        "    border-width: 1px;\n"
+                        "    border-spacing: 0px;\n"
+                        "  }\n"
+                        "  tr.header td {\n"
+                        "    font-weight: bold;\n"
+                        "    font-size: 14pt;\n"
+                        "    border-style: solid;\n"
+                        "    border-width: 1px;\n"
+                        "    text-align: center;\n"
+                        "  }\n"
+                        "  tr.function td {\n"
+                        "    border: solid 1px;\n"
+                        "  }\n"
+                        "  td.testing-unknown    { background: #ffffff; }\n"
+                        "  td.testing-nosuite    { background: #ff7662; }\n"
+                        "  td.testing-basic      { background: #fff79d; }\n"
+                        "  td.testing-exhaustive { background: #aef8b5; }\n"
+                        "  td.testing-devel      { background: #ff6c00; }\n"
+                        "  td.imp-exists         { background: #ffffff; }\n"
+                        "  td.imp-no             { background: #ff7662; }\n"
+                        "  td.imp-subset         { background: #fff79d; }\n"
+                        "  td.imp-complete       { background: #aef8b5; }\n"
+                        "  td.imp-superset       { background: #16e49e; }\n"
+                        "  td.imp-subsetext      { background: #59fff2; }\n"
+                        "  td.imp-devel          { background: #ff6c00; }\n"
+                        "  td.imp-gnumeric       { background: #44be18; }\n"
+                        "--></style>\n"
+                        "<!--#include virtual=\"header-end.shtml\" -->"
+                        "<h1>Gnumeric Sheet Functions</h1>\n"
+                        "<p>Gnumeric currently has %d functions for use in spreadsheets.\n"
+                        "%d of these are unique to Gnumeric.</p>\n",
                         ordered->len, unique);
        }
 
@@ -409,48 +448,66 @@ function_dump_defs (char const *filename, int dump_type)
                } else if (dump_type == 0) {
                        static struct {
                                char const *name;
-                               char const *style;
+                               char const *klass;
                        } const testing [] = {
-                               { "Unknown",            "<style=\"background-color: #ffffff;\">" },
-                               { "No Testsuite",       "<style=\"background-color: #ff7662;\">" },
-                               { "Basic",              "<style=\"background-color: #fff79d;\">" },
-                               { "Exhaustive",         "<style=\"background-color: #aef8b5;\">" },
-                               { "Under Development",  "<style=\"background-color: #ff6c00;\">" }
+                               { "Unknown",            "testing-unknown" },
+                               { "No Testsuite",       "testing-nosuite" },
+                               { "Basic",              "testing-basic" },
+                               { "Exhaustive",         "testing-exhaustive" },
+                               { "Under Development",  "testing-devel" }
                        };
                        static struct {
                                char const *name;
-                               char const *style;
+                               char const *klass;
                        } const implementation [] = {
-                               { "Exists",                     "<style=\"background-color: #ff6c00;\">" },
-                               { "Unimplemented",              "<style=\"background-color: #ff7662;\">" },
-                               { "Subset",                     "<style=\"background-color: #fff79d;\">" },
-                               { "Complete",                   "<style=\"background-color: #aef8b5;\">" },
-                               { "Superset",                   "<style=\"background-color: #16e49e;\">" },
-                               { "Subset with_extensions",     "<style=\"background-color: #59fff2;\">" },
-                               { "Under development",          "<style=\"background-color: #ff6c00;\">" },
-                               { "Unique to Gnumeric",         "<style=\"background-color: #44be18;\">" },
+                               { "Exists",                     "imp-exists" },
+                               { "Unimplemented",              "imp-no" },
+                               { "Subset",                     "imp-subset" },
+                               { "Complete",                   "imp-complete" },
+                               { "Superset",                   "imp-superset" },
+                               { "Subset with_extensions",     "imp-subsetext" },
+                               { "Under development",          "imp-devel" },
+                               { "Unique to Gnumeric",         "imp-gnumeric" },
                        };
                        if (group != fd->fn_group) {
-                               if (group)
-                                       fprintf (output_file, "\n");
+                               if (group) fprintf (output_file, "</table></div>\n");
                                group = fd->fn_group;
                                fprintf (output_file,
-                                        "= %s =\n"
-                                        "|| '''Function''' || '''Implementation''' || '''Testing''' ||\n",
+                                        "<h2>%s</h2>\n"
+                                        "<div class=\"functiongroup\"><table class=\"functiongroup\">\n"
+                                        "<tr class=\"header\">"
+                                        "<td>Function</td>"
+                                        "<td>Implementation</td>"
+                                        "<td>Testing</td>"
+                                        "</tr>\n",
                                         group->display_name->str);
                        }
-                       /* FIXME: Add link to docs */
+                       up = g_ascii_strup (fd->name, -1);
+                       catname = g_strdup (group->display_name->str);
+                       while (strchr (catname, ' '))
+                               *strchr (catname, ' ') = '_';
+                       fprintf (output_file, "<tr class=\"function\">\n");
                        fprintf (output_file,
-                                "|| %s ||%s %s ||%s %s ||\n",
+                                "<td><a href 
=\"https://help.gnome.org/users/gnumeric/stable/CATEGORY_%s.html.en#gnumeric-function-%s\";>%s</a></td>\n",
+                                catname, up, fd->name);
+                       g_free (up);
+                       g_free (catname);
+                       fprintf (output_file,
+                                "<td class=\"%s\"><a href=\"mailto:gnumeric-list gnome org?subject=Re: %s 
implementation\">%s</a></td>\n",
+                                implementation[fd->impl_status].klass,
+                                fd->name,
+                                implementation[fd->impl_status].name);
+                       fprintf (output_file,
+                                "<td class=\"%s\"><a href=\"mailto:gnumeric-list gnome org?subject=Re: %s 
testing\">%s</a></td>\n",
+                                testing[fd->test_status].klass,
                                 fd->name,
-                                implementation[fd->impl_status].style,
-                                implementation[fd->impl_status].name,
-                                testing[fd->test_status].style,
                                 testing[fd->test_status].name);
+                       fprintf (output_file,"</tr>\n");
                }
        }
        if (dump_type == 0) {
-               if (group) fprintf (output_file, "\n");
+               if (group) fprintf (output_file, "</table></div>\n");
+               fprintf (output_file, "<!--#include virtual=\"footer.shtml\"-->\n");
        }
 
        g_ptr_array_free (ordered, TRUE);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]