summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2004-05-02 17:01:37 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2004-05-02 17:01:37 +0000
commitafb5e4209bce0dd6979e06593dc7ffb311365807 (patch)
tree6767851f213cc58e955c86865007d45d05adf8d9 /render
parentf310036536181de0c007606e20cf3ae2c2db9fa0 (diff)
downloadnetsurf-afb5e4209bce0dd6979e06593dc7ffb311365807.tar.gz
netsurf-afb5e4209bce0dd6979e06593dc7ffb311365807.tar.bz2
[project @ 2004-05-02 17:01:37 by jmb]
Remove #ifdef nastiness. Now uses alloca. svn path=/import/netsurf/; revision=816
Diffstat (limited to 'render')
-rw-r--r--render/layout.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/render/layout.c b/render/layout.c
index 92aadbf7e..0e825f5cd 100644
--- a/render/layout.c
+++ b/render/layout.c
@@ -13,6 +13,7 @@
* precalculation of minimum / maximum box widths.
*/
+#include <alloca.h>
#include <assert.h>
#include <ctype.h>
#include <limits.h>
@@ -1002,16 +1003,7 @@ void layout_table(struct box *table, int available_width)
struct box *row;
struct box *row_group;
struct box **row_span_cell;
- /**
- * \attention
- * See the note at the top of ro_theme_load()
- * in riscos/theme.c for an explaination of this \#ifdef silliness
- */
-#ifdef __GNUC__
- struct column col[columns];
-#else
- struct column *col = xcalloc(columns, sizeof(*col));
-#endif
+ struct column *col = alloca(columns * sizeof(struct column));
struct css_style *style = table->style;
assert(table->type == BOX_TABLE);
@@ -1218,9 +1210,6 @@ void layout_table(struct box *table, int available_width)
xfree(excess_y);
xfree(row_span);
xfree(xs);
-#ifndef __GNUC__
- xfree(col);
-#endif
table->width = table_width;
table->height = table_height;