From 7264ae50e52050243d9723c47c395975e00b5e50 Mon Sep 17 00:00:00 2001 From: John Tytgat Date: Sat, 14 Aug 2004 15:07:21 +0000 Subject: [project @ 2004-08-14 15:07:19 by joty] - Rename len() to css_len2px(). - Less compiler warnings concerning float/int implicit casts. - More stddef.h type usuage. svn path=/import/netsurf/; revision=1232 --- riscos/font.c | 4 ++-- riscos/htmlredraw.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'riscos') diff --git a/riscos/font.c b/riscos/font.c index ef2ecb5a6..c56c85ad7 100644 --- a/riscos/font.c +++ b/riscos/font.c @@ -208,8 +208,8 @@ struct font_data *nsfont_open(struct font_set *set, struct css_style *style) assert(style != NULL); if (style->font_size.size == CSS_FONT_SIZE_LENGTH) - size = len(&style->font_size.value.length, style) * - 72.0 / 90.0 * 16; + size = (int)(css_len2px(&style->font_size.value.length, + style) * 72.0 / 90.0 * 16.); if (size < option_font_min_size * 1.6) size = option_font_min_size * 1.6; if (1600 < size) diff --git a/riscos/htmlredraw.c b/riscos/htmlredraw.c index d9060563d..a3ecce1c6 100644 --- a/riscos/htmlredraw.c +++ b/riscos/htmlredraw.c @@ -954,7 +954,7 @@ bool html_redraw_background(int xi, int yi, int width, int height, x += ((state.visible.x1 - state.visible.x0) - (image_size.x * 2)) * multiplier; break; case CSS_BACKGROUND_POSITION_LENGTH: - x += 2 * len(&box->style->background_position.horz.value.length, box->style) * scale; + x += (int)(2. * css_len2px(&box->style->background_position.horz.value.length, box->style) * scale); break; default: break; @@ -966,7 +966,7 @@ bool html_redraw_background(int xi, int yi, int width, int height, y -= ((state.visible.y1 - state.visible.y0 - toolbar_height) - (image_size.y * 2)) * multiplier; break; case CSS_BACKGROUND_POSITION_LENGTH: - y -= 2 * len(&box->style->background_position.vert.value.length, box->style) * scale; + y -= (int)(2. * css_len2px(&box->style->background_position.vert.value.length, box->style) * scale); break; default: break; @@ -984,7 +984,7 @@ bool html_redraw_background(int xi, int yi, int width, int height, x += 2 * (box->width + box->padding[LEFT] + box->padding[RIGHT] - image_size.x) * multiplier; break; case CSS_BACKGROUND_POSITION_LENGTH: - x += 2 * len(&box->style->background_position.horz.value.length, box->style) * scale; + x += (int)(2. * css_len2px(&box->style->background_position.horz.value.length, box->style) * scale); break; default: break; @@ -996,7 +996,7 @@ bool html_redraw_background(int xi, int yi, int width, int height, y -= 2 * (box->height + box->padding[TOP] + box->padding[BOTTOM] - image_size.y) * multiplier; break; case CSS_BACKGROUND_POSITION_LENGTH: - y -= 2 * len(&box->style->background_position.vert.value.length, box->style) * scale; + y -= (int)(2. * css_len2px(&box->style->background_position.vert.value.length, box->style) * scale); break; default: break; -- cgit v1.2.3