projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
quick-cluster.c: whitespace changes only.
[pspp]
/
src
/
output
/
table-paste.c
diff --git
a/src/output/table-paste.c
b/src/output/table-paste.c
index ad32de7276e52d606339d46ba5ef5d8925967b7a..05c8987ce6f891a0a888d582339bb2ff49aa9137 100644
(file)
--- a/
src/output/table-paste.c
+++ b/
src/output/table-paste.c
@@
-1,5
+1,5
@@
/* PSPP - a program for statistical analysis.
/* PSPP - a program for statistical analysis.
- Copyright (C) 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2011
, 2014
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-148,6
+148,8
@@
table_paste (struct table *a, struct table *b, enum table_axis orientation)
if (b == NULL)
return a;
if (b == NULL)
return a;
+ assert (a->n[!orientation] == b->n[!orientation]);
+
/* Handle tables that know how to paste themselves. */
if (!table_is_shared (a) && !table_is_shared (b) && a != b)
{
/* Handle tables that know how to paste themselves. */
if (!table_is_shared (a) && !table_is_shared (b) && a != b)
{
@@
-182,11
+184,11
@@
table_hpaste (struct table *left, struct table *right)
return table_paste (left, right, TABLE_HORZ);
}
return table_paste (left, right, TABLE_HORZ);
}
-/* Shorthand for table_paste (
left, right
, TABLE_VERT). */
+/* Shorthand for table_paste (
top, bottom
, TABLE_VERT). */
struct table *
struct table *
-table_vpaste (struct table *
left, struct table *right
)
+table_vpaste (struct table *
top, struct table *bottom
)
{
{
- return table_paste (
left, right
, TABLE_VERT);
+ return table_paste (
top, bottom
, TABLE_VERT);
}
static void
}
static void
@@
-225,7
+227,8
@@
table_paste_get_cell (const struct table *t, int x, int y,
static int
table_paste_get_rule (const struct table *t,
static int
table_paste_get_rule (const struct table *t,
- enum table_axis axis, int x, int y)
+ enum table_axis axis, int x, int y,
+ struct cell_color *color)
{
struct table_paste *tp = table_paste_cast (t);
int h = tp->orientation == TABLE_HORZ ? x : y;
{
struct table_paste *tp = table_paste_cast (t);
int h = tp->orientation == TABLE_HORZ ? x : y;
@@
-239,9
+242,9
@@
table_paste_get_rule (const struct table *t,
ps = paste_subtable_lookup (tp, h == 0 ? 0 : h - 1, &start);
if (tp->orientation == TABLE_HORZ) /* XXX */
ps = paste_subtable_lookup (tp, h == 0 ? 0 : h - 1, &start);
if (tp->orientation == TABLE_HORZ) /* XXX */
- r = table_get_rule (ps->table, axis, h - start, k);
+ r = table_get_rule (ps->table, axis, h - start, k
, color
);
else
else
- r = table_get_rule (ps->table, axis, k, h - start);
+ r = table_get_rule (ps->table, axis, k, h - start
, color
);
if (h == start + tower_node_get_size (&ps->node))
{
struct tower_node *ps2_ = tower_next (&tp->subtables, &ps->node);
if (h == start + tower_node_get_size (&ps->node))
{
struct tower_node *ps2_ = tower_next (&tp->subtables, &ps->node);
@@
-251,9
+254,9
@@
table_paste_get_rule (const struct table *t,
int r2;
if (tp->orientation == TABLE_HORZ) /* XXX */
int r2;
if (tp->orientation == TABLE_HORZ) /* XXX */
- r2 = table_get_rule (ps2->table, axis, 0, k);
+ r2 = table_get_rule (ps2->table, axis, 0, k
, color
);
else
else
- r2 = table_get_rule (ps2->table, axis, k, 0);
+ r2 = table_get_rule (ps2->table, axis, k, 0
, color
);
return table_rule_combine (r, r2);
}
}
return table_rule_combine (r, r2);
}
}
@@
-263,9
+266,9
@@
table_paste_get_rule (const struct table *t,
{
ps = paste_subtable_lookup (tp, h, &start);
if (tp->orientation == TABLE_HORZ) /* XXX */
{
ps = paste_subtable_lookup (tp, h, &start);
if (tp->orientation == TABLE_HORZ) /* XXX */
- return table_get_rule (ps->table, axis, h - start, k);
+ return table_get_rule (ps->table, axis, h - start, k
, color
);
else
else
- return table_get_rule (ps->table, axis, k, h - start);
+ return table_get_rule (ps->table, axis, k, h - start
, color
);
}
}
}
}