From 914cbeacfe860c5898a5d74d32aa24ee40570fd7 Mon Sep 17 00:00:00 2001 From: François Revel Date: Fri, 8 Aug 2008 20:12:38 +0000 Subject: C89 svn path=/trunk/netsurf/; revision=4963 --- render/imagemap.c | 4 ++-- render/layout.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/render/imagemap.c b/render/imagemap.c index 2a74307ed..af442484f 100644 --- a/render/imagemap.c +++ b/render/imagemap.c @@ -450,6 +450,8 @@ bool imagemap_addtolist(xmlNode *n, char *base_url, struct mapentry **entry) } if (new_map->type != IMAGEMAP_DEFAULT) { + int x, y; + float *xcoords, *ycoords; /* coordinates are a comma-separated list of values */ val = strtok(coords, ","); num = 1; @@ -519,8 +521,6 @@ bool imagemap_addtolist(xmlNode *n, char *base_url, struct mapentry **entry) xmlFree(coords); return false; } - int x, y; - float *xcoords, *ycoords; while (val) { x = atoi(val); val = strtok('\0', ","); diff --git a/render/layout.c b/render/layout.c index 7d955011c..1469a3484 100644 --- a/render/layout.c +++ b/render/layout.c @@ -857,11 +857,11 @@ void layout_float_find_dimensions(int available_width, box->gadget->type == GADGET_PASSWORD || box->gadget->type == GADGET_FILE || box->gadget->type == GADGET_TEXTAREA)) { + struct css_length size; /* Give sensible dimensions to gadgets, with auto width/height, * that don't shrink to fit contained text. */ assert(box->style); - struct css_length size; size.unit = CSS_UNIT_EM; if (box->gadget->type == GADGET_TEXTBOX || box->gadget->type == GADGET_PASSWORD || @@ -1252,11 +1252,11 @@ bool layout_line(struct box *first, int *width, int *y, unsigned int inline_count = 0; unsigned int i; struct css_length gadget_size; /* Checkbox / radio buttons */ + const struct font_functions *font_func = content->data.html.font_func; + gadget_size.unit = CSS_UNIT_EM; gadget_size.value = 1; - const struct font_functions *font_func = content->data.html.font_func; - LOG(("first %p, first->text '%.*s', width %i, y %i, cx %i, cy %i", first, (int) first->length, first->text, *width, *y, cx, cy)); -- cgit v1.2.3