X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fhtml.c;h=644ef49eba9e84082141fc1d5ef1cbb917eb9231;hb=d55fbbb4fda554d02c93dd46c6fa66128060e6f0;hp=e865642a6e518d9bb47e3afb00f8f1600631c90e;hpb=f8659933d48c5682010d1e1f04ae7acb5cbcd611;p=pspp diff --git a/src/output/html.c b/src/output/html.c index e865642a6e..644ef49eba 100644 --- a/src/output/html.c +++ b/src/output/html.c @@ -33,9 +33,7 @@ #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/version.h" -#ifdef HAVE_CAIRO #include "output/cairo-chart.h" -#endif #include "output/chart-item.h" #include "output/driver-provider.h" #include "output/image-item.h" @@ -61,10 +59,8 @@ struct html_driver { struct output_driver driver; -#ifdef HAVE_CAIRO struct cell_color fg; struct cell_color bg; -#endif struct file_handle *handle; char *chart_file_name; @@ -202,10 +198,8 @@ html_create (struct file_handle *fh, enum settings_output_devices device_type, fh_get_file_name (fh))); html->file = NULL; html->chart_cnt = 1; -#ifdef HAVE_CAIRO html->bg = parse_color (opt (d, o, "background-color", "#FFFFFFFFFFFF")); html->fg = parse_color (opt (d, o, "foreground-color", "#000000000000")); -#endif html->file = fn_open (html->handle, "w"); if (html->file == NULL) { @@ -266,7 +260,6 @@ html_submit (struct output_driver *driver, struct table_item *table_item = to_table_item (output_item); html_output_table (html, table_item); } -#ifdef HAVE_CAIRO else if (is_image_item (output_item) && html->chart_file_name != NULL) { struct image_item *image_item = to_image_item (output_item); @@ -296,7 +289,6 @@ html_submit (struct output_driver *driver, free (file_name); } } -#endif /* HAVE_CAIRO */ else if (is_text_item (output_item)) { struct text_item *text_item = to_text_item (output_item); @@ -594,16 +586,20 @@ html_put_table_cell (struct html_driver *html, const struct pivot_table *pt, if (cell->value->n_footnotes > 0) { fputs ("", html->file); + size_t n_footnotes = 0; for (size_t i = 0; i < cell->value->n_footnotes; i++) { - if (i > 0) - putc (',', html->file); + const struct pivot_footnote *f + = pt->footnotes[cell->value->footnote_indexes[i]]; + if (f->show) + { + if (n_footnotes++ > 0) + putc (',', html->file); - size_t idx = cell->value->footnote_indexes[i]; - const struct pivot_footnote *f = pt->footnotes[idx]; - char *marker = pivot_value_to_string (f->marker, pt); - escape_string (html->file, marker, " ", "
"); - free (marker); + char *marker = pivot_footnote_marker_string (f, pt); + escape_string (html->file, marker, " ", "
"); + free (marker); + } } fputs ("
", html->file); }