render_cell (const struct render_page *page, const int ofs[TABLE_N_AXES],
const struct table_cell *cell)
{
+ const bool debugging = false;
+ if (debugging)
+ {
+ printf ("render ");
+ if (cell->d[H][0] + 1 == cell->d[H][1])
+ printf ("%d", cell->d[H][0]);
+ else
+ printf ("%d-%d", cell->d[H][0], cell->d[H][1] - 1);
+ printf (",");
+ if (cell->d[V][0] + 1 == cell->d[V][1])
+ printf ("%d", cell->d[V][0]);
+ else
+ printf ("%d-%d", cell->d[V][0], cell->d[V][1] - 1);
+
+ char *value = pivot_value_to_string (cell->value, NULL);
+ printf (": \"%s\"\n", value);
+ free (value);
+ }
+
int bb[TABLE_N_AXES][2];
int clip[TABLE_N_AXES][2];
assert (0 <= x1 && x1 <= x2 && x2 < table->n[H]);
assert (0 <= y1 && y1 <= y2 && y2 < table->n[V]);
+ const bool debugging = false;
+ if (debugging)
+ {
+ printf ("put ");
+ if (x1 == x2)
+ printf ("%d", x1);
+ else
+ printf ("%d-%d", x1, x2);
+ printf (",");
+ if (y1 == y2)
+ printf ("%d", y1);
+ else
+ printf ("%d-%d", y1, y2);
+
+ char *value_s = value ? pivot_value_to_string (value, NULL) : NULL;
+ printf (": \"%s\"\n", value_s ? value_s : "");
+ free (value_s);
+ }
+
if (x1 == x2 && y1 == y2)
{
table->cc[x1 + y1 * table->n[H]] = CONST_CAST (struct pivot_value *, value);