From: Ben Pfaff Date: Sat, 16 Apr 2011 05:49:00 +0000 (-0700) Subject: table-casereader: Put space between columns. X-Git-Tag: v0.7.8~61 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac5fc2c85d86f1a14cdea0a215666ab39b44a1dc;p=pspp-builds.git table-casereader: Put space between columns. When table_casereaders are pasted together next to each other, there should normally be a little bit of space between neighboring columns, instead of having them directly abutting. This makes the output of LIST, for example, much more readable. Without this commit, LIST output for three variables named x, y, and z, all with F1.0 format, looks something like this: xyz --- 111 222 311 412 521 612 711 811 912 With this commit, it looks like this: x y z ----- 1 1 1 2 2 2 3 1 1 4 1 2 5 2 1 6 1 2 7 1 1 8 1 1 9 1 2 --- diff --git a/src/output/table-casereader.c b/src/output/table-casereader.c index fa7498c8..672dd87f 100644 --- a/src/output/table-casereader.c +++ b/src/output/table-casereader.c @@ -142,7 +142,10 @@ table_casereader_get_rule (const struct table *t, enum table_axis axis, int x UNUSED, int y) { struct table_casereader *tc = table_casereader_cast (t); - return axis == TABLE_VERT && tc->heading != NULL && y == 1 ? TAL_1 : TAL_0; + if (axis == TABLE_VERT) + return tc->heading != NULL && y == 1 ? TAL_1 : TAL_0; + else + return TAL_GAP; } static const struct table_class table_casereader_class = diff --git a/tests/output/render.at b/tests/output/render.at index 250da4f2..3b7c8699 100644 --- a/tests/output/render.at +++ b/tests/output/render.at @@ -1779,3 +1779,34 @@ excluded.| ---------+ ]) AT_CLEANUP + +AT_BANNER([output rendering -- problematic procedures]) + +dnl LIST used to put columns right up next to each other without any +dnl intervening space, so this checks for regression. +AT_SETUP([LIST puts space between columns]) +AT_KEYWORDS([render rendering]) +AT_DATA([list.sps], [dnl +DATA LIST LIST NOTABLE /x y z (F1.0). +BEGIN DATA. +1 2 3 +4 5 6 +7 8 9 +END DATA. +LIST. +]) +AT_CHECK([pspp list.sps], [0], [dnl +DATA LIST + +BEGIN DATA + +LIST + +Data List +x y z +----- +1 2 3 +4 5 6 +7 8 9 +]) +AT_CLEANUP