X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fspv%2Fspv-light-decoder.c;h=a352106434ceb67885fd8e385f018e3bfc2dd9fc;hb=018a99b1d53ec1ab60e84dfe82c02ffb14232820;hp=2cc7f63221ad9b1d9396b51a0c2340bc74ce2d65;hpb=49437d4844accdd25e1f47f5d0a621f6ff6dd768;p=pspp diff --git a/src/output/spv/spv-light-decoder.c b/src/output/spv/spv-light-decoder.c index 2cc7f63221..a352106434 100644 --- a/src/output/spv/spv-light-decoder.c +++ b/src/output/spv/spv-light-decoder.c @@ -377,7 +377,7 @@ decode_spvlb_value (const struct pivot_table *table, break; default: - assert (0); + abort (); } if (vm) @@ -434,7 +434,7 @@ decode_spvlb_value (const struct pivot_table *table, } static char * WARN_UNUSED_RESULT -decode_spvlb_area (const struct spvlb_area *in, struct area_style *out, +decode_spvlb_area (const struct spvlb_area *in, struct table_area_style *out, const char *encoding) { char *error; @@ -467,7 +467,7 @@ decode_spvlb_area (const struct spvlb_area *in, struct area_style *out, if (error) return error; - *out = (struct area_style) { + *out = (struct table_area_style) { .font_style = { .bold = (in->style & 1) != 0, .italic = (in->style & 2) != 0, @@ -679,7 +679,7 @@ decode_spvlb_border (const struct spvlb_border *in, struct pivot_table *table) if (in->border_type >= PIVOT_N_BORDERS) return xasprintf ("bad border type %"PRIu32, in->border_type); - struct table_border_style *out = &table->borders[in->border_type]; + struct table_border_style *out = &table->look.borders[in->border_type]; out->color = decode_spvlb_color_u32 (in->color); return decode_spvlb_stroke (in->stroke_type, &out->stroke); } @@ -839,14 +839,14 @@ decode_spvlb_table (const struct spvlb_table *in, struct pivot_table **outp) } /* Display settings. */ - out->show_numeric_markers = !in->ts->show_alphabetic_markers; + out->look.show_numeric_markers = !in->ts->show_alphabetic_markers; out->rotate_inner_column_labels = in->header->rotate_inner_column_labels; out->rotate_outer_row_labels = in->header->rotate_outer_row_labels; - out->row_labels_in_corner = in->ts->show_row_labels_in_corner; + out->look.row_labels_in_corner = in->ts->show_row_labels_in_corner; out->show_grid_lines = in->borders->show_grid_lines; out->show_caption = true; - out->footnote_marker_superscripts = in->ts->footnote_marker_superscripts; - out->omit_empty = in->ts->omit_empty; + out->look.footnote_marker_superscripts = in->ts->footnote_marker_superscripts; + out->look.omit_empty = in->ts->omit_empty; const struct spvlb_x1 *x1 = in->formats->x1; if (x1) @@ -862,10 +862,10 @@ decode_spvlb_table (const struct spvlb_table *in, struct pivot_table **outp) } /* Column and row display settings. */ - out->sizing[TABLE_VERT].range[0] = in->header->min_row_height; - out->sizing[TABLE_VERT].range[1] = in->header->max_row_height; - out->sizing[TABLE_HORZ].range[0] = in->header->min_col_width; - out->sizing[TABLE_HORZ].range[1] = in->header->max_col_width; + out->look.width_ranges[TABLE_VERT][0] = in->header->min_row_height; + out->look.width_ranges[TABLE_VERT][1] = in->header->max_row_height; + out->look.width_ranges[TABLE_HORZ][0] = in->header->min_col_width; + out->look.width_ranges[TABLE_HORZ][1] = in->header->max_col_width; convert_widths (in->formats->widths, in->formats->n_widths, &out->sizing[TABLE_HORZ].widths, @@ -892,17 +892,17 @@ decode_spvlb_table (const struct spvlb_table *in, struct pivot_table **outp) &out->sizing[TABLE_HORZ].n_keeps); out->notes = to_utf8_if_nonempty (in->ts->notes, encoding); - out->table_look = to_utf8_if_nonempty (in->ts->table_look, encoding); + out->look.name = to_utf8_if_nonempty (in->ts->table_look, encoding); /* Print settings. */ - out->print_all_layers = in->ps->all_layers; - out->paginate_layers = in->ps->paginate_layers; - out->shrink_to_fit[TABLE_HORZ] = in->ps->fit_width; - out->shrink_to_fit[TABLE_VERT] = in->ps->fit_length; - out->top_continuation = in->ps->top_continuation; - out->bottom_continuation = in->ps->bottom_continuation; - out->continuation = xstrdup (in->ps->continuation_string); - out->n_orphan_lines = in->ps->n_orphan_lines; + out->look.print_all_layers = in->ps->all_layers; + out->look.paginate_layers = in->ps->paginate_layers; + out->look.shrink_to_fit[TABLE_HORZ] = in->ps->fit_width; + out->look.shrink_to_fit[TABLE_VERT] = in->ps->fit_length; + out->look.top_continuation = in->ps->top_continuation; + out->look.bottom_continuation = in->ps->bottom_continuation; + out->look.continuation = xstrdup (in->ps->continuation_string); + out->look.n_orphan_lines = in->ps->n_orphan_lines; /* Format settings. */ out->epoch = in->formats->y0->epoch; @@ -990,7 +990,7 @@ decode_spvlb_table (const struct spvlb_table *in, struct pivot_table **outp) /* Styles. */ for (size_t i = 0; i < PIVOT_N_AREAS; i++) { - error = decode_spvlb_area (in->areas->areas[i], &out->areas[i], + error = decode_spvlb_area (in->areas->areas[i], &out->look.areas[i], encoding); if (error) goto error;