summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
Diffstat (limited to 'render')
-rw-r--r--render/box.c53
-rw-r--r--render/box.h4
-rw-r--r--render/html.c4
-rw-r--r--render/layout.c29
4 files changed, 45 insertions, 45 deletions
diff --git a/render/box.c b/render/box.c
index 1a07be7ba..96b0931d7 100644
--- a/render/box.c
+++ b/render/box.c
@@ -1,5 +1,5 @@
/**
- * $Id: box.c,v 1.33 2003/02/09 12:58:15 bursa Exp $
+ * $Id: box.c,v 1.34 2003/03/04 11:59:35 bursa Exp $
*/
#include <assert.h>
@@ -20,13 +20,11 @@
* internal functions
*/
-struct box* input(xmlNode * n, struct css_style* style, struct form* current_form);
-
-void box_add_child(struct box * parent, struct box * child);
-struct box * box_create(xmlNode * node, box_type type, struct css_style * style,
+static void box_add_child(struct box * parent, struct box * child);
+static struct box * box_create(xmlNode * node, box_type type, struct css_style * style,
char *href);
-char * tolat1(xmlChar * s);
-struct box * convert_xml_to_box(xmlNode * n, struct css_style * parent_style,
+static char * tolat1(xmlChar * s);
+static struct box * convert_xml_to_box(xmlNode * n, struct css_style * parent_style,
struct css_stylesheet * stylesheet,
struct css_selector ** selector, unsigned int depth,
struct box * parent, struct box * inline_container,
@@ -34,26 +32,26 @@ struct box * convert_xml_to_box(xmlNode * n, struct css_style * parent_style,
struct gui_gadget* current_select, struct formoption* current_option,
struct gui_gadget* current_textarea, struct form* current_form,
struct page_elements* elements);
-struct css_style * box_get_style(struct css_stylesheet * stylesheet, struct css_style * parent_style,
+static struct css_style * box_get_style(struct css_stylesheet * stylesheet, struct css_style * parent_style,
xmlNode * n, struct css_selector * selector, unsigned int depth);
-void box_normalise_block(struct box *block);
-void box_normalise_table(struct box *table);
-void box_normalise_table_row_group(struct box *row_group);
-void box_normalise_table_row(struct box *row);
-void box_normalise_inline_container(struct box *cont);
-void gadget_free(struct gui_gadget* g);
-void box_free_box(struct box *box);
-struct box* box_image(xmlNode * n, struct css_style* style, char* href);
-struct box* box_textarea(xmlNode* n, struct css_style* style, struct form* current_form);
-struct box* box_select(xmlNode * n, struct css_style* style, struct form* current_form);
-struct formoption* box_option(xmlNode* n, struct css_style* style, struct gui_gadget* current_select);
-void textarea_addtext(struct gui_gadget* textarea, char* text);
-void option_addtext(struct formoption* option, char* text);
-struct box* box_input(xmlNode * n, struct css_style* style, struct form* current_form, struct page_elements* elements);
-struct form* box_form(xmlNode* n);
-void add_form_element(struct page_elements* pe, struct form* f);
-void add_gadget_element(struct page_elements* pe, struct gui_gadget* g);
-void add_img_element(struct page_elements* pe, struct img* i);
+static void box_normalise_block(struct box *block);
+static void box_normalise_table(struct box *table);
+static void box_normalise_table_row_group(struct box *row_group);
+static void box_normalise_table_row(struct box *row);
+static void box_normalise_inline_container(struct box *cont);
+static void gadget_free(struct gui_gadget* g);
+static void box_free_box(struct box *box);
+static struct box* box_image(xmlNode * n, struct css_style* style, char* href);
+static struct box* box_textarea(xmlNode* n, struct css_style* style, struct form* current_form);
+static struct box* box_select(xmlNode * n, struct css_style* style, struct form* current_form);
+static struct formoption* box_option(xmlNode* n, struct css_style* style, struct gui_gadget* current_select);
+static void textarea_addtext(struct gui_gadget* textarea, char* text);
+static void option_addtext(struct formoption* option, char* text);
+static struct box* box_input(xmlNode * n, struct css_style* style, struct form* current_form, struct page_elements* elements);
+static struct form* box_form(xmlNode* n);
+static void add_form_element(struct page_elements* pe, struct form* f);
+static void add_gadget_element(struct page_elements* pe, struct gui_gadget* g);
+static void add_img_element(struct page_elements* pe, struct img* i);
/**
@@ -1290,7 +1288,8 @@ struct box* box_input(xmlNode * n, struct css_style* style, struct form* current
free(s);
}
- box->gadget->data.textbox.text = xcalloc(box->gadget->data.textbox.maxlength + 2, sizeof(char));
+ box->gadget->data.textbox.text = xcalloc(
+ box->gadget->data.textbox.maxlength + 2, sizeof(char));
if ((s = (char *) xmlGetProp(n, (const xmlChar *) "value"))) {
strncpy(box->gadget->data.textbox.text, s,
diff --git a/render/box.h b/render/box.h
index 78d78d456..d329ee331 100644
--- a/render/box.h
+++ b/render/box.h
@@ -1,5 +1,5 @@
/**
- * $Id: box.h,v 1.19 2003/02/09 12:58:15 bursa Exp $
+ * $Id: box.h,v 1.20 2003/03/04 11:59:35 bursa Exp $
*/
#ifndef _NETSURF_RENDER_BOX_H_
@@ -44,7 +44,7 @@ struct gui_gadget {
char* value;
} hidden;
struct {
- int maxlength;
+ unsigned int maxlength;
char* text;
int size;
} textbox;
diff --git a/render/html.c b/render/html.c
index b76ac15a3..b41ca6ed2 100644
--- a/render/html.c
+++ b/render/html.c
@@ -1,5 +1,5 @@
/**
- * $Id: html.c,v 1.4 2003/03/03 22:40:39 bursa Exp $
+ * $Id: html.c,v 1.5 2003/03/04 11:59:35 bursa Exp $
*/
#include <assert.h>
@@ -36,7 +36,7 @@ void html_process_data(struct content *c, char *data, unsigned long size)
htmlParseChunk(c->data.html.parser, data + x, CHUNK, 0);
gui_multitask();
}
- htmlParseChunk(c->data.html.parser, data + x, size - x, 0);
+ htmlParseChunk(c->data.html.parser, data + x, (int) (size - x), 0);
}
diff --git a/render/layout.c b/render/layout.c
index afc8c25df..a74dda48a 100644
--- a/render/layout.c
+++ b/render/layout.c
@@ -1,5 +1,5 @@
/**
- * $Id: layout.c,v 1.33 2003/02/09 12:58:15 bursa Exp $
+ * $Id: layout.c,v 1.34 2003/03/04 11:59:35 bursa Exp $
*/
#include <assert.h>
@@ -22,27 +22,27 @@
* internal functions
*/
-signed long len(struct css_length * length, struct css_style * style);
+static signed long len(struct css_length * length, struct css_style * style);
-void layout_node(struct box * box, unsigned long width, struct box * cont,
+static void layout_node(struct box * box, unsigned long width, struct box * cont,
unsigned long cx, unsigned long cy);
-void layout_block(struct box * box, unsigned long width, struct box * cont,
+static void layout_block(struct box * box, unsigned long width, struct box * cont,
unsigned long cx, unsigned long cy);
-unsigned long layout_block_children(struct box * box, unsigned long width, struct box * cont,
+static unsigned long layout_block_children(struct box * box, unsigned long width, struct box * cont,
unsigned long cx, unsigned long cy);
-void find_sides(struct box * fl, unsigned long y0, unsigned long y1,
+static void find_sides(struct box * fl, unsigned long y0, unsigned long y1,
unsigned long * x0, unsigned long * x1, struct box ** left, struct box ** right);
-void layout_inline_container(struct box * box, unsigned long width, struct box * cont,
+static void layout_inline_container(struct box * box, unsigned long width, struct box * cont,
unsigned long cx, unsigned long cy);
-signed long line_height(struct css_style * style);
-struct box * layout_line(struct box * first, unsigned long width, unsigned long * y,
+static signed long line_height(struct css_style * style);
+static struct box * layout_line(struct box * first, unsigned long width, unsigned long * y,
unsigned long cy, struct box * cont);
-void place_float_below(struct box * c, unsigned long width, unsigned long y, struct box * cont);
-void layout_table(struct box * box, unsigned long width, struct box * cont,
+static void place_float_below(struct box * c, unsigned long width, unsigned long y, struct box * cont);
+static void layout_table(struct box * box, unsigned long width, struct box * cont,
unsigned long cx, unsigned long cy);
-void calculate_widths(struct box *box);
-void calculate_inline_container_widths(struct box *box);
-void calculate_table_widths(struct box *table);
+static void calculate_widths(struct box *box);
+static void calculate_inline_container_widths(struct box *box);
+static void calculate_table_widths(struct box *table);
/**
* convert a struct css_length to pixels
@@ -106,6 +106,7 @@ void layout_node(struct box * box, unsigned long width, struct box * cont,
}
+/* TODO: change this to use style sheets */
int gadget_width(struct gui_gadget* gadget)
{
struct formoption* current;