diff options
author | Richard Wilson <rjw@netsurf-browser.org> | 2004-12-09 12:07:32 +0000 |
---|---|---|
committer | Richard Wilson <rjw@netsurf-browser.org> | 2004-12-09 12:07:32 +0000 |
commit | bd652a750a60fa7a6d4d2d5e3deff97eda07b135 (patch) | |
tree | 54049aaec76acef0b2fd208c7dd2b5707af028be /riscos/history.c | |
parent | 58b68f71309f50274bd2b2c8c6619e26e84cb6f8 (diff) | |
download | netsurf-bd652a750a60fa7a6d4d2d5e3deff97eda07b135.tar.gz netsurf-bd652a750a60fa7a6d4d2d5e3deff97eda07b135.tar.bz2 |
[project @ 2004-12-09 12:07:32 by rjw]
Fix GTK build. Lose xcalloc() from history.
svn path=/import/netsurf/; revision=1396
Diffstat (limited to 'riscos/history.c')
-rw-r--r-- | riscos/history.c | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/riscos/history.c b/riscos/history.c index 153d3c629..7901ed3ae 100644 --- a/riscos/history.c +++ b/riscos/history.c @@ -433,24 +433,29 @@ void ro_gui_history_redraw_tree(struct history_entry *he, area, (osspriteop_id)header, colourtrans_CURRENT_MODE, colourtrans_CURRENT_PALETTE, 0, colourtrans_GIVEN_SPRITE, 0, 0, &size); - table = xcalloc(size, 1); - xcolourtrans_generate_table_for_sprite( - area, (osspriteop_id)header, - colourtrans_CURRENT_MODE, colourtrans_CURRENT_PALETTE, - table, colourtrans_GIVEN_SPRITE, 0, 0, 0); - - factors.xmul = 1; - factors.ymul = 1; - factors.xdiv = 1; - factors.ydiv = 1; - - xosspriteop_put_sprite_scaled(osspriteop_PTR, - area, (osspriteop_id)header, - x0 + he->x * FULL_WIDTH + MARGIN, - y0 - he->y * FULL_HEIGHT - FULL_HEIGHT + MARGIN, - osspriteop_USE_MASK | osspriteop_USE_PALETTE, &factors, table); - - xfree(table); + table = calloc(size, 1); + if (!table) { + LOG(("Insufficient memory for calloc")); + warn_user("NoMemory", 0); + } else { + xcolourtrans_generate_table_for_sprite( + area, (osspriteop_id)header, + colourtrans_CURRENT_MODE, colourtrans_CURRENT_PALETTE, + table, colourtrans_GIVEN_SPRITE, 0, 0, 0); + + factors.xmul = 1; + factors.ymul = 1; + factors.xdiv = 1; + factors.ydiv = 1; + + xosspriteop_put_sprite_scaled(osspriteop_PTR, + area, (osspriteop_id)header, + x0 + he->x * FULL_WIDTH + MARGIN, + y0 - he->y * FULL_HEIGHT - FULL_HEIGHT + MARGIN, + osspriteop_USE_MASK | osspriteop_USE_PALETTE, + &factors, table); + free(table); + } } } @@ -466,7 +471,6 @@ void ro_gui_history_redraw_tree(struct history_entry *he, y0 - he->y * FULL_HEIGHT - HEIGHT - MARGIN - 24, NULL, NULL, 0); - colourtrans_set_gcol(os_COLOUR_MID_DARK_GREY, 0, os_ACTION_OVERWRITE, 0); |