Commit 0b931afb authored by Morten Welinder's avatar Morten Welinder

Wiki: change --dump-func-state to create a wiki page.

parent a5577602
......@@ -16,6 +16,7 @@ Morten:
* Fix ABR. [#720353]
* Fix fuzzed file crashes. [#720425] [#720426] [#720358] [#719349]
[#715002]
* Resurrect list of functions on the new Gnumeric wiki.
--------------------------------------------------------------------------
Gnumeric 1.12.9
......
......@@ -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 :
* 0 : wiki's function page
* 1 :
* 2 : generate_po
* 3 : dump function usage count
......@@ -229,7 +229,6 @@ void
function_dump_defs (char const *filename, int dump_type)
{
FILE *output_file;
char *up;
unsigned i;
GPtrArray *ordered;
GnmFuncGroup const *group = NULL;
......@@ -283,47 +282,9 @@ function_dump_defs (char const *filename, int dump_type)
}
fprintf (output_file,
"<!--#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",
"= Gnumeric Sheet Functions =\n\n"
"Gnumeric currently has %d functions for use in spreadsheets.\n"
"%d of these are unique to Gnumeric.\n\n",
ordered->len, unique);
}
......@@ -448,62 +409,48 @@ function_dump_defs (char const *filename, int dump_type)
} else if (dump_type == 0) {
static struct {
char const *name;
char const *klass;
char const *style;
} const testing [] = {
{ "Unknown", "testing-unknown" },
{ "No Testsuite", "testing-nosuite" },
{ "Basic", "testing-basic" },
{ "Exhaustive", "testing-exhaustive" },
{ "Under Development", "testing-devel" }
{ "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;\">" }
};
static struct {
char const *name;
char const *klass;
char const *style;
} const implementation [] = {
{ "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" },
{ "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;\">" },
};
if (group != fd->fn_group) {
if (group) fprintf (output_file, "</table></div>\n");
if (group)
fprintf (output_file, "\n");
group = fd->fn_group;
fprintf (output_file,
"<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",
"= %s =\n"
"|| '''Function''' || '''Implementation''' || '''Testing''' ||\n",
group->display_name->str);
}
up = g_ascii_strup (fd->name, -1);
fprintf (output_file, "<tr class=\"function\">\n");
/* FIXME: Add link to docs */
fprintf (output_file,
"<td><a href =\"doc/gnumeric-function-%s.shtml\">%s</a></td>\n",
up, fd->name);
g_free (up);
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,
"|| %s ||%s %s ||%s %s ||\n",
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, "</table></div>\n");
fprintf (output_file, "<!--#include virtual=\"footer.shtml\"-->\n");
if (group) fprintf (output_file, "\n");
}
g_ptr_array_free (ordered, TRUE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment