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
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 =
---------+
])
AT_CLEANUP
+\f
+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