summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2012-09-10 19:14:49 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2012-09-10 19:14:49 +0100
commita77488bab4732c30044b04e97d13707e03825bdf (patch)
treec2b056265adfe7acd76596ab5433d2ce7f227cd3
parentc733e0fbd053ffa80b83839c4114a2a28b3ed2ec (diff)
downloadlibdom-a77488bab4732c30044b04e97d13707e03825bdf.tar.gz
libdom-a77488bab4732c30044b04e97d13707e03825bdf.tar.bz2
unsigned long -> uint32_t, signed long and long -> int32_t, plus collateral fixes. Test suite does not pass
-rw-r--r--bindings/xml/expat_xmlparser.c10
-rw-r--r--bindings/xml/libxml_xmlparser.c32
-rw-r--r--include/dom/core/attr.h6
-rw-r--r--include/dom/core/characterdata.h46
-rw-r--r--include/dom/core/exceptions.h2
-rw-r--r--include/dom/core/namednodemap.h6
-rw-r--r--include/dom/core/nodelist.h6
-rw-r--r--include/dom/core/text.h6
-rw-r--r--include/dom/events/mouse_event.h32
-rw-r--r--include/dom/events/mouse_multi_wheel_event.h26
-rw-r--r--include/dom/events/mouse_wheel_event.h14
-rw-r--r--include/dom/events/ui_event.h12
-rw-r--r--include/dom/html/html_button_element.h4
-rw-r--r--include/dom/html/html_collection.h4
-rw-r--r--include/dom/html/html_form_element.h2
-rw-r--r--include/dom/html/html_input_element.h8
-rw-r--r--include/dom/html/html_options_collection.h6
-rw-r--r--include/dom/html/html_select_element.h16
-rw-r--r--include/dom/html/html_text_area_element.h12
-rw-r--r--src/core/attr.c8
-rw-r--r--src/core/characterdata.c20
-rw-r--r--src/core/characterdata.h12
-rw-r--r--src/core/element.c16
-rw-r--r--src/core/implementation.c2
-rw-r--r--src/core/namednodemap.c4
-rw-r--r--src/core/namednodemap.h4
-rw-r--r--src/core/node.c6
-rw-r--r--src/core/nodelist.c8
-rw-r--r--src/core/text.c4
-rw-r--r--src/core/text.h2
-rw-r--r--src/events/mouse_event.c16
-rw-r--r--src/events/mouse_event.h8
-rw-r--r--src/events/mouse_multi_wheel_event.c14
-rw-r--r--src/events/mouse_multi_wheel_event.h6
-rw-r--r--src/events/mouse_wheel_event.c8
-rw-r--r--src/events/mouse_wheel_event.h2
-rw-r--r--src/events/ui_event.c6
-rw-r--r--src/events/ui_event.h2
-rw-r--r--src/html/html_button_element.c8
-rw-r--r--src/html/html_collection.c10
-rw-r--r--src/html/html_document.c2
-rw-r--r--src/html/html_element.c18
-rw-r--r--src/html/html_element.h12
-rw-r--r--src/html/html_form_element.c2
-rw-r--r--src/html/html_input_element.c16
-rw-r--r--src/html/html_options_collection.c10
-rw-r--r--src/html/html_select_element.c16
-rw-r--r--src/html/html_select_element.h2
-rw-r--r--src/html/html_text_area_element.c24
-rw-r--r--src/utils/character_valid.c4
-rw-r--r--src/utils/hashtable.c4
-rw-r--r--test/testutils/domtsasserts.c14
-rw-r--r--test/testutils/domtsasserts.h10
-rw-r--r--test/testutils/foreach.c4
54 files changed, 277 insertions, 277 deletions
diff --git a/bindings/xml/expat_xmlparser.c b/bindings/xml/expat_xmlparser.c
index 1077bc9..8cf1193 100644
--- a/bindings/xml/expat_xmlparser.c
+++ b/bindings/xml/expat_xmlparser.c
@@ -214,7 +214,7 @@ expat_xmlparser_cdata_handler(void *_parser,
return;
}
- /* No longer need data */
+ /* No int32_ter need data */
dom_string_unref(data);
/* Append cdata section to parent */
@@ -230,7 +230,7 @@ expat_xmlparser_cdata_handler(void *_parser,
if (ins_cdata != NULL)
dom_node_unref(ins_cdata);
- /* No longer interested in cdata section */
+ /* No int32_ter interested in cdata section */
dom_node_unref(cdata);
}
@@ -309,7 +309,7 @@ expat_xmlparser_comment_handler(void *_parser,
return;
}
- /* No longer need data */
+ /* No int32_ter need data */
dom_string_unref(data);
/* Append comment to parent */
@@ -326,7 +326,7 @@ expat_xmlparser_comment_handler(void *_parser,
if (ins_comment != NULL)
dom_node_unref((struct dom_node *) ins_comment);
- /* No longer interested in comment */
+ /* No int32_ter interested in comment */
dom_node_unref((struct dom_node *) comment);
}
@@ -369,7 +369,7 @@ expat_xmlparser_start_doctype_decl_handler(void *_parser,
if (ins_doctype != NULL)
dom_node_unref((struct dom_node *) ins_doctype);
- /* No longer interested in doctype */
+ /* No int32_ter interested in doctype */
dom_node_unref((struct dom_node *) doctype);
}
diff --git a/bindings/xml/libxml_xmlparser.c b/bindings/xml/libxml_xmlparser.c
index 1c2442a..ddca1d4 100644
--- a/bindings/xml/libxml_xmlparser.c
+++ b/bindings/xml/libxml_xmlparser.c
@@ -672,7 +672,7 @@ void xml_parser_add_element_node(dom_xml_parser *parser,
return;
}
- /* No longer need tag name */
+ /* No int32_ter need tag name */
dom_string_unref(tag_name);
} else {
/* Namespace */
@@ -727,7 +727,7 @@ void xml_parser_add_element_node(dom_xml_parser *parser,
return;
}
- /* No longer need namespace / qname */
+ /* No int32_ter need namespace / qname */
dom_string_unref(namespace);
dom_string_unref(qname);
}
@@ -764,7 +764,7 @@ void xml_parser_add_element_node(dom_xml_parser *parser,
goto cleanup;
}
- /* No longer need attribute name */
+ /* No int32_ter need attribute name */
dom_string_unref(name);
} else {
/* Attribute has namespace */
@@ -819,7 +819,7 @@ void xml_parser_add_element_node(dom_xml_parser *parser,
return;
}
- /* No longer need namespace / qname */
+ /* No int32_ter need namespace / qname */
dom_string_unref(namespace);
dom_string_unref(qname);
}
@@ -865,7 +865,7 @@ void xml_parser_add_element_node(dom_xml_parser *parser,
if (prev_attr != NULL && prev_attr != attr)
dom_node_unref((struct dom_node *) prev_attr);
- /* We're no longer interested in the attribute node */
+ /* We're no int32_ter interested in the attribute node */
dom_node_unref((struct dom_node *) attr);
}
@@ -890,13 +890,13 @@ void xml_parser_add_element_node(dom_xml_parser *parser,
goto cleanup;
}
- /* No longer interested in element node */
+ /* No int32_ter interested in element node */
dom_node_unref((struct dom_node *) el);
return;
cleanup:
- /* No longer want node (any attributes attached to it
+ /* No int32_ter want node (any attributes attached to it
* will be cleaned up with it) */
dom_node_unref((struct dom_node *) el);
@@ -935,7 +935,7 @@ void xml_parser_add_text_node(dom_xml_parser *parser, struct dom_node *parent,
return;
}
- /* No longer need data */
+ /* No int32_ter need data */
dom_string_unref(data);
/* Append text node to parent */
@@ -960,7 +960,7 @@ void xml_parser_add_text_node(dom_xml_parser *parser, struct dom_node *parent,
return;
}
- /* No longer interested in text node */
+ /* No int32_ter interested in text node */
dom_node_unref((struct dom_node *) text);
}
@@ -996,7 +996,7 @@ void xml_parser_add_cdata_section(dom_xml_parser *parser,
return;
}
- /* No longer need data */
+ /* No int32_ter need data */
dom_string_unref(data);
/* Append cdata section to parent */
@@ -1021,7 +1021,7 @@ void xml_parser_add_cdata_section(dom_xml_parser *parser,
return;
}
- /* No longer interested in cdata section */
+ /* No int32_ter interested in cdata section */
dom_node_unref((struct dom_node *) cdata);
}
@@ -1059,7 +1059,7 @@ void xml_parser_add_entity_reference(dom_xml_parser *parser,
return;
}
- /* No longer need name */
+ /* No int32_ter need name */
dom_string_unref(name);
/* Mirror subtree (reference value) */
@@ -1089,7 +1089,7 @@ void xml_parser_add_entity_reference(dom_xml_parser *parser,
return;
}
- /* No longer interested in entity reference */
+ /* No int32_ter interested in entity reference */
dom_node_unref((struct dom_node *) entity);
}
@@ -1133,7 +1133,7 @@ void xml_parser_add_comment(dom_xml_parser *parser, struct dom_node *parent,
return;
}
- /* No longer need data */
+ /* No int32_ter need data */
dom_string_unref(data);
/* Append comment to parent */
@@ -1158,7 +1158,7 @@ void xml_parser_add_comment(dom_xml_parser *parser, struct dom_node *parent,
return;
}
- /* No longer interested in comment */
+ /* No int32_ter interested in comment */
dom_node_unref((struct dom_node *) comment);
}
@@ -1220,7 +1220,7 @@ void xml_parser_add_document_type(dom_xml_parser *parser,
return;
}
- /* No longer interested in doctype */
+ /* No int32_ter interested in doctype */
dom_node_unref((struct dom_node *) doctype);
}
diff --git a/include/dom/core/attr.h b/include/dom/core/attr.h
index 69612f7..1ae5be5 100644
--- a/include/dom/core/attr.h
+++ b/include/dom/core/attr.h
@@ -114,7 +114,7 @@ static inline dom_exception dom_attr_is_id(struct dom_attr *attr, bool *result)
* Following are our implementation specific APIs.
*
* These APIs are defined for the purpose that there are some attributes in
- * HTML and other DOM module whose type is not DOMString, but unsigned long or
+ * HTML and other DOM module whose type is not DOMString, but uint32_t or
* boolean, for those types of attributes, clients should call one of the
* following APIs to set it.
*
@@ -135,8 +135,8 @@ static inline dom_exception dom_attr_is_id(struct dom_attr *attr, bool *result)
* dom_attr_get_* functions.
*/
dom_attr_type dom_attr_get_type(dom_attr *a);
-dom_exception dom_attr_get_integer(dom_attr *a, unsigned long *value);
-dom_exception dom_attr_set_integer(dom_attr *a, unsigned long value);
+dom_exception dom_attr_get_integer(dom_attr *a, uint32_t *value);
+dom_exception dom_attr_set_integer(dom_attr *a, uint32_t value);
dom_exception dom_attr_get_short(dom_attr *a, unsigned short *value);
dom_exception dom_attr_set_short(dom_attr *a, unsigned short value);
dom_exception dom_attr_get_bool(dom_attr *a, bool *value);
diff --git a/include/dom/core/characterdata.h b/include/dom/core/characterdata.h
index 174be89..6b894fb 100644
--- a/include/dom/core/characterdata.h
+++ b/include/dom/core/characterdata.h
@@ -25,22 +25,22 @@ typedef struct dom_characterdata_vtable {
dom_string *data);
dom_exception (*dom_characterdata_get_length)(
struct dom_characterdata *cdata,
- unsigned long *length);
+ uint32_t *length);
dom_exception (*dom_characterdata_substring_data)(
- struct dom_characterdata *cdata, unsigned long offset,
- unsigned long count, dom_string **data);
+ struct dom_characterdata *cdata, uint32_t offset,
+ uint32_t count, dom_string **data);
dom_exception (*dom_characterdata_append_data)(
struct dom_characterdata *cdata,
dom_string *data);
dom_exception (*dom_characterdata_insert_data)(
struct dom_characterdata *cdata,
- unsigned long offset, dom_string *data);
+ uint32_t offset, dom_string *data);
dom_exception (*dom_characterdata_delete_data)(
struct dom_characterdata *cdata,
- unsigned long offset, unsigned long count);
+ uint32_t offset, uint32_t count);
dom_exception (*dom_characterdata_replace_data)(
- struct dom_characterdata *cdata, unsigned long offset,
- unsigned long count, dom_string *data);
+ struct dom_characterdata *cdata, uint32_t offset,
+ uint32_t count, dom_string *data);
} dom_characterdata_vtable;
@@ -63,17 +63,17 @@ static inline dom_exception dom_characterdata_set_data(
(struct dom_characterdata *) (c), (d))
static inline dom_exception dom_characterdata_get_length(
- struct dom_characterdata *cdata, unsigned long *length)
+ struct dom_characterdata *cdata, uint32_t *length)
{
return ((dom_characterdata_vtable *) ((dom_node *) cdata)->vtable)->
dom_characterdata_get_length(cdata, length);
}
#define dom_characterdata_get_length(c, l) dom_characterdata_get_length( \
- (struct dom_characterdata *) (c), (unsigned long *) (l))
+ (struct dom_characterdata *) (c), (uint32_t *) (l))
static inline dom_exception dom_characterdata_substring_data(
- struct dom_characterdata *cdata, unsigned long offset,
- unsigned long count, dom_string **data)
+ struct dom_characterdata *cdata, uint32_t offset,
+ uint32_t count, dom_string **data)
{
return ((dom_characterdata_vtable *) ((dom_node *) cdata)->vtable)->
dom_characterdata_substring_data(cdata, offset, count,
@@ -81,8 +81,8 @@ static inline dom_exception dom_characterdata_substring_data(
}
#define dom_characterdata_substring_data(c, o, ct, d) \
dom_characterdata_substring_data( \
- (struct dom_characterdata *) (c), (unsigned long) (o), \
- (unsigned long) (ct), (d))
+ (struct dom_characterdata *) (c), (uint32_t) (o), \
+ (uint32_t) (ct), (d))
static inline dom_exception dom_characterdata_append_data(
struct dom_characterdata *cdata, dom_string *data)
@@ -94,29 +94,29 @@ static inline dom_exception dom_characterdata_append_data(
(struct dom_characterdata *) (c), (d))
static inline dom_exception dom_characterdata_insert_data(
- struct dom_characterdata *cdata, unsigned long offset,
+ struct dom_characterdata *cdata, uint32_t offset,
dom_string *data)
{
return ((dom_characterdata_vtable *) ((dom_node *) cdata)->vtable)->
dom_characterdata_insert_data(cdata, offset, data);
}
#define dom_characterdata_insert_data(c, o, d) dom_characterdata_insert_data( \
- (struct dom_characterdata *) (c), (unsigned long) (o), (d))
+ (struct dom_characterdata *) (c), (uint32_t) (o), (d))
static inline dom_exception dom_characterdata_delete_data(
- struct dom_characterdata *cdata, unsigned long offset,
- unsigned long count)
+ struct dom_characterdata *cdata, uint32_t offset,
+ uint32_t count)
{
return ((dom_characterdata_vtable *) ((dom_node *) cdata)->vtable)->
dom_characterdata_delete_data(cdata, offset, count);
}
#define dom_characterdata_delete_data(c, o, ct) dom_characterdata_delete_data(\
- (struct dom_characterdata *) (c), (unsigned long) (o), \
- (unsigned long) (ct))
+ (struct dom_characterdata *) (c), (uint32_t) (o), \
+ (uint32_t) (ct))
static inline dom_exception dom_characterdata_replace_data(
- struct dom_characterdata *cdata, unsigned long offset,
- unsigned long count, dom_string *data)
+ struct dom_characterdata *cdata, uint32_t offset,
+ uint32_t count, dom_string *data)
{
return ((dom_characterdata_vtable *) ((dom_node *) cdata)->vtable)->
dom_characterdata_replace_data(cdata, offset, count,
@@ -124,7 +124,7 @@ static inline dom_exception dom_characterdata_replace_data(
}
#define dom_characterdata_replace_data(c, o, ct, d) \
dom_characterdata_replace_data(\
- (struct dom_characterdata *) (c), (unsigned long) (o),\
- (unsigned long) (ct), (d))
+ (struct dom_characterdata *) (c), (uint32_t) (o),\
+ (uint32_t) (ct), (d))
#endif
diff --git a/include/dom/core/exceptions.h b/include/dom/core/exceptions.h
index 04c7f18..67160d1 100644
--- a/include/dom/core/exceptions.h
+++ b/include/dom/core/exceptions.h
@@ -12,7 +12,7 @@
* Class of a DOM exception.
*
* The top 16 bits of a dom_exception are a bitfield
- * indicating which class the exception belongs to.
+ * indicating which class the exception beint32_ts to.
*/
typedef enum {
DOM_EXCEPTION_CLASS_NORMAL = 0,
diff --git a/include/dom/core/namednodemap.h b/include/dom/core/namednodemap.h
index fc5e886..f44e553 100644
--- a/include/dom/core/namednodemap.h
+++ b/include/dom/core/namednodemap.h
@@ -19,7 +19,7 @@ void dom_namednodemap_ref(struct dom_namednodemap *map);
void dom_namednodemap_unref(struct dom_namednodemap *map);
dom_exception dom_namednodemap_get_length(struct dom_namednodemap *map,
- unsigned long *length);
+ uint32_t *length);
dom_exception _dom_namednodemap_get_named_item(struct dom_namednodemap *map,
dom_string *name, struct dom_node **node);
@@ -47,10 +47,10 @@ dom_exception _dom_namednodemap_remove_named_item(
dom_exception _dom_namednodemap_item(struct dom_namednodemap *map,
- unsigned long index, struct dom_node **node);
+ uint32_t index, struct dom_node **node);
#define dom_namednodemap_item(m, i, n) _dom_namednodemap_item( \
- (dom_namednodemap *) (m), (unsigned long) (i), \
+ (dom_namednodemap *) (m), (uint32_t) (i), \
(dom_node **) (n))
diff --git a/include/dom/core/nodelist.h b/include/dom/core/nodelist.h
index 2aad313..369a42b 100644
--- a/include/dom/core/nodelist.h
+++ b/include/dom/core/nodelist.h
@@ -18,11 +18,11 @@ void dom_nodelist_ref(struct dom_nodelist *list);
void dom_nodelist_unref(struct dom_nodelist *list);
dom_exception dom_nodelist_get_length(struct dom_nodelist *list,
- unsigned long *length);
+ uint32_t *length);
dom_exception _dom_nodelist_item(struct dom_nodelist *list,
- unsigned long index, struct dom_node **node);
+ uint32_t index, struct dom_node **node);
#define dom_nodelist_item(l, i, n) _dom_nodelist_item((dom_nodelist *) (l), \
- (unsigned long) (i), (dom_node **) (n))
+ (uint32_t) (i), (dom_node **) (n))
#endif
diff --git a/include/dom/core/text.h b/include/dom/core/text.h
index 1750aec..7bafc8c 100644
--- a/include/dom/core/text.h
+++ b/include/dom/core/text.h
@@ -21,7 +21,7 @@ typedef struct dom_text_vtable {
struct dom_characterdata_vtable base;
dom_exception (*dom_text_split_text)(struct dom_text *text,
- unsigned long offset, struct dom_text **result);
+ uint32_t offset, struct dom_text **result);
dom_exception (*dom_text_get_is_element_content_whitespace)(
struct dom_text *text, bool *result);
dom_exception (*dom_text_get_whole_text)(struct dom_text *text,
@@ -31,13 +31,13 @@ typedef struct dom_text_vtable {
} dom_text_vtable;
static inline dom_exception dom_text_split_text(struct dom_text *text,
- unsigned long offset, struct dom_text **result)
+ uint32_t offset, struct dom_text **result)
{
return ((dom_text_vtable *) ((dom_node *) text)->vtable)->
dom_text_split_text(text, offset, result);
}
#define dom_text_split_text(t, o, r) dom_text_split_text((dom_text *) (t), \
- (unsigned long) (o), (dom_text **) (r))
+ (uint32_t) (o), (dom_text **) (r))
static inline dom_exception dom_text_get_is_element_content_whitespace(
struct dom_text *text, bool *result)
diff --git a/include/dom/events/mouse_event.h b/include/dom/events/mouse_event.h
index 8212c72..9cf84bb 100644
--- a/include/dom/events/mouse_event.h
+++ b/include/dom/events/mouse_event.h
@@ -18,24 +18,24 @@ struct dom_abstract_view;
typedef struct dom_mouse_event dom_mouse_event;
dom_exception _dom_mouse_event_get_screen_x(dom_mouse_event *evt,
- long *x);
+ int32_t *x);
#define dom_mouse_event_get_screen_x(e, x) _dom_mouse_event_get_screen_x(\
- (dom_mouse_event *) (e), (long *) (x))
+ (dom_mouse_event *) (e), (int32_t *) (x))
dom_exception _dom_mouse_event_get_screen_y(dom_mouse_event *evt,
- long *y);
+ int32_t *y);
#define dom_mouse_event_get_screen_y(e, y) _dom_mouse_event_get_screen_y(\
- (dom_mouse_event *) (e), (long *) (y))
+ (dom_mouse_event *) (e), (int32_t *) (y))
dom_exception _dom_mouse_event_get_client_x(dom_mouse_event *evt,
- long *x);
+ int32_t *x);
#define dom_mouse_event_get_client_x(e, x) _dom_mouse_event_get_client_x(\
- (dom_mouse_event *) (e), (long *) (x))
+ (dom_mouse_event *) (e), (int32_t *) (x))
dom_exception _dom_mouse_event_get_client_y(dom_mouse_event *evt,
- long *y);
+ int32_t *y);
#define dom_mouse_event_get_client_y(e, y) _dom_mouse_event_get_client_y(\
- (dom_mouse_event *) (e), (long *) (y))
+ (dom_mouse_event *) (e), (int32_t *) (y))
dom_exception _dom_mouse_event_get_ctrl_key(dom_mouse_event *evt,
bool *key);
@@ -76,32 +76,32 @@ dom_exception _dom_mouse_event_get_modifier_state(dom_mouse_event *evt,
dom_exception _dom_mouse_event_init(dom_mouse_event *evt,
dom_string *type, bool bubble, bool cancelable,
- struct dom_abstract_view *view, long detail, long screen_x,
- long screen_y, long client_x, long client_y, bool ctrl,
+ struct dom_abstract_view *view, int32_t detail, int32_t screen_x,
+ int32_t screen_y, int32_t client_x, int32_t client_y, bool ctrl,
bool alt, bool shift, bool meta, unsigned short button,
dom_event_target *et);
#define dom_mouse_event_init(e, t, b, c, v, d, sx, sy, cx, cy, ctrl, alt, \
shift, meta, button, et) \
_dom_mouse_event_init((dom_mouse_event *) (e), \
(dom_string *) (t), (bool) (b), (bool) (c),\
- (struct dom_abstract_view *) (v), (long) (d), (long) (sx), \
- (long) (sy), (long) (cx), (long) (cy), (bool) (ctrl),\
+ (struct dom_abstract_view *) (v), (int32_t) (d), (int32_t) (sx), \
+ (int32_t) (sy), (int32_t) (cx), (int32_t) (cy), (bool) (ctrl),\
(bool) (alt), (bool) (shift), (bool) (meta), \
(unsigned short) (button), (dom_event_target *) (et))
dom_exception _dom_mouse_event_init_ns(dom_mouse_event *evt,
dom_string *namespace, dom_string *type,
bool bubble, bool cancelable, struct dom_abstract_view *view,
- long detail, long screen_x, long screen_y, long client_x,
- long client_y, bool ctrl, bool alt, bool shift, bool meta,
+ int32_t detail, int32_t screen_x, int32_t screen_y, int32_t client_x,
+ int32_t client_y, bool ctrl, bool alt, bool shift, bool meta,
unsigned short button, dom_event_target *et);
#define dom_mouse_event_init_ns(e, n, t, b, c, v, d, sx, sy, cx, cy, ctrl, alt,\
shift, meta, button, et) \
_dom_mouse_event_init_ns((dom_mouse_event *) (e), \
(dom_string *) (n), (dom_string *) (t),\
(bool) (b), (bool) (c), (struct dom_abstract_view *) (v),\
- (long) (d), (long) (sx), (long) (sy), (long) (cx),\
- (long) (cy), (bool) (ctrl), (bool) (alt), (bool) (shift),\
+ (int32_t) (d), (int32_t) (sx), (int32_t) (sy), (int32_t) (cx),\
+ (int32_t) (cy), (bool) (ctrl), (bool) (alt), (bool) (shift),\
(bool) (meta), (unsigned short) (button),\
(dom_event_target *) (et))
diff --git a/include/dom/events/mouse_multi_wheel_event.h b/include/dom/events/mouse_multi_wheel_event.h
index 8d2a4eb..d8115ad 100644
--- a/include/dom/events/mouse_multi_wheel_event.h
+++ b/include/dom/events/mouse_multi_wheel_event.h
@@ -18,39 +18,39 @@ struct dom_abstract_view;
typedef struct dom_mouse_multi_wheel_event dom_mouse_multi_wheel_event;
dom_exception _dom_mouse_multi_wheel_event_get_wheel_delta_x(
- dom_mouse_multi_wheel_event *evt, long *x);
+ dom_mouse_multi_wheel_event *evt, int32_t *x);
#define dom_mouse_multi_wheel_event_get_wheel_delta_x(e, x) \
_dom_mouse_multi_wheel_event_get_wheel_delta_x( \
- (dom_mouse_multi_wheel_event *) (e), (long *) (x))
+ (dom_mouse_multi_wheel_event *) (e), (int32_t *) (x))
dom_exception _dom_mouse_multi_wheel_event_get_wheel_delta_y(
- dom_mouse_multi_wheel_event *evt, long *y);
+ dom_mouse_multi_wheel_event *evt, int32_t *y);
#define dom_mouse_multi_wheel_event_get_wheel_delta_y(e, y) \
_dom_mouse_multi_wheel_event_get_wheel_delta_y( \
- (dom_mouse_multi_wheel_event *) (e), (long *) (y))
+ (dom_mouse_multi_wheel_event *) (e), (int32_t *) (y))
dom_exception _dom_mouse_multi_wheel_event_get_wheel_delta_z(
- dom_mouse_multi_wheel_event *evt, long *z);
+ dom_mouse_multi_wheel_event *evt, int32_t *z);
#define dom_mouse_multi_wheel_event_get_wheel_delta_z(e, z) \
_dom_mouse_multi_wheel_event_get_wheel_delta_z( \
- (dom_mouse_multi_wheel_event *) (e), (long *) (z))
+ (dom_mouse_multi_wheel_event *) (e), (int32_t *) (z))
dom_exception _dom_mouse_multi_wheel_event_init_ns(
dom_mouse_multi_wheel_event *evt, dom_string *namespace,
dom_string *type, bool bubble, bool cancelable,
- struct dom_abstract_view *view, long detail, long screen_x,
- long screen_y, long client_x, long client_y,
+ struct dom_abstract_view *view, int32_t detail, int32_t screen_x,
+ int32_t screen_y, int32_t client_x, int32_t client_y,
unsigned short button, dom_event_target *et,
- dom_string *modifier_list, long wheel_delta_x,
- long wheel_delta_y, long wheel_delta_z);
+ dom_string *modifier_list, int32_t wheel_delta_x,
+ int32_t wheel_delta_y, int32_t wheel_delta_z);
#define dom_mouse_multi_wheel_event_init_ns(e, n, t, b, c, v, \
d, sx, sy, cx, cy, button, et, ml, x, y, z) \
_dom_mouse_multi_wheel_event_init_ns( \
(dom_mouse_multi_wheel_event *) (e), (dom_string *) (n),\
(dom_string *) (t), (bool) (b), (bool) (c), \
- (struct dom_abstract_view *) (v), (long) (d), (long) (sx), \
- (long) (sy), (long) (cx), (long) (cy),\
+ (struct dom_abstract_view *) (v), (int32_t) (d), (int32_t) (sx), \
+ (int32_t) (sy), (int32_t) (cx), (int32_t) (cy),\
(unsigned short) (button), (dom_event_target *) (et),\
- (dom_string *) (ml), (long) (x), (long) (y), (long) (z))
+ (dom_string *) (ml), (int32_t) (x), (int32_t) (y), (int32_t) (z))
#endif
diff --git a/include/dom/events/mouse_wheel_event.h b/include/dom/events/mouse_wheel_event.h
index 34f5e75..f753b68 100644
--- a/include/dom/events/mouse_wheel_event.h
+++ b/include/dom/events/mouse_wheel_event.h
@@ -17,26 +17,26 @@ struct dom_abstract_view;
typedef struct dom_mouse_wheel_event dom_mouse_wheel_event;
dom_exception _dom_mouse_wheel_event_get_wheel_delta(
- dom_mouse_wheel_event *evt, long *d);
+ dom_mouse_wheel_event *evt, int32_t *d);
#define dom_mouse_wheel_event_get_wheel_delta(e, d) \
_dom_mouse_wheel_event_get_wheel_delta( \
- (dom_mouse_wheel_event *) (e), (long *) (d))
+ (dom_mouse_wheel_event *) (e), (int32_t *) (d))
dom_exception _dom_mouse_wheel_event_init_ns(
dom_mouse_wheel_event *evt, dom_string *namespace,
dom_string *type, bool bubble, bool cancelable,
- struct dom_abstract_view *view, long detail, long screen_x,
- long screen_y, long client_x, long client_y,
+ struct dom_abstract_view *view, int32_t detail, int32_t screen_x,
+ int32_t screen_y, int32_t client_x, int32_t client_y,
unsigned short button, dom_event_target *et,
- dom_string *modifier_list, long wheel_delta);
+ dom_string *modifier_list, int32_t wheel_delta);
#define dom_mouse_wheel_event_init_ns(e, n, t, b, c, v, \
d, sx, sy, cx, cy, button, et, ml, dt) \
_dom_mouse_wheel_event_init_ns((dom_mouse_wheel_event *) (e), \
(dom_string *) (n), (dom_string *) (t), \
(bool) (b), (bool) (c), (struct dom_abstract_view *) (v),\
- (long) (d), (long) (sx), (long) (sy), (long) (cx), (long) (cy),\
+ (int32_t) (d), (int32_t) (sx), (int32_t) (sy), (int32_t) (cx), (int32_t) (cy),\
(unsigned short) (button), (dom_event_target *) (et),\
- (dom_string *) (ml), (long) (dt))
+ (dom_string *) (ml), (int32_t) (dt))
#endif
diff --git a/include/dom/events/ui_event.h b/include/dom/events/ui_event.h
index da321e5..0979a3b 100644
--- a/include/dom/events/ui_event.h
+++ b/include/dom/events/ui_event.h
@@ -22,24 +22,24 @@ dom_exception _dom_ui_event_get_view(dom_ui_event *evt,
(dom_ui_event *) (e), (struct dom_abstract_view **) (v))
dom_exception _dom_ui_event_get_detail(dom_ui_event *evt,
- long *detail);
+ int32_t *detail);
#define dom_ui_event_get_detail(e, d) _dom_ui_event_get_detail(\
- (dom_ui_event *) (e), (long *) (d))
+ (dom_ui_event *) (e), (int32_t *) (d))
dom_exception _dom_ui_event_init(dom_ui_event *evt, dom_string *type,
bool bubble, bool cancelable, struct dom_abstract_view *view,
- long detail);
+ int32_t detail);
#define dom_ui_event_init(e, t, b, c, v, d) _dom_ui_event_init( \
(dom_ui_event *) (e), (dom_string *) (t), (bool) (b), \
- (bool) (c), (struct dom_abstract_view *) (v), (long) (d))
+ (bool) (c), (struct dom_abstract_view *) (v), (int32_t) (d))
dom_exception _dom_ui_event_init_ns(dom_ui_event *evt,
dom_string *namespace, dom_string *type,
bool bubble, bool cancelable, struct dom_abstract_view *view,
- long detail);
+ int32_t detail);
#define dom_ui_event_init_ns(e, n, t, b, c, v, d) _dom_ui_event_init_ns( \
(dom_ui_event *) (e), (dom_string *) (n), \
(dom_string *) (t), (bool) (b), (bool) (c), \
- (struct dom_abstract_view *) (v), (long) (d))
+ (struct dom_abstract_view *) (v), (int32_t) (d))
#endif
diff --git a/include/dom/html/html_button_element.h b/include/dom/html/html_button_element.h
index 9bbd562..155d125 100644
--- a/include/dom/html/html_button_element.h
+++ b/include/dom/html/html_button_element.h
@@ -37,10 +37,10 @@ dom_exception dom_html_button_element_set_name(
dom_html_button_element *button, dom_string *name);
dom_exception dom_html_button_element_get_tab_index(
- dom_html_button_element *button, long *tab_index);
+ dom_html_button_element *button, int32_t *tab_index);
dom_exception dom_html_button_element_set_tab_index(
- dom_html_button_element *button, unsigned long tab_index);
+ dom_html_button_element *button, uint32_t tab_index);
dom_exception dom_html_button_element_get_type(
dom_html_button_element *button, dom_string **type);
diff --git a/include/dom/html/html_collection.h b/include/dom/html/html_collection.h
index 7322ea8..9521f94 100644
--- a/include/dom/html/html_collection.h
+++ b/include/dom/html/html_collection.h
@@ -16,9 +16,9 @@ struct dom_node;
typedef struct dom_html_collection dom_html_collection;
dom_exception dom_html_collection_get_length(dom_html_collection *col,
- unsigned long *len);
+ uint32_t *len);
dom_exception dom_html_collection_item(dom_html_collection *col,
- unsigned long index, struct dom_node **node);
+ uint32_t index, struct dom_node **node);
dom_exception dom_html_collection_named_item(dom_html_collection *col,
dom_string *name, struct dom_node **node);
diff --git a/include/dom/html/html_form_element.h b/include/dom/html/html_form_element.h
index c4ee1d8..81637a3 100644
--- a/include/dom/html/html_form_element.h
+++ b/include/dom/html/html_form_element.h
@@ -18,7 +18,7 @@ typedef struct dom_html_form_element dom_html_form_element;
dom_exception dom_html_form_element_get_elements(dom_html_form_element *ele,
struct dom_html_collection **col);
dom_exception dom_html_form_element_get_length(dom_html_form_element *ele,
- unsigned long *len);
+ uint32_t *len);
dom_exception dom_html_form_element_get_accept_charset(
dom_html_form_element *ele, dom_string **accept_charset);
diff --git a/include/dom/html/html_input_element.h b/include/dom/html/html_input_element.h
index 6d87bd9..eb6aecd 100644
--- a/include/dom/html/html_input_element.h
+++ b/include/dom/html/html_input_element.h
@@ -67,10 +67,10 @@ dom_exception dom_html_input_element_set_disabled(
dom_html_input_element *input, bool disabled);
dom_exception dom_html_input_element_get_max_length(
- dom_html_input_element *input, long *max_length);
+ dom_html_input_element *input, int32_t *max_length);
dom_exception dom_html_input_element_set_max_length(
- dom_html_input_element *input, unsigned long max_length);
+ dom_html_input_element *input, uint32_t max_length);
dom_exception dom_html_input_element_get_name(
dom_html_input_element *input, dom_string **name);
@@ -97,10 +97,10 @@ dom_exception dom_html_input_element_set_src(
dom_html_input_element *input, dom_string *src);
dom_exception dom_html_input_element_get_tab_index(
- dom_html_input_element *input, long *tab_index);
+ dom_html_input_element *input, int32_t *tab_index);
dom_exception dom_html_input_element_set_tab_index(
- dom_html_input_element *input, unsigned long tab_index);
+ dom_html_input_element *input, uint32_t tab_index);
dom_exception dom_html_input_element_get_type(
dom_html_input_element *input, dom_string **type);
diff --git a/include/dom/html/html_options_collection.h b/include/dom/html/html_options_collection.h
index d11221a..5825fb0 100644
--- a/include/dom/html/html_options_collection.h
+++ b/include/dom/html/html_options_collection.h
@@ -16,11 +16,11 @@ struct dom_node;
typedef struct dom_html_options_collection dom_html_options_collection;
dom_exception dom_html_options_collection_get_length(
- dom_html_options_collection *col, unsigned long *len);
+ dom_html_options_collection *col, uint32_t *len);
dom_exception dom_html_options_collection_set_length(
- dom_html_options_collection *col, unsigned long len);
+ dom_html_options_collection *col, uint32_t len);
dom_exception dom_html_options_collection_item(
- dom_html_options_collection *col, unsigned long index,
+ dom_html_options_collection *col, uint32_t index,
struct dom_node **node);
dom_exception dom_html_options_collection_named_item(
dom_html_options_collection *col, dom_string *name,
diff --git a/include/dom/html/html_select_element.h b/include/dom/html/html_select_element.h
index 10c002a..a052be1 100644
--- a/include/dom/html/html_select_element.h
+++ b/include/dom/html/html_select_element.h
@@ -18,13 +18,13 @@ struct dom_html_options_collection;
struct dom_html_element;
dom_exception dom_html_select_element_get_selected_index(
- dom_html_select_element *ele, unsigned long *index);
+ dom_html_select_element *ele, uint32_t *index);
dom_exception dom_html_select_element_set_selected_index(
- dom_html_select_element *ele, unsigned long index);
+ dom_html_select_element *ele, uint32_t index);
dom_exception dom_html_select_element_get_length(
- dom_html_select_element *ele, unsigned long *len);
+ dom_html_select_element *ele, uint32_t *len);
dom_exception dom_html_select_element_set_length(
- dom_html_select_element *ele, unsigned long len);
+ dom_html_select_element *ele, uint32_t len);
dom_exception dom_html_select_element_get_options(
dom_html_select_element *ele,
struct dom_html_options_collection **col);
@@ -37,13 +37,13 @@ dom_exception dom_html_select_element_get_multiple(
dom_exception dom_html_select_element_set_multiple(
dom_html_select_element *ele, bool multiple);
dom_exception dom_html_select_element_get_size(
- dom_html_select_element *ele, unsigned long *size);
+ dom_html_select_element *ele, uint32_t *size);
dom_exception dom_html_select_element_set_size(
- dom_html_select_element *ele, unsigned long size);
+ dom_html_select_element *ele, uint32_t size);
dom_exception dom_html_select_element_get_tab_index(
- dom_html_select_element *ele, unsigned long *tab_index);
+ dom_html_select_element *ele, uint32_t *tab_index);
dom_exception dom_html_select_element_set_tab_index(
- dom_html_select_element *ele, unsigned long tab_index);
+ dom_html_select_element *ele, uint32_t tab_index);
/* Functions */
dom_exception dom_html_select_element_add(struct dom_html_element *ele,
diff --git a/include/dom/html/html_text_area_element.h b/include/dom/html/html_text_area_element.h
index ce610ad..9954e04 100644
--- a/include/dom/html/html_text_area_element.h
+++ b/include/dom/html/html_text_area_element.h
@@ -37,16 +37,16 @@ dom_exception dom_html_text_area_element_set_disabled(
dom_html_text_area_element *text_area, bool disabled);
dom_exception dom_html_text_area_element_get_cols(
- dom_html_text_area_element *text_area, long *cols);
+ dom_html_text_area_element *text_area, int32_t *cols);
dom_exception dom_html_text_area_element_set_cols(
- dom_html_text_area_element *text_area, unsigned long cols);
+ dom_html_text_area_element *text_area, uint32_t cols);
dom_exception dom_html_text_area_element_get_rows(
- dom_html_text_area_element *text_area, long *rows);
+ dom_html_text_area_element *text_area, int32_t *rows);
dom_exception dom_html_text_area_element_set_rows(
- dom_html_text_area_element *text_area, unsigned long rows);
+ dom_html_text_area_element *text_area, uint32_t rows);
dom_exception dom_html_text_area_element_get_name(
dom_html_text_area_element *text_area, dom_string **name);
@@ -61,10 +61,10 @@ dom_exception dom_html_text_area_element_set_read_only(
dom_html_text_area_element *text_area, bool read_only);
dom_exception dom_html_text_area_element_get_tab_index(
- dom_html_text_area_element *text_area, long *tab_index);
+ dom_html_text_area_element *text_area, int32_t *tab_index);
dom_exception dom_html_text_area_element_set_tab_index(
- dom_html_text_area_element *text_area, unsigned long tab_index);
+ dom_html_text_area_element *text_area, uint32_t tab_index);
dom_exception dom_html_text_area_element_get_type(
dom_html_text_area_element *text_area, dom_string **type);
diff --git a/src/core/attr.c b/src/core/attr.c
index 9db04b6..d9e2b07 100644
--- a/src/core/attr.c
+++ b/src/core/attr.c
@@ -36,7 +36,7 @@ struct dom_attr {
dom_attr_type type; /**< The type of this attribute */
union {
- unsigned long lvalue;
+ uint32_t lvalue;
unsigned short svalue;
bool bvalue;
} value; /**< The special type value of this attribute */
@@ -204,7 +204,7 @@ dom_attr_type dom_attr_get_type(dom_attr *a)
* DOM_ATTR_WRONG_TYPE_ERR if the attribute node is not a integer
* attribute
*/
-dom_exception dom_attr_get_integer(dom_attr *a, unsigned long *value)
+dom_exception dom_attr_get_integer(dom_attr *a, uint32_t *value)
{
if (a->type != DOM_ATTR_INTEGER)
return DOM_ATTR_WRONG_TYPE_ERR;
@@ -223,7 +223,7 @@ dom_exception dom_attr_get_integer(dom_attr *a, unsigned long *value)
* DOM_ATTR_WRONG_TYPE_ERR if the attribute node is not a integer
* attribute
*/
-dom_exception dom_attr_set_integer(dom_attr *a, unsigned long value)
+dom_exception dom_attr_set_integer(dom_attr *a, uint32_t value)
{
struct dom_document *doc;
struct dom_node_internal *ele;
@@ -507,7 +507,7 @@ dom_exception _dom_attr_get_value(struct dom_attr *attr,
return err;
}
- /* No longer need textual representation */
+ /* No int32_ter need textual representation */
dom_string_unref(tr);
/* Finished with previous value */
diff --git a/src/core/characterdata.c b/src/core/characterdata.c
index 0883444..c46a5c6 100644
--- a/src/core/characterdata.c
+++ b/src/core/characterdata.c
@@ -159,7 +159,7 @@ dom_exception _dom_characterdata_set_data(struct dom_characterdata *cdata,
* \return DOM_NO_ERR.
*/
dom_exception _dom_characterdata_get_length(struct dom_characterdata *cdata,
- unsigned long *length)
+ uint32_t *length)
{
struct dom_node_internal *c = (struct dom_node_internal *) cdata;
@@ -192,13 +192,13 @@ dom_exception _dom_characterdata_get_length(struct dom_characterdata *cdata,
* this implementation; dom_strings are unbounded.
*/
dom_exception _dom_characterdata_substring_data(
- struct dom_characterdata *cdata, unsigned long offset,
- unsigned long count, dom_string **data)
+ struct dom_characterdata *cdata, uint32_t offset,
+ uint32_t count, dom_string **data)
{
struct dom_node_internal *c = (struct dom_node_internal *) cdata;
uint32_t len, end;
- if ((signed long) offset < 0 || (signed long) count < 0) {
+ if ((int32_t) offset < 0 || (int32_t) count < 0) {
return DOM_INDEX_SIZE_ERR;
}
@@ -273,7 +273,7 @@ dom_exception _dom_characterdata_append_data(struct dom_characterdata *cdata,
* DOM_NO_MODIFICATION_ALLOWED_ERR if ::cdata is readonly.
*/
dom_exception _dom_characterdata_insert_data(struct dom_characterdata *cdata,
- unsigned long offset, dom_string *data)
+ uint32_t offset, dom_string *data)
{
struct dom_node_internal *c = (struct dom_node_internal *) cdata;
dom_string *temp;
@@ -286,7 +286,7 @@ dom_exception _dom_characterdata_insert_data(struct dom_characterdata *cdata,
return DOM_NO_MODIFICATION_ALLOWED_ERR;
}
- if ((signed long) offset < 0) {
+ if ((int32_t) offset < 0) {
return DOM_INDEX_SIZE_ERR;
}
@@ -335,7 +335,7 @@ dom_exception _dom_characterdata_insert_data(struct dom_characterdata *cdata,
* DOM_NO_MODIFICATION_ALLOWED_ERR if ::cdata is readonly.
*/
dom_exception _dom_characterdata_delete_data(struct dom_characterdata *cdata,
- unsigned long offset, unsigned long count)
+ uint32_t offset, uint32_t count)
{
struct dom_node_internal *c = (struct dom_node_internal *) cdata;
dom_string *temp;
@@ -349,7 +349,7 @@ dom_exception _dom_characterdata_delete_data(struct dom_characterdata *cdata,
return DOM_NO_MODIFICATION_ALLOWED_ERR;
}
- if ((signed long) offset < 0 || (signed long) count < 0) {
+ if ((int32_t) offset < 0 || (int32_t) count < 0) {
return DOM_INDEX_SIZE_ERR;
}
@@ -404,7 +404,7 @@ dom_exception _dom_characterdata_delete_data(struct dom_characterdata *cdata,
* DOM_NO_MODIFICATION_ALLOWED_ERR if ::cdata is readonly.
*/
dom_exception _dom_characterdata_replace_data(struct dom_characterdata *cdata,
- unsigned long offset, unsigned long count,
+ uint32_t offset, uint32_t count,
dom_string *data)
{
struct dom_node_internal *c = (struct dom_node_internal *) cdata;
@@ -418,7 +418,7 @@ dom_exception _dom_characterdata_replace_data(struct dom_characterdata *cdata,
return DOM_NO_MODIFICATION_ALLOWED_ERR;
}
- if ((signed long) offset < 0 || (signed long) count < 0) {
+ if ((int32_t) offset < 0 || (int32_t) count < 0) {
return DOM_INDEX_SIZE_ERR;
}
diff --git a/src/core/characterdata.h b/src/core/characterdata.h
index 23be9c9..0b0889c 100644
--- a/src/core/characterdata.h
+++ b/src/core/characterdata.h
@@ -34,18 +34,18 @@ dom_exception _dom_characterdata_get_data(struct dom_characterdata *cdata,
dom_exception _dom_characterdata_set_data(struct dom_characterdata *cdata,
dom_string *data);
dom_exception _dom_characterdata_get_length(struct dom_characterdata *cdata,
- unsigned long *length);
+ uint32_t *length);
dom_exception _dom_characterdata_substring_data(
- struct dom_characterdata *cdata, unsigned long offset,
- unsigned long count, dom_string **data);
+ struct dom_characterdata *cdata, uint32_t offset,
+ uint32_t count, dom_string **data);
dom_exception _dom_characterdata_append_data(struct dom_characterdata *cdata,
dom_string *data);
dom_exception _dom_characterdata_insert_data(struct dom_characterdata *cdata,
- unsigned long offset, dom_string *data);
+ uint32_t offset, dom_string *data);
dom_exception _dom_characterdata_delete_data(struct dom_characterdata *cdata,
- unsigned long offset, unsigned long count);
+ uint32_t offset, uint32_t count);
dom_exception _dom_characterdata_replace_data(struct dom_characterdata *cdata,
- unsigned long offset, unsigned long count,
+ uint32_t offset, uint32_t count,
dom_string *data);
dom_exception _dom_characterdata_get_text_content(
dom_node_internal *node,
diff --git a/src/core/element.c b/src/core/element.c
index 8908968..df40eaf 100644
--- a/src/core/element.c
+++ b/src/core/element.c
@@ -485,7 +485,7 @@ static dom_exception _dom_element_set_id_attr(struct dom_element *element,
/* The operation set for namednodemap */
static dom_exception attributes_get_length(void *priv,
- unsigned long *length);
+ uint32_t *length);
static dom_exception attributes_get_named_item(void *priv,
dom_string *name, struct dom_node **node);
static dom_exception attributes_set_named_item(void *priv,
@@ -494,7 +494,7 @@ static dom_exception attributes_remove_named_item(
void *priv, dom_string *name,
struct dom_node **node);
static dom_exception attributes_item(void *priv,
- unsigned long index, struct dom_node **node);
+ uint32_t index, struct dom_node **node);
static dom_exception attributes_get_named_item_ns(
void *priv, dom_string *namespace,
dom_string *localname, struct dom_node **node);
@@ -739,7 +739,7 @@ dom_exception _dom_element_get_attribute_node(struct dom_element *element,
* \param attr The attribute node to add
* \param result Pointer to location to receive previous node
* \return DOM_NO_ERR on success,
- * DOM_WRONG_DOCUMENT_ERR if ::attr does not belong to the
+ * DOM_WRONG_DOCUMENT_ERR if ::attr does not beint32_t to the
* same document as ::element,
* DOM_NO_MODIFICATION_ALLOWED_ERR if ::element is readonly,
* DOM_INUSE_ATTRIBUTE_ERR if ::attr is already an attribute
@@ -944,7 +944,7 @@ dom_exception _dom_element_get_attribute_node_ns(struct dom_element *element,
* \param attr The attribute node to add
* \param result Pointer to location to recieve previous node
* \return DOM_NO_ERR on success,
- * DOM_WRONG_DOCUMENT_ERR if ::attr does not belong to the
+ * DOM_WRONG_DOCUMENT_ERR if ::attr does not beint32_t to the
* same document as ::element,
* DOM_NO_MODIFICATION_ALLOWED_ERR if ::element is readonly,
* DOM_INUSE_ATTRIBUTE_ERR if ::attr is already an attribute
@@ -1843,7 +1843,7 @@ dom_exception _dom_element_get_attr_node(struct dom_element *element,
* \param attr The attribute node to add
* \param result Pointer to location to receive previous node
* \return DOM_NO_ERR on success,
- * DOM_WRONG_DOCUMENT_ERR if ::attr does not belong to the
+ * DOM_WRONG_DOCUMENT_ERR if ::attr does not beint32_t to the
* same document as ::element,
* DOM_NO_MODIFICATION_ALLOWED_ERR if ::element is readonly,
* DOM_INUSE_ATTRIBUTE_ERR if ::attr is already an attribute
@@ -1869,7 +1869,7 @@ dom_exception _dom_element_set_attr_node(struct dom_element *element,
/** \todo validate name */
- /* Ensure element and attribute belong to the same document */
+ /* Ensure element and attribute beint32_t to the same document */
if (e->owner != attr_node->owner)
return DOM_WRONG_DOCUMENT_ERR;
@@ -2226,7 +2226,7 @@ dom_exception _dom_element_get_id(struct dom_element *ele, dom_string **id)
/* Implementation function for NamedNodeMap, see core/namednodemap.h for
* details */
-dom_exception attributes_get_length(void *priv, unsigned long *length)
+dom_exception attributes_get_length(void *priv, uint32_t *length)
{
dom_element *e = (dom_element *) priv;
@@ -2283,7 +2283,7 @@ dom_exception attributes_remove_named_item(
/* Implementation function for NamedNodeMap, see core/namednodemap.h for
* details */
dom_exception attributes_item(void *priv,
- unsigned long index, struct dom_node **node)
+ uint32_t index, struct dom_node **node)
{
dom_attr_list * match = NULL;
unsigned int num = index + 1;
diff --git a/src/core/implementation.c b/src/core/implementation.c
index 26908f2..6041c22 100644
--- a/src/core/implementation.c
+++ b/src/core/implementation.c
@@ -266,7 +266,7 @@ dom_exception dom_implementation_create_document(
return err;
}
- /* No longer interested in inserted node */
+ /* No int32_ter interested in inserted node */
dom_node_unref(inserted);
/* Done with element */
diff --git a/src/core/namednodemap.c b/src/core/namednodemap.c
index f68cd3b..ada7e90 100644
--- a/src/core/namednodemap.c
+++ b/src/core/namednodemap.c
@@ -117,7 +117,7 @@ void dom_namednodemap_unref(dom_namednodemap *map)
* \return DOM_NO_ERR.
*/
dom_exception dom_namednodemap_get_length(dom_namednodemap *map,
- unsigned long *length)
+ uint32_t *length)
{
assert(map->opt != NULL);
return map->opt->namednodemap_get_length(map->priv, length);
@@ -209,7 +209,7 @@ dom_exception _dom_namednodemap_remove_named_item(
* should unref the node once it has finished with it.
*/
dom_exception _dom_namednodemap_item(dom_namednodemap *map,
- unsigned long index, dom_node **node)
+ uint32_t index, dom_node **node)
{
assert(map->opt != NULL);
return map->opt->namednodemap_item(map->priv, index, node);
diff --git a/src/core/namednodemap.h b/src/core/namednodemap.h
index 079294c..62e5858 100644
--- a/src/core/namednodemap.h
+++ b/src/core/namednodemap.h
@@ -19,7 +19,7 @@ struct dom_namednodemap;
struct nnm_operation {
dom_exception (*namednodemap_get_length)(void *priv,
- unsigned long *length);
+ uint32_t *length);
dom_exception (*namednodemap_get_named_item)(void *priv,
dom_string *name, struct dom_node **node);
@@ -32,7 +32,7 @@ struct nnm_operation {
struct dom_node **node);
dom_exception (*namednodemap_item)(void *priv,
- unsigned long index, struct dom_node **node);
+ uint32_t index, struct dom_node **node);
dom_exception (*namednodemap_get_named_item_ns)(
void *priv, dom_string *namespace,
diff --git a/src/core/node.c b/src/core/node.c
index ca8fd72..b14f4fa 100644
--- a/src/core/node.c
+++ b/src/core/node.c
@@ -167,7 +167,7 @@ dom_exception _dom_node_initialise(dom_node_internal *node,
node->previous = NULL;
node->next = NULL;
- /* Note: nodes do not reference the document to which they belong,
+ /* Note: nodes do not reference the document to which they beint32_t,
* as this would result in the document never being destroyed once
* the client has finished with it. The document will be aware of
* any nodes that it owns through 2 mechanisms:
@@ -783,7 +783,7 @@ dom_exception _dom_node_insert_before(dom_node_internal *node,
* also need to set its owner. */
if (node->type == DOM_DOCUMENT_NODE &&
new_child->type == DOM_DOCUMENT_TYPE_NODE) {
- /* See long comment in _dom_node_initialise as to why
+ /* See int32_t comment in _dom_node_initialise as to why
* we don't ref the document here */
new_child->owner = (struct dom_document *) node;
}
@@ -1277,7 +1277,7 @@ dom_exception _dom_node_set_prefix(dom_node_internal *node,
return DOM_NO_MODIFICATION_ALLOWED_ERR;
}
- /* No longer want existing prefix */
+ /* No int32_ter want existing prefix */
if (node->prefix != NULL) {
dom_string_unref(node->prefix);
}
diff --git a/src/core/nodelist.c b/src/core/nodelist.c
index 8ce9475..e2a1435 100644
--- a/src/core/nodelist.c
+++ b/src/core/nodelist.c
@@ -196,10 +196,10 @@ void dom_nodelist_unref(dom_nodelist *list)
* \param length Pointer to location to receive length
* \return DOM_NO_ERR.
*/
-dom_exception dom_nodelist_get_length(dom_nodelist *list, unsigned long *length)
+dom_exception dom_nodelist_get_length(dom_nodelist *list, uint32_t *length)
{
dom_node_internal *cur = list->root->first_child;
- unsigned long len = 0;
+ uint32_t len = 0;
/* Traverse data structure */
while (cur != NULL) {
@@ -300,10 +300,10 @@ dom_exception dom_nodelist_get_length(dom_nodelist *list, unsigned long *length)
* should unref the node once it has finished with it.
*/
dom_exception _dom_nodelist_item(dom_nodelist *list,
- unsigned long index, dom_node **node)
+ uint32_t index, dom_node **node)
{
dom_node_internal *cur = list->root->first_child;
- unsigned long count = 0;
+ uint32_t count = 0;
/* Traverse data structure */
while (cur != NULL) {
diff --git a/src/core/text.c b/src/core/text.c
index 532ee13..94718a2 100644
--- a/src/core/text.c
+++ b/src/core/text.c
@@ -178,12 +178,12 @@ void _dom_text_finalise(dom_text *text)
* once it has finished with it.
*/
dom_exception _dom_text_split_text(dom_text *text,
- unsigned long offset, dom_text **result)
+ uint32_t offset, dom_text **result)
{
dom_node_internal *t = (dom_node_internal *) text;
dom_string *value;
dom_text *res;
- unsigned long len;
+ uint32_t len;
dom_exception err;
if (_dom_node_readonly(t)) {
diff --git a/src/core/text.h b/src/core/text.h
index 1cc5b1e..26424ce 100644
--- a/src/core/text.h
+++ b/src/core/text.h
@@ -43,7 +43,7 @@ void _dom_text_finalise(dom_text *text);
/* Virtual functions for dom_text */
dom_exception _dom_text_split_text(dom_text *text,
- unsigned long offset, dom_text **result);
+ uint32_t offset, dom_text **result);
dom_exception _dom_text_get_is_element_content_whitespace(
dom_text *text, bool *result);
dom_exception _dom_text_get_whole_text(dom_text *text,
diff --git a/src/events/mouse_event.c b/src/events/mouse_event.c
index a2a97bb..3e76879 100644
--- a/src/events/mouse_event.c
+++ b/src/events/mouse_event.c
@@ -66,7 +66,7 @@ void _virtual_dom_mouse_event_destroy(struct dom_event *evt)
* \return DOM_NO_ERR.
*/
dom_exception _dom_mouse_event_get_screen_x(dom_mouse_event *evt,
- long *x)
+ int32_t *x)
{
*x = evt->sx;
@@ -81,7 +81,7 @@ dom_exception _dom_mouse_event_get_screen_x(dom_mouse_event *evt,
* \return DOM_NO_ERR.
*/
dom_exception _dom_mouse_event_get_screen_y(dom_mouse_event *evt,
- long *y)
+ int32_t *y)
{
*y = evt->sy;
@@ -96,7 +96,7 @@ dom_exception _dom_mouse_event_get_screen_y(dom_mouse_event *evt,
* \return DOM_NO_ERR.
*/
dom_exception _dom_mouse_event_get_client_x(dom_mouse_event *evt,
- long *x)
+ int32_t *x)
{
*x = evt->cx;
@@ -111,7 +111,7 @@ dom_exception _dom_mouse_event_get_client_x(dom_mouse_event *evt,
* \return DOM_NO_ERR.
*/
dom_exception _dom_mouse_event_get_client_y(dom_mouse_event *evt,
- long *y)
+ int32_t *y)
{
*y = evt->cy;
@@ -282,8 +282,8 @@ dom_exception _dom_mouse_event_get_modifier_state(dom_mouse_event *evt,
*/
dom_exception _dom_mouse_event_init(dom_mouse_event *evt,
dom_string *type, bool bubble, bool cancelable,
- struct dom_abstract_view *view, long detail, long screen_x,
- long screen_y, long client_x, long client_y, bool ctrl,
+ struct dom_abstract_view *view, int32_t detail, int32_t screen_x,
+ int32_t screen_y, int32_t client_x, int32_t client_y, bool ctrl,
bool alt, bool shift, bool meta, unsigned short button,
dom_event_target *et)
{
@@ -337,8 +337,8 @@ dom_exception _dom_mouse_event_init(dom_mouse_event *evt,
dom_exception _dom_mouse_event_init_ns(dom_mouse_event *evt,
dom_string *namespace, dom_string *type,
bool bubble, bool cancelable, struct dom_abstract_view *view,
- long detail, long screen_x, long screen_y, long client_x,
- long client_y, bool ctrl, bool alt, bool shift, bool meta,
+ int32_t detail, int32_t screen_x, int32_t screen_y, int32_t client_x,
+ int32_t client_y, bool ctrl, bool alt, bool shift, bool meta,
unsigned short button, dom_event_target *et)
{
evt->sx = screen_x;
diff --git a/src/events/mouse_event.h b/src/events/mouse_event.h
index 85246e7..e49bcd7 100644
--- a/src/events/mouse_event.h
+++ b/src/events/mouse_event.h
@@ -18,10 +18,10 @@
struct dom_mouse_event {
struct dom_ui_event base; /**< Base class */
- long sx; /**< ScreenX */
- long sy; /**< ScreenY */
- long cx; /**< ClientX */
- long cy; /**< ClientY */
+ int32_t sx; /**< ScreenX */
+ int32_t sy; /**< ScreenY */
+ int32_t cx; /**< ClientX */
+ int32_t cy; /**< ClientY */
uint32_t modifier_state; /**< The modifier keys state */
diff --git a/src/events/mouse_multi_wheel_event.c b/src/events/mouse_multi_wheel_event.c
index 8c4615b..35f91af 100644
--- a/src/events/mouse_multi_wheel_event.c
+++ b/src/events/mouse_multi_wheel_event.c
@@ -67,7 +67,7 @@ void _virtual_dom_mouse_multi_wheel_event_destroy(struct dom_event *evt)
* \return DOM_NO_ERR.
*/
dom_exception _dom_mouse_multi_wheel_event_get_wheel_delta_x(
- dom_mouse_multi_wheel_event *evt, long *x)
+ dom_mouse_multi_wheel_event *evt, int32_t *x)
{
*x = evt->x;
@@ -82,7 +82,7 @@ dom_exception _dom_mouse_multi_wheel_event_get_wheel_delta_x(
* \return DOM_NO_ERR.
*/
dom_exception _dom_mouse_multi_wheel_event_get_wheel_delta_y(
- dom_mouse_multi_wheel_event *evt, long *y)
+ dom_mouse_multi_wheel_event *evt, int32_t *y)
{
*y = evt->y;
@@ -97,7 +97,7 @@ dom_exception _dom_mouse_multi_wheel_event_get_wheel_delta_y(
* \return DOM_NO_ERR.
*/
dom_exception _dom_mouse_multi_wheel_event_get_wheel_delta_z(
- dom_mouse_multi_wheel_event *evt, long *z)
+ dom_mouse_multi_wheel_event *evt, int32_t *z)
{
*z = evt->z;
@@ -129,11 +129,11 @@ dom_exception _dom_mouse_multi_wheel_event_get_wheel_delta_z(
dom_exception _dom_mouse_multi_wheel_event_init_ns(
dom_mouse_multi_wheel_event *evt, dom_string *namespace,
dom_string *type, bool bubble, bool cancelable,
- struct dom_abstract_view *view, long detail, long screen_x,
- long screen_y, long client_x, long client_y,
+ struct dom_abstract_view *view, int32_t detail, int32_t screen_x,
+ int32_t screen_y, int32_t client_x, int32_t client_y,
unsigned short button, dom_event_target *et,
- dom_string *modifier_list, long wheel_delta_x,
- long wheel_delta_y, long wheel_delta_z)
+ dom_string *modifier_list, int32_t wheel_delta_x,
+ int32_t wheel_delta_y, int32_t wheel_delta_z)
{
dom_exception err;
dom_mouse_event *e = (dom_mouse_event *) evt;
diff --git a/src/events/mouse_multi_wheel_event.h b/src/events/mouse_multi_wheel_event.h
index 9b854c9..0476911 100644
--- a/src/events/mouse_multi_wheel_event.h
+++ b/src/events/mouse_multi_wheel_event.h
@@ -18,9 +18,9 @@
struct dom_mouse_multi_wheel_event {
struct dom_mouse_event base; /**< The base class */
- long x; /**< The wheelDeltaX */
- long y; /**< The wheelDeltaY */
- long z; /**< The wheelDeltaZ */
+ int32_t x; /**< The wheelDeltaX */
+ int32_t y; /**< The wheelDeltaY */
+ int32_t z; /**< The wheelDeltaZ */
};
/* Constructor */
diff --git a/src/events/mouse_wheel_event.c b/src/events/mouse_wheel_event.c
index cce4fac..778a53b 100644
--- a/src/events/mouse_wheel_event.c
+++ b/src/events/mouse_wheel_event.c
@@ -65,7 +65,7 @@ void _virtual_dom_mouse_wheel_event_destroy(struct dom_event *evt)
* \return DOM_NO_ERR.
*/
dom_exception _dom_mouse_wheel_event_get_wheel_delta(
- dom_mouse_wheel_event *evt, long *d)
+ dom_mouse_wheel_event *evt, int32_t *d)
{
*d = evt->delta;
@@ -95,10 +95,10 @@ dom_exception _dom_mouse_wheel_event_get_wheel_delta(
dom_exception _dom_mouse_wheel_event_init_ns(
dom_mouse_wheel_event *evt, dom_string *namespace,
dom_string *type, bool bubble, bool cancelable,
- struct dom_abstract_view *view, long detail, long screen_x,
- long screen_y, long client_x, long client_y,
+ struct dom_abstract_view *view, int32_t detail, int32_t screen_x,
+ int32_t screen_y, int32_t client_x, int32_t client_y,
unsigned short button, dom_event_target *et,
- dom_string *modifier_list, long wheel_delta)
+ dom_string *modifier_list, int32_t wheel_delta)
{
dom_exception err;
dom_mouse_event *e = (dom_mouse_event *) evt;
diff --git a/src/events/mouse_wheel_event.h b/src/events/mouse_wheel_event.h
index 9247d4a..e78abf6 100644
--- a/src/events/mouse_wheel_event.h
+++ b/src/events/mouse_wheel_event.h
@@ -18,7 +18,7 @@
struct dom_mouse_wheel_event {
struct dom_mouse_event base; /**< The base class */
- long delta; /**< The wheelDelta */
+ int32_t delta; /**< The wheelDelta */
};
/* Constructor */
diff --git a/src/events/ui_event.c b/src/events/ui_event.c
index 0082332..911b0d0 100644
--- a/src/events/ui_event.c
+++ b/src/events/ui_event.c
@@ -84,7 +84,7 @@ dom_exception _dom_ui_event_get_view(dom_ui_event *evt,
* \return DOM_NO_ERR.
*/
dom_exception _dom_ui_event_get_detail(dom_ui_event *evt,
- long *detail)
+ int32_t *detail)
{
*detail = evt->detail;
@@ -104,7 +104,7 @@ dom_exception _dom_ui_event_get_detail(dom_ui_event *evt,
*/
dom_exception _dom_ui_event_init(dom_ui_event *evt, dom_string *type,
bool bubble, bool cancelable, struct dom_abstract_view *view,
- long detail)
+ int32_t detail)
{
evt->view = view;
evt->detail = detail;
@@ -127,7 +127,7 @@ dom_exception _dom_ui_event_init(dom_ui_event *evt, dom_string *type,
dom_exception _dom_ui_event_init_ns(dom_ui_event *evt,
dom_string *namespace, dom_string *type,
bool bubble, bool cancelable, struct dom_abstract_view *view,
- long detail)
+ int32_t detail)
{
evt->view = view;
evt->detail = detail;
diff --git a/src/events/ui_event.h b/src/events/ui_event.h
index d90f6d7..e60ed35 100644
--- a/src/events/ui_event.h
+++ b/src/events/ui_event.h
@@ -32,7 +32,7 @@ typedef enum {
struct dom_ui_event {
struct dom_event base; /**< The base class */
struct dom_abstract_view *view; /**< The AbstractView */
- long detail; /**< Some private data for this event */
+ int32_t detail; /**< Some private data for this event */
};
/* Constructor */
diff --git a/src/html/html_button_element.c b/src/html/html_button_element.c
index 47fdb7b..95b5d31 100644
--- a/src/html/html_button_element.c
+++ b/src/html/html_button_element.c
@@ -196,16 +196,16 @@ SIMPLE_GET(type);
SIMPLE_GET_SET(value);
dom_exception dom_html_button_element_get_tab_index(
- dom_html_button_element *button, long *tab_index)
+ dom_html_button_element *button, int32_t *tab_index)
{
- return dom_html_element_get_long_property(&button->base, "tabindex",
+ return dom_html_element_get_int32_t_property(&button->base, "tabindex",
SLEN("tabindex"), tab_index);
}
dom_exception dom_html_button_element_set_tab_index(
- dom_html_button_element *button, unsigned long tab_index)
+ dom_html_button_element *button, uint32_t tab_index)
{
- return dom_html_element_set_long_property(&button->base, "tabindex",
+ return dom_html_element_set_int32_t_property(&button->base, "tabindex",
SLEN("tabindex"), tab_index);
}
diff --git a/src/html/html_collection.c b/src/html/html_collection.c
index 1e43940..704d384 100644
--- a/src/html/html_collection.c
+++ b/src/html/html_collection.c
@@ -25,7 +25,7 @@
* \param doc The document
* \param root The root element of the collection
* \param ic The callback function used to determin whether certain node
- * belongs to the collection
+ * beint32_ts to the collection
* \param col The result collection object
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
@@ -49,7 +49,7 @@ dom_exception _dom_html_collection_create(struct dom_html_document *doc,
* \param col The collection object to be initialised
* \param root The root element of the collection
* \param ic The callback function used to determin whether certain node
- * belongs to the collection
+ * beint32_ts to the collection
* \return DOM_NO_ERR on success.
*/
dom_exception _dom_html_collection_initialise(struct dom_html_document *doc,
@@ -113,7 +113,7 @@ void _dom_html_collection_destroy(struct dom_html_collection *col)
* \return DOM_NO_ERR on success.
*/
dom_exception dom_html_collection_get_length(dom_html_collection *col,
- unsigned long *len)
+ uint32_t *len)
{
struct dom_node_internal *node = col->root;
*len = 0;
@@ -157,10 +157,10 @@ dom_exception dom_html_collection_get_length(dom_html_collection *col,
* \return DOM_NO_ERR on success.
*/
dom_exception dom_html_collection_item(dom_html_collection *col,
- unsigned long index, struct dom_node **node)
+ uint32_t index, struct dom_node **node)
{
struct dom_node_internal *n = col->root;
- unsigned long len = 0;
+ uint32_t len = 0;
while (n != NULL) {
if (n->type == DOM_ELEMENT_NODE &&
diff --git a/src/html/html_document.c b/src/html/html_document.c
index ffc2e1c..1b238e9 100644
--- a/src/html/html_document.c
+++ b/src/html/html_document.c
@@ -340,7 +340,7 @@ dom_exception _dom_html_document_get_title(dom_html_document *doc,
} else {
dom_element *node;
dom_nodelist *nodes;
- unsigned long len;
+ uint32_t len;
exc = dom_document_get_elements_by_tag_name(doc,
doc->memoised[hds_TITLE],
diff --git a/src/html/html_element.c b/src/html/html_element.c
index b3b3bfc..9dc3155 100644
--- a/src/html/html_element.c
+++ b/src/html/html_element.c
@@ -220,7 +220,7 @@ dom_exception _dom_html_element_get_elements_by_tag_name_ns(
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception dom_html_element_get_bool_property(dom_html_element *ele,
- const char *name, unsigned long len, bool *has)
+ const char *name, uint32_t len, bool *has)
{
dom_string *str = NULL;
dom_attr *a = NULL;
@@ -259,7 +259,7 @@ fail:
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception dom_html_element_set_bool_property(dom_html_element *ele,
- const char *name, unsigned long len, bool has)
+ const char *name, uint32_t len, bool has)
{
dom_string *str = NULL;
dom_attr *a = NULL;
@@ -325,7 +325,7 @@ static char *_strndup(const char *s, size_t n)
}
/**
- * Get the a long property
+ * Get the a int32_t property
*
* \param ele The dom_html_element object
* \param name The name of the attribute
@@ -333,8 +333,8 @@ static char *_strndup(const char *s, size_t n)
* \param value The returned value, or -1 if prop. not set
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
-dom_exception dom_html_element_get_long_property(dom_html_element *ele,
- const char *name, unsigned long len, long *value)
+dom_exception dom_html_element_get_int32_t_property(dom_html_element *ele,
+ const char *name, uint32_t len, int32_t *value)
{
dom_string *str = NULL, *s2 = NULL;
dom_attr *a = NULL;
@@ -372,7 +372,7 @@ fail:
}
/**
- * Set a long property
+ * Set a int32_t property
*
* \param ele The dom_html_element object
* \param name The name of the attribute
@@ -380,8 +380,8 @@ fail:
* \param value The value
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
-dom_exception dom_html_element_set_long_property(dom_html_element *ele,
- const char *name, unsigned long len, unsigned long value)
+dom_exception dom_html_element_set_int32_t_property(dom_html_element *ele,
+ const char *name, uint32_t len, uint32_t value)
{
dom_string *str = NULL, *svalue = NULL;
dom_exception err;
@@ -391,7 +391,7 @@ dom_exception dom_html_element_set_long_property(dom_html_element *ele,
if (err != DOM_NO_ERR)
goto fail;
- if (snprintf(numbuffer, 32, "%lu", value) == 32)
+ if (snprintf(numbuffer, 32, "%u", value) == 32)
numbuffer[31] = '\0';
err = dom_string_create((const uint8_t *) numbuffer,
diff --git a/src/html/html_element.h b/src/html/html_element.h
index 140e3f1..a1130cc 100644
--- a/src/html/html_element.h
+++ b/src/html/html_element.h
@@ -113,14 +113,14 @@ dom_exception _dom_html_element_set_class_name(dom_html_element *element,
/* Some common functions used by all child classes */
dom_exception dom_html_element_get_bool_property(dom_html_element *ele,
- const char *name, unsigned long len, bool *has);
+ const char *name, uint32_t len, bool *has);
dom_exception dom_html_element_set_bool_property(dom_html_element *ele,
- const char *name, unsigned long len, bool has);
+ const char *name, uint32_t len, bool has);
-dom_exception dom_html_element_get_long_property(dom_html_element *ele,
- const char *name, unsigned long len, long *value);
-dom_exception dom_html_element_set_long_property(dom_html_element *ele,
- const char *name, unsigned long len, unsigned long value);
+dom_exception dom_html_element_get_int32_t_property(dom_html_element *ele,
+ const char *name, uint32_t len, int32_t *value);
+dom_exception dom_html_element_set_int32_t_property(dom_html_element *ele,
+ const char *name, uint32_t len, uint32_t value);
extern struct dom_html_element_vtable _dom_html_element_vtable;
diff --git a/src/html/html_form_element.c b/src/html/html_form_element.c
index fcdf42e..55ec0e9 100644
--- a/src/html/html_form_element.c
+++ b/src/html/html_form_element.c
@@ -168,7 +168,7 @@ dom_exception dom_html_form_element_get_elements(dom_html_form_element *ele,
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception dom_html_form_element_get_length(dom_html_form_element *ele,
- unsigned long *len)
+ uint32_t *len)
{
dom_exception err;
diff --git a/src/html/html_input_element.c b/src/html/html_input_element.c
index 694eb22..9586abb 100644
--- a/src/html/html_input_element.c
+++ b/src/html/html_input_element.c
@@ -356,30 +356,30 @@ SIMPLE_GET_SET(use_map);
SIMPLE_GET_SET(value);
dom_exception dom_html_input_element_get_tab_index(
- dom_html_input_element *input, long *tab_index)
+ dom_html_input_element *input, int32_t *tab_index)
{
- return dom_html_element_get_long_property(&input->base, "tabindex",
+ return dom_html_element_get_int32_t_property(&input->base, "tabindex",
SLEN("tabindex"), tab_index);
}
dom_exception dom_html_input_element_set_tab_index(
- dom_html_input_element *input, unsigned long tab_index)
+ dom_html_input_element *input, uint32_t tab_index)
{
- return dom_html_element_set_long_property(&input->base, "tabindex",
+ return dom_html_element_set_int32_t_property(&input->base, "tabindex",
SLEN("tabindex"), tab_index);
}
dom_exception dom_html_input_element_get_max_length(
- dom_html_input_element *input, long *max_length)
+ dom_html_input_element *input, int32_t *max_length)
{
- return dom_html_element_get_long_property(&input->base, "maxlength",
+ return dom_html_element_get_int32_t_property(&input->base, "maxlength",
SLEN("maxlength"), max_length);
}
dom_exception dom_html_input_element_set_max_length(
- dom_html_input_element *input, unsigned long max_length)
+ dom_html_input_element *input, uint32_t max_length)
{
- return dom_html_element_set_long_property(&input->base, "maxlength",
+ return dom_html_element_set_int32_t_property(&input->base, "maxlength",
SLEN("maxlength"), max_length);
}
diff --git a/src/html/html_options_collection.c b/src/html/html_options_collection.c
index 26926bf..0583d9c 100644
--- a/src/html/html_options_collection.c
+++ b/src/html/html_options_collection.c
@@ -26,7 +26,7 @@
* \param doc The document
* \param root The root element of the collection
* \param ic The callback function used to determin whether certain node
- * belongs to the collection
+ * beint32_ts to the collection
* \param col The result collection object
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
@@ -51,7 +51,7 @@ dom_exception _dom_html_options_collection_create(struct dom_html_document *doc,
* \param col The collection object to be initialised
* \param root The root element of the collection
* \param ic The callback function used to determin whether certain node
- * belongs to the collection
+ * beint32_ts to the collection
* \return DOM_NO_ERR on success.
*/
dom_exception _dom_html_options_collection_initialise(struct dom_html_document *doc,
@@ -95,7 +95,7 @@ void _dom_html_options_collection_destroy(struct dom_html_options_collection *co
* \return DOM_NO_ERR on success.
*/
dom_exception dom_html_options_collection_get_length(dom_html_options_collection *col,
- unsigned long *len)
+ uint32_t *len)
{
return dom_html_collection_get_length(&col->base, len);
}
@@ -108,7 +108,7 @@ dom_exception dom_html_options_collection_get_length(dom_html_options_collection
* \return DOM_NO_ERR on success.
*/
dom_exception dom_html_options_collection_set_length(
- dom_html_options_collection *col, unsigned long len)
+ dom_html_options_collection *col, uint32_t len)
{
UNUSED(col);
UNUSED(len);
@@ -126,7 +126,7 @@ dom_exception dom_html_options_collection_set_length(
* \return DOM_NO_ERR on success.
*/
dom_exception dom_html_options_collection_item(dom_html_options_collection *col,
- unsigned long index, struct dom_node **node)
+ uint32_t index, struct dom_node **node)
{
return dom_html_collection_item(&col->base, index, node);
}
diff --git a/src/html/html_select_element.c b/src/html/html_select_element.c
index 2d92c5f..58c08bc 100644
--- a/src/html/html_select_element.c
+++ b/src/html/html_select_element.c
@@ -137,7 +137,7 @@ dom_exception _dom_html_select_element_copy(dom_node_internal *old,
* \return DOM_NO_ERR on success.
*/
dom_exception dom_html_select_element_get_selected_index(
- dom_html_select_element *ele, unsigned long *index)
+ dom_html_select_element *ele, uint32_t *index)
{
*index = ele->selected;
@@ -152,7 +152,7 @@ dom_exception dom_html_select_element_get_selected_index(
* \return DOM_NO_ERR on success.
*/
dom_exception dom_html_select_element_set_selected_index(
- dom_html_select_element *ele, unsigned long index)
+ dom_html_select_element *ele, uint32_t index)
{
ele->selected = index;
@@ -167,7 +167,7 @@ dom_exception dom_html_select_element_set_selected_index(
* \return DOM_NO_ERR on success.
*/
dom_exception dom_html_select_element_get_length(
- dom_html_select_element *ele, unsigned long *len)
+ dom_html_select_element *ele, uint32_t *len)
{
dom_exception err;
dom_html_document *doc = (dom_html_document *) dom_node_get_owner(ele);
@@ -194,7 +194,7 @@ dom_exception dom_html_select_element_get_length(
* todo: how to deal with set the len of the children option objects?
*/
dom_exception dom_html_select_element_set_length(
- dom_html_select_element *ele, unsigned long len)
+ dom_html_select_element *ele, uint32_t len)
{
UNUSED(ele);
UNUSED(len);
@@ -291,13 +291,13 @@ dom_exception dom_html_select_element_set_multiple(
}
dom_exception dom_html_select_element_get_size(
- dom_html_select_element *ele, unsigned long *size);
+ dom_html_select_element *ele, uint32_t *size);
dom_exception dom_html_select_element_set_size(
- dom_html_select_element *ele, unsigned long size);
+ dom_html_select_element *ele, uint32_t size);
dom_exception dom_html_select_element_get_tab_index(
- dom_html_select_element *ele, unsigned long *tab_index);
+ dom_html_select_element *ele, uint32_t *tab_index);
dom_exception dom_html_select_element_set_tab_index(
- dom_html_select_element *ele, unsigned long tab_index);
+ dom_html_select_element *ele, uint32_t tab_index);
/* Functions */
dom_exception dom_html_select_element_add(struct dom_html_element *ele,
diff --git a/src/html/html_select_element.h b/src/html/html_select_element.h
index 68c51e3..ae5c7dd 100644
--- a/src/html/html_select_element.h
+++ b/src/html/html_select_element.h
@@ -16,7 +16,7 @@
struct dom_html_select_element {
struct dom_html_element base;
/**< The base class */
- long selected;
+ int32_t selected;
/**< The selected element's index */
dom_html_options_collection *options;
/**< The options objects */
diff --git a/src/html/html_text_area_element.c b/src/html/html_text_area_element.c
index 887a2c0..1c7534c 100644
--- a/src/html/html_text_area_element.c
+++ b/src/html/html_text_area_element.c
@@ -365,44 +365,44 @@ dom_exception dom_html_text_area_element_get_type(
}
dom_exception dom_html_text_area_element_get_tab_index(
- dom_html_text_area_element *text_area, long *tab_index)
+ dom_html_text_area_element *text_area, int32_t *tab_index)
{
- return dom_html_element_get_long_property(&text_area->base, "tabindex",
+ return dom_html_element_get_int32_t_property(&text_area->base, "tabindex",
SLEN("tabindex"), tab_index);
}
dom_exception dom_html_text_area_element_set_tab_index(
- dom_html_text_area_element *text_area, unsigned long tab_index)
+ dom_html_text_area_element *text_area, uint32_t tab_index)
{
- return dom_html_element_set_long_property(&text_area->base, "tabindex",
+ return dom_html_element_set_int32_t_property(&text_area->base, "tabindex",
SLEN("tabindex"), tab_index);
}
dom_exception dom_html_text_area_element_get_cols(
- dom_html_text_area_element *text_area, long *cols)
+ dom_html_text_area_element *text_area, int32_t *cols)
{
- return dom_html_element_get_long_property(&text_area->base, "cols",
+ return dom_html_element_get_int32_t_property(&text_area->base, "cols",
SLEN("cols"), cols);
}
dom_exception dom_html_text_area_element_set_cols(
- dom_html_text_area_element *text_area, unsigned long cols)
+ dom_html_text_area_element *text_area, uint32_t cols)
{
- return dom_html_element_set_long_property(&text_area->base, "cols",
+ return dom_html_element_set_int32_t_property(&text_area->base, "cols",
SLEN("cols"), cols);
}
dom_exception dom_html_text_area_element_get_rows(
- dom_html_text_area_element *text_area, long *rows)
+ dom_html_text_area_element *text_area, int32_t *rows)
{
- return dom_html_element_get_long_property(&text_area->base, "rows",
+ return dom_html_element_get_int32_t_property(&text_area->base, "rows",
SLEN("rows"), rows);
}
dom_exception dom_html_text_area_element_set_rows(
- dom_html_text_area_element *text_area, unsigned long rows)
+ dom_html_text_area_element *text_area, uint32_t rows)
{
- return dom_html_element_set_long_property(&text_area->base, "rows",
+ return dom_html_element_set_int32_t_property(&text_area->base, "rows",
SLEN("rows"), rows);
}
diff --git a/src/utils/character_valid.c b/src/utils/character_valid.c
index e966ec1..81c3558 100644
--- a/src/utils/character_valid.c
+++ b/src/utils/character_valid.c
@@ -161,11 +161,11 @@ bool binary_search(unsigned int ch, int left, int right,
}
/**
- * Test whether certain character belongs to some XML character group
+ * Test whether certain character beint32_ts to some XML character group
*
* \param ch The character being tested
* \param group The character group
- * \return true if the character belongs to the group, false otherwise.
+ * \return true if the character beint32_ts to the group, false otherwise.
*
* Generally, we use an algorithm like binary search to find the desired
* character in the group. The time complexity is about lg(n) and here n is
diff --git a/src/utils/hashtable.c b/src/utils/hashtable.c
index db6ece8..fb7c84a 100644
--- a/src/utils/hashtable.c
+++ b/src/utils/hashtable.c
@@ -114,7 +114,7 @@ dom_hash_table *_dom_hash_clone(dom_hash_table *ht)
* Destroys a hash table, freeing all memory associated with it.
*
* \param ht Hash table to destroy. After the function returns, this
- * will nolonger be valid
+ * will noint32_ter be valid
*/
void _dom_hash_destroy(dom_hash_table *ht)
{
@@ -305,7 +305,7 @@ uint32_t _dom_hash_get_length(struct dom_hash_table *ht)
* If you make changes to this hash table implementation, please rerun this
* test, and if possible, through valgrind to make sure there are no memory
* leaks or invalid memory accesses. If you add new functionality, please
- * include a test for it that has good coverage along side the other tests.
+ * include a test for it that has good coverage aint32_t side the other tests.
*/
#ifdef TEST_RIG
diff --git a/test/testutils/domtsasserts.c b/test/testutils/domtsasserts.c
index e5220e0..41cacf2 100644
--- a/test/testutils/domtsasserts.c
+++ b/test/testutils/domtsasserts.c
@@ -50,7 +50,7 @@ bool is_same_int(int expected, int actual)
return expected == actual;
}
-bool is_same_unsigned_long(unsigned long expected, unsigned long actual)
+bool is_same_unsigned_int32_t(uint32_t expected, uint32_t actual)
{
return expected == actual;
}
@@ -69,7 +69,7 @@ bool is_equals_bool(bool expected, bool actual, bool dummy)
return expected == actual;
}
-bool is_equals_unsigned_long(unsigned long expected, unsigned long actual, bool dummy)
+bool is_equals_unsigned_int32_t(uint32_t expected, uint32_t actual, bool dummy)
{
UNUSED(dummy);
@@ -156,9 +156,9 @@ bool is_instanceof(const char *type, dom_node *node)
}
-bool is_size_domnamednodemap(unsigned long size, dom_namednodemap *map)
+bool is_size_domnamednodemap(uint32_t size, dom_namednodemap *map)
{
- unsigned long len;
+ uint32_t len;
dom_exception err;
err = dom_namednodemap_get_length(map, &len);
@@ -170,9 +170,9 @@ bool is_size_domnamednodemap(unsigned long size, dom_namednodemap *map)
return size == len;
}
-bool is_size_domnodelist(unsigned long size, dom_nodelist *list)
+bool is_size_domnodelist(uint32_t size, dom_nodelist *list)
{
- unsigned long len;
+ uint32_t len;
dom_exception err;
err = dom_nodelist_get_length(list, &len);
@@ -184,7 +184,7 @@ bool is_size_domnodelist(unsigned long size, dom_nodelist *list)
return size == len;
}
-bool is_size_list(unsigned long size, list *list)
+bool is_size_list(uint32_t size, list *list)
{
return size == list->size;
}
diff --git a/test/testutils/domtsasserts.h b/test/testutils/domtsasserts.h
index bc214e8..e18509c 100644
--- a/test/testutils/domtsasserts.h
+++ b/test/testutils/domtsasserts.h
@@ -30,10 +30,10 @@ bool is_null(void *arg);
bool is_same(void *excepted, void *actual);
bool is_same_int(int excepted, int actual);
-bool is_same_unsigned_long(unsigned long excepted, unsigned long actual);
+bool is_same_unsigned_int32_t(uint32_t excepted, uint32_t actual);
bool is_equals_int(int excepted, int actual, bool dummy);
-bool is_equals_unsigned_long(unsigned long excepted, unsigned long actual, bool dummy);
+bool is_equals_unsigned_int32_t(uint32_t excepted, uint32_t actual, bool dummy);
bool is_equals_bool(bool excepted, bool actual, bool dummy);
bool is_equals_string(const char *excepted, dom_string *actual,
bool ignoreCase);
@@ -45,9 +45,9 @@ bool is_equals_list(list *expected, list *actual, bool ignoreCase);
bool is_instanceof(const char *type, dom_node *node);
-bool is_size_domnamednodemap(unsigned long size, dom_namednodemap *map);
-bool is_size_domnodelist(unsigned long size, dom_nodelist *list);
-bool is_size_list(unsigned long size, list *list);
+bool is_size_domnamednodemap(uint32_t size, dom_namednodemap *map);
+bool is_size_domnodelist(uint32_t size, dom_nodelist *list);
+bool is_size_list(uint32_t size, list *list);
bool is_uri_equals(const char *scheme, const char *path, const char *host,
const char *file, const char *name, const char *query,
diff --git a/test/testutils/foreach.c b/test/testutils/foreach.c
index 764920c..e068201 100644
--- a/test/testutils/foreach.c
+++ b/test/testutils/foreach.c
@@ -38,7 +38,7 @@ void foreach_initialise_domnamednodemap(dom_namednodemap *map, unsigned int *ite
bool _get_next_domnodelist(dom_nodelist *list, unsigned int *iterator, dom_node **ret)
{
dom_exception err;
- unsigned long len;
+ uint32_t len;
err = dom_nodelist_get_length(list, &len);
if (err != DOM_NO_ERR)
@@ -80,7 +80,7 @@ bool get_next_list(list *list, unsigned int *iterator, void **ret)
bool _get_next_domnamednodemap(dom_namednodemap *map, unsigned int *iterator, dom_node **ret)
{
dom_exception err;
- unsigned long len;
+ uint32_t len;
err = dom_namednodemap_get_length(map, &len);
if (err != DOM_NO_ERR)