X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fhtml.c;h=77d4195f30c2a2e5319a8192701736964c2feb51;hb=7235f7f42b61c2b111174c3ee5ca72aac8815cd5;hp=4452e40b678bd8feb6accf8fb26b75d750a839eb;hpb=5ad018c10a4b77416ebceb5f678b473a6a7753ce;p=pspp diff --git a/src/output/html.c b/src/output/html.c index 4452e40b67..77d4195f30 100644 --- a/src/output/html.c +++ b/src/output/html.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 1997-9, 2000, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1997-9, 2000, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -56,7 +56,8 @@ struct html_driver FILE *file; size_t chart_cnt; - bool in_syntax; + bool css; + bool borders; }; static const struct output_driver_class html_driver_class; @@ -93,6 +94,8 @@ html_create (const char *file_name, enum settings_output_devices device_type, d = &html->driver; output_driver_init (&html->driver, &html_driver_class, file_name, device_type); + html->css = parse_boolean (opt (d, o, "css", "true")); + html->borders = parse_boolean (opt (d, o, "borders", "true")); html->file_name = xstrdup (file_name); html->chart_file_name = parse_chart_file_name (opt (d, o, "charts", @@ -113,62 +116,66 @@ html_create (const char *file_name, enum settings_output_devices device_type, fputs ("
\n", html->file); print_title_tag (html->file, "TITLE", _("PSPP Output")); fprintf (html->file, "\n", version); - fputs ("\n", - html->file); fputs ("\n", html->file); - fputs ("\n", - html->file); + + if ( html->css) + { + fputs ("\n", + html->file); + fputs ("\n", + html->file); + } fputs ("\n", html->file); fputs ("file); fputs (" LINK=\"#1f00ff\" ALINK=\"#ff0000\" VLINK=\"#9900dd\">\n", html->file); @@ -200,11 +207,6 @@ html_destroy (struct output_driver *driver) if (html->file != NULL) { - if (html->in_syntax) - { - fprintf (html->file, "\n"); - html->in_syntax = false; - } fprintf (html->file, "\n" "