projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
variable: Simplify var_set_display_width().
[pspp]
/
src
/
output
/
html.c
diff --git
a/src/output/html.c
b/src/output/html.c
index 5aec959c740a16a69888d9f5da76ad2d56778528..45c9a1ef730762df544128f488f227568d082517 100644
(file)
--- a/
src/output/html.c
+++ b/
src/output/html.c
@@
-1,5
+1,5
@@
/* PSPP - a program for statistical analysis.
/* 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
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;
char *command_name;
FILE *file;
size_t chart_cnt;
-
- bool in_syntax;
};
static const struct output_driver_class html_driver_class;
};
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->file != NULL)
{
- if (html->in_syntax)
- {
- fprintf (html->file, "</PRE>\n");
- html->in_syntax = false;
- }
fprintf (html->file,
"</BODY>\n"
"</HTML>\n"
fprintf (html->file,
"</BODY>\n"
"</HTML>\n"
@@
-217,13
+210,6
@@
html_destroy (struct output_driver *driver)
free (html);
}
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)
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);
output_driver_track_current_command (output_item, &html->command_name);
- if (html->in_syntax && !is_syntax_item (output_item))
- {
- fprintf (html->file, "</PRE>\n");
- html->in_syntax = false;
- }
-
if (is_table_item (output_item))
{
struct table_item *table_item = to_table_item (output_item);
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:
break;
case TEXT_ITEM_SYNTAX:
- if (!html->in_syntax)
- {
- fprintf (html->file, "<PRE class=\"syntax\">");
- html->in_syntax = true;
- }
- else
- putc ('\n', html->file);
+ fprintf (html->file, "<PRE class=\"syntax\">");
escape_string (html->file, s, strlen (s), " ");
escape_string (html->file, s, strlen (s), " ");
+ fprintf (html->file, "</PRE>\n");
break;
case TEXT_ITEM_PARAGRAPH:
break;
case TEXT_ITEM_PARAGRAPH: