X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fpivot-table.c;h=f2967eae81de9d14ac60dd015b9421112b2c2068;hb=7919fa5fc1f94ad0097507d20e2deea52ed06df8;hp=3d1ccbaa585199206fe2352701118fe1cd17d4ff;hpb=3c15b41c0360cc66ad9608a18ba379112f10b5b9;p=pspp diff --git a/src/output/pivot-table.c b/src/output/pivot-table.c index 3d1ccbaa58..f2967eae81 100644 --- a/src/output/pivot-table.c +++ b/src/output/pivot-table.c @@ -76,11 +76,12 @@ pivot_area_get_default_style (enum pivot_area area) .bold = BOLD, \ .fg = { [0] = CELL_COLOR_BLACK, [1] = CELL_COLOR_BLACK}, \ .bg = { [0] = CELL_COLOR_WHITE, [1] = CELL_COLOR_WHITE}, \ + .size = 9, \ .typeface = (char *) "Sans Serif", \ }, \ } static const struct area_style default_area_styles[PIVOT_N_AREAS] = { - [PIVOT_AREA_TITLE] = STYLE( true, CENTER, CENTER, 8,11,1,8), + [PIVOT_AREA_TITLE] = STYLE(true, CENTER, CENTER, 8,11,1,8), [PIVOT_AREA_CAPTION] = STYLE(false, LEFT, TOP, 8,11,1,1), [PIVOT_AREA_FOOTER] = STYLE(false, LEFT, TOP, 11, 8,2,3), [PIVOT_AREA_CORNER] = STYLE(false, LEFT, BOTTOM, 8,11,1,1), @@ -1137,7 +1138,7 @@ pivot_table_enumerate_axis (const struct pivot_table *table, axis->n_dimensions), 1), sizeof *enumeration); size_t *p = enumeration; - size_t *dindexes = xcalloc (table->n_dimensions, sizeof *dindexes); + size_t *dindexes = XCALLOC (table->n_dimensions, size_t); size_t *axis_indexes; PIVOT_AXIS_FOR_EACH (axis_indexes, axis) @@ -1486,8 +1487,11 @@ pivot_table_dump (const struct pivot_table *table, int indentation) if (table->date) { indent (indentation); - char buf[26]; - printf ("date: %s", ctime_r (&table->date, buf)); + + struct tm *tm = localtime (&table->date); + printf ("date: %d-%02d-%02d %d:%02d:%02d\n", tm->tm_year + 1900, + tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, + tm->tm_sec); } indent (indentation); @@ -1511,7 +1515,7 @@ pivot_table_dump (const struct pivot_table *table, int indentation) pivot_dimension_dump (table->dimensions[i], indentation); /* Presentation and data indexes. */ - size_t *dindexes = xcalloc (table->n_dimensions, sizeof *dindexes); + size_t *dindexes = XCALLOC (table->n_dimensions, size_t); const struct pivot_axis *layer_axis = &table->axes[PIVOT_AXIS_LAYER]; if (layer_axis->n_dimensions) @@ -1564,7 +1568,7 @@ pivot_table_dump (const struct pivot_table *table, int indentation) names[n_names++] = c->name; } - for (size_t i = n_names; i-- > 0; ) + for (size_t i = n_names; i-- > 0;) { putchar (' '); pivot_value_dump (names[i]); @@ -1888,7 +1892,7 @@ pivot_value_format (const struct pivot_value *value, enum settings_value_show show_variables, struct string *out) { - pivot_value_format_body ( value, show_values, show_variables, out); + pivot_value_format_body (value, show_values, show_variables, out); if (value->n_subscripts) {