X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Foutput%2Fpivot-table-test.c;h=18e7d0499f5cd44bc6bf67cca2ebd83015ebf946;hb=5ce9c6ba1502e623ec6723a8273da77e5858b8d4;hp=98336b2563f3aefd89d42ee6de5838b0cdd6df51;hpb=478f1bffcdec0b01391b8297e2df1a1f6aa7d4cf;p=pspp diff --git a/tests/output/pivot-table-test.c b/tests/output/pivot-table-test.c index 98336b2563..18e7d0499f 100644 --- a/tests/output/pivot-table-test.c +++ b/tests/output/pivot-table-test.c @@ -598,16 +598,16 @@ read_value_option (struct lexer *lexer, const struct pivot_table *pt, if (lex_match_id (lexer, "SUBSCRIPTS")) { lex_match (lexer, T_EQUALS); - size_t allocated_subscripts = value->n_subscripts; + + struct pivot_value_ex *ex = pivot_value_ex_rw (value); + size_t allocated_subscripts = ex->n_subscripts; while (lex_token (lexer) == T_STRING) { - if (value->n_subscripts >= allocated_subscripts) - value->subscripts = x2nrealloc (value->subscripts, - &allocated_subscripts, - sizeof *value->subscripts); + if (ex->n_subscripts >= allocated_subscripts) + ex->subscripts = x2nrealloc (ex->subscripts, &allocated_subscripts, + sizeof *ex->subscripts); - value->subscripts[value->n_subscripts++] = xstrdup ( - lex_tokcstr (lexer)); + ex->subscripts[ex->n_subscripts++] = xstrdup (lex_tokcstr (lexer)); lex_get (lexer); } return; @@ -617,12 +617,13 @@ read_value_option (struct lexer *lexer, const struct pivot_table *pt, { lex_match (lexer, T_EQUALS); - if (!value->font_style) + struct pivot_value_ex *ex = pivot_value_ex_rw (value); + if (!ex->font_style) { - value->font_style = xmalloc (sizeof *value->font_style); - font_style_copy (NULL, value->font_style, &base_style->font_style); + ex->font_style = xmalloc (sizeof *ex->font_style); + font_style_copy (NULL, ex->font_style, &base_style->font_style); } - read_font_style (lexer, value->font_style); + read_font_style (lexer, ex->font_style); return; } @@ -630,12 +631,13 @@ read_value_option (struct lexer *lexer, const struct pivot_table *pt, { lex_match (lexer, T_EQUALS); - if (!value->cell_style) + struct pivot_value_ex *ex = pivot_value_ex_rw (value); + if (!ex->cell_style) { - value->cell_style = xmalloc (sizeof *value->cell_style); - *value->cell_style = base_style->cell_style; + ex->cell_style = xmalloc (sizeof *ex->cell_style); + *ex->cell_style = base_style->cell_style; } - read_cell_style (lexer, value->cell_style); + read_cell_style (lexer, ex->cell_style); return; }