X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fhtml.c;h=0546e5d3a2eb94612605d9af1e78e9cfb8098215;hb=b4062aaae1b2686f7d4ece15420550519e9a9823;hp=cbb8e90c6e852d61a760b66d3e9c4605e3bf1036;hpb=672776c201a00e1a667d37a957e7d2211300d48a;p=pspp diff --git a/src/output/html.c b/src/output/html.c index cbb8e90c6e..0546e5d3a2 100644 --- a/src/output/html.c +++ b/src/output/html.c @@ -180,9 +180,7 @@ html_create (struct file_handle *fh, enum settings_output_devices device_type, struct string_map *o) { struct output_driver *d; - struct html_driver *html; - - html = xzalloc (sizeof *html); + struct html_driver *html = XZALLOC (struct html_driver); d = &html->driver; output_driver_init (&html->driver, &html_driver_class, fh_get_file_name (fh), device_type); @@ -587,26 +585,26 @@ html_put_table_cell (struct html_driver *html, const struct pivot_table *pt, escape_string (html->file, s, " ", "
"); ds_destroy (&body); - if (cell->value->n_subscripts) + const struct pivot_value_ex *ex = pivot_value_ex (cell->value); + if (ex->n_subscripts) { fputs ("", html->file); - for (size_t i = 0; i < cell->value->n_subscripts; i++) + for (size_t i = 0; i < ex->n_subscripts; i++) { if (i) putc (',', html->file); - escape_string (html->file, cell->value->subscripts[i], - " ", "
"); + escape_string (html->file, ex->subscripts[i], " ", "
"); } fputs ("
", html->file); } - if (cell->value->n_footnotes > 0) + if (ex->n_footnotes > 0) { fputs ("", html->file); size_t n_footnotes = 0; - for (size_t i = 0; i < cell->value->n_footnotes; i++) + for (size_t i = 0; i < ex->n_footnotes; i++) { const struct pivot_footnote *f - = pt->footnotes[cell->value->footnote_indexes[i]]; + = pt->footnotes[ex->footnote_indexes[i]]; if (f->show) { if (n_footnotes++ > 0)