From: Ben Pfaff Date: Sat, 25 Feb 2023 03:01:15 +0000 (-0800) Subject: pivot-table: Force width of weight formats to 40. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12b9efe4bcd6ef6e5a87df9108e4ba49182730b4;p=pspp pivot-table: Force width of weight formats to 40. It was too confusing when output tables contained **** because of weight variables with narrow widths. Recently reported by Andreas Hammer. I've also noticed the same thing myself. --- diff --git a/src/output/pivot-table.c b/src/output/pivot-table.c index c6197beb04..213cfc028c 100644 --- a/src/output/pivot-table.c +++ b/src/output/pivot-table.c @@ -1375,9 +1375,9 @@ pivot_table_set_weight_var (struct pivot_table *table, format for the dictionary whose data or statistics are being put into TABLE. */ void -pivot_table_set_weight_format (struct pivot_table *table, - const struct fmt_spec wfmt) +pivot_table_set_weight_format (struct pivot_table *table, struct fmt_spec wfmt) { + wfmt.w = 40; table->weight_format = wfmt; } diff --git a/src/output/pivot-table.h b/src/output/pivot-table.h index c52c7654b1..6fd97e19c8 100644 --- a/src/output/pivot-table.h +++ b/src/output/pivot-table.h @@ -576,8 +576,7 @@ void pivot_table_set_look (struct pivot_table *, /* Format of PIVOT_RC_COUNT cells. */ void pivot_table_set_weight_var (struct pivot_table *, const struct variable *); -void pivot_table_set_weight_format (struct pivot_table *, - const struct fmt_spec); +void pivot_table_set_weight_format (struct pivot_table *, struct fmt_spec); /* Query. */ bool pivot_table_is_empty (const struct pivot_table *);