X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fhtml.c;h=45c9a1ef730762df544128f488f227568d082517;hb=5d8fa2ae8c6e7d890570585aedec66bd51630814;hp=5aec959c740a16a69888d9f5da76ad2d56778528;hpb=0d70eff1e5dcd89a73f09ce6bc999ccbec8234b5;p=pspp-builds.git diff --git a/src/output/html.c b/src/output/html.c index 5aec959c..45c9a1ef 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 @@ -55,8 +55,6 @@ struct html_driver char *command_name; FILE *file; size_t chart_cnt; - - bool in_syntax; }; static const struct output_driver_class html_driver_class; @@ -200,11 +198,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" "\n" @@ -217,13 +210,6 @@ html_destroy (struct output_driver *driver) free (html); } -static bool -is_syntax_item (const struct output_item *item) -{ - return (is_text_item (item) - && text_item_get_type (to_text_item (item)) == TEXT_ITEM_SYNTAX); -} - static void html_submit (struct output_driver *driver, const struct output_item *output_item) @@ -232,12 +218,6 @@ html_submit (struct output_driver *driver, output_driver_track_current_command (output_item, &html->command_name); - if (html->in_syntax && !is_syntax_item (output_item)) - { - fprintf (html->file, "\n"); - html->in_syntax = false; - } - if (is_table_item (output_item)) { struct table_item *table_item = to_table_item (output_item); @@ -291,14 +271,9 @@ html_submit (struct output_driver *driver, break; case TEXT_ITEM_SYNTAX: - if (!html->in_syntax) - { - fprintf (html->file, "
");
-              html->in_syntax = true;
-            }
-          else
-            putc ('\n', html->file);
+          fprintf (html->file, "
");
           escape_string (html->file, s, strlen (s), " ");
+          fprintf (html->file, "
\n"); break; case TEXT_ITEM_PARAGRAPH: