projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CTABLES weird special formats
[pspp]
/
src
/
output
/
render.c
diff --git
a/src/output/render.c
b/src/output/render.c
index 249d77f80bf18711aa7b044fc253fc33f7e222c8..7aa80a6977e69abd92f328429627c22a021e7260 100644
(file)
--- a/
src/output/render.c
+++ b/
src/output/render.c
@@
-539,9
+539,8
@@
render_page_allocate__ (const struct render_params *params,
for (int i = 0; i < TABLE_N_AXES; i++)
{
for (int i = 0; i < TABLE_N_AXES; i++)
{
- page->cp[i] = xmalloc ((2 * n[i] + 2) * sizeof *page->cp[i]);
- page->join_crossing[i] = xzalloc ((n[i] + 1)
- * sizeof *page->join_crossing[i]);
+ page->cp[i] = xcalloc ((2 * n[i] + 2) , sizeof *page->cp[i]);
+ page->join_crossing[i] = xcalloc ((n[i] + 1) , sizeof *page->join_crossing[i]);
}
hmap_init (&page->overflows);
}
hmap_init (&page->overflows);
@@
-732,7
+731,7
@@
render_page_create (const struct render_params *params, struct table *table,
span multiple columns. */
struct render_row *columns[2];
for (int i = 0; i < 2; i++)
span multiple columns. */
struct render_row *columns[2];
for (int i = 0; i < 2; i++)
- columns[i] = x
zalloc (nc *
sizeof *columns[i]);
+ columns[i] = x
calloc (nc ,
sizeof *columns[i]);
for (int y = 0; y < nr; y++)
for (int x = 0; x < nc;)
{
for (int y = 0; y < nr; y++)
for (int x = 0; x < nc;)
{
@@
-816,7
+815,7
@@
render_page_create (const struct render_params *params, struct table *table,
}
/* Calculate heights of cells that do not span multiple rows. */
}
/* Calculate heights of cells that do not span multiple rows. */
- struct render_row *rows =
xzalloc (nr * sizeof *rows
);
+ struct render_row *rows =
XCALLOC (nr, struct render_row
);
for (int y = 0; y < nr; y++)
for (int x = 0; x < nc;)
{
for (int y = 0; y < nr; y++)
for (int x = 0; x < nc;)
{
@@
-1976,7
+1975,7
@@
static struct render_overflow *
insert_overflow (struct render_page_selection *s,
const struct table_cell *cell)
{
insert_overflow (struct render_page_selection *s,
const struct table_cell *cell)
{
- struct render_overflow *of =
xzalloc (sizeof *of
);
+ struct render_overflow *of =
XZALLOC (struct render_overflow
);
cell_to_subpage (s, cell, of->d);
hmap_insert (&s->subpage->overflows, &of->node,
hash_cell (of->d[H], of->d[V]));
cell_to_subpage (s, cell, of->d);
hmap_insert (&s->subpage->overflows, &of->node,
hash_cell (of->d[H], of->d[V]));